Contribute
Register

[Guide] How to patch DSDT for working battery status

Your DSDT needs work. It is not simulating a version of Windows for "Darwin".

For example...to simulate Windows Vista...
Code:
        Method (OSID, 0, NotSerialized)
        {
            If (LEqual (ACOS, Zero))
            {
                Store (One, ACOS)
                If (CondRefOf (\_OSI, Local0))
                {
                    If (_OSI (WXP))
                    {
                        Store (0x10, ACOS)
                    }

[B]                    If (1) // was: If (_OSI (WLG))[/B]
                    {
                        Store (0x20, ACOS)
                    }

                    If (_OSI (WIN7))
                    {
                        Store (0x80, ACOS)
                    }

                    If (_OSI (LINX))
                    {
                        Store (0x40, ACOS)
                    }
                }
                Else
                {
                    If (STRE (_OS, W98S))
                    {
                        Store (0x02, ACOS)
                    }

                    If (STRE (_OS, WINM))
                    {
                        Store (0x04, ACOS)
                    }

                    If (STRE (_OS, NT5S))
                    {
                        Store (0x08, ACOS)
                    }
                }
            }

            Return (ACOS)
        }

Also, you have 3 battery objects, probably only one active. You will need to disable the non-active ones by returning Zero from _STA.

When i replace with if (1) it saves with if(one), thats normal?
I still not have battery percentage :(
How do i disable the battery stats?

Sorry for the numb questions and thanks for trying to help me out.
 
You need to fix the references to MDCP and MBCP in method S024.

Look at other patches already in the patch file for inspiration.

Ok i think i did it. Compiler does not return any errors but i still don't see any battery icon/percentage.
Do i need to install any kext in order to work???
View attachment DSDT.aml
 
When i replace with if (1) it saves with if(one), thats normal?

Normal compiler optimization.

I still not have battery percentage :(

Use debug ACPIBatteryManager to determine which methods are failing.
 
Normal compiler optimization.



Use debug ACPIBatteryManager to determine which methods are failing.

this is my log with debug kext active.
Can you see whats is wrong?
thanks
 

Attachments

  • debug log.zip
    3 KB · Views: 58
Can you explain me how to fix it?
Sorry but i just know the very basic from hackintosh :(

You can use ACPIDebug to debug it. But you should check that your DSDT was patched according to the main ACPI patching guide.
 
Back
Top