HydrogenAudio

Hosted Forums => foobar2000 => General - (fb2k) => Topic started by: Darknight on 2010-02-14 12:21:23

Title: Deactivate standby of monitor (with speakers) during playback
Post by: Darknight on 2010-02-14 12:21:23
Hi!

Is there any solution to deactivate monitor standby during the playback? My speakers in my monitor so they turn off when the monitor goes to standby.
Title: Deactivate standby of monitor (with speakers) during playback
Post by: marc2003 on 2010-02-14 12:50:17
it's not automatic but you could create desktop shortcuts to run these commands.

//stop the monitor from going into standby
Code: [Select]
powercfg -x -monitor-timeout-ac 0


//reset it back to the default 15 minutes
Code: [Select]
powercfg -x -monitor-timeout-ac 15


these commands work on vista/7 - not xp. i'm pretty sure these will require that you're logged on as an administrator.

you could even use foo_run to create buttons in foobar to run these commands.
Title: Deactivate standby of monitor (with speakers) during playback
Post by: Dandruff on 2010-02-14 16:54:56
But it's a good suggestion to add such an option to foobar2000.
Title: Deactivate standby of monitor (with speakers) during playback
Post by: Darknight on 2010-02-16 09:10:25
Thx the advice.

But I kept hoping, there is a built in function or script in foobar, what makes it automatically.
Title: Deactivate standby of monitor (with speakers) during playback
Post by: Darknight on 2010-02-16 09:14:44
But it's a good suggestion to add such an option to foobar2000.


How can I suggest it?
Title: Deactivate standby of monitor (with speakers) during playback
Post by: Dandruff on 2010-02-16 09:18:31
Now you have
Title: Deactivate standby of monitor (with speakers) during playback
Post by: alfrix on 2013-03-03 16:53:52
Sorry to revive this old thread, but i think this has not been addressed...

It would be great, because it happens with hdmi too.
For example: if windows suspends the monitor while doing playback this will result in an audio dropout, which is logical since hdmi needs the video clock to transmit audio.

Disabling monitor shutdown in the power manager prevents this from happening, but its preferable to disable monitor shutdown only when doing playback

i probably will end-up using a dedicated spdif cable, but not everyone can do this due to hardware limitations
Title: Deactivate standby of monitor (with speakers) during playback
Post by: Sandrine on 2013-03-03 20:03:02
+1

I've also had to configure Power Options to set "Turn off the monitor" to "never and am using a blank screensaver only. Obivously, this is not the most environment friendly power setting.
Title: Deactivate standby of monitor (with speakers) during playback
Post by: EpicForever on 2013-03-03 21:31:35
+1 , as in near future I plan to more often use my amplituner to listen to music from PC and I already have HDMI cable hidden in baseboard...
Title: Deactivate standby of monitor (with speakers) during playback
Post by: trout on 2013-03-03 22:08:43
as a work-around solution, foo_scheduler can run power config commands automatically on playback start/stop, or by timed events, etc.
Title: Deactivate standby of monitor (with speakers) during playback
Post by: Case on 2013-03-08 15:30:25
I made a component that stops monitor from entering standby when playback is active. I think it's better than running powercfg commands. Download here (http://www.saunalahti.fi/~cse/foobar2000/foo_nds.fb2k-component).
Title: Deactivate standby of monitor (with speakers) during playback
Post by: Sandrine on 2013-03-08 18:41:43
Thank you!
Title: Deactivate standby of monitor (with speakers) during playback
Post by: EpicForever on 2013-03-09 09:34:27
Case, is there any config option for your plugin? Like turning it on or of?? How exactly it works? Is there any documentation for it ?
Title: Deactivate standby of monitor (with speakers) during playback
Post by: marc2003 on 2013-03-09 10:30:18
documentation for this?

Quote
I made a component that stops monitor from entering standby when playback is active.


what more needs to be said? i guess it simply tells the OS to keep the monitor on much like a video player does.
Title: Deactivate standby of monitor (with speakers) during playback
Post by: Case on 2013-03-09 11:03:41
There is nothing to configure. When the playback starts it tells the operating system that display is required. When you hit pause or stop it tells the OS that display is no longer needed, letting normal power saving features do their thing. If you want this behavior you install the component and forget it.
Title: Deactivate standby of monitor (with speakers) during playback
Post by: EpicForever on 2013-03-09 11:06:47
@marc
My exact questions are:
1. Does this component turns off screensaver and powering down of screen only when foobar plays music or maybe whatever foobar is doing, like converting music, calculating BPMs, just running idle etc. ?
2. Does this plugin require foobar to be on focus or maybe foobar can be minimized and running in background and it still works?
3. How it "simply tells the OS to keep the monitor" in details? I am using COMODO Firewall pro with Proactive Defense. If it sends Windows Messages or acesses memory of some system process I need to configure Comodo first as this can cause problemws with Windows UI (blank screen can stall and only power reset can help).
4. Is there any option to stop functionality of this plugin without deinstallation from foobar? Until now I haven't found such option in foobar, but maybe I wasn't careful enough. OK, now it's answered

