FYI have a linux kernel branch with all the AMD 13 Framework patches I could findā¦ seems pretty stable to me, but still around 5W idle with screen on, obviously for advanced usersā¦ hopefully all this will be merged in soon. Based on 6.7-rc3.
Did you manage to find the commit that breaks als sensor in 6.7 and revert it?
I did not.
On my 7640u I am quite satisfied with the battery life during work.
But I have a problem with the power consumption during sleep.
24hrs ago I closed the lid, at 68%.
Now I open up my laptop, plug in a charger, and itās at 0%.
Linux mint, hybrid-sleep enabled.
What should I do?
Because that is just simply not acceptable at all
It basically makes my laptop incredibly unreliable; since I am used to always opening up a laptop and having a decent charge available (even after weeks, due to hybrid)
My 12 year old macbook air loses only like 15-10% max over a full day in sleep, probably even less.
Run the AMD s2idle report and fix whatever it says is wrong in your system.
If nothing is reported wrong, double check you have all the cards in suggested slots from framework guidance.
Wow!!
I ran the script.
All green except for the rtc_cmos.
I have added the kernel parameter rtc_cmos.use_acpi_alarm=1
Previously: Lost 40% battery in 1 night.
Currently: Lost 2% battery in 1 night.
Hi Mario,
Iāve just run this and come across the following:
ravi@ravi-fw13:~/Downloads$ sudo ./amd_s2idle.py
[sudo] password for ravi:
Location of log file (default s2idle_report-2023-12-18.txt)?
Debugging script for s2idle on AMD systems
Framework Laptop 13 (AMD Ryzen 7040Series) (Laptop) running BIOS 3.3 (03.03) released 10/17/2023 and EC unknown
Kernel 6.6.7-1-siduction-amd64
Battery BAT1 ( ) is operating at 102.07% of design
Checking prerequisites for s2idle
Logs are provided via dmesg, timestamps may not be accurate over multiple cycles
AMD Ryzen 7 7840U w/ Radeon 780M Graphics (family 19 model 74)
LPS0 _DSM enabled
ACPI FADT supports Low-power S0 idle
HSMP driver
amd_hsmp
not detected (blocked: False)
PMC driver
amd_pmc
loaded (Program 0 Firmware 76.70.0)
USB4 driver
thunderbolt
loaded
GPU driver
amdgpu
available
GPU firmware missing
System is configured for s2idle
NVME Shenzhen Longsys Electronics Co., Ltd. is configured for s2idle in BIOS
GPIO driver
pinctrl_amd
available
Your system does not meet s2idle prerequisites!
Explanations for your system
AMDGPU firmware is missing
The amdgpu driver loads firmware from /lib/firmware/amdgpu
In some cases missing firmware will prevent a successful suspend cycle.
Upgrade to a newer snapshot at kernel-firmware / Linux Firmware Ā· GitLab
amdgpu 0000:c1:00.0: Direct firmware load for amdgpu/gc_11_0_1_mes_2.bin failed with error -2
For more information on this failure see:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053856
I have gone to gitlab but I canāt see how to install a newer snapshot. I am using siduction (a Debian Sid based rolling release distro and I have non-free enabled). I have firmware-amd-graphics version 20230625-1 which seems quite old compared to the snapshots on gitlab. I was wondering if you know what the command is to install to an updated snapshot version from gitlab? Iām googling this but canāt seem to figure it out on my own.
I experimented a bit with sleep to hibernate and it does weird things.
Sleep to hibernate activated, after 90 minutes, close lid with 85% at 2 in the night, open it at 11 and its down to 30%, the script reports that apparently my samsung nvme isnt configured for sleep state. I tried to reproduce that by lowering the sleep to hibernate option to 1 minute but this time report says all green. Manually entering hibernate brought me once to a point where the script says that no sleep mode was achived. But the second time around it did not.
I think I had tlp and ppd running at the same time which probably conflicted somehow, for now, whatever i have set seems to properly sleep, in a timed test i lost 1% of battery in exactly one hour. That seems fine
Thereās a newer snapshot in debian testing I seem to recall hearing. Maybe try that.
If the script changes output for NVME changes then this is a false negative. If youāre using the dmesg logger instead of systemd then the ring buffer wrapped from too many messages.
Now that you say thatā¦yes i am stupid, i mentioned that the laptop was on for a long time and i think there was an error message around the ringbuffer issue. Thanks for the clarification!
FYI, powertop is not building on Ubuntu 22.04.
I ran the AMD s2idle script because I was also having issues where my laptop unpredictably loses all battery during sleep, especially when the lid is closed. Iām using powertop and the optimisations from this thread and that has been great for normal battery use but sleep is just broken, so broken! And the script gives me many errors (on Debian 22.04.3 LTS) that I donāt know how to fix ā why am I having this and not others on a new 13" Framework (from mid-last year):
Debugging script for s2idle on AMD systems
Framework Laptop (13th Gen Intel Core) (13in Laptop) running BIOS 3.3 (03.03) released 04/07/2023 and EC unknown
Ubuntu 22.04.3 LTS
Kernel 6.5.0-15-lowlatency
Battery BAT1 (NVT Framewo) is operating at 94.54% of design
Checking prerequisites for s2idle
Logs are provided via systemd
13th Gen Intel(R) Coreā¢ i5-1340P (family 6 model ba)
This tool is not designed for parts from this CPU vendor
LPS0 _DSM enabled
ACPI FADT supports Low-power S0 idle
HSMP driver
amd_hsmp
not detected (blocked: False)
PMC driver
amd_pmc
did not bind to any ACPI device
USB4 driver
thunderbolt
loaded
GPU driver
amdgpu
not loaded
System isnāt configured for s2idle in firmware setup
NVME Sandisk Corp is configured for s2idle in BIOS
GPIO driver
pinctrl_amd
not loaded
What if sleep.conf is totally commented out? It looks like Ubuntu uses the settings GUI to set these, Iām not sure if thereās two conflicting systems or something is out of sync? A quick look on the internet hasnāt helped clarify that unfortunately
Please check the output:
Debugging script for s2idle on AMD systems
and
Framework Laptop (13th Gen Intel Core)
You are running this AMD script (meant for the Ryzen platform) on an Intel machine - the results will not be meaningful.
oh duh right! So thereās none for Intel?
I re-ran the s2idle script, just for fun.
Previous time (as mentioned in my replies earlier in this thread) it worked fine.
Now it does not, and complains about a tainted kernel and problems with s2idle.
My simple question is: does this mean that I have a powermanagement issue now?
Or is that not the case.
Previous time I ran this, and it indicated I should add a kernel paramter. Which I did, and it solved my suspend-then-sleep issue.
But now, a few months later, rerunning this script I get worried something is wrong.
The only thing that might be different is that I installed an Intel ax210 which replaces the stock Mediatek.
If itās complaining your kernel is tainted, look at the logs for why it got tainted and cross reference to tainted kernel documentation:
Tainted kernels ā The Linux Kernel documentation
It doesnāt necessarily mean there is a problem with power management, but if you have one then itās the first thing you should look at solving.
Does it install from the jammy repo?
sudo apt install powertop
This thread is very long with lots of different info, and hard to sift through. Is there a concise guide to fixing the fast battery drain in Ubuntu on the Framework? I am on the AMD 7040 13 inch.