Rockbox Technical Forums

Rockbox Development => Feature Ideas => Topic started by: Multiplex on October 31, 2008, 09:59:20 AM

Title: Catch the idle shutdown
Post by: Multiplex on October 31, 2008, 09:59:20 AM
I can't think of a better term but what I'm thinking about is like the Windows XP screen saver option where if you jiggle the mouse withing the first few seconds of the SS kicking in you can abort it without having to enter the password.

For the umpteenth time this week I've been working away with background music provided by Rockbox on my trusty H320, and someone comes to my desk so I pause playback and revmove the headphones. During the discussion I see out of the corner of my eye my iRiver waking up the screen to tell me it is shutting down... if it just gave a count down (from say 15 seconds) and I could press a button to prevent the shutdown (rather then have to restart it) that would be great.

I've made no attempt to look at the code to see if this is practical but thought I'd mention it to see if anyone else feels the same...
Title: Re: Catch the idle shutdown
Post by: bascule on October 31, 2008, 10:18:37 AM
Why not just increase the idle shutdown setting...?

http://download.rockbox.org/manual/rockbox-h300/rockbox-buildch8.html#x11-1360008.5.5

On the hard drive players especially, the battery usage for saving settings and then restarting probably outweighs quite significantly additional drain from leaving the player in a paused state for an extended period.
Title: Re: Catch the idle shutdown
Post by: Llorean on October 31, 2008, 05:41:30 PM
In fact, being paused for a minute longer probably uses less power than having the backlight on for 15 seconds.
Title: Re: Catch the idle shutdown
Post by: nls on November 01, 2008, 09:01:46 AM
I like the idea of a general shutdown delay for non user triggered shutdowns. It would address this issue and the issue a user brought up in the mailing list which was basically the same but with the sleep timer.

Simply splashing "Shutting down in x seconds, press any button to cancel" would do it i think with a settable timeout of course.
Title: Re: Catch the idle shutdown
Post by: MajiKool Dragonâ„¢ on November 01, 2008, 09:47:56 AM
could it during the timeout period sleep as much unused hardware as possible in prep for shutdown and then re-awake that hardware if the shutdown is canceled.
  ??? ;D
Title: Re: Catch the idle shutdown
Post by: AlexP on November 01, 2008, 10:22:48 AM
could it during the timeout period sleep as much unused hardware as possible in prep for shutdown and then re-awake that hardware if the shutdown is canceled.

What would be the point?  If it shutdown anyway you would gain nothing, and if the user interrupted the shutdown then everything would have to be powered up again.
Title: Re: Catch the idle shutdown
Post by: Zardoz on November 01, 2008, 12:26:50 PM
I like the idea of a general shutdown delay for non user triggered shutdowns.

I like this idea too - as in I would find, and have found situations where this could be helpful. The more configurable the better huh? Unless it would cost a whole bunch in code and fiddliness and cause problems elsewhere
Title: Re: Catch the idle shutdown
Post by: soap on November 01, 2008, 12:59:08 PM
I like the idea of a general shutdown delay for non user triggered shutdowns.

I like this idea too - as in I would find, and have found situations where this could be helpful. The more configurable the better huh? Unless it would cost a whole bunch in code and fiddliness and cause problems elsewhere
What is the justification for making it configurable?
Title: Re: Catch the idle shutdown
Post by: Zardoz on November 01, 2008, 01:24:00 PM
Justification; in this case - none I guess. I just meant that as a general precept. Although now that you mention, it would be cool if one could set an 'interrupt' window in seconds or some such. To answer your question: No justification. Just a notion.
Title: Re: Catch the idle shutdown
Post by: soap on November 01, 2008, 03:01:58 PM
I'm not against it - but I, personally, can not think of a reason to make the window configurable.  I'm not sure what usability such an option adds to the window.
Title: Re: Catch the idle shutdown
Post by: Zardoz on November 01, 2008, 03:34:26 PM
Not a whole lot. Admittedly it's a gimmick. But it might be a useful one. What about the screen flashes 'on-off' every 5 or so seconds for a set time between 10 and 90 seconds before shutdown? (here the configurable option.) That's probably a silly idea
Title: Re: Catch the idle shutdown
Post by: Multiplex on November 03, 2008, 07:43:55 AM
Why not just increase the idle shutdown setting...?

http://download.rockbox.org/manual/rockbox-h300/rockbox-buildch8.html#x11-1360008.5.5

On the hard drive players especially, the battery usage for saving settings and then restarting probably outweighs quite significantly additional drain from leaving the player in a paused state for an extended period.
Yeah, actually I think I have but how far to go?

Llorean's point feels about right, but I have not investigated the actual figures (for any player) - certainly I think that shutdown and restart will use more power then many minutes of paused and backlight off.

Just like the screensaver analogy I'd appreciate the opportunity to catch it and re-start the timeout, on the expectation that I'll be wanting to use it again very soon.

