-
-
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
Picom stops drawing during games, until alt-tab #1145
Comments
I can confirm having the same issue, although I don't know for sure that picom is causing it (I'll have to play with picom disabled for a while and see if I get any random graphical freeze, like OP). Fullscreen games, usually powered by wine/dxvk, will periodically stop rendering and freeze frame (although they keep "playing" just fine), and only a virtual desktop switch will let the frames render again. Archlinux - next-git (a6b4e28) - Nvidia 545.29.02 - i3wm |
I only noticed this today after installing picom for the first time, so I suspect it is picom. When this happens, the game continues running since I hear all the sounds from it. The games where I saw this:
Environment:
|
yup, happens to me too in all games. I usually turn off picom when playing games and it doesn't happen anymore, but for some reason, Wine/Proton 8 doesn't work without a compositor and some games don't work on wine/proton 6 or 7. freakin linux.. |
I have the same bug, but for me the mouse will still move and since I have 2 screens I can fix it by moving the mouse across screens. |
@gregflynn By chance do you have any of the following that I also have? |
Some good ideas! but unfortunately my setup is pretty boring, single ultrawide (DELL U3818W) monitor running at a paltry 60hz, no forced composition pipeline. Happy to poke more if anyone thinks of anything though! I have noticed when playing Kingdoms and Castles, which uses Unity, there haven't been any freezes, which is quite weird |
@gregflynn I seam to get freezes even just on the desktop. Since it does not seam to be tied to anything except NVIDIA cards in general maybe it is a driver thing. I think I saw something about this like three years ago when NVIDIA made a mistake but that was fixed rather quick. I did try switching to compfy(which is based on picom but with animations and more active support) and the problem is still there. So maybe it can be fixed in that fork but for now I just have a hook that unloads the compositor on the start of a wine process then restarts it when wine closes. The freezes on the desktop still happen but they are not as annoying as ones in game. I really hope the dev or a maintainer looks at this sometime soon. |
@Daniel-McLarty I had those freezes with those exact configurations, but when I removed the config, wine/proton started working without Picom so now I stop picom before gaming. I read about unredir, but I ended up just setting up a key binding + toggle script for starting/stopping picom. |
@ssipos90 That is not really a solution to fix a bug.That is just hiding the mess in the closet and saying you cleaned. |
@Daniel-McLarty I chimed in that I also used those configs and it's happening to me too. I also shared my workaround for my use-case, which is a solution to my use case and in case anyone else finds it useful. |
unfortunately this is not happening here so there is not much investigation i can do. you can run picom with |
I'll give that another shot, when you say it's not happening for you, can you elaborate on your testing setup? like I'm willing to bet this is NVIDIA specific, but if you aren't able to repro on NVIDIA that would be really interesting. |
I am on AMD. If you suspect it's nvidia, can you check if this also happens on |
Next card will definitely be AMD. I will try switching backend as well. I spent about 30 minutes this morning trying to get it reproduced in Civ 6 with trace logging but couldn't get it to happen. Will try more later |
can't reproduce. i don't have any games but i've installed the supertuxkart as @scfarley said that it should happen there too and |
@absolutelynothelix I have also had it freeze for me on YouTube when watching on LibreWolf. When it comes to games some of the worst were the ones running though DXVK on Proton/Wine while using Ray Tracing like Control. The severity seams to differ on a program by program basis. Edit: the only common point is that killing picom stops the problem. |
I was able to reproduce with log-level trace but the output is quite overwhelming, is there a phrase to grep for that would trim the output or is there something in particular I'm looking for? I'm not able to reproduce with |
just upload the whole log (as a file) here. also, it would be helpful to know how quickly you stopped picom after the freeze happened to narrow down the area of search. |
never mind. |
Ok it should be in this section of logs, this is the last 2MB of the written log, looks to be about the last 2 minutes, i think i killed picom within about 10 seconds. At about 13:49:53 it looks like looks stop right around when i think it hung, and logs start again when the alt-tab i think in the logs at 13:49:59, if I'm reading this correctly
|
It seams to be more focused right here:
as it freezes for six seconds right at this point. |
That's pretty much what I expected to see. it's not that picom froze for 6 seconds, picom didn't receive any damage events for 6 seconds, so it rightfully thought there is nothing to render. the mystery is what happened to the missing damage event. Try xtrace. Note its output will be even noisier than |
Two quick updates:
using https://aur.archlinux.org/packages/xtrace since it was faster to get installed than your fork and I didn't think the two commits in the fork were relevant but do please correct me if there's something specific in the fork needed to debug this. |
we need a volunteer that can catch a juicy freeze (ideally longer than a second) on the glx or egl backends while doing a trace log + xtrace. vanilla xtrace (i.e. not yshui’s) should be fine. the command would be something like |
I have the same bug since yesterday. I suspect it's Picom v11. Btw my GPU is nvidia. |
It still seams to happen with GLX back end and vsync both on and off, I have tried all backend and vsync combos to no change. Though it seams to be most minimal with GLX backend and vsync on, but it still happens. |
Update: Just tried. I think the issue is mitigated in GLX backend, since I did not meet with that for now. |
I forgot to ask: when did this start happening? Was picom working properly at some point in the past, and only broke after you updated some packages? |
Thank you. |
This is potentially the same issue as my old bug report from March, #1040, does it still reproduce with In my case it started when the default backend switch happened, which doesn't help narrow down the specific commits. |
Idea, why cant we just make picom send a faked damage event to itself at the refresh rate of the monitor if it does not get one for say 5-10 frame times? It is more of a workaround then a fix, but it could at least be a temp fix while we find the problem. You could also put it behind a flag in the config so it does not potentially bog down hardware configs without the problem. Maybe a |
Sorry I haven't been able to commit time to debugging further as I've had other priorities and removed picom from my setup for the time being. @Daniel-McLarty or @chardon55 can you attempt to reproduce with the xtrace running as described in @absolutelynothelix 's comment? Devoting @yshui 's time for such a wild workaround when simpler debugging avenues haven't been fully explored isn't the best use of development time. |
I'll try it some day. But GLX currently seems fine for me, I have no idea whether I can reproduce it. |
See the added comments for details. Fixes #1145 Fixes #1166 Signed-off-by: Yuxuan Shui <[email protected]>
Please give #1181 a try, see if that fix your freezes |
@yshui Sorry, there have been no instances of freezing since February 7, 2024. The version of picom currently running is v11.1. |
Oh, this makes things way easier, just do: nix run github:yshui/picom/defroster |
@yshui I'm running vanilla v11.1. |
Will I get a verbose output or anything like that and is this the patched code? |
@yshui
|
you can pass arguments to
good news then. |
@yshui thanks man, that patch seams to work if you wanna put it in main, no freezes since I activated it. |
Ran it for a few hours, can't reproduce the freezes 🥳 |
if you get such warnings when closing windows in xfce they're harmless. |
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]>
Wondering, should I open an issue with the Nix team so NixOS can get this patch, or is that a job for the maintainer of it on the Nix side/the job of someone on the Picom team? Don't wanna steep on toes, also I am not sure of the exacts of releases and the like, does the merge count as a release or is it still too early. Still new to most of this and I don't want to be a bother. |
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 (updated)
GPU, drivers, and screen setup
Nvidia 2080, nvidia 545.29.02-2, mesa 1:23.2.1-2
Single monitor 3840x1600
Environment
AwesomeWM + picom
picom version
picom
10.2-1
Diagnostics
Configuration:
Configuration file
Steps of reproduction
I have confirmed that killing picom prior to game will result in no freezing
Expected behavior
Continue to draw in games
Current Behavior
Seemingly random screen draw freezes during game play
Stack trace
OpenGL trace
Working on repro during trace now, will edit and post when i get it
Other details
The text was updated successfully, but these errors were encountered: