在VirtualBox中启用图形卡
我最近买了一台配备以下配置的新笔记本电脑
- CPU:Intel i5 2450
- RAM:8 GB DDR3
- GPU:NVIDIA GeForce GTX 520 1GB
我使用VirtualBox和Windows 7作为来宾设置了虚拟机。 我想在其中使用我的(主机)显卡,但虚拟机只显示128 MB的video内存。
我正在使用Bumblebee并使用启动虚拟机
$ optirun VBoxManage startvm "Windows 7"
请建议我如何在虚拟机中使用我的显卡进行3D加速。
与虚拟机中的几乎所有内容一样,显卡也是虚拟的。 您仍然可以访问硬件图形加速,但它仅在有限的范围内(其中一个限制是最大128 MB RAM。)
要使用这些可用的3Dfunction,请在虚拟机的“ 显示”设置中选择3D加速 。 此外,您还需要Guest Additions来为虚拟图形适配器提供驱动程序。
有关将PCI卡传递给Virtual Box的实验性function(可能只使用少量图形卡),请参阅:
- 如何在Ubuntu 12.10上使用NVIDIA GeForce M310作为VirtualBox中的guest虚拟机运行?
检查您的Ubuntu 12.10或13.04客户是否正在使用3D加速
/usr/lib/nux/unity_support_test -p
你应该看到这样的东西
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
如果你看到“不是软件渲染”和“支持Unity 3D”,则说不。 这意味着Unity正在使用慢速LLVM管道。
要启用3D支持,首先需要更新linux-headers
uname -r sudo apt-get install linux-headers-$(uname -r) sudo apt-get autoremove sudo apt-get install build-essential
现在从设备插入vitualbox guest iso并手动安装
cd /media ls cd username ls cd VBOX* ls sudo ./VBoxLinuxAdditions.run
将vboxvideo插入/ etc / modules
sudo nano /etc/modules
在文件末尾添加“vboxvideo”
loop lp vboxvideo
重新启动机器
sudo reboot
重启后,检查“不是软件渲染”和“支持Unity 3D”是否启用
/usr/lib/nux/unity_support_test -p
您要做的下一件事是增加video内存。 寻找.vbox文件
nano /home/username/VirtualBox VMs/ubuntu/ubuntu.vbox
更换
至
来自http://namhuy.net/951/how-to-fix-slow-performance-ubuntu-13-04-running-in-virtualbox.html
在Ubuntu-64b下,我在Vista 32b中分配了3G-RAM,256MB用于video,处理器2D / 3D加速器启用(也是IO APIC,最多使用3个核心处理器)。 还有一件事……安装DirectX所有工作……音质比我在旧笔记本电脑上运行Wine时的音质要好得多。