Version 6.1.12 Guest OS Won't Save Resolution Across Reboots

Discussions about using Linux guests in VirtualBox.
EvilSupahFly
Posts: 3
Joined: 18. Aug 2020, 00:21

Version 6.1.12 Guest OS Won't Save Resolution Across Reboots

Post by EvilSupahFly »

So, I'm running Linux Mint 20 as a guest in 6.1.12. My host, Linux Mint 20, which has been successively upgraded several times from earlier versions, is running 1920x1080 with the proprietary nVidia driver, and it's fine.

The Guest, also Mint 20, but a clean install meant for doing some Python stuff, should be running 1440x900, but when I reboot the VM, the display always reverts to 800x600. I can change it back to 1440x900, and it stays as long as the session is active, but once I reboot again, it goes back to 800x600. I can change the wallpaper, and other things, and those changes get saved, but the resolution always resets.

I've created a video demonstrating this, and posted it to YouTube - watch?v=1VayZ2If4ew (new account - can't post URLs for the first 24 hours) so you can see what I'm talking about, as well as attaching a compressed copy of the runtime log to this post.

I've used VirtualBox for many things over the years, and I've never seen this behaviour before so I don't know if it's a VirtualBox problem, or if it's a Linux Mint problem. If you need any other info, let me know and I'll post it for you.

**Edit: Yes, in case you were wondering, I did install the Guest Additions stuff for VBox6.1.12.
Attachments
VBox.log.gz
VBox Log File from run shown in video clip
(47.42 KiB) Downloaded 50 times
EvilSupahFly
Posts: 3
Joined: 18. Aug 2020, 00:21

Re: Version 6.1.12 Guest OS Won't Save Resolution Across Reboots

Post by EvilSupahFly »

Update: using

Code: Select all

vboxmanage setextradata
as suggested in the virtualbox manual in ch09 (customvesa) to force the resolution didn't work.
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: Version 6.1.12 Guest OS Won't Save Resolution Across Reboots

Post by fth0 »

Use the following command to add the missing line to the "Mint 20 VM.vbox" file:

Code: Select all

VBoxManage setextradata "Mint 20 VM" "GUI/LastGuestSizeHint"
Then start the VM, change the display resolution, and shut down the Linux guest OS. Afterwards, the resolution will probably be remembered. You can verify this with (note the get/set difference ;)):

Code: Select all

VBoxManage getextradata "Mint 20 VM" "GUI/LastGuestSizeHint"
Edit (2022-02-06): The command given above actually removes the GUI/LastGuestSizeHint setting. The correct command to add the missing line to the "Mint 20 VM.vbox" file is:

Code: Select all

VBoxManage setextradata "Mint 20 VM" "GUI/LastGuestSizeHint" "1440,900"
Last edited by fth0 on 6. Feb 2022, 12:27, edited 3 times in total.
EvilSupahFly
Posts: 3
Joined: 18. Aug 2020, 00:21

Re: Version 6.1.12 Guest OS Won't Save Resolution Across Reboots

Post by EvilSupahFly »

fth0 wrote:Use the following command to add the missing line to the "Mint 20 VM.vbox" file:

Code: Select all

VBoxManage setextradata "Mint 20 VM" "GUI/LastGuestSizeHint"
Then start the VM, change the display resolution, and shut down the Linux guest OS. Afterwards, the resolution will probably be remembered. You can verify this with (note the get/set difference ;)):

Code: Select all

VBoxManage getextradata "Mint 20 VM" "GUI/LastGuestSizeHint"
This is just what the doctor ordered. Problem solved now. Thanks!
mushroom
Posts: 6
Joined: 2. Mar 2021, 20:46

Re: Version 6.1.12 Guest OS Won't Save Resolution Across Reboots

Post by mushroom »

I'm running VirtualBox 6.1.18 r142142 on a Windows 10 host with Linux Mint 20 Cinnamon and...
This solution no longer works.
I run:

VBoxManage setextradata "Linux" "GUI/MaxGuestSizeHint"

