Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I recently brought a new laptop with following configuration

  • Intel i5 2450
  • 8 Gb DDR3 RAM
  • Nvidia geforce gtx 520 1 GB card

I had setup a Windows 7 virtual machine using VirtualBox. I want to use my graphics card in virtual machine but the virtual machine is only showing 128 MB of video memory.

I am using Bumblebee and starting virtual machine using

 $ optirun VBoxManage startvm "Windows 7

Please suggest me how should I use my graphics card for 3D acceleration in virtual machine.

share|improve this question
add comment

3 Answers 3

up vote 10 down vote accepted

As with almost everything in a virtual machine, the graphics card is virtual too. You can still access the hardware graphics acceleration, but it is to a limited extent only (one of the limitations is the max of 128 MB RAM.)

To make use of those 3D features available choose 3D acceleration in the Display settings of your virtual machine. In addition you will also need the Guest Additions to provide a driver for the virtual graphics adapter.

For the experimental feature of passing a PCI card to Virtual Box (which may work with few graphic cards only) see:

share|improve this answer
1  
Thanks,isn't there exist any other option to make full use of graphics card in vm.What about kvm-qmenu? –  bitsbuffer May 19 '12 at 12:15
add comment

To check if your Ubuntu 12.10 or 13.04 guest is using 3D acceleration

/usr/lib/nux/unity_support_test -p

You should see something like this

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

If you see “Not software rendered” and “Unity 3D supported” both say no. This means Unity is using slow LLVMpipe.

To enable 3D supported, fist you will need to update linux-headers

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

Now insert vitualbox guest iso from devices and to install manually

cd /media
ls
cd username
ls
cd VBOX*
ls
sudo ./VBoxLinuxAdditions.run

Insert vboxvideo to /etc/modules

sudo nano /etc/modules

Add “vboxvideo” at the end of the file

loop
lp
vboxvideo

Reboot the machine

sudo reboot

Check ”Not software rendered” and “Unity 3D supported” are enabled or not after rebooting

/usr/lib/nux/unity_support_test -p

The next thing you want to do is to increase video memory. Look for .vbox file

nano /home/username/VirtualBox VMs/ubuntu/ubuntu.vbox

Replace

<Display VRAMSize=”128″ monitorCount=”1″ accelerate3D=”true” accelerate2DVideo=”false”/>

To

<Display VRAMSize=”256″ monitorCount=”1″ accelerate3D=”true” accelerate2DVideo=”false”/>

from http://namhuy.net/951/how-to-fix-slow-performance-ubuntu-13-04-running-in-virtualbox.html

share|improve this answer
add comment

Under Ubuntu-64b, I assigned 3G-RAM, 256MB for video, processor 2D/3D accelerator enable(also IO APIC to use up to 3 core processor) in Vista 32b. One more thing... Install DirectX All working... and the sound quality is a lot better than the one I got when running under Wine in my old laptop.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.