Contribute
Register

[Guide] How to patch DSDT for working battery status

Hello all, I have an HP Envy Touch 15t 15.6" 1080P i7-4710hq (Haswell) 16GB 1TB Backlit Kb Blu-ray Writer laptop, I've had quite a bit of luck Hackintoshing. I have the brighteness control working (as long as a also press the "fn" key)
I tired to keep notes of all kexts replaced, patched or hacked so I could share my findings later on. However, I decided to install Linux to the disk beside OS X, and out of tiredness/not paying attention, I used the entire disk which wiped my Yosemite. I reinstalled everything like it was, but now I can not for the life of me figure out which battery patch I used. I had noted that I (thought) I had used ReHab Mans patch for the HP Spectre XT but it doesn't seem to be working right now. If anyone has this same model and has a working battery status then please let me know which patch. I have tried many so far and replaced DSDT, rebuilt caches, repaired permissions each time and it's still a no go so far :(
I will attach my DSDT and ioreg if anyone knows anything. Thanks!
 

Attachments

  • DSDT_Stuff.zip
    909.3 KB · Views: 68
  • Screen Shot 2015-01-25 at 7.29.42 PM.png
    Screen Shot 2015-01-25 at 7.29.42 PM.png
    7.4 KB · Views: 116
Hello all, I have an HP Envy Touch 15t 15.6" 1080P i7-4710hq 16GB 1TB Backlit Kb Blu-ray Writer laptop, I've had quite a bit of luck Hackintoshing. I have the brighteness control working (as long as a also press the "fn" key)
I tired to keep notes of all kexts replaced, patched or hacked so I could share my findings later on. However, I decided to install Linux to the disk beside OS X, and out of tiredness/not paying attention, I used the entire disk which wiped my Yosemite. I reinstalled everything like it was, but now I can not for the life of me figure out which battery patch I used. I had noted that I (thought) I had used ReHab Mans patch for the HP Spectre XT but it doesn't seem to be working right now. If anyone has this same model and has a working battery status then please let me know which patch. I have tried many so far and replaced DSDT, rebuilt caches, repaired permissions each time and it's still a no go so far :(
I will attach my DSDT and ioreg if anyone knows anything. Thanks!

The DSDT is not patched for battery. You should try one of the HP battery patches.

Details of what to look for are in post #1.
 
Quick Question: Do I need the ACPIBatteryManager.kext in /EFI/CLOVER/kexts/10/10/ or in /System/Library/Extensions/ or both?
Still trying to figure out what I did right last time lol. Also, do I need to remove AppleSmartBatteryManager.kext from /S/L/E/ or anything else?
 
Quick Question: Do I need the ACPIBatteryManager.kext in /EFI/CLOVER/kexts/10/10/ or in /System/Library/Extensions/ or both?
Still trying to figure out what I did right last time lol. Also, do I need to remove AppleSmartBatteryManager.kext from /S/L/E/ or anything else?

Your choice. But if you have FakeSMC.kext installed to /S/L/E and you use InjectKexts=Detect, then it must go to /S/L/E.

But I install all my kexts to /S/L/E and keep Clover/kexts just for essential kexts needed for install/update/recovery.

You do not need to remove the AppleSmartBatteryManager.kext provided by Apple.
 
I was looking through a folder I still had of setup stuff and I had VoodooBattery.kext in there which I read somewhere the other day, that it screws up the power management of this haswell. So I removed it, but I am thinking that may be how I had a working battery in the past. Though I have reinstalled since then anyway. So I tried a new DSDT.aml and left AppleSmartBatteryManager.kext alone and I still have that X through the battery.

The console says:

1/27/15 11:19:59.000 AM kernel[0]: ACPIBatteryManager: Version 1.55 starting.
1/27/15 11:19:59.000 AM kernel[0]: ACPIBatteryManager: Using ACPI regular battery information method _BIF
1/27/15 11:20:26.523 AM HWMonitor[285]: battery device appeared 43019


Not sure what I am doing wrong? Unless the new DSDT is wrong?

OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF)
Field (ERAM, ByteAcc, Lock, Preserve)

looks to be all broke down into 8's?
 

Attachments

  • DSDT.aml.zip
    33 KB · Views: 57
I was looking through a folder I still had of setup stuff and I had VoodooBattery.kext in there which I read somewhere the other day, that it screws up the power management of this haswell. So I removed it, but I am thinking that may be how I had a working battery in the past. Though I have reinstalled since then anyway. So I tried a new DSDT.aml and left AppleSmartBatteryManager.kext alone and I still have that X through the battery.

The console says:

1/27/15 11:19:59.000 AM kernel[0]: ACPIBatteryManager: Version 1.55 starting.
1/27/15 11:19:59.000 AM kernel[0]: ACPIBatteryManager: Using ACPI regular battery information method _BIF
1/27/15 11:20:26.523 AM HWMonitor[285]: battery device appeared 43019


Not sure what I am doing wrong? Unless the new DSDT is wrong?

OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF)
Field (ERAM, ByteAcc, Lock, Preserve)

looks to be all broke down into 8's?

You may need additional DSDT patches: http://www.tonymacx86.com/yosemite-laptop-support/152573-guide-patching-laptop-dsdt-ssdts.html

