Sleep/Hibernate/Suspend to Disk/S2D not working :(

Archived topics about LMDE 1 and LMDE 2
Locked
RavanH

Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by RavanH »

I've had several Ubuntu versions running fine and able to suspend to disk without big issues (except needing to manually reactivate wireless in the latest version) but since I moved to LMDE, I cannot resume from hibernation any more.

Triggering Sleep mode, my laptop seems to be going down for S2D sucesfully. But upon resume, the boot process shows me some "recovering journals" action on the /home partition and then does a normal clean boot.

In dmesg log it shows afterwards:

Code: Select all

...
[    4.456563] EXT4-fs (sda3): INFO: recovery required on readonly filesystem
[    4.456569] EXT4-fs (sda3): write access will be enabled during recovery
[    6.052635] EXT4-fs (sda3): recovery complete
...
Further I get no clues about what is going wrong.

Can anyone give me some pointers here ? Thanks !

-----

OS: LMDE (201012) 64bit
System: Packard-Bell EasyNote R3450, AMD Turion64, 2GB RAM, ATI Radeon Xpress 200M, Broadcom internal wlan (using b43 kernel module)... what else could be relevant?
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.
seeley

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by seeley »

Hi RavanH!
I don't know if I can help you, but we need more information. Please run

Code: Select all

free
and

Code: Select all

sudo parted -l print
- l like list -
seeley
axxer

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by axxer »

save ur work and try to use this command

Code: Select all

sudo s2disk
if it doesnt work then u have to install uswsusp (i dont know if uswsusp is installed by default in lmde or not)

Code: Select all

sudo apt-get update && sudo apt-get install uswsusp
uswsusp is a tool to handle userspace suspend to disk/suspend to ram function.
http://suspend.sourceforge.net/
CiaW

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by CiaW »

There's also a thread here: http://forums.linuxmint.com/viewtopic.php?f=141&t=61985

I used that info since my swap wasn't being turned on and hibernate wouldn't resume properly as you've mentioned, except the UUID / blkid didn't work right for me. However I also had a LABEL on my swap partition (called SWAP-sda2) so I used that in my fstab instead of a UUID, After I revised the fstab I used the 'swapon -a' command (which mounts all swap from the fstab file) and now it all works fine. The syntax in my fstab for that particular entry is:

LABEL=SWAP-sda2 none swap sw 0 0

I believe you can add a label to a partition in gparted if you want.
RavanH

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by RavanH »

seeley wrote:Hi RavanH!
I don't know if I can help you, but we need more information. Please run

Code: Select all

free
and

Code: Select all

sudo parted -l print
- l like list -
seeley

Code: Select all

~$ free
             total       used       free     shared    buffers     cached
Mem:       1930272    1344420     585852          0      75604     576124
-/+ buffers/cache:     692692    1237580
Swap:      2393612          0    2393612

Code: Select all

~$ sudo parted -l print
Model: ATA IC25N080ATMR04-0 (scsi)
Disk /dev/sda: 80,0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system     Flags
 1      32,3kB  8225kB  8193kB  primary   ext4
 2      8225kB  17,2GB  17,2GB  primary   ntfs            boot
 3      17,2GB  25,8GB  8587MB  primary   ext4
 4      25,8GB  80,0GB  54,3GB  extended                  lba
 7      25,8GB  28,2GB  2451MB  logical   linux-swap(v1)
 5      28,2GB  65,8GB  37,6GB  logical   ext4
 6      65,8GB  80,0GB  14,2GB  logical   fat32
RavanH

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by RavanH »

axxer wrote:save ur work and try to use this command

Code: Select all

sudo s2disk
if it doesnt work then u have to install uswsusp (i dont know if uswsusp is installed by default in lmde or not)

Code: Select all

sudo apt-get update && sudo apt-get install uswsusp
uswsusp is a tool to handle userspace suspend to disk/suspend to ram function.
http://suspend.sourceforge.net/
s2disk is not found so i tried to install uswsusp but that returned the error:

Code: Select all

E: Package 'uswsusp' has no installation candidate
seeley

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by seeley »

Hi!
First I would see, if the System Monitor shows if swap is recognized:
You could see: 0 (0%) of 0 bytes (not recognized) or ...%.. of 2.3 GB (maybe 2.4 GB).
If not recognized you can activate swap with

Code: Select all

swapon /dev/sda7

But after reboot it's gone. That's why you have to edit the file /etc/fstab.
But first try the command above and see System Monitor again, if it works.
seeley
seeley

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by seeley »

Hi RavanH!
The problem with swap has been solved several times, e.g. see:
http://forums.linuxmint.com/viewtopic.p ... 9&start=60
It was a long action and page 4 shows a solution - you should read it and ask your question if necessary.
If you are not sure to do it alone, please post the corresponding outputs.
seeley
RavanH

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by RavanH »

seeley wrote:Hi RavanH!
The problem with swap has been solved several times, e.g. see:
http://forums.linuxmint.com/viewtopic.p ... 9&start=60
It was a long action and page 4 shows a solution - you should read it and ask your question if necessary.
If you are not sure to do it alone, please post the corresponding outputs.
seeley
Hi seeley, my swap is working fine... Also, the size should be (just) enough to allow Hibernation so that's not the problem. I have had swap missing right after I first installed LMDE (weird!) and but I noticed then that Sleep/Hibernation was not given as an option on Shutdown or in the Energy settings. After fixing swap, Sleep became available but now it turns out resume does not work ;(

Thanks for the suggestion anyway :)
jeffreyC

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by jeffreyC »

