From b741400a0bad80c00c946cc7f98a672f5d516a5a Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Mon, 23 Nov 2026 01:05:25 +0100 Subject: Don't force a configuration on the iBridge/T2 (05ac:8600) The internal T1 of a MacBook Pro is driven by a kernel driver that selects its own configuration (e.g. 2 with the Linux T1 stack). The udev rule forced configuration 1, and usbmuxd itself switched the configuration and detached kernel drivers when it found the device. Remove the bConfigurationValue assignment from the 8600 udev rule, and in set_valid_configuration() only accept the currently active configuration for an already configured 8600 device. --- src/usb.c | 6 ++++++ udev/39-usbmuxd.rules.in | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/usb.c b/src/usb.c index c238b22..1907d45 100644 --- a/src/usb.c +++ b/src/usb.c @@ -532,6 +532,12 @@ static int set_valid_configuration(struct libusb_device* dev, struct usb_device usbmuxd_log(LL_NOTICE, "Could not get configuration %i descriptor for device %i-%i: %s", j, bus, address, libusb_error_name(res)); continue; } + // iBridge/T2 may be owned by a kernel driver (e.g. the internal T1 of + // a MacBook Pro); never switch an already configured one + if(devdesc.idProduct == PID_APPLE_T2_COPROCESSOR && current_config != 0 && j != current_config) { + libusb_free_config_descriptor(config); + continue; + } for(k = 0 ; k < config->bNumInterfaces ; k++) { intf = &config->interface[k].altsetting[0]; if(intf->bInterfaceClass == INTERFACE_CLASS || diff --git a/udev/39-usbmuxd.rules.in b/udev/39-usbmuxd.rules.in index 730d64c..44e26be 100644 --- a/udev/39-usbmuxd.rules.in +++ b/udev/39-usbmuxd.rules.in @@ -5,8 +5,8 @@ SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9ab][0-9a-f] # Initialize iOS devices into "deactivated" USB configuration state and activate usbmuxd SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9ab][0-9a-f]/*|5ac/190[1-5]/*", ACTION=="add", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}="0", OWNER="usbmux", @udev_activation_rule@ -# but make sure iBridge (T1) doesn't end up in an unconfigured state -SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/8600/*", ACTION=="add", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}="1", OWNER="usbmux", @udev_activation_rule@ +# but leave the configuration of iBridge (T1/T2) alone, it may be owned by a kernel driver +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/8600/*", ACTION=="add", ENV{USBMUX_SUPPORTED}="1", OWNER="usbmux", @udev_activation_rule@ # Make sure properties don't get lost when bind action is called -- cgit v1.1-32-gdbae