Wednesday, May 1, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 15266  / 2 Years ago, sat, may 14, 2022, 9:46:44

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 to errors=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.


More From » 14.04

 Answers
7

Okay, I managed to finally find the culprit for this issue, but first, a little background: I neglected to mention that my laptop has a hybrid HDD by default. It's a regular 500GB mechanical HDD supplemented by a 24GB SSD, which used to be used by Windows 8 for hibernation and probably cache stuff. I used the SSD to stash my root partition before in OpenSUSE until it eventually died (I/O errors all the way down), prompting me to move the partition to the HDD whilst also installing Ubuntu 14.04.



Long story short: The I/O errors I'm getting at standby were somehow caused by my faulty SSD.



What I did to fix this was to remove the block device of the SSD from /dev. In my case, my SSD is always shown as /dev/sdb, so I entered the following in a terminal as root (solution courtesy of this helpful article):



# echo 1 > /sys/block/sdb/device/delete



Be sure to replace 'sdb' with the device you think is faulty. I only have it as /dev/sdb because as I've mentioned before, my SSD always gets that first.



The "deletion" gets reset on every fresh boot, so what I did was add that line to my /etc/rc.local, which ensures that /dev/sdb will get deleted at boot. This might affect booting with removable drives inserted on your machine, but in my case the SSD is physically part of the HDD anyway so it automatically gets the /dev/sdb block device after the HDD gets /dev/sda.


[#24184] Monday, May 16, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
anoalk

Total Points: 271
Total Questions: 90
Total Answers: 112

Location: Zambia
Member since Wed, Dec 16, 2020
3 Years ago
anoalk questions
Wed, Mar 15, 23, 04:06, 1 Year ago
Fri, Sep 24, 21, 02:59, 3 Years ago
Sat, Mar 5, 22, 02:33, 2 Years ago
Tue, Mar 22, 22, 07:19, 2 Years ago
;