progenitor
Posts: 4
Joined: Wed Jan 18, 2017 3:55 am

Lxinput & desktop.conf Not Changing Mouse Setting

Fri Jan 20, 2017 4:43 am

I recently noticed after doing an 'apt' upgrade from a fresh image that the mouse lost its acceleration and sensitivity settings. I started to track down the issue and found that the Keyboard and Mouse dialog (lxinput) in the Preferences menu, as well as manually editing the desktop.conf file in /home/pi/.config/lsxession/LXDE-pi/ no longer adjusts the Mouse Acceleration or Sensitivity. Just to avert any questions, this is not the same mouse issue that requires an update to the cmdline.txt file. ;)

After digging around to see if I could find another. conf file to adjust, I decided to go ahead and start over to determine which package update changed the mouse behavior. Through a process of elimination and a little common sense I found that the package update in question was:
  • xserver-xorg-input-all
This package update also added a couple of new input drivers during the update:
  • xserver-xorg-input-libinput
    libinput10
    libinput-bin
I suspect what is happening is that the new libinput driver does not inherit the preferences from the desktop.conf file, or has a different formatting requirement so cannot read the current settings. I should note that the left handed setting does still work as expected.

If you normally never change these settings you probably would not have noticed a difference. I happen to use a roller-ball mouse and like to set it so that I can scroll anywhere on the screen without lifting my thumb. The default setting takes around three revolutions which my lazy thumb does not like heheh :mrgreen: For now I am going to re-image and avoid that particular package update unless someone knows were this input driver gets its configuration.

I just wanted to throw this post up to get it on the radar and also throw the info I dug up just in case there are others going crazy trying to figure out why their mouse is acting up.

ktb
Posts: 1380
Joined: Fri Dec 26, 2014 7:53 pm

Re: Lxinput & desktop.conf Not Changing Mouse Setting

Fri Jan 20, 2017 4:57 am

IIRC, libinput takes over for evdev and will be the way forward (with Wayland, etc.). It's probably a good idea to learn how to configure it.

https://wiki.archlinux.org/index.php/Mo ... h_libinput

progenitor
Posts: 4
Joined: Wed Jan 18, 2017 3:55 am

Re: Lxinput & desktop.conf Not Changing Mouse Setting

Fri Jan 20, 2017 6:17 am

Thank you ktb.

I suspected this was the case and needed to go out and find the info, so I appreciate the link!

I'm sure the fine Raspbian maintainers will get a tool set up to replace lxinput for us crazy control freaks soon enough :D
ktb wrote:IIRC, libinput takes over for evdev and will be the way forward (with Wayland, etc.). It's probably a good idea to learn how to configure it.

https://wiki.archlinux.org/index.php/Mo ... h_libinput

drmullins
Posts: 43
Joined: Fri Jun 23, 2017 9:22 pm

Re: Lxinput & desktop.conf Not Changing Mouse Setting

Thu Jul 13, 2017 8:41 pm

I have noticed that changing Acceleration and Sensitivity settings in Menu->Preferences->Mouse and Keyboard Settings->Mouse>Motion has no affect since libinput replaced evdev in the Raspbian derivative of Debian Jessie. I have a particular problem with my excellent classic 5 button Microsoft Intellimouse which is, in its nature, a bit slower than my 5 button Trust Mouse for instance. I normally have acceleration on 9.7 and sensitivity on 2 and this works fine with evdev giving the fast acceleration and sensitivity that I like. Debian Jessie of course still uses evdev.
The solution for me was to install evdev then remove libinput
sudo apt-get update
sudo apt-get install xserver-xorg-input-evdev
sudo apt-get remove xserver-xorg-input-libinput
reboot and all is correctly working as previously.
I suppose that Debian Stretch will be using libinput and a patched version of lxinput (and Raspbian Stretch will follow) but will wait until that is all sorted out before moving over to libinput.

drmullins
Posts: 43
Joined: Fri Jun 23, 2017 9:22 pm

Re: Lxinput & desktop.conf Not Changing Mouse Setting - Stretch update

Mon Aug 28, 2017 4:45 pm

lxinput has now been modified in Raspbian Stretch, seeming at the behest of
the Raspberry Pi Foundation, to work with libinput rather than evdev. It wasn't modified in Debian Stretch.

It gives some adjustment of mouse speed but I could not get it fast enough for
my 400 dpi Microsoft Intellimouse even on 10.0 (which only doubles the speed from nominal)
I like the mouse to be really fast to avoid stressing my wrist - I am not doing detailed
drawing or CAD work

I first tried modiying hwdb with settings from mouse-dpi-tool but could not get enough
speed increase even spoofing the dpi of my Intellimouse as 200dpi so I decided to go with xinput
which is entirely user space unlike modifying hwdb

I installed xinput (sudo apt get update ; sudo apt-get install xinput)

Then I found the mouse id (id=8) with 'xinput list' and found
the mouse properties with 'xinput list-props 8'

I identified the mouse name from the properties and the property 'Coordinate Transformation Matrix'
and repeated the whole process for my Microsoft Intellimouse (400dpi) and For my Trust Easyclick
Mouse (1000 dpi)

Then I created a script file (~/bin/mouse-sense-libinput.sh) with the following contents

#!/bin/bash
xinput set-prop 'Microsoft Microsoft 5-Button Mouse with IntelliEye(TM)' 'Coordinate Transformation Matrix' 4 0 0 0 4 0 0 0 1
xinput set-prop 'USB Optical Mouse' 'Coordinate Transformation Matrix' 2 0 0 0 2 0 0 0 1

with speed enhancement values ( 2 to 4 times increase) found by trial and error

and a .desktop file in ~/.config/autostart with the following contents

[Desktop Entry]
Name=Set Mouse Libinput
Exec=bash /home/pi/bin/mouse-sense-libinput.sh
Type=Application
Terminal=true
NoDisplay=false

My preferred mouse sensitivity is now automatically set at start up according to the mouse in use- and if I change mouse and reboot, the speed automatically changes as required.

Hope this is useful to someone.

I also worked out how to revert to evdev and can provide info if there is any interest

Return to “Raspbian”