You are not logged in.

#1 2007-03-25 07:25:05

orjanp
Member
From: Tromsoe, Norway
Registered: 2004-07-03
Posts: 347

Powersave setup

I cant seem to find any proper documentation on the Powersave package.

When I type powersave -U, I hear a beep, an then nothing.

I have resume in grub, and as a hook.

Any tips on how to set it up?

Orjanp

/boot/grub/menu.lst

# Config file for GRUB - The GNU GRand Unified Bootloader
# /boot/grub/menu.lst

# DEVICE NAME CONVERSIONS 
#
#  Old /dev    DevFS                    Grub
# -----------------------------------------------
#  /dev/fd0    /dev/floppy/0            (fd0)
#  /dev/hda    /dev/discs/disc0/disc    (hd0)
#  /dev/hdb2   /dev/discs/disc1/part2   (hd1,1)
#  /dev/hda3   /dev/discs/disc0/part3   (hd0,2)
#

#  FRAMEBUFFER RESOLUTION SETTINGS
#     +----------------------------------------+
#          | 640x480 800x600 1024x768 1280x1024
#      ----+-----------------------------------
#      256 |   0x301   0x303    0x305     0x307
#      32K |   0x310   0x313    0x316     0x319
#      64K |   0x311   0x314    0x317     0x31A
#      16M |   0x312   0x315    0x318     0x31B
#     +----------------------------------------+

# general configuration:
timeout   5
default   4
#splashimage /boot/grub/splash.xpm.gz
color light-blue/black light-cyan/blue

# boot sections follow
# each is implicitly numbered from 0 in the order of appearance below
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
# TIP: To use udev, add "devfs=nomount" to your kernel line.
#
#-*

# (0) ArchLinux with stock kernel.
title  ArchLinux    [/boot/vmlinuz26]
root   (hd0,4)
kernel /vmlinuz26 root=/dev/sda6 ro devfs=nomount vga=0x343
initrd /kernel26.img

# (4) ArchLinux with stock kernel and powersave.
title  ArchLinux    [/boot/vmlinuz26]
root   (hd0,4)
kernel /vmlinuz26 root=/dev/sda6 ro devfs=nomount resume=:/dev/sda9 vga=0x343
initrd /kernel26-rev.img

/var/log/messages

Mar 25 09:20:30 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: DIAG: Process script for event global.suspend2disk ID 15
Mar 25 09:20:30 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: INFO: Event: GLOBAL_SUSPEND2DISK occured.
Mar 25 09:20:30 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: INFO: Parameters: Event - global.suspend2disk; Current Active Scheme: scheme_performance - ACPI event line: empty
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: DIAG: script_return() invoked: event_id: 15, request: 4, text: 0
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: INFO: Running get_kernels()
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: INFO: Default boot entry is '4'
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: INFO: Found grub menu entry #0: 'title  ArchLinux    [/boot/vmlinuz26]'
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: INFO: Found kernel entry #0: 'vmlinuz26'
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: INFO: Found grub menu entry #1: 'title    ArchLinux    [/boot/vmlinuz26suspend2]'
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: INFO: Found kernel entry #1: 'vmlinuz26suspend2'
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: INFO: Found grub menu entry #2: 'title    ArchLinux    [/boot/vmlinuz26beyond]'
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: INFO: Found kernel entry #2: 'vmlinuz26beyond'
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: INFO: Found grub menu entry #3: 'title    WindowsVista'
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: INFO: Found grub menu entry #4: 'title  ArchLinux    [/boot/vmlinuz26]'
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: INFO: Found kernel entry #3: 'vmlinuz26'
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: DIAG: script_return() invoked: event_id: 15, request: 4, text: 5|checking resume kernel
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: DIAG: running kernel: 2.6.20-ARCH
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: DIAG: running kernel corresponds to grub menu entry 0
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: DIAG: kernel filename: 'vmlinuz26'
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: DIAG: script_return() invoked: event_id: 15, request: 4, text: 10|checking resume kernel
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: DIAG: script_return() invoked: event_id: 15, request: 4, text: 15|checking for swap partition
Mar 25 09:20:31 ArchThinkpad powersave-notify[5688]: DIAG: Process script for event The resume partition is not set up. Probably you need to add                 a 'resume=...' option to your kernel command line and reboot.                 Suspend to disk and resume is not possible without a resume                 partition, please consult the documentation. You can skip this                 check by setting SUSPEND2DISK_SKIP_RESUME_CHECK to 'yes' in                 the sleep configuration file. ID 15
Mar 25 09:20:31 ArchThinkpad powersave-notify[5688]: INFO: Event: THE RESUME PARTITION IS NOT SET UP_ PROBABLY YOU NEED TO ADD occured.
Mar 25 09:20:31 ArchThinkpad powersave-notify[5688]: INFO: Parameters: Event - The resume partition is not set up. Probably you need to add                 a 'resume=...' option to your kernel command line and reboot.                 Suspend to disk and resume is not possible without a resume                 partition, please consult the documentation. You can skip this                 check by setting SUSPEND2DISK_SKIP_RESUME_CHECK to 'yes' in                 the sleep configuration file.; Current Active Scheme: ERROR - ACPI event line: CONTINUE
Mar 25 09:20:31 ArchThinkpad powersave-notify[5688]: INFO: process script: notify
Mar 25 09:20:31 ArchThinkpad powersave-notify[5688]: DIAG: script_return() invoked: event_id: 15, request: 2, text: The resume partition is not set up. Probably you need to add a 'resume=...' option to your kernel command line and reboot. Suspend to disk and resume is not possible without a resume partition, please consult the documentation. You can skip this check by setting SUSPEND2DISK_SKIP_RESUME_CHECK to 'yes' in the sleep configuration file.
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: DIAG: script_return() invoked: event_id: 15, request: 4, text: 101
Mar 25 09:20:31 ArchThinkpad powersave-prepare_suspend_to_disk[5639]: DIAG: script_return() invoked: event_id: 15, request: 1, text: no resume parameter
Mar 25 09:20:31 ArchThinkpad powersave-do_x_notification[5699]: DIAG: Process script for event The resume partition is not set up. Probably you need to add a 'resume=...' option to your kernel command line and reboot. Suspend to disk and resume is not possible without a resume partition, please consult the documentation. You can skip this check by setting SUSPEND2DISK_SKIP_RESUME_CHECK to 'yes' in the sleep configuration file. ID 
Mar 25 09:20:31 ArchThinkpad powersave-do_x_notification[5699]: INFO: Event: THE RESUME PARTITION IS NOT SET UP_ PROBABLY YOU NEED TO ADD A 'RESUME=_..' OPTION TO YOUR KERNEL COMMAND LINE AND REBOOT. SUSPEND TO DISK AND RESUME IS NOT POSSIBLE WITHOUT A RESUME PARTITION, PLEASE CONSULT THE DOCUMENTATION. YOU CAN SKIP THIS CHECK BY SETTING SUSPEND2DISK_SKIP_RESUME_CHECK TO 'YES' IN THE SLEEP CONFIGURATION FILE. occured.
Mar 25 09:20:31 ArchThinkpad powersave-do_x_notification[5699]: INFO: Parameters: Event - The resume partition is not set up. Probably you need to add a 'resume=...' option to your kernel command line and reboot. Suspend to disk and resume is not possible without a resume partition, please consult the documentation. You can skip this check by setting SUSPEND2DISK_SKIP_RESUME_CHECK to 'yes' in the sleep configuration file.; Current Active Scheme:  - ACPI event line: 
Mar 25 09:20:31 ArchThinkpad powersave-do_x_notification[5699]: INFO: process script: do_x_notification

