Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 230137 - why not provide tuxonice-friendly hal power scripts?
Summary: why not provide tuxonice-friendly hal power scripts?
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-30 07:32 UTC by Ákos Maróy
Modified: 2010-05-20 11:48 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
tuxonice patch for pm-utils (pm-utils-tuxonice.patch,720 bytes, text/plain)
2009-02-02 14:12 UTC, Michal Slonina
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ákos Maróy 2008-06-30 07:32:15 UTC
currently, one has to update the hal-system-power-hibernate and hal-system-power-suspend scripts in /usr/lib/hal/scripts if one wants to use tuxonice for suspend / hibernation from gnome (e.g. via the gnome power manager / gnome UI, the gnome power button). the update is not difficult, described here: http://gentoo-wiki.com/HOWTO_TuxOnIce#Using_gnome-power-manager

but still, it would be nice if the package would be emerged in a way that if the tuxonice hibernate scripts are there, it would use them. after all, tuxonice is the only viable option for suspending and hibernating laptops.

Reproducible: Always
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-06-30 08:53:27 UTC
like you said the modification is to be done in hal, reassigning.

Anyway there is nothing to do here because:
1) tuxonice scripts should plug into pm-utils
2) even if you don't use tuxonice scripts, pm-utils has good default and tuxonice can replace default suspend.
Comment 2 Ákos Maróy 2008-06-30 09:00:33 UTC
(In reply to comment #1)
> like you said the modification is to be done in hal, reassigning.
> 
> Anyway there is nothing to do here because:
> 1) tuxonice scripts should plug into pm-utils

fair enough

> 2) even if you don't use tuxonice scripts, pm-utils has good default and
> tuxonice can replace default suspend.

but it doesn't. what should be changed so that it does?

the aim is to have this working out-of-the box...
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-06-30 09:22:08 UTC
it's an option in the kernel. Imho there is no use in tuxonice if this option is disabled :)
Comment 4 Ákos Maróy 2008-06-30 09:27:41 UTC
(In reply to comment #3)
> it's an option in the kernel. Imho there is no use in tuxonice if this option
> is disabled :)

well, it's enabled, but suspend / hibernation has to happen by calling the hibernate-ram and hibernate scripts respectively. these are specific to tuxonice, and they are not called by default in the current environment. (hence the manual script change, that does call it if they exist)

this is what would need to be changed, that these scripts are called if they exist.
Comment 5 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-06-30 09:30:59 UTC
no that's what I'm trying to tell you, tuxonice can change kernel's suspend hook by its own hooks hence no need to use tuxonice-scripts besides for the functionnality it provides which could be mapped into pm-utils hooks.
Comment 6 Ákos Maróy 2008-06-30 09:34:03 UTC
(In reply to comment #5)
> no that's what I'm trying to tell you, tuxonice can change kernel's suspend
> hook by its own hooks hence no need to use tuxonice-scripts besides for the
> functionnality it provides which could be mapped into pm-utils hooks.

I don't see this to be the case, and all documentation about tuxonice points to using the hibernate scripts. if the above is indeed true, can you provide corresponding documentation?
Comment 7 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-06-30 10:16:24 UTC
Like I said it's right there in kernel documentation:

 [*]   Replace swsusp by default 

CONFIG_TOI_REPLACE_SWSUSP:                                                  │   
  │                                                                         │   
  │ TuxOnIce can replace swsusp. This option makes that the default state,  │   
  │ requiring you to echo 0 > /sys/power/tuxonice/replace_swsusp if you wan │   
  │ to use the vanilla kernel functionality. Note that your initrd/ramfs wi │   
  │ need to do this before trying to resume, too.                           │   
  │ With overriding swsusp enabled, echoing disk  to /sys/power/state will  │   
  │ start a TuxOnIce cycle. If resume= doesn't specify an allocator and bot │   
  │ the swap and file allocators are compiled in, the swap allocator will b │   
  │ used by default.                        
Comment 8 Ákos Maróy 2008-06-30 11:01:31 UTC
(In reply to comment #7)
> Like I said it's right there in kernel documentation:
> 
>  [*]   Replace swsusp by default 
> 
> CONFIG_TOI_REPLACE_SWSUSP:                                                  │ 

of course I have this set:

# zcat /proc/config.gz | grep CONFIG_TOI_REPLACE_SWSUSP
CONFIG_TOI_REPLACE_SWSUSP=y
# cat /sys/power/tuxonice/replace_swsusp
1


but it won't suspend properly the 'ordinary' way. one has to run the hibernate script. it seems that there's more to suspending then just echoing to /sys/power/state, and this additional work is done in the hibernate script.

it seems that you're not using tuxonice, and are not suspending day by day. of course it's hard to appreciate the issues if one is not a user. my suggestion is just to make Gentoo friendlier by working out of the box. (for example, the latest Fedora suspsends and hibernates properly right out of the box.)
Comment 9 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-06-30 11:15:06 UTC
FTR, I use both regular suspend and tuxonice suspend day by day (on 3 boxes at home). Now if you'd read what I wrote, I said that pm-utils does tricks to achieve proper hibernation already. If it doesn't work for you, then there is something that is done by hibernate-scripts or yourself that needs to go in pm-utils, where the tricks are.
Comment 10 Ákos Maróy 2008-06-30 11:18:19 UTC
(In reply to comment #9)
> FTR, I use both regular suspend and tuxonice suspend day by day (on 3 boxes at
> home). Now if you'd read what I wrote, I said that pm-utils does tricks to
> achieve proper hibernation already. If it doesn't work for you, then there is
> something that is done by hibernate-scripts or yourself that needs to go in
> pm-utils, where the tricks are.

interesting. well, I did not change anything in these, except the script alterations from the gentoo-wiki page. so in terms of 'working out of the box': well, it doesn't :(

but I don't see why is it painful to have scripts that actually call the hibernate script that works for sure.

tell me what input I can provide further that makes this work for sure. the section in the gentoo-wiki pages also suggests that it's not just me who has to change these scripts...

anything to achieve proper working :)
Comment 11 Michal Slonina 2009-02-02 13:51:10 UTC
I have the same problem with pm-utils and tuxonice.

Doing the suspend from hibernate/hibernate-ram script works like a charm,
doing the hibernate thru the ugly RH pm quirks puts the machine into "forever suspended" mode (even with in-kernel suspend).

Let me know if you need any info about my system.
(Lenovo T61p/nvidia v.180.27/kernel 2.6.28.2/tuxonice swsuspend replace on).
Comment 12 Michal Slonina 2009-02-02 14:12:39 UTC
Created attachment 180695 [details]
tuxonice patch for pm-utils
Comment 13 Michal Slonina 2009-02-02 14:13:53 UTC
The following trivial modification to hal functions doesn't do 
any harm if sys-power/hibernate-script is not installed.
Is there any chance to get this included in gentoo, or push the needed functionality somehow to upstream ?
Comment 14 Pacho Ramos gentoo-dev 2009-02-02 15:14:42 UTC
I don't have any problem with pm-utils and tuxonice :-/, maybe your problem is different and people in pm-utils mailling list could help you:
http://lists.freedesktop.org/mailman/listinfo/pm-utils
Comment 15 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-02-02 22:07:04 UTC
since gentopia -> fdo, we don't need to be CCed here since we are in fdo already.
Comment 16 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-05-20 11:48:25 UTC
Could you update us on this issue ?