-
-
Notifications
You must be signed in to change notification settings - Fork 593
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 spams sgi_video_sync_scheduler_callback with latest nvidia driver #1265
Comments
Update: doesn't happen if vsync = false. Same with the massive performance hit mentioned in the footnote |
Welp, I guess I'll set vsync false for now. I'm also seeing this, though my system was often completely freezing not just slowing down. |
yshui/picom#1265 After a somewhat recent update, picom with vsync enabled causes slowdown/freezing, and I'm having other nvidia issues (e.g. various issues with mpv failing to open). Because I've disable vsync, screen tearing is very bad by default, so I'm enabling force full composition pipeline now to prevent it.
I started seeing the same issue after upgrading to Nvidia 555.58.02. (Not sure what version I was running before that). The release notes for that version of the drivers mention: I tried disabling GSP using the I also tried running picom using the |
it's known to spam in certain cases e.g. when the monitor is turned off. does it spam when you just use the pc normally?
afaik |
if you'd like to have frame pacing enabled (which is recommended ig as it reduces the latency) and like experiments, you can try setting the |
@ShadiestGoat, @noctuid, a less harmful fix for this should be |
Makes sense. I probably misattributed that log message to the wrong picom invocation then. |
I also tried running picom with Thanks for the suggestion @absolutelynothelix. |
Huh, maybe we should just make present vsync the default? |
@yshui, iirc my very scientific very helix benchmarks showed that it's the smart frame pacing that sucks on nvidia no matter what vblank scheduler is used. without it both vblank schedulers work more or less the same at least for me. but maybe more testing from nvidia users is needed. |
@awused oh btw, can you try |
Sure, though I did notice that, based on the timestamps, #1306 happened while the computer was almost completely idle and no one was home. I would have been connected over ssh but not doing anything graphically intensive, at worst just running a few compilations. |
This problem is usually triggered by monitors turning off. |
hi @yshui can confirm this happening to me too: and indeed it happens when monitor is turned off using dpms and then turned on. Unfortunately this freezes picom and so need to kill it to have a working display again. This started to happen just 2 days ago so it has been affected me with something from the latest changes, really hope it can be fixed, if there is anything to help you track it down please let me know and will try to see what I can find. Thanks again for all your hard work! |
OOO, seems like this fixes the problem: PICOM_DEBUG=force_vblank_sched=present --no-frame-pacing |
jesus christ, how about we just pretend that nvidia doesn't exist? |
guess the idea of using present by default is out the window then :/ need to find a better way to mitigate the bad nvidia behavior... |
OK, I am going to test some different strategies and see what works. I created a branch called |
hi @yshui Thanks for the quick fix, can confirm that nvidia-pain does fix the problem and all works well BUT: the problem for me wasn't caused by your code but by the new nVidia driver. So with the latest NVIDIA-Linux-x86_64-550.107.02 I got the following errors:
ALL these errors go away if reverted to NVIDIA-Linux-x86_64-550.100 so not sure what nvidia did but the new driver seems to cause a lot of problems irrelevant to your coding. |
yeah it is the new nvidia driver we are trying to fix (or rather, workaround) here.
Are these results from when you run without |
yes, simply running picom-nvidia-pain without any arguments at all. If I run normal picom with the same config on the 550.100 driver there are no problems at all. please note: it's not just the above errors, for e.g. full screen animations are slow as hell like i3lock, also when unlocking the keypress events are shown almost like back in time and also flameshot is waay slower, for both launching or selecting an area on the screen so seems like something global is going on. |
hi @yshui this seems to be good to go in as do have better results if I'm using this version than the old one. Unfortunately noticed some inconsistency between old and new nvidia drivers, even new one does work time to time and old one does brake time to time so can't replicate that reliably but do think/notice that with this nvidia-pain I do get better results so far it always woke up with this but did not with the old versions. thank you for the quick fix! |
After updating to nvidia 560, the issue I had in #1306 seemed to go away, even without the nvidia-pain branch or any special parameters. But since nvidia 560 is broken in other ways and I downgraded to 555 that issue has come back so I'm back to using special parameters. I'm not sure if whatever changes that happened in nvidia-pain actually need to be merged into the main branch. nvidia has just had a bad couple of drivers and it seems like it'll probably work itself out. That or 560's breakage could have been masking the breakage in here or #1306. Hard to say with confidence until the next driver revision. |
Continuing discussion from #1367. Any plan for a workaround to detect |
@bubbleguuum can you test the |
With the
However (with screen off), picom CPU usage (monitored via ssh terminal running on another machine) is low, being most of the time at 0% and occasionally reported at 10%. When I wake up the screen, the log traces above keep being spammed with CPU usage being constant 10%. That's different than the v12.3 version where when I wake up the screen, spam log traces immediately stop and CPU usage is back to normal. |
ok, at least it fixes the 100% cpu usage. i think i know what is going on with the log spam. |
@bubbleguuum i've updated |
I confirm it fixes the problem: no more log spam and normal CPU usage when waking up the screen. |
Also commenting line below that is spammed when screen is off makes picom use 0% CPU all the time when the screen is off (otherwise it reports about 10% briefly once every 20-30 seconds).
|
i feel 10% cpu every 20-30 seconds is a fair price to pay if we get to complain about nvidia 😈 |
I would only display it once but it's your call. I could see it spam log files. Thanks for the fix anyway ! |
that's very fair, i will do that. |
closed, thanks for testing the fix |
We used to teardown the whole vblank thread and restart it every time we got a duplicate msc. This used to work OK, but newer NVIDIA drivers broke this. And to recap, simply wait for vblank again upon reception of duplicate MSCs _does not_ work either, and will just stuck us in an infinite loop. After some experimentation, I found that rendering a new frame gets us out of the infinite duplicate msc loop. So that's what we do now, i.e. inserting a synthetic vblank to trigger a new frame. Some care is taken to make sure synthetic vblanks' msc numbers don't conflict with real ones. Fixes #1265 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Platform
Arch (Linux 6.9.1-arch1-1)
GPU, drivers, and screen setup
Environment
Bspwm
picom version
vgit-9a839
Diagnostics
Version: vgit-9a839
Extensions:
Misc:
Drivers (inaccurate):
NVIDIA, modesetting
Backend: glx
Backend: egl
Configuration:
Configuration file
Steps of reproduction
Expected behavior
No warning spam
Current Behavior
Spams:
Additionally, things like glxgears & vkcube slow to a crawl when picom is active, though I havent tested various configurations to see if they fix all my problems yet!
The text was updated successfully, but these errors were encountered: