VPN connection keeps dropping out all the time

Mr. Forager@lemmy.world to Android@lemmy.world – 49 points –

I use Tailscale as my VPN, and it's always just worked for me. But lately, it keeps hopping out. This is only an issue on my Android phone too. I have set Tailscale to be the 'always-on-vpn' in settings, but that doesn't change anything for me.

Anyone experience the same thing? Is there a know fix for this?

25

From the interface you should have android 12+, check if the app has the permission to run in the background, if that doesnt work it could be android's phantom process killing that stops it

Yes, I am on Android 13. I believe I have given it all permissions too. Is there anything about the phantom thingy I can do to prevent it from doing this?

Is battery optimisation turned on for the app? For me with some apps if it is on it will run in the background but i guess pause it until I actually open the app again.

If i remember correctly on android 13 you can go in developer settings-> feature flags and you should be able to disable it Otherwise you need to use adb to disable it, but i don't remember the entire process

My wireguard VPN drops if I use Firefox which seems to use way too much memory causing some apps to be killed.

Most likely because of android battery saving. Check this site . I might be wrong but that looks like Lineage OS? Try disabling battery saving for that app in settings

Thanks for that website, although I have done all of it, that's very handy website 😊

Does the VPN have a persistent notification? If you disabled it that could be a problem. My VPN has a notification that is always on. Annoying for someone who always clears notifications, but I've gotten used to an it.

I use tailscale and every restart I see that notification and open the app and flip the switch.

Much better than in iOS would almost always be down.

Also, probably not important, have you toggled "pause app activity if unused" off?

I also have this, once per day or so I get the notification and have to enable the connection again. It's only since I updated to Android 14. Don't know why, probably some battery optimization.

My VPN has an option to keep a notification always active in order to stop it disconnecting, and it seems to work. Don't know if that helps? Yours might have a similar option?

Do you have the Tailscale's "Magic DNS" enabled? I had problems with Tailscale on Android, too, and disabling their DNS solved it.

Hmm yeah I do, would like to have it enabled though as I do use it.. But can test this!

You said this used to work before. Are you using it from a new location compared to before? Has there been any change in the network path?