Ubuntu 触摸屏驱动问题

本文档详细介绍了如何在Ubuntu系统中配置Elo触屏设备,包括使用evtouch及elographics驱动的安装与配置方法,并提供了不同Ubuntu版本的具体操作步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 
 
 

 

Xorg evdev

Evdev is the current way to set up a Elo touchscreen. See this blog post for instructions: http://who-t.blogspot.fi/2012/07/elographics-touchscreen-setup.html

 

ELO Touchscreen Driver (using evtouch)

Ubuntu includes an Xorg xserver input driver in the package xserver-xorg-input-evtouch 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 MatchProduct 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 > text
gedit 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 TouchSystems"> to match the output of lshal | grep Elo but "Elo TouchSystems" is pretty generic and should match any Elo touchscreen..

 

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="info.product" contains="Elo TouchSystems">
      <match key="info.capabilities" contains="input">
 <merge key="input.x11_driver" type="string">evtouch</merge>  <merge key="input.x11_options.minx" type="string">130</merge>  <merge key="input.x11_options.miny" type="string">197</merge>  <merge key="input.x11_options.maxx" type="string">3945</merge>  <merge key="input.x11_options.maxy" type="string">3894</merge>  <merge key="input.x11_options.swapx" type="string">1</merge>  <merge key="input.x11_options.swapy" type="string">1</merge>  </match>  </match>  </device> </deviceinfo>

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

 

        <merge key="input.x11_options.swapy" type="string">1</merge>

by:

 

        <merge key="input.x11_options.swapy" type="string">0</merge>

...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 Touchscreen
KERNEL=="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 > text
gedit 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 xserver-xorg-input-elographics 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 a bug that is triggered when axis minimum and maximum values are inverted. Until the package is updated a patched version (1.1.0-3ubuntu1) is available from my PPA.

 

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 touchcal from a non-X terminal to determine minimum and maximum values to use in xorg.conf.


CategoryXwindowSystem

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

转载于:https://www.cnblogs.com/Dennis-mi/articles/5104794.html

Ubuntu 22(jammy jellyfish)上安装和配置USB触摸屏驱动通常涉及几个步骤。Ubuntu倾向于使用开源的 tslib库来支持触摸屏功能,但也有可能内置了针对现代触摸屏的支持。以下是基本流程: 1. **检查系统支持**:首先,你可以通过运行 `xinput list-devices` 来查看是否已经检测到了USB触摸屏。如果触控设备显示出来了,那么可能是系统已经自动配置好了。 2. **安装 tslib**:如果没有自带,或者你想更新到最新版本,可以使用以下命令安装: ``` sudo apt-get update sudo apt-get install tslib xserver-xorg-input-libinput ``` 3. **重新加载X server**:安装完成后,有时需要重新启动X Server以应用新安装的驱动,可以用以下命令: ``` sudo systemctl restart lightdm (如果桌面环境是lightdm) ``` 或者 ``` sudo systemctl restart display-manager (如果使用的是KDE、GNOME等其他桌面) ``` 4. **配置触摸屏**:如果上述步骤没有解决问题,你可能需要手动创建一个xorg.conf.d文件来配置触控输入。例如,在 `/etc/X11/xorg.conf.d/` 目录下新建一个名为 `99-touchscreen.conf` 的文件,并添加以下内容: ```xml <section "InputClass"> <driver>libinput</driver> <match> <device path="your touch device path"/> </match> <option name="Device Accel Profile">none</option> <option name="Touchpad ClickMethod" value="synaptics"/> <option name="SendCoreEvents" value="true"/> </section> ``` 将`your touch device path`替换为实际的设备路径。 5. **测试触控**:最后,你可以通过运行 `xinput test-id your_device_id` 测试触控功能,其中 `your_device_id` 可以通过 `xinput list` 查找。 如果以上步骤还是不行,你可能需要查看制造商提供的特定驱动或下载第三方驱动程序,比如 Synaptics TouchPad 驱动。不过请注意,不是所有的USB触摸屏都能在Linux上完美工作,尤其是在较旧或非标准的设备上。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值