Graphics horribly corrupted on Ubuntu 16.04 in VirtualBox, showing random strips of pixelated colors

Inside a VirtualBox VM, I have installed myself an Ubuntu 16.04.1 LTS Server installation. However, when I installed the ubuntu-desktop package and rebooted, this happened:

Exact command I used: sudo apt-get update; sudo apt-get install ubuntu-desktop
..and then a reboot command.

This just seems like a corrupted top-left portion of the screen, as my cursor can appear in view (but corrupted):

This is a purely graphical issue because I can use the keyboard to successfully progress to a desktop:

Note: On startup it shows correct graphics for a split-second then reverts to glitch.

Any help on this?


I have also experienced this problem before and it is easy to work around:

Press CtrlAltF3 to switch to text terminal and then CtrlAltF7 to switch back to GUI (alternatively CtrlAltF1 in the case of some newer Ubuntu versions – simply try it if CtrlAltF7 does not work).

If your host is Linux, too, the mentioned keystrokes will influence the host machine. Use the Host key instead of CtrlAlt to influence the guest.

References:

  • https://bugs.launchpad.net/ubuntu/+source/console-setup/+bug/1443853
  • https://www.virtualbox.org/ticket/13615
  • How do I switch between console mode and GUI in 17.10 and newer?

This may be obvious to some, but in my instance (Ubuntu Host), Ctrl+Alt+F1 switched the entire host video mode, and switching back didn't change the status of the guest video. The trick was to use HOST+F1 (e.g. the RIGHT Ctrl key, no ALT), and then HOST+F7 to switch back.


Hit this scrambled/distorted screen today with 18.04 installer. I fixed it by increasing the video memory of the VM.