Keep OBS Awake During a 24/7 Lecture Stream
Streaming a lecture for 24 hours or more is a marathon, and the last thing you want is for OBS to go to sleep, freeze, or drop the stream because your computer decided to take a nap. This guide shows you how to configure your system and OBS so it stays running reliably through a multi-day broadcast, covering power settings, OBS-specific tweaks, and network stability.
What You’ll Need
- A computer that can run OBS for extended periods (adequate cooling and RAM).
- Administrator access to change power settings.
- OBS Studio installed (any recent version).
- A stable internet connection with sufficient upload bandwidth.
- Optional: a UPS (uninterruptible power supply) to handle brief power outages.
Step-by-Step
- Disable sleep and hibernation in Windows: Open Settings > System > Power & battery > Screen and sleep. Set “On battery power, sleep after” and “When plugged in, sleep after” to Never. Also go to Settings > System > Power > Additional power settings > Change plan settings > Change advanced power settings. Expand “Sleep” and set “Sleep after” to 0 (Never) for both battery and plugged in. Expand “Hard disk” and set “Turn off hard disk after” to 0 as well.
- Disable sleep on macOS (if using a Mac): Open System Settings > Battery > Options (or Energy Saver on older versions). Set “Prevent automatic sleeping on power adapter when the display is off” to Always. Also set “Turn display off on battery when inactive” to Never if you’re on battery, though for a 24/7 stream you should be plugged in.
- Disable display sleep on Linux (if applicable): Depending on your desktop environment, go to Settings > Power and set “Blank screen” and “Suspend” to Never. For a headless server, you can use
systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.targetto prevent all sleep states. - Prevent OBS from being minimized or hidden: In OBS, go to Settings > General. Under “General”, check the box for “Disable when OBS is minimized” and “Disable when OBS is not focused” — actually, you want the opposite. Ensure those options are unchecked so OBS continues rendering even when you switch to another window. Also, in the same section, uncheck “Hide cursor over source display” if you want the cursor visible, but that’s not critical.
- Set OBS to run as administrator: Right-click the OBS shortcut, select “Properties”, go to the “Compatibility” tab, and check “Run this program as an administrator”. This helps OBS maintain high priority and avoid some permission-related freezes.
- Increase OBS process priority: In OBS, go to Settings > Advanced. Under “Process Priority”, select “Above Normal” or “High”. This tells Windows to give OBS more CPU time, reducing the chance of dropped frames due to background processes.
- Configure automatic reconnection: In OBS, go to Settings > Advanced. Under “Network”, set “Bind IP” to your local IP (optional). Set “Auto-Reconnect” to Enabled and set “Auto-Reconnect Delay” to 5 seconds and “Auto-Reconnect Max Retries” to a high number like 1000. This way, if your internet blips, OBS will try to reconnect automatically.
- Use a reliable streaming server: In Settings > Stream, choose your streaming service and server. Pick a server that is geographically close and known for stability. If you’re using a custom RTMP server, ensure it’s on a stable host.
- Monitor system temperatures: For a 24/7 stream, overheating can cause shutdowns. Install a temperature monitoring tool like HWMonitor (Windows) or Core Temp. Keep CPU/GPU temps below 85°C (185°F) if possible. Ensure your cooling fans are clean and working.
- Set up a watchdog (optional but recommended): Use a simple batch script or a tool like Restart on Crash to automatically restart OBS if it crashes. For example, create a batch file that loops and starts OBS, and if OBS exits, it restarts it after 5 seconds. Run this batch file instead of OBS directly.
- Test your setup for 24 hours before the actual stream: Do a test stream to a private channel or a local recording for at least 24 hours. This will reveal any hidden sleep settings, crashes, or network issues.
- Keep the system awake with user activity simulation (if all else fails): If you have a laptop that insists on sleeping despite settings, you can use a tiny script that moves the mouse cursor every few minutes. A simple AutoHotkey script (Windows) or a Python script with pyautogui can do this. But this should be a last resort because it can interfere with your work.
Common Mistakes
- Forgetting to disable sleep on battery: Many laptops have separate settings for battery and plugged-in. If you unplug even once, the system may sleep.
- Leaving OBS minimized with “Disable when minimized” checked: This is a common OBS setting that stops rendering when you minimize, which can cause the stream to freeze or drop.
- Not configuring auto-reconnect: A single network hiccup can end the stream permanently if auto-reconnect is off.
- Ignoring Windows updates: Windows may force a restart after updates. Set active hours and disable automatic restarts, or check for updates before the stream.
- Using a Wi-Fi connection: Wi-Fi is less stable than Ethernet for long streams. A slight interference can cause disconnects.
Tips
- Use a wired Ethernet connection instead of Wi-Fi for maximum stability.
- Close unnecessary programs that might cause system load or pop-ups (e.g., browser notifications, update checkers).
- Set OBS to output to a file as well as stream (Settings > Output > Recording > Automatically remux to mp4). This gives you a local backup if the stream fails.
- If you have a second computer, consider using it to monitor the stream health (e.g., watch the stream on Twitch) so you can detect issues early without touching the streaming PC.
- For very long streams, consider using a scheduled restart of OBS every 24 hours (if your service allows) to clear memory leaks. You can use the watchdog script to restart OBS at a specific time.
Troubleshooting
If the stream drops or OBS freezes despite following the steps:
- Check if the system actually slept: Look at the Windows Event Viewer (System logs) for “Kernel-Power” events with event ID 42 or similar. If the system slept, re-check power settings.
- If OBS crashes: Look at the OBS crash log (Help > Log Files > Show Logs). The crash log will indicate the cause. Common fixes include updating GPU drivers or disabling third-party plugins.
- If the stream drops but OBS is still running: Check your network. Try pinging your router (e.g.,
ping 192.168.1.1 -t) and an external server (e.g.,ping 8.8.8.8 -t). If you see high latency or packet loss, restart your router. - If OBS says “Unable to connect” to the server: Verify your stream key is correct and that the server is not down. Try a different server.
- If the video freezes but audio continues: This is often a network issue or an encoder overload. Lower the bitrate or resolution in OBS Settings > Output > Streaming.
- If the system overheats: Immediately stop the stream, clean the fans, and improve ventilation. Consider lowering the video quality to reduce CPU/GPU load.
Frequently Asked Questions
Will OBS automatically stop if I close the lid on my laptop?
Yes, by default closing the lid triggers sleep. You must change the lid close action to “Do nothing” in Power Options (Windows) or Energy Saver settings (macOS).
Do I need to disable Windows Update entirely?
No, but you should set active hours to cover the stream time and disable automatic restarts. In Windows 11, go to Settings > Windows Update > Advanced options > Active hours.
Can I use a screensaver?
No, screensavers can interfere with OBS rendering. Set screensaver to “None” in personalization settings.
What if my internet goes down for more than a few minutes?
OBS will keep trying to reconnect if you set a high retry count. If the outage is long, you may need to manually restart the stream once the connection is back.
Is it safe to run OBS as administrator?
Yes, it’s safe for streaming purposes. It just gives OBS higher priority and access to certain system functions. It does not compromise security.
How do I know if my computer is powerful enough for a 24/7 stream?
Check the CPU and GPU usage in OBS (View > Stats). If the “Dropped Frames” is above 1% or the “CPU Usage” is consistently above 90%, you may need to lower settings or upgrade hardware.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.