Your problem can usually be fixed with a single service file for suspend and resume. The service below will likely fix your suspend issue:
It is generally better to use the r8169 kernel driver rather than the r8168 driver. You can easily switch to the r8169 kernel driver with this command:
sudo mhwd -r pci network-r8168
After switching to the r8169 driver, if you are still experiencing issues you can create a service to hopefully resolve suspend problems related to your adapter.
Network Restart Service
Create the following file with a root capable text editor:
Add the following contents to the file:
#sudo systemctl enable network-restart.service
#sudo systemctl start network-restart.service
#sudo systemctl stop network-restart.service
#sudo systemctl disable network-restart.service
#systemctl status network-restart.service
Description=Network Suspend/Resume Service
ExecStartPre=-/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli networking off'
ExecStart=-/usr/bin/systemctl stop NetworkManager
ExecStart=-/usr/bin/ip link set enp2s0 down
ExecStart=-/usr/bin/modprobe -r r8169
ExecStop=-/usr/bin/ip link set enp2s0 up
ExecStop=-/usr/bin/systemctl start NetworkManager
ExecStop=-/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli networking on'
The sleep units in the service may be reduced, (or eliminated) if you do not like the delay it creates. Be aware though, that doing so may reduce the reliability of the service.
Once you have created and saved the service file, enable the service:
sudo systemctl enable network-restart.service
Then reboot the computer.
For others wishing to adapt this service to their installation (if different than above).
If your adapter's designation is different than “enp2s0” you will need to substitute you own adapter’s ID into the service file.
If you are using a different driver module you will also need to substitute it in place of “r8168” or “r8169”in the service file.
R8169 is the currently the recommended driver for this adapter. The r8168 driver should generally be uninstalled through Manjaro Settings Manger or the terminal command given above. I would highly suggest switching to the r8169 kernel module rather than using the r8168 driver.You can substitute "r8168" or "r8169" in the above service file depending on which driver you are using.
You can find your adapter driver/module and device ID to substitute in the service with the following command:
Alternate methods to switch to the r8169 driver:
The r8168 driver has been experiencing major problems lately.
The r8169 kernel module is now the preferred driver.
Follow the instructions below to get your LAN adapter working properly.
Uninstall the linuxXXX-r8168 driver:
Open Manjaro Settings Manager -> Hardware configuration -> Network controller
Right click on the RTL8111/8168/8411 ethernet device and select “Remove”.
After the uninstall process has finished, restart.
After you restart the computer, the 8169 kernel module should now be automatically loaded.
If the r8169 kernel module is not loaded automatically when you reboot (after uninstalling r8168) then do this:
Open any file located in
/etc/modprobe.d and ensure there is no reference to r8169.
Any file that contains the line:
Save the edited conf file with root permissions, and then reboot
Alternately, you may delete the conf file entirely, (if it only contains the entry "blacklist r8169").
/etc/modprobe.d contains a file named
r8169_blacklist.conf then you can delete it with this command:
sudo rm /etc/modprobe.d/r8169_blacklist.conf
Be very careful, you do not make any errors when using the "rm" command with sudo privileges.
Reboot after making any changes to files in