If s2disk successfully hibernates your machine, but on powering up the resume screen appears to hang, after it has appeared to stop working try pressing Alt-SysRq-E. This ends all processes in the virtual terminal used by s2disk, and, for me at least, allows me to resume working in my hibernated session.
Odd, but this might help others close to giving up on hibernation in Linux.
Assorted notes on my development experiences, and other useful workflow and environment tips, for Windows and Linux.
Showing posts with label hibernate. Show all posts
Showing posts with label hibernate. Show all posts
Wednesday, 6 March 2013
Friday, 11 May 2012
Fixing Hibernate Problems in Linux Mint Part II
My previous attempts to make hibernation work for my Linux Mint installation didn't entirely solve the problem. My system has been hanging far less than usual, but would still occasionally hang at the s2disk hibernating screen.
After a lot of reading, it seems to me that there's problem with the s2disk utility, and so I've worked around the problem using an older, more stable method of hibernation:
This will hibernate the machine, and resume the session when it is powered back up. It's not as fast as s2disk, and doesn't display any information while hibernating (it shows a black screen unless there are errors), but is far more stable, for my set up at least.
I put the command into a one line script, in /usr/bin/hib-script.sh, then added an entry in sudoers (see this post) to remove the requirement for a password to be entered. Finally, I added a launcher to Cairo-dock, so that now I have a consistent, stable hibernation function for my Linux Mint installation.
After a lot of reading, it seems to me that there's problem with the s2disk utility, and so I've worked around the problem using an older, more stable method of hibernation:
sudo echo disk > /sys/power/state
This will hibernate the machine, and resume the session when it is powered back up. It's not as fast as s2disk, and doesn't display any information while hibernating (it shows a black screen unless there are errors), but is far more stable, for my set up at least.
I put the command into a one line script, in /usr/bin/hib-script.sh, then added an entry in sudoers (see this post) to remove the requirement for a password to be entered. Finally, I added a launcher to Cairo-dock, so that now I have a consistent, stable hibernation function for my Linux Mint installation.
Saturday, 28 April 2012
Fixing Hibernate Problems in Linux Mint
Hibernate was working fairly inconsistently on my machine; sometimes it would work, and sometimes it would hang with s2disk pending onscreen. Google turns up a lot of Linux hibernate problems, below is how I resolved mine.
First, ensure you have more swap space than RAM (1.5 - 2x RAM as a guideline), using the command:
If you don't have enough space, follow the instructions here before continuing.
Once you are sure you have enough swap space, if hibernate still isn't working, install the powermanagement-interface package, using:
This got hibernation working on my machine, I hope it helps you too.
Update: Make sure you check out Part II of this post, should this post not help you fully resolve your hibernate problems.
First, ensure you have more swap space than RAM (1.5 - 2x RAM as a guideline), using the command:
swapon -s
If you don't have enough space, follow the instructions here before continuing.
Once you are sure you have enough swap space, if hibernate still isn't working, install the powermanagement-interface package, using:
sudo apt-get install powermanagement-interface
This got hibernation working on my machine, I hope it helps you too.
Update: Make sure you check out Part II of this post, should this post not help you fully resolve your hibernate problems.
Thursday, 26 April 2012
Increasing swap file size in Linux
If you need to increase your Linux swap space, but don't want to repartition your hard drives, you can use a swap file.
First, create an empty file, of the size you want.
The above creates an empty file of size 2GB, called mnt/my_swap. To create a file of a different size, replace the 2048 with the size of swap file you require, in MB.
Next, format the file as swap space:
Then tell the operating system to begin using it:
Finally, to persist the change, and ensure the OS uses the new swap file on every boot, open /etc/fstab and add the following line:
To open /etc/fstab, you can use gedit with this line:
Additionally, to check the current swap spaces in use by the system, you can use:
With thanks to DistroWatch Weekly, Issue 388, 17 January 2011 for this information!
First, create an empty file, of the size you want.
dd if=/dev/zero of=/mnt/my_swap bs=1M count=2048
The above creates an empty file of size 2GB, called mnt/my_swap. To create a file of a different size, replace the 2048 with the size of swap file you require, in MB.
Next, format the file as swap space:
mkswap /mnt/my_swap
Then tell the operating system to begin using it:
swapon /mnt/my_swap
Finally, to persist the change, and ensure the OS uses the new swap file on every boot, open /etc/fstab and add the following line:
/mnt/my_swap none swap sw 0 0
To open /etc/fstab, you can use gedit with this line:
gedit /etc/fstab
Additionally, to check the current swap spaces in use by the system, you can use:
swapon -s
With thanks to DistroWatch Weekly, Issue 388, 17 January 2011 for this information!
Subscribe to:
Posts (Atom)