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
resume from hibernation slow - almost 5 minutes
Forum rules
LMDE 2 has reached end of support as of 1-1-2019
LMDE 2 has reached end of support as of 1-1-2019
resume from hibernation slow - almost 5 minutes
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
-
- Level 4
- Posts: 359
- Joined: Thu Jun 24, 2010 2:22 pm
Re: resume from hibernation slow - almost 5 minutes
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
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:
(for hibernation)
(my favorite command by name , 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 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
(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.
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
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
Code: Select all
sudo s2both
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
- If you are swapping but using less memory that you physically have, you can try
Code: Select all
sudo swapoff -a && sudo swapon -a
- 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 screw up :)
Bruno
(Always backup before you screw up :)
Re: resume from hibernation slow - almost 5 minutes
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.
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.
--
Salutes to all!!
Salutes to all!!