1 (edited by Mesh Malachi 2019-04-05 04:02:34)

Topic: How to set pointer acceleration?

xinput and xset seem to have no effect. (I confirmed the xinput settings had been applied via the

xinput list-props #device-id

command).

In /etc/X11/xorg.conf.d/10-libinput.conf I have

Section "InputClass"
    Identifier "CorePointer"
    MatchIsPointer "yes"
    Driver "libinput"
    Option "AccelerationScheme"  "predictable"
    Option "VelocityScale"          "20"
    Option "AccelerationProfile" "5"
    Option "AccelerationNumerator" "15"
    Option "AccelerationDenominator" "1"
    Option "AccelerationThreshold" "1"
EndSection

This does not seem to have any effect either. First I tried it without the first two Options. I've tried changing the numbers to very different values (just like I did with xinput and xset). I've tried using evdev instead of libinput as the driver (and the mouse then did not work at all). Nothing seems to change the pointer acceleration or velocity.

When I used libinput, I got this in my /var/log/Xorg.0.log

libinput: PixArt USB Optical Mouse: Failed to create a device for /dev/input/mouse0

But the mouse works; it just doesn't seem to accelerate according to what's in 10-libinput.conf

2

Re: How to set pointer acceleration?

Is your user in "input" group ?
check with : groups user
to add it : sudo gpasswd -a user input

3

Re: How to set pointer acceleration?

aether wrote:

Is your user in "input" group ?
check with : groups user
to add it : sudo gpasswd -a user input

I added myself to the group. Still no change in the acceleration, and I still get the

[   976.140] (II) mouse0  - failed to create input device '/dev/input/mouse0'.

error message in /var/log/Xorg.0.log after logging in (I'm not sure that this message is relevant).

4 (edited by outtasight 2019-06-03 13:19:59)

Re: How to set pointer acceleration?

For anyone interested, I've just been playing around with `xinput` and seem to have some luck setting mouse acceleration. Something I've never bothered with or known about, hence brushing up with a one minute refresher. Anyway...

$ xinput --set-prop 8 'libinput Accel Speed' 1

That's what, temporarily,  makes the magic happen for me, where the "8" is my mouse's ID number, according to `xinput`. As for a permanent solution that isn't a script (been there and done that for a gamepad), should there be a desire, I could try reading the ArchWiki page (https://wiki.archlinux.org/index.php/Mouse_acceleration) further, trying a few things, and reporting my findings.

5

Re: How to set pointer acceleration?

outtasight wrote:

$ xinput --set-prop 8 'libinput Accel Speed' 1

I get an error:

property 'libinput Accel Speed' doesn't exist, you need to specify its type and format

6

Re: How to set pointer acceleration?

For a bit of reference for anyone interested, some output from `xinput`:

xinput

⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
⎜   ↳ Logitech M510                               id=8    [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)]
    ↳ Power Button                                id=7    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard                id=9    [slave  keyboard (3)]
    ↳ HP WMI hotkeys                              id=10    [slave  keyboard (3)]

xinput list-props 8

Device 'Logitech M510':
    Device Enabled (132):    1
    Coordinate Transformation Matrix (134):    1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Accel Speed (267):    1.000000
    libinput Accel Speed Default (268):    0.000000
    libinput Accel Profiles Available (269):    1, 1
    libinput Accel Profile Enabled (270):    1, 0
    libinput Accel Profile Enabled Default (271):    1, 0
    libinput Natural Scrolling Enabled (272):    0
    libinput Natural Scrolling Enabled Default (273):    0
    libinput Send Events Modes Available (252):    1, 0
    libinput Send Events Mode Enabled (253):    0, 0
    libinput Send Events Mode Enabled Default (254):    0, 0
    libinput Left Handed Enabled (274):    0
    libinput Left Handed Enabled Default (275):    0
    libinput Scroll Methods Available (276):    0, 0, 1
    libinput Scroll Method Enabled (277):    0, 0, 0
    libinput Scroll Method Enabled Default (278):    0, 0, 0
    libinput Button Scrolling Button (279):    2
    libinput Button Scrolling Button Default (280):    2
    libinput Middle Emulation Enabled (281):    0
    libinput Middle Emulation Enabled Default (282):    0
    Device Node (255):    "/dev/input/event12"
    Device Product ID (256):    1133, 16465
    libinput Drag Lock Buttons (283):    <no items>
    libinput Horizontal Scroll Enabled (284):

I don't quite have any PS/2 mice to test anymore, however I have tested the following devices, and confirmed they all posess the 'libinput Accel Speed' property, and exhibit acceleration changes when requested:

  • Logitech M510

  • Logitech K400r

  • Evoluent VerticalMouse 4

  • <poorly designed mouse designed for a strangely "popular" subpar UNIX-like OS>

An interesting note, perhaps, is that neither user I tested with, is in the 'input` group.

Also, I don't have '/etc/X11/xorg.conf.d/10-libinput.conf' config file. So I just created it, and added the following option line:

Option "AccelSpeed" "float"

Where "float" is a doubled quoted value ranging from "1" to "-1".  So my '/etc/X11/xorg.conf.d/10-libinput.conf' currently looks like this:

Section "InputClass"
  Identifier "CorePointer"
  MatchIsPointer "yes"
  Driver "libinput"
  Option "AccelerationScheme"  "predictable"
  Option "VelocityScale"          "20"
  Option "AccelerationProfile" "5"
  Option "AccelerationNumerator" "15"
  Option "AccelerationDenominator" "1"
  Option "AccelerationThreshold" "1"
  Option "AccelSpeed" "1"
EndSection

So, a few questions for clarity, if I may, Mesh Malachi. You have been using the correct ID number for your device? Your device also apparently supports the 'Accel Speed' property? And, what if you edit your '/etc/X11/xorg.conf.d/10-libinput.conf' and add the 'AccelSpeed' option?