Dear Xubuntu community,

Sorry for a long question but I spent some time trying to debug the issue. I want to comprehensively present actions I tried, and would also like to receive a canonical answer solving the problem.

I am Ubuntu/Xubuntu user for a couple of years already. I use Xubuntu on small low-spec machine. I am well satisfied, but it happens it cause a little bit more troubles than Ubuntu on the other machine.
I am now on 18.04 (freshly installed) but the same problem happened to me before on 14.04. I solved it by installing xscreenserver, this time it didn't help.

The problem is that when my laptop goes into lock screen (or maybe suspend but I always disable that in power management options so it shouldn't), then it is quite common that I am not able to login back to it. Screen stays black after opening lid and pressing a button.

Sometimes I just type my password in the black screen, hit enter, and it works, I am back, but it is not the rule. Definitely not the way to go, as I cannot be sure where I am exactly typing my password into.
When the problem happened I spent quite a lot of time going into tty1 and using lynx to find a way to at least save my current work that I had open in tty7 session. sudo -i loginctl unlock-sessions worked but not always. Still not a way to go...

Let me define expected behaviour I trying to achieve.

When I am closing the lid I would like to have my session locked and display switched off. When I open my lid (or eventually press a button too) I would like to see greeter so I can unlock my session. Locking screen should also work from a menu option, and then closing the lid should just switch off display. This is I believe the default I have on my Ubuntu.

I read about double locked screen and some other issues, it is pretty complex to understand what is actually happenning. From my current understand it is likely to be an issue of configuration for systemd-logind, lightdm, light-locker and xfce4-power-manager.

Tried to couple of things:

  • xfce4-power-manager

Laptop lid: "Lock screen" and "Switch off display"

  • systemd/logind
sudo vim /etc/systemd/logind.conf
#set: HandleLidSwitch=lock
  • lightdm-settings
sudo apt slick-greeter lightdm-settings
sudo lightdm-settings
  • light-locker-settings
sudo apt python-gi light-locker-settings
sudo light-locker-settings
  • xscreenserver

I uninstalled xscreenserver because it didn't worked and I actually don't need an screen saver app, but a proper configuration of lock screen and greeter.

To understand and debug things I need to know how to check which locker app am I using? light-locker, xflock, something else? I don't want to hear what is the default one in my distro version, but how to check that, so answer will be useful in future releases. How to access logs of that app.

Similarly, which greeter app am I using? and how to access its logs.

Most importantly... How to achieve expected behaviour of lid close + lock screen + display switch off?

Thank you

  • Before I write up a possible answer to what might be happening. I just want to make sure you are not using root as your main account. You could try xdg-screensaver lock to see if you get a proper lock and xdg-screensaver activate to see if a screensaver activates (it won't if root, and your screensaver is gnome-screensaver)
    – NetIceGear
    Dec 2, 2019 at 12:57
  • I am not on root, but another account that is in sudoers. Your command did lock the screen, then I went to tty2 and run activate, then back to tty7 and after a moment I got unlock screen.
    – jangorecki
    Dec 3, 2019 at 4:41
  • Ok. Perfect! (Well perfect because this little experiment performed exactly as expected, and as such the answer is forthcoming). I do have a few questions/remarks with regards to your "desired behavior" 1. When closing the lid in the middle of a typical running session, I assume the more important and more desired effect is the lock (In other words: establish lock, then turn off display) 2. when later attempting to restore your session, are you adamant about having the lid-open condition be one of the triggers for turning the display back on (instead of requiring both lid-open and key press)
    – NetIceGear
    Dec 3, 2019 at 18:16
  • @BarBar1234 re 2. any will do, I am interested in getting back the control of the laptop, extra key press is not a problem
    – jangorecki
    Dec 4, 2019 at 2:38
  • 1
    Ok, last couple of generic questions and then I'll create a pastebin link with a series of command that will create logs with the necessary info for the fix. Question: What happens when you leave your laptop with its lid open, in an idle state for lets say a few hours? Do you perhaps get a situation with display shutting off and then becoming unresponsive (either frozen for good or requiring loginctl unlock-sessions from another tty) if not woken up with the mouse or key press within a short time of the screen going dark? Finally (own research) is this a Lenovo laptop or uses Intel7620 wifi?
    – NetIceGear
    Dec 4, 2019 at 4:43

1 Answer 1


The issue is due to lightlocker and XFCE no longer playing well.

I was able to fix this issue by upgrading to XFCE 4.14 from the Xubuntu staging PPA, removing light-locker and installing xfce4-screensaver. Please note I did this from a clean install of 18.04.3, so you might need to restore any changed settings.

sudo add-apt-repository ppa:xubuntu-dev/staging
sudo apt update
sudo apt upgrade
sudo apt remove light-locker 
sudo apt install xfce4-screensaver
  • 1
    any idea if this is going to be shipped to the masses as 18.04.4 or so?
    – jangorecki
    Dec 5, 2019 at 2:58
  • Had a similar problem on Xubuntu 23.04, adding the repo, updating and upgrading was enough to solve it Sep 22, 2023 at 9:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .