[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
*** This bug is a duplicate of bug 1027211 *** https://bugs.launchpad.net/bugs/1027211 I think this bug has become a bit vague. Sam reports a difference of 30 vs 50FPS, which I cannot reproduce with any program. He also describes multiple synchronous functions needing work without sufficient evidence that we really do need to address all of them. It's dangerous to describe a solution in the definition of a bug... What I can reproduce easily is the problem mentioned in bug 1027211 and all the other duplicates. So I will focus on that and mark all as a duplicate of that. If anyone has a good reason to separate this one again, please speak up here. Otherwise moving to bug 1027211. ** This bug has been marked a duplicate of bug 1027211 [nvidia] Moving or resizing windows freezes and stutters on nvidia (especially if some other window is redrawing). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
*** This bug is a duplicate of bug 1027211 *** https://bugs.launchpad.net/bugs/1027211 Also, for completeness I have done some profiling on the Nexus 7. Stubbing XSync for compiz provided no measurable improvement on the Nexus. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
Total display freeze - until I stop dragging the window. If you really think this is a different bug I will simply remove duplicate status from my original bug report. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
Also, I haven't seen any further problems at all with the disabled XSync which seems strange... it doesn't appear to have any effect at all. I even added a fprintf to make sure it was really doing something, and it is being called. Maybe something is polling the queue instead of using XSync? Or maybe it's a problem with dynamic linking of plugins? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
Alistair, Sorry; if the freeze stops when you stop dragging a window then maybe this is the right bug. More analysis and testing is required. XSync may not be the only function affecting the event queue bottleneck on nvidia. In which case the title of the bug might change. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
With this version, and with sync to vblank enabled in both compiz and nvidia-settings, I see the same total display freezes. I loaded the hack with both compiz and glxgears. ** Attachment added: XSync as noop https://bugs.launchpad.net/compiz/+bug/1049214/+attachment/3450673/+files/xsync.c -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
Hmm, a complete display freeze sounds like a missing XFlush. I don't think it would be a missing glFlush because that's done implicitly when we swap buffers... Unless you have changed your Compiz OpenGL plugin settings? Regardless, please log a new bug for the display freeze. It's too early to tell if it's related to this bug at all. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
It does not make the problem go away for me: it does improve it though: instead of no screen redraws at all, the screen redraws about once every 3 seconds instead. As with vsync enabled, glxgears constantly claims that is it doing 4000 FPS. So I don't think this really fixes the problem at all, it just removes some, but not all, of the xsync calls causing the problem. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
Yes, I've seen the same issue with nvidia for a long time (before 310). It is horribly slow if you have vsync enabled in the driver and compiz. I suspect the reason is this bug. Nvidia appears to push lots of graphics commands through the X event queue, which no other driver does. So nvidia's hyper-sensitive to X event traffic and can slow down easily. That's the theory. Alistair: Please note that glxgears IS doing 4000 FPS when it says so. Just like any software benchmark it's telling you the number of frames it has rendered per second. In a compositing environment this has absolutely nothing to do with the physical frame rate however. You should use the compiz Benchmark plugin to get the real physical frame rate. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
Sure. I only mentioned it because I still see basically the same behaviour with vsync off, just with reduced severity. If I turn off sync in compiz and nvidia settings the performance hit in minimal, actually. But then I get really nasty tearing. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
And with sync off in compiz and on in nvidia I get the same total display freeze. I don't know if nvidia is overriding compiz somehow. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
Here's a quick LD_PRELOAD hack to wrap XSync. It passes through to the real XSync, but you can comment the line to make it a noop, or do whatever you want. ** Attachment added: XSync stub library for testing. https://bugs.launchpad.net/compiz/+bug/1049214/+attachment/3450221/+files/xsync.c -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
Thanks Alistair. That's what I've been doing. However it would be more helpful to people who don't understand it to remove the call to the real XSync. Because they'd need to modify your code to really test it. My test so far is stubxsync.c: int XSync(void *display, int discard) { return 0; } and built with: gcc -shared -o stubxsync.so stubxsync.c Then run with: env LD_PRELOAD=./stubxsync.so compiz . -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
With the 310.14 nvidia drivers, unchecking sync to vblank in the nvidia-settings utility seems to make the problem of windows stuttering during dragging go away. It seems this option defaults to on in the 310 series. Looks like compiz doing v-sync and the driver doing v-sync is a bad combination. Can anyone else with nvidia cards and the 310 series driver confirm this? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
** Changed in: ubuntu-nexus7 Status: New = Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
Hey Daniel, Thanks for tagging the nexus7. I'm marking this confirmed since you have found a regression in the drivers. However I do have some questions: What would be an ideal test case to measure Xsync performance?? I would like to run some numbers on the Nexus7 and post them here. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
Sean, It's just a matter of application frame rates and the CPU consumption that compiz incurs (in compiz and Xorg processes). So on the Nexus maybe use glmark2-es and es2gears to look at frame rates. A test for disabling XSync completely (which will cause bugs but be a great performance comparison) would be to write a stub XSync function and LD_PRELOAD it into compiz. I will try to do that soon. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
Affects Nexus 7, probably. ** Also affects: compiz (Ubuntu) Importance: Undecided Status: New ** Changed in: compiz (Ubuntu) Importance: Undecided = High ** Changed in: compiz (Ubuntu) Status: New = Triaged ** Also affects: ubuntu-nexus7 Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
** Changed in: compiz Assignee: Sam Spilsbury (smspillaz) = Daniel van Vugt (vanvugt) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1049214] Re: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+)
** Changed in: compiz Status: Triaged = In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1049214 Title: [nvidia] XSync usage is a massive bottlenecking factor (nvidia performance regression in Compiz 0.9.8+) To manage notifications about this bug go to: https://bugs.launchpad.net/compiz/+bug/1049214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs