-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redraw lag with NVIDIA 334.21 driver #181
Comments
I can confirm this; here's some additional info about it: |
I had this happen with |
Well, with swap method 3, the redrawing lags in firefox seem to be gone, but they are still present in programs like termite for example… They become very obvious if you navigate around in ranger; sometimes, the reaction of a keypress takes over a second! Downgrading nvidia solves this problem for the moment, but this isn't a real solution of course. Edit: Another workaround seems to be to use xr_glx_hybrid, I'll test on this later… |
To RichardGv, who I was talking with in IRC earlier today: unfortunately, the screen capture I took (using gtk-RecordMyDesktop) of the symptoms with |
Oh, could you please install apitrace, a tiny GL debugging tool (please build from git repo, the stable version lacks the functionality to debug a compositor), trace compton with it ( @cju: If you are using |
Yet another day and I'm having absolutely no luck dealing with the |
Sorry, none of the swap-methods and none xorg buffer option resolves this problem for me... In case that matters, I'm testing with the latest git version of termite. As I said before, only using the hybrid backend (or just native xrender, of course) seems to solve this, that's why I burried out #163 once again… ;) |
@cju: But you could simply avoid using |
@richardgv no, it is lagging with any swap method, including undefined. |
Heh, I see. The nVidia guy talked about synchronization issue and |
Hmm, I'm truly sorry for the delay... Here's a patch that adds X Sync fence support to compton: https://gist.github.com/richardgv/9529221 Using a nVidia-proposed feature to deal with a problem on nvidia-drivers sounds like a nice idea. :-D Seemingly the |
Well, I'm using compton from current master with this patch for a few hours and it works. Thank you. |
For any Arch users out there that want to test out the patch, here's a PKGBUILD. |
Richard, your patch appears to fix the redraw issue. Could it be merged in conditionally with a compile-time option, perhaps? |
However, when I use
EDIT: The tearing appears even without using |
Thanks for testing, firstly! Heh, sorry, I simply couldn't get Here's a revised patch. Please clean up the remaining of the first patch before applying it ( Now the main issue that prevents it from being merged is I don't know how should the commandline switches enabling the feature be named. :-D The |
- Add --xrender-sync{,-fence} to deal with redraw lag issue on GLX backend. --xrender-sync-fence requires a sufficiently new xorg-server and libXext. NO_XSYNC=1 may be used to disable it at compile time. Thanks to tchebb for reporting and everybody else for testing. (#181) - A bit code clean-up. Replace a few XSync() with XFlush() to minimize the latency.
Finally I pushed it to Now still looking into |
Hey, this seems to work, but only if I start compton with these two options as arguments; if I place them in the config, they don't work… Works: compton --xrender-sync --xrender-sync-fence Doesn't work: xrender-sync = true;
xrender-sync-fence = true; Am I doing something wrong here or is that just not implemented yet? |
@cju: Nope, it's not available as a configuration file option yet. I'm unsure if the switch name is appropriate -- It isn't only synchronizing X Render calls (but core X drawing calls as well) but I don't know a better name. And, does it work if you only enable By the way, I got no progress on |
Ok, thank you. I'm fine with the name, but if you like to change it, why don't you call it just No, doesn't seem to work with |
@cju:
Oh, I see. Thanks! don't understand why other GL compositors don't have the problem... |
I agree that the term |
The primary purpose is indeed to sync X Render draw calls other programs made, so |
As I said before, these were just completely spontaneous suggestions, so go ahead with whatever you like. The main thing is that it's working after all (also via the config). :-) Quick question: If resolving the lag problem works only with both options enabled, maybe you could combine them? Or is there another use-case for using only |
Yes, it would be possible, but |
Ok, thanks for all your efforts. So nevertheless: Can you please make |
@cju: Done in I got |
Very nice... Thanks a lot. |
This was a dubious "fix" for a Nvidia driver problem. The problem was never fully understood, and the then developers took a shotgun approach and implemented xsync fences as a fix. Which somehow fixed the problem. Again, I don't see any indication that the developers understood why this "fix" worked. (for details, see chjj/compton#152 and chjj/compton#181) The driver problem should have been fixed almost 5 years ago. So this shouldn't be needed anymore. In addition the way compton uses xsync fences is apparently wrong according to the xsync spec (fences are attached to screen, but compton uses them as if they were attached to drawables). So, I will try removing it and see if anyone will complain. If there are real concrete reasons why fences are needed, it will be brought back. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Since upgrading to NVIDIA's 334.21 driver, I've been seeing some odd input lag issues when using compton. The lag is most noticeable when scrolling using the scroll-wheel in Firefox. Right after starting Firefox, it's smooth and snappy as expected. But once I've had it open for a while (rapidly changing focus to and from another window seems to trigger it more quickly), my scroll position ends up "one behind." For example, if I scroll down two clicks then up one, I see the page position I'd expect to see after the second down click only after I do the up click. In order to see the results of the up click, I need to either perform another scroll action, change focus to a different window, or trigger a redraw in some other way. The only reliable way to get rid of the issue seems to be to restart Firefox.
Some Googling led me to this Clutter bug report, which has similar symptoms and was caused by a change to NVIDIA's
GLX_EXT_buffer_age
handling. Although I wasn't usingglx-swap-method = "buffer-age";
to begin with, after adding it I saw the same flickering that was reported in the linked NVIDIA forum thread in addition to the original redraw lag.Could there be a single bug in compton that's causing both issues, and if so, what can I do to help fix it? I've already looked through compton's buffer_age handling code, but I have very limited experience with graphics and couldn't find anything obviously wrong.
A copy of my configuration file follows:
The text was updated successfully, but these errors were encountered: