Category: Hardware
LG 1730SF on Ubuntu 10.04 Lucid Lynx
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.
"HTPC"
Here's what the Audio & Video part of the house looks like now
There are 3 places in the house where we listen to music, theatre room, living room and sauna. Living room has it's own equipment. Theatre equipment handles the sauna speakers as well. iTunes on an iMac is used to store and organize audio collection, and also play music in theatre room.
Sauna & Living Room use the iTunes collection via MPD (Music player daemon) Wall mounted touchscreen is used to control MPD which plays the music.
Living room has diskless ubuntu HTPC which boots from gentoo server, in addition to MPD, it also runs Xine which is used as frontend for VDR, streaming SDTV content from the server. Everything in living room and then some can be controlled with Harmony 525 remote control.
Theatre room playback is handled by Plex running on the iMac. Plex used to organize video library.
So, this HTPC project has grown a bit.
Basically the whole house is now a big tech toy (including home automation with computer controlled lights, wall sockets, motion sensors, smoke detectors, temperature sensors, door sensors, etc, but that's another story, you can read more about it in the other blog. Only in Finnish though for now, sorry.)
All is good
It still works
. Did some extra watchdog scripts to catch any possible errors that may happen. Now if VDR gets hung without internal watchdog catching it and if process doesn't die it is detected by a watchdog which tries to periodically access svdrp. Also some encrypted channels sometimes cause VDSB (Video Data Stream Broken) on recordings, which causes multiple restarts. It is also detected and timer is automatically removed.
New setup has been stable for almost a month now
It works! It works!
No major problems since the new setup was implemented. The boot time for the ubuntu box is now reasonable, I removed all unnecessary bullcrap from init. One interesting point is that my NFS shares (music, movies) has to be mounted on both server and client?! If they are only mounted on server (which I thought would be all I need) the videos show in menus ok, but playing just wont work. Apparently xinelibout in fact does not stream the external files over the network but instead orders the client to play them from a specific location.
Diskless HTPC
AirStars arrived today - Now this is getting a bit more complicated.
I have now a server linux box (gentoo) running necessary software for it to serve as pxe boot server (dhcp, tftp, nfs). This same server also has 2 DVB-T cards (AirStar2) and runs VDR + xineliboutput (+other plugins) and lircd in connect mode (connects to other computer and listens for remote control events from there).
HTPC in living room is now diskless, I copied over the Ubuntu installation from it's local hdd to the NFS server, made new initrd which supports root filesystem on NFS, configured pxelinux on the server to give the HTPC this kernel & initial ram disk when it requests them. Only downside so far is that booting HTPC takes several minutes, but as it is diskless and only running lircd in server mode and xine when tv is switched on it doesn't really matter. It does not need to be turned off ever.
Let's hope the problems I had were only because of cinergyT2 + VIA mobo don't get along well together.
:: Next >>
