Contribute
Register

[Guide] Lenovo Z50-70/Z40-70/G50-70/G40-70 using Clover UEFI

Joined
Jan 22, 2013
Messages
122
Motherboard
Lenovo Z50-70
CPU
i7-4510U
Graphics
GT 840M
yes, that will change all _PRW to XPRW

Oh no sir I don't wanna change all , ok this below is the whole method , at the button it has : Name (_PRW, Package (0x02)

Now I want to put a patch in my config to change this specific _PRW in this specific Method " which is LID0"

Only this single _PRW not all of them around the DSDT


Device (LID0)
{
Name (_HID, EisaId ("PNP0C0D") /* Lid Device */) // _HID: Hardware ID
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (LEqual (ECON, One))
{
Return (0x0F)
}

Return (Zero)
}

Method (_LID, 0, NotSerialized) // _LID: Lid Status
{
Return (GL14) /* \GL14 */
}

Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake
{
0x0E,
0x03
})
}
 

Feartech

Moderator
Joined
Aug 3, 2013
Messages
29,272
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
  1. iMac
Mobile Phone
  1. iOS
Oh no sir I don't wanna change all , ok this below is the whole method , at the button it has : Name (_PRW, Package (0x02)

Now I want to put a patch in my config to change this specific _PRW in this specific Method " which is LID0"

Only this single _PRW not all of them around the DSDT


Device (LID0)
{
Name (_HID, EisaId ("PNP0C0D") /* Lid Device */) // _HID: Hardware ID
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (LEqual (ECON, One))
{
Return (0x0F)
}

Return (Zero)
}

Method (_LID, 0, NotSerialized) // _LID: Lid Status
{
Return (GL14) /* \GL14 */
}

Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake
{
0x0E,
0x03
})
}
try renaming _LID to XLID
 
Joined
Jan 22, 2013
Messages
122
Motherboard
Lenovo Z50-70
CPU
i7-4510U
Graphics
GT 840M
try renaming _LID to XLID

No sir this will break the _LID method while I want to disable Name (_PRW only not the LID method

what about changing those 0x0E,0x03 ?? do you know how to make this patch ? Rehabman was also talking about it in the link you shared but I still didn't get how he did it



See here :


For example, the native _SB.PCI0.EHC1._PRW method might read:
Code:
Method (_PRW, 0, NotSerialized) // _PRW: Power Resources for Wake
{
Return (GPRW (0x6D, 0x03))
}

In order to patch it so USB devices on EHCI#1 cannot cause wake, it would be changed:
Code:
Method (_PRW, 0, NotSerialized) // _PRW: Power Resources for Wake
{
Return (GPRW (0x6D, 0))
}
 

Feartech

Moderator
Joined
Aug 3, 2013
Messages
29,272
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
  1. iMac
Mobile Phone
  1. iOS
No sir this will break the _LID method while I want to disable Name (_PRW only not the LID method

what about changing those 0x0E,0x03 ?? do you know how to make this patch ? Rehabman was also talking about it in the link you shared but I still didn't get how he did it



See here :


For example, the native _SB.PCI0.EHC1._PRW method might read:
Code:
Method (_PRW, 0, NotSerialized) // _PRW: Power Resources for Wake
{
Return (GPRW (0x6D, 0x03))
}

In order to patch it so USB devices on EHCI#1 cannot cause wake, it would be changed:
Code:
Method (_PRW, 0, NotSerialized) // _PRW: Power Resources for Wake
{
Return (GPRW (0x6D, 0))
}
i did something similar a few years back:

Code:
<dict>
                <key>Comment</key>
                <string>_SB.PCI0.I2C1.ETPD._CRS to _SB.PCI0.I2C1.ETPD.XCRS</string>
                <key>Count</key>
                <integer>0</integer>
                <key>Enabled</key>
                <true/>
                <key>Find</key>
                <data>
                oAp7RFNZTgEApACkCg8UEV9DUlMApIRTQkZCU0JGSQA=
                </data>
                <key>Limit</key>
                <integer>0</integer>
                <key>Mask</key>
                <data>
                </data>
                <key>OemTableId</key>
                <data>
                </data>
                <key>Replace</key>
                <data>
                oAp7RFNZTgEApACkCg8UEVhDUlMApIRTQkZCU0JGSQA=
                </data>
                <key>ReplaceMask</key>
                <data>
                </data>
                <key>Skip</key>
                <integer>0</integer>
                <key>TableLength</key>
                <integer>0</integer>
                <key>TableSignature</key>
                <data>
                RFNEVA==
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>GPIO._STA to GPIO.XSTA</string>
                <key>Count</key>
                <integer>0</integer>
                <key>Enabled</key>
                <true/>
                <key>Find</key>
                <data>
                X1NUQQCgCZNTQlJHAA==
                </data>
                <key>Limit</key>
                <integer>0</integer>
                <key>Mask</key>
                <data>
                </data>
                <key>OemTableId</key>
                <data>
                </data>
                <key>Replace</key>
                <data>
                WFNUQQCgCZNTQlJHAA==
                </data>
                <key>ReplaceMask</key>
                <data>
                </data>
                <key>Skip</key>
                <integer>0</integer>
                <key>TableLength</key>
                <integer>0</integer>
                <key>TableSignature</key>
                <data>
                RFNEVA==
                </data>
            </dict>

along with the attached .aml file. not related to LID wake etc, but may give you an idea in regards to renames
 

Attachments

  • SSDT-GPI0.aml
    239 bytes · Views: 41
Joined
Jan 22, 2013
Messages
122
Motherboard
Lenovo Z50-70
CPU
i7-4510U
Graphics
GT 840M
i did something similar a few years back:

Code:
<dict>
                <key>Comment</key>
                <string>_SB.PCI0.I2C1.ETPD._CRS to _SB.PCI0.I2C1.ETPD.XCRS</string>
                <key>Count</key>
                <integer>0</integer>
                <key>Enabled</key>
                <true/>
                <key>Find</key>
                <data>
                oAp7RFNZTgEApACkCg8UEV9DUlMApIRTQkZCU0JGSQA=
                </data>
                <key>Limit</key>
                <integer>0</integer>
                <key>Mask</key>
                <data>
                </data>
                <key>OemTableId</key>
                <data>
                </data>
                <key>Replace</key>
                <data>
                oAp7RFNZTgEApACkCg8UEVhDUlMApIRTQkZCU0JGSQA=
                </data>
                <key>ReplaceMask</key>
                <data>
                </data>
                <key>Skip</key>
                <integer>0</integer>
                <key>TableLength</key>
                <integer>0</integer>
                <key>TableSignature</key>
                <data>
                RFNEVA==
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>GPIO._STA to GPIO.XSTA</string>
                <key>Count</key>
                <integer>0</integer>
                <key>Enabled</key>
                <true/>
                <key>Find</key>
                <data>
                X1NUQQCgCZNTQlJHAA==
                </data>
                <key>Limit</key>
                <integer>0</integer>
                <key>Mask</key>
                <data>
                </data>
                <key>OemTableId</key>
                <data>
                </data>
                <key>Replace</key>
                <data>
                WFNUQQCgCZNTQlJHAA==
                </data>
                <key>ReplaceMask</key>
                <data>
                </data>
                <key>Skip</key>
                <integer>0</integer>
                <key>TableLength</key>
                <integer>0</integer>
                <key>TableSignature</key>
                <data>
                RFNEVA==
                </data>
            </dict>

along with the attached .aml file. not related to LID wake etc, but may give you an idea in regards to renames


thank you so much , we're getting quite close : do you see in your file in the beginning there is :

External (_SB_.PCI0.GPI0, DeviceObj)
External (_SB_.PCI0.I2C1.ETPD, DeviceObj)

those externals are related to the methods or scopes which you were working on in your aml file

now in my case it's vice versa you know I'm working on:

Scope (_SB
device (LID0)
name _PRW


so now in my case what external links should I use instead of those you're using in your aml (
External (_SB_.PCI0.GPI0, DeviceObj)
External (_SB_.PCI0.I2C1.ETPD, DeviceObj))
 
Joined
Jan 22, 2013
Messages
122
Motherboard
Lenovo Z50-70
CPU
i7-4510U
Graphics
GT 840M
i did something similar a few years back:

Code:
<dict>
                <key>Comment</key>
                <string>_SB.PCI0.I2C1.ETPD._CRS to _SB.PCI0.I2C1.ETPD.XCRS</string>
                <key>Count</key>
                <integer>0</integer>
                <key>Enabled</key>
                <true/>
                <key>Find</key>
                <data>
                oAp7RFNZTgEApACkCg8UEV9DUlMApIRTQkZCU0JGSQA=
                </data>
                <key>Limit</key>
                <integer>0</integer>
                <key>Mask</key>
                <data>
                </data>
                <key>OemTableId</key>
                <data>
                </data>
                <key>Replace</key>
                <data>
                oAp7RFNZTgEApACkCg8UEVhDUlMApIRTQkZCU0JGSQA=
                </data>
                <key>ReplaceMask</key>
                <data>
                </data>
                <key>Skip</key>
                <integer>0</integer>
                <key>TableLength</key>
                <integer>0</integer>
                <key>TableSignature</key>
                <data>
                RFNEVA==
                </data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>GPIO._STA to GPIO.XSTA</string>
                <key>Count</key>
                <integer>0</integer>
                <key>Enabled</key>
                <true/>
                <key>Find</key>
                <data>
                X1NUQQCgCZNTQlJHAA==
                </data>
                <key>Limit</key>
                <integer>0</integer>
                <key>Mask</key>
                <data>
                </data>
                <key>OemTableId</key>
                <data>
                </data>
                <key>Replace</key>
                <data>
                WFNUQQCgCZNTQlJHAA==
                </data>
                <key>ReplaceMask</key>
                <data>
                </data>
                <key>Skip</key>
                <integer>0</integer>
                <key>TableLength</key>
                <integer>0</integer>
                <key>TableSignature</key>
                <data>
                RFNEVA==
                </data>
            </dict>

along with the attached .aml file. not related to LID wake etc, but may give you an idea in regards to renames

Ok is correct like this ? can you check it for me if it's correct , also if you can I have 1 syntax error if you could solve it I would appreciate it coz I don't have much experience with such things ..
 

Attachments

  • SSDT-LID.dsl
    1.6 KB · Views: 43

Feartech

Moderator
Joined
Aug 3, 2013
Messages
29,272
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
  1. iMac
Mobile Phone
  1. iOS
Ok is correct like this ? can you check it for me if it's correct , also if you can I have 1 syntax error if you could solve it I would appreciate it coz I don't have much experience with such things ..
missing 2x } at the end of the file
 

Feartech

Moderator
Joined
Aug 3, 2013
Messages
29,272
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
  1. iMac
Mobile Phone
  1. iOS
I didn't get that sir , I added 2 times } but still ir it shows another error. if you could compile it and upload it please ?
issue with ECON and GL14 as you haven't defined them as to what they are
 
Joined
Jan 22, 2013
Messages
122
Motherboard
Lenovo Z50-70
CPU
i7-4510U
Graphics
GT 840M
issue with ECON and GL14 as you haven't defined them as to what they are

This is my maximum ability actually with. such stuff , I had a headache until. I found out _PRW now ECON and GL14 ,please once again if you can compile the file for me I would appreciate it , I don't care about ECON and GLA I only care about the Device(LID0) the Method and the name
 
Top