vulgo / prime-b460i-plus-hackintosh

macOS 14 Sonoma on B460i-PLUS + OpenCore
23 stars 3 forks source link

Sleep Issues #14

Closed lazosweb closed 2 years ago

lazosweb commented 2 years ago

Hi @vulgo,

I wanted to ask if sleep works for you? For me only the monitors go to sleep but not the PC.

vulgo commented 2 years ago

Hello @lazosweb

Sleep seems to work as expected for me

pmset -g assertions
2022-08-30 10:37:22 +0100 
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  0
   PreventUserIdleSystemSleep     0
   NetworkClientActive            0
Listed by owning process:
   pid 174(WindowServer): [0x0001214b00098dd1] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle serviceID:10000046e name:AppleUserHIDEventSe product:Dell KB216 Wired Ke eventType:3"  
    Timeout will fire in 1800 secs Action=TimeoutActionRelease
Kernel Assertions: 0x4=USB
   id=500  level=255 0x4=USB creat=29/08/2022, 14:04 description=com.apple.usb.externaldevice.14700000 owner=USB Receiver
   id=502  level=255 0x4=USB creat=29/08/2022, 14:08 description=com.apple.usb.externaldevice.14400000 owner=Scarlett 2i2 USB
   id=503  level=255 0x4=USB creat=29/08/2022, 14:09 description=com.apple.usb.externaldevice.14600000 owner=Dell KB216 Wired Keyboard
   id=504  level=255 0x4=USB creat=29/08/2022, 14:10 description=com.apple.usb.externaldevice.14300000 owner=USB2.0 Device
Idle sleep preventers: IODisplayWrangler

Certain apps will prevent idle sleep but user sleep should still work.

▶ ~ % pmset -g
System-wide power settings:
Currently in use:
 standby              1
 Sleep On Power Button 1
 womp                 0
 hibernatefile        /var/vm/sleepimage
 proximitywake        0
 powernap             0
 networkoversleep     0
 disksleep            10
 standbydelayhigh     86400
 sleep                30
 hibernatemode        0
 ttyskeepawake        1
 displaysleep         30
 tcpkeepalive         1
 highstandbythreshold 50
 standbydelaylow      86400

I also have CPUFriend with these changes from the original properties disabling Sleep Services and Power Nap by default

<dict>
    <key>IOPlatformPowerProfile</key>
    <dict>
    ...
        <key>DarkWakeServices</key>
        <dict>
            <key>DarkWakeBackgroundTasks</key>
            <integer>0</integer>
            <key>SleepServices</key>
            <integer>0</integer>
            ...
        <dict>
    ...
</dict>
lazosweb commented 2 years ago

Hi @vulgo do you see anything suspicious here? I disabled the bluetooth, WiFi, and my wireless head sets only the Logitech receiver is connected...

~ % pmset -g assertions       
2022-08-30 18:46:04 +0300 
Assertion status system-wide:
   BackgroundTask                 1
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  0
   PreventUserIdleSystemSleep     0
   NetworkClientActive            1
Listed by owning process:
   pid 323(cupsd): [0x0000000700118015] 00:13:29 NetworkClientActive named: "org.cups.cupsd"  
   pid 185(WindowServer): [0x0000001b00098199] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle serviceID:100000604 name:AppleUserHIDEventSe product:USB Receiver eventType:3"  
    Timeout will fire in 1800 secs Action=TimeoutActionRelease
   pid 335(mds_stores): [0x0000032e000b85b9] 00:00:00 BackgroundTask named: "com.apple.metadata.mds_stores.power"  
Kernel Assertions: 0x104=USB,MAGICWAKE
   id=501  level=255 0x4=USB creat=30/08/2022, 18:37 description=com.apple.usb.externaldevice.14800000 owner=USB Receiver
   id=504  level=255 0x100=MAGICWAKE creat=30/08/2022, 18:35 description=en0 owner=en0
Idle sleep preventers: IODisplayWrangler
~ % pmset -g           
System-wide power settings:
Currently in use:
 standby              0
 Sleep On Power Button 1
 womp                 1
 hibernatefile        /var/vm/sleepimage
 proximitywake        0
 powernap             0
 networkoversleep     0
 disksleep            10
 standbydelayhigh     86400
 sleep                0
 hibernatemode        0
 ttyskeepawake        1
 displaysleep         30
 tcpkeepalive         0
 highstandbythreshold 50
 standbydelaylow      86400
vulgo commented 2 years ago

In energy saver preferences disable wake for network access, then run pmset -g assertions again

vulgo commented 2 years ago

I have Kernel Assertions: 0x4=USB you have Kernel Assertions: 0x104=USB,MAGICWAKE

vulgo commented 2 years ago

A bluetooth keyboard just arrived, I hope it doesn't cause sleep issues.

lazosweb commented 2 years ago

Which one? I have the MX keys and MX mouse love them both... has also the mac keymap.

