Solution worked for me (copied from my personal manuals without modification).
I've got Lenovo T530 with Ubuntu 14.04; mainline kernel 3.14.9; nvidia-331-updates package installed (331.38-0ubuntu7).
=> suspend/resume works for me quite well.
=> I was solving also problem with resume after hibernation, and the solution: eject SD card from the laptop! :-|
My comments that worked for me (some months ago):
suspendResume_WORKING() {
# WIFI solution
# 1.) sudo vi /etc/pm/config.d/modules
# 2.) Replace SUSPEND_MODULES with this line:
# SUSPEND_MODULES="$SUSPEND_MODULES uhci_hd button ehci_hd iwlwifi"
# SD card solution:
# 3.) Copy file from https://github.com/wschaub/T530- settings/blob/master/pm/sleep.d/unmount_sdcard
# to /etc/pm/sleep.d/unmount_sdcard
# 4.) chmod +x /etc/pm/sleep.d/unmount_sdcard
# ACPI solution:
# 5.) Replace lines in /etc/default/grub
# GRUB_CMDLINE_LINUX_DEFAULT="noquiet nosplash acpi_osi=Linux acpi_backlight=vendor acpi_sleep=s4_nohwsig loop.max_part=63 loop.max_loop=64"
# GRUB_CMDLINE_LINUX=""
# X.) sudo update-initramfs -u
# X+1.) sync; sudo reboot
}
Lifted from
Wifi doesn't work after suspend after 16.04 upgrade
I found that first researching which ethernet hardware and driver/module I am running, and then removing and reloading that module, did work for me (though it did not for buzhidao):
Wifi:
$ lspci -knn | grep Net -A2
Ethernet:
$ lspci -knn | grep Ether -A2
The second of these (ethernet) was what I used, and I found:
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
Subsystem: Hewlett-Packard Company RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [103c:1944]
Kernel driver in use: r8169
Kernel modules: r8169
so i reloaded the 'r8169' driver:
$ sudo rmmod r8169 && sudo modprobe r8169
and voila! This worked. My ethernet port / connection came back alive (after suspend/wakeup) without having to reboot.
in my case the driver was different, but the same commands rmmod
and modprobe
did the trick
Best Answer
Robbin's answer fixes it for me. To have this run every time the system wakes create a script with this content...
and put the script in
/etc/pm/sleep.d
and make it executable. (The script is a slight variation of the one on this page)