Skip to content
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

New backend causes occasional stutter/dropped updates #1040

Closed
awused opened this issue Mar 29, 2023 · 3 comments
Closed

New backend causes occasional stutter/dropped updates #1040

awused opened this issue Mar 29, 2023 · 3 comments

Comments

@awused
Copy link

awused commented Mar 29, 2023

Platform

Fedora 35 to 37 now, amd64

GPU, drivers, and screen setup

1080ti and later 4090, drivers were whatever the current nvidia proprietary drivers were a few months ago when the default backends switched over through to 525.89.02 today.

One primary 4k monitor, three secondary 1440p monitors, all at 120hz. I previously had ForceFullCompositionPipeline on in the nvidia settings, but with my new PC it's been off, and doesn't appear to have changed anything. Nvidia has been set to sync video to the primary monitor.

Environment

i3 (with gaps), alacritty terminals. I've noticed it most in mpv and firefox but only because I use those applications to watch video. Redshift is on but that was one of the first things I eliminated.

picom version

10.2 right now, whatever it was over the last couple of months

Diagnostics **Version:** v10

Extensions:

  • Shape: Yes
  • XRandR: Yes
  • Present: Present

Misc:

  • Use Overlay: Yes
  • Config file used: /home/desuwa/.config/picom.conf

Drivers (inaccurate):

NVIDIA

Backend: glx

  • Driver vendors:
  • GLX: NVIDIA Corporation
  • GL: NVIDIA Corporation
  • GL renderer: NVIDIA GeForce RTX 4090/PCIe/SSE2

Backend: egl

  • Driver vendors:
  • EGL: NVIDIA
  • GL: NVIDIA Corporation
  • GL renderer: NVIDIA GeForce RTX 4090/PCIe/SSE2

Configuration:

I've reproduced this with as little in my config file as this, since I was looking for a minimal reproduction. I've not tried to reproduce it without glx or vsync.

Configuration file backend = "glx"; vsync = true;

Steps of reproduction

Just using the compositor seems to be enough. I've only noticed it while watching video or playing games but, due to the nature of the stutter, I would probably miss it otherwise. Test patterns with constant motion are probably best for noticing it.

Expected behavior

Properly paced frames.

Current Behavior

Every now and then, up to every few minutes to less than once in half an hour, a single frame will persist for what feels like a few hundred milliseconds. The duration seems variable, but I want to say I've never seen any go over a second. Without a high speed camera I don't think I can measure this, and it's possible they're more common than I realize and I'm only noticing the worst hitches.

It seems to affect all programs but it's most noticeable while watching videos in mpv, firefox, or chromium, especially during camera pans when there's no ambiguity that the motion should be smooth. I have noticed it in games and on my secondary monitors as well.

OpenGL trace

Impractical to capture given their rarity.

Other details

I've got logs at the trace level which I killed within a second or two of the stutter but nothing stands out as obviously broken in the logs going back about 10 seconds. Damage was off and there were no frames where my mpv window was deliberately not being painted. There is one gap in the logs which is probably the stutter, though I can't be 100% certain since it's only ~800ms before picom dies. No other gaps in the logs are longer than 20ms, and this one is half a second.

[ 03/27/2023 20:09:33.481 draw_callback_impl TRACE ] Render start, frame 48399
[ 03/27/2023 20:09:33.489 draw_callback_impl TRACE ] Render end
[ 03/27/2023 20:09:34.004 ev_handle TRACE ] event     Damage serial 0x000601c9 window 0x0042465d "whatever I was watching - mpv"
[ 03/27/2023 20:09:34.004 repair_win TRACE ] Mark window 0x0042465d (whatever I was watching - mpv) as having received damage

These stutters don't occur without picom, and with high confidence I haven't seen any stutters with --legacy-backend in the past two days since I started digging. I noticed these months ago and assumed they were related to nvidia and possibly my aging 1080ti receiving less support, but with the new card I started to dig around at other software. Without anything to go off of besides my memory, it seems like the start of the stutters roughly lines up with v10's availability in Fedora.

@awused
Copy link
Author

awused commented Apr 7, 2023

Haven't seen the stutters at all since switching back to --legacy-backend, even after multiple reboots.

@awused
Copy link
Author

awused commented Feb 11, 2024

I've built picom from head and I'll test it with the new backend over the next couple of days.

yshui added a commit that referenced this issue Feb 13, 2024
See the added comments for details.

Fixes #1145
Fixes #1166
Fixes #1040?

(cherry picked from commit 75d0b7b)
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
@awused
Copy link
Author

awused commented Feb 17, 2024

At least over the last 5 days I haven't noticed any stutters. I can't say I've been watching as much video as I did when I filed this bug, but for now I assume it's fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant