I've been trying to get a touch screen monitor working in Xubuntu for the past few weeks. The device is a Planar PX2230MW. I have written a bash script that allows me to enable the monitor, enable touch screen input, and mirror the primary display to the TS monitor. However, this only seems to work in landscape orientation.
Below is my current script:
Code:
#!/bin/bash
REGULAR_MONITOR=VGA-1
TOUCHSCREEN_MONITOR=DVI-I-1
# Load the touchscreen module
modprobe hid-multitouch
echo 3 0408 3001 104 > /sys/module/hid_multitouch/drivers/hid\:hid-multitouch/new_id
# Enable the touchscreen display
xrandr --output $TOUCHSCREEN_MONITOR --auto --output $REGULAR_MONITOR --auto
# Enable touchscreen input with CTM for landscape (0* rotation)
xinput set-prop "QUANTA OpticalTouchScreen" --type=float "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1
exit 0
I have tried a few options for rotating the screen (and subsequently, its input) 90 degrees clockwise, but I've had issues:
If I change the xrandr/xinput commands to the following:
Code:
xrandr --output $TOUCHSCREEN_MONITOR --auto --rotate left --output $REGULAR_MONITOR --auto
# Enable touchscreen input with CTM for 90* cw rotation
xinput set-prop "QUANTA OpticalTouchScreen" --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1
I determined this CTM to be correct after much research. With this, X renders the screen correctly on the TS monitor, and rotated touch input mostly works, but it appears there is a bug where the touch input jumps around between the actual touch location, and another location (which I would assume is the where the touch input would be if the X screen was in portrait mode but the TS input was still being processed as landscape).
Apparently there is a documented bug somewhere in the bowels of the internet, which I'm unable to find at the moment.
Has anyone successfully gotten rotated touch screen input calibrated correctly?
Bookmarks