I found a way to increase the speed of my bluetooth mouse but I struggle to make it persistent. Following the wakeup of the mouse after some time being not in use the xinput settings reset to the "default".

These are the xinput settings I would like the mouse to run on:

Device 'ThinkPad X1 Mouse':
    Device Enabled (177):   1
    Coordinate Transformation Matrix (179): 2.400000, 0.000000, 0.000000, 0.000000, 2.400000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Natural Scrolling Enabled (315):   0
    libinput Natural Scrolling Enabled Default (316):   0
    libinput Scroll Methods Available (317):    0, 0, 1
    libinput Scroll Method Enabled (318):   0, 0, 0
    libinput Scroll Method Enabled Default (319):   0, 0, 0
    libinput Button Scrolling Button (320): 2
    libinput Button Scrolling Button Default (321): 2
    libinput Button Scrolling Button Lock Enabled (322):    0
    libinput Button Scrolling Button Lock Enabled Default (323):    0
    libinput Middle Emulation Enabled (368):    0
    libinput Middle Emulation Enabled Default (369):    0
    libinput Accel Speed (324): 0.000000
    libinput Accel Speed Default (325): 0.000000
    libinput Accel Profiles Available (326):    1, 1
    libinput Accel Profile Enabled (327):   1, 0
    libinput Accel Profile Enabled Default (328):   1, 0
    libinput Left Handed Enabled (329): 0
    libinput Left Handed Enabled Default (330): 0
    libinput Send Events Modes Available (300): 1, 0
    libinput Send Events Mode Enabled (301):    0, 0
    libinput Send Events Mode Enabled Default (302):    0, 0
    Device Node (303):  "/dev/input/event18"
    Device Product ID (304):    6127, 24712
    libinput Drag Lock Buttons (331):   <no items>
    libinput Horizontal Scroll Enabled (332):   1

I change the speed of the mouse with this command xinput --set-prop 'ThinkPad X1 Mouse' 'Coordinate Transformation Matrix' 2.4 0 0 0 2.4 0 0 0 1. The solution proposed here adding the settings either to /usr/share/X11/xorg.conf.d/40-libinput.conf by adding Option "Coordinate Transformation Matrix" "2.4 0 0 0 2.4 0 0 0 1" there or add the xinput command to the .xsessionrc doesn't help in this case. After each wakeup of the mouse the Coordinate Transformation Matrix resets to 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000.


Unfortunately the name of most (if not all) options of libinput differs between xinput and xorg.conf. The equivalent to "Coordinate Transformation Matrix" would be "TransformationMatrix". So putting something like the following into /etc/X11/xorg.conf.d/50-bt-mouse.conf should do the trick:

Section "InputClass
    Identifier "My BT Mouse"
    MatchProduct "ThinkPad X1 Mouse"
    Option "TransformationMatrix" "2.4 0 0 0 2.4 0 0 0 1"

Identifier may be chosen freely, whereas MatchProduct has to match the product name as shown by xinput. If you want to apply this transformation to all your pointing devices, you could also replace the MatchProduct directive with MatchIsPointer "on". Also note that your own X.org configuration should be placed in /etc/X11/xorg.conf.d and not be made to files in /usr/share/X11/xorg.conf.d, as the latter might be overwritten (without backup) on a system update.

After making changes to the configuration you need to at least restart X.org in order for them to take effect (or reboot the system to be sure). Afterwards X.org will apply the options automatically everytime a matching device is discovered, be it at first start or when the mouse re-connects after being in power-save mode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.