BuddiesOfBudgie / budgie-desktop

Budgie Desktop is a familiar, modern desktop environment.
https://buddiesofbudgie.org
GNU General Public License v2.0
932 stars 48 forks source link

Network Manager freezes for 20 seconds when connecting to VPN #37

Open madodig opened 2 years ago

madodig commented 2 years ago

Hi,

I've been running Budgie 20.04 for the past year and a half. Recently I've performed the upgrade to 21.04, and then a couple of days later to 21.10 (no errors during upgrading). Once I upgraded to 21.10, I've started experiencing this issue. The issue is not random, it happens every time.

Description

When you try to connect to VPN (from the applet or from the Network Manager), when it gets to Contacting host, please wait..., there is a 20 second freeze until the connection is successful. You can move the Network Manager window around, but you can't do nothing inside it (expand the log for instance). OS is not frozen, nothing is logged during these 20 seconds regarding VPN connections. Tested with "Cisco AnyConnect or openconnect" and "Palo Alto Networks GlobalProtect" VPN types.

Budgie version

budgie-desktop 10.5.3

Operating system

Ubuntu 21.10

Steps to reproduce the issue

Actual result

When Network Manager gets to Contacting host, please wait..., there is a 20 second freeze until the connection is successful. Window can be moved around, but nothing can be done inside it (expand the log for instance).

Expected result

VPN connection is established in about a second.

Additional information

Budgie is run inside a virtual machine. UEFI. 1 CPU, 2 cores, 12 GB of RAM. 4GB swap file. Apart from needed openconnect packages (as specified above), open-vm-tools and open-vm-tools-desktop packages were also installed.

The issue didn't exist on 20.04, nor 21.04. To be sure that something didn't break during the upgrade process, I've installed:

I've also tried Ubuntu 22.04 dev (clean install). Same issue happens as on Ubuntu 21.10. VPN behaves as expected on Ubuntu default desktop, but not on Budgie desktop.

JoshStrobl commented 2 years ago

Not the responsibility of Budgie. We aren't responsible for NetworkManager and network-manager-applet isn't developed by us either.

madodig commented 2 years ago

I understand your point, but there seems to be nothing wrong with Network Manager, Budgie desktop seems to be the trigger for the behaviour. As stated: just to be sure, I've installed clean Ubuntu 21.10 and everything's working as expected. Once I installed Budgie desktop, as long as I'm in Budgie it has this issue. If I logout and login to Ubuntu default desktop, VPN connection is established immediately.

Anyway, I appreciate the hard work and I really love Budgie!

JoshStrobl commented 2 years ago

Network Manager is not having any issues on any of the systems I have tested it on (which are not based on Ubuntu). This is not a Budgie issue. We have zero interaction with Network Manager.

madodig commented 2 years ago

OK, thanks.

madodig commented 2 years ago

You said you haven't experienced this on any of the systems you've been testing it on. Which ones exactly, maybe I can switch to one of those? Since you're using EndeavourOS with Budgie DE, I've tested it and it behaves the same way. I've also tested Solus Budgie and Manjaro Budgie. I haven't found a recent distro where Budgie DE doesn't have this issue.

This is definitely an issue caused by Budgie desktop or by one of the packages that it depends on. From an end user perspective, it's a Budgie desktop issue. From what I can tell, it was introduced in 21.10 (maybe gnome 40 is the root cause?). It can be easily reproduced on Budgie DE on recent versions of mentioned distros (if one has access to AnyConnect or GlobalProtect VPN server).

I believe you wouldn't have closed the issue without trying to reproduce it first. Maybe you haven't tested it with Multi-protocol VPN (openconnect) connection, although that's what this issue is about: Multi-protocol VPN connections (AnyConnect, GlobalProtect) are established after a 20 second "freeze" in a Budgie DE.

Please take a look at the attached videos that illustrate the behaviour. Both EndeavourOS and Solus are fresh installs. No advanced settings in the GlobalProtect VPN connection, just the gateway address, user certificate/key/credentials were set. EndeavourOS video shows that the issue isn't related to Network Manager or the openconnect packages, VPN server or the VPN connection configuration, or even some networking issue, since it works as expected for the same user, on the same box, with the same connection, as long as user is not in Budgie DE. Solus comes with openconnect pre-installed, so no additional packages were needed; out-of-the-box it is not working as expected.

https://user-images.githubusercontent.com/14966219/149680397-0a18e3de-4732-4957-b9db-accbb79dfd3b.mp4

https://user-images.githubusercontent.com/14966219/149680404-9a99f1f5-3ca5-4677-90a9-16bf59151edc.mp4

JoshStrobl commented 2 years ago

If you are having a NetworkManager issue, file it with the NetworkManager developers.

fossfreedom commented 2 years ago

As Josh mentioned this is an underlying network manager-like component issue. There does look like a DE specific issue - probably something where network manager was only expecting GNOME Shell and doesnt take into account other DEs like budgie.

To resolve will need someone to start tinkering around in network manager and like libraries working with VPNs - certainly not an area I'm familiar with. I'll reopen this for the moment but will tag it as "help wanted" - and it really does need help