Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [Help] Xorg applies bad mouse defaults (Read 657 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

[Help] Xorg applies bad mouse defaults

Hello, my mouse is given very high sensitivity settings from Xorg by default, so my workaround thus far has been to have a startup script in cinnamon give it proper configuration through xinput(1) commands. However, if i happen to unplug and plug the mouse again, it goes back to the awful defaults.
I tried making a custom .conf file in /etc/X11/xorg.conf.d/ with the same settings that i would set through xinput(1), but it turns out Xorg applies those configuration files very early in it's boot process, so early in fact that the mouse hasn't even been detected at that point, so it just discards my custom .conf and instead applies default settings when it detects the mouse later on.
This is my custom .conf:
Code: [Select]
Section "InputClass"
  Identifier "snippet"
  MatchDriver "libinput"
  MatchProduct "USB Optical Mouse"
  Option "libinput Accel Speed" "0.4"
  Option "libinput Accel Profile Enabled" 0 1
EndSection

Next, i tried writing an udev rule that would execute my xinput configuration commands when i plugged the mouse, but it seems like udev detection time is even earlier than Xorg's, so again the commands fall on deaf ears.
Now after reading Xorg logs it looks like device detection/hotplugging is handled by both udev and Xorg working in cooperation, i even found an old Kubuntu article that explains a similar mechanism for how they do it over at Kubuntu. In their case, udev passes configuration variables to Xorg by attaching new device properties for Xorg to pick up and apply.
However here on Artix it seems we don't do it that way (also the article is 12 years old), so i'd like to ask someone with deep Artix knowledge how device detection and hotplugging works with Xorg/udev in Artix, or otherwise any ideas for how to configure a mouse automatically upon being plugged. Thanks.

Re: [Help] Xorg applies bad mouse defaults

Reply #1
Found someone with the same problem over at the Linux Mint forums.
User 'vittopascu' there provides a Xorg conf file that correctly sets the mouse to flat profile:
Code: [Select]
Section "InputClass"
        Identifier "Mouse With No Acceleration"
        MatchDriver "libinput"
        MatchIsPointer "yes"
        Option "AccelProfile" "flat"
EndSection
After that, the mouse becomes flat and you can use cinnamon's "custom acceleration" slider on the mouse settings to set sensitivity.
Cinnamon's setting daemon will enforce this setting each time you plug the mouse so you might as well use it instead of configuring Xorg directly.

Re: [Help] Xorg applies bad mouse defaults

Reply #2
...  so i'd like to ask someone with deep Artix knowledge how device detection and hotplugging works with Xorg/udev in Artix, or otherwise any ideas for how to configure a mouse automatically upon being plugged.
I think you are looking for this and that .
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "