Summary: | sys-apps/hal - broken handling of hibernate vs. suspend | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | BDKoepke <bdkoepke> |
Component: | New packages | Assignee: | Project Gentopia <gentopia> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | braket, eva, gentoo-bugs, gnome, jonh, laurento.frittella, Martin.vGagern, serge, silas |
Priority: | High | ||
Version: | 2006.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
patch to add real suspend capability to gnome-power-manager
revised suspend patch for hibernate-script hal-0.5.7-hald-scripts.patch |
Description
BDKoepke
2006-05-18 21:54:35 UTC
(In reply to comment #0) > /usr/share/hal/hal-system-power-suspend needs detection script for either vbe > tool > or for hibernate-ram. (For advanced hibernation configuration). Works with > gnome-power-manager. (deleted other configuration added lines > /usr/sbin/hibernate-ram) > should have added script elseif [ -x "/usr/sbin/hibernate-ram" ] ; then /usr/sbin/hibernate-ram RET=$? gnome-power-manager does not auto reload config on boot.
To fix it added
> elseif [ -x "/usr/sbin/hibernate-ram" ] ; then
> /usr/sbin/hibernate-ram
> killall gnome-power-manager
>RET=$?
> gnome-power-manager
now it reloads with the correct ammount of power (normally shows empty)
DBKoepke, You're really not being clear on what the issue is... what needs to be changed. etc. basically the file /usr/share/hal/hal-system-power-suspend needs a detection script for hibernate-ram, on my system and probably many others, suspend only works with the hibernate-script, or vbetool. If you could add vbetool support to the hald scripts than that would work, however it would be easier if you just added the lines above so then it will execute 'hibernate-ram' instead of 'echo "mem" > /sys/power/state' (which is the default). This is really only important for those people who have to use the suspend2-sources kernel for suspend. Created attachment 88413 [details, diff]
patch to add real suspend capability to gnome-power-manager
here is the patch, tested and working here, please consider adding it to the gnome-power-manager ebuild.
The issue is with HAL, not gnome-power-manager I agree, I should have directed this towards HAL and not gnome as this is a global HAL problem. Fixed the patch and added it. shall we report upstream as a patch for supporting gentoo ? this is just a patch for people that have to use the hibernate-script in order to suspend to ram. This is not a gentoo specific problem, anyone that uses the hibernate script (even under another distrobution) will have the same problem. It may be better to report this directly to the HAL project, however I do not know if the hibernate-script is part of another distrobution or not. If someone else agrees that this is neccesairy, then I will report it directly to hal, and not as a gentoo-specific patch. At the moment, the patch doesn't work. I should have mentioned, the script must go before is detects the raw kernel interface otherwise it will always run echo mem /sys/power/state. it should look like this: elif [ -x "/usr/sbin/hibernate-ram" ] ; then # Use hibernate-ram if detected /usr/sbin/hibernate-ram RET=$? elif [ -w "/sys/power/state" ] ; then # Use the raw kernel sysfs interface echo "mem" > /sys/power/state RET=$? else # TODO: add other scripts support unsupported fi sorry for the mix up isn't it in hal-0.5.7-r3 already ? (In reply to comment #12) > isn't it in hal-0.5.7-r3 already ? yes it is, however because it is placed after : elif [ -w "/sys/power/state" ] ; then # Use the raw kernel sysfs interface echo "mem" > /sys/power/state RET=$? hibernate-ram never runs because the HAL always detects the raw kernel system interface and executes echo "mem" > /sys/power/state. (in order for suspend2 to work, you have to also have "mem" in /sys/power/state). The only way this will work is if the hibernate-ram detection is placed before the raw kernel interface is detected. (In reply to comment #13) > (In reply to comment #12) > > isn't it in hal-0.5.7-r3 already ? > > yes it is, however because it is placed after : > elif [ -w "/sys/power/state" ] ; then > # Use the raw kernel sysfs interface > echo "mem" > /sys/power/state > RET=$? > hibernate-ram never runs because the HAL always detects the raw kernel system > interface and executes echo "mem" > /sys/power/state. (in order for suspend2 to > work, you have to also have "mem" in /sys/power/state). The only way this will > work is if the hibernate-ram detection is placed before the raw kernel > interface is detected. > I'm very supprised that this bug is still there:( Nobody cares about it? Created attachment 97825 [details, diff]
revised suspend patch for hibernate-script
Can we please patch the existing, stable (x86) package, and push it out? It's BROKEN for me on may laptop (#@%$! ATI). This should fix the problem, since I *must* use hibernate-ram to have a shot at having anything but funky lines show up on my screen after suspend. *** Bug 141694 has been marked as a duplicate of this bug. *** *** Bug 152829 has been marked as a duplicate of this bug. *** *** Bug 152163 has been marked as a duplicate of this bug. *** *** Bug 158004 has been marked as a duplicate of this bug. *** *** Bug 158178 has been marked as a duplicate of this bug. *** *** Bug 161131 has been marked as a duplicate of this bug. *** *** Bug 161131 has been marked as a duplicate of this bug. *** I think hibernate-ram was wrongly added to hal-system-power-hibernate too. I noticed the new script /usr/share/hal/scripts/hal-system-power-hibernate in sys-apps/hal-0.5.7.1-r2 contains (before the "hibernate section"): [...] elif [ -x "/usr/sbin/hibernate-ram" ] ; then /usr/sbin/hibernate-ram RET=$? [...] We need to drop them out from the hibernate script (and leave it only in the suspend script). For example, with the actual version, if I try to hibernate the system from the gnome-power-manager my pc going to suspend. *** Bug 162325 has been marked as a duplicate of this bug. *** Note that the two patches here are almost identical but different in an important way: the older patch tries hibernate-ram *after* the dumb kernel suspend, which means hibernate-ram never gets used. We want the second patch, instead. Comment on attachment 88413 [details, diff]
patch to add real suspend capability to gnome-power-manager
To make this crystal clear, I'm marking my patch as obsolete.
Fixed in hal-0.5.7.1-r3 The ebuild, as of now, fails to unpack: * Failed Patch: hal-0.5.7.1-hibernate-fix-r1.patch ! * ( /usr/portage/sys-apps/hal/files/hal-0.5.7.1-hibernate-fix-r1.patch ) Well since neither of the patches actually apply to anything, you guys are going to have to deal with it broken for some more time. Until someone can provide a working patch. Notice bug 162624 about the fact that the patch from comment 15 won't apply. There is a conflict between that one and hal-0.5.7-hald-scripts.patch. So if this patch is what you want, make those two patches play nice. Should hibernate-ram be before or after this block? elif [ "$HAL_PROP_POWER_MANAGEMENT_TYPE" = "pmu" ]; then #PMU systems cannot use /sys/power/state yet, so use a helper to issue an ioctl hal-system-power-pmu sleep Created attachment 107396 [details, diff]
hal-0.5.7-hald-scripts.patch
Drop in replacement for current hal-0.5.7-hald-scripts.patch, this one should do the right thing (tm),
you should remove :
hal-0.5.7-hibernate.patch
hal-0.5.7.1-hibernate-fix.patch
which are either obsoleted by this patch or don't do what they are supposed to do.
It seems this trivial bug will never be fixed :( I've attempted to fix it 4 times. I don't use hibernate support at all, unfortunately, NO one can provide a functional patch ever. I will try Gilles latest patch for the next revision. Doug, thanks for taking care of this. I hope I can help with hibernate stuff as soon as I'll be a gentoo dev (which I hope should be soon). *** Bug 158527 has been marked as a duplicate of this bug. *** Still does not apply. Fixed for hal-0.5.7.1-r4 yes, the scripts are good now, thanks you so much :) |