10

One thing I like for MacBooks is that they are usable within a second after opening their lid when they were on stand by.

Ubuntu always requires me to enter my password when I resume from suspend, which can be very annoying.
How can I disable this?

Related bugs
It turns out that this really is undesired behavior, and there are several bugs related to this issue.
Bug #553646 on launchpad
Bug #643036 on GNOME bugzilla

Ingo
  • 6,288

6 Answers6

7

Start gconf-editor (press ALT-F2, then type gconf-editor).

Seach down to Apps/gnome-power-manager, then click on "lock".

You have two choices : either untick "suspend", or tick "use_screensaver_settings" (of course, you'd then have to go to screensaver preferences and remove the "lock screen" option.

alt text

And :

alt text

Scaine
  • 11,139
  • Thank you, this would be be the perfect answer! If only it would work :(. I have tried both options and neither of them works. Proof: http://imgur.com/w4KVj&Sl385l I would report a bug but I'm not registered on the Gnome bug tracker. – Ingo Jan 22 '11 at 12:24
  • Note that "suspend" and "hibernate" options are ignored if "screensaver" is ticked. Try playing with the values and see what happens. Certainly worked for me, so perhaps a hardware issue? – Scaine Jan 22 '11 at 13:08
  • Doesn't work for me either :\ (tested it on three different machines) – Stefano Palazzo Jan 22 '11 at 13:40
  • This works for me (so far) on : Dell Vostro V13, Toshiba U400, Dell Inspiron, couple of home-built PCs, Acer Revo Ion and a few friends laptops I've built - mostly Toshiba's and Dell's who's models I forget. I can't understand why this isn't working for people. – Scaine Jan 22 '11 at 13:56
  • I login manually with unsafe storage and a home-encrypted install, but otherwise largely stock install - 32-bit Ubuntu Desktop edition. – Scaine Jan 22 '11 at 13:57
  • 1
    Yes it is really weired. This bug on launchpad might relate to it https://bugs.launchpad.net/gnome-power/+bug/553646. I am marking the question as answered as it is indeed the correct procedure, although it might not work on some machines. – Ingo Feb 06 '11 at 14:22
  • I am using oneiric, and there is no such key in gconf. Any hint? Should I ask a new question? – eudoxos Oct 21 '11 at 17:00
  • Oneiric moved quite a lot of settings to Dconf instead of Gconf. I think you need to sudo apt-get install dconf-tools, then run dconf-editor to see if the values are in there. I'm still running Natty, so can't help here. – Scaine Oct 22 '11 at 13:05
  • Actually, it seems that turning off screen lock in the screensaver preferences affects the suspend/resume too. I'll try to confirm this later on using one of my Oneiric laptops, none of which are handy at the moment. – Scaine Oct 22 '11 at 13:20
6

This will disable the locking, altogether, so you won't be able to lock the screen even if you wish to, but if you don't care, just enter these commands. The first commands just gets your current setting, which is likely false:

gsettings get org.gnome.desktop.lockdown disable-lock-screen
gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'

regards,

Elijah Lynn
  • 3,828
Dirk B.
  • 283
2

As mentioned in the comments, the solution mentioned above doens't work for Ubuntu 11.10. Please see How do I stop the screen from being locked on suspend? to 'fix' the issue on 11.10.

iGadget
  • 873
1

Here is a solution for Ubuntu / Lubuntu / Xubuntu 18.10.

First let's switch away from light-locker and xscreensaver to the default gnome-screensaver as used in Ubuntu:

sudo apt remove light-locker
sudo apt remove xscreensaver xscreensaver-data
sudo apt install gnome-screensaver

Now for gnome-screensaver, there is a nice setting to disable lock on suspend that is permanently configured this way:

gsettings set org.gnome.desktop.screensaver ubuntu-lock-on-suspend false

To see the other possible settings for gnome-screensaver:

gsettings list-keys org.gnome.desktop.screensaver

Finally, log out from the X11 session and log in again to make the changes effective. The computer will now be usable within a second after resuming from suspend. Great to save energy in my off-grid home in winter :-)

tanius
  • 6,303
  • 1
  • 39
  • 49
0

I wanted to shut down monitor ("lock") and come back without asking for password.

Im using Ubuntu 18.04. After I tired every related settings:

  • gnome-control-center
    • users
    • power
    • privacy
  • dconf-editor
    • disable-lock-screen
    • ubuntu-lock-on-suspend
    • /org/gnome/desktop/screensaver/

I ended up crating a new hotkey (lets say Super+K) that runs this command:

gnome-screensaver-command -a

which "activates the screensaver" in my case it is blank and turns off the monitor.

So I can decide whether I would like to activate basic or password protected lock.

Note Super+L activates lock by default:

gnome-screensaver-command -l
0

There is more work to do, beyond unticking “use screensaver settings”.

See Advanced preferences for GNOME Power Manager