How to keep Wi-Fi from disconnecting when the screen is locked

Modern smartphones and tablets are designed to maximize battery life, often at the expense of background processes. Users often encounter situations where the active internet connection is lost immediately after the device enters sleep mode. This results in files not downloading completely, delayed messages in instant messaging apps, and smart devices losing connection to the server.

The main reason lies in the aggressive policy energy saving, implemented by operating system manufacturers. Android and iOS strive to minimize the radio module's power consumption, assuming that when the screen is off, the user doesn't need a constant data stream. However, for the stable operation of background services, cloud synchronization, and IoT devices, it is necessary to forcefully change this default system behavior.

In this article, we'll explore the technical aspects of how the Wi-Fi module operates in sleep mode and provide step-by-step instructions for various operating system versions. You'll learn which settings need to be changed to compound remained stable 24 hours a day, and why standard menus can hide the options you need.

Reasons why the connection is lost in sleep mode

The fundamental problem is how the operating system manages state radio moduleWhen the device goes into sleep mode (the screen goes dark), the system puts the processor and peripherals into a low-power mode. The Wi-Fi adapter also enters DRX (Discontinuous Reception) mode, waking up only at certain intervals to check for incoming packets.

If there is no active data transfer at this point, optimization algorithms may decide to completely power down the module or terminate the connection to the access point to save battery life. This behavior is especially aggressive on devices with unstable signal or when strict power saving modes are enabled.

Furthermore, skin makers (MIUI, OneUI, ColorOS) often add their own memory and network management layers. They may perceive background Wi-Fi activity as malicious or excessive if the app isn't marked as system-critical. This means that even with Wi-Fi enabled in the settings, the physical connection to the router remains. interrupted after a few minutes of inactivity.

Setting up Wi-Fi on Android: Basic Settings

In classic versions of Android and many modern skins, there's a direct setting for how the module behaves during sleep. However, Google constantly changes the location of this setting, and in newer versions of Android (10 and above), it's often hidden or removed in favor of automatic control.

First, it's worth checking the standard settings menu. Go to Settings → Connections → Wi-FiOn some devices, you may need to tap the three dots in the corner of the screen or select "More." Find the "Advanced settings" or "Additional features" section.

This may be an option called "Wi-Fi in sleep mode" or "Keep Wi-Fi on during sleep." The menu will offer three options:

  • 🟢 Always — the module runs continuously, even when the screen is off.
  • 🟡 Only when connected to a charger - saves battery when running on battery power.
  • 🔴 Never - the connection is broken immediately after the screen goes dark.

Select the "Always" option. If this option is not available in the menu, it means that the manufacturer of your model Xiaomi, Samsung or Huawei concealed it by relying on its own algorithms. In this case, more in-depth configuration methods are required.

📊 How often does your Wi-Fi turn off in sleep mode?
Constantly
Sometimes
Only on older devices
Never noticed

Specifics of MIUI, OneUI, and ColorOS shells

Owners of smartphones from Chinese brands face the most aggressive optimization. MIUI shells (Xiaomi, Redmi, Poco) and ColorOS (Oppo, Realme) have built-in "process killers" that kill network activity of background applications.

For devices MIUI You need to open the "Security" app (green lightning bolt icon). Go to the "Battery" section and find the settings for specific apps. For system services and instant messaging apps that need to run constantly, set the background activity limit to "No Limits." Also, in the "Battery" menu, there's often a "Wi-Fi" toggle under "Background Connections" that needs to be enabled.

On devices Samsung The situation is similar with the OneUI shell. Go to Settings → Device Care → Battery → Background Usage LimitMake sure the apps you want to use aren't listed under "Sleep" or "Deep Sleep." Additionally, in the Developer Options menu, you might find an option called "Suspend background activities" that should be disabled.

⚠️ Note: Shell interfaces may vary depending on the Android version and regional firmware. If you don't find the described options, check the official user manual for your specific model for the current paths, as manufacturers frequently change the menu structure.

