Jump to content

2 Sleep issues - resume immediately & reboot when wake


monto
 Share

59 posts in this topic

Recommended Posts

@monto — Good work friend.

Meantime I am seeing another issue with both my systems. When I either restart or shutdown the screen goes off but the machine keeps waiting for 30 seconds before BIOS beeps and resumes or powers down and turns LEDs off. In verbose mode I see CPU halted as the last message before going dark but the power down happens only 30 seconds later. In non verbose mode the whirly stays for 30 seconds. I installed El Capitan and saw instant shutdown and restarts the way it should be. But Sierra no.

I too am on Clover 3882.

I will try the things you enlist here and report/confirm behaviour.

Thanks.

Link to comment
Share on other sites

@monto — Good work friend.

Meantime I am seeing another issue with both my systems. When I either restart or shutdown the screen goes off but the machine keeps waiting for 30 seconds before BIOS beeps and resumes or powers down and turns LEDs off. In verbose mode I see CPU halted as the last message before going dark but the power down happens only 30 seconds later. In non verbose mode the whirly stays for 30 seconds. I installed El Capitan and saw instant shutdown and restarts the way it should be. But Sierra no.

I too am on Clover 3882.

I will try the things you enlist here and report/confirm behaviour.

Thanks.

I am having the same 30 seconds delay shutdown too... well kind of, as my shutdown is not working properly. After 30 seconds, the power LED light would go off, but 5 seconds later, the machine would power on all by itself.

 

Clover r3899 is out today, and I am going to try it out and see if it makes any difference. BTW, if config.plist exists already, Clover doesn't create a new file for it. It begs the question: if Clover introduces new parameters, how does it make entries in existing config.plist?

  • Like 1
Link to comment
Share on other sites

I tried testing with some Clover ACPI changes, according to this document:
https://clover-wiki.zetam.org/Configuration/ACPI

Searching "sleep" on the page above, yielded four changes which I've enabled now:

AddPNLF

FIX_S3D

DSDT/SlpSmiAtWake

DSDT/SuspendOverride

Still the same problem.
Can someone who has sleep/resume working properly, running skylake CPU on 17,1, please help by providing a copy of Clover config.plist? It's probably a good idea to remove serial number in SMBIOS. Thanks in advance.

Link to comment
Share on other sites

I tried testing with some Clover ACPI changes, according to this document:

https://clover-wiki.zetam.org/Configuration/ACPI

 

Searching "sleep" on the page above, yielded four changes which I've enabled now:

AddPNLF

FIX_S3D

DSDT/SlpSmiAtWake

DSDT/SuspendOverride

 

Still the same problem.

Can someone who has sleep/resume working properly, running skylake CPU on 17,1, please help by providing a copy of Clover config.plist? It's probably a good idea to remove serial number in SMBIOS. Thanks in advance.

I have the same sleep problem however I do not have a BT device at all. I am using a GA-Z170-Gaming K3 mobo, i7 6700K, GTX 970 and with pmset -g assertions it tels me "Idle sleep preventers: IODisplayWrangler"  and the output of sudo pmset -g log | grep -i failure yields

"Darkwake Exit Failure during wake due to 0x34053000000032:". To me it appears to be Nvidia driver related. Your thoughts ?

 

I did some further tests by removing USBinject all kext and also removed the port count increase in config.plist. Now my

is finally sleeping like it should.

  • Like 1
Link to comment
Share on other sites

I have the same sleep problem however I do not have a BT device at all. I am using a GA-Z170-Gaming K3 mobo, i7 6700K, GTX 970 and with pmset -g assertions it tels me "Idle sleep preventers: IODisplayWrangler"  and the output of sudo pmset -g log | grep -i failure yields

"Darkwake Exit Failure during wake due to 0x34053000000032:". To me it appears to be Nvidia driver related. Your thoughts ?

 

I did some further tests by removing USBinject all kext and also removed the port count increase in config.plist. Now my

is finally sleeping like it should.

I got a lot of the same Darkwake Exit Failure error too. However, I also got a lot of Notification Failure during wake due to 0x534015401000024: when the Reboot on wake problem occurred.

 

I've tried removing USBInjectall.kext and tried with or without port count limit. Tried SSDT for my 15 USB ports. Tried SSDT for my CPU. Nothing worked.

 

Really appreciate if you can share the following:

1. A copy of your config.plist (please remove S/N just to be safe)

2. What's in your Clover/ACPI/Patched directory?

3. What kexts do you use? (/Library/extension or Clover/kexts/other)

4. what version of clover do you use?

5. How did you test sleep? (manual sleep or scheduled sleep)

6. How did you wake from sleep? (power button, USB k/m, or BT k/m?)

7. How long did you wait before waking from sleep?

 

Sorry about many specific questions. It's because sleeping seems to work for me on the surface. But if I wake the system from USB Apple keyboard or Apple Magic Trackpad, the next sleep will fail (immediate wake.) Only power button wake would not have this problem.

Also, if I wait for 5 minutes between sleep and wake, the system would intermittently reboot on wake. However, I've been able to wake successfully after leaving the system sleep overnight. It's intermittent and the logs don't say much. This reboot on wake problem is also reported on some real Macs. If yours work flawlessly, I'd like to compare notes. Thanks in advance.

 

Link to comment
Share on other sites

  • 1 month later...

Anyone coming forward with changes due to 10.12.2 update especially with regard to sleep/auto sleep etc., Any changes? Logitech mouse scrolling problem that's there upto 10.12.1 has been taken care of. I have yet to sort the USB on Z97 system so i cannot report any success. And on the Z170 I gave up and reverted to 10.11.6

Anyone?

Link to comment
Share on other sites

Anyone coming forward with changes due to 10.12.2 update especially with regard to sleep/auto sleep etc., Any changes? Logitech mouse scrolling problem that's there upto 10.12.1 has been taken care of. I have yet to sort the USB on Z97 system so i cannot report any success. And on the Z170 I gave up and reverted to 10.11.6

Anyone?

I have no issues that I am aware of after the 10.12.2 upgrade on either my GA-Z97X-UD3H Haswell  build or my GA-Z170X-UD3 Skylake build.

However still testing, for the Z170X I had to apply the AGPDfix.app  to get my GTX-970 functioning, but that was all.

Link to comment
Share on other sites

With my Z170 system I went in with a fresh format and install with 10.12.2 from app store so I could rule out software problems. After all necessary tuning I removed the USB port limit patch and put in use the custom SSDT I made for the USB with 15 ports working. As monto put before here sleep wake from menu or keyboard works as long as the autosleep threshold is not crossed. After which wake causes reboot. Reading around a bit I got up to editing my DSDT, especially the _PRW method within XHC. What I effectively achieved was to disable wake from USB that is to say use the power button only to wake. Every time the system woke up properly with everything working. Autosleep worked flawlessly. This is not as good as El capitan but a step closer to functioning sleep wake. I would like to observe it for a day or two before being absolutely certain. Besides a magic mouse I use a logitech cordless mouse simultaneously with its receiver plugged into the corded Apple keyboard. Before this the slightest nudge to the mouse would wake the system. So this is kind of a blessing. Also I needed darkwake=8 before to use keyboard or mouse to wake. I have to check whether I need it still. Hope to post more info tomorrow.

The Z97 system lost USB on wake and I managed to make XWAK do nothing in DSDT as suggested elsewhere. This got USB working but sleep wake is still iffy. Hope to get around to it at the weekend.

So long.

Link to comment
Share on other sites

With my Z170 system I went in with a fresh format and install with 10.12.2 from app store so I could rule out software problems. After all necessary tuning I removed the USB port limit patch and put in use the custom SSDT I made for the USB with 15 ports working. As monto put before here sleep wake from menu or keyboard works as long as the autosleep threshold is not crossed. After which wake causes reboot. Reading around a bit I got up to editing my DSDT, especially the _PRW method within XHC. What I effectively achieved was to disable wake from USB that is to say use the power button only to wake. Every time the system woke up properly with everything working. Autosleep worked flawlessly. This is not as good as El capitan but a step closer to functioning sleep wake. I would like to observe it for a day or two before being absolutely certain. Besides a magic mouse I use a logitech cordless mouse simultaneously with its receiver plugged into the corded Apple keyboard. Before this the slightest nudge to the mouse would wake the system. So this is kind of a blessing. Also I needed darkwake=8 before to use keyboard or mouse to wake. I have to check whether I need it still. Hope to post more info tomorrow.

The Z97 system lost USB on wake and I managed to make XWAK do nothing in DSDT as suggested elsewhere. This got USB working but sleep wake is still iffy. Hope to get around to it at the weekend.

So long.

Hi sorry for taking so long to respond to your earlier post #34 I can confirm again that both my Skylake GA-Z170X-UD3 as well as my

Haswell GA-Z97-UD3 build have no sleep problems at all. I achieved that without DSDT.aml patches whatsover, I only mapped my

USB ports properly, created a SSDT-USB.aml for the ports I wanted and placed that into the ACPI  patched folder, then I used USBInjectAll.kext in /L/E to control all that. That was done for the Skylake build. For my Haswell build I approached the sleep issue slightly different though, necessitated because of huge architectural differences between a Haswell and Skylake based system.

 

1. Changed _OSI to XOSI

2. Changed EHC1 to EHO1

3. Changed EHC2 to EHO2

 

Above to mainly disable Apple's built in injectors.

 

4. Added XOSI-WIN10.aml

 

5. Created a SSB-USB.aml containing all the USB ports

    that I mapped with a USB-2 device as well as a USB-3 device.

    Quite a laborious process but worth it.

   

6. Eliminated unwanted ports with a boot arg in my config.plist file.

    and ensured that these are indeed not loaded during the boot

    process with USBInjectAll.kext in /L/E

 

That is basically it and works perfectly for me.

 

I have also mildly overclocked both systems to 4.4 gigs and control

that with a ssdt.aml file in ACPI/patched appropriately generated with

a ssdtPRGen shell script by Piker-Alpha.

 

That is about it.

 

All the information needed to accomplish this was obtained by carefully

reading and studying RehabMan's excellent guides and instructions.

 

One issue worth mentioning perhaps is that one sleep issue, which I

discovered before the Sierra 10.12.2 upgrade, was with my Corsair Hydro

Cooler 1000i V2 and in particular its USB interface. As soon as that is

connected to any native USB port on the mobo, sleep will not work at all.

The machine will wake up virtually immediately it has entered sleep.

 

That problem I resolved by moving the USB cable for that cooler to a

USB port which is not native to the mobo. For both builds I use an add on

Renesas based USB-3, 2-port controller, which in turn I control with the

GenericUSB.kext - also by RehabMan - placed in /L/E. It has worked ever

since although software to controll the cooler with is only available for

Windows.

 

Hoping this will help you to sort your sleep issues out as well.

Link to comment
Share on other sites

I too corrected USB by making a SSDT unique to my board, loading usbinjectall from esp and using uia exclude in clover to remove extra ports. But this alone did not help autosleep. Maybe the situation is unique to my board and Bios. I also have another issue which I am yet to attend to. The system will intermittently reset CSM to enable in BIOS after a cold reboot. Happens once every 2 or 3 days. This happens in El capitan too & seems to be some clover settings issue. Anyways, allow me a day or two to update. Thanks.

Link to comment
Share on other sites

