Handling different touchscreen calibration systems
hi,
There are several way to calibrate a touchscreen:*ts_calibrate : it uses the framebuffer and so it must be started before xorg(an init script can do that). works only for tslib. *xtscal : works only for kdrive and tslib(if I understood well) *xinput-calibrator: works with xorg and can calibrate many things,but I had huge issues with it with tslib,with /etc/pointercal from ts_calibrate it works fine but without it can't calibrate... Note that it also supports other protocols like evdev,evtouch etc... *other specific uttilities for evtouch etc...
How should someone handle this.
*in machine config?
*in the distro?
*in the image?
Also to add the complexity:*ts_calibrate should be an init script *xinput-calibrator and xtscal are Xsession.d scripts
Moreover theses scripts could be machine specific:
*For instance I've 2 touch screens on the bug device,and so I need a specific init script for calibrating:
#!/bin/sh
if [ ! -e /etc/pointercal ]
then
TSLIB_CONSOLEDEVICE=none TSLIB_FBDEVICE=/dev/fb1
TSLIB_TSDEVICE=/dev/input/bmi_lcd_ts4 ts_calibrate &
TSLIB_CONSOLEDEVICE=none TSLIB_FBDEVICE=/dev/fb2
TSLIB_TSDEVICE=/dev/input/bmi_lcd_ts5 ts_calibrate &
until [ -f /etc/pointercal ]
do
sleep 1
done
killall ts_calibrate
fi
That script is shipped with a recipe named tslib-init,which I didn't commit yet because of this mail.
*htcdream has the same issue with xinput-calibrator (require having a calibrated /etc/pointercal so it makes it useless )
*bug 2.x seem to need ts_calibrate too but only for one screen
*om-gta02 has an evdev driver which requires to feed /sys nodes with some calibration data,the script used is an Xsession.d script that uses xinput-calibrator
I had the idea of making recipes for handling int scripts or Xsession.d scripts,and including them in XSERVER in the machine configuration but I'm not shure it's a good idea.
Denis.
Quoted 3 lines · GNUtoo
*om-gta02 has an evdev driver which requires to feed /sys nodes with some calibration data,the script used is an Xsession.d script that uses xinput-calibrator
To be a bit more exact:
om-gta02 in SHR is using calibration of kernel driver through /sys, just because it was first working solution, then we added possibility to use xinput-calibrator (but that's used from Xsession.d script only after user manually starts it once - on some units it's more precise after own calibration than with precalibrated kernel driver - no idea why)
Quoted 3 lines
I had the idea of making recipes for handling int scripts or Xsession.d scripts,and including them in XSERVER in the machine configuration but I'm not shure it's a good idea.
SHR moved from xserver-kdrive-common to xserver-common, but default stayed kdriver in task-x11. Would be great if other distros using xserver-kdrive-common decide to join xserver-common camp and make your changes only in one.
BTW: biggest change for switch from kdrive was to check/fix Xsession script to never kill shell which is using them. They were launched in new shell in kdrive and exit call was ok, but with xserver-common they are sourced to Xsession script and calling exit stops Xorg loading.
Cheers,
Signature · 3 lines
uin:136542059 jid:[email protected] Jansa Martin sip:[email protected] JaMa