I had this same issue with Karmic. It seems gnome-power-manager gets confused when the laptop lid is closed and an external monitor is used instead as the primary display. I wrote a script to set the monitor to standby and I run it in System,Preferences,Startup Applications.
$ cat poweroffexternalmonitor.pl
#!/usr/bin/perl
#
# Workaround to put external monitor to standby.
# gnome-power-manager seems to get confused when the laptop lid is closed
# and an external monitor is used instead as the primary display
#
# Works with Ubuntu Karmic Koala 9.10 and later
# Change 'ActiveChanged' to 'SessionIdleChanged' for earlier Ubuntu versions
#
# @author pchung
#
my $cmd = "dbus-monitor --session \"type='signal',interface='org.gnome.ScreenSaver', member='ActiveChanged'\"";
open (IN, "$cmd |");
while (<IN>) {
if (m/^\s+boolean true/) {
system("xset dpms force standby");
}
}
I had this same issue with Karmic. It seems gnome-power-manager gets confused when the laptop lid is closed and an external monitor is used instead as the primary display. I wrote a script to set the monitor to standby and I run it in System, Preferences, Startup Applications.
$ cat poweroffexterna lmonitor. pl
#!/usr/bin/perl nged' for earlier Ubuntu versions 'signal' ,interface= 'org.gnome. ScreenSaver' , member= 'ActiveChanged' \"";
#
# Workaround to put external monitor to standby.
# gnome-power-manager seems to get confused when the laptop lid is closed
# and an external monitor is used instead as the primary display
#
# Works with Ubuntu Karmic Koala 9.10 and later
# Change 'ActiveChanged' to 'SessionIdleCha
#
# @author pchung
#
my $cmd = "dbus-monitor --session \"type=
open (IN, "$cmd |");
while (<IN>) {
if (m/^\s+boolean true/) {
system("xset dpms force standby");
}
}