Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wifi not working after ubuntu sleep #166

Closed
jsBrian opened this issue Jul 14, 2022 · 18 comments
Closed

Wifi not working after ubuntu sleep #166

jsBrian opened this issue Jul 14, 2022 · 18 comments

Comments

@jsBrian
Copy link

jsBrian commented Jul 14, 2022

If I leave GlobalProtect running while my computer goes into sleep mode and come back later my wifi doesn't work until I disconnect GlobalProtect. This wouldn't be too much of an issue, but disconnecting is also very slow (takes several minutes) in this case.

I'm running version 1.4.8-ppa1~ubuntu21.10

@The9Cat
Copy link

The9Cat commented Jul 22, 2022

I'm having the same problem on Ubuntu 22.04 (version 1.4.8-ppa1-ubuntu22.04. Still, I'm very grateful to have a working client since the one supplied by PaloAlto does not work most of the time.

Also of note: I thought I'd be clever by disconnecting before sleeping. Then I get this popup.
Screenshot from 2022-07-22 17-16-05

The only thing that works is killing and restarting the client.

@yuezk
Copy link
Owner

yuezk commented Jul 25, 2022

I'm trying to reproduce it locally. I'm using Manjaro and it will display as Connected after waking from the sleep mode. But VPN has been disconnected actually, then I click the Disconnect button, then it will disconnect quickly. Everything else works fine, I can reconnect the VPN and it works fine, too. So it seems less annoying in Manjaro.

Anyway, I'm going to reproduce it in a real Ubuntu environment. And will try to fix it if I could reproduce it.

@herzrasen
Copy link

I'm having the same problem (not always though). Is there any way to disconnect via commandline? It would then be possible to disconnect before suspending.

@stdedos
Copy link

stdedos commented Jan 10, 2024

Can we have the --disconnect option?

It seems to always happen in my system. I'd like to create a small bash wrapper in the /usr/lib/systemd/system-sleep/.
It'd be nice if there was also a --connect option, if (re-)connection could be handled non-interactively.

I cannot find a man page, or having the

$ gpclient --help
2024-01-10 15:19:42.859 INFO  [2330436] [main@24] GlobalProtect started, version: 1.4.9

spit something productive for me 😕

@tinkermakar
Copy link

+1

@yuezk
Copy link
Owner

yuezk commented May 6, 2024

I'm working on this. It seems like we can leverage the systemd service hooks. https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate

@mathsten
Copy link

Any updates on this one? I have similar issues on app version: 2.4.1-ppa1~ubuntu22.04.

I use the GUI and if i do not disconnect the app before sleep, I lose internet access. When I click "disconnect", it hangs for a couple of minutes. I usually try to kill gpclient from htop, but I am not sure if that helps or not.

Any tips on what services that should be restartet to speed up this process?

@yuezk
Copy link
Owner

yuezk commented Jan 12, 2025

Hi @mathsten, I'm trying to fix this. Can you help me try the snapshot version to see if it works for you? You can follow the instructions on that page to install it.

@luponata
Copy link

luponata commented Jan 14, 2025

Same problem without GUI, version 2.3.9

Once awakened from sleep the gpclient hang at disconnecting (since there is no connection, my company redirect all the traffic to their GW) after forcefully closing it, the background openconnect instance get stuck with the original virtual tunnel interface, the only option to restore connection is to do an "ifconfig down" on the tun interface

@yuezk
Copy link
Owner

yuezk commented Jan 14, 2025

Hi @mathsten, I'm trying to fix this. Can you help me try the snapshot version to see if it works for you? You can follow the instructions on that page to install it.

@luponata, I'm trying to fix this. Can you help me try the snapshot version to see if it fixed this issue? Thanks.

@luponata
Copy link

Hi @mathsten, I'm trying to fix this. Can you help me try the snapshot version to see if it works for you? You can follow the instructions on that page to install it.

@luponata, I'm trying to fix this. Can you help me try the snapshot version to see if it fixed this issue? Thanks.

Yes, ill'update you by tomorrow

@luponata
Copy link

luponata commented Jan 15, 2025

Unfortunately i got some errors while compiling

I'm running a 20.04 LTS upgraded from an older version, i'll wait for the next production release for the test

  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:warning=
  pkg-config exited with status code 1
  > PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/ PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags gio-2.0 gio-2.0 >= 2.70

  The system library `gio-2.0` required by crate `gio-sys` was not found.
  The file `gio-2.0.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
  PKG_CONFIG_PATH contains the following:
      - /usr/lib/x86_64-linux-gnu/pkgconfig/

  HINT: you may need to install a package such as gio-2.0, gio-2.0-dev or gio-2.0-devel.

make: *** [Makefile:101: build-rs] Error 101

Of course the package (libglib2.0-dev) and its related ones was installed

@mathsten
Copy link

Hi @mathsten, I'm trying to fix this. Can you help me try the snapshot version to see if it works for you? You can follow the instructions on that page to install it.

@luponata, I'm trying to fix this. Can you help me try the snapshot version to see if it fixed this issue? Thanks.

I tried installing the latest snap, but I still have the issue where the gpclient gui tries to reconnect for 1-2 min after sleep before succeeding.

@yuezk
Copy link
Owner

yuezk commented Jan 16, 2025

@luponata 2.4.0 and above requires 22.04 and later due to the underlying framework upgrading.
@mathsten can you provide the logs at ~/.local/share/gpclient/gpclient.log?

@yuezk
Copy link
Owner

yuezk commented Jan 19, 2025

@mathsten I found another solution by leveraging the NetworkManager-dispatcher. I tested it with my machine and found that it can disconnect the VPN when it sleeps and optionally reconnect the VPN when it wakes up. Can you help re-install the latest snapshot version and see if it works for you? Thanks.

@luponata
Copy link

I tested it with my machine and found that it can disconnect the VPN when it sleeps and optionally reconnect the VPN when it wakes up.

Without asking again for MFA?

@mathsten
Copy link

@mathsten I found another solution by leveraging the NetworkManager-dispatcher. I tested it with my machine and found that it can disconnect the VPN when it sleeps and optionally reconnect the VPN when it wakes up. Can you help re-install the latest snapshot version and see if it works for you? Thanks.

I have downloaded and tested the latest snapshot and it works for me!
When exiting the sleep, the globalprotect is disconnected, and network works as expected. I also tested the optional auto-reconnect, which also works. I am asked for MFA, which I think is expected.

Thank you!

@yuezk
Copy link
Owner

yuezk commented Jan 21, 2025

This fix has been released in 2.4.3 for Ubuntu 22.04 and later. And 2.3.11 for Ubuntu 18.04 and Ubuntu 20.04.

I'm closing this issue, and let me know if it still doesn't work for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants