I have solved this for my laptop, in 2 stages.

First I installed r8168-dkms - the correct driver for my laptop.  My
network now appears to be up on resuming from suspend.

But I then found I could not open any DNS or IP addresses.  Restarting
system-resolved did not work. Restarting network-manager did not work.
My laptop does run dnsmasq.

I found an answer at
https://askubuntu.com/questions/1029250/ubuntu-18-04-ethernet-
disconnected-after-suspend which was for an r8169.

This is an edited copy of the solution I found there:

"We need to reload the module for the Ethernet interface when resuming
from suspend, after suspend. So I created script /lib/systemd/system-
sleep/r8168-refresh:

#!/bin/bash

PROGNAME=$(basename "$0")
state=$1
action=$2

function log {
    logger -i -t "$PROGNAME" "$*"
}

log "Running $action $state"

if [[ $state == post ]]; then
    modprobe -r r8168 \
    && log "Removed r8168" \
    && modprobe -i r8168 \
    && log "Inserted r8168"
fi
and made it executable:

chmod +x /lib/systemd/system-sleep/r8168-refresh

The messages logged from the script will go to /var/log/syslog tagged
with the name of the script and its PID. This way you can check whether
the script reloaded the kernel module"

This fixed my laptop.  There are other suggested ways of doing similar
things in the link above.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1752772

Title:
  r8169 ethernet card don't work after returning from suspension

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1752772/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to