libinput pointer precision at different sensitivity levels

Peter Hutterer peter.hutterer at who-t.net
Thu Aug 2 05:49:53 UTC 2018


On Tue, Jul 31, 2018 at 07:48:46PM +0200, Josh Simmons wrote:
> Hello there,
> 
> I've found what seems to be some interesting behaviour in the events
> returned from xinput2 while using the libinput driver with the "FLAT"
> profile.

the "flat" profile disables acceleration, so what comes out of the device is
what you get. if the device gives you a 1/1 delta, you get a 1/1 delta
movement.

https://gitlab.freedesktop.org/libinput/libinput/blob/master/src/filter-flat.c#L47

and since devices don't give you anything < 1 unit delta, subpixel isn't
really a thing unless you lower the speed setting.

> It seems that changing the sensitivity (via the gnome control panel)
> only changes the scale of the events sent by libinput, and not the
> frequency (in device coordinates) in which they are reported to the
> application. (Either that or they're somehow losing device coordinate
> sub-pixel precision at some point along the way).
> 
> The result of this is that with the standard 100% sensitivity the
> driver will report to X only events that are multiples of 1 pixel.
> With a sensitivity of 200% it will only report events that are
> multiples of 2 pixels. With a sensitivity of 50% it will report with a
> 0.5 pixel resolution and so on making the default and higher
> sensitivities feel very janky and not at all smooth.
> 
> My work around is just to slide the sensitivity as low as I can and
> use my mouse's DPI adjustment to get to where I want to be, but it
> seems like a bug that all the sub-pixel resolution is missing from the
> default configuration at the very least.

yeah, that's basically the expected behaviour, or at least the "implemented
behaviour". What the mouse gives you is what you get.

https://gitlab.freedesktop.org/libinput/libinput/blob/master/src/filter-flat.c#L77

Cheers,
   Peter

> 
> Thanks, and apologies if I've missed this issue when searching the archive.
> Josh.


More information about the wayland-devel mailing list