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

Lock command on Linux running gdm results in a black screen and stuck state #22437

Closed
allenhouchins opened this issue Sep 26, 2024 · 5 comments
Closed
Assignees
Labels
bug Something isn't working as documented #g-mdm MDM product group :incoming New issue in triage process. :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. ~released bug This bug was found in a stable release.
Milestone

Comments

@allenhouchins
Copy link
Member

Fleet version: 4.57.0

Web browser and operating system: Chrome or Safari


💥  Actual behavior

If you have an Ubuntu 24.04 host running gdm as its desktop manager, sending a Lock command will put the device in an unusable state -- the screen goes black and takes no user input. Rebooting the device never gets you back to the login screen. You have to send an Unlock command and reboot again to regain functionality. If you switch your desktop manager to lightdm, the Lock and Unlock commands work as you would expect.

🧑‍💻  Steps to reproduce

  1. Set up a new Ubuntu 24.04 host running gdm as the desktop manager (this should be the default)
  2. Send a Lock command and observe behavior
  3. Send an Unlock command and reboot to get back to a working state
  4. Switch the desktop manager to lightdm and observe normal, expected behavior

🕯️ More info (optional)

Video demonstration

I was able to replicate this in Parallels, VMware Fusion, bare metal arm64, and bare metal amd64

This might be a bug for gdm and not Fleet but wanted to verify there wasn't a different approach we could take with gdm to prevent this behavior. This issue is not present in RHEL, Kali, or Fedora but I believe they do not use gdm.

@allenhouchins allenhouchins added bug Something isn't working as documented :reproduce Involves documenting reproduction steps in the issue :incoming New issue in triage process. labels Sep 26, 2024
@allenhouchins allenhouchins changed the title Unlock on Linux running gdm results in a black screen and stuck state Lock command on Linux running gdm results in a black screen and stuck state Sep 26, 2024
@georgekarrv
Copy link
Member

Thanks Allen, we will take a look here sometime next week

@georgekarrv georgekarrv added :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. and removed :reproduce Involves documenting reproduction steps in the issue labels Sep 27, 2024
@lukeheath lukeheath added ~released bug This bug was found in a stable release. #g-mdm MDM product group labels Sep 27, 2024
@georgekarrv georgekarrv added this to the 4.59.0-tentative milestone Oct 17, 2024
@dantecatalfamo dantecatalfamo self-assigned this Oct 28, 2024
@georgekarrv georgekarrv modified the milestones: 4.59.0, 4.60.0-tentative Oct 28, 2024
@dantecatalfamo
Copy link
Member

dantecatalfamo commented Oct 29, 2024

Some initial research on this:

It appears to be related to a change made to GDM. I can replicate this behaviour by just creating the /etc/nologin and logging out. Removing the file and restarting GDM seems to fix it.

Previously GDM would show the login prompt as usual and throw an error when the user enters a password instead of coming up as a black screen alltogether.

I will continue to investigate.

@dantecatalfamo
Copy link
Member

This bug appears to be Ubuntu only. It doesn't happen on the latest release of Fedora

dantecatalfamo added a commit that referenced this issue Nov 11, 2024
#22437

There is a bug in Ubuntu 24.04's distribution of GDM that prevents it
from starting correctly and displaying a prompt to the user if
`/etc/nologin` is present. This issue is not present on the current
release of Fedora, meaning it is Ubuntu specific.

The way we lock users out is by manually creating the `nologin` file and
then masking the `systemd-user-sessions` systemd unit, which creates the
file on shutdown and deletes it on startup. This will cause a PAM policy
to fail and prevents anyone from logging in. When we unlock the system
we delete the `nologin` file, unmask the `systemd-user-sessions` unit,
and manually run the binary that it should start.

This process removes the cause of the GDM bug, but we need to reboot the
machine to get GDM working again.

While I have not yet been able to determine the exact cause of the bug,
this fix will prevent the user from being stuck with a black screen once
the machine is unlocked.

This fix will not remedy GDM showing a black screen upon being locked,
it only ensures that the user isn't stuck having to manually reboot the
machine once it's unlocked.

We should check back on this soon to see if the bug gets been fixed
upstream.
@georgekarrv georgekarrv added :demo and removed :demo labels Nov 15, 2024
@PezHub
Copy link
Contributor

PezHub commented Nov 17, 2024

QA Notes:

Confirmed that when sending a lock command to ubuntu 22.04+ the screen goes black due to the Ubuntu bug. With the fix applied, the user/admin no longer has to restart the device to get to the login screen when the unlock script is sent from Fleet. (Previously a reboot was required after unlock to get see the login screen again)

@fleet-release
Copy link
Contributor

In locked state, dark,
Fleet frees Linux from its cage,
Light shines, work restarts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as documented #g-mdm MDM product group :incoming New issue in triage process. :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. ~released bug This bug was found in a stable release.
Development

No branches or pull requests

6 participants