Contribute
Register

HP Pavilion 15 (Kaby Lake) - Battery Status only working *sometimes*

Status
Not open for further replies.
Ah, that famous @RehabMan charm.

Thanks for taking a look and for the feedback. I re-patched taking all of this on board and also implemented CPUPM. Still having the same issue, although strangely yesterday I managed to start up and shut down/reboot several times without the battery status breaking. I used the ACPIBatteryManager debug kext and found that when the status isn't working, these four values never change:

ACPIBatteryManager: fCurrentRate = 1938
ACPIBatteryManager: fCurrentCapacity = 4448
ACPIBatteryManager: fCurrentVoltage = 7964
ACPIBatteryManager: fAverageRate = 1938

Also, when battery status stops working in macOS, it's also broken when booting into Windows and only resets if you physically recalibrate by holding the power button down whilst plugging in the AC... even then I sometimes have to do it a couple of times before it works.

Any other ideas at all, or might I just have to accept that this is never going to work properly?

Read battery guide, post #1, "Problem Reporting".
 

Attachments

  • Battery Problem Reporting 3.zip
    2.6 MB · Views: 107
Here's the files

Use ACPIDebug.kext to debug your _BIF/_BST methods.

Note: You should not remove BNUM (in appropriate DSDT edit you made).

Also, power management is not implemented correctly (VoodooTSCSync has no place with your hardware).

Also, all kexts should be installed to the system volume (Clover/kexts is only for "essential" kexts for install/recovery).
 
Use ACPIDebug.kext to debug your _BIF/_BST methods.

Note: You should not remove BNUM (in appropriate DSDT edit you made).

Also, power management is not implemented correctly (VoodooTSCSync has no place with your hardware).

Also, all kexts should be installed to the system volume (Clover/kexts is only for "essential" kexts for install/recovery).

I'm getting the error 'Name already exists in scope (BNUM)', can you please tell me how to get rid of this error without removing BNUM altogether?

Could you shed a little more light on how power management isn't implemented correctly? My machine doesn't detect all the cores without VoodooTSCSync so I'm not sure what else to do.

I will install all kexts to the system, but please tell me what difference this makes? Just for my own curiosity really.

What should I be looking for when debugging the _BIF/_BST methods?

Thanks again.
 
I'm getting the error 'Name already exists in scope (BNUM)', can you please tell me how to get rid of this error without removing BNUM altogether?

Remove the 'External(BNUM,...)' line.

Could you shed a little more light on how power management isn't implemented correctly? My machine doesn't detect all the cores without VoodooTSCSync so I'm not sure what else to do.

Remove VoodooTSCSync.
See PM guide linked from FAQ.

I will install all kexts to the system, but please tell me what difference this makes? Just for my own curiosity really.

Clover kext injection not native. Installing kexts is native.

What should I be looking for when debugging the _BIF/_BST methods?

Logic bugs that lead to stuck stats.
 
Remove the 'External(BNUM,...)' line.



Remove VoodooTSCSync.
See PM guide linked from FAQ.



Clover kext injection not native. Installing kexts is native.



Logic bugs that lead to stuck stats.

I've installed ACPIDebug and patched DSDT but the only output I can find in console is EC related... nothing BST or BIF related. Is there an extra DSDT patch I need to implement to output battery status info?
 
I've installed ACPIDebug and patched DSDT but the only output I can find in console is EC related... nothing BST or BIF related. Is there an extra DSDT patch I need to implement to output battery status info?

You can get debug output from debug ACPIBatteryManager.kext.
ACPIDebug.kext is useful too, but you must instrument the code in your DSDT to get anything out of it (eg. add "trace" code to relevant ACPI code).
 
You can get debug output from debug ACPIBatteryManager.kext.
ACPIDebug.kext is useful too, but you must instrument the code in your DSDT to get anything out of it (eg. add "trace" code to relevant ACPI code).

Thanks. I've already used ACPIBatteryManager debug and this was the outcome:
I used the ACPIBatteryManager debug kext and found that when the status isn't working, these four values never change:

ACPIBatteryManager: fCurrentRate = 1938
ACPIBatteryManager: fCurrentCapacity = 4448
ACPIBatteryManager: fCurrentVoltage = 7964
ACPIBatteryManager: fAverageRate = 1938

I will try using ACPIDebug as I've now figured out how to get results from the methods, but does the above suggest anything to you as to what might be causing that?
 
Last edited:
Thanks. I've already used ACPIBatteryManager debug and this was the outcome:


I will try using ACPIDebug as I've now figured out how to get results from the methods, but does the above suggest anything to you as to what might be causing that?

You can use ACPIDebug.kext to put traces into the relevant code such that you can debug the problem.
 
You can use ACPIDebug.kext to put traces into the relevant code such that you can debug the problem.

After a combination of using ACPIDebug, studying a working DSDT for a machine similar to mine and harnessing my sheer obsessiveness/stubbornness, I managed to find the offending bit of code that is getting the battery stuck.

Code:
Method (SMRD, 4, NotSerialized)
    {
        If (LNot (ECOK))
            {
                Return (0xFF)
            }
....

So I changed this to the following...

Code:
Method (SMRD, 4, NotSerialized)
    {
        If (LEqual (ECOK, One))
            {
                Return (0xFF)
            }
....

... and now my issue is fixed! Battery and AC are working correctly, battery status no longer gets stuck and correct percentage is reported in both macOS and Windows upon every reboot :headbang:

In light of this, I'd like to mark this as resolved, but first I'm hoping you can answer a couple of questions for me:

1) What exactly does this change do to fix the status?
2) Is the edit I've made correct/safe as it stands or would you suggest implementing it another way?
 
Status
Not open for further replies.
Back
Top