Ethernet down after resume. Tumbleweed

Hi, a few days ago I’ve switched from OpenSuSE 13.2 to Tumbleweed.

When i suspend my laptop (close the lid) and resume it afterwards, the ethernet (not WiFi) is unavailable, i.e. it does not reconnect.

I’ve tried restarting Network Manager server, but all it does is add second Network Manager applet in systray.

Google searched suggests editing /etc/pm/config.d/unload_modules and adding SUSPEND_MODULES="$SUSPEND_MODULES [module_name]", but I don’t have “pm” under /etc. I’ve tried creating the missing directories and the unload_modules, add the SUSPEND_MODULES bit, but it didn’t help.

Anyone knows how to fix this?

Some more information is required to help diagnose this. To start with…following a resume, capture the output from

ip link
systemctl status NetworkManager
journalctl -u NetworkManager

If you don’t have internet connectivity on this machine, then you could cupy/paste output to a text file and transfer via memory stick.

If sleep hooks really do turn out to be needed (for module unloading/reloading), then it needs to be done using systemd methods…

https://wiki.archlinux.org/index.php/Power_management#Suspend_and_hibernate

Hi there, I’ve run the command you specified right after boot, and then suspended the laptop and run them again. I run them in this order:

journalctl -u NetworkManager
systemctl status NetworkManager
ip link

output from

journalctl -u NetworkManager

is over 14 MB!

I did run diff of the files and looks that only difference is in

systemctl status NetworkManager

and is as follows:

Output before suspending:

<            └─1500 /sbin/dhclient -d -q -sf /usr/lib/nm-dhcp-helper -pf /var/run/dhclient-p5p1.pid -lf /var/lib/NetworkManager/dhclient-e93c78d1-edfc-41a8-a9bc-0eb12eee4f7c-p5p1.lease -cf /var/lib/NetworkManager/dhclient-p5p1.conf p5p1

Output after resume:

>            └─3296 /sbin/dhclient -d -q -sf /usr/lib/nm-dhcp-helper -pf /var/run/dhclient-p5p1.pid -lf /var/lib/NetworkManager/dhclient-e93c78d1-edfc-41a8-a9bc-0eb12eee4f7c-p5p1.lease -cf /var/lib/NetworkManager/dhclient-p5p1.conf p5p1  

Also, I issued

sudo dhclient p5p1

and received

ls: cannot access /var/run/netconfig//p5p1/: No such file or directory

and in indeed, there is only NetworkManager.netconfig in /var/run/netconfig.

I’ve placed output of the commands you suggested in my dropbox -> Dropbox - Error - Simplify your life

Does this give you any clues?

Thank you for the link. I’ve verified that running

sudo /usr/sbin/modprobe -r r8169 && sudo /usr/sbin/modprobe r8169

after resume fixes the issue. Unfortunately, it is not clear to me how to achieve this using service file.

Create a service file eg etc/systemd/system/r8169-reload.service


[Unit]
Description=Reload wireless driver after system resume
After=suspend.target

[Service]
Type=oneshot
ExecStart=/usr/sbin/modprobe -r r8169
ExecStart=/usr/sbin/modprobe r8169

[Install]
WantedBy=suspend.target

Then enable and start the service

systemctl enable r8169-reload.service
systemctl start r8169-reload.service

Hope that does the trick.

Thank you for the file, unfortunately, when i try to enable the service (with sudo) I get this message “Failed to execute operation: Bad message”.
I don’t see the service Yast service list and my network card still not available after resume.

Starting the service (with sudo) on the other hand, does reload the kernel module and fixes the issue.

Strange, implementing that service works for me without issue. My NIC uses the same driver, although I don’t suffer the resume problem you’ve described.

Try enabling the service manually with

mkdir /etc/systemd/system/suspend.target.wants
ln -s /etc/systemd/system/r8169-reload.service /etc/systemd/system/suspend.target.wants/r8169-reload.service

Start it with

systemctl start r8169-reload

and then try suspending/resuming again.

Thanks for the advice. I’ve created the symbolic link but it didn’t seem to help. Trying to enable the service throws the same error. It does not reload kernel module on resume, but does reload kernel module if I manually start the service as before.

Creating the symbolic link should be all that’s required to have it enabled ie no need to run ‘systemctl enable…’ after that. I can’t replicate the error you’re getting, so hard to advise further…

What does the following command report?

systemctl status r8169-reload.service

Hi, I get this:

sudo systemctl status r8169-reload.service                                                                                                                       
● r8169-reload.service                                                                                                                                                                       
   Loaded: loaded (/etc/systemd/system/r8169-reload.service; enabled; vendor preset: disabled)
   Active: inactive (dead)

Spa 16 06:08:22 new-host systemd[1]: **[/etc/systemd/system/r8169-reload.service:3] Assignment outside of section. Ignoring.**
Spa 16 06:08:23 new-host systemd[1]: **[/etc/systemd/system/r8169-reload.service:1] Assignment outside of section. Ignoring.**
Spa 16 06:08:23 new-host systemd[1]: **[/etc/systemd/system/r8169-reload.service:2] Assignment outside of section. Ignoring.**
Spa 16 06:08:23 new-host systemd[1]: **[/etc/systemd/system/r8169-reload.service:3] Assignment outside of section. Ignoring.**
Spa 16 06:08:27 new-host systemd[1]: **[/etc/systemd/system/r8169-reload.service:1] Assignment outside of section. Ignoring.**
Spa 16 06:08:27 new-host systemd[1]: **[/etc/systemd/system/r8169-reload.service:2] Assignment outside of section. Ignoring.**
Spa 16 06:08:27 new-host systemd[1]: **[/etc/systemd/system/r8169-reload.service:3] Assignment outside of section. Ignoring.**
Spa 16 06:08:28 new-host systemd[1]: **[/etc/systemd/system/r8169-reload.service:1] Assignment outside of section. Ignoring.**
Spa 16 06:08:28 new-host systemd[1]: **[/etc/systemd/system/r8169-reload.service:2] Assignment outside of section. Ignoring.**

Spa 16 06:08:28 new-host systemd[1]: **[/etc/systemd/system/r8169-reload.service:3] Assignment outside of section. Ignoring.**

I can’t begin to think what is causing that error

For reference, I get

# systemctl status r8169-reload
r8169-reload.service - Reload wireless driver after system resume
   Loaded: loaded (/etc/systemd/system/r8169-reload.service; enabled)
   Active: inactive (dead)

Can you show what your service file looks like?

cat /etc/systemd/system/r8169-reload.service

It is important to note that I’m doing all of this in an openSUSE 13.2 environment, whereas you are doing this with Tumbleweed. I’m not sure how this might impact here, but clearly it is. Hopefully, others can chime in here. You may need to submit a bug report for this. The underlying issue with the r8169 driver (following resume) could also be reported, since we’re effectively only attempting to work around that issue here.

That’s it! The very first “” bracket before “Unit” was missing. It still shows me the errors, but at least my NIC now reconnects on resume. I’m sorry to have taken your time with silly oversight on side and thank you for the info. I have learned something new and got my issue resolved thanks to you.

I started to suspect a syntax error of some kind, but not possible to know without seeing the .service file you created. Anyway, I’m glad you checked and found the missing character, and it is now working to your satisfaction! Yes, it’s all part of the learning. :slight_smile: