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.

In the power management, I selected the option called "suspend when I close the lid". If I close the lid, the computer is not suspending. It keep itself on. How can I solve this problem? Thanks for the help

share|improve this question
1  
Suspend problems are usually hardware related. Please give us some data on your computer. –  Javier Rivera Aug 17 '10 at 6:40
    
Note that suspend does not turn off the computer. It just puts itself into a lower power mode. Could you describe everything that happens when you click suspend from the shut down/log off/etc menu? –  dv3500ea Aug 17 '10 at 9:28
    
File a bug: ubuntu-bug –  maco Aug 17 '10 at 13:03
    
@Karthick, did you ever get this solved? Please update (or delete?) your question. –  Torben Gundtofte-Bruun Feb 18 '11 at 7:16
add comment

2 Answers

Does the computer suspend when you choose the suspend option instead of closing the lid?

Check the suspend logs at /var/log/pm-suspend.log

that might tell you why its not suspending.

share|improve this answer
add comment

This usually happens when some process stops the system from being suspended.

Do

dmesg -T|grep Freez -A4

and look for these entries:

--
[sun mar  3 15:19:48 2013] Freezing user space processes ... 
[sun mar  3 15:20:08 2013] Freezing of tasks failed after 20.01 seconds (3 tasks refusing to freeze, wq_busy=0):
[sun mar  3 15:20:08 2013] mount.nfs       D e8631aa0     0  5518   5517 0x00800004
[sun mar  3 15:20:08 2013]  e8631b10 00000086 f7bc0e00 e8631aa0 c1053cb4 c1809020 c192ee00 c192ee00
--

Check the time stamps to see which of the reported problems relate to your try to suspend. In this case, it is mount.nfs that is causeing the problems.

Now, put a script in /etc/pm/sleep.d/, scripts there will be run at suspend and resume. The file name should start with an ordering number, 00-49 for user scripts (for more details, see man pm-suspend).

The script could look like this

#!/bin/sh
(killall -1 mount.nfs; exit 0)

with correpsonding entries for other processes that caused problems, if any.

Parenthesis and exit 0 is a trick: if the process isn't found, killall will exit with exit code 1, which will cancel the entire suspend. The above will run killall in a sub-shell that will exit with 0.

If you're having problems, check /var/log/pm-suspend.log that will log the attempt to suspend and to run your script.

share|improve this answer
add comment

Your Answer

 
discard

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