Skip to content
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

Recent logind changes break GNOME #31287

Closed
AdrianVovk opened this issue Feb 12, 2024 · 0 comments · Fixed by #30910
Closed

Recent logind changes break GNOME #31287

AdrianVovk opened this issue Feb 12, 2024 · 0 comments · Fixed by #30910
Labels
bug 🐛 Programming errors, that need preferential fixing login pid1
Milestone

Comments

@AdrianVovk
Copy link
Contributor

systemd version the issue has been seen with

256 git

Used distribution

GNOME OS git

Linux kernel version used

6.6.10

CPU architectures issue was seen on

x86_64

Component

systemd, systemd-logind

Expected behaviour you didn't see

Able to log into my GNOME session

Unexpected behaviour you saw

Couldn't log into my GNOME session. The moment gnome-shell starts, whatever was on screen freezes and remains frozen. The rest of the session runs just fine underneath the frozen display output

I bisected this to 4cb4e6c, and then further tracked the bug. Here's what's happening: as of the commit user@.service has started running in a logind session, and thus XDG_SESSION_ID is now set by pam_systemd for the manager. The manager propagates this to all the services it starts. But the problem is that XDG_SESSION_ID is set to the ID of the manager's session, not the actual user session! The manager's session, notably, does not have a seat or TTY set. So, once gnome-shell is started as a systemd service, it sees the XDG_SESSION_ID variable and decides to skip all of its special logic looking for the logind session. It then looks up the session's seat (again, for the wrong session!), finds none, and declares that it should run headlessly. Thus it makes no attempt to put anything on the screen, and the GPU driver leaves a frozen copy of whatever was shown last instead. Underneath, however, GNOME is still running in headless mode, which allows the rest of the session to startup correctly.

Steps to reproduce the problem

  • Run a systemd version w/ 4cb4e6c
  • Try to log into GNOME Shell

Additional program output to the terminal or log subsystem illustrating the issue

Feb 12 20:24:51 gnomeos gnome-shell[3694]: No seat assigned, running headlessly
@AdrianVovk AdrianVovk added the bug 🐛 Programming errors, that need preferential fixing label Feb 12, 2024
YHNdnzj added a commit to YHNdnzj/systemd that referenced this issue Feb 13, 2024
YHNdnzj added a commit to YHNdnzj/systemd that referenced this issue Feb 13, 2024
YHNdnzj added a commit to YHNdnzj/systemd that referenced this issue Feb 13, 2024
@poettering poettering added this to the v256 milestone Feb 13, 2024
YHNdnzj added a commit to YHNdnzj/systemd that referenced this issue Feb 13, 2024
YHNdnzj added a commit to YHNdnzj/systemd that referenced this issue Feb 14, 2024
YHNdnzj added a commit to YHNdnzj/systemd that referenced this issue Feb 15, 2024
ayhamthemayhem pushed a commit to neighbourhoodie/nh-systemd that referenced this issue Mar 25, 2024
chunyi-wu pushed a commit to chunyi-wu/systemd that referenced this issue Apr 3, 2024
@mrc0mmand mrc0mmand added login and removed logind labels Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Programming errors, that need preferential fixing login pid1
Development

Successfully merging a pull request may close this issue.

3 participants