On the Z170 system its been two days since I put in the patched DSDT. I did away with the _PRW patches (referring to Rehabman's patching method).

System sleeps and wakes perfectly most of the time. Of a total of 14 sleep wake cycles a simple mouse nudge woke the system 12 times but rebooted twice. Will try a few more patches to see if I can nail this down. I think I'll wait for Santa.

Oh another thing to note is that sudo pmset -g log|grep -i failure has not turned anything up even for the instances it rebooted. This is baffling.

log show --style syslog | fgrep "Wake reason" Shows XDCI for all instances which is correct. It shows PWRB (User) for the times I had zeroed out the _PRW method and woke using power button. Hope I'm getting closer

 

The other Z97 system meantime has flawless sleep, wake and autosleep without  a single reboot. It just needed the DSDT patch mentioned earlier.

Cheers!

Link to comment
Share on other sites

On the Z170 system its been two days since I put in the patched DSDT. I did away with the _PRW patches (referring to Rehabman's patching method).

System sleeps and wakes perfectly most of the time. Of a total of 14 sleep wake cycles a simple mouse nudge woke the system 12 times but rebooted twice. Will try a few more patches to see if I can nail this down. I think I'll wait for Santa.

Oh another thing to note is that sudo pmset -g log|grep -i failure has not turned anything up even for the instances it rebooted. This is baffling.

log show --style syslog | fgrep "Wake reason" Shows XDCI for all instances which is correct. It shows PWRB (User) for the times I had zeroed out the _PRW method and woke using power button. Hope I'm getting closer

 

The other Z97 system meantime has flawless sleep, wake and autosleep without  a single reboot. It just needed the DSDT patch mentioned earlier.

Cheers!

Good luck with your sleep endeavours. Originally I also considered patching the DSDT's of my builds however I decided against it as

that would just add another level of, in my view at least, complexity. The systems have to be maintained and preferably also survive a future bios update , which I believe is imminent, for my GA-Z97X-UD3H build.

Injecting patches via Clover is for me the preferred method for a desktop, as Clover handles this kind of chore flawlessly and with ease,

ensuring maintainability at the same time.

Link to comment
Share on other sites

If it ain't broke don't fix it. So you are correct in your approach. I booted Intel DP55KG board with mountain lion and just fakesmc without any DSDT. Who wouldn't want that. Both my systems worked perfectly in El Capitan. Now they don't. Apple broke something but since I don't know how to pop the hood and get my hands dirty on the Sierra or Darwin kernel side of things therefore DSDT. If 10.12.3 works without a DSDT that's how I'll run it. The MacOS keeps changing frequently so does Clover, making it easy to break things. The gains I think are less than marginal. Same goes for BIOS. If it ain't broke yadda yadda.. Gigabyte gave a new BIOS build f20 and broke ultrafast boot with it. I have an open ticket with them. The list is endless, the battle ceaseless.But I can stop worrying because Santa's getting me a spanking new Kabylake i7 Mac Mini so I can spend more time above the hood than under it.;-)

Link to comment
Share on other sites

If it ain't broke don't fix it. So you are correct in your approach. I booted Intel DP55KG board with mountain lion and just fakesmc without any DSDT. Who wouldn't want that. Both my systems worked perfectly in El Capitan. Now they don't. Apple broke something but since I don't know how to pop the hood and get my hands dirty on the Sierra or Darwin kernel side of things therefore DSDT. If 10.12.3 works without a DSDT that's how I'll run it. The MacOS keeps changing frequently so does Clover, making it easy to break things. The gains I think are less than marginal. Same goes for BIOS. If it ain't broke yadda yadda.. Gigabyte gave a new BIOS build f20 and broke ultrafast boot with it. I have an open ticket with them. The list is endless, the battle ceaseless.But I can stop worrying because Santa's getting me a spanking new Kabylake i7 Mac Mini so I can spend more time above the hood than under it.;-)

No  further comment other than what follows. I agree with your sentiments however I strongly believe what is achievable with

a Gigabyte board without patching a DSDT is also achievable with your ASUS mobo, It might just  require a little bit more

effort and patience. The end result and longer term benefits stemming from that, is just awesome.

Cheers

Link to comment
Share on other sites

Hi sorry for taking so long to respond to your earlier post #34 I can confirm again that both my Skylake GA-Z170X-UD3 as well as my

Haswell GA-Z97-UD3 build have no sleep problems at all. I achieved that without DSDT.aml patches whatsover, I only mapped my

USB ports properly, created a SSDT-USB.aml for the ports I wanted and placed that into the ACPI  patched folder, then I used USBInjectAll.kext in /L/E to control all that. That was done for the Skylake build. For my Haswell build I approached the sleep issue slightly different though, necessitated because of huge architectural differences between a Haswell and Skylake based system.

 

1. Changed _OSI to XOSI

2. Changed EHC1 to EHO1

3. Changed EHC2 to EHO2

 

Above to mainly disable Apple's built in injectors.

 

4. Added XOSI-WIN10.aml

 

5. Created a SSB-USB.aml containing all the USB ports

    that I mapped with a USB-2 device as well as a USB-3 device.

    Quite a laborious process but worth it.

   

6. Eliminated unwanted ports with a boot arg in my config.plist file.

    and ensured that these are indeed not loaded during the boot

    process with USBInjectAll.kext in /L/E

 

That is basically it and works perfectly for me.

 

I have also mildly overclocked both systems to 4.4 gigs and control

that with a ssdt.aml file in ACPI/patched appropriately generated with

a ssdtPRGen shell script by Piker-Alpha.

 

That is about it.

 

All the information needed to accomplish this was obtained by carefully

reading and studying RehabMan's excellent guides and instructions.

 

One issue worth mentioning perhaps is that one sleep issue, which I

discovered before the Sierra 10.12.2 upgrade, was with my Corsair Hydro

Cooler 1000i V2 and in particular its USB interface. As soon as that is

connected to any native USB port on the mobo, sleep will not work at all.

The machine will wake up virtually immediately it has entered sleep.

 

That problem I resolved by moving the USB cable for that cooler to a

USB port which is not native to the mobo. For both builds I use an add on

Renesas based USB-3, 2-port controller, which in turn I control with the

GenericUSB.kext - also by RehabMan - placed in /L/E. It has worked ever

since although software to controll the cooler with is only available for

Windows.

 

Hoping this will help you to sort your sleep issues out as well.

Since taking the suggestion from Henties, and applying XOSI-WIN10.ami and _OSI to XOSI patch in config.plist a couple of days ago, I haven't encountered a single reboot on wake. Overnight wake from sleep worked so far. The system has been up for 1d16h and counting... It's looking promising.

 

I will continue to monitor the reboot on wake issue. If the system can be up for more than 5 days with numerous overnight sleeps in between, I will call it a victory. Fingers crossed.

 

​Mean while, for those of you sharing the same problem, please try this and let us know how you fare.

Link to comment
Share on other sites

@monto

Can you please attach the XOSI-WIN10.aml here. I have one in place from the beginning but still had the reboots. But I too haven't had them since the past few days. But I would like to see whether it is the same. Also in order for clover to read the file do we need to switch some flag in the config plist or is simply dropping it into ACPI » Patched folder enough?

Link to comment
Share on other sites

@monto

Can you please attach the XOSI-WIN10.aml here. I have one in place from the beginning but still had the reboots. But I too haven't had them since the past few days. But I would like to see whether it is the same. Also in order for clover to read the file do we need to switch some flag in the config plist or is simply dropping it into ACPI » Patched folder enough?

Find my XOSI-WIN10.aml file  embedded in the attached zip folder. No special switches needed in config.plist for this file to be read during startup, its presence in Clover ACPI/patched is all that is required. In my config.plist, under the ACPI heading I have absolutely nothing checked at all, the

only entry is in DSDT patches to change _OSI to XOSI.

 

Under the Boot section I have only checked the following:

 

Verbose - I like to see what is happening during the boot process.

 

darkwake=8 - preferred by me even during my El Capitan adventure :-) YMMV

 

dart=0 - this has always been required for previous builds as well.

 

kext-dev-.mode=1 - makes it easier to apply the AGDP.fix should a future Sierra update by Apple

                                 require the application of this patch. - System running with no output on monitors.

                                 I opted not to patch my DSDT for this as that adds an extra level of complexity

                                 and it would most likely break with the next Bios update which I will apply as

                                 soon as it is elevated by Gigabyte from beta to production for my mobo .

 

All the foregoing is for my Skylake build. One of my previous posts in this thread point out the

differences and the approach I followed for my Haswell build, which works properly as well in ALL

respects.

 

This is about it. All the foregoing would not have been possible to achieve without RehabMan's

efforts and dedication in this and many other aspects of the hackintosh scene, Thanks RehabMan.

 

OMG my signature is totally outdated will have to fix that sometime soon :-)

Link to comment
Share on other sites

@monto

Can you please attach the XOSI-WIN10.aml here. I have one in place from the beginning but still had the reboots. But I too haven't had them since the past few days. But I would like to see whether it is the same. Also in order for clover to read the file do we need to switch some flag in the config plist or is simply dropping it into ACPI » Patched folder enough?

 

How do I attach a file? I got it from another site which can be found easily on Google.

Link to comment
Share on other sites

Find my XOSI-WIN10.aml file  embedded in the attached zip folder. No special switches needed in config.plist for this file to be read during startup, its presence in Clover ACPI/patched is all that is required. In my config.plist, under the ACPI heading I have absolutely nothing checked at all, the

only entry is in DSDT patches to change _OSI to XOSI.

 

Under the Boot section I have only checked the following:

 

Verbose - I like to see what is happening during the boot process.

 

darkwake=8 - preferred by me even during my El Capitan adventure :-) YMMV

 

dart=0 - this has always been required for previous builds as well.

 

kext-dev-.mode=1 - makes it easier to apply the AGDP.fix should a future Sierra update by Apple

                                 require the application of this patch. - System running with no output on monitors.

                                 I opted not to patch my DSDT for this as that adds an extra level of complexity

                                 and it would most likely break with the next Bios update which I will apply as

                                 soon as it is elevated by Gigabyte from beta to production for my mobo .

 

