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
  • 1
  • 8

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,334
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
Simon A. Eugster
  • 357
  • 1
  • 2
  • 12