Artix Linux => Applications & Software => Topic started by: CustomerServiceRobot on 19 April 2020, 05:54:30
Title: Hibernation into a Btrfs swapfile not working
Post by: CustomerServiceRobot on 19 April 2020, 05:54:30
I followed the directions on the Arch wiki for btrfs swapfile hibernation (https://wiki.archlinux.org/index.php/Power_management/Suspend_and_hibernate), but I've had no success. To give greater details, here is my current setup, as well as the different proposed solutions that I tried.
My system is configured with a large HDD that uses bcache (https://wiki.archlinux.org/index.php/Bcache) for a smaller SSD. As you can see below, sda1 is used to store the /boot folder as well as the EFI since no bootloader I know of supports bcache. I'm using the rEFInd bootloader. My graphics card is a GTX 1070, and I'm using the proprietary nvidia driver. /dev/bcache0 is formatted as btrfs with various subvolumes mounted to different locations. To ensure I can take snapshots of my root subvolume, the swapfile is placed in the @swap subvolume mounted at /.swap. I'm using the OpenRC init system. I'm using dracut instead of mkinitcpio to generate an initramfs. I'm using the KDE Plasma desktop environment.
Output of lsblk:
Quote
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 931.5G 0 disk ├─sda1 8:1 0 200M 0 part /boot └─sda2 8:2 0 931.3G 0 part └─bcache0 254:0 0 931.3G 0 disk /var/lib/libvirt sdb 8:16 0 111.8G 0 disk └─bcache0 254:0 0 931.3G 0 disk /var/lib/libvirt
/etc/fstab file:
Quote
# Static information about the filesystems. # See fstab(5) for details.
"Boot using default options" "root=LABEL=Root resume=LABEL=Root resume_offset=12588288 nvidia-drm.modeset=1" "Boot using fallback initramfs" "root=LABEL=Root resume=LABEL=Root resume_offset=12588288 nvidia-drm.modeset=1 initrd=/initramfs-linux-dracut-fallback.img" "Boot using single user mode" "root=LABEL=Root resume=LABEL=Root resume_offset=12588288 nvidia-drm.modeset=1 single"
WIth that out of the way, let's get to the crux of the issue. When attempting to hibernate from KDE, the screen will switch off, but my system will not fully shutdown. At first, I thought this was strictly a KDE issue. That statement is half true because using the pm-utils pm-hibernate command or the echo shutdown > /sys/power/disk and echo disk > /sys/power/state commands does lead to a successfull shutdown. However, my system does not resume back to how it was when it shutdown. It starts up as if I did not hibernate at all! I also tried using the LTS kernel and nvidia driver, but that yielded no results.