I just installed Ubuntu 14.04 on my Fujitsu Lifebook U772 after a long hiatus with Opensuse and after the install, it appears that pm-suspend
works out of the box. A few days of setting up later, however, suspend stopped working, with the menu option of Suspend only resulting in the screen momentarily going black then returning to the lock screen.
I manually tried to suspend the machine from a terminal using sudo pm-suspend
but still to no avail. I started looking over the pm-suspend
log at /var/log/pm-suspend.log
, and I noticed something strange:
Running hook /usr/lib/pm-utils/sleep.d/00logging suspend suspend:
Linux deathbook 3.13.0-30-generic #55-Ubuntu SMP Fri Jul 4 21:40:53 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Module Size Used by
vboxpci 23194 0
vboxnetflt 27613 0
vboxnetadp 25670 0
vboxdrv 339502 3 vboxnetadp,vboxnetflt,vboxpci
pci_stub 12622 1
ctr 13049 1
ccm 17773 1
bnep 19624 2
rfcomm 69160 0
bluetooth 395423 10 bnep,rfcomm
binfmt_misc 17468 1
nls_iso8859_1 12713 1
arc4 12608 2
iwldvm 232285 0
intel_rapl 18773 0
uvcvideo 80885 0
hid_generic 12548 0
x86_pkg_temp_thermal 14205 0
videobuf2_vmalloc 13216 1 uvcvideo
intel_powerclamp 14705 0
videobuf2_memops 13362 1 videobuf2_vmalloc
coretemp 13435 0
videobuf2_core 40664 1 uvcvideo
videodev 134688 2 uvcvideo,videobuf2_core
kvm_intel 143060 0
mac80211 626557 1 iwldvm
usbhid 52570 0
kvm 451511 1 kvm_intel
i2400m_usb 36521 0
hid 106148 2 hid_generic,usbhid
i2400m 107913 1 i2400m_usb
wimax 34704 1 i2400m
crct10dif_pclmul 14289 0
snd_hda_codec_hdmi 46207 1
crc32_pclmul 13113 0
ghash_clmulni_intel 13216 0
aesni_intel 55624 2
snd_hda_codec_realtek 61438 1
aes_x86_64 17131 1 aesni_intel
i915 783703 4
snd_hda_intel 52355 3
snd_hda_codec 192906 3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
lrw 13286 1 aesni_intel
iwlwifi 169932 1 iwldvm
snd_hwdep 13602 1 snd_hda_codec
snd_pcm 102099 3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
gf128mul 14951 1 lrw
drm_kms_helper 53081 1 i915
snd_page_alloc 18710 2 snd_pcm,snd_hda_intel
snd_seq_midi 13324 0
glue_helper 13990 1 aesni_intel
drm 303102 5 i915,drm_kms_helper
cfg80211 484040 3 iwlwifi,mac80211,iwldvm
ablk_helper 13597 1 aesni_intel
snd_seq_midi_event 14899 1 snd_seq_midi
cryptd 20359 3 ghash_clmulni_intel,aesni_intel,ablk_helper
snd_rawmidi 30144 1 snd_seq_midi
i2c_algo_bit 13413 1 i915
snd_seq 61560 2 snd_seq_midi_event,snd_seq_midi
snd_seq_device 14497 3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer 29482 2 snd_pcm,snd_seq
mei_me 18627 0
mei 82276 1 mei_me
snd 69238 17 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec,snd_hda_intel,snd_seq_device,snd_seq_midi
rtsx_pci_ms 18151 0
soundcore 12680 1 snd
memstick 16966 1 rtsx_pci_ms
joydev 17381 0
mac_hid 13205 0
lpc_ich 21080 0
fujitsu_laptop 18947 0
video 19476 1 i915
serio_raw 13462 0
parport_pc 32701 0
ppdev 17671 0
lp 17759 0
parport 42348 3 lp,ppdev,parport_pc
rtsx_pci_sdmmc 23274 0
e1000e 254433 0
psmouse 102222 0
ahci 25819 5
libahci 32168 1 ahci
rtsx_pci 45956 2 rtsx_pci_ms,rtsx_pci_sdmmc
ptp 18933 1 e1000e
pps_core 19382 1 ptp
total used free shared buffers cached
Mem: 3905144 2586540 1318604 356556 6452 531508
-/+ buffers/cache: 2048580 1856564
Swap: 8190472 0 8190472
/usr/lib/pm-utils/sleep.d/00logging suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave suspend suspend:
/usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success.
Running hook /etc/pm/sleep.d/10_grub-common suspend suspend:
/etc/pm/sleep.d/10_grub-common suspend suspend: success.
Running hook /etc/pm/sleep.d/10_unattended-upgrades-hibernate suspend suspend:
/etc/pm/sleep.d/10_unattended-upgrades-hibernate suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/50unload_alx suspend suspend:
/usr/lib/pm-utils/sleep.d/50unload_alx suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/60_wpa_supplicant suspend suspend:
Selected interface 'wlan0'
OK
/usr/lib/pm-utils/sleep.d/60_wpa_supplicant suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/75modules suspend suspend:
Unloading kernel module vboxdrv...Done.
/usr/lib/pm-utils/sleep.d/75modules suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/90clock suspend suspend:
/usr/lib/pm-utils/sleep.d/90clock suspend suspend: not applicable.
Running hook /usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend:
/usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/95anacron suspend suspend:
stop: Unknown instance:
/usr/lib/pm-utils/sleep.d/95anacron suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/95hdparm-apm suspend suspend:
/usr/lib/pm-utils/sleep.d/95hdparm-apm suspend suspend: not applicable.
Running hook /usr/lib/pm-utils/sleep.d/95led suspend suspend:
/usr/lib/pm-utils/sleep.d/95led suspend suspend: not applicable.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend:
Kernel modesetting video driver detected, not using quirks.
/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/99video suspend suspend:
kernel.acpi_video_flags = 0
/usr/lib/pm-utils/sleep.d/99video suspend suspend: success.
Running hook /etc/pm/sleep.d/novatel_3g_suspend suspend suspend:
/etc/pm/sleep.d/novatel_3g_suspend suspend suspend: success.
Fri Jul 11 07:17:01 PHT 2014: performing suspend
sh: echo: I/O error
Fri Jul 11 07:17:03 PHT 2014: Awake.
Fri Jul 11 07:17:03 PHT 2014: Running hooks for resume
Running hook /etc/pm/sleep.d/novatel_3g_suspend resume suspend:
/etc/pm/sleep.d/novatel_3g_suspend resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/99video resume suspend:
/usr/lib/pm-utils/sleep.d/99video resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler resume suspend:
/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/95led resume suspend:
/usr/lib/pm-utils/sleep.d/95led resume suspend: not applicable.
Running hook /usr/lib/pm-utils/sleep.d/95hdparm-apm resume suspend:
/dev/sda:
setting Advanced Power Management level to 0xfe (254)
APM_level = 254
/dev/sdb:
setting Advanced Power Management level to 0xfe (254)
APM_level = 254
/usr/lib/pm-utils/sleep.d/95hdparm-apm resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/95anacron resume suspend:
/usr/lib/pm-utils/sleep.d/95anacron resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/94cpufreq resume suspend:
/usr/lib/pm-utils/sleep.d/94cpufreq resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/90clock resume suspend:
/usr/lib/pm-utils/sleep.d/90clock resume suspend: not applicable.
Running hook /usr/lib/pm-utils/sleep.d/75modules resume suspend:
Reloaded unloaded modules.
/usr/lib/pm-utils/sleep.d/75modules resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend:
Selected interface 'wlan0'
OK
/usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/50unload_alx resume suspend:
/usr/lib/pm-utils/sleep.d/50unload_alx resume suspend: success.
Running hook /etc/pm/sleep.d/10_unattended-upgrades-hibernate resume suspend:
/etc/pm/sleep.d/10_unattended-upgrades-hibernate resume suspend: success.
Running hook /etc/pm/sleep.d/10_grub-common resume suspend:
/etc/pm/sleep.d/10_grub-common resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave resume suspend:
/usr/lib/pm-utils/sleep.d/00powersave resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/00logging resume suspend:
/usr/lib/pm-utils/sleep.d/00logging resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/000record-status resume suspend:
/usr/lib/pm-utils/sleep.d/000record-status resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/000kernel-change resume suspend:
/usr/lib/pm-utils/sleep.d/000kernel-change resume suspend: success.
Fri Jul 11 07:17:04 PHT 2014: Finished.
More specifically, it was along these lines (this is the part where the system actually performs the suspend):
Fri Jul 11 07:17:01 PHT 2014: performing suspend
sh: echo: I/O error
Fri Jul 11 07:17:03 PHT 2014: Awake.
Fri Jul 11 07:17:03 PHT 2014: Running hooks for resume
Running hook /etc/pm/sleep.d/novatel_3g_suspend resume suspend:
/etc/pm/sleep.d/novatel_3g_suspend resume suspend: success.
I think the weird part here is the sh: echo: I/O error
that shows up every time the system does a suspend, as you can see, the system immediately awakens after the error.
I've tried a lot of workarounds that include the following:
- Disabling Virtualbox's
vboxdrv
modules as I have read that they sometimes interfere with a host machine's ability to suspend - Disabling all devices that could wake the system in
/proc/acpi/wakeup
- Replacing the
errors=remount ro
option for/
in/etc/fstab
toerrors=continue
Despite all of those the problem still persists. Could it be an issue with the kernel? Back when I was still using Opensuse 12.3 I was stuck in kernel 3.7, and now here in Ubuntu 14.04 I'm using kernel 3.13. Though I kind of doubt that the kernel might be the issue since 3.13 came out of the box and suspend still worked at that time.
UPDATE:
I've found that the cause for the echo that causes the I/O fail is in line 321 of /usr/lib/pm-utils/pm-functions
. I got this by turning on verbose logging and debugging for pm-suspend
, and disabling all hooks (by moving them temporarily to another directory).
This is the line in question:
do_suspend() { echo -n "mem" >/sys/power/state; }
As I understand it, this echo
is crucial because it's the interface between pm-suspend
and the low-level functions in the kernel that handle suspends. The issue now is why would an I/O error occur at that moment. I'll try to manually perform the command on a terminal and see if an I/O error still occurs.