VirtualBox

Opened 10 years ago

Last modified 8 years ago

#12320 reopened defect

3D acceleration not working with Gnome Ubuntu 13.10 guest (falls back to software rendering)

Reported by: someguest Owned by:
Component: 3D support Version: VirtualBox 4.3.2
Keywords: Cc:
Guest type: Linux Host type: other

Description

I have 64-bit Gnome Ubuntu 13.10 running in a VirtualBox 4.3.2 host (Windows 8.1 64-bit) with 4.3.2 guest additions installed by using the CD image that came with the host. Ubuntu's older guest addition packages are not installed (/usr/lib/xorg/modules/drivers/vboxvideo_drv.so is symlinked to /usr/lib/VBoxGuestAdditions/vboxvideo_drv_114.so, and /usr/lib/VBoxGuestAdditions is symlinked to /opt/VBoxGuestAdditions-4.3.2/lib/VBoxGuestAdditions).

According to Xorg.0.log (full log attached):

[    24.027] (EE) AIGLX error: vboxvideo does not export required DRI extension
[    24.028] (EE) AIGLX: reverting to software rendering

Needless to say, the guest desktop is terribly slow as a result of this. This has worked in older versions of Ubuntu (12.04 I think, with the bundled guest additions) and VirtualBox.

Attachments (14)

VBox.log (73.7 KB ) - added by someguest 10 years ago.
Xorg.0.log (30.4 KB ) - added by someguest 10 years ago.
Xorg.0.2.log (40.6 KB ) - added by Dugan 10 years ago.
Xorg.0.log from a Slackware 14.1 guest with nonworking 3D acceleration
Xorg.0.3.log (30.5 KB ) - added by someguest 10 years ago.
log from 3.4.3 session
VBox.2.log (58.8 KB ) - added by someguest 10 years ago.
log from 3.4.3 session
glxinfo.log (23.4 KB ) - added by inzpektor 10 years ago.
Xorg.0.log.3dOn (32.5 KB ) - added by inzpektor 10 years ago.
VBox.3.log (61.6 KB ) - added by someguest 10 years ago.
VBox.4.log (61.6 KB ) - added by someguest 10 years ago.
Log file after crash in 4.3.6
VBox.5.log (73.4 KB ) - added by someguest 10 years ago.
Log file after crash in 4.3.8
VBox.6.log (73.4 KB ) - added by someguest 10 years ago.
Log file after crash in 4.3.10
VirtualBox.exe.3144.zip (348.4 KB ) - added by someguest 10 years ago.
Minidump file after crash in 4.3.10
CrashDumps.7z (252.0 KB ) - added by someguest 10 years ago.
Minidump and log file after crash in 4.3.12
VBox.7.log (64.0 KB ) - added by Josh Gunderson 10 years ago.
Also seeing this in Linux Mint 17 (based on Ubuntu 14.04) on VirtualBox 4.3.14 r95030 x64

Download all attachments as: .zip

Change History (67)

by someguest, 10 years ago

Attachment: VBox.log added

by someguest, 10 years ago

Attachment: Xorg.0.log added

comment:1 by Michael Thayer, 10 years ago

Are you sure that you are using software rendering? Please run glxinfo from the mesa-utils package to check (it should say you are using direct rendering, and the vendor string should be "Chromium" if 3D acceleration is in use).

VirtualBox 3D pass-through really doesn't support AIGLX, so the log messages are correct in any case.

by Dugan, 10 years ago

Attachment: Xorg.0.2.log added

Xorg.0.log from a Slackware 14.1 guest with nonworking 3D acceleration

comment:2 by Dugan, 10 years ago

I am experiencing this my Slackware 14.1 guests. It happens: on a 32-bit Slackware 14.1 guest on a 64-bit CentOS host, on a 64-bit Slackware 14.1 guest on a 64-bit CentOS 6.4 host, and on a 32-bit Slackware 14.1 guest on a 64-bit Windows 7 host. In all of these cases, I'm running VirtualBox 4.3.2 and have properly installed the guest additions.

I don't actually have 3D acceleration:

bash-4.2$ LIBGL_DEBUG=verbose glxinfo | grep direct
libGL: screen 0 does not appear to be DRI2 capable
libGL: XF86DRIGetClientDriverName: 1.0.0 vboxvideo (screen 0)
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/vboxvideo_dri.so
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 5, (OK)
drmOpenByBusid: Searching for BusID pci:0000:00:02.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 5, (OK)
drmOpenByBusid: drmOpenMinor returns 5
drmOpenByBusid: Interface 1.4 failed, trying 1.1
drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
libGL error: Calling driver entry point failedlibGL error: reverting to software direct rendering
libGL error: failed to load driver: vboxvideo
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/swrast_dri.so
direct rendering: Yes
bash-4.2$

