diff options
| author | 2026-11-23 01:05:25 +0100 | |
|---|---|---|
| committer | 2026-11-23 01:05:25 +0100 | |
| commit | b741400a0bad80c00c946cc7f98a672f5d516a5a (patch) | |
| tree | 73f0a9c4e293f316d4cabc76b42a8c9e84bc890d | |
| parent | 7bcdc4104da6db55af3275da3e0ec86996c0f6ab (diff) | |
| download | usbmuxd-b741400a0bad80c00c946cc7f98a672f5d516a5a.tar.gz usbmuxd-b741400a0bad80c00c946cc7f98a672f5d516a5a.tar.bz2 | |
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.
| -rw-r--r-- | src/usb.c | 6 | ||||
| -rw-r--r-- | udev/39-usbmuxd.rules.in | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -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 |
