Ticket #10764 (new defect)

Opened 6 years ago

Last modified 3 years ago

VirtualBox 4.1.18r78361 prevents Windows 7 host from sleeping/entering standby

Reported by: bgx90 Owned by:
Priority: major Component: other
Version: VirtualBox 4.1.18 Keywords: sleep, standby, Windows
Cc: Guest type: Linux
Host type: Windows


While VirtualBox is running, my Windows 7 host OS will not enter standby/sleep after the time of inactivity specified in my Windows power scheme has elapsed. When I close VirtualBox, Windows sleeps after the time specified in the power scheme. This problem started after I upgraded to 4.1.18r78361. This is very inconvenient because I like to keep my guest OS running, so I have to remember to put my host computer into standby whenever I leave the computer or it will needlessly stay on.

Change History

comment:1 Changed 5 years ago by Syltrem

Same problem here with 4.2.18 but I don't think it ever worked in any version. Or maybe when I manually put the computer to sleep once, then it would work automatically until the next reboot. Can't remember what version that was (probably 4.1.x). But with 4.2.18 that does not help.

comment:2 Changed 3 years ago by starzig

Hi all,

I can reproduce the issue on very latest VirtualBox 5.10 on Windows x64 7 host, with Ubuntu 12.04 guest and Windows 7 guest.

In my case, this happens systematically if I enable audio in the guest's settings, and seem to disappear after I disable it.

I noticed on the host that the command :

C:\Dev\Console2> powercfg -requests


[DRIVER] High Definition Audio Device (HDAUDIO\FUNC_01&VEN_10EC&DEV_0283&SUBSYS_17AA3807&REV_1000\4&2426718c&0&0001)
An audio stream is currently in use.


shows that audio is always on even if you don't play any sound in the guest. Apparently it prevents the host from going to sleep. I don't see any option in the sound device control panel of the host to change that. Also, other applications on the host using audio don't seem to prevent sleep from working, so I 'm not quite sure why it happens for VB only. (for example, I can use Clementine music player on the host, if I put it in pause, it will keep the audio device active (just like VB), but won't prevent the host from going to sleep nevertheless)

Since disabling audio fix the issue in my case, I can live with it (I didn't need audio, it had only been enabled by default).

Hope this report can help.

Last edited 3 years ago by starzig (previous) (diff)

comment:3 Changed 3 years ago by starzig

My guess (it's only a guess because I didn't look in the code) is that VB must be injecting audio samples permanently into the audio device, even when nothing is being currently playing (in this case it must be injecting silence). Windows must see this as activity and decide not to sleep based on this.

Compared to a different application (Clementine) : if it's playing music, it also prevent the host from sleeping, but when in pause, even though it didn't release the device, it stops injecting new data and thus Windows can go to sleep.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use