Stop screen from locking when laptop lid is closed

5

In Ubuntu 12.04, how can I keep the screen from locking when I close my laptop? I know I can disable locking altogether, but I do want the screen to lock when inactive. And I want it to lock when I suspend. I just don't want it to lock when I close the lid of the laptop.

Do I really have to be the person who sits in a meeting with their laptop lid almost closed?

Julian

Posted 2013-03-20T21:44:44.760

Reputation: 341

Is this not a setting under "Power" in your System Settings? – James T Snell – 2013-03-20T22:46:58.570

You bring your laptop to meetings? – G Koe – 2013-03-22T05:07:50.873

Answers

4

Here's the workaround from Ubuntu 12.04

Check /etc/acpi/lid.sh and delete the lines that involve xscreensaver

There is a known gnome powercfg bug in regard to this.

Specific status for this bug #995840 for Ubuntu 12.04 and 12.10 is listed here under

"When laptop lid is closed screen locks even if it should not."

Current Status is "Confirmed" but the bug is "unassigned"

G Koe

Posted 2013-03-20T21:44:44.760

Reputation: 4 333

I think this must have worked at one point - I see where I commented out "/usr/share/acpi-support/screenblank" but my system is still blanking - still on 12.04. There's a big section below that line that seems to relate to un-blanking when the lid is re-opened, which I didn't change and which doesn't seem to have any effect when I comment it. Here's my complete lid.sh: http://pastebin.com/XQPBxPsE

– Julian – 2014-03-10T20:39:25.017

I'll check it out! – G Koe – 2014-03-10T21:10:08.077

Is you system completely up to date? Are you using Intel graphics? Do you always get the lock screen when you resume? There was a similar bug reported here: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/966744 that is finally resolved in regard to a hang on resume, but includes updates to lid.sh.

– G Koe – 2014-03-10T21:17:19.603