【RK3399_Linux_Arm】触摸屏在屏幕旋转后触摸不准的解决方法

查看显示屏参数
xrandr

firefly@firefly:~$ xrandr
Screen 0: minimum 0 x 0, current 3840 x 1202, maximum 32768 x 32768
default connected primary 3840x1202+0+0 1015mm x 318mm
   3840x1202      0.00*
修改配置文件
  • 配置文件:/etc/X11/xorg.conf
sudo vim /etc/X11/xorg.conf

如果不存在xorg.conf文件的话直接在/etc/X11/路径下创建该文件即可。将文件内容修改如下:

Section "Monitor"
    Identifier          "HDMI-1"
    Option              "Rotate" "normal"
EndSection

Section "Screen"
    Identifier          "Screen0"
    Monitor             "HDMI-1"
    Option              "RandRRotation"
EndSection

Section "ServerLayout"
    Identifier          "DefaultLayout"
    Screen              "Screen0"
EndSection

Section "InputClass"
    Identifier          "touchscreen"
    MatchIsTouchscreen  "on"
    MatchDevicePath     "/dev/input/event*"
    Driver              "evdev"
    Option              "SwapAxes" "true"
    Option              "InvertX" "false"
    Option              "InvertY" "true"
EndSection

参数说明如下:

Section "Monitor"
    Identifier          "HDMI-1" #设置默认显示器为HDMI-1
    Option              "Rotate" "normal" #设置屏幕旋转 normal为正常,left向左旋转90度,
                                          #right向右旋转90度,inverted为上下翻转
EndSection

Section "Screen"
    Identifier          "Screen0"
    Monitor             "HDMI-1"   #设置屏幕为HDMI-1
    Option              "RandRRotation"   #设置支持HDMI旋转
EndSection

Section "InputClass"
    Identifier          "touchscreen"    #触摸屏设置
    MatchIsTouchscreen  "on"
    MatchDevicePath     "/dev/input/event*"
    Driver              "evdev"
    Option              "SwapAxes" "true"
    Option              "InvertX" "false"  #设置触摸屏X轴旋转,true为开启,false为关闭
    Option              "InvertY" "true"   #设置触摸屏Y轴旋转,true为开启,false为关闭
EndSection
转载于https://blog.csdn.net/qq_36430621/article/details/106877055
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值