20

Trying to debug an issue with an ethernet usb-c adaptor, I found that dmesg reports this:

usb: port power management may be unreliable

What does this mean? Where can I find a reliable documentation about this message?

cjorssen
  • 253
  • 1
  • 2
  • 7

1 Answers1

17

The message was introduced in usb: sysfs link peer ports (it's part of a patch sequence reworking USB port power control). The underlying issue is described in Power Management for USB in the kernel documentation:

Port suspend is sequenced to guarantee that hi-speed ports are powered-off before their superspeed peer is permitted to power-off.

(amongst other things).

Basically, USB 3 ports have a USB 2 peer from the controller's perspective, and which peer is used depends on the USB speed in use by the connected device. To manage power properly on such ports, the system needs to know which logical ports are peers: otherwise, it might power down a physical USB port which appears to be unused when in fact it is in use. The error message you're seeing indicates that, for some reason, the kernel was unable to determine a port's peer; as a result, it won't be able to handle all the power management scenarios for devices connected to that port.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
  • 3
    Is there a way to determine which port is causing this issue? Anything a user is suppose to do? – Sun Bear Apr 11 '19 at 16:44
  • @SunBear not short of trial-and-error I don't think. Basically, watch the kernel log (or `watch -n 1 lsusb`) and observe the port assignments as you plug/unplug various things. Keep in mind a device may get a different ID when reconnected, so if your mouse was showing up as `bus 002 device 003`, if you unplug/plug it could end up `bus 002 device 017` or the like. I'm not sure what determines the device number and whether it gets reused or not. – Doktor J Jun 26 '19 at 16:44
  • 1
    @DoktorJ So, this message is supposed to repeat at the moment you plug something in an USB port? – Carlo Wood Feb 17 '22 at 14:28
  • @DoktorJ I concur with Carlo Wood and Sun Bear. I observed `lsusb` and `dmesg| tail -50` but got no additional insights. Which messages of which command are we supposed to observe while plugging and unplugging USB devices, and how to derive an answer to Sun Bear's question from that? – AlMa0 Jul 19 '23 at 18:44