[opensuse] Configuring a working Suspend-to-Disk method?
Hello, I'd like to use Suspend-to-Disk on one of my computers. The normal openSUSE methods (tested: KDE start menu and "powersave -U") do not work as expected. The computer suspends and switches off, but after switch-on I see, that the kernel does not find a valid hibernation image: $ dmesg [...] [ 3.884656] PM: Starting manual resume from disk [ 3.884659] PM: Hibernation image partition 8:3 present [ 3.884659] PM: Looking for hibernation image. [ 3.884809] PM: Image not found (code -22) [ 3.884809] PM: Hibernation image not present or could not be loaded. [...] After some debugging with /usr/src/linux-*/Documentation/power/basic-pm-debugging.txt I found that the following method # echo platform > /sys/power/disk # echo disk > /sys/power/state works ok. Debugging with http://en.opensuse.org/SDB:Suspend_to_disk was not successful. I am not sure, but I believe, that problems in my setup are caused by s2disk. My question: Is it possible to configure openSUSE so, that the working method ("echo disk > /sys/power/state", see above) is used in KDE and maybe in "powersave -U" instead of the other method (s2disk)? Greetings, Björn -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am Montag, 10. Dezember 2012, 14:32:28 schrieb Bjoern Voigt:
I'd like to use Suspend-to-Disk on one of my computers.
Which openSUSE version do you use?
The normal openSUSE methods (tested: KDE start menu and "powersave -U") do not work as expected. The computer suspends and switches off, but after switch-on I see, that the kernel does not find a valid hibernation image:
Did you check /var/log/pm-suspend.log for any errors? Maybe some module prevents fully writing the image to disk. Candidates are fglrx, nvidia, nouveau, external USB devices, etc...
$ dmesg [...] [ 3.884656] PM: Starting manual resume from disk [ 3.884659] PM: Hibernation image partition 8:3 present [ 3.884659] PM: Looking for hibernation image. [ 3.884809] PM: Image not found (code -22) [ 3.884809] PM: Hibernation image not present or could not be loaded. [...]
After some debugging with /usr/src/linux-*/Documentation/power/basic-pm-debugging.txt I found that the following method
# echo platform > /sys/power/disk # echo disk > /sys/power/state
works ok.
What is your default hibernation mode? That is, what is the output of "cat /sys/power/disk" before echoing "platform" to it? It should be platform (see /etc/suspend.conf), however, lets check this first.
Debugging with http://en.opensuse.org/SDB:Suspend_to_disk was not successful. I am not sure, but I believe, that problems in my setup are caused by s2disk.
While some information may be still relevant, the article above mentioned is for old openSUSE versions (11.x).
My question: Is it possible to configure openSUSE so, that the working method ("echo disk > /sys/power/state", see above) is used in KDE and maybe in "powersave -U" instead of the other method (s2disk)?
AFAIK the hibernation mode is set in /etc/suspend.conf . Gruß Jan -- You can make it foolproof, but you can't make it damn foolproof. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Jan Ritzerfeld wrote:
Which openSUSE version do you use? Thanks. I use openSUSE 12.2 with the latest kernel (3.6.9-1-desktop) from Kernel:stable:standard repository.
The normal openSUSE methods (tested: KDE start menu and "powersave -U") do not work as expected. The computer suspends and switches off, but after switch-on I see, that the kernel does not find a valid hibernation image: Did you check /var/log/pm-suspend.log for any errors? Maybe some module prevents fully writing the image to disk. Candidates are fglrx, nvidia, nouveau, external USB devices, etc... Yes, at first there was a problem with my TV card. I fixed this driver problem earlier with a custom file. After that I did not see any errors or warnings in /var/log/pm-suspend.log, but hibernation with default method (SLEEP_MODULE="uswsusp") does not work.
/etc/pm/sleep.d/98tv-card: #!/bin/bash . $PM_UTILS_LIBDIR/functions case "$1" in hibernate|suspend) stopservice mythbackend modprobe -r dvb_usb_dib0700 ;; thaw|resume) modprobe dvb_usb_dib0700 restartservice mythbackend ;; *) ;; esac exit 0
What is your default hibernation mode? That is, what is the output of "cat /sys/power/disk" before echoing "platform" to it? It should be platform (see /etc/suspend.conf), however, lets check this first. "platform" is my default hibernation mode.
$ cat /sys/power/disk [platform] shutdown reboot suspend
My question: Is it possible to configure openSUSE so, that the working method ("echo disk > /sys/power/state", see above) is used in KDE and maybe in "powersave -U" instead of the other method (s2disk)? AFAIK the hibernation mode is set in /etc/suspend.conf . I did not find a matching variable for hibernation method in /etc/suspend.conf. I set "splash n" in /etc/suspend.conf because of https://bugzilla.novell.com/show_bug.cgi?id=782817, but I did not test, if this change is necessary. I changed the default hibernation method with a custom file
/etc/pm/config.d/sleep-module.config: SLEEP_MODULE="kernel" I found a hint for this in /usr/lib/pm-utils/defaults. With SLEEP_MODULE="kernel" I can successfully hibernate my PC. SLEEP_MODULE="uswsusp" still does not work. Greetings, Björn -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am Dienstag, 11. Dezember 2012, 22:15:40 schrieb Bjoern Voigt:
Jan Ritzerfeld wrote:
Which openSUSE version do you use?
Thanks. I use openSUSE 12.2
Is this a clean installtion or an update?
with the latest kernel (3.6.9-1-desktop) from Kernel:stable:standard repository.
By any chance, do you (or grub) try to resume with the wrong kernel? /usr/share/doc/packages/suspend/HOWTO states that very clearly. The suspend package includes a mkinitrd script that seems to integrate the resume stuff into the normal initrd.
[...] Yes, at first there was a problem with my TV card. I fixed this driver problem earlier with a custom file. After that I did not see any errors or warnings in /var/log/pm-suspend.log, but hibernation with default method (SLEEP_MODULE="uswsusp") does not work.
Okay, I now found this setting, too. :)
[...]
What is your default hibernation mode? That is, what is the output of "cat /sys/power/disk" before echoing "platform" to it? It should be platform (see /etc/suspend.conf), however, lets check this first.
"platform" is my default hibernation mode.
Okay.
[...]
AFAIK the hibernation mode is set in /etc/suspend.conf .
I did not find a matching variable for hibernation method in /etc/suspend.conf.
My 12.2 installation has it in line 21. BTW, how does /var/lib/s2disk.conf look like?
I set "splash n" in /etc/suspend.conf because of https://bugzilla.novell.com/show_bug.cgi?id=782817, but I did not test, if this change is necessary.
https://bugzilla.novell.com/show_bug.cgi?id=728656 seems interesting, too. At least there are some hints about debugging.
I changed the default hibernation method with a custom file
I must admit that I do not completely understand the hibernation process. However, it looks like the "uswsusp" module simply calls s2disk. And s2disk is contained in the suspend package, that includes /etc/suspend.conf, too. Thus, I assume that /etc/suspend.conf is the right configuration to look at. However, /etc/suspend.conf says in its header "_If_ you enter stuff here, it will be copied to that file [/var/lib/s2disk.conf] unchanged, but this might skip some features and sanity checks."
/etc/pm/config.d/sleep-module.config: SLEEP_MODULE="kernel"
I found a hint for this in /usr/lib/pm-utils/defaults.
Yes, I found an old lizards blog post, too.
With SLEEP_MODULE="kernel" I can successfully hibernate my PC.
That is good news!
SLEEP_MODULE="uswsusp" still does not work.
That not. Maybe opening a bug would be a good idea because "uswsusp" is supposed to be the safe way... Gruß Jan -- Never try and teach a pig to sing, it wastes your time and annoys the pig. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Jan Ritzerfeld wrote:
Which openSUSE version do you use? Thanks. I use openSUSE 12.2 with the latest kernel (3.6.9-1-desktop) from Kernel:stable:standard repository.
The normal openSUSE methods (tested: KDE start menu and "powersave -U") do not work as expected. The computer suspends and switches off, but after switch-on I see, that the kernel does not find a valid hibernation image: Did you check /var/log/pm-suspend.log for any errors? Maybe some module prevents fully writing the image to disk. Candidates are fglrx, nvidia, nouveau, external USB devices, etc... Yes, at first there was a problem with my TV card. I fixed this driver problem earlier with a custom file. After that I did not see any errors or warnings in /var/log/pm-suspend.log, but hibernation with default method (SLEEP_MODULE="uswsusp") does not work.
/etc/pm/sleep.d/98tv-card: #!/bin/bash . $PM_UTILS_LIBDIR/functions case "$1" in hibernate|suspend) stopservice mythbackend modprobe -r dvb_usb_dib0700 ;; thaw|resume) modprobe dvb_usb_dib0700 restartservice mythbackend ;; *) ;; esac exit 0
What is your default hibernation mode? That is, what is the output of "cat /sys/power/disk" before echoing "platform" to it? It should be platform (see /etc/suspend.conf), however, lets check this first. "platform" is my default hibernation mode.
$ cat /sys/power/disk [platform] shutdown reboot suspend
My question: Is it possible to configure openSUSE so, that the working method ("echo disk > /sys/power/state", see above) is used in KDE and maybe in "powersave -U" instead of the other method (s2disk)? AFAIK the hibernation mode is set in /etc/suspend.conf . I did not find a matching variable for hibernation method in /etc/suspend.conf. I set "splash n" in /etc/suspend.conf because of https://bugzilla.novell.com/show_bug.cgi?id=782817, but I did not test, if this change is necessary. I changed the default hibernation method with a custom file
/etc/pm/config.d/sleep-module.config: SLEEP_MODULE="kernel" I found a hint for this in /usr/lib/pm-utils/defaults. With SLEEP_MODULE="kernel" I can successfully hibernate my PC. SLEEP_MODULE="uswsusp" still does not work. Greetings, Björn -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Bjoern Voigt
-
Jan Ritzerfeld