Skip to contentSkip to conversation

Calibrating touch screen

DISCUSSION Gary Thomas 3 participants 5 messages Mar 25, 2013

lore
Share & tools
lore
#0 lore raw

I have a target running Poky/Yocto which has a touch screen. When I try to run the 'xtscal' program, I get this error:

  # xtscal
  XCALIBRATE extension missing: Resource temporarily unavailable

Any ideas what I need to build/install to make this work?

On a related note, my screen is a small LCD which has a native layout of 320x240. However, I need to run it in portrait mode of 240x320. I have this mostly working using xrandr but now my old touch screen calibrations no longer work (they were for the landscape setup). This is my main reason for getting xtscal to work.

Thanks

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#1 lore raw
Quoted 5 lines · Gary Thomas

I have a target running Poky/Yocto which has a touch screen. When I try to run the 'xtscal' program, I get this error:

   # xtscal
   XCALIBRATE extension missing: Resource temporarily unavailable
Quoted 8 lines

Any ideas what I need to build/install to make this work?

On a related note, my screen is a small LCD which has a native layout of 320x240. However, I need to run it in portrait mode of 240x320. I have this mostly working using xrandr but now my old touch screen calibrations no longer work (they were for the landscape setup). This is my main reason for getting xtscal to work.

We have a major problem here. xserver-kdrive was removed and the xcalibrate extension was dropped from big xorg. We therefore have nothing with the xcalibrate extension in it, it was replaced by xinput stuff which we don't have.

Two options are trying ts_calibrate on the commandline if you can get a portrait console (kernels can support console rotation, I helped get that merged years ago) or find the xinput-*-calibration program from meta-oe and use that.

Ross: Any thoughts here? This isn't good coming up to release.

Cheers,

Richard

#2 lore raw
Quoted 1 line · Richard Purdie

Ross: Any thoughts here? This isn't good coming up to release.

xinput-calibrate is the answer, which is sadly in meta-oe still. This needs to be merged. Last time I looked at this there was on-going rewriting of it's startup, I'll see if that's integrated so we can migrate it.

What hardware/touchscreen are you using?

Ross

#3 lore raw
Quoted 10 lines · Ross
Quoted 1 line · Richard Purdie

Ross: Any thoughts here? This isn't good coming up to release.

xinput-calibrate is the answer, which is sadly in meta-oe still. This needs to be merged. Last time I looked at this there was on-going rewriting of it's startup, I'll see if that's integrated so we can migrate it.

What hardware/touchscreen are you using?

Sadly it's proprietary and not public.

Basically OMAP4 (like a Panda) with LCD+touch.

For my case, I found that I could just adjust these things in the Xorg.conf. I use this file as /etc/X11/xorg.conf.d/11-touchscreen.conf
Section "InputClass"
Identifier "ADS7846 Touchscreen"
MatchProduct "ADS7846 Touchscreen"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "SwapAxes" "false"
Option "InvertX" "false"
#Option "InvertY" "true"
Option "Calibration" "102 3768 3590 275"
EndSection
The calibration values came from xinput-calibrate which I imported for just this project. As you say, that should get moved to OE-core.

The code in /etc/X11/Xsession.d/30xTs_Calibrate.sh seems totally broken (and is how I came to my original question)

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#4 lore raw

Hi Gary,

Quoted 3 lines · Gary Thomas
Quoted 1 line

What hardware/touchscreen are you using?

Sadly it's proprietary and not public.

I'm not surprised, but glad that xinput-calibrator worked!

Quoted 5 lines

The calibration values came from xinput-calibrate which I imported for just this project. As you say, that should get moved to OE-core.

The code in /etc/X11/Xsession.d/30xTs_Calibrate.sh seems totally broken (and is how I came to my original question)

Yes. :( I'll clean this up once I've sorted out systemd exploding into broken bits after I rebased, unless you fancy submitting some patches...

Ross