reinderien / xcalibrate

X.org touchscreen calibrator
MIT License
52 stars 18 forks source link

xcalibrate fails to identify the xinput device #13

Open Photon89 opened 3 years ago

Photon89 commented 3 years ago

This is how it looks like:

$ ./xcalibrate 
Pointer devices:
  ID                                Name
   4          Virtual core XTEST pointer
   9                     Elan TrackPoint
  10                       Elan Touchpad
  16 Wacom Pen and multitouch sensor Pen stylus
  17 Wacom Pen and multitouch sensor Pen eraser
  18 Wacom Pen and multitouch sensor Finger touch

Device to calibrate [16]: 16

Cal property not set; is this an xinput device?
Kippykip commented 3 years ago

I had this issue too on a Panasonic Toughbook CF19's touch screen Turns out when I typed xinput in the terminal, the real device shows up as a keyboard device and not as a pointer! (weird but ok)

I worked around it with a dirty method by editing this line on row 20: groups = re.findall(r'.(\w.+(\w|\(\d+\)))\s+id=(\d+)\D+slave *pointer', xinput('--list', '--short')) I changed to the following: groups = re.findall(r'.(\w.+(\w|\(\d+\)))\s+id=(\d+)\D+slave *keyboard', xinput('--list', '--short'))

Then it showed the same device (but without the Pen (0)) and the tool then worked perfectly fine! Edit the conf file that it told me and it's definitely working! I ended up using 9 points for the test.

Perhaps your Wacom setup also shows up as a keyboard device too? Could be worth trying.

Kippykip commented 3 years ago

Alrighty, I made a modified version that shows both keyboard and pointer devices. https://github.com/Kippykip/xcalibrate

It also saves the config automatically now without having to copy and paste, although this means you have to run my forked script as sudo.