Contribute
Register

Fix Sleep on Sierra

Status
Not open for further replies.
I think I inserted everything you requested. The only thing I wondered about (because you didn't mention it anymore) is the SSDT-LPC... I left it in the folder too since I now change _DSM to XDSM. I did a quick test and it still woke up pretty much instantly.

Is the wake instant? Instant wakes doesn't really matter on a Desktop but if its waking straight away then theres something up.
 
Is the wake instant? Instant wakes doesn't really matter on a Desktop but if its waking straight away then theres something up.

Well, not 'instant' instant. I measured it with the trusty stopwatch and it's a 2 second sleep. Don't know if that counts as instant enough...

Do the patches need to be in a certain order?

And another problem: When testing sleep I mostly tested once and then restarted to see if the problem is gone. I just found out that always after the first test the pc came back on and the display output is working. If I put it to sleep a second time the pc wakes up as always but the display output isn't working. The display recognizes a source and switches on but switches off soon after because there is no input. I tried that three times now and think it's consistent behaviour.
 
Last edited:
Well, not 'instant' instant. I measured it with the trusty stopwatch and it's a 2 second sleep. Don't know if that counts as instant enough...

Do the patches need to be in a certain order?

And another problem: When testing sleep I mostly tested once and then restarted to see if the problem is gone. I just found out that always after the first test the pc came back on and the display output is working. If I put it to sleep a second time the pc wakes up as always but the display output isn't working. The display recognizes a source and switches on but switches off soon after because there is no input. I tried that three times now and think it's consistent behaviour.

What USB devices do you have?
 
What USB devices do you have?

Currently connected are:
  • USB extension cord. Originally there was a hub on it but I disconnected it. So just the extension
  • USB cable to 3d printer (which isn't connected on the printer side)
  • USB to display which acts as hub and connects mouse and keyboard
pmset gives me these:

Kernel Assertions: 0x4=USB
id=500 level=255 0x4=USB mod=01.01.70, 01:00 description=com.apple.usb.externaldevice.15500000 owner=USB3.1 Hub
id=502 level=255 0x4=USB mod=01.01.70, 01:00 description=com.apple.usb.externaldevice.14800000 owner=BCM20702A0
id=503 level=255 0x4=USB mod=01.01.70, 01:00 description=com.apple.usb.externaldevice.14500000 owner=USB2.0 Hub
id=507 level=255 0x4=USB mod=01.01.70, 01:00 description=com.apple.usb.externaldevice.14510000 owner=USB Optical Mouse
id=508 level=255 0x4=USB mod=01.01.70, 01:00 description=com.apple.usb.externaldevice.14520000 owner=USB Keyboard

I don't know what BCM20702A0 is and I don't know where that USB2 hub is coming from.
 
Currently connected are:
  • USB extension cord. Originally there was a hub on it but I disconnected it. So just the extension
  • USB cable to 3d printer (which isn't connected on the printer side)
  • USB to display which acts as hub and connects mouse and keyboard
pmset gives me these:

Kernel Assertions: 0x4=USB
id=500 level=255 0x4=USB mod=01.01.70, 01:00 description=com.apple.usb.externaldevice.15500000 owner=USB3.1 Hub
id=502 level=255 0x4=USB mod=01.01.70, 01:00 description=com.apple.usb.externaldevice.14800000 owner=BCM20702A0
id=503 level=255 0x4=USB mod=01.01.70, 01:00 description=com.apple.usb.externaldevice.14500000 owner=USB2.0 Hub
id=507 level=255 0x4=USB mod=01.01.70, 01:00 description=com.apple.usb.externaldevice.14510000 owner=USB Optical Mouse
id=508 level=255 0x4=USB mod=01.01.70, 01:00 description=com.apple.usb.externaldevice.14520000 owner=USB Keyboard

I don't know what BCM20702A0 is and I don't know where that USB2 hub is coming from.

Id try unplugging all USB devices leaving USB Keyboard, Mouse plugged in. BCM20702A0 is Bluetooth could be causing instant wake up. System Preferences -> Bluetooth -> Advanced Turn off Allow Bluetooth devices to wake this computer.
 
Id try unplugging all USB devices leaving USB Keyboard, Mouse plugged in. BCM20702A0 is Bluetooth could be causing instant wake up. System Preferences -> Bluetooth -> Advanced Turn off Allow Bluetooth devices to wake this computer.

Well after disconnecting everything piece by piece: it was the display hub, which is stupid because I specifically bought a display with a hub to use one set of mouse & keyboard for laptop and desktop :(

So it slept longer than 2 seconds which I think resolved the issue! Thanks, I'll go ahead and contribute! But now I got the problem, that even after the first sleep attempt the display wouldn't come back on. Damn, I can't remember having this much trouble with the exact same pc using el cap.
 
Well after disconnecting everything piece by piece: it was the display hub, which is stupid because I specifically bought a display with a hub to use one set of mouse & keyboard for laptop and desktop :(

So it slept longer than 2 seconds which I think resolved the issue! Thanks, I'll go ahead and contribute! But now I got the problem, that even after the first sleep attempt the display wouldn't come back on. Damn, I can't remember having this much trouble with the exact same pc using el cap.

So the USB hub thats built into the monitor is causing instant wake? Attach ioreg.
 
So the USB hub thats built into the monitor is causing instant wake? Attach ioreg.

Tried it again without hub. Keyboard and Mouse as the only connected devices directly to the mainboard. Slept perfect, except for missing video signal on wake. So I guess, yeah, the hub is the problem.

ioreg attached (with connected hub I assumed)
 

Attachments

  • registry.ioreg
    3.6 MB · Views: 109
Tried it again without hub. Keyboard and Mouse as the only connected devices directly to the mainboard. Slept perfect, except for missing video signal on wake. So I guess, yeah, the hub is the problem.

ioreg attached (with connected hub I assumed)

Graphics is under PEGP which isn't correct. Recommend renaming PEGP to GFX0 and use a SSDT to inject appropriate Ports. Use the code below.

Code:
change PEGP to GFX0
Find <50454750>
Replace <47465830>

Code:
DefinitionBlock ("", "SSDT", 2, "hack", "GFX0_HDAU", 0)
{
    External(_SB_.PCI0.PEG0, DeviceObj)
    External(_SB_.PCI0.PEG0.GFX0, DeviceObj)
    Scope(_SB.PCI0.PEG0)
    {
        Scope(GFX0)
        {
            Method (_DSM, 4)
            {
                If (!Arg2) { Return (Buffer() { 0x03 }) }
                Return (Package()
                {
                    "@0,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },
                    "@1,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },
                    "@2,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },
                    "@3,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },
                    "@4,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },
                    "@5,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },
                    "hda-gfx", Buffer () { "onboard-2" },
                })
            }
        }
        Device(HDAU)
        {
            Name(_ADR, 1)
            Method(_DSM, 4)
            {
                If (!Arg2) { Return (Buffer() { 0x03 }) }
                Return (Package()
                {
                    "hda-gfx",Buffer() { "onboard-2" },
                })
            }
        }
    }
}
//EOF
 
Graphics is under PEGP which isn't correct. Recommend renaming PEGP to GFX0 and use a SSDT to inject appropriate Ports. Use the code below.

Code:
change PEGP to GFX0
Find <50454750>
Replace <47465830>

Code:
DefinitionBlock ("", "SSDT", 2, "hack", "GFX0_HDAU", 0)
{
    External(_SB_.PCI0.PEG0, DeviceObj)
    External(_SB_.PCI0.PEG0.GFX0, DeviceObj)
    Scope(_SB.PCI0.PEG0)
    {
        Scope(GFX0)
        {
            Method (_DSM, 4)
            {
                If (!Arg2) { Return (Buffer() { 0x03 }) }
                Return (Package()
                {
                    "@0,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },
                    "@1,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },
                    "@2,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },
                    "@3,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },
                    "@4,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },
                    "@5,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },
                    "hda-gfx", Buffer () { "onboard-2" },
                })
            }
        }
        Device(HDAU)
        {
            Name(_ADR, 1)
            Method(_DSM, 4)
            {
                If (!Arg2) { Return (Buffer() { 0x03 }) }
                Return (Package()
                {
                    "hda-gfx",Buffer() { "onboard-2" },
                })
            }
        }
    }
}
//EOF

Well, I added the 'change PEGP to GFX0'to the acpi list and went here https://www.tonymacx86.com/threads/ssdt-gpu-graphics-card-injection.183354/. I guess that'll take some time for reading and understanding as I haven't done it before and don't want to brick the pc. I just don't know which file to put the second part into...
 
Status
Not open for further replies.
Back
Top