Revision [7127]
This is an old revision of ViewSonicTouchscreen made by ZorrUno on 2021-08-02 10:33:00.
Viewsonic Touchscreen PC Setup
Product
This was a Viewsonic all in one touchscreen computer I picked up as brand new old stock in box for NZ$60. It was not particularly quick, and RAM is low, but with a sensible distro it should be fine to run a browser display in kiosk mode (for a home automation display). At some stage I'll open it up to see if the RAM is upgradable and replace the 160GB drive with an SSD. PXE booting, or a thin/thick client setup might also be a useful method in future.Hardware
VPC101 All-in-one PC160 GB Hard Drive
1GB RAM
LCD 18.5" Touch screen
It came preinstalled with Windows XP...
Operating System
After trials of a few minimal browser only type OSs, and a full Ubuntu install, I settled on pure Debian Buster, with the LXDE desktop manager. Gnome was a bit slow with the small amount of RAM, and I couldn't find a smaller setup that had the drivers in for the touchscreen. I could likely remove the desktop manager later and just run the browser via Xorg.Getting the touch screen working and calibrated
The touch screen showed life, but was well outside sensible calibration parameters. Running a finger on it tracked a tiny square on the top left of the monitor. Using some hints I found when googling gave some help, but it was a long trial of setting parameters then restarting the display manager to get an accurate setupsu -
The drivers seem to be related to evdev (from what I looked at on google) so I found this:
# apt install xserver-xorg-input-evdev
Still no joy, but google says remove this library
# apt remove xserver-xorg-input-libinput
I will state that a lot of other software is now not needed and suggest you remove it... including a lot of X stuff... so I left it alone.
Install the graphical calibrator. This helps with the setup (but didn't give me anything close to the final answer)
# apt install xinput-calibrator
Change back to the normal user (so X can be accessed). Run the calibrator with --list just to show the devices. Note the binary has an underscore (but install package a hyphen)
$ xinput-calibrator --list
This responds with:
Device "IDEACOM IDC 6680 Touchscreen" id=10
Device "IDEACOM IDC 6680 Mouse" id=12
Device "IDEACOM IDC 6680" id=12
Device "IDEACOM IDC 6680 Mouse" id=12
Device "IDEACOM IDC 6680" id=12
Note there are 2 spaces before IDC. This is important when putting in the calibration config next.
As root again, install arandr which is a convenient gui (for xrandr) for setting up the screen display. I wanted my display to be portrait mode, so this is a convenient way to rotate the display 90 degrees (to the right in my case)
# apt install arandr
Run it and use the GUI to rotate the screen as needed. Note my calibration works correctly for the rotated portrait screen, touches are 90 degrees out if in landscape.
Now create the calibration setup in the xorg configuration. Note the name is fairly arbitrary, with the 99 the order of conf file use for systemctrl.
# nano /usr/share/X11/xorg.conf.d/99-calibration.conf
This is the config file I used. The values were mostly by trial and error and multiple iterations. You can however run xinput-calibrator (as a GUI) and that can get you closer. It allows you to touch the screen and will give you some config values back. Google wasn't too much help and xinput-calibrator also seems to return a setup that has different variable names from a working config.
Using the GUI helped me more with direction and orientation, but it certainly didn't give the correct numbers. Interestingly the crosshairs on the screen could be clicked with the mouse OR a finger to get closer the location values with each step. SwapAxes should be the setting to change from Portrait to Landscape mode.
The value "Identifier" should be arbitrary I think, and "MatchProduct" should exactly match the name of the device (remember that 2nd space noted above...). Yes there are 3 devices listed (Mouse and Touchscreen also) but the device 12 seemed to be the one that worked, ie "IDEACOM IDC 6680"
Section "InputClass"
Identifier "Calibration"
MatchProduct "IDEACOM IDC 6680"
Option "Calibration" "26109 6845 28313 4356"
Option "SwapAxes" "0"
Option "InvertX" "0"
Option "InvertY" "0"
EndSection
Identifier "Calibration"
MatchProduct "IDEACOM IDC 6680"
Option "Calibration" "26109 6845 28313 4356"
Option "SwapAxes" "0"
Option "InvertX" "0"
Option "InvertY" "0"
EndSection
When trialing the setup, I needed to restart the display manager to check it (many, many times...)
# systemctl restart display-manager
Hardware Driver Notes
Wireless: i/f wlp2s0WIred: enp1s0
Touchscreen IDEACOM IDC 6680