Repository navigation
Conversation
Use /dev/ttyN instead of /dev/tty/N as the tty path. Set PAM_TTY to the session tty before pam_open_session. The session can run on a different VT than the greeter. A stale PAM_TTY makes logind reject the session with InvalidParameter. Fixes ubuntu#480
dklima
force-pushed
the
fix-wayland-tty
branch
from
September 24, 2026 07:05
c62429b to
14f6337
Compare
|
Just tested it, can confirm now it works fine, thanks! |
Collaborator
|
at some point I'll test this locally to confirm and then I'll merge it in, thanks guys |
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.
Wayland sessions fail to start. This PR fixes two bugs.
1. Wrong tty path
wayland-session.cmakes/dev/tty/N. The correct path is/dev/ttyN. With the wrong path,pam_selinuxfails onsetfileconand LightDM can crash.2. Stale
PAM_TTYLightDM sets
PAM_TTYduring authentication. For a Wayland greeter, the value is the greeter tty. For an X11 greeter, the value is the greeter X display.The session can start on a different VT. With a Wayland greeter,
pam_systemdthen sends the greeter tty with the sessionXDG_VTNR, and logind returnsInvalidParameter.This change sets
PAM_TTYto the session tty beforepam_open_sessionfor all sessions that are not X11. This also changes one path that works now: an X11 greeter that starts a Wayland session.PAM_TTYchanges from the greeter X display to the session tty. X11 sessions do not change.Test
Fedora 44, lightdm 1.33.1 with this patch, SELinux enforcing:
Fixes #480