Troubleshooting 9-minute read
Clash battery drain on Android: troubleshooting excessive battery use and background settings
Troubleshoot high battery usage in mobile proxy apps by checking test intervals, TUN mode, DNS queries, and Android battery optimization settings.
First, tell battery drain apart from disconnections while the screen is off
If the battery drains quickly with the screen off, check what the client is doing in the background. If the connection drops as soon as you lock the screen, check whether the system is stopping the VPN service. Both can happen at once: on a weak signal, for example, frequent network switching can trigger repeated reconnects, draining the battery and causing occasional dropouts. Start with the issue you can reproduce most consistently, then change settings.
- Record a baseline. On a Pixel running Android 14, go to Settings → Battery → Battery usage and check the client and other high-usage apps. Note the starting and ending battery levels, the test duration, and whether you used Wi-Fi or mobile data. An app's share of battery usage and the phone's total percentage-point drop are different measurements; don't subtract one from the other.
- Run two screen-off comparisons. In the same location and on the same Wi-Fi network, leave the screen off for 60 minutes twice: once with Clash connected and once after disconnecting from the client. Avoid charging, system updates, photo backups, and large downloads. For example, one run might go from 78% to 74%, and the other from 77% to 76%—a 3-percentage-point difference. This is only an illustrative comparison. A single run can be affected by rounded battery readings and background tasks, so repeat it before drawing conclusions.
- Check system status first when the connection drops. Go to Settings → Network & internet → VPN and check whether the VPN is still connected before opening the client. Opening the client first may trigger an automatic reconnect and hide the state that caused the problem. If the VPN is still connected but websites won't load, check the client logs for DNS timeouts, node timeouts, or a recent network switch.
Automatic latency tests: increase the interval, then check health checks
Manually tapping a node in the list to test its latency is different from scheduled probes in the configuration. In mihomo, for example, url-test and fallback proxy groups can run scheduled availability checks; nodes loaded through proxy-providers may also have a separate health-check. Increasing one interval won't stop requests from another check.
Change 60 seconds to 600 seconds and check the next run
In the active client configuration or override, check interval under proxy-groups, then check health-check.interval under proxy-providers. Both intervals are in seconds. If a check currently runs every 60 seconds, increase the interval for the check you've confirmed is too frequent to 600 seconds, then repeat the test under the same screen-off conditions. Automatic groups may take longer to detect a route change; if you switch networks often, try 300 seconds and compare.
Also count the nodes in each group. If a group checks 20 nodes per run, a 60-second interval works out to about 1,200 node probes per hour, compared with about 120 at 600 seconds. These are estimates assuming a full run, not measured request counts; on-demand checks, shared nodes, and core implementation all affect the actual total. Keeping only frequently used candidates in automatic groups is usually more practical than checking the entire list often.
If you use a fixed node, select it manually and check separately whether scheduled health checks are still running. Don't confuse subscription updates with latency tests: the former fetch configuration or node lists; the latter probe nodes. Subscription updates may overwrite direct changes to a remote configuration. If the client supports local overrides, reload after editing and verify which configuration is actually active.
TUN and DNS: identify which requests are being retried in the logs
Treat Android's VPN connection separately from desktop TUN settings
Many Android clients use the system's VpnService to create a virtual network interface. The app may show only a Start or Connect button, while Android displays the VPN status after connection; the separate TUN toggle shown in desktop guides may not exist. Comparing network use with the Android client disconnected measures the effect of the entire proxy setup—including app traffic, rule matching, and DNS handling. You can't attribute the whole difference to TUN.
If the client supports per-app proxying and you only need a few apps routed through the proxy, compare all-app routing with routing only the apps you need, on the same network. Keep the apps that need the proxy enabled, then test sign-in, notifications, and background refresh. Excluded apps will generally use the system's regular network path. If Always-on VPN or Block connections without VPN is enabled, make sure excluded apps can still connect.
DNS timeouts: check for repeated domains, then check the upstream server
During a period of noticeable battery drain, briefly open the client's connection or log screen, reproduce the issue once, then restore your usual log level. If the same domain appears repeatedly in a short period alongside timeout, first check whether the current network can reach the DNS upstream in use. If the logs show node connection failures, compare against a known-working route. Repeated successful lookups for different domains are more likely to come from an app syncing in the background; query counts alone don't indicate a DNS failure.
- Change one variable at a time: In an editable mihomo configuration, try replacing the upstream server that times out in
dns.nameserver, leaving other fields unchanged, then see whether retries decrease. If the configuration usesnameserver-policy, first confirm which upstream the affected domain actually uses; changing the default may not affect it. - Keep your existing DNS strategy:
fake-ipmaps domain names to virtual IP addresses; it isn't a battery-saving mode. If DNS is working normally, leave the current mode in place. If local device discovery, intranet domains, or a specific app has problems, check domain matching and exception settings separately. - Test Wi-Fi and mobile data separately: If repeated retries occur only when switching networks while you're out, note when the switch happens and when the VPN reconnects. If either network is stable on its own, focus on recovery after switching instead of rewriting DNS settings for both networks at once.
Keep the VPN active in the background on Android: if it drops when locked, ease battery restrictions
If the VPN icon disappears after the phone sleeps and the connection returns only when you unlock the phone and open the client, ease battery restrictions for that client alone. This is intended to keep the connection alive. If the VPN stays connected and the battery simply drains faster, focus first on latency tests, DNS, and background traffic; removing battery restrictions may keep existing background activity running longer.
- Start with the app's battery setting. On a Pixel running Android 14, go to Settings → Apps → See all apps → select the client → App battery usage, change Optimized to Unrestricted, and test again. Some versions first show Allow background usage; tap it to choose a setting. On other devices, long-press the client icon, open App info, then look for Battery, Battery management, or Background activity.
- Address only the additional restriction related to the problem. If the connection fails only after restarting the phone, check the manufacturer's Auto-start setting and the client's startup options. If it drops only when Battery Saver is on, repeat the same screen-off test with Battery Saver on and off. The client's keep-alive option and the system's battery restrictions are separate settings; enabling one doesn't mean the other is allowed.
- Use Always-on VPN only if you need it. On a Pixel, go to Settings → Network & internet → VPN, tap the gear next to the client, and check whether Always-on VPN is available. It tells Android to try to keep the VPN connected or reconnect it; Block connections without VPN is a separate option. If the latter is enabled, network access may be blocked whenever the VPN is unavailable. To test for disconnections when the screen is locked, don't change both options at once.
Change one setting at a time. After 30 minutes with the screen off, check the system VPN status first, then test whether you can access the internet. If the connection normally drops only every two or three hours, make the test at least that long. If easing battery restrictions doesn't help, restore the app's original setting and investigate network switching, the client service stopping, or configuration load failures.
Retest results: keep what works and undo the rest
| Result | Next step |
|---|---|
| After increasing the test interval to 600 seconds, battery drain decreased over multiple screen-off tests and automatic group selection still works well | Keep the longer interval. Check recovery after network switches, so battery savings don't come at the cost of a reliable connection. |
| The VPN stays connected, but the same domain repeatedly times out during DNS resolution | Check which DNS upstream the domain actually uses. Keep the original battery settings during the next test. |
| After removing the app's battery restrictions, the connection stays up with the screen off, but battery drain increases | If you need a persistent connection, keep the app-level exemption and investigate latency tests and background traffic. If you only use it occasionally, restore the optimized setting and disconnect manually when you're done. |
| The phone still drains noticeably after Clash is stopped | Check system battery usage, mobile signal strength, and sync tasks. Repeat the comparison over the same duration. |
When reporting an issue, include your phone model, Android version, client and core versions, the last time the VPN was connected, and a few relevant error log lines. Remove subscription URLs, node credentials, and private domains before sharing. A specific report such as “The system VPN disconnects after 30 minutes with the screen off on the same Wi-Fi” is more useful for troubleshooting than “battery drain is really bad.”