resume from hibernation slow - almost 5 minutes

Questions about applications and software
Forum rules
Before you post please read how to get help
j1mw3b
Level 1
Level 1
Posts: 30
Joined: Fri Nov 11, 2011 7:42 pm

resume from hibernation slow - almost 5 minutes

Postby j1mw3b » Sat Jul 16, 2016 7:23 pm

I have LMDE2 with Mate installed on a LenovoX220i laptop with 4gb memory and 4gb swap. System is up to date with latest.
uname=Linux glap 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt7-1 (2015-03-01) x86_64 GNU/Linux. Memory usage is always less than 3gb.

I have, for quite a while now, been experiencing very slow resumes from hibernation. Up to 5 mins before I have a really usable system. The disk light stays lit solid. Normally close lid around 9pm and open at 8am or so.

I tried to install uswsusp to try to change to use suspend-hybrid which hopefully will let me mostly use suspend and then only resume from hibernate when it needs to

Can't seem to get uswsusp to work, so have uninstalled pm-utils and the Matepowermanager.
What else should I uninstall to have uswsusp as my only pm.

Also, what in the world is going on with the long resume with high disk usage?

Any help here would be appreciated. BTW, I also have a Lenovo T520 and it works just fine and has pm-utils, matepowermgr and all is well - except sometimes instead of resuming, it just reboots from scratch. But I can live that issue.

I'd go back to Debian pure except can't stand new Gnome3+.

Thanks,

Jimmy

BrunoMiranda
Level 3
Level 3
Posts: 109
Joined: Thu Jun 24, 2010 2:22 pm

Re: resume from hibernation slow - almost 5 minutes

Postby BrunoMiranda » Sat Aug 06, 2016 7:51 pm

Well, I've only seen this a few years later but I think I can add up something has this has already happened to me.

If you eventually see this, let me know so I can say something beyond supposition.

This happened to me if I hibernated with my memory almost full or if I already had something being swapped. Not exactly sure what technically happens but this is my empirical experience when configuring uswsusp.

What happens is that hibernation will swap somethings and resuming will do a lot of thrashing on the hard drive - hence your long resume time.

This specially happened if I had configured uswsusp to hibernate using the possible smallest image size. Hibernating would be super fast but the resuming process would be as long and desperating as you describe.
What I have done is running

Code: Select all

sudo dpkg-reconfigure uswsusp


and give uswsusp all the swap space to hibernate, so it can use what it needs.
This is done on the max size for hibernation image, give it almost the size of your swap.
(sorry, no printscreens or eventually incorrect names for the text strings as my OS is in Portuguese)

Sometimes pressing my power button doesn't start hibernation (could have been this when you mention you cannot get uswsusp to work?), but if I go to the console, this will work:

Code: Select all

sudo s2disk

(for hibernation)

Code: Select all

sudo s2both

(my favorite command by name :mrgreen: , it will suspend-hybrid)

Note that hibernation may not start if it assumes it won't be able to write all the RAM into the hibernation image.


So what do I recommend (on the software side):

- Before hibernating, check if you are already swapping to disk.
(check with the System Monitor or use the

Code: Select all

free
command - it will give you a good idea on how your memory and swap are)

- If you are swapping but using less memory that you physically have, you can try

Code: Select all

sudo swapoff -a && sudo swapon -a

(this will move contents from the swap into RAM)

- Restart Cinnamon, it will free some memory up.
You can do this by pressing Alt + F2 and on the command, just type the character r and press Enter; or left click on your panel (the taskbar), (something like) Problem troubleshooting (sorry, Portuguese GUI!), and then Restart Cinnamon.

- Increase the size of the swap partition a little bit more.

- Sometimes closing and reopening Firefox clears up a lot of memory that doesn't have to be hibernated (or it eventually will, in the form of cache).
This will hibernate with Firefox and all my tabs open, but using less memory.

- Configure your system's swappiness, the simple tutorial is here:
https://community.linuxmint.com/tutorial/view/328

- Give a go at Bleachbit. It has an option that will try to clean your memory. This is experimental and can berserk the stability of the OS, but I personally do not complaint about it.

When I resume from hibernation, I usually run the free command and if I am swapping, I run the sudo swapoff -a && sudo swapon -a commands to clean the swap and work from RAM only, sometimes I can notice my system a little bit more responsive after doing this.
Bye for now,
Bruno


(Always backup before you fvckup :mrgreen: )

User avatar
shabah
Level 1
Level 1
Posts: 7
Joined: Thu Jan 05, 2017 10:34 pm
Location: The Bay of All Waters

Re: resume from hibernation slow - almost 5 minutes

Postby shabah » Sun Jan 08, 2017 4:19 am

Ok, many months later...

I had hibernation issues too. None of this workarounds resolved my hibernation issues... So nowadays I simply do not use it. 'Suspend' solves my demand and I'm ok with that. :cry:
Salutes to all!!
Namaste!

Image

>>Presentation<<


Return to “Software & Applications”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests