On Thu, Feb 23, 2023, 03:44 Jan Stary <[email protected]> wrote:

> On Feb 21 21:05:21, [email protected] wrote:
> > > Date: Tue, 21 Feb 2023 20:12:46 +0100
> > > From: Jan Stary <[email protected]>
> > >
> > > 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.
>
> Me neither.
>
> > > 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?
>
> Yes.
>

Afaik, the Mac when running MacOS on these low volt/watt supplies may
"indicate" charging, but they (those other supplies) are not the correct
chargers for the device...

I have had problems with clients who don't label their white power boxes or
read the tiny lettering, but there's no Mac computer (again, afaik) that
ships with a PSU less than 30 watts (old mb airs by Intel)...

The iphones, otoh, can handle the lower wattages - and used to prefer them
semi-exclusively...

Since I've been caught by surprise at least twice at customers locations
trying to debug the "it isn't charging!?!" problem before...  Good for you
(and obsd) for noticing it...

I usually add a sticky on the side labelling each white box since I often
need to find a 60+ or even 85-100+w supply for my clients... (Mb pros large
screens) Also, I've learned to carry several Mac charging-end converters to
cover situations where the PSU doesn't end with the right connector...  And
when purchasing replacements (the cables break on sales peoples laptops
from usage) I tend to get the 85+ watt ones just to ensure they're covered
even if they only needed the 30w before...

Good luck and have fun...


> I am trying now with three different power supplies,
> each of which is an adaptor with a USB-C cable.
> What I describe above happens with
>
> a 10W, 5.1V, 2.1A adaptor
> a 12W, 5.2V, 2.4A adaptor
>
> but it does not happen with
>
> a 61W, 20.3V, 3A adaptor;
> the machine is charging while running current.
>
> sysctl hw output for each of the three is below.
> Could it be just that? A stronger power supply?
>
> > > 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.
>
> For the three chargers:
>
> hw.sensors.aplsmc0.volt1=4.88 VDC (input)
> hw.sensors.aplsmc0.volt1=5.10 VDC (input)
> hw.sensors.aplsmc0.volt1=20.07 VDC (input)
>
> So yes, with this charger the input voltage is much higher,
> power and current as well.
>
> > 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.
>
> Are you please aware of a macOS tool that will let me see these numbers,
> so that I have a comparison of what macOS does on the low voltage?
>
> > 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.
>
> Right :-)
>
>         Thanks for the insight,
>
>                 Jan
>
>
> 10W:
>
> 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=31.50 degC (battery)
> hw.sensors.aplsmc0.temp1=38.98 degC (charger)
> hw.sensors.aplsmc0.temp2=37.40 degC (wireless)
> hw.sensors.aplsmc0.volt0=12.40 VDC (battery)
> hw.sensors.aplsmc0.volt1=4.88 VDC (input)
> hw.sensors.aplsmc0.power0=7.05 W (input)
> hw.sensors.aplsmc0.power1=9.11 W (system)
> hw.sensors.aplsmc0.current0=1.44 A (input)
> hw.sensors.aplsmc0.amphour0=3.59 Ah (remaining battery capacity)
> hw.sensors.aplsmc0.amphour1=4.13 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
>
> 12W:
>
> 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=31.40 degC (battery)
> hw.sensors.aplsmc0.temp1=39.09 degC (charger)
> hw.sensors.aplsmc0.temp2=37.50 degC (wireless)
> hw.sensors.aplsmc0.volt0=12.40 VDC (battery)
> hw.sensors.aplsmc0.volt1=5.10 VDC (input)
> hw.sensors.aplsmc0.power0=7.39 W (input)
> hw.sensors.aplsmc0.power1=9.09 W (system)
> hw.sensors.aplsmc0.current0=1.45 A (input)
> hw.sensors.aplsmc0.amphour0=3.59 Ah (remaining battery capacity)
> hw.sensors.aplsmc0.amphour1=4.13 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
>
> 61W:
>
> 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=34.40 degC (battery)
> hw.sensors.aplsmc0.temp1=50.61 degC (charger)
> hw.sensors.aplsmc0.temp2=46.28 degC (wireless)
> hw.sensors.aplsmc0.volt0=12.48 VDC (battery)
> hw.sensors.aplsmc0.volt1=20.07 VDC (input)
> hw.sensors.aplsmc0.power0=40.21 W (input)
> hw.sensors.aplsmc0.power1=11.45 W (system)
> hw.sensors.aplsmc0.current0=2.00 A (input)
> hw.sensors.aplsmc0.amphour0=2.60 Ah (remaining battery capacity)
> hw.sensors.aplsmc0.amphour1=4.10 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=145 (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