Skip to content

How Do You Fix a VPN That Disconnects Every Time the Screen Locks?

A locked screen often means power saving, paused apps and a sleeping network card. See why that cuts a VPN and what to change on each device.

10 min readUpdated Nov 25, 2026By XPASS Editorial Team

How Do You Fix a VPN That Disconnects Every Time the Screen Locks?

You connect the VPN, lock the screen to put the phone or laptop down for a few minutes, and when you wake it the tunnel is gone. The app says disconnected, or worse, it still says connected while nothing loads. It happens often enough that it feels like a rule: lock the screen and the VPN dies.

The good news is that this is rarely a mystery fault. Locking the screen is usually the first step into a power-saving state, and power saving is where devices pause apps and switch off radios. This article explains what changes at that moment, how to confirm it is the cause, and the generic steps for Windows, Mac, Android and iPhone. It focuses on the screen-lock trigger. For the wider case of a laptop going to sleep, see VPN won't reconnect after sleep mode.

What actually happens when the screen locks

A locked screen is not one event. It is the start of a chain, and different devices follow different parts of it.

  1. The display turns off. This saves power but does not itself cut the network.
  2. Background apps are limited. Phones in particular reduce what an app may do when you are not looking at it. An app may be frozen, or allowed to run only in short windows.
  3. The radio enters a low-power state. Wi-Fi and mobile data chips use less power when idle. On some devices they wake only now and then to check for incoming data.
  4. The device may go to sleep. On a laptop, a locked screen can be followed quickly by sleep, depending on your power plan.
  5. The network may forget you. Some routers and public networks drop devices that have been silent for a while.

A VPN tunnel is a live conversation between your device and a server. Both sides send small keep-alive messages so that each knows the other is still there. If the app is frozen or the radio is napping, those messages stop. After a quiet spell, the server may remove the session, and your device may or may not notice. The result is either a clean "disconnected" message or a stale tunnel that looks connected but carries nothing.

Confirm that the lock is the trigger

Before changing settings, spend two minutes on a test so you fix the right thing.

  1. Connect the VPN and open a page to prove it works.
  2. Lock the screen and leave the device alone for the time it usually fails, for example two minutes.
  3. Unlock and look at the VPN app straight away. Note whether it says disconnected, connecting or connected.
  4. Open a page. If the app says connected but the page fails, the tunnel went stale while the device was idle.
  5. Repeat on the same Wi-Fi with a different network, such as mobile data, to see if the router is the cause.
  6. Repeat once with the device plugged in. If it behaves better on power, battery saving is involved.

Two results are especially useful. If the problem only appears on battery, power saving is the main suspect. If it appears on one Wi-Fi network but not on mobile data or another Wi-Fi, the network is dropping idle devices and you should try a different network or mobile data.

Android: battery optimisation and background limits

Android phones are the most common place to see this, because each maker adds its own battery manager on top of the standard system. Names differ between brands and versions, so use the wording below as a guide and look for similar labels.

  1. Open Settings and find the list of apps. Choose VPNclient.
  2. Open its battery settings. Look for options named battery optimisation, app battery usage or background usage.
  3. Choose the setting that allows background activity, often labelled unrestricted or not optimised. Avoid optimised or restricted for this app.
  4. Check whether your phone has a separate "sleeping apps", "deep sleeping apps" or "auto-start" list, and make sure the VPN app is not on it.
  5. Turn off battery saver or ultra power saving while you test. These modes tighten background limits further.
  6. If your phone has an adaptive battery feature, read Android adaptive battery and your VPN session for the details.

Also check the screen-lock side: a very short screen timeout means the phone enters low-power states sooner. Android also has a system option for an always-on VPN in some versions, which asks the system to keep the connection up. Availability and wording depend on the phone and whether the app supports it, so look in the VPN section of Settings rather than assuming. The Android Help page on connecting to a VPN explains where the VPN settings live on a standard Android build.

iPhone: Low Power Mode, background refresh and Auto-Lock

