Touchscreen Notes
These are just a gathering of notes about the touchscreen configurations on the Ventana control system.
In March of 2024, the hardware configuration changed with the displays and KVMs on the Ventana control system and the calibration of the touchscreen did not seem to be holding after reboots. The root cause is that the command to map the output of the touch screen to the proper display was not happening so the touch display was using the entire desktop across both displays. There is a script /opt/greensea/ventanta/bin/calibrate_copilot_lower.sh with the following contents:
#!/bin/bash -x
touch_display="DP-0"
non_touch_display="DP-2"
touch_device="ILITEK Multi-Touch-V3000"
xinput --map-to-output "$touch_device" "$touch_display"
xrandr --output "$non_touch_display" --off
xinput --map-to-output "$touch_device" "$touch_display"
cal_file=/usr/share/X11/xorg.conf.d/99-calibration.conf
cp "$cal_file" /opt/greensea/
sudo xinput_calibrator --device "$touch_device" --output-filename "$cal_file"
xrandr --output "$non_touch_display" --auto --left-of "$touch_display"
sleep 5
xinput --map-to-output "$touch_device" "$touch_display"
echo "Done calibrating"
This script essentially gets the current display configuration and then runs the xinput_calibrator utility that comes with the X11 system by default. It then writes the calibration information to the /usr/share/X11/xorg.conf.d/99-calibration.conf file. The calibrations are actually being read correctly on reboot, but the xinput command to map the touch device to the correct display does not happen during reboot so the touch device applies across the entire desktop. It took a bit, but one way that I found to make this happen (after scouring the internet) was to create a Startup Application that will automatically run when the system starts up. So, first, I created a script /home/ventana/.config/touchscreen.sh with the following contents:
#!/bin/bash
xinput --map-to-output "ILITEK Multi-Touch-V3000" "DP-0"
Then, I made it executable by running chmod a+x /home/ventana/.config/touchscreen.sh. Then, I created a new file /home/ventana/.config/autostart/touch.desktop with the following contents:
[Desktop Entry]
Type=Application
Name=touchconf
Exec=/home/ventana/.config/touchscreen.sh
X-GNOME-Autostart-Delay=10
and saved it. Now when the system reboots, it pauses for 10 seconds (to make sure the X11 system is fully up) and then runs the touchscreen.sh script which runs the xinput command to map the touch input device to only the right-hand screen.