Wired ethernet connection not working after suspend on Debian

2

I have been using Debian GNU/Linux 8 (jessie) for over a year on my laptop. Since the last update the wired Ethernet connection is not working after the system resumes from hibernating. Restarting the system fixes the issue. Is there a way to reactivate networking without having to restart the system?

There is a related question (but for wifi) concerning Ubuntu.

Paul Rougieux

Posted 2016-04-14T11:45:18.057

Reputation: 167

Does the cable replugging solve the problem? – Alexiy – 2016-04-14T13:20:19.000

2No, only a restart solves the problem. – Paul Rougieux – 2016-04-15T08:23:44.890

This problem only occurred after a software update. So I may close the question now. – Paul Rougieux – 2016-12-07T11:41:17.543

@PaulRougieux Which software? Did you end up solving your problem somehow? Running sudo service network-manager restart after resume solves it for me but it's kind of hackish... – jebeaudet – 2017-04-04T16:13:39.543

I meant after an automated update of several packages on Debian. I didn't keep track of which software were updated. I guess you could check the Debian update log for which packages were updated in the few dates before I asked my question. – Paul Rougieux – 2017-04-08T13:46:57.077

Answers

0

I have this problem too. In my case it is a trouble with the rtl8169 driver and suspend/resume.

As root (check that r8169 is loaded first):

root@asus:/var/log# lsmod |grep r8169
r8169                  94208  0
mii                    16384  1 r8169

As root:

rmmod r8169
modprobe r8169

And wait a little bit (it could include restarting networking)

Stefan Skoglund

Posted 2016-04-14T11:45:18.057

Reputation: 1

0

In debian you can edit /lib/systemd/system-sleep/hdparm (in Arch it's /usr/lib/systemd/system-sleep/hdparm) and add these lines:

#!/bin/sh
if [ "${1}" == "pre" ]; then
  # Do the thing you want before suspend here, e.g.:
    sudo modprobe -r r8168
elif [ "${1}" == "post" ]; then    
    sudo modprobe r8168
fi

This will disable the card at suspend time and re-enable it on resume forcing it to reinitialize. I am using r8168 drivers. If you use a different driver simply replace r8168 in the script with your driver name

brett

Posted 2016-04-14T11:45:18.057

Reputation: 123