Open rboldini opened 2 years ago
I can't see serial number of battery. But it's reported as "Service Recommended"
This too,, no serial number of battery. But service is recommended alarm
cc @usr-sse2 @lvs1974
Please show AppleSmartBattery properties in the ioreg.
Where do you look the percentage in the IOReg?
This is my fixed ioreg, in AppleSmartBattery under Battery Data here is a field for StateOfCharge that report it.
I'm sure this is not a device issue 'cause, beside the AC Adapter Plug here is a LED mapped like this: OFF = Not charging RED = Charging BLUE = Fully Charged
And it become Blue only when ioreg status reach 0x64
This observation include a check to CurrentCharge and LastFullCharge, CurrentCharge is equal to LastFullCharge 10 minutes after the icon reported 100%.
Probably i need to explain that, previously my battery wasn't working, as you can see in SSDT-BAT, i've dumped with RWEverything the whole EC region and mapped values, I found that DesignCapacity and Voltage where reported wrongly, so i just coded it in the right way and in the right index of the _BIF PKG[] (that i assume is an array/Structure in C, or a container(?) C++), and found that ACPIBatteryManager didn't work without a design voltage, instead SMCBatteryManager didn't work without a Design Capacity value (it report 1% charge).
Both of them actually report "Service Recommended" without a SN, so i assume you're just reading it and placing it in the virtual battery memory without checking is validity, then AppleBattery report it as bad. Probably SN is a check for "Real Battery" and report it wrong if battery is replaced, like in iPhone and iPad behaviour.
Hope it can help, i'm also a junior dev, actually C is my first lang but i'm also able to code in C++, Python, Assembly and many others, so feel free to ask for debug or help if needed for lack of time.
Actually i'm looking at this:
/** /* 123 ACPIBattery.h */
* QuickPoll will be disable when average rate is available from EC
*/
bool averageRateAvailable {false};
i think this broke my AC Adapter detection/status when charge reach 100%, i'm fixing it using ACPIPoller and a dummy device to trigger the adapter if the condition state != prevState is true. (SSDT-LID-AC)
I'll check the serial number issue. (I have the "Service Recommended" too, but not because of the SN but because the battery had about 65% of its design capacity at the time I bought my laptop, and it continues to decrease and is now 57%). Your battery is in good condition (93%).
About the percentage: please show the IOReg when the battery is charging, StateOfCharge
is less than 0x64 and the menu bar item displays 100%. I'll also check how it works on a 2013 MacBook Air.
As you can see also Average Time to Full say 0x5 and Current Capacity is different from Max Capacity
Me too. Service is recommended alarm.
ASUS K550J, OS Version: Monterey 12.0.1 (21A559), MacBookPro 11,4
Everything updated to the latest (OC 0.7.5 and kext latest)
So for everyone:
Report for battery service notification only if :
you battery life is over 80% (and probably more) iStat provide it.
System doesn't report battery serial number or report "0123456789"
If you are below 80% of battery life you can try this fix injecting a new battery serial from DSDT.
It probably won't work, cause service notification is normal with a low battery life value. In that case don't report, it's as expected.
thanks @rboldini , Injecting a Dummy SN in the _BIF method solved the problem.
Glad I was helpful.
I've also a tricky workaround for who's below 80% of battery life and doesn't mind to keep cycle count reported.
OEMs actually (or in past) fake the battery health providing LastFullChargeCapacity as DesignCapacity, an example is HP at least before 2015 models likes my Pavillion 15 or Chuwi with Corebook X gen 2 (8th gen i5) more recent.
So modifying the _BIF method and storing 'PKG 0x02' value in 'PKG 0x01' instead of the default one, will make Service Notification disappear, or at least I suppose it can work.
! IDK if that can make issue or break yours devices. That's just an observation !
Sorry for this OP message, i'm trying to build VirtualSMC but actually i cant find the Headers included in the project, i suppose they are part of the MacKernelSDK(?). Someone can give a hint on this, sorry if it seems a dumb question i looked inside MacKernelSDK and project directory but can't find them.
Sorry for this OP message, i'm trying to build VirtualSMC but actually i cant find the Headers included in the project, i suppose they are part of the MacKernelSDK(?). Someone can give a hint on this, sorry if it seems a dumb question i looked inside MacKernelSDK and project directory but can't find them.
Lilu
Seems like it's related to the manufacture date, it's reported as Jan 1, 1970 if the serial doesn't contain a valid date, although it's supposed to be hardcoded value Feb 29, 2016. I'm working on it.
@usr-sse2 did we make any progress on that after discovering that macOS can blacklist batteries by serial number?
@rboldini did you fix it? I have problem same you.
Other things i found is that from 20% the percentage reported form system gain 1% more than the one reported in ioreg, ending with 100% reported from system and 94% reported from ioreg, so more the battery is charge more the gap increase. In addition the Fully charged notification string appear only when the ioreg value reach 0x64 (100%).
Injecting a Dummy SN in the _BIF method
how to Injecti a Dummy SN in the _BIF method,I have the same problem。
Hi, after some research i found that if the battery serial number is "0123456789" battery condition is always reported as bad status and the Service Recommended notification persist.
Injecting a Dummy SN in the _BIF method solved the problem, a simple check and replace during information poll can solve the problem for everyone in the same situation.
Other things i found is that from 20% the percentage reported form system gain 1% more than the one reported in ioreg, ending with 100% reported from system and 94% reported from ioreg, so more the battery is charge more the gap increase. In addition the Fully charged notification string appear only when the ioreg value reach 0x64 (100%).
I don't know if this second issue is related to my settings, to macOS behaviour or to a SMCBAttery bug.
Can't upload .zip here is my repo, rboldini No DEBUG log unfortunately, i'll provide it later.
Edit: Everything updated to latest (OC 0.7.5 and kext latest)