其他分享
首页 > 其他分享> > 12.04 – 使用primusrun在androVM中进行Android 3D加速?

12.04 – 使用primusrun在androVM中进行Android 3D加速?

作者:互联网

我一直在Ubuntu 12.04 32位笔记本电脑上尝试使用名为androVM的Android虚拟机,其中Intel / Nvidia混合图形配置作为客户操作系统(下面的图形卡详细信息).我测试了一些图形密集型应用程序,如“愤怒的小鸟”和AnTuTu,一个基准测试应用程序,运行virtualbox和AndroVMplayer与primusrun,但它们看起来非常慢,没有任何区别,就像没有primusrun运行时一样.我也试过optirun,它只是用段错误崩溃了.如何在混合图形系统中为此VM启用OpenGL加速?

我正在运行的AndroVM版本是这样的:

androVM_vbox86tp_4.1.1_r6.1-20130222-gapps-houdini-flash.ova

我按照安装说明进行操作,如下所述:
AndroVM 20130222 release | AndroVM blog

在Virtualbox下,我将切换的图形选项设置为128MB视频内存和启用3D加速和2D加速.我的主机BIOS已激活其虚拟化选项.这是我的硬件细节:

sudo primusrun lshw -class display

*-display               
   description: VGA compatible controller
   product: GT218 [GeForce 310M]
   vendor: NVIDIA Corporation
   physical id: 0
   bus info: pci@0000:01:00.0
   version: a2
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
   configuration: driver=nvidia latency=0
   resources: irq:16 memory:d2000000-d2ffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:d000(size=128) memory:d3000000-d307ffff
*-display
   description: VGA compatible controller
   product: Core Processor Integrated Graphics Controller
   vendor: Intel Corporation
   physical id: 2
   bus info: pci@0000:00:02.0
   version: 18
   width: 64 bits
   clock: 33MHz
   capabilities: msi pm vga_controller bus_master cap_list rom
   configuration: driver=i915 latency=0
   resources: irq:52 memory:d3400000-d37fffff memory:b0000000-bfffffff ioport:e080(size=8)

当使用optirun ./AndroVMplayer时,我得到了这个:

[VGL] WARNING: The OpenGL rendering context obtained on X display
[VGL]    :8 is indirect, which may cause performance to suffer.
[VGL]    If :8 is a local X display, then the framebuffer device
[VGL]    permissions may be set incorrectly.
Got command 1002
Got command 1002
Got command 1
Got command 1002
Segmentation fault (core dumped)

以下是我的虚拟机安装的详细信息:

 dpkg -l virtualbox* | grep ii    

ii  virtualbox                                4.1.12-dfsg-2ubuntu0.2                               x86 virtualization solution - base binaries
ii  virtualbox-dkms                           4.1.12-dfsg-2ubuntu0.2                               x86 virtualization solution - kernel module sources for dkms
ii  virtualbox-guest-additions                4.1.12-1                                             transitional package for virtualbox-guest-additions-iso
ii  virtualbox-guest-additions-iso            4.1.12-1                                             guest additions iso image for VirtualBox
ii  virtualbox-guest-dkms                     4.1.12-dfsg-2ubuntu0.2                               x86 virtualization solution - guest addition module source for dkms
ii  virtualbox-guest-utils                    4.1.12-dfsg-2ubuntu0.2                               x86 virtualization solution - non-X11 guest utilities
ii  virtualbox-guest-x11                      4.1.12-dfsg-2ubuntu0.2                               x86 virtualization solution - X11 guest utilities
ii  virtualbox-qt                             4.1.12-dfsg-2ubuntu0.2                               x86 virtualization solution - Qt based user interface

如果我用optirun运行它,我会收到以下错误:

> [VGL] WARNING: The OpenGL rendering context obtained on X display
> [VGL]    :8 is indirect, which may cause performance to suffer. [VGL] 
> If :8 is a local X display, then the framebuffer device [VGL]   
> permissions may be set incorrectly.
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glCompileShader:351
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetShaderiv:1215
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetShaderInfoLog:1238
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetUniformLocation:1382
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glCompileShader:351
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetShaderiv:1215
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetShaderInfoLog:1238
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetUniformLocation:1382
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetUniformLocation:1382
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glCompileShader:351
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetShaderiv:1215
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetShaderInfoLog:1238
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetUniformLocation:1382
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetUniformLocation:1382
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glCompileShader:351
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetShaderiv:1215
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetShaderInfoLog:1238
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetUniformLocation:1382
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetUniformLocation:1382
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetUniformLocation:1382
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glCompileShader:351
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetShaderiv:1215
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetShaderInfoLog:1238
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetUniformLocation:1382
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetUniformLocation:1382
> error 0x501
> sdk/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glUseProgram:1913
> error 0x501 AndroVMplayer: ../../src/xcb_conn.c:180: write_vec:
> Assertion `!c->out.queue_len' failed. Aborted (core dumped)

解决方法:

openGL在运行android环境时使用特定的规则.我无法完全回答您的问题,但我可以向您推荐Android开发套件. developer.android.com/sdk/
设置完成后,它会自动配置您的设置以最佳地使用渲染,并且它可以提供3D Android环境.

标签:android,virtualbox,hybrid-graphics,12-04
来源: https://codeday.me/bug/20190807/1613421.html