A Bridge to the Cloud...

Oracle VM VirtualBox 6.1: 3D Acceleration for Ubuntu 18.04 and 20.04 Virtual Machines

Simon Coter
Senior Manager, Oracle Linux and Virtualization Product Management

VirtualBox 6.1 introduced an improved 3D acceleration support; thanks to the huge work done by the VirtualBox engineering team we're now able to have improved performance for 3D on Virtual Machines running on VirtualBox. 

To Configure a VM to use VirtualBox 6.1 3D acceleration:

  • Make sure you install the VirtualBox 6.1.[latest] Guest Additions into the Guest Machine (Ubuntu on this example)
  • Enable 3D acceleration in the VM settings
  • Select "VMSVGA" as "Graphic Controller"

Then simply start-up your Ubuntu guest.

But on some platforms, and in some circumstances, the wrong renderers may be used by the guest OS which results in very slow 3d performance of the guest.  

To check that you're using VirtualBox 3D acceleration on Ubuntu 18.04 or 20.04, type the following command:

# /usr/lib/nux/unity_support_test -p

If the binary above is not available, you have to proceed to install a package named "nux-tools" with the following step:

# apt-get install nux-tools

If you see something like this:

... i.e. the OpenGL Renderer is NOT "SVGA3D", then you are NOT using the correct OpenGL drivers.

To get best performance possible, you have to install VirtualBox 6.0 guest-addition within the VM; to accomplish this target you have to execute following steps:

  • Install  required packages for building kernel modules.
# sudo apt install dkms build-essential module-assistant
  • Prepare your system to build kernel module
# sudo m-a prepare
  • In VirtualBox menu bar, select Devices => Insert Guest Additions CD image; at this point you'll be asked to run the software contained in it, click Run button:

Once the guest additions have been installed, press Enter to close the terminal window and "reboot" your Ubuntu guest-machine.

Once you do this, and then you reboot the guest you should re-rerun: 

# /usr/lib/nux/unity_support_test -p  

Which hopefully will result in the SVGA3D renderers being seen to be used:

And a consequence is that your Linux guest will be faster and smoother.

A further comment, from "Christian Mahner", that could help:

Try installing xorg vmware drivers on your Ubuntu guest Virtual Machine:

# sudo apt-get install xserver-xorg-video-vmware-hwe-18.04

and use the following settings vor your vm:
Controller: VMSVGA (!)
3D Acceleration enabled
Scale Factor: 100%

Here the results I've obtained by executing "glmark2" on an Ubuntu 18.04 guest running on Oracle VM VirtualBox 6:

scoter@ubuntu1804:~$ glmark2
    glmark2 2014.03+git20150611.fa71af2d
    OpenGL Information
    GL_VENDOR:     VMware, Inc.
    GL_VERSION:    2.1 Mesa 18.2.8
[build] use-vbo=false: FPS: 1493 FrameTime: 0.670 ms
[build] use-vbo=true: FPS: 1672 FrameTime: 0.598 ms
[texture] texture-filter=nearest: FPS: 1538 FrameTime: 0.650 ms
[texture] texture-filter=linear: FPS: 1866 FrameTime: 0.536 ms
[texture] texture-filter=mipmap: FPS: 863 FrameTime: 1.159 ms
[shading] shading=gouraud: FPS: 1495 FrameTime: 0.669 ms
[shading] shading=blinn-phong-inf: FPS: 1465 FrameTime: 0.683 ms
[shading] shading=phong: FPS: 1308 FrameTime: 0.765 ms
[shading] shading=cel: FPS: 1344 FrameTime: 0.744 ms
[bump] bump-render=high-poly: FPS: 707 FrameTime: 1.414 ms
[bump] bump-render=normals: FPS: 1703 FrameTime: 0.587 ms
[bump] bump-render=height: FPS: 1925 FrameTime: 0.519 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 1701 FrameTime: 0.588 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 938 FrameTime: 1.066 ms
[pulsar] light=false:quads=5:texture=false: FPS: 1747 FrameTime: 0.572 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 517 FrameTime: 1.934 ms
[desktop] effect=shadow:windows=4: FPS: 608 FrameTime: 1.645 ms

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.