Re: what became of "apmd -C"?

2024-04-26 Thread Harald Dunkel

On 2024-04-24 09:30:29, Stuart Henderson wrote:


To get similar to previous behaviour, you can either install obsdfreqd
from packages (userland monitoring, similar to old old apmd -C), or
some people run with a kernel patch like this:

Index: kern/sched_bsd.c
===
RCS file: /cvs/src/sys/kern/sched_bsd.c,v
diff -u -p -r1.91 sched_bsd.c
--- kern/sched_bsd.c30 Mar 2024 13:33:20 -  1.91
+++ kern/sched_bsd.c24 Apr 2024 07:18:01 -
@@ -603,7 +603,7 @@ setperf_auto(void *v)
if (cpu_setperf == NULL)
return;
  
-	if (hw_power) {

+   if (0 && hw_power) {
speedup = 1;
goto faster;
}



Its too bad that saving power by default (without battery mode)
cannot be configured via sysctl anymore. I have installed obsfreqd,
of course.


Thank you for the reply
Harri



Re: what became of "apmd -C"?

2024-04-24 Thread Stuart Henderson
On 2024-04-24, Harald Dunkel  wrote:
> Hi folks,
>
> https://www.openbsd.org/faq/upgrade57.html doesn't mention it, so
> I wonder what became of "apmd -C"? The man page for OpenBSD 5.7
> silently dropped this option, but even apmd of 7.5 still accepts
> it.
>
> ?

apmd used to have code that checked cpu load and adjusted hw.setperf.
This moved to the kernel under hw.perfpolicy=auto which used to do
about the same thing, but was changed to use high all the time on
a machine where line power is connected.

To get similar to previous behaviour, you can either install obsdfreqd
from packages (userland monitoring, similar to old old apmd -C), or
some people run with a kernel patch like this:

Index: kern/sched_bsd.c
===
RCS file: /cvs/src/sys/kern/sched_bsd.c,v
diff -u -p -r1.91 sched_bsd.c
--- kern/sched_bsd.c30 Mar 2024 13:33:20 -  1.91
+++ kern/sched_bsd.c24 Apr 2024 07:18:01 -
@@ -603,7 +603,7 @@ setperf_auto(void *v)
if (cpu_setperf == NULL)
return;
 
-   if (hw_power) {
+   if (0 && hw_power) {
speedup = 1;
goto faster;
}



what became of "apmd -C"?

2024-04-24 Thread Harald Dunkel

Hi folks,

https://www.openbsd.org/faq/upgrade57.html doesn't mention it, so
I wonder what became of "apmd -C"? The man page for OpenBSD 5.7
silently dropped this option, but even apmd of 7.5 still accepts
it.

?

Regards
Harri