- Linux touch screen drivers
- Touchscreen
- Introduction
- Available X11 drivers
- Two-fingers scrolling
- evdev drivers
- Calibration
- Using a touchscreen in a multi-head setup
- Using xrandr-watch-git to automate map-to-output
- Wayland/Weston
- Touchegg
- A Simple Industrial Touch Screen Driver for Ubuntu Linux
- 2 Responses to “A Simple Industrial Touch Screen Driver for Ubuntu Linux”
- Leave a Reply
- Categories
Linux touch screen drivers
The Linux public driver supports most of the Linux distribution, including Ubuntu, Debian, SuSE(openSuSE), Fedora Core, Mandriva, Slackware and so on. Please download the drivers according to your kernel version.
Kernel | X86 / X-window | ARM / MIPS | Multi-touch | |
32 bits | 64 bits | |||
3.x.x / 4.x.x / 5.x.x | ||||
2.6.36 or Later | ||||
2.6.24 ~ 2.6.35 | ||||
2.6.23 ~ Older | ||||
2.4.x |
Kernel 2.6.24 or Later and 3.x.x / 4.x.x / 5.x.x : USB / UART / PS2
1. Available for multi-touch where the kernel version is 2.6.36 or Later.
If the kernel version is 2.6.35 or Older, it could only support single point.
2. Available for non-Xwindow system.
3. Support Multi-controller & Multi- monitor.
4. Support Right-Click
Kernel 2.6.23 or Older : USB / UART / PS2
> eGalaxTouch_3.07.6014-32b X86 32 bits ( Need X-window ) 2012.02.08
> eGalaxTouch_3.07.6014-64b X86 64 bits ( Need X-window ) 2012.02.08
1. X-window is needed.
2. Only support single mouse point.
3. Support Multi-controller & Multi-monitor.
4. Support Right-Click
Kernel 2.4.X : USB / UART / PS2
> eGalaxTouch_3.06.5605-32b X86 32 bits ( Need X-window ) 2011.08.10
1. X-window is needed.
2. Only support single mouse point.
3. Support Multi-controller & Multi-monitor.
4. Support Right-Click
Customization Touch Driver for SUSE Linux Enterprise Desktop 11 SP3
* Important: This customized touch driver is for specific All-in-One POS systems only.
Only support single mouse point.
Copyright © EETI 2000.20232 eGalax_eMPIA Technology Inc. Privacy Policy | © Website picture is for reference only. Please feel free to contact us for more information. touch_sales@eeti.com touch_fae@eeti.com | 11F., No.302, Rueiguang Rd., Neihu District, Taipei City 11492, Taiwan T: +886 2 8751 5191 F: +886 2 2797 8808 |
Touchscreen
If you ever tried to set up a touchscreen device in linux, you might have noticed that it is either working out of the box (besides some calibration) or is very tedious, especially when it is not supported by the kernel.
Introduction
This article assumes that your touchscreen device is supported by the kernel (e.g. by the usbtouchscreen module). That means there exists a /dev/input/event* node for your device. Check out
to see if your device is listed or try
# cat /dev/input/event? # replace ? with the event numbers
for every of your event nodes while touching the display. If you found the corresponding node, it is likely that you will be able to get the device working.
Available X11 drivers
There are a lot of touchscreen input drivers for X11 out there. The most common ones are in the extra repository:
- xf86-input-evdev (likely the default driver if you plug in your touchscreen and it «just works»)
- xf86-input-libinput ; see also libinput
- xf86-input-elographics
Less common drivers, not contained in the repository, are:
- xf86-input-magictouch
- xf86-input-mutouch
- xf86-input-plpevtch
- xf86-input-palmax
Proprietary drivers exist for some devices (e.g.: xf86-input-egalax AUR ), but it is recommended to try the open source drivers first.
Depending on your touchscreen device choose an appropriate driver. Again, evdev is likely to be the default if your touchscreen «just works.»
Two-fingers scrolling
The two-fingers scrolling has to be implemented on the application side (see this link). For Firefox, see Firefox/Tweaks#Enable touchscreen gestures.
There is a hack to emulates this scrolling behavior for every application in #Touchegg, but the X server still handles it as text selection (at least with Plasma).
evdev drivers
Calibration
Install xinput_calibrator AUR (AUR). Then, run xinput_calibrator and follow the instructions.
Using a touchscreen in a multi-head setup
To use multiple displays (some of which are touchscreens), you need to tell Xorg the mapping between the touch surface and the screen. This can be achieved with xinput as follows.
Take for example the setup of having a wacom tablet and an external monitor; xrandr shows both displays:
Screen 0: minimum 320 x 200, current 2944 x 1080, maximum 8192 x 8192 LVDS1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm 1024x768 60.0*+ 800x600 60.3 56.2 640x480 59.9 VGA1 connected 1920x1080+1024+0 (normal left inverted right x axis y axis) 477mm x 268mm 1920x1080 60.0*+ 1600x1200 60.0 1680x1050 60.0 1680x945 60.0
You see we have two displays here. LVDS1 and VGA1. LVDS1 is the display internal to the tablet, and VGA1 is the external monitor. We wish to map our stylus input to LVDS1. So we have to find the ID of the stylus input:
⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ QUANTA OpticalTouchScreen id=9 [slave pointer (2)] ⎜ ↳ TPPS/2 IBM TrackPoint id=11 [slave pointer (2)] ⎜ ↳ Serial Wacom Tablet WACf004 stylus id=13 [slave pointer (2)] ⎜ ↳ Serial Wacom Tablet WACf004 eraser id=14 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Video Bus id=7 [slave keyboard (3)] ↳ Sleep Button id=8 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=10 [slave keyboard (3)] ↳ ThinkPad Extra Buttons id=12 [slave keyboard (3)]
We see that we have two stylus inputs. We now need to simply map our inputs to our output like so:
$ xinput --map-to-output 'Serial Wacom Tablet WACf004 stylus' LVDS1 $ xinput --map-to-output 'Serial Wacom Tablet WACf004 eraser' LVDS1
You can automate this by putting these commands in your ~/.xinitrc or similar. The mapping will be lost if the touchscreen is disconnected and re-connected, for example, when switching monitors via a KVM. In that case it is better to use a udev rule. The Calibrating Touchscreen page has an example udev rule for the case when a transformation matrix has been calculated manually and needs to be applied automatically.
Using xrandr-watch-git to automate map-to-output
There are xrandr events we can capture from a script. Install xrandr-watch-git AUR , create a script ~/.xrandr-changed with execution permission to perform map-to-output, for example:
#!/bin/sh xinput --map-to-output "Wacom HID 4861 Finger touch" "eDP1"
and start, test and enable the systemd/User service xrandr-watcher.service .
Wayland/Weston
Wayland does not currently have a known method to lock touching to a specific display in any environment other than sway (or wlroots-based supported compositors). There are tools such as weston-touch-calibrator, but Gnome Wayland uses Xwayland leaving the calibrator unable to locate any touchscreen.
Wayland/Xwayland also masks the xinput list and funnels them down to generic xwayland devices such as «xwayland-pointer»,»xwayland-relative-pointer»,»xwayland-touch-pointer», etc. The Wayland method of «Xinput» is «Libinput», but does not have all the same functionality. The current known method to use touchscreens in a multi-head setup is to force Gnome or KDE to use X11. libinput currently assumes the touchscreen(s) covers all available monitors.
Touchegg
Touchegg is a multitouch gesture program, only compatible with X, that runs as a user in the background, recognizes gestures, and translates them to more conventional events such as mouse wheel movements, so that you can for example use two fingers to scroll. But it also interferes with applications or window managers which already do their own gesture recognition. If you have both a touchpad and a touchscreen, and if the touchpad driver (such as synaptics or libinput) has been configured not to recognize gestures itself, but to pass through the multi-touch events, then Touchegg will recognize gestures on both: this cannot be configured. In fact it does a better job of recognizing gestures than either the synaptics or libinput touchpad drivers; but on the touchscreen, it is generally better for applications to respond to touch in their own unique ways. Some Qt and GTK applications do that, but they will not be able to if you have Touchegg «eating» the touch events. So, Touchegg is useful when you are running mainly legacy applications which do not make their own use of touch events.
The two-fingers scrolling has been disabled in the recent rewrite of touchegg 2.0. To enable it, install xdotool and see this closed issue.
A Simple Industrial Touch Screen Driver for Ubuntu Linux
More and more often, our industrial touch screen customers are taking advantage of the open source Linux operating system, Ubuntu. Ubuntu has evolved into a versatile, easy-to-configure environment with a large community following and massive support from the company Canonical. We have seen a steady increase in calls from customers leveraging Linux in industrial environments, and in recent years Ubuntu has been leading the charge. In addition to the standard Elo-provided Linux driver, Ubuntu users now have a very simple touch screen driver solution that requires no new software.
Update Jan. 2018 – for a more recent overview of Hope Industrial Touch Screen compatibility with Linux operating systems, see this post.
The easiest connection interface for using your touch screen with Ubuntu is via USB. You will notice that when most Hope Industrial Systems touch screens are connected to an Ubuntu 12.04 system, it will immediately respond to touch albeit with an inverted Y axis. The standard Ubuntu desktop installation is actually prepackaged with the “Xorg touchscreen driver,” which uses the Xinput protocol. This is what enables our touch screens to work with Ubuntu right out of the box. The only trick is to calibrate the screen to correct the cursor inversion and precisely align the cursor to your finger.
If you open the Ubuntu Software Center and do a search for “calibrate touchscreen,” the first result you will see will be a software package by the same name. The actual name for the program is Xinput_Calibrator and alternatively is supported on several other flavors of Linux. More information can be find on its webpage. Just install the package by clicking “Install.” Once complete, it should create an icon on your launcher. After the installation is complete, initiate the calibration by clicking the icon in your launcher or do a search for “calibrate touchscreen” from the Ubuntu dash search bar.
It’s important to note the message that pops up after the calibration is complete. In order to retain the calibration settings after you shutdown or reboot, you will need to create a configuration file with these settings. First, note that the “MatchProduct” is recognized as an Elo device. If not, disconnect and reconnect your touch screen and try calibrating again. Next, copy the required settings by highlighting everything from the beginning of “Section ‘InputClass’” to the end of “EndSection,” right click on the highlighted text and select COPY. Next, you’ll need to first create the directory referenced by Xinput_calibrator for the configuration file location, then open the configuration file for editing. This can easily be done by running the following two commands:
sudo mkdir /etc/X11/xorg.conf.d sudo gedit /etc/X11/xorg.conf.d/99-calibration.conf
Once the editor is open, paste your configuration, save the file, then close it, and that’s it! If you’d like to implement a “right click on hold” feature just like the Windows feature, then add this line of code above “EndSection”:
Option "EmulateThirdButton" "On"
We’ve found this to be a great, fast way to get your touch screen up and running on Ubuntu 12.04 LTS and 14.04 LTS. Our research found it can even work on some old versions of Ubuntu, and according to the Xinput_calibrator website it can work with a number of Linux distributions.
2 Responses to “A Simple Industrial Touch Screen Driver for Ubuntu Linux”
How should I define 99-calibration.conf. Can you give step-by-step instruction on how to enable touchscreen on ubuntu?
Hi Lan,
The approach you need to take is based on your version of Ubuntu. Detailed installation instructions can be found here: https://assets.ctfassets.net/of6pv6scuh5x/3lnwe66gYzHxQDpguOaxt9/f1e54094390673f542195cea9b145281/Elo-Linux-ST-USB-Driver_Read_Me-v5.1.txt I would recommend using the following Elo driver, which is also listed on our Touch Screen Drivers page in our Support section:
https://assets.ctfassets.net/of6pv6scuh5x/2iZOZUJHBw0hNGCxMg8soh/76cabfd2309fbadf0b68e17dbeb9cde9/SW602650_Elo_Linux_ST_USB_Driver_v5.1.0_x86_64.tar As always, if you need additional assistance, please contact our Support team. Thanks,
Maggie