Using Developer Mode to Force Enable

If the default settings don't help, you can use the hidden developer menu. This method works on most Android devices and allows you to forcefully prevent the system from disabling Wi-Fi.

First, you need to enable developer mode. Go to Settings → About phone → Software informationFind "Build number" and quickly tap it seven times in a row. The system will notify you that you've become a developer. After this, a new "Developer options" section will appear in the main settings menu.

Within this menu, scroll down to the "Network" or "Internet" section. Find the "Keep Wi-Fi on during sleep" option. Set the switch to "On" or select "Always." This action has the highest priority and overrides power saving settings.

☑️ Check developer settings

Completed: 0 / 1

It's worth noting that using Developer Mode requires caution. Changing other settings in this menu may result in system instability or rapid battery drain. Only change settings that are relevant to your current task.

Power Saving Settings on iOS (iPhone and iPad)

In the ecosystem Apple The energy management philosophy is different. There's no direct "keep Wi-Fi on" toggle, as iOS manages this process automatically. However, there are settings that affect background activity.

The first thing to check is the Low Data Mode. Go to Settings → Wi-Fi, click the "i" icon next to your network, and make sure the "Data Saver Mode" toggle is off. If it's on, the system will limit background updates and may interrupt your connection.

The second important aspect is background content refresh. Go to Settings → General → Content UpdateMake sure that Wi-Fi updates are enabled for the required apps. Also check the settings in the section Settings → Cellular, scroll down and make sure that important apps are not blocked from using data (although this applies more to the mobile network, it affects the overall logic of the apps).

Parameter Standard behavior Recommended value Impact on battery
Wi-Fi in sleep mode Automatically Always High
Background update Included Enabled (for important) Average
Data saving mode Turned off Turned off Low
Network scanning Included Disabled (under development) Average
Why does iOS control Wi-Fi so strictly?

Apple uses sophisticated machine learning algorithms that analyze your habits. If you don't typically use the internet at night, the system will automatically disable the module, even if you've disabled it in settings, to conserve battery. There's no way to completely bypass this without jailbreaking.

Additional measures and work with the router

Sometimes the problem isn't with your phone, but with the router's settings. Some access points have a "Wi-Fi Scheduler" or "Eco Mode" feature that turns off the radio at a certain time or when there's no active data transfer for a set period of time.

Go to your router's web interface (usually the address 192.168.0.1 or 192.168.1.1). In the Wireless section, look for the "Beacon Interval" or "DTIM Period" settings. Changing these settings can help the device better sync with the router in sleep mode.

It's also worth paying attention to the frequency range. Network 2.4 GHz It has better penetration and often maintains a more stable connection over distance than 5 GHz, although it's slower. If your phone constantly loses Wi-Fi in another room, try switching to 2.4 GHz.

Frequently Asked Questions (FAQ)

Why did Wi-Fi settings disappear after an Android update?

Google and device manufacturers are constantly changing the menu structure. In newer versions of Android (11, 12, 13, 14), the direct toggle is often removed, as the system tries to keep Wi-Fi on by default unless strict power saving mode is enabled. If the settings are missing, use the developer menu.

Does the battery drain significantly if Wi-Fi is on all the time?

Yes, the difference is noticeable. Constant radio operation and packet exchange with the router can increase battery drain by 10-15% per day. However, for modern batteries, this isn't considered critical.

Can a virus disable Wi-Fi?

While malware can theoretically change system settings, most often the cause of Wi-Fi shutdown is built-in optimization features (memory cleaners) that mistakenly identify background traffic as a threat or unnecessary load.

What should I do if Wi-Fi only turns off in a specific app?

In this case, the issue isn't with global network settings, but with the permissions of a specific app. Go to battery settings, find the app, and remove all restrictions on background activity and auto-start.

Will resetting network settings help?

Reset network settings (Settings → System → Reset → Reset network settings) removes saved Wi-Fi passwords and Bluetooth settings, but often resolves issues with software driver conflicts that could cause the module to behave incorrectly.