Is there a way to prevent windows from sleeping when sharing media on network?


rezpower

Well-known member
Member
VIP
Local time
11:24 AM
Posts
401
OS
Windows
I usually have my windows power plan on "Balanced". I run software that need other plans (My DAW, and few games) with a script that will change power plan to performance and then sets the PC back to Balanced when that program is closed.
I have a VR headset that I use to access media files, located in a shared folder on my PC. Often in middle of streaming, it stops working because my PC has gone to sleep, because I forgot to change power plan before using the headset. I wonder if there is a way to prevent windows from going to sleep when it's accessed by another device on the network and is streaming media by SMB shares.?
There is an option in power plans "Multimedia settings" that is supposed to do exactly what I want. This option : "When sharing media" can be set to: "Prevent idling to sleep". But it has no effect and the PC still goes to sleep.
 

My Computer My Computer

At a glance

WindowsIntel i7-12800HX32 GB DDR5 4800 MHz dual-channelNVIDIA® GeForce RTX™ 3070 Ti
OS
Windows
Computer type
Laptop
Manufacturer/Model
Lenovo Legion 7i
CPU
Intel i7-12800HX
Memory
32 GB DDR5 4800 MHz dual-channel
Graphics Card(s)
NVIDIA® GeForce RTX™ 3070 Ti
Sound Card
Steinberg UR44
Hard Drives
1 TB SSD (M.2 NVMe PCIe 4.0 x4
2 TB SSD Samsung 980 PRO NNMe
Browser
Firefox
Antivirus
Windows Defender + Malwarebytes
FYI, I use a program called Don't sleep on any machine that I do not want to shutdown or sleep



I do this instead of managing all the different settings instead of windows itself.
 

My Computer My Computer

At a glance

W11 Pro
OS
W11 Pro
FYI, I use a program called Don't sleep on any machine that I do not want to shutdown or sleep



I do this instead of managing all the different settings instead of windows itself.
Thanks a lot for your reply. I also got this program. Again I will have to remember to run it each time I want to stream or have it always run! That's why I am looking for (if it exists) a setting in windows. For now every time I want to stream to my VR headset I change my power plan to one I created and have disabled sleep.
 

My Computer My Computer

At a glance

WindowsIntel i7-12800HX32 GB DDR5 4800 MHz dual-channelNVIDIA® GeForce RTX™ 3070 Ti
OS
Windows
Computer type
Laptop
Manufacturer/Model
Lenovo Legion 7i
CPU
Intel i7-12800HX
Memory
32 GB DDR5 4800 MHz dual-channel
Graphics Card(s)
NVIDIA® GeForce RTX™ 3070 Ti
Sound Card
Steinberg UR44
Hard Drives
1 TB SSD (M.2 NVMe PCIe 4.0 x4
2 TB SSD Samsung 980 PRO NNMe
Browser
Firefox
Antivirus
Windows Defender + Malwarebytes
Have you tried this setting in your power plan? It works for me.


Power Plan.png
 

My Computer My Computer

At a glance

Win 11 Pro 25H2Intel i7 13700KF32 GB Team Group DDR5 - 6000 CL 30ASUS TUF GAMING RTX 3070 Ti
OS
Win 11 Pro 25H2
Computer type
PC/Desktop
Manufacturer/Model
Self build
CPU
Intel i7 13700KF
Motherboard
Gigabyte Z790 UD AC
Memory
32 GB Team Group DDR5 - 6000 CL 30
Graphics Card(s)
ASUS TUF GAMING RTX 3070 Ti
Sound Card
On board Realtek
Monitor(s) Displays
ACER 34 inch
Screen Resolution
4K
Hard Drives
1 TB Samsung 980 Pro Nvme, 1 TB Samsung 970 EVO Nvme, 2 x Samsung 970 2TB SSD SATA
PSU
EVGA 1000Q
Case
Rosewill something or other
Cooling
Noctua NH-D15. A whole schwak of Noctua case fans. $$$
Keyboard
Logitech G815
Mouse
Logitech G502 Hero
Internet Speed
700 up, 600 down
Browser
Firefox
Antivirus
MalwareBytes
It is annoying, especially when I’m using Plex
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 Build 26200.8894Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz32.0 GB of I forget and the box is in storage.Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    OS
    Windows 11 Pro 25H2 Build 26200.8894
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built 2013
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    ROG SupremeFX Formula 8-Channel High Definition Audio
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Touch Screen Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list. OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / Mx Air Cordless
    Internet Speed
    2000/500Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
    TP-Link BE9300 WiFi 7 Bluetooth 5.4 (Archer TBE550E)
    TP-Link TX201 V1 2.5GB Lan

    Grandstream HT812 - VoIP
    ASUS DSL-AX82U - Mesh
    ASUS RT-AC68U - Mesh
    ASUS RT-BE88U Router

    Brother MFC-L2880DW Printer

    I’m on a horse.
  • At a glance

    Windows 11 Pro 25H2 Build 26200.8894 (Wifes)13th Generation Intel® Core™ i5-1340P Process...16GB LPDDR5-52001x Intel® Iris® Xe Graphics
    Operating System
    Windows 11 Pro 25H2 Build 26200.8894 (Wifes)
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7 14IRL8 - Type 82YL
    CPU
    13th Generation Intel® Core™ i5-1340P Processor(Core™ i5-1340P)
    Memory
    16GB LPDDR5-5200
    Graphics card(s)
    1x Intel® Iris® Xe Graphics
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512 GB SSD PCIe
    Mouse
    Logiteck MX Master 3S
    Internet Speed
    2000/500
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.


    Wireless Network: Wi-Fi 6E 2x2 AX; Bluetooth® 5.1 or above
    Ports: 1x 1 Novo button; 2 in 1 Audio Combo jack; Micro SD Card Reader; HDMI 1.4b; 2 x USB Type-C (TBT4)
    USB 3.2 Gen 2 DP 1.4a
    PD 3.0); 1 x USB 3.2 Gen1 Type A
    Camera
    1x 1080P FHD IR/RGB Hybrid with Privacy Shutter and Dual Array Microphone
    Graphics
    1x Intel® Iris® Xe Graphics
    Monitor
    14" WUXGA
    Form Factor
    Convertible Notebook
  • Windows 11 Pro 25H2 Build 26200.8894 (Wifes)

    Yoga 7 2-in-1 14IML9 - Type 83DJ

    Processor: Intel® Core™ Ultra 7 155H Processor(Core™ Ultra 7 155H)

    Memory: 32GB LPD5X-7467

    Hard Drive: 1 TB SSD PCIe

    Wireless Network: 1x Wi-Fi 6E 2x2 AX; Bluetooth® 5.1 or above

    Ports: 1 x HDMI 2.1 TMDS; 1 x Novo Button; 1 x Combo Audio Jack
    2 x USB-C (USB 4.0)
    1 x USB-A 3.2 Gen 1

    Camera: 1080P FHD IR Hybrid with Dual Microphone

    Graphics: Intel® Arc™ Graphics

    Monitor: 14" 2.8K

    ...Where's my horse?
There is an open source app called Coffee that will keep the PC awake if the network traffic is above a specified threshold. Once the network activity calms down, the PC will be allowed to sleep again.

 

My Computer My Computer

At a glance

Windows 11 Enterprise 25H2 [rev. 8893]
OS
Windows 11 Enterprise 25H2 [rev. 8893]
There is an open source app called Coffee that will keep the PC awake if the network traffic is above a specified threshold. Once the network activity calms down, the PC will be allowed to sleep again.


Thanks Mr Seymour
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 Build 26200.8894Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz32.0 GB of I forget and the box is in storage.Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    OS
    Windows 11 Pro 25H2 Build 26200.8894
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built 2013
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    ROG SupremeFX Formula 8-Channel High Definition Audio
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Touch Screen Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list. OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / Mx Air Cordless
    Internet Speed
    2000/500Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
    TP-Link BE9300 WiFi 7 Bluetooth 5.4 (Archer TBE550E)
    TP-Link TX201 V1 2.5GB Lan

    Grandstream HT812 - VoIP
    ASUS DSL-AX82U - Mesh
    ASUS RT-AC68U - Mesh
    ASUS RT-BE88U Router

    Brother MFC-L2880DW Printer

    I’m on a horse.
  • At a glance

    Windows 11 Pro 25H2 Build 26200.8894 (Wifes)13th Generation Intel® Core™ i5-1340P Process...16GB LPDDR5-52001x Intel® Iris® Xe Graphics
    Operating System
    Windows 11 Pro 25H2 Build 26200.8894 (Wifes)
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7 14IRL8 - Type 82YL
    CPU
    13th Generation Intel® Core™ i5-1340P Processor(Core™ i5-1340P)
    Memory
    16GB LPDDR5-5200
    Graphics card(s)
    1x Intel® Iris® Xe Graphics
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512 GB SSD PCIe
    Mouse
    Logiteck MX Master 3S
    Internet Speed
    2000/500
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.


    Wireless Network: Wi-Fi 6E 2x2 AX; Bluetooth® 5.1 or above
    Ports: 1x 1 Novo button; 2 in 1 Audio Combo jack; Micro SD Card Reader; HDMI 1.4b; 2 x USB Type-C (TBT4)
    USB 3.2 Gen 2 DP 1.4a
    PD 3.0); 1 x USB 3.2 Gen1 Type A
    Camera
    1x 1080P FHD IR/RGB Hybrid with Privacy Shutter and Dual Array Microphone
    Graphics
    1x Intel® Iris® Xe Graphics
    Monitor
    14" WUXGA
    Form Factor
    Convertible Notebook
  • Windows 11 Pro 25H2 Build 26200.8894 (Wifes)

    Yoga 7 2-in-1 14IML9 - Type 83DJ

    Processor: Intel® Core™ Ultra 7 155H Processor(Core™ Ultra 7 155H)

    Memory: 32GB LPD5X-7467

    Hard Drive: 1 TB SSD PCIe

    Wireless Network: 1x Wi-Fi 6E 2x2 AX; Bluetooth® 5.1 or above

    Ports: 1 x HDMI 2.1 TMDS; 1 x Novo Button; 1 x Combo Audio Jack
    2 x USB-C (USB 4.0)
    1 x USB-A 3.2 Gen 1

    Camera: 1080P FHD IR Hybrid with Dual Microphone

    Graphics: Intel® Arc™ Graphics

    Monitor: 14" 2.8K

    ...Where's my horse?
