You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Apple Magic Trackpad 2在Ubuntu 16.04下多指功能失效求助

Fixing Apple Magic Trackpad 2 Gestures on Ubuntu 16.04

I’ve dealt with this exact headache before—when the trackpad gets recognized as a generic input device instead of a proper touchpad, all the useful gestures like tap-to-click and two-finger scrolling stop working entirely. Let’s walk through the steps to get everything back on track:

1. Confirm How Your System Sees the Trackpad

First, let’s nail down the device’s identity:

  • Run lsusb and look for the Apple Magic Trackpad 2 entry (it’ll show up as something like Apple, Inc. Magic Trackpad 2 with a vendor ID of 05ac). Jot down the 4-digit product ID (it’s the number after the colon, e.g., 0265).
  • Next, run sudo evtest, select the event device linked to your trackpad, and test interactions. As you noticed, moving your finger will log events, but tapping or scrolling won’t—this confirms the device isn’t being treated as a touchpad.

2. Force Udev to Recognize It as a Touchpad

The core problem is udev isn’t tagging the device correctly. Let’s fix that with a custom rule:

  • Create a new rule file: sudo nano /etc/udev/rules.d/90-magictrackpad2.rules
  • Paste this line (replace XXXX with the product ID you noted earlier):
    SUBSYSTEM=="input", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="XXXX", ENV{ID_INPUT_TOUCHPAD}="1", ENV{ID_INPUT}="1"
    
  • Save and exit (Ctrl+O, Enter, Ctrl+X)
  • Reload udev rules: sudo udevadm control --reload-rules
  • Unplug/replug the trackpad (or restart Bluetooth if it’s paired wirelessly)

3. Fix the DKMS Driver Installation

Since you already installed the magictrackpad2-dkms package, let’s make sure it’s properly loaded:

  • Check if the module is active: dkms status—you should see magictrackpad2 listed with your current kernel version.
  • If it’s missing, load it manually: sudo modprobe magictrackpad2
  • If the module fails to load, rebuild it:
    sudo dkms remove magictrackpad2/<version> --all
    sudo dkms install magictrackpad2/<version>
    
    (Replace <version> with the version number shown in dkms status)

4. Enable Gestures in libinput

Ubuntu 16.04 uses libinput for input handling, so let’s explicitly enable gestures for your trackpad:

  • Open the libinput config file: sudo nano /etc/X11/xorg.conf.d/40-libinput.conf
  • Add this section (replace XXXX with your product ID):
    Section "InputClass"
        Identifier "Apple Magic Trackpad 2"
        MatchIsTouchpad "on"
        MatchVendor "05ac"
        MatchProduct "XXXX"
        Driver "libinput"
        Option "Tapping" "on"
        Option "TappingButtonMap" "lrm"
        Option "NaturalScrolling" "on"
        Option "ScrollMethod" "twofinger"
    EndSection
    
  • Save the file, then log out and back in (or run sudo systemctl restart lightdm if you use LightDM)

5. Test the Fixes

Run evtest again—you should now see events when tapping or scrolling. Try out tap-to-click and two-finger scrolling; they should work as expected.

If issues persist, double-check the product ID in your udev rule and libinput config, and ensure the DKMS module is built for your exact kernel version.

内容的提问来源于stack exchange,提问作者Aitch

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 09:38:35