Screen saver & power saving killed by VLC

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
itbe
Blank Cone
Blank Cone
Posts: 41
Joined: 08 Oct 2008 22:04

Re: Screen saver & power saving killed by VLC

Postby itbe » 24 Oct 2008 09:08

Any news on this issue?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Screen saver & power saving killed by VLC

Postby VLC_help » 24 Oct 2008 11:55

I cannot do any builds because make package-win32-base is broken in git builds. No dll files are build.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Screen saver & power saving killed by VLC

Postby Jean-Baptiste Kempf » 25 Oct 2008 06:31

It is repaired.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Screen saver & power saving killed by VLC

Postby VLC_help » 25 Oct 2008 18:02

It is repaired.
Yep :D

itbe
Blank Cone
Blank Cone
Posts: 41
Joined: 08 Oct 2008 22:04

Re: Screen saver & power saving killed by VLC

Postby itbe » 25 Oct 2008 19:58

j-b wrote:
It is repaired.
Does it means "make package-win32-base" is fixed or the "Screen saver & power saving killed by VLC" is fixed?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Screen saver & power saving killed by VLC

Postby VLC_help » 26 Oct 2008 14:41

Does it means "make package-win32-base" is fixed or the "Screen saver & power saving killed by VLC" is fixed?
It means make package-win32-base is fixed. I will do public test release next week so people can test it (so this won't make to 0.9.5).

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Screen saver & power saving killed by VLC

Postby VLC_help » 28 Oct 2008 12:15

Ok, here is the first release.
http://rapidshare.com/files/158307762/v ... e.zip.html
or
http://www.megaupload.com/?d=U0KBVYTE

I removed all old SPI_SETxxx code. Now I use sendinput with VK__none_ and hopefully it works better. VK__none_ is send once in 55 drawing events, so it shouldn't flood things. 55 was chosen because lowest screen saver time is one minute and if video FPS is 1, it won't activate (currently VLC doesn't play low FPS video at all so the value could be bigger).

Changes are made to WinGDI, DirectX and DirectX 3D output modules. There wasn't any screensaver code in OpenGL output, and I haven't tested with OpenGL.

This build has some other issues (like assert crash on shutdown sometimes) but these aren't related to screensaver changes so only report screensaver or powersaving related issues to here.

js2756
New Cone
New Cone
Posts: 7
Joined: 01 Oct 2008 18:38

Re: Screen saver & power saving killed by VLC

Postby js2756 » 29 Oct 2008 03:39

Still using 0.9.4, but I did notice something wierd. You can re-enable your monitor power settings if you also set a screensaver. Also, monitor power settings work properly after VLC is used if a screensaver is on.

So, just a run down of what I found (to make things clear):

1) Monitor set to power off after x period of time, but no screensaver set. Using VLC will disable monitor power saving. Power settings for monitor only reset if a screensaver is activated or system rebooted.

2) Monitor set to power off after x period of time, screensaver set to activate after y period of time, where y is longer than x. Using VLC will not disable monitor power saving and the monitor will shut off normally.

I didn't conduct this scientifically (I sort of found this via a fluke), so if someone can verify this, I'm sure the VLC team would appreciate it. I'll try out a couple of other things later and post my findings here.

Using 0.9.4 with WinXP SP2.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Screen saver & power saving killed by VLC

Postby VLC_help » 29 Oct 2008 14:18

There are many ifs and buts that can happen with current VLC, specially if VLC crashes or you alter settings during runtime (like some laptops do with their powersaving optiong). That is why I would like that people test those builds and report back here.

Alan Baxter
New Cone
New Cone
Posts: 2
Joined: 01 Nov 2008 20:29
VLC version: 0.9.4
Operating System: Windows
Location: Colorado, USA

Re: Screen saver & power saving killed by VLC

Postby Alan Baxter » 01 Nov 2008 20:40

Still using 0.9.4, but I did notice something wierd. You can re-enable your monitor power settings if you also set a screensaver. Also, monitor power settings work properly after VLC is used if a screensaver is on.

So, just a run down of what I found (to make things clear):

1) Monitor set to power off after x period of time, but no screensaver set. Using VLC will disable monitor power saving. Power settings for monitor only reset if a screensaver is activated or system rebooted.

2) Monitor set to power off after x period of time, screensaver set to activate after y period of time, where y is longer than x. Using VLC will not disable monitor power saving and the monitor will shut off normally.

I didn't conduct this scientifically (I sort of found this via a fluke), so if someone can verify this, I'm sure the VLC team would appreciate it. I'll try out a couple of other things later and post my findings here.

Using 0.9.4 with WinXP SP2.
Thank you for posting this workaround. I can verify this fixed the problem for me too. 0.9.4 with WinXP SP2 also.

Edit: But not reliably. The monitor was still in full power-on mode this morning. The screensaver wasn't on either.

KommX
New Cone
New Cone
Posts: 3
Joined: 26 Nov 2008 12:23

Re: Screen saver & power saving killed by VLC

Postby KommX » 26 Nov 2008 12:32

I also had some trouble with vlc disabling the turnoff of my monitor, so I'm glad I found this thread here.

I can confirm that vlc (version 0.9.6) disables the windows option to turn the monitor off after x Minutes when NO screensaver is set!

When I activate a screensaver (on my machine it doesn't matter if it starts before or "after" turning off the monitor), vlc does nothing wrong and my screen will turn off after using vlc. So this workaround works for me too, but still there is a bug, when no screensaver is set but the option to turn off the monitor.
I hope this bug will be found.

KommX
New Cone
New Cone
Posts: 3
Joined: 26 Nov 2008 12:23

Re: Screen saver & power saving killed by VLC

Postby KommX » 26 Nov 2008 13:59

Ok, here is the first release.
http://rapidshare.com/files/158307762/v ... e.zip.html
or
http://www.megaupload.com/?d=U0KBVYTE

I removed all old SPI_SETxxx code. Now I use sendinput with VK__none_ and hopefully it works better. VK__none_ is send once in 55 drawing events, so it shouldn't flood things. 55 was chosen because lowest screen saver time is one minute and if video FPS is 1, it won't activate (currently VLC doesn't play low FPS video at all so the value could be bigger).

Changes are made to WinGDI, DirectX and DirectX 3D output modules. There wasn't any screensaver code in OpenGL output, and I haven't tested with OpenGL.

This build has some other issues (like assert crash on shutdown sometimes) but these aren't related to screensaver changes so only report screensaver or powersaving related issues to here.
Sorry for double posting, but I wanted to make sure, that this is also read.

I tested the version above and for me (no screensaver but turn off monitor) it works well regarding this issue. It performed quite poorly but that's not the point here, I guess.

MikeRivers
New Cone
New Cone
Posts: 1
Joined: 07 Jun 2009 13:34

Re: Screen saver & power saving killed by VLC

Postby MikeRivers » 07 Jun 2009 13:38

It seems that there hasn't been a post in this tread for quite some time. I've recently started using VLC and have encountered the "monitor doesn't turn off" problem. I have what it says is the latest version, 0.9.9 Grishenko, running Windows XP Pro.

While it says the problem has been fixed, it's not fixed here. I don't use a screen saver. Is that the key to making it work?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Screen saver & power saving killed by VLC

Postby VLC_help » 07 Jun 2009 15:06

No until I rewrite the patch. Hopefully during this summer.

rldkfl
New Cone
New Cone
Posts: 1
Joined: 10 Jun 2009 06:36

Re: Screen saver & power saving killed by VLC

Postby rldkfl » 10 Jun 2009 06:50

I have same problem with VLC player, after i run and close VLC player,
monitor go blank when it is time to power off, for just a sec, then is powered again
If I go to "Power Options Properties" and change time for "Turn off monitor" feature,
problem solves, until next start of VLC player.

I reinstalled my windows XP 64bit twice( for a different reasons ).
I think problem occured after i installed some motherboard bundled utils from ASUS.
there was some power management software with this ASUS AI NAP feature.
I unistalled the ASUS programs but no change back to normal :(

I somehow don't want to reisnstall windows again :( it means another late night of boredom :(

viveklion
New Cone
New Cone
Posts: 1
Joined: 03 Dec 2009 05:08

Re: Screen saver & power saving killed by VLC

Postby viveklion » 03 Dec 2009 05:19

this soln worked for me in turning off the monitor after existing VLC 1.0.2 :twisted: :twisted:
Step1: Enable ur screen saver option and set the time greater than ur monitor turn off time.
Step2: play the vlc
Step3: turnoff VLC
Step 4: Disable ur screen saver.
:P :P
It really worked for me, don't kno whether it will work for u not report immediately if it not works.. :geek: :geek:

dailor
New Cone
New Cone
Posts: 1
Joined: 19 Sep 2010 09:48

Re: Screen saver & power saving killed by VLC

Postby dailor » 19 Sep 2010 10:18

I see that it passed almost year since last post, but this annoying "screen saver/power saving" issue still unresolved. First have to notice that I'm not so familiar with computer programming and don't know if my suggestion is realizable. What I noticed is when just "stop" playing VLC, "screen saver/power saving" works fine in XP SP3, even when shutting it down (VLC).

:idea: My suggestion is just to force VLC "stop" playing before it shuts down, if it is possible though. :roll:
In cases of unexpected exit of VLC, the issue probably still remain, but in normal terminating of program i think that could be solution.

luis
New Cone
New Cone
Posts: 2
Joined: 09 Nov 2012 15:40

Re: Screen saver & power saving killed by VLC

Postby luis » 09 Nov 2012 17:18

I don't know if the problem has been solved in the meantime, if not I have a suggestion you can try.

Use a CBT hook.

It is a type of hook created with SetWindowsHookEx(), see http://msdn.microsoft.com/en-us/library/ms644990.aspx

The following code is in PureBasic (the language I use) but it's so similar to C I'm sure you will not have any problem to understand it :)

In your hook procedure simply do this:

Code: Select all

Procedure.i Hook_DisableScreenSaver (nCode, wParam, lParam) If nCode >= 0 If nCode = #HCBT_SYSCOMMAND If wParam = #SC_SCREENSAVE Debug "#SC_SCREENSAVE blocked ... " ProcedureReturn 1 EndIf EndIf EndIf ProcedureReturn CallNextHookEx_(0, nCode, wParam, lParam) EndProcedure
Set the hook with

Code: Select all

hHook = SetWindowsHookEx_(#WH_CBT, @Hook_DisableScreenSaver(), GetModuleHandle_(0), GetCurrentThreadId_())
and remove the hook when not needed anymore with

Code: Select all

UnhookWindowsHookEx_(hHook)
If you want to prevent the power off of the monitor just use another hook for that:

Code: Select all

Procedure.i Hook_DisableMonitorPowerOff (nCode, wParam, lParam) If nCode >= 0 If nCode = #HCBT_SYSCOMMAND If wParam = #SC_MONITORPOWER Debug "#SC_MONITORPOWER blocked ... " ProcedureReturn 1 EndIf EndIf EndIf ProcedureReturn CallNextHookEx_(0, nCode, wParam, lParam) EndProcedure
This method has some advantages:

1) Does not alter system wide setting, so if your program crash the screensaver settings are not touched.

2) It disable the screensaver only when you application has the focus, if another one take foreground status the screensaver is let to do its job, if any.

3) If you choose to disable only the screensaver, this does not prevent the monitor to power off if the energy saving profile is set to do so.

Hope it helps :)

Luis

luis
New Cone
New Cone
Posts: 2
Joined: 09 Nov 2012 15:40

Re: Screen saver & power saving killed by VLC

Postby luis » 09 Nov 2012 20:36

BTW:
If SC_SCREENSAVE is posted to every program running, some loop jammed program wouldn't handle it all. That would prevent screensaver completely, so I assume there is certain very short time limit to answer to that message. And on some performance critical situations, VLC might not handle it fast enough.
Yes, the message is sent around every sec if a program replies to the first one with -1, and in that case the program must continue to reply to prevent the screensaver to start with a maximum delay of about 5 secs (if there is no keyboard/mouse activity which reset the screensaver countdown).

If the program fails to reply in that time, the screensaver starts.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 45 guests