Frequent freezes on display change - Windows host Linux guest

Discussions related to using VirtualBox on Windows hosts.
jerome_vb
Posts: 10
Joined: 25. May 2021, 14:43

Frequent freezes on display change - Windows host Linux guest

Post by jerome_vb »

Hi.

I get frequent freezes. Can't fully reproduce but it is much too frequent.

Host(ile) environment: Windows 10 Pro
Guest environment: Linux Debian Buster

The host runs on a laptop that I frequently plug to / unplug from a dock station with a screen. The screens are in clone mode (same display on laptop and external screen).

Normally, it goes fine. If the resolution changes, the guest desktop is resized and the windows move accordingly.

However, it sometimes freezes. No crash, just a frozen display and no (apparent) way to interact. It seems to be more frequent, these days. Hence this message.

Closing the window with the up right cross button does not work (program does not respond). I need a little help from the task manager.

After the freeze, I generally upgrade VirtualBox hoping the issue is fixed in the new release. I do install the guest additions every time.

Attaching a log.

Anything I can do to help fix this? Any other info I could provide?

Thanks.
Attachments
VBoxSVC-error.log
Freeze log
(47.48 KiB) Downloaded 10 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Frequent freezes on display change - Windows host Linux guest

Post by mpack »

Provide a VM log file. Make sure the VM is fully shut down, then right click it in the manager UI. Select "Show Log" and save "VBox.log" (no other file) to a zip file. Attach the zip here.
jerome_vb
Posts: 10
Joined: 25. May 2021, 14:43

Re: Frequent freezes on display change - Windows host Linux guest

Post by jerome_vb »

Attaching VM freeze log file.
Attachments
Buster-2021-05-25-15-06-59.zip
VM log
(22.72 KiB) Downloaded 9 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Frequent freezes on display change - Windows host Linux guest

Post by mpack »

Instructions have not been followed. You need to fully close down the VM before grabbing the log, otherwise you are copying a file that's still open for writing. I appreciate that you are referring to a "VM freeze", but I very much doubt that the VM (as opposed to the guest OS) has actually locked up, unless there's a serious hardware problem with the host. The VM should respond if you click the close (X) button on the window.

In the meantime I see you have overcommitted RAM. You can't allocate 8000MB RAM to a VM when you only have 7684MB available as the log shows. I would reduce the VM allocation to 6144MB or less (4096MB would be better).

OTOH I would increase graphics RAM to 128MB.

Also, you have made the classic error of adding a second DVD drive to the VM recipe, and allowing the GAs ISO to be mounted in both drives. You should to eject all media and then delete the second DVD drive from the VM spec.

Also, make sure that you are actually installing the GAs. It's hard to be sure given a truncated log file, but I suspect you are simply clicking "Insert Guest Additions CD..." and assuming that means they're installed. Modern guests don't usually autorun CDs these days - you run to manually run the installer.
jerome_vb
Posts: 10
Joined: 25. May 2021, 14:43

Re: Frequent freezes on display change - Windows host Linux guest

Post by jerome_vb »

I had already closed and reopened the VM when I searched for the logs in the manager UI. I picked VBox.log.1 assuming it was the one when the freeze occurred while VBox.log would be the one after the restart. Attaching subsequent log now.

I can't tell if the host or the guest is responsible for this, I can only describe the symptoms. I've seen freezes in the past where I could save (using the close button on the window) then restore VM (frozen) state. The issue I'm talking about in this thread involves a window that doesn't respond, requiring the task manager to close it.

I don't mean to overcommit RAM. My machine has 16 Go. I gave 8 Go to the VM because this is where the real work happens. I used to provide less (5 Go if memory serves me well) but then I had issues inside the VM. Looks like the host is consuming a lot if not more than the remaining 8 Go. I'll reduce the VM RAM a bit. Unfortunately, the company won't let me get rid of the host system. Anyway, thanks for the tip. I'll also increase graphics RAM as per your suggestion.

Should I understand this setting / lack or RAM could be responsible for the freeze? The fact that this has been happening regularly in the recent past could be caused by new RAM consumption on host side (I'm looking at you, MS Teams app).

I'll delete the second drive. Thanks for that as well.

I do install the GAs (mount, cd, run ./VBox). But thanks anyway.
Attachments
Buster-2021-05-25-16-02-11.zip
Log after restart
(32.54 KiB) Downloaded 6 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Frequent freezes on display change - Windows host Linux guest

Post by mpack »

Thanks, at least the second log is complete and I confirm that the 6.1.22 GAs are installed.

Will telling the VM to use RAM you don't have cause problems? Of course.

Your tweak to the RAM is not enough. You need to allow some working RAM to the host, because in fact THERE is where all the work is being done. The actual VM is just a simulation running on the host. The rule of thumb is not to allocate more than 50% of the AVAILABLE RAM to the VM. If you guesstimate that 8GB should be available then don't allocate more than 4GB to a VM.

You need to address the two CD/DVD drives issue that I pointed out.

You need to address the fact that the same GAs CD is mounted in both drives.

You have not changed the graphics RAM.
jerome_vb
Posts: 10
Joined: 25. May 2021, 14:43

Re: Frequent freezes on display change - Windows host Linux guest

Post by jerome_vb »

Thanks.

Indeed the second log is the one just after the freeze. I haven't applied the changes yet.

I will apply your recommendations and I'll report back if I still have the same kind of freezes.

I should have been more careful with the RAM. What makes it not obvious, I guess, is the fact that when the host lacks RAM, I expect it to become slow due to swapping, but I don't expect applications to freeze or crash like this. Besides, it seemed to happen upon plugging to / unplugging from a dock station, so I figured it would be a hardware issue (screen, sound,...). Perhaps there's a RAM consumption peak when this happen that triggers the problem.
jerome_vb
Posts: 10
Joined: 25. May 2021, 14:43

Re: Frequent freezes on display change - Windows host Linux guest

Post by jerome_vb »

I applied the changes, except I kept 5 GB RAM. Freeze again. Attaching log.

I now set to 4 GB. I'll see how it goes.

It's strange, though. It has been working correctly with 8 GB for a while.

IIUC, it could be related to another issue. Like an unrelated process that would induce a spike of RAM consumption.
Attachments
Buster-2021-05-27-13-31-45.zip
(21.44 KiB) Downloaded 4 times
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: Frequent freezes on display change - Windows host Linux guest

Post by fth0 »

Your issues may have to do with a combination of docking/undocking the laptop and using saved states.

Saving the state of a VM is akin to pausing a VM, and just like VirtualBox does not allow you to change the VM configuration when in this state, changing the host hardware may come unexpected to the VM when it is resumed (un-paused) later on. At least the corresponding change events will probably get lost ...
jerome_vb
Posts: 10
Joined: 25. May 2021, 14:43

Re: Frequent freezes on display change - Windows host Linux guest

Post by jerome_vb »

On the contrary, the case I'm talking about is docking/undocking with the VM running, not paused. It works when the VM is paused (saved state).

I just had a new freeze despite the "4 GB RAM and other fixes" config. Attaching log.
Attachments
Buster-2021-05-27-17-21-42.zip
(23.37 KiB) Downloaded 4 times
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: Frequent freezes on display change - Windows host Linux guest

Post by fth0 »

It was only meant as a possibility contributing to the problems, since you posted VBox.log files of the VM starting from a saved state. We cannot be sure about the pre-conditions for any kind of problems then. This being said:

Buster-2021-05-27-17-21-42.log shows a clean start for the VM, so far, so good. Please describe in some detail, which you think may be relevant, what you did at what times in the 3 hours and 45 minutes the VM was running (e.g. at the beginning, at 00:06, 00:14, 00:37, 02:18, 02:26, 02:57, 02:59, 03:44), especially regarding (un-)docking, audio device changes and display device changes like screen saving. You can use wall-clock times if it suites you better.
jerome_vb
Posts: 10
Joined: 25. May 2021, 14:43

Re: Frequent freezes on display change - Windows host Linux guest

Post by jerome_vb »

Attaching a new log.

This time, I didn't even unplug the laptop from the docking station.

The docking station is connected to an external screen. I toggled the screen to display the other computer connected to it (my desktop). When turning that other computer off and switching back to displaying my laptop with the VM, the VM was frozen.

It really seems to be related to the display, as there was no network or USB peripheral change involved this time.

The log is pretty short.

00:19 in the logs must correspond to either switching from laptop to desktop or desktop to laptop, I can't tell for sure. The log at this stage only mentions audio stuff. It could be related, since I use the HDMI output, although I don't use the screen as my audio output device.

Audio is enabled: Windows DirectSound + ICH AC97. No idea what that means but FWIW, I'll be trying other settings, see if it makes a difference.
Attachments
Buster-2021-05-31-15-45-36.zip
(20.14 KiB) Downloaded 4 times
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: Frequent freezes on display change - Windows host Linux guest

Post by fth0 »

Buster-2021-05-31-15-45-36.log shows again a VM started from a saved state, so its significance is low again. Try to reproduce the behavior as easy as possible, but start with a VM that was shut down from within the guest OS before.

Tip of the day: You can open the Log Viewer from within the VirtualBox Manager while the VM is running, BTW. If you then click the Refresh button before each of your actions and take note of the last log line, you'll later know exactly what you did when. ;)
jerome_vb wrote:00:19 in the logs must correspond to either switching from laptop to desktop or desktop to laptop, I can't tell for sure. The log at this stage only mentions audio stuff. It could be related, since I use the HDMI output, although I don't use the screen as my audio output device.
At 00:19:45, the Audio device of the PL2410HD was removed, but this could correspond to either switch. During further tests, please switch between the desktop and the laptop while both are running, to find out which of the two switches from the last attempt led to the problem. BTW, what are the display resolutions of the monitor and the laptop?
jerome_vb
Posts: 10
Joined: 25. May 2021, 14:43

Re: Frequent freezes on display change - Windows host Linux guest

Post by jerome_vb »

PL2410HD is my external screen so I suppose the corresponding device was removed when the screen switched to the desktop.

When plugged to that screen, clone mode, the resolution is 1920 x 1080.
When unplugged, the resolution of the laptop is also 1920 x 1080.

(Should be different at the office where the external screen has a better resolution. I shall check when I'm there.)

Unplugging from the docking station just froze the VM with those lines in the log:

Code: Select all

01:40:59.667844 GUI: UIMachineLogic: Host-screen count changed
01:40:59.771511 GUI: UIMachineLogic: Host-screen count changed
01:42:44.303123 Audio: Device '{0.0.0.00000000}.{78d85e0a-8636-4d36-82a4-1ead83471a26}' has changed state to 'not present'
01:42:44.303171 Audio: Device configuration of driver 'DSoundAudio' has changed
01:42:44.307119 Audio: Default output device has been changed to '{0.0.0.00000000}.{00fde8f9-0832-4190-b992-8236529b4b42}'
01:42:44.307160 Audio: Device configuration of driver 'DSoundAudio' has changed
01:42:44.309976 Audio: Default output device has been changed to '{0.0.0.00000000}.{00fde8f9-0832-4190-b992-8236529b4b42}'
01:42:44.310013 Audio: Device configuration of driver 'DSoundAudio' has changed
01:42:44.316414 Audio: Default output device has been changed to '{0.0.0.00000000}.{00fde8f9-0832-4190-b992-8236529b4b42}'
01:42:44.316466 Audio: Device configuration of driver 'DSoundAudio' has changed
01:42:45.641038 Audio: Found 4 devices for driver 'DSoundAudio'
01:42:45.641074 Audio: Device 'Périphérique audio principal':
01:42:45.641087 Audio:   Usage           = Output
01:42:45.641098 Audio:   Flags           = DEFAULT
01:42:45.641109 Audio:   Input channels  = 0
01:42:45.641119 Audio:   Output channels = 2
01:42:45.641129 Audio: Device 'Speakers (Realtek(R) Audio)':
01:42:45.641141 Audio:   Usage           = Output
01:42:45.641152 Audio:   Flags           = NONE
01:42:45.641162 Audio:   Input channels  = 0
01:42:45.641172 Audio:   Output channels = 2
01:42:45.641182 Audio: Device 'Pilote de capture audio principal':
01:42:45.641197 Audio:   Usage           = Input
01:42:45.641212 Audio:   Flags           = NONE
01:42:45.641222 Audio:   Input channels  = 2
01:42:45.641233 Audio:   Output channels = 0
01:42:45.641243 Audio: Device 'Microphone Array (Realtek(R) Audio)':
01:42:45.641254 Audio:   Usage           = Input
01:42:45.641264 Audio:   Flags           = NONE
01:42:45.641274 Audio:   Input channels  = 2
01:42:45.641285 Audio:   Output channels = 0
01:42:46.012013 Audio: Device '{0.0.1.00000000}.{b131e871-a5ae-47cd-ab85-58ade08ca138}' has changed state to 'not present'
Nothing new after replugging and hitting "refresh".

Attaching a new log. Should be a complete one.

Thanks.
Attachments
Buster-2021-05-31-17-56-10.zip
(20.57 KiB) Downloaded 3 times
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: Frequent freezes on display change - Windows host Linux guest

Post by fth0 »

Buster-2021-05-31-17-56-10.log wrote:
00:00:05.000833 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000000cc80000 w=640 h=480 bpp=32 cbLine=0xA00 flags=0x0 origin=0,0
00:00:05.219656 GUI: UIMachineViewNormal::resendSizeHint: Restoring guest size-hint for screen 0 to 1920x985
00:00:07.441463 VMMDev: Guest Log: BIOS: Booting from Hard Disk...
00:00:07.448502 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0 flags=0x0 origin=0,0
00:00:07.769905 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000000cdac000 w=640 h=480 bpp=32 cbLine=0xA00 flags=0x0 origin=0,0
00:00:13.647550 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0 flags=0x0 origin=0,0
00:00:16.100109 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000000cc80000 w=800 h=600 bpp=32 cbLine=0xC80 flags=0x1 origin=0,0
00:02:22.011814 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=800 h=600 bpp=0 cbLine=0x0 flags=0x2 origin=0,0
00:02:22.026617 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000000d1ff000 w=1920 h=985 bpp=32 cbLine=0x1E00 flags=0x1 origin=0,0
00:02:22.030451 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=1920 h=985 bpp=0 cbLine=0x0 flags=0x2 origin=0,0
00:02:22.157901 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000000d02a000 w=1360 h=768 bpp=32 cbLine=0x1540 flags=0x1 origin=0,0
00:02:26.030881 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=1360 h=768 bpp=0 cbLine=0x0 flags=0x2 origin=0,0
00:02:26.043981 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000000d822000 w=1920 h=985 bpp=32 cbLine=0x1E00 flags=0x1 origin=0,0
From your complete log :), I've extracted all effective display resolution changes, to illustrate a few things:

The guest size-hint contains the least recently used display resolution from the previous VM run. It becomes a starting point later on, and could be one potential source of problems. Especially, when it exceeds the resolution of all available displays, which could happen in your work vs. home scenario.

After the initial display resolution changes (e.g. BIOS, boot manager, boot loader), Linux boots with the 800x600 display resolution, and then switches to the hinted 1920x985 display resolution. Afterwards, the display resolution is changed to 1360x768 (*) for 4 seconds, which is one of the reasons I've been asking for the available display resolutions. Do you have any theory about where this resolution may have come from?

(*) This is a typical value for displays with 1366x768 resolution. Note that 1366 is not divisible by 8, thats where the 1360 originates from.
jerome_vb wrote:When plugged to that screen, clone mode, the resolution is 1920 x 1080.
Does the freeze also occur when using other modes than clone mode? What is the maximum resolution of the monitor?
jerome_vb wrote:Unplugging from the docking station just froze the VM
Did you turn off the clone mode before undocking? If not, does it make a difference?

Yet another thing to test: In the VM configuration, disable audio completely. Does it make a difference?
Post Reply