You are not logged in.

#1 2012-03-10 13:31:04

rggjan
Member
Registered: 2007-01-06
Posts: 69

Suspend when closing lid *even if* external monitor attached?

I'm using gnome3, without any special (acpi or similar) configuration.

When closing the lid of my laptop, it usually suspends. However, when an external monitor is attached, closing the lid only makes the laptop-screen blank, and leaves it running.

Does anyone know how to change this behaviour, so that it always suspends when I close the lid?

What program does actually do the suspending? Is it the gnome-power-manager?

Cheers
Jan

Offline

#2 2012-03-10 15:29:39

quasifilmie
Member
Registered: 2011-10-27
Posts: 296

Re: Suspend when closing lid *even if* external monitor attached?

The easiest way is to install gnome-tweak-tool, click shell and change the close laptop lid action in there.

Offline

#3 2012-03-10 15:33:49

jaco
Member
From: Toulouse, France
Registered: 2011-03-17
Posts: 149

Re: Suspend when closing lid *even if* external monitor attached?

gnome-tweak-tool is totally useless in this case...

Offline

#4 2012-03-10 15:38:30

quasifilmie
Member
Registered: 2011-10-27
Posts: 296

Re: Suspend when closing lid *even if* external monitor attached?

@jaco I had a very similar problem to rggjan's and so gnome-tweak-tool would probably be very useful.

Offline

#5 2012-03-10 15:53:19

jaco
Member
From: Toulouse, France
Registered: 2011-03-17
Posts: 149

Re: Suspend when closing lid *even if* external monitor attached?

For my own, on my two laptops (a HP Probook and a Thinkpad), lid closing is configured with "suspend" in Gnome-Tweak-Tool and, yes, lid closing suspends the laptop.... unless there's a external monitor attached (which is the problem of the OP).

Offline

#6 2012-03-10 15:55:59

quasifilmie
Member
Registered: 2011-10-27
Posts: 296

Re: Suspend when closing lid *even if* external monitor attached?

If I have my laptop connected to my tv via hdmi and I close the lid, my computer suspends and I set this up with gnome-tweak-tool.

Offline

#7 2012-03-10 16:00:56

rggjan
Member
Registered: 2007-01-06
Posts: 69

Re: Suspend when closing lid *even if* external monitor attached?

Doesn't work for me, either. "Laptop lid close action on battery" and "Laptop lid close action on AC" are both set to "suspend" in the gnome-tweak-tool, but it still does not suspend when I close the lid with an external (vga) monitor attached.

@quasifilmie: Did you set any other settings in the gnome-tweak-tool?

Offline

#8 2012-03-10 16:19:36

quasifilmie
Member
Registered: 2011-10-27
Posts: 296

Re: Suspend when closing lid *even if* external monitor attached?

No I didn't but this may help you. https://wiki.archlinux.org/index.php/Laptop_Mode_Tools

Offline

#9 2012-03-10 16:35:42

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: Suspend when closing lid *even if* external monitor attached?

You could put an "xrandr --output VGA1 --off" in /etc/acpi/handler.sh "button/lid" "close" event (VGA1, or whatever your external monitor). So for example I force my laptop to lock and suspend thus:

button/lid)
       	case "$3" in
	    close)
		#echo "LID closed!">/dev/tty5
		DISPLAY=:0.0 su paul -c "/usr/bin/slock&"
		sleep 4
		pm-suspend
		;;
	    open)
		#echo "LID opened!">/dev/tty5
        	;;	

Offline

#10 2012-03-12 19:43:34

rggjan
Member
Registered: 2007-01-06
Posts: 69

Re: Suspend when closing lid *even if* external monitor attached?

vacant wrote:

You could put an "xrandr --output VGA1 --off" in /etc/acpi/handler.sh "button/lid" "close" event (VGA1, or whatever your external monitor). So for example I force my laptop to lock and suspend thus:

Hmm... doesn't that interfere with the gnome power management somehow?

Offline

Board footer

Powered by FluxBB