[SOLVED] Touchscreen calibration fails

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
wolfsch

[SOLVED] Touchscreen calibration fails

Post by wolfsch »

I installed Linux Mint 13 KDE Edition and according to http://thefanclub.co.za/how-to/how-ubun ... alibration I tried to calibrate the touch screen:

First I listed the calibratable devices:

Code: Select all

wolfgang@LIFEBOOK-T730 ~ $ sudo xinput_calibrator --list
[sudo] password for wolfgang: 
Device "Serial Wacom Tablet stylus" id=16
Device "Serial Wacom Tablet eraser" id=17
Device "Serial Wacom Tablet touch" id=18
Then the calibration itself:

Code: Select all

wolfgang@LIFEBOOK-T730 ~ $ sudo xinput_calibrator --device 16 
Calibrating standard Xorg driver "Serial Wacom Tablet stylus"
        current calibration values: min_x=0, max_x=26312 and min_y=0, max_y=16520
        If these values are estimated wrong, either supply it manually with the --precalib option, or run the 'get_precalib.sh' script to automatically get it (through HAL).


--> Making the calibration permanent <--
  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'
Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "!!Name_Of_TouchScreen!!"
        Option  "MinX"  "236"
        Option  "MaxX"  "26301"
        Option  "MinY"  "169"
        Option  "MaxY"  "16412"
EndSection

