Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#30050 - [pm-utils] Change /usr/lib/pm-utils/module.d/tuxonice line 33!

Attached to Project: Arch Linux
Opened by Federico (nierro) - Monday, 28 May 2012, 18:17 GMT
Last edited by Allan McRae (Allan) - Saturday, 02 June 2012, 11:19 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


Description: It is not a bug, probably.
But as now, hibernating with tuxonice and pm-utils, doesn't seem to read /etc/hibernate/common.conf and other configs made here.
Changing that line to "/usr/sbin/hibernate" simply, and putting SLEEP_MODULE="tuxonice" in /etc/pm/config.d/config makes tuxonice the default sleep module for pm-utils, and it respects all the customizations, as written here .
This task depends upon

Closed by  Allan McRae (Allan)
Saturday, 02 June 2012, 11:19 GMT
Reason for closing:  Not a bug
Additional comments about closing:  "Description: It is not a bug, probably."
Comment by Federico (nierro) - Monday, 28 May 2012, 18:51 GMT
It seems to work pretty perfectly with tuxonice patch and without (default kernel).
These are my /etc/pm/config.d/00sleep_module : SLEEP_MODULE="tuxonice uswsusp kernel"
And this is my /usr/lib/pm-utils/module.d/hibernate : .
Tell me if i'm doing something wrong, or if it could help improving tuxonice user experience with pm-utils!
EDIT: as soon as i tested it, i can say everything works ok, scriplets are executed too, perfectly. No errors.
Comment by Matthias Dienstbier (fs4000) - Tuesday, 29 May 2012, 09:10 GMT
Which package does provide you /usr/sbin/hibernate? I think it's hibernate-script. If pm-utils doesn't work it should get patched correctly and work on its own.
Comment by Federico (nierro) - Tuesday, 29 May 2012, 12:34 GMT
Yes it's hibernate-script, sorry for not poiting it out.
So i must report this to hibernate-script mantainer? Thanks, and sorry again!
Comment by Matthias Dienstbier (fs4000) - Tuesday, 29 May 2012, 13:15 GMT
It seems I misunderstood your problem. You want pm-utils to use hibernate-script? Then perhaps hibernate-script should offer an additional SLEEP_MODULE for pm-utils. But I don't see what this is good for.
Pm-utils should not by default depend on hibernate-script. It's designed to work on its own.
Comment by Federico (nierro) - Tuesday, 29 May 2012, 13:21 GMT
Yes, i know.
I only think that file ( /usr/lib/pm-utils/module.d/tuxonice) , needs tuxonice patch. But everyone who uses tuxonice patch, uses also hibernate-script.
So i thought there wasn't anything wrong in changing that line to use hibernate-script.
But may be i'm not right.
Btw, i asked hibernate-script maintainer on aur to do that change, so may be there will be better integration between pm-utils and tuxonice (+ hibernate-script).
Comment by Ng Oon-Ee (ngoonee) - Wednesday, 30 May 2012, 00:29 GMT
As current hibernate-script maintainer, I don't use any DE (nor pm-utils, because of that). Furthermore, seeing as pm-utils already provides /usr/lib/pm-utils/module.d/tuxonice OOTB, I can't very well provide that in hibernate-script.

Without much investigation, it seems if I added another file to /usr/lib/pm-utils/module.d the user could then set SLEEP_MODULE in /etc/pm/config.d/whatever? Doesn't seem to offer much advantage though, AFAIK if using pm-utils to hibernate the user just shouldn't use hibernate.conf and hibernate-script at all.

@Federico, please try adding another sleep module as mentioned in the previous paragraph, if that works I'll just include it in hibernate-script, not too difficult.
Comment by Federico (nierro) - Wednesday, 30 May 2012, 11:40 GMT
@Ng Oon-Ee: Ok, yes, i thought it too, i'll try ;) i'll tell you then.
I use pm-utils and hibernate-script. The advantages are that without using hibernate-script, leaving /usr/lib/pm-utils/module.d/tuxonice untouched, i have to set all the configs i need for tuxonice with lots of scripts (or with only one script doing lots of things) and put it in /etc/pm/sleep.d/.
But why do that when i have installed hibernate-script that allows the user to have lots of configs ready to work?
And often it is not so easy to find the right file to echo something, for example to disable some tuxonice features or something else.
So i'd love to have a /usr/lib/pm-utils/module.d/hibernate (for example) and a /etc/pm/config.d/hibernate_module (that contains may be SLEEP_MODULE="hibernate tuxonice kernel") provided by your package.
I think this could help lots of tuxonice users and improve their experience.
Anyway, thanks, i'll try soon and i'll tell you.
Comment by Federico (nierro) - Wednesday, 30 May 2012, 11:44 GMT
Ok it seems to work as expected.
What i did:
cp /usr/lib/pm-utils/module.d/tuxonice /usr/lib/pm-utils/module.d/hibernate
mv /usr/lib/pm-utils/module.d/tuxonice /usr/lib/pm-utils/
changed SLEEP_MODULE array in "hibernate tuxonice uswsusp kernel".
It works.
Comment by Ng Oon-Ee (ngoonee) - Thursday, 31 May 2012, 00:53 GMT
I've made the changes in hibernate-script, let me know if they work (also so that this bug can be closed).
Comment by Federico (nierro) - Thursday, 31 May 2012, 07:30 GMT
Thanks, i'll close this feature request :)