WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Xorg and touchscreen  (Read 10258 times)

Offline asclepix

  • Newbie
  • *
  • Posts: 19
Xorg and touchscreen
« on: July 02, 2010, 10:10:46 AM »
Hello

I need to use a touchscreen with Tiny Core Linux 2.11.5

On my machine Xvesa is good, but "touch" mouse has X and Y axis inverted.
I try to load usbtouchscreen kernel module with swap_xy=1, but with no results.

So I think I need Xorg and evtouch_drv.so (using it I was able to use touchscreen under Ubuntu 8.04).

I've downloaded Xorg-7.4 and its deps. I log out to prompt and I install Xorg using tce-load -i Xorg-7.4.
When I start X using Xorg I obtain only a black screen, with no mouse and I can do nothing else.
If I try with "sudo Xorg -configure" and than "sudo Xorg -config corg.conf.new", but I have the same result.

Can anyone help me?

Thanks in advance

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Xorg and touchscreen
« Reply #1 on: July 02, 2010, 10:25:43 AM »
There a significant chance that you'll have to manually make a touch screen section in xorg.conf

As for the other problems, what does /var/log/Xorg.0.log say? Maybe you could google on "xorg.conf" and your graphics chipset for pointers.

Offline asclepix

  • Newbie
  • *
  • Posts: 19
Re: Xorg and touchscreen
« Reply #2 on: July 02, 2010, 10:30:48 AM »
Yes, I need to modify xorg.conf, but I want to see Xorg on before modify xorg.conf.

How can I get /var/log/Xorg.0.log if I can't remove the black screen? I've tried to insert DontZap option in xorg.conf.new, but Ctrl-Alt-Backspace doesn't work

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Xorg and touchscreen
« Reply #3 on: July 02, 2010, 11:05:27 AM »
How can I get /var/log/Xorg.0.log if I can't remove the black screen? I've tried to insert DontZap option in xorg.conf.new, but Ctrl-Alt-Backspace doesn't work

You can symlink /var/log to somewhere permanent like a hd or usb stick

Offline asclepix

  • Newbie
  • *
  • Posts: 19
Re: Xorg and touchscreen
« Reply #4 on: July 02, 2010, 11:43:46 AM »
It seems a good idea, but on the next boot I have:

ls -l
ls: ./Xorg.0.log: Stale NFS file handle
ls: ./Xorg.0.log.old: Stale NFS file handle
total 0

What does it mean?? I've used /mnt/hda1/log and I do a "sudo chmod a+w /mnt/hda1/log"

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Xorg and touchscreen
« Reply #5 on: July 02, 2010, 12:13:26 PM »
It worked for me using a usb stick a couple of weeks back.

I started emelfm as root, copied /var/log to somewhere, deleted the original and then created the symlink - all with emelfm

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Xorg and touchscreen
« Reply #6 on: July 02, 2010, 12:17:00 PM »
Use the -retro option to enable zapping in Xorg 7.4, or just change back to the terminal with ctrl-alt-f1 and kill X with ctrl-c.

The evtouch module isn't included, so you'll need to compile it.
The only barriers that can stop you are the ones you create yourself.

Offline asclepix

  • Newbie
  • *
  • Posts: 19
Re: Xorg and touchscreen
« Reply #7 on: July 02, 2010, 04:55:14 PM »
I'll try -retro option on Monday (until then I'm faraway from my test machine  :( )

thanks and good week end  ;)

Offline asclepix

  • Newbie
  • *
  • Posts: 19
Re: Xorg and touchscreen
« Reply #8 on: July 05, 2010, 04:30:53 AM »
Hi.

Xorg works, thanks to the -retro option.

I've tried a precompiled version of evtouch, but it says:
"module ABI major version (2) doesn't match the server's version (4)"

So, which is the best way to recompile evtouch?

I've installed compiletc and Xorg-7.4-dev, but it does'nt seem enough :-/

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Xorg and touchscreen
« Reply #9 on: July 05, 2010, 04:40:50 AM »
7.4-dev is enough. IIRC evtouch is fairly old, so you should probably apply patches from Ubuntu or other distro that ships it.
The only barriers that can stop you are the ones you create yourself.

Offline asclepix

  • Newbie
  • *
  • Posts: 19
Re: Xorg and touchscreen
« Reply #10 on: July 05, 2010, 05:29:59 AM »
Yes, it's old :-(

Is it overcome by something else?

Why the  swap_xy=1 usbtouchscreen in kernel module doesn't work? Perhapse a module with rotation and calibration would be enough  :-\

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Xorg and touchscreen
« Reply #11 on: July 05, 2010, 05:45:50 AM »
The evdev Xorg driver has invertX and invertY params. I don't think swap_xy does what you think it does, I believe it makes X coordinates go to Y axis and vice versa.
The only barriers that can stop you are the ones you create yourself.

Offline asclepix

  • Newbie
  • *
  • Posts: 19
Re: Xorg and touchscreen
« Reply #12 on: July 05, 2010, 06:38:04 AM »
Yes, it is what I need. In fact if I move my finger up and down the cursor goes right and left.

I've patched evtouch with some code find in Debian repository and now Xorg load the evtouch module, but I still have the axis rotated. I'll try again in the afternoon.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Xorg and touchscreen
« Reply #13 on: July 05, 2010, 06:48:38 AM »
OK, in that case is evtouch pointed to the usbtouchscreen device, and not a mouse one?
The only barriers that can stop you are the ones you create yourself.

Offline asclepix

  • Newbie
  • *
  • Posts: 19
Re: Xorg and touchscreen
« Reply #14 on: July 05, 2010, 09:41:43 AM »
Good job! It works  :D!!

Many thanks!

How can I launch "Xorg -retro" as default X? (I've tried to modify /etc/sysconfig/Xserver, but it does't work).


I write here my xorg.conf. I hope it can be useful for someone else.

Section "InputDevice"
    Identifier "touchscreen"
    Driver "evtouch"
    Option "Device" "/dev/input/event4"
    Option "DeviceName" "touchscreen"
    Option "MinX" "225"
    Option "MinY" "165"
    Option "MaxX" "3905"
    Option "MaxY" "3980"
    Option "ReportingMode" "Raw"
    Option "Emulate3Buttons"
    Option "Emulate3Timeout" "50"
    Option "SendCoreEvents" "On"
    Option "SwapX" "On"
    Option "Rotate" "CCW"
EndSection

Section "InputDevice"
    Identifier "dummy"
    Driver "void"
    Option "Device" "/dev/input/mice"
EndSection

Section "ServerLayout"
   Identifier "defsult layout"
   InputDevice "touchscreen" "CorePointer"
   #InputDevice "dummy"
EndSection