· Troubleshooting · About 6 min read
Clash Android Battery Drain: Background Activity and Battery Optimization
Troubleshoot Android battery drain by checking scheduled tests, DNS lookups, and vendor battery controls. Adjust background access and test intervals.
Measure screen-off drain and distinguish disconnects from battery use
On a Pixel running Android 14, open Settings → Battery → Battery usage and check the Clash client's battery usage. The percentages show how battery use is attributed over the selected period; they don't indicate how much charge the phone has lost. A VPN service also handles traffic from other apps, so its ranking alone doesn't prove that the client is constantly testing connections while idle. Note the battery level in the status bar, then run a comparison.
- Measure a baseline with the VPN off. Stop the proxy in the client and confirm on the system VPN page that it has disconnected. Use a stable Wi-Fi connection. Leave the phone unplugged and untouched, with the screen off for 2 hours, then note the starting and ending battery levels. If the phone is managed by your organization, or turning off the VPN would interrupt a required service, skip this test and instead compare the same configuration before and after a change.
- Measure performance while connected. Around the same time, enable the same configuration and proxy group, then leave the screen off for 2 hours in the same place. Avoid system updates, photo backups, and hotspot use during both tests. After unlocking, first check whether the system still shows the VPN as connected, then test connectivity with the same website you normally use.
- Repeat if the difference is small. For example, if the battery drops by 2 and 3 percentage points in the two tests, a 1-point difference is not enough to draw a conclusion. Swap the test order or extend each test to 4 hours. Test Wi-Fi first, then mobile data separately; don't combine results from mobile data on a train with results from Wi-Fi at home.
Scheduled connection tests: reduce the number of checks first
The “Test all” option in a client is usually a manual action. Even if you don't tap it, strategy groups such as url-test and fallback can test nodes at set intervals. Referenced proxy-providers may also have their own health checks. Open the active configuration and check both the strategy group's interval and the provider's health-check.interval; don't focus on just one setting.
Try increasing the interval from 300 to 900 seconds
For clients that support mihomo configuration fields, the test interval is measured in seconds. Change one automatic test group from 300 to 900, increasing the interval from 5 to 15 minutes. The example below shows two fields to change in an existing url-test group; it is not a complete configuration. Keep the original group name, test URL, and members. lazy: true lets the group skip scheduled checks when it isn't in use; don't expect checks to stop while the group is handling traffic.
interval: 900
lazy: true
If the group is in continuous use and checks run at a fixed interval, the theoretical number of checks drops from 12 to 4 per hour. That does not translate directly into a percentage of battery saved. A longer interval may also delay detection of an unavailable node. If you need faster failover, keep a short interval for that group and prioritize changing groups with many members that you rarely use, or check whether the provider is running its own checks.
After saving, reload the configuration and confirm that the modified version is still active. A remote subscription update may overwrite direct edits. If the client supports persistent overrides, use one; otherwise, test with a local copy and keep the original configuration so you can revert. If you always use a fixed node, you can test a manual selection group, but switching to a manual group alone does not guarantee that other health checks will stop.
DNS lookups: check for repeated timeouts before changing servers
A screen-off phone can still have network traffic. Email, messaging, and sync apps may continue to look up domain names. Watch for repeated timeouts on the same domain or persistent errors from the same upstream after switching between Wi-Fi and mobile data. First, check the client's existing runtime logs for when errors occur; if logging is available, reproduce the issue briefly. Restore the original log level after diagnosing the problem so continuous logging doesn't affect the next battery comparison.
- Reproduce the issue while switching networks. On stable Wi-Fi, open a website you can normally access. Turn off Wi-Fi so the phone switches to mobile data, then open the same website again. Note whether it fails only during the switch or continues to fail after the connection stabilizes. Record whether the VPN remains connected or disconnects.
- Check which DNS path is failing. If you're using mihomo with core DNS enabled, check
dns.nameserveror the matchingnameserver-policyin the configuration. If the logs point to a failed lookup for a proxy node's domain, check whetherproxy-server-nameserveris set separately. Service domains and node domains may use different upstreams, so changing the wrong setting won't help. - Change one source at a time. Android Private DNS, encrypted DNS used by an app, and mihomo DNS settings don't necessarily use the same path. If the problem affects only one app, test another app first. Don't disable Private DNS, change the core's upstream, and switch nodes all at once. For domains used on a work or home network, keep the original DNS settings so a fix for public websites doesn't break internal services.
If the logs show only occasional timeouts and websites still load normally, don't assume those errors are causing battery drain. More useful evidence is a series of similar errors that become less frequent after one change, along with a repeatable difference in battery drain under the same network and screen-off conditions.
Background activity: relax restrictions only for clients that are being suspended
Battery optimization exemptions are mainly intended to address restrictions on background services; they are not a battery-saving switch. Relaxing those restrictions may let the client run longer and can increase battery use. Try the comparison below only if the VPN repeatedly disconnects with the screen off, is already down before you unlock the phone, and you haven't stopped the service yourself.
| System example | Settings path | What to try first |
|---|---|---|
| Pixel · Android 14 | Settings → Apps → See all apps → Select the client → App battery usage | First, confirm that background usage is allowed. If the page offers “Unrestricted,” temporarily select it and retest for screen-off disconnects. |
| Samsung · One UI 6.1 | Settings → Battery → Background usage limits | Check whether the client is on the sleeping or deep sleeping apps list. Remove it and retest. If it still disconnects during sleep, try adding it to “Never auto sleeping apps.” |
Menu names vary by device and system update. If you can't find the setting, long-press the client icon on the home screen and open App info, or search Settings for “battery optimization” or “background usage limits.” A vendor's auto-start permission mainly affects launches after a reboot or cleanup; it doesn't remove restrictions from a VPN that's already running. Check it only if the connection doesn't come back after startup.
Distinguish battery exemptions from always-on VPN
On a Pixel running Android 14, go to Settings → Network & internet → VPN and tap the gear next to the client. If supported by the client, “Always-on VPN” will appear. This system setting maintains the VPN connection; it doesn't reduce the testing frequency. “Block connections without VPN” also prevents regular traffic from passing when the VPN disconnects. Don't enable both options while troubleshooting, or a complete loss of connectivity during a network switch could be mistaken for a DNS issue.
Retest and revert: keep only one change that works
- After changing the test interval: Repeat the same 2-hour screen-off test, then test switching away from an unavailable node. If battery life improves but automatic switching is too slow, try the middle setting of
600seconds and test again. - After changing DNS: Repeat the Wi-Fi and mobile data switching test, and confirm that commonly used apps and internal domains are still accessible. If the connection recovers only after restarting the client, record that separately; don't count it as a stable pass.
- After relaxing background restrictions: Check the VPN status after 30 minutes and 2 hours with the screen off. If it disconnects both times, restore the original battery settings, then check whether another VPN has taken over, the client has exited, or it failed to reconnect after a network switch.
Record the client and core versions, active configuration, test network, starting and ending battery levels, and disconnection times. When reporting an issue, don't share a full subscription URL or forward raw logs containing node addresses or visited domains. Focus on two results: whether the connection behaves as expected with the screen off, and whether the difference in battery drain is repeatable under the same conditions.