public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
* bcm5974 trackpad broken after USB reset
@ 2026-01-11 17:28 Liam Mitchell
  2026-01-11 19:59 ` Henrik Rydberg
  0 siblings, 1 reply; 8+ messages in thread
From: Liam Mitchell @ 2026-01-11 17:28 UTC (permalink / raw)
  To: Henrik Rydberg; +Cc: linux-input

Hi,

The trackpad on my 2013 MacBook Pro (10,2) stops working after the USB
device is reset, logging "bad trackpad package, length: 8" when
touching the trackpad.

The reset occurs often on my machine, caused by USB EPROTO (MMF)
errors handled by drivers/hid/usbhid/hid-core.c:hid_io_error() (HID is
handling the keyboard interface of this device). On encountering two
keyboard EPROTO errors within 1.5 seconds, the driver will reset the
USB device, also resetting bcm5974 and trackpad.

I can also reproduce this with the command:
$ sudo usbreset 05ac:0259

I can get the trackpad back into a working state by reloading the
bcm5974 driver:
$ sudo modprobe -r bcm5974; sudo modprobe bcm5974

I experimented with the driver and found that adding msleep(50) to
drivers/input/mouse/bcm5974.c:bcm5974_probe() was enough to allow the
trackpad to restart reliably after EPROTO errors and the usbreset
command.

Not sure if adding a sleep is the right way to fix this, or if I
should be looking more into the EPROTO error handling in HID or even
the source of the EPROTO errors in EHCI, power management or firmware.

Version/hardware info below, any input appreciated, thanks!
Liam

$ cat /proc/version
Linux version 6.18.4-arch1-1 (linux@archlinux) (gcc (GCC) 15.2.1
20260103, GNU ld (GNU Binutils) 2.45.1) #1 SMP PREEMPT_DYNAMIC Fri, 09
Jan 2026 19:43:48 +0000
https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/blob/ac8e7e814bb68e6291b4efd862ee9a72d7dc1165/config

$ lsusb -tvvv # only showing root containing kb/trackpad
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=ehci-pci/2p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    /sys/bus/usb/devices/usb4  /dev/bus/usb/004/001
    |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/8p, 480M
        ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
        /sys/bus/usb/devices/4-1  /dev/bus/usb/004/002
        |__ Port 008: Dev 003, If 0, Class=Hub, Driver=hub/2p, 480M
            ID 0424:2512 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
            /sys/bus/usb/devices/4-1.8  /dev/bus/usb/004/003
            |__ Port 001: Dev 004, If 0, Class=Hub, Driver=hub/3p, 12M
                ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub
(part of BCM2046 Bluetooth)
                /sys/bus/usb/devices/4-1.8.1  /dev/bus/usb/004/004
                Manufacturer=Apple Inc. Product=BRCM20702 Hub
                |__ Port 003: Dev 008, If 0, Class=Vendor Specific
Class, Driver=btusb, 12M
                    ID 05ac:828c Apple, Inc. Bluetooth Host Controller
                    /sys/bus/usb/devices/4-1.8.1.3  /dev/bus/usb/004/008
                    Manufacturer=Apple Inc. Product=Bluetooth USB Host
Controller
                |__ Port 003: Dev 008, If 1, Class=Wireless, Driver=btusb, 12M
                    ID 05ac:828c Apple, Inc. Bluetooth Host Controller
                    /sys/bus/usb/devices/4-1.8.1.3  /dev/bus/usb/004/008
                    Manufacturer=Apple Inc. Product=Bluetooth USB Host
Controller
                |__ Port 003: Dev 008, If 2, Class=Vendor Specific
Class, Driver=btusb, 12M
                    ID 05ac:828c Apple, Inc. Bluetooth Host Controller
                    /sys/bus/usb/devices/4-1.8.1.3  /dev/bus/usb/004/008
                    Manufacturer=Apple Inc. Product=Bluetooth USB Host
Controller
                |__ Port 003: Dev 008, If 3, Class=Application
Specific Interface, Driver=[none], 12M
                    ID 05ac:828c Apple, Inc. Bluetooth Host Controller
                    /sys/bus/usb/devices/4-1.8.1.3  /dev/bus/usb/004/008
                    Manufacturer=Apple Inc. Product=Bluetooth USB Host
Controller
            |__ Port 002: Dev 005, If 0, Class=Human Interface Device,
Driver=usbhid, 12M
                ID 05ac:0259 Apple, Inc. Internal Keyboard/Trackpad
                /sys/bus/usb/devices/4-1.8.2  /dev/bus/usb/004/005
                Manufacturer=Apple Inc. Product=Apple Internal
Keyboard / Trackpad
            |__ Port 002: Dev 005, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
                ID 05ac:0259 Apple, Inc. Internal Keyboard/Trackpad
                /sys/bus/usb/devices/4-1.8.2  /dev/bus/usb/004/005
                Manufacturer=Apple Inc. Product=Apple Internal
Keyboard / Trackpad
            |__ Port 002: Dev 005, If 2, Class=Human Interface Device,
Driver=bcm5974, 12M
                ID 05ac:0259 Apple, Inc. Internal Keyboard/Trackpad
                /sys/bus/usb/devices/4-1.8.2  /dev/bus/usb/004/005
                Manufacturer=Apple Inc. Product=Apple Internal
Keyboard / Trackpad

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-01-27 18:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-11 17:28 bcm5974 trackpad broken after USB reset Liam Mitchell
2026-01-11 19:59 ` Henrik Rydberg
2026-01-17 13:44   ` Liam Mitchell
2026-01-18  3:33     ` Henrik Rydberg
2026-01-18  9:59       ` Liam Mitchell
     [not found]       ` <CAOQ1CL74A+WLY_f+QJHQqV=Wvq8yzJktLZ2ByZ4vjfUSsra9EQ@mail.gmail.com>
     [not found]         ` <c2f1a90e-d6cb-480e-8f11-240b231adc84@bitmath.se>
2026-01-25 16:29           ` Liam Mitchell
2026-01-26 22:20             ` Henrik Rydberg
2026-01-27 18:25               ` Liam Mitchell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox