Extremely slow 3D in Ubuntu guest

Discussions about using Linux guests in VirtualBox.

Extremely slow 3D in Ubuntu guest

Postby orrorin » 16. Nov 2011, 00:48

Hello,

I'm trying to enable/use 3D acceleration in a Ubuntu guest running in VirtualBox with Guest Additions on a Windows host. Although I think the 3D acceleration is being enabled, the performance of my guest takes a nosedive; the machine almost comes to a crawl.

Is this a known issue? Is there a known fix/workaround?
How can I verify the status of 3D acceleration in my Ubuntu guest? What commands to run? What log files can I look at?

My setup ...

ATI Radeon 6770M graphics card (2GB)
Windows 7 Home Premium (64-bit)
VBox 4.1.6 (with Guest Additions)
Ubuntu 11.10 (32-bit) (The problem exists on 64-bit Ubuntu as well.)

Thanks.
orrorin
 
Posts: 11
Joined: 1. Aug 2008, 19:44

Re: Extremely slow 3D in Ubuntu guest

Postby orrorin » 16. Nov 2011, 19:24

I increased the Video RAM from 128MB to 256MB by editing the configuration file for the VM, but there isn't any significant improvement. Windows seem to open faster than before, but that's about it.

Clearly, VirtualBox does support hardware acceleration for 3D graphics (otherwise it wouldn't have that option for video configuration on a VM). And if it was only supposed to work for Windows, VirtualBox would warn about it (just like it does for 2D).

So, how does one get VirtualBox's 3D acceleration to work for Linux guests?
orrorin
 
Posts: 11
Joined: 1. Aug 2008, 19:44

Re: Extremely slow 3D in Ubuntu guest

Postby Perryg » 16. Nov 2011, 19:34

How can I verify the status of 3D acceleration in my Ubuntu guest? What commands to run?

You can run glxgears in a terminal.
Have you made sure that you have the latest drivers installed for you Video card?
You can also post the guests log file (as an attachment) so we can see what might be happening.
Perryg
Site Moderator
 
Posts: 25915
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: Extremely slow 3D in Ubuntu guest

Postby orrorin » 16. Nov 2011, 21:37

Perryg wrote:
How can I verify the status of 3D acceleration in my Ubuntu guest? What commands to run?

You can run glxgears in a terminal.
Have you made sure that you have the latest drivers installed for you Video card?
You can also post the guests log file (as an attachment) so we can see what might be happening.


Running glxgears in a term shows me the moving 3D gears (though the colors are very bright). On the term, it shows a maximum of 955 FPS.

Yes. I've just installed the latest drivers for my graphics card (I had to download them from HP's website as AMD/ATI said they don't directly support it.)

Attaching the guests log file in 2 parts.
Attachments
log-second.txt
This is the 2nd part of the log file.
(34.01 KiB) Downloaded 17 times
log-first.txt
This is the 1st part of the log file.
(122.25 KiB) Downloaded 29 times
orrorin
 
Posts: 11
Joined: 1. Aug 2008, 19:44

Re: Extremely slow 3D in Ubuntu guest

Postby Perryg » 16. Nov 2011, 21:51

I am confused a bit here. You say you have an ATI graphics card but VBox tests shows Intel.
Code: Select all   Expand viewCollapse view
00:00:00.251 OpenGL Info: Render SPU: GL_VENDOR:   Intel
00:00:00.251 OpenGL Info: Render SPU: GL_RENDERER: Intel(R) HD Graphics Family
00:00:00.251 OpenGL Info: Render SPU: GL_VERSION:  3.1.0 - Build 8.15.10.2372


Now this is interesting.
Code: Select all   Expand viewCollapse view
00:00:32.559 OpenGL Warning: Cleared gl error 0x505 on context creation
00:05:16.401 OpenGL Warning: Cleared gl error 0x500 on context creation
00:05:16.486 OpenGL Warning: Trying to switch contexts when the attribute stacks weren't empty.  Currently, this is not supported.
00:05:16.501 OpenGL Warning: Trying to switch contexts when the attribute stacks weren't empty.  Currently, this is not supported.

Which is repeated over and over until you power off the guest. This is exactly what I would expect to see if the drivers were having issues.

At this point you will need to post a ticket at bugtracker. You will need to setup an account there as it is on a different system. You must post (as an attachment) these log files so the DEVs can see what is happening and you may also post a link to this topic in Bugtracker.
It would also help if you can post the ticket number here so other can see the progress, add information, or see the final results.
Perryg
Site Moderator
 
Posts: 25915
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: Extremely slow 3D in Ubuntu guest

Postby orrorin » 17. Nov 2011, 01:25

Perryg wrote:I am confused a bit here. You say you have an ATI graphics card but VBox tests shows Intel.
Code: Select all   Expand viewCollapse view
00:00:00.251 OpenGL Info: Render SPU: GL_VENDOR:   Intel
00:00:00.251 OpenGL Info: Render SPU: GL_RENDERER: Intel(R) HD Graphics Family
00:00:00.251 OpenGL Info: Render SPU: GL_VERSION:  3.1.0 - Build 8.15.10.2372


Now this is interesting.
Code: Select all   Expand viewCollapse view
00:00:32.559 OpenGL Warning: Cleared gl error 0x505 on context creation
00:05:16.401 OpenGL Warning: Cleared gl error 0x500 on context creation
00:05:16.486 OpenGL Warning: Trying to switch contexts when the attribute stacks weren't empty.  Currently, this is not supported.
00:05:16.501 OpenGL Warning: Trying to switch contexts when the attribute stacks weren't empty.  Currently, this is not supported.

Which is repeated over and over until you power off the guest. This is exactly what I would expect to see if the drivers were having issues.

At this point you will need to post a ticket at bugtracker. You will need to setup an account there as it is on a different system. You must post (as an attachment) these log files so the DEVs can see what is happening and you may also post a link to this topic in Bugtracker.
It would also help if you can post the ticket number here so other can see the progress, add information, or see the final results.


Thanks to your tip from the log file about the Intel GPU, I was able to fix the problem (or you could say find a workaround).

I'm using a HP laptop which comes with the AMD/ATI graphics card (6770M). Apparently, this card supports dynamic graphics switching between Power-save mode (Intel) and Performance mode (ATI 6770). By default it uses the power save mode. Ideally, a user should be able to specify (using ATI's catalyst suite), what graphics processor should each application use. e.g. an editor should use power save while a browser (which is used for movies, etc) should use the performance mode. From ATI's catalyst suite, I tried to set the graphics mode for VirtualBox to performance but that didn't work. So, I had to goto the BIOS (reboot + ESC + F10) and change it to use the fixed mode instead of the dynamic switching and now it works for me.

