The officially official Devuan Forum!

You are not logged in.

#1 2020-04-21 20:50:23

scjorge
Member
Registered: 2020-04-21
Posts: 5  

how to get hibernation?

hello devuan-community!
I am happy to enrich my life with my first devuan-device!
so far I am enjoying it a lot, just one thing is missing for me: HIBERNATION!

how can I get it working?

Offline

#2 2020-04-21 22:49:28

Marjorie
Member
From: Teignmouth, UK
Registered: 2019-06-09
Posts: 36  

Re: how to get hibernation?

On my desktop I use pm-hibernate. which is part of the pm-tools package. I find this gives me gives me more control (you can run before-sleep and after-sleep scripts) than the hibernate that comes as part of the 'log out' chooser built into Cinnamon.

On ASCII pm-hibernate worked for me with the default in-kernel power management option, now I've upgraded to Beowulf I find I need to use the alternative user-space SLEEP_MODULE="uswsusp" option to get it to work.

What works for you may also depend on your hardware.

Offline

#3 2020-04-22 05:31:13

scjorge
Member
Registered: 2020-04-21
Posts: 5  

Re: how to get hibernation?

oh, thanxs!
I was hesitant about installing the pm-packages (I somehow thought they where related to init-non-freedom... I wkll read more on the subject). 

So I will give pm-hibernate a try and inform if it worked on my hardware.

Offline

#4 2020-04-22 06:21:19

scjorge
Member
Registered: 2020-04-21
Posts: 5  

Re: how to get hibernation?

Marjorie wrote:

... use pm-hibernate. which is part of the pm-tools package...

On Beowulf I find I need to use the alternative user-space SLEEP_MODULE="uswsusp" option to get it to work.

What works for you may also depend on your hardware.


oh, it didn't work. the command finishes without any output...

# pm-hibernate
#

i tried both with and without the config-file

Offline

#5 2020-04-22 07:54:18

Marjorie
Member
From: Teignmouth, UK
Registered: 2019-06-09
Posts: 36  

Re: how to get hibernation?

Are you running it as root?

# sudo pm-hibernate

I run it as a drop down option on my desktop, so have added it to my sudoers file so I don't need to ask for my password.

Offline

#6 2020-04-22 10:46:35

scjorge
Member
Registered: 2020-04-21
Posts: 5  

Re: how to get hibernation?

Marjorie wrote:

Are you running it as root?

# sudo pm-hibernate

I run it as a drop down option on my desktop, so have added it to my sudoers file so I don't need to ask for my password.

yes, as rooot.

I did:

$ su
# pm-hibernate

and less than a second later the su-command-line appeared:

#

Offline

#7 2020-04-22 12:36:25

Marjorie
Member
From: Teignmouth, UK
Registered: 2019-06-09
Posts: 36  

Re: how to get hibernation?

Sorry I previously mentioned pm-tools package. Of course that is pm-utils, but I guess you found that anyway.

I presume pm-suspend is also not working for you?

You should check /var/log/pm-suspend.log to see if it tells you anything about why it's not running (the log is common to both suspend and to hibernate). If its not there then something is very amiss.

Last edited by Marjorie (2020-04-22 12:36:44)

Offline

#8 2020-04-22 17:32:16

scjorge
Member
Registered: 2020-04-21
Posts: 5  

Re: how to get hibernation?

Marjorie wrote:

Sorry I previously mentioned pm-tools package. Of course that is pm-utils, but I guess you found that anyway.

I presume pm-suspend is also not working for you?

You should check /var/log/pm-suspend.log to see if it tells you anything about why it's not running (the log is common to both suspend and to hibernate). If its not there then something is very amiss.

yes, I knew it was pm-utils wink

and there is no pm-suspend.log file in my system ...

EDIT:

for completion I tried

# pm-suspend

and it kind of worked! surprising!
and now there is a pm-powersave.log and pm-suspend.log under /var/log/

I have to mention that I also installed the "hibernate" package in the past. could this be interfering?

Offline

#9 2020-04-22 20:14:47

Marjorie
Member
From: Teignmouth, UK
Registered: 2019-06-09
Posts: 36  

Re: how to get hibernation?

Great - we have progress.

You haven't said what your setup is. On mine I could get suspend (pm-suspend) working on both ASCII and Beowulf but, by default, hibernate (pm-hibernate) didn't work on Beowulf.

There is a 'hibernate' option on my standard logout, which I think uses upower, however it doesn't work on Beowulf. It did work and didn't interfere on my ASCII installation.

Anyway on Beowulf I fixed pm-hibernate by installing the uspsusp package, which provides user space rather than kernel hibernation and then configured pm-utils to use it.

Have a look in your /etc/pm/config.d/defaults file. Mine looks like this:

##########################################################
# DO NOT EDIT THE FILE in /usr/lib/pm-utils/             #
#                                                        #
# Edit this in /etc/pm/config.d/ instead!                #
##########################################################

# Default method to power down the system when hibernating.
# If commented out, the system will use the kernel default as a 
# default value.
#
# Check /sys/power/disk for valid values.  The default value
# will be surrounded by [square brackets].
HIBERNATE_MODE="platform"

# Whether we need to post the video card when resuming from
# hibernate. You should not normally need to set this.  
# In the future pm-utils will get this setting from HAL.
#
# Valid values are "no" and "yes"
# HIBERNATE_RESUME_POST_VIDEO="no"

# The default sleep/wake system to use.  Valid values are:
#   kernel    The built-in kernel suspend/resume support.
#             Use this if nothing else is supported on your system.
#   uswsusp   If your system has support for the userspace
#             suspend programs (s2ram/s2disk/s2both), then use this.
#   tuxonice  If your system has support for tuxonice, use this.
#
# The system defaults to "kernel" if this is commented out.
SLEEP_MODULE="uswsusp"

# These variables will be handled specially when we load files in 
# /etc/pm/config.d.
# Multiple declarations of these environment variables will result in 
# their contents being concatenated instead of being overwritten.

# If you need to unload any modules to suspend/resume, add them here.
SUSPEND_MODULES="ath9k ath9k_common ath9k_hw ath"

# If you want to keep hooks from running, add their names here.
# HOOK_BLACKLIST=""

# If you want to unconditionally add parameters to the commandline,
# add them here.
# ADD_PARAMETERS=""

# If you want to ignore commandline parameters, add them here.
# DROP_PARAMETERS=""

# If you need to synchronize the system clock across a suspend/resume or
# hibernate/thaw cycle, set this variable.
# NEED_CLOCK_SYNC="true"

In line 30 I've uncommented SLEEP_MODULE="uswsusp", which means that it now uses uwsusp rather than the kernel. I've left everything else as is, apart from lower down, where I unload my atheros wifi drivers as they refuse to power down when asked: however this is not needed to make hibernate work, even on my setup. Elsewhere I've also added a call to load a login screesaver, which does increase security a bit on resume. If you get hibernate working I'll tell you how to do this.

Lets see if that works better.

If not you may want to look at alternatives to HIBERNATE_MODE="platform" and/or install and try tuxonice as an alternative to uspsusp.

Offline

Board footer