Search for answers or browse our knowledge base.
Touchscreen Pointer Is Flipped or Mirrored
Use this procedure when touching one side of the ELO touchscreen moves the pointer to the opposite side—for example, touching the bottom moves the pointer to the top. This is most common after an older system receives a replacement computer and the touchscreen coordinate transformation is no longer correct.
Support procedure: This article modifies
/mnt/programs/startup.sh. It should be completed by Enventek Support or a technician familiar with Linux shell scripts. Back up the file before editing it.
Confirm the symptom
- Restart the computer once and confirm that the pointer is still mirrored or inverted.
- Connect a keyboard and open a terminal.
- Run
xinput listand locate the device containing Elo. Note its current device ID. - Test the transformation command with that ID. The number in
xinput set-propmust be the current ELO device ID; it is not always 11 and can change after a restart or hardware change.
Temporary test command
Replace 11 with the ELO device ID returned by xinput list:
xinput set-prop 11 "Coordinate Transformation Matrix" -1 0 1 0 -1 1 0 0 1Touch each corner and the center of the screen. If the pointer now follows correctly, make the correction persistent. If the direction is still wrong, stop and contact Enventek Support; a different transformation matrix may be required.
Make the correction persistent
A hard-coded device ID can change, so the following script automatically finds the ELO touchscreen ID and adds or updates the transformation line in /mnt/programs/startup.sh. Review the generated ID before running it.
#!/bin/bash
# Export DISPLAY variable
export DISPLAY=:0
# Get the ID of the item that contains "Elo"
elo_id=$(xinput list | grep -i "elo" | awk -F'id=' '{print $2}' | awk '{print $1}')
# Check if ID was found
if [ -z "$elo_id" ]; then
echo "No device containing 'Elo' found."
else
echo "Device ID for 'Elo' found: $elo_id"
# File to modify
startup_file="/mnt/programs/startup.sh"
# Check if the file exists
if [ -f "$startup_file" ]; then
# Check if the DISPLAY variable is already set in the file
if grep -q "export DISPLAY=:0" "$startup_file"; then
# Check if the line for xinput set-prop already exists
if grep -q "xinput set-prop .* \"Coordinate Transformation Matrix\" -1 0 1 0 -1 1 0 0 1" "$startup_file"; then
# Modify the existing line
sed -i "s/xinput set-prop .* \"Coordinate Transformation Matrix\" -1 0 1 0 -1 1 0 0 1/xinput set-prop $elo_id \"Coordinate Transformation Matrix\" -1 0 1 0 -1 1 0 0 1/" "$startup_file"
echo "Modified existing xinput set-prop line in $startup_file to id $elo_id "
else
# Add the new line after export DISPLAY=:0
sed -i "/export DISPLAY=:0/a xinput set-prop $elo_id \"Coordinate Transformation Matrix\" -1 0 1 0 -1 1 0 0 1" "$startup_file"
echo "Added xinput set-prop line to $startup_file to id $elo_id"
fi
else
# Add both the export DISPLAY line and the xinput set-prop line
echo -e "export DISPLAY=:0\nxinput set-prop $elo_id \"Coordinate Transformation Matrix\" -1 0 1 0 -1 1 0 0 1" >> "$startup_file"
echo "Added export DISPLAY and xinput set-prop lines to $startup_file to id $elo_id"
fi
else
echo "File $startup_file does not exist."
fi
fi
Verify and recover
- Review
/mnt/programs/startup.shand confirm the newxinput set-propline appears afterexport DISPLAY=:0. - Restart the computer and allow the normal startup sequence to complete.
- Touch all four corners and the center. Confirm that the pointer follows the touch location correctly.
- If the graphical interface does not start or touch behavior becomes worse, restore the backup of
startup.shand contact Enventek Support.