Change '!!Name_Of_TouchScreen!!' to your device's name in the config above.
I modified /usr/share/X11/xorg.conf.d/10-evdev.conf (Initially, the "Identifier" was "evdev touchscreen catchall". When this didn't work, I changed it to "Serial Wacom Tablet stylus"):

Code: Select all

Section "InputClass"
        Identifier "Serial Wacom Tablet stylus"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "Calibration" "236 26301 169 16412"
EndSection
After logging out an in I could see no effect of the calibration. On the left side of the screen is still a considerable gap between pen tip and cursor.
Second, following xinput_calibrator's instructions, I created the file 99-calibration.conf, but put it in /usr/share/X11/... instead. No success.

Could anyone help me to understand what I am doing wrong here ?

Thank you very much !
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Favux

Re: Touchscreen calibration fails

Post by Favux »

Hi wolfsch,

Welcome to Linux Mint forums!
Could anyone help me to understand what I am doing wrong here ?
Sure, a couple of things.

First your touchscreen is sandwiched with your Wacom digitizer and is handled by the Wacom X driver (wacom), not the evdev driver. Your internal connection is a serial one, what linux wacom calls a serial ISDv4 protocol device, which is why xinput_calibrator is calling it "Serial Wacom Tablet stylus". With ISDv4 devices (which are serial tablet PCs) the signals are multiplexed. Moreover the Wacom X driver will append a device type to the device name so your touchscreen's device name is likely "Serial Wacom Tablet touch". Verify that by running the command 'xinput list' in a terminal and posting the output.

So you are telling the wrong driver to match the wrong device name. Moreover evdev does not handle serial devices, it handles only usb devices.

Also xinput_calibrator is correct in telling you to install your custom .conf file in /etc/X11/xorg.conf.d. The wiki is wrong telling you to modify the evdev touchscreen snippet in /usr/share/X11/xorg.conf.d/10-evdev.conf. Custon user .conf's belong in /etc/X11/xorg.conf.d. You may have to create that xorg.conf.d directory (mkdir). The /usr/share/X11/xorg.conf.d location is for the Distribution.

Although xinput_calibrator gave you the wrong device name I would be interested if otherwise its 99-calibration.conf and its snippet worked. With the correct device name from 'xinput-list' of course. It is understandable that it isn't able to differentiate between what are multiple device names for your tablet PC.

Otherwise see the instructions on the Linux Wacom Project wiki's HOWTO page:
http://sourceforge.net/apps/mediawiki/l ... alibration
http://sourceforge.net/apps/mediawiki/l ... org.conf.d
wolfsch

Re: Touchscreen calibration fails

Post by wolfsch »

Hello Favux,

thank you so much for this detailed information, I am sure this will help to solve the problem.
Second I want to apologize for the late answer, which is due to holiday time and health issues.
As soon as I will find the time I will try another calibration and let you know the result.

Again, thank you so much for your help !
wolfsch

Re: Touchscreen calibration fails

Post by wolfsch »

Hello Favux,

I'm afraid in my initial post I was not very precise and mixed up the terms. What I really wanted to do is calibrate the Wacom digitizer in order to use it as a drawing tool with the pen. I did not want to calibrate the touchscreen, which I understood as the device allowing to work with the finger tips. This is why I chose "Serial Wacom Tablet stylus" (ID=16) for xinput_calibrator.

This is the output of xinput -list:
  • ⎜ ↳ Serial Wacom Tablet stylus id=16 [slave pointer (2)]
    ⎜ ↳ Serial Wacom Tablet eraser id=17 [slave pointer (2)]
    ⎜ ↳ Serial Wacom Tablet touch id=18 [slave pointer (2)]
This one the output of xinput_calibrator --list
  • Device "Serial Wacom Tablet stylus" id=16
    Device "Serial Wacom Tablet eraser" id=17
    Device "Serial Wacom Tablet touch" id=18
Following your instructions I re-calibrated device 16 (Serial Wacom Tablet stylus), which I think is the one I really wanted to calibrate (if my understanding of digitizer vs. touchscreen is correct). Then I copied the snippet provided by xinput_calibrator to /etc/X11/xorg.conf.d. The result is, well ... much better. At least I see the calibration effect now, but there is still some considerable inaccuracy. Which led me to read the link you provided and I understand there may be a parallax problem. However, I have the impression, that the accuracy varies somewhat. What I mean is that at times (within the same session) the pen tip / cursor gap is bigger than at others. Maybe it is also a driver and/or hardware issue behind.

I had a similar problem with Sketchbook Pro on Win7. In this post they describe how to increase the number of calibration points and it worked perfectly well:
http://forum.tabletpcreview.com/ep121-s ... trick.html
Do you think a similar approach would be possible with xinput_calibrator ?

Thank you !
Favux

Re: Touchscreen calibration fails

Post by Favux »

The linux wacom driver works differently than the Win version and you can't do the proceedure in the link.

Your calibration problem with your Fujitsu Lifebook T730 seems a little unusual. The stylus is usually pretty good out of the box. Normally it is touch, especially usb touch, that needs calibration.

I'd like to see your calibration values. In a terminal run this command:

Code: Select all

xinput list-props "Serial Wacom Tablet stylus"
and then post the output. I'd also like to see the same output but with the xinput_calibrator settings commented out (#) so they don't apply and the output contains the default settings/calibration.

Do you notice this problem just when rotated into tablet mode? Or in laptop too? How are you rotating the tablet?
wolfsch

Re: Touchscreen calibration fails

Post by wolfsch »

I observed that in both notebook and tablet mode. When I use it in tablet mode, I usually don't rotate at all, just rotate the tablet physically, if needed.

Code: Select all

wolfgang@LIFEBOOK-T730 ~ $ xinput list-props "Serial Wacom Tablet stylus"
Device 'Serial Wacom Tablet stylus':
        Device Enabled (132):   1
        Coordinate Transformation Matrix (134): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        Device Accel Profile (265):     0
        Device Accel Constant Deceleration (266):       1.000000
        Device Accel Adaptive Deceleration (267):       1.000000
        Device Accel Velocity Scaling (268):    10.000000
        Device Node (253):      "/dev/ttyS4"
        Wacom Tablet Area (333):        0, 0, 26312, 16520
        Wacom Rotation (334):   0
        Wacom Pressurecurve (335):      0, 0, 100, 100
        Wacom Serial IDs (336): 227, 0, 2, 0, 0
        Wacom Serial ID binding (337):  0
        Wacom Pressure Threshold (338): 27
        Wacom Sample and Suppress (339):        2, 4
        Wacom Enable Touch (340):       1
        Wacom Hover Click (341):        0
        Wacom Enable Touch Gesture (342):       1
        Wacom Touch Gesture Parameters (343):   0, 0, 250
        Wacom Tool Type (344):  "STYLUS" (326)
        Wacom Button Actions (345):     "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0)
        Device Product ID (252):        0, 227
        Wacom Debug Levels (346):       0, 0

Code: Select all

wolfgang@LIFEBOOK-T730 ~ $ xinput_calibrator --device "Serial Wacom Tablet stylus"
Calibrating standard Xorg driver "Serial Wacom Tablet stylus"
        current calibration values: min_x=0, max_x=26312 and min_y=0, max_y=16520
        If these values are estimated wrong, either supply it manually with the --precalib option, or run the 'get_precalib.sh' script to automatically get it (through HAL).


--> Making the calibration permanent <--
  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'
Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "!!Name_Of_TouchScreen!!"
        Option  "MinX"  "213"
        Option  "MaxX"  "26304"
        Option  "MinY"  "115"
        Option  "MaxY"  "16455"
EndSection

Change '!!Name_Of_TouchScreen!!' to your device's name in the config above.
Favux

Re: Touchscreen calibration fails

Post by Favux »

If you would like automatic rotation for your Fujitsu tablet PC you could install Magick Rotation: https://launchpad.net/magick-rotation

From what you say I'd imagine you would want it to rotate to inverted rather than one of the portrait modes.


Well in /usr/share/X11/xorg.conf.d the correct file to modify is the 50-wacom.conf. The list-props shows the tablet is on the Wacom X driver as it is suppose to be. That's why modifying 10-evdev didn't do anything. A file with a larger number executes later and what executes last controls. And the xorg.conf.d in /etc runs after the one in /usr/share. So the 50-wacom.conf overrode the 10-evdev.conf. The list-props also shows no custom calibration:

Code: Select all

        Wacom Tablet Area (333):        0, 0, 26312, 16520
Was that on purpose because you commented (#) your custom .conf settings out?

But again you shouldn't change files in that directory unless you absolutely have to. Instead use the /etc/X11/xorg.conf.d directory like xinput_calibrator recommends. You could call it 52-wacom.conf instead of 99-calibration.conf if you wanted to. If the xorg.conf.d directory isn't there create it with:

Code: Select all

sudo mkdir /etc/X11/xorg.conf.d
wolfsch

Re: Touchscreen calibration fails

Post by wolfsch »

Was that on purpose because you commented (#) your custom .conf settings out?
Right. In the previous step I did the calibration and put the code snippet into /etc/X11/xorg.conf.d/99-calibration.conf, as you explained in your first post. However, I could see some positive effect but the total result was not too satisfying. Then, following your advice in your second post, I commented it out again, before posting the output of xinput and xinput_calibrator. I also reverted the files in /usr/share/etc... to the original state since I understood it should be left untouched.
Is there anything else you can see in xinput's and xinput_calibrator's output that would explain why even after calibration there is still some inaccuracy ?
Thanks for the link to magick-rotation ! I will definitely try that.
Favux

Re: Touchscreen calibration fails

Post by Favux »

Is there anything else you can see in xinput's and xinput_calibrator's output that would explain why even after calibration there is still some inaccuracy ?
Not really, other than the obvious i.e. xinput_calibrator may not have given you the best coordinates. That's why I run it 3 times and use an average or check if there appears to be a trend. You can try some experimental coordinates and see if that gets you closer.

One thing that does come to mind is electromagnetic interference. Given how the Wacom technology works if there is a not well shielded source near by it can distort what the digitizer is reporting. Usually it is something like a monitor screen too near a tablet. But it seems to me I've seen several folks report that there was something in their tablet PC that was the culprit. Like a wireless card or what not, and when they removed it the problem was gone.
wolfsch

Re: Touchscreen calibration fails

Post by wolfsch »

Wow, interesting ideas ! I will check that out. Thanks a lot !
wolfsch

[SOLVED] Touchscreen calibration fails

Post by wolfsch »

Now this is funny. I uninstalled and reinstalled the Xorg Wacom driver (xserver-xorg-input-wacom), did another calibration and everything works fine. :D
Quite perfect, however, at times the pen-cursor-gap varies during drawing. But I will investigate if some electromagnetic problem exists.
Thanks for your help, Favux. I appreciate that !
Locked

Return to “Software & Applications”