Mouse wheel scrolls in reversed direction
Solution 1:
You have to use xinput to disable Natural Scrolling.
Open terminal:
~$ xinput list
The output should be something like:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ USB Keyboard id=10 [slave pointer (2)]
⎜ ↳ ImPS/2 BYD TouchPad id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ USB Keyboard id=9 [slave keyboard (3)]
↳ USB Keyboard id=12 [slave keyboard (3)]
Look, TouchPad id =11.
~$ xinput list-props 11
The output should be something like:
Device 'ImPS/2 BYD TouchPad':
Device Enabled (135): 1
Coordinate Transformation Matrix (137): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Accel Speed (274): 0.000000
libinput Accel Speed Default (275): 0.000000
libinput Accel Profiles Available (276): 1, 1
libinput Accel Profile Enabled (277): 1, 0
libinput Accel Profile Enabled Default (278): 1, 0
libinput Natural Scrolling Enabled (271): 1
libinput Natural Scrolling Enabled Default (272): 0
libinput Send Events Modes Available (255): 1, 0
libinput Send Events Mode Enabled (256): 0, 0
libinput Send Events Mode Enabled Default (257): 0, 0
libinput Left Handed Enabled (279): 0
libinput Left Handed Enabled Default (280): 0
libinput Scroll Methods Available (281): 0, 0, 1
...
Look this, libinput Natural Scrolling Enabled (271): 1.
You need to set it to 0.
xinput set-prop 11 271 0
Solution 2:
This answer is largely based on the answer by grisotto which works but doesn't survive reboots on my machine.
This almost automates the process:
Get your pointer device name:
$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ VirtualBox mouse integration id=9 [slave pointer (2)]
⎜ ↳ ImExPS/2 BYD TouchPad id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Sleep Button id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=10 [slave keyboard (3)]
In my case it's ImExPS/2 BYD TouchPad
although it's a mouse. Next get the property id of libinput Natural Scrolling Enabled
:
$ xinput list-props 11 # use the id or the name of the pointer device
Device 'ImExPS/2 BYD TouchPad':
Device Enabled (119): 1
Coordinate Transformation Matrix (121): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Accel Speed (271): 0.000000
libinput Accel Speed Default (272): 0.000000
libinput Accel Profiles Available (273): 1, 1
libinput Accel Profile Enabled (274): 1, 0
libinput Accel Profile Enabled Default (275): 1, 0
libinput Natural Scrolling Enabled (261): 0
libinput Natural Scrolling Enabled Default (262): 0
libinput Send Events Modes Available (241): 1, 0
[snip]
Here it's 261
. Now use your pointer device name (as the id might change on reboots) and property id (stays the same) and put these lines in your ~/.bashrc
. In my case it's:
device=$(xinput list --id-only 'ImExPS/2 BYD TouchPad')
xinput set-prop $device 261 0
I still have to open and close a terminal on each boot as my .bashrc
is not read on boot and it doesn't work in .profile
but that's just three clicks.
Solution 3:
In my case there was no Natural Scrolling
setting, but instead a Evdev Scrolling Distance
.
First: find out the device:
xinput list
As this changes upon every boot (see answer of robsn), get the id by name and store this into a var:
device=$(xinput list --id-only 'Logitech USB Laser Mouse')
Double check that you really have property Edev Scrolling Distance
:
xinput list-props $device
And then set it with:
xinput set-prop $device "Edev Scrolling Distance" -1 1 1
To enable this upon every boot, add the device=
and set-prop
commands to your ~/.xsessionrc
file.