VirtualBox freezes after Windows inactivity/sleep

Discussions related to using VirtualBox on Windows hosts.
vb_user_6128
Posts: 21
Joined: 15. Jan 2018, 23:54

Re: VirtualBox freezes after Windows inactivity/sleep

Post by vb_user_6128 »

fth0 wrote:Regarding the issue of vb_user_6128 (the OP), I suspect it to be.
Did you mean to add something after the "it to be" text in the quote above? Is my issue also related to audio?
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VirtualBox freezes after Windows inactivity/sleep

Post by fth0 »

vb_user_6128 wrote:Did you mean to add something after the "it to be" text in the quote above?
No, I just omitted the repetition of "audio related".
vb_user_6128 wrote:Is my issue also related to audio?
I suspect it to be (ups, did it again ;)). Otherwise, why should I ask you to test a new VirtualBox version with especially audio-related changes?

Seriously, when your monitor powers on or off, the corresponding audio output device appears or vanishes. Take a look at the end of the Ubuntu-2021-06-02-23-40-29.log file to see for yourself.
tgioiosa
Posts: 1
Joined: 22. Jan 2022, 01:36

Re: VirtualBox freezes after Windows inactivity/sleep

Post by tgioiosa »

I realize this thread is over 6 months old, but I wanted to add what worked for me when I encountered ACHI resets and Virtualbox guest locking/freezing on my Windows 10 system. Both host and guest are Windows 10, and the guest VM I created would always lock up after several minutes, with the guest OS not responding to anything. However, the mouse still moved, just nothing could be clicked on to open. I'm using Virtualbox v6.1.32.

After reading all the posts on the issue I tried setting guest Power options to never shut down hard drives or monitors and to use Maximum performance. Still locked up.
Then I made sure I had decent settings for the VM, 4 CPU's(out of 16), 4GB Ram(out of 32GB), 50GB storage drive, Display using 256MB, 1 monitor, VboxSVGA with 3D enabled. But still no luck.

What I ended up doing to get a stable VM was to specify the Hard Drive be created on a secondary SSD drive instead of my boot drive (which was a NVMe drive), and I also set it to a fixed size instead of dynamic.
After doing that I have had no lock ups when running the guest. Been working for several hours now with no problems.

Could Virtualbox have a problem running guest VM's from NVMe storage devices?
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: VirtualBox freezes after Windows inactivity/sleep

Post by arQon »

Possible, but highly unlikely.

As was covered already in one of these (understandably, many) threads wrt ~6.1.20-28 crashing on suspend/resume, the root of the bug was clearly a race condition when (re-)adding audio devices after sleep. Since an HDD will require several seconds to spin up, and the VM will stay suspended until that device is considered operational again, there's plenty of time for the audio device to be back in the list before something tries to talk to it. On an SSD (of any type) the VM becomes active again before VB gets its act together, and memory corruption/etc ensues.

AFAICT though this was fixed in .30, which has been available for several weeks now, so you're either running an old version and need to update, or you have an unrelated bug.
abc12346
Posts: 6
Joined: 24. Feb 2022, 07:38

Re: VirtualBox freezes after Windows inactivity/sleep

Post by abc12346 »

I saw this problem all the time in my windows 11 + ubuntu22.04 + virtualbox 7.0.8 r156879 (Qt5.15.2) since I chose this combination about 4 months ago. This happens only when after the windows screen saver (not necessarily screen lock) was activated. My screen saver time for windows is set to 5m, and screen lock is 15m. This time when it happened, I was away for some time between 5m and 15m. When I returned the screen was black so I started to type the PIN. It was not locked so my PIN (the first two digits I typed) was shown on the Konsole of the ubuntu, which was the active window. But then it immediately changed to locked screen (I did set never screen saver in ubuntu). After I logged in, I could see the last two digit of my PIN was in the Konsole, but I couldn't type in any more. It was frozen. This is exactly how this happens every time.
One workaround I use was to "Host-P" to pause the ubuntu when I am not using it and then "Host-P" again when I need it. But as you can see if I forget to pause it (which is easy), I will hit the problem.
Attached is the log collected after "Host-Q" (File->Close...). 3 log files are included: vBox.log, vBox.log.1, and vBoxHardening.log.
Please help diag.
Thanks.
Attachments
ubuntu2204-2023-09-07-20-50-29-vBoxHardening.log.gz
(30.88 KiB) Downloaded 3 times
ubuntu2204-2023-09-07-20-50-29-vBox.log.gz
(43.19 KiB) Downloaded 2 times
ubuntu2204-2023-09-07-19-00-59-vBox.1.log.gz
(55.55 KiB) Downloaded 1 time
danml
Posts: 1
Joined: 5. Dec 2023, 12:22

Re: VirtualBox freezes after Windows inactivity/sleep

Post by danml »

I think I've identified the issue to be missing proper support in VBox for "Modern Standby" sleep mode MS is actively pushing.
Created a ticket with a suggested fix here: www.virtualbox.org/ticket/21917 (mod edit: link fixed. New posters have to go through certain limits for a while so we don't get spam-swamped.)
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VirtualBox freezes after Windows inactivity/sleep

Post by scottgus1 »

Thanks, danml, for the information and the ticket!
Post Reply