ubuntu触摸屏旋转为横屏触摸不准问题解决(usb触摸屏、nano、ubuntu18.04)

news/2024/9/22 20:34:34/

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

1.查看触摸屏驱动

xinput list
//情况如下,驱动为ILITEK Multi-Touch-V3000
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ ILITEK Multi-Touch-V3000                	id=9	[slave  pointer  (2)]
⎜   ↳ ILITEK Multi-Touch-V3000                	id=10	[slave  pointer  (2)]
⎜   ↳ A4Tech USB Mouse                        	id=8	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]↳ gpio-keys                               	id=11	[slave  keyboard (3)]↳ Logitech USB Keyboard                   	id=6	[slave  keyboard (3)]↳ Logitech USB Keyboard                   	id=7	[slave  keyboard (3)]

我们再查一下它支持的属性,这里可以用它后面的id号9来查询

Device 'ILITEK Multi-Touch-V3000':Device Enabled (152):	1Coordinate Transformation Matrix (153):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000libinput Calibration Matrix (306):	0.000000, -1.000000, 1.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000libinput Calibration Matrix Default (307):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000libinput Send Events Modes Available (271):	1, 0libinput Send Events Mode Enabled (272):	0, 0libinput Send Events Mode Enabled Default (273):	0, 0Device Node (274):	"/dev/input/event2"Device Product ID (275):	8746, 1

可以看到,这里的输入是使用libinput进行管理的,所以当我们需要进行校正时,要进行其配置文件的修改

2.配置文件

2.1.查看/usr/share/X11/xorg.conf.d/目录下是否有40-libinput.conf这个文件。

  opt:           没有这个文件, 则需要安装               

sudo apt-get install xserver-xorg-input-libinput  

安装完成后ls一下,就可以看到在/usr/share/X11/xorg.conf.d/目录下存在该文件                           

2.2.复制该文件到/etc/X11/xorg.conf.d/目录下。

        opt:           一开始xorg.conf.d这个目录在/etc/X11可能没有,需要自己创建。

cd /etc/X11
sudo mkdir xorg.conf.d

 

sudo cp /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/
sudo gedit /etc/X11/xorg.conf.d/40-libinput.conf

 

2.3.进入/etc/X11/xorg.conf.d/目录下修改40-libinput.conf 文件

找到touchscreen section

在Identifier下添加一行 Option “CalibrationMatrix” “你的校准矩阵

我这里板子上需要旋转270度,所以写 Option "CalibrationMatrix" "0 1 0  -1 0 1 0 0 1"

90度       "0 -1 1 1 0 0 0 0 1"

180度      "-1 0 1 0  -1  1 0 0 1"

x ,y对调  "-1 0 1 1 0  0  0 0 1"

添加完成后

# Match on all types of devices but joysticks
Section "InputClass"Identifier "libinput pointer catchall"MatchIsPointer "on"MatchDevicePath "/dev/input/event*"Driver "libinput"
EndSectionSection "InputClass"Identifier "libinput keyboard catchall"MatchIsKeyboard "on"MatchDevicePath "/dev/input/event*"Driver "libinput"
EndSectionSection "InputClass"Identifier "libinput touchpad catchall"MatchIsTouchpad "on"MatchDevicePath "/dev/input/event*"Driver "libinput"
EndSectionSection "InputClass"Identifier "libinput touchscreen catchall"Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"MatchIsTouchscreen "on"MatchDevicePath "/dev/input/event*"Driver "libinput"
EndSectionSection "InputClass"Identifier "libinput tablet catchall"MatchIsTablet "on"MatchDevicePath "/dev/input/event*"Driver "libinput"
EndSection

 

这里你的校准矩阵里面,需要根据实际情况进行校准矩阵的编写,可以参考

https://wayland.freedesktop.org/libinput/doc/latest/absolute-axes.html (打不开的可以看文末的网页截图)

来写校准矩阵。

-


http://www.ppmy.cn/news/136104.html

相关文章

惠普V3000 黑屏,你让我改变了对你的好印象

最近广州出差,在广州第二天HP V3000本本就黑屏了,启动不了,启动了后又花屏 ,最后OVER了,那么多代码啊,杂整,以前对HP的机子还是多有信心的,现在彻底崩溃了,看了网上出现这…

android 系统触摸屏BUG解决过程分析

BUG描述: 添加触摸屏驱动后, apk对触摸事件没有响应. Linux 层驱动移植 内核根目录 make menuconfig 更改 “Device Drivers” ->“HID Devices” 下的 “/dev/hidraw” “PID device support” 和 “/dev/hiddev” 三个位置置成* 复制 “ilitek_auv3X.c”和 “usbhid.h…

惠普DV2000 V3000笔记本散热不良温度过高简单改造见效降温

为什么80%的码农都做不了架构师?>>> 众所周知惠普笔记本DV2000和V3000存在严重的设计缺陷:显卡温度过高,有时候一开机显卡就有80多度的变态高温从而让电脑格外难受时而用蓝屏、花屏、死机、重启等“手段”来罢工。此故障也导致惠…

HP_V3000_AMD处理器笔记本XP驱动

芯片组--包含网卡驱动[url]http://h50176.www5.hp.com/local_drivers/24696/sp33031.exe[/url]声卡微软通用音频架构(UAA)总线驱动 -----35.5M(注:如果35.5M的版本安装出现问题,清尝试下载安装另外一个版本的UAA--17.1…

屏幕PK升温 艾诺V3000挑战苹果iPhone

感谢您再次来到PK现场,今天的PK主角是有着传奇水果之称的苹果iPhone与新一代PMP高清黑马的艾诺V3000之间的屏幕较量。在第一场比赛中,艾诺V3000完胜对手索尼PSP。今天,艾诺又将与苹果一决高下。不过PK只比屏幕,别的咱们暂且放在一…

关于v3000上的“红外”接口的解释

惠普的v3000系列的模具共有2种。一个是2个USB接口,没读卡器,没红外遥控接口。一个是有3个USB接口,有红外遥控接口和内置麦克风的。许多人买来了带有红外接口的 电脑之后会询问为什么v3000的红外接口不能使用。其实并不是v3000的红外不能用&am…

hp presario V3000的两个驱动安装

装好系统后,显示有两个驱动没有装好。其中一个为pci device错误,提示: 名称已用作服务名或服务显示名。 卸载重装,错误依旧。 打电话咨询:800-810-3888,工程师说如果声卡、网卡已经装好,可能…

Mol文件和SDF文件介绍

SDF 或 MOL 文件中化合物是什么? Mol 文件是文本文件,其中包含单个分子化合物的结构信息。 SDF(结构数据文件)由一系列连接在一起的 mol 文件以及有关化合物的一些附加信息组成。它们经常用于共享化合物结构数据库。 MDL Molfil…