Contribute
Register

[Guide] How to patch DSDT for working battery status

Ok,
thanks for the confirmation.
Any ideas on how to debug the kext to see why it is not working? I had this working on my installation, then my motherboard broke down and was replaced, still having the same disk. The DSDT and data I've sent are from the new board. I've reinstalled ACPIBatteryManager kext from your repository, No luck.

Regards

Read post #1, "Problem Reporting".
 
Solved!
I booted in ubuntu, and dumped the acpi/tables, found yet another DSDT.aml, size-wise, from the ones I get via F4 under Clover and before and after repairing the motherboard. I simply too the DSDT.aml and put it in EFI/CLOVER/ACPI/patched, and that's it. I even have brightness slider.
Not sure it is very elegant method, but it works. Probably the repaired board is subtly different from the older one, as another issue that I had seems also solved: With the older board, I had to connect the ethernet cable before loading OSX, otherwise it won't see it. Now it works. Go figure.

Thanks again
 
Solved!
I booted in ubuntu, and dumped the acpi/tables, found yet another DSDT.aml, size-wise, from the ones I get via F4 under Clover and before and after repairing the motherboard. I simply too the DSDT.aml and put it in EFI/CLOVER/ACPI/patched, and that's it. I even have brightness slider.
Not sure it is very elegant method, but it works. Probably the repaired board is subtly different from the older one, as another issue that I had seems also solved: With the older board, I had to connect the ethernet cable before loading OSX, otherwise it won't see it. Now it works. Go figure.

Thanks again

DSDT.aml extracted via Clover F4 is the same as the one you get from Linux.
If you were using an old DSDT extracted with different hardware installed (or even different BIOS settings, different BIOS version), then you were making a very common mistake.
You should read post #1 regarding extraction of ACPI files as it relates to BIOS/hardware changes.
 
Hi, Rehabman,
I have finished the battery status patch for Lenovo rescuer 14-ISK/15-ISK.
I read your guide carefully and solved my previous problem.
After fixing the Mutex error, it works like a charm.
I want to add this to your repo.
Please review the code, thank you.
PS:
My spec:
Code:
Lenovo Rescuer 14-ISK i7 Edition 80RN Laptop
CPU: Intel Core i7-6700HQ @ 2.60GHz Quad Core
Motherboard: Lenovo SuperX 4B (Intel PCI Standard Host CPU Bridge - 100 Series / C230 Series Chipset Family - A14E)
Memory: 4 GB (Samsung DDR4 2133MHz) + 8 GB (Kingston DDR4 2133MHz)
Disk: Lenovo SPEED UP-C80LS SSD (120GB) + Western Digital WDC WD10SPCX-24HWST1 (1 TB / 5400 rpm)
Graphics: Intel HD Graphics 530 (128 MB / Lenovo) + GTX960M(disabled by DSDT)
Monitor: CMO CMB14B1 (14 inches)
Sound: Realtek @ Intel High Definition Audio Controller (ACL235)
Network card: Realtek RTL8168/8111/8112 Gigabit Ethernet Controller
Wireless card: BCM93452z
Touchpad: Elan
My DSDT extracted by CLOVER & code are attached.
 

Attachments

  • DSDT_SSDT_origin.zip
    66.8 KB · Views: 96
  • battery_status_patch.txt
    7 KB · Views: 139
Hi RehabMan,

I'm trying to patch my DSDT so far without success..

I was able to find the following 16 bit Fields:

Code:
                XX11,   16,  //NOT USED
                B1DC,   16, //4 Times
                B1FV,   16, //4 Times
                B1FC,   16, //6 Times
                XX15,   16, //NOT USED
                B1CR,   16, //3 Times
                B1RC,   16, //3 Times
                B1VT,   16, //NOT USED
                CHGR,   16, //NOT USED





This is my patch:

Code:
into method label B1B2 remove_entry;
into definitionblock code_regex . insert
begin
Method (B1B2, 2, NotSerialized) { Return(Or(Arg0, ShiftLeft(Arg1, 8))) }\n
end;


into device label H_EC code_regex B1DC,\s+16, replace_matched begin BDC0,8,BDC1,8, end;

into device label H_EC code_regex B1FV,\s+16, replace_matched begin BFV0,8,BFV1,8, end;

