-
-
Notifications
You must be signed in to change notification settings - Fork 589
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
vsync causes intermittent freezes with picom v11 #1166
Comments
try |
Hi, That didn't help unfortunately... Launching picom with |
how long the freezes are typically? |
For video playback (youtube videos) they last for a few seconds (approximately 2 to 5). |
The frequency of freezes is quite fast but a bit random. Sometimes I'll have a freeze only 3 seconds after the last one, sometimes it's only after 20/25 seconds since the last one. |
may or may not be related to #1145. although that's been happening since v10. don't know if you are familiar with git, you can use |
yeah, i think that it could be the same issue as #1145. could you catch a more or less long freeze with trace logging ( |
Well, could be but I confirm going back to v10.2 with vsync enabled does not produces such freezes on my side.
Sure, I'll do a bisecting as soon as I can. In the mean time, I allowed myself to push a patch to the picom Arch Linux package to disable vsync by default in the config file as a temporary workaround. |
I had the exact same issue when updating today. Switching the backend from Also: Arch Linux, latest packages, i3wm, amdgpu. |
I confirm switching to the |
Here it is. There's 2 freezes in that trace. I tried to stop picom asap after the second freeze but there's a few seconds delay. |
From the logs it looks like we didn't receive any damage events for a couple of seconds:
Does look very similar to #1145. If this only happens with NVIDIA, I wonder if we can chalk it up to poor support of XRender from NVIDIA...
Since glx seems to work fine, can you instead make |
Seems like it also happens with AMD actually.
Done. |
Bisecting done, it revealed this commit as the "offending" one:
Just in case, note that not every "bad" commits gave me freezes as bad as the ones I'm describing in the initial issue (meaning either not as frequent or not as long) but, as playing the game with picom v10.2 or without picom running is a completely fluid and "freeze-free" experience, I still declared them as "bad" (bisecting wise). I rebuilt a package for picom v11 locally, including this patch to revert the above "offending" commit and I confirm having no freezes with it. |
can't reproduce on an intel igpu. i ran picom with |
@Antiz96 thanks! |
can reproduce on an nvidia gpu. we suspect that it caused by a race condition somewhere outside of picom, e.g. in libxcb as when a freeze happens there is a damage event before the destroy region request (the last added line in the offending commit bisected above) that we didn't receive and since we didn't receive and handle it we won't get any new damage events as they're incremental.
|
huh, actually, i can reproduce it on an intel gpu and it looks the same. |
@absolutelynothelix Good to know you were able to reproduce the issue! @yshui What do you recommended for the Arch package in the mean time? Unless you recommend otherwise, I would personally prefer the patch solution as it is totally transparent for users (whereas modifying the default config implies a manual change for people that have picom installed already). |
@Antiz96 from what we know so far, it looks like the same problem is happening with glx, and with v10 as well (#1145). that commit probably made this problem easier to hit for more people. I think having the patch to revert the commit is reasonable. There is no "proper" solution at the moment, changing to |
@yshui Thanks for your input. I'll go with the patch to revert the commit for now as it's the less impacting solution for users in my opinion. |
I confirm I still had similar but really rare freezes with the commit reverted. But I'm having like 1 per hour or so compared to 1 or 2 each 30 seconds before reverting the commit. This is to say that the above quote may indeed probably be true. This commit may not be the one that introduced the freezes but it made them way more frequent. So there's a chance that those freezes were indeed already present with v10 but they were rare enough to not suspect/consider them being an actual issue (I probably thought they were "classic" time to time game lags) 😄 The current state with the reverted commit is totally acceptable though, it was just to go along with the above quote. |
@Antiz96, can you test this patch and tell how it reduces the amount of freezes compared to reverting the offending commit? https://gist.githubusercontent.com/absolutelynothelix/b2220bdfe88fbaf1330b19b8c263ccc8/raw/21c9f097f97379d568beeae88d4e97bddef37b3b/man-i-love-xorg.patch |
@absolutelynothelix Sure, but I'm not home until Sunday so I won't be able to test it until then. However, to add some precision to my previous message, the amount of freezes with the offending commit reverted is already pretty low. I said "1 per hour or so" but to be fair, I had like 2 or 3 during the entire day (at least that I could noticed). Anyway, I'll go for a few hours long gaming session on Sunday with the above patch and I'll let you know (I've seen worst ways to test patches 😝). Love the patch name BTW 😉 |
…t-region temporary workaround for #1166
@absolutelynothelix I went for a several hours gaming session yesterday with this patch applied and only faced 2 freezes during the entire session. |
Also, thanks for #1167! |
i think that we've found the root cause of this issue and now we have to think of a proper fix/workaround for it. could anyone affected by this issue try this patch and tell if it's better than the current workaround? this patch has to be applied without the current workaround. the current workaround isn't present in the next branch, so applying this patch on top of the latest commit in the next branch should be fine. also, this patch may have unexpected side-effects, so report back if you encounter something unusual that doesn't happen without it applied. |
See the added comments for details. Fixes #1145 Fixes #1166 Signed-off-by: Yuxuan Shui <[email protected]>
Hi, I pushed a branch |
I also have the same problem, the Firefox browser freezes randomly. It improved after applying #1181 on the latest commit 0d3d18c, with the recovery time significantly reduced to about 1-2 seconds, previously it was several seconds long. PlatformArch Linux GPU, drivers, and screen setupNVIDIA GeForce RTX 3060 Mobile, nvidia-drivers 545.29.06-3, 1:23.3.5-1, single monitor with glx glxinfo -B
Environmentawesome 4.3-3 picom versionvgit-0d3d1 with #1181 DiagnosticsVersion: vgit-0d3d1 Extensions:
Misc:
Drivers (inaccurate):NVIDIA Backend: glx
Backend: egl
Configuration:Configuration file
|
@seiuneko, the glx case of this issue is tracked in #1145. however, we're not sure that this is the same issue. can you do what's described in #1145 (comment)? preferably with and without the #1181 applied with a minimal configuration where you're able to reproduce freezing. |
@Antiz96, i've tested it both on an nvidia gpu and on an intel igpu. given that it seems to fix the issue for me and knowing details about it i consider it a proper fix but i still would like it to be tested by someone else before merging. |
@absolutelynothelix @yshui I installed a picom package built against the latest commit of the |
See the added comments for details. Fixes #1145 Fixes #1166 Signed-off-by: Yuxuan Shui <[email protected]>
See the added comments for details. Fixes #1145 Fixes #1166 Signed-off-by: Yuxuan Shui <[email protected]>
See the added comments for details. Fixes #1145 Fixes #1166 Signed-off-by: Yuxuan Shui <[email protected]>
See the added comments for details. Fixes #1145 Fixes #1166 Signed-off-by: Yuxuan Shui <[email protected]>
See the added comments for details. Fixes #1145 Fixes #1166 Signed-off-by: Yuxuan Shui <[email protected]>
See the added comments for details. Fixes #1145 Fixes #1166 Fixes #1040? (cherry picked from commit 75d0b7b) Signed-off-by: Yuxuan Shui <[email protected]>
Platform
Arch Linux
GPU, drivers, and screen setup
NVidia RTX 3060, nvidia-drivers 545.29.06, mesa 23.3.3, two monitors configured side-by-side with xrandr
Environment
i3-wm
picom version
vgit-197b4
Diagnostics
Version: vgit-197b4
Extensions:
Misc:
(Another compositor is already running)
Drivers (inaccurate):
NVIDIA, modesetting
Backend: glx
Backend: egl
Configuration:
Configuration file
Steps of reproduction
vsync = true
in the config file)Expected behavior
Fluid graphics
Current Behavior
Intermittent graphical freezes (sound is not impacted).
Unfocusing the video / game window or waiting a few seconds unfreezes the video / game (until the next freeze).
Stack trace
NA (the compositor does not crash)
OpenGL trace
NA, no visual glitches per say. Simply freezes
Other details
Since picom v11, enabling vsync (
vsync = true
in the config file) causes intermittent freezes when doing some GPU intensive tasks, like watching youtube videos or playing resources intensive video games (Baldur's Gate 3 on my side for instance).This bug has been experienced by multiple people (see this thread for instance, specifically this comment) and I can confirm that disabling vsync (
vsync = false
in the config file) or downgrading to picom v10.2 (with vsync enabled) solve the issue. So it seems specific to picom v11.For what it's worth, it seems like people reporting that issue are all using a similar setup (i3-wm, NVidia GPU, nvidia proprietary driver) for now, so it could be specific to NVidia I guess.
I remain available if you need more information/tests :)
The text was updated successfully, but these errors were encountered: