After resuming from sleep , Ethernet doesn't work and requires me to reboot.
When I try to connect to Ethernet after resuming from sleep it tries to connect and after about a minute it disconnects.
My laptop is a HP Pavilion g7-2269wm
elementary OS Stack Exchange is a question and answer site for developers and users of elementary OS and applications. It only takes a minute to sign up.
Sign up to join this communityI found that a work around is to restart the Ethernet driver after resuming from sleep. Use these commands after resuming from sleep
To do it run lspci -k
. The output of the command for me is below
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Root Complex
Subsystem: Hewlett-Packard Company Device 184b
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Trinity [Radeon HD 7640G]
Subsystem: Hewlett-Packard Company Device 184b
Kernel driver in use: radeon
00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Trinity HDMI Audio Controller
Subsystem: Hewlett-Packard Company Device 184b
Kernel driver in use: snd_hda_intel
00:10.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 03)
Subsystem: Hewlett-Packard Company Device 184b
Kernel driver in use: xhci_hcd
00:10.1 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 03)
Subsystem: Hewlett-Packard Company Device 184b
Kernel driver in use: xhci_hcd
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode]
Subsystem: Hewlett-Packard Company Device 184b
Kernel driver in use: ahci
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11)
Subsystem: Hewlett-Packard Company Device 184b
Kernel driver in use: ohci-pci
00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 11)
Subsystem: Hewlett-Packard Company Device 184b
Kernel driver in use: ehci-pci
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11)
Subsystem: Hewlett-Packard Company Device 184b
Kernel driver in use: ohci-pci
00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 11)
Subsystem: Hewlett-Packard Company Device 184b
Kernel driver in use: ehci-pci
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 14)
Subsystem: Hewlett-Packard Company Device 184b
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 01)
Subsystem: Hewlett-Packard Company Device 184b
Kernel driver in use: snd_hda_intel
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 11)
Subsystem: Hewlett-Packard Company Device 184b
00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] FCH PCI Bridge (rev 40)
00:15.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Hudson PCI to PCI bridge (PCIE port 0)
Kernel driver in use: pcieport
00:15.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Hudson PCI to PCI bridge (PCIE port 1)
Kernel driver in use: pcieport
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Function 3
Kernel driver in use: k10temp
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Function 5
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)
Subsystem: Hewlett-Packard Company Device 184b
Kernel driver in use: rtsx_pci
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller (rev 05)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
Kernel driver in use: r8169
Now find your Ethernet controller and its module (driver) name in the command output. For me it is r8169
but yours will be different (unless you have a similar laptop).
Then run (replace <name>
with the module name like r8169
)
sudo rmmod <name>
sudo modprobe <name>
For me it was (but yours will be different)
sudo rmmod r8169
sudo modprobe r8169
This will restart the Ethernet kernel module (driver). Now Ethernet should be working.
I am currently working on a automated solution which runs on every resume
systemd
service that gets launched every time a power suspend/hibernate terminates so that I might add that sequence of commands automagically, instead of doing them over and over again... It should be simple enough to figure it out, right? Right...
Jun 15 at 19:13
sudo service network-manager restart
This will restart the network service and everything will be resumed
service network-manager restart
, however, will break both interfaces at the same time, even if it's just for some seconds... enough to sever all existing connections.
Jun 30 at 3:04