Contribute
Register

ASRock Z690 Steel Legend + 13900KF / 12900K + 6600XT


Sleep and Wake

Update
: Instant-wake issue has bee fixed in Monterey 12.2.1. All the Type-A connectors can be normally mapped with USB 3 (USBConnector = 3).

Although above USB mapping reflects actual connector configulation, it causes instant wake issue. When a USB keyboard or USB flash devices are connected to some of USB Type-A connectors at the back-panel, the computer wakes up about 1 minute after starting sleep. In case no devices are connected to Type-A, it successfully sleeps, stops the CPU fan, and wakes up when Bluetooth input device is operated.

This instant wake issue can be solved by mapping USB Type-A connectors with "internal" (UsbConnector = 255) instead of with USB 2 (0) or USB 3 (3). As for USB Type-C connectors, sleep behavior is normal with actual mapping of TypeC+Sw (9). In the attached EFI, USBPorts.kext maps USB connectors as follows:


View attachment 537385

The remaining sleep issue is that the computer will not wake by operating a keyboard plugged to one of the USB Type-A connector. It can be waken only by either of input devices connected to Bluetooth or USB Type-C, or by the power switch. As I mainly use Apple's BT input devices, this does not matter.

In the Energy Saver setting, "Wake for network access" should be disabled in my environment, otherwise the computer wakes up very frequently. "Enable Power Nap" may be enabled, in that case, it wakes about once an hour to execute background jobs.

View attachment 537386
Unfortunately, this information from the first page is somewhat inaccurate as best as I can figure out. While the text says that this has been fixed since 12.2.1 and not use 255 (internal), in fact, not working in my case. The USBPorts.kext that is included in the package on first page actually still has the ports set to 255 (internal), which naturally makes it work. If you don't set them to 255 and properly use 2, 3, etc., then it does not work, at least in my case.

But then, if you apply the patch mentioned in post #14 by following the opencore guide for the same topic, then it works. The difference between using the USBPort.kext provided in the first post with ports sets to 255, versus following the opencore guide is that the solution with using the port numbers set to 255 allows for bluetooth waking up, whereas the opencore solution only allows power button wake up. I prefer handling it as an opencore patch instead of fiddling around with port numbers, so that's how I left it, and I am using power button to wake machine up.
 
Unfortunately, this information from the first page is somewhat inaccurate as best as I can figure out. While the text says that this has been fixed since 12.2.1 and not use 255 (internal), in fact, not working in my case. The USBPorts.kext that is included in the package on first page actually still has the ports set to 255 (internal), which naturally makes it work. If you don't set them to 255 and properly use 2, 3, etc., then it does not work, at least in my case.

But then, if you apply the patch mentioned in post #14 by following the opencore guide for the same topic, then it works. The difference between using the USBPort.kext provided in the first post with ports sets to 255, versus following the opencore guide is that the solution with using the port numbers set to 255 allows for bluetooth waking up, whereas the opencore solution only allows power button wake up. I prefer handling it as an opencore patch instead of fiddling around with port numbers, so that's how I left it, and I am using power button to wake machine up.
Thanks for the info. I realized that I had accidentally included old version of USBPorts.kext to the attachment in the first post. I have replaced the attachment to the new version including OpenCore 0.8.3. Would you re-try the newly attached USBPorts.kext ? Sleep is working fine in my current environment (Ventura PB). Two back-panel-ports under the PS/2 connector are deactivated by the kext.
 
Tried your updated USBPorts.kext, and my particular rig does not sleep, wakes right back up. So, I believe this is a function of what's connected and to what port. On this particular machine of mine, with the host of USB devices attached, does not sleep unless 255 or the patch from post #14. However, I have another rig, exactly the same except 12700K instead of 12900K, with different USB devices attached that my son uses. I discovered that that machine sleeps without 255 or the patch. So, the short answer is, if your machine sleeps, great. If not, resort to the post #14 patch.

Also, taking this opportunity, thanks for putting all this hard work into this. It greatly helped, with all the work you had already done and kindly shared, it was rather easy. Cheers.
 
Tried your updated USBPorts.kext, and my particular rig does not sleep, wakes right back up. So, I believe this is a function of what's connected and to what port. On this particular machine of mine, with the host of USB devices attached, does not sleep unless 255 or the patch from post #14. However, I have another rig, exactly the same except 12700K instead of 12900K, with different USB devices attached that my son uses. I discovered that that machine sleeps without 255 or the patch. So, the short answer is, if your machine sleeps, great. If not, resort to the post #14 patch.

Also, taking this opportunity, thanks for putting all this hard work into this. It greatly helped, with all the work you had already done and kindly shared, it was rather easy. Cheers.
Thank you very much. I have updated the instant-wake-issue part of the post #1.
 
Wich is your speed on the SSD, with BlackMagic Disk Speed test?
 
Wich is your speed on the SSD, with BlackMagic Disk Speed test?
Around R/W=2800/2500 MB/s on WD Black SN750 SE 1TB.
スクリーンショット 2022-08-19 15.52.24.png
 
I was having R/W about 5000 on WD SN850 SE.

But after the last Opencore updates is about 4000 & 5000. ANd I don't know why is decreased. Could it be that the disk is slower, the more is full of data?

SSD speed.png
 
I was having R/W about 5000 on WD SN850 SE.

But after the last Opencore updates is about 4000 & 5000. ANd I don't know why is decreased. Could it be that the disk is slower, the more is full of data?

View attachment 553450
This is what I am getting on SN850 2TB drive with OC 0.8.3. Same as what I was getting before. Is trim enabled?
 

Attachments

  • Screen Shot 2022-08-21 at 10.52.38 AM.jpg
    Screen Shot 2022-08-21 at 10.52.38 AM.jpg
    180.4 KB · Views: 56
I have SetApfsTrimTimeout = -1
If I change it to 0, macOS doesn't load.
TRIM is OFF under macOS
 
I have SetApfsTrimTimeout = -1
If I change it to 0, macOS doesn't load.
TRIM is OFF under macOS
You have a different board, but I have no issue with trim at all. It is on.
 
Back
Top