A Bridge to the Cloud...

Oracle VM VirtualBox 6.0: 3D Acceleration for Ubuntu 18.04 Guest

Simon Coter
Director of Product Management

VirtualBox 6.0 introduced a renovated 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.0 3D acceleration:

  • Make sure you install the VirtualBox 6.0 Guest Additions into the Guest Machine (Ubuntu on this example)
  • Enable 3D acceleration in the VM settings
  • Select "VMSVGA" or "VBoxSVGA" 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, type the following command:

# /usr/lib/nux/unity_support_test -p

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

Join the discussion

Comments ( 4 )
  • JYAK Friday, June 7, 2019
    First off, TYVM for blogging/posting. It is a help to eternal noobs like myself! ;o)

    It doesn't appear that I have 3D acceleration working:

    I'm running Mint 19 xfce in VB 6.0.8 on top of Win10 on an AMD A10-9630p

    $ uname -a
    Linux mint19 4.15.0-51-generic #55-Ubuntu SMP Wed May 15 14:27:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux


    $ glmark2
    => The first 2 FPS are 76 & 90
    => https://pastebin.com/grKKr7DN

    $ /usr/lib/nux/unity_support_test -p
    bash: /usr/lib/nux/unity_support_test: No such file or directory

    My web search skills appear to be lacking. I haven't found info on how to install "unity_support_test" for Mint/xfce.

    Regardless, based on glmark2's numbers, I don't think 3D acceleration is working correctly.

    Where to from here?

    Thanks in advance.
  • Simon Tuesday, June 25, 2019

    I've just tested the same on Mint 19 and I got the same results I also saw with Ubuntu (thousands of FPS).
    I would suggest you to verify that you have latest VirtualBox Guest Additions correctly installed and running on Linux Mint:

    # sudo lsmod |grep vboxvideo (to see if module is loaded)
    # sudo modinfo vboxvideo (to check the release)

  • Jon Tuesday, October 22, 2019

    Been scratching my head, and I'm a newbie. I followed your instruction and when I tried running `VirtualBox:/usr/lib/nvidia$ /usr/lib/nux/unity_support_test -p
    bash: /usr/lib/nux/unity_support_test: No such file or directory` any idea why? I'm using 6.0.14 in macbook pro catalina os
  • Simon Thursday, October 24, 2019
    Hi Jon,

    the binary "/usr/lib/nux/unity_support_test" is part of the package "nux-tools"; so you just need to install this package on your system.

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