Contribute
Register

[Guide] How to patch DSDT for working battery status

No, you're right, KernelCpu=true is not needed. I just made it false and it still boots!

OK. Great... that is more like what I would expect.
 
Hello. I have Dell Latitude E6530 laptop. There is no patch in repo for my laptop.
I have skills to make edits in dsdt. I had Lenovo Y570 and using manual like this i have done battery as well. But in my case with Dell i can't do it.
I have this situation:
- I run El Capitan OS X 10.11.6 (15G1108)
- I have Clover UEFI v2.3k r3859
- I have ACPIBatteryManager.kext (1.70.2) in EFI/Clover/Kexts/10.11/
- !!!!!! I can't make edits in my DSDT. My DSDT is very different in BAT section. I have 3 (three) BAT devices )))
Here is my dsdt and config.
I can provide any dumps or information.
 

Attachments

  • DSDT+Config.zip
    21.5 KB · Views: 149
Hello. I have Dell Latitude E6530 laptop. There is no patch in repo for my laptop.
I have skills to make edits in dsdt. I had Lenovo Y570 and using manual like this i have done battery as well. But in my case with Dell i can't do it.
I have this situation:
- I run El Capitan OS X 10.11.6 (15G1108)
- I have Clover UEFI v2.3k r3859
- I have ACPIBatteryManager.kext (1.70.2) in EFI/Clover/Kexts/10.11/
- !!!!!! I can't make edits in my DSDT. My DSDT is very different in BAT section. I have 3 (three) BAT devices )))
Here is my dsdt and config.
I can provide any dumps or information.

You have no multibyte EC fields to patch, so the patching should be easy.
You do have Mutex objects with non-zero SyncLevel, so you will need to patch for that.
Read the main ACPI patching guide. It is linked from post #1.
 
You have no multibyte EC fields to patch, so the patching should be easy.
You do have Mutex objects with non-zero SyncLevel, so you will need to patch for that.
Read the main ACPI patching guide. It is linked from post #1.
Thanks for replay )
But I find the way to solve my problem. I only need to add Return (Zero) to BAT1/_STA and BAT2/_STA and in ioreg i have one battery and working status with yours kext.

Can U make this little patch?

Code:
Device (BAT1)
        {
            Name (_HID, EisaId ("PNP0C0A"))  // _HID: Hardware ID
            Name (_UID, 0x02)  // _UID: Unique ID
            Name (_PCL, Package (0x01)  // _PCL: Power Consumer List
            {
                _SB
            })
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Store (EEAC (0x05, Zero), Local0)
                If (LLess (Local0, 0x02))
                {
                    Return (Zero)
                }

                Store (ECG5 (), Local0)
                And (Local0, 0x08, Local0)
                If (Local0)
                {
                    Return (0x1F)
                }

                Return (Zero) - [B][I]was Return (0xF)[/I][/B]
            }
.....

Device (BAT2)
        {
            Name (_HID, EisaId ("PNP0C0A"))  // _HID: Hardware ID
            Name (_UID, 0x03)  // _UID: Unique ID
            Name (_PCL, Package (0x01)  // _PCL: Power Consumer List
            {
                _SB
            })
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Store (EEAC (0x05, Zero), Local0)
                If (LLess (Local0, 0x03))
                {
                    Return (Zero)
                }

                Store (ECG5 (), Local0)
                And (Local0, 0x20, Local0)
                If (Local0)
                {
                    Return (0x1F)
                }

                Return (Zero) [B][I]was Return (0xF)[/I][/B]
            }
[\code]
 
Thanks for replay )
But I find the way to solve my problem. I only need to add Return (Zero) to BAT1/_STA and BAT2/_STA and in ioreg i have one battery and working status with yours kext.

Can U make this little patch?

Code:
Device (BAT1)
        {
            Name (_HID, EisaId ("PNP0C0A"))  // _HID: Hardware ID
            Name (_UID, 0x02)  // _UID: Unique ID
            Name (_PCL, Package (0x01)  // _PCL: Power Consumer List
            {
                _SB
            })
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Store (EEAC (0x05, Zero), Local0)
                If (LLess (Local0, 0x02))
                {
                    Return (Zero)
                }

                Store (ECG5 (), Local0)
                And (Local0, 0x08, Local0)
                If (Local0)
                {
                    Return (0x1F)
                }

                Return (Zero) - [B][I]was Return (0xF)[/I][/B]
            }
