Closed Peebuddy43 closed 3 years ago
Captured smc while battery was on hold by Apple's own Battery Health Management system.
This might be what we are looking for. Anyone knows if we had these 2 keys on Intel's?
Well, I spoke too soon. Looks like "B0RM" is "Remaining Capacity of Battery 0" and I believe Intel's already have it in SMC. However no idea what SBAR is. I cannot find it in any Intel SMC logs online
Full smc capture below if anyone would like to take a look. Again, this is when battery was on hold by Apple's BHM
-> freestylemaster, would you like to send us a smc dump after the charge on hold stops? So vi can do a diff.
-> freestylemaster, would you like to send us a smc dump after the charge on hold stops? So vi can do a diff.
Here's the smc log with no hold - at 100%. Both B0RM and SBAR is at 4310
Maybe all SMC in Apple Silicon Mac is "virtual" and "readonly".
I guess we'll just have to wait for Apple to release the XNU kernel source, then we'll be able to take a look if they do expose it via ARM SMC callback
Speaking of which, did anyone tried writing to SBAR?
Tried now, it looks like a down counting counter when on battery and up counting on power. Can't change the value with write another value to it.
Could it be BLTA
? When I run ./smc -l | grep "20 ("
, it gives me
BLTA [si8 ] -20 (bytes ec)
...and some other results...
However, when I turn off Optimized battery charging
, BLTA
is still -20
(maybe because there is another boolean SMC value for whether or not the option is turned on?).
When I understand the thread until now right , it doesent run on M1 chips ?
Today I finally go charging on hold. I assume it will stop charging from now on if I always connect to power adapter?
Today I finally go charging on hold. I assume it will stop charging from now on if I always connect to power adapter?
How did you do that?
Today I finally go charging on hold. I assume it will stop charging from now on if I always connect to power adapter?
How did you do that?
I just almost always plugged it in. ;-)
I have a different issue. My new MBA M1 shows that it uses power adapter and remaning time for full charge but the battery doesn't charge. Quite the opposite, the charge goes down as if the laptop was not connected to the adapter at all. This behavior happens from time to time and I'm not sure how I can provoke it. It doesn't help to pulls the cable out and put it back. Sometimes I have to restart the computer.
Today I finally go charging on hold. I assume it will stop charging from now on if I always connect to power adapter?
How did you do that?
I just almost always plugged it in. ;-)
Ok great, I only have mine plugged in constantly for a few days so hopefully it will learn soon.
I have a different issue. My new MBA M1 shows that it uses power adapter and remaning time for full charge but the battery doesn't charge. Quite the opposite, the charge goes down as if the laptop was not connected to the adapter at all. This behavior happens from time to time and I'm not sure how I can provoke it. It doesn't help to pulls the cable out and put it back. Sometimes I have to restart the computer.
That is truly weird, never happened to me yet
Today I finally go charging on hold. I assume it will stop charging from now on if I always connect to power adapter?
UPDATE: After I used my MacBook battery to 81%, it starts charging again.... So sad....
I have a different issue. My new MBA M1 shows that it uses power adapter and remaning time for full charge but the battery doesn't charge. Quite the opposite, the charge goes down as if the laptop was not connected to the adapter at all. This behavior happens from time to time and I'm not sure how I can provoke it. It doesn't help to pulls the cable out and put it back. Sometimes I have to restart the computer.
I've had this issue once before - unplugging and putting it in the other USB-C slot worked for me.
So summering up, all this reports shows two techniques from Apple that set the battery charging on hold: 1) timer based; it looks on the usage behaviour when plugged in and when run on battery 2) is triggered when MBA is always on power. Ad 1) somewhere must be information (time) stored when charging should start again. Always stops hold when battery goes below 80%. The external 30W power is more than enough for powering the MBA without touching (charging) the battery.
When I understand the thread until now right , it doesent run on M1 chips ?
Yes. There are different tools but none of them work on M1 at the moment:
As I used the M1 more and more, the optimized battery charging got smarter and smarter.
As I used the M1 more and more, the optimized battery charging got smarter and smarter.
What do you do for it? I have not be able to activate charging on hold yet. I have used the MBA for two months soon.
As I used the M1 more and more, the optimized battery charging got smarter and smarter.
What do you do for it? I have not be able to activate charging on hold yet. I have used the MBA for two months soon.
Same here. It's been a month since my last comment in the thread, an since then my MBP has been in clamshell mode hooked up to a external display 95% of the time. Since the corona outbreak, I mostly stay at home , so it's been off external power for maybe two / three times during this period. Optimized battery charging never kicked in. π€·πΌ
Can't understand why apple wouldn't give us an advanced mode with a slider similar to what electric cars have, or just a manual trigger for the 80% limit.
The tool running on the M1 MacBook but without the original function
https://eclecticlight.co/2021/01/21/system-management-and-nvram-on-m1-macs/
Thanks for sharing, do you also have details, how this could be used?
I only see the following capabilities:
pmset -g cap Capabilities for AC Power: displaysleep disksleep sleep womp standby powernap ttyskeepawake tcpkeepalive
Still no idea how to set "charging on hold" manually, but on my M1 pmset shows this when it is on hold:
pmset -g batt Now drawing from 'AC Power' -InternalBattery-0 (id=5308515) 80%; AC attached; not charging present: true
and
pmset -g systemstate Current System Capabilities are: CPU Graphics Audio Network Current Power State: 4
So we have to find out how to set/force "not charging present" to true or "Current Power State" to 4.
I don't think "Current Power State: 4" is charging on hold - I have this state when the MBP is running on battery & also when on weak charger.
on the other hand I found this ancient article about pmset, seems there used to be a 'ChargeInhibit' mode. https://apple.stackexchange.com/questions/87924/how-to-disable-battery-charging
You are right that PS 4 is normal (with or without charger connected) and has nothing to do with charging on hold. The 'ChargeInhibit' flag is gone in newer versions of OSX. I found at in 10.7 but not in 10.11, so it is ancient.
Still no idea how to set "charging on hold" manually, but on my M1 pmset shows this when it is on hold:
pmset -g batt Now drawing from 'AC Power' -InternalBattery-0 (id=5308515) 80%; AC attached; not charging present: true
and
pmset -g systemstate Current System Capabilities are: CPU Graphics Audio Network Current Power State: 4
So we have to find out how to set/force "not charging present" to true or "Current Power State" to 4.
Please run smc -l
and drop output here when its charging is on hold and another smc -l when it's not? This way we can compare against eachother?
Still no idea how to set "charging on hold" manually, but on my M1 pmset shows this when it is on hold: pmset -g batt Now drawing from 'AC Power' -InternalBattery-0 (id=5308515) 80%; AC attached; not charging present: true and pmset -g systemstate Current System Capabilities are: CPU Graphics Audio Network Current Power State: 4 So we have to find out how to set/force "not charging present" to true or "Current Power State" to 4.
Please run
smc -l
and drop output here when its charging is on hold and another smc -l when it's not? This way we can compare against eachother?
smc output not on hold https://github.com/davidwernhart/AlDente/files/5745060/output_nohold.log
smc output when on hold https://github.com/davidwernhart/AlDente/files/5744496/output.log
Still no idea how to set "charging on hold" manually, but on my M1 pmset shows this when it is on hold: pmset -g batt Now drawing from 'AC Power' -InternalBattery-0 (id=5308515) 80%; AC attached; not charging present: true and pmset -g systemstate Current System Capabilities are: CPU Graphics Audio Network Current Power State: 4 So we have to find out how to set/force "not charging present" to true or "Current Power State" to 4.
Please run
smc -l
and drop output here when its charging is on hold and another smc -l when it's not? This way we can compare against eachother?smc output not on hold https://github.com/davidwernhart/AlDente/files/5745060/output_nohold.log
smc output when on hold https://github.com/davidwernhart/AlDente/files/5744496/output.log
Some differences I spotted: Acronym - nohold value - hold value
BMSC - 98 - 82
BNSC - 98 - 62
BTRT - 0 - 40
BUIC - 100 - 82
B0RI - 0 - 32782
BCMW - 41232 - 16
BCMV - 41744 - 528
BFCT - 0 - 1
BFLO - 0 - 17
SBAS - 98 - 81
SBAV - 13 - 12
(BTRS, an earlier candidate, value is 100 in both)
I don't have an intel based Mac. Can anyone cross out the acronyms that exist on an intel as well (those would likely not be our target)?
My M1 values: BMSC, BUIC shows the actually charge value BNSC shows 78 on pwr and hold BTRT shows 40 on pwr and 15 on hold B0RI shows 32782 on pwr and hold BCMW, BCMV is counting up BFCT shows 1 on pwr and hold BFLO shows 17 on pwr and hold SBAS [flt ] (bytes 00 00 a6 42) both pwr and hold SBAV change value all the time
So still no clue!
I'd greatly appreciate this feature, if there's anything I can do to help as an M1 MBP user just let me know.
In the meantime, I will use a 'hardware' work around involving a Gosund branded smart plug accessed/controlled via Amazon Alexa skill and I will simply set a recurring timer and/or activated the plug via voice command. It isn't going to automatically cut off the smart plug when the laptop charge gets to a specific percentage, but I can make sure it only begins charging an hour before I wake up (or earlier if I know the laptop battery was at a very low percentage.
I currently use the same setup for my wireless charging dock where I place my phone, ear buds, & watch each night before bed, because Apple's optimized charging never kicks in for me. My devices only charge when I want them to, and only for the length of time I want them too. Can also turn the smart plug off via the internet when I'm away from home if I forgot to do so before I left.
It's not perfect, but Apple has given us lemons without a recipe for lemonade so I'm making orange juice instead.
Actually I can confirm the workaround with the low wattage charger is working fine. I use my MacBook Pro M1 mostly plugged in. With a 12 watt charger the system runs just fine and the battery is not charging. Using this solution the computer is sitting at 53 percent for some days already. However it would be great when aldente is working for m1 π
Actually I can confirm the workaround with the low wattage charger is working fine. I use my MacBook Pro M1 mostly plugged in. With a 12 watt charger the system runs just fine and the battery is not charging. Using this solution the computer is sitting at 53 percent for some days already. However it would be great when aldente is working for m1 π
I cannot so much about the electricity. But does it matter what charger is used? I mean the other two parameters: voltage and current? Is it sufficient requirement to find a 12W adapter or there is a risk to damage the computer if wrong voltage/amperage used?
I know there is a relation W = A*V, so the question is actually what voltage has to be used and if the wrong voltage can damage the computer.
Actually I can confirm the workaround with the low wattage charger is working fine. I use my MacBook Pro M1 mostly plugged in. With a 12 watt charger the system runs just fine and the battery is not charging. Using this solution the computer is sitting at 53 percent for some days already. However it would be great when aldente is working for m1 π
I cannot so much about the electricity. But does it matter what charger is used? I mean the other two parameters: voltage and current? Is it sufficient requirement to find a 12W adapter or there is a risk to damage the computer if wrong voltage/amperage used?
I know there is a relation W = A*V, so the question is actually what voltage has to be used and if the wrong voltage can damage the computer.
I suggest you to use a 5V supply (2A). This is what is working fine for me.
Same here. 5V and 2A is working just fine
I've just tried 5V, 2A charger from Huawei phone and it doesn't work. It says the computer is running on battery and the charge reduces as I use the computer.
Actually I can confirm the workaround with the low wattage charger is working fine. I use my MacBook Pro M1 mostly plugged in. With a 12 watt charger the system runs just fine and the battery is not charging. Using this solution the computer is sitting at 53 percent for some days already. However it would be great when aldente is working for m1 π
I cannot so much about the electricity. But does it matter what charger is used? I mean the other two parameters: voltage and current? Is it sufficient requirement to find a 12W adapter or there is a risk to damage the computer if wrong voltage/amperage used?
I know there is a relation W = A*V, so the question is actually what voltage has to be used and if the wrong voltage can damage the computer.
If you use a regular USB-C / USB-C PD or USB-A charger, there's no need to worry about voltage. USB-PD enabled devices negotiate a power contract, or a handshake, when theyβre plugged into each other. They discuss how much power the source can support, as well as how much power the device being charged can handle. The standard for USB-C devices without PD is 5V/3A, but for PD voltage is configurable (5/9/15/20 V) depending on the device and can go as high as 20V/5A. Then they settle on a compatible rate which both the supply and device support before the charging (or discharging) begins.
USB-A charges are always 5V.
Actually I can confirm the workaround with the low wattage charger is working fine. I use my MacBook Pro M1 mostly plugged in. With a 12 watt charger the system runs just fine and the battery is not charging. Using this solution the computer is sitting at 53 percent for some days already. However it would be great when aldente is working for m1 π
I cannot so much about the electricity. But does it matter what charger is used? I mean the other two parameters: voltage and current? Is it sufficient requirement to find a 12W adapter or there is a risk to damage the computer if wrong voltage/amperage used? I know there is a relation W = A*V, so the question is actually what voltage has to be used and if the wrong voltage can damage the computer.
If you use a regular USB-C / USB-C PD or USB-A charger, there's no need to worry about voltage. USB-PD enabled devices negotiate a power contract, or a handshake, when theyβre plugged into each other. They discuss how much power the source can support, as well as how much power the device being charged can handle. The standard for USB-C devices without PD is 5V/3A, but for PD voltage is configurable (5/9/15/20 V) depending on the device and can go as high as 20V/5A. Then they settle on a compatible rate which both the supply and device support before the charging (or discharging) begins.
USB-A charges are always 5V.
Agree with the first part, but I believe USB A with PD can go up to 20v too π
Those of you who made it work with 5V/2A chargers, do you use Apple charger? As I wrote above I use Huawei and it doesn't work, even if it has the same voltage. The computer behaves as it is not connected to anything.
Can it be that Apples products talk to each other better? Should I buy Apples charger? Actually it would solve the problem of full charged battery altogether.
If you use a regular USB-C / USB-C PD or USB-A charger, there's no need to worry about voltage.> > USB-PD enabled devices negotiate a power contract, or a handshake, when theyβre plugged into each other. They discuss how much power the source can support, as well as how much power the device being charged can handle. The standard for USB-C devices without PD is 5V/3A, but for PD voltage is configurable (5/9/15/20 V) depending on the device and can go as high as 20V/5A. Then they settle on a compatible rate which both the supply and device support before the charging (or discharging) begins. USB-A charges are always 5V.
Agree with the first part, but I believe USB A with PD can go up to 20v too π
Heh, thats true. Same goes for QC i suppose. "Regular old plain none pd/qc/dash" USB-A charger then. ;)
Those of you who made it work with 5V/2A chargers, do you use Apple charger? As I wrote above I use Huawei and it doesn't work, even if it has the same voltage. The computer behaves as it is not connected to anything.
Can it be that Apples products talk to each other better? Should I buy Apples charger? Actually it would solve the problem of full charged battery altogether.
No I tried one from Ikea 5V 2A works fine and one from Lidl 5V 1,7A. Both only power the device without charging.
In my case, even though macOS tells me "the battery is not charging", it is instead charging, but very slowly (it took 30 mins from 50% to 51%).
Edit 1: We can use coconutbattery to check the charging power. If it is too high (a few watts), we can attach some USB device (in my case, a USB sound card) to the other USB C port, which further lowers down the charging power (to 0.1 watt, for example).
No I tried one from Ikea 5V 2A works fine and one from Lidl 5V 1,7A. Both only power the device without charging. Hmm, that's weird. Probably I should try a different charger. What does the computer say? Charging? On battery? On hold?
While I was writing Harry has answered that. :-)
It depends on your use-case (Apps, I/O, brightness, etc)... Typically when I use the MBA I use somewhere between 12-18W, so if I use a USB-A charger (5V, 2.4A) then it still slowly depletes the battery.
My Anker 18W charger slowly charges the battery. I'd guess a 15W charger might be closest to freezing the battery in place.
It depends on your use-case (Apps, I/O, brightness, etc)... Typically when I use the MBA I use somewhere between 12-18W, so if I use a USB-A charger (5V, 2.4A) then it still slowly depletes the battery.
My Anker 18W charger slowly charges the battery. I'd guess a 15W charger might be closest to freezing the battery in place.
Well, I do nothing special, just writing in this forum. :-) And the brightness is about 40 %. The battery is still depleting. And it won't charge either with the closed lid. It looks like the computer simply doesn't recognise the charger.
Edit I've changed the cord and now it works! π It says the computer is plugged but the battery doesn't charge. Edit 2 Actually, with the new cord it even works with old iPhone charger (5V/1A).
To show the chargers capability run from terminal: pmset -g ac and to see the actually current flow from the charger (positive number) or from the battery (neg. number) run: pmset -g rawlog
Actually I can confirm the workaround with the low wattage charger is working fine. I use my MacBook Pro M1 mostly plugged in. With a 12 watt charger the system runs just fine and the battery is not charging. Using this solution the computer is sitting at 53 percent for some days already. However it would be great when aldente is working for m1 π
Whcich workaround do you mean ?
Somone managed to run it on a M1 MBP with Big Sur?