> Date: Fri, 18 Mar 2022 17:22:35 +0000
> From: "Nicola Dell'Uomo" <[email protected]>
> 
> Hi Mark,
> 
> apparently both commands succeed: hw.perfpolicy is set to manual and
> hw.setperf is set to the chosen value; but cpu clock is still stuck
> @2100.
> 
> I noticed an increase in cpu temp and a drop in battery life;
> however I read that some people are experiencing crashes with intel
> graphic driver, so I'm not totally sure these perfomance troubles
> are exclusively due to my cpu clock speed.  On average battery life
> passed from 6-8 hours to 2-4.

I think the diff below will fix your issue.


Index: dev/acpi/acpiac.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/acpiac.c,v
retrieving revision 1.34
diff -u -p -r1.34 acpiac.c
--- dev/acpi/acpiac.c   30 Oct 2021 23:24:47 -0000      1.34
+++ dev/acpi/acpiac.c   20 Mar 2022 21:31:54 -0000
@@ -118,9 +118,11 @@ void
 acpiac_refresh(void *arg)
 {
        struct acpiac_softc *sc = arg;
+       extern int hw_power;
 
        acpiac_getpsr(sc);
        sc->sc_sens[0].value = sc->sc_ac_stat;
+       hw_power = (sc->sc_ac_stat == PSR_ONLINE);
 }
 
 int
@@ -142,7 +144,6 @@ int
 acpiac_notify(struct aml_node *node, int notify_type, void *arg)
 {
        struct acpiac_softc *sc = arg;
-       extern int hw_power;
 
        dnprintf(10, "acpiac_notify: %.2x %s\n", notify_type,
            DEVNAME(sc));
@@ -162,6 +163,5 @@ acpiac_notify(struct aml_node *node, int
                dnprintf(10, "A/C status: %d\n", sc->sc_ac_stat);
                break;
        }
-       hw_power = (sc->sc_ac_stat == PSR_ONLINE);
        return (0);
 }

Reply via email to