Leif Delgass writes: > On Wed, 27 Nov 2002, Svante Signell wrote: > > > Leif Delgass writes: > > > Have you tried a lower resolution? > > Not yet. > > Try restarting X with 1024x768@16bpp for a while and see if you still have > the same problem. I have now tested at 1024x768, and everything works OK, but I think there is memory not returned to the card in the 3D driver, see below. > > > > If it's some sort of memory leak, I'd > > > expect that you'd run into it eventually even at a lower resolution. If > > > it doesn't happen at lower resolutions, maybe you really just don't have > > > enough offscreen memory at 1280x1024. > > What is meant with offscreen memory, main memory + card memory or smth else? > > free: > > total used free shared buffers cached > > Mem: 127660 123760 3900 0 9104 44884 > > -/+ buffers/cache: 69772 57888 > > Swap: 130748 84172 46576 > > Offscreen memory refers to the on-card memory left over after the > framebuffer allocation(s). When there are no GL contexts, the framebuffer > memory is equal to display width x display height x bytes per pixel (2 for > 16-bit). With GL contexts running, there is an additional back buffer > (same size as the 2D "front" framebuffer) plus a depth buffer which is > width x height x 2 (depth buffer is always 16-bit). The remaining > offscreen memory is used for XAA and XVideo buffers. You can get a > BadAlloc when there is not enough offscreen memory left. Doing the calculations one gets: 8Meg - 3x(1280x1024)= 8388608 - 7864320 = 524288 bytes = 512 kbytes which is close to what the log file reports: (II) ATI(0): Will use 511 kB of offscreen memory for XAA
It seems that the 3D driver already has allocated the frame buffer, back buffer and depth buffer memory at startup, right. Obviously the remaining 512k of memory is sufficient for the XV driver when no 3D applications has been activated. > > > > Also, did you run any GL apps > > > before starting mplayer or between attempts (or during attempts)? > > xscreensaver is running, so some 3D applications are possibly run when > > it activates. The box is usually on all day. I can now reproduce the error for 1280x1024: 1. Run mplayer using the XV driver: Everything is OK 2. Run a 3D application, such as the atlantis demo in xscreensaver 3. Run mplayer using the XV driver again: Error state occurs X11 error: BadAlloc (insufficient resources for operation) Running the xscreensaver demo again works, no problem. Conclusion: Memory available for XAA and XV before running the 3D application is not returned when the application exits!! Maybe this in not possible to do for this card without leaving X and reentering, but it is _very_ annoying. I don't really like to run the desktop at 1024x768. I will robably use another X display for 3D applications or for viewing movie clips. The best alternative though, would be if you can find a solution in the mach64 driver. Thanks for your help, Svante > > > > > The > > > current code allocates and frees 3D offscreen mem when transitioning from > > > no GL contexts to one or more and on transitioning from one or more GL > > > contexts to none. It's possible that there's a leak happening on the > > > transitions. Also could you send your complete X log after reproducing > > > the problem? Attached please find the XFree86.0.log at 1280x1024 and a diff to when the screen size is 1024x768
XFree86.0.log.1280x1024
Description: Binary data
XFree86.0.log.diff
Description: Binary data