ubuntu lxqt触摸屏旋转校准(usb触摸屏、lxqt、ubuntu23.10)

参考文章:https://www.codetd.com/article/5651388

1.查看触摸屏驱动

bash 复制代码
root@xyy:~# xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Windows pointer                           id=6    [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Windows keyboard                          id=7    [slave  keyboard (3)]

2.修改/etc/X11/xorg.conf.d/40-libinput.conf配置文件:

旋转270° (右转) 添加

bash 复制代码
 Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"

旋转90° (左转) 添加

bash 复制代码
 Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"

旋转180° (颠倒) 添加

bash 复制代码
 Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"

y轴旋转 添加

bash 复制代码
 Option "CalibrationMatrix" "-1 0 1 1 0 0 0 0 1"

修改后的配置如下:

bash 复制代码
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

参考图:

相关推荐
wusam几秒前
Linux系统管理与编程20:Apache
linux·运维·服务器·apache·shell编程
我不想当小卡拉米6 分钟前
【Linux】操作系统入门:冯诺依曼体系结构
linux·开发语言·网络·c++
ChironW20 分钟前
Ubuntu 24.04 LTS系统上配置国内时间同步
linux·运维·服务器·ubuntu
TPBoreas26 分钟前
排查服务器内存空间预警思路
运维·服务器
*郑*1 小时前
nginx配置反向代理后端
运维·nginx
苏生要努力1 小时前
第九届御网杯网络安全大赛初赛WP
linux·python·网络安全
若风的雨1 小时前
【DeepSeek】判断两个 PCIe 设备是否属于**同一个 PCIe 子树
linux
江畔独步2 小时前
vim中的查找
linux·编辑器·vim
Web极客码2 小时前
虚拟主机与独立服务器:哪个更好?
运维·服务器·虚拟主机
小突突突2 小时前
个人博客系统测试报告
运维·网络·功能测试