You are not logged in.

#1 2025-05-24 17:09:23

mitchell4136
Member
Registered: 2020-04-21
Posts: 11

Disable bad USB port using udev?

Hello everyone,

I had a bad usb port which is severely delaying my boot process by timing out when trying to enumerate it. Googling says udev rules can disable it, but most of the rules I am seeing is after the hardware has been identified and assigned attributes like manufacturer name, driver and such. I cannot disable the individual port via UEFI/BIOS and it is part of a 4-device hub making the case I/O ports.

Journalctl:

kernel: usb usb5-port5: unable to enumerate USB device
kernel: usb 5-5: device not accepting address 4, error -62
kernel: usb 5-5: device descriptor read/64, error -110

My failed attempt at a udev rule:

cat /etc/udev/rules.d/55-bad-usb.rules
SUBSYSTEM=="", DEVPATH=="/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:09:00.3/usb5/5-0:1.0/usb5-port5", KERNEL=="usb5-port5", DRIVER=="", ATTR{disable}=="1", ATTR{authorized}=="0"

udevadm info with attribute walk:

  looking at device '/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:09:00.3/usb5/5-0:1.0/usb5-port5':
    KERNEL=="usb5-port5"
    SUBSYSTEM==""
    DRIVER==""
    ATTR{connect_type}=="hotplug"
    ATTR{disable}=="0"
    ATTR{early_stop}=="no"
    ATTR{location}=="0x80000105"
    ATTR{over_current_count}=="0"
    ATTR{physical_location/dock}=="no"
    ATTR{physical_location/horizontal_position}=="left"
    ATTR{physical_location/lid}=="no"
    ATTR{physical_location/panel}=="front"
    ATTR{physical_location/vertical_position}=="upper"
    ATTR{power/control}=="auto"
    ATTR{power/runtime_active_time}=="1612105"
    ATTR{power/runtime_status}=="active"
    ATTR{power/runtime_suspended_time}=="0"
    ATTR{quirks}=="00000000"
    ATTR{state}=="default"
    ATTR{waiting_for_supplier}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:09:00.3/usb5/5-0:1.0':
    KERNELS=="5-0:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="hub"
    ATTRS{authorized}=="1"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bInterfaceClass}=="09"
    ATTRS{bInterfaceNumber}=="00"
    ATTRS{bInterfaceProtocol}=="00"
    ATTRS{bInterfaceSubClass}=="00"
    ATTRS{bNumEndpoints}=="01"
    ATTRS{supports_autosuspend}=="1"

  looking at parent device '/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:09:00.3/usb5':
    KERNELS=="usb5"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{authorized_default}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bMaxPower}=="0mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="0614"
    ATTRS{bmAttributes}=="e0"
    ATTRS{busnum}=="5"
    ATTRS{configuration}==""
    ATTRS{devnum}=="1"
    ATTRS{devpath}=="0"
    ATTRS{idProduct}=="0002"
    ATTRS{idVendor}=="1d6b"
    ATTRS{interface_authorized_default}=="1"
    ATTRS{ltm_capable}=="no"
    ATTRS{manufacturer}=="Linux 6.14.6-arch1-1 xhci-hcd"
    ATTRS{maxchild}=="6"
    ATTRS{power/active_duration}=="390435"
    ATTRS{power/autosuspend}=="0"
    ATTRS{power/autosuspend_delay_ms}=="0"
    ATTRS{power/connected_duration}=="1612107"
    ATTRS{power/control}=="auto"
    ATTRS{power/level}=="auto"
    ATTRS{power/runtime_active_time}=="390433"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="1221673"
    ATTRS{power/wakeup}=="disabled"
    ATTRS{power/wakeup_abort_count}==""
    ATTRS{power/wakeup_active}==""
    ATTRS{power/wakeup_active_count}==""
    ATTRS{power/wakeup_count}==""
    ATTRS{power/wakeup_expire_count}==""
    ATTRS{power/wakeup_last_time_ms}==""
    ATTRS{power/wakeup_max_time_ms}==""
    ATTRS{power/wakeup_total_time_ms}==""
    ATTRS{product}=="xHCI Host Controller"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{remove}=="(not readable)"
    ATTRS{rx_lanes}=="1"
    ATTRS{serial}=="0000:09:00.3"
    ATTRS{speed}=="480"

Thank you

Offline

Board footer

Powered by FluxBB