Documentation should contain answers to such questions
Title: Deactivate standby of monitor (with speakers) during playback
Post by: Case on 2013-03-09 12:04:25
1. Screensaver has nothing to do with power management. Its settings are not touched. Display power saving is disabled only when playback is active.
2. No requirements.
3. Windows has a function SetThreadExecutionState (http://msdn.microsoft.com/en-us/library/windows/desktop/aa373208%28v=vs.85%29.aspx) to do that.
Title: Deactivate standby of monitor (with speakers) during playback
Post by: EpicForever on 2013-03-09 12:42:41
Many thanks Case !! For both programming effort and explanations  . You got new user
Title: Deactivate standby of monitor (with speakers) during playback
Post by: Case on 2013-03-11 18:37:58
It seems that Microsoft has changed the behavior of the SetThreadExecutionState function. Its documentation says "This function does not stop the screen saver from executing", yet it very much does so. At least on Windows 7 and Windows 8.
I tried the newer PowerSetRequest (http://msdn.microsoft.com/en-us/library/windows/desktop/dd405534%28v=vs.85%29.aspx) function with the same result. Screen saver won't run when using the PowerRequestDisplayRequired value.
Sorry for giving misinformation earlier.
Title: Deactivate standby of monitor (with speakers) during playback
Post by: EpicForever on 2013-03-22 08:00:00
Case, could you add some simple option that would allow to control weather use or not use your plugin functionality? I mean that it would be nice if I could create keyboard shortcut which would allow to turn it on or off. Depending on output used, this option is required (HDMI output) or not (PC speakers connected to soundcard jack outputs). It could be nice if I could simply press  "Shift+S" (this is how it would be configured here  ) and disable this function and save some power used by PC monitor if I not use HDMI output at the moment.
Title: Deactivate standby of monitor (with speakers) during playback
Post by: Case on 2013-03-22 12:05:03
You could always turn the monitor off with its power button, but I updated it with this option. It's found under Playback in main menu. Download is here (http://www.saunalahti.fi/~cse/foobar2000/?changes=foo_nds).
Title: Deactivate standby of monitor (with speakers) during playback
Post by: dhromed on 2013-03-22 14:46:26
Case, could you add some simple option that would allow to control weather


Damn users, always thinking everything is so simple to program!
Title: Deactivate standby of monitor (with speakers) during playback
Post by: EpicForever on 2013-03-22 19:21:46
dhromed - I didn't mean "simple to code" but simple in usage, simple as a working routine. I treasure all programming efforts, of all people who contribute to foobar's usability. I know how hard is coding of anything - I tried to learn how to do it in C++ and assembler but I failed and in the end the only code that I am able to produce is MatLab script. Mostly when MatLab's help is opened all the time.
Other thing is that I only asked. He could simply say "no" or "no, I don't have time for it" if he wanted to be more precise  .
Thanks Case for this update
Title: Deactivate standby of monitor (with speakers) during playback
Post by: Andreasvb on 2013-03-22 19:52:35
EpicForever - dhromed meant that it's a bit hard to incorporate a way of controlling the weather with foobar2000.

Hint: http://www.grammar-monster.com/easily_conf...ther_wether.htm (http://www.grammar-monster.com/easily_confused/weather_whether_wether.htm)
Title: Deactivate standby of monitor (with speakers) during playback
Post by: EpicForever on 2013-03-22 20:33:11
LOL... lolzords... I am bit embarassed now :/
But hey, why not? We are making so much efforts to create proper weather forecasts and after so many years they're still imprecise. Why not to control weather instead of forecasting it? Foobar will be the first on planet...
Additionally after so many years of lerning English I got only slightly better results than with C++... I should stick with MatLab then... :/
Title: Deactivate standby of monitor (with speakers) during playback
Post by: EpicForever on 2013-05-04 20:24:58
Just a silly question - am I wrong or it was just implemented in main program with introduction of foobar 1.2.6 (last option under "Playback") ?

But as far as I investigated it foo_nds is better option - it lets you enabling and disabling this function with own keyboard shortcut.
Title: Deactivate standby of monitor (with speakers) during playback
Post by: marc2003 on 2013-05-04 20:56:32
http://www.foobar2000.org/changelog (http://www.foobar2000.org/changelog)


Title: Deactivate standby of monitor (with speakers) during playback
Post by: frebag on 2014-07-01 06:42:10
I installed the component on my Sony Duo on Windows 8.1 and swiched it ON in the menu.
But when I'm playing music, the monitor goes into standby and the music stop playing.
I´d like to have no monitor standby while playing music on foobar2000.
What do I have to Change?
Title: Deactivate standby of monitor (with speakers) during playback
Post by: Case on 2014-07-01 16:48:52
I'm not familiar with software Sony bundles with their machines but it certainly sounds like they bundle something that prevents Windows power savings from working the way they should. If the only software on it is what Sony support page has available to download, then my guess would be that Control Center causes this behavior. You could try uninstalling these bundled programs to see if it helps.
Title: Deactivate standby of monitor (with speakers) during playback
Post by: frebag on 2014-07-01 19:20:29
Hi case, thank you, i will test it, after creating a backup 
At the Moment, I help myself with a small Programm called "DontSleep_x64.exe"