Steam is agonizingly slow in its screen redraws, and prints the following (multiple times) to the console:

libGL error: failed to load driver: vboxvideo
libGL error: Try again with LIBGL_DEBUG=verbose for more details.

vboxvideo is loaded:

bash-4.2$ lsmod | grep -i vbox
vboxsf                 34575  0 
vboxvideo               1225  1 
drm                   186279  2 vboxvideo
vboxguest             161786  7 vboxsf
bash-4.2$

My Xorg.0.log is attached.

comment:3 by Dugan, 10 years ago

UPDATE:

I fixed it.

The solution was to create the following symlink:

bash-4.2$ ls -l /usr/lib/dri/swrast_dri.so 
lrwxrwxrwx 1 root root 39 Nov 20 10:39 /usr/lib/dri/swrast_dri.so -> /usr/lib/xorg/modules/dri/swrast_dri.so

Now my vendor strings in glxinfo all say Chromium. Steam even refuses to run, and popups up the following message: "Fatal Error: Steam does not run in VirtualBox with 3D acceleration enabled. Try turning off 3D acceleration." So it's definitely working. ;)

I suspect that this is the solution to every "OpenGL is not working in my Linux guest" issue that's been reported since 2009.

It is also the solution described in this thread: https://forums.virtualbox.org/viewtopic.php?f=3&t=16692&start=15#p71528

comment:4 by Michael Thayer, 10 years ago

Dugan, thank you for the find. I don't think that this will solve all of our Linux guest 3D issues, and is in fact probably not related to the original report, but I have certainly fixed that so that it should now work out of the box with Slackware 14.1.

comment:5 by Frank Mehnert, 10 years ago

Resolution: fixed
Status: newclosed

Fix is part of 4.3.4.

comment:6 by someguest, 10 years ago

Resolution: fixed
Status: closedreopened

After upgrading both host and guest additions to 4.3.4, 3D is still terribly slow and there is no mention of Chromium by glxinfo.

direct rendering: Yes
server glx vendor string: SGI
...
client glx vendor string: Mesa Project and SGI
...
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.3, 128 bits)
OpenGL version string: 2.1 Mesa 9.2.1

Note that it does say direct rendering, but llvmpipe seems to be a software rasteriser.

comment:7 by efuquen, 10 years ago

I was having the exact same problem with 4.3.0 I've upgraded to 4.3.4 and the problem persists. Same version of Ubuntu (13.10) and getting the exact same results in glxinfo as the comment above. I also get the error message listed in the original bug report:

[    24.027] (EE) AIGLX error: vboxvideo does not export required DRI extension
[    24.028] (EE) AIGLX: reverting to software rendering

comment:8 by Michael Thayer, 10 years ago

A log file for the guest and the complete Xorg.x.log file from inside the guest would be helpful.

Last edited 10 years ago by Michael Thayer (previous) (diff)

in reply to:  8 comment:9 by efuquen, 10 years ago

Replying to michael:

A log file for the guest and the complete Xorg.x.log file from inside the guest would be helpful.

Xorg file in guest: https://gist.github.com/efuquen/17b4e52e29f326251d7a

VBox.log file in host: https://gist.github.com/efuquen/3f5bd41159a969f33ff5

comment:10 by Michael Thayer, 10 years ago

It looks from that as if all is well on the X server side. What does the output of

$ LIBGL_DEBUG=verbose glxinfo

look like?

by someguest, 10 years ago

Attachment: Xorg.0.3.log added

log from 3.4.3 session

by someguest, 10 years ago

Attachment: VBox.2.log added

log from 3.4.3 session

comment:11 by someguest, 10 years ago

I've attached my logs from 3.4.3. Using LIBGL_DEBUG I get the following additional output from glxinfo:

libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
libGL: Can't open configuration file ~/.drirc: No such file or directory.
libGL: Can't open configuration file ~/.drirc: No such file or directory.

Edit: Sorry, that's 4.3.4 :)

Last edited 10 years ago by someguest (previous) (diff)

comment:12 by Michael Thayer, 10 years ago

