Touchscreen install and setup in Ubuntu and Debian

More
25 Aug 2022 08:22 #250386 by CNC_Tux
Dear Community,
Touchscreens in Ubuntu and Debian is sometimes a feckin matter.
I will describe a solution on my example with a Panel PC with a PenMount 9000 serial Touchscreen.
Its tested in Ubuntu 12.04.5 32Bit and Debian Buster 10.10 Preemt Kernel 64Bit ( LinuxCNC ISO )
My first was to try the original driver package from PenMount, but doesnt works.

My Solution it works on linux packages "inputattach", "xinput-calibrator" and the driver "evdev"

- open a shell
"sudo apt-get install inputattach"
"sudo apt-get install xinput-calibrator"
"sudo apt-get install xserver-xorg-input-evdev"
Now, you have to know, on what kind of serial port is working your Touchscreen.
Touch with your finger at the Touchscreen, you can check data "sudo cat /proc/tty/driver/serial"
If you find nothing is maybe the Touchscreen on a other serial port.
After installing the OS you find 4 serial ports in /dev/ttyS0 to /dev/ttyS3
in my sample is the Touchscreen on /dev/ttyS5
We have to build in the OS 2 serial ports more
- open a shell
"sudo thuna" or in Ubuntu "sudo nautilus" to start a file manager with "sudo" rights
Change a line in /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet 8250.nr_uarts=6"
and save
in the shell "sudo update-grub"
after reboot the OS
After rebooting you will find /dev/ttyS0 until /dev/ttyS5
To get the Touchscreen the right driver we have to change one line in :
/usr/share/X11/xorg.conf.d/40-libinput.conf

Look at the "Touchscreen" Section
enter this line
driver "evdev"
and save
reboot your OS
After rebooting check the touchscreen
-open a shell
"sudo inputattach --deamon --always -pm9k /dev/ttyS5"
now should be working the touchscreen, please execute xinput-calibrator for calibrate the Touchscreen.

The last step is, after rebooting the touchscreen should be working automatically.
We need in /etc/ a "rc.local"
It isnt in "/etc/ ,then we build one with an Editor

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
inputattach --daemon --always -pm9k /dev/ttyS5
exit 0
Save and dont forget to give the "rc.local" the rights to execute
After a reboot will workring the touchscreen automatically.

*-pm9k is for a PenMount 9000 Touchscreen if you have others, please check on a shell with "inputattach --help"
you get a list of driver modes.

Cheers
Reinhard
The following user(s) said Thank You: Skippy1, tommylight

Please Log in or Create an account to join the conversation.

More
26 Aug 2022 02:09 #250484 by JohnnyCNC
I bought a ASUS VT229 and it was Plug-N-Play with Mint 19.3. It worked just as well under Debian 10

Please Log in or Create an account to join the conversation.

Time to create page: 0.104 seconds
Powered by Kunena Forum