Ho provato una macchina virtuale Android chiamata androVM su un laptop Ubuntu 12.04 a 32 bit con configurazione grafica ibrida Intel / Nvidia come sistema operativo guest (dettagli sulle schede grafiche di seguito). Ho testato alcune delle applicazioni ad alta intensità grafica, come Angry Birds e AnTuTu, un'applicazione di benchmarking, in esecuzione virtualbox
e AndroVMplayer
con primusrun
, ma sembrano davvero lente, nessuna differenza come quando si esegue senza primusrun
. Ho anche provato optirun
, che si blocca semplicemente con un segfault. Come posso abilitare l'accelerazione OpenGL per questa VM nel mio sistema grafico ibrido?
La versione di AndroVM che sto eseguendo è questa:
androVM_vbox86tp_4.1.1_r6.1-20130222-gapps-Houdini-flash.ova
E sto seguendo le istruzioni di installazione come spiegato qui:
AndroVM 20130222 versione | Blog di AndroVM
Sotto Virtualbox, ho impostato le opzioni grafiche impostate su 128 MB di memoria video e abilitato l'accelerazione 3D e l'accelerazione 2D. Il mio BIOS host ha le sue opzioni di virtualizzazione attivate. Ecco i miei dettagli hardware:
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)
Quando utilizzo optirun ./AndroVMplayer
, ottengo questo:
[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)
E qui ci sono i dettagli della mia installazione di virtualbox:
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
Se lo eseguo optirun
, visualizzo il seguente errore:
> [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)
./AndroVMplayer
per la prima volta su una nuova VM, faccio clic su "Abilita accelerazione hardware".
sudo primusrun lshw -class display
ed entrambe le carte vengono visualizzate. Inoltre, quando corro,primusrun firefox
ottengo circa 40-50fps su questo sito webglsamples.googlecode.com/hg/aquarium/aquarium.html . Ho solo circa 5 fps senzaprimusrun
.