Skip to content

Instantly share code, notes, and snippets.

@Chocksy
Last active August 15, 2020 05:54
Show Gist options
  • Save Chocksy/3a112f890cecc4393e26 to your computer and use it in GitHub Desktop.
Save Chocksy/3a112f890cecc4393e26 to your computer and use it in GitHub Desktop.
Fix for Elo Touchscreen on debian
# Some interesting python script:
# https://raw.githubusercontent.com/adafruit/PiTFT_Extras/master/pitft_touch_cal.py
# > sudo add-apt-repository ppa:tias/xinput-calibrator-ppa
> sudo apt-get update && sudo apt-get install xinput-calibrator
> apt-get install xinput
> export DISPLAY=:0.0
> xinput list-props "EloTouchSystems,Inc Elo TouchSystems 2216 AccuTouch® USB Touchmonitor Interface"
> xinput set-prop "EloTouchSystems,Inc Elo TouchSystems 2216 AccuTouch® USB Touchmonitor Interface" "Evdev Axis Inversion" 0 1
# here touch the points on the screen in the corners
> xinput_calibrator --output-type xinput
Doing dynamic recalibration:
Inverting X and/or Y axis...
Setting calibration data: 434, 3518, 3446, 541
--> Making the calibration permanent <--
Install the 'xinput' tool and copy the command(s) below in a script that starts with your X session
xinput set-int-prop "EloTouchSystems,Inc Elo TouchSystems 2216 AccuTouch® USB Touchmonitor Interface" "Evdev Axis Calibration" 32 434 3518 3446 541
xinput set-int-prop "EloTouchSystems,Inc Elo TouchSystems 2216 AccuTouch® USB Touchmonitor Interface" "Evdev Axes Swap" 8 0
# SET IN ENV VARIABLES THIS
# DISABLE (name) = :0.0 (VALUE)
> sudo mkdir /etc/X11/xorg.conf.d
> sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
# write this in the file
# next add the config details
# xinput set-int-prop "EloTouchSystems,Inc Elo TouchSystems 2216 AccuTouch® USB Touchmonitor Interface" "Evdev Axis Calibration" 32 434 3518 3446 541
# xinput set-int-prop "EloTouchSystems,Inc Elo TouchSystems 2216 AccuTouch® USB Touchmonitor Interface" "Evdev Axes Swap" 8 0
# do (CTRL + O, CTRL + X). to save
# now restart the PI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment