Repository navigation
Conversation
After suspend/resume (observed on NVIDIA) restateConnectors() can pass a peer head's retained primary->front FB to planeProps() although the FB is dead and its weak buffer has expired, which segfaults when reading fb->buffer->size. Skip restating the primary plane for such heads, and make planeProps() fail the request instead of dereferencing a dead/bufferless FB. Fixes hyprwm#466
|
Hi @ysautter, Thanks for your contribution! Unfortunately, Hyprland and hypr* no longer To get vouched, please see our contributing guide at wiki.hypr.land/Contributing-and-Debugging This PR has been closed automatically and will not be re-opened. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #466
Problem
After suspend/resume (observed on NVIDIA), monitors briefly report no modes, test/modeset commits fail with
EINVAL, andCDRMAtomicRequest::restateConnectors()then callsplaneProps()with a peer head's retainedcrtc->primary->front. That FB can bedeadwith an expired weakbuffer, soplaneProps()segfaults readingfb->buffer->size(Atomic.cpp, see backtrace in #466).Fix
restateConnectors(): only restate the primary plane if the front FB is alive (!front->dead && front->buffer); otherwise leave the plane state as is (same as the existing "no front buffer yet" case).planeProps(): if handed a dead / bufferless FB, log an error and mark the request as failed instead of dereferencing it. The commit fails cleanly and the compositor's existing retry path takes over.Testing
Built on top of v0.16.0 (Arch package 0.16.0-1 + this patch) and running on Hyprland 0.57.2, RTX 3090 Ti, nvidia-open 620.70.06, 3 monitors (DP-1, DP-2, HDMI-A-1). Before the patch this setup hit the crash in ~3% of resumes (8 crash reports with the identical
restateConnectorsbacktrace on 0.14/0.15/0.16).