Home | News | Download | Packages | Forum | Wiki | Github

[Solved] /etc/X11/xorg.conf.d/30-touchpad.conf not being applied


#1

Hi all. I’m trying to get the following touchpad configuration file to work:

# cat /etc/X11/xorg.conf.d/30-touchpad.conf
Section "InputClass"
        Identifier "SynPS/2 Synaptics TouchPad"
        Driver "libinput"
        MatchDevicePath "/dev/input/event11"
        MatchIsTouchpad "1"
        Option "AccelProfile" "adaptive"
        Option "ClickMethod" "buttonareas"
        Option "DisableWhileTyping" "0"
        Option "HorizontalScrolling" "1"
        Option "LeftHanded" "0"
        Option "MiddleEmulation" "0"
        Option "NaturalScrolling" "1"
        Option "ScrollMethod" "edge"
        Option "SendEventsMode" "enabled"
        Option "Tapping" "1"
        Option "TappingDrag" "1"
        Option "TappingDragLock" "1"
EndSection

Would appreciate some guidance on what I should be doing to fix this. Thanks.


#2

Have a look at this thread [SOLVED] LXDE: Enable touchpad tap
Using the xf86-input-synaptics driver, like cr6 suggested worked for me.


#3

After I read your answer, I made a new test on my laptop…

I removed xf86-input-synaptics.

Now I use xf86-input-libinput only:

$ xbps-query -s input
[*] libXi-1.7.9_1                X Input extension library
[*] libinput-1.9.4_1             Provides handling input devices in Wayland compositors and X
[*] xf86-input-libinput-0.26.0_1 Generic input driver for the X.Org server based on libinput
[*] xinput-1.6.2_1               Utility to configure and test X input devices

Results: my touchpad works, but the “tap-to-click” function is not enabled by default.


To enable the “tap-to-click” function, I copied this file:

/usr/share/X11/xorg.conf.d/40-libinput.conf

To place it here:

/etc/X11/xorg.conf.d/40-libinput.conf

Then I edited this file, to add the “Tapping” function:

[...]
Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "Tapping" "1"
EndSection
[...]

And now it’s ok! :sweat_smile:


(Edmond Dantes ) #4

Since synaptics is obsolete,and libinput is lighter and better performing, OP should try first to get his/her touchpad to work relying on xf86-input-libinput, especially with the view of having to switch to Wayland :frowning: in a near future. That said, obviously synaptics is a rock-solid fallback. OP has not specified if he/her is on a Synaptics Touchpad: he may be on ALPS or Elantech, and in that case synaptics would not work.

Personally I’m not the progressist: I still use xf86-input-mouse along extended synaptics support patch for parallel mouses driver, like 12 years ago :wink:

Hi @Schicko :slight_smile: ,before digging into you configuration, first confirm your Touchpad is supported by libinput,by typing:

libinput list-devices

Also since you don’t need an InputClass managed by libinput, but just a single Touchpad configuration replace Section "InputClass" with:

Section    "InputDevice"

Now, since that “SynPS/2 Synaptics TouchPad”, especially with MatchIsTouchpad enabled, is a bit of an exotic name, are you sure it’s referred also in ServerLayout section (which wrappes all configurations together) of auto-generated /etc/X11/xorg.conf? It should be listed among Identifiers, otherwise it’s unlikely going to work. Please look carefully xorg.conf, as it should contain something like (should be at the beginning, so you’d be even able to look for it using head):

Section "ServerLayout"
     InputDevice "SynPS/2 Synaptics TouchPad" "CorePointer"

And I recommend replacing that name with someting like Touchpad0in both the .conf files :wink:

Since we said you may try to replace InputClass with InputDevice, this would require also to replace MatchDevicePath with a simpler Device.
Also, why did you put a Driver entry instead of a MatchDriver one? This is not the expected syntax for a InputClass section

By the way, are you 100% sure your Touchpad is /dev/input/event11? Because event11 seems a bit of a high value (10 more input Devices before?)…event* should match you device name, otherwise it’s assured it won’t be working
To sum up this point, you should have:

Device      "/dev/input/event*"

Replacing the wildcard with the number corresponding to your touchpad (it’s very important)
To find out which event handles your touchpad you should look inside file /proc/bus/input/devices. For example, provided you’ve got a synaptics Touchpad:

 cat /proc/bus/input/devices | grep -i synap | grep "Handlers"

Best whishes


#5

Well, I’ve just mv the synaptics driver to my home folder and created the libinput.conf file in /etc/X11/xorg.conf.d as suggested by cr6 above just to test this :thinking:
Rebooted and the tapping function is not working :angry:
I can move the cursor with the touch pad, but no tapping.
So, I mv back the synaptics driver into /etc/X11/xorg.conf.d and removed the libinput.conf file. Rebooted and, guess what?.. working as it should :upside_down_face:

Note: I have all the packages listed by cr6 above installed.
So, I don’t care if synaptics is obsolete or not! Is just a simple text file and it’s working fine here. No more messing around, “if it ain’t broken don’t fix it”:kissing_heart:


#6

Thanks all. I’ve fixed my problem by writing the following to /etc/X11/xorg.conf.d/30-touchpad.conf:

Section "InputClass"
        Identifier "libinput touchpad catchall"
        Driver "libinput"
        MatchDevicePath "/dev/input/event*"
        MatchIsTouchpad "1"
        Option "AccelProfile" "flat"
        Option "ClickMethod" "buttonareas"
        Option "DisableWhileTyping" "0"
        Option "HorizontalScrolling" "1"
        Option "LeftHanded" "0"
        Option "MiddleEmulation" "1"
        Option "NaturalScrolling" "1"
        Option "ScrollMethod" "twofinger"
        Option "SendEventsMode" "enabled"
        Option "Tapping" "1"
        Option "TappingDrag" "1"
        Option "TappingDragLock" "1"
EndSection

It seems my problem was caused by using the wring Identifier string which is strange because the same string “SynPS/2 Synaptics TouchPad” works on my Arch install and does exist on my Void install (I can see it listed in /proc/bus/input/devices, when I use xinput list or when I use libinput list-devices). I changed MatchDevicePath to “/dev/input/event*” as I noticed it changed from 11 to 13 when I rebooted which suggests to me that it isn’t static.

@Montecristo I also tried using InputDevice as opposed to InputClass but this didn’t work properly either. For this, I had to comment out the MatchDevicePatch and MatchIsTouchPad as they caused errors and the xorg.conf man page indicated these weren’t applicable when using InputDevice. But it didn’t work as intended because the Option lines I had set weren’t being respected which I suspect could be due to Xorg using the configs in /usr/share instead. I tried using both Identifier strings I previously mentioned but still none of these worked properly. Also /etc/X11/xorg.conf doesn’t exist on my Void install, not sure why.


#7

You’re right.
Finally, I reinstalled xf86-input-synaptics because xf86-input-libinput does not work very well…

And in /var/log/Xorg.0.log I can see a long list of errors like that:

[   132.036] (EE) event15 - (EE) SynPS/2 Synaptics TouchPad: (EE) kernel bug: Touch jump detected and discarded.
See https://wayland.freedesktop.org/libinput/doc/1.9.4/touchpad_jumping_cursor.html for details
[   303.378] (II) Axis 0x1 value 5064 is outside expected range [1256, 4600]
See https://wayland.freedesktop.org/libinput/doc/1.9.4//absolute_coordinate_ranges.html for details
[   373.211] (EE) event15 - (EE) SynPS/2 Synaptics TouchPad: (EE) kernel bug: Touch jump detected and discarded.
See https://wayland.freedesktop.org/libinput/doc/1.9.4/touchpad_jumping_cursor.html for details
[   388.596] (EE) event15 - (EE) SynPS/2 Synaptics TouchPad: (EE) kernel bug: Touch jump detected and discarded.
See https://wayland.freedesktop.org/libinput/doc/1.9.4/touchpad_jumping_cursor.html for details

:confused:


(Edmond Dantes ) #8

@cr6, that’s a known error related to libinput detecting a cursor jump (unexpected lack of continuity in input), so shouldn’t occur with synaptics, but if you still want to use libinput and get rid of the error, you’ll probably need to tweak with the udev ruleset for your touchpad at event15. Since touchpad rules are a bit complicated, you’d better report the bug to freedesktop.org, see libinput 1.7.2: reporting_bugs.

Rember to attach your:

  • laptop model/specs + cat /sys/class/dmi/id/modalias + Touchpad dimensions

  • uname -r

  • dmesg

  • xinput list-props <touchpad_name>

  • libinput version: libinput-list-devices –version

  • udev rules for touchapd: udevadm info /sys/class/input/event15

  • Emulated event replays and records for your touchpad, using Evemu:

      evemu-record > scroll.evemu    [Select event 15]
      evemu-play /dev/input/event15 < scroll.evemu

#9

Thanks for the info, I will report this bug when I have time…

Using xf86-input-libinput I also encountered a strange bug with the Tapping function: instead of the regular double-click to open something, now I must triple-click.

Really weird ! :unamused:


(Edmond Dantes ) #10

Weird indeed :sweat_smile: , I never heard of this, though I was thinking that, in accordance to what we said above, due to the unexpected cursor jump, your laptop may be interpreting the second tap as a drag. Did you happend to enable TappingDrag or DragLock perhaps? What about force-disabling them?

    Option "TappingDrag"  "false"
              
    Option "TappingDragLock  "false"