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

Newegg Daily Deals

Reply
 
Thread Tools
Old 12-06-09, 02:46 PM   #1
Mad Merlin
Registered User
 
Join Date: Dec 2009
Posts: 3
Default KDE 4.3, Nvidia and "insufficient resources"

This was originally posted in the Gentoo forums, but no solution was found: http://forums.gentoo.org/viewtopic-t-793632.html

I've recently upgraded to KDE 4.3 (from KDE 3.5), which has been smooth, except for a few major issues. To be honest, I think it's actually just a single root issue, but it manifests itself in a number of different ways. The most obvious manifestation is that if I have too many windows open (where "too many" is a very small number, approximately a dozen), I won't be able to fullscreen a video with gmplayer, it'll explode with an error about insufficient resources. Sometimes it'll be able to fullscreen once, but if I repeatedly toggle fullscreen, it's pretty much a guaranteed crash. If I open even more windows, gmplayer will just crash outright on startup with the same error. The exact error is:
Code:
[ws] Error in display.
[ws]  Error code: 11 ( BadAlloc (insufficient resources for operation) )
[ws]  Request code: 135
[ws]  Minor code: 19
[ws]  Modules: flip_page
Ok, so maybe it's just gmplayer. Instead, I try plain old mplayer, but I get similar results... If I have too many windows open, the video window is just black, although it doesn't crash and I'll still be able to hear the sound.

It's not just gmplayer either, at one point I tried running glxgears, and it was giving me 75 fps (no that's not a typo, and no it wasn't vsync (my monitors run at 60 Hz)), whereas right now I'm seeing about 5000 fps.

Ok, glxgears isn't a benchmark, and maybe Xv support is just busted for some reason. So yesterday I started playing FF7 in Wine (yes, it works quite well), at 640x480 it works perfectly. I try it at 1280x960 and it's painfully slow (<1 fps), ok, maybe the stretching is just slow in Wine for some reason, I switch back to 640x480 and continue playing for awhile. After awhile, I quit, and then later I come back and it's just not cooperating, even at 640x480 now it's dog slow. After trying a few things I end up with some pretty serious screen corruption, two of the windows I have open are just garbage. After more fiddling, I discover that FF7 runs perfectly even at 1280x960, except only in a separate X server (:1, I still have :0 open, and it hasn't been restarted). Now I flip back to :0 again, and try running FF7, only to get more extreme slowness and window corruption.

At this point it's painfully obvious that the brokenness is not in any specific app, but rather, in the video drivers. It would seem that running with compositing active chews through GPU memory, which is reasonable, I understand that doing so requires that all of the open windows on the current X server be stored in GPU memory, but surely I'm not actually running out of GPU memory here... I have a Geforce 7950 GT with 512M of memory. Furthermore, if I am somehow running out of GPU memory, how do I fix that? In KDE 3.5 it wouldn't be unusual for me to have >50 windows open, but I'm running into walls with less than 1/5 of that now in KDE 4.3, so even if I got a video card with 2G of video memory, it wouldn't be a solution.

--------------------

The above is with 180.60, but is still an issue with 185.* and 190.*. I'm currently running 190.42 and I still have exactly the same problems as above. Disabling compositing in KDE (via Shift-Alt-F12) is a workaround for this problem, but I do not consider it an acceptable solution. I never ran KDE 4 on earlier drivers, so I don't know what the situation is there, but I've never seen an Nvidia driver that worked properly here.

On the plus side, this problem is easy to reproduce, just open 30 konsoles and then try to play a video:

Code:
for i in {1..30}; do konsole & done
gmplayer foo.avi
You'll notice that it doesn't work (gmplayer crashes as noted above). Other video players are equally broken (I also tried VLC, Dragon Player and KMplayer). There's nothing magic about 30, it just happens to be more than enough konsoles to trigger the problem for me. It probably varies with a number of factors, including konsole size, hardware, etc. If it doesn't trigger the problem for you, try increasing the number (realistically you should be able to push it well into the hundreds without problems).

FWIW, the attached bug report is identical to the one from over here: http://www.nvnews.net/vbulletin/showthread.php?t=142227
Attached Files
File Type: gz nvidia-bug-report.log.gz (45.0 KB, 100 views)
Mad Merlin is offline   Reply With Quote
Old 12-06-09, 03:17 PM   #2
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: KDE 4.3, Nvidia and "insufficient resources"

As you suggested, when compositing is enabled, Xv video windows need to be placed in video RAM, and when all of that memory is taken up by other windows, it fails with a BadAlloc error. On pre-GeForce 8 GPUs, the amount of video memory available for composited windows is limited to 256 MB. In addition, I don't think the GeForce 7950 supports TurboCache, which would have allowed it to use system memory instead of video memory. It does sound like you're just completely out of memory that the GPU can access directly.

Does the problem occur as quickly if you use Compiz instead of KDE's compositor?
AaronP is offline   Reply With Quote
Old 12-06-09, 06:03 PM   #3
Mad Merlin
Registered User
 
Join Date: Dec 2009
Posts: 3
Default Re: KDE 4.3, Nvidia and "insufficient resources"

I just gave Compiz a spin and it definitely takes much longer to run out of resources, although it too does eventually run out.

With normal sized (80x25) konsoles, I gave up at 135 open konsoles, it hadn't run out of resources yet (but I was running out of system memory...). I closed those, and tried again with maximized konsoles, which bumped into insufficient resources after about 35 konsoles.
Mad Merlin 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 01:41 PM.


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