If your mouse wheel behaves weirdly in games, you may need to disable high resolution scrolling in modprobe or xinput/libinput settings. This is a common problem on Logitech gaming mouses.
- Unload "hid_logitech_hidpp" kernel module
sudo modprobe -r hid_logitech_hidpp
- To disable it permanently, blacklist the module in /etc/modprobe.d/blacklist.conf
echo "blacklist hid_logitech_hidpp" | sudo tee -a /etc/modprobe.d/blacklist.conf
- Reboot
- List all devices
xinput list
- Set high resolution to 0 (replace 9 with your mouse device id from the first command)
xinput set-prop 9 "libinput High Resolution Wheel Scroll Enabled" 0
- To disable it permanently, create a file in /etc/X11/xorg.conf.d/
sudo nano /etc/X11/xorg.conf.d/99-libinput-no-hires-scroll.conf
- Put this
Section "InputClass"
Identifier "Disable high-resolution scrolling"
MatchDriver "libinput"
Option "HighResolutionWheelScrolling" "off"
EndSection
- Reboot
- List all devices
libinput list-devices
- Create a file named "local-overrides.quirks" in /etc/libinput/
sudo nano /etc/libinput/local-overrides.quirks
- Put this (Make sure to change MatchName with your device name shown with the first step)
[Logitech G502]
MatchName=Logitech G502
AttrEventCode=-REL_WHEEL_HI_RES;-REL_HWHEEL_HI_RES;
- Reboot
This doesn't seem to work in the latest libinput version 1.29 anymore. I have to downgrade libinput to get it to work again.
There seems to be an issue on this:
https://gitlab.freedesktop.org/libinput/libinput/-/issues/1160