[VirtualBox] Display Resolution Won’t Save After Restart in Ubuntu, Linux Mint Guest OS

Running Ubuntu or Linux mint as Guest OS via VirtualBox? You may found that it does not remember your display resolution settings. On every boot, it will revert the screen resolution to the default 800×600.

This happens on Ubuntu and Linux Mint VMs running with VirtualBox 6.1 series. Every time I need to set the display settings manually.

The reason seems to be something to do with the Guest Additions. The graphics driver included in Oracle VirtualBox Guest Additions is not well compatible with the Linux Kernels in Ubuntu based Distros.

Before the upstream fixed the issue, you can either downgrade the Guest Additions or use the workarounds below:

Workaround for Ubuntu by changing the Graphics Controller:

For Ubuntu, Ubuntu 21.04 Guest OS in my case, simply open the “Settings” in VBox manager.

Then navigate to “Display” in left pane and do:

  • Change the value of Graphics Controller to “VBoxSVGA”.
  • Uncheck “Enable 3D Acceleration“.
  • Ignore the warning of ‘Invalid settings detected’ and click OK.

Finally start the VM and set the screen resolution. It remembers the display setting even after I switched the graphics controller back.

Force resolution by retrieving the last data.

This method should work for other Linux guests. Open terminal in the host machine and do following steps one by one:

1.) Firstly open terminal from system app menu. When it opens, run command to list all Virtual Machines:

vboxmanage list vms

It outputs all VMs as well as their UUIDs. Copy either the name or UUID that has the problem. In my case, it’s “Linux Mint”.

2.) Next run command to force last data (replace “Linux Mint” in command with the one you got in step 1.).

VBoxManage setextradata "Linux Mint" "GUI/LastGuestSizeHint"

3.) Finally start the guest OS. Set the screen resolution in Display Settings. And shut it down.

It should remember the screen solution. Without starting the Guest, you can check it out via command:

VBoxManage getextradata "Linux Mint" "GUI/LastGuestSizeHint"

I don’t know why, but it remembers my settings after I did step 3.) twice!

Exit mobile version