On a Windows laptop, set the lid-close action to Do nothing while the computer is Plugged in. This prevents the configured lid action from putting the laptop to sleep when you close it; it does not guarantee network continuity or prevent every interruption to an OBS stream.
The battery setting is separate, and the Windows route is not a Mac setting. First establish that closing the lid is what coincides with the interruption, then change only the relevant power behaviour and test it without assuming that YouTube will display or recover in a particular way after a disconnect.
Check whether the lid is the trigger
A laptop may be configured to sleep when its lid closes. Microsoft notes that many PCs, particularly laptops and tablets, go to sleep when the lid is closed or the power button is pressed. If OBS is running on a sleeping computer, it cannot continue its normal encoding and network work during that sleep. That is a practical explanation for a stream that stops around lid closure, not a claim about the exact status YouTube will show.
Look for a repeatable connection between closing the lid and the interruption. If you have been running OBS with the lid open and the stream appears to stop shortly after you shut it, the lid action is a sensible first setting to check. Keep other changes to a minimum while testing: changing the power plan, network, OBS output and video all at once makes it harder to find the cause.
If the stream stopped at another time, or closing the lid did not consistently precede the problem, do not assume the lid setting will solve it. A lost connection, depleted battery, shutdown, OBS error or other system issue can interrupt a broadcast independently. For a broader recovery plan, see how to back up a 24/7 YouTube channel’s files, keys and metadata.
Open Control Panel Power Options
On Windows, use the Control Panel route: Control Panel > System and Security > Power Options > Choose what closing the lid does. In the resulting page, find the row labelled When I close the lid. Windows shows separate choices for On battery and Plugged in.
The exact appearance can vary with the Windows version and device, but the setting is part of the power controls rather than an OBS setting. Microsoft’s guidance on shutting down, sleeping or hibernating a PC covers the behaviour behind this choice. If you cannot find the option, search Windows for Control Panel, open it, and follow the named sections rather than looking in OBS.
Some work or school laptops may be managed by an organisation, and settings can also differ by manufacturer or power plan. If the control is unavailable or greyed out, avoid treating a registry tweak or third-party utility as the obvious next step. Check with whoever manages the computer, or use the laptop manufacturer’s support guidance for the specific model.
Set the plugged-in action to Do nothing
For a stream that is intended to run from mains power, find the Plugged in column in the When I close the lid row and select Do nothing. Then select Save changes. This tells Windows not to take its configured lid-close action when the laptop is connected to power.
The distinction matters: changing On battery alone does not change what happens while plugged in, and changing Plugged in does not necessarily change what happens on battery. Confirm the selection in the correct column before leaving the page. If Windows displays a different set of available actions, choose Do nothing for the plugged-in state if offered, and save it.
This setting addresses one particular event: the lid closing while the laptop is plugged in. It does not make the computer immune to a low-battery condition, a system shutdown, a crash, an internet outage or a problem inside OBS. It also does not specify what YouTube will display if the connection drops. For a setup using a monitor as well, Microsoft describes the same general use of a laptop with its lid closed in its closed-laptop external-monitor guidance.
Change the battery action only if you need it
The On battery choice is independent. Leave it unchanged if you plan to stream only when the laptop is connected to its charger. That is usually the simpler arrangement for a long-running broadcast: the plugged-in behaviour is clear, and you avoid asking a battery to power an extended session.
Change the battery action to Do nothing only if you deliberately want the computer to remain awake after lid closure while it is running on battery. Consider what happens if the charger is disconnected without you noticing. The laptop may keep running until its battery is depleted, at which point the stream can be interrupted. A setting that prevents lid-triggered sleep does not provide extra power.
| State when the lid closes | Setting to consider | Practical implication |
|---|---|---|
| Connected to power | Plugged in: Do nothing | Avoids the configured lid-close sleep action in this state. |
| Running on battery, with no need to stream | Keep the existing On battery action | Avoids changing behaviour you do not need for the broadcast. |
| Running on battery, with a deliberate need to continue | On battery: Do nothing, if available | The laptop stays subject to battery limits and may stop when power runs out. |
These are separate power states, not two names for the same switch. After saving, read both columns once so you know what will happen if the charger is removed. If you are streaming a long event, treat battery operation as a contingency rather than as a substitute for a reliable power connection.
Keep the laptop connected to power
Connect the charger before starting a long stream and check that Windows recognises the laptop as plugged in. If the power lead is loose, the wall socket is switched off, or the charger is not supplying power, the computer may move into its battery behaviour without an obvious warning from the lid setting itself. Keep the cable positioned so it is unlikely to be pulled loose as you close or move the lid.
Power management can have other controls beyond the lid action. The screen turning off is not necessarily the same as the computer sleeping, and closing the lid with Do nothing does not prevent every power-related event. If you use a custom power plan, check that it is the plan active during the stream and that its sleep choices match your needs. Do not disable unrelated protections simply because they sound as if they might help.
A laptop that remains awake also continues to do work while the lid is closed. Make sure its vents are not blocked by a surface or case, and do not put it somewhere it cannot dissipate heat. This is ordinary equipment care, not a promise that a particular device will remain cool or operate without interruption. If a machine becomes unusually hot or unstable, stop and investigate rather than leaving it unattended for a long broadcast.
Confirm OBS is live before closing the lid
Before the lid goes down, confirm that OBS is actually sending the intended stream. Check the OBS preview and streaming status, and verify the broadcast from YouTube’s interface or another device if practical. Start the stream only after the file, audio and scene are ready. A useful preparation checklist is included in how to run a continuous YouTube stream of Tamil church worship videos with OBS.
Once the live picture and sound look right, close the lid gently and leave the charger connected. If you can monitor from a phone or another computer, do so for the first test. A remote check can tell you that the picture still appears to be updating, but it cannot tell you that every part of the laptop is healthy or that the stream will continue indefinitely.
Do not use one successful lid-close test as proof that future sessions cannot fail. It only indicates that, under those conditions, closing the lid did not appear to trigger the interruption. For a planned unattended channel, keep the video source and recovery materials organised; a playlist-file workflow for a 24/7 YouTube music stream can help you prepare the content independently of the laptop’s lid setting.
Treat other causes as separate checks
If the stream still stops, open the laptop and inspect what happened before changing more settings. Did Windows wake to a sign-in screen, appear to have shut down, or remain active with OBS open? Did the charger come loose? Is the network still connected? These observations help separate sleep from power, system, application and connection problems. They do not by themselves prove which component caused a particular interruption.
Check OBS for a visible error or a changed streaming state. Confirm that the intended scene and media source are still active, and that the computer has not lost access to the file it is playing. If you are using a local looping workflow, the guide to looping a 4K 60fps video to YouTube Live with FFmpeg covers a different way to prepare repeated content; it is not a fix for Windows sleep or network loss.
If the laptop stayed awake but the stream is no longer reaching YouTube, investigate the network and OBS connection separately. A Wi-Fi drop, router restart or broadband interruption is not controlled by the lid action. Do not infer from this setting what YouTube will show viewers after a disconnect or whether the broadcast will resume in a specific way. Check the current official YouTube help information for the account and stream workflow you use.
For channels where the computer itself is the recurring source of overnight attention, a hosted workflow may remove the need to keep that particular laptop awake and available. StreamNeo takes an uploaded video and runs it as a YouTube live stream, so you do not have to keep OBS running on your own computer for that file-based broadcast; you still need to prepare the channel and verify the result. It is YouTube-only, and it does not change what happens if a viewer-side or platform-side connection is interrupted.
Mac laptops use different controls
Do not apply the Windows Control Panel route to a Mac. Apple documents closed-lid use with an external display for supported configurations; its instructions call for the Mac to be connected to power and used with an external keyboard and mouse. The exact requirements depend on the Mac model and configuration. Read Apple’s external-display guidance for the equipment and arrangements relevant to your Mac before planning to stream with its display closed.
macOS also has sleep and wake settings for applicable configurations, including a control related to preventing automatic sleep when the display is off while using a power adapter. Apple notes that available settings may vary by Mac. Do not treat that control as a universal override for closed-lid behaviour on every model. The relevant Apple guide to sleep and wake settings is the place to check what your system supports.
If you need the Mac’s internal display shut while continuing a broadcast, establish that the model supports the configuration and follow the accessory and power requirements. If that arrangement is not supported or is inconvenient, leaving the lid open is a more straightforward test than borrowing Windows instructions. As with Windows, a sleep setting concerns the computer’s behaviour; it cannot guarantee network continuity or determine what YouTube displays after a disconnect.
Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.
FAQ
Will setting Plugged in to Do nothing keep OBS live?
It prevents Windows from taking its configured lid-close action while the computer is plugged in. That can avoid lid-triggered sleep, but it cannot guarantee that OBS, the network, power supply or YouTube connection will remain uninterrupted.
Do I need to change the On battery setting too?
No, not if you intend to stream with the laptop connected to power. The battery choice is separate; change it only if you deliberately need the laptop to remain awake after lid closure while on battery, and account for the battery eventually running out.
What if the stream stops even after I change the setting?
Open the laptop and check whether it slept, shut down, lost power, lost its network connection or showed an OBS error. The lid setting addresses only the lid-triggered power action, so investigate those other causes separately rather than assuming it controls YouTube’s response to a disconnect.
Does this Windows method apply to a MacBook?
No. Mac closed-lid use has different model and accessory requirements. Check Apple’s current guidance for your Mac and any external display, power and input devices you plan to use.