Is the DSDT you're using patched from your own native DSDT?

You can use the debug ACPIBatteryManager.kext to get additional information in system.log.

If you need help...

Download patchmatic: https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads/RehabMan-patchmatic-2015-0107.zip
Extract the 'patchmatic' binary from the ZIP. Copy it to /usr/bin, such that you have the binary at /usr/bin/patchmatic.

In terminal,
Code:
rm -Rf ~/Downloads/RehabMan
mkdir ~/Downloads/RehabMan
cd ~/Downloads/RehabMan
patchmatic -extract

Post contents of Downloads/RehabMan directory (as ZIP).

Also, post ioreg: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html. Please, use the IORegistryExplorer v2.1 attached to the post! DO NOT reply with an ioreg from any other version of IORegistryExplorer.app.

And output from:
Code:
kextstat|grep -y acpiplat
kextstat|grep -y appleintelcpu
 
Yes. I still have my original tables from one of my Linux Live CDs before I ever installed anything.

I tried the OS Check Fix patch then the Fix Mutex patch. then both together, after that with no results. Replacing and rebooting between each attempt.

The debug kext from the clover verbose bootup mentions _BIF, and _BST errors, I think, it goes by so fast at boot it's hard to read.

the console app with debug kext says:


1/27/15 11:20:26.523 AM HWMonitor[285]: battery device appeared 43019
1/27/15 11:24:17.376 AM SystemUIServer[236]: Menu Extra: <BatteryExtra: 0x7f8123408e90> is over retained.
1/27/15 11:32:51.297 AM HWMonitor[305]: battery device appeared 41995
1/27/15 11:34:35.109 AM SystemUIServer[233]: Menu Extra: <BatteryExtra: 0x7f8a73c08790> is over retained.
1/27/15 12:27:53.423 PM com.apple.kextcache[14486]: kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
1/27/15 12:34:26.033 PM HWMonitor[291]: battery device appeared 41995
1/27/15 12:44:57.168 PM com.apple.kextcache[14070]: kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
1/27/15 12:54:37.227 PM HWMonitor[297]: battery device appeared 41995
1/27/15 1:05:21.373 PM HWMonitor[297]: battery device appeared 41739


kextstat|grep -y acpiplat

13 2 0xffffff7f820a5000 0x65000 0x65000 com.apple.driver.AppleACPIPlatform (3.1) <12 11 7 6 5 4 3 1>


kextstat|grep -y appleintelcpu

blank, seems to do nothing. The kernel has been patched for Haswell.

Seems like I had a newer version of IOregexplorer so I used that one from the post you linked instead.
Thanks for your help, this battery issue is really the only thing keeping this from being a decent HacBook.
 

Attachments

  • Pathmatic_RehabMan.zip
    42.1 KB · Views: 69
  • Tom’s MacBook Pro.ioreg
    2.9 MB · Views: 65
After hours of faillure, here my DSDT:
I've been lucky enough to have not 32Bit or Higher to recode, so i thought it seems quite easy.
I only got 16 bits :)
These are my 16 bit codes that are needed :
B1RA
B1PR
B1VO
B1DA
B1DF
B1DV
B1DL

First i do the following patch:

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

So far so good, no errors

The next step is to transfer them to 8Bit pieces, so i do:
into device label H_EC code_regex B1RA,\s+16 replace_matched begin 1RA0,8,1RA1,8 end;
into device label H_EC code_regex B1PR,\s+16 replace_matched begin 1PR0,8,1PR1,8 end;
into device label H_EC code_regex B1VO,\s+16 replace_matched begin 1VO0,8,1VO1,8 end;
into device label H_EC code_regex B1DA,\s+16 replace_matched begin 1DA0,8,1DA1,8 end;
into device label H_EC code_regex B1DF,\s+16 replace_matched begin 1DF0,8,1DF1,8 end;
into device label H_EC code_regex B1DV,\s+16 replace_matched begin 1DV0,8,1DV1,8 end;
into device label H_EC code_regex B1DL,\s+16 replace_matched begin 1DL0,8,1DL1,8 end;

201+ errors, even if i do it with hand I keep getting the errors :S
Then I do the following patch which is fully ignored, so patch is not applied:

into method label GBTI code_regex \(B1DL, replaceall_matched begin (B1B2(1DL0,1DL1), end;
into method label GBTI code_regex \(B1RA, replaceall_matched begin (B1B2(1RA0,1RA1), end;
into method label GBTI code_regex \(B1PR, replaceall_matched begin (B1B2(1PR0,1PR1), end;
into method label GBTI code_regex \(B1VO, replaceall_matched begin (B1B2(1VO0,1VO1), end;
into method label GBTI code_regex \(B1DA, replaceall_matched begin (B1B2(1DA0,1DA1), end;
into method label GBTI code_regex \(B1DF, replaceall_matched begin (B1B2(1DF0,1DF1), end;
into method label GBTI code_regex \(B1DV, replaceall_matched begin (B1B2(1DV0,1DV1), end;

Still the same errors, i think i do something wrong with the offset or so?
I'm stuck sinds 3 days now grrrr.

Please can someone explain my mistakes? I'm just no DSDT Hero

Thanks!!
 

Attachments

  • dsdt.aml
    42.3 KB · Views: 96
Back
Top