Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Enable sleep/hibernation

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
firebirdsql
Posts: 25
Joined: 2011-12-25 01:25

Enable sleep/hibernation

#1 Post by firebirdsql »

How do I enable sleep/hibernation in Debian? My PC is pretty recent and should support the ACPI specs (not sure why debian didn't enable this by default)

Randicus
Posts: 2663
Joined: 2011-05-08 09:11

Re: Enable sleep/hibernation

#2 Post by Randicus »

Which version of Debian? Stable, Unstable or Testing?
Are you using Gnome, Kde, XFCE, LXDE or other?

firebirdsql
Posts: 25
Joined: 2011-12-25 01:25

Re: Enable sleep/hibernation

#3 Post by firebirdsql »

I'm using Debian Sequeeze Stable.
Gnome-session (minimal), gnome-themes, gnome-icon-theme.

I just installed the pm-utils package and after a restart I get the suspend/hibernate options. Is this the correct way to enable sleep/hibernation or is it a workaround?

Randicus
Posts: 2663
Joined: 2011-05-08 09:11

Re: Enable sleep/hibernation

#4 Post by Randicus »

Gnome, Kde, XFCE and LXDE should all have sleep and hibernation when Debian is installed. We shall both need to wait for ideas about what went wrong for you. As for installing pm-utils, if it works then it is not wrong.

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: Enable sleep/hibernation

#5 Post by golinux »

Suspend worked for me out of the box on Squeeze/Gnome. IIRC hibernation doesn't work so I've gotten used to suspend. Maybe I'll give it a try later and report back.
May the FORK be with you!

User avatar
Mr James
Posts: 1258
Joined: 2010-09-10 13:02

Re: Enable sleep/hibernation

#6 Post by Mr James »

@Randicus: Buttons and menu items are one thing, whether the functionality of those elements are present and working correctly is another. You can also suspend and hibernate from the CLI by the way.

@OP: Yeah pm-utils is what's needed. However suspend (to RAM or disk) and resume from suspend are totally unreliable so do not be surprised. Kernel, graphics drivers (proprietary or not), USB devices, and BIOS settings - any one or all of them could be causing your issue. My system's resume from suspend borked upon last point upgrade. The best you can do is take a look at your dmesg and log files and look for errors and warnings and see if they lead you anywhere. These are located in /var/log/.
asus S551L laptop :: debian stable :: dwm

firebirdsql
Posts: 25
Joined: 2011-12-25 01:25

Re: Enable sleep/hibernation

#7 Post by firebirdsql »

After installing pm-utils and rebooting, the suspend/hibernation options were in the shutdown dialog. Maybe there didn't appear at first because I only installed the minimal gnome-session.

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: Enable sleep/hibernation

#8 Post by golinux »

Mr James wrote:However suspend (to RAM or disk) and resume from suspend are totally unreliable so do not be surprised.
I can't remember suspend ever failing me. Well, maybe once after a kernel security update. Guess I'm lucky . . .
May the FORK be with you!

Randicus
Posts: 2663
Joined: 2011-05-08 09:11

Re: Enable sleep/hibernation

#9 Post by Randicus »

golinux wrote:
Mr James wrote:However suspend (to RAM or disk) and resume from suspend are totally unreliable so do not be surprised.
I can't remember suspend ever failing me. Well, maybe once after a kernel security update. Guess I'm lucky . . .
I have also never had a problem with suspend using Stable. As for Unstable and Testing, I have never been down those roads.

User avatar
Mr James
Posts: 1258
Joined: 2010-09-10 13:02

Re: Enable sleep/hibernation

#10 Post by Mr James »

Randicus wrote:
golinux wrote:
Mr James wrote:However suspend (to RAM or disk) and resume from suspend are totally unreliable so do not be surprised.
I can't remember suspend ever failing me. Well, maybe once after a kernel security update. Guess I'm lucky . . .
I have also never had a problem with suspend using Stable. As for Unstable and Testing, I have never been down those roads.
Lucky is an understatement.
Great, now I hate the both of you...
asus S551L laptop :: debian stable :: dwm

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: Enable sleep/hibernation

#11 Post by golinux »

OK. I just tested hibernation and it works fine too but is very slow. As I never leave unsaved files open, there's no risk in using suspend which is very fast (and reliable). :) Sometimes I don't reboot for weeks at a time!
May the FORK be with you!

firebirdsql
Posts: 25
Joined: 2011-12-25 01:25

Re: Enable sleep/hibernation

#12 Post by firebirdsql »

Got a question...if it was in suspend mode and the power went out, what do you need to do?

On windows, you would schedule a full disk scan....what would you do in debian?

Randicus
Posts: 2663
Joined: 2011-05-08 09:11

Re: Enable sleep/hibernation

#13 Post by Randicus »

Mr James wrote:Lucky is an understatement.
Great, now I hate the both of you...
You have made me curious. I do not use hibernate, so am not knowledgeable about any issues with it. However, whether using suspend with Gnome and XFCE or logging out of Openbox and Fluxbox and using suspend from the log-in window, I have never had any problems. I am curious about your set-up. Do you have a standard installation or have you added any packages that may cause problems? Could such problems be hardware-related? Or is it purely luck of the draw?

User avatar
Mr James
Posts: 1258
Joined: 2010-09-10 13:02

Re: Enable sleep/hibernation

#14 Post by Mr James »

Randicus wrote:I am curious about your set-up. Do you have a standard installation or have you added any packages that may cause problems? Could such problems be hardware-related? Or is it purely luck of the draw?
Nah, I ain't gonna hijack this dude's thread. But I will say that my issue is the *resume* part. Logs say suspend was successful. Resume yields a kernel panic. Haven't really delved into the why as where I am the power is unreliable anyway - power outage renders suspend useless. I will also say that Squeeze is the *only* distro release I ever used (butnut, arch...you name it) that ever suspend and resumed correctly. That is, until the latest point release.
asus S551L laptop :: debian stable :: dwm

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: Enable sleep/hibernation

#15 Post by dilberts_left_nut »

firebirdsql wrote:Got a question...if it was in suspend mode and the power went out, what do you need to do?

On windows, you would schedule a full disk scan....what would you do in debian?
You would watch as the disks get checked during the next boot (very quick on ext4).

My suspend works great on my laptop (Sid - xfce) but I haven't tried hibernate as I don't currently have a swap.
AdrianTM wrote:There's no hacker in my grandma...

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: Enable sleep/hibernation

#16 Post by dilberts_left_nut »

Been meaning to do it for some time, so I had a partition reshuffle, squeezed in a 4GB swap, set it up in /etc/fstab and mounted it with

Code: Select all

swapon -a
added a /etc/initramfs-tools/conf.d/resume containing

Code: Select all

RESUME=LABEL=swap
then ran

Code: Select all

update-initramfs -u
After logging out and back in, Hibernate was livened up in the xfce-power-manager menu so I pushed it and it hibernated and then resumed when I repowered. :D

I also discovered there is a 'hibernate' package in the repo, but I don't have it installed so I don't know what it could add, or if it just sets up the initramfs automatically.
AdrianTM wrote:There's no hacker in my grandma...

qeemat
Posts: 46
Joined: 2012-02-13 12:01

Re: Enable sleep/hibernation

#17 Post by qeemat »

To hibernate system, enter:
# pm-hibernate
To suspend system, enter:
# pm-suspend
You can use the at command as follows to put laptop to sleep after 30 minutes of time:
echo 'pm-suspend' | at now + 30 minutes
For further details check this site
http://www.cyberciti.biz/faq/linux-comm ... etbook-pc/

Post Reply