Disconnect from VPN when display sleep

Got a problem with Viscosity or need help? Ask here!

apostolos1975

Posts: 3
Joined: Wed Mar 09, 2016 8:35 pm

Post by apostolos1975 » Wed Mar 09, 2016 8:52 pm
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?

James

User avatar
Posts: 1918
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Thu Mar 10, 2016 9:50 am
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
James Bekkema
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs

apostolos1975

Posts: 3
Joined: Wed Mar 09, 2016 8:35 pm

Post by apostolos1975 » Fri Mar 11, 2016 7:10 am
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

James

User avatar
Posts: 1918
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Fri Mar 11, 2016 12:43 pm
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
James Bekkema
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs
4 posts Page 1 of 1