Revision [7213]

This is an old revision of ViewSonicTouchscreen made by ZorrUno on 2021-08-18 09:44:17.

 

Viewsonic Touchscreen PC Setup


Changes

2021-08-02 V1 - Started Documenting

Summary

Use of a Viewsonic All-in-One computer as a home automation display

Product

This was a Viewsonic all in one touchscreen computer I picked up as brand new old stock in box for NZ$60. It is 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 slow 5400rpm 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 PC
160 GB Hard Drive
1GB RAM
LCD 18.5" Touch screen

The PC as initially booted up
It came preinstalled with Windows XP... no I didn't let it near my network before a drive format.
text

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 setup

su -

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

Hmm, it states that a lot of other software is now not needed and suggests removing it... including a lot of X stuff... so I left it alone. Something around the package dependencies must be screwy as now the config changes to the xinput stick, but I'm not game to remove all the dependencies it suggests (one of them is xorg...)

Install the graphical calibrator. This helps a bit 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

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.

Running the xinput calibrator
This is what running the calibrator looks like as a GUI - note the crosshair top left (it presents 4 of them one after the other for you to tap.
text

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, shown above) 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" "6575 1764 7108 1084"
        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

Once the conf values were in place as above and with a portrait screen, the touch calibration was as close as I could get it finally.

I note also that installing xinput is useful to see all the x devices and their IDs. You can also use xinput to set device properties (although it didn't get me far)
# apt install xinput
#xinput list

(note the below IDs are different from my current setup with debian)
text

HA Display

I finally got a firefox fullscreen display running a home assistant lovelace panel that seemed responsive and accurate enough when touched. Only as a test at this stage, I still have lots of work to build a panel setup specifically for this task and mount the computer in place in the recess I have built.

Simple HA display in Lovelace with defaults
text

Wall recess ready for the PC in portrait mode
text

text

PC & Driver Notes

Wireless: i/f wlp2s0
WIred: enp1s0
Touchscreen IDEACOM IDC 6680
Memory: 1GB DDR2 SDRAM 533 MHz (expanandable to 2GB)
VPC101 manual: https://drive.google.com/file/d/1LZXu6pLFAB-R1GBMHe-k6CowvhuoXzVl/view?usp=sharing


lscpu useful information

Architecture: x86_64
Model name: Intel(R) Atom(TM) CPU 230 @ 1.60GHz
Stepping: 2
CPU MHz: 1596.095
BogoMIPS: 3192.23
L1d cache: 24K
L1i cache: 32K
L2 cache: 512K

inxi output

root@loungedisplay:~# inxi -Fx
System:    Host: loungedisplay Kernel: 4.19.0-17-amd64 x86_64 bits: 64 compiler: gcc v: 8.3.0 Console: tty 1
           Distro: Debian GNU/Linux 10 (buster)
Machine:   Type: Desktop System: ViewSonic product: VPC101 v: R1.02 serial: N/A
           Mobo: ViewSonic model: VPC101 v: 918E0100250 serial: 93800300JEB1 BIOS: ViewSonic v: R1.02 date: 08/13/2009
CPU:       Topology: Single Core model: Intel Atom 230 bits: 64 type: MT arch: Bonnell rev: 2 L2 cache: 512 KiB
           flags: lm nx pae sse sse2 sse3 ssse3 bogomips: 6384
           Speed: 1596 MHz min/max: N/A Core speeds (MHz): 1: 1596 2: 1596
Graphics:  Device-1: Intel 82945G/GZ Integrated Graphics vendor: AOPEN driver: i915 v: kernel bus ID: 00:02.0
           Display: server: X.org 1.20.4 driver: intel unloaded: fbdev,modesetting,vesa tty: 270x58
           Message: Advanced graphics data unavailable in console for root.
Audio:     Device-1: Intel NM10/ICH7 Family High Definition Audio vendor: AOPEN driver: snd_hda_intel v: kernel
           bus ID: 00:1b.0
           Sound Server: ALSA v: k4.19.0-17-amd64
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: AOPEN driver: r8169 v: kernel port: ce00
           bus ID: 01:00.0
           IF: enp1s0 state: down mac: 00:01:80:78:b2:73
           Device-2: Qualcomm Atheros AR242x / AR542x Wireless Network Adapter vendor: AzureWave AW-GE780 802.11bg
           driver: ath5k v: kernel port: ce00 bus ID: 02:00.0
           IF: wlp2s0 state: up mac: 00:25:d3:76:58:d3
Drives:    Local Storage: total: 149.05 GiB used: 3.73 GiB (2.5%)
           ID-1: /dev/sda vendor: Seagate model: ST9160310AS size: 149.05 GiB temp: 40 C
Partition: ID-1: / size: 144.77 GiB used: 3.56 GiB (2.5%) fs: ext4 dev: /dev/sda1
           ID-2: swap-1 size: 976.0 MiB used: 176.5 MiB (18.1%) fs: swap dev: /dev/sda5
Sensors:   System Temperatures: cpu: 49.0 C mobo: N/A
           Fan Speeds (RPM): N/A
Info:      Processes: 140 Uptime: 3h 00m Memory: 976.7 MiB used: 572.0 MiB (58.6%) Init: systemd runlevel: 5 Compilers:
           gcc: N/A Shell: bash v: 5.0.3 inxi: 3.0.32


Todo next

-- display setting on reboot
-- firefox kiosk, autostartup etc
-- tweak processes to maximise resources
-- hardware mounting
-- upgrade hardware internals?
-- dump wifi for ethernet
-- HA display development
-- hardware switching for changing displays?


Last edited by ZorrUno
Wed, 18 Aug 2021 09:44 UTC [diff]


CategoryHomeAutomation
CategoryMQTT
CategoryHomeAssistant
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki