pop-os / system76-driver

System76 Driver for Pop!_OS
Other
112 stars 29 forks source link

Wired Ethernet fails after resume from sleep; system76-nm-restart doesn't restart it "enough" #226

Closed danieljohnson2 closed 2 years ago

danieljohnson2 commented 2 years ago

Distribution (run cat /etc/os-release):

NAME="Pop!_OS" VERSION="21.10" ID=pop ID_LIKE="ubuntu debian" PRETTY_NAME="Pop!_OS 21.10" VERSION_ID="21.10" HOME_URL="https://pop.system76.com" SUPPORT_URL="https://support.system76.com" BUG_REPORT_URL="https://github.com/pop-os/pop/issues" PRIVACY_POLICY_URL="https://system76.com/privacy" VERSION_CODENAME=impish UBUNTU_CODENAME=impish LOGO=distributor-logo-pop-os

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

system76-driver: Installed: 20.04.45~1637613225~21.10~d64334e Candidate: 20.04.45~1637613225~21.10~d64334e Version table: *** 20.04.45~1637613225~21.10~d64334e 1001 1001 http://apt.pop-os.org/release impish/main amd64 Packages 1001 http://apt.pop-os.org/release impish/main i386 Packages 100 /var/lib/dpkg/status

Issue/Bug Description:

I find that now I've upgraded to POP!_OS 21.10, I always lose network connectivity (wired ethernet) on sleeping and resuming from sleep.

There seems to be a driver component to address this (system76-nm-restart) but it is not effective.

Steps to reproduce (if you know):

Get a Thelio (thelio-r2) with wired ethernet set up.

Put the computer to sleep. Wait briefly, and resume. Try to browse to a web page. It fails!

Go into Settings > Networking; the "Wired Networking" is turned on. Turn it off, then back on.

Now browse to a web page. It works! Somehow the manual toggle works when the NetworkManager restart didn't.

Expected behavior:

I expect that system-nm-restart will reset the network adapter so that I don't have to do it manually, and in this way the network will come back online right after resumption.

Other Notes:

I've been experimenting with this, and I find that it is possible get this to work with a different script. It needs to do this:

sudo ip link set enp4s0 down
sudo ip link set enp4s0 up

Though I imagine the link name there won't always be enp4s0; that's what it is for me. I don't understand why this works if restarting NetworkManager does not, but it seems naively to me that system76-nm-restart isn't restarting "hard enough" or something.

danieljohnson2 commented 2 years ago

It appears Pop!_OS 22.04 resolves this; network connectivity is lost but it seems to reliably reconnect not long after resuming from sleep. So that's okay.