45

I've installed Ubuntu 64bit on Virtualbox 4.2.16. Guest Additions were installed in Ubuntu as well.

However the display resolution of Ubuntu does not seem to change as the Virtualbox window is resized or if we were to go into Full Screen mode. Any ideas?

Braiam
  • 69,302
Nyxynyx
  • 1,183
  • 5
  • 16
  • 29

15 Answers15

42

I had this problem as well running a newly installed version of VirtualBox (VirtualBox 6.0). I tried installing the aforementioned packages but had no luck. My solution was simpler than I had anticipated. While the machine is powered off, go to:

Settings (of the VM) > Display > Graphics Controller > and select "VBoxVGA"

VirtualBox had set this option to "VMSVGA" by default for me. Fortunately, I noticed this subtle difference when comparing the settings between some of my virtual machines. I hope this works for you as well!

uceieluez
  • 421
  • 1
  • 4
  • 2
  • 1
    This worked for me, too, but graphics performance went WAY down with VBoxVGA. Noticeable typing lag. I put it back to VMSVGA and increased the graphics memory and I believe this helped me to get larger desktops with the better performance. – Bogatyr Sep 02 '19 at 01:16
  • 2
    select VBoxSVGA instead and enable 3D acceleration – Oleg Kokorin Mar 21 '20 at 09:08
  • 1
    @OlegKokorin VirtualBox 6 doesn't allow you to select VBoxSVGA and 3D acceleration, when you are using Linux as guest OS. If you do that, it switches to VMSVGA. – avpaderno Sep 18 '20 at 12:16
  • 1
    VBoxSVGA without 3D acceleration worked for me. – Fabio says Reinstate Monica Jun 18 '21 at 12:16
  • 1
    Pay no attention to the "Invalid settings detected" warning. Default for Linux guests is VMSVGA which supports 800x600 only - a buggy half-baked experimental implementation in MacOSX Mojave hosts. – Devon Dec 03 '21 at 05:51
  • The VBoxSVGA has improved performance and 3D support built-in (as the VMWare VMSVGA has), so I would prefer that over the legacy VBoxVGA. See for example this question for some details. The VMSVGA is currently default for Linux hosts, not sure what's the reason. – David Ferenczy Rogožan Jun 17 '22 at 15:36
17

just type: sudo apt-get install virtualbox-guest-additions-iso

Moshe Beeri
  • 660
  • 1
  • 5
  • 7
  • THIS did the trick. – Yar May 26 '16 at 13:15
  • This did the trick for me! Worked out of the box with ubuntu, but not with lubuntu. I previously ran the GuestAdditions CD image under the devices menu but that did not work. I also tried to install virtualbox-guest-dkms and dkms and none worked. – Julian Cienfuegos Feb 28 '17 at 16:14
  • 3
    THIS did NOT do the trick. – FreakyLearner Feb 01 '21 at 12:49
  • 1
    It certainly did! – Franky Jan 10 '22 at 15:13
  • Now virtual box not starting, getting this error - The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. may correct this. Make sure that you are not mixing builds of VirtualBox from different sources – Sumeet May 20 '22 at 06:59
12

Install the latest version of virtualbox say 4.3.10 or above from here and also it's corresponding guest additions, extensions Or you can also install the latest virtualbox version from the multiverse repository via apt-get. I also faced the same problem in older virtualbox version running Ubuntu 14.04 as guest OS.

To install guest additions, follow this answer.

Avinash Raj
  • 80,616
11

If that happens once you have the guest additions installed, it may help reconfiguring DKMS

dpkg-reconfigure virtualbox-guest-dkms

It happens to me every time Kernel is upgraded and the above provides the solution.

  • 3
    Don't forget to install the dkms package too. It's not a dependency, but if you have it installed, kernel upgrade hooks will rebuild the Virtualbox kernel modules automatically. – gertvdijk Dec 04 '14 at 13:56
  • Thank you so much. This issue was driving me crazy. (kali linux) – Olivier Lasne Apr 27 '20 at 10:49
8

I tried all of the suggested solutions:

  1. In the guest machine (Kubuntu 18.04), I installed 'virtualbox-guest-additions-iso' (thanks to Moshe Beeri)
  2. Installed 'virtualbox-guest-dkms' (thanks to Dr. Windows for the hint)
  3. While the guest machine is turned off, I checked if 'Maximum Guest Screen Size' is set to 'Automatic' (saw this suggestion in another post)
  4. Then I changed the 'Graphics Controller' to 'VBoxVGA'. (thanks to uceieluez)

Only after the 4th step the resolution of the guest machine has been fixed. Now it automatically resize to fit the virtual machine window.

I am not sure if the fix was because of changing the graphics controller or all of the above. Anyway, thank you all.

  • 1
    For future readers, I would suggest selecting VBoxSVGA; ie make sure there is an 's', although I haven't tried it without. – Robert Lugg Oct 11 '19 at 22:10
5

For those who already have the guest extensions and additions , you should go check for additional drivers and install the proprietary video driver for virtualbox , then reset your machine

5

In addition to ensuring that guest additions is actually installed in the guest machine you should also check the 'Auto-Resize Guest Display' option in the 'View' menu in Virtuablbox (on the host machine).

mipos
  • 51
  • 1
    This is a useful tip for me. I missed this step. Thank you. – Michael Qin Apr 04 '21 at 05:20
  • This worked for me. Moreover, in MacOS, the graphic controller is VMSVGA. Then, in the view tab from the contextual menu, I have checked the auto-resize guest display option – Pathros Jun 25 '21 at 03:17
3

I have installed and removed Guest Additions multible times (either from 'Devices' menu or from terminal) with no luck. I have noticed that while doing this, i was getting some terminal messages regarding DKMS.

So... i tried to install DKMS separetely and boom! Full screen with high resolution again! So to summarise:

  • Install Guest Additions (Devices->Insert Guest Additions CD image...)
  • Open a terminal and type this sudo apt-get install virtualbox-guest-dkms
  • Restart

Hope it helps.

Mario
  • 133
1

I know its an old thread, but I recently had the same issue on an Ubuntu host+guest setup and figured I might be able to help someone in my same boat.

I had previously installed Guest Additions via sudo apt install virtualbox-guest-additions-iso, and would get the issue where I can either have resizing without 3D acceleration through VBoxVGA, or 3D acceleration with no resizing with VMSVGA (and no imcompatible settings message).

I uninstalled the additions with sudo apt remove virtualbox-guest-additions-iso && sudo apt autoremove, then rebooted. I then installed Guest Additions the intended way, by inserting the ISO and installing the .run file, and viola, I now have auto resizing display with VMSVGA and 3D acceleration.

1

My guest machine was Windows, but since the problem turned out to be with VirtualBox (6.1), this may still be relevant.

Even though I had the following:

  • Guest Additions installed
  • VirtualBox Manager → virtual machine → SettingsDisplayScreenGraphics Controller set to VBoxSVGA
  • VM window → ViewAuto-resize Guest Display turned on

… it still didn't work for me. I wasn't even able to select any of the standard screen sizes for my virtual screen.

The solution I found was to shut down my VM, quit the VirtualBox Manager, and type the following from the command line:

VBoxManage setextradata "Windows 10" GUI/LastGuestSizeHint 3840,2160

You'll need to replace 'Windows 10' with the name of your virtual machine, and the last parameter should match the resolution of your monitor.

I was running VirtualBox under Linux, but it seems there's such a thing as VBoxManage.exe for Windows, so it should exist for you. You may need to escape the spaces differently in DOS, though, and maybe the slash as well… it's been a long time since I've dealt with DOS.

0

I tried so many things and as someone's hint to the SMVGA'S drivers root rights driver in a folder VBoxClient I did not have I just...

...ran the app out of terminal with sudo...

...leading to the demand for a boot from CD which I aborted. But then after starting again regularily from menue the rezising works well although the VMbox's window frame showing strange behavior. But I do not care since it autofits. Winn8.1 in VBox7, Gnome43.2 Wayland, ArchLinux6, Intel® Core™ i7-8650U × 8.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center. – Community Dec 15 '22 at 12:11
0

Change the Graphics Controller of the virtual machine to VBoxSVGA. VirtualBox will warn you that invalid settings are detected. Ignore this message. This trick worked for me. I installed Bodhi Linux on VirtualBox.

Vikas
  • 1
0

I've tried most of the above answers, but what worked for me was going into settings > User Interface, then changing the Visual State dropdown from "Scaled" to "Normal (window)".

0

I had a window resizing issue on VirtualBox 7.0, Ubuntu 22.04 LTS.

Issue turned out to be the new Wayland display server protocol. It basically doesn't work with VirtualBox.

VirtualBox is tracking the issue here, but there's unlikely to be a fix anytime soon since it has to do with how Wayland handles memory.

Related StackExchange issue is here, you can use these instructions to switch back to X11.org from Wayland.

Luciano
  • 101
0

For me it was:

  • In VB setting VMSVGA option with 3D acceleration
  • Mounting Guest Additions
  • Installing sudo apt-get install virtualbox-guest-dkms
  • Running sudo ./media/<user>/VBox_GAs_7.0.20/autorun.sh
  • From VB window with guest OS, open dropdown menu View -> <virtual_screen_name> -> Scale to 200% (autoscaled output)

It worked for me with Ubuntu 22 as both host and guest and version 7.0.20 of VB.

serwus
  • 1