And is this reproducible with a freshly installed Ubuntu 13.10 guest?

by inzpektor, 10 years ago

Attachment: glxinfo.log added

by inzpektor, 10 years ago

Attachment: Xorg.0.log.3dOn added

in reply to:  12 comment:13 by inzpektor, 10 years ago

Replying to michael:

And is this reproducible with a freshly installed Ubuntu 13.10 guest?

Just to clear things up a bit (@Dugan, @Michael, @Frank); Ubuntu Gnome is it's own distribution, which is based on Ubuntu - not Slackware.

I've reproduced the error with a fresh install of Ubuntu Gnome 13.10, but with a twist.

If 3D-accelleration is on in the Virtualbox settings, it boots to a black screen. If I then Ctrl-Alt-F5 and type:

export DISPLAY=:0 && LIBGL_DEBUG=verbose glxinfo

then I get:

direct rendering: Yes
server glx vendor string: Chromium
server glx version string: 1.3 Chromium

So the driver is working, except it's not :-)

I'm using Virtualbox 4.3.4 and the same version for the guest additions in Ubuntu Gnome 13.10. The host OS is Windows 7 64bit and the guest is Ubuntu Gnome 13.10 (x86 64bit).

I've attached the output of glxinfo in it's entirety and also the Xorg.log

Last edited 10 years ago by inzpektor (previous) (diff)

comment:14 by Michael Thayer, 10 years ago

inzpektor, this is a different issue - see ticket #9124.

in reply to:  12 comment:15 by efuquen, 10 years ago

Replying to michael:

And is this reproducible with a freshly installed Ubuntu 13.10 guest?

That was indeed the problem. I completely trashed my previous VM and did a clean install and it works fine now. Thanks for the help!

in reply to:  12 comment:16 by someguest, 10 years ago

Replying to michael:

And is this reproducible with a freshly installed Ubuntu 13.10 guest?

