Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

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

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#29956 - [pm-utils] HOOK_BLACKLIST doesn't work at startup

Attached to Project: Arch Linux
Opened by Federico (nierro) - Sunday, 20 May 2012, 13:20 GMT
Last edited by Andreas Radke (AndyRTR) - Friday, 01 June 2012, 05:43 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture i686
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: While booting into my xfce 4.10, i see in my /var/log/pm-powersave.log that hooks for power management are executed even if i have (as wiki says) a file in /etc/pm/config.d/ with the HOOK_BLACKLIST option.
By the way, it seems that those files are executed only during startup and not after i plug /unplug ac.
So, to be able to set my powermanagement correctly, i had to create blank files in /etc/pm/power.d/ with the same name as /usr/lib/pm-utils/power.d/ .


Additional info:
pm-utils 1.4.1-4
pm-powersave.log after startup [attached file].


Steps to reproduce:
Boot my machine and check pm-powersave.log .
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Friday, 01 June 2012, 05:43 GMT
Reason for closing:  None
Comment by Federico (nierro) - Wednesday, 23 May 2012, 11:39 GMT
well, tried putting an "echo bye bye" in a /usr/lib/pm-utils/power.d/ script and it seems they're not executed (i can't find any "bye bye" in pm-powersave.log). But pm-powersave.log tells they are.
May be there is something wrong in the "echo" of the pm-powersave function. I think it must tell me what are the blacklisted hooks. I can only see them in pm-suspend.log:
Initial commandline parameters:
Blacklisting laptop-mode.
Blacklisting hal-cd-polling.
Blacklisting intel-audio-powersave.
Blacklisting journal-commit.
Blacklisting pcie_aspm.
Blacklisting readahead.
Blacklisting sata_alpm.
Blacklisting sched-powersave.
Blacklisting wireless.
Blacklisting xfs_buffer.
Comment by Leonid Isaev (lisaev) - Friday, 25 May 2012, 22:31 GMT
I may be wrong here but are you sure that hooks are actually run. Here is a relevant piece of /usr/lib/pm-utils/pm-functions;
_run_hook() {
# $1 = hook to run
# rest of args passed to hook unchanged.
log "Running hook $*:"
hook_ok "$1" && "$@"
log ""
log -n "$*: "
hook_exit_status $? && LAST_HOOK="${1##*/}" || inhibit
}
For a disabled hook, hook_ok() returns 252 instead of 0, so "$@"=$hook $parameters is avoided. However, a log entry is till made. You can check this by replacing "$@" with (logger "abc" "$@") and see if "abc" appears in /var/log/messages.
Comment by Federico (nierro) - Saturday, 26 May 2012, 08:54 GMT
Yes they're not executed in fact...so, sorry for the stupid report.
I'd only like to see my blacklisted hooks in pm-powersave.log too, that now aren't shown.
By the way, really thanks for the support.

Loading...