On iPhone the system manages background activity tightly, and the VPN is a system-level service rather than a normal app window. Even so, power settings can affect how reliably a connection survives a lock.

  1. Turn off Low Power Mode while you test. It reduces background activity and can make a connection less steady. The full discussion is in iPhone VPN and Low Power Mode.
  2. Check Background App Refresh in Settings under General. Make sure it is enabled for the VPN app, if the setting is available on your version.
  3. Review Auto-Lock under Display and Brightness. A very short time locks the phone quickly, which can make the pattern easier to see, although locking alone does not always cut a VPN.
  4. Reconnect after unlock. Open the app, tap the connect button and confirm the status before relying on it.
  5. Watch for the switch between Wi-Fi and mobile data. An iPhone often changes networks while locked, and a change of network can drop a tunnel even if the lock was not the cause.

If the VPN was set up with the iPhone prompt that asks to add VPN configurations, that approval stays in place. A disconnect after lock is a connection problem, not a missing permission.

Windows: sleep, Modern Standby and network card power saving

On a Windows laptop, locking the screen (Windows key plus L) does not by itself disconnect anything, but it often goes hand in hand with the display turning off and then sleep. These are the settings to check, keeping in mind that menu names change between Windows versions.

  1. Open Settings, then System, then Power or Power and battery. Look at the screen and sleep timers for both battery and plugged in. Set sleep to a longer time or Never while you test.
  2. Switch the power mode to Balanced or Best performance if it is on a power-saving mode.
  3. Open Device Manager, expand Network adapters, and open the properties of your Wi-Fi adapter. On the Power Management tab, clear the option that lets the computer turn off the device to save power. Not every adapter has this tab.
  4. Check the Wi-Fi adapter's advanced properties for power saving entries and leave them at the default or highest performance.
  5. Keep the Windows firewall or security software from blocking the app. If the VPN disconnects with an error rather than silently, also check that your firewall or security software is not blocking the app.
  6. After waking, wait until Wi-Fi shows connected before you press the VPN connect button.

The Microsoft Support page on connecting to a VPN in Windows covers the system-side settings for built-in connections. VPNclient is its own app, so the power and network-card advice above is the part that applies to it.

Mac: display sleep versus system sleep

On a Mac, the screen going dark and the Mac sleeping are separate. Locking the screen or letting the display sleep does not have to stop the network, while the whole Mac sleeping does. The Mac app is a standalone app that installs through its own installer, and it does not use macOS VPN configurations, so you will not find it in the system VPN list in Settings. Use the app itself to check the connection.

  1. Open System Settings and find the battery or energy settings.
  2. Find the option about preventing the Mac from sleeping automatically when the display is off. It may be offered while on the power adapter, and its wording varies between macOS versions.
  3. If you want the VPN to stay up, turn that option on while connected to power, and accept that the Mac will use more power.
  4. Check any battery option named something like low power mode, and turn it off for the test.
  5. Remember that closing the lid is different. It puts the Mac to sleep in most setups. See Mac VPN after closing the lid.
  6. After waking, let Wi-Fi reconnect, then open the VPN app and check the status.

If you cannot change sleep behaviour, disconnect the VPN before you leave the Mac and connect again when you return. It is a small habit with a reliable result.

A quick comparison

Device Common trigger First setting to try Habit that helps
Android Battery optimisation, sleeping apps App battery set to unrestricted Turn off battery saver while testing
iPhone Low Power Mode, network switch Turn off Low Power Mode Reconnect after unlock
Windows Sleep, adapter power saving Longer sleep timer, adapter power option Wait for Wi-Fi before connecting
Mac System sleep, low power mode Prevent sleep when display is off Disconnect before leaving

A plain example

Mina uses a Windows laptop at a cafe. She connects the VPN, locks the screen with Windows plus L, and goes to order a coffee. Ten minutes later she returns, unlocks, and the app says connected but no page loads. On battery, her laptop had put the Wi-Fi adapter into power saving and the screen-off timer had put the system to sleep after five minutes.

She changes two things. She sets the sleep timer on battery to a longer time and clears the option that lets the computer turn off the Wi-Fi adapter. She then runs her test again: lock for ten minutes, unlock, check. This time the page loads. When she is on a long train ride and wants to save battery, she goes back to the shorter timer and simply disconnects and reconnects the VPN when she returns. The point is that she tested one change at a time and knew which one worked.

