kreijack / xlibinput_calibrator

Touch calibrator for libinput
MIT License
21 stars 12 forks source link

Unable to find Device #2

Closed Koravya closed 3 years ago

Koravya commented 3 years ago

xlibinput_calibrator is unable to identify my touchscreen. I have attempted to force it by specifying the --device-name and/or the --device-id properties. My system is a Dell XPS 9575 2-IN-1. Here is /proc/bus/input/devices entry fro the devices. I: Bus=0018 Vendor=056a Product=486b Version=0100 N: Name="Wacom HID 486B Pen" P: Phys=i2c-WCOM486B:00 S: Sysfs=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-WCOM486B:00/0018:056A:486B.0001/input/input13 U: Uniq= H: Handlers=mouse0 event7 B: PROP=2 B: EV=1b B: KEY=1e03 0 0 0 0 0 B: ABS=1000d000003 B: MSC=1

I: Bus=0018 Vendor=056a Product=486b Version=0100 N: Name="Wacom HID 486B Finger" P: Phys=i2c-WCOM486B:00 S: Sysfs=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-WCOM486B:00/0018:056A:486B.0001/input/input14 U: Uniq= H: Handlers=mouse1 event8 B: PROP=2 B: EV=b B: KEY=400 0 0 0 0 0 B: ABS=260800000000003

libinput list-devices entry for the devices Device: Wacom HID 486B Pen Kernel: /dev/input/event7 Group: 7 Seat: seat0, default Size: 344x194mm Capabilities: tablet Tap-to-click: n/a Tap-and-drag: n/a Tap drag lock: n/a Left-handed: n/a Nat.scrolling: n/a Middle emulation: n/a Calibration: identity matrix Scroll methods: none Click methods: none Disable-w-typing: n/a Accel profiles: none Rotation: n/a

Device: Wacom HID 486B Finger Kernel: /dev/input/event8 Group: 7 Seat: seat0, default Size: 344x194mm Capabilities: touch Tap-to-click: n/a Tap-and-drag: n/a Tap drag lock: n/a Left-handed: n/a Nat.scrolling: n/a Middle emulation: n/a Calibration: identity matrix Scroll methods: none Click methods: none Disable-w-typing: n/a Accel profiles: n/a Rotation: n/a

Output of ./xlibinput_calibrator --device-name='Wacom HID 486B Finger' --verbose show-matrix: no show-x11-config: no show-libinput-config: no not-save: no device-id: device-name: 'Wacom HID 486B Finger' output-file-x11-config: '' output-file-xinput-config: '' threshold-misclick: 0 threshold-doubleclick: 1 monitor-number: 0 terminate called after throwing an instance of 'WrongCalibratorException' what(): Libinput: Unable to find device Aborted

./xlibinput_calibrator --verbose show-matrix: no show-x11-config: no show-libinput-config: no not-save: no device-id: device-name: '' output-file-x11-config: '' output-file-xinput-config: '' threshold-misclick: 0 threshold-doubleclick: 1 monitor-number: 0 terminate called after throwing an instance of 'WrongCalibratorException' what(): Libinput: Unable to find device Aborted

kreijack commented 3 years ago

Hi,

first, you can pass the device id, where the id is the one returned by "xinput --list" and NOT by "libinput list-devices".

If this doesn't solve your problem, please could you show the output of

$ xinput --list

and the output of

$ xinput list-props

where are/is the id associated to the wacom device(s) ? May be that the wacom is not classified as touchscreen, but as another type (like touchpad).

I am not familiar with this type of device. So I am assuming that it is like an absolute "mouse", where when you press the pen is like when you press a mouse button ? And, why you need xlibinput_calibrator ? I guessing that the corner of the tablet is not coincident with the corner of of the monitor ? If so, how big is the differences ? 10%.. 100% ... 1000% ?

Sorry for the questions, but I need to know these information to better understand

Koravya commented 3 years ago

Under normal operation (Only using the onboard display) the devices work perfectly. I recently bought a portable external monitor, when I connect it to the system both it's touch, and the wacom touch get scale to the entire window. xlibinput_calibrator works perfectly for the external device, fixing the calibration so that it applies to the correct display. However it is unable to identify the onboard screen, and thus the calibration stays wrong. When i disconnect the external display the onboard touch returns to normal.

xinput --list: ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Wacom HID 486B Pen stylus id=12 [slave pointer (2)] ⎜ ↳ Wacom HID 486B Finger touch id=13 [slave pointer (2)] ⎜ ↳ DLL080D:01 06CB:7A13 Mouse id=14 [slave pointer (2)] ⎜ ↳ DLL080D:01 06CB:7A13 Touchpad id=15 [slave pointer (2)] ⎜ ↳ Wacom HID 486B Pen eraser id=22 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Video Bus id=7 [slave keyboard (3)] ↳ Power Button id=8 [slave keyboard (3)] ↳ Sleep Button id=9 [slave keyboard (3)] ↳ Integrated_Webcam_HD: Integrate id=10 [slave keyboard (3)] ↳ Integrated_Webcam_HD: Integrate id=11 [slave keyboard (3)] ↳ Intel Virtual Button driver id=16 [slave keyboard (3)] ↳ Intel HID events id=17 [slave keyboard (3)] ↳ Intel HID 5 button array id=18 [slave keyboard (3)] ↳ Dell WMI hotkeys id=19 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=20 [slave keyboard (3)]

xinput list-props 'Wacom HID 486B Finger touch' 'Wacom HID 486B Pen stylus': Device 'Wacom HID 486B Finger touch': Device Enabled (176): 1 Coordinate Transformation Matrix (178): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 Device Accel Profile (302): 0 Device Accel Constant Deceleration (303): 1.000000 Device Accel Adaptive Deceleration (304): 1.000000 Device Accel Velocity Scaling (305): 10.000000 Device Node (299): "/dev/input/event8" Wacom Tablet Area (312): 0, 0, 13768, 7744 Wacom Rotation (313): 0 Wacom Pressurecurve (314): 0, 0, 100, 100 Wacom Serial IDs (315): 18539, 1, 3, 0, 0 Wacom Serial ID binding (316): 0 Wacom Pressure Threshold (317): 0 Wacom Sample and Suppress (318): 2, 4 Wacom Enable Touch (319): 1 Wacom Enable Touch Gesture (321): 1 Wacom Touch Gesture Parameters (322): 605, 268, 250 Wacom Tool Type (323): "TOUCH" (330) Wacom Button Actions (324): "Wacom button action 0" (325), "Wacom button action 1" (326), "Wacom button action 2" (327) Wacom button action 0 (325): 1572865 Wacom button action 1 (326): 1572866 Wacom button action 2 (327): 1572867 Device Product ID (300): 1386, 18539 Wacom Debug Levels (329): 0, 0 Device 'Wacom HID 486B Pen stylus': Device Enabled (176): 1 Coordinate Transformation Matrix (178): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 Device Accel Profile (302): 0 Device Accel Constant Deceleration (303): 1.000000 Device Accel Adaptive Deceleration (304): 1.000000 Device Accel Velocity Scaling (305): 10.000000 Device Node (299): "/dev/input/event7" Wacom Tablet Area (312): 0, 0, 34422, 19362 Wacom Rotation (313): 0 Wacom Pressurecurve (314): 0, 0, 100, 100 Wacom Serial IDs (315): 18539, -157546242, 32859, 0, 0 Wacom Serial ID binding (316): 0 Wacom Pressure Threshold (317): 26 Wacom Sample and Suppress (318): 2, 4 Wacom Enable Touch (319): 0 Wacom Hover Click (320): 1 Wacom Enable Touch Gesture (321): 0 Wacom Touch Gesture Parameters (322): 0, 0, 250 Wacom Tool Type (323): "STYLUS" (301) Wacom Button Actions (324): "Wacom button action 0" (325), "Wacom button action 1" (326), "Wacom button action 2" (327) Wacom button action 0 (325): 1572865 Wacom button action 1 (326): 1572866 Wacom button action 2 (327): 1572867 Wacom Pressure Recalibration (328): 1 Device Product ID (300): 1386, 18539 Wacom Debug Levels (329): 0, 0

./xlibinput_calibrator --device-id=12 terminate called after throwing an instance of 'WrongCalibratorException' what(): Libinput: "libinput Calibration Matrix" property missing, not a (valid) libinput device Aborted

./xlibinput_calibrator --device-id=13: terminate called after throwing an instance of 'WrongCalibratorException' what(): Libinput: "libinput Calibration Matrix" property missing, not a (valid) libinput device Aborted

kreijack commented 3 years ago

Ok, from the output I see the problem: xlibinput_calibrator try to change the "libinput Calibration Matrix"; however your device doesn't expose this matrix, but it has only 'Coordinate Transformation Matrix (147)'. I have to try to change this matrix instead of "libinput Calibration Matrix". Let me few days and I will create a patch to let the user to specify which 'matrix' has to be manipulated.

kreijack commented 3 years ago

Ok, I updated the 'devel' branch, adding the --matrix-name option.

So you should be able to calibrate

$ ./xlibinput_calibrator --device-id=13 "--matrix-name=Coordinate Transformation Matrix" --verbose

Looking forward for a feedback.

BR

Koravya commented 3 years ago

So far this appears to fix it. I will continue to test over the next few days to be sure.

kreijack commented 3 years ago

Ok. Please give me in any case a feedback. If something goes wrong, I am open to analyze your bug report.

BR

Koravya commented 3 years ago

I apologize for such a late response. Below is the printout from the last usage. It worked as intended.

sudo ./xlibinput_calibrator --device-id=13 --matrix-name="Coordinate Transformation Matrix" --monitor-number=0 --verbose show-matrix: no show-x11-config: no show-libinput-config: no not-save: no device-id: 13 device-name: '' matrix-name: 'Coordinate Transformation Matrix' output-file-x11-config: '' output-file-xinput-config: '' threshold-misclick: 0 threshold-doubleclick: 1 monitor-number: 0 Click points accepted: x=242, y=-796 x=1687, y=-794 x=251, y=827 x=1679, y=829 Calibrating Libinput driver: Device: Device-ID:13 Update the X11 calibration matrix Successfully applied axis calibration. Current calibration values (from XInput): [1.002472, -0.000174, -0.003713] [-0.001235, 0.499076, 0.492996] [0.000000, 0.000000, 1.000000]

kreijack commented 3 years ago

Thanks for the feedback.

BR