Ubuntu

No GUI method to disable screen lock on lid close event

Reported by Michael Chesterton on 2004-11-26
72
This bug affects 9 people
Affects Status Importance Assigned to Milestone
gnome-power-manager (Ubuntu)
Low
Unassigned

Bug Description

When I close my laptop lid, and open it again, the screensaver is locked. I'd
like to change this behaviour, I've checked the screensaver preferences and the
only option that mentions locking the screen ("Lock screen after") is unset. I
think it makes more sense to lock the screen on lid close dependant on the
setting of "Lock screen after" option in screensaver preferences
This is on a recently updated hoary, xscreensaver version 4.16-1ubuntu3.

Matt Zimmerman (mdz) wrote :

This falls under the heading of cleanup/unification of the power management
event infrastructure, which Daniel is working on.

Created an attachment (id=5452)
Patch to fix this bug

This problem can be easily solved by having /usr/share/acpi-support/screenblank
run 'xscreensaver-command -activate' as the logged-in user, instead of
'xscreensaver-command -lock' as it does now. With -activate, the locking
behavior will depend on the user's preference as expressed in ~/.xscreensaver.
If the user doesn't have a ~/.xscreensaver, the default behavior will be taken
from /etc/X11/app-defaults/XScreenSaver.

The modified behavior would better satisfy the principle of least astonishment
from the user's perspective.

Florian Boucault (fboucault) wrote :

It would be great if this patch could be commited to acpi-support !

Daniel Stone (daniels) on 2006-03-10
Changed in acpi-support:
assignee: daniels → nobody
Vladimír Lapáček (vil) wrote :

Using latest Dapper I still get the mentioned behaviour. I don't believe that the propsed patch would work anymore because Dapper now uses gnome-screensaver per default.

andreas99 (linux-brachttal) wrote :

There's still no solution for this. This drives me crazy, because I close my laptop often and need to type the password everytime. All hacks in apcid configuration didn't help. Then I tried to remove the gnome-screensaver package, but this isn't possible because ubuntu-desktop needs it. Now I moved gnome-screensaver and gnome-screensaver-command away. Dirty hack, but I'm happy. Please find a solution for this old problem.

Matthew Garrett (mjg59) wrote :

Either disable "lock screen when screensaver is active", or set the lid close action to "Do nothing"

Changed in acpi-support:
status: Confirmed → Fix Released

I have disabled "lock screen when screensaver is active" but still I
get lock after resume from suspend.

"Do nothing" is not an option for me, because I want to suspend the
laptop, when I close the lid. There really should be an option for
disabling the lock when resuming from suspend.

Massimo Dal Zotto (dz) wrote :

I have finally solved this problem on my laptop with Ubuntu 7.04.

This bug is not related to acpi-support but to gnome-power-manager.

The problem is that the suspend event and the screen lock are handled by gnome-power-manager daemon, which intercepts the suspend button event, activates the gnome-screensaver accordingly to the gnome-power-manager settings and then calls the acpi suspend script which does all the rest.

To disable the screen lock on suspend you must open a gconf-editor and disable the following options:

  /apps/gnome-power-manager/lock_on_hibernate = false
  /apps/gnome-power-manager/lock_on_suspend = false
  /apps/gnome-power-manager/lock_on_blank_screen = false

However with this settings when you press the suspend butto you get no screensaver at all and therefore no visible feedback until the laptop is switched off. I solved this second problem by creating a /etc/acpi/suspend.d/06-gnome-screensaver.sh script which starts the gnome-screensaver at the beginning of the sleep sequence. Now I have screensaver on suspend but no screen lock dialog on resume.

It would be nice if gnome-power-manager would rename the current lock_on_* options to screensaver_on_* and add a new lock_screen option to decide if locking the screen or simply activating a screensaver.

Massimo Dal Zotto (dz) wrote :

This suggestion is useless since the gnome-screensaver is activated by gnome-power-manager and not by acpi.

Changed in acpi-support:
status: Fix Released → Incomplete
Changed in gnome-power-manager:
status: Incomplete → Confirmed
Robert Nasiadek (robzon) wrote :

+1 for this bug. It's extremely annoying.

Ted Gould (ted) wrote :

I'm a touch confused. So does setting:

/apps/gnome-power-manager/lock/suspend

to 'false' create the desired behavior? So then is the bug that there is no GUI way to set this value?

Zach (uid000) wrote :

I was able to accomplish the behavior by setting values in gconf-editor as you described above (I'm not sure if it was that exact key or another). This does serve as a useful workaround. However, the title of this bug is "No GUI method to disable screen lock..." so yes the bug is that there is no GUI way to set this.

On Thu, Mar 13, 2008 at 12:56:19AM -0000, Ted Gould wrote:
> I'm a touch confused. So does setting:
>
> /apps/gnome-power-manager/lock/suspend
>
> to 'false' create the desired behavior? So then is the bug that there
> is no GUI way to set this value?
>
> --
> No GUI method to disable screen lock on lid close event
> https://bugs.launchpad.net/bugs/10686
> You received this bug notification because you are a direct subscriber
> of the bug.
>

No, in my opinion this is not the desired behavior.

Setting /apps/gnome-power-manager/lock/suspend to 'false' could be used
to disable the screen lock on suspend but in this way I dont't get any
immediate feedback when I press the suspend button. What I want is
screensaver instead of screenlock.

The best way to handle this issue is to have an user configurable option
to decide if suspend should lock the screen or simply activate the
screensaver. This option could also be handled by the power-manager
preferences GUI but this is another issue.

--
massimo

On Thu, 2008-03-13 at 16:16 +0000, Massimo Dal Zotto wrote:
> Setting /apps/gnome-power-manager/lock/suspend to 'false' could be used
> to disable the screen lock on suspend but in this way I dont't get any
> immediate feedback when I press the suspend button. What I want is
> screensaver instead of screenlock.

Maybe I'm missing the point here, but if your computer is suspending
that typically means that you can't see the screensaver?

On Fri, Mar 14, 2008 at 06:25:31AM -0000, Ted Gould wrote:
> On Thu, 2008-03-13 at 16:16 +0000, Massimo Dal Zotto wrote:
> > Setting /apps/gnome-power-manager/lock/suspend to 'false' could be used
> > to disable the screen lock on suspend but in this way I dont't get any
> > immediate feedback when I press the suspend button. What I want is
> > screensaver instead of screenlock.
>
> Maybe I'm missing the point here, but if your computer is suspending
> that typically means that you can't see the screensaver?
>
> --
> No GUI method to disable screen lock on lid close event
> https://bugs.launchpad.net/bugs/10686
> You received this bug notification because you are a direct subscriber
> of the bug.
>

I can see the screensaver in the interval between the Suspend button and
the end of the suspend process. This is very important for me because I
can see that the suspend command has been accepted and a suspend is
in progress. If I disable the screenlock I press the button and have
no idea if it is suspending or not until the laptop is switched off.

On the other hand since my laptop is password protected I don't want
to type a second password to unlock the screen after resume.

--
massimo

On Fri, 2008-03-14 at 09:31 +0000, Massimo Dal Zotto wrote:
> I can see the screensaver in the interval between the Suspend button and
> the end of the suspend process. This is very important for me because I
> can see that the suspend command has been accepted and a suspend is
> in progress. If I disable the screenlock I press the button and have
> no idea if it is suspending or not until the laptop is switched off.

I'm sorry, I just don't see that use case. I agree that feedback is
important, but the screensaver is not the answer. Something like the
screen dimming similar to logout would make sense to me.

On Fri, Mar 14, 2008 at 08:47:12PM -0000, Ted Gould wrote:
> On Fri, 2008-03-14 at 09:31 +0000, Massimo Dal Zotto wrote:
> > I can see the screensaver in the interval between the Suspend button and
> > the end of the suspend process. This is very important for me because I
> > can see that the suspend command has been accepted and a suspend is
> > in progress. If I disable the screenlock I press the button and have
> > no idea if it is suspending or not until the laptop is switched off.
>
> I'm sorry, I just don't see that use case. I agree that feedback is
> important, but the screensaver is not the answer. Something like the
> screen dimming similar to logout would make sense to me.
>

That would be fine. Screensaver or screen dimming would do the same
as long as I can have feedback and avoid the screenlock.

--
massimo

Zach (uid000) wrote :

I think this has been made more complicated than necessary. I think the problem is this (at least it was for me when i submitted aduplicate of this bug):

A user closes his laptop and when he opens it again he has to unlock it with his password (regardless of whether suspend was used or not). He thinks "gosh this is obnoxious. How the heck do I stop the screen locking whenever I close the lid?" And then after exploring around a bit, (1) he realizes that disabling screen lock in screensaver preferences doesn't do the trick, and (2) in power management preferences there are options for what to do when the lid closes, but none of them are related to screen locking.

It would be nice if somewhere there was an option that says "when i close the lid don't lock the screen." Whether to activate the screensaver or go straight to suspend is not really the issue, because the power management prefs already let you choose from blank screen, suspend, hibernate, or nothing.

Still no GUI method on ubuntu 9.10 to disable screen lock after suspend - since 5 years!

But setting in gconf-editor '/apps/gnome-power-manager/lock/suspend' to 'false' still works.

Massimo Dal Zotto (dz) wrote :

Still no GUI method, but at least we have an option to tell Power Manager to use the Screensaver preferences when the computer is suspended. With these settings

  /apps/gnome-power-manager/lock/use_screensaver_settings = true
  /apps/gnome-screensaver/lock_enabled = false

I get the correct behavior.

Andrew Somerville (andy16666) wrote :

I have have this problem with every Ubuntu since 8.04. Still just as annoying on 9.10.

Using gconf-editor as described in #19 worked. Still think there should be GUI for this in the gnome-power-preferences dialog.

Amos Blanton (lightnin9) wrote :

Please consider adding gui controls for this in the next release. Thanks!

gideon07 (ashcrafi) wrote :

The suggestion in #20 works on my laptop, but not on either of my desktops. The screen is always locked on resume. Executing pm-suspend from the command-line directly provides the correct behavior, not locking the screen on resume. However, this is not an acceptable solution.

gideon07 (ashcrafi) wrote :

So I have narrowed it down. When I suspend through the indicator-applet-session, It locks the screen on resume. If I use the generic Gnome Shut Down applet, it does not lock the screen on resume.

Andrew Somerville (andy16666) wrote :

@gideon07 Yes...you are right. When I go to the user menu to suspend, it locks the screen on resume. But when I use the power button which is configured to suspend, it respects the setting in gconf-editor in #19.

vdbergh (michel-vandenbergh) wrote :

I have the same behaviour as andy16666. Lid close behaves correctly (no password) but after resuming from suspend via the menu in the right corner of the screen a password is needed.

This is Ubuntu 9.10 on 64bit core duo.

AmenophisIII (amenophisiii) wrote :

the problem with indicator-applet (not respecting powermanager's lock settings) is dealt with in bug 255228

David Stansby (dstansby) on 2010-07-19
tags: added: patch

Thank you for reporting this bug.

Does this issue occur in Lucid?

Changed in gnome-power-manager (Ubuntu):
status: Confirmed → Incomplete
Håvard Berland (berland) wrote :

I have tested on a freshly updated Lucid laptop. Closing the lid makes the machine suspend, and subsequently opening the lid, the machine resumes from suspend and no password has to be typed. Excellent.

Andrew Somerville (andy16666) wrote :

Yes, it does still occur in Lucid. When selecting suspend from the menu, it still prompts as always.

 in Maverick went into System -> Preferences Screensaver, and into System -> Power Management and could not find the option to do what the bug requester suggested. Marking as confirmed & seems we should mark as a wishlist?

Changed in gnome-power-manager (Ubuntu):
status: Incomplete → Confirmed
Havoc Pennington (hp-litl) wrote :

There seems to be an option in gnome-power-manager gconf now for "use screensaver setting" - maybe it's as simple as changing to that by default. I definitely expected the screensaver setting to completely remove all screen locking, and when it didn't that was surprising.

Felix (apoapo) wrote :

Is it still around? I seem to suffer from it. thread start was 2006..

Dick Grayson (seanm1) wrote :

Started in '04 actually.

It's the lamest and hackiest solution imaginable, but in addition to the solution given in #20, if xscreensaver starts asking you for a password once you apply that solution and gnome stops bugging you for it, you can do this as root:

mv /usr/bin/xscreensaver-command{,-real}
cat > /usr/bin/xscreensaver-command << "EOF"
#!/bin/bash

if [ "${1}" == "-lock" ]; then /usr/bin/xscreensaver-command-real -activate; else /usr/bin/xscreensaver-command-real $@; fi
EOF
chmod +x /usr/bin/xscreensaver-command

This "solution" does have the added benefit of turning your screensaver on when you go to suspend for visual confirmation, which someone mentioned wanting years ago. You'll notice "solution" is in quotes for a good reason; this breaks functionality. If you ever want to lock your screen after this, you'll need to call xscreensaver-command-real -lock.

Matthew Paul Thomas (mpt) wrote :

Either this bug report, or bug 871047, is fixed/invalid. This bug says that screen lock on lid close is compulsory, while bug 871047 says that it's not even possible.

I have this problem with a new install of 11.10

Others with same problem and solution here: http://askubuntu.com/questions/66870/how-to-disable-password-on-hibernate-suspend

Quantal has a way to disable the screen lock: Settings → Brightness and Lock → Lock: Off.
Probably it is possible in Precise too, though I can't check.

Changed in gnome-power-manager (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.