operating-system
operating-system copied to clipboard
USB device (Zigbee controller) not appearing on OS versions after 12.2 on Home Assistant Blue
Describe the issue you are experiencing
(Previously discussed in the comments of #3347 but I think my issue is different enough that I should open a new one)
When I first upgraded to 12.4 in June my Zigbee controller was not recognized by the kernel. No /dev/ttyUSB device appeared, so Zigbee didn't work. I fixed by downgrading to 12.2 (although, strangely, it's necessary to reboot again after downgrading to fix the issue).
This weekend I tried upgrading to 13.1 in the hope that this might have been fixed in the interim. But the symptoms remain the same as on 12.4.
I don't see any errors in the host logs. The first relevant log message that appears in the success case but not the failure case is
usbcore: registered new interface driver ch341
It seems like the failure case simply never notices the USB Serial device and registers the driver.
I tried connecting my USB device to a different port; it didn't affect the results.
What operating system image do you use?
odroid-n2 (Hardkernel ODROID-N2/N2+)
What version of Home Assistant Operating System is installed?
13.1
Did the problem occur after upgrading the Operating System?
Yes
Hardware details
- Standard Home Assistant Blue
- USB CC2652R1 Zigbee coordinator
Steps to reproduce the issue
- Boot HA OS 12.4 or 13.1
- Observe that USB serial device is absent from
/dev.
Anything in the Supervisor logs that might be useful for us?
Nothing relevant.
Anything in the Host logs that might be useful for us?
I've gathered host logs for three different scenarios:
- 13.1, where finding the USB device always fails (tried 4 times).
- 12.2, first boot after downgrading, where finding the USB device fails (tried twice)
- 12.2 on subsequent boots, where finding the USB device succeeds (tried at least twice)
I'll attach the full logs below, but here are some extracted highlights, after running those full logs through sed -r 's/^([^ ]* ){3}//' | grep -iE 'usb|hub|ch341':
13.1 failure:
kernel: usbcore: registered new interface driver usbfs
kernel: usbcore: registered new interface driver hub
kernel: usbcore: registered new device driver usb
kernel: usbcore: registered new interface driver uas
kernel: usbcore: registered new interface driver usb-storage
kernel: usbcore: registered new interface driver usbserial_generic
kernel: usbserial: USB Serial support registered for generic
kernel: usbcore: registered new interface driver usbhid
kernel: usbhid: USB HID core driver
kernel: dwc3-meson-g12a ffe09000.usb: USB2 ports: 2
kernel: dwc3-meson-g12a ffe09000.usb: USB3 ports: 1
kernel: dwc2 ff400000.usb: supply vusb_d not found, using dummy regulator
kernel: dwc2 ff400000.usb: supply vusb_a not found, using dummy regulator
kernel: dwc2 ff400000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM
kernel: xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
kernel: xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
kernel: xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
kernel: hub 1-0:1.0: USB hub found
kernel: hub 1-0:1.0: 2 ports detected
kernel: usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
kernel: hub 2-0:1.0: USB hub found
kernel: hub 2-0:1.0: 1 port detected
kernel: dwc3-meson-g12a ffe09000.usb: switching to Device Mode
systemd[1]: Reached target Hardware activated USB gadget.
kernel: usb 1-1: new high-speed USB device number 3 using xhci-hcd
kernel: hub 1-1:1.0: USB hub found
kernel: hub 1-1:1.0: 4 ports detected
kernel: usb 2-1: new SuperSpeed USB device number 3 using xhci-hcd
kernel: hub 2-1:1.0: USB hub found
kernel: hub 2-1:1.0: 4 ports detected
12.2 failure:
kernel: usbcore: registered new interface driver usbfs
kernel: usbcore: registered new interface driver hub
kernel: usbcore: registered new device driver usb
kernel: usbcore: registered new interface driver uas
kernel: usbcore: registered new interface driver usb-storage
kernel: usbcore: registered new interface driver usbserial_generic
kernel: usbserial: USB Serial support registered for generic
kernel: usbcore: registered new interface driver usbhid
kernel: usbhid: USB HID core driver
kernel: dwc3-meson-g12a ffe09000.usb: USB2 ports: 2
kernel: dwc3-meson-g12a ffe09000.usb: USB3 ports: 1
kernel: dwc2 ff400000.usb: supply vusb_d not found, using dummy regulator
kernel: dwc2 ff400000.usb: supply vusb_a not found, using dummy regulator
kernel: dwc2 ff400000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM
kernel: xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
kernel: xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
kernel: xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
kernel: hub 1-0:1.0: USB hub found
kernel: hub 1-0:1.0: 2 ports detected
kernel: usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
kernel: hub 2-0:1.0: USB hub found
kernel: hub 2-0:1.0: 1 port detected
kernel: dwc3-meson-g12a ffe09000.usb: switching to Device Mode
systemd[1]: Reached target Hardware activated USB gadget.
kernel: usb 1-1: new high-speed USB device number 4 using xhci-hcd
kernel: hub 1-1:1.0: USB hub found
kernel: hub 1-1:1.0: 4 ports detected
kernel: usb 2-1: new SuperSpeed USB device number 4 using xhci-hcd
kernel: hub 2-1:1.0: USB hub found
kernel: hub 2-1:1.0: 4 ports detected
12.2 success:
kernel: usbcore: registered new interface driver usbfs
kernel: usbcore: registered new interface driver hub
kernel: usbcore: registered new device driver usb
kernel: usbcore: registered new interface driver uas
kernel: usbcore: registered new interface driver usb-storage
kernel: usbcore: registered new interface driver usbserial_generic
kernel: usbserial: USB Serial support registered for generic
kernel: usbcore: registered new interface driver usbhid
kernel: usbhid: USB HID core driver
kernel: dwc3-meson-g12a ffe09000.usb: USB2 ports: 2
kernel: dwc3-meson-g12a ffe09000.usb: USB3 ports: 1
kernel: dwc2 ff400000.usb: supply vusb_d not found, using dummy regulator
kernel: dwc2 ff400000.usb: supply vusb_a not found, using dummy regulator
kernel: dwc2 ff400000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM
kernel: xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
kernel: xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
kernel: xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
kernel: hub 1-0:1.0: USB hub found
kernel: hub 1-0:1.0: 2 ports detected
kernel: usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
kernel: hub 2-0:1.0: USB hub found
kernel: hub 2-0:1.0: 1 port detected
kernel: dwc3-meson-g12a ffe09000.usb: switching to Device Mode
kernel: usb 1-1: new high-speed USB device number 2 using xhci-hcd
kernel: hub 1-1:1.0: USB hub found
kernel: hub 1-1:1.0: 4 ports detected
kernel: usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
kernel: hub 2-1:1.0: USB hub found
kernel: hub 2-1:1.0: 4 ports detected
kernel: usb 1-1.1: new full-speed USB device number 3 using xhci-hcd
kernel: usbcore: registered new interface driver ch341
kernel: usbserial: USB Serial support registered for ch341-uart
kernel: ch341 1-1.1:1.0: ch341-uart converter detected
kernel: usb 1-1.1: ch341-uart converter now attached to ttyUSB0
systemd[1]: Reached target Hardware activated USB gadget.
There's not much difference before the USB serial messages, but here are some things I noticed:
- In the 12.2 and 13.1 failure cases, the USB hub is detected much later in the boot process than in the 12.2 success case. So perhaps there's some kind of race condition where the attached USB devices only get detected properly when the hub is detected early enough?
- In the failure cases the USB hubs get assigned device number 3 or 4, but in the success case they get assigned device number 2. Even though in the failure cases I don't see any other USB devices getting assigned lower numbers, so I am puzzled as to why they would be getting 3 or 4. This may relate to the fact that the hubs get detected later.
System information
No response
Additional information
Full host logs for the three scenarios discussed above:
logs-13.1-failed.txt logs-12.2-failed.txt logs-12.2-success.txt