From 73f5daf1a9d911733d24c88c02f78edabf262a5f Mon Sep 17 00:00:00 2001 From: delored Date: Fri, 16 Apr 2021 21:29:46 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB(?= =?UTF-8?q?=D0=B0)=20=D0=BD=D0=B0=20'README.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/README.md b/README.md index a796dda..855c73c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,64 @@ # elementaty_os +Lid Hibernate Ubuntu +Make sure you have SWAP > RAM +SWAP to fstab +find swap UUID: + +blkid | grep swap +should output + +/dev/nvme0n1p1: UUID="90ee7315-b16a-4e2g-bd07-cg83703750b9" TYPE="swap" PARTUUID="abadca41-942a-6c83-88d2-db28cf41ce13"` +copy the UUID, without the " : + +UUID=90ee7315-b16a-4e2g-bd07-cg83703750b9 + +add swap to fstab + +sudo nano /etc/fstab +add + +UUID=90ee7315-b16a-4e2g-bd07-cg83703750b9 none swap sw 0 0 + +reboot +add swap to grub +sudo nano /etc/default/grub +edit GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=90ee7215-c16a-4e2f-bd07-cd83703750b6" + +if you DONT want kernel messages to be shown and keep the plymouth animation during boot, change to: + +GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=90ee7215-c16a-4e2f-bd07-cd83703750b6" +update grub with the new settings: sudo update-grub + +try with + +sudo systemctl hibernate +after reboot it should show all the same windows again + +activate automatic hibernation after delay +To start using this function you need to create a file + +sudo nano /etc/systemd/sleep.conf +add + +[Sleep] +HibernateDelaySec=3600 +try + +sudo systemctl suspend-then-hibernate +Should sleep for the time specified and then the screen turns on shortly and it hibernates. Try rebooting after this happened. + +If it works make it permanent. + +sudo nano /etc/systemd/logind.conf +change + +#HandleSuspendKey=suspend +#HandleLidSwitch=suspend +to + +HandleSuspendKey=suspend-then-hibernate +HandleLidSwitch=suspend-then-hibernate +Save the file. Restart logind service by the command: + +systemctl restart systemd-logind.service \ No newline at end of file