Ferramentas do usuário

Ferramentas do site


public:hibernar-mint-19

Diferenças

Aqui você vê as diferenças entre duas revisões dessa página.

Link para esta página de comparações

Ambos lados da revisão anteriorRevisão anterior
Próxima revisão
Revisão anterior
public:hibernar-mint-19 [2019/06/08 22:33] kawabatapublic:hibernar-mint-19 [2025/06/05 19:47] (atual) – edição externa 127.0.0.1
Linha 3: Linha 3:
 [[https://forums.linuxmint.com/viewtopic.php?t=284100|https://forums.linuxmint.com/viewtopic.php?t=284100]] [[https://forums.linuxmint.com/viewtopic.php?t=284100|https://forums.linuxmint.com/viewtopic.php?t=284100]]
  
-<code>+<code bash>
 sudo swapoff -a sudo swapoff -a
 </code> </code>
Linha 11: Linha 11:
  
  
-<code>+<code bash>
 sudo dd if=/dev/zero of=/swapfile bs=1M count=$(($SIZE * 1024))   sudo dd if=/dev/zero of=/swapfile bs=1M count=$(($SIZE * 1024))  
 sudo chmod 0600 /swapfile  sudo chmod 0600 /swapfile 
Linha 18: Linha 18:
 </code> </code>
  
-<code>+<code bash>
 RESUME_PARAMS="resume=UUID=$(findmnt / -o UUID -n) resume_offset=$(sudo filefrag -v /swapfile|awk 'NR==4{gsub(/\./,"");print $4;}') " RESUME_PARAMS="resume=UUID=$(findmnt / -o UUID -n) resume_offset=$(sudo filefrag -v /swapfile|awk 'NR==4{gsub(/\./,"");print $4;}') "
 </code> </code>
  
-<code>+<code bash>
 if grep resume /etc/default/grub>/dev/null; then echo -e "\nERROR: Hibernation already configured. Remove the existing configuration from /etc/default/grub and add these parameters instead:\n$RESUME_PARAMS";else sudo sed -i "s/GRUB_CMDLINE_LINUX_DEFAULT=\"/GRUB_CMDLINE_LINUX_DEFAULT=\"$RESUME_PARAMS/" /etc/default/grub;fi if grep resume /etc/default/grub>/dev/null; then echo -e "\nERROR: Hibernation already configured. Remove the existing configuration from /etc/default/grub and add these parameters instead:\n$RESUME_PARAMS";else sudo sed -i "s/GRUB_CMDLINE_LINUX_DEFAULT=\"/GRUB_CMDLINE_LINUX_DEFAULT=\"$RESUME_PARAMS/" /etc/default/grub;fi
 </code> </code>
  
-<code>+<code bash>
 sudo update-grub sudo update-grub
 </code> </code>
  
-<code>+<code bash>
 sudo tee /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla <<'EOB' sudo tee /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla <<'EOB'
 [Enable hibernate] [Enable hibernate]
Linha 44: Linha 44:
 Teste para saber se está ok Teste para saber se está ok
  
-<code>+<code bash>
 busctl call org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager CanHibernate busctl call org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager CanHibernate
 </code> </code>
Linha 52: Linha 52:
 ou para hibernar em linha de comando ou para hibernar em linha de comando
  
-<code>+<code bash>
 systemctl hibernate systemctl hibernate
 </code> </code>
public/hibernar-mint-19.1560033196.txt.gz · Última modificação: (edição externa)