· Troubleshooting · About 8 minutes

v2rayNG battery drain troubleshooting

Troubleshoot v2rayNG battery drain caused by background activity, repeated reconnects or full-device VPN routing. Find battery optimization and per-app VPN settings for popular Android phones.

At a glance

If v2rayNG disconnects when the screen is off, drains battery while idle or ranks high in battery usage, compare total device drain with the VPN on and off. Then use notifications and logs to tell whether Android stopped the background service or the connection timed out. Relax battery restrictions only if the system is stopping the service with the screen off. If only a few apps need the VPN, limit which apps it covers.

Measure idle drain before changing settings

Android battery usage percentages usually show each app's share of consumption over a measurement period; they don't mean the app used that same percentage of the battery. Android may also attribute some VPN network activity to the VPN app, even when other apps generated the traffic. Compare total battery drain, connection status and actual usage rather than relying on the ranking alone.

  1. Record your current settings

    Go to Settings → Battery → Battery usage and note the device's battery level and v2rayNG's foreground and background usage, if shown. Record the network, server, battery restrictions and per-app VPN settings. For both tests, unplug the phone, stop downloads, and keep Battery Saver and network conditions the same.

  2. Measure baseline with VPN off

    Tap the connection button on the v2rayNG home screen to stop the VPN. Confirm the VPN icon disappears, then lock the screen and leave the phone idle for 60 minutes. Record the starting and ending battery levels. If Always-on VPN or Block connections without VPN is enabled, make sure turning off the VPN won't violate device management requirements or make the two tests' network conditions incomparable.

  3. Measure idle drain with VPN on

    In the same location, reconnect to the same server and lock the screen for 60 minutes. When you unlock the phone, check the persistent notification and VPN icon, then try loading a webpage. Battery readings are rounded to whole numbers, so a one-point difference in a single test isn't conclusive. Extend the test to two hours or repeat it under the same conditions.

  4. Change one setting at a time

    If the service disappears when the screen locks, check battery restrictions. If the service is still running but sites won't load, check the network and server first. If battery drain is high only when certain apps use the VPN, review which apps are included. Change one setting per test, and note when you unlock the phone and when the issue occurs so you can compare with the logs.

VPN background activity, retries and data usage

App trafficVirtual network interfaceKernel routingOutbound connectionWireless transmission

A persistent VPN icon means Android still has a VPN session; it doesn't mean data is constantly being sent or that the server is reachable. When an included app syncs or downloads, its traffic passes through the virtual network interface and kernel, then follows the routing rules to go direct or through the proxy. Even traffic ultimately routed directly has already entered the VPN processing path.

Use logs to distinguish timeouts from refusals

Open Log (sometimes labeled Logging) from the v2rayNG main screen menu and compare the entries with the time you noted. An app in VPN mode may connect to multiple destinations at once. First check whether the failed connection was to the proxy server or to a site reached directly by routing. A single log entry doesn't prove the entire server is down.

Error: i/o timeout

Cause: A network read, write or connection didn't complete within the time limit. This message alone can't tell you whether the cause is a weak signal, an unresponsive server or another network issue. Fix: On a stable network, stop speed tests and retry the same destination. Then change only the server and compare. If every server times out on one network, test another network first.

Error: connection refused

Cause: The connection was rejected, often because nothing is listening on the destination port or a device along the route actively refused it. Fix: If the log confirms a failed proxy connection, check that the server Address and Port in the profile match the details from your provider, then try a known-working server. Relaxing battery restrictions won't fix a port issue.

When asking for help, share only the relevant lines from just before and after the issue. Hide subscription links, server addresses and connection IDs first. If logging stops at the same time as the notification disappears and you have to start the app manually after unlocking, check Android's background restrictions rather than mistaking stopped logging for a connection timeout.

Allow background activity if the VPN disconnects when locked

Long-press the v2rayNG icon and open App info. Change settings for this app only. The table shows paths in common Android interfaces; menu names vary by version, region and manufacturer. If you can't find an option, search Settings for Battery optimization, App battery usage or App launch management.

Android interfaceSettings pathSetting to change
Pixel(Android 14)Settings → Apps → See all apps → v2rayNG → App battery usageAllow background usage. To test whether battery restrictions are the cause, select Unrestricted.
Samsung One UISettings → Apps → v2rayNG → BatterySelect Unrestricted. If v2rayNG is in Sleeping apps, remove it from the background usage limits list under Battery.
Xiaomi HyperOSLong-press the icon → App info → Battery saverOn models that offer this option, select No restrictions and check whether the connection stays active with the screen off.
Huawei EMUISettings → Apps → App launch → v2rayNGTurn off Manage automatically, then enable Allow background activity if needed. Change other switches only if you need the corresponding launch behavior.

Limit VPN coverage with per-app settings

Per-app VPN settings determine which apps enter Android's VPN. Kernel routing rules determine how traffic is handled after it enters. These are separate settings. Excluding an app from the VPN doesn't create a direct-routing rule in the kernel: its traffic never passes through the kernel or uses the VPN's DNS route.

  1. From the v2rayNG main screen menu, go to Settings → Per-app proxy and enable the feature. In some versions, you need to select Enable per-app proxy before opening the app list.
  2. If only a few apps, such as a browser, need the VPN, use the mode that includes selected apps. Select the apps you actually use and make sure Bypass mode is off. In Bypass mode, the selection works in reverse: selected apps are excluded, and all others use the VPN.
  3. After saving or returning to the main screen, stop and restart the VPN so the new app list takes effect in the next VPN session. Check access from both selected and unselected apps, and make sure notifications, sign-in and syncing still work. The system VPN icon doesn't show whether a specific app is using the VPN.
  4. Keep the same server and network, then repeat the idle test. If excluding a backup app reduces VPN traffic but doesn't noticeably change total battery drain, the app may still be uploading directly. To reduce the data transfer itself, change the upload schedule in the backup app.

Frequently asked questions

The notification is still there. Why won't webpages load after the screen locks?

The notification only indicates that the service may still be running. Keep the same Wi-Fi network, reproduce the issue after unlocking, and check the logs. If it happens only after switching to mobile data, test network switching separately instead of changing battery settings at the same time.

I selected only my browser. Why did sign-in fail?

First check whether sign-in opened another app. If an external app handles authentication and also needs the VPN, include it and restart the VPN. Don't add every app back just to troubleshoot one sign-in flow.

Do I need to keep the VPN on all day?

If you use the VPN only at certain times, stop it with the connection button in the app when you're done and confirm the VPN icon disappears from the status bar. If your device requires Always-on VPN or a lockdown setting, keep that policy in place and test battery usage by limiting VPN coverage and reducing background sync instead.

Download the app