I disabled the network access this the new log. Still monitors sleep not the PC.

~ % pmset -g assertions
2022-08-30 19:41:49 +0300 
Assertion status system-wide:
   BackgroundTask                 1
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  0
   PreventUserIdleSystemSleep     0
   NetworkClientActive            1
Listed by owning process:
   pid 323(cupsd): [0x0000000700118015] 01:09:15 NetworkClientActive named: "org.cups.cupsd"  
   pid 185(WindowServer): [0x0000001b00098199] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle serviceID:100000604 name:AppleUserHIDEventSe product:USB Receiver eventType:3"  
    Timeout will fire in 1800 secs Action=TimeoutActionRelease
   pid 1607(mdsync): [0x00000fac000b8696] 00:02:28 BackgroundTask named: "com.apple.metadata.mds.scan"  
Kernel Assertions: 0x4=USB
   id=501  level=255 0x4=USB creat=30/08/2022, 18:37 description=com.apple.usb.externaldevice.14800000 owner=USB Receiver
Idle sleep preventers: IODisplayWrangler
vulgo commented 2 years ago

I can use the ACPI power button if it does, though it's not very tactile. Or just click the mouse, it has the Logitech receiver also.

vulgo commented 2 years ago

I disabled the network access this the new log. Still monitors sleep not the PC.

Like I say above I have a Logitech receiver and sleep works good. Try rebooting. I wonder what NetworkClientActive refers to?

vulgo commented 2 years ago

pmset -g log > "$HOME"/pmset-log.txt

lazosweb commented 2 years ago

Attached the log. I will google that NetworkClientActive.

pmset-log.txt

vulgo commented 2 years ago

I think it's your printer

lazosweb commented 2 years ago

I had this hackintosh to another office whihc I had printers. Now I brought it back home and I have no printer not printer sharing enable. But it looks like there is something related to it. I will search more.

Edit: Just deleted the printers. It's gone now. Testing.

Edit2: Finally the god damn printers!!!!!

lazosweb commented 2 years ago

It worked.

Now I will connect back the Wifi, Bluetooth, SteelSeries receiver, Magic trackpad and check if these devices will prevent it to go to sleep.

Edit: Now even with the below it will still sleep.

@vulgo thanks so much again for the assist.

~ % pmset -g assertions
2022-08-30 20:05:20 +0300 
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   InteractivePushServiceTask     1
   PreventSystemSleep             0
   ExternalMedia                  1
   PreventUserIdleSystemSleep     0
   NetworkClientActive            0
   InternalPreventSleep           1
Listed by owning process:
   pid 184(WindowServer): [0x00000013000981a4] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle serviceID:100000609 name:AppleUserHIDEventSe product:USB Receiver eventType:3"  
    Timeout will fire in 1800 secs Action=TimeoutActionRelease
   pid 151(apsd): [0x000000a400128452] 00:00:13 InteractivePushServiceTask named: "com.apple.apsd-waitingformessages-push.apple.com"  
    Timeout will fire in 86386 secs Action=TimeoutActionTurnOff
   pid 124(powerd): [0x000000a400088459] 00:00:13 ExternalMedia named: "com.apple.powermanagement.externalmediamounted"  
   pid 124(powerd): [0x000000a2000d8446] 00:00:15 InternalPreventSleep named: "com.apple.powermanagement.acwakelinger"  
    Timeout will fire in 29 secs Action=TimeoutActionRelease
Kernel Assertions: 0xc=USB,BT-HID
   id=500  level=255 0x4=USB creat=30/08/2022, 20:05 description=com.apple.usb.externaldevice.14700000 owner=SteelSeries Arctis 7
   id=501  level=255 0x4=USB creat=30/08/2022, 20:06 description=com.apple.usb.externaldevice.14800000 owner=USB Receiver
   id=502  level=255 0x4=USB creat=30/08/2022, 20:10 description=com.apple.usb.externaldevice.14200000 owner=BCM20702A0
   id=503  level=255 0x8=BT-HID creat=30/08/2022, 20:17 description=com.apple.driver.IOBluetoothHIDDriver owner=BNBTrackpadDevice
Idle sleep preventers: IODisplayWrangler
vulgo commented 2 years ago

Which Bluetooth keyboard? Satechi X3.

lazosweb commented 2 years ago

Nice!!! My MX keys support both bluetooth and the Logitech receiver, the disadvantage is that with bluetooth you cannot hit DELETE or F12 to go to BIOS you need the Logitech USB receiver for that...

Do you have an email address or something that you can share? I have a few questions about your ACPI aml files that I would like to ask you and something about the bluetooth, I do not know if you want me to create new issues here.

vulgo commented 2 years ago

Please create issues @lazosweb i don't want any email addresses in the repo or on github.com, thanks.

lazosweb commented 2 years ago

Yes this is what I thought so too. Will do then. Thank you.