USB Audio Device Preventing Sleep (Windows 10)
Background
I have been having issues with my computer not entering sleep and also waking from sleep since Window 8.1. I had hoped that Windows 10 would resolve these issues, but unfortunately this is not the case. I had noticed that the problem would occur whenever my headset (Hyper X Cloud II) was plugged in, but it was not exclusively occurring when plugged in.
I recently got extremely fed up with my computer waking from sleep very consistently and decided once again to try and solve the problem.
Attempted Fixes
To start off, in Power Management:
- Disabled wake timers
- Enabled USB selective suspend
- Set the computer sleep time to 1 minute of inactivity to see if any changes had an effect
To identify the cause of what's keeping the computer from waking I used powercfg in an elevated command prompt:
powercfg -requests
Which returns the following:
SYSTEM:
[DRIVER] Realtek High Definition Audio (HDAUDIO\FUNC_01&VEN_10EC&DEV_0892&SUBSYS_1043860B&REV_1003\4&165326bb&0&0001)
An audio stream is currently in use.
[DRIVER] USB Audio Device (USB\VID_0951&PID_16A4&MI_00\6&3321d09b&1&0000)
An audio stream is currently in use.
[DRIVER] Legacy Kernel Caller
What I had noticed with my headset was confirmed by the USB Audio Device
entry under system. If I unplugged my headset, both the USB Audio Device
and the Legacy Kernel Caller
entries were gone upon running powercfg -requests
again.
The problem still persisted after unplugging the headset. So I then ran the following command to prevent the Realtek High Definition Audio
driver from preventing sleep.
powercfg -REQUESTSOVERRIDE DRIVER "Realtek High Definition Audio" SYSTEM
This did in fact allow my computer to enter sleep. Upon plugging in my headset again, the problem came back. So naturally I executed REQUESTSOVERRIDE
again for the related headset drivers:
powercfg -REQUESTSOVERRIDE DRIVER "USB Audio Device" SYSTEM
powercfg -REQUESTSOVERRIDE DRIVER "Legacy Kernel Caller" SYSTEM
Unfortunately this did not fix the problem. To ensure that my REQUESTSOVERRIDE
command took effect I ran:
powercfg -REQUESTSOVERRIDE
Which did show that my override requests were in effect:
[DRIVER]
Realtek High Definition Audio SYSTEM
USB Audio Device SYSTEM
Legacy Kernel Caller SYSTEM
After this I tried:
- Using Device Manager and ensuring every USB port was permitted to turn off devices in order to enter sleep
- Uninstalling the Hyper X Cloud II device and reinstalling
- Confirming the
powercfg -requests
entries withpowercfg -energy
report - Control Panel -> Sound -> Headset Earphone-> Advanced and unticked "Allow applications to take exclusive control of this device"
TL;DR
How can I prevent my USB Audio Device (in this case Hyper X Cloud II Headset) from preventing my computer to enter sleep?
I have used powercfg -REQUESTSOVERRIDE
to remove all entries that come up in powercfg -requests
and ensured in Device Manager that all USB ports are able to turn off devices to allow the computer to sleep.
Solution 1:
I have had that problem but solved it entirely, here are the steps:
NOTICE: I have an older HP laptop, after applying these steps I did set the computer to go to sleep after 1 minute then the screen turned off after 1 minute, BUT for the computer to go into sleep mode actually took around 3 to 4 minutes to actually enter sleep mode. That's because Windows services/processes and applications have to finish their work on my older laptop.
IMPORTANT: After finishing this procedure and running all the commands and adding all request overrides it is important to restart the computer.
Follow these steps:
Open up 'Group Policy Editor' by clicking the 'Start' menu and typing 'edit group policy', and open up the Group Policy Editor.How to open Group Policy Editor
In the 'Group Policy Editor' do the following:
Click: Computer Configuration Click: Administrative Templates Click: System Click: Power Management Click: Sleep Settings
Once in Sleep Settings
change the following settings:
Example: find the 'Allow applications to prevent automatic sleep (plugged in)' setting and change it to DISABLED. Below is a list of all the settings that need to be changed in the Group Policy Editor. You may not have all those setting entries, or wording may differ. Allow applications to prevent automatic sleep (plugged in) DISABLED Allow applications to prevent automatic sleep (on battery) DISABLED Turn on the ability for applications to prevent sleep transitions DISABLED Allow standby states (S1-S3) when sleeping (plugged in) ENABLED Allow standby states (S1-S3) when sleeping (on battery) ENABLED
After changing those settings in the Group Policy Editor you must restart the computer.
Now for the rest of this you'll need to open up the Windows 'command prompt'.
To open the 'command prompt' click on the 'Start' menu and type 'command prompt', then click on the 'command prompt' app and open it.
How to open Command Prompt
In the command prompt you'll be running a command called powercfg.exe
Type this at the command prompt:
powercfg.exe -reqeusts
When I type that at my command prompt while listening to YouTube on Microsoft Edge browser I get the following output:
C:\Windows\system32>powercfg -requests
DISPLAY:
[PROCESS] \Device\HarddiskVolume2\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
Video Wake Lock
SYSTEM:
[DRIVER] Realtek High Definition Audio (HDAUDIO\FUNC_01&VEN_10EC&DEV_0282&SUBSYS_103C8074&REV_1000\4&209dcc63&0&0001)
An audio stream is currently in use.
AWAYMODE:
None.
EXECUTION:
[PROCESS] \Device\HarddiskVolume2\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
Playing audio
PERFBOOST:
None.
ACTIVELOCKSCREEN:
None.
So as soon as I open up the Edge browser and listen to YouTube, after running the powercfg.exe -requests
the above output says that:
- There's msedge.exe under
DISPLAY
, and it is also underEXECUTION
- and, also there's my Realtek High Definition Audio under
SYSTEM
So when I have Ms Edge browser open with YouTube running, I then run powercfg -requests
command and msedge.exe appears under DISPLAY
and EXECUTION
.
Also while listening to YouTube, the Edge browser uses the Realtek High Definition Audio and it appears under SYSTEM
.
Therefore, I add the High Definition Audio and Edge browser to requestsoverrides, like so:
I made sure to add the Realtek High Definition Audio in several ways:
powercfg.exe -requestsoverride DRIVER "Realtek High Definition Audio (HDAUDIO\FUNC_01&VEN_10EC&DEV_0282&SUBSYS_103C8074&REV_1000\4&209dcc63&0&0001)" SYSTEM DISPLAY AWAYMODE
powercfg.exe -requestsoverride DRIVER "HDAUDIO\FUNC_01&VEN_10EC&DEV_0282&SUBSYS_103C8074&REV_1000\4&209dcc63&0&0001" SYSTEM DISPLAY AWAYMODE
powercfg.exe -requestsoverride DRIVER "*Realtek*" SYSTEM DISPLAY AWAYMODE
Look at the last line and notice "*Realtek*"
has ' * ' on both sides, that's to ensure that any requests with word "Realtek" will be ignored.
And also for my Edge browser I added requestsoverride entries in two different ways, like so:
powercfg.exe -requestsoverride PROCESS "\Device\HarddiskVolume2\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" SYSTEM DISPLAY AWAYMODE EXECUTION
powercfg.exe -requestsoverride PROCESS "msedge.exe" SYSTEM DISPLAY AWAYMODE EXECUTION
When I run the command powercfg.exe -requestsoverride
at the command prompt here's the output, and that is how I have it configured:
[SERVICE]
[PROCESS]
\Device\HarddiskVolume2\Program Files (x86)\Microsoft\Edge\Application\msedge.exe DISPLAY SYSTEM AWAYMODE EXECUTION
\Device\HarddiskVolume2\Users\Robert\AppData\Roaming\Spotify\Spotify.exe DISPLAY SYSTEM AWAYMODE EXECUTION
Spotify.exe DISPLAY SYSTEM AWAYMODE EXECUTION
msedge.exe DISPLAY SYSTEM AWAYMODE EXECUTION
[DRIVER]
Realtek High Definition Audio (HDAUDIO\FUNC_01&VEN_10EC&DEV_0282&SUBSYS_103C8074&REV_1000\4&209dcc63&0&0001) DISPLAY SYSTEM AWAYMODE
*Realtek* DISPLAY SYSTEM AWAYMODE
HDAUDIO\FUNC_01&VEN_10EC&DEV_0282&SUBSYS_103C8074&REV_1000\4&209dcc63&0&0001 DISPLAY SYSTEM AWAYMODE
Legacy Kernel Caller DISPLAY SYSTEM AWAYMODE
And as you can see from that output I also have added the Spotify music app to my request overrides, and once I also noticed that there was Legacy Kernel Caller, so I also added it to request overrides.
After adding all request overrides and restarting your computer set your computer sleep time at 1 minute and see if it goes to sleep after one minute.
NOTICE: I have an older HP laptop, and when I did set the computer to go to sleep after 1 minute then the screen turned off after 1 minute, BUT for the computer to go into sleep mode actually took around 3 to 4 minutes to actually enter sleep mode. That's because Windows services/processes and applications have to finish their work on my older laptop.
Solution 2:
I just realized that turning off Cortana's "always listening" feature seems to fix the problem.