Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
X, tslib, s3c2440 & touchscreen -> not working in X
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
Gucky_der_Mausbiber
Guru
Guru


Joined: 10 Apr 2005
Posts: 359
Location: Wetzlar, Hessen

PostPosted: Wed Jul 15, 2009 12:21 pm    Post subject: X, tslib, s3c2440 & touchscreen -> not working in X Reply with quote

Hello,

I've a problem with an embbeded-arm-device (s3c2440) and the attached 4-Wire-Touchscreen - it won't work with xorg-server and twm/matchbox as window-manager.

I will give you all information I have found about this problem and perhaps somebody can tell me what to do to get it working.
First of all two Download-Links to get datasheets of the device itself and the attached touchscreen:


To get gentoo running i used a 2GB sd-card with gentoo-rootfs. There are only few small problems to get it working, so after a few days i see gentoo booting on the touchscreen - very nice. :D

Next step was to compile and install the X-Window-System on the device.
So, i emerged "xorg-server" with the USE-Flag "tslib"
Code:
USE="tslib" emerge -av xorg-server
and with
Code:
INPUT_DEVICES="tslib"
in the "/etc/make.conf" ... damm, it takes about 6 hours to compile xorg-server on the 400MHz device (cross-compiling X doesn't work), and altogether (all other packages) it takes about 12 hours to compile the entire xorg-server ... but after all, it works.

I tested the X-Windows with "startX"-command ... X is comming up and running twm als window-manager.
Perfect for the first days of work. :D

Okay, now i want to see if the touchscreen works in X & twm, so i tried to select an window in twm with touching the display - nothing. Tried to move the mouse with touching the display - nothing.
So I tried another window-manager, called "matchbox" (special wm for small-devices). But after a sucessfull start the touchscreen doesn't work. Matchbox itself will run fine.

Okay, bad, touchsreen doesn't work "out-of-the-box". :(

So, i googled the web about tslib, 4-wire-touchscreens and xorg-server (because matchbox is altough using X-Window-System) and found some interesting things.

First was to apply "/dev/input/ts" with "mknod" , seems to be a kind of symlink from "/sys/devices/virtual/input/input0". After this, I export 5-6 tslib-variables so that tslib knows which interface to use and where the conf-file is saved.

First test was an simple
Code:
cat /dev/input/ts
if i touch the display know, there appears different kinds of characters. Fine, seems to work. :D

Next I want to calibrate my touchscreen
Code:
ts_calibrate /etc/ts.calib
Now a black screen appears with a cross alternating in each corner. Afters touching the crosses the tool quit sucessfully.

So, i can say, touchscreen is working, and tslib has recognized the touchscreen and works with it. :D

After this I tried to start twm/matchbox again to see if the touchscreen is working now (because tslib works fine now and USE-Flags are set), but nothing. In both wm's (matchbox/twm) the touscreen do not reacted on any inputs.

So, I don't know what i did wrong?
I use the tslib and it seems to work great. I put in the tslib USE-Flag and set "tslib" as an input_device in the make.conf. I calibrated my touchscreen sucessfully with tslib-tool. But in my wm's, nothings works. :(

Here are now some technical infos about the device, first an extract of the dmesg, showing that the kernel recognized the touchscreen
Code:
s3c2410 TouchScreen successfully loaded
input: s3c2410 TouchScreen as /devices/virtual/input/input0


here is a look at the input-devices
Code:

mini2440 ~ # cat /proc/bus/input/devices
I: Bus=0013 Vendor=dead Product=beef Version=0101
N: Name="s3c2410 TouchScreen"
P: Phys=
S: Sysfs=/devices/virtual/input/input0
U: Uniq=
H: Handlers=event0
B: EV=b
B: KEY=0
B: ABS=1000003



PS: If i try to auto-configure the xorg-conf with "Xorg -configure" it ends up with an error "No devices found", so i must use the internal-autobuild xorg.conf. But i don't know how to create a xorg.conf for that device "by-hand", because i don't what to fill in for the graphic-device or the screen-section.
_________________
intel quad core, nvidia 8800gts, intel hd audio+sb live, gnome 2.24
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7232
Location: Pelotas, BR

PostPosted: Wed Jul 15, 2009 2:09 pm    Post subject: Reply with quote

No crossposting, follow-ups here
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum