Contribute
Register

[HELP] Surface Pro 2 Instant Wake Issue

Status
Not open for further replies.
No need to combine any files. SSDT.aml from ssdtPRgen.sh is simply added to ACPI/patched. The bootloader will inject it along with other files in ACPI/patched so OS X can load them into ACPI.



It does not matter to ssdtPRgen.sh whether you have patched ACPI or not.

np, glad i could help... :D



yes, just include the ones i made as before and place the gerenated SSDT.aml (located in ~/Library/ssdtPRGen/SSDT.aml) by ssdtPRGen.sh into ACPI/patched...


check for X86PlatformPlugin in ioreg after boot, if its there all should be fine :)



i think ull manage it after trial and error :D



perfect :) btw, hdmi audio and hotplug should work too (u missed the "B0D3 to HDAU" patch), tell me if not :D

as i have seen, u only need these two sensor plugins,
FakeSMC_ACPISensors.kext and FakeSMC_CPUSensors.kext, remove the other ones...
dont forget to remove GenericUSBXHCI.kext and install FakePCIID_XHCIMux.kext...
u can install IntelBacklight.kext also into /S/L/E...

EDIT:

install attached kext into /S/L/E, it will allow ur GPU to use lowest idle frequency of 200 MHz and unleash the max frequency of 1,1 GHz, u can see it with "Intel Power Gadget" when pushing ur GPU to its limits with "GPU Test" app, for example :)

Thank you guys very much! :thumbup:

I generated a SSDT.aml using ssdtPRGe.sh and put it together with other DSDT.aml&SSDT-X.aml under ACPI/patched and now the tablet is able to have both native power management and sleep!

Just in case any one else is interested in the DSDT patching process, I have summarized the patches needed:
Code:
#New versions of iasl (>2014XXXX) recommended for aml -> dsl

#SSDT-X
[syn] Remove _DSM methods
[syn] Remove _PSS placeholders


#SSDT-8
[syn] Remove _DSM methods
[igpu] Rename GFX0 to IGPU
[igpu] Rename B0D3 to HDAU 
Custom Fix - Replace _PRW 0x09 (Similar to [usb] USB3 _PRW 0x0D/0x6D)
[igpu] Haswell HD4600 Yosemite
[igpu] Brightness fix or CLOVER DSDT Patch "AddPNLF_100000000"


#DSDT
[syn] Remove _DSM methods
[syn] Fix ADBG 
[sys] Fix _WAK Arg0 v2
[sys] Fix _WAK IAOE system/system_IAOE.txt
[sys] IRQ Fix
[sys] SMBUS Fix
[sys] HPET Fix
[sys] RTC Fix 
[sys] Haswell LPC 
[sys] Add IMEI
[sys] Add MCHC
[sys] Fix Mutex with non-zero SyncLevel
[sys] Shutdown Fix v2 system/system_Shutdown2.txt
[sys] OS Check Fix (Windows Vista)
[sys] OS Check Fix (Windows 7)
[sys] OS Check Fix (Windows 8)
[sys] AC Adapter Fix system/system_ADP1.txt (May need to manually add _PRW)
[igpu] Rename GFX0 to IGPU
[igpu] Rename B0D3 to HDAU 
[usb] USB3 _PRW 0x6D (instant wake) 
[usb] 7-series/8-series USB
[audio] Audio Layout 3
Custom fix - XWAK return(0)

I'm now working on the battery status but am facing some problems. The status would work for a while and then break randomly.
The EC region of Surface Pro 2 is as follows:
Code:
            OperationRegion (ECMM, EmbeddedControl, Zero, 0x0100)
            Field (ECMM, ByteAcc, Lock, Preserve)
            {


//                F0RM,   16, 
//                F1RM,   16, 
                  ...
--                RBDI,   16, 
--                RPUI,   16, 
                  ...
--                LSFV,   32, 
--                SMFV,   32, 
--                SLSV,   32, 
--                PNFV,   16, 
                PLSV,   16, 
--                AYFV,   32, 
--                ALSV,   32, 
--                AGID,   32, 
                  ...
--                B0TP,   16, 
//                B0VL,   16, 
//                B0CR,   16, 
//                B0AC,   16, 
--                B0ME,   16, 
--                B0RS,   16, 
//                B0RC,   16, 
//                B0FC,   16, 
--                B0MC,   16, 
--                B0MV,   16, 
--                B0ST,   16, 
//                B0CC,   16, 
//                B0DC,   16, 
//                B0DV,   16, 
--                B0SI,   16, 
--                B0MD,   16, 
--                B0SN,   16, 
                  ...
--                B1TP,   16, 
//                B1VL,   16, 
//                B1CR,   16, 
--                B1AC,   16, 
--                B1ME,   16, 
--                B1RS,   16, 
//                B1RC,   16, 
//                B1FC,   16, 
--                B1MC,   16, 
--                B1MV,   16, 
                B1ST,   16, 
//                B1CC,   16, 
//                B1DC,   16, 
//                B1DV,   16, 
--                B1SI,   16, 
--                B1MD,   16, 
--                B1SN,   16, 
                  ...
//                B0AH,   16, 
//                B1AH,   16, 


            }

Symbols:
'//' - means the register is already included in the patch
'--' - means the register is never referenced and therefore do not need patching (right?)
' ' - means the register may need to be included in the patch

As you can see, most of the registers have been dealt with. What is left are PLSV and B1ST. These two are in fact not referenced in EC0. But registers of the same names are declared and referenced elsewhere (shown below).
Code:
...
    Name (CLMP, Zero)
    Name (PLEN, Zero)
    Name (PLSV, 0x8000)    <-- Declared directly under \
    Name (CSEM, Zero)
...
        Store (One, CSEM) /* \CSEM */
        Store (PPL1, PLSV) /* \PLSV */    <-- referenced soon after
        Store (PL1E, PLEN) /* \PLEN */
        Store (CLP1, CLMP) /* \CLMP */
...
    Method (RPL1, 0, Serialized)
    {
        Store (PLSV, PPL1) /* \PPL1 */
        Store (PLEN, PL1E) /* \PL1E */    <-- referenced soon after
        Store (CLMP, CLP1) /* \CLP1 */
        Store (Zero, CSEM) /* \CSEM */
    }
...

...
            Name (B1CC, Zero)
            Name (B1ST, Zero)    <-- Declared in _SB.PCI0.LPCB.H_EC
            Name (B2CC, Zero)
...
            Store (\_SB.PCI0.LPCB.H_EC.ECRD (RefOf (\_SB.PCI0.LPCB.H_EC.B1CC)), B1SC) /* \B1SC */
            Store (\_SB.PCI0.LPCB.H_EC.ECRD (RefOf (\_SB.PCI0.LPCB.H_EC.B1ST)), B1SS) /* \B1SS */    <-- referenced in \.PNOT
            Store (\_SB.PCI0.LPCB.H_EC.ECRD (RefOf (\_SB.PCI0.LPCB.H_EC.B2CC)), B2SC) /* \B2SC */
            Store (\_SB.PCI0.LPCB.H_EC.ECRD (RefOf (\_SB.PCI0.LPCB.H_EC.B2ST)), B2SS) /* \B2SS */
...
Do I need to deal with there two in the patch?

BTW, here is the patch that I'm currently using:
Code:
# originally created by RehabMan 2014-01-09
# modified by KaNeoRotar 2016-02-23


# (sort of) works for:
#  Microsoft Surface Pro 2 v2


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


# 16-bit registers


# not battery related (not accessed from DSDT, but likely related to fan speeds)
into device label EC0 code_regex F0RM,\s+16, replace_matched begin RM00,8,RM01,8, end;
into device label EC0 code_regex F1RM,\s+16, replace_matched begin RM10,8,RM11,8, end;


# battery related
into device label EC0 code_regex B0VL,\s+16, replace_matched begin VL00,8,VL01,8, end;
into device label EC0 code_regex B0CR,\s+16, replace_matched begin CR00,8,CR01,8, end;
into device label EC0 code_regex B0RC,\s+16, replace_matched begin RC00,8,RC01,8, end;
into device label EC0 code_regex B0FC,\s+16, replace_matched begin FC00,8,FC01,8, end;
into device label EC0 code_regex B0CC,\s+16, replace_matched begin CC00,8,CC01,8, end;
into device label EC0 code_regex B0DC,\s+16, replace_matched begin DC00,8,DC01,8, end;
into device label EC0 code_regex B0DV,\s+16, replace_matched begin DV00,8,DV01,8, end;
into device label EC0 code_regex B0AH,\s+16, replace_matched begin AH00,8,AH01,8, end;


into device label EC0 code_regex B1VL,\s+16, replace_matched begin VL10,8,VL11,8, end;
into device label EC0 code_regex B1CR,\s+16, replace_matched begin CR10,8,CR11,8, end;
into device label EC0 code_regex B1RC,\s+16, replace_matched begin RC10,8,RC11,8, end;
into device label EC0 code_regex B1FC,\s+16, replace_matched begin FC10,8,FC11,8, end;
into device label EC0 code_regex B1CC,\s+16, replace_matched begin CC10,8,CC11,8, end;
into device label EC0 code_regex B1DC,\s+16, replace_matched begin DC10,8,DC11,8, end;
into device label EC0 code_regex B1DV,\s+16, replace_matched begin DV10,8,DV11,8, end;
into device label EC0 code_regex B1AH,\s+16, replace_matched begin AH10,8,AH11,8, end;


# 16-bit methods


into_all method parent_label EC0 code_regex \(B0DC, replace_matched begin (B1B2(DC00,DC01), end;
into_all method parent_label EC0 code_regex \(B1DC, replace_matched begin (B1B2(DC10,DC11), end;
into_all method parent_label EC0 code_regex \(B0FC, replace_matched begin (B1B2(FC00,FC01), end;
into_all method parent_label EC0 code_regex \(B1FC, replace_matched begin (B1B2(FC10,FC11), end;
into_all method parent_label EC0 code_regex \(B0DV, replace_matched begin (B1B2(DV00,DV01), end;
into_all method parent_label EC0 code_regex \(B1DV, replace_matched begin (B1B2(DV10,DV11), end;
into_all method parent_label EC0 code_regex \(B0CR, replace_matched begin (B1B2(CR00,CR01), end;
into_all method parent_label EC0 code_regex \(B1CR, replace_matched begin (B1B2(CR10,CR11), end;
into_all method parent_label EC0 code_regex \(B0RC, replace_matched begin (B1B2(RC00,RC01), end;
into_all method parent_label EC0 code_regex \(B1RC, replace_matched begin (B1B2(RC10,RC11), end;
into_all method parent_label EC0 code_regex \(B0VL, replace_matched begin (B1B2(VL00,VL01), end;
into_all method parent_label EC0 code_regex \(B1VL, replace_matched begin (B1B2(VL10,VL11), end;


into_all method parent_label BAT0 code_regex \(\^\^LPCB.EC0.B0CC, replace_matched begin (B1B2(^^LPCB.EC0.CC00,^^LPCB.EC0.CC01), end;
into_all method parent_label BAT0 code_regex \(\^\^LPCB.EC0.B0RC, replace_matched begin (B1B2(^^LPCB.EC0.RC00,^^LPCB.EC0.RC01), end;
into method label _BTP code_regex Store\s+\(Arg0,\s+\^\^LPCB\.EC0\.B0AH\) replace_matched begin Store(Arg0, ^^LPCB.EC0.AH00) Store(ShiftRight(Arg0, 8), ^^LPCB.EC0.AH01) end;
into method label _BTP code_regex Store\s+\(0x05,\s+\^\^LPCB\.EC0\.B0AH\) replace_matched begin Store(0x05, ^^LPCB.EC0.AH00) Store(ShiftRight(0x05, 8), ^^LPCB.EC0.AH01) end;


into_all method parent_label BAT1 code_regex \(\^\^LPCB.EC0.B1CC, replace_matched begin (B1B2(^^LPCB.EC0.CC10,^^LPCB.EC0.CC11), end;
into_all method parent_label BAT1 code_regex \(\^\^LPCB.EC0.B1RC, replace_matched begin (B1B2(^^LPCB.EC0.RC10,^^LPCB.EC0.RC11), end;
into method label _BTP code_regex Store\s+\(Arg0,\s+\^\^LPCB\.EC0\.B1AH\) replace_matched begin Store(Arg0, ^^LPCB.EC0.AH10) Store(ShiftRight(Arg0, 8), ^^LPCB.EC0.AH11) end;
into method label _BTP code_regex Store\s+\(0x05,\s+\^\^LPCB\.EC0\.B1AH\) replace_matched begin Store(0x05, ^^LPCB.EC0.AH10) Store(ShiftRight(0x05, 8), ^^LPCB.EC0.AH11) end;

Current Sympton:
1. When running on battery, the battery is undetected for about a second every 30 seconds. This makes the tablet believe that it not using battery and therefore raises the backlight level temporarily. By using the debug version of ACPIBatteryManager.kext and observing the console log, I'm seeing the following every time the battery is 'gone':
Code:
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: pollingTimeOut called
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: pollBatteryState: path = 1
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: getBatterySTA called
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: setBatterySTA: battery_status = 0x0
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: !fBatteryPresent
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: clearBatteryState: do_update = true
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: rebuildLegacyIOBatteryInfo called
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: pollingTimeOut called
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: pollBatteryState: path = 1
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: getBatterySTA called
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: setBatterySTA: battery_status = 0x1f
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: getBatteryBIX called
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: setBatteryBIX: acpibat_bix size = 20
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fPowerUnit       = 0x1
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fDesignCapacityRaw  = 5676
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fMaxCapacityRaw     = 5083
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fBatteryTech     = 0x1
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fDesignVoltage   = 7400
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fCapacityWarningRaw = 567
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fLowWarningRaw      = 189
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fCycleCount      = 270
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fMaxErr          = 100000
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fDeviceName      = 'X863568'
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fSerialNumber    = '1F11'
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fType            = 'LION'
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fManufacturer    = 'LGC_LGC'
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: getBatteryBST called
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: setBatteryBST: acpibat_bst size = 4
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fPowerUnit       = 0x1
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: currentStatus    = 0x1
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fCurrentRate     = 1059
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fCurrentCapacity = 5083
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fCurrentVoltage  = 8238
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: fAverageRate = 1186
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: AppleSmartBattery: Battery is discharging.
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: constructAppleSerialNumber called
2/24/16 3:22:32.000 AM kernel[0]: ACPIBatteryManager: rebuildLegacyIOBatteryInfo called

2. When running on AC, the battery status works seemingly stable. But it would suddenly stop working. Turns out the console log is almost the same as above. It seems that setBatterySTA is generating output of battery_status = 0x0 and 0x1f by turn but the battery status icon is showing 'No Battery Available' all the time.
Code:
...
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: pollingTimeOut called
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: pollBatteryState: path = 1
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: getBatterySTA called
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: setBatterySTA: battery_status = 0x1f
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: getBatteryBIX called
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: setBatteryBIX: acpibat_bix size = 20
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fPowerUnit       = 0x1
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fDesignCapacityRaw  = 5676
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fMaxCapacityRaw     = 5085
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fBatteryTech     = 0x1
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fDesignVoltage   = 7400
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fCapacityWarningRaw = 567
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fLowWarningRaw      = 189
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fCycleCount      = 270
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fMaxErr          = 100000
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fDeviceName      = 'X863568'
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fSerialNumber    = '1F11'
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fType            = 'LION'
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fManufacturer    = 'LGC_LGC'
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: getBatteryBST called
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: setBatteryBST: acpibat_bst size = 4
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fPowerUnit       = 0x1
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: currentStatus    = 0x0
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fCurrentRate     = 0
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fCurrentCapacity = 5085
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fCurrentVoltage  = 8317
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: fAverageRate = 0
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: Battery is charged.
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: constructAppleSerialNumber called
2/24/16 12:28:27.000 PM kernel[0]: ACPIBatteryManager: rebuildLegacyIOBatteryInfo called


2/24/16 12:28:34.000 PM kernel[0]: ACPIBatteryManager: pollingTimeOut called
2/24/16 12:28:34.000 PM kernel[0]: ACPIBatteryManager: pollBatteryState: path = 1
2/24/16 12:28:34.000 PM kernel[0]: ACPIBatteryManager: getBatterySTA called
2/24/16 12:28:34.000 PM kernel[0]: ACPIBatteryManager: setBatterySTA: battery_status = 0x0
2/24/16 12:28:34.000 PM kernel[0]: ACPIBatteryManager: !fBatteryPresent
2/24/16 12:28:34.000 PM kernel[0]: ACPIBatteryManager: clearBatteryState: do_update = true
2/24/16 12:28:34.000 PM kernel[0]: ACPIBatteryManager: rebuildLegacyIOBatteryInfo called


2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: pollingTimeOut called
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: pollBatteryState: path = 1
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: getBatterySTA called
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: setBatterySTA: battery_status = 0x1f
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: getBatteryBIX called
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: setBatteryBIX: acpibat_bix size = 20
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fPowerUnit       = 0x1
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fDesignCapacityRaw  = 5676
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fMaxCapacityRaw     = 5085
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fBatteryTech     = 0x1
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fDesignVoltage   = 7400
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fCapacityWarningRaw = 567
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fLowWarningRaw      = 189
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fCycleCount      = 270
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fMaxErr          = 100000
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fDeviceName      = 'X863568'
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fSerialNumber    = '1F11'
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fType            = 'LION'
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fManufacturer    = 'LGC_LGC'
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: getBatteryBST called
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: setBatteryBST: acpibat_bst size = 4
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fPowerUnit       = 0x1
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: currentStatus    = 0x0
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fCurrentRate     = 0
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fCurrentCapacity = 5085
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fCurrentVoltage  = 8318
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: fAverageRate = 0
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: Battery is charged.
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: constructAppleSerialNumber called
2/24/16 12:28:57.000 PM kernel[0]: ACPIBatteryManager: rebuildLegacyIOBatteryInfo called


2/24/16 12:29:04.000 PM kernel[0]: ACPIBatteryManager: pollingTimeOut called
2/24/16 12:29:04.000 PM kernel[0]: ACPIBatteryManager: pollBatteryState: path = 1
2/24/16 12:29:04.000 PM kernel[0]: ACPIBatteryManager: getBatterySTA called
2/24/16 12:29:04.000 PM kernel[0]: ACPIBatteryManager: setBatterySTA: battery_status = 0x0
2/24/16 12:29:04.000 PM kernel[0]: ACPIBatteryManager: !fBatteryPresent
2/24/16 12:29:04.000 PM kernel[0]: ACPIBatteryManager: clearBatteryState: do_update = true
2/24/16 12:29:04.000 PM kernel[0]: ACPIBatteryManager: rebuildLegacyIOBatteryInfo called
...
By reading the log more carefully, I discovered that there seems to be two polling cycles: one getting battery_status = 0x1f and the other one getting battery_status = 0x0. Both of them are running with a timeout of 30 seconds. Now the question is: How do I solve this?

Thank you guys again. I hope I'm providing enough details for you to come up with potential solutions.

Regards,
 
I generated a SSDT.aml using ssdtPRGe.sh and put it together with other DSDT.aml&SSDT-X.aml under ACPI/patched and now the tablet is able to have both native power management and sleep!

fine :D

Just in case any one else is interested in the DSDT patching process, I have summarized the patches needed:


Code:
Custom Fix - Replace _PRW 0x09 (Similar to [usb] USB3 _PRW 0x0D/0x6D) <--- prhps not needed after correct native powermanagement

[igpu] Rename B0D3 to HDAU <---- layout-id also has to be renamed to "3" too

[sys] OS Check Fix (Windows Vista)
[sys] OS Check Fix (Windows 7)
[sys] OS Check Fix (Windows 8) <--- u only need this, or one other, but windows 8 seems to be ok :D

youre patch is looking good so far, i can see :/


Do I need to deal with there two in the patch?

as i m looking onto other similar patches it seems ok to leave them as they are,
cause B1SS seems to interact with BAT1 only...


By reading the log more carefully, I discovered that there seems to be two polling cycles: one getting battery_status = 0x1f and the other one getting battery_status = 0x0. Both of them are running with a timeout of 30 seconds. Now the question is: How do I solve this?

just an idea,
disable BAT1 device prhps it interacs with the battery kext...
and ur methods, cause it definately has been loaded before in ur last ioreg...

Code:
# Disable BAT1 device

into method label _STA parent_label BAT1 replace_content begin Return (Zero) end;

what u also could try is kicking out BAT1 and BAT2 of PNOT...
seems to also problematic sometimes...
comment the lines like below... or copy paste :)

Code:
        If (LEqual (ECON, One))
        {
            /*Store (\_SB.PCI0.LPCB.H_EC.ECRD (RefOf (\_SB.PCI0.LPCB.H_EC.B1CC)), B1SC)
            Store (\_SB.PCI0.LPCB.H_EC.ECRD (RefOf (\_SB.PCI0.LPCB.H_EC.B1ST)), B1SS)
            Store (\_SB.PCI0.LPCB.H_EC.ECRD (RefOf (\_SB.PCI0.LPCB.H_EC.B2CC)), B2SC)
            Store (\_SB.PCI0.LPCB.H_EC.ECRD (RefOf (\_SB.PCI0.LPCB.H_EC.B2ST)), B2SS)*/
            If (LGreaterEqual (OSYS, 0x07D6))
            {
                Notify (\_SB.PCI0.LPCB.H_EC.BAT0, 0x81)
                //Notify (\_SB.PCI0.LPCB.H_EC.BAT1, 0x81)
                //Notify (\_SB.PCI0.LPCB.H_EC.BAT2, 0x81)
            }
            Else
            {
                Notify (\_SB.PCI0.LPCB.H_EC.BAT0, 0x80)
                //Notify (\_SB.PCI0.LPCB.H_EC.BAT1, 0x80)
                //Notify (\_SB.PCI0.LPCB.H_EC.BAT2, 0x80)
            }
        }

but its just a guess ://
 
Thank you guys again. I hope I'm providing enough details for you to come up with potential solutions.

Read battery guide, post #1, "Problem Reporting".
 
just an idea,
disable BAT1 device prhps it interacs with the battery kext...
and ur methods, cause it definately has been loaded before in ur last ioreg...

Code:
# Disable BAT1 device

into method label _STA parent_label BAT1 replace_content begin Return (Zero) end;

Thanks for the suggestion! :p It worked and the second polling loop seem to have disappeared since BAT1 is no longer available. I guess my only question now is that: I no longer have the option to set 'Computer Sleep' in Energy Saver preference panel. Is this normal? What should I do to get the setting back? (I tried turning off Power Nap but everything else stayed the same)

Screen Shot 2016-02-24 at 4.12.25 PM.pngScreen Shot 2016-02-24 at 4.12.37 PM.png

Read battery guide, post #1, "Problem Reporting".

Please have a look at the file attached.

Thank you. :)

Regards,
 

Attachments

  • troubleshoot.tar.gz
    1.8 MB · Views: 186
Thanks for the suggestion! :p It worked and the second polling loop seem to have disappeared since BAT1 is no longer available.

nice :D glad u managed it so far :)
just one thing, test if its also working after sleep, or if _WAK calls BAT1 again and is making problems...
thats the reason why is suggested the "remove from pnot" thing :)

I guess my only question now is that: I no longer have the option to set 'Computer Sleep' in Energy Saver preference panel. Is this normal? What should I do to get the setting back? (I tried turning off Power Nap but everything else stayed the same)

just untick "prevent computer from sleeping..."
then it will use the specified monitor interval for pc sleep...

for battery set either to "never" or leave specified interval...

u also can modify the settings by either the "pmset" command in terminal,
or with a plist editor in "/Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist"...

a command would be, "sudo pmset -b sleep 0", to disable autosleep when on battery, for example...
just read the manual by "man pmset"...

to change hibernatemode to anything else then "3" or "0" u have to use the plist editor method on elcapitan...

just as a hint, for hibernate use "29" and for sleep with possibility to go to deepsleep use "31"...
but keep in mind, hibernate is not guaranteed...
as ur using "OsxAptioFix2Drv-64.efi" it could work... just try... if it doesnt, switch back to hibernatemode "0"... and all should be fine again :)
 
Please have a look at the file attached.

use my attached clover config, u reenabled patches, options and bootargs u dont need !!!
use it as clean as possible...

remake ur DSDT.dsl with necessary patches and only "[sys] OS Check Fix (Windows 8)",
like written before use only one "OS Check" method... if u didnt do it already :)


install FAKESMC and its plugins to /S/L/E, but leave FAKESMC without plugins in EFI partiton too,
cause clover detects if theyre in your kextcache and wont inject them on evry boot...
only when needed...

did u install adummyhda and adummyagpm twice?!
if yes, put both only in /S/L/E... not in /L/E...

and u can remove "FakePCIID-Intel-HDMI-Audio.kext" cause ur device is compatible,
it only attaches to incompatible device-ids...

what u could try is removing "EmuVariableUefi-64.efi" from CLOVER/drivers64UEFI/,
to enable native NVRAM... just remove it, reboot, and check between two further reboots, by "nvram -p" in terminal if ur entries are still there...
if they wont, lay it back...



But in the end everything else looks good :D
 

Attachments

  • config.plist.zip
    1.9 KB · Views: 163
nice :D glad u managed it so far :)
just one thing, test if its also working after sleep, or if _WAK calls BAT1 again and is making problems...
thats the reason why is suggested the "remove from pnot" thing :)



just untick "prevent computer from sleeping..."
then it will use the specified monitor interval for pc sleep...

for battery set either to "never" or leave specified interval...

u also can modify the settings by either the "pmset" command in terminal,
or with a plist editor in "/Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist"...

a command would be, "sudo pmset -b sleep 0", to disable autosleep when on battery, for example...
just read the manual by "man pmset"...

to change hibernatemode to anything else then "3" or "0" u have to use the plist editor method on elcapitan...

just as a hint, for hibernate use "29" and for sleep with possibility to go to deepsleep use "31"...
but keep in mind, hibernate is not guaranteed...
as ur using "OsxAptioFix2Drv-64.efi" it could work... just try... if it doesnt, switch back to hibernatemode "0"... and all should be fine again :)

I was looking for something like this:
os_x_battery_life.jpg
But thanks for pointing out the command line option for me.


use my attached clover config, u reenabled patches, options and bootargs u dont need !!!
use it as clean as possible...

remake ur DSDT.dsl with necessary patches and only "[sys] OS Check Fix (Windows 8)",
like written before use only one "OS Check" method... if u didnt do it already :)


install FAKESMC and its plugins to /S/L/E, but leave FAKESMC without plugins in EFI partiton too,
cause clover detects if theyre in your kextcache and wont inject them on evry boot...
only when needed...

and u can remove "FakePCIID-Intel-HDMI-Audio.kext" cause ur device is compatible,
it only attaches to incompatible device-ids...

But in the end everything else looks good :D

So your main idea here is to deal with everything in DSDT or kextcache instead of relying on Clover, right?

It's a good idea when the patches are not easy to modify. When it comes to backlight, I found the Clover patch to be desirable since it provides even backlight levels. Your SSDT-8.aml tends to make it look brighter :p Maybe it's just my personal taste.

BTW, would you mind explaining why you changed the order of the kext patches in config.plist? I guess it's similar to ordering of names in DSDT but I'm not very sure...

did u install adummyhda and adummyagpm twice?!
if yes, put both only in /S/L/E... not in /L/E...

I use Kext Utility for kext installation and it seems that all those kexts are in S/L/E.

what u could try is removing "EmuVariableUefi-64.efi" from CLOVER/drivers64UEFI/,
to enable native NVRAM... just remove it, reboot, and check between two further reboots, by "nvram -p" in terminal if ur entries are still there...
if they wont, lay it back...

I'll try it now to see if native NVRAM is supported.

Thank you very much for the help.

Regards,
 
I was looking for something like this:
View attachment 178456
But thanks for pointing out the command line option for me.

its no more available on never mac models,
simply use the "sleep" option of pmset for that...
it specifies the minutes when mac will go to sleep...
"0" disables autosleep...

Code:
Battery Power        -1
AC Power        -1*
Currently in use:
 standbydelay         10800
 standby              0
 womp                 1
 halfdim              1
 hibernatefile        /var/vm/sleepimage
 darkwakes            0
 networkoversleep     0
 disksleep            10
 sleep                60
 autopoweroffdelay    14400
 hibernatemode        29
 autopoweroff         1
 ttyskeepawake        0
 displaysleep         15
 lidwake              1

this for example will put display after 15 mins and mac after 60 minutes to sleep...


So your main idea here is to deal with everything in DSDT or kextcache instead of relying on Clover, right?

as u want to, but i prefer dsdt, cause its static and as the hardware wont change its a one time change...
the backlight is handled by the kext, normally it should not make any difference...

clover checks for existing patches in DSDT/SSDT and wont implement if ur ticking them in config,
but why u should have duplicates, if one works perfectly... :)
and it could mess up things too...


BTW, would you mind explaining why you changed the order of the kext patches in config.plist? I guess it's similar to ordering of names in DSDT but I'm not very sure...

didnt do that, was "clover configurator" not the preferred method to edit the config but good for a fast look into and to get an overview...
and dont care about the ordering its not important...

in DSDT, the patch order is important, cause for example the "usb instant wake" patch eliminates the _DSM of "usb 7/8 series" and so on...


I use Kext Utility for kext installation and it seems that all those kexts are in S/L/E.

all right :D perfect :)


I'll try it now to see if native NVRAM is supported.

GL :D normally it should work...


Thank you very much for the help.

NP :p
 
Bro.... how did yo manage to get 10.11 installed. I got it to boot but it won't install. the install process erros with "the operation couldn't be completed. Undefined error: 0"
 
Bro... same....

...Wait... I just found this and it fixed the error...
"When I was installing El Capitan 10.11 using Clover USB flash boot, I got the “operation couldn’t be completed. Undefined Error: 0. Quit the installer to restart your computer and try again.

The reason is either the corrupted flash drive or missing all the hidden files in the InstallESD.dmg. I re-created the USB installer and copied all the hidden files to the root of the USB base and everything worked fine: BaseSystem.chunklist, BaseSystem.dmg, AppleDiagnostics.dmg, AppleDiagnostics.chunklist."
 
Last edited:
Status
Not open for further replies.
Back
Top