Contribute
Register

Patch _SB.PCI0.CNVW._PRW to return (GPRW (0x6D, Zero))

Status
Not open for further replies.
Joined
Apr 29, 2017
Messages
23
Motherboard
Gigabyte Z390 Aorus Pro WiFi
CPU
i9-9900K
Graphics
RX 580
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
edit: this was caused by a dodgy BT card; no longer required.

My hack currently wakes from sleep as soon as going to sleep. When viewing pmset -g log the wake reason is "XDCI CNVW". Sidenote: I think this is the onboard CNVI WiFi/BT module?

To fix this I want to apply a patch to have the _SB.PCI0.CNVW._PRW method return (GPRW (0x6D, Zero)). I've tried one that applies to all _PRW methods, but that stops me waking via keyboard/mouse.

My current DSDT (cut down) includes:


Code:
DefinitionBlock ("", "DSDT", 2, "ALASKA", "A M I", 0x01072009)
{
    Scope (_SB.PCI0)
    {
        Device (CNVW)
        {
            Name (_ADR, 0x00140003)  // _ADR: Address
            OperationRegion (CWAR, PCI_Config, Zero, 0x0100)
            Field (CWAR, WordAcc, NoLock, Preserve)
            {
                VDID,   32,
                    ,   1,
                WMSE,   1,
                WBME,   1,
                Offset (0x10),
                WBR0,   64,
                Offset (0x44),
                    ,   28,
                WFLR,   1,
                Offset (0x48),
                    ,   15,
                WIFR,   1,
                Offset (0xCC),
                WPMS,   32
            }

            Method (_S0W, 0, NotSerialized)  // _S0W: S0 Device Wake State
            {
                Return (0x03)
            }

            Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (GPRW (0x6D, 0x04))
            }

            Method (_DSW, 3, NotSerialized)  // _DSW: Device Sleep Wake
            {
            }

            PowerResource (WRST, 0x05, 0x0000)
            {
                Method (_STA, 0, NotSerialized)  // _STA: Status
                {
                    Return (One)
                }

                Method (_ON, 0, NotSerialized)  // _ON_: Power On
                {
                }

                Method (_OFF, 0, NotSerialized)  // _OFF: Power Off
                {
                }

                Method (_RST, 0, NotSerialized)  // _RST: Device Reset
                {
                    If ((WFLR == One))
                    {
                        WBR0 = Zero
                        WPMS = Zero
                        WBME = Zero
                        WMSE = Zero
                        WIFR = One
                    }
                }
            }

            Name (_PRR, Package (0x01)  // _PRR: Power Resource for Reset
            {
                WRST
            })
        }
    }
}

I've tried creating the following patch:

Code:
DefinitionBlock ("", "SSDT", 2, "hack", "CNVW", 0x00000000)
{
    External(_SB.PCI0.CNVW, DeviceObj)
    External(GPRW, MethodObj)

    Scope (_SB.PCI0.CNVW)
    {
        Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
        {
            Return (GPRW (0x6D, Zero))
        }
    }
}

but it does not change the system DSDT. What am I doing wrong here?
 
Last edited:
Did you rename the original method _PRW to something else?
 
Status
Not open for further replies.
Back
Top