Limits and what to watch for

  • Settings can be reset. Phone updates and battery managers sometimes restore defaults. If the problem returns after an update, check the settings again.
  • Longer awake time costs battery. Keeping a device from napping uses more power. Use the change when you need the connection, not forever.
  • The network may be the cause. Some public Wi-Fi networks drop idle devices regardless of your settings. A VPN cannot fix that, and a different network or mobile data may be the answer.
  • A stale tunnel is a safety question. If the VPN drops silently, traffic may travel without it for a moment. Check the app status after unlocking before you open anything sensitive.
  • Sleeping is not always a bug. A device that is powered down cannot hold a connection. Reconnecting after unlock is a normal part of life with any VPN.
  • Not every cause is power. An expired pass, wrong login details or a blocked app produce disconnects too. Check My Pass for the pass status and the username and password.
  • No fix is guaranteed. Phone makers and operating systems change their rules, so treat these steps as likely causes and test them on your own device.

If you have worked through the settings and the tunnel still falls over at regular intervals regardless of the lock, read how to reconnect when the VPN disconnects and gather the details support will ask for: device and system version, the Wi-Fi or mobile network, how long it took to fail and whether it was on battery.

Summary

A VPN that disconnects when the screen locks is usually reacting to power saving: paused apps, napping radios or a device that has gone to sleep. Test first so you know the lock is the trigger, then change one setting at a time. On Android, set the app to unrestricted battery use. On iPhone, turn off Low Power Mode and reconnect after unlock. On Windows, lengthen sleep and stop the adapter from powering down. On a Mac, prevent sleep when the display is off, or disconnect before leaving. If you want a pass you can use with these steps on your own devices, you can look at the options on the XPASS pricing page.

Frequently asked questions

Why does my VPN disconnect when I lock the screen?

Locking the screen often triggers power saving. The device may pause background apps, put the Wi-Fi or mobile radio into a low-power state, or go to sleep. A VPN needs a steady stream of small messages to stay alive, so when the app or the network card is paused the tunnel goes quiet and can be dropped.

Is it a fault in the VPN app?

Usually not. The same behaviour affects many apps that need a long-lived connection. The cause is most often a battery or power setting on the device, or a Wi-Fi network that forgets idle devices. Changing those settings or reconnecting after unlock normally helps.

Which setting should I change first on Android?

Open the battery settings for the VPN app and set it to unrestricted or not optimised, if your phone offers that option. Names differ between phone makers, so look for wording such as battery optimisation, background usage or app battery management.

Will turning off sleep on my laptop fix it?

It can, if the VPN drops because the laptop sleeps. A longer screen timeout or turning off the network card power saving often keeps the tunnel up. The trade-off is higher battery use, so apply it when you are plugged in or know you need the connection.

What if the VPN still drops after I change these settings?

Test with the VPN off to see whether the Wi-Fi itself drops when the screen locks. Then check that your pass is still valid on My Pass and that you are using the VPN username and password shown there. If it continues, contact support with the device, the time and what you saw.

About the author

Bob Kanokphon Thongdee, founder of XPASS VPN

Bob Kanokphon Thongdee

  • Founder of XPASS VPN
  • Co-founder of eSIMonline.asia
  • More than 7 years in online marketing
  • Founder of Cojourney Visa and Cojourney Travel

Need a VPN for a short trip or a busy month?

XPASS sells prepaid passes for a set number of days. You pay once and nothing renews automatically.

See passes

Keep reading

Troubleshooting

VPN Won't Reconnect After Sleep Mode

Why a VPN tunnel dies while your device sleeps, how to tell a stale connection from a real fault, and the exact steps to get it back on every wake-up.

9 min read

Device Guides

Can Adaptive Battery Settings Interrupt an Android VPN Session?

Adaptive Battery learns which apps you rarely open and limits their background work. Here is how that can affect a VPN session on Android, and how to check it safely.

10 min read

Device Guides

Why Does an iPhone VPN Disconnect When Low Power Mode Turns On?

Low Power Mode trims background activity, and a VPN tunnel lives partly in the background. Learn what you may notice, how to test it, and what to change.

10 min read