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

参考图:

相关推荐
Henry-SAP12 分钟前
SAP BOM项目类别详解——L/T/R/N各类目的业务含义解析
运维
天空属于哈夫克340 分钟前
企业微信二次开发:解锁更多自动化应用场景
运维·自动化·企业微信
EmbeddedChen1 小时前
Linux 怎么查看 IP 地址和网络状态?常用网络命令入门
linux·网络·ip·route·ping
Diligently_1 小时前
第 08 篇|单机部署:本地安装与 Docker 最佳实践
运维·spring boot·docker
大今野2 小时前
2026 专转本计算机|区块链典型框架:以太坊与超级账本 Fabric 考点全解(附例题)
运维·区块链·fabric·专转本
Z21-X2 小时前
云原生运维学习笔记:Kubernetes 自动扩缩容与资源管控实战
运维·笔记·学习·云原生·kubernetes
爱和冰阔落2 小时前
【Linux网络】GET 和 POST 真的只是参数位置不同吗?从 HTTP 请求方法、抓包分析到长连接与路由实战
linux·c++·http·网络编程·get与post
无足鸟ICT2 小时前
【RHCA+】_proc_pid_attr_exec
linux·运维·服务器
牙牙7052 小时前
接口一直超时,后端却查不出问题:TIME_WAIT 把本地端口耗尽了
linux·网络·tcp·连接池·故障排查·time_wait
Decay__3 小时前
PostgreSQL 内存与锁调优 —— shared_buffers、work_mem、MVCC 与锁等待排查
运维·数据库·sql·postgresql