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.
Solution:Jump to 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}"...
35 Replies
I tried running with sudo but still didn't work
did you disable zram
as that is important and then reboot
the zram-generator.conf file is empty, is there other any way to confirm is disabled?
zramctl
also returns empty
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?
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?
back when i started using linux, rule of thumb was that the swapfile/partition was 2x your ram
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?
i do not use hibernation so i dont know how true that is today
I tried find a config on bios, but found none
no idea, i dont buy laptops with flashlights, or laptops at all
try with a swapfile of 32gb
i'll try
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
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 UUIDbios you mean running on legacy boot?
then you add those as kernel args
yes
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"
no, you need to use rpm-ostree with the kargs command
then set resume to the uuid of your btrfs partition
rpm-ostree kargs --append-if-missing="blah=foo"
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.
write the commands you did here
it will help someone else
@HikariKnight you want to do this?
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
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}"
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.
youll need a mainline kernel before you do that
we also do some magic for handhelds that might affect this
Ah, yeah. Thanks for pointing that out!
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
Why a few days? It's just a matter of creating a live USB and booting that.
we're happy to merge the patch ahead of time if something comes out of it
haha no you'll see
Alright, for now I'll take your word for it
we dont support legacy boot to begin with so if this is required for that, our stance is reinstall with CSM off
also that
since using CSM hampers performance
affects sleep stuff too