A13 + LCD7-TS + Debian + Xorg difficulties

Started by spctr, November 29, 2012, 09:28:31 pm

Previous topic - Next topic

Stephane80


lukas


Stephane80

No, sorry, I have another problem :-(
fist time i have
QuoteNo raw modules loaded.

with "ts_test"
I have uncommented the first line in ts.conf
but when I do "sudo ts_test" or "sudo ts_calibrate"
that do nothing :-(
Quoteolinuxino@debian:~$ sudo ts_calibrate
olinuxino@debian:~$



Stephane80

January 12, 2013, 09:08:26 pm #18 Last Edit: January 12, 2013, 10:10:01 pm by Aqua-Passion
Ok get ts_calibrate and ts-test working

Stephane80

January 12, 2013, 11:05:12 pm #19 Last Edit: January 12, 2013, 11:14:46 pm by Aqua-Passion
for
"patch -p1 < ../1-xf86tslib-sigfault.patch" and "patch -p1 < ../xf86-input-tslib-port-ABI-12-r48.patch"
i get
QuoteReversed (or previously applied) patch detected!  Assume -R? [n]

and
QuoteApply anyway? [n]


what should I do?


Stephane80

ok thank you
and for
"./configure -prefix=/usr"
in http://olimex.wordpress.com/2012/12/19/a13-lcd7ts-support-in-linux/#comment-4089
it's "./configure -prefix=/your/x11/lib/dir/"

on linaro I have "/usr/share/X11/"

I have to put "./configure -prefix=/usr" or "./configure -prefix=/usr/share" or "./configure -prefix=/usr/share/X11" ?
I can not make it work :-(

And when I type "su" and after "ts_calibrate" , calibrate work good
but if I type "ts_calibrate" or "sudo ts_calibrate" in user linaro it don't work
this is normal or there is a problem?
Thank you for your help

giorgio323

Hallo,

I am at point where the variables are exported. So far all is fine. After that I run ts_calibrate. I see the cross point moving fastly in the screen and after a secons the program ends. The messages are:
xres = 800, yres = 480
tslib: Selected device is not a touchscreen (must support BTN_TOUCH events)
took 4 samples ...
...
..
...

Could help me to understand and fix the problem?

Thank you in advance
Giorgio

p.kartavyy

Hello

I am trying to make working A13 + LCD7-TS. I use linaro image from wiki https://www.olimex.com/wiki/Prebuilt_SD_card_images_running_debian
Debian images won't work for me. I tried R15 and R12 but they don't boot, unfortunately.

I use manual from http://olimex.wordpress.com/2012/12/19/a13-lcd7ts-support-in-linux/. Big thanks for it.

ts_test and ts_calibrate works perfectly. But i have some problem with x11.
First i have the problem for tslib -  "No input driver specified, ignoring this device". Then I changed rules in /usr/share/X11/xorg.conf.d/ and this error disapeared.

Now there is "ts_config failed" error in Xorg.log. And I can't find any log information for tslib.
I also tried packages libts-0.0-0, xserver-xorg-input-tslib. They have no errors in Xorg.log but touch doesn't work in X11 anyway.

Thanks in advance for any help.


#/var/log/Xorg.o.log
  7197.911] (II) config/udev: Adding input device sun4i-ts (/dev/input/event3)
[  7197.911] (**) sun4i-ts: Applying InputClass "sun4i touchscreen"
[  7197.911] (II) LoadModule: "tslib"
[  7197.913] (II) Loading /usr/lib/xorg/modules/input/tslib_drv.so
[  7197.914] (II) Module tslib: vendor="X.Org Foundation"
[  7197.914]    compiled for 1.11.3, module version = 0.0.1
[  7197.914]    Module class: X.Org XInput Driver
[  7197.914]    ABI class: X.Org XInput driver, version 16.0
[  7197.914] (II) Using input driver 'tslib' for 'sun4i-ts'
[  7197.914] (II) Loading /usr/lib/xorg/modules/input/tslib_drv.so
[  7197.915] (**) Option "SendCoreEvents" "yes"
[  7197.915] (**) sun4i-ts: always reports core events
[  7197.915] (**) sun4i-ts: always reports core events
[  7197.915] (**) Option "ScreenNumber" "0"
[  7197.915] (**) Option "Width" "800"
[  7197.915] (**) Option "Height" "480"
[  7197.915] (**) Option "Rotate" "NONE"
[  7197.918] ts_config failed                                  <------ error is here
[  7197.918] (II) UnloadModule: "tslib"
  7197.918] (II) Unloading tslib
[  7197.918] (EE) PreInit returned 2 for ""
[  7197.918] xf86TslibUninit
[  7197.918] xf86TslibControlProc
[  7197.918]
Backtrace:
[  7197.918] Segmentation fault at address (nil)            <------ error is here
[  7197.919]
Caught signal 11 (Segmentation fault). Server aborting
[  7197.919]
Please consult the The X.Org Foundation support
         at http://wiki.x.org
for help.
[  7197.919] Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  7197.919]
[  7197.925]  ddxSigGiveUp: Closing log
[  7197.925] Server terminated with error (1). Closing log file.


#/root/.bashrc
# exports for tslib - touch screen lib
export TSLIB_TSEVENTTYPE=raw
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event3
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/local/lib/ts



#/usr/share/X11/xorg.conf.d/12-ts.conf

Section "InputClass"
Identifier "sun4i touchscreen"
Option "Device" "/dev/input/event3"
MatchProduct "sun4i-ts"
Driver "tslib"
Option "ScreenNumber" "0"
Option "Rotate" "NONE"
Option "Width" "800"
Option "Height" "480"
Option "SendCoreEvents" "yes"
EndSection




cat /etc/ts.conf
# Uncomment if you wish to use the linux input layer event interface
module_raw input

# Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d
# module_raw collie

# Uncomment if you're using a Sharp Zaurus SL-C700/C750/C760/C860
# module_raw corgi

# Uncomment if you're using a device with a UCB1200/1300/1400 TS interface
# module_raw ucb1x00

# Uncomment if you're using an HP iPaq h3600 or similar
# module_raw h3600

# Uncomment if you're using a Hitachi Webpad
# module_raw mk712

# Uncomment if you're using an IBM Arctic II
# module_raw arctic2

module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear


p.kartavyy

I used strace -ewrite -f -p "$( start lightdm | grep -o -e "[0-9]\{4\}" ) " to get error messages from tslib.
The problem was that tslib is configured by default with config file at /usr/local/etc/ts.conf. And tslib when loaded by Xserver ignores env variables.

So ts.conf should be placed at /usr/local/etc/ts.conf and env variables should be like following.

#/root/.bashrc
# exports for tslib - touch screen lib
export TSLIB_TSEVENTTYPE=raw
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event3
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/usr/local/etc/ts.conf                   <--- here is a bug fix
export TSLIB_PLUGINDIR=/usr/local/lib/ts


Now X starts normally but it is terminated when I touches the screen.

p.kartavyy

The problem why X cannot start was in xf86XInputSetScreen call.
As I understand my version of x-server doesn't support this call( Version: 2:1.11.4-0ubuntu10 ). Thus I commented line in tslib.c and it booted. It looks like a hack, may be more old version of x-server will work without this hack.

/** FixMe: xf86XInputSetScreen(local, priv->screen_num,                                                                             
                                        samp.x,                                                                                                             
                                        samp.y); */   


The last problem is that when I touch the screen cursor moves to the right-bottom corner. It doesn't depends of a place which i touch.

p.kartavyy

Cool finally it works!

As a resume:
1.Check that your environment variables agreed with defines for which tslib is build.
It's can be easily done like "grep -r pointercall ." in tslib build directory.
In linaro image variant which works for me is the following.

#/root/.bashrc
# exports for tslib - touch screen lib
export TSLIB_TSEVENTTYPE=raw
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event3    <-- this depends on how device is recognized.
export TSLIB_CALIBFILE=/usr/local/etc/pointercal
export TSLIB_CONFFILE=/usr/local/etc/ts.conf                   
export TSLIB_PLUGINDIR=/usr/local/lib/ts


2. If x-server fails when you touch the screen than comment the following lines in xf86-input-tslib/src/tslib.c

/** FixMe: xf86XInputSetScreen(local, priv->screen_num,                                                                             
                                        samp.x,                                                                                                             
                                        samp.y); */


3. If you have problems compile tslib in debug. Output information can be found at /var/log/Xorg.*.log

Enjoy!

lukas

My LCD7-TS works but I have 2 problems with tslib:

Are you experiencing same issues?

mihu

March 18, 2013, 12:24:54 am #28 Last Edit: March 18, 2013, 12:40:00 pm by mihu
Quote from: lukas on February 23, 2013, 03:29:20 pm

after Xserver starts my USB keyboard stops working


I had the same problem. It works after I added this section at the *end* of 10-evdev.conf and removed any other reference to touchscreens. Change eventX as required.

Section "InputClass"
Identifier "Sun4iTouchscreen"
MatchDevicePath "/dev/input/eventX"
Driver "tslib"
Option "Device" "/dev/input/eventX"
Option "ScreenNumber" "0"
Option "Rotate" "NONE"
Option "Width" "1024"
Option "Height" "600"
Option "SendCoreEvents" "yes"
Option "Type" "touchscreen"
EndSection

Duovarious

I currently have no way to connect my board to the internet, so I'm not sure how to even get past step one of the proposed solution, since I can't git.
Is there an alternative method that only depends on stuff I can bring over on the sd card? Or do I need to buy the ethernet adapter just to get the touchscreen working?
Will there ever be an image for this board that supports the touchscreen out of the box?
Is there any way for me to just duplicate the data from an sd card of someone who has already gotten this all set up?