46

I'm using xubuntu 14.04 on AMD based hardware. It is configured not to lock a session and not to power down automatically on longer idle times.

There have been no recent changes or new software installations other than notified security updates.

I also have the kde desktop installed. The display manager is LightDM, AFAIK.

The system has been behaving nicely for some months, until a couple of days ago. Now, after about ten minutes idle the session is locked automatically. The screen presents a dialog with the caption "This session is locked".

Attempting to "unlock" with the session's username and password results with the message

"You'll be redirected to the unlock dialog in a few seconds" and the cycle starts over. Unable to log in, the only option seems to be to reboot. (I won't mention the work I have just lost":-( )

Does anyone have any idea what's going on here, bearing in mind that AFAIK the power managers are configured NOT to lock sessions and not to power down on idle?

Thanks

  • 1
    OK, seemed to have found a solution to my immediate problem; another thread elsewhere steered me to "Light Locker Setting", which did not appear on any of my desktop menus. I ran it from /usr/bin/light-locker-settings. Setting everything to "never" or no seems to have stopped the session lock. This leaves the question of why the unlock sequence itself failed by going back to the unlock dialog. A bug? – user215199 Dec 07 '14 at 23:52
  • same issue here, on a clean xubuntu 14.04, fully updated as of 19 october, 2015 z.z – hanshenrik Oct 20 '15 at 01:53
  • Same problem on fresh install of Debian testing – hochl Feb 16 '17 at 12:56

6 Answers6

68

I do not have the answer to your bug, actually I experience the same thing, but I found here a way to recover the situation without reboot the machine/lightdm.

In your tty1 (Ctrl+Alt+F1), as root, type loginctl unlock-session [id], where [id] is the session id you get by typing loginctl list-sessions.

If it doesn't work with the first ID, try with the other session IDs of your user account.

abu_bua
  • 10,783
JBENOIT
  • 781
  • 1
    Fantastic! Accidentally locked my session while upgrading Ubuntu. I wasn't sure where the upgrade process was up to. Was able to unlock and recover successfully. – Aries Feb 08 '18 at 01:52
  • 3
    I was able to do this as non-root, presumably because I was unlocking my own session. – Clement Cherlin Apr 30 '18 at 23:09
  • loginctl unlock-sessions failed due to incorrect permissions on polkit-agent-helper-1 during my kubuntu 17.10 -> 18.04 upgrade (used to always work whenever the screen locker suggested it during upgrades or similar). The list-sessions and unlock-session [id] trick saved me. Thanks! :) – KIAaze May 13 '18 at 12:10
  • 2
    Saved my Day... – Paflow Sep 27 '18 at 08:47
  • Saved me too on my Mac screensharing client. – Sridhar Sarnobat Jul 14 '22 at 23:08
  • This only works if the system has been booted with systemcd as init system. Not the case of some distros like MX Linux. – msoutopico Aug 19 '22 at 07:40
14

I am not able to add comment. here are some words on Ubuntu. I boot Ubuntu 16.04.1 without login, then I close the lid for going out, and when I am back, reopen the notebook, not able to unlock (light display manager is shown on up-right corner, only password to enter, no user name)

Ctrl+Alt+F1 brings tty1, login my account, then

sudo -i loginctl list-sessions
sudo -i loginctl unlock-session id

As in https://askubuntu.com/a/611611/485005, "If it doesn't work with the first ID, try with the other session IDs"

abu_bua
  • 10,783
Chen Deng-Ta
  • 397
  • 4
  • 11
  • 1
    This is constant source of irritation to me. I usually reboot but will try this now. – dibs Aug 08 '16 at 02:54
  • 4
    as the locked session is of the same user it is not necessary to use sudo in this case. – logoff Mar 11 '18 at 15:02
  • Even simpler: Ctrl+Alt+F1, login, then: killall light-locker. That makes it go away and stay away, at least until you reboot. – Alcamtar Nov 16 '18 at 01:19
  • 5
    No need to find the correct session id, sudo loginctl unlock-sessions will unlock your session. – Jade Jan 17 '19 at 19:17
4

I think you can simply disable and change the default screensaver locker anyway. Firstly disable light-locker at [LightDM/Xfce] Power Management Preferences followed by:

$ sudo apt-get update && sudo apt-get install xscreensaver && sudo apt-get remove light-locker

then after reboot (restart X) I got the xscreensaver as default screen locker manager.

Alex.O
  • 41
4

This worked for me:

sudo service lightdm restart 
  • Actually it looks like it's an issue with Nouveau, and with Nvidia proprietary binary drivers. If your video cards are nVidia, blame nvidia. They suck. Restarting lightdm solves the issue but it appears to be an nvidia/nouveau dpmi glitch that causes this. – Warren P Oct 25 '18 at 17:39
  • This killed my session. Not ideal. – TastyWheat Aug 28 '21 at 01:20
2

I had similar issues getting stuck on "You'll be redirected to the unlock dialog in a few seconds" screen in xubuntu 16.04.4 after booting up from a suspended session.

The solve for me is to press Ctrl+Alt+F7

I sometimes have to repeat the above command, but eventually it will allow me to login normally.

abu_bua
  • 10,783
Tony
  • 36
2

Ctrl + Alt + Backspace (pressed twice) will reset the X and kill/close everything you have open on current Desktop session.

On a new log in, please check you screen saver settings and disable lock screen.

Paul afk
  • 111