Skip to content

drm/compositor: option to keep previous frame's primary buffer alive - #2151

Open
aoli-al wants to merge 1 commit into
Smithay:masterfrom
aoli-al:push-wyzlpztsxzsv
Open

aoli-al wants to merge 1 commit into
Smithay:masterfrom
aoli-al:push-wyzlpztsxzsv

Conversation

@aoli-al

@aoli-al aoli-al commented Sep 2, 2026

Copy link
Copy Markdown

Description

Introduce an option to enable 3 buffer rotation. Currently, Swapchain::acquire returns the first free slot, which is nearlly always the most recent released buffer. The nvidia driver appears to keep reading the buffer for a short while. Holding the buffer for 1 frame longer will avoid flickering.

This matches the behavior in Hyprland, which does not exhibit flickering.

This fixes: #1862

I use claude code + fable to understand the implementation differences between smithay and hyprland and draft the PR

Checklist

@Drakulix

Drakulix commented Sep 2, 2026

Copy link
Copy Markdown
Member

Thanks for debugging this, but that seems like a more problematic synchronization issue, that I wouldn't want to solely solve with a workaround in DrmCompositor.

@cmeissl Maybe we should set OUT_FENCE_PTR and attach that as a sort of "blocker" to the buffer? I would expect the DRM_EVENT_FLIP_COMPLETE to be enough, though it is actually hard to figure out what guarantees that holds.

@aoli-al

aoli-al commented Sep 3, 2026

Copy link
Copy Markdown
Author

Thanks! Yes, I agree the current solution is a bit unfortunate. This is definitely a driver bug but it seems that Nvidia is not doing anything 🙁

Happy to test on my end if you have other solutions.

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

Successfully merging this pull request may close these issues.

Flickering in bottom right of screen with NVIDIA GPUs and high refresh rates

2 participants