xinput not surviving reboots

I'm sure this is so trivial, but I can't figure it out for the life of me. I've googled and searched the forums and the one topic that seemed close to my issue never really got it resolved.

I have a Synaptics touchpad and it mostly works great. I just need to change a couple of defaults that are kinda' annoying me, which are tap to click and natural scrolling. I've successfully done these by executing the following commands.
Bash:
xinput --set-int-prop 10 "libinput Tapping Enabled" 8 1
xinput --set-int-prop 10 "libinput Natural Scrolling Enabled" 8 1

These 2 commands do exactly what I want, with 1 caveat; they don't survive reboots. I've tried adding the following to /etc/xorg.conf and /usr/local/etc/X11/xorg.conf.d/40-libinput.conf (what's with the systemd naming convention?) and neither of them do the trick. I currently do NOT run moused, but I did try enabling it anyway to see if that'd do the trick to no avail. Also hw.psm.synaptics_support is 1.
Code:
Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"

        Option "Tapping Enabled"                    "1"
        Option "Tapping Enabled Default"            "1"
        Option "Natural Scrolling Enabled"          "1"
        Option "Natural Scrolling Enabled Default"  "1"
EndSection

Currently I have a work-around in a shell script that I just run after X starts, but I'd like to do this in a less hacky way if possible. Any help is appreciated!
 
Add those commands to .xsession or .xinitrc to have them when your desktop starts. If you needed them for the display manager, you could also add those commands to XDM's configuration files. I've run a few commands, especially xrandr to set my monitor display through both of those before. Not all commands are suitable from running from xdm, however.

If they were for terminal, you would use crontab with the @reboot setting.
 
  • Like
Reactions: mer
Thanks, I forgot about .xinitrc and that works beautifully. But is there a way to do this through the proper config file? I'm thinking maybe I'm just not naming the config file correctly or maybe some other syntax I forgot?
 
Whattteva I vaguely recall some problem with a config like that. It could be that the actual xorg driver claiming the touchpad is synaptics rather than libinput.
You can check Xorg.0.log file.
 
Whattteva I vaguely recall some problem with a config like that. It could be that the actual xorg driver claiming the touchpad is synaptics rather than libinput.
You can check Xorg.0.log file.
Code:
[   299.590] (II) Using input driver 'libinput' for 'SynPS/2 Synaptics TouchPad'
This is what I see on the log file. I'm pretty sure it's also using libinput because xinput with those libinput options work.
 
.xinitrc IS a proper config file.
Well, I noticed that there seems to be actual config syntax like the ones I put in my OP, I can't help but think that manually executing an active startup script feels like a work-around instead of the program reading passive configurations from a dedicated config file like how most other startup processes do.
 
Is "Natural Scrolling Enabled Default" actually a legal option name?
Type man 4 libinput to find out.
 
Is "Natural Scrolling Enabled Default" actually a legal option name?
Type man 4 libinput to find out.
It is an actual legal option name and I know that because I have already tried it in the terminal before I made that config file. Though I'm not actually sure if it actually does anything. The one that matters is really the one without the Default in its name.
 
Whattteva I've just looked at my config for a laptop that I used to use.
And here's my touchpad section from it:
Code:
Section "InputClass"
        Identifier      "Motile touchpad"
        MatchDriver     "libinput"
        MatchIsTouchpad "on"
        MatchProduct    "UNIW0001"

        Option          "Tapping" "on"
        Option          "TappingDrag" "on"
        Option          "TappingDragLock" "on"
        Option          "ClickMethod" "clickfinger"
        Option          "ScrollMethod" "twofinger"
        Option          "NaturalScrolling" "off"
        Option          "DisableWhileTyping" "on"
EndSection
Looks like X option names are slightly different from what you got from xinput output.
 
Whattteva I've just looked at my config for a laptop that I used to use.
And here's my touchpad section from it:
Code:
Section "InputClass"
        Identifier      "Motile touchpad"
        MatchDriver     "libinput"
        MatchIsTouchpad "on"
        MatchProduct    "UNIW0001"

        Option          "Tapping" "on"
        Option          "TappingDrag" "on"
        Option          "TappingDragLock" "on"
        Option          "ClickMethod" "clickfinger"
        Option          "ScrollMethod" "twofinger"
        Option          "NaturalScrolling" "off"
        Option          "DisableWhileTyping" "on"
EndSection
Looks like X option names are slightly different from what you got from xinput output.
You're absolutely right, this worked! Kinda' weird that xinput's output doesn't match what it actually takes in. But this works and I can now remove the redundant commands from my .xinitrc
 
Back
Top