Can't go to Hibernation

Hello everyone. I'm using bazzite-gnome-nvidia-open:stable and can't configure hibernation I followed the instructions on https://docs.bazzite.gg/Advanced/swapfile/ and all commands worked. When running swapon it shows the swapfile created, but when trying to go to hibernation with "systemctl hibernate -i" it shows "Call to Hibernate failed: Access denied". Suspend works fine, only hibernation that I can't get it working. I appreciate any help.
Enabling Hibernation in Bazzite Desktop Images - Bazzite Documentation
Bazzite is a custom image built upon Fedora Atomic Desktops that brings the best of Linux gaming to all of your devices.
No description
Solution:
lsblk -f to get the UUID of the partition btrfs inspect-internal map-swapfile -r /var/swpa/swapfile (only works on btrfs file systems) to get the resume_offset then set the kernel partition with rpm-ostree kargs --append-if-missing="resume=UUID={UUID_partition}"...
Jump to solution
35 Replies
dragaoazuljr
dragaoazuljrOP2w ago
I tried running with sudo but still didn't work
HikariKnight
HikariKnight2w ago
did you disable zram as that is important and then reboot
dragaoazuljr
dragaoazuljrOP2w ago
the zram-generator.conf file is empty, is there other any way to confirm is disabled?
HikariKnight
HikariKnight2w ago
zramctl
dragaoazuljr
dragaoazuljrOP2w ago
also returns empty
HikariKnight
HikariKnight2w ago
then i have no idea myself as those are the gotchas people seem to miss, turning off zram and not rebooting afterwards how big is the swapfile and how much ram do you have?
dragaoazuljr
dragaoazuljrOP2w ago
16gb ram and the swapfile is 21gb before following the guide I was using swapfile with zram, and it was 16gb when going to hibertation, it showed the message "Failed to hibernate: Not enough swap space for hibernation" maybe returing to zram and just setting the file bigger can work?
HikariKnight
HikariKnight2w ago
back when i started using linux, rule of thumb was that the swapfile/partition was 2x your ram
dragaoazuljr
dragaoazuljrOP2w ago
I could use Suspend instead of hibernate, but all the leds of the pc and fan stays on, do you know a way to turn them off on suspend?
HikariKnight
HikariKnight2w ago
i do not use hibernation so i dont know how true that is today
dragaoazuljr
dragaoazuljrOP2w ago
I tried find a config on bios, but found none
HikariKnight
HikariKnight2w ago
no idea, i dont buy laptops with flashlights, or laptops at all try with a swapfile of 32gb
dragaoazuljr
dragaoazuljrOP2w ago
i'll try
dragaoazuljr
dragaoazuljrOP2w ago
I tried with 32gb, now the error is diferent, "Call to hibernate failed: Not running on EFI and resume= is not set, or noresume is set. No available method to resume from hibernation". I found a way to add the kernel parameter (https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Acquire_swap_file_offset) but the echo > ...resume_offset just returned with permission denied. I don't know if with the image system of bazzite you can change ther kernel params
antheas
antheas2w ago
if youre running on bios youre cooked you will need to set the resume parameter as a kernel arg which we dont provide instructions for using CMS not supported, and i dont feel like pulling how to get the resume offset from the internet you can find it in the btrfs docs for making a swap then feel free to leave it here and someone will add it to the docs sudo btrfs inspect-internal map-swapfile /swap/swapfile here it is, this will give you the offset then you need your UUID
dragaoazuljr
dragaoazuljrOP2w ago
bios you mean running on legacy boot?
antheas
antheas2w ago
then you add those as kernel args yes
dragaoazuljr
dragaoazuljrOP2w ago
i have the offset, just cant set the resume_offset with the echo command, now I was going to try setting via Grub, changing the /etc/default/grub and then running "ujust -regenerate-grub"
antheas
antheas2w ago
no, you need to use rpm-ostree with the kargs command then set resume to the uuid of your btrfs partition
HikariKnight
HikariKnight2w ago
rpm-ostree kargs --append-if-missing="blah=foo"
dragaoazuljr
dragaoazuljrOP2w ago
Nice, it worked after setting resume and resume_offset thanks for the support, if I may suggest, change the guide to note the size of swap, on the guide is 21gb fixed, adding a note suggesting at least double of the RAM size. And the kernel parameter, which is different from other linux distros because of rpm-ostree.
antheas
antheas2w ago
write the commands you did here it will help someone else @HikariKnight you want to do this?
mskiptr
mskiptr2w ago
That sound like suspend isn't properly supported in the kernel drivers for your hardware (or maybe a quirk of your mobo which isn't worked-around in the kernel yet). I don't really have experience with reporting or fixing stuff like that (yet…), but the place to do so is the Linux Kernel Mailing List I believe. Here's some documentation on doing so: https://docs.kernel.org/admin-guide/reporting-issues.html
Solution
dragaoazuljr
dragaoazuljr2w ago
lsblk -f to get the UUID of the partition btrfs inspect-internal map-swapfile -r /var/swpa/swapfile (only works on btrfs file systems) to get the resume_offset then set the kernel partition with rpm-ostree kargs --append-if-missing="resume=UUID={UUID_partition}" rpm-ostree kargs --append-if-missing="resume_offset={resume_offset}"
dragaoazuljr
dragaoazuljrOP2w ago
yeah, it seems my motherboard only supports s2idle, which don't turn off a lot of things, that's probaly why it wont turn off the fans or leds.
antheas
antheas2w ago
youll need a mainline kernel before you do that we also do some magic for handhelds that might affect this
mskiptr
mskiptr2w ago
Ah, yeah. Thanks for pointing that out!
antheas
antheas2w ago
endeavouros is recommended for that, it will also take you a few days of tinkering and will probably go nowhere if you have an amd CPU amd accepts these issues on their bug tracker important to note that it will probably go nowhere, and if it does it will take you 3-4 months of back and forth
mskiptr
mskiptr2w ago
Why a few days? It's just a matter of creating a live USB and booting that.
antheas
antheas2w ago
we're happy to merge the patch ahead of time if something comes out of it haha no you'll see
mskiptr
mskiptr2w ago
Alright, for now I'll take your word for it
HikariKnight
HikariKnight2w ago
we dont support legacy boot to begin with so if this is required for that, our stance is reinstall with CSM off
antheas
antheas2w ago
also that
HikariKnight
HikariKnight2w ago
since using CSM hampers performance
antheas
antheas2w ago
affects sleep stuff too

Did you find this page helpful?