Contribute
Register

[Guide] How to patch DSDT for working battery status

Hello, RehabMan!
Following such a great guide got my battery status working on HP 15 r084sr. I've added several strings to hp spectre patch.
View attachment Patch.zip

Also got my backlight and brightness keys working following another brilliant guide.
But where i'm really stuck is 1 native cpu power management, 2 disabling discrete video card, 3 sound.
About the first: I followed the guide about cpu pm, but cannot understand is it working or not (how should i interpreter information from dpci p-states menu?). I attach anything that i found you need to help.
View attachment RehabMan.zip
OS - 10.10

Another question is - it seems that install and fixes are almost the same for Yosemite and El Capitan. Question: is there any benefits to install Yosemite for now, or in compatibility issues they are the same?

About the second: i've followed through all guide, but created another file for that, and when i had not succeed (it cannot boot with patched files hanging in the start of loading. i found your post where you said that its when ssdt unsynchronized with system ones or it because i am not using sorted order in clover, both reasons i checked. there was one more reason - bios update. i haven't updated bios, but tried to extract aml and patch it for fresh. same result), i returned to previous version of file so in the files attached no signs of following that guide. But I am going to do it again, on a new version with working battery. Question: how nv_disable=1 works? Does it turn off video card? I cannot boot without this option. So i thought if i disable it in DSDT and SSDTs, i will can boot without it. Am I right?


About the third: i following guide in the applehda collection thread, tried both 282v1 and 282v2, and still have no sound. I do not know what to do (instead of patching my files). But if you say only way is patching, i'll try.

P.S. This is my first install.. fresh install is inevitable?
P.P.S. Sorry for my English.
 
Hello, RehabMan!
Following such a great guide got my battery status working on HP 15 r084sr. I've added several strings to hp spectre patch.
View attachment 171784

I would need a full set of native DSDT/SSDT files (for correct disassembly) to be certain, but I think the Folio 13 patch is a match.

Also got my backlight and brightness keys working following another brilliant guide.
But where i'm really stuck is 1 native cpu power management, 2 disabling discrete video card, 3 sound.

Off-topic.

http://www.tonymacx86.com/el-capita...faq-read-first-laptop-frequent-questions.html
 
If you have a completed patch, you can submit it (patch + native DSDT).

Refer to other patches in the repo for how to deal with Store to >32 bit EC fields.

I will not accept incomplete patches to the repo and I won't be finishing it for you...

To my knowledge I think I have completed the patch for HP envy 4 - 1025tx.
I have tested it and it works satisfactorily.
Herewith I am attaching the native DSDT and patch prepared according to your style

I didn't had any 32bit EC fields.
The only difficulty have is at 256 bit EC field which was written by reference at two instances which i am citing here
- I couldn't find any example matching this in any of the patch repo. WECB method seems incompatible.
I have made the patch to comment them for now and it works -- your expert advice solicited.
Otherwise the patch should be perfect.
Code:
              SMD0,   256,  //!! 0x64
              Store (Zero, ^^LPCB.EC0.SMD0)
              Store (LBUF, ^^LPCB.EC0.SMD0)
 

Attachments

  • HP-Envy-4_Native.zip
    119.3 KB · Views: 69
  • battery_HP-Envy-4.txt
    6.8 KB · Views: 125
To my knowledge I think I have completed the patch for HP envy 4 - 1025tx.
I have tested it and it works satisfactorily.
Herewith I am attaching the native DSDT and patch prepared according to your style

I didn't had any 32bit EC fields.
The only difficulty have is at 256 bit EC field which was written by reference at two instances which i am citing here
- I couldn't find any example matching this in any of the patch repo. WECB method seems incompatible.
I have made the patch to comment them for now and it works -- your expert advice solicited.
Otherwise the patch should be perfect.
Code:
              SMD0,   256,  //!! 0x64
              Store (Zero, ^^LPCB.EC0.SMD0)
              Store (LBUF, ^^LPCB.EC0.SMD0)

There are existing patches that deal with writes to SMD0 by using WECB.

Note:
Code:
SPEEDY-OSX:battery RehabMan$ grep -l SMD0.*WECB *.txt
battery_Acer-Aspire-E1-571.txt
battery_Acer-S7-391.txt
battery_Dell-Vostro-15xx.txt
battery_HP-Pavilion-n012tx.txt
battery_Lenovo-Y50.txt
battery_Lenovo-z470-z370.txt
battery_Vizio-Ultrabook-CT14.txt
 
Do a fresh install.

Turned out a success. I actually did a fresh install of El Capitan 10.11.2 instead of Yosemite.
After installing, I loaded my patched DSDT and SSDT using Clover.
Once I got back in to El Capitan, the battery icon and percentage showed up and worked great.
Also, by doing a fresh install, my brightness fixed using the patch guide as well.

TLDR: Confirmed that battery patch in repo "Acer Aspire E1-571" works with Acer Aspire V3-571G.

Thank you so much Rehabman!
 
...
TLDR: Confirmed that battery patch in repo "Acer Aspire E1-571" works with Acer Aspire V3-571G.

I will add a comment to that effect.
 
There are existing patches that deal with writes to SMD0 by using WECB.

Note:
Code:
SPEEDY-OSX:battery RehabMan$ grep -l SMD0.*WECB *.txt
battery_Acer-Aspire-E1-571.txt
battery_Acer-S7-391.txt
battery_Dell-Vostro-15xx.txt
battery_HP-Pavilion-n012tx.txt
battery_Lenovo-Y50.txt
battery_Lenovo-z470-z370.txt
battery_Vizio-Ultrabook-CT14.txt

but none of these follow the form
Code:
Store (Zero, [B]^^LPCB.EC0.[/B]SMD0)
Store (LBUF, [B]^^LPCB.EC0.[/B]SMD0)

I felt it logical and modified it as
Code:
^^LPCB.EC0.WECB(0x64,256,Zero)
^^LPCB.EC0.WECB(0x64,256,LBUF)

Thanking you for the guidance.

The patch for HP envy 4 - 1025tx is now complete - for submission to the repo
 

Attachments

  • battery_HP-Envy-4.txt
    6.4 KB · Views: 102
  • HP-Envy-4_Native.zip
    119.3 KB · Views: 47
...
Thanking you for the guidance.

The patch for HP envy 4 - 1025tx is now complete - for submission to the repo

Added to the repo. Thanks for the contribution.
 
RehabMan - thank you so much for all your detailed posts.

I'm working on a 2014 Razer Blade hack (which seems to be fairly uncommon) and having great success thanks to you. Using the attached patch on my DSDT works great, with working percentage and AC/battery status, including high-consumption apps and time remaining before drained/charged. I also used the OS fix (for Win8) and the Mutex fix along with these.

Couldn't ask for more :D
 

Attachments

  • Razer Blade 2014 Battery Patch.zip
    22.1 KB · Views: 72
Back
Top