4

I do not want mouse acceleration on a certain mouse, but have it enabled in general. To do this I previously used a simple one-liner, which has stopped working when I upgraded to 17.04.

The old oneliner:

xinput --set-prop 'USB OPTICAL MOUSE' 'Device Accel Profile' -1

This can be explained by looking what xinpuit --list-props 'USB OPTICAL MOUSE' lists now:

Device 'USB OPTICAL MOUSE':
    Device Enabled (140):   1
    Coordinate Transformation Matrix (142): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Accel Speed (278): 0.000000
    libinput Accel Speed Default (279): 0.000000
    libinput Accel Profiles Available (280):    1, 1
    libinput Accel Profile Enabled (281):   1, 0
    libinput Accel Profile Enabled Default (282):   1, 0
    (etc.)

And xinput --set-prop 'USB OPTICAL MOUSE' 281 -1, 0 does not solve the problem and so I am clueless and wonder what the correct command might be.

Vringar
  • 145
  • just poked around on this and think following could do the trick: xinput --set-prop 'USB OPTICAL MOUSE' 'libinput Accel Profile Enabled' 0, 1 ??? – d1bro Apr 18 '17 at 00:38
  • @db429 will test it as soon as I am home again. Thanks for bothering anyway. – Vringar Apr 18 '17 at 05:19
  • @db429 it worked! Do you have any explanation why it does? Also would you mind posting it as an answer? – Vringar Apr 19 '17 at 13:23
  • sorry can't explain why, just poked around and used some logic - but great that it works – d1bro Apr 19 '17 at 13:31

2 Answers2

3

apparently some changes in the underlying code make it necessary to change the command you used to: xinput --set-prop 'USB OPTICAL MOUSE' 'libinput Accel Profile Enabled' 0, 1

d1bro
  • 2,304
0

Short howto to @db429’s answer for other mice.

EDIT DO NOT rely on IDs. They change on every restart (including the IDs for libinput).

(In this case, the G9 shows up twice; comparing xinput list-props 9 and xinput list-props 10 shows that id=9 is the correct one.)

First, get the device ID with xinput list.

~> xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech G9 Laser Mouse                   id=9    [slave  pointer  (2)]
⎜   ↳ Logitech G9 Laser Mouse                   id=10   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=13   [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=14   [slave  pointer  (2)]

One can either use the ID or the name of the device. In my case, I have to use the ID because the name exists twice. The ID 9 has the following properties:

~> xinput list-props 9
Device 'Logitech G9 Laser Mouse':
    Device Enabled (140):   1
    Coordinate Transformation Matrix (142): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Accel Speed (277): 0.000000
    libinput Accel Speed Default (278): 0.000000
    libinput Accel Profiles Available (279):    1, 1
    libinput Accel Profile Enabled (280):   0, 1
    (etc.)

To change the acceleration profile, the ID 280 works as well:

xinput set-prop 9 280 0, 1
  • I would like to mark your answer as correct since you provide a more step-by-step approach, but unfortunately you first tell us not to use IDs and then proceed to use them in your final command.
    Maybe use my setup as an example and then later show how to to it if a device has two pointers.
    – Vringar May 17 '17 at 16:49
  • Will do it when I have time. But it is okay, my answer is really based on @db429’s answer, I was also searching for a solution. I don’t like this one yet because it is not fully automatic. – Simon A. Eugster May 18 '17 at 21:02