.....

Device (BAT2)
        {
            Name (_HID, EisaId ("PNP0C0A"))  // _HID: Hardware ID
            Name (_UID, 0x03)  // _UID: Unique ID
            Name (_PCL, Package (0x01)  // _PCL: Power Consumer List
            {
                _SB
            })
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Store (EEAC (0x05, Zero), Local0)
                If (LLess (Local0, 0x03))
                {
                    Return (Zero)
                }

                Store (ECG5 (), Local0)
                And (Local0, 0x20, Local0)
                If (Local0)
                {
                    Return (0x1F)
                }

                Return (Zero) [B][I]was Return (0xF)[/I][/B]
            }
[\code]

Refer to existing patches that disable _STA...
 
I got into problem patching battery status. I used customised "battery_HP-DV6-3165sf.txt" since it had the same entries needed to patch. At first a couple of boots it seemed to work, then booting slowed down with error mentioned and finally I couldn't boot with constantly running error:

ACPI Error: method parse/execution failed [\_SB_.PCI0.LPCB.EC0_._Q20] (Node ffffff802dcfe850), AE_NO_MEMORY (20140828/psparse-270)

I tried to patched with original "battery_HP-DV6-3165sf.txt" - same thing. In both cases battery status worked ok, just this error. Where could be the problem? When I remove battery patch - everything is back to normal.
 

Attachments

  • battery-dsdt.zip
    1.8 MB · Views: 167
I got into problem patching battery status. I used customised "battery_HP-DV6-3165sf.txt" since it had the same entries needed to patch. At first a couple of boots it seemed to work, then booting slowed down with error mentioned and finally I couldn't boot with constantly running error:

ACPI Error: method parse/execution failed [\_SB_.PCI0.LPCB.EC0_._Q20] (Node ffffff802dcfe850), AE_NO_MEMORY (20140828/psparse-270)

I tried to patched with original "battery_HP-DV6-3165sf.txt" - same thing. In both cases battery status worked ok, just this error. Where could be the problem? When I remove battery patch - everything is back to normal.

I would recommend "HP G6 2221ss".
And you patched ACPI incorrectly. For example, you applied _PRW 0x0d, when your DSDT clearly uses 0x6d.
 
I would recommend "HP G6 2221ss".
And you patched ACPI incorrectly. For example, you applied _PRW 0x0d, when your DSDT clearly uses 0x6d.

Thank you for suggestion and indicating an error. I tried the new G6 battery patch and it doesn't give me ACPI error but neither shows remaining battery - always stuck at 20 hours remaining. So I compared both patches and the difference is in this "buggy UPBS method". When I put it into G6 patch, it shows remaining battery, but gives the same error.

Code:
# rewrite buggy UPBS method, provided by chihab222, credit gsly
into method label UPBS remove_entry;
into device label BAT0 insert
begin
Method (UPBS, 0, NotSerialized)\n
{\n
    Store (^^PCI0.LPCB.EC0.MBST, Index (PBST, Zero))\n
    ^^PCI0.LPCB.EC0.SMRD (0x09, 0x16, 0x0A, RefOf (Local0))\n
    Store (Local0, Index (PBST, One))\n
    ^^PCI0.LPCB.EC0.SMRD (0x09, 0x16, 0x0F, RefOf (Local1))\n
    Store (Local1, Index (PBST, 0x02))\n
    ^^PCI0.LPCB.EC0.SMRD (0x09, 0x16, 0x09, RefOf (Local2))\n
    Store (Local2, Index (PBST, 0x03))\n
}\n
end;

I tried to look at it hoping that editing entries would help but clearly I don't understand a thing here. Any suggestions what to change to retain remaining battery time but without errors? Thank you.
 

Attachments

  • battery-dsdt2.zip
    159.6 KB · Views: 182
Thank you for suggestion and indicating an error. I tried the new G6 battery patch and it doesn't give me ACPI error but neither shows remaining battery - always stuck at 20 hours remaining.

Read post #1, "Problem Reporting".
 
Back
Top