Summary: | etc/rc.d/powerd: powerd_flags apparently vanished | ||||||
---|---|---|---|---|---|---|---|
Product: | Documentation | Reporter: | Michael <michael.hmich> | ||||
Component: | Manual Pages | Assignee: | Guangyuan Yang <ygy> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | CC: | doc, fbsdbugs4, felix.the.red, jamie, nate, pstef, ygy | ||||
Priority: | --- | Keywords: | easy, patch | ||||
Version: | Latest | ||||||
Hardware: | amd64 | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Michael
2021-09-06 18:19:31 UTC
Thank you for your report Michael. It appears 'powerd_flags' was removed from the /etc/rc.d/powerd rc script in 2005: https://github.com/freebsd/freebsd-src/commit/7f19cfc0addb24319a4c7789c07546c720070637 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 *** Bug 258321 has been marked as a duplicate of this bug. *** 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: /etc/rc.d/ypbind:command_args="${nis_client_flags}" # 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" powerd_enable=YES # # service powerd start Starting powerd. powerd: bad option: -b boo /etc/rc.d/powerd: WARNING: failed to start powerd # Cheers Jamie (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_enable="YES" powerd_flags="-n adp" it is working now as it should 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! Cheers (In reply to Jamie Landeg-Jones from comment #5) ok! I see and will check this powerdxx, thanks for the tip powerd_flags is mentioned in RC.CONF(5). well, still you need a wizzard at your side ... powerd_flags (str) If powerd_enable is set to “YES”, these are the flags to pass to the powerd(8) daemon. the wizzard then solves the riddle "these" for you :) It just means that whatever you put into the variable, will be passed to powerd. So you do `man 8 powerd` and pick whatever you want. well doesn't help so much when we both are tingling around, when you think that it is all right, ok, who am I ... in any case, in man powerd is not one word about rc.conf, it also doesn't talk about flags, it tells us that are options to call the daemon with in resume, it is not about me, I can help myself, but a new average user, in this case, can not figure out what and how to do How about resolving this by adding rc.conf(5) to the powerd man page SEE ALSO Created attachment 228304 [details]
powerd(8) patch
Include reference to rc.conf(5) in SEE ALSO.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=ec071430a7822997619fe6d99853d8f49ea10b20 commit ec071430a7822997619fe6d99853d8f49ea10b20 Author: Felix Johnson <felix.the.red@gmail.com> AuthorDate: 2021-11-07 02:39:23 +0000 Commit: Guangyuan Yang <ygy@FreeBSD.org> CommitDate: 2021-11-07 02:43:30 +0000 powerd(8): Add rc.conf(5) to see also powerd_flags is mentioned in rc.conf(5) and can be set there and pass to powerd. PR: 258320 MFC after: 3 days Reported by: Michael <michael.hmich@gmail.com> usr.sbin/powerd/powerd.8 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e8e8c6c2bf3279d2e12f6a89dfbe9452824a3cb3 commit e8e8c6c2bf3279d2e12f6a89dfbe9452824a3cb3 Author: Felix Johnson <felix.the.red@gmail.com> AuthorDate: 2021-11-07 02:39:23 +0000 Commit: Guangyuan Yang <ygy@FreeBSD.org> CommitDate: 2021-11-10 19:12:59 +0000 powerd(8): Add rc.conf(5) to see also powerd_flags is mentioned in rc.conf(5) and can be set there and pass to powerd. PR: 258320 Reported by: Michael <michael.hmich@gmail.com> (cherry picked from commit ec071430a7822997619fe6d99853d8f49ea10b20) usr.sbin/powerd/powerd.8 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) cool, thanks :) |