Score:1

Suspend: freezing of tasks failed after 20 seconds

cn flag

Quite often when I try to suspend Ubuntu 20.04, it fails with the error message:

Freezing of tasks failed after 20.005 seconds (1 task refusing to freeze, wq_busy=1)

I have tried a lot of tricks to find out more about it, but I just cannot find the source of it. Its always one our two tasks.

I tried using the command

sudo PM_DEBUG=true pm-suspend

but the output of it is so long and confusing that I cannot read any information out of it. The output can be found in that pastebin. Even though I shorted it to the correct timestamp, its just so much information: https://pastebin.com/Sx8WMHie

The output of syslog is the following: https://pastebin.com/KdJ8G1QP

Is there anybody out there who can help me to either find the problem or to tell me what I am actually searching for? This has been going for months and I just don't have a clue. Its purely random when it appears, but I think its 20% of all suspends

Score:0
us flag

Before going into suspend (or hibernate for that matter), user space processes and (some) kernel threads get frozen. If the freezing fails, it will either be due to a user space process or a kernel thread failing to freeze.

To freeze a user space process, the kernel sends it a signal that is handled automatically and, once received, cannot be ignored. If, however, the process is in the uninterruptible sleep state (e.g. waiting for I/O that cannot complete due to the device being unavailable), it will not receive the signal straight away. If this delay lasts longer than 20s (=default freeze timeout, see /sys/power/pm_freeze_timeout (in miliseconds)), the freezing will fail.

If it's a kernel thread that refuses to freeze, chances are it is a faulty device driver, but it's hard to tell without looking at the logs.

NFS, CIFS and FUSE amongst others have been historically known for causing issues like that.

Back to your case specifically, your dmesg should have some details about which tasks failed to freeze and you could go from there. Your pastebins have now expired, but a blind guess would be CIFS/SMB - are you using any of them to access Windows shares for instance?

Freezing of tasks in the kernel is explained here, hope that helps: https://www.kernel.org/doc/html/latest/power/freezing-of-tasks.html

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.