7寸屏界面變豎后吩抓,sudo apt-get install xinput安裝xinput,DISPLAY=:0 xinput --list看下屏幕的是哪個數(shù)值而账。假如數(shù)值是5娄周,DISPLAY=:0 xinput --list-props 5,查看設(shè)備5的信息羹奉。
cd /etc/X11/xorg.conf.d/進(jìn)入到這個目錄
sudo nano 99-libinput.conf編輯這個非空的文件
(如果進(jìn)入是一個空文件而不是非空文件秒旋,檢查一下有沒有輸入錯誤,如果沒有運(yùn)行sudo nano 40-libinput.conf編輯這個非空的文件)
找到Touch
Section “InputClass“
Identifier “l(fā)ibinput touchscreen catchall“
MatchIsTouchscreen “on“
MatchDevicePath “/dev/input/event*“
Driver “l(fā)ibinput“
EndSection
旋轉(zhuǎn)0度?添加這一行 Option "CalibrationMatrix" "1 0 0 0 1 0 0 0 1"
旋轉(zhuǎn)90度?添加這一行 Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
旋轉(zhuǎn)-90度?添加這一行 Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"
如旋轉(zhuǎn)90度的結(jié)果為
Section “InputClass“
Identifier “l(fā)ibinput touchscreen catchall“
Option Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
MatchIsTouchscreen “on“
MatchDevicePath “/dev/input/event*“
Driver “l(fā)ibinput“
EndSection
保存后重啟就變成了豎屏觸摸了
有的有效有的無效的方法:
3.5寸屏界面變豎后诀拭,sudo apt-get install xinput安裝xinput滩褥,DISPLAY=:0 xinput --list看下屏幕的是哪個數(shù)值。假如數(shù)值是6炫加,DISPLAY=:0 xinput --list-props 6瑰煎,查看設(shè)備6的信息
1)所以先交換x、y軸
DISPLAY=:0 xinput --set-prop '6' 'Evdev Axes Swap' 0
2)然后反轉(zhuǎn)y軸
DISPLAY=:0 xinput --set-prop '6' 'Evdev Axis Inversion'?0 1
就變成了豎屏觸摸俗孝,不用重啟系統(tǒng)就改變了觸摸酒甸。
參考文檔: