Computer sluggish/irresponsive for several minutes after hibernation

Bug #1675683 reported by Yann Salmon
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pm-utils (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Hi,
my computer is very sluggish for a good five minutes after thawing from hibernation.

Booting the system and the thawing process in itself seems to run fine : the console displays the progress of reloading contents into RAM at a satisfying pace, then the lightdm unlock interface displays.

From this point on, things become strange : the computer has an constant and intense hard drive activity and applications do not respond to input in a swift manner (moving the mouse cursor works in "real time" though, and the clock, which displays seconds, also works almost normally).

This reminds me of what happens when you set focus back to an application that had been paged to swap : it is irresponsive until it is back in RAM. Except this happens for all applications at once.

This stops after several minutes (more than five) and the computer becomes usable again.

I experienced the problem today again. The current RAM usage is 7.2 Gio / 15.6 Gio and swap usage is 4.2 Gio / 31.3 Gio.

Main memory usage is :
firefox 3.4 Gio
firefox (other instance) 1.7 Gio
thunderbird 624 Mio
xfwm4 213 Mio

Hibernation with TuxOnIce did not induce this problem (I am not using it currently due to mismanagement of video drivers).

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: pm-utils 1.4.1-16
ProcVersionSignature: Ubuntu 4.4.0-67.88-generic 4.4.49
Uname: Linux 4.4.0-67-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
CurrentDesktop: XFCE
Date: Fri Mar 24 09:20:15 2017
InstallationDate: Installed on 2016-09-07 (197 days ago)
InstallationMedia: Xubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
PackageArchitecture: all
SourcePackage: pm-utils
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Yann Salmon (yannsalmon) wrote :
Yann Salmon (yannsalmon)
description: updated
Revision history for this message
Nish Aravamudan (nacc) wrote :

This is probably going to be tricky to debug as it's probably hardware dependent.

Can you first run `sudo dmesg -C`, then suspend and resume and then attach the output of `dmesg` ?

Changed in pm-utils (Ubuntu):
status: New → Incomplete
Revision history for this message
Yann Salmon (yannsalmon) wrote :

Thanks for your help.

I did what you suggested. Here is the result.

Changed in pm-utils (Ubuntu):
status: Incomplete → New
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks YS1 for your check.
There is no clear error in the messages, so it is down trying to log what activity goes on while it is waking up.

Chances are that the things we set up are too sluggish as well and only start to report after we unfrozen far enough, yet it is worth a try.
You could run things like

$ sar -A -I XALL 1 > freezeslow.sar
$ dstat -tvins --top-io-adv --top-bio-adv --top-latency 1 > freezeslow.dstat
$ iostat -xtdk 1 > freezeslow.iostat

Then suspend restore and the processes should wake up and log again.
With some luck (before going much deeper on debugging suspend) we can catch something that makes things worse in your case.

Changed in pm-utils (Ubuntu):
status: New → Incomplete
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I found [1] which might help going deeper into this case if needed.
But also [2] which might be a solution for your issue right away.

[1]: https://01.org/blogs/rzhang/2015/best-practice-debug-linux-suspend/hibernate-issues
[2]: https://askubuntu.com/questions/792605/ubuntu-16-04-lts-too-slow-after-suspend-and-resume

Revision history for this message
Yann Salmon (yannsalmon) wrote :

Thanks you again for investigating this. It has been difficult to find similar cases because I do not really know how to describe the problem in English, making it difficult to use search engines.

I tried rdmsr -a 0x19a and it gives back 0 as seems to be normal.

Here are the logs you suggested to make. I do not understand them all in depth, but the dstat log clearly indicates that on resuming, the swap contains 392 MB more data than before hibernating, and that this data is being put back into RAM. This is completely consistent with the symptoms.

Revision history for this message
Yann Salmon (yannsalmon) wrote :
Revision history for this message
Yann Salmon (yannsalmon) wrote :
Changed in pm-utils (Ubuntu):
status: Incomplete → New
Revision history for this message
gf (gf-interlinks-deactivatedaccount) wrote :

Hello YS1,
Thank you for submitting this bug and reporting a problem with sluggishness after suspend. You made this bug report some time ago and Ubuntu has been updated since then.

Could you confirm that this is no longer a problem and that we can close the ticket?
If it is still a problem, could you let us know?

Thank you again for helping make Ubuntu better.
G

Changed in pm-utils (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for pm-utils (Ubuntu) because there has been no activity for 60 days.]

Changed in pm-utils (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.