Bug 112481 - Apple Magic Trackpad 2 is not fully functional
Summary: Apple Magic Trackpad 2 is not fully functional
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_input-devices
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-15 12:12 UTC by ecloud
Modified: 2018-11-21 13:02 UTC (History)
13 users (show)

See Also:
Kernel Version: 4.4.1
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description ecloud 2016-02-15 12:12:28 UTC
This is like bug 96771 about the trackpads in 2015 MacbookPro's, but now there is a USB/Bluetooth trackpad for desktop machines.  I'm having trouble connecting to it over Bluetooth with Linux, but it's also possible to plug it in as a USB device.  In that case it begins to work, but the bcm5974 driver is not used; it is treated as a Magic Mouse according to the Xorg log, and only movement and left-clicking are possible in X.  I can see that bcm5974.c does not reference its USB ID, which is 05ac:0265.  Output of lsusb -vvv:

Bus 008 Device 002: ID 05ac:0265 Apple, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x05ac Apple, Inc.
  idProduct          0x0265 
  bcdDevice            8.04
  iManufacturer           1 Apple Inc.
  iProduct                2 Magic Trackpad 2
  iSerial                 3 CC25402022XGTFQAN
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          116
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          4 Trackpad
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              5 Device Management
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      83
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              6 Trackpad / Boot
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     110
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              7 Actuator
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      36
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              8 Accelerometer
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      27
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               2
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)
Comment 1 Dmitry Torokhov 2016-06-27 21:55:04 UTC
Hmm, the kernel believes that Magic Trackpad has different PID:

#define USB_DEVICE_ID_APPLE_MAGICTRACKPAD 0x030e

Can you try changing this define in ./drivers/hid/hid-ids.h to 0x0265 and see if that makes difference?
Comment 2 Ng Cheuk-fung 2016-08-06 09:00:56 UTC
(In reply to Dmitry Torokhov from comment #1)
> Hmm, the kernel believes that Magic Trackpad has different PID:
> 
> #define USB_DEVICE_ID_APPLE_MAGICTRACKPAD 0x030e
> 
> Can you try changing this define in ./drivers/hid/hid-ids.h to 0x0265 and
> see if that makes difference?

I tried but it did not work. The output of `journalctl -f` before and after the change were the same as follows:

Aug 06 16:56:49 ArchLinux kernel: usb 1-5: new full-speed USB device number 16 using xhci_hcd
Aug 06 16:56:49 ArchLinux kernel: hid-generic 0003:05AC:0265.0011: hiddev0,hidraw0: USB HID v1.10 Device [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-5/input0
Aug 06 16:56:49 ArchLinux kernel: input: Apple Inc. Magic Trackpad 2 as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.1/0003:05AC:0265.0012/input/input22
Aug 06 16:56:49 ArchLinux kernel: hid-generic 0003:05AC:0265.0012: input,hiddev0,hidraw1: USB HID v1.10 Mouse [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-5/input1
Aug 06 16:56:49 ArchLinux mtp-probe[2306]: checking bus 1, device 16: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5"
Aug 06 16:56:49 ArchLinux mtp-probe[2306]: bus: 1, device: 16 was not an MTP device
Aug 06 16:56:49 ArchLinux kernel: hid-generic 0003:05AC:0265.0013: hiddev0,hidraw2: USB HID v1.10 Device [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-5/input2
Aug 06 16:56:49 ArchLinux kernel: hid-generic 0003:05AC:0265.0014: hiddev0,hidraw3: USB HID v1.10 Device [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-5/input3
Aug 06 16:56:50 ArchLinux colord[491]: /usr/lib/colord/colord-sane: error while loading shared libraries: libsane.so.1: cannot open shared object file: No such file or directory
Aug 06 16:56:50 ArchLinux colord[491]: /usr/lib/colord/colord-sane: error while loading shared libraries: libsane.so.1: cannot open shared object file: No such file or directory
Aug 06 16:56:50 ArchLinux colord[491]: /usr/lib/colord/colord-sane: error while loading shared libraries: libsane.so.1: cannot open shared object file: No such file or directory
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (II) config/udev: Adding input device Apple Inc. Magic Trackpad 2 (/dev/input/mouse0)
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (II) No input driver specified, ignoring this device.
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (II) This device may have been added with another device file.
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (II) config/udev: Adding input device Apple Inc. Magic Trackpad 2 (/dev/input/event0)
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (**) Apple Inc. Magic Trackpad 2: Applying InputClass "libinput pointer catchall"
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (II) systemd-logind: got fd for /dev/input/event0 13:64 fd 31 paused 0
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (II) Using input driver 'libinput' for 'Apple Inc. Magic Trackpad 2'
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (**) Apple Inc. Magic Trackpad 2: always reports core events
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (**) Option "Device" "/dev/input/event0"
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (**) Option "_source" "server/udev"
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (II) input device 'Apple Inc. Magic Trackpad 2', /dev/input/event0 is tagged by udev as: Mouse
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (II) input device 'Apple Inc. Magic Trackpad 2', /dev/input/event0 is a pointer caps
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.1/0003:05AC:0265.0012/input/input22/event0"
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (II) XINPUT: Adding extended input device "Apple Inc. Magic Trackpad 2" (type: MOUSE, id 16)
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (**) Option "AccelerationScheme" "none"
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (**) Apple Inc. Magic Trackpad 2: (accel) selected scheme none/0
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (**) Apple Inc. Magic Trackpad 2: (accel) acceleration factor: 2.000
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (**) Apple Inc. Magic Trackpad 2: (accel) acceleration threshold: 4
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (II) input device 'Apple Inc. Magic Trackpad 2', /dev/input/event0 is tagged by udev as: Mouse
Aug 06 16:56:50 ArchLinux /usr/lib/gdm/gdm-x-session[1051]: (II) input device 'Apple Inc. Magic Trackpad 2', /dev/input/event0 is a pointer caps
Comment 3 Daniel Cousens 2016-08-16 23:08:30 UTC
I can confirm that the new USB ID for 'Apple Inc. Magic Trackpad 2' is `05ac:0265`.

On plugging in the device,  only hard-press and cursor movement works.

2 finger scrolling does not work, nor is present in `xinput`. 
https://github.com/tiziano88/magic-trackpad-2-linux seems to be tracking progress on attempting to get this device to work.
Comment 4 elatllat 2017-01-23 18:17:32 UTC
http://extramagic.forbootcamp.org/
Comment 5 Cyril N. 2017-02-13 09:29:45 UTC
I also confirm that the Magic Trackpad 2 does not work correctly when plugged via USB.

As reported, only the mouse mouvement and the left clic works, right clic (double finger) or scroll is not working.

Oddly, the bug report https://bugzilla.kernel.org/show_bug.cgi?id=96771 makes the internal trackpad for the Macbook pro works correctly.

On Redhat, this bug report https://bugzilla.redhat.com/show_bug.cgi?id=1274448 says that exact same issue.

If needed, I can provide the output of any command asked in order to fix this issue.
Comment 6 Michael Schlies 2018-11-21 13:02:29 UTC
This is set to be resolved with 4.20 thanks to the patch by Sean O'Brien with a commit hash of 9d7b18668956c411a422d04c712994c5fdb23a4b.

Note You need to log in before you can comment on or make changes to this bug.