在 Dell XPS 15 上的 xorg.conf 中正确匹配触摸板

在 Dell XPS 15 上的 xorg.conf 中正确匹配触摸板

我正在尝试为我的戴尔触摸板设置不错的选项,例如点击和自然滚动。启动 X 将检测 2 个触摸板、1 个 SynPS/2 Synaptics 和 1 个 DLL 触摸板。 SynPS/2 不会获取任何 xevents,它们都会转到 DLL 触摸板,因此我禁用了 SynPS/2 并获取以下设备列表:

% xinput -list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech Gaming Mouse G402                id=12   [slave  pointer  (2)]
⎜   ↳ Logitech Gaming Mouse G402                id=13   [slave  pointer  (2)]
⎜   ↳ HID 046a:0023                             id=15   [slave  pointer  (2)]
--- here the SynPS/2 Synaptics Touchpad .... was listed
⎜   ↳ DLL06E4:01 06CB:7A13 Touchpad             id=16   [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)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Power Button                              id=9    [slave  keyboard (3)]
    ↳ Sleep Button                              id=10   [slave  keyboard (3)]
    ↳ Integrated_Webcam_HD                      id=11   [slave  keyboard (3)]
    ↳ HID 046a:0023                             id=14   [slave  keyboard (3)]
    ↳ Intel HID events                          id=17   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=18   [slave  keyboard (3)]
    ↳ Dell WMI hotkeys                          id=19   [slave  keyboard (3)]
    ↳ Logitech Gaming Mouse G402                id=20   [slave  keyboard (3)]
    ↳ HID 046a:0023                             id=21   [slave  keyboard (3)]

我的`/etc/X11/xorg.conf.d/50-touchpad.conf:

Section "InputClass"
Identifier "disable synaptics detection"
MatchVendor "SynPS/2"
Option "Ignore" "on"
EndSection

Section "InputClass"
Identifier "touchpad catchall"
Driver "libinput"
MatchIsTouchpad "on"
#   MatchVendor "DLL06E4:01"
#   MatchDevicePath "/dev/input/event'"
MatchProduct "06CB:7A13"
Option "TapButton1" "1"
Option "TapButton2" "3"
Option "EmulateTwoFingerMinZ" "35"
Option "EmulateTwoFingerMinW" "8"
Option "TapButton3" "2"
Option "VertTwoFingerScroll" "1"
Option "HorizTwoFingerScroll" "1"
Option "VertScrollDelta" "-111"
Option "HorizScrollDelta" "-111"
Option "CoastingSpeed" "8"
Option "CornerCoasting" "1"
Option "CircularScrolling" "1"
Option "CircScrollTrigger" "7"
EndSection

当我匹配到DevicePath/dev/input/event5我启动 X 后发现的路径)时,触摸板在我启动 X 会话的所有时间中大约有 1/4 会按预期工作。在其他会话中,触摸板将绑定到不同的输入事件。因此,我尝试匹配其供应商/设备字符串,但现在根本检测不到触摸板,尽管通过供应商字符串禁用第二个触摸板可以完美地工作。我还尝试了配置文件中注释掉的匹配模式。

我还将驱动程序从 synaptic 切换到更新的 libinput - 这会导致任何问题吗?

答案1

检查journalctl显示,在 X 启动期间成功检测到触摸板。没有被检测到的感觉来自于 libinput 接受的与 synaptic 不同的驱动选项——libinput 不知道我的 synaptic 驱动选项,所以它回到了默认行为。

这是我当前的工作配置文件,设置与上面的突触风格片段相同的选项(应用它时,请记住 xorg 设置之间的重要性顺序,例如将其置于/etc/X11/xorg.conf.d/40-libinput.conf高优先级)。

Section "InputClass"
  Identifier "libinput touchpad catchall" # applied after "touchpad catchall"
  Driver "libinput"
  MatchIsTouchpad "on"
  # MatchVendor "DLL06E4:01"
  MatchProduct "06CB:7A13"          # all matching patterns work as expected
  Option "Tapping" "on"                # enables tapping
  Option "ClickMethod" "clickfinger"   # replaces synaptics tapping setup 
  Option "NaturalScrolling" "true"    # replaces scrolling setup above
EndSection

相关内容