Bug 258320 - etc/rc.d/powerd: powerd_flags apparently vanished
Summary: etc/rc.d/powerd: powerd_flags apparently vanished
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Kubilay Kocak
: 258321 (view as bug list)
Depends on:
Reported: 2021-09-06 18:19 UTC by Michael
Modified: 2021-09-08 14:41 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Michael 2021-09-06 18:19:31 UTC
I looked for it but haven't found it, neither on Freebsd'd online dos and man pages

then I set like in "old times" and powerd_flags in rc.conf are still working as expected 

probably worse to have a look at it

Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-09-07 02:12:19 UTC
Thank you for your report Michael.

It appears 'powerd_flags' was removed from the /etc/rc.d/powerd rc script in 2005: 


If you have reason to believe or recent evidence to suggest that powerd_flags existed in other forms in currently supported (non-EoL) FreeBSD version branches, and/or that powerd_flags was inadvertently removed, please re-open this issue with additional information
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2021-09-07 02:13:01 UTC
*** Bug 258321 has been marked as a duplicate of this bug. ***
Comment 3 Jamie Landeg-Jones 2021-09-07 15:04:55 UTC
powerd_flags are still used.

The line: command_args="${powerd_flags}"

was removed as it's redundant - The rc subsystem automatically sets command_args to {progname}_args

You only need to use this if setting the args from another program, eg:


# uname -a
FreeBSD catflap.dyslexicfish.net 13.0-RELEASE FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f: Fri Apr  9 04:24:09 UTC 2021     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64
# grep powerd /etc/rc.conf
powerd_flags="-b boo"
# service powerd start
Starting powerd.
powerd: bad option: -b boo
/etc/rc.d/powerd: WARNING: failed to start powerd

Cheers Jamie
Comment 4 Michael 2021-09-08 10:06:19 UTC
(In reply to Jamie Landeg-Jones from comment #3)

obviously it fails because -b boo doesn't exist ...

but works with real options, without options powerd is running blank, apparently there are no default options hardcoded 

I got curious because my pc run constantly on full power 

after setting

powerd_flags="-n adp"

it is working now as it should
Comment 5 Jamie Landeg-Jones 2021-09-08 12:13:11 UTC
Um, I know that!

I was replying to Kubilay who said that powerd_flags area no longer used, and then closed this ticket!

I intentionally set the flags in my example to something invalid to show they are still being processed!

Incidentally (and I'm not mentioning this as a resolution to your reported issue, but just for info), I found /usr/ports/sysutils/powerdxx/ (a drop in replacement for powerd) better as in addition to lowering CPU speed when idle, it monitors CPU temperature, and will throttle if that gets too high.

By the way, this ticket is still closed - you should reopen it!

Comment 6 Michael 2021-09-08 14:41:47 UTC
(In reply to Jamie Landeg-Jones from comment #5)

ok! I see and will check this powerdxx, thanks for the tip