Etsitkö asiaa kotimaan kielellä kotiautomaatiosta (X10, 1-wire) tai talonrakennukseen liittyvistä asioista? Ne löytyvät nykyään täältä toiselta osastolta.
Blog previously known as 'Home Theatre PC'
« Firefox plugin to reset browser"HTPC" »

LG 1730SF on Ubuntu 10.04 Lucid Lynx

Permalink 07/15/10 01:35, by Esa Viitala, Categories: Hardware, Software

I went and installed a new machine to control the lobby touchscreen. On the previous installation a few years ago I had to heavily patch kernel modules to support this touchscreen. Now it works almost out of the box. X.Org X Server 1.7.6, kernel 2.6.32-23-generic and evtouch 0.8.8.

The touchscreen is identified as follows in /proc/bus/input/devices, ubuntu loads usbtouchscreen kernel module for it automatically.

  
I: Bus=0003 Vendor=0403 Product=f9e9 Version=0100
N: Name="ITM Inc USB Touch Panel"
P: Phys=usb-0000:00:1d.1-2/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/input/input5
U: Uniq=
H: Handlers=mouse1 event5 
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=1000003

While browsing the net I found several different ways people have managed to get the touchscreen working on various versions of ubuntu, most of them are linked from rantakokko.net

Unfortunately none of those worked for Ubuntu 10.04. Seems like Ubuntu changes the way devices are set up for every release. It's still simple enough to get the touchscreen to work once you find out where the configuration is hidden on the current version and which configs are actually used. Xorg on 10.04 doesn't use HAL anymore, so adding itm touch correctly to policy files doesn't work. It doesn't have the regular /etc/X11/Xorg.conf either, also it doesn't support x11_options via udev. Ubuntu 10.04 Xorg uses udev and xorg.conf.d snippets. There is a problem with evtouch snippet though, it doesn't have MatchDevicePath option, so when Xorg detects evtouch device it tries to add it to all the handlers, it goes ok with the /dev/input/event*, but crashes on /dev/input/mouse*

(II) config/udev: Adding input device ITM Inc USB Touch Panel (/dev/input/mouse1)
.
.
(EE) ioctl EVIOCGNAME failed: Inappropriate ioctl for device
Unable to query/initialize EVTouch hardware.

Solution:

Install evtouch

apt-get install xserver-xorg-input-evtouch

Fix xorg.conf.d snippet at /usr/lib/X11/xorg.conf.d/10-evtouch.conf

Section "InputClass"
	Identifier "touchscreen catchall"
	MatchIsTouchscreen "on"
	MatchDevicePath "/dev/input/event*"
	Driver "evtouch"
	Option "MinX" "295"
	Option "MaxX" "3815"
	Option "MinY" "200"
	Option "MaxY" "3948"
	Option "Emulate3Buttons" "true"
	Option "Emulate3Timeout" "50"
	Option "SwapX" "1"
	Option "SendCoreEvents" "on"
	Option "Rotate" "ccw"
	Option "ReportingMode" "raw"
EndSection

In addition to the MatchDevicePath directive you can put all the usual evtouch configuration here as well. After these changes, Xorg.0.log should look like this.

(II) LoadModule: "evtouch"
(II) Loading /usr/lib/xorg/modules/input/evtouch_drv.so
(II) Module evtouch: vendor="Kenan Esau"
        compiled for 1.7.6, module version = 0.8.8
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 7.0
State: S_UNTOUCHED      Action: No Action               Button: 0
State: S_TOUCHED        Action: No Action               Button: 0
State: S_LONGTOUCHED    Action: down            Button: 1
State: S_MOVING Action: No Action               Button: 0
State: S_MAYBETAPPED    Action: click           Button: 1
State: S_ONEANDAHALFTAP Action: down            Button: 3
(**) Option "MinX" "295"
(**) Option "MaxX" "3815"
(**) Option "MinY" "200"
(**) Option "MaxY" "3948"
(**) Option "Emulate3Buttons" "true"
(**) Option "Emulate3Timeout" "50"
(**) Option "SwapX" "1"
(**) Option "SendCoreEvents" "on"
(**) EVTouch TouchScreen: always reports core events
(II) XINPUT: Adding extended input device "EVTouch TouchScreen" (type: TOUCHSCREEN)
(**) Option "Device" "/dev/input/event5"
(II) EVTouch TouchScreen: Found absolute axes
(II) config/udev: Adding input device ITM Inc USB Touch Panel (/dev/input/mouse1)
(II) No input driver/identifier specified (ignoring)