Once the network activity calms down, the PC will be allowed to sleep again.

That reminds me of when I was a kid and my parents used to hold loud Fondue parties, when the party was over I’d finally get to sleep.
One night (not bandcamp) the party was so loud from screaming I got up to see what was going on and everyone were in capes with hoods and had candles and there was what I assume was a tired person, laying on a stone slab in our lounge room. The 70’s were awesome.
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 Build 26200.8894Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz32.0 GB of I forget and the box is in storage.Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    OS
    Windows 11 Pro 25H2 Build 26200.8894
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built 2013
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    ROG SupremeFX Formula 8-Channel High Definition Audio
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Touch Screen Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list. OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / Mx Air Cordless
    Internet Speed
    2000/500Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
    TP-Link BE9300 WiFi 7 Bluetooth 5.4 (Archer TBE550E)
    TP-Link TX201 V1 2.5GB Lan

    Grandstream HT812 - VoIP
    ASUS DSL-AX82U - Mesh
    ASUS RT-AC68U - Mesh
    ASUS RT-BE88U Router

    Brother MFC-L2880DW Printer

    I’m on a horse.
  • At a glance

    Windows 11 Pro 25H2 Build 26200.8894 (Wifes)13th Generation Intel® Core™ i5-1340P Process...16GB LPDDR5-52001x Intel® Iris® Xe Graphics
    Operating System
    Windows 11 Pro 25H2 Build 26200.8894 (Wifes)
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7 14IRL8 - Type 82YL
    CPU
    13th Generation Intel® Core™ i5-1340P Processor(Core™ i5-1340P)
    Memory
    16GB LPDDR5-5200
    Graphics card(s)
    1x Intel® Iris® Xe Graphics
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512 GB SSD PCIe
    Mouse
    Logiteck MX Master 3S
    Internet Speed
    2000/500
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.


    Wireless Network: Wi-Fi 6E 2x2 AX; Bluetooth® 5.1 or above
    Ports: 1x 1 Novo button; 2 in 1 Audio Combo jack; Micro SD Card Reader; HDMI 1.4b; 2 x USB Type-C (TBT4)
    USB 3.2 Gen 2 DP 1.4a
    PD 3.0); 1 x USB 3.2 Gen1 Type A
    Camera
    1x 1080P FHD IR/RGB Hybrid with Privacy Shutter and Dual Array Microphone
    Graphics
    1x Intel® Iris® Xe Graphics
    Monitor
    14" WUXGA
    Form Factor
    Convertible Notebook
  • Windows 11 Pro 25H2 Build 26200.8894 (Wifes)

    Yoga 7 2-in-1 14IML9 - Type 83DJ

    Processor: Intel® Core™ Ultra 7 155H Processor(Core™ Ultra 7 155H)

    Memory: 32GB LPD5X-7467

    Hard Drive: 1 TB SSD PCIe

    Wireless Network: 1x Wi-Fi 6E 2x2 AX; Bluetooth® 5.1 or above

    Ports: 1 x HDMI 2.1 TMDS; 1 x Novo Button; 1 x Combo Audio Jack
    2 x USB-C (USB 4.0)
    1 x USB-A 3.2 Gen 1

    Camera: 1080P FHD IR Hybrid with Dual Microphone

    Graphics: Intel® Arc™ Graphics

    Monitor: 14" 2.8K

    ...Where's my horse?
