elementary / greeter

Login and Lock Screen greeter for elementary OS and Pantheon, using LightDM
GNU General Public License v3.0
152 stars 39 forks source link

After locking, the login bit is gone #411

Open rasmus91 opened 4 years ago

rasmus91 commented 4 years ago

I locked the machine pressing super+L as per usual.

When i came back and moved the cursor there was the greyish background, the wingpanel, but no 'login' box. I have no idea what caused it.

I had the following programs running at the time: dotnet (was running a dotnet core webapi) slack discord firefox pantheon-greeter

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/89553806-after-locking-the-login-bit-is-gone?utm_campaign=plugin&utm_content=tracker%2F60068889&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F60068889&utm_medium=issues&utm_source=github).
peteruithoven commented 2 years ago

Same here. But not consistently in any way, which makes this very hard to debug. My laptop can be connected to my external screen or not. I can have closed the laptop, left it going to sleep etc. It seems to happen very often after I closed my laptop.

elementary OS 6.1 Jólnir Built on Ubuntu 20.04.3 LTS Linux 5.13.0-52-generic

A super annoying workaround:

  1. Go to TTY by pressing ctrl+alt+F1
  2. Login
  3. Restart Gala (DISPLAY=:0 gala -r)
  4. Go back 1. Go to TTY by pressing ctrl+alt+F7
  5. Restart gala again because there are issues like a blue wallpaper by executing gala -r in the applications menu

Possibly related:

Running lightdm --test-mode --debug seems to open just fine. It opens a window with the greeter, including the login card. Although I can't get it to capture mouse / keyboard, but that's probably unrelated.

Just like mentioned in this comment I also had 2 Xorg sessions running:

$ ps -ef | grep xorg
root        1226     975  2 jul05 tty7     00:30:26 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
root       55706     975  0 jul05 tty8     00:00:01 /usr/lib/xorg/Xorg -core :1 -seat seat0 -auth /var/run/lightdm/root/:1 -nolisten tcp vt8 -novtswitch
peterui+  103690   79767  0 11:57 pts/0    00:00:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox xorg

I can't always reproduce the issue, but I think I found a better workaround:

  1. Go to TTY by pressing ctrl+alt+F1
  2. Login
  3. List the Xorg sessions using ps -ef | grep xorg.
  4. kill the newest non grep one using sudo kill <highest pid>.

Untested, but this should also work:

sudo kill $(ps -ef --sort -pid | grep '[x]org' | awk 'FNR == 2 {print $2}')

This immediately brought me back to the greeter with a login screen. But then, when I did another suspend, the greeter worked fine and when I looked I did have 2 Xorg sessions...
After a reboot I have just 1 session.

Update: ^ stopped working for me, it just returns me to the greeter, but without the login box. Restarting lightdm solves it, but then you'll also lose your session. sudo systemctl restart lightdm. I wish there was a way to just restart the greeter.

I should really check errors in /var/log/syslog next time.