wayland/drm_syncobj: Allow temporarily close the device#2025
Open
Drakulix wants to merge 1 commit into
Open
Conversation
5 tasks
ids1024
reviewed
May 8, 2026
Comment on lines
+165
to
+166
| /// Note: Any existing timeline objects will error out and hang clients, | ||
| /// until `update_device` is called with a new device fd. |
Member
There was a problem hiding this comment.
Well, if we use post_error, that won't just hang the client, it will cause the client to crash when its Wayland connection is broken by the protocol error, right?
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.
libseatrecommends to re-open file descriptors after suspend/resume, since they might have been permanently revoked.Unfortunately it doesn't wire-up logind's resume event, which provides new file descriptors, to pass those on. As a result compositors need to issue a new open-call, which will not succeed unless the old file descriptor has been closed.
Since we put the
DrmDeviceFdinto internalArcs (yes multiple), this can be a bit annoying and one part where we completely fail to provide a way to re-open the FD is ourdrm_syncobj-protocol implementation.You can update the internal device in case it disappears and you want to select a new one. But if you simply want to re-open the file descriptor, there is no way to do that without invalidating all existing timelines in the process (which is obviously bad and will hang some clients due to unsignaled release points).
There isn't really an elegant way to do this, so this PR provides a way to temporarily close the internal file descriptor of the global's state.
Description
Checklist