You are not logged in.
Pages: 1
Hello!
My mouse is called "Light2 S". I plug it into my laptop via USB. It's a high res gaming mouse that feels a lot too fast. Hard to move the pointer or to select s.t..
- Decrease mouse perceived cursor speed for this specific Model
- Make these settings persistent
I managed to decrease the perceived mouse speed via xinput.
But making these settings persistent via adding a config file in /etc/X11/xorg.conf.d/ didn't work.
I followed this guide: https://wiki.archlinux.org/title/Mouse_acceleration
1. Set Accell Profile to "flat" via xinput:
$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=13 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint id=14 [slave pointer (2)]
⎜ ↳ Light2 S Consumer Control id=9 [slave pointer (2)]
⎜ ↳ Light2 S id=16 [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)]
↳ Sleep Button id=8 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)]
↳ Light2 S Consumer Control id=10 [slave keyboard (3)]
↳ Light2 S id=11 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=15 [slave keyboard (3)]$ xinput list-props 16
Device 'Light2 S':
Device Enabled (181): 1
Coordinate Transformation Matrix (183): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (315): 0
libinput Natural Scrolling Enabled Default (316): 0
libinput Scroll Methods Available (317): 0, 0, 1
libinput Scroll Method Enabled (318): 0, 0, 0
libinput Scroll Method Enabled Default (319): 0, 0, 0
libinput Button Scrolling Button (320): 2
libinput Button Scrolling Button Default (321): 2
libinput Button Scrolling Button Lock Enabled (322): 0
libinput Button Scrolling Button Lock Enabled Default (323): 0
libinput Middle Emulation Enabled (324): 0
libinput Middle Emulation Enabled Default (325): 0
libinput Rotation Angle (298): 0.000000
libinput Rotation Angle Default (299): 0.000000
libinput Accel Speed (326): 0.000000
libinput Accel Speed Default (327): 0.000000
libinput Accel Profiles Available (328): 1, 1, 1
libinput Accel Profile Enabled (329): 1, 0, 0
libinput Accel Profile Enabled Default (330): 1, 0, 0
libinput Accel Custom Fallback Points (331): <no items>
libinput Accel Custom Fallback Step (332): 0.000000
libinput Accel Custom Motion Points (333): <no items>
libinput Accel Custom Motion Step (334): 0.000000
libinput Accel Custom Scroll Points (335): <no items>
libinput Accel Custom Scroll Step (336): 0.000000
libinput Left Handed Enabled (337): 0
libinput Left Handed Enabled Default (338): 0
libinput Send Events Modes Available (300): 1, 0
libinput Send Events Mode Enabled (301): 0, 0
libinput Send Events Mode Enabled Default (302): 0, 0
Device Node (303): "/dev/input/event5"
Device Product ID (304): 1241, 62747
libinput Drag Lock Buttons (339): <no items>
libinput Horizontal Scroll Enabled (340): 1
libinput Scrolling Pixel Distance (341): 15
libinput Scrolling Pixel Distance Default (342): 15
libinput High Resolution Wheel Scroll Enabled (343): 1$ xinput set-prop 16 "libinput Accel Profile Enabled" 0 1 0That's much better. Now how can I persist these settings through reboots and through plugging the mouse off/on?
2. I tried adding a config file to make these settings persistent:
$ cat /etc/X11/xorg.conf.d/50-libinput-custom-config.conf
Section "InputDevice"
Identifier "Light2 S"
MatchIsPointer "on"
Driver "libinput"
Option "libinput Accel Profile Enabled" "0 1 0"
EndSectionThis config has no effect though:
- unplugging / plugging the mouse shows that the "Accel Profile" is still "1 0 0":
$ xinput list-props 16 | grep "Accel Profile"
libinput Accel Profiles Available (328): 1, 1, 1
libinput Accel Profile Enabled (329): 1, 0, 0 # <-- look here
libinput Accel Profile Enabled Default (330): 1, 0, 0I checked
~/.local/share/xorg/Xorg.0.logafter replugging my mouse, but couldn't make sense of all this information.
- Why is my config file not having an effect?
- How do I confirm, if my config has even been read?
- How to verify that the config file is valid or produces errors?
Info:
I tried to read the xorg log file, but struggle to make sense of it. I am missing context / documentation how devices and config files are loaded and by which entities.
Should the be a line saying that my config file has been applied? Didn't see such line.
The relevant log file (?) after plugging the mouse in:
$ tail -f ~/.local/share/xorg/Xorg.0.log
[ 89791.442] (II) config/udev: Adding input device Light2 S (/dev/input/mouse0)
[ 89791.442] (**) Light2 S: Applying InputClass "Light2 S"
[ 89791.442] (II) Using input driver 'libinput' for 'Light2 S'
[ 89791.442] (**) Light2 S: always reports core events
[ 89791.442] (**) Option "Device" "/dev/input/mouse0"
[ 89791.443] (EE) xf86OpenSerial: Cannot open device /dev/input/mouse0
Permission denied.
[ 89791.443] (II) mouse0: opening input device '/dev/input/mouse0' failed (Permission denied).
[ 89791.443] (II) mouse0 - failed to create input device '/dev/input/mouse0'.
[ 89791.443] (EE) libinput: Light2 S: Failed to create a device for /dev/input/mouse0
[ 89791.443] (EE) PreInit returned 2 for "Light2 S"
[ 89791.443] (II) UnloadModule: "libinput"
[ 89791.495] (II) config/udev: Adding input device Light2 S (/dev/input/event9)
[ 89791.495] (II) No input driver specified, ignoring this device.
[ 89791.495] (II) This device may have been added with another device file.
[ 89791.509] (II) config/udev: Adding input device Light2 S (/dev/input/event6)
[ 89791.509] (**) Light2 S: Applying InputClass "evdev keyboard catchall"
[ 89791.509] (**) Light2 S: Applying InputClass "libinput keyboard catchall"
[ 89791.509] (**) Light2 S: Applying InputClass "system-keyboard"
[ 89791.509] (**) Light2 S: Applying InputClass "keyboard"
[ 89791.509] (II) Using input driver 'libinput' for 'Light2 S'
[ 89791.509] (II) systemd-logind: got fd for /dev/input/event6 13:70 fd 32 paused 0
[ 89791.510] (**) Light2 S: always reports core events
[ 89791.510] (**) Option "Device" "/dev/input/event6"
[ 89791.512] (II) event6 - Light2 S: is tagged by udev as: Keyboard
[ 89791.512] (II) event6 - Light2 S: device is a keyboard
[ 89791.513] (II) event6 - Light2 S: device removed
[ 89791.513] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.1/0003:04D9:F51B.003B/input/input94/event6"
[ 89791.513] (II) XINPUT: Adding extended input device "Light2 S" (type: KEYBOARD, id 9)
[ 89791.513] (**) Option "xkb_model" "pc105"
[ 89791.513] (**) Option "xkb_layout" "de"
[ 89791.513] (**) Option "xkb_variant" "nodeadkeys"
[ 89791.513] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[ 89791.514] (II) event6 - Light2 S: is tagged by udev as: Keyboard
[ 89791.514] (II) event6 - Light2 S: device is a keyboard
[ 89791.515] (II) config/udev: Adding input device Light2 S Consumer Control (/dev/input/event7)
[ 89791.516] (**) Light2 S Consumer Control: Applying InputClass "evdev keyboard catchall"
[ 89791.516] (**) Light2 S Consumer Control: Applying InputClass "libinput keyboard catchall"
[ 89791.516] (**) Light2 S Consumer Control: Applying InputClass "system-keyboard"
[ 89791.516] (**) Light2 S Consumer Control: Applying InputClass "keyboard"
[ 89791.516] (II) Using input driver 'libinput' for 'Light2 S Consumer Control'
[ 89791.516] (II) systemd-logind: got fd for /dev/input/event7 13:71 fd 45 paused 0
[ 89791.516] (**) Light2 S Consumer Control: always reports core events
[ 89791.516] (**) Option "Device" "/dev/input/event7"
[ 89791.517] (II) event7 - Light2 S Consumer Control: is tagged by udev as: Keyboard
[ 89791.517] (II) event7 - Light2 S Consumer Control: device is a keyboard
[ 89791.518] (II) event7 - Light2 S Consumer Control: device removed
[ 89791.518] (II) libinput: Light2 S Consumer Control: needs a virtual subdevice
[ 89791.518] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/0003:04D9:F51B.003C/input/input95/event7"
[ 89791.518] (II) XINPUT: Adding extended input device "Light2 S Consumer Control" (type: MOUSE, id 10)
[ 89791.518] (**) Option "AccelerationScheme" "none"
[ 89791.518] (**) Light2 S Consumer Control: (accel) selected scheme none/0
[ 89791.518] (**) Light2 S Consumer Control: (accel) acceleration factor: 2.000
[ 89791.518] (**) Light2 S Consumer Control: (accel) acceleration threshold: 4
[ 89791.519] (II) event7 - Light2 S Consumer Control: is tagged by udev as: Keyboard
[ 89791.519] (II) event7 - Light2 S Consumer Control: device is a keyboard
[ 89791.520] (**) Light2 S Consumer Control: Applying InputClass "evdev keyboard catchall"
[ 89791.520] (**) Light2 S Consumer Control: Applying InputClass "libinput keyboard catchall"
[ 89791.520] (**) Light2 S Consumer Control: Applying InputClass "system-keyboard"
[ 89791.520] (**) Light2 S Consumer Control: Applying InputClass "keyboard"
[ 89791.520] (II) Using input driver 'libinput' for 'Light2 S Consumer Control'
[ 89791.520] (II) systemd-logind: returning pre-existing fd for /dev/input/event7 13:71
[ 89791.520] (**) Light2 S Consumer Control: always reports core events
[ 89791.520] (**) Option "Device" "/dev/input/event7"
[ 89791.520] (II) libinput: Light2 S Consumer Control: is a virtual subdevice
[ 89791.520] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/0003:04D9:F51B.003C/input/input95/event7"
[ 89791.520] (II) XINPUT: Adding extended input device "Light2 S Consumer Control" (type: KEYBOARD, id 11)
[ 89791.520] (**) Option "xkb_model" "pc105"
[ 89791.520] (**) Option "xkb_layout" "de"
[ 89791.520] (**) Option "xkb_variant" "nodeadkeys"
[ 89791.520] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[ 89791.543] (II) config/udev: Adding input device Light2 S (/dev/input/event5)
[ 89791.543] (**) Light2 S: Applying InputClass "evdev pointer catchall"
[ 89791.543] (**) Light2 S: Applying InputClass "libinput pointer catchall"
[ 89791.543] (**) Light2 S: Applying InputClass "Light2 S"
[ 89791.543] (II) Using input driver 'libinput' for 'Light2 S'
[ 89791.594] (II) systemd-logind: got fd for /dev/input/event5 13:69 fd 54 paused 0
[ 89791.594] (**) Light2 S: always reports core events
[ 89791.594] (**) Option "Device" "/dev/input/event5"
[ 89791.596] (II) event5 - Light2 S: is tagged by udev as: Mouse
[ 89791.596] (II) event5 - Light2 S: device is a pointer
[ 89791.597] (II) event5 - Light2 S: device removed
[ 89791.597] (II) libinput: Light2 S: Step value 0 was provided, libinput Fallback acceleration function is used.
[ 89791.597] (II) libinput: Light2 S: Step value 0 was provided, libinput Fallback acceleration function is used.
[ 89791.597] (II) libinput: Light2 S: Step value 0 was provided, libinput Fallback acceleration function is used.
[ 89791.597] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/0003:04D9:F51B.003A/input/input93/event5"
[ 89791.597] (II) XINPUT: Adding extended input device "Light2 S" (type: MOUSE, id 16)
[ 89791.597] (**) Option "AccelerationScheme" "none"
[ 89791.597] (**) Light2 S: (accel) selected scheme none/0
[ 89791.597] (**) Light2 S: (accel) acceleration factor: 2.000
[ 89791.598] (**) Light2 S: (accel) acceleration threshold: 4
[ 89791.599] (II) event5 - Light2 S: is tagged by udev as: Mouse
[ 89791.599] (II) event5 - Light2 S: device is a pointerOffline
xinput props do not match one to one to xorg config option names. The corresponding xorg config option names are documented in the xf86-input-libinput manpage: https://man.archlinux.org/man/libinput. … ON_DETAILS
so in your case you'd use AccelProfile. Note the additional MatchProduct directive on the product name, the Identifier is used to differentiate xorg config segments and has no effect on which device is actually getting affected by the setting, so you were running this against every input device instead of targeted to the Light2, you should also use InputClass instead of device, because devices tend to disable autodetection for other stuff, InputClasses are for configuring devices as they appear on the fly and in a targeted way.
Section "InputClass"
Identifier "Light2 S"
MatchProduct "Light2 S"
MatchIsPointer "on"
Driver "libinput"
Option "AccelProfile" "flat"
EndSectionThe config file is being read, the give away is this line
[ 89791.543] (**) Light2 S: Applying InputClass "Light2 S"you'd not have an inputclass explicitly mentioning Light2 S otherwise.
Also note xorg config file directives might get overriden during runtime by e.g. desktop environment daemons/settings after being applied by xorg, might have to ensure those aren't interfering, most of the bigger desktop environments will have their own daemon that is likely to override this in runtime.
Last edited by V1del (2024-12-19 23:10:49)
Offline
Thank you very much! That worked!
I'd like to add that this article https://wiki.archlinux.org/title/Mouse_acceleration is not very helpful, besides giving a hint for the direction of further research. It contains 3 chapters, where it is not clear, whether one applies exclusively or multiple and how to decide which.
The interaction of xinput, xorg, xorg config files, udev, ... remains rather unclear and confusing. Where to research in order to configure hardware of a certain type?
Just consider these comments samples of questions someone with limited time for research might have. Maybe someone can improve the documentation on these topics.
Offline
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
V1del's solution is the first suggestion straight from the top of the wiki?
The interaction of xinput, xorg, xorg config files, udev, ... remains rather unclear and confusing.
There're sublinks in the wiki, the problem is rather
someone with limited time for research
You're probably using the wrong distribution.
You're ultimately dealing with a complex and historically grown environment here and complain that there's no direct answer to your exact question but rather various - and lengthy - explanations of the elements of your problem.
"sudo make it work" won't happen, use a preconfigured distro like ubuntu.
Offline
Technically more or less the same thing I told you here is mentioned in https://wiki.archlinux.org/title/Mouse_ … figuration But I agree it might be useful to streamline this a bit, e.g. the last subsection configures the old input driver that's very unlikely to still be used anywhere and one could restructure and reorganize the page a bit so it doesn't look like it's all over the place. I might be able to give it a shot over the holidays or so.
FFF5: While I agree that researching and being interested in how things work to be a good virtue in using Arch, I also think the article is a bigger mess than it needs to be...
Last edited by V1del (2024-12-20 15:33:02)
Offline
Pages: 1