into device label H_EC code_regex B1FC,\s+16, replace_matched begin BFC0,8,BFC1,8, end;

into device label H_EC code_regex B1CR,\s+16, replace_matched begin BCR0,8,BCR1,8, end;

into device label H_EC code_regex B1RC,\s+16, replace_matched begin BRC2,8,BRC1,8, end;

into method label GSBI code_regex \(B1DC, replaceall_matched begin (B1B2(BDC0,BDC1), end;
into method label _BIF code_regex \(B1DC, replaceall_matched begin (B1B2(BDC0,BDC1), end;
into method label _BST code_regex B1FV replaceall_matched begin B1B2(BFV0,BFV1) end;
into method label GSBI code_regex \(B1FC, replaceall_matched begin (B1B2(BFC0,BFC1), end;
into method label _BIF code_regex \(B1FC replaceall_matched begin (B1B2(BFC0,BFC1) end;
into method label GSBI code_regex \(B1CR, replaceall_matched begin (B1B2(BCR0,BCR1), end;
into method label _BST code_regex B1CR replaceall_matched begin B1B2(BCR0,BCR1) end;
into method label GSBI code_regex \(B1RC, replaceall_matched begin (B1B2(BRC0,BRC1), end;
into method label _BST code_regex B1RC replaceall_matched begin B1B2(BRC2,BRC1) end;


However, my DSDT is not compiling and I am not able to fix these compiler errors:

EDIT: DSDT is compiling now - I used the wrong version. My Bad. I can now see the Intel SR Real Battery in IOReg, but I cannot see the percentage. I also need to apply the Bugfix for AC / Battery indication - will this fix the issue ?




Required Outputs:
Code:
MaximiliansiMac:RehabMan max$ sudo touch /System/Library/Extensions && sudo kextcache -u /
Password:
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext HoRNDIS.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
KernelCache ID: 6C906E2AC4F72F04A9C432C8BB839F7F
MaximiliansiMac:RehabMan max$




MaximiliansiMac:RehabMan max$ kextstat|grep -y acpiplat
   13    2 0xffffff7f825ca000 0x60000    0x60000    com.apple.driver.AppleACPIPlatform (5.0) 65E05472-6AE7-3308-8CC8-FA6CB0DB2AEE <12 11 7 6 5 4 3 1>
MaximiliansiMac:RehabMan max$ kextstat|grep -y appleintelcpu
MaximiliansiMac:RehabMan max$ kextstat|grep -y applelpc
MaximiliansiMac:RehabMan max$




Can you help me?

If you need more info, let me know!
 

Attachments

  • CLOVER.zip
    1.6 MB · Views: 84
  • Maximilians iMac IOREG.zip
    580.5 KB · Views: 88
  • RehabMan.zip
    61.5 KB · Views: 100
  • Maximilians iMac DSDT.zip
    417.4 KB · Views: 81
Last edited:
Hi RehabMan,

I'm trying to patch my DSDT so far without success..

I was able to find the following 16 bit Fields:

Code:
                XX11,   16,  //NOT USED
                B1DC,   16, //4 Times
                B1FV,   16, //4 Times
                B1FC,   16, //6 Times
                XX15,   16, //NOT USED
                B1CR,   16, //3 Times
                B1RC,   16, //3 Times
                B1VT,   16, //NOT USED
                CHGR,   16, //NOT USED





This is my patch:

Code:
into method label B1B2 remove_entry;
into definitionblock code_regex . insert
begin
Method (B1B2, 2, NotSerialized) { Return(Or(Arg0, ShiftLeft(Arg1, 8))) }\n
end;


into device label H_EC code_regex B1DC,\s+16, replace_matched begin BDC0,8,BDC1,8, end;

into device label H_EC code_regex B1FV,\s+16, replace_matched begin BFV0,8,BFV1,8, end;

into device label H_EC code_regex B1FC,\s+16, replace_matched begin BFC0,8,BFC1,8, end;

into device label H_EC code_regex B1CR,\s+16, replace_matched begin BCR0,8,BCR1,8, end;

into device label H_EC code_regex B1RC,\s+16, replace_matched begin BRC2,8,BRC1,8, end;

into method label GSBI code_regex \(B1DC, replaceall_matched begin (B1B2(BDC0,BDC1), end;
into method label _BIF code_regex \(B1DC, replaceall_matched begin (B1B2(BDC0,BDC1), end;
into method label _BST code_regex B1FV replaceall_matched begin B1B2(BFV0,BFV1) end;
into method label GSBI code_regex \(B1FC, replaceall_matched begin (B1B2(BFC0,BFC1), end;
into method label _BIF code_regex \(B1FC replaceall_matched begin (B1B2(BFC0,BFC1) end;
into method label GSBI code_regex \(B1CR, replaceall_matched begin (B1B2(BCR0,BCR1), end;
into method label _BST code_regex B1CR replaceall_matched begin B1B2(BCR0,BCR1) end;
into method label GSBI code_regex \(B1RC, replaceall_matched begin (B1B2(BRC0,BRC1), end;
into method label _BST code_regex B1RC replaceall_matched begin B1B2(BRC2,BRC1) end;


However, my DSDT is not compiling and I am not able to fix these compiler errors:

EDIT: DSDT is compiling now - I used the wrong version. My Bad. I can now see the Intel SR Real Battery in IOReg, but I cannot see the percentage. I also need to apply the Bugfix for AC / Battery indication - will this fix the issue ?




Required Outputs:
Code:
MaximiliansiMac:RehabMan max$ sudo touch /System/Library/Extensions && sudo kextcache -u /
Password:
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext HoRNDIS.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
KernelCache ID: 6C906E2AC4F72F04A9C432C8BB839F7F
MaximiliansiMac:RehabMan max$




MaximiliansiMac:RehabMan max$ kextstat|grep -y acpiplat
   13    2 0xffffff7f825ca000 0x60000    0x60000    com.apple.driver.AppleACPIPlatform (5.0) 65E05472-6AE7-3308-8CC8-FA6CB0DB2AEE <12 11 7 6 5 4 3 1>
MaximiliansiMac:RehabMan max$ kextstat|grep -y appleintelcpu
MaximiliansiMac:RehabMan max$ kextstat|grep -y applelpc
MaximiliansiMac:RehabMan max$




Can you help me?

If you need more info, let me know!

You have no patched DSDT in ACPI/patched.
 
You have no patched DSDT in ACPI/patched.
Hi,

yeah, I was not able to get the DSDT to compile properly - so no DSDT in ACPI/patched. I now have managed to compile it and battery status is working.

I also had to put my battery configuration into the DSDT. I have attached it - maybe you would like to add it to your repo. (The patch is also in my previous post.


Thanks for your Guide!


PS: Could you help me with Backlight control?
 

Attachments

  • DSDTv2.aml
    150.9 KB · Views: 114
Hi, Rehabman,
I have finished the battery status patch for Lenovo rescuer 14-ISK/15-ISK.
I read your guide carefully and solved my previous problem.
After fixing the Mutex error, it works like a charm.
I want to add this to your repo.
Please review the code, thank you.
PS:
My spec:
Code:
Lenovo Rescuer 14-ISK i7 Edition 80RN Laptop
CPU: Intel Core i7-6700HQ @ 2.60GHz Quad Core
Motherboard: Lenovo SuperX 4B (Intel PCI Standard Host CPU Bridge - 100 Series / C230 Series Chipset Family - A14E)
Memory: 4 GB (Samsung DDR4 2133MHz) + 8 GB (Kingston DDR4 2133MHz)
Disk: Lenovo SPEED UP-C80LS SSD (120GB) + Western Digital WDC WD10SPCX-24HWST1 (1 TB / 5400 rpm)
Graphics: Intel HD Graphics 530 (128 MB / Lenovo) + GTX960M(disabled by DSDT)
Monitor: CMO CMB14B1 (14 inches)
Sound: Realtek @ Intel High Definition Audio Controller (ACL235)
Network card: Realtek RTL8168/8111/8112 Gigabit Ethernet Controller
Wireless card: BCM93452z
Touchpad: Elan
My DSDT extracted by CLOVER & code are attached.

Thanks. Added to the repo.
 
I also had to put my battery configuration into the DSDT. I have attached it - maybe you would like to add it to your repo. (The patch is also in my previous post.

I just added the few changes necessary to the Yoga 900 patch...
 
Back
Top