[Bug 480804] New: pm-utils needs to have an analogue to HIBERNATE_METHOD for SUSPEND
https://bugzilla.novell.com/show_bug.cgi?id=480804 Summary: pm-utils needs to have an analogue to HIBERNATE_METHOD for SUSPEND Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: x86-64 OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: jnelson-suse@jamponi.net QAContact: qa@suse.de Found By: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.0.6) Gecko/2009012700 SUSE/3.0.6-0.1.2 Firefox/3.0.6 HIBERNATE does not work on my laptop at all. SUSPEND does but *only* if the kernel method is used (echo -n "mem" > /sys/power/state). s2ram does not work reliably. However, with HIBERNATE I can turn off the use of s2disk by setting HIBERNATE_METHOD to "kernel". I can't do something similar for SUSPEND, instead either removing/renameing /usr/sbin/s2ram or removing the package (suspend). if the package is removed, other dependancies bring it back in so I would really like an analogue to HIBERNATE_METHOD for SUSPEND. I'll even supply a quick patch if you'll use it (or something like it). This is on a Lenovo T61p with NVidia drivers. This would need to get fixed for factory, too. Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=480804 User cyhan@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=480804#c1 Chuanye Han <cyhan@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO CC| |cyhan@novell.com Info Provider| |jnelson-suse@jamponi.net --- Comment #1 from Chuanye Han <cyhan@novell.com> 2009-03-13 03:09:07 MST --- Jonh,thanks for your report. Could you please provide more information according to the following URL? Thank you! http://en.opensuse.org/Bugs:Suspend_Failure -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=480804 User jnelson-suse@jamponi.net added comment https://bugzilla.novell.com/show_bug.cgi?id=480804#c2 Jon Nelson <jnelson-suse@jamponi.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|jnelson-suse@jamponi.net | --- Comment #2 from Jon Nelson <jnelson-suse@jamponi.net> 2009-03-13 07:24:00 MST --- I could, but it wouldn't do you any good. The fact is, do_suspend() (located in /usr/lib/pm-utils/functions around line 226) does not have an analogue to HIBERNATE_METHOD which is used by do_hibernate() (starting around line 244). I'll even supply you with a patch shortly. Tested. Now, even in the presence of /usr/sbin/s2ram, if I place SUSPEND_METHOD="kernel" in /etc/pm/config.d/anyfile, then I get the kernel suspend behavior. --- /usr/lib/pm-utils/functions 2009-03-01 21:15:39.000000000 -0600 +++ functions 2009-03-13 08:19:24.000000000 -0500 @@ -30,6 +30,7 @@ INHIBIT=/var/run/pm-utils.inhibit PM_LOGFILE=${PM_LOGFILE:=/var/log/pm-suspend.log} SUSPEND_MODULES="" +SUSPEND_METHOD="" HIBERNATE_METHOD="" S2DISK_CONF="/var/lib/s2disk.conf" TEMPORARY_CPUFREQ_GOVERNOR="performance" @@ -228,16 +229,28 @@ local RET echo "INFO: going to suspend. In case of problems with the selected suspend options," echo "INFO: please read /usr/share/doc/packages/pm-utils/README.smart-suspend-to-RAM" - get_s2ram_opts - set -x - if [ -x /usr/sbin/s2ram ]; then - /usr/sbin/s2ram $S2RAM_OPTS - RET=$? - else - pm-pmu --suspend || echo -n "mem" > /sys/power/state - RET=$? + if [ -z "$SUSPEND_METHOD" ]; then + if [ -x /usr/sbin/s2ram ]; then + SUSPEND_METHOD="userspace" + else + SUSPEND_METHOD="kernel" + fi fi - set +x + case $SUSPEND_METHOD in + userspace) + set -x + get_s2ram_opts + /usr/sbin/s2ram $S2RAM_OPTS + RET=$? + set +x + ;; + kernel) + set -x + pm-pmu --suspend || echo -n "mem" > /sys/power/state + RET=$? + set +x + ;; + esac return $RET } @@ -361,7 +374,7 @@ fi return $RET done < /proc/modules - # if we came this far, there was nothing to do, + # if we came this far, there was nothing to do, # the module is no longer loaded. return 0 } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=480804 Cyril Hrubis <chrubis@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |seife@novell.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=480804 User seife@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=480804#c3 Stefan Seyfried <seife@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO CC| |rjw@novell.com Info Provider| |jnelson-suse@jamponi.net --- Comment #3 from Stefan Seyfried <seife@novell.com> 2009-03-19 09:01:06 MST --- Actually plain "s2ram -f" is doing not much different than "echo mem > /sys/power/state" So if there is a problem with "s2ram -f" we need to fix that in s2ram, not in pm-utils IMHO. Can you investigate what makes the difference (just commenting out some functions in s2ram should do the trick)? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=480804 User rjw@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=480804#c4 --- Comment #4 from Rafael Wysocki <rjw@novell.com> 2009-03-20 05:04:28 MST --- (In reply to comment #3)
Actually plain "s2ram -f" is doing not much different than "echo mem > /sys/power/state"
It does an additional VT switch, so if that breaks, there's a problem with the graphics adapter.
So if there is a problem with "s2ram -f" we need to fix that in s2ram, not in pm-utils IMHO.
I'm not sure if fixing that in s2ram is really possible. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=480804 User jnelson-suse@jamponi.net added comment https://bugzilla.novell.com/show_bug.cgi?id=480804#c5 Jon Nelson <jnelson-suse@jamponi.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|jnelson-suse@jamponi.net | --- Comment #5 from Jon Nelson <jnelson-suse@jamponi.net> 2009-03-24 17:10:57 MST --- s2ram looks like a binary to me. All I know is that s2ram doesn't work and that "echo mem > /sys/power/state" does. I spent hours trying to to get s2ram to work. It seems to me that incorporating a SUSPEND_METHOD approach doesn't really hurt, and could help some people. I agree that getting s2ram to work is a worthwhile goal, and if I find some time, perhaps I'll give that a shot. However, a WORKING suspend is better than no suspend at all, and while most users can set SUSPEND_METHOD in a variable, most user's can't edit C code. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=480804 User seife@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=480804#c6 --- Comment #6 from Stefan Seyfried <seife@novell.com> 2009-03-25 08:30:31 MST --- Could you please post the output of "cat /proc/cmdline" and "cat /proc/sys/kernel/acpi_video_flags" on that machine after booting? Maybe it is no s2ram problem after all... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=480804 User jnelson-suse@jamponi.net added comment https://bugzilla.novell.com/show_bug.cgi?id=480804#c7 --- Comment #7 from Jon Nelson <jnelson-suse@jamponi.net> 2009-03-25 08:41:15 MST --- [jnelson@worklaptop:~] cat /proc/cmdline root=/dev/sda1 resume=/dev/sda2 [jnelson@worklaptop:~] cat /proc/sys/kernel/acpi_video_flags 0 [jnelson@worklaptop:~] -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=480804 User jnelson-suse@jamponi.net added comment https://bugzilla.novell.com/show_bug.cgi?id=480804#c8 --- Comment #8 from Jon Nelson <jnelson-suse@jamponi.net> 2009-03-25 17:19:26 MST --- OK, more info. I still feel it would be worthwhile to add SUSPEND_METHOD for those that can't use s2ram (or are trying for HOURS to get suspend working....) That said, I got s2ram to work. I made 2 changes: 1. place S2RAM_QUIRKS_SOURCE="hal" in /etc/pm/config.d/suspend 2. edit /usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-lenovo.fdi change the config for my model (6460) to DISABLE all quirks: <!-- T61 (8895), intel card 32bit works with S3_MODE, but 64bit needs VBE_MODE --> <match key="system.hardware.product" prefix_outof="6465"> <merge key="power_management.quirk.s3_bios" type="bool">true</merge> <merge key="power_management.quirk.vbemode_restore" type="bool">true</merge> </match> <!-- T61p (6460), does not work with the NVidia driver --> <!-- seems to work now (driver 180.29) --> <!-- do *not* enable s3 bios or any vbe stuff --> <match key="system.hardware.product" prefix_outof="6460"> <merge key="power_management.quirk.none" type="bool">true</merge> </match> for some reason, this appears to work. The default s2ram opts seem to put the machine to sleep but it won't wake up again. I once experimented with lots of opts and have that written down somewhere but it's not handy right now. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=480804 User seife@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=480804#c9 Stefan Seyfried <seife@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |jnelson-suse@jamponi.net --- Comment #9 from Stefan Seyfried <seife@novell.com> 2009-03-26 05:17:49 MST --- In that case, /var/log/pm-suspend.log (without S2RAM_QUIRKS_SOURCE="hal") would be interesting (because pm-utils should call "s2ram --force" and no other options anyway if the nvidia module is detected but this seems to not work for you). So this now looks much more like a plain pm-utils bug rather than a s2ram bug or a missing pm-utils feature. Would it be possible to crash the machine once again (by removing the S2RAM_QUIRKS_SOURCE and suspending) and then attach /var/log/pm-suspend.log? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com