Hi all, my Mac does not turn to sleep mode automatically while Spine is on. Is there a way to solve this problem? Appreciate your help.
Spine stops my Mac from sleeping
Do you have an animation running?
My display will automatically switch off as normal while Spine is open and active, but Spine continually runs and consumes battery when my screen is locked.
Normally, when other softwares are open and active, Mac rarely consumes battery after switch to sleep mode (similar as the hibernating mode on Windows ).
Here is my Battery setting.
Thanks for the info. We'll investigate.
- Изменено
tuna Sorry for the delay in response! I have not been able to take the time to confirm it, and finally was able to test it properly, but was unable to reproduce the problem you are describing. The conditions of my test were: only Spine Editor 4.1.23 was opened, all other applications were closed, no USB devices were connected, all Login Items were turned off so that no applications were running in the background, and turned off "Allow notifications when the screen is locked" in the notification settings, then keep sleeping my MacBook overnight (about 13 hours). The result is shown in the screenshot below:
This morning the charge was down about 2%, but I think we can say that it drained very little battery power. Therefore I assume that your battery is drained due to factors other than Spine. Could you please check again if the same battery draining problem occurs when Spine is not opened?
Thanks for your testing, I have checked in the Activity Monitor, it shows that when Spine is on its start interface, as the pic shows, "Preventing Sleep" is "No", but when Spine is on its working interface, the"Preventing Sleep" is "Yes". I am not sure if this is the cause of the draining of the battery power.
Is there any ways to set the "Preventing Sleep" to "No" in Spine? I didn't find a way to change this setting in MacOS 10.13.6
tuna Sorry for the delay in response! Could you please try to run the following commands on Terminal while you open Spine and let us know the result?: pmset -g
and pmset -g assertions
.
These are helpful to check what applications prevent sleeping. For example, when I ran the above commands on my end, I got the following outputs:
misaki@MacBook-Pro ~ % pmset -g
System-wide power settings:
Currently in use:
Sleep On Power Button 1
hibernatefile /var/vm/sleepimage
networkoversleep 0
disksleep 10
sleep 1 (sleep prevented by coreaudiod, coreaudiod, bluetoothd, powerd, sharingd)
hibernatemode 3
ttyskeepawake 1
displaysleep 0
lowpowermode 1
womp 1
misaki@MacBook-Pro ~ % pmset -g assertions
2023-06-30 09:19:19 +0900
Assertion status system-wide:
BackgroundTask 0
ApplePushServiceTask 0
UserIsActive 1
PreventUserIdleDisplaySleep 0
PreventSystemSleep 0
ExternalMedia 0
PreventUserIdleSystemSleep 1
NetworkClientActive 0
Listed by owning process:
pid 392(coreaudiod): [0x000002e3000181e4] 00:09:36 PreventUserIdleSystemSleep named: "com.apple.audio.AudioTap-A148EC7A-5E1E-489D-B966-0D90C6854603.context.preventuseridlesleep"
Created for PID: 825.
pid 392(coreaudiod): [0x000002e300018723] 00:09:37 PreventUserIdleSystemSleep named: "com.apple.audio.BuiltInSpeakerDevice.context.preventuseridlesleep"
Created for PID: 1494.
pid 371(bluetoothd): [0x0000051b000187ac] 00:00:08 PreventUserIdleSystemSleep named: "com.apple.BTStack"
pid 371(bluetoothd): [0x0000002e00098283] 00:21:09 UserIsActive named: "Bluetooth LE HID Activity"
pid 324(powerd): [0x0000001700018040] 00:21:32 PreventUserIdleSystemSleep named: "Powerd - Prevent sleep while display is on"
pid 324(powerd): [0x0000001700098041] 00:21:32 UserIsActive named: "com.apple.powerd.ws.initialize"
pid 379(WindowServer): [0x0000001b000980ad] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle serviceID:100000c9f service:AppleHIDKeyboardEventDriverV2 product:Magic Keyboard eventType:3"
pid 669(sharingd): [0x000004dd00018790] 00:01:10 PreventUserIdleSystemSleep named: "Handoff"
Kernel Assertions: 0x108=BT-HID,MAGICWAKE
id=509 level=255 0x100=MAGICWAKE creat=2023/06/30 9:05 description=en0 owner=IOSkywalkNetworkBSDClient
id=517 level=255 0x8=BT-HID creat=2023/06/30 9:12 description=com.apple.driver.IOBluetoothHIDDriver owner=AppleHSBluetoothDevice
I ran the commands while Spine was open, but there was no line which mentions Spine at all in the output results, so it appears that Spine does not affect sleeping. Please let us know the results on your end.
- Изменено
Zoc-MacBook-Pro:~ zhou$ pmset -g
System-wide power settings:
Currently in use:
standbydelay 10800
standby 1
womp 1
halfdim 1
hibernatefile /var/vm/sleepimage
powernap 1
gpuswitch 2
networkoversleep 0
disksleep 10
sleep 1 (sleep prevented by coreaudiod, sharingd)
autopoweroffdelay 28800
hibernatemode 3
autopoweroff 1
ttyskeepawake 1
displaysleep 10
tcpkeepalive 1
acwake 0
lidwake 1
Zoc-MacBook-Pro:~ zhou$ pmset -g assertions
2023-07-03 18:02:41 +0800
Assertion status system-wide:
BackgroundTask 0
ApplePushServiceTask 0
UserIsActive 1
PreventUserIdleDisplaySleep 0
PreventSystemSleep 0
ExternalMedia 0
PreventUserIdleSystemSleep 1
NetworkClientActive 0
Listed by owning process:
pid 145(coreaudiod): [0x0000099f00018219] 00:02:30 PreventUserIdleSystemSleep named: "com.apple.audio.AppleHDAEngineOutput:1B,0,1,1:0.context.preventuseridlesleep"
Created for PID: 897.
pid 310(sharingd): [0x000009da0001821e] 00:01:32 PreventUserIdleSystemSleep named: "Handoff"
pid 98(hidd): [0x0000079e000981ea] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4294969352.3"
Timeout will fire in 600 secs Action=TimeoutActionRelease
Kernel Assertions: 0x108=BT-HID,MAGICWAKE
id=502 level=255 0x100=MAGICWAKE mod= description=en0 owner=en0
id=503 level=255 0x8=BT-HID mod= description=com.apple.driver.IOBluetoothHIDDriver owner=IOBluetoothHIDDriver
Idle sleep preventers: IODisplayWrangler
I ran the commands while Spine was open, This is my result, I hope it helps.
Thanks for your reply.
I've tested this with 3.8.99 and 4.1.23. Here's 3.8.99. It does not prevent sleep on the latest macOS Ventura on an M1 Max MacBook Pro.
Here's the same for Spine 4.1.23:
From your pmset stats (and my own locally) I can see that coreaudio prevents sleeping. Spine sets up the audio device for playing back audio since Spine 4.0. Even if there is no audio being played back, the audio device must be open.
You can disable audio by running Spine from the terminal. Press CMD+space
then enter /Applications/Spine.app/Contents/MacOS/Spine --disable-audio
and press the ENTER
key.
With audio disabled, Spine no longer prevents macOS from sleeping.
This is a temporary fix you can use. We'll have to investigate if it is possible to allow macOS from sleeping when the audio device is active.
Thank you very much, it helps me a lot.