[RESPONDED] Linux sleep/hibernate status?

I’ve the same setup and issue. However, while suspended, the laptop tend to drain the battery rapidly (more than 10%/h) while the temperature rise abnormally… Am I the only one getting this issue ? I believed it could be linked to the sleep status but since it cannot be switched to deep sleep, it’s a bit cumbersome…

Probably same issue than on the laptop 13 :

1 Like

For me putting it to deep sleep fixed the issue and I now have around 0.5%/h battery loss.

believed it could be linked to the sleep status but since it cannot be switched to deep sleep

Which distro are you running that you can’t go to deep sleep?

I’m on Pop!_OS 22.04 LTS, and I get the following:

$ cat /sys/power/mem_sleep
s2idle

But from what I understood from @xyx0826 answer, the issue is more related to hardware, isn’t that right ?

Can you share your HW/BIOS/distro stack that brought up deep sleep on your machine? I’m on Ubuntu 24.04 with BIOS 03.02 and never had any luck with it.

In other news I’m having trouble with hibernation as well but I suspect that might be an OS config issue.

I have Framework 13 11th gen, 3.19 BIOS (same issue with 3.17 and probably earlier versions) and using Arch (same issue with Fedora, OpenSuse).
It might be a hardware issue, but it can be fixed by changing the sleep status to deep.

Fedora:
sudo grubby --update-kernel=ALL --args=mem_sleep_default=deep

Arch with systemd-boot:
add mem_sleep_default=deep
to /boot/loader/entries/<current-conf>

Ubuntu:
Look at the first answer

Thanks, sounds like I’m out of luck with my AMD CPU on the 16 then. The deep option doesn’t appear in /sys/power/mem_sleep so setting mem_sleep_default would do nothing.

Lack of S3 sleep seems like a UEFI or hardware problem. I’ve tried enabling S3 through Universal AMD Form Browser but like this post, my OS fails to resume. (Be careful with this tool - bricking risk!)

I also tried adding --args=mem_sleep_default=deep to my boot options but as @xyx0826 mentioned it doesn’t change anything…

However, I noticed that after ~2h being idle (with lid closed) my charger was hot and my laptop burning hot in a cool room ! The battery drain is annoying but the temperature rise is really problematic and can be dangerous for the people around and the hardware.
Since the issue seems to be linked to the hardware, Framework support should probably be requested.

If you’re having high power consumption over s2idle please use this script to identify the issue:

If you’ve used any tools that modified “hidden” bios settings please reset BIOS defaults before running the tool.

I didn’t manage to install iasl and I needed to run the script as root. It seems to detect that my OS is tainted (12288) which seems to relate to :

    1. kernel issued warning
    1. externally-built (“out-of-tree”) module was loaded
    1. unsigned module was loaded

I’m not sure what those flags means. Could it be linked to my Pop_OS! install ? I followed the Ubuntu 22.04 LTS Installation on the Framework Laptop 16 - Framework Guides (with Installing Pop!_OS - System76 Support instead of Ubuntu) with the update of Framework Laptop 16 BIOS and Driver Releases, the completion guide and disabled touchpad during typing.

The script logs (with default values and the --force option):

