Contribute
Register

Sleep does not work: The system wakes up immediately after going to sleep

Status
Not open for further replies.
Post a copy of your USBPorts.kext.
Hmm, strange, I did, but it seems like the post has disappeared.

This is what I wrote:

Post a copy of your USBPorts.kext so we can see what you have created and are using.

Assumptions:
  1. You have no other USB 'fixes' applied in your setup, i.e. you are not using the XhciPortLimit quirk in OC, or the USB port limit patches in Clover config.
  2. You have not installed any USB3 kexts to your bootloader kext or /Library/Extensions folder.
  3. If you are using an SSDT-UIAC.aml you are injecting a recent version of USBInjectAll.kext, i.e. v0.7.5 or newer.
  4. You are not injecting USBInjectAll.kext alongside USBPorts.kext, as these should not be used together.

Here is the USBPorts.kext file.

1. I have attached an image showing which kexts I am using right now.

2. The kexts in my bootloader kext folder is the same as in my boot configuration (screenshot referred to above), and I do not have any kext related to USB in my /Library/Extensions folder.

3. No, I am not using any SSDT-UIAC.aml file. Should I, and if so, how?

4. No, I removed this after adding the USBPorts.kext to my boot kext folder and configuration.

1633965593294.png
 

Attachments

  • USBPorts.kext.zip
    1.3 KB · Views: 41
Last edited by a moderator:
Also, just to confirm it's the USB causing wake, try entering the following in Terminal: pmset -g log and record the time you specified to have the system sleep.

Do you also have this problem when it goes to sleep automatically?
 
I see a few potential issues. first, according to your screenshot you have 2 different USB port configuration kext's enabled in your config.plist. secondly, the in Kext you attached, all of the ports are labeled "255", which is for an "internal port". you need to label the USB2 ports with a "0" and the USB3 component of those ports as "3".
 
I see three (3) USB configuration kexts active in the screenshot above.
  1. USBMap_iMac20,2.kext,
  2. USBPorts.kext and
  3. USBMap_iMacPro1,1.kext.
Only one of the three should be active. Which one, the one that matches the SMBIOS you are using.

The USBPorts,kext you attached above is for an iMac19,1 SMBIOS! Never mind the mess with the connector types.

Which SMBIOS are you using?
Remove all the USBPorts.kext/USBMap.kext unrelated to the SMBIOS you are using.

Honestly, your USB configuration is a complete mess.

Personally I would remove all the kexts you have created, downloaded, whatever.
I would start again from fresh, following UtterDisbelief's guide - https://www.tonymacx86.com/threads/the-new-beginners-guide-to-usb-port-configuration.286553/

But this time only create the USBPorts.kext for the SMBIOS you are using in your system.

If you still haven't set your mind on a specific SMBIOS for your system, you need to make a final decision. Don't start messing around switching SMBIOS profiles again. You have obviously tried a few SMBIOS. So hopefully you know which one works best with your system, whether that is for graphics or any other aspect.
 
I would also try to get sleep working before enabling USBWakeFixup. Others are able to use it without a problem, but with me, it broke the ability of my system to sleep. I couldn't get my rig to automatically sleep after that and I ended up re-installing the system.
 
I would also try to get sleep working before enabling USBWakeFixup. Others are able to use it without a problem, but with me, it broke the ability of my system to sleep. I couldn't get my rig to automatically sleep after that and I ended up re-installing the system.
Thank you for this info. I will try that out aswell.
 
I see a few potential issues. first, according to your screenshot you have 2 different USB port configuration kext's enabled in your config.plist. secondly, the in Kext you attached, all of the ports are labeled "255", which is for an "internal port". you need to label the USB2 ports with a "0" and the USB3 component of those ports as "3".
I understand and will fix the labeling. Thanks!
 
Also, just to confirm it's the USB causing wake, try entering the following in Terminal: pmset -g log and record the time you specified to have the system sleep.

Do you also have this problem when it goes to sleep automatically?
Hi,

I will have to try that Terminal command out.

When I ask the system to go to sleep by myself the monitor goes dark but shortly after wakes up together with the fans and the LED:s.

The issue remains when the system goes to sleep by itself but the difference though is that the monitor now stays dark and won't suddenly turn on by itself when the fans and the LED:s in the build start running again.

I don't know if it's of any interest, but when I move my mouse/press a key to wake the system up when the monitor has stayed dark I get back into the user login page, as if it has just awaken from sleep.
 
Hi,

I will have to try that Terminal command out.

When I ask the system to go to sleep by myself the monitor goes dark but shortly after wakes up together with the fans and the LED:s.

The issue remains when the system goes to sleep by itself but the difference though is that the monitor now stays dark and won't suddenly turn on by itself when the fans and the LED:s in the build start running again.

I don't know if it's of any interest, but when I move my mouse/press a key to wake the system up when the monitor has stayed dark I get back into the user login page, as if it has just awaken from sleep.

Hi @Sthlm

It definitely sounds like the USB ports configuration problem, but see if the pmset -g log can give you any further detail. Try it with manual entry into sleep and again with automatic sleep.

I'm a bit confused by the events when the computer sleeps automatically. Is this correct:

1. Computer goes to sleep
2. Computer then wakes by itself, with the rig running, but no output to monitor
3. When keyboard is pressed or mouse is moved, there is output to monitor and you land in the user log in.

If that's the case, 2 & 3 usually happen with me because I don't have USBWakeFixup enabled. So I usually have to give two input steps to wake my computer from sleep. It sounds like there is some sort of phantom USB input to wake your rig, and it is waiting for the second input, as if USBWakeFixup isn't working properly.

Anyway, looking forward to the output of the pmset -g log command. I've gone through this and I agree that it can be very aggravating.

Ted
 
Hi @Sthlm

It definitely sounds like the USB ports configuration problem, but see if the pmset -g log can give you any further detail. Try it with manual entry into sleep and again with automatic sleep.

I'm a bit confused by the events when the computer sleeps automatically. Is this correct:

1. Computer goes to sleep
2. Computer then wakes by itself, with the rig running, but no output to monitor
3. When keyboard is pressed or mouse is moved, there is output to monitor and you land in the user log in.

If that's the case, 2 & 3 usually happen with me because I don't have USBWakeFixup enabled. So I usually have to give two input steps to wake my computer from sleep. It sounds like there is some sort of phantom USB input to wake your rig, and it is waiting for the second input, as if USBWakeFixup isn't working properly.

Anyway, looking forward to the output of the pmset -g log command. I've gone through this and I agree that it can be very aggravating.

Ted
Edit:

I was monitoring now once again what happens when the computer goes to sleep by itself or when I ask it to go to sleep by myself, and the timelines are actually quite similar I just realised, so I have to amend what I said earlier. Sorry for any confusion.

1. Computer goes to sleep
2. Computer then wakes by itself, with the rig running and output to monitor
3. The monitor turns off a few seconds later
4. Around 50 seconds later, the rig stops running for around 2 seconds and after that it repeats from number 2: the computer wakes by itself, with the rig running and output to monitor.
5. Repeat

However, the waiting time between the monitor turning on (2) and going black again (3) seems to differ from time to time.
 
Last edited:
Status
Not open for further replies.
Back
Top