If you have touch panel rotated some other way, play with SwapX, SwapY and Rotate.

11 comments

Comment from: Rob Robson [Visitor]
Rob RobsonGreat thanks for this!
07/16/10 @ 02:19
Comment from: David Eriksson [Visitor]
David ErikssonThanks, I shall try this as soon as possible. I have not been able to use the touch support on my L1510SF screen since the "unfortunate" upgrade to Lucid...
07/16/10 @ 05:13
Comment from: Eric [Visitor]
EricWhat if my touch screen is not shown in /proc/bus/input/devices. It is shown in lsusb
08/06/10 @ 22:04
Comment from: Esa Viitala [Member] Email
Esa ViitalaDo you have usbtouchscreen module loaded? (lsmod)
08/06/10 @ 22:42
Comment from: marcos bustabad [Visitor] Email
marcos bustabadI cant get it to work. First thing Im newbie just 15days linuxing. the message i have is: E: No se pudo abrir el fichero de bloqueo '/var/lib/dpkg/lock' - open (13: Permiso denegado)
E: Imposible bloquear el directorio de administración (/var/lib/dpkg/), ¿es superusuario?
translation: cant open bloc file: /var/lib.. (permission deny)
Impossible to block the administration directory /var/lib/dpkg, are you superuser?

Please how can I fix it? Thanks for the help
08/23/10 @ 15:25
Comment from: Esa Viitala [Member] Email
Esa ViitalaYes, you need to be root, or run the installation with sudo, like

sudo apt-get install xserver-xorg-input-evtouch

and enter your password when prompted.
08/23/10 @ 16:12
Comment from: marcos bustabad [Visitor]
marcos bustabadi have installed with the sudo, thanks, but I dont know how to keep going with the next: Fix xorg.conf.d snippet at /usr/lib/X11/xorg.conf.d/10-evtouch.conf

How?? I tried sudo usr/lib/.... doesnt work, I tried gedit usr/lib.... but says the file is read-only and I cant change anything on that file.
Many Thanks for the help.
08/24/10 @ 22:38
Comment from: marcos bustabad [Visitor]
marcos bustabadi have installed with the sudo, thanks, but I dont know how to keep going with the next: Fix xorg.conf.d snippet at /usr/lib/X11/xorg.conf.d/10-evtouch.conf

How?? I tried sudo usr/lib/.... doesnt work, I tried gedit usr/lib.... but says the file is read-only and I cant change anything on that file.
Many Thanks for the help.
08/24/10 @ 22:44
Comment from: Esa Viitala [Member] Email
Esa ViitalaYou need to be root (superuser) to edit it, so

sudo gedit /usr/lib/X11/xorg.conf.d/10-evtouch.conf

Or any other editor, nano, vi whatever you want to use, just remember the sudo.
08/26/10 @ 15:09
Comment from: dzach [Visitor]
dzachThank you very much for this article. Solved all problems with the L1730SF touchscreen.
09/23/10 @ 00:24
Comment from: iliis [Visitor]
iliisThanks a lot. It works perfectly! I almost gave up trying to create a new xorg.conf.d snippet.

To calibrate it you can use xinput_calibrator: http://www.freedesktop.org/wiki/Software/xinput_calibrator

Make sure you provide the --precalib option or you'll get completly wrong data.

I actually had to use a modified version of xinput_calibrator as the touchscreen is only the second monitor in a twinview setup (https://github.com/floe/xinput_calibrator/commit/fc608f75d8aa5a46aa35518aa6ef35365e6ced84)

Cheers, iliis
12/12/10 @ 00:18

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)

Contents

Search

powered by b2evolution