> Date: Tue, 21 Feb 2023 20:12:46 +0100
> From: Jan Stary <h...@stare.cz>
> 
> This is current/arm64 on MacBook Air (dmesg below).
> The machine seems to be _losing_ battery charge even when on AC.
> I have been watching sysctl hw for a few minutes (also below):
> 
> hw.sensors.aplsmc0.amphour0=0.20 Ah (remaining battery capacity)
> hw.sensors.aplsmc0.amphour0=0.19 Ah (remaining battery capacity)
> hw.sensors.aplsmc0.amphour0=0.18 Ah (remaining battery capacity)
> hw.sensors.aplsmc0.amphour0=0.17 Ah (remaining battery capacity)
> 
> The machine is idle while this happens.
> That's with apm -A, which means hw.setperf=100 on AC.
> Only with apm -L does the battery charge start to increase:
> 
> hw.sensors.aplsmc0.amphour0=0.17 Ah (remaining battery capacity)
> hw.sensors.aplsmc0.amphour0=0.18 Ah (remaining battery capacity)
> hw.sensors.aplsmc0.amphour0=0.19 Ah (remaining battery capacity)

Never seen this happen on any of my machines.

> It's not a HW problem: when running macOS on the machine
> (which, presumably, is able to utilize the M1 more effectively),
> the battery does charge on AC (while running a lot of Firefox tabs).

With the same power supply?

> $ sysctl hw
> hw.machine=arm64
> hw.model=Apple Icestorm r1p1
> hw.ncpu=8
> hw.byteorder=1234
> hw.pagesize=4096
> hw.disknames=sd0:0f72c500fa6fee6b
> hw.diskcount=1
> hw.sensors.aplcpu0.frequency0=2064.00 Hz
> hw.sensors.aplcpu0.frequency1=2988.00 Hz
> hw.sensors.aplsmc0.temp0=30.80 degC (battery)
> hw.sensors.aplsmc0.temp1=37.93 degC (charger)
> hw.sensors.aplsmc0.temp2=36.55 degC (wireless)
> hw.sensors.aplsmc0.volt0=11.04 VDC (battery)
> hw.sensors.aplsmc0.volt1=5.07 VDC (input)

This is strange.  The input voltage should definitely be higher under
normal circumstances.  OpenBSD currently does not do any USB PD
management.  So this is what the SMC negotiated.  Or maybe this is the
state in which macOS left things.  OpenBSD probably needs to do some
battery charging management at some point.  Until that is done, you
probably can get out of this state by booting into macOS and making
sure the battery is something like 80% charged before switching back
to OpenBSD.

> hw.sensors.aplsmc0.power0=7.34 W (input)
> hw.sensors.aplsmc0.power1=9.03 W (system)
> hw.sensors.aplsmc0.current0=1.45 A (input)
> hw.sensors.aplsmc0.amphour0=0.17 Ah (remaining battery capacity)
> hw.sensors.aplsmc0.amphour1=4.15 Ah (last full battery capacity)
> hw.sensors.aplsmc0.amphour2=4.38 Ah (battery design capacity)
> hw.sensors.aplsmc0.indicator0=On (power supply)
> hw.sensors.aplsmc0.raw0=144 (battery discharge cycles)
> hw.cpuspeed=2988
> hw.setperf=100
> hw.product=Apple MacBook Air (M1, 2020)
> hw.serialno=C02GWN39Q6L4
> hw.physmem=7916920832
> hw.usermem=7916904448
> hw.ncpufound=8
> hw.allowpowerdown=1
> hw.perfpolicy=auto
> hw.smt=0
> hw.ncpuonline=8
> hw.power=1
> 
> 

Reply via email to