View Single Post
Old 12-06-09, 01: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:

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:
[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:

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:
Attached Files
File Type: gz nvidia-bug-report.log.gz (45.0 KB, 109 views)
Mad Merlin is offline   Reply With Quote