Solution to Ubuntu Lagging and Running Slow in Virtual Box

Posted by Admin on 2/18/13 at 9:11 PM in
Ubuntu running slow in VirtualBox

In the last 3 versions of Ubuntu, Unity 2D was an option for those whose didn't have 3D acceleration hardware support but starting from 12.10, Ubuntu no longer provides Unity 2D. Instead, the Unity in this version is run under LLVM, which means the code meant for the GPU will be run on the CPU.

But this causes a problem in Virtual Box. Ubuntu 12.10, after installation in virtual box (4.2.x) starts to lag heavily or,in simple words, starts to work very very slow. So today we shall provide a solution here.

Check out how to Install Ubuntu

Solution to Ubuntu running very slow in Virtual Box

To check if your Ubuntu 12.10 guest is using 3D acceleration, run this command in the terminal :

/usr/lib/nux/unity_support_test -p

You should get the following output

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

Notice that, Not software rendered and Unity 3D supported both return no. This means Unity is using slow LLVMpipe.

Now to enable 3D acceleration for Ubuntu in Virtual Box

Install VirtualBox Oracle VM VirtualBox Extension Pack (get it here)

Then in Ubuntu, install some required packages by running the below command in terminal:

 sudo apt-get install linux-headers-$(uname -r) build-essential

Now install the virtual box guest additions by clicking Devices, Install Guest Additions.

Install VirtualBox Guest Additions in Ubuntu

Then run this command in the terminal:

sudo sh /media/typicaltips/VBOXADDITIONS_4.2.6_82870/

Here, replace 'typicaltips' with your username and please note that we are using Virtual box 4.2.6 and hence the location of the file is as mentioned above.

Then add the vboxvideo driver to the instance by running:

 sudo bash -c 'echo vboxvideo >> /etc/modules'

Now shutdown Ubuntu and open virtual box. Open settings of Ubuntu instance, navigate to Display tab and tick Enable 3D acceleration.

Now start Ubuntu again and check if the 3D acceleration is running or not by executing this command in the terminal :

usr/lib/nux/unity_support_test -p

Check 3D Acceleration in Ubuntu

If windows seem to disappear, install CompizConfig Settings Manager and disable FBO in the OpenGL section.

That's it. Your Ubuntu installation under virtual box should work fine now. Come back for more.

Singapore Top Web & Mobile Development Company


Find Your Site on Google

Stay Updated with Newsteller
Copyright © 2013 Typical Tips. All Rights Reserved
About Us | Services