2 Dec 2007

Touch screen

It would be nice to use the touch screen under linux. However, unfortunately the touch screen isn't working yet (for me). This is the device:

~$ dmesg | grep PenM

[ 8.232000] input: DIALOGUE INC PenMount USB as /class/input/input2
[ 8.232000] input: USB HID v0.01 Mouse [DIALOGUE INC PenMount USB] on usb-0000:00:1d.3-2

I found an ubuntuforum thread here, which describes installing Ubuntu Feisty on a Kohjinsha SH6. The Ubuntu driver can be found on the PenMount website: http://www.penmount.com/down_2_1.php
After installation with sudo ./install.sh (Penmount 6000 [USB]) and restart of the X server (CTRL+ALT+BACKSPACE) it is supposed to work - but for some reason it doesn't. I will keep you up to date...

-- EDIT --
After I got my first comment on this post (thanks!) I tried what was suggested, i.e. I changed the device from /dev/input/event0 to /dev/input/event2 in /etc/X11/xorg.conf. Unfortunately this didn't solve the problem. I then had a look at the README-ubuntu again, which cames with the driver and I realised that the PenMount USB Driver isn't loaded, because /proc/bus/usb/devices didn't even exist. I mounted the USB file system

mount -t usbfs none /proc/bus/usb

In the readme the same command is given with usbdevfs, however this does not work (you will get the error message unknown filesystem type 'usbdevfs') , since apparently the USB filesystem has been renamed to usbfs.)

Now, I find a Penmount entry here
~$ sudo more /proc/bus/usb/devices
...
T: Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=14e1 ProdID=6000 Rev=a4.b4
S: Manufacturer=DIALOGUE INC
S: Product=PenMount USB
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 5 Ivl=1ms
E: Ad=02(O) Atr=03(Int.) MxPS= 5 Ivl=1ms
...

and /proc/bus/input/devices contains the following

I: Bus=0003 Vendor=14e1 Product=6000 Version=0001
N: Name="DIALOGUE INC PenMount USB"
P: Phys=usb-0000:00:1d.3-2/input0
S: Sysfs=/class/input/input5
U: Uniq=
H: Handlers=event5 js0
B: EV=b
B: KEY=30000 0 0 0 0 0 0 0 0
B: ABS=3

This kind of looked like I had to use /dev/input/event5 in xorg.conf. But after restarting the X server again it still didn't work. However if I do the following

sudo xxd /dev/input/event5

I get some funny output like this and it gets more if you touch the screen

