Ubuntu 18.04 - Ethernet disconnected after suspend
Ethernet does not resume after suspend.
sudo service network-manager restart
does not work. Only restart solves problem.
networking 18.04 network-manager ethernet
add a comment |
Ethernet does not resume after suspend.
sudo service network-manager restart
does not work. Only restart solves problem.
networking 18.04 network-manager ethernet
add a comment |
Ethernet does not resume after suspend.
sudo service network-manager restart
does not work. Only restart solves problem.
networking 18.04 network-manager ethernet
Ethernet does not resume after suspend.
sudo service network-manager restart
does not work. Only restart solves problem.
networking 18.04 network-manager ethernet
networking 18.04 network-manager ethernet
edited Sep 25 '18 at 9:49
David Foerster
27.9k1364110
27.9k1364110
asked Apr 28 '18 at 14:21
aaaaaaaa
3633412
3633412
add a comment |
add a comment |
11 Answers
11
active
oldest
votes
The main Ubuntu bug tracking this issue, at least for network kernel module r8169, seems to be:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1752772
I'd encourage everyone that is affected by this issue to go there and mark that it affects you, so that the maintainers have a better sense of how serious it is.
I'm running a fresh install of Xubuntu 18.04, and my Ethernet interface uses kernel module r8169, which I discovered running:
sudo lshw -C network
There'll be 2 groups of info, one starting with description: Ethernet interface
, and another with description: Wireless interface
. Under description: Ethernet interface
, look for a line starting with configuration:
, like this:
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8105e-1.fw ip=192.168.100.6 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
The driver will be here: driver=
.
Systemd runs all executable scripts under /lib/systemd/system-sleep
before and after suspend, passing 2 parameters, $1
is the state (pre
, before suspend, or post
, after suspend), and $2
is the action (suspend
, hibernate
, hybrid-state
, or suspend-then-hibernate
). This is documented in the man page for systemd-suspend.service
.
We need to reload the module for the Ethernet interface when resuming from suspend, after suspend. So I created script /lib/systemd/system-sleep/r8169-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 r8169
&& log "Removed r8169"
&& modprobe -i r8169
&& log "Inserted r8169"
fi
and made it executable:
chmod +x /lib/systemd/system-sleep/r8169-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:
grep r8169-refresh /var/log/syslog
1
Thanks, this was very helpful. This should be the accepted answer since it is a complete solution to the problem
– Carlos Roque
May 9 '18 at 15:27
madzohan, I feel it might be redundant to add your edit, since I mentioned twice in the answer that the script has to be executable: "systemd runs all executable scripts under /lib/systemd/system-sleep", and also "I created and made executable script /lib/systemd/system-sleep/r8169-refresh"
– Paulo Marcel Coelho Aragão
May 16 '18 at 21:03
This was fixed in kernel 4.15.0-24.26, released on 07/01/2018, so the workaround is not needed anymore.
– Paulo Marcel Coelho Aragão
Jul 24 '18 at 22:21
1
I have this problem on my laptop since installing some updates a few days ago. The solution given above does still solve the issue. Thanks a lot!
– Daniel
Jul 25 '18 at 19:54
@Daniel, could you post the output of: apt policy linux-image-generic ? This issue should have been solved since 07/01/2018, this workaround shouldn't be needed anymore.
– Paulo Marcel Coelho Aragão
Jul 25 '18 at 23:05
|
show 5 more comments
Here's another simple(r?) solution: create a systemd service whose only task is to unload/reload the module after a suspend cycle (I named it /etc/systemd/system/fix-r8169.service):
[Unit]
Description=Fix RTL-8169 Driver on resume from suspend
After=suspend.target
[Service]
User=root
Type=oneshot
ExecStartPre=/sbin/modprobe -r r8169
ExecStart=/sbin/modprobe r8169
TimeoutSec=0
StandardOutput=syslog
[Install]
WantedBy=suspend.target
Then just execute systemctl enable fix-r8169.service
, and you should be set!! Systemd will now automagically unload-and-reload your module upon wake from suspend.
Cheers!
add a comment |
It happened to me too.
Unload/reload network kernel modules/drivers works.
Mine is r8169, so (as root): (I typed by hand, so there was a delay)
sudo modprobe -r r8169
sudo modprobe -i r8169
I also removed mii during my first try. Not necessary though.
sudo modprobe -i r8169
– aaaa
Apr 28 '18 at 15:07
worked! do I have to do this manually now all the time i resume?
– aaaa
Apr 28 '18 at 15:07
This the same as the accepted solution, but without putting it in a script that will be executed at resume and without the logging function.
– Dominic108
Oct 14 '18 at 20:46
add a comment |
I had the same problem and i found this solution.
run:
sudo lshw -C network
to find your network card kernel module
In *-network, description: Ethernet interface, in configuration field found
driver=sky2
for me. sky2 is a ethernet network kernel module for my laptop.
I create a file sky2.sh into:
/lib/systemd/system-sleep/
folder with
#!/bin/bash
modprobe -r sky2 # unload sky2 kernel module
modprobe -i sky2 # reload sky2 kernel module
and change the permissions with:
sudo chmod a+x sky2.sh
After that the problem solved.
This is the same as the accepted solution, without the logging function.
– Dominic108
Oct 14 '18 at 20:26
add a comment |
i solved this broblem on my Ubuntu 18.04 Bionic by updating kernel from 4.15 to 4.20 (the latest on 16.01.2019) using UKUU
to install the latest kernel install Ubuntu Kernel Update Utility
sudo add-apt-repository ppa:teejee2008/ppa
sudo apt-get install ukuu
disable access control with the following command:
sudo xhost +
then install with ukuu
sudo ukuu
sudo ukuu --install-latest
and reboot
sudo reboot
New contributor
add a comment |
It detects the Ethernet Connection?
then
open NetworkManager.conf
sudo nano /etc/NetworkManager/NetworkManager.conf
Comment (Add #) the dns=dnsmasq
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
[ifupdown]
managed=true
Restart the Network manager
sudo service network-manager restart
[main] plugins=ifupdown,keyfile [ifupdown] managed=true [device] wifi.scan-rand-mac-address=no
– aaaa
Apr 28 '18 at 14:47
this is what I have in the file....
– aaaa
Apr 28 '18 at 14:48
did you update the conf file Previously? if yes reboot & check
– Santhosh Veer
Apr 28 '18 at 14:50
I tried your fix Santhosh Veer. Still greyed out. Ethernet.
– aaaa
Apr 28 '18 at 14:51
run this commandsystemctl status NetworkManager.service
to check the error
– Santhosh Veer
Apr 28 '18 at 14:54
add a comment |
Press Ctrl+Alt+T to go to a terminal and type:
sudo apt-get purge tlp
or
edit /etc/default/tlp
and change:
WOL_DISABLE = NO
to
WOL_DISABLE = YES
Welcome to Ask Ubuntu! ;-) Could you please review my edits and also review the editing help to improve the readability of your answers in the future... ;-)
– Fabby
Jul 1 '18 at 10:16
add a comment |
I don't have enough reputation to comment or upvote the accepted answer (which is now outdated)
If you run lsmod | grep r8169
and it shows that you have the r8169 kernel module loaded, and your kernel is older than 4.15.0-24-generic then you are most likely affected by the bug linked in the accepted answer
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1752772
BTW I experienced this bug and for me lspci | grep 'Gigabit Ethernet'
shows
RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
This bug has been fixed.
If your kernel is older than 4.15.0-24-generic, just run
apt-get update
apt-get upgrade
apt-get dist-upgrade
reboot
add a comment |
I had the same problem but the solutions here did not work for me. I spent days going through several forums on this subject and tried just about everything. Two alternative solutions are mentioned, upgrade the Kernel or install the previous module driver. I chose the latter and installed the r8168 driver. Initially, that also failed. However, I discovered something that works and adapted it to the solution from Paulo.
I'm running (K)ubuntu 18.04 with Kernel 4.15.0-24-generic.
The output from lshw -C network includes this ...
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:05:00.0
logical name: enp5s0
version: 0c
serial: 80:fa:5b:49:69:b3
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.045.08-NAPI duplex=full ip=192.168.10.213 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:133 ioport:e000(size=256) memory:df000000-df000fff memory:d0000000-d0003fff
I installed the package r8168-dkms, however that was not enough. Two further steps were required.
Step 1) Edit the file /etc/modprobe.d/r8168-dkms.conf and enable the line (i.e. remove the comment) blacklist r8169
Step 2) Based on the solution from Paulo I created the following 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
log "ifconfig down enp5s0"
ifconfig enp5s0 down
log "ifconfig up enp5s0"
ifconfig enp5s0 192.168.10.213
fi
This code is of course specific to my machine (device name and IP-address). It could certainly be improved but it meets my needs at the moment.
This works will with NetworkManager.
add a comment |
This happened to me as well with a Gigabyte-B250M-DS3H motherboard after upgrading from Ubuntu 16.04 to 18.04 on July 28, 2018. The kernel is 4.15.0-29-generic.
The result of sudo lshw -C network
showed RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller, while it showed that r8169 is the driver used.
What finally worked was installing the driver specific to the Ethernet controller (big surprise):
sudo apt install r8168-dkms
and then restarting the computer (Thanks andypotter). I did not have to blacklist r8169, but I did still have to create a script in /lib/systemd/system-sleep/
that I called r8168-refresh-after-suspend
(a la Paulo's advice) that would remove and reinsert r8168:
#!/bin/bash
# $1 is the state (pre or post)
# $2 is the action (suspend)
case $1/$2 in
pre/suspend)
modprobe -r r8168
;;
post/suspend)
modprobe -i r8168
;;
esac
and, of course, make it executable with:
sudo chmod +x /lib/systemd/system-sleep/r8168-refresh-after-suspend
This worked like a charm. So, this is still an issue in the 4.15.0-29 kernel, but the band-aid fix still works.
add a comment |
I have the same problem (driver=r8169), Ethernet does not work after resume from suspend.
It works perfectly well with kernel 4.13.0-31. In other words the Ethernet continues to work after resuming from suspend.
But with kernel 4.15.0-32 the Ethernet does not work after resuming from suspend.
I have tried the fix
modprobe -r r8169
modprobe -i r8169
but this has no effect.
I have reported this to
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1752772
1
This is not really an answer, unless you're suggesting to use kernel 4.13.
– wjandrea
Oct 27 '18 at 21:20
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1029250%2fubuntu-18-04-ethernet-disconnected-after-suspend%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
11 Answers
11
active
oldest
votes
11 Answers
11
active
oldest
votes
active
oldest
votes
active
oldest
votes
The main Ubuntu bug tracking this issue, at least for network kernel module r8169, seems to be:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1752772
I'd encourage everyone that is affected by this issue to go there and mark that it affects you, so that the maintainers have a better sense of how serious it is.
I'm running a fresh install of Xubuntu 18.04, and my Ethernet interface uses kernel module r8169, which I discovered running:
sudo lshw -C network
There'll be 2 groups of info, one starting with description: Ethernet interface
, and another with description: Wireless interface
. Under description: Ethernet interface
, look for a line starting with configuration:
, like this:
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8105e-1.fw ip=192.168.100.6 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
The driver will be here: driver=
.
Systemd runs all executable scripts under /lib/systemd/system-sleep
before and after suspend, passing 2 parameters, $1
is the state (pre
, before suspend, or post
, after suspend), and $2
is the action (suspend
, hibernate
, hybrid-state
, or suspend-then-hibernate
). This is documented in the man page for systemd-suspend.service
.
We need to reload the module for the Ethernet interface when resuming from suspend, after suspend. So I created script /lib/systemd/system-sleep/r8169-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 r8169
&& log "Removed r8169"
&& modprobe -i r8169
&& log "Inserted r8169"
fi
and made it executable:
chmod +x /lib/systemd/system-sleep/r8169-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:
grep r8169-refresh /var/log/syslog
1
Thanks, this was very helpful. This should be the accepted answer since it is a complete solution to the problem
– Carlos Roque
May 9 '18 at 15:27
madzohan, I feel it might be redundant to add your edit, since I mentioned twice in the answer that the script has to be executable: "systemd runs all executable scripts under /lib/systemd/system-sleep", and also "I created and made executable script /lib/systemd/system-sleep/r8169-refresh"
– Paulo Marcel Coelho Aragão
May 16 '18 at 21:03
This was fixed in kernel 4.15.0-24.26, released on 07/01/2018, so the workaround is not needed anymore.
– Paulo Marcel Coelho Aragão
Jul 24 '18 at 22:21
1
I have this problem on my laptop since installing some updates a few days ago. The solution given above does still solve the issue. Thanks a lot!
– Daniel
Jul 25 '18 at 19:54
@Daniel, could you post the output of: apt policy linux-image-generic ? This issue should have been solved since 07/01/2018, this workaround shouldn't be needed anymore.
– Paulo Marcel Coelho Aragão
Jul 25 '18 at 23:05
|
show 5 more comments
The main Ubuntu bug tracking this issue, at least for network kernel module r8169, seems to be:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1752772
I'd encourage everyone that is affected by this issue to go there and mark that it affects you, so that the maintainers have a better sense of how serious it is.
I'm running a fresh install of Xubuntu 18.04, and my Ethernet interface uses kernel module r8169, which I discovered running:
sudo lshw -C network
There'll be 2 groups of info, one starting with description: Ethernet interface
, and another with description: Wireless interface
. Under description: Ethernet interface
, look for a line starting with configuration:
, like this:
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8105e-1.fw ip=192.168.100.6 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
The driver will be here: driver=
.
Systemd runs all executable scripts under /lib/systemd/system-sleep
before and after suspend, passing 2 parameters, $1
is the state (pre
, before suspend, or post
, after suspend), and $2
is the action (suspend
, hibernate
, hybrid-state
, or suspend-then-hibernate
). This is documented in the man page for systemd-suspend.service
.
We need to reload the module for the Ethernet interface when resuming from suspend, after suspend. So I created script /lib/systemd/system-sleep/r8169-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 r8169
&& log "Removed r8169"
&& modprobe -i r8169
&& log "Inserted r8169"
fi
and made it executable:
chmod +x /lib/systemd/system-sleep/r8169-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:
grep r8169-refresh /var/log/syslog
1
Thanks, this was very helpful. This should be the accepted answer since it is a complete solution to the problem
– Carlos Roque
May 9 '18 at 15:27
madzohan, I feel it might be redundant to add your edit, since I mentioned twice in the answer that the script has to be executable: "systemd runs all executable scripts under /lib/systemd/system-sleep", and also "I created and made executable script /lib/systemd/system-sleep/r8169-refresh"
– Paulo Marcel Coelho Aragão
May 16 '18 at 21:03
This was fixed in kernel 4.15.0-24.26, released on 07/01/2018, so the workaround is not needed anymore.
– Paulo Marcel Coelho Aragão
Jul 24 '18 at 22:21
1
I have this problem on my laptop since installing some updates a few days ago. The solution given above does still solve the issue. Thanks a lot!
– Daniel
Jul 25 '18 at 19:54
@Daniel, could you post the output of: apt policy linux-image-generic ? This issue should have been solved since 07/01/2018, this workaround shouldn't be needed anymore.
– Paulo Marcel Coelho Aragão
Jul 25 '18 at 23:05
|
show 5 more comments
The main Ubuntu bug tracking this issue, at least for network kernel module r8169, seems to be:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1752772
I'd encourage everyone that is affected by this issue to go there and mark that it affects you, so that the maintainers have a better sense of how serious it is.
I'm running a fresh install of Xubuntu 18.04, and my Ethernet interface uses kernel module r8169, which I discovered running:
sudo lshw -C network
There'll be 2 groups of info, one starting with description: Ethernet interface
, and another with description: Wireless interface
. Under description: Ethernet interface
, look for a line starting with configuration:
, like this:
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8105e-1.fw ip=192.168.100.6 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
The driver will be here: driver=
.
Systemd runs all executable scripts under /lib/systemd/system-sleep
before and after suspend, passing 2 parameters, $1
is the state (pre
, before suspend, or post
, after suspend), and $2
is the action (suspend
, hibernate
, hybrid-state
, or suspend-then-hibernate
). This is documented in the man page for systemd-suspend.service
.
We need to reload the module for the Ethernet interface when resuming from suspend, after suspend. So I created script /lib/systemd/system-sleep/r8169-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 r8169
&& log "Removed r8169"
&& modprobe -i r8169
&& log "Inserted r8169"
fi
and made it executable:
chmod +x /lib/systemd/system-sleep/r8169-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:
grep r8169-refresh /var/log/syslog
The main Ubuntu bug tracking this issue, at least for network kernel module r8169, seems to be:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1752772
I'd encourage everyone that is affected by this issue to go there and mark that it affects you, so that the maintainers have a better sense of how serious it is.
I'm running a fresh install of Xubuntu 18.04, and my Ethernet interface uses kernel module r8169, which I discovered running:
sudo lshw -C network
There'll be 2 groups of info, one starting with description: Ethernet interface
, and another with description: Wireless interface
. Under description: Ethernet interface
, look for a line starting with configuration:
, like this:
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8105e-1.fw ip=192.168.100.6 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
The driver will be here: driver=
.
Systemd runs all executable scripts under /lib/systemd/system-sleep
before and after suspend, passing 2 parameters, $1
is the state (pre
, before suspend, or post
, after suspend), and $2
is the action (suspend
, hibernate
, hybrid-state
, or suspend-then-hibernate
). This is documented in the man page for systemd-suspend.service
.
We need to reload the module for the Ethernet interface when resuming from suspend, after suspend. So I created script /lib/systemd/system-sleep/r8169-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 r8169
&& log "Removed r8169"
&& modprobe -i r8169
&& log "Inserted r8169"
fi
and made it executable:
chmod +x /lib/systemd/system-sleep/r8169-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:
grep r8169-refresh /var/log/syslog
edited Sep 25 '18 at 9:51
David Foerster
27.9k1364110
27.9k1364110
answered Apr 30 '18 at 14:34
Paulo Marcel Coelho AragãoPaulo Marcel Coelho Aragão
523311
523311
1
Thanks, this was very helpful. This should be the accepted answer since it is a complete solution to the problem
– Carlos Roque
May 9 '18 at 15:27
madzohan, I feel it might be redundant to add your edit, since I mentioned twice in the answer that the script has to be executable: "systemd runs all executable scripts under /lib/systemd/system-sleep", and also "I created and made executable script /lib/systemd/system-sleep/r8169-refresh"
– Paulo Marcel Coelho Aragão
May 16 '18 at 21:03
This was fixed in kernel 4.15.0-24.26, released on 07/01/2018, so the workaround is not needed anymore.
– Paulo Marcel Coelho Aragão
Jul 24 '18 at 22:21
1
I have this problem on my laptop since installing some updates a few days ago. The solution given above does still solve the issue. Thanks a lot!
– Daniel
Jul 25 '18 at 19:54
@Daniel, could you post the output of: apt policy linux-image-generic ? This issue should have been solved since 07/01/2018, this workaround shouldn't be needed anymore.
– Paulo Marcel Coelho Aragão
Jul 25 '18 at 23:05
|
show 5 more comments
1
Thanks, this was very helpful. This should be the accepted answer since it is a complete solution to the problem
– Carlos Roque
May 9 '18 at 15:27
madzohan, I feel it might be redundant to add your edit, since I mentioned twice in the answer that the script has to be executable: "systemd runs all executable scripts under /lib/systemd/system-sleep", and also "I created and made executable script /lib/systemd/system-sleep/r8169-refresh"
– Paulo Marcel Coelho Aragão
May 16 '18 at 21:03
This was fixed in kernel 4.15.0-24.26, released on 07/01/2018, so the workaround is not needed anymore.
– Paulo Marcel Coelho Aragão
Jul 24 '18 at 22:21
1
I have this problem on my laptop since installing some updates a few days ago. The solution given above does still solve the issue. Thanks a lot!
– Daniel
Jul 25 '18 at 19:54
@Daniel, could you post the output of: apt policy linux-image-generic ? This issue should have been solved since 07/01/2018, this workaround shouldn't be needed anymore.
– Paulo Marcel Coelho Aragão
Jul 25 '18 at 23:05
1
1
Thanks, this was very helpful. This should be the accepted answer since it is a complete solution to the problem
– Carlos Roque
May 9 '18 at 15:27
Thanks, this was very helpful. This should be the accepted answer since it is a complete solution to the problem
– Carlos Roque
May 9 '18 at 15:27
madzohan, I feel it might be redundant to add your edit, since I mentioned twice in the answer that the script has to be executable: "systemd runs all executable scripts under /lib/systemd/system-sleep", and also "I created and made executable script /lib/systemd/system-sleep/r8169-refresh"
– Paulo Marcel Coelho Aragão
May 16 '18 at 21:03
madzohan, I feel it might be redundant to add your edit, since I mentioned twice in the answer that the script has to be executable: "systemd runs all executable scripts under /lib/systemd/system-sleep", and also "I created and made executable script /lib/systemd/system-sleep/r8169-refresh"
– Paulo Marcel Coelho Aragão
May 16 '18 at 21:03
This was fixed in kernel 4.15.0-24.26, released on 07/01/2018, so the workaround is not needed anymore.
– Paulo Marcel Coelho Aragão
Jul 24 '18 at 22:21
This was fixed in kernel 4.15.0-24.26, released on 07/01/2018, so the workaround is not needed anymore.
– Paulo Marcel Coelho Aragão
Jul 24 '18 at 22:21
1
1
I have this problem on my laptop since installing some updates a few days ago. The solution given above does still solve the issue. Thanks a lot!
– Daniel
Jul 25 '18 at 19:54
I have this problem on my laptop since installing some updates a few days ago. The solution given above does still solve the issue. Thanks a lot!
– Daniel
Jul 25 '18 at 19:54
@Daniel, could you post the output of: apt policy linux-image-generic ? This issue should have been solved since 07/01/2018, this workaround shouldn't be needed anymore.
– Paulo Marcel Coelho Aragão
Jul 25 '18 at 23:05
@Daniel, could you post the output of: apt policy linux-image-generic ? This issue should have been solved since 07/01/2018, this workaround shouldn't be needed anymore.
– Paulo Marcel Coelho Aragão
Jul 25 '18 at 23:05
|
show 5 more comments
Here's another simple(r?) solution: create a systemd service whose only task is to unload/reload the module after a suspend cycle (I named it /etc/systemd/system/fix-r8169.service):
[Unit]
Description=Fix RTL-8169 Driver on resume from suspend
After=suspend.target
[Service]
User=root
Type=oneshot
ExecStartPre=/sbin/modprobe -r r8169
ExecStart=/sbin/modprobe r8169
TimeoutSec=0
StandardOutput=syslog
[Install]
WantedBy=suspend.target
Then just execute systemctl enable fix-r8169.service
, and you should be set!! Systemd will now automagically unload-and-reload your module upon wake from suspend.
Cheers!
add a comment |
Here's another simple(r?) solution: create a systemd service whose only task is to unload/reload the module after a suspend cycle (I named it /etc/systemd/system/fix-r8169.service):
[Unit]
Description=Fix RTL-8169 Driver on resume from suspend
After=suspend.target
[Service]
User=root
Type=oneshot
ExecStartPre=/sbin/modprobe -r r8169
ExecStart=/sbin/modprobe r8169
TimeoutSec=0
StandardOutput=syslog
[Install]
WantedBy=suspend.target
Then just execute systemctl enable fix-r8169.service
, and you should be set!! Systemd will now automagically unload-and-reload your module upon wake from suspend.
Cheers!
add a comment |
Here's another simple(r?) solution: create a systemd service whose only task is to unload/reload the module after a suspend cycle (I named it /etc/systemd/system/fix-r8169.service):
[Unit]
Description=Fix RTL-8169 Driver on resume from suspend
After=suspend.target
[Service]
User=root
Type=oneshot
ExecStartPre=/sbin/modprobe -r r8169
ExecStart=/sbin/modprobe r8169
TimeoutSec=0
StandardOutput=syslog
[Install]
WantedBy=suspend.target
Then just execute systemctl enable fix-r8169.service
, and you should be set!! Systemd will now automagically unload-and-reload your module upon wake from suspend.
Cheers!
Here's another simple(r?) solution: create a systemd service whose only task is to unload/reload the module after a suspend cycle (I named it /etc/systemd/system/fix-r8169.service):
[Unit]
Description=Fix RTL-8169 Driver on resume from suspend
After=suspend.target
[Service]
User=root
Type=oneshot
ExecStartPre=/sbin/modprobe -r r8169
ExecStart=/sbin/modprobe r8169
TimeoutSec=0
StandardOutput=syslog
[Install]
WantedBy=suspend.target
Then just execute systemctl enable fix-r8169.service
, and you should be set!! Systemd will now automagically unload-and-reload your module upon wake from suspend.
Cheers!
answered Jul 23 '18 at 19:16
Diego RiveraDiego Rivera
464
464
add a comment |
add a comment |
It happened to me too.
Unload/reload network kernel modules/drivers works.
Mine is r8169, so (as root): (I typed by hand, so there was a delay)
sudo modprobe -r r8169
sudo modprobe -i r8169
I also removed mii during my first try. Not necessary though.
sudo modprobe -i r8169
– aaaa
Apr 28 '18 at 15:07
worked! do I have to do this manually now all the time i resume?
– aaaa
Apr 28 '18 at 15:07
This the same as the accepted solution, but without putting it in a script that will be executed at resume and without the logging function.
– Dominic108
Oct 14 '18 at 20:46
add a comment |
It happened to me too.
Unload/reload network kernel modules/drivers works.
Mine is r8169, so (as root): (I typed by hand, so there was a delay)
sudo modprobe -r r8169
sudo modprobe -i r8169
I also removed mii during my first try. Not necessary though.
sudo modprobe -i r8169
– aaaa
Apr 28 '18 at 15:07
worked! do I have to do this manually now all the time i resume?
– aaaa
Apr 28 '18 at 15:07
This the same as the accepted solution, but without putting it in a script that will be executed at resume and without the logging function.
– Dominic108
Oct 14 '18 at 20:46
add a comment |
It happened to me too.
Unload/reload network kernel modules/drivers works.
Mine is r8169, so (as root): (I typed by hand, so there was a delay)
sudo modprobe -r r8169
sudo modprobe -i r8169
I also removed mii during my first try. Not necessary though.
It happened to me too.
Unload/reload network kernel modules/drivers works.
Mine is r8169, so (as root): (I typed by hand, so there was a delay)
sudo modprobe -r r8169
sudo modprobe -i r8169
I also removed mii during my first try. Not necessary though.
edited Aug 25 '18 at 2:58
abu_bua
3,27981126
3,27981126
answered Apr 28 '18 at 14:54
MAguestMAguest
311
311
sudo modprobe -i r8169
– aaaa
Apr 28 '18 at 15:07
worked! do I have to do this manually now all the time i resume?
– aaaa
Apr 28 '18 at 15:07
This the same as the accepted solution, but without putting it in a script that will be executed at resume and without the logging function.
– Dominic108
Oct 14 '18 at 20:46
add a comment |
sudo modprobe -i r8169
– aaaa
Apr 28 '18 at 15:07
worked! do I have to do this manually now all the time i resume?
– aaaa
Apr 28 '18 at 15:07
This the same as the accepted solution, but without putting it in a script that will be executed at resume and without the logging function.
– Dominic108
Oct 14 '18 at 20:46
sudo modprobe -i r8169
– aaaa
Apr 28 '18 at 15:07
sudo modprobe -i r8169
– aaaa
Apr 28 '18 at 15:07
worked! do I have to do this manually now all the time i resume?
– aaaa
Apr 28 '18 at 15:07
worked! do I have to do this manually now all the time i resume?
– aaaa
Apr 28 '18 at 15:07
This the same as the accepted solution, but without putting it in a script that will be executed at resume and without the logging function.
– Dominic108
Oct 14 '18 at 20:46
This the same as the accepted solution, but without putting it in a script that will be executed at resume and without the logging function.
– Dominic108
Oct 14 '18 at 20:46
add a comment |
I had the same problem and i found this solution.
run:
sudo lshw -C network
to find your network card kernel module
In *-network, description: Ethernet interface, in configuration field found
driver=sky2
for me. sky2 is a ethernet network kernel module for my laptop.
I create a file sky2.sh into:
/lib/systemd/system-sleep/
folder with
#!/bin/bash
modprobe -r sky2 # unload sky2 kernel module
modprobe -i sky2 # reload sky2 kernel module
and change the permissions with:
sudo chmod a+x sky2.sh
After that the problem solved.
This is the same as the accepted solution, without the logging function.
– Dominic108
Oct 14 '18 at 20:26
add a comment |
I had the same problem and i found this solution.
run:
sudo lshw -C network
to find your network card kernel module
In *-network, description: Ethernet interface, in configuration field found
driver=sky2
for me. sky2 is a ethernet network kernel module for my laptop.
I create a file sky2.sh into:
/lib/systemd/system-sleep/
folder with
#!/bin/bash
modprobe -r sky2 # unload sky2 kernel module
modprobe -i sky2 # reload sky2 kernel module
and change the permissions with:
sudo chmod a+x sky2.sh
After that the problem solved.
This is the same as the accepted solution, without the logging function.
– Dominic108
Oct 14 '18 at 20:26
add a comment |
I had the same problem and i found this solution.
run:
sudo lshw -C network
to find your network card kernel module
In *-network, description: Ethernet interface, in configuration field found
driver=sky2
for me. sky2 is a ethernet network kernel module for my laptop.
I create a file sky2.sh into:
/lib/systemd/system-sleep/
folder with
#!/bin/bash
modprobe -r sky2 # unload sky2 kernel module
modprobe -i sky2 # reload sky2 kernel module
and change the permissions with:
sudo chmod a+x sky2.sh
After that the problem solved.
I had the same problem and i found this solution.
run:
sudo lshw -C network
to find your network card kernel module
In *-network, description: Ethernet interface, in configuration field found
driver=sky2
for me. sky2 is a ethernet network kernel module for my laptop.
I create a file sky2.sh into:
/lib/systemd/system-sleep/
folder with
#!/bin/bash
modprobe -r sky2 # unload sky2 kernel module
modprobe -i sky2 # reload sky2 kernel module
and change the permissions with:
sudo chmod a+x sky2.sh
After that the problem solved.
edited Aug 25 '18 at 3:14
abu_bua
3,27981126
3,27981126
answered Apr 29 '18 at 6:32
Kostas VekrakisKostas Vekrakis
211
211
This is the same as the accepted solution, without the logging function.
– Dominic108
Oct 14 '18 at 20:26
add a comment |
This is the same as the accepted solution, without the logging function.
– Dominic108
Oct 14 '18 at 20:26
This is the same as the accepted solution, without the logging function.
– Dominic108
Oct 14 '18 at 20:26
This is the same as the accepted solution, without the logging function.
– Dominic108
Oct 14 '18 at 20:26
add a comment |
i solved this broblem on my Ubuntu 18.04 Bionic by updating kernel from 4.15 to 4.20 (the latest on 16.01.2019) using UKUU
to install the latest kernel install Ubuntu Kernel Update Utility
sudo add-apt-repository ppa:teejee2008/ppa
sudo apt-get install ukuu
disable access control with the following command:
sudo xhost +
then install with ukuu
sudo ukuu
sudo ukuu --install-latest
and reboot
sudo reboot
New contributor
add a comment |
i solved this broblem on my Ubuntu 18.04 Bionic by updating kernel from 4.15 to 4.20 (the latest on 16.01.2019) using UKUU
to install the latest kernel install Ubuntu Kernel Update Utility
sudo add-apt-repository ppa:teejee2008/ppa
sudo apt-get install ukuu
disable access control with the following command:
sudo xhost +
then install with ukuu
sudo ukuu
sudo ukuu --install-latest
and reboot
sudo reboot
New contributor
add a comment |
i solved this broblem on my Ubuntu 18.04 Bionic by updating kernel from 4.15 to 4.20 (the latest on 16.01.2019) using UKUU
to install the latest kernel install Ubuntu Kernel Update Utility
sudo add-apt-repository ppa:teejee2008/ppa
sudo apt-get install ukuu
disable access control with the following command:
sudo xhost +
then install with ukuu
sudo ukuu
sudo ukuu --install-latest
and reboot
sudo reboot
New contributor
i solved this broblem on my Ubuntu 18.04 Bionic by updating kernel from 4.15 to 4.20 (the latest on 16.01.2019) using UKUU
to install the latest kernel install Ubuntu Kernel Update Utility
sudo add-apt-repository ppa:teejee2008/ppa
sudo apt-get install ukuu
disable access control with the following command:
sudo xhost +
then install with ukuu
sudo ukuu
sudo ukuu --install-latest
and reboot
sudo reboot
New contributor
New contributor
answered Jan 16 at 15:40
Vitaliy LiBrusVitaliy LiBrus
112
112
New contributor
New contributor
add a comment |
add a comment |
It detects the Ethernet Connection?
then
open NetworkManager.conf
sudo nano /etc/NetworkManager/NetworkManager.conf
Comment (Add #) the dns=dnsmasq
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
[ifupdown]
managed=true
Restart the Network manager
sudo service network-manager restart
[main] plugins=ifupdown,keyfile [ifupdown] managed=true [device] wifi.scan-rand-mac-address=no
– aaaa
Apr 28 '18 at 14:47
this is what I have in the file....
– aaaa
Apr 28 '18 at 14:48
did you update the conf file Previously? if yes reboot & check
– Santhosh Veer
Apr 28 '18 at 14:50
I tried your fix Santhosh Veer. Still greyed out. Ethernet.
– aaaa
Apr 28 '18 at 14:51
run this commandsystemctl status NetworkManager.service
to check the error
– Santhosh Veer
Apr 28 '18 at 14:54
add a comment |
It detects the Ethernet Connection?
then
open NetworkManager.conf
sudo nano /etc/NetworkManager/NetworkManager.conf
Comment (Add #) the dns=dnsmasq
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
[ifupdown]
managed=true
Restart the Network manager
sudo service network-manager restart
[main] plugins=ifupdown,keyfile [ifupdown] managed=true [device] wifi.scan-rand-mac-address=no
– aaaa
Apr 28 '18 at 14:47
this is what I have in the file....
– aaaa
Apr 28 '18 at 14:48
did you update the conf file Previously? if yes reboot & check
– Santhosh Veer
Apr 28 '18 at 14:50
I tried your fix Santhosh Veer. Still greyed out. Ethernet.
– aaaa
Apr 28 '18 at 14:51
run this commandsystemctl status NetworkManager.service
to check the error
– Santhosh Veer
Apr 28 '18 at 14:54
add a comment |
It detects the Ethernet Connection?
then
open NetworkManager.conf
sudo nano /etc/NetworkManager/NetworkManager.conf
Comment (Add #) the dns=dnsmasq
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
[ifupdown]
managed=true
Restart the Network manager
sudo service network-manager restart
It detects the Ethernet Connection?
then
open NetworkManager.conf
sudo nano /etc/NetworkManager/NetworkManager.conf
Comment (Add #) the dns=dnsmasq
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
[ifupdown]
managed=true
Restart the Network manager
sudo service network-manager restart
answered Apr 28 '18 at 14:46
Santhosh VeerSanthosh Veer
2817
2817
[main] plugins=ifupdown,keyfile [ifupdown] managed=true [device] wifi.scan-rand-mac-address=no
– aaaa
Apr 28 '18 at 14:47
this is what I have in the file....
– aaaa
Apr 28 '18 at 14:48
did you update the conf file Previously? if yes reboot & check
– Santhosh Veer
Apr 28 '18 at 14:50
I tried your fix Santhosh Veer. Still greyed out. Ethernet.
– aaaa
Apr 28 '18 at 14:51
run this commandsystemctl status NetworkManager.service
to check the error
– Santhosh Veer
Apr 28 '18 at 14:54
add a comment |
[main] plugins=ifupdown,keyfile [ifupdown] managed=true [device] wifi.scan-rand-mac-address=no
– aaaa
Apr 28 '18 at 14:47
this is what I have in the file....
– aaaa
Apr 28 '18 at 14:48
did you update the conf file Previously? if yes reboot & check
– Santhosh Veer
Apr 28 '18 at 14:50
I tried your fix Santhosh Veer. Still greyed out. Ethernet.
– aaaa
Apr 28 '18 at 14:51
run this commandsystemctl status NetworkManager.service
to check the error
– Santhosh Veer
Apr 28 '18 at 14:54
[main] plugins=ifupdown,keyfile [ifupdown] managed=true [device] wifi.scan-rand-mac-address=no
– aaaa
Apr 28 '18 at 14:47
[main] plugins=ifupdown,keyfile [ifupdown] managed=true [device] wifi.scan-rand-mac-address=no
– aaaa
Apr 28 '18 at 14:47
this is what I have in the file....
– aaaa
Apr 28 '18 at 14:48
this is what I have in the file....
– aaaa
Apr 28 '18 at 14:48
did you update the conf file Previously? if yes reboot & check
– Santhosh Veer
Apr 28 '18 at 14:50
did you update the conf file Previously? if yes reboot & check
– Santhosh Veer
Apr 28 '18 at 14:50
I tried your fix Santhosh Veer. Still greyed out. Ethernet.
– aaaa
Apr 28 '18 at 14:51
I tried your fix Santhosh Veer. Still greyed out. Ethernet.
– aaaa
Apr 28 '18 at 14:51
run this command
systemctl status NetworkManager.service
to check the error– Santhosh Veer
Apr 28 '18 at 14:54
run this command
systemctl status NetworkManager.service
to check the error– Santhosh Veer
Apr 28 '18 at 14:54
add a comment |
Press Ctrl+Alt+T to go to a terminal and type:
sudo apt-get purge tlp
or
edit /etc/default/tlp
and change:
WOL_DISABLE = NO
to
WOL_DISABLE = YES
Welcome to Ask Ubuntu! ;-) Could you please review my edits and also review the editing help to improve the readability of your answers in the future... ;-)
– Fabby
Jul 1 '18 at 10:16
add a comment |
Press Ctrl+Alt+T to go to a terminal and type:
sudo apt-get purge tlp
or
edit /etc/default/tlp
and change:
WOL_DISABLE = NO
to
WOL_DISABLE = YES
Welcome to Ask Ubuntu! ;-) Could you please review my edits and also review the editing help to improve the readability of your answers in the future... ;-)
– Fabby
Jul 1 '18 at 10:16
add a comment |
Press Ctrl+Alt+T to go to a terminal and type:
sudo apt-get purge tlp
or
edit /etc/default/tlp
and change:
WOL_DISABLE = NO
to
WOL_DISABLE = YES
Press Ctrl+Alt+T to go to a terminal and type:
sudo apt-get purge tlp
or
edit /etc/default/tlp
and change:
WOL_DISABLE = NO
to
WOL_DISABLE = YES
edited Jul 1 '18 at 10:15
Fabby
26.6k1360159
26.6k1360159
answered Jul 1 '18 at 7:26
갤럭시제로갤럭시제로
1
1
Welcome to Ask Ubuntu! ;-) Could you please review my edits and also review the editing help to improve the readability of your answers in the future... ;-)
– Fabby
Jul 1 '18 at 10:16
add a comment |
Welcome to Ask Ubuntu! ;-) Could you please review my edits and also review the editing help to improve the readability of your answers in the future... ;-)
– Fabby
Jul 1 '18 at 10:16
Welcome to Ask Ubuntu! ;-) Could you please review my edits and also review the editing help to improve the readability of your answers in the future... ;-)
– Fabby
Jul 1 '18 at 10:16
Welcome to Ask Ubuntu! ;-) Could you please review my edits and also review the editing help to improve the readability of your answers in the future... ;-)
– Fabby
Jul 1 '18 at 10:16
add a comment |
I don't have enough reputation to comment or upvote the accepted answer (which is now outdated)
If you run lsmod | grep r8169
and it shows that you have the r8169 kernel module loaded, and your kernel is older than 4.15.0-24-generic then you are most likely affected by the bug linked in the accepted answer
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1752772
BTW I experienced this bug and for me lspci | grep 'Gigabit Ethernet'
shows
RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
This bug has been fixed.
If your kernel is older than 4.15.0-24-generic, just run
apt-get update
apt-get upgrade
apt-get dist-upgrade
reboot
add a comment |
I don't have enough reputation to comment or upvote the accepted answer (which is now outdated)
If you run lsmod | grep r8169
and it shows that you have the r8169 kernel module loaded, and your kernel is older than 4.15.0-24-generic then you are most likely affected by the bug linked in the accepted answer
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1752772
BTW I experienced this bug and for me lspci | grep 'Gigabit Ethernet'
shows
RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
This bug has been fixed.
If your kernel is older than 4.15.0-24-generic, just run
apt-get update
apt-get upgrade
apt-get dist-upgrade
reboot
add a comment |
I don't have enough reputation to comment or upvote the accepted answer (which is now outdated)
If you run lsmod | grep r8169
and it shows that you have the r8169 kernel module loaded, and your kernel is older than 4.15.0-24-generic then you are most likely affected by the bug linked in the accepted answer
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1752772
BTW I experienced this bug and for me lspci | grep 'Gigabit Ethernet'
shows
RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
This bug has been fixed.
If your kernel is older than 4.15.0-24-generic, just run
apt-get update
apt-get upgrade
apt-get dist-upgrade
reboot
I don't have enough reputation to comment or upvote the accepted answer (which is now outdated)
If you run lsmod | grep r8169
and it shows that you have the r8169 kernel module loaded, and your kernel is older than 4.15.0-24-generic then you are most likely affected by the bug linked in the accepted answer
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1752772
BTW I experienced this bug and for me lspci | grep 'Gigabit Ethernet'
shows
RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
This bug has been fixed.
If your kernel is older than 4.15.0-24-generic, just run
apt-get update
apt-get upgrade
apt-get dist-upgrade
reboot
answered Jul 3 '18 at 16:23
LopeLope
1
1
add a comment |
add a comment |
I had the same problem but the solutions here did not work for me. I spent days going through several forums on this subject and tried just about everything. Two alternative solutions are mentioned, upgrade the Kernel or install the previous module driver. I chose the latter and installed the r8168 driver. Initially, that also failed. However, I discovered something that works and adapted it to the solution from Paulo.
I'm running (K)ubuntu 18.04 with Kernel 4.15.0-24-generic.
The output from lshw -C network includes this ...
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:05:00.0
logical name: enp5s0
version: 0c
serial: 80:fa:5b:49:69:b3
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.045.08-NAPI duplex=full ip=192.168.10.213 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:133 ioport:e000(size=256) memory:df000000-df000fff memory:d0000000-d0003fff
I installed the package r8168-dkms, however that was not enough. Two further steps were required.
Step 1) Edit the file /etc/modprobe.d/r8168-dkms.conf and enable the line (i.e. remove the comment) blacklist r8169
Step 2) Based on the solution from Paulo I created the following 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
log "ifconfig down enp5s0"
ifconfig enp5s0 down
log "ifconfig up enp5s0"
ifconfig enp5s0 192.168.10.213
fi
This code is of course specific to my machine (device name and IP-address). It could certainly be improved but it meets my needs at the moment.
This works will with NetworkManager.
add a comment |
I had the same problem but the solutions here did not work for me. I spent days going through several forums on this subject and tried just about everything. Two alternative solutions are mentioned, upgrade the Kernel or install the previous module driver. I chose the latter and installed the r8168 driver. Initially, that also failed. However, I discovered something that works and adapted it to the solution from Paulo.
I'm running (K)ubuntu 18.04 with Kernel 4.15.0-24-generic.
The output from lshw -C network includes this ...
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:05:00.0
logical name: enp5s0
version: 0c
serial: 80:fa:5b:49:69:b3
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.045.08-NAPI duplex=full ip=192.168.10.213 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:133 ioport:e000(size=256) memory:df000000-df000fff memory:d0000000-d0003fff
I installed the package r8168-dkms, however that was not enough. Two further steps were required.
Step 1) Edit the file /etc/modprobe.d/r8168-dkms.conf and enable the line (i.e. remove the comment) blacklist r8169
Step 2) Based on the solution from Paulo I created the following 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
log "ifconfig down enp5s0"
ifconfig enp5s0 down
log "ifconfig up enp5s0"
ifconfig enp5s0 192.168.10.213
fi
This code is of course specific to my machine (device name and IP-address). It could certainly be improved but it meets my needs at the moment.
This works will with NetworkManager.
add a comment |
I had the same problem but the solutions here did not work for me. I spent days going through several forums on this subject and tried just about everything. Two alternative solutions are mentioned, upgrade the Kernel or install the previous module driver. I chose the latter and installed the r8168 driver. Initially, that also failed. However, I discovered something that works and adapted it to the solution from Paulo.
I'm running (K)ubuntu 18.04 with Kernel 4.15.0-24-generic.
The output from lshw -C network includes this ...
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:05:00.0
logical name: enp5s0
version: 0c
serial: 80:fa:5b:49:69:b3
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.045.08-NAPI duplex=full ip=192.168.10.213 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:133 ioport:e000(size=256) memory:df000000-df000fff memory:d0000000-d0003fff
I installed the package r8168-dkms, however that was not enough. Two further steps were required.
Step 1) Edit the file /etc/modprobe.d/r8168-dkms.conf and enable the line (i.e. remove the comment) blacklist r8169
Step 2) Based on the solution from Paulo I created the following 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
log "ifconfig down enp5s0"
ifconfig enp5s0 down
log "ifconfig up enp5s0"
ifconfig enp5s0 192.168.10.213
fi
This code is of course specific to my machine (device name and IP-address). It could certainly be improved but it meets my needs at the moment.
This works will with NetworkManager.
I had the same problem but the solutions here did not work for me. I spent days going through several forums on this subject and tried just about everything. Two alternative solutions are mentioned, upgrade the Kernel or install the previous module driver. I chose the latter and installed the r8168 driver. Initially, that also failed. However, I discovered something that works and adapted it to the solution from Paulo.
I'm running (K)ubuntu 18.04 with Kernel 4.15.0-24-generic.
The output from lshw -C network includes this ...
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:05:00.0
logical name: enp5s0
version: 0c
serial: 80:fa:5b:49:69:b3
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.045.08-NAPI duplex=full ip=192.168.10.213 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:133 ioport:e000(size=256) memory:df000000-df000fff memory:d0000000-d0003fff
I installed the package r8168-dkms, however that was not enough. Two further steps were required.
Step 1) Edit the file /etc/modprobe.d/r8168-dkms.conf and enable the line (i.e. remove the comment) blacklist r8169
Step 2) Based on the solution from Paulo I created the following 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
log "ifconfig down enp5s0"
ifconfig enp5s0 down
log "ifconfig up enp5s0"
ifconfig enp5s0 192.168.10.213
fi
This code is of course specific to my machine (device name and IP-address). It could certainly be improved but it meets my needs at the moment.
This works will with NetworkManager.
answered Jul 13 '18 at 14:56
andypotterandypotter
1011
1011
add a comment |
add a comment |
This happened to me as well with a Gigabyte-B250M-DS3H motherboard after upgrading from Ubuntu 16.04 to 18.04 on July 28, 2018. The kernel is 4.15.0-29-generic.
The result of sudo lshw -C network
showed RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller, while it showed that r8169 is the driver used.
What finally worked was installing the driver specific to the Ethernet controller (big surprise):
sudo apt install r8168-dkms
and then restarting the computer (Thanks andypotter). I did not have to blacklist r8169, but I did still have to create a script in /lib/systemd/system-sleep/
that I called r8168-refresh-after-suspend
(a la Paulo's advice) that would remove and reinsert r8168:
#!/bin/bash
# $1 is the state (pre or post)
# $2 is the action (suspend)
case $1/$2 in
pre/suspend)
modprobe -r r8168
;;
post/suspend)
modprobe -i r8168
;;
esac
and, of course, make it executable with:
sudo chmod +x /lib/systemd/system-sleep/r8168-refresh-after-suspend
This worked like a charm. So, this is still an issue in the 4.15.0-29 kernel, but the band-aid fix still works.
add a comment |
This happened to me as well with a Gigabyte-B250M-DS3H motherboard after upgrading from Ubuntu 16.04 to 18.04 on July 28, 2018. The kernel is 4.15.0-29-generic.
The result of sudo lshw -C network
showed RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller, while it showed that r8169 is the driver used.
What finally worked was installing the driver specific to the Ethernet controller (big surprise):
sudo apt install r8168-dkms
and then restarting the computer (Thanks andypotter). I did not have to blacklist r8169, but I did still have to create a script in /lib/systemd/system-sleep/
that I called r8168-refresh-after-suspend
(a la Paulo's advice) that would remove and reinsert r8168:
#!/bin/bash
# $1 is the state (pre or post)
# $2 is the action (suspend)
case $1/$2 in
pre/suspend)
modprobe -r r8168
;;
post/suspend)
modprobe -i r8168
;;
esac
and, of course, make it executable with:
sudo chmod +x /lib/systemd/system-sleep/r8168-refresh-after-suspend
This worked like a charm. So, this is still an issue in the 4.15.0-29 kernel, but the band-aid fix still works.
add a comment |
This happened to me as well with a Gigabyte-B250M-DS3H motherboard after upgrading from Ubuntu 16.04 to 18.04 on July 28, 2018. The kernel is 4.15.0-29-generic.
The result of sudo lshw -C network
showed RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller, while it showed that r8169 is the driver used.
What finally worked was installing the driver specific to the Ethernet controller (big surprise):
sudo apt install r8168-dkms
and then restarting the computer (Thanks andypotter). I did not have to blacklist r8169, but I did still have to create a script in /lib/systemd/system-sleep/
that I called r8168-refresh-after-suspend
(a la Paulo's advice) that would remove and reinsert r8168:
#!/bin/bash
# $1 is the state (pre or post)
# $2 is the action (suspend)
case $1/$2 in
pre/suspend)
modprobe -r r8168
;;
post/suspend)
modprobe -i r8168
;;
esac
and, of course, make it executable with:
sudo chmod +x /lib/systemd/system-sleep/r8168-refresh-after-suspend
This worked like a charm. So, this is still an issue in the 4.15.0-29 kernel, but the band-aid fix still works.
This happened to me as well with a Gigabyte-B250M-DS3H motherboard after upgrading from Ubuntu 16.04 to 18.04 on July 28, 2018. The kernel is 4.15.0-29-generic.
The result of sudo lshw -C network
showed RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller, while it showed that r8169 is the driver used.
What finally worked was installing the driver specific to the Ethernet controller (big surprise):
sudo apt install r8168-dkms
and then restarting the computer (Thanks andypotter). I did not have to blacklist r8169, but I did still have to create a script in /lib/systemd/system-sleep/
that I called r8168-refresh-after-suspend
(a la Paulo's advice) that would remove and reinsert r8168:
#!/bin/bash
# $1 is the state (pre or post)
# $2 is the action (suspend)
case $1/$2 in
pre/suspend)
modprobe -r r8168
;;
post/suspend)
modprobe -i r8168
;;
esac
and, of course, make it executable with:
sudo chmod +x /lib/systemd/system-sleep/r8168-refresh-after-suspend
This worked like a charm. So, this is still an issue in the 4.15.0-29 kernel, but the band-aid fix still works.
edited Jul 30 '18 at 5:16
answered Jul 30 '18 at 4:38
mdewittmdewitt
12
12
add a comment |
add a comment |
I have the same problem (driver=r8169), Ethernet does not work after resume from suspend.
It works perfectly well with kernel 4.13.0-31. In other words the Ethernet continues to work after resuming from suspend.
But with kernel 4.15.0-32 the Ethernet does not work after resuming from suspend.
I have tried the fix
modprobe -r r8169
modprobe -i r8169
but this has no effect.
I have reported this to
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1752772
1
This is not really an answer, unless you're suggesting to use kernel 4.13.
– wjandrea
Oct 27 '18 at 21:20
add a comment |
I have the same problem (driver=r8169), Ethernet does not work after resume from suspend.
It works perfectly well with kernel 4.13.0-31. In other words the Ethernet continues to work after resuming from suspend.
But with kernel 4.15.0-32 the Ethernet does not work after resuming from suspend.
I have tried the fix
modprobe -r r8169
modprobe -i r8169
but this has no effect.
I have reported this to
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1752772
1
This is not really an answer, unless you're suggesting to use kernel 4.13.
– wjandrea
Oct 27 '18 at 21:20
add a comment |
I have the same problem (driver=r8169), Ethernet does not work after resume from suspend.
It works perfectly well with kernel 4.13.0-31. In other words the Ethernet continues to work after resuming from suspend.
But with kernel 4.15.0-32 the Ethernet does not work after resuming from suspend.
I have tried the fix
modprobe -r r8169
modprobe -i r8169
but this has no effect.
I have reported this to
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1752772
I have the same problem (driver=r8169), Ethernet does not work after resume from suspend.
It works perfectly well with kernel 4.13.0-31. In other words the Ethernet continues to work after resuming from suspend.
But with kernel 4.15.0-32 the Ethernet does not work after resuming from suspend.
I have tried the fix
modprobe -r r8169
modprobe -i r8169
but this has no effect.
I have reported this to
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1752772
edited Oct 28 '18 at 8:44
abu_bua
3,27981126
3,27981126
answered Aug 15 '18 at 14:28
labnutlabnut
1746
1746
1
This is not really an answer, unless you're suggesting to use kernel 4.13.
– wjandrea
Oct 27 '18 at 21:20
add a comment |
1
This is not really an answer, unless you're suggesting to use kernel 4.13.
– wjandrea
Oct 27 '18 at 21:20
1
1
This is not really an answer, unless you're suggesting to use kernel 4.13.
– wjandrea
Oct 27 '18 at 21:20
This is not really an answer, unless you're suggesting to use kernel 4.13.
– wjandrea
Oct 27 '18 at 21:20
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1029250%2fubuntu-18-04-ethernet-disconnected-after-suspend%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown