Xorg 不在 xinput 中显示我的设备

Xorg 不在 xinput 中显示我的设备

我创建了一个文件“51-mitsubishi.conf”,并将其与已经存在的其他 .conf 文件一起放置在 /usr/share/X11/xorg.conf.d/ 中。

查看 /var/log/Xorg.0.log 时,没有提及我的驱动程序或与我的 conf 文件相关的任何内容。

我知道 xorg 使用“AutoAddDevices”,这可能会导致问题,但我还没有找到解决方案。

我可以使用 'lsmod | 看到我的驱动程序grep“三菱”,但显示“由 0 使用”。我应该提到,我已将驱动程序添加到 /etc/modules 中,如下所示: lp mitsubishi_ts_serial rtc 并且驱动程序会自动启动。

Xorg 似乎忽略了我的设备。关于我下一步应该做什么才能让 Xorg 查看我的设备并连接到它,有什么建议吗?

这是conf文件:

Section "InputClass" 
Identifier "MitsubishiTouchscreen" 
MatchIsTouchscreen "true" 
EndSection

Section "InputDevice" 
Identifier "MitsubishiTouchscreen" 
Driver "mitsubishi_ts_serial" 
Option "Device" "/dev/ttyUSB0" 
Option "BaudRate" "38400" 
Option "MinX" "0" 
Option "MaxX" "2000" 
Option "MinY" "0" 
Option "MaxY" "2000" 
Option "UntouchDelay" "10" 
Option "ReportDelay" "10" 
Option "SendCoreEvents" "yes" 
Option "ScreenNumber" "0" 
Option "ButtonNumber" "1" 
EndSection

答案1

为了解决这个问题,我将我的设备添加到 inputattach.c 中的“struct input_types”数组中。这个源文件我必须在网上找到。将正确的参数添加到此列表并重新编译后,我就可以启动我的驱动程序运行我自己构建的 inputattach 文件: ./myInputAttach -mydriver /dev/ttyUSB0

运行 tail -f /var/log/kern.log 显示驱动程序启动和中断的“printk”输出。

我在xinput上仍然没有看到驱动程序,但这至少解决了驱动程序不被使用的问题。

相关内容