RehabMan
Moderator
- Joined
- May 2, 2012
- Messages
- 181,011
- Motherboard
- Intel DH67BL
- CPU
- i7-2600K
- Graphics
- HD 3000
- Mac
- Mobile Phone
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
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?
What is setting ECOK to zero?
ACPI spec:
LNot is "Logical Not".
Description
If the value is zero True is returned; otherwise, False is returned.
The code is trying to check whether it is ok to access the EC before doing so. You should probably investigate why ECOK gets set to zero. Clearly, it should be non-zero.