Last edited by orjanp (2007-04-13 13:08:00)


Ørjan Pettersen

Offline

#2 2007-04-13 13:37:15

orjanp
Member
From: Tromsoe, Norway
Registered: 2004-07-03
Posts: 347

Re: Powersave setup

The messages.log says.

Mar 25 09:20:31 ArchThinkpad powersave-do_x_notification[5699]: INFO: Parameters: Event - The resume partition is not set up. Probably you need to add a 'resume=...' option to your kernel command line and reboot. Suspend to disk and resume is not possible without a resume partition, please consult the documentation. You can skip this check by setting SUSPEND2DISK_SKIP_RESUME_CHECK to 'yes' in the sleep configuration file.; Current Active Scheme:  - ACPI event line:

Witch documentation is this? The webpage that I have linked to above, does not explain anything about the 'resume' option. Neither does the README files.
Can someone explain how to use swapspace or a normal partition as resume partition?

I really need help to get this to work.

Orjanp...


Ørjan Pettersen

Offline

#3 2007-04-13 15:16:57

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: Powersave setup

I do not know anything about powersave documentation. However, powersave, from the point of view of suspension, is just ome among many scripts (if you want my advice, the best one is hibernate-script from the suspend2 project, useful also for suspension to ram and vanilla suspension to disk) which calls the kernel suspension capabilities. In general, the linux kernel needs the resume boot parameter: this is surely documented in the kernel docs.

If you use grub, the resume parameter should be in the kernel line. Let us suppose that your swap partition is /dev/sda2: then add this to the kernel line in /boot/grub/menu.lst:

resume=/dev/sda2

This should work both with suspend2 and vanilla suspend.


Mortuus in anima, curam gero cutis

Offline

#4 2007-04-19 09:48:08

orjanp
Member
From: Tromsoe, Norway
Registered: 2004-07-03
Posts: 347

Re: Powersave setup

Thanks.

I have the resume boot parameter in grub, but I still get the message in Message.log. I did not know that this was a kernel capabillity, so I did not think of looking in the kernel documentation.

I will have a look at the hibernate-script.

Thanks again for the help.

Oerjan...


Ørjan Pettersen

Offline

#5 2007-04-20 08:06:20

orjanp
Member
From: Tromsoe, Norway
Registered: 2004-07-03
Posts: 347

Re: Powersave setup

I finally got Powersave working. I did not change to hibernate-script because it seems lik it needs a patched kernel. Powersave does not.

The problem was that I had a ':' in the resume boot parameter.

Just for refrence, since there is not much information about this error on the net.
When I tryed to invoke powersave, i had the following error:

Event - Swap partition '8:9' is not available, cannot suspend to disk.

Do a

# dmesg | grep swap

If there is no swap partion, for some reason, mine was not mounted,
you can do a

mkswap /dev/sdXX

, where XX is the disk and partition, and reboot. Do not do this if you have a mounted swap partition.

Orjanp...


Ørjan Pettersen

Offline

#6 2007-04-21 14:27:43

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: Powersave setup

If it works, do not change: but for the sake of exactness the hibernate-script does not require a patched kernel: it is developed by the suspend2 team, which develops also a patchset (which is included in arch kernels kernel26suspend2 and kernel26beyond), but it works also with the vanilla, unpatched kernel.


Mortuus in anima, curam gero cutis

Offline

Board footer

Powered by FluxBB