Need help to add execution command when manjaro get out of hibernation

Hi there :slight_smile:

My computer DELL G7 7700 has a problem when going in hibernation mode (from sleep mode) then becoming active: the r8189 realtek driver seems to be unavailable (so no network connexion are possible).
My workaround is a small script:

sudo modprobe -r r8169
sudo modprobe r8169

That’s works fine, but I would to automate this with service. I’m not aware about that, so if someone could help me, it would be nice.

You can find ideas and examples in the archive

There is an example of a restart service for r8168

1 Like

I’ve to wait too much time to say immediatly if it works, but that’s good way!
I can’t found again the post about sleep mode or hibernation, but maybe this service is enough: thanks a lot!

Edit: too bad, when woke up, computer try without success to acquire a connexion

(“LAN Automatique” profile is DHCP request)

1 Like

It finally works, but there are plenty of methods to success: on the list you gave me, here is the best code.

# == Create file and check it ======
#vi /etc/systemd/system/network-r8169-resume.service
#systemd-analyze verify network-r8169-resume.service 
# == Install this file as a service ======
#sudo systemctl enable network-r8169-resume.service
#sudo systemctl daemon-reload
# == Available commands ======
#sudo systemctl start network-r8169-resume.service
#sudo systemctl stop network-r8169-resume.service
#sudo systemctl status network-r8169-resume.service

Description=Resume r8169 Network driver

#ExecStartPre=/usr/bin/sleep 5
ExecStart=/bin/modprobe -r r8169
ExecStart=/usr/bin/sleep 1
ExecStop=/bin/modprobe r8169


Seems to be right on manual hibernation, I’ve to check with sleep to hibernate… Thanks for your help @linux-aarhus

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.