-
Notifications
You must be signed in to change notification settings - Fork 98
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
surface: Don't crash due to weird state after resume #699
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this installed on the Mira B4 w/ 4060 Ti, resume still isn't working correctly.
The first change of behavior is I now get a mouse cursor on top of an otherwise blank screen after resuming; the cursor doesn't move around smoothly, but if I move the mouse, the cursor will pop to a new location a few seconds later.
With this fix, I am able to get to a TTY after the resume (which I wasn't able to do before). If I restart cosmic-greeter.service
, then I can log back into the GUI successfully.
Here's the system journal after the resume: after-resume-d580294.txt
I see these logs after suspend is started but before it's finished suspending:
Aug 09 20:54:51 pop-os cosmic-comp[2028]: Failed to submit rendering: Failed to submit result for display
Caused by:
0: The underlying drm surface encountered an error: DRM access error: Page flip commit failed on device `Some("/dev/dri/card1")` (Permission denied (os error 13))
1: DRM access error: Page flip commit failed on device `Some("/dev/dri/card1")` (Permission denied (os error 13))
2: Permission denied (os error 13)
After resume, I see this line repeated a lot in one place:
Aug 09 20:55:42 pop-os cosmic-session[1958]: [2024-08-09T20:55:42Z WARN iced_futures::subscription::tracker] Error sending event to subscription: TrySendError { kind: Full }
And then one of these just before I switch to a TTY:
Aug 09 20:56:28 pop-os cosmic-comp[2028]: Failed to submit rendering: Failed to submit result for display
Caused by:
0: The underlying drm surface encountered an error: Device is currently paused, operation rejected
1: Device is currently paused, operation rejected
I'm approving this since it's an improvement in behavior, but it seems more work is still required, possibly in cosmic-comp.
Difficult to decode what exactly is happening here.
That seems correct, as the currently queued render likely fails while the session is being deactivate, the error code also matches up here. cosmic-comp will catch this and given this line doesn't repeat it clearly also doesn't try to redraw, so success on the suspend side of things.
Seems like a separate cosmic-session bug we should track.
This one is puzzling. I wonder if the log message actually originates from before suspend, as it would make sense that the surface still exists but the device is already paused. Otherwise I don't know how we would get into this state, as we first resume the device and then startup all the surfaces again (and at that point only one thread is involved). |
Pushed a commit to address the last log message. @jacobgkau If you have the time to retest, that would be very appreciated. The system journal would again help with debugging. |
@jacobgkau Should fix resume issues from #694 (unable to confirm myself)