Acabei de instalar o Ubuntu 14.04 no meu Fujitsu Lifebook U772 depois de um longo hiato com o Opensuse e após a instalação, parece que pm-suspend
funciona imediatamente. Alguns dias de configuração mais tarde, no entanto, suspender parou de funcionar, com a opção de menu Suspender apenas resultando na tela momentaneamente ficando preta e retornando à tela de bloqueio.
Eu tentei manualmente suspender a máquina de um terminal usando sudo pm-suspend
, mas ainda sem sucesso. Comecei a examinar o pm-suspend
log em /var/log/pm-suspend.log
e notei algo estranho:
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.
Mais especificamente, foi ao longo destas linhas (esta é a parte em que o sistema realmente executa a suspensão):
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.
Eu acho que a parte estranha aqui é o sh: echo: I/O error
que aparece toda vez que o sistema faz uma suspensão, como você pode ver, o sistema imediatamente desperta após o erro.
Eu tentei muitas soluções alternativas que incluem o seguinte:
- Desativando os
vboxdrv
modules do Virtualbox conforme li que às vezes eles interferem na capacidade de uma máquina host de suspender
- Desativando todos os dispositivos que podem ativar o sistema em
/proc/acpi/wakeup
- Substituindo a opção
errors=remount ro
de /
em /etc/fstab
para errors=continue
Apesar de tudo isso, o problema ainda persiste. Poderia ser um problema com o kernel? De volta quando eu ainda estava usando o Opensuse 12.3 eu estava preso no kernel 3.7, e agora aqui no Ubuntu 14.04 eu estou usando o kernel 3.13. Embora eu duvido que o kernel seja o problema, já que o 3.13 saiu da caixa e a suspensão ainda funcionava naquele momento.
UPDATE :
Descobri que a causa do eco que causa a falha de E / S está na linha 321 de /usr/lib/pm-utils/pm-functions
. Eu obtive isso ativando o registro detalhado e a depuração para pm-suspend
e desativando todos os ganchos (movendo-os temporariamente para outro diretório).
Esta é a linha em questão:
do_suspend() { echo -n "mem" >/sys/power/state; }
Pelo que entendi, esse echo
é crucial porque é a interface entre pm-suspend
e as funções de baixo nível no kernel que manipulam suspensões. A questão agora é por que um erro de E / S ocorre naquele momento. Tentarei executar manualmente o comando em um terminal e ver se ainda ocorre um erro de E / S.