Ubuntu: Cannot Use 3d Acceleration with Ubuntu Guest in VirtualBox



Question:

I'm running Ubuntu 16.04LTS guest on a Windows 10 host. The guest additions appear to be working since Ubuntu is able to run at full resolution, clipboard sharing works, etc. However, 3d acceleration will not work, causing Unity animations, etc. to run VERY slowly. Typing sudo /usr/lib/nux/unity_support_test -p gives the following result:

OpenGL vendor string:   VMware, Inc.  OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.8, 256 bits)  OpenGL version string:  3.0 Mesa 11.2.0    Not software rendered:    no  Not blacklisted:          yes  GLX fbconfig:             yes  GLX texture from pixmap:  yes  GL npot or rect textures: yes  GL vertex program:        yes  GL fragment program:      yes  GL vertex buffer object:  yes  GL framebuffer object:    yes  GL version is 1.4+:       yes    Unity 3D supported:       no  

Yet, checking Software&Updates in Ubuntu shows that the proper VBox drivers are actually being used:

Image of Software&Updates graphics drivers

So I'm not sure why I'm not able to benefit from 3d acceleration.


Solution:1

I experienced exactly the same issue when I installed the dkms driver from the Ubuntu repositories via apt-get. Simply reinstalling the Guest Additions using the VirtualBox Guest Additions CD solved it.


Solution:2

I had the same problem. I believe it is a compatibility problem between the Ubuntu version and Virtualbox versions. This combination works good for me:

  Linux:       Ubuntu 16.04.2 LTS (Guest System)  VirtualBox:  5.0.32  

You find this (little older, but still active maintenance today) Virtualbox version here: VirtualBox 5.0 Downloads

(Re-)install the extension pack from the same page.

(Re-)install the guest additions in Linux from the Virtualbox menu: "Devices"->"Insert Guest Additions CD Image"

Restart Linux guest system.


Solution:3

I had the same issue and solved it by explicitly loading the virtualbox kernel module first:

File: /etc/modules  vboxvideo  

After that I got this result:

OpenGL vendor string:   Humper  OpenGL renderer string: Chromium  OpenGL version string:  2.1 Chromium 1.9    Not software rendered:    yes  Not blacklisted:          yes  GLX fbconfig:             yes  GLX texture from pixmap:  yes  GL npot or rect textures: yes  GL vertex program:        yes  GL fragment program:      yes  GL vertex buffer object:  yes  GL framebuffer object:    yes  GL version is 1.4+:       yes    Unity 3D supported:       yes  


Solution:4

I used the information deom https://blogs.oracle.com/scoter/3d-acceleration-for-ubuntu-guests-v2 and it helped me. It seems like coming directly from the development team of Oracle, so I recommend using the link if it is still actual.

Here is it in short (VBox 5.1.30 and Ubuntu 16.04 LTS):

  • 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

  • Now (re)install the guest additions by using the VirtualBox menu:
    "Devices"->"Insert Guest Additions CD Image"
    (as already recommended previous answers here).

Thats it.


Solution:5

Leo's post was helpful, but not in the way expected. Had run the appropriate package installs and commands he listed dozens of times on fresh Ubuntu installs/VMs, with no luck.

Turns out the issue seems to be only certain versions of VBox are compatible with related versions of Ubuntu! Leo's version pair (VBox 5.1.30 and Ubuntu 16.04 LTS) ended up working, after trying 5+ other version pairs.

Here's the steps that worked:

  1. Download exact VBox 5.1.30 and Ubuntu 16.04 LTS versions, and create a fresh VM with max video memory allowed
  2. Install Ubuntu from ISO onto the VM and do not install Ubuntu updates while waiting or third party software for media when prompted
  3. Do NOT run sudo apt update or sudo apt upgrade as mentioned in other blog posts
  4. Reboot and run: sudo apt install dkms build-essential module-assistant sudo m-a prepare
  5. Insert the Guest Additions CD using the VBox host menu. Run it. Reboot, and it worked.

On a side note, it would appear upgrading your VBox version can break your installation of Ubuntu! However I suspect you should be able to upgrade your Ubuntu indefinitely without a problem once you have 3D acceleration working using the Guest Additions, without any issue. Have not tested that theory yet though.

It may also be helpful for some to know that when 3D acceleration is not working in Ubuntu + VBox it will cause keys to stick repeatedly when typing, making it all but impossible to use Ubuntu. You can reproduce this by installing the latest (v17) Ubuntu with latest VBox (5.2) on Macbook Pro Retina / High Sierra. Install runs fine but after reboot cannot even login to Ubuntu as keys stick. For example, "test" will turn into tttttttttteeeeeeesssssssssstttttt" and then even a single backspace usually wipes the entire input field.


Solution:6

Within my VirtualBox 5.2.6 under Mac OSX 10.13.3 with latest Virtual Box Extension and Virtual Box Addition 5.2.7 and under different VirtualBox startup modes (Normal start, Headless start, Detachable start)

3D OpenGL acceleration works well under Ubuntu 16.04 LTS x64 (updated) only in "Normal start" mode.

~$ /usr/lib/nux/unity_support_test -p  OpenGL vendor string:   Humper  OpenGL renderer string: Chromium  OpenGL version string:  2.1 Chromium 1.9    Not software rendered:    yes  Not blacklisted:          yes  GLX fbconfig:             yes  GLX texture from pixmap:  yes  GL npot or rect textures: yes  GL vertex program:        yes  GL fragment program:      yes  GL vertex buffer object:  yes  GL framebuffer object:    yes  GL version is 1.4+:       yes    Unity 3D supported:       yes  

using "Headless start" or "Detachable start" doesn't work 3D acceleration because VMware driver it's automatically selected.

~$ /usr/lib/nux/unity_support_test -p      OpenGL vendor string:   VMware, Inc.  OpenGL renderer string: llvmpipe (LLVM 5.0, 256 bits)  OpenGL version string:  3.0 Mesa 17.2.4    Not software rendered:    no  Not blacklisted:          yes  GLX fbconfig:             yes  GLX texture from pixmap:  yes  GL npot or rect textures: yes  GL vertex program:        yes  GL fragment program:      yes  GL vertex buffer object:  yes  GL framebuffer object:    yes  GL version is 1.4+:       yes    Unity 3D supported:       no  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »