Created
July 7, 2022 19:13
-
-
Save benmezger/fd5a424bb4a2a8649107989dd62dbea0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 0084195e500acb1e483fb5a6e7fea40e75a3ef3a Mon Sep 17 00:00:00 2001 | |
From: Ben Mezger <[email protected]> | |
Date: Sun, 27 Mar 2022 03:03:10 -0300 | |
Subject: [PATCH] hibernate: finally get hibernate to work in xps | |
--- | |
default/grub | 2 +- | |
mkinitcpio.conf | 2 +- | |
systemd/sleep.conf | 2 ++ | |
3 files changed, 4 insertions(+), 2 deletions(-) | |
diff --git a/default/grub b/default/grub | |
index 91a648a..465d7f6 100644 | |
--- a/default/grub | |
+++ b/default/grub | |
@@ -4,7 +4,7 @@ GRUB_DEFAULT=0 | |
GRUB_TIMEOUT=5 | |
GRUB_DISTRIBUTOR="Arch" | |
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 splash" | |
-GRUB_CMDLINE_LINUX="cryptdevice=/dev/nvme0n1p6:luks:allow-discards" | |
+GRUB_CMDLINE_LINUX="cryptdevice=/dev/nvme0n1p6:luks:allow-discards resume=/dev/mapper/vg0-swap" | |
# Preload both GPT and MBR modules so that they are not missed | |
GRUB_PRELOAD_MODULES="part_gpt part_msdos lvm" | |
diff --git a/mkinitcpio.conf b/mkinitcpio.conf | |
index 0b182e1..b200338 100644 | |
--- a/mkinitcpio.conf | |
+++ b/mkinitcpio.conf | |
@@ -49,7 +49,7 @@ FILES=() | |
# | |
## NOTE: If you have /usr on a separate partition, you MUST include the | |
# usr, fsck and shutdown hooks. | |
-HOOKS=(base udev autodetect modconf block encrypt lvm2 filesystems keyboard fsck) | |
+HOOKS=(base udev autodetect modconf block encrypt lvm2 resume filesystems keyboard fsck) | |
# COMPRESSION | |
# Use this to compress the initramfs image. By default, zstd compression | |
diff --git a/systemd/sleep.conf b/systemd/sleep.conf | |
index 174f5ea..b22531b 100644 | |
--- a/systemd/sleep.conf | |
+++ b/systemd/sleep.conf | |
@@ -13,6 +13,8 @@ | |
# See systemd-sleep.conf(5) for details. | |
[Sleep] | |
+HibernateState=disk | |
+HibernateMode=shutdown | |
#AllowSuspend=yes | |
#AllowHibernation=yes | |
#AllowSuspendThenHibernate=yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment