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

参考图:

相关推荐
Molesidy21 分钟前
【Linux】【Imx6ull Pro】基于Imx6ull Pro开发板的Linux-C-C++编程记录
linux·嵌入式·嵌入式linux应用层
北京盛世宏博22 分钟前
边缘计算赋能!机房机柜微环境温湿度快速响应控制方案
运维·服务器·网络
3DVisionary37 分钟前
高精度三维扫描+自动化,新拓三维打造中小型工业零部件数字化检测新方案
运维·自动化·蓝光三维扫描·dic技术·复杂零部件的批量检测·模型试验·自动化和数字化测量
AI云原生38 分钟前
在 openEuler 上使用 x86_64 环境编译 ARM64 应用的完整实践
java·运维·开发语言·jvm·开源·开源软件·开源协议
赖small强38 分钟前
【Linux 内存管理】Linux系统中CPU访问内存的完整机制深度解析
linux·缓存·tlb·内存访问·page table
张人大 Renda Zhang1 小时前
2025 年版笔记:Java 开发如何用 AI 升级 CI/CD 和运维?
java·运维·ci/cd·ai·云原生·架构·自动化
赖small强2 小时前
【Linux C/C++开发】Linux 系统野指针崩溃机制深度解析
linux·mmu·crash·core dump·野指针
NewBee_Lxx2 小时前
docker nginx
运维·docker·容器
J__M__C3 小时前
WSL2的环境配置(安装+网络配置+基本美化)
linux