[Solved] slower shutdown using vpn service

I recently installed Private Internet Access (PIA) vpn on my laptop where I have EOS KDE Plasma install. After that I noticed immediate slower shutdown times. Well, 15 second shutdown time might sound minor problem for most users, but it’s noticeably slower than it was before I installed that vpn. Eventually I uninstalled PIA vpn and after that shutdown times were normal again. So is there anything I could do to keep using vpn without suffering slower shutdown times?

1 Like

It sounds like the VPN service running in the background is what’s causing the issue, so you may need to terminate the service before shutting down.

I have never used (and will never use) PIA, but I have used Windscribe, Mullvad, Proton, IVPN (recommended), Surfshark, WeVPN, (not recommended) and Tunnel Bear.

I mention these to say that none gave me slower shutdown issues.

For a tier list or good comparison, check out the video below:

How do I terminate the vpn service before shutting down? Some systemd service command perhaps?

That depends on which DE or tools you have installed. I use the xfce4-taskmanager, but you may have something else.

That being said: some services cannot be terminated while logged in, usually because they are started at boot. If this is the method PIA uses, then you’ll probably just have to get used to the slower shutdown or pick another VPN.

Of course, someone else may know of a way to terminate a service that runs at boot, but that’s beyond my know-how.

There is a dedicated page to PIA in ArchWiki.

@mardi, you might want to have a look and see if it may give you some clue as to what to look for on your system.

https://wiki.archlinux.org/title/Private_Internet_Access#

@ddnn, I have Ksysguard in Plasma desktop and it showed pia-daemon is running. I turned it off, but it didn’t help.

@pepbcak, thanks for that arch-wiki link. There was a lot of information about installing PIA and enabling automatic connection and auto-login, but nothing disabling PIA service in shutdown.

https://wiki.archlinux.org/title/Private_Internet_Access#After_installation

After installation

If there are any issues with connectivity and you are running connman, please restart connman-vpn.service.

Try disabling the service using something along the lines of ‘disable connman-vpn.service’ or ‘systemctl disable connman-vpn.service’. ← The actual command to run may not be either of these, so you’ll need to find out which command is needed.

As you’re on KDE (I assume), you should be able to disable startup services via the settings manager.

I can disable vpn service using systemctl disable piavpn.service command and it certainly speeds up the shutdown process. But disabling vpn service at boot also means it won’t start anymore. Oh well, I guess I can live with that slower shutdown. I don’t use vpn service all the time anyway. I installed it in the first place only because I can bypass region-locked services to watch foreign tv-series.

1 Like

You could only stop the service and not disable it.

In that case, you may not need it to be started at boot? Instead of having it enabled, you could just start it whenever it is needed by:

sudo systemctl start piavpn.service

and stop it when you are done, with:

sudo systemctl stop piavpn.service

1 Like

I use PIA on my desktop Gnome setup. I have it set to start up in disconnected state when I boot up. As you say, I have about a 12 second delay before shutdown can occur.

When I start in inactive state at boot up, a status icon appears on my taskbar. Clicking on it brings a drop down list with a quit option. KDE, I would think, would set up similarly, with the status icon.

@bumdeedharma, setting PIA in disconnected state at boot is a good idea. BTW, welcome to the forum!

@pebcak, I made an alias of that command you suggested. Now I just need to type vpnout in konsole to stop piavpn.service. Thanks a million!.. :+1:
I mark this now solved.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.