On 02.10.2018 16:06, Jan Kara wrote:
Hello, my wife has HP 255 G6 laptop. When it is attached to AC, everything works as expected however when it is running on battery, USB hotplug stops working - newly plugged devices do not appear to be visible to the kernel. Only when the AC is plugged back in, the kernel suddently wakes up and detects all newly attached devices. Maybe it is related to some power management? Any idea how to debug this? Dmesg from the system is attached. The kernels I've tested with (both behave the same way) are 4.18.11 kernel and also openSUSE Leap 15 kernel which is 4.12-based. Thanks in advance for any help.
Are you running laptop mode tools or similar that would enable runtime suspend D3 state for xhci controller? what does lspci -vv say? check the content of the following files while running on battery: cat /sys/bus/pci/devices/0000:00:10.0/firmware_node/power_state cat /sys/bus/pci/devices/0000:00:10.0/power/control try: echo on > /sys/bus/pci/devices/0000:00:10.0/power/control before pluggin in a usb device, does it help? cat /proc/acpi/wakeup content could be useful Also full dmesg including first plugging in the usb device, and then the AC power. It will show if the connected devices are USB2 or USB3 devices, and if they are connected to EHCI of xHC controller? Thanks Mathias