Natural Scrolling with i3
i3 seems to have traditional scrolling, where your scrolling motion matches that of the scrollbar, as the default. I wanted natural scrolling where your scrolling motion matches the motion of the page. Update: I did this on Debian Buster, but the solution mentioned at the end works for Arch Linux as well.
Stuff that didn’t work
Based on the ArchWikis, I decided to use
Since I didn’t have libinput installed, I decided to run
At any rate, I tried the solution recommended, which did nothing. The device in question was the “PS/2 Synaptics TouchPad”; this is really important, keep this in mind for later.
The next thing I tried was screwing with some config files.
I was told to add a file to the
/etc/X11/xorg.conf.d directory, but that directory didn’t exist.
I therefore tried editing the
/usr/share/X11/xorg.conf.d directory, since it at least contained the
I made a file called called
70-libinput.conf and filled it with the following:
Section "InputClass" Identifier "libinput touchpad catchall" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" Option "NaturalScrolling" "false" Option "Tapping" "on" Driver "libinput" EndSection
The “tapping” bit is there since I don’t like pressing my trackpad all the way for it to register as a click.
After a bit more searching, I found that you’re supposed to copy the files to
I tried that, and renamed the file, different things, such as
40-libinput, and playing with different numbers, which refer to the priority of the file.
These didn’t work either.
Evidently, I can’t read. The ArchWikis page linked in the beginning suggested running
However, I didn’t have
There wasn’t a package with that exact name, so I decided to install
libinput-tools. This seemed to do the trick.
list-devices bit just displays the info a bit differently; it’s not that big of a deal breaker.
However, this time, when I tried the
xinput command from earlier, it now showed another touchpad, “SYNA2393:00 06CB:7A13 Touchpad”.
I repeated the steps from earlier using this device instead, and the steps from the ArchWikis worked.
Since I was satisfied with the changes I’d made, I need to write them to file.
I needed a
.xinitrc file, so I copied it over from
/etc/X11/xinit/xinitrc to my home directory.
To this file, I added the lines
xinput set-prop "SYNA2393:00 06CB:7A13 Touchpad" "libinput Tapping Enabled" 1 xinput set-prop "SYNA2393:00 06CB:7A13 Touchpad" "libinput Natural Scrolling Enabled" 1
Again, I wanted both tapping and natural scrolling.
For the temporary testing, the device numbers work fine, but for something to be loaded for every session, it’s recommended to use the actual names, since the numbers can change.
/etc/X11/xinit/xinitrc solution did not work for me, since on reboot, it only did the first command.
The final solution was adding the following lines to my i3 config:
exec --no-startup-id xinput set-prop "SYNA2393:00 06CB:7A13 Touchpad" "libinput Tapping Enabled" 1 & exec --no-startup-id xinput set-prop "SYNA2393:00 06CB:7A13 Touchpad" "libinput Natural Scrolling Enabled" 1
Update for Arch: make sure
xinput is installed! If not, install
xorg-xinput, and you’ll be golden.