Uswsusp is available in Sid or Lenny but currently not Squeeze.
marlar
Level 2
Level 2
Posts: 72
Joined: Thu Dec 10, 2009 9:30 am

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by marlar »

I just installed LMDE and faced the same problem with resume not working.

This easy to follow thread solved it for me: http://forum.linuxmint.com/viewtopic.php?f=18&t=55859
RavanH

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by RavanH »

marlar wrote:I just installed LMDE and faced the same problem with resume not working.

This easy to follow thread solved it for me: http://forum.linuxmint.com/viewtopic.php?f=18&t=55859
YES!! That totally solved the issue! WOOT!! Thanks marlar for pointing me to the right thread :)

I wonder if the whole issue was caused by the swap not being activated during intallation...

For anyone interested, here is a rundown of what I did per instructions deduced from the thread mentioned above:

Logged in as main user (with admin rights) open a terminal screen from the menu and enter

Code: Select all

sudo blkid
After entering your password it should print a list of your HD partitions. Copy (select and right-click>copy) the UUID from the partition with type "swap".

Next enter in terminal:

Code: Select all

sudo gedit /etc/fstab
Verify that the UUID for "swap" in that file is the same. If not, you need to make it so and save. Close.

Then enter in terminal:

Code: Select all

sudo gedit /etc/initramfs-tools/conf.d/resume
Paste the UUID there after RESUME=UUID=... Save and close.

Then enter in terminal:

Code: Select all

sudo update-initramfs -u
After the update process has finished (takes a while) reboot and then test sleep/resume :)
coldphish

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by coldphish »

Hi,

The above post worked in the sense that I am now able to hibernate and suspend without the system out right crashing and having to be cold reset.. however when I either Hibernate or Suspend I always get this message that appears on a black screen for a few moments both when I hibernate / suspend and resume from either state.

GLib-WARNING **: getpwuid_r(): failed due to unknown user id (0)

Hibernation seems to take a particularly long time (about 1 - 2 minutes to resume and about half to actually hibernate) suspend is fairly quick, and its quite nice to finally be able to do this. The other thing that is a bit annoying is that my wireless is disabled when I boot back up out of hibernation and I am stuck having to manually reset and try and reconnect, and it usually takes a while and prompts me to specify authentication details even though it already has them filled out.

Any one know what might be causing the above error? I've seen several posts on ubuntu forums but nothing seems to describe the scenario in which this occurs for me.

Let me know if any more info is needed, I'd really like to solve these problems.

Thanks for any tips.

EDIT::

In case its worth anything to anyone.. regarding the above solution, when I ran blkid I got the following

Code: Select all

/dev/sda1: UUID="someguid"
/dev/sda5: UUID="someotherguid"
Now, my fstab entries do not have any guids listed.. but it does however list the devices (/dev/sda1 and /dev/sda5) in the correct areas.

Essentially the only thing I did was run

Code: Select all

sudo update-initramfs-tools -u
and things worked as expected.
beowulf

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by beowulf »

Solution posted by RavanH on Mon Jan 17, 2011 9:15 am is worked for me too.
Previously the system was able to sleep and wake-up without any problem. Only Hibernate did not worked.
The size of swap is double of RAM size.

I have only 3 warnings at hibernating which tells:
btusb_... hci0 urb ... failed to resubmit (1)
I have a usb bluetooth dongle. After plug in-out it is working fine.
beowulf

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by beowulf »

Now it is turned out, hibernating is not working when battery is critical. Manual hibernate is working from Menu - last option. Work is restored successfully.
When hibernated, it cannot be restored, normal boot is done instead of it.

Could anybody help in it?
gozvakond

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by gozvakond »

If it is still important for you, I solved a problem like this today. Getting the idea from an Arch Wiki(https://wiki.archlinux.org/index.php/Pm-utils) I put

Code: Select all

GRUB_CMDLINE_LINUX="resume=/path/to/swap/device"
in my /etc/default/grub file, where I used /dev/disk/by-uuid/... as the path. Perhaps "UUID=..." format also works. After this I updated GRUB, and resume was working. It seems, that the swap partition is not guessed as resume device anymore, and you need to specify. I used pm-hibernate. (pm-suspend is also working)
aspersieman

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by aspersieman »

marlar wrote:I just installed LMDE and faced the same problem with resume not working.

This easy to follow thread solved it for me: http://forum.linuxmint.com/viewtopic.php?f=18&t=55859
I recently installed the latest (beta I think) spin of LMDE and both suspend and hibernate didn't work on my netbook. It simply switched off (or seemed to) and when switched on again it was like a clean boot. Marlar's advice above solved it for me.

Previously when closing the lid, it meant the same as switching it off. Now that works together with manual suspend and hibernate. Thanks Marlar (and the people in the thread he linked to)!
TheLastStud

Re: Sleep/Hibernate/Suspend to Disk/S2D not working :(

Post by TheLastStud »

I had this problem too, and the instructions on this thred solved it. Now I have lightning fast hibernate and resume, much faster than ubuntu could ever do. Thanks loads!!
Locked

Return to “LMDE Archive”