You are not logged in.
I have a gaming mouse and its sensitivity is mad. I've been trying to slow it down to something more tolerable. For a while I was having some success with xinput set-prop 266 4.0 (Device Accel Constant Deceleration), but in my attempts to have this automatically kick in on startup, this no longer works and I've no idea what I've done to stop that. I can see the value updating when I query the properties, but the sensitivity of the mouse doesn't change.
So maybe you guys can help out, what's the recommended way to reduce mouse sensitivity and keep it persistent? Cheers!
xinput details below - I don't know why the mouse appears twice, but there you go.
$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech Gaming Mouse G302 id=9 [slave pointer (2)]
⎜ ↳ Logitech Gaming Mouse G302 id=10 [slave pointer (2)]
⎜ ↳ ELAN Touchscreen id=11 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=15 [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)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Lenovo EasyCamera id=12 [slave keyboard (3)]
↳ Ideapad extra buttons id=13 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=14 [slave keyboard (3)]
$ xinput list-props 9
Device 'Logitech Gaming Mouse G302':
Device Enabled (135): 1
Coordinate Transformation Matrix (137): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (264): 0
Device Accel Constant Deceleration (265): 1.000000
Device Accel Adaptive Deceleration (266): 1.000000
Device Accel Velocity Scaling (267): 10.000000
Device Product ID (253): 1133, 49279
Device Node (254): "/dev/input/event1"
Evdev Axis Inversion (268): 0, 0
Evdev Axes Swap (270): 0
Axis Labels (271): "Rel X" (145), "Rel Y" (146), "Rel Horiz Wheel" (262), "Rel Vert Wheel" (263)
Button Labels (272): "Button Left" (138), "Button Middle" (139), "Button Right" (140), "Button Wheel Up" (141), "Button Wheel Down" (142), "Button Horiz Wheel Left" (143), "Button Horiz Wheel Right" (144), "Button Side" (257), "Button Extra" (258), "Button Forward" (259), "Button Back" (260), "Button Task" (261), "Button Unknown" (256), "Button Unknown" (256), "Button Unknown" (256), "Button Unknown" (256), "Button Unknown" (256), "Button Unknown" (256), "Button Unknown" (256), "Button Unknown" (256), "Button Unknown" (256), "Button Unknown" (256), "Button Unknown" (256), "Button Unknown" (256)
Evdev Scrolling Distance (273): 1, 1, 1
Evdev Middle Button Emulation (274): 0
Evdev Middle Button Timeout (275): 50
Evdev Third Button Emulation (276): 0
Evdev Third Button Emulation Timeout (277): 1000
Evdev Third Button Emulation Button (278): 3
Evdev Third Button Emulation Threshold (279): 20
Evdev Wheel Emulation (280): 0
Evdev Wheel Emulation Axes (281): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (282): 10
Evdev Wheel Emulation Timeout (283): 200
Evdev Wheel Emulation Button (284): 4
Evdev Drag Lock Buttons (285): 0
$ xinput list-props 10
Device 'Logitech Gaming Mouse G302':
Device Enabled (135): 1
Coordinate Transformation Matrix (137): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (264): 0
Device Accel Constant Deceleration (265): 1.000000
Device Accel Adaptive Deceleration (266): 1.000000
Device Accel Velocity Scaling (267): 10.000000
Device Product ID (253): 1133, 49279
Device Node (254): "/dev/input/event2"
Evdev Axis Inversion (268): 0, 0
Evdev Axes Swap (270): 0
Axis Labels (271): "Rel X" (145), "Rel Y" (146), "Rel Horiz Wheel" (262)
Button Labels (272): "Button 0" (286), "Button Unknown" (256), "Button Unknown" (256), "Button Wheel Up" (141), "Button Wheel Down" (142), "Button Horiz Wheel Left" (143), "Button Horiz Wheel Right" (144)
Evdev Scrolling Distance (273): 1, 1, 1
Evdev Middle Button Emulation (274): 0
Evdev Middle Button Timeout (275): 50
Evdev Third Button Emulation (276): 0
Evdev Third Button Emulation Timeout (277): 1000
Evdev Third Button Emulation Button (278): 3
Evdev Third Button Emulation Threshold (279): 20
Evdev Wheel Emulation (280): 0
Evdev Wheel Emulation Axes (281): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (282): 10
Evdev Wheel Emulation Timeout (283): 200
Evdev Wheel Emulation Button (284): 4
Evdev Drag Lock Buttons (285): 0
Last edited by Eraph (2016-03-23 08:17:43)
Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD
Offline
Use an `xset` command in your autostart (see `man xset` - mouse section)
xset m <accel> <threshold>
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
Thanks damo, but that only adjust sensitivity to an extent. I need something more drastic! I will say though that changing these values does have an effect.
Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD
Offline
How were you using the xinput command at startup?
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
Oof, I tried a few things including one that goosed my whole mouse and keyboard input. I added a file to /usr/share/X11/xorg.conf.d/, had to boot into a LiveCD to get rid of it, so that solution was out. I added the first command I mentioned above into OpenBox autostart, didn't work either. I've read about adding settings to ~/.config/.xinitrc but I've had no luck with that.
Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD
Offline
Have you seen this link? It is pretty old but the method should still work I think. If the xinput command works for you, then try putting it in a script, and running that from autostart (if the command itself in autostart isn't working, although I don't know why it wouldn't).
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
Well using the name of the property rather than the number brought some success, so I added it to autostart and logged out and logged back in. Nothing. Furthermore, changing the property through terminal no longer has any effect at all, even after removing it from autostart, and even after a reboot. Nothing will slow the mouse down any more! It's like something changed and is persisting somewhere, but certainly not the way I want it to. Very furstrating. Thanks for your help though!
Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD
Offline
I wonder if it is a kernel issue. Let's hope it isn't a regression, which might explain why it has stopped working properly.
Have you tried a newer kernel?
Just a thought - do you have the same problem in a Live session?
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
I haven't tried a newer kernel, no. What's the general consensus on backporting around here? I'm a bit wary of the 'don't break Debian' thing, keen to keep it as vanilla as I can (although admittedly in some cases I've already broken that rule). I have run 4.0+ kernels on this machine in the past with no problems so I'm just wondering why backporting might be discouraged.
Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD
Offline
I haven't tried a newer kernel, no. What's the general consensus on backporting around here? I'm a bit wary of the 'don't break Debian' thing, keen to keep it as vanilla as I can (although admittedly in some cases I've already broken that rule). I have run 4.0+ kernels on this machine in the past with no problems so I'm just wondering why backporting might be discouraged.
It has almost nothing to do with the kernel but the X server. There are many settings to tweak when working with acceleration. Here is an extensive wiki entry on pointer acceleration with methods to try.
Note that input handling also depends on the kind of game you are playing, or rather its input handling implementation. Mouse acceleration in games can behave drastically differently depending on the libraries it uses (or does not use). For example, Xonotic comes in two flavours for Linux: one is inked against libSDL, and one is based on OpenGL only; and acceleration is different between those two, and both are different from standard X11 desktop mouse behaviour. A program can also opt out of X11 pointer acceleration altogether.
Rather than trying to set moues acceleration at the system level, considering the situation, it might be more effective to adjust the acceleration on a per-game basis using in-game settings.
Offline
^ Knowledgeable answers like that sometimes make me feel like a .... mouse
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
Thanks for the help, I'm actually just talking about desktop settings, but I'll check out the link about adjusting the X server settings.
Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD
Offline
Well, I got to the bottom of this. In my initial tinkering, I had put the following line into the OpenBox startup file, and promptly forgotten about it:
xset m 0 0
Maybe I had been on the beers. Anyway, I took that out, and everything works again. I added the following lines in its stead:
xinput set-prop 9 'Device Accel Profile' -1
xinput set-prop 9 'Device Accel Velocity Scaling' 1
xinput set-prop 9 'Device Accel Constant Deceleration' 3
Where 9 refers to the device ID. Cheers for your help, everyone!
Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD
Offline
Okay, it seems that this is only partially solved. While this fixes the sensitivity after login, if I suspend my machine and then resume, the settings revert to their original state, and changing the properties once again has no effect. Any ideas how to make it more persistent? Should I remove the 'SOLVED' from the topic title?
Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD
Offline
Try creating a file at /lib/systemd/system-sleep/mouse_set (as root!) containing your commands:
!#/bin/sh
xinput set-prop 9 'Device Accel Profile' -1
xinput set-prop 9 'Device Accel Velocity Scaling' 1
xinput set-prop 9 'Device Accel Constant Deceleration' 3
Then make the file executable:
sudo chmod +x /lib/systemd/system-sleep/mouse_set
This will then be run when the system resumes, see systemd-suspend.service(8):
Immediately before entering system suspend and/or hibernation systemd-suspend.service (and the other
mentioned units, respectively) will run all executables in /lib/systemd/system-sleep/ [...] Immediately after
leaving system suspend and/or hibernation the same executables are run
Offline
That does the job! Just a pity I now have two identical scripts in two different locations. The programmer in me is screaming in agony but the human in me is thinking it's time to turn off the computer and wind down for the night with some Vikings
Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD
Offline
^ Well, as the man page says:
Note that scripts or binaries dropped in /lib/systemd/system-sleep/ are intended for local use only and should be considered hacks.
Offline
Yeah, I should've known what I was getting myself into, haha!
I had a thought, by adding the setting to autostart, I'm setting it locally, right? As in, for my user? Would it make more sense to look into setting it at a more global level? I'll investigate it further and see what I can find.
Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD
Offline
Okay! Nailed it!
I've created the following file as root (G302 is the model of the mouse I'm using):
/etc/share/X11/xorg.conf.d/20-g302.conf
The contents of the file are as follows:
Section "InputClass"
Identifier "Hold Yr Hoerses Logitech"
MatchProduct "Logitech Gaming Mouse G302"
MatchDevicePath "/dev/input/event*"
Option "AccelerationProfile" "-1"
Option "VelocityScale" "1"
Option "ConstantDeceleration" "3"
EndSection
This applies not only to my desktop, but to the login screen as well. It persists through suspends, and even after VNC connections (which I just this afternoon found out also screwed up previous efforts). Fair to say I'm chuffed with this solution
Thanks for all your help, everyone!
One last thing; the number at the beginning of the file, am I right in thinking that it is a priority, like the order in which those files are parsed by Xorg?
Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD
Offline