I can reproduce it with freshly installed Ubuntu Gnome 13.10 64-bit (from http://ubuntugnome.org/). The only thing I did was "Insert Guest Additions CD Image" and install the guest additions, reboot, and then install mesa-utils to run glxinfo. Still no Gallium, only SGI, Mesa, llvmpipe, etc. as before.

comment:17 by misha, 10 years ago

According to the log, you have MS Software rasterizer ogl implementation being used on host, which does not support 3D caps necessary to run 3D Desktops.
SW Rasterizer could be used either because you don't have proper 3D drivers installed on host, or you're running VBox under remote RDP session.
Please fix the above issues to make hw rasterizer to be used.

comment:18 by misha, 10 years ago

Resolution: fixed
Status: reopenedclosed

comment:19 by someguest, 10 years ago

That's a surprise. Apparently the Intel GMA X4500 driver for Windows 8 only has Direct3D support. Perhaps VirtualBox should warn the user when only software rendering is available? I will try to install the Windows 7 driver and report back.

by someguest, 10 years ago

Attachment: VBox.3.log added

comment:20 by someguest, 10 years ago

Progress of sorts... I now have hardware OpenGL support (tested and verified using other software), but VirtualBox now crashes when the guest is about to show the desktop. Attached VBox.3.log, it complains about incomplete framebuffer objects.

comment:21 by someguest, 10 years ago

Resolution: fixed
Status: closedreopened

Forgot to reopen.

comment:22 by someguest, 10 years ago

Same problem with 4.3.6 host and guest additions - boots until desktop is about to be shown, then host crashes with incomplete framebuffer object as final message in the log.

comment:23 by Frank Mehnert, 10 years ago

Please attach a new VBox.log file for VBox 4.3.6.

by someguest, 10 years ago

Attachment: VBox.4.log added

Log file after crash in 4.3.6

by someguest, 10 years ago

Attachment: VBox.5.log added

Log file after crash in 4.3.8

comment:24 by someguest, 10 years ago

Same problem with 4.3.8 host and guest additions.

by someguest, 10 years ago

Attachment: VBox.6.log added

Log file after crash in 4.3.10

comment:25 by someguest, 10 years ago

Same problem with 4.3.10 host and guest additions.

comment:26 by alfonso, 10 years ago

Hi there,

I had this problem since I switched from my MacBook Air to a MacBook Pro.

I'm now experiencing the same problem in guest Lubuntu 13.10 (based on Ubuntu 13.10) :

[     5.891] (EE) AIGLX error: vboxvideo does not export required DRI extension
[     5.891] (EE) AIGLX: reverting to software rendering
[     5.891] (II) AIGLX: Screen 0 is not DRI capable
[     5.927] (II) AIGLX: Loaded and initialized swrast

and in Linux Mint 15 (based on Ubuntu 13.04):

[     7.161] (II) Next line is added to allow vboxvideo_drv.so to appear as whitelisted driver
[     7.161] (II) The file referenced, is *NOT* loaded
[     7.161] (II) Loading /usr/lib/xorg/modules/drivers//ati_drv.so
[     7.161] (EE) AIGLX error: vboxvideo does not export required DRI extension
[     7.164] (EE) AIGLX: reverting to software rendering
[     7.164] (II) AIGLX: Screen 0 is not DRI capable
[     7.226] (II) AIGLX: Loaded and initialized swrast

comment:27 by raniejade, 10 years ago

Same problem with 4.3.10.

Affected OSes: Ubuntu 12.04 LTS (i386/amd64), Linux Mint Petra (i386/amd64), Fedora 20 (i386/amd64). Default desktop environments are used.

comment:28 by Michael Thayer, 10 years ago

Just to be clear: the AIGLX errors in Xorg.x.log are displayed even when 3D is working correctly. Check whether glxinfo (which may need to be installed in the guest, in Ubuntu/Debian the package is mesa-utils) reports "Chromium" as the driver.

in reply to:  28 ; comment:29 by alfonso, 10 years ago

Replying to michael:

Just to be clear: the AIGLX errors in Xorg.x.log are displayed even when 3D is working correctly. Check whether glxinfo (which may need to be installed in the guest, in Ubuntu/Debian the package is mesa-utils) reports "Chromium" as the driver.


Michael, thank you.

Not sure if this is the right place to ask you, but I'll try.

glxinfo | grep OpenGL reports:

libGL error: failed to load driver: vboxvideo
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
OpenGL vendor string: Humper
OpenGL renderer string: Chromium
OpenGL version string: 2.1 Chromium 1.9
OpenGL shading language version string: 1.20
OpenGL extensions:

My problem is that anytime I run flash in my guest OS (e.g. youtube) the system becomes incredible slow to react. E.g. it takes 30+ seconds for youtube to get off full screen when pressing "Esc". The same is true for volume, skipping, etc.
This was not the case with my old MacBook Air until last December. From the first time I run on the MacBook Pro Retina I had this problem. I tried with several fresh Linux guest installation, but the problem did not go away.

in reply to:  29 ; comment:30 by misha, 10 years ago

Replying to alfonso: Could you attach a VM log as well please?

in reply to:  30 comment:31 by alfonso, 10 years ago

Replying to misha:

Replying to alfonso: Could you attach a VM log as well please?


misha can you please explain me which file are you referring to?
Do I need to turn on some debugging or default settings?

My host is OSX 10.9.2 MacBook Pro Retina

comment:32 by misha, 10 years ago

Default should be enough I would think. The crash reports should be placed under ~/Library/Logs/DiagnosticReports/

in reply to:  32 ; comment:33 by alfonso, 10 years ago

Replying to misha:

Default should be enough I would think. The crash reports should be placed under ~/Library/Logs/DiagnosticReports/


Just to be clear, you mention crash but I don't experience any crash, simply quite low performances and low responsiveness when I run Flash in my Ubuntu based guest OSes.
Do you still need the same reports?

in reply to:  33 comment:34 by misha, 10 years ago

Replying to alfonso: Sorry, just a VM log then, it should be under <VM_dir>/Logs/VBox.log. <VM_dir> is ~/VirtualBox VMs/<VM_name>/ by default.

by someguest, 10 years ago

Attachment: VirtualBox.exe.3144.zip added

Minidump file after crash in 4.3.10

comment:35 by someguest, 10 years ago

I found out how to create minidumps. Not sure why it wasn't requested earlier, hopefully it's useful for figuring out why it crashes.

comment:36 by someguest, 10 years ago

Same issue with Gnome Ubuntu 14.04 LTS as guest.

by someguest, 10 years ago

Attachment: CrashDumps.7z added

Minidump and log file after crash in 4.3.12

comment:37 by someguest, 10 years ago

Same problem with 4.3.12 host and guest additions.

comment:38 by Perry G, 10 years ago

Adding entry to track ticket.

comment:39 by Szpak, 10 years ago

CCing myself (can be done without making a comment?)

by Josh Gunderson, 10 years ago

Attachment: VBox.7.log added

Also seeing this in Linux Mint 17 (based on Ubuntu 14.04) on VirtualBox 4.3.14 r95030 x64

comment:40 by Josh Gunderson, 10 years ago

Also seeing this in Linux Mint 17 (based on Ubuntu 14.04) on VirtualBox 4.3.14 r95030 x64

$glxinfo | grep OpenGL
libGL error: pci id for fd 4: 80ee:beef, driver (null)
OpenGL Warning: glFlushVertexArrayRangeNV not found in mesa table
OpenGL Warning: glVertexArrayRangeNV not found in mesa table
OpenGL Warning: glCombinerInputNV not found in mesa table
OpenGL Warning: glCombinerOutputNV not found in mesa table
OpenGL Warning: glCombinerParameterfNV not found in mesa table
OpenGL Warning: glCombinerParameterfvNV not found in mesa table
OpenGL Warning: glCombinerParameteriNV not found in mesa table
OpenGL Warning: glCombinerParameterivNV not found in mesa table
OpenGL Warning: glFinalCombinerInputNV not found in mesa table
OpenGL Warning: glGetCombinerInputParameterfvNV not found in mesa table
OpenGL Warning: glGetCombinerInputParameterivNV not found in mesa table
OpenGL Warning: glGetCombinerOutputParameterfvNV not found in mesa table
OpenGL Warning: glGetCombinerOutputParameterivNV not found in mesa table
OpenGL Warning: glGetFinalCombinerInputParameterfvNV not found in mesa table
OpenGL Warning: glGetFinalCombinerInputParameterivNV not found in mesa table
OpenGL Warning: glDeleteFencesNV not found in mesa table
OpenGL Warning: glFinishFenceNV not found in mesa table
OpenGL Warning: glGenFencesNV not found in mesa table
OpenGL Warning: glGetFenceivNV not found in mesa table
OpenGL Warning: glIsFenceNV not found in mesa table
OpenGL Warning: glSetFenceNV not found in mesa table
OpenGL Warning: glTestFenceNV not found in mesa table
libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo
OpenGL vendor string: Humper
OpenGL renderer string: Chromium
OpenGL version string: 2.1 Chromium 1.9
OpenGL shading language version string: 4.40 NVIDIA via Cg compiler
OpenGL extensions:

Host is Windows 8.1 Pro x64.

3D acceleration is enabled in VirtualBox Manager, with 12MB of video memory.

I just reinstalled Guest Additions to see if that would help. Nope. :(

Last edited 10 years ago by Josh Gunderson (previous) (diff)

in reply to:  40 comment:41 by Pyppe, 10 years ago

Replying to Josh G:

Also seeing this in Linux Mint 17 (based on Ubuntu 14.04) on VirtualBox 4.3.14 r95030 x64

Same problem running Linux Mint 17 guest with VirtualBox 4.3.16 on Windows 7 host.

comment:42 by Josh Gunderson, 9 years ago

Still seeing this with Win 8.1 x64 host / Vbox 4.3.18 r96516 / Mint 17 x64 guest.

comment:43 by dexwerx, 9 years ago

Same issue. Win 7 x64 Host / Vbox 4.3.18 r96516 / Ubuntu 14.04 x64 guest

Last edited 9 years ago by dexwerx (previous) (diff)

comment:44 by pums974, 9 years ago

Th bug is not fixed (at least not for everyone).

HOST : Ubuntu 14.04.2 x86_64 with kernel 3.13.0-54 running Virtualbox 4.3.28 r100309

GUEST : Arch linux x86_64 (every thing up to date, no testing repo) with vbox addition 4.3.28-1

output of glxinfo :

direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
...
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
...
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.6, 128 bits)
OpenGL version string: 3.0 Mesa 10.5.7
OpenGL shading language version string: 1.30
Last edited 9 years ago by pums974 (previous) (diff)

comment:45 by Juanjo, 9 years ago

Same problem using host Windows 8.1 x64 running Virtualbox 5.0 and guest Ubuntu 14.04.2 with Guest Additions

Trying to run a Python Quadrotor Simulation

libGL error: pci id for fd 12: 80ee:beef, driver (null)
OpenGL Warning: glFlushVertexArrayRangeNV not found in mesa table
OpenGL Warning: glVertexArrayRangeNV not found in mesa table
OpenGL Warning: glCombinerInputNV not found in mesa table
OpenGL Warning: glCombinerOutputNV not found in mesa table
OpenGL Warning: glCombinerParameterfNV not found in mesa table
OpenGL Warning: glCombinerParameterfvNV not found in mesa table
OpenGL Warning: glCombinerParameteriNV not found in mesa table
OpenGL Warning: glCombinerParameterivNV not found in mesa table
OpenGL Warning: glFinalCombinerInputNV not found in mesa table
OpenGL Warning: glGetCombinerInputParameterfvNV not found in mesa table
OpenGL Warning: glGetCombinerInputParameterivNV not found in mesa table
OpenGL Warning: glGetCombinerOutputParameterfvNV not found in mesa table
OpenGL Warning: glGetCombinerOutputParameterivNV not found in mesa table
OpenGL Warning: glGetFinalCombinerInputParameterfvNV not found in mesa table
OpenGL Warning: glGetFinalCombinerInputParameterivNV not found in mesa table
OpenGL Warning: glDeleteFencesNV not found in mesa table
OpenGL Warning: glFinishFenceNV not found in mesa table
OpenGL Warning: glGenFencesNV not found in mesa table
OpenGL Warning: glGetFenceivNV not found in mesa table
OpenGL Warning: glIsFenceNV not found in mesa table
OpenGL Warning: glSetFenceNV not found in mesa table
OpenGL Warning: glTestFenceNV not found in mesa table
libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo

comment:46 by efferre, 8 years ago

same problem

comment:47 by Michael Thayer, 8 years ago

effere: since you are commenting on an oldish thread, could you please describe in more detail what you are seeing, including VirtualBox and Additions versions?

in reply to:  47 comment:48 by efferre, 8 years ago

Replying to michael:

effere: since you are commenting on an oldish thread, could you please describe in more detail what you are seeing, including VirtualBox and Additions versions?

I'm using latest virtualbox 5.0.20 on a Gentoo linux host with a virtual machine where I have installed another Gentoo linux system with additions 5.0.20. I get the following data:

# grep -i AIGLX /var/log/Xorg.0.log

[    10.569] (==) AIGLX enabled
[    10.784] (II) AIGLX: Screen 0 is not DRI2 capable
[    10.784] (EE) AIGLX: reverting to software rendering
[    11.845] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[    11.847] (II) AIGLX: Loaded and initialized swrast

# glxinfo | grep -i opengl

OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.7, 128 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.2.0
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 11.2.0
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.2.0
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:

Is this correct? It seems to me I'm using a software renderer

comment:49 by Michael Thayer, 8 years ago

Perhaps you can investigate yourself what is going wrong? Normally if we detect that the guest has 3D acceleration configured (I assume yours does) we create a file /etc/ld.so.conf.d/00vboxvideo.conf which should cause our OpenGL library to be loaded in preference to the system one. Perhaps this explanation will be enough for you to work out what is going wrong on your guest.

in reply to:  49 comment:50 by efferre, 8 years ago

Replying to michael:

Perhaps you can investigate yourself what is going wrong? Normally if we detect that the guest has 3D acceleration configured (I assume yours does) we create a file /etc/ld.so.conf.d/00vboxvideo.conf which should cause our OpenGL library to be loaded in preference to the system one. Perhaps this explanation will be enough for you to work out what is going wrong on your guest.

On my guest system I have the vboxvideo kernel driver loaded correctly so there is drm support. Xorg loads also the vboxvideo driver but it doesn't exploit hardware acceleration because the driver doesn't support a DRI2 interface. This is normal as stated above so I guess this is still true for virtualbox additions 5.0.20. Given that (i.e. no 3d acceleration with the xorg server), is it possible to have hardware acceleration even if xorg works with software rendering? I have installed a symlink /usr/lib64/dri/vboxvideo_dri.so pointing to the VBoxOGL.so library but mesa still doesn't find the library:

# LIBGL_DEBUG=verbose glxgears
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so

I don't understand why it doesn't try to load /usr/lib64/dri/vboxvideo_dri.so.

comment:51 by Michael Thayer, 8 years ago

As of the 5.0.18 Additions things work slightly differently. We no longer use DRI to provide OpenGL, and therefore whether or not the drm module is loaded is not important. (I actually even got 3D pass-through working with the basic VESA driver for the X server.) Now our service scripts check whether 3D is enabled for the guest (the vboxguest module has to be loaded for this) and if so, create a file /etc/ld.so.conf.d/00vboxvideo.conf which tells the system to use our OpenGL library instead of the system one (Mesa). Does that help?

in reply to:  51 comment:52 by efferre, 8 years ago

Replying to michael:

As of the 5.0.18 Additions things work slightly differently. We no longer use DRI to provide OpenGL, and therefore whether or not the drm module is loaded is not important. (I actually even got 3D pass-through working with the basic VESA driver for the X server.) Now our service scripts check whether 3D is enabled for the guest (the vboxguest module has to be loaded for this) and if so, create a file /etc/ld.so.conf.d/00vboxvideo.conf which tells the system to use our OpenGL library instead of the system one (Mesa). Does that help?

IMHO I'd suggest to follow standard behaviour on Linux platforms, your solution is not compatible with the Xorg server.

Anyway I have tried furthermore to debug down the problem. First of all I have 3D enabled in the guest and the following modules loaded at startup: vboxsf, vboxvideo and vboxguest.

From dmesg I can see at startup:

[    1.493269] vboxguest: misc device minor 58, IRQ 20, I/O port d020, MMIO at 00000000f0400000 (size 0x400000)
[    1.494073] vboxguest: Successfully loaded version 5.0.20_OSE (interface 0x00010004)
[    1.588448] [drm] VRAM 08000000
[    1.588715] [TTM] Zone  kernel: Available graphics memory: 2023312 kiB
[    1.588718] [TTM] Initializing pool allocator
[    1.588725] [TTM] Initializing DMA pool allocator
[    1.588994] [drm] Initialized vboxvideo 1.0.0 20130823 for 0000:00:02.0 on minor 0
[    1.596983] random: nonblocking pool is initialized
[    1.689734] Adding 998396k swap on /dev/sda2.  Priority:-1 extents:1 across:998396k 
[    2.035598] vboxsf: Successfully loaded version 5.0.20_OSE (interface 0x00010004)
[    2.140742] VBoxService 5.0.20_OSE r106931 (verbosity: 0) linux.amd64 (May 10 2016 13:17:30) release log
               00:00:00.000113 main     Log opened 2016-05-12T12:41:31.026632000Z
[    2.144230] 00:00:00.003604 main     OS Product: Linux
[    2.146165] 00:00:00.005549 main     OS Release: 4.5.3-gentoo
[    2.146810] 00:00:00.006208 main     OS Version: #5 SMP Thu May 12 01:38:05 CEST 2016
[    2.147117] 00:00:00.006474 main     Executable: /usr/sbin/vboxguest-service
               00:00:00.006512 main     Process ID: 1414
               00:00:00.006515 main     Package type: LINUX_64BITS_GENERIC (OSE)
[    2.153536] 00:00:00.012914 main     5.0.20_OSE r106931 started. Verbose level = 0

Then here is the extracted log from Xorg:

# grep -Ei 'aiglx|box' /var/log/Xorg.0.log
[  2094.787] (==) AIGLX enabled
[  2094.787] (==) Matched vboxvideo as autoconfigured driver 0
[  2094.787] (==) Matched vboxvideo as autoconfigured driver 1
[  2094.787] (II) LoadModule: "vboxvideo"
[  2094.788] (II) Loading /usr/lib64/xorg/modules/drivers/vboxvideo_drv.so
[  2094.810] (II) Module vboxvideo: vendor="Oracle Corporation"
[  2094.810] (**) Load address of symbol "VBOXVIDEO" is 0x7f965b1a23a0
[  2094.816] (II) VBoxVideo: guest driver for VirtualBox: vbox
[  2094.816] (II) vboxvideo: kernel driver found, not loading.
[  2094.816] (II) vboxvideo: kernel driver found, not loading.
[  2095.929] (II) modeset(0): Monitor name: VBOX monitor
[  2096.111] (II) AIGLX: Screen 0 is not DRI2 capable
[  2096.111] (EE) AIGLX: reverting to software rendering
[  2096.114] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[  2096.115] (II) AIGLX: Loaded and initialized swrast
[  2096.575] (II) config/udev: Adding input device VirtualBox mouse integration (/dev/input/event4)
[  2096.575] (**) VirtualBox mouse integration: Applying InputClass "evdev pointer catchall"
[  2096.575] (**) VirtualBox mouse integration: Applying InputClass "keyboard-all"
[  2096.575] (II) Using input driver 'evdev' for 'VirtualBox mouse integration'
[  2096.575] (**) VirtualBox mouse integration: always reports core events
[  2096.575] (**) evdev: VirtualBox mouse integration: Device: "/dev/input/event4"
[  2096.575] (--) evdev: VirtualBox mouse integration: Vendor 0x80ee Product 0xcafe
[  2096.575] (--) evdev: VirtualBox mouse integration: Found 1 mouse buttons
[  2096.575] (--) evdev: VirtualBox mouse integration: Found absolute axes
[  2096.575] (--) evdev: VirtualBox mouse integration: Found x and y absolute axes
[  2096.575] (--) evdev: VirtualBox mouse integration: Found absolute touchscreen
[  2096.575] (II) evdev: VirtualBox mouse integration: Configuring as touchscreen
[  2096.575] (**) evdev: VirtualBox mouse integration: YAxisMapping: buttons 4 and 5
[  2096.575] (**) evdev: VirtualBox mouse integration: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[  2096.576] (II) XINPUT: Adding extended input device "VirtualBox mouse integration" (type: TOUCHSCREEN, id 8)
[  2096.576] (II) evdev: VirtualBox mouse integration: initialized for absolute axes.
[  2096.576] (**) VirtualBox mouse integration: (accel) keeping acceleration scheme 1
[  2096.576] (**) VirtualBox mouse integration: (accel) acceleration profile 0
[  2096.576] (**) VirtualBox mouse integration: (accel) acceleration factor: 2.000
[  2096.576] (**) VirtualBox mouse integration: (accel) acceleration threshold: 4

I have the vboxguest-service running but there is no virtualbox related file in /etc/ld.so.conf.d as you suggest. What should be the contents of that file?

Here is some debugging info by manually forcing the virtualbox opengl library:

# glxinfo 2>&1 | grep -Ei 'opengl|direct'
direct rendering: Yes
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.7, 128 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.2.1
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
    GL_ARB_depth_clamp, GL_ARB_direct_state_access, GL_ARB_draw_buffers, 
    GL_ARB_draw_indirect, GL_ARB_draw_instanced, 
    GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multi_draw_indirect, 
OpenGL version string: 3.0 Mesa 11.2.1
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.2.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:


# LD_PRELOAD=/usr/lib64/VBoxOGL.so glxinfo 2>&1 | grep -Ei 'opengl|direct'
direct rendering: Yes
OpenGL vendor string: Humper
OpenGL renderer string: Chromium
OpenGL version string: 2.1 Chromium 1.9
OpenGL shading language version string: 1.30
OpenGL extensions:
# LIBGL_DEBUG=verbose glxgears
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: Can't open configuration file /root/.drirc: No such file or directory.
libGL: Can't open configuration file /root/.drirc: No such file or directory.
2434 frames in 5.0 seconds = 486.504 FPS
2565 frames in 5.0 seconds = 512.930 FPS
2678 frames in 5.0 seconds = 535.446 FPS
2514 frames in 5.0 seconds = 502.755 FPS


# LD_PRELOAD=/usr/lib64/VBoxOGL.so LIBGL_DEBUG=verbose glxgears
374 frames in 5.0 seconds = 74.720 FPS
376 frames in 5.0 seconds = 75.031 FPS
375 frames in 5.0 seconds = 74.819 FPS

So I'm able to have an application running against the virtualbox opengl by LD_PRELOAD hack but the mechanism you describe related to /etc/ld.so.conf.d/ doesn't seem to work. As you can see the performances are quite worse with VBoxOGL.so comparing to software raster embedded with mesa. Moreover if I force the LD_PRELOAD hack at system level (embedding its definition in /etc/profile) then I'm not able to login in the system through gdm.

comment:53 by Michael Thayer, 8 years ago

The service script (/sbin/rcvboxadd) should check on guest system start whether 3D is enabled for the guest and set up that file if it is. You might want to run "sh -x /sbin/rcvboxadd start" as super user to see what is happening.

Please believe me that we have considered doing things the official way, and have reasons not to. In short, the official way is to get the 3D code into upstream Mesa (there is no stable plug-in interface). We did not want to do this because on the one hand we do not really want to set the current state of our 3D support in stone (still lots of room for improvement) and perhaps more importantly, one of the uses of VirtualBox is running old guest systems, and changes to upstream Mesa take an awfully long time to propagate to old systems - basically once the new systems of today become the old systems of tomorrow.

Regarding the glxgears frame rates - Linux graphics people are fond of saying that "glxgears is not a benchmark". Just a guess, but might the hardware run be synchronising with your monitor's refresh rate?

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use