AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1188624
Accepted
Chris Keller
Chris Keller
Asked: 2019-11-14 20:10:38 +0800 CST2019-11-14 20:10:38 +0800 CST 2019-11-14 20:10:38 +0800 CST

Toughbook CF-19 上的 xinput_calibrator 出现问题

  • 772

使用 Xubuntu 19.10,我正在尝试校准 Toughbook CF-19 MK5 的触摸屏。我已经xinput_calibrator按照其他人的建议使用它完成并给了我一个片段以复制到 xorg.conf 文件中,但是有一个问题:

chris@helmhorn:~$ sudo xinput_calibrator -v
Calibrating standard Xorg driver "Fujitsu Component USB Touch Panel Pen (0)"
        current calibration values: min_x=0, max_x=16777215 and min_y=0, max_y=16777215
        If these values are estimated wrong, either supply it manually with the --precalib option, or run the 'get_precalib.sh' script to automatically get it (through HAL).
DEBUG: Name 'Fujitsu Component USB Touch Panel Pen (0)' does not match any in '/sys/class/input/event*/device/name'
        --> Making the calibration permanent <--
  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)
Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "!!Name_Of_TouchScreen!!"
        Option  "MinX"  "1267029"
        Option  "MaxX"  "16165546"
        Option  "MinY"  "615310"
        Option  "MaxY"  "14567195"
        Option  "SwapXY"        "0" # unless it was already set to 1
        Option  "InvertX"       "0"  # unless it was already set
        Option  "InvertY"       "0"  # unless it was already set
EndSection

Change '!!Name_Of_TouchScreen!!' to your device's name in the config above.

未应用校准,将代码段/usr/share/X11/xorg.conf.d/99-calibration.conf与其他 xorg 文件放在一起并重新启动无效。我怀疑错误信息Name 'Fujitsu Component USB Touch Panel Pen (0)' does not match any in '/sys/class/input/event*/device/name'是关键,但通过谷歌找不到太多信息。

比较来自两个相关来源的设备名称:

chris@helmhorn:~$ cat /sys/class/input/event*/device/name | grep Fujitsu
Fujitsu Component USB Touch Panel
chris@helmhorn:~$ sudo xinput_calibrator --list
Device "Fujitsu Component USB Touch Panel Pen (0)" id=13

设备名称不完全匹配,将这些值中的任何一个放在 xorg.conf.d 文件中都没有效果。

编辑:我在谷歌上能找到的最好的信息是这个韩语网站,我必须和翻译一起阅读;基本上它建议使用不同的匹配器,如MatchUSBID "28bd: 000c".

这是迄今为止我发现的最清晰的信息:

chris@helmhorn:~$ sudo xinput --list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ PS/2 Generic Mouse                        id=11   [slave  pointer  (2)]
⎜   ↳ Fujitsu Component USB Touch Panel Pen (0) id=13   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Fujitsu Component USB Touch Panel         id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=10   [slave  keyboard (3)]
    ↳ Panasonic Laptop Support                  id=12   [slave  keyboard (3)]
chris@helmhorn:~$ sudo xinput_calibrator --list
Device "Fujitsu Component USB Touch Panel Pen (0)" id=13

它仍然没有告诉我出了什么问题,但它将触摸面板和笔显示为单独的设备,并且校准器正在尝试使用笔。

编辑:我在同一硬件上发现了一个有非常相似问题的人最近发表的一篇博文。在 xorg.conf 不起作用后,他们决定创建一个xinput set-prop在登录时调用的脚本。我会看看他们的解决方案是否适合我。作为奖励,他们谈到了我也需要的屏幕键盘。

xorg touchscreen xinput
  • 1 1 个回答
  • 2161 Views

1 个回答

  • Voted
  1. Best Answer
    Chris Keller
    2019-11-16T16:29:35+08:002019-11-16T16:29:35+08:00

    更新:我重新访问了这个并找到了这个 Ubuntu 论坛帖子,它正确地推荐了:

    sudo apt install xserver-xorg-input-evdev
    sudo apt remove xserver-xorg-input-libinput
    

    重新启动后,xinput_calibrator能够识别触摸屏并正确校准它!


    原答案:

    这篇博文是我能找到的最好的解决方法。该解决方案不是将配置放在 xorg.conf 文件中,而是xinput set-prop在脚本中调用,然后在登录时调用该脚本。这绕过了找出一个告诉 xorg.conf 我们正在谈论的设备的好方法的需要。它不漂亮,但它有效。

    #!/bin/sh
    
    # Coordinate touch panel to screen
    
    xinput set-prop "Fujitsu Component USB Touch Panel" --type=float "Coordinate Transformation Matrix" 1.115 0 -0.073 0 1.14 -0.04 0 0 1
    

    正如博文中所讨论的,调整矩阵​​参数的最佳方法似乎是反复试验。博客文章中的价值观对我来说是一个相当接近的起点。

    我仍然很想听到一个使用 xorg.conf 并让 xinput_calibrator 满意的解决方案,因为这样可以更容易调整。

    • 1

相关问题

  • 如何从命令行重新启动 X Window Server?

  • xorg 中是否有用于更改视频驱动程序的 GUI?

  • 类似于 Eyefinity 的东西?

  • 如何重置我的键盘布局?

  • 帮助让 Flash 播放器在第二个屏幕上工作?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve