12

I recently updated from Ubuntu 16.04 running Unity to 17.10 running GNOME. Since the upgrade, I'm missing the adaptive acceleration feature on my touchpad. I absolutely loved it because it was more accurate for shorter distances.

On digging a bit, I found out that 17.10 uses GNOME with libinput instead of synaptics, but libinput uses a flat acceleration profile for touchpads by default (https://wayland.freedesktop.org/libinput/doc/1.4.3/pointer-acceleration.html#ptraccel-touchpad).

I also tried installing xserver-xorg-input-synaptics on 17.10. This works fine, except for the fact that it is too cumbersome to enable 'Natural Scrolling' from the command line (https://askubuntu.com/a/206006). Another problem is that GNOME doesn't show touchpad settings with synaptics installed (https://unix.stackexchange.com/a/292920).

I also tried fidgeting with gnome-tweak-tool under the 'Keyboard and Mouse' submenu on the sidebar but it has an option to select 'Acceleration Profile' only for a mouse, not for touchpads (see screenshot in What are Mouse Acceleration profiles in the gnome-tweak-tool?).

Is there a way to enable adaptive acceleration for touchpads with libinput which has none of the above side effects?

0

6 Answers 6

7

In 17.10, you can also set the acceleration profile directly and disable mouse acceleration by setting accel-profile to 'flat'

gsettings set org.gnome.desktop.peripherals.mouse accel-profile 'flat'

Alternatively, use dconf-editor:

Disable mouse acceleration in Ubuntu 17.10

5
  • 1
    I'm pretty sure, the mouse section applies to actual mouse devices that you hookup to the usb and not the touchpad. Dec 25, 2017 at 17:31
  • 1
    I stand corrected.... Dec 25, 2017 at 23:00
  • @thebunnyrules Yes, sorry, you are right – I did not see the “for touchpad” part :) Dec 28, 2017 at 9:59
  • 1
    Simon, I tried it out anyway and it did actually impact the performance of my touchpad. So no, I think you were right to recommend it. Dec 28, 2017 at 15:58
  • 1
    just upgraded to 17.10, and found the decreased touchpad performance very disappointing as well. setting it to 'adaptive' with the command you suggested fixed it.
    – grg rsr
    Jan 9, 2018 at 16:31
4

For this, try editing the key speed from the schema org.gnome.desktop.peripherals.touchpad. The description for the key is as follows:

Pointer speed for the touchpad. Accepted values are in the [-1..1] range (from "unaccelerated" to "fast"). A value of 0 is the system default.

which strongly indicates the gnome key has something to do with touchpad acceleration. Use the dconf editor or gsettings through the command line and see if modifying this key has any effect.

4
  • 1
    Where did you get the definition for that key? Just curious so I could find the others.
    – Sia
    Mar 7, 2018 at 16:37
  • 1
    You can see all keys with gsettings list-keys org.gnome.desktop.peripherals.touchpad and get the definition of a single key with gsettings describe org.gnome.desktop.peripherals.touchpad speed.
    – robcast
    Apr 14, 2018 at 11:19
  • 1
    Setting speed is not really adaptive acceleration. Judging by the keys org.gnome.desktop.peripherals.mouse has adaptive acceleration and org.gnome.desktop.peripherals.touchpad simply hasn't :-(
    – robcast
    Apr 14, 2018 at 11:22
  • Trying in Ubuntu 20.04. This only changes the mouse speed and not the acceleration. After the change in dconf editor, the same change is visible as mouse speed in the GUI
    – Erdnase
    Apr 29, 2020 at 4:11
2

Edit: Sorry this only helps if you're using Xorg, not Wayland according to Arch Linux' Wiki:

For Wayland, there is no libinput configuration file. The configurable options depend on the progress of your desktop environment's support for them; see #Graphical tools.

For Xorg, a default configuration file for the wrapper is installed to /usr/share/X11/xorg.conf.d/40-libinput.conf. No extra configuration is necessary for it to autodetect keyboards, touchpads, trackpointers and supported touchscreens.

For Xorg:

According to its man page libinput also supports adaptive acceleration:

You should be able to add it as an option in xorg.conf, e.g. /usr/share/X11/xorg.conf.d/40-libinput.conf:

Option "AccelProfile" "adaptive"
0

ubuntu 18.04 touchpad config

On ubuntu 18.04, the setting is slightly different, ranging as a double from -1 to 1. Setting the touchpad setting to 1 accelerates the touchpad nicely. I used dconf to edit the setting - worked like a charm.

0

My solution was to add a small script in .xinputrc in the home folder of the user

DEVICE=$(xinput list-props "SynPS/2 Synaptics TouchPad"|awk '/libinput\ Accel\ Speed\ \(/ {print $4}'|tr -d [:punct:])
xinput set-prop "SynPS/2 Synaptics TouchPad" $DEVICE 1.0

where the last argument (1.0) is a decimal value from 0.0 to 1.0.

0.0 -> no accel

1.0 -> max available accel

By the way, this also works on 20.04

0
0

dconf-editor did what I wanted. With it, I disabled the acceleration for the magic trackpad.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .