博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Ubuntu 触摸屏驱动问题
阅读量:6470 次
发布时间:2019-06-23

本文共 7875 字,大约阅读时间需要 26 分钟。

 
 
 


 

Xorg evdev

Evdev is the current way to set up a Elo touchscreen. See this blog post for instructions:

 

ELO Touchscreen Driver (using evtouch)

Ubuntu includes an Xorg xserver input driver in the package for Dapper, Feisty, Gutsy, Hardy, Intrepid, Jaunty, Karmic, & Maverick (for x86 and x86_64). This will work with many of the ELO touch-screen drivers, both serial and USB. evtouch seems to work much better than elographics for jaunty, karmic, & Maverick

*** EVTOUCH DRIVER HAS BEEN REMOVED FROM UBUNTU STARTING AT VERSION 11.04 ***

 

Install Driver

 

sudo apt-get install xserver-xorg-input-evtouch

 

 

Configuration

 

Ubuntu 10.04 and 10.10

Do NOT edit /etc/X11/xorg.conf. All touchscreen configuration should be done by changing the appropriate .conf file in /usr/[lib/share]/X11/xorg.conf.d/. In 10.10 they changed the location of the .conf files from /usr/lib... to /usr/share...

Check your device info:

lshal | grep Elo

Mine looks like this:

info.vendor = 'Elo TouchSystems'  (string)  usb_device.vendor = 'Elo TouchSystems'  (string)  usb.vendor = 'Elo TouchSystems'  (string)  info.product = 'EloTouchSystems,Inc Elo TouchSystems 2216 AccuTouch® USB Touchmonitor Interface'  (string)  input.product = 'EloTouchSystems,Inc Elo TouchSystems 2216 AccuTouch® USB  Touchmonitor Interface'  (string)

Create a configuration file to match your device:

Ubuntu 10.10:

 

sudo nano /usr/share/X11/xorg.conf.d/69-evtouch.conf

 

Ubuntu 10.04:

 

sudo nano /usr/lib/X11/xorg.conf.d/69-evtouch.conf

My Elo 2216 configuration looks like this:

Section "InputClass"        Identifier "Elo class"        MatchProduct "Elo TouchSystems"        MatchDevicePath "/dev/input/event*"        Driver          "evtouch" Option "minX" "530" Option "minY" "570" Option "maxX" "3500" Option "maxY" "3500" Option "swapY" "1" EndSection

You will need to adjust the screen calibration numbers (min|max)...I just played with them until it worked. As you can see, I needed the swap Y axis enabled. The should be something contained in the info.product section of the lshal output shown above. I believe the devicepath is rather generic, but if it doesn't work, search for input.device in this:

sudo lshal > textgedit text

Good luck! - JM

 

Ubuntu 9.10 and earlier

Do NOT edit /etc/X11/xorg.conf. All touchscreen configuration should be done by changing the appropriate fdi file in /usr/share/hal/fdi/policy/20thirdparty/ or creating your own.

Note: It is possible to use xorg.conf but it's redundant and I had a lot of freezing issues (e.g. X would freeze every 10 minutes) until I used this method.

If you have a 2700, then you can just edit 50-elo-2700.fdi

Note: in version 0.8.8 the file 50-elo-2700.fdi has an extra </deviceinfo> at the end which you must delete or it won't work..

Otherwise run the following command to get information about your touchscreen:

lshal | grep Elo

To create a new fdi, run:

 

sudo nano /usr/share/hal/fdi/policy/20thirdparty/50-elo.fdi

Then add the following lines. You can change the line <match key="info.product" contains="Elo "> to match the output of lshal | grep Elo but "Elo " is pretty generic and should match any Elo touchscreen..

 

evtouch
130
197
3945
3894
1
1

Note (on March 27th, 2010): In my case (ELO 2500u), the Y coordinates of my clicks were inverted. To fix that, replace:

 

1

by:

 

0

...End of note

The last thing you have to do is create udev rules so the the touchscreen can correctly send events.

Create the file /etc/udev/rules.d/69-touchscreen.rules and add the following lines:

 

# Elo TouchscreenKERNEL=="event*", SUBSYSTEM=="input", ATTRS{idVendor}=="04e7", ATTRS{idProduct}=="0020", SYMLINK+="input/evtouch_event"

That's it! You'll probably have to modify the values for minx, maxx, miny, maxy to adjust calibration. If the calibration is inverted then change swapx or swapy to 0. You'll have to log out and log back in for the changes to take effect. Or maybe restart or maybe unplug the usb cable and plug it back in..

You might be able to run the calibration utility from System -> Preferences -> Calibrate Touchscreen but I haven't had any luck..

Note: (on March 27th, 2010): If when calibrating you get the error message: "No evtouch capable touchscreen found." It may mean that the vendor id --above is 04e7-- or the product id --above is 0020-- are incorrect. To get the correct values do the following:

 

sudo lshal > textgedit text

Now on the text editor look for the string "ELO Touch". The editor will bring you to the section where you can get the correct product id and vendor id. To give you an idea, I have an ELO 2500U and the text looks like the following in my machine, where my value for vendor id is 0x4e7 and product id is 0x7: (only the most relevant lines appear next)

 

udi = '/org/freedesktop/Hal/devices/usb_device_4e7_7_07G59809'  usb_device.product = '2500U IntelliTouch® Touchmonitor Interface'  (string)  usb_device.product_id = 7  (0x7)  (int)  usb_device.serial = '07G59809'  (string)  usb_device.speed = 12.0 (12) (double) usb_device.vendor = 'Elo TouchSystems' (string) usb_device.vendor_id = 1255 (0x4e7) (int) usb_device.version = 1.1 (1.1) (double)

...End of Note

 

ELO Touchscreen Driver (using elographics)

Ubuntu includes an Xorg xserver input driver in the package for Dapper, Feisty, Gutsy, Hardy, Intrepid and Jaunty (for x86 and x86_64). This will work with many of the ELO touch-screen drivers, both serial and USB.

  • E271-2210 and E271-2200 devices are supported. E281-2310 and compatible devices are supported with some features unavailable.

 

Installation

 

sudo apt-get install xserver-xorg-input-elographics

Note: Version 1.1.0-3 has . Until the package is updated a patched version (1.1.0-3ubuntu1) is .

 

Configuration

Edit /etc/X11/xorg.conf and add a new InputDevice section similar to this one. This example comes from a screen test on a laptop that is configured so the external graphics device is on X screen 1 (note the screenNo option) rather than the default screen 0.

 

Section "InputDevice"        Identifier "ELO Touchscreen"        Driver     "elographics"        Option     "Device"     "/dev/ttyUSB0"        Option     "AlwaysCore" Option "screenNo" "1" Option "MinX" "4100" Option "MaxX" "0" Option "MinY" "0" Option "MaxY" "4100" Option "UntouchDelay" "5" Option "ReportDelay" "1" EndSection

Note: edit the Device value (/dev/ttyUSB0) to match the input device name the touch-screen input has. In this case, the device is a serial touch-screen connected via a serial-to-USB converter.

  • You may have to invert the minimum and maximum X- and Y-scale values if the input values from the touch-screen are inverted. Use `man elographics" to see all the options and defaults.

Add the input device to the ServerLayout section so it looks similar to this:

Section "ServerLayout"    Identifier     "Default Layout"    Screen      0  "Screen0" 0 768    Screen      1  "Screen1" Above "Screen0"    InputDevice    "Synaptics Touchpad" InputDevice "ELO Touchscreen" EndSection

Save the file and log-out to restart the X server.

 

Calibration

Manual calibration is required. It is a case of repeatedly changing the minimum and maximum X and Y axis values in xorg.conf, restarting and testing. An alternative is to build and then run from a non-X terminal to determine minimum and maximum values to use in xorg.conf.


EloTouchScreen (2012-09-28 14:05:15由编辑)

转载地址:http://ckcko.baihongyu.com/

你可能感兴趣的文章
U-BOOT之一:BootLoader 的概念与功能
查看>>
我的路上
查看>>
Velocity处理多余空白和多余空白行问题
查看>>
java值传递
查看>>
DB2与oracle有什么区别
查看>>
创建一个多级文件目录
查看>>
Picasa生成图片幻灯片页面图文教程
查看>>
js获取当前时间的前一天/后一天
查看>>
Python字符串的格式化
查看>>
C#反射---属性
查看>>
服务器常用的状态码及其对应的含义如下
查看>>
zoom和transform:scale的区别
查看>>
幸福框架:可扩展的、动态的、万能的 编号生成器
查看>>
黄聪:PHP 防护XSS,SQL,代码执行,文件包含等多种高危漏洞
查看>>
svn status 显示 ~xx
查看>>
常用HiveQL总结
查看>>
[转]使用Visual Studio Code开发Asp.Net Core WebApi学习笔记(三)-- Logger
查看>>
POJ 3311 Hie with the Pie(状压DP + Floyd)
查看>>
HDU 1402 A * B Problem Plus FFT
查看>>
Security updates and resources
查看>>