pulpy_orange2[m] has quit [Server closed connection]
pulpy_orange2[m] has joined #asahi-re
retonlage[m] has quit [Server closed connection]
retonlage[m] has joined #asahi-re
YichaoYu[m] has quit [Server closed connection]
YichaoYu[m] has joined #asahi-re
<marcan>
so I'm looking at SMC firmware and now the 290915 mfg date for my battery makes "sense"
<marcan>
it's a bug, lol
<marcan>
they use a standard SBS command to get the date, and the format is standard; year is in years since 1980
<marcan>
but for some bizarre reason, instead of adding 1980, they subtract 68 instead, then truncate to 8 bits and use that as the number
<marcan>
68 is the additive inverse of 1980 in *11* math, not 8. maybe they have a char cast/variable somewhere where they meant a short, and 3 bits fell off.
<marcan>
* *11-bit*
<marcan>
(why they did it this way, not the faintest clue)
<marcan>
>>> ((41-0x44) & 0x7ff)
<marcan>
>>> ((41-0x44) & 0xff)
<marcan>
229
<marcan>
2021
<marcan>
so that is why I get 29, lol
<marcan>
actually the 68 thing is probably the compiler's doing
<marcan>
as simply put,
<marcan>
>>> 2021 & 0xff
<marcan>
229
<marcan>
so yeah, probably an incorrect variable type. ha.
<sven>
:D
<sven>
file a radar? :>
<marcan>
inb4 it's part of the interface now and they aren't changing it :>
<marcan>
another fun thing is that you can force lower current limits for certain USB ports, but the SMC firmware doesn't take that into account when picking a port
<marcan>
so you can end up in a situation where plugging in an additional charger makes it *stop* charging, because the charger is nominally faster than an existing one, but the current limit is set to 0 :D
<marcan>
anyway, I think I saved most of the battery-charging yaks, the driver now supports disabling charging and such so userspace can implement something like the macOS optimizations if it wants
<marcan>
just need to add an AC adapter device since some things expect there to be one
<marcan>
but that one is simpler
vup has joined #asahi-re
<landscape15[m]>
marcan: Does this mean you can have a “save battery health” feature built in Linux? If I remember, in macOS if you keep your Mac connected to power, it switch to AC-power.
<alyssa>
marcan: when will all this SMC/SPMI/RTC goodness hit asahilinux/linux:asahi?
bisko has joined #asahi-re
user982492 has joined #asahi-re
bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
user982492 has joined #asahi-re
user982492 has quit []
user982492 has joined #asahi-re
user982492 has quit []
user982492 has joined #asahi-re
user982492 has quit []
eragon has joined #asahi-re
user982492 has joined #asahi-re
bpye4 has joined #asahi-re
bpye has quit [Ping timeout: 480 seconds]
bpye4 is now known as bpye
amw has quit [Ping timeout: 480 seconds]
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amw has joined #asahi-re
user982492 has joined #asahi-re
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]