0000000: d0a9 5647 8053 0b00 0300 0000 5501 0000 ..VG.S......U...
0000010: d0a9 5647 8653 0b00 0300 0100 9302 0000 ..VG.S..........
0000020: d0a9 5647 8853 0b00 0000 0000 0000 0000 ..VG.S..........
0000030: d0a9 5647 4f5b 0b00 0100 1001 0100 0000 ..VGO[..........
0000040: d0a9 5647 545b 0b00 0000 0000 0000 0000 ..VGT[..........

- so at least something is happening... :-) - still not enough though! Any ideas what to try next?

18 comments:

neelotpal said...

i made the touchscreen work by changing the device form /dev/input/event0 to /dev/input/event2 in /etc/X11/xorg.conf.
The penmount installer puts a wrong device in xorg.conf.
The problem however is that i cant calibrate the touch screen as the calibration program core dumps.

neelotpal said...

I am really surprised that you couldnt get the touchscreen to work since we have the same hardware and the same ubuntu version. I am even more surprised that you need to use /dev/input/event4 and I need to use /dev/input/event2 to get the touchscreen working. But your proc devices indedd show event5 as mine shows event2.
I also installed the ubuntu package
xserver-xorg-input-penmount
Maybe this helps.
The Penmount readme also suggests to uncomment all wacom entries in xorg.conf and I had done that too. What happens when you run
sudo ./pm-sniff-usb /dev/input/event[5|2]
pm-sniff-usb comes with the Penmount drivers. I get X,Y coordinates when i touch the screen so the device is working. I guess for you xxd shows that the device is working atleast.

Gantō said...

I got mine working just now and I was going to post about the /dev/input/event2 fix, but I see I've been beat to it. I didn't have to install xserver-xorg-input-penmount, this is all I did:
1. install the penmount drivers
2. chmod the executables to make them executable
3. using pm-sniff-usb, found out that /dev/input/event2 was the touch screen
4. run the pm-setup program
5. change event0 to event2 in xorg.conf
6. restart X

Gantō said...

The difference in the location of the touchscreen (event2, event5) might be due to different models. I have the English keyboard model, while Naomi has the Japanese model.

I too haven't been able to get calibration working. Both std-calib and adv-calib lock up the computer completely, and I have to reboot using the power switch.

Anonymous said...

Hi, thanks for your messages! So you never had to mount the usb file system? I have to do that every time I boot into linux, otherwise /proc/bus/usb/devices doesn't exist. I also installed the ubuntu penmount package. For some reason now it is /dev/input/event4 not event5 anymore.

After restarting the X server, it now kind of works! I don't really know why though. However, it's completely useless, because the pointer is nowhere near my finger and also every slight touch seems to be converted into several mouse clicks.

I also tried the calibration with std-calib, but this crashed my system. However I could simply kill the process from a text terminal.

neelotpal said...

I think the penmount drivers installer copy the advanced driver so maybe we have to use the advanced calibration executable.

neelotpal said...

it is very frustating that the touch screen doesnt work so well.
on another note do suspend (sleep) resume work for you guys.

Gantō said...

Before I rebooted, my touchscreen was event4. Now it's back to event2. I hope I don't have to change xorg.conf each time I boot!

I can resume from suspend sometimes, but other times the screen stays blank and the computer is unresponsive.

Naomi said...

Same here. I tried suspend once and resume doesn't work, i.e. the display remains switched off. Had to use the power button to switch the Kohji off.

Anonymous said...

Suspend (Sleep or Save to RAM) and Resume not working affects my working with Ubuntu the most. If any of you find a solution please publish it...

Anonymous said...

I can get the touchscreen working and it works great when i touch something in the middle of the screen but the mouse gets out of position when i click near the edges.
If anyone gets it calibrated correctly can you please post the corresponding settings for X?

Thank you!

Gantō said...

Still no calibration, but this startup script will make a constant symlink to whichever event device the touchscreen is set to. So instead of using /dev/input/event2, event4 or whichever in xorg.conf, you can just use /dev/input/touch.

--
#!/bin/sh

DEVICE=`grep js0 /proc/bus/input/devices | grep -o event[0-9]`
DEVICE="/dev/input/$DEVICE"

ln -s $DEVICE /dev/input/touch
--

In Ubuntu, put that in a file in /etc/init.d, then run

$ sudo update-rc.d /etc/init.d/touchscreen start 51 S .

Gantō said...

Finally! I got the touch screen calibration to work!

Don`t know why I didn't think of it before, but all I did was run the adv-calib program with root priviledges. I also set visual effects in Preferences to none first; don't know if that had anything to do with it.

I wrote this post with CellWriter. It works surprisingly well (though not perfectly).

Pako Martagón said...

Helo:

My english is very poor. I am sorry.


I have solved the problem of touchscreen in Ubuntu. I have a Kohjinsha SH6 and sometimes appeared as "event2", others as "event4", etc...

Using udevinfo knew that created a device in "/dev/input" I looked there and found in the directory "/dev/input/by-id/" created a link with the name "usb-DIALOGUE_INC_Penmount_USB-event-joystick" which sought to sometimes "/dev/input/even2" others "/dev/input/event4", and so on.

So what I did was modify the file xorg.con, and where said:

Option "Device" "dev/input/event4"

Exchanged by:
Option "Device" dev/input/usb-DIALOGUE_INC_Penmount_USB-event-joystick "

And it works!

Anonymous said...

Gantō, how did you manage to run the adv-calib? Mine freezes, even when I sudo it. Any help is appreciated of course!

Gantō said...

Actually, I tried it again later and I think what made it work was setting visual effects to none. I don't have an Ubuntu machine here right now, but I think it's under System -> Preferences -> Appearance, on the last tab. You can turn visual effects back on after calibrating.

Anonymous said...

Thanks for this Gantō, that did the trick! Touch screen working, sweet! :)

Anonymous said...

Touchscreen: Followed comments here and it worked. Thanks everybody.
WLAN: Used windows (xp) driver from kohjinsha site via ndiswrapper. Roaming supported, network manager supported, WPA, WPA2, WEP 64 hex all field tested. No problem even managing networks with the same name but different security and pass/keys. I paid a full licence of Vist a I will never use, I don't see why I shouldn't use a driver.
Webcam: installed gspca. Webcam works, but maybe it was working even before: I tested with camorama, and camorama seems unable to connect to cam. Testing with aMSN and Cheese revealed the cam is actually there and fully working.
Still to do: connect a bluetooth headset , I'll work on that tomorrow.