SOLVED: Mint 20 Won't Save Screen Resolution When Running As Guest in VBox 6.1.12

Questions about virtualization software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
EvilSupahFly
Level 3
Level 3
Posts: 126
Joined: Sat May 24, 2014 11:10 am
Location: Mordor

SOLVED: Mint 20 Won't Save Screen Resolution When Running As Guest in VBox 6.1.12

Post by EvilSupahFly »

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

The Guest, a clean install of Mint 20 meant for doing some Python testing, 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 https://www.youtube/watch?v=1VayZ2If4ew so you can see what I'm talking about.

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.

Yes, in case you were wondering, I did install the Guest Additions stuff for VBox6.1.12.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
My Frankensteined Black Beast:
Intel Core i7-4770S CPU @ 3.10GHz × 8 x64
NVIDIA GeForce GTX 1660, 2 monitors @ 1920x1080
E220x Gigabit Ethernet 1000 Mbps
Storage: 13.01 TB
Intel 8 C220 HD Audio, full 5.1 Surround
hydrurga
Level 5
Level 5
Posts: 746
Joined: Sun Nov 15, 2015 4:08 pm

Re: Mint 20 Won't Save Screen Resolution When Running As Guest in VBox 6.1.12

Post by hydrurga »

Have you tried using the vboxmanage command:

Code: Select all

vboxmanage setextradata "VM_Name" CustomVideoMode1 1440x900x32
(or similar, I'm not sure which exact setting you should have)

https://www.virtualbox.org/manual/ch09.html#customvesa
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Mint 20 Won't Save Screen Resolution When Running As Guest in VBox 6.1.12

Post by linux-rox »

If you haven't already, check the VBox Forum to see whether anyone else is reporting the problem.
User avatar
EvilSupahFly
Level 3
Level 3
Posts: 126
Joined: Sat May 24, 2014 11:10 am
Location: Mordor

Re: Mint 20 Won't Save Screen Resolution When Running As Guest in VBox 6.1.12

Post by EvilSupahFly »

I haven't tried vboxmanage yet, but I did report the issue on the VirtualBox forums. Nobody's answered me over there yet. I'll test vboxmanage and see what happens.

** Edit: using vboxmanage did't change the problematic behaviour.
My Frankensteined Black Beast:
Intel Core i7-4770S CPU @ 3.10GHz × 8 x64
NVIDIA GeForce GTX 1660, 2 monitors @ 1920x1080
E220x Gigabit Ethernet 1000 Mbps
Storage: 13.01 TB
Intel 8 C220 HD Audio, full 5.1 Surround
User avatar
EvilSupahFly
Level 3
Level 3
Posts: 126
Joined: Sat May 24, 2014 11:10 am
Location: Mordor

Solved: Mint 20 Won't Save Screen Resolution When Running As Guest in VBox 6.1.12

Post by EvilSupahFly »

OK, the official solution from Oracle, which actually solved my problem, is as follows (see thread at https://forums.virtualbox.org/viewtopic ... 06#p482606):
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"
Doing as they suggested and setting "GUI/LastGuestSizeHint" solved the problem and now the virtual Mint retains 1440x900 across reboots. Just thought I'd share the fix here in case anybody finds this thread and goes, "Yeah - I'm having that problem too!"
Last edited by EvilSupahFly on Sat Oct 03, 2020 9:47 am, edited 1 time in total.
My Frankensteined Black Beast:
Intel Core i7-4770S CPU @ 3.10GHz × 8 x64
NVIDIA GeForce GTX 1660, 2 monitors @ 1920x1080
E220x Gigabit Ethernet 1000 Mbps
Storage: 13.01 TB
Intel 8 C220 HD Audio, full 5.1 Surround
hydrurga
Level 5
Level 5
Posts: 746
Joined: Sun Nov 15, 2015 4:08 pm

Re: Mint 20 Won't Save Screen Resolution When Running As Guest in VBox 6.1.12

Post by hydrurga »

Many thanks indeed for sharing the solution. Glad you got it sorted!
Buffy

Re: Mint 20 Won't Save Screen Resolution When Running As Guest in VBox 6.1.12

Post by Buffy »

Please edit the subject line to add "[SOLVED]" so that people can see that it has been. Thanks! :)
User avatar
EvilSupahFly
Level 3
Level 3
Posts: 126
Joined: Sat May 24, 2014 11:10 am
Location: Mordor

Re: SOLVED: Mint 20 Won't Save Screen Resolution When Running As Guest in VBox 6.1.12

Post by EvilSupahFly »

Sorry it took so long - life got complicated for a while, but the subject has been changed now. :)
My Frankensteined Black Beast:
Intel Core i7-4770S CPU @ 3.10GHz × 8 x64
NVIDIA GeForce GTX 1660, 2 monitors @ 1920x1080
E220x Gigabit Ethernet 1000 Mbps
Storage: 13.01 TB
Intel 8 C220 HD Audio, full 5.1 Surround
User avatar
nickname
Level 1
Level 1
Posts: 28
Joined: Sun Feb 17, 2019 11:38 am

Re: SOLVED: Mint 20 Won't Save Screen Resolution When Running As Guest in VBox 6.1.12

