Fedora 34 on the Framework Laptop

It is suggested above to follow the procedure for Ubuntu (Ubuntu 21.04 on the Framework Laptop - #8 by jeshikat), but that says to run the command sudo update-grub, which doesn’t seem to exist in Fedora. This page, Equivalent of update-grub for RHEL/Fedora/CentOS systems? - Unix & Linux Stack Exchange, has an answer that says that the Fedora 33 guide says to run sudo grub2-mkconfig --output=/boot/grub2/grub.cfg. Does that seem right for Fedora 34? The current guide GRUB 2 - Fedora Project Wiki seems to confirm this, but I’m still a little confused.

And now that I look at that page more, I wonder if the correct advice might be to use grubby, per GRUB 2 - Fedora Project Wiki. However, looking at the grubby man page leaves me as confused as ever. Not being intimately familiar with the various parts of the Grub2 subsystem, I’m not clear what options in grubby would accomplish changing the setting.

I finally did the following, and it seems to have worked, as shown:

Before configuring /etc/default/grub to enable deep sleep:

[jeremy@fedora ~]$ cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
[jeremy@fedora ~]$ 

After configuring /etc/default/grub to enable deep sleep::

[jeremy@fedora ~]$ cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rhgb quiet mem_sleep_default=deep"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
[jeremy@fedora ~]$ 

Running the script to invoke the grub incantation:

[root@fwfedora ~]# cat /sys/power/mem_sleep
[s2idle] deep
[root@fwfedora ~]# cat doit.sh
grub2-mkconfig -o /etc/grub2.cfg
grub2-mkconfig -o /etc/grub2-efi.cfg
[root@fwfedora ~]# . doit.sh
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
[root@fwfedora ~]# ls -l  /etc/grub2.cfg /etc/grub2-efi.cfg 
lrwxrwxrwx. 1 root root 22 Jun 15 11:41 /etc/grub2.cfg -> ../boot/grub2/grub.cfg
lrwxrwxrwx. 1 root root 22 Jun 15 11:41 /etc/grub2-efi.cfg -> ../boot/grub2/grub.cfg
[root@fwfedora ~]# diff /etc/grub2.cfg /etc/grub2-efi.cfg
[root@fwfedora ~]# 

(reboot)

[root@fwfedora ~]# cat /sys/power/mem_sleep 
s2idle [deep]
[root@fwfedora ~]# 
6 Likes