Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 05-01-09, 01:20 AM   #1
mdingey
Registered User
 
Join Date: May 2009
Posts: 3
Default GLXBadDrawable on 180.44 and 180.51 x86_64 after 455 windows

Hi,

I'm encoutering what I think is a bug in the x86_64 Linux driver. When trying to open more than 455 drawables, glXMakeCurrent fails with a GLXBadDrawable error ( Major opcode 144, minor opcode 5).

The attached program, 'example.c', shows this behaviour. Once compiled, run the program with an integer argument of the number of windows you wish it to open (depending on your machine it may appear to freeze your WM for a moment, but it should recover). Running the program with 455 windows works fine, running with 456 fails with the aforementioned error. I have tried this on multiple machines, with the 180.44 and 180.51 drivers.

I'm aware that opening this many windows is not a typical use case, but the software we run needs to open around 1000 or so; possibly more.

I should note that using the vesa driver, the error does not occur.

Attached is the example program and the output of the nvidia bug reporting script.

Thank you in advance.
Attached Files
File Type: gz nvidia-bug-report.log.gz (43.3 KB, 82 views)
File Type: zip example.zip (1.5 KB, 96 views)
mdingey is offline   Reply With Quote
Old 05-01-09, 06:08 AM   #2
Thunderbird
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 2,105
Default Re: GLXBadDrawable on 180.44 and 180.51 x86_64 after 455 windows

Why do you need so many windows? You are likely just running out of video memory or so. Do you really need Windows, can't you use FBOs or so?
Thunderbird is offline   Reply With Quote
Old 05-01-09, 08:05 PM   #3
nevion
Registered User
 
Join Date: Dec 2004
Posts: 74
Default Re: GLXBadDrawable on 180.44 and 180.51 x86_64 after 455 windows

Maybe I'm confusing something but "windows"=drawables in x are different from "clients" (what we loosely count as application~=windows discounting a few exceptions).
But who would use that many windows in an application? Well, my firefox is doing pretty bad, 1461 right now. I must have ~2000 windows system wide. I'd like to have more too though I'm cheating on the windows/drawables since its mostly all gtks fault (gtk is a window addict allocating a ton of not very large one's of them to do its dirty work), the total area of these drawables is only a few times above my screen in area... it should fit in graphics card memory in this day and age. I run a 2560x1600 desktop and thus I only have about 15 megabytes per screen on 32bpp. The point is it's perfectly manageable on modern cards. Still though, gtk should get window abuse under control...

But anyway, I recall having this problem before but it isn't in my .xsession-errors atm, I believe I still get it when opening up firefox for instance :-). And the application may not really call for letting FBOs get into the mix...
nevion is offline   Reply With Quote
Old 05-01-09, 08:47 PM   #4
mooninite
Registered User
 
Join Date: May 2006
Posts: 477
Default Re: GLXBadDrawable on 180.44 and 180.51 x86_64 after 455 windows

You're running something rather nasty in Firefox because I'm only seeing ~200-300 wins usage. Opening a tab adds 12 wins. Loading a page may or may not add any. I even tried Flash and that didn't add any significant amount. Since I saw you on imdb.com I went to the same page and I only have 268 wins at the moment typing this reply to you.

It's hardly GTK's fault.
mooninite is offline   Reply With Quote
Old 05-02-09, 03:09 PM   #5
nevion
Registered User
 
Join Date: Dec 2004
Posts: 74
Default Re: GLXBadDrawable on 180.44 and 180.51 x86_64 after 455 windows

Windows vary by site, and I have 80 tabs opened. I have adblock plus, noscript and session manager installed. So of all the sites opened, there are less actual windows than without the extensions since I'm blocking the ads. Opening all the same urls in konqueror who has no such extensions enabled, I only have 444 windows vs 1465. That's less than a 3rd of the windows. 300% more windows than qt/kde has proved to be at least a lower bound on windows needed to do the job means gtk is being fairly wasteful, and this is with konqueror showing all the ads and flash firefox has blocked!

I might try this again later with the extensions disabled to see how much more windows I get.
nevion is offline   Reply With Quote
Old 05-02-09, 03:32 PM   #6
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: GLXBadDrawable on 180.44 and 180.51 x86_64 after 455 windows

Creating a lot of regular X windows isn't usually a problem. If they're not redirected, they don't take up any extra video memory either. However, when you call glXMakeCurrent, the OpenGL driver has to allocate a bunch of extra resources associated with that window such as a back buffer, a depth buffer, multisample buffers, etc. (depending on the chosen visual). You're probably just exhausting your video memory.
AaronP is offline   Reply With Quote
Old 05-02-09, 07:29 PM   #7
nevion
Registered User
 
Join Date: Dec 2004
Posts: 74
Default Re: GLXBadDrawable on 180.44 and 180.51 x86_64 after 455 windows

Hey AaronP , yes I have compositing enabled and I'm on a 8800gts 320 mb card. The info x resource is reporting is ~260 mB. How much memory on the actual card given the kde composited environment is it really using you think? Or is it just something like the sum over all windows w/ 5*window_dimensions*4 bytespp. I know you guys do some things like caching on the card too... how much memory of the card can that take up?
I'd appreciate your insights.
nevion is offline   Reply With Quote
Old 05-03-09, 09:09 PM   #8
mdingey
Registered User
 
Join Date: May 2009
Posts: 3
Default Re: GLXBadDrawable on 180.44 and 180.51 x86_64 after 455 windows

AaronP,

Thanks for your reply. It explains why the failure is on glXMakeCurrent. However, I don't believe it's to do with physical video memory. I've tried this out on a number of nvidia cards and the limit is always at the same number.

My colleagues tell me they have experienced a problem like this in the past (at a lower limit of windows) and that a driver upgrade resolved the issue. I did some digging and found that when running the 100.14.19 driver, the limit was 227 windows (almost exactly half of what the current limit is). At the time, my colleagues upgraded to 169.07 (the next driver) and it resolved their problem.

This leads me to believe that the limit is in the driver itself. Is it possible that when upgrading from 100.14.19 to 169.07, a limit in the driver was simply doubled? If so, could it be increased again?
mdingey is offline   Reply With Quote

Old 10-13-09, 07:19 PM   #9
mdingey
Registered User
 
Join Date: May 2009
Posts: 3
Default Re: GLXBadDrawable on 180.44 and 180.51 x86_64 after 455 windows

Minor update:

Whilst trying the newest drivers to see if the bug had gone away, we found that enabling Xinerama with more than 1 screen halved the number of drawables we could use.

Not sure if this information is useful or not, but I figured it couldn't hurt
mdingey is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:19 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.