Post by nickname »

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 setextradata "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?
User avatar
EvilSupahFly
Level 3
Level 3
Posts: 126
Joined: Sat May 24, 2014 11:10 am
Location: Mordor

Re: SOLVED: Mint 20 Won't Save Screen Resolution When Running As Guest in VBox 6.1.12

Post by EvilSupahFly »

Each VM is a closed system, so settings for a virtual BSD install shouldn't impact a virtual Mint install. I would start by manually checking the configuration files to be sure your settings are being saved (which you seem to have done), and failing that, check the VBox forums.

I'll be honest though. I switched to Oracle's virtual machine because I needed better OpenGL support, and haven't used this in a long time.
My Frankensteined Black Beast:
Intel Core i7-4770S CPU @ 3.10GHz × 8 x64
NVIDIA GeForce GTX 1660, 2 monitors @ 1920x1080
E220x Gigabit Ethernet 1000 Mbps
Storage: 13.01 TB
Intel 8 C220 HD Audio, full 5.1 Surround
User avatar
nickname
Level 1
Level 1
Posts: 28
Joined: Sun Feb 17, 2019 11:38 am

Re: SOLVED: Mint 20 Won't Save Screen Resolution When Running As Guest in VBox 6.1.12

Post by nickname »

EvilSupahFly wrote: Tue Mar 02, 2021 8:59 pm Each VM is a closed system, so settings for a virtual BSD install shouldn't impact a virtual Mint install. I would start by manually checking the configuration files to be sure your settings are being saved (which you seem to have done), and failing that, check the VBox forums.

I'll be honest though. I switched to Oracle's virtual machine because I needed better OpenGL support, and haven't used this in a long time.
Turns out I read the original solution wrong...

Code: Select all

VBoxManage setextradata "Linux" "GUI/MaxGuestSizeHint"
Should have been:

Code: Select all

VBoxManage setextradata "Linux" "GUI/LastGuestSizeHint"
I don't know how I saw 'Max' instead of 'Last', but there it is.
User avatar
EvilSupahFly
Level 3
Level 3
Posts: 126
Joined: Sat May 24, 2014 11:10 am
Location: Mordor

Re: SOLVED: Mint 20 Won't Save Screen Resolution When Running As Guest in VBox 6.1.12

Post by EvilSupahFly »

Glad you got it fixed!

🙂
My Frankensteined Black Beast:
Intel Core i7-4770S CPU @ 3.10GHz × 8 x64
NVIDIA GeForce GTX 1660, 2 monitors @ 1920x1080
E220x Gigabit Ethernet 1000 Mbps
Storage: 13.01 TB
Intel 8 C220 HD Audio, full 5.1 Surround
tweedledee
Level 1
Level 1
Posts: 4
Joined: Mon Apr 01, 2019 6:18 pm

Re: SOLVED: Mint 20 Won't Save Screen Resolution When Running As Guest in VBox 6.1.12

Post by tweedledee »

I, too, hit the "why won't this pox-ridden Mint VM remember my resolution across reboots?" issue, but hit a stumbling block in the form of the suggested solution. It doesn't work (or doesn't work any more), because it's incomplete. The suggested solution omits the final, most important bit of information: the desired resolution.

(I appreciate that there have been updates to the VirtualBox program since this thread was first created; the latest version at the time of writing is 6.1.26, which I am currently using; perhaps the suggested solution used to work in older versions.)

If one issues the command

Code: Select all

VBoxManage.exe setextradata "<VM name>" "GUI/LastGuestSizeHint"
as-is, then the key won't be added to the .vbox file. Furthermore, if the key is already present, then it will be deleted. See the last line of the usage information:

Code: Select all

VBoxManage.exe setextradata
Usage:

VBoxManage setextradata     global|<uuid|vmname>
                            <key>
                            [<value>] (no value deletes key)
However, if one adds the desired resolution, in the form "x,y", to the end of the command, then it should work. I wanted to run my Mint VM at 1280x800, and this command did the trick (my VM is called, imaginatively, "Mint"):

Code: Select all

VBoxManage.exe setextradata "Mint" "GUI/LastGuestSizeHint" "1280,800"
Hopefully this will help future readers who may encounter the same issue. Thank you to EvilSupahFly both for raising the question and for finding the vital piece of information from Oracle which helped to nudge me in the right direction.
User avatar
EvilSupahFly
Level 3
Level 3
Posts: 126
Joined: Sat May 24, 2014 11:10 am
Location: Mordor

Re: SOLVED: Mint 20 Won't Save Screen Resolution When Running As Guest in VBox 6.1.12

Post by EvilSupahFly »

I ended up switching to Oracle's VM because of their superior Guest OpenGL support, but I'm glad you're on the ball!

The original solution had worked for me at the time, but it seems like things changed since then. Or, maybe it's just down to running different host OSes.

Either way, it makes you wonder how long until this new solution is also forced into obsolescence, right?

:-P
My Frankensteined Black Beast:
Intel Core i7-4770S CPU @ 3.10GHz × 8 x64
NVIDIA GeForce GTX 1660, 2 monitors @ 1920x1080
E220x Gigabit Ethernet 1000 Mbps
Storage: 13.01 TB
Intel 8 C220 HD Audio, full 5.1 Surround
Locked

Return to “Virtual Machines”