Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm running Ubuntu 12.10 on my ThinkPad T500 with an extra monitor.

$ uname -a
Linux emre-laptop 3.5.0-25-generic #38-Ubuntu SMP Mon Feb 18 23:28:26 UTC 2013 i686 i686 i686 GNU/Linux

The pm-suspend command works perfectly from the command line, Fn+F4 (usual sleep key combination) works fine, and clicking 'Suspend' from the GUI works without any problems:

Suspend works fine when invoked from GUI

I have also checked my settings, they seem to be fine:

Suspend settings

But the suspend functionality doesn't work when the laptop is closed. When I close the lid the external monitor goes blank, but the laptop does not go into sleep mode. When I open the lid I have a blank screen both on the laptop and the external monitor.

I have tried the workaround given at https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/863834 and created a file:

$ ls -l /etc/acpi/local/lid.post.sh 
-rwxr-xr-x 1 root root 696 Feb 26 20:31 /etc/acpi/local/lid.post.sh

The contents of the file:

#!/bin/bash
grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
/usr/sbin/pm-suspend
fi

Any suggestions or workarounds?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Well, apparently one needs to be more careful with filenames! In my case, I have inadvertently created the wrong file: /etc/acpi/local/lid.post.sh whereas the correct filename should have been:

/etc/acpi/local/lid.sh.post

as was described correctly in the workaround. Renaming the file correctly solved the suspending problem.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.