Location of log file (default s2idle_report-2024-06-26.txt)? 
👀 ACPI extraction tool `iasl` is missing. Attempting to install.
Debugging script for s2idle on AMD systems
💻 Framework Laptop 16 (AMD Ryzen 7040 Series) (16in Laptop) running BIOS 3.3 (03.03) released 03/27/2024 and EC unknown
🐧 Pop!_OS 22.04 LTS
🐧 Kernel 6.9.3-76060903-generic
🔋 Battery BAT1 (NVT FRANDBA) is operating at 98.47% of design
Checking prerequisites for s2idle
✅ Logs are provided via systemd
✅ AMD Ryzen 7 7840HS w/ Radeon 780M Graphics (family 19 model 74)
✅ SMT enabled
✅ 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.82.0)
✅ USB4 driver `thunderbolt` bound to 0000:c6:00.5
✅ USB4 driver `thunderbolt` bound to 0000:c6:00.6
✅ GPU driver `amdgpu` bound to 0000:03:00.0
✅ GPU driver `amdgpu` bound to 0000:c4:00.0
✅ System is configured for s2idle
✅ NVME Sandisk Corp is configured for s2idle in BIOS
✅ GPIO driver `pinctrl_amd` available
🚦 Device firmware checks unavailable without fwupd gobject introspection
ACPI extraction tool `iasl` is missing
❌ Kernel is tainted: 12288
Your system does not meet s2idle prerequisites!
How long should suspend cycles last in seconds (default 10)? 
How long to wait in between suspend cycles in seconds (default 4)? 
How many suspend cycles to run (default 1)? 
Started at 2024-06-26 10:59:39.889433 (cycle finish expected @ 2024-06-26 10:59:53.889450)
Results from last s2idle cycle
○ Suspend count: 1
○ Hardware sleep cycle count: 1
○ GPIOs active: ['84']
○ Wakeup triggered from IRQ 9: ACPI SCI
○ Woke up from IRQ 9: ACPI SCI
○ gpe0B increased from 265 to 339
✅ Userspace suspended for 0:00:13.326155
✅ In a hardware sleep state for 0:00:06.357666 (47.71%)
🔋 Battery BAT1 (NVT FRANDBA) is operating at 98.47% of design
Explanations for your system
🚦 Kernel is tainted
	A tainted kernel may exhibit unpredictable bugs that are difficult for this script to characterize.
	If this is intended behavior run the tool with --force.

For more information on this failure see:
	https://gitlab.freedesktop.org/drm/amd/-/issues/3089

I need to see the whole log not just stdout. Please share it. Gist or pastebin are fine.

Sorry, I didn’t check that the logs from stdout where different than the log file. There you go: s2idle_report-2024-06-26.txt · GitHub

Can you do a longer cycle? Like 5 minutes? I see that FRMW0003 device woke your system relatively prematurely but I want to see if that also happens on a longer cycle.

Here’s the report for 2 cycle of 10 minutes : s2idle_report-2024-06-27.txt · GitHub

Both those cycles look good with no notable problems. Is it still heating up during these cycles? I wonder if your issue before was just the laptop charging while asleep and getting warm from doing so?

I didn’t check specifically during those cycles. But I know that the issue happens independently of the charge level and whether charging or not… Its simply that on battery, it rapidly burns it and on charge, it keeps at max level (60%). But every times, it seems to increase in temperature compared to when its awake.

Next time you would otherwise suspend it normally for a while can you try suspending using the script instead for the duration you want it suspended (or longer)? This will help get actual metrics of power consumed during the cycle and if there was a spurious wakeup during it.

2 Likes

Here’s the log for a single 1h23 sleep (with lid open) : s2idle_report-2024-06-28.txt · GitHub

I’ve also used sensors before and after to check the temperature. 48°C before sleep, 80°C when I came back… The ventilators immediately started up to lower the temperature to 60°C when I woke the laptop and logged in.

Before:

$ sensors
amdgpu-pci-0300
Adapter: PCI adapter
vddgfx:       18.00 mV 
fan1:           0 RPM  (min =    0 RPM, max = 4900 RPM)
edge:         +36.0°C  (crit = +100.0°C, hyst = -273.1°C)
                       (emerg = +105.0°C)
junction:     +36.0°C  (crit = +100.0°C, hyst = -273.1°C)
                       (emerg = +105.0°C)
mem:          +46.0°C  (crit = +105.0°C, hyst = -273.1°C)
                       (emerg = +110.0°C)
PPT:         1000.00 mW (cap = 100.00 W)

ucsi_source_psy_USBC000:003-isa-0000
Adapter: ISA adapter
in0:           0.00 V  (min =  +0.00 V, max =  +0.00 V)
curr1:       680.00 mA (max =  +0.00 A)

k10temp-pci-00c3
Adapter: PCI adapter
Tctl:         +46.4°C  

ucsi_source_psy_USBC000:001-isa-0000
Adapter: ISA adapter
in0:           5.00 V  (min =  +5.00 V, max =  +5.00 V)
curr1:         5.00 A  (max =  +3.00 A)

BAT1-acpi-0
Adapter: ACPI interface
in0:          15.96 V  
curr1:         0.00 A  

amdgpu-pci-c400
Adapter: PCI adapter
vddgfx:      900.00 mV 
vddnb:       762.00 mV 
edge:         +42.0°C  
PPT:           7.23 W  (avg =   5.13 W)

ucsi_source_psy_USBC000:004-isa-0000
Adapter: ISA adapter
in0:           0.00 V  (min =  +0.00 V, max =  +0.00 V)
curr1:         0.00 A  (max =  +0.00 A)

mt7921_phy0-pci-0400
Adapter: PCI adapter
temp1:        +48.0°C  

ucsi_source_psy_USBC000:002-isa-0000
Adapter: ISA adapter
in0:           0.00 V  (min =  +0.00 V, max =  +0.00 V)
curr1:         0.00 A  (max =  +0.00 A)

nvme-pci-0500
Adapter: PCI adapter
Composite:    +43.9°C  (low  =  -5.2°C, high = +89.8°C)
                       (crit = +93.8°C)

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +45.8°C  
temp2:        +47.8°C  
temp3:        +47.8°C  
temp4:        +45.8°C  
temp5:        +37.8°C  
temp6:        +39.8°C  
temp7:        +37.8°C  
temp8:        +35.8°C 

After:

sensors
amdgpu-pci-0300
Adapter: PCI adapter
vddgfx:      606.00 mV 
fan1:           0 RPM  (min =    0 RPM, max = 4900 RPM)
edge:         +72.0°C  (crit = +100.0°C, hyst = -273.1°C)
                       (emerg = +105.0°C)
junction:     +74.0°C  (crit = +100.0°C, hyst = -273.1°C)
                       (emerg = +105.0°C)
mem:          +81.0°C  (crit = +105.0°C, hyst = -273.1°C)
                       (emerg = +110.0°C)
PPT:          14.00 W  (cap = 100.00 W)

ucsi_source_psy_USBC000:003-isa-0000
Adapter: ISA adapter
in0:           0.00 V  (min =  +0.00 V, max =  +0.00 V)
curr1:       680.00 mA (max =  +0.00 A)

k10temp-pci-00c3
Adapter: PCI adapter
Tctl:         +54.8°C  

ucsi_source_psy_USBC000:001-isa-0000
Adapter: ISA adapter
in0:           5.00 V  (min =  +5.00 V, max =  +5.00 V)
curr1:         5.00 A  (max =  +3.00 A)

BAT1-acpi-0
Adapter: ACPI interface
in0:          15.96 V  
curr1:         0.00 A  

amdgpu-pci-c400
Adapter: PCI adapter
vddgfx:        1.33 V  
vddnb:       763.00 mV 
edge:         +44.0°C  
PPT:          35.25 W  (avg =  12.22 W)

ucsi_source_psy_USBC000:004-isa-0000
Adapter: ISA adapter
in0:           0.00 V  (min =  +0.00 V, max =  +0.00 V)
curr1:         0.00 A  (max =  +0.00 A)

mt7921_phy0-pci-0400
Adapter: PCI adapter
temp1:        +48.0°C  

ucsi_source_psy_USBC000:002-isa-0000
Adapter: ISA adapter
in0:           0.00 V  (min =  +0.00 V, max =  +0.00 V)
curr1:         0.00 A  (max =  +0.00 A)

nvme-pci-0500
Adapter: PCI adapter
Composite:    +40.9°C  (low  =  -5.2°C, high = +89.8°C)
                       (crit = +93.8°C)

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +46.8°C  
temp2:        +48.8°C  
temp3:        +46.8°C  
temp4:        +54.8°C  
temp5:        +67.8°C  
temp6:        +76.8°C  
temp7:        +67.8°C  
temp8:        +72.8°C

It definitely didn’t wake up on its own spuriously but if it’s heating up like that I’m questioning if there is a hardware issue. I think you should contact FW support.

1 Like

One more thought I had; do you have anything connected to the dGPU? Or did you have a workload running on dGPU at suspend?

No workload on the dGPU.

(I’ve sent a request to the FW support, I’ll let you know how it evolve)