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
They have fixed this. Until it rolls out, possible workarounds are:
Fedora: https://koji.fedoraproject.org/koji/buildinfo?buildID=2610141
Debian: https://deb.debian.org/debian/pool/main/libi/libinput/
I have been using version 1.27.1-1 on Fedora 42 and it works great. Just keep in mind that with each new update libinput will get upgraded too.