xinput_calibrator icon indicating copy to clipboard operation
xinput_calibrator copied to clipboard

Add support for libinput

Open kreijack opened this issue 5 years ago • 6 comments

libinput is replacing the old evdev interface in Xorg. Unfortunately this is not handled very wheel by xinput_calibrator. This pull request, adds support for libinput. So xinput_calibrator is able to calibrate even when libinput replace evdev.

Moreover a tool called uinput-touch-simulation.c is added to simulate a touch screen using the uinput interface.

kreijack avatar Feb 28 '19 19:02 kreijack

This is exactly what I was looking for out of xinput_calibrator! :heart:

I tested this out to see if it would work with a Dell Laptop touchscreen (shows up as ELAN Touchscreen in xinput), and got the following error when trying to run it:

$ xinput_calibrator -v
DEBUG: XInputExtension version is 2.3
DEBUG: Skipping virtual master devices and devices without axis valuators.
DEBUG: Skipping device 'Virtual core XTEST pointer' id=4, does not report Absolute events.
DEBUG: Skipping device 'SynPS/2 Synaptics TouchPad' id=16, does not report Absolute events.
DEBUG: Skipping device 'DLL07BF:01 06CB:7A13 Touchpad' id=13, does not report Absolute events.
DEBUG: Selected device: ELAN Touchscreen
DEBUG: Not usbtouchscreen calibrator: Not a usbtouchscreen device
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  131 (XInputExtension)
  Minor opcode of failed request:  37 (X_ChangeDeviceProperty)
  Serial number of failed request:  17
  Current serial number in output stream:  18

This was on a pretty stock Debian Stretch system, with no extra ./configure arguments. Happy to provide more details if it'd be helpful! Thanks for working on this. :+1:

tianon avatar Apr 25 '19 18:04 tianon

Hi, could you be try https://github.com/kreijack/xinput_calibrator.git the 'devel' branch (commit b82b479 ) ? I am not sure if this will solve; however this is my latest update. If this will not solve, I will add some debug code to sorter out the issue. Please let me know if this will help you.

BR G.Baroncelli

kreijack avatar Apr 29 '19 18:04 kreijack

That works, and outputs an appropriate transformation matrix! :smile:

(Still get multi-monitor issues as described in #61, but that's expected with the rest of xinput_calibrator's code. :heart:)

tianon avatar May 03 '19 17:05 tianon

This worked to fix #68 for me! Thank you @kreijack

b0o avatar May 10 '19 22:05 b0o

This patch made xinput_calibrator actually work at all on Ubuntu 18.04. The generated xorg.d section works too. Thanks 👍

ingmar avatar Dec 09 '19 21:12 ingmar

is there any way for me to get a version of the binary with this pull request merged? I do not have a unix build env set up and want to avoid having to re-implement this in python to include on a prototype of a kiosk. Thank you all.

thetrebor avatar Jan 24 '20 16:01 thetrebor