Page 1 of 1

Disconnect from VPN when display sleep

Posted: Wed Mar 09, 2016 8:52 pm
by apostolos1975
Newbie so apologies if I ask something stupid (I did look through the forum btw and couldn't find anything relevant).

So, I amusing El Capitan (10.11.3) and started playing with Viscosity maybe a week ago. I use PIA and I have noticed that when the screen comes back from sleep Viscosity for very briefly reports that VPN has been disconnected. After 20s more or less it connects on itsown and then Viscosity displays a pop-up message that there are some notifications. My problem is that the underlying network traffic continues when the display is at sleep mode. What do I need to keep the VPN connection alive?

Re: Disconnect from VPN when display sleep

Posted: Thu Mar 10, 2016 9:50 am
by James
Hi apostolos1975,

Your computer does not have a network connection when it is sleeping, and so the VPN connection becomes disconnected. It is impossible for a VPN connection, or any network connection, to remain active while your computer is sleeping. Viscosity will automatically reconnect it again when your computer wakes up from sleep and the network connection becomes available again.

If you’re not actually sleeping your computer, but merely locking it, activating the screensaver, or letting the display turn off, and yet a drop out is still occurring, then you are probably running into a Mac OS X issue. Please see:
http://apple.stackexchange.com/question ... ck-the-mac

Cheers,
James

Re: Disconnect from VPN when display sleep

Posted: Fri Mar 11, 2016 7:10 am
by apostolos1975
Hi James,

I am referring to the screen sleeping (power save mode), not the computer itself. I can tell the difference between the two states. When the screen is in sleep mode it wakes up instantaneously. Whereas when the system does into sleep mode it take time to recover from it. I am certain that network activity is on going because large file downloads are completed in the mean time the screen is powered off.

BR,
Apostolos

Re: Disconnect from VPN when display sleep

Posted: Fri Mar 11, 2016 12:43 pm
by James
Hi Apostolos,

Your computer is most likely turning off its WiFi adapter when the screensaver is kicking in or when the screen locks. Please see the following link for further details and how to stop this behaviour:
http://apple.stackexchange.com/question ... ck-the-mac

Please also be aware that OS X may present notifications to you when you unlock your computer from while you were away from it (they're not necessary indicative that the action has happened immediately). You can check the OpenVPN log to see when your VPN connection was disconnected, and when it was reconnected:
http://www.sparklabs.com/support/kb/art ... envpn-log/

Cheers,
James