It is annoying, especially when I’m using Plex
Well this is not really a problem as it can be solved with a small script. I don't use plex but I use a similar app called emby. This is how I run my emby server. First I created a copy of balanced power profile and I set it to not go to sleep.

Then I made a bat file with this content:

@echo off
for /f "tokens=4 delims= " %%f in ('powercfg /getactivescheme') do (
set ACTIVE_SCHEME=%%f
)

powercfg /setactive 62a1340d-2a81-4ed5-9915-799c7a37315c
"D:\Emby\Emby\system\EmbyServer.exe"
powercfg /setactive %ACTIVE_SCHEME%


You simply replace the path to Emby with the path to plex and also put your own power profile id. As soon as you close plex the script will set your pc back to the original power profile.
 

My Computer My Computer

At a glance

WindowsIntel i7-12800HX32 GB DDR5 4800 MHz dual-channelNVIDIA® GeForce RTX™ 3070 Ti
OS
Windows
Computer type
Laptop
Manufacturer/Model
Lenovo Legion 7i
CPU
Intel i7-12800HX
Memory
32 GB DDR5 4800 MHz dual-channel
Graphics Card(s)
NVIDIA® GeForce RTX™ 3070 Ti
Sound Card
Steinberg UR44
Hard Drives
1 TB SSD (M.2 NVMe PCIe 4.0 x4
2 TB SSD Samsung 980 PRO NNMe
Browser
Firefox
Antivirus
Windows Defender + Malwarebytes
I would simply turn off sleep mode (never sleep).

1727979726544.png

I am on Windows 7. Windows 10/11 has a similar setup.
 

My Computer My Computer

At a glance

Windows 7/11Intel i7-11800H32GB DDR4 3200MHzNVIDIA GeForce RTX 3070
OS
Windows 7/11
Computer type
PC/Desktop
Manufacturer/Model
HP/Lenovo/Asus
CPU
Intel i7-11800H
Motherboard
Lenovo Legion 5i Pro Gen 6
Memory
32GB DDR4 3200MHz
Graphics Card(s)
NVIDIA GeForce RTX 3070
Monitor(s) Displays
LG 35WN65C-B
Screen Resolution
3440 x 1440
Hard Drives
1TB PCIe SSD
Other Info
Edition Windows 11 Pro
Version 25H2
Installed on ‎12/‎12/‎2025
OS build 26200.7462
Back
Top Bottom