I'll take a look next weekend and see if I can do anything (particularly as someone beat me to the Sudoku candidates display)
Title: Re: Catch the idle shutdown
Post by: LinusN on November 04, 2008, 01:55:26 AM
I think this sounds like a pretty good thing. Maybe a "Shutting down in X seconds" countdown?
Title: Re: Catch the idle shutdown
Post by: JdGordon on November 04, 2008, 02:08:07 AM
ok, fine, probably easy to implement, but then you have the same complaint where its not displaying for long enough... "oh i just got back to my desk and it turned off just as i pressed a button.. can you increase it to 30s?" ... 60s? 90s?

edit: might not be so easy to implement...
Title: Re: Catch the idle shutdown
Post by: Llorean on November 04, 2008, 05:23:43 AM
Well, you still use the same idle shutdown time the user set (as in, don't increase it any), but have a "yes/no" option for "Warn before shutdown" which turns the backlight on 5 seconds before shutdown with a brief countdown.

5 seconds doesn't seem like long, but they've already set the idle shutdown time, and they can press a button at any time *before* those 5 seconds to cancel the idle shutdown anyway, it's just a very last-second warning before it shuts down.

I don't think we need to be concerned about people wanting "just a little more time" since the user still gets to set the idle time, and they can press a button during any portion of the idle time, we really just need to give them a brief warning right before the idle time runs out.
Title: Re: Catch the idle shutdown
Post by: oayz on November 06, 2008, 08:33:11 PM
Beep on countdown?
Flash backlight on countdown?
Title: Re: Catch the idle shutdown
Post by: Llorean on November 07, 2008, 05:41:31 AM
Backlight should probably come on (since it does during the last phase of shutdown anyway, I think), but it probably shouldn't beep. Odds are good if you've paused it, it's because you wanted it quiet, and it's not a significant hassle to turn it back on anyway.
Title: Re: Catch the idle shutdown
Post by: Zardoz on November 09, 2008, 10:43:14 AM
Flashes for a second every five??
Title: Re: Catch the idle shutdown
Post by: Llorean on November 09, 2008, 10:58:15 AM
Do you mean "The backlight should flash every five seconds before shutdown?"

Please, try to type out whole thoughts, and don't leave out things that make it unclear exactly what you're saying.

If the warning period were short (which is really only reasonable, since as a user you know you've set the idle time anyway, and if you're not paying attention odds are you're still busy) this wouldn't make much sense.
Title: Re: Catch the idle shutdown
Post by: AlexP on November 09, 2008, 12:06:58 PM
I don't see any sense in complicating matters - the backlight turns on with a splash saying "Shutting down in x seconds.  Press any key to abort."  If you press a key, it aborts.  If you don't, it shuts down.
Title: Re: Catch the idle shutdown
Post by: Zardoz on November 09, 2008, 01:07:27 PM
Flashes for a second every five??

It was an idea. Stupid maybe.

I don't see any sense in complicating matters - the backlight turns on with a splash saying "Shutting down in x seconds.  Press any key to abort."  If you press a key, it aborts.  If you don't, it shuts down.

That sounds good. I was suggesting the "shutting down in X seconds" might be configurable in terms of X. Nevermind.
Title: Re: Catch the idle shutdown
Post by: Michael7 on November 09, 2008, 05:08:09 PM
I have often thought about this as a feature.   What I find is that Im doing stuff around the house with the music going through a set of PC speakers in the kitchen. The phone rings or something else happens for me to pause the music. Usually what reminds me to press play is the sound of the player shutting down. In my case the screen flashing wouldnt help me as I most likely wouldnt see it so a little blast of music before shutdown would work.
Title: Re: Catch the idle shutdown
Post by: Llorean on November 09, 2008, 05:20:35 PM
Is it so much of a problem to turn it back on in that situation?
Title: Re: Catch the idle shutdown
Post by: Michael7 on November 09, 2008, 06:44:16 PM
No its not a problem, I wanted to give my experience of Rockbox. It will save a little on battery power.
Title: Re: Catch the idle shutdown
Post by: Llorean on November 09, 2008, 07:32:38 PM
It seems to me pausing is usually for the purpose of "making it quiet", so making a noise after it's been paused too long seems like it'd be a bad idea.
Title: Re: Catch the idle shutdown
Post by: JdGordon on November 09, 2008, 08:07:25 PM
beeping once at the start of the shutdown countdown could be useful, but then if you are close enough to hear it and actully do something about it, you're probably close enough to see the backlight come back on.
Title: Re: Catch the idle shutdown
Post by: Multiplex on November 12, 2008, 09:13:52 AM
edit: might not be so easy to implement...
:-( this seems to  be true (certainly for this very rusty programmer) I'm not going to give up but it is rather bigger than I thought it might be.
Title: Re: Catch the idle shutdown
Post by: oayz on November 12, 2008, 10:55:51 PM
beeping once at the start of the shutdown countdown could be useful, but then if you are close enough to hear it and actully do something about it, you're probably close enough to see the backlight come back on.
I had 2 scenarios in mind:
1) Pause and put device in the pocket without taking headphones on. Very short, not too laud beep 20 sec before every 5 sec. Longer beep 5 sec before shutdown.
2) Pause, take off headphones. Flashing (preferred over constant on) backlight. 0.5-1.0s every 3-5 sec