Home  |  About  | Last |  Submit  |  Contact
AllQuests.com




Previous Question:  WTB Reinstall DVDs for PM G5 or classic install disc  Marketplace ArchiveNext Question:  Two mods conflicting where do post my question  phpBB 2.0.x 2.0.x Support Forum
Question glXSwapBuffers sometimes takes 30 50ms ( nV News Forums NVIDIA Linux )
Updated: 2008-11-23 09:40:06 (3)
glXSwapBuffers sometimes takes 30 50ms

I'm using a GTX 260 board with 177.82 drivers (also tested with 180.08). I get quite noticeable stuttering in my OpenGL programs when vsync is off that I did not experience on my 6600GT on another computer. When vsync is on, things run smoothly but skip every few seconds. The skipping is caused by glXSwapBuffers for some reason occasionally taking 30-50ms to execute instead of the <1ms (no vsync) or ~16ms (vsync) it takes the rest of the time. Lowering the resolution eases the problem to some extent, especially without vsync.

Answers: glXSwapBuffers sometimes takes 30 50ms ( nV News Forums NVIDIA Linux )
glXSwapBuffers sometimes takes 30 50ms

Yes, I can reproduce that.

Your best bet is to send the testcase and observations to linux-bugs@nvidia.com.

jcornwall

glXSwapBuffers sometimes takes 30 50ms

I threw together a simple test program as you suggested (attached). The stuttering is much less rapid than in the other programs I was testing (which are more graphically intense) for some unknown reason, but the time glXSwapBuffers takes to run still reaches about 30ms.

For each call to SwapBuffers that takes >2ms, the program prints out the frame number and the time taken by the call in milliseconds. Here's some sample output with vsync off under a non-compositing WM and only a terminal running:

> time __GL_SYNC_TO_VBLANK=0 ./stutter
(frame 794) 10.295
(frame 1594) 9.161
(frame 2394) 8.814
(frame 3194) 8.159
(frame 3994) 7.865
(frame 4794) 7.991
(frame 5594) 7.793
(frame 6394) 8.486
(frame 6443) 2.752
(frame 6466) 26.513
(frame 6489) 27.664
(frame 10344) 11.426
(frame 11144) 9.149
(frame 11944) 8.094
(frame 12744) 7.951
(frame 12916) 28.8
(frame 12939) 27.473
(frame 16794) 10.221
(frame 17594) 8.549
(frame 18394) 8.087
(frame 19194) 8.374
(frame 19366) 29.447
(frame 19389) 26.694
(frame 23244) 11.346
(frame 24044) 9.089
(frame 24844) 8.378
(frame 25644) 8.349
(frame 25816) 28.898
(frame 25839) 25.877
(frame 29694) 10.834
(frame 30494) 8.745
(frame 31294) 8.202
(frame 32094) 8.017
(frame 32266) 27.45
(frame 32289) 27.123
(frame 36144) 11.811
(frame 36944) 9.1
(frame 37744) 8.241
(frame 38544) 8.257
(frame 38716) 30.207
(frame 38739) 27.915

real 0m7.159s
user 0m2.252s
sys 0m4.892s

snzzbk

glXSwapBuffers sometimes takes 30 50ms

Can you strip down your application into a small, compilable test case? Do you get the same behaviour with any compositing WMs switched off?

On my GTX 260 with 188.08 driver a typical glXSwapBuffers call takes this long without VSync:

00:00:00.0000710
00:00:00.0000590
00:00:00.0000550
00:00:00.0000730
00:00:00.0000640
00:00:00.0000690
00:00:00.0000570
00:00:00.0000720
00:00:00.0000610
00:00:00.0000760
00:00:00.0000700

~0.06ms. It spikes once every hundred calls or so (quite consistently, interestingly) but not to quite the extent that you are observing:

00:00:00.0000670
00:00:00.0000710
00:00:00.0036350
00:00:00.0000620
00:00:00.0000550

~3.6ms. On a 7900 GS the calls are ~0.1ms and do not spike at all. So this could be a validation of your problem.

jcornwall

Previous Question:  WTB Reinstall DVDs for PM G5 or classic install disc  Mac Forums  Marketplace ArchiveNext Question:  Two mods conflicting where do post my question  phpBB  phpBB 2.0.x 2.0.x Support Forum

- Source: glXSwapBuffers sometimes takes 30 50ms nV News Forums NVIDIA Linux
- Previous Question: WTB Reinstall DVDs for PM G5 or classic install disc Mac Forums Marketplace Archive
- Next Question: Two mods conflicting where do post my question phpBB phpBB 2.0.x 2.0.x Support Forum