前往
大廳
主題

修復 GPD Win 運行 ubuntu 觸控螢幕坐標不正確的問題

南幌 | 2023-10-20 20:11:23 | 巴幣 0 | 人氣 88

使用 xinput 指令可直接更改:
xinput set-prop 'pointer:Goodix Capacitive TouchScreen' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1

但登出後會失效,需要每次登入都執行一次指令。
打開終端機,到 /usr/share/X11/xorg.conf.d/ 編輯 40-libinput.conf
sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf

找到 Indentifier "libinput touchscreen catchall" ,這邊是有關觸控螢幕的輸入設定,在裡面加入這一行:
Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"

GPD Win是轉90°,所以可以直接照用。
如果要旋轉其它方向,必須更改後面的內容:
"0 1 0 -1 0 1 0 0 1"    #90度(右旋轉)
"-1 0 1 0 -1 1 0 0 1"    #180度(上下顛倒)
"0 -1 1 1 0 0 0 0 1"    #270度(左旋轉)

加入完後,這一段應該長這樣:
Section "InputClass"
    Indentifier "libinput touchscreen catchall"
    MatchIsTouchscreen "on"
    Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"
    MatchDevicePath "/dev/input/event*"
    Driver "libinput"
EndSection

按 Ctrl+S 保存後, Ctrl+X 退出,重啟裝置即可。

X11、Xorg 的桌面環境應該都通用此方法。


測試環境: ubuntu unity 23.10.1
時間:2023/10/20
2更:2023/11/2

創作回應

追蹤 創作集

作者相關創作

更多創作