then check the config file (c:\users\me\VirtualBox VMs\Linux\Linux\Linux.vbox) and there is nothing added to the file. I run the VM, change the resolution, do a Shutdown (selected from the Mint menu rather than the VM window's File menu), and then check with:

VBoxManage getextradata "Linux" "GUI/MaxGuestSizeHint"

Nothing in the Linux.vbox file has changed. The resolution isn't preserved through a reboot/restart.

To those who have this working... is Mint the only VM you have set up? Perhaps this isn't working because I also have one set up for FreeBSD?
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: Version 6.1.12 Guest OS Won't Save Resolution Across Reboots

Post by fth0 »

Did you perhaps confuse "Last" with "Max"?
mushroom
Posts: 6
Joined: 2. Mar 2021, 20:46

Re: Version 6.1.12 Guest OS Won't Save Resolution Across Reboots

Post by mushroom »

fth0 wrote:Did you perhaps confuse "Last" with "Max"?
It seems I did.
Oddly, even though I corrected this, I still get a "No value set!" message from VBoxManage. But resolution is preserved across reboots, so I'm good.
Thanks!
mushroom
Posts: 6
Joined: 2. Mar 2021, 20:46

Re: Version 6.1.12 Guest OS Won't Save Resolution Across Reboots

Post by mushroom »

I tried this same procedure with a GhostBSD guest, but it's not working.
After changing the resolution and shutting down the VM, I check with:
VBoxManage getextradata "GhostBSD" "GUI/LastGuestSizeHint"
which reports:
value: 1400, 1050
I then boot up the GhostBSD guest. It tries to open in 1400x1050, but then reverts to 800x600. Checking again with VBoxManage reports:
value: 800, 600
I double-checked for typos (I wasn't going to get caught on that again.) but no luck.
Any suggestions?
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: Version 6.1.12 Guest OS Won't Save Resolution Across Reboots

Post by fth0 »

This feature depends on working VirtualBox Guest Additions (GA). Are there any GA for GhostBSD?
mushroom
Posts: 6
Joined: 2. Mar 2021, 20:46

Re: Version 6.1.12 Guest OS Won't Save Resolution Across Reboots

Post by mushroom »

fth0 wrote:This feature depends on working VirtualBox Guest Additions (GA). Are there any GA for GhostBSD?
GhostBSD is based on FreeBSD, so yes. According to

Code: Select all

pkg info
, they're installed:

Code: Select all

virtualbox-ose-additions-5.2.44_3 VirtualBox additions for FreeBSD guests
virtualbox-ose-kmod-5.2.44_4   VirtualBox kernel module for FreeBSD
The other little FreeBSD hitch is the typo in /usr/local/bin/VBoxClient-all. This line:

Code: Select all

/usr/bin/VBoxClient/ --vmsvga-xll
should be:

Code: Select all

/usr/local/bin/VBoxClient/ -- vmsvga-x11
and that's also been corrected.
multiOS
Volunteer
Posts: 800
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)
Location: United Kingdom

Re: Version 6.1.12 Guest OS Won't Save Resolution Across Reboots

Post by multiOS »

Unfortunately the Guest Additions Version doesn't match the VirtualBox Version. Try updating to the matched version.
mushroom
Posts: 6
Joined: 2. Mar 2021, 20:46

Re: Version 6.1.12 Guest OS Won't Save Resolution Across Reboots

Post by mushroom »

multiOS wrote:Unfortunately the Guest Additions Version doesn't match the VirtualBox Version. Try updating to the matched version.
Thanks for jumping in, multiOS.

The package manager reports that it's up to date and version 5.2.44_4 of Guest Additions is the latest one showing up.
There seems to be some debate in the FreeBSD community about whether or not the v. 5.2.44_4 Guest Additions works with v. 6.1.18 VirtualBox. Some have no trouble with that combo while others do.
Also, I looked on FreshPorts and 5.2.44_4 seems to be the latest version available as of 2021-01-26, so I'm unclear on how I'd get a matching version or if, indeed, one exists. Suggestions?
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: Version 6.1.12 Guest OS Won't Save Resolution Across Reboots

Post by fth0 »

You could try and set Display > Graphics Controller to the old VBoxVGA setting. The current VMSVGA (Linux guests) and VBoxSVGA (Windows guests) came out with VirtualBox 6.0, so using either of these is not supported with VirtualBox Guest Additions < 6.0.

PS: I don't know what is contained in the FreeBSD GA 5.2.44_4, so I cannot speak for that.
mushroom
Posts: 6
Joined: 2. Mar 2021, 20:46

Re: Version 6.1.12 Guest OS Won't Save Resolution Across Reboots

Post by mushroom »

fth0 wrote:You could try and set Display > Graphics Controller to the old VBoxVGA setting. The current VMSVGA (Linux guests) and VBoxSVGA (Windows guests) came out with VirtualBox 6.0, so using either of these is not supported with VirtualBox Guest Additions < 6.0.

PS: I don't know what is contained in the FreeBSD GA 5.2.44_4, so I cannot speak for that.
Thanks for the idea, fth0. Alas, it didn't work. I may just have to downgrade to VB 5. I'm wasting far too much time on this.
Siaynoq
Posts: 1
Joined: 6. Feb 2022, 06:35

Re: Version 6.1.12 Guest OS Won't Save Resolution Across Reboots

Post by Siaynoq »

After some fooling around, I've realized that in the latest version of VBoxManage:

Code: Select all

VBoxManage setextradata "Mint 20 VM" "GUI/LastGuestSizeHint"
... actually removes the given key from the config. (See virtualbox UserManual.html#vboxmanage-extradata)

I was able to use

Code: Select all

VBoxManage setextradata "Mint 20 VM" "GUI/LastGuestSizeHint" "1680,1050"
(Note the added resolution value)

...and that gave me the above defined resolution...
However changing the resolution within the guest (I'm using Linux Mint -> Display settings) doesn't change this value in the extradata... With that guest OS, I have to use VMSVGA graphics controller and I have limited knowledge on what that actually means for this issue and how to resolve it properly (i.e. to be able to change and persist from within the guest OS settings)
Locked