Sleep
#46
xbmc.log

Should be everything? Hopefully!
Reply
#47
Memphiz,

Thanks for all your work on this. Your build from yesterday (XBMC-allowsuspend2.dmg) does allow my Mac Mini (running 10.7.5) to sleep when XBMC is idle (full screen or windowed) and LiveTV is disabled.

When LiveTV is enabled, but XBMC is otherwise idle, the screen can go to sleep as expected, but the computer itself doesn't sleep. That is the case whether or not the backend is running. I already know that the backend prevents sleep on idle (and XBMC is not running), but even if I quit the backend (and therefore XBMC complains that the backend isn't running), the computer doesn't sleep, even though pmset doesn't show PreventUserIdleSystemSleep as being asserted.

So it appears that there is something other than PreventUserIdleSystemSleep being asserted that can prevent the computer from sleeping on idle.

dgktkr

Reply
#48
Like I posted on Github; works like a charm over here. My Mac Mini goes to sleep like it should after the timer runs out, and no more coreaudiod assertions stick. I don't use LiveTV or anything, just XBMC, and it works like I expected it to with this build.

@Memphiz; I agree; not sure if everyone posting here is on the same page about what this function does.

The goal of "Allow suspend" is letting OSX handling the sleep function using it's own Power Management settings. Setting the "Allow suspend" timer does nothing more than giving back Power Management (sleep/suspend) controls to OSX after the timer runs out. Simple as that, nothing more. Other programs may be preventing sleep, but allowing sleep or not is up to OSX after the timer runs out, not up to XBMC.

This function works like a charm in this latest build Memphiz posted, and I've tested it pretty thorough. If your Mac does not go to sleep; it's likely there are other programs or processes preventing sleep. Also; I don't think XBMC can influence on which screen (in a dual setup) XBMC shows up after waking from sleep, especially if running windowed. Isn't that up to OSX?

Reply
#49
It usually sits on full screen on the 2nd screen and when resuming it opens up in full screen on the 1st screen, got to be to do with XBMC as it has never happened before :/

One other thing im not too sure about, which is probably just me not thinking, but my setup prior to XBMC 12 Frodo was no shutdown/idle settings in XBMC at all and then the Mac power settings was put display to sleep after 5 minutes. This worked perfectly as it only put the display to sleep when i wasn't watching anything on XBMC and when i wasn't doing anything on my main screen, for example browsing the web.

Not quite sure if getting this method sorted will resolve this or not :/
Reply
#50
Stevenlr; I've got the feeling the issues you talk about are unrelated and don't have anything to do with the feature we're discussing. If you don't use the shutdown/idle settings in XBMC, you wouldn't need this feature. Are you even using the build Memphiz posted in this thread, or are you using Frodo RC?
Reply
#51
Yes i am using the build Memphiz posted.

In regards to this build and issues with the 'suspend' option:
'It usually sits on full screen on the 2nd screen and when resuming it opens up in full screen on the 1st screen, got to be to do with XBMC as it has never happened before'

In regards to general sleep issues since starting to use Frodo:
'One other thing im not too sure about, which is probably just me not thinking, but my setup prior to XBMC 12 Frodo was no shutdown/idle settings in XBMC at all and then the Mac power settings was put display to sleep after 5 minutes. This worked perfectly as it only put the display to sleep when i wasn't watching anything on XBMC and when i wasn't doing anything on my main screen, for example browsing the web.

Not quite sure if getting this method sorted will resolve this or not'
Reply
#52
pmset -g assertions shows all assertions which prevent sleep. If there are non - then nothing is preventing the os from sleeping (if it still doesn't sleep then it might be disabled in osx settings energy management).

For the other issue i'm not really capable of testing. My hackintosh with dual monitor doesn't wakup after sleep so i'm not the right dev for looking into that issue where xbmc moves to the wrong monitor. I guess the mac wakes up faster then the 2nd display or something like that.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#53
Stevenlr are you around? I have another testbuild up in a couple of mins for your dualscreen on resume issue (maybe - just seeing some strange hack code which could lead to what you see).
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#54
@Stevenlr here you go

https://dl.dropbox.com/u/30371861/XBMC-d...resume.dmg

This might fix the problem you see that xbmc moves to screen0 on resume. Please report back as soon as possible if this fixes the problem so i can get the fix into frodo.

AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#55
Could someone save me some time experimenting and tell me how shutdown/sleep timer works? The wiki doesn't say. I would hope the timer only starts when XBMC is idle, and that any activity (like menu action) resets the timer? Hopefully it is not a simple timer that starts when you set it and keeps going until its done?
LibreELEC 10.0.4 * ViMediaManager or TinyMediaManager | Raspberry pi 4b
Sharing media from NAS via NFS (optical out to receiver, HDMI to TV) | TV remote with CEC / Bluetooth keyboard
Reply
#56
The timer set in XBMC's settings only starts when XBMC is idle. There is an additional "custom shutdown timer" that you can get to from the shut down menu that starts right away, but you don't have to worry about that one for the issue here.
Reply
#57
(2013-01-19, 01:27)Memphiz Wrote: @Stevenlr here you go

https://dl.dropbox.com/u/30371861/XBMC-d...resume.dmg

This might fix the problem you see that xbmc moves to screen0 on resume. Please report back as soon as possible if this fixes the problem so i can get the fix into frodo.

Well done Memphiz, that solves it Smile

On the other issue, ive run that command and it gives me this:
Listed by owning process:
pid 6127(XBMC): [0x0000000500002041] 00:06:25 NoDisplaySleepAssertion named: "XBMC requested disable system screen saver"
pid 19(powerd): [0x00000005000004d4] 00:00:37 PreventUserIdleDisplaySleep named: "com.apple.powermanagement.delayDisplayOff" (timed out)
Timeout will fire in: 263.0 Action=TimeoutActionTurnOff
pid 19(powerd): [0x0000000900000135] 16:04:08 ExternalMedia named: "com.apple.powermanagement.externalmediamounted"
pid 197(iTunes): [0x00000001000020aa] 00:00:04 PreventUserIdleSystemSleep named: "Nameless (via IOPMAssertionCreate)"
pid 6099(helpd): [0x0000000c0000203c] 00:06:46 BackgroundTask named: "com.apple.helpd.sdmbuilding"

Sorry for being a noob but i don't understand all this ha, if you could help me in understanding it that would be very helpful Big Grin
Reply
#58
What it means is there are is one process that prevents the display from sleeping (XBMC), one process preventing the system from sleeping (iTunes), a background task running (helpd) and your OSX Power Settings process, which is timed out, probably because of XBMC running.

Good to hear to placement of the XBMC window is resolved in Memphiz's latest build!
Reply
#59
Ok so the one i need to sort is XBMC as when XBMC isn't actually playing a video and its just sat on a menu, its power controls should rely on Mac OSX Power settings.

This is sort of my main issue, i wanted to help with the whole 'suspend' thing as its a very helpful temporary step and its closer than i was before to my previous setup which is great, so thanks again for that Memphiz.

Im guessing it would have to be in the build somehow to only stop display sleeping when a video is playing, otherwise release the display to sleep based on whatever the Mac Power settings are set to?
Reply
#60
Stevenlr; that's exactly what "Allow suspend" does; after the timer runs out sleeping is based on Mac's Power Settings. If you just set the timer to a couple of minutes, this is what exactly what is does. So; set the Power Settings inside XBMC to "Allow suspend" and set the timer to like 5 minutes and XBMC will give control to OSX after the timer runs out.

Just stopping display sleeping when playing a video is not a good idea; you don't want the Mac to go to sleep when you're browsing the library for example... It's not sane to take out the timer in this equation. You don't want XBMC to release the controls over Power Settings immediately when not playing video, because some users might start XBMC and wait a couple of minutes before browsing or actually playing something.
Reply

Logout Mark Read Team Forum Stats Members Help
Sleep0