Waking my laptop up from hibernate doesn't (it should) need a password, but it does when waking up from a locked state.

I hibernate my machine (Ubuntu 15.10) by command

sudo pm-hibernate

And when I turn on the machine, select Ubuntu (from multiple boot options), it straight away brings me to the screen I saw the last. No authentication check is done. This ofcourse eases my work but also makes me worry about security and privacy.

Strange thing is that, it always asks for password when system wakes up from a lock (manual or auto-timed out due to inactivity). I have lock enabled in the Brightness & Lock settings, with 5 mins screen timeout and Lock screen after: value is 'Screen turns off`.

Why doesn't my machine ask for authentication on waking up from hibernated state?

I guess pm-hibernate command uses settings different than those I see above (the default system settings). What am I missing here?

NOTE: I first asked this on 'askubuntu' stack exchange site, but they closed the question saying that version 15.10 is no longer supported. I don't really think it's related to the OS version, but they follow rules, while I believed askubuntu is more than an official support. Thanks!

2 Answers 2


The locking is done by the xscreensaver, so you are right, that it's another system.

If you want to have your system locked before going into hibernate mode, you could create a script where you call xscreensaver-command -lock before running pm-hibernate.

  • Thanks, I am at office and my machine is at home. I'll try your solution and update here.
    – 0xc0de
    Commented Nov 28, 2016 at 9:12
  • I do not have xscreensaver-command installed on my machine. Trying in the same direction, I checked value of org.gnome.desktop.screensaver ubuntu-lock-on-suspend using gsetting which was set. I've also tried with `systemctl hibernate' but still the same behavior.
    – 0xc0de
    Commented Dec 1, 2016 at 17:57
  • /usr/bin/xscreensaver-command should be installed if you have xscreensaver installed (the general screensaver package working the same on any desktop). But perhaps the best way would be to install hibernate (a general wrapper around several hibernation packages) and have a look in /etc/hibernate/common.conf which suggests several methods for locking the screen on hibernating.
    – Jaleks
    Commented Dec 1, 2016 at 20:38

Just spent some time researching on this, trying various approaches:

  • Tweaking /etc/hibernate/common.conf and trying to teach /usr/share/hibernate/scriptlets.d/lock to use mate-screensaver-command instead of x, gnome and the other flavours (which requires more understanding of the hibernate & pm-utils scripts than I have)
  • Adding a systemd service to call mate-screensaver -l before sleeping (which wouldn't work without hassle since it requires detailed information about the environment to lock)

The solution that finally succeeded was the one stated by oz123 here: Install the xss-lock package and add

xss-lock -- mate-screensaver-command --lock

to the startup applications. This seems a bit odd, but at least it solves the issue in a rather easy way.

Hope the answer to this old (but alas, still current) question saves some time for someone.

You must log in to answer this question.

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