0

I've set up my mouse with a flat profile and a speed to my liking like so from the command line:

xinput --set-prop 'Logitech G9x Laser Mouse' 'libinput Accel Profile Enabled' 0, 1
xinput --set-prop 'Logitech G9x Laser Mouse' 'libinput Accel Speed' 0.90

However, at seemingly random times the settings get reset to their defaults.

I can (and always do) rerun the above commands, but such interruptions are extremely annoying for my flow

  1. How can I debug what could be causing this?
  2. How can I make the settings permanent?
2
  • 1
    Perhaps the mouse get for some reason reconnected? Like, a loose USB-cable, or something similar? Try checking dmesg output after configuration gets dropped for mouse-related entries. In that case you can make settings permanent by configuring mouse through Xorg files. Usually I wouldn't recommend using Xorg-configuration files as it is too confusing, but in your case it might actually help.
    – Hi-Angel
    May 7, 2021 at 9:11
  • dmesg was the key, there does indeed seem to be some kind of repeated rediscovery (hourly or so) going on of the mouse. Whether that's a faulty wire or some other problem I guess we'll never know. @Hi-Angel do you perhaps know how to convert xinput incantation to an analogous one for xorg (and where to put it)? May 7, 2021 at 19:50

1 Answer 1

1

It might be getting reset because of a loose cable or some similar problem that results in mouse getting re-detected. In this case mouse configuration gets reset to the default values. To check that you can look at dmesg after mouse configuration got reset, it should have related entries around that time.

To make your configuration permanent, best way would be to configure that through your DE settings. This should cover both Wayland and X11 usecases.


Alternatively, if you are using X11, you can add the following snippet to a /etc/X11/xorg.conf.d/10-mylibinput-profile.conf file, then restart Xorg (for example, reboot).

Section "InputClass"
    Identifier "Logitech G9x Laser Mouse"
    Driver "libinput"
    Option "AccelProfile" "flat"
    Option "AccelSpeed" "0.9"
EndSection

Sources for this snippet: general idea is taken from here, and the Option values are taken from man 4 libinput.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.