Something is causing suspend crash occasionally. When it does crash, the system freezes with a black screen and stays on, not suspending. This makes me have to hold the power button until the system shuts down.

One setting difference I have from most people is, I don't use the option that lets you suspend when the laptop lid is closed. So opening and closing the laptop lid has no actions. I like to press suspend manually. Could this preference change be the cause?

How can I start looking for what's causing the crash, since the crash doesn't display errors?


No, disabling the "suspend on lid close" function cannot affect manual suspend.

You would start by looking at the output of dmesg and the contents of /var/log/kern.log and /var/log/syslog for clues.

We can try to help if you share these with us. See this question for how:

How can I easily share the output of a command or a text file with others?


I don't think that setting you mention has anything to do with it.

Check /var/log/pm-suspend.log and see if it gives any hint.

These problems are usually due to some process(es) stopping the system from being suspended.


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

(killall -9 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.

  • I also needed another line: (killall -9 mount.nfs; exit 0) because sometimes it doesn't work with SIGUP only. – Juanin Apr 20 '14 at 5:06
  • @Juanin: -9 is better, I don't know why I had only -1 in the first place, is edited now. – Carl Apr 20 '14 at 11:30
  • I wonder what percentage of the time the problem is a live network mount (as shown here). That was my problem too -- but it was sshfs instead of nfs. – nobar Nov 15 '17 at 11:21
  • 1
    Thank you! This solution was exactly what I needed. In my case was mount.ntfs that was causing me grief – Weston Ganger Oct 17 '19 at 3:05
  • 1
    @Ramesh-X My case was a process reading from a NFS mounted dir. NFS server was down. This was on 18.04, and kill -9 was needed. – Ole Tange May 20 '20 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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