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

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.
VLCFanNumber1
Blank Cone
Blank Cone
Posts: 58
Joined: 19 May 2014 19:30

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

Postby VLCFanNumber1 » 29 Jan 2021 07:05

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 :?

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

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

Postby Hitchhiker » 30 Jan 2021 12:05

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.

VLCFanNumber1
Blank Cone
Blank Cone
Posts: 58
Joined: 19 May 2014 19:30

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

Postby VLCFanNumber1 » 30 Jan 2021 17:07

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.

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

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

Postby Hitchhiker » 31 Jan 2021 13:01

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.

VLCFanNumber1
Blank Cone
Blank Cone
Posts: 58
Joined: 19 May 2014 19:30

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

Postby VLCFanNumber1 » 31 Jan 2021 15:26

My PC has a wired network connection.

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

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

Postby Hitchhiker » 31 Jan 2021 16:56

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


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 49 guests