Debian 8 hibernar e suspender não funciona

1

Li estas duas documentações oficiais sobre o assunto: link link

Eu tentei criar este script simples para ver se algo está funcionando:

Eu instalei todos os pacotes que eles mencionam no post.

# /etc/pm/sleep.d/suspend.sh
#
# The /etc/pm/sleep.d is the right place to put your custom suspend/resume scripts.
# None of the stuff in /etc/hibernate/ has _any_ effect (OnResume, RestartServices,
# UnloadModules etc). The /etc/init.d/atheros script is just a simple wrapper for
# unloading the ath_pci module.

case "$1" in
        hibernate|suspend)
        logger went to hibernate or suspend!
                ;;
        thaw|resume)
        logger resumed from hibernation or suspend!
                ;;
        *) exit $NA
                ;;
esac

Nenhuma saída do registrador.

então eu editei este arquivo: /etc/acpi/lid.sh

e adicionou este código

grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
  rfkill block all && hibernate -k -f
else
  rfkill unblock all
fi

Se eu tentar o botão suspenso que parece funcionar, o laptop vai dormir e acorda depois de um tempo se eu pressionar o botão liga / desliga. Verificando os logs, vejo essas mensagens lidando com suspensão.

Dec 14 00:25:16 host systemd[1]: Configuration file /etc/systemd/system/suspend-sedation.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Dec 14 00:25:16 host systemd[1]: Configuration file /etc/systemd/system/suspend-sedation.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Dec 14 00:25:35 host systemd[1]: Configuration file /etc/systemd/system/suspend-sedation.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Dec 14 00:25:35 host systemd[1]: Configuration file /etc/systemd/system/suspend-sedation.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Dec 14 00:30:22 host systemd[1]: Configuration file /etc/systemd/system/suspend-sedation.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Dec 14 00:30:22 host systemd[1]: Configuration file /etc/systemd/system/suspend-sedation.service is marked world-writable. Please remove world writability permission bits. Proceeding anyway.
Dec 14 00:30:22 host systemd[1]: Configuration file /etc/systemd/system/suspend-sedation.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Dec 14 00:30:22 host systemd[1]: Configuration file /etc/systemd/system/suspend-sedation.service is marked world-writable. Please remove world writability permission bits. Proceeding anyway.
Dec 14 00:31:43 host systemd[1]: [/etc/systemd/system/suspend-sedation.service:1] Missing '='.
Dec 14 00:31:48 host systemd[1]: [/etc/systemd/system/suspend-sedation.service:1] Missing '='.
Dec 14 00:32:11 host systemd[1]: [/etc/systemd/system/suspend-sedation.service:1] Unknown section 'unit'. Ignoring.
Dec 14 00:33:07 host systemd[1]: [/etc/systemd/system/suspend-sedation.service:1] Unknown section 'unit'. Ignoring.
Dec 14 00:36:26 host swapon[571]: swapon: /dev/sda4: software suspend data detected. Rewriting the swap signature.
Dec 14 00:36:26 host rsyslogd-2007: action 'action 17' suspended, next retry is Mon Dec 14 00:36:56 2015 [try http://www.rsyslog.com/e/2007 ]
Dec 14 00:41:38 host swapon[588]: swapon: /dev/sda4: software suspend data detected. Rewriting the swap signature.
Dec 14 00:41:38 host rsyslogd-2007: action 'action 17' suspended, next retry is Mon Dec 14 00:42:08 2015 [try http://www.rsyslog.com/e/2007 ]
Dec 14 00:54:53 host swapon[561]: swapon: /dev/sda4: software suspend data detected. Rewriting the swap signature.
Dec 14 00:54:53 host rsyslogd-2007: action 'action 17' suspended, next retry is Mon Dec 14 00:55:23 2015 [try http://www.rsyslog.com/e/2007 ]
Dec 14 01:05:22 host swapon[527]: swapon: /dev/sda4: software suspend data detected. Rewriting the swap signature.
Dec 14 01:05:22 host rsyslogd-2007: action 'action 17' suspended, next retry is Mon Dec 14 01:05:52 2015 [try http://www.rsyslog.com/e/2007 ]
Dec 14 01:09:21 host kernel: [  186.002598] Suspending console(s) (use no_console_suspend to debug)
Dec 14 01:09:21 host kernel: [  186.046622] wl_suspend: PCI Suspend handler
Dec 14 01:09:21 host kernel: [  186.046631] wl_suspend: Not WOWL capable
Dec 14 01:09:21 host kernel: [  186.641662] PM: suspend of devices complete after 639.250 msecs
Dec 14 01:09:21 host kernel: [  186.642043] PM: late suspend of devices complete after 0.379 msecs
Dec 14 01:09:21 host kernel: [  186.657547] PM: noirq suspend of devices complete after 15.511 msecs


[  186.046622] wl_suspend: PCI Suspend handler
[  186.046631] wl_suspend: Not WOWL capable
[  186.641662] PM: suspend of devices complete after 639.250 msecs
[  186.642043] PM: late suspend of devices complete after 0.379 msecs
[  186.657547] PM: noirq suspend of devices complete after 15.511 msecs

agora para hibernar, isso parece simplesmente morrer. Ele não salva o estado e tudo que eu recebo é enviado todo o caminho de volta para o menu EFI para escolher.

blubee@host:~$ sudo cat /var/log/syslog | grep "hiber"
Dec 14 00:36:26 host kernel: [    4.213177] PM: Looking for hibernation image.
Dec 14 00:41:38 host kernel: [    4.231179] PM: Looking for hibernation image.
Dec 14 00:54:53 host kernel: [    4.219918] PM: Looking for hibernation image.
Dec 14 01:05:22 host kernel: [    4.213743] PM: Looking for hibernation image.

e esta saída do dmesg

[    4.213743] PM: Looking for hibernation image.

pela maneira como este laptop tem 16GB de RAM e eu tenho 32GB de swap, só para ter certeza. Eu li que 32GB é um exagero, mas eu só tive que testá-lo.

O que mais posso fazer para resolver essa situação e fazer com que o modo de hibernação funcione como esperado?

    
por user1610950 13.12.2015 / 18:28

2 respostas

1

Definindo arquivo de hibernação

como mencionado em this postar, configurar o arquivo de hibernação poderia ajudar ...

  1. Encontre o uuid da sua partição swap. Suponha que a partição seja sdb3 e, em seguida,

    $ ls -l /dev/disk/by-uuid/ | grep sdb3
    lrwxrwxrwx 1 root root 10 окт.   9 08:59 1dd7e123-1f82-45f0-a202-0ff3ea6f081a -> ../../sdb3
    
  2. Abra /etc/default/grub e encontre a linha que começa com GRUB_CMDLINE_LINUX_DEFAULT=" . Adicione lá entre as citações resume=/dev/disk/by-uuid/your-swap-uuid . Como exemplo:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/disk/by-uuid/1dd7e123-1f82-45f0-a202-0ff3ea6f081a"
    
  3. Executar como root update-grub

configurações da BIOS

Outro problema que tive foram algumas configurações do BIOS. Eu recarreguei o bios defaults e ele finalmente funcionou

    
por 06.01.2018 / 20:07
0

Você pode especificar o local da imagem no seu /etc/default/grub seguindo o caminho como:

GRUB_CMDLINE_LINUX_DEFAULT="resume=/dev/sda4"
    
por 14.04.2016 / 20:30