Fedora Linux 35 (Fedora 35) on the Framework Laptop

I ended up tuning in hibernation on my default fedora install. I have secure boot disabled and I don’t use LUKS. I posted what I did here.

I hope it helps.

2 Likes

Thanks for sharing it! What’s the reason you created the /etc/tlp.conf file newly instead of installing the ltp RPM package?

I installed the TLP like this seeing the installation document on Fedora, and editted the file /etc/tlp.conf.

$ sudo dnf install tlp tlp-rdw
$ cd /etc

$ sudo cp -p tlp.conf tlp.conf.org

$ sudo vi tlp.conf

$ diff -u tlp.conf.org tlp.conf
--- tlp.conf.org	2021-10-05 17:51:20.000000000 +0200
+++ tlp.conf	2021-12-31 21:53:38.867100574 +0100
@@ -342,6 +342,7 @@

 #PCIE_ASPM_ON_AC=default
 #PCIE_ASPM_ON_BAT=default
+PCIE_ASPM_ON_BAT=powersupersave

 # Runtime Power Management for PCIe bus devices: on=disable, auto=enable.
 # Default: on (AC), auto (BAT)

Do you mean tlp package? I didn’t have a conf file at all… It could be that I didn’t install the radio components (tlp-rdw) as I did tlp only.

Ah yes tlp package, not ltp package. OK you didn’t install the tlp-rdw. But you also didn’t install tlp package too? The tlp package includes /etc/tlp.conf. So, how does the PCIE_ASPM_ON_BAT=powersupersave in the /etc/tlp.conf work wihtout the tlp package?

$ rpm -q tlp
tlp-1.4.0-2.fc35.noarch

$ rpm -ql tlp | grep etc
/etc/tlp.conf
/etc/tlp.d
/etc/tlp.d/00-template.conf
/etc/tlp.d/README

@junaruga

Replied on my mobile on the previous post… So, on further review, I think I mixed up my notes, and I modified the lines in /etc/tlp.conf

So you are right, I modified the file that existed after installing the tlp package. My bad!

1 Like

@LegacyJames OK. No problem! I am curious to know how your Framework Laptop’s battery life looks like after you tuned the battery life including hibernation. What is the number “discharge rate” by powertop command or “energy rate” by upower command on your environment now? I am not sure the numbers are proper to measure the battery tuning.

Related topic: Linux battery life tuning - #119 by junaruga

@junaruga It varies, as I’m typing right now I see 5.68 W on powertop. I haven’t used upower before and it doesn’t seem to output anything.

I usually I see around 5.5 - 9.5 W depending what I’m doing. I have 3 USB-C and 1 USB-A module in. I keep bluetooth usually disabled, keyboard backlight off, and screen brightness fairly low.

Oh, and hibernate works much better than s2idle… I had closed my lid, unplugged the power cord for about 3 hours, and it booted up at 100%.

I’m also having this issue…I’ve downgraded the fprintd drivers hoping for a resolution but it still doesn’t work. It continues to say the device has already been claimed.

@pyguydev - try running the python script on these forums to delete all existing fingerprints.

Funny you mention this…just found and ran :slight_smile: What a blessing

2 Likes

Thanks for sharing it. It looks great result!

Today I experimented just keeping closing my Framework Laptop for 3 hours. The result was the battery was reduced from 100% to 90% during the 3 hours. The powertop and tlp daemons are enabled. But no hibernate. Just using s2idle maybe. My BIOS version is 3.02. Hmm huge difference from you.

@junaruga

Yes, s2idle will drain down the battery quickly. Did you set up hibernate yet? Does systemctl hibernate work for you? You should see no battery drain from just kicking off hibernate and powering on later, since it’s being written to disk.

By default Fedora 35 prohibits hibernation. Check your dmesg output for the line:

Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7

Also, I believe hibernation and zram can present challenges, as zram puts swap in a RAM disk, so…

Yeah, I wanted to measure the battery life before changing the setting from s2idle to hibernate. I didn’t set up the hibernate yet. In my current Framework Laptop, memory is 32 GB, and swap is 8.0 GB, I have to expand the swap size to more than 32 GB. The situation is like you. I am investigating the steps and other things such as what s2idle and hibernate are, referring your blog now. :slight_smile:

Reading the following Fedora workstation group (?)'s document about hibernation, it seems that Fedora doesn’t support hibernation by the following concerns.

https://pagure.io/fedora-workstation/blob/master/f/hibernationstatus.md

hibernation is less power consumption than S0 or S3;

But …

Note 2: There is a pernicious problem with laptop batteries. As they age, they often won’t tolerate load very well, leading to rapid discharge and very short or no notice before a compulsory power off. In such cases, even when the system is hibernation capable, hibernation can fail. Power can be lost during hibernation entry. There isn’t much software can do to second guess the commonly confused state of aged batteries.

Current significant impediments:

  • UEFI Secure Boot is overwhelmingly present and enabled by default on new computers;
  • kernel lockdown policy inhibits hibernation when Secure Boot is enabled [4];
  • ACPI bugs can be transient and difficult to fix or work around; hibernation can mean data loss due to failed entry or exit;
  • resource requirements for the permanent swap partition can be excessive, Anaconda history states the reason for the current swap partition size [5] is to accommodate hibernation;
  • large swap partition exacerbates performance problems in swap heavy workloads.

Reddit: Fedora 34 Hibernation: https://www.reddit.com/r/Fedora/comments/mw4ee9/fedora_34_hibernation/

I am investigating about the system sleep and ACPI mainly reading kernel document now. Here is just my memo. I will add more contents there when I find something new.

Just note yesterday I updated the wiki updating Sleep / Suspend and adding Reporting upstream or Fedora project section.