VirtualBox wakes Windows 10 up from sleep mode (?)

Discussions related to using VirtualBox on Windows hosts.
Post Reply
CodeVisio
Posts: 16
Joined: 15. Mar 2016, 23:58

VirtualBox wakes Windows 10 up from sleep mode (?)

Post by CodeVisio »

Hello everyone,

After some research I have found that VirtualBox causes Windows to wake up from sleep mode. At least that is what happens to me.

The following are the steps I've followed:
I regularly let Windows going in sleep mode so o my way back I find everything as it was before including VirtualBox running and its VMs.
After about one minutes of sleeping mode, Windows wakes up again 'autonomously', without my intervention.
On the Command Prompt (executed with admin privileges) I ran the command 'powercfg -lastwake' in order to know what has woken Window up the last time.
The following was the output:

Code: Select all

C:\Windows\system32>powercfg -lastwake
Wake History Count - 1
Wake History [0]
  Wake Source Count - 1
  Wake Source [0]
    Type: Wake Timer
    Owner: [PROCESS] \Device\HarddiskVolume4\Program Files\Oracle\VirtualBox\VBoxSVC.exe
As counterproof, I closed all VMs and I closed also VirtualBox main program. Then I let Windows going in sleep mode.
At that point Windows didn't wake up 'autonomously' as expected.

Any ideas how to prevent that? or to force VBox to accept the sleep mode from host?

Thank you

P.S.
VirtualBox version: the last plus guest additions
Windows 10.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtualBox wakes Windows 10 up from sleep mode (?)

Post by mpack »

I would try disabling the bridged networking service on your network cards. Waking up on LAN activity seems like a credible cause of this issue. I know that my Win8.1 tablet wakes up periodically for update checks when it appears to be asleep (I've seen it appear and disappear on my router table). Actually what I'd do is disable automatic updates, if I had your problem.
CodeVisio
Posts: 16
Joined: 15. Mar 2016, 23:58

Re: VirtualBox wakes Windows 10 up from sleep mode (?)

Post by CodeVisio »

Hi mpack,

do you know where I find the 'bridged networking service' on my network cards?
Because it seems there isn't. I assume you meant on the host.

I have basically two items under Control Panel | Network Connections:
- Ethernet
- Virtual Box Host-Only Network.

I checked both (properties) but I couldn't find anything related to a "bridge network".

Under Windows 10 it seems impossible to disable the check of basic/important updates as it was for Win7.
So I changed the settings on the VM with Win7 only.

However, my problem happens also when I close the only VM (saving its state) but leaving the VirtualBox main app running and then putting the PC (Windows 10) in sleep mode.

Thanks
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtualBox wakes Windows 10 up from sleep mode (?)

Post by mpack »

Sorry, I don't use Windows 10, so I can only offer general Windows guidance. On an XP host I go to control panel | Network Connections, pick a NIC (in your case that would be your Ethernet adapter), view its properties and I'll see a list of services attached to this NIC such as "Client for Microsoft Networks". The VirtualBox Bridged Networking Driver is among the latter services.
CodeVisio
Posts: 16
Joined: 15. Mar 2016, 23:58

Re: VirtualBox wakes Windows 10 up from sleep mode (?)

Post by CodeVisio »

No problem.

Well, then I have already checked that between that list and unfortunately there is no item that refers to "bridge network" or something like that.

Thanks anyway
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtualBox wakes Windows 10 up from sleep mode (?)

Post by mpack »

I gave you the exact wording to look for, so I'm surprised you mention looking for "bridged or something like that".
CodeVisio
Posts: 16
Joined: 15. Mar 2016, 23:58

Re: VirtualBox wakes Windows 10 up from sleep mode (?)

Post by CodeVisio »

Yes, sure. I wrote that because I was in a hurry.

But I really had in my mind the VirtualBox Bridged Networking Driver

Thanks!
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: VirtualBox wakes Windows 10 up from sleep mode (?)

Post by BillG »

If you are using bridged mode, your host and guest are in the same network, so either can wake the other if wake on LAN is enabled.

To stop your host being woken up, disable wake on LAN on the network adapter in your host OS. It is not anything to do with VirtualBox at this stage, it is simply whether your physical network card has WOL enabled or not.

From Windows 10 go to Network and Sharing Center and select you NIC card. Go to Properties, then Configure then Advanced. Turn off wake on LAN. Exactly what it is called will depend on what NIC you are using.
Bill
snop3
Posts: 1
Joined: 13. May 2016, 12:29

Re: VirtualBox wakes Windows 10 up from sleep mode (?)

Post by snop3 »

I'm solving the same problem right now, I tried to disable bridged network driver. Let you know if it helped.
Feevo
Posts: 8
Joined: 21. Nov 2013, 17:17

VirtualBox 5.1.2 wakes Windows 10 up from sleep mode (?)

Post by Feevo »

In my case it will wake system if Manager is opened :!:
kchan
Posts: 4
Joined: 27. Jul 2016, 07:18
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: FreeBSD, Windows

Re: VirtualBox wakes Windows 10 up from sleep mode (?)

Post by kchan »

I had the same problem before. As long as a VBox guest is running, it will wake up the host. After hours of tinkering about, I fixed mine by disabling "Allow hybrid sleep" in Control Panel -> Hardware and Sound -> Power Options -> Change plan settings -> Change advanced power settings, and under Sleep.
Feevo
Posts: 8
Joined: 21. Nov 2013, 17:17

VirtualBox 5.1.4 wakes Windows 10 up from sleep mode (?)

Post by Feevo »

Same problem in 5.1.4. Even when no guest OS is running - only VirtualBox.exe (manager) :!:
kchan wrote:I fixed mine by disabling "Allow hybrid sleep" in Control Panel -> Hardware and Sound -> Power Options -> Change plan settings -> Change advanced power settings, and under Sleep.
but there is nothing wrong with hybrid sleep when VBox is not running...
mfafa
Posts: 5
Joined: 30. Sep 2017, 13:27

Re: VirtualBox wakes Windows 10 up from sleep mode (?)

Post by mfafa »

I too found that Virtualbox was waking my computer (when I am putting my Win10 host OS to sleep while a VM is still running.)

Code: Select all

PS C:\Users\Harald> powercfg -lastwake
Wake History Count - 1
Wake History [0]
  Wake Source Count - 1
  Wake Source [0]
    Type: Wake Timer
    Owner: [PROCESS] \Device\HarddiskVolume4\Program Files\Oracle\VirtualBox\VBoxSVC.exe
PS C:\Users\Harald>
I checked my my network adapters that "allowing this device to wake the computer", and it was indeed unchecked.

But I should think I have found a solution in (Win10) Power Options --> Advanced Settings --> Sleep --> Allow wake timers -- DISABLE
wkujawa
Posts: 1
Joined: 8. Jul 2018, 14:00

Re: VirtualBox wakes Windows 10 up from sleep mode (?)

Post by wkujawa »

mfafa wrote:But I should think I have found a solution in (Win10) Power Options --> Advanced Settings --> Sleep --> Allow wake timers -- DISABLE
Thanks mfafa. That helped me too. Before I have disallowed waking on network interfaces, mouse and keyboard but that have not solved problem (anyway I wanted to disable that too). I have found setting you have shown by pressing windows key and searching for "Edit power plan" --> Change advanced power settings --> Sleep --> Allow wake timers --> Disable.

My investigation of what have woken up PC:

Code: Select all

>powercfg -lastwake
Wake History Count - 1
Wake History [0]
  Wake Source Count - 1
  Wake Source [0]
    Type: Wake Timer
    Owner: [PROCESS] \Device\HarddiskVolume7\Program Files\Oracle\VirtualBox\VBoxSVC.exe
That "Type: Wake Timer" points to your solution.
Post Reply