Ubuntu – Ubuntu 20.04 VM always resizes screen to default size when booting

20.04display-resolutionscreenvirtualbox

I have installed ubuntu 20.04 on virtualbox 6.0.20 and I have installed guest additions.

The issue is that if I resize the screen resolution to whatever size, even to predefined resolutions, it will always start/boot at 800×600 and I have to resize it again.

What I noticed is that when it boots, it goes for ~1 sec to the previous screen size but shows only black and then just before the wallpaper-desktop appears it goes to 800×600.

Any ideas?

Best Answer

I had the same problem with the new Kubuntu release. Do the following:

  1. Shut down your Ubuntu VM.
  2. Open the Settings for your Ubuntu VM and select the Display section
  3. Select VBoxSVGA as your Graphics Controller. VirtualBox will warn you at the bottom of the Settings window about the invalid settings, you can ignore that.
  4. Leave the option Enable 3D Acceleration unchecked, otherwise VirtualBox will revert the Graphics Controller back to VMSVGA when you confirm the settings.
  5. Confirm your choices by clicking OK.
  6. Start your Ubuntu VM.

I'm using VM VirtualBox ver. 6.1.6, Extension Pack (with included Guest additions virtual CD) is also 6.1.6

If someone knows how how to remedy the resolution issue with VMSVGA selected as Graphics Controller, I'd love to read it.

Update #1
This issue with screen resizing didn't let go of me, so I went and searched on the web some more.

From what I've read - and with my limited knowledge of inner workings of Linux systems, hopefully understood it at least somewhat correctly - the problem lies in relation between the graphic drivers included in Oracle's VM VirtualBox Guest Additions and the new Linux kernels that came with the recently released version of Ubuntu distro and others based on it. It seems the drivers present in ver. 6.1.6 Guest Additions aren't working correctly with these new kernels, hence the resizing problem when the Graphics Controller in VM is set to VMSVGA.

So until Oracle comes up with updated version of VirtualBox/Guest Additions, the temporary solution is the one I explained above, or what I've tried earlier and for me at least, works as well.

  1. Uninstall the current Guest Additions from your VM, then power it off.
  2. Download the older version - 6.1.2 ISO (link to Oracle's web page, there's only one such file listed).
  3. Start your VM and after you logged back, open VM Devices menu, select Optical Drives > Choose a disc file... to mount Guest Additions CD.
  4. Open your terminal and run the install script VBoxLinuxAdditions.run located in the root of the CD.
  5. Follow this step if your VM Graphics Controller is set to VBoxSVGA, otherwise skip to step 6: Power off the VM and in Settings > Display > Graphics Controller select VMSVGA, also enable 3D Acceleration. Confirm changes by clicking OK.
  6. Restart the VM, automatic screen resizing should work now.

I chose version 6.1.2 of Guest Additions because there's a bug with Bidirectional Clipboard support in 6.1.4.