All the foregoing is for my Skylake build. One of my previous posts in this thread point out the

differences and the approach I followed for my Haswell build, which works properly as well in ALL

respects.

 

This is about it. All the foregoing would not have been possible to achieve without RehabMan's

efforts and dedication in this and many other aspects of the hackintosh scene, Thanks RehabMan.

 

OMG my signature is totally outdated will have to fix that sometime soon :-)

@Henties, does your auto sleep work? (Prevent computer from sleeping automatically when the display is off - Unticked)

If I enable auto sleep for 5 minutes (untick above), it still reboots on wake after merely 10 minutes. Manual sleep seems to work so far, but longer test is needed to confirm.

Link to comment
Share on other sites

@ monto - since you were taking some time, I found it out elsewhere.

You attach a file in the post you make here, after making a zip archive preferably.

I am surprised your auto sleep is still broken. Keep the "turn display off after" slider at a low value like 2 minutes to test. Put computer to sleep manually and wake it up before 2 minutes. it should wake up. Beyond two minutes it will reboot. Also if left idle for more than 2 minutes then auto sleep should kick in provided nothing else is preventing it (check with sudo pmset -g) But wake will cause reboot. Is this the case with your system?

I had the same situation and seems to have been sorted out. But I have to yet nail the culprit conclusively which is why I am still observing it for a few days. It is something in the DSDT.

Link to comment
Share on other sites

 Share

×
×
  • Create New...