Jetson display vertical screen setting
The Jetson Nano package that I started with includes a 5-inch touch screen. Everything is normal when using the horizontal screen. When it is set to the vertical screen, there is no problem with the display, but the touch input is messed up. Configure the following script in .profile, it will fix this problem automatically.
Reference document: https://wiki.ubuntu.com/X/InputCoordinateTransformation
#!/bin/bash
TIMEOUT=100
export |grep SSH_TTY -i >/dev/null
RET=$?
if [ "$RET " != "0 " ]; then
# if not login by ssh
while [ 1 ]; do
# 旋转
xinput --set-prop 'wch.cn USB2IIC_CTP_CONTROL' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1
RET=$?
if [ "$RET " = "0 " ]; then
echo "## "`date "+%Y%m%d %H:%M:%S" `"# wch.cn USB2IIC_CTP_CONTROL fixed success"
break
fi
let TIMEOUT=TIMEOUT-1
echo $TIMEOUT
if [ "$TIMEOUT " = "0 " ]; then
echo "## "`date "+%Y%m%d %H:%M:%S" `"# wch.cn USB2IIC_CTP_CONTROL fixed failed"
break
fi
sleep 5s
done
fi