Page 1 of 1

How to prevent Windows from sleeping during VLC service video playback ?

Posted: 29 Jan 2021 07:05
by VLCFanNumber1
Hello,

I launched the VLC Service :
"C:\Program Files (x86)\VLC\vlc.exe" -I ntservice --ntservice-install --ntservice-extraintf=http --video-on-top

Then I used a smartphone app called "VLC Remote" to launch videos remotely.

The problem is that the PC sleeps during VLC playback. How can I fix this ?

I have noticed that when I launch a video directly from the PC, it does not sleep, but when I launch it from the app, it does. I have noticed that a remote vlc launch is not a normal window, it has a minimalistic GUI with no icons & no menus and has the window title "VLC (DirectD9 output)".

I have the feeling that I must add a parameter to the VLC Service Command Line to prevent it from sleeping during playback (something like "--DontSleepDuringPlayback").

Please help.

EDIT : I added the parameter "--disable-screensaver" (as mentionned here https://wiki.videolan.org/VLC_command-line_help/) but it has no effect :?

Re: How to prevent Windows from sleeping during VLC service video playback ?

Posted: 30 Jan 2021 12:05
by Hitchhiker
It might be due to a power management problem. To check do the following.

  1. On you PC / laptop right click the Start button and go to Device Manager.
  2. Expand the tree to Network adapters and then right click your WiFi adapter and go to Properties.
  3. Click the Power Management tab.
  4. Remove the checkmark from "Allow the computer to turn off this device to save power".
  5. Click Apply / OK to exit.
If that doesn't help:
  • Right click the Start button again and go to Power Options.
  • To the right of your current power plan click the link to "Change plan settings".
  • Change the options for "Turn off the display" to 10 minutes and "Put the computer to sleep" to 2hrs.
  • Click Save Changes to exit.
If the problem persists in spite of the above.
  • Repeat steps 1 & 2 in the Power Options menu and then click the link to "Change advanced power settings".
  • Expand "Hard Disk" | "Turn of hard disk after" and for "On battery" change it to "15 minutes" and for "Plugged in" to "120 minutes".
  • Scroll down and expand "Wireless Adapter Settings"
  • Change "Power Saving Mode" and for "On battery" set it to "Maximum Power Saving" and "Plugged In" to "Maximum Performance".
  • Click Apply / OK to exit
There are other settings in the same menu you can try if all three fail to resolve the problem.

Re: How to prevent Windows from sleeping during VLC service video playback ?

Posted: 30 Jan 2021 17:07
by VLCFanNumber1
Hitchhiker, thanks a lot for your help. Unfortunately it doesn't have anything to do with my Windows powersaving settings because like I said, when I launch VLC normally, my PC doesn't sleep during video playback. The PC sleeps only when a video is launched through the VLC service. I think the bug is that VLC ignores the "--disable-screensaver" parameter.

Re: How to prevent Windows from sleeping during VLC service video playback ?

Posted: 31 Jan 2021 13:01
by Hitchhiker
Hitchhiker, thanks a lot for your help. Unfortunately it doesn't have anything to do with my Windows powersaving settings because like I said, when I launch VLC normally, my PC doesn't sleep during video playback. The PC sleeps only when a video is launched through the VLC service. I think the bug is that VLC ignores the "--disable-screensaver" parameter.

I understand that, but when you're using the app on your phone to control vlc remotely you're connecting over Wifi aren't you. So the settings that manage that have a bearing.

Re: How to prevent Windows from sleeping during VLC service video playback ?

Posted: 31 Jan 2021 15:26
by VLCFanNumber1
My PC has a wired network connection.

Re: How to prevent Windows from sleeping during VLC service video playback ?

Posted: 31 Jan 2021 16:56
by Hitchhiker
My PC has a wired network connection.

You can make the same power management changes to the Ethernet adapter then.

By the way, is there any particular reason you're running the 32-bit version of vlc?

EDIT: I just read this tutorial on the subject which might be of interest to you