After searching around I managed to find core of this issue.
Why mouse movement can be ignored after setting flat (no acceleration) profile?
Answer to this question was simple and problem was in libinput pointer setting called Accel Speed
. As confusing as it is, when you are using flat no acceleration profile, this setting will actually act as sort of "sensitivity" setting most of the users are used to, but in range of 0% to 200%, corresponding to cursor speed. -1 would be 0%, 0 would be 100%, 1 would be 200% for cursor speed.
From what I understand, when you move your mouse your pointer (cursor) will move on distance of X + X*As
, where X is basic value of how much cursor needs to be moved and As is value of Accel Speed
option. Which means that if for some reason value of this setting will be -1, which can happen while you try to adjust sensetivity using some GUI for mouse control or by manually setting in, your mouse movement will be calculated like this "X + X*-1", which is basically "X-X", meaning your cursor will not move at all.
So if you have similar problem, first thing you should do is to look on value of this option.
1) List devices with command:
xinput list
2) Find ID of your mouse and use this command to see current values of its options:
xinput list-props 12
Where '12' would be ID of your device from "xinput list" output.
3) If "libinput Accel Speed" is -1 and you are using flat profile, you can change it with command:
xinput --set-prop 12 'libinput Accel Speed' 0
So if you got your mouse stuck after enabling flat profile, simply switching to console\terminal and running those 3 steps will give you ability to fix problem.
I am adding solution I used for disabling acceleration and adjusting Accel Speed just in case someone will stumble on this looking for answer.
How to set flat profile\disable mouse acceleration permanently
To permanently set libinput to flat profile and no change to basic sensetivity, you can just edit this file:
/usr/share/X11/xorg.conf.d/40-libinput.conf
It should have section with identifier "libinput pointer catchall".
By default mine looked like this:
[...]
Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
[...]
You can force it to use specific settings we need by adding two lines after "Driver" line:
[...]
Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "AccelProfile" "flat"
Option "AccelSpeed" "0.0"
EndSection
[...]
Option "AccelProfile" will tell system to use flat, no acceleration, profile.
Option "AccelSpeed" will set default for modificator of basic pointer speed, which is pretty much sensitivity. Setting it to "1" will double pointer speed, -1 will set it to 0, 0.5 would make it 150%.
After saving the changes you can just restart GDE with service lightdm restart
or just restart PC manually and check if libinput uses correct values now.
By running command:
xinput list-props {1..50} 2>/dev/null | fgrep 'libinput Accel Profile Enabled ('
you can check if system uses flat profile.
For flat profile it should return 0, 1 value like this:
libinput Accel Profile Enabled (282): 0, 1
And check Accel Speed value with similar command:
xinput list-props {1..50} 2>/dev/null | fgrep 'libinput Accel Speed ('
If after restart you have values corresponding to what you set in 40-libinput.conf file, everything works as it should.
For alternative solutions and more information you can lookup those links:
https://wiki.archlinux.org/index.php/Mouse_acceleration#Using_xinput
Configure mouse speed (not pointer acceleration!)