Strictly speaking this is not a fix but a workaround, since I had to disable the feature of dynamic graphics switching. Hopefully, HP and AMD/ATI will get the dynamic switching to work properly soon.

Here's the thread on HP's forum, which helped me with the work around.

http://h30434.www3.hp.com/t5/Notebook-D ... 018/page/2

Thanks again!
orrorin
 
Posts: 11
Joined: 1. Aug 2008, 19:44

Re: Extremely slow 3D in Ubuntu guest

Postby Perryg » 17. Nov 2011, 01:36

Interesting. I did not know they were doing that, but it makes sense now that I see it. I know that Intel graphics has a huge problem with 3D in a guest. It does not seem to provide the needed pieces to the driver puzzle.

If you find a little extra time though it would be great if you could post a ticket anyway so the DEVs can see what is going on. It may help to get the issue resolved on both sides of the coin. Set it to informative instead of a major issue and post a link to this topic.
Perryg
Site Moderator
 
Posts: 25915
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: Extremely slow 3D in Ubuntu guest

Postby orrorin » 17. Nov 2011, 02:53

Thanks Perryg. Here's the ticket number for future reference ...

https://www.virtualbox.org/ticket/9911
orrorin
 
Posts: 11
Joined: 1. Aug 2008, 19:44

Re: Extremely slow 3D in Ubuntu guest

Postby Perryg » 17. Nov 2011, 02:57

Thank you!
Perryg
Site Moderator
 
Posts: 25915
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other


Return to Linux Guests

Who is online

Users browsing this forum: sylvia2406 and 9 guests