Question Windows sometimes does not see new USB devices and hangs during shutdown/restart.

Sep 8, 2024
6
0
10
Hello!

I have a rare issue with the system not seeing any new USB devices (as if they are not connected at all, not even the device connected sound) and hanging on "Shutting down" screen 100% of the time when that happens, resulting in a BSOD a few minutes later (DRIVER_POWER_STATE_FAILURE, caused by ntoskrnl.exe judging by BlueScreenView).

Yesterday it also showed my gamepad still connected to the system when I unplugged it (with a "Troubleshooting" icon, and trying to troubleshoot didn't do anything).

So my main problem is the system hanging during shutdown/restart, the USB part is a symptom and I don't really care as long as I can safely restart the system. It doesn't appear to be completely frozen (keyboard works for example), but something prevents it from shutting down properly. I'm also 99% sure the problem can only occur if I plug or unplug USB devices while the PC is running. If I don't change anything it never happens.

Here's the minidump file.

My pc: Win 10 Pro (21H2), i5-12400, B660 Tomahawk wifi ddr4 motherboard.

What I tried: updating all motherboard drivers, sfc /scannow when the issue occurs. Didn't help.

Any ideas how to fix this? Thanks.
 
Solution
check the mode switch on the back of the controller. it might have been set for xinput (non windows )
rather than for directinput (windows mode)
this bugcheck is generally some driver that goes to sleep then does not wake up. for example, a usb hub can go to sleep and not wake up. this would prevent all the devices connected to the hub from receiving the wake up signal.

in this case, you update the bios, update the chipset drivers for the cpu. on older systems you would update and external usb3 driver. Now, you also have to update the various devices, ie firmware in your mouse for example.

start cmd.exe as an admin then run
powercfg.exe /energy

then take a look at the report.
it might identify a device that is not working (old devices, or ones that need a update driver or firmware)


note: from the minidump I can see the problem is a usb device and windows plug and play was trying to remove and eject some device.
to see the proper debug info you would have to provide a kernel dump (memory.dmp file)

edit: the bad device was
Logitech, Inc.
F310 Gamepad [XInput Mode]

if this is already unplugged, the go into windows control panel, device manager, turn on the menu option to view hidden devices. it should show the usb devices that are disconnected and you can delete the driver.

you should look for firmware update for the device, then install the current driver if you can find one

check out this info about the mode switch on the controller
https://support.logi.com/hc/en-in/articles/360025338013--FAQ-Gamepad-F310

ie switch to directinput mode
 
Last edited:
  • Like
Reactions: Fyrfat
Sep 8, 2024
6
0
10
@johnbl first of all, thank you for the detailed reply.

I have disabled "Allow the computer to turn off this device to save power" for pretty much anything I could find in the Device Manager, including USB hubs, so they should not be going to sleep mode.

The problem with deleting the driver while the gamepad is in this "unresponsive" state is that the Device Manager becomes unresponsive too as soon as I try to either delete the driver or scan for hardware changes. I even tried to delete the USB controller driver, which resulted in my mouse and keyboard disconnecting, but not the gamepad...

As for drivers/firmware, there's none for this gamepad from what I can tell. But I'll try switching to directinput mode to see if it helps.

What really surprises me is that there seems to be no way to stop the system from hanging on the "Shutting down" screen, even though aside from the unresponsive usb ports the system works fine.
 
Sep 8, 2024
6
0
10
Just a quick update, it seems like switching to directinput mode fixed the issue. I've had no issues for the past month. Thank you, @johnbl !

I still, unfortunately, have no idea if it's something wrong with usb controller or my drivers or it's the gamepad that doesn't work properly in xinput mode, but at least it doesn't bother me anymore.