-
-
Notifications
You must be signed in to change notification settings - Fork 584
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
Window stuttering after these commits #1072
Comments
try |
It does fix the problem. What does it do? |
can you upload trace logs when the stutter happens? |
@Monsterovich sorry, I wasn't clear. I meant the trace log, as in logs generated by |
Here: |
By the way, it's also noticeable on 60hz screen, I checked on a laptop with Intel iGPU. |
disables the recently introduced frame pacing feature that's supposed to schedule rendering better and decrease latency. unfortunately, it doesn't always work well, mainly because our rendering has poor performance. |
Huh, this is wild:
I didn't expect to see numbers like this. I will add some more timing logs. |
@Monsterovich alright, I've added more logs, can you |
@Monsterovich also:
Do you have VRR enabled? your frame rate is really unstable. |
Did you know that VRR is disabled in picom even if enabled on the monitor, because in the NVidia driver picom is added to the exclusion list of applications in which VRR is forced to be disabled (nvidia-application-profiles-rc file). But it doesn't matter, because I see this problem on my laptop, where there is no FreeSync. P.S. The log is from my laptop, where there is no VRR. |
I do, but what I saw in the logs lead me to believe otherwise. |
Hmm, this is odd. I looked through the log but there is no missed vblanks. do you have a video recording of the stuttering? Also it would be nice if the video is paired with a log file. |
https://github.com/yshui/picom/files/11736351/2023-06-13_16-58-50.mkv.zip I've already uploaded it. The video at the end clearly shows that the windows move smoothly (without frame pacing commits). Here's a log from my PC (NVidia GPU + FreeSync monitor): |
Having similar issues. With frame-pacing enabled games claim that they're running at a solid 60 but it feels more like 20-40 |
@frebib what's your graphics card BTW? |
No, I need a video that is paired with the log file. i.e. the one from your laptop. Your log from your PC still has unstable frame rate. |
I am experiencing the same problem after the pacing branch was merged in, on an RTX 3090 (so it's not hardware related). VRR is also disabled, and also remains blacklisted - as shown below:
I suspected that the branch might cause problems for NVIDIA GPUs based on the discussion that was going on in the PR, and been meaning to perform some tests. Unfortunately, my free time is quite limited recently. But since this has been merged in and I'm negatively affected, I'll sink some time into this regardless. First, here are Nsight profiling results from running picom with and without
Clearly, there is a significant difference in behaviour when frame-pacing is applied. Additionally, here is another 5s profiling run along with accompanying video (recorded in OBS @ 60fps) and Recorded firefox scrolling with frame pacing nsys-rep.zip And my Unfortunately, I can't seem to consistently record above 60fps with OBS without (OBS introduced) stuttering showing up in the recording, and it's a bit hard to see the stuttering itself when recorded at only 60. Hopefully, this additional recording (where I switch between picom runs with and w/o frame-pacing) will illustrate the difference more clearly. I think you can definitely notice stuttering in the recording, but the stuttering difference is night and day in real life. (As the Nsight profiling reports evidence, the average frame rate is 50 vs 140fps, with and without frame-pacing respectively) Uploaded to mega as file size (41MB) was too large to upload here: https://mega.nz/file/UaM3CJ5J#tauIPLtSsT2zV-iXQJj17s5-7TrgVB1L4_FNHxnVFcg |
7900xt. I'm using the amdgpu driver |
@frebib yours is different from Monsterovich's. based on the timing information reported by OpenGL, the render had finished in time, but when the next vblank started we found we were still rendering. I have a 6800XT, and this is not happening to me 🤔 |
I wouldn't be surprised if it's a driver bug tbh. I've hit many many of those with this card unfortunately. I'll try re-enabling this occasionally to see if it behaves any differently. |
https://gitlab.freedesktop.org/drm/amd/-/issues/2631, this is for some weirdness I saw in the log file. I suspect I probably didn't account for the amount of time scanout takes, let's see if I can get some answers. |
Unlikely, considering that I have this problem on NVidia GPU and on Intel iGPU. |
Changing src/picom.c:267 to:
fixes the issue by making the deadline earlier. I don't know whether hard-coding this value is good though... |
@frebib hi, can you try the |
Seems more or less the same. Switching to the game yields 60fps feeling for a few seconds, then it drops to feeling more like 30 https://gist.github.com/frebib/49b16ab1081a8175026ad1b92f9ef23b/raw I see lots of these c769988#diff-c010a812c869b9aeec83b5b76bd93cbcc57535ced07824ead7506809af6c0793R1596
|
Those are normal |
@Stebalien are you experiencing the same problem? and what's your graphics card? |
@frebib @Monsterovich @kwand I am trying to find a middle ground between pacing and no pacing. Can you guys try the |
Definitely feels smoother. There are no noticeable frame drops now. I'll stick with it for a while and report back |
I don't see any difference, the fps is still about 60 instead of 144. |
@Monsterovich what does it look like if you run without pacing? |
Smoother window movement/page scrolling, with frame pacing the frame rate is like being limited to 60 fps. |
@Monsterovich I mean, you recorded a video with picom running under renderdoc, can you do the same without pacing? |
I did this in one video, pay more attention at the fps counter when I added the |
@yshui I can confirm with @Monsterovich that I also experience a significant night/day difference between partial pacing and with For profiling, I returned to an old, intensive test brought up by an issue long ago: rapidly moving around a video-playing window. In particular, I moved Firefox around in circles with a tab playing this: https://blurbusters.com/hfr-120fps-video-game-recording/. (I think this is self-explanatory, but let me know if you need a recording) Profiling with Nsight shows clear significant differences, with average FPS of 172 for |
nvm, I saw you wrote about it already. |
Sorry, which one? |
@kwand BTW, can you upload log file with |
OK, I am just waiting for @frebib's result of |
I haven't done any scientific tests, but the |
Thanks, that's the result I was hoping for. Looks like there's definitely some weirdness with VRR capable nvidia setup, even with VRR disabled. With a trace log from @kwand I should be able to find a way to detect that and disable pacing fully in that case. @frebib Pacing should give you a reduced latency. It's very noticeable (at least for me) when I drag windows around, and when I play games that require short reaction time. OTOH the difference between full pacing and partial pacing is small |
@yshui Here you go, trace log: |
I also encountered this problem after updating, here are my log files, hope they help. |
@s0nny7 What is your GPU? |
Mine is NVIDIA GeForce GTX 1060. |
I have to reopened the issue #1077. Today I have possibility to simulate it and make full log file according to your description. The log file is shared here The loss control and large lags start around 12:40. |
So a summary of the problems we have so far: unreliable vblank interval measurementwe use X Present extension to measure how long a vblank interval is. NVIDIA's Present implementation is just unstable, and the vblank interval we measured is a) noisy and b) doesn't match the actual refresh rate. I had made inquiries on NVIDIA's forum but got no reply so far. there are things other than the Present extension that we can use for this measurement: neither
so our best bet is to add support for unreliable render time measurementas seen in log files submitted by @frebib. the actual render seems to take long than is reported by OpenGL. i have a branch high power usage(#1079) this is because picom is waken up once for every frame, even when there is no change to the screen. this will be fixed once we merge the |
For the investigation I mentioned above, I need some help from NVIDIA users. If you want to help, you need to build xtrace, then compile this little test program. once you've done that, run the test program under xtrace:
press ESC to exit, then upload the |
ok, this is kind of what i already expected. NVIDIA is using its own proprietary X extension instead of DRI2. this just means we can't take the |
Hi, I've improved the pacing logic, disabled the more "advanced" part of pacing by default, and implemented a alternative to Present for NVIDIA. Hopefully things will work better now, please give the |
Also if you are a NVIDIA user, you can turn on |
Commits 86d3739...a4fae2b created a stuttering when moving windows, which is very noticeable on the 144hz monitor.
The problem only disappeared when I removed these three commits. Just deleted commits one by one and watched as the lag disappeared.
Here's a video recorded at 120fps that shows this issue.
2023-06-13_16-58-50.mkv.zip
The text was updated successfully, but these errors were encountered: