I have a FW13 from a couple of weeks ago and have had quite a lot of issues with this modern standby nonsense.
It eats through the battery (set to charge to 90%) in 6-8 hours and is running bios 3.05.
I’ve lurked on the forums and tried a couple of things but the laptop seems to refuse to go to deep sleep for more than a couple of minutes.
My primary distro is SUSE Tumbleweed (no secure boot), but have run the s2idle script in a live Fedora (secure boot on).
I’ve run a whole bunch of tests starting with stock Fedora 40 installed on a USB-to-SATA SSD and then on the installed TW.
No WoWLAN or wake on bluetooth was enabled. I tried disabling ACPI wakeup devices in /proc/acpi/wakeup to no avail.
Without wifi card: The computer sleeps 95+% in sleep cycles of 75 seconds consistently repeatable.
With the AX210 wifi card installed I ran a lot of trials and got a single 5x run of 75sec with 95% HW sleep on Fedora 40 - not exactly consistent, but much more so than TW.
The suse installation started it’s life on my T480 years back so it may just have accumulated weird cruft that cause it to behave weird.
Next week I will have access to the MediaTek card again and I will repeat the tests with that.
For the next couple of days I will keep hibernating the computer like it’s 2005
After a couple of more days of testing/ordinary use it seems to be working fine when I sleep the computer for longer periods. The loss is something like 5-10% overnight, which is not perfect but perfectly acceptable.
I noticed some more drain at night the last couple of days and yesterday I set the s2idle script for an 8 hour sleep and it managed hardware sleep for 20 seconds.
Running KDE spin of Fedora 40.
Location of log file (default s2idle_report-2024-07-28.txt)?
Debugging script for s2idle on AMD systems
💻 Framework Laptop 13 (AMD Ryzen 7040Series) (Laptop) running BIOS 3.5 (03.05) released 03/29/2024 and EC unknown
🐧 Fedora Linux 40 (KDE Plasma)
🐧 Kernel 6.9.9-200.fc40.x86_64
🔋 Battery BAT1 (NVT Framewo) is operating at 98.29% of design
Checking prerequisites for s2idle
✅ Logs are provided via systemd
✅ AMD Ryzen 5 7640U w/ Radeon 760M 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:c3:00.5
✅ USB4 driver `thunderbolt` bound to 0000:c3:00.6
✅ GPU driver `amdgpu` bound to 0000:c1:00.0
✅ System is configured for s2idle
✅ NVME KIOXIA Corporation NVMe SSD is configured for s2idle in BIOS
✅ GPIO driver `pinctrl_amd` available
How long should suspend cycles last in seconds (default 10)? 28800
How long to wait in between suspend cycles in seconds (default 4)?
How many suspend cycles to run (default 1)?
Started at 2024-07-28 23:17:10.591566 (cycle finish expected @ 2024-07-29 07:17:14.591585)
Results from last s2idle cycle
○ Suspend count: 1
○ Hardware sleep cycle count: 2
○ GPIOs active: ['5']
○ Wakeup triggered from IRQ 9: ACPI SCI
○ Woke up from IRQ 9: ACPI SCI
○ gpe0B increased from 608 to 630
✅ Userspace suspended for 8:00:02.117170
❌ In a hardware sleep state for 0:00:20.761993 (0.07%)
🔋 Battery BAT1 (NVT Framewo) is operating at 98.29% of design
Explanations for your system
🚦 System had low hardware sleep residency
The system was asleep for 8:00:02.117170, but only spent 0.07%
of this time in a hardware sleep state. In sleep cycles that are at least
60 seconds long it's expected you spend above 90 percent of the cycle in hardware sleep.
Location of log file (default s2idle_report-2024-07-29.txt)?
Debugging script for s2idle on AMD systems
💻 Framework Laptop 13 (AMD Ryzen 7040Series) (Laptop) running BIOS 3.5 (03.05) released 03/29/2024 and EC unknown
🐧 Fedora Linux 40 (KDE Plasma)
🐧 Kernel 6.9.9-200.fc40.x86_64
🔋 Battery BAT1 (NVT Framewo) is operating at 98.29% of design
Checking prerequisites for s2idle
✅ Logs are provided via systemd
✅ AMD Ryzen 5 7640U w/ Radeon 760M 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:c3:00.5
✅ USB4 driver `thunderbolt` bound to 0000:c3:00.6
✅ GPU driver `amdgpu` bound to 0000:c1:00.0
✅ System is configured for s2idle
✅ NVME KIOXIA Corporation NVMe SSD is configured for s2idle in BIOS
✅ GPIO driver `pinctrl_amd` available
How long should suspend cycles last in seconds (default 10)? 600
How long to wait in between suspend cycles in seconds (default 4)?
How many suspend cycles to run (default 1)?
Started at 2024-07-29 14:12:35.306635 (cycle finish expected @ 2024-07-29 14:22:39.306668)
Results from last s2idle cycle
○ Suspend count: 1
○ Hardware sleep cycle count: 2
○ GPIOs active: ['5']
○ Wakeup triggered from IRQ 9: ACPI SCI
○ Woke up from IRQ 9: ACPI SCI
○ gpe0B increased from 824 to 846
✅ Userspace suspended for 0:10:02.827783
❌ In a hardware sleep state for 0:00:35.596954 (5.90%)
🔋 Battery BAT1 (NVT Framewo) is operating at 98.29% of design
Explanations for your system
🚦 System had low hardware sleep residency
The system was asleep for 0:10:02.827783, but only spent 5.90%
of this time in a hardware sleep state. In sleep cycles that are at least
60 seconds long it's expected you spend above 90 percent of the cycle in hardware sleep.
And the grep:
sudo dmidecode -t system | grep -i 'wake'
Wake-up Type: Power Switch
Ok, I guess the dmidecode output is bogus then, so please ignore that.
I think ACPI SCI is something from the EC causing the wake up.
So, you might need to use the ectool to find out what is happening. ectool console ← Dumps some of the EC debug messages. Repeated “ectool console” commands update the output with the latest set of messages.
The ectool from here seems to work with the FW laptop: git clone https://gitlab.howett.net/DHowett/ectool.git
For example, what I see when entering suspend/sleep.
PORT80: 30D5
PORT80: 3F58
PORT80: 00C7
[14392.303700 power state 17 = S0->S0ix, in 0x000f]
[14392.305400 power state 5 = S0ix, in 0x000f]
PORT80: 0026
[14392.843700 power state 5 = S0ix, in 0x000d]
[14392.844900 power state 18 = S0ix->S3, in 0x000d]
[14392.943100 power state 3 = S3, in 0x0005]
For example, what I see when I press the power button to exit suspend:
[14400.031400 power button pressed]
[14400.032300 PB pressed]
[14400.033100 PB task 1 = pressed]
[14400.034000 PB task 3 = t1, wait 34940]
[14400.036100 SW 0x07]
[14400.036900 event set 0x0000000000000004]
[14400.038500 power state 3 = S3, in 0x0007]
[14400.039700 power state 19 = S3->S0ix, in 0x0007]
[14400.070300 PB task 3 = t1]
[14400.082900 power state 5 = S0ix, in 0x000f]
PORT80: 0000
PORT80: 0000
[14400.161800 power button released]
[14400.162900 PB released]
[14400.163600 PB task 6 = released]
[14400.164500 PB task 0 = idle, wait 65535]
[14400.166700 SW 0x05]
PORT80: 0200
PORT80: 0000
[14400.231400 PB task 0 = idle]
PORT80: 3F61
PORT80: 3F60
PORT80: 3F81
PORT80: 1015
[14400.351900 power state 16 = S0ix->S0, in 0x000f]
[14400.354500 power state 4 = S0, in 0x000f]
So, I suggest you run the “amd_s2idle.py” script, and as soon as it finished, run the “ectool console” and see what the EC thinks it is waking up for.
So far, I have found that the following events cause the wake up from “IRQ 9: ACPI SCI”
So, it might be bogus key presses or something like that causing the lack of sleep.
If you can disable the keyboard and trackpad from causing a wake up, and instead wakeup from the power button, you might have a work around for this problem.
To find a list of all the devices you can use to wake up are here:
find /sys -iwholename “*power/wakeup”
If you “echo disabled > …” to any of those /sys files found it will disable that device.
I have a FW16 and not a FW13, so my list of files will be different from yours.
So, you would need to find the “…/wakeup” file that relates to the keyboard and touchpad.
Please can you post the output of: find /sys -iwholename “*power/wakeup”
There might be some way to stop it waking up from keyboard / touchpad and thus work around your problem.
I think what is happening is somehow the keyboard / touchpad is causing the wake up. Maybe there is a bug/hardware fault somewhere that is causing this.
One way to prove this would be to remove the input cover (keyboard / touchpad) and use a usb keyboard/mouse to try the sleep script and see if it stays asleep then.
When you remove the input cover, I think there is a micro button on the mainboard that does the power on/off so you should be able to power on and use the FW13 laptop without the input cover connected.
The removing the input cover is a better test, but something worth trying based on the “find” output above.
This might cause the FW13 to not exit suspend at all, requiring a power cycle to recover, so make sure you don’t have anything you have not saved before hand running. cat /sys/devices/platform/i8042/serio0/power/wakeup
If it says “enabled” do: echo disabled > /sys/devices/platform/i8042/serio0/power/wakeup
If it already said “disabled” the problem is probably not keyboard related.
Then run the suspend script and see if it stays asleep for longer.
It should wake after the time delay you select in the script, but it might not.
The above line should disable the keyboard from waking the laptop.
You use touchpad or power button instead.
Ok, so we are narrowing down the problem a bit. Something on the input cover is causing it to wake up. Install the input cover then try some or all of the following with the suspend script:
Touchpad: cat /sys/devices/platform/AMDI0010:03/i2c-1/i2c-PIXA3854:00/power/wakeup
If it says “enabled” try: echo disabled > /sys/devices/platform/AMDI0010:03/i2c-1/i2c-PIXA3854:00/power/wakeup
Lid sensor/open: cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:44/PNP0C09:00/PNP0C0D:00/power/wakeup
If it says “enabled” try: echo disabled > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:44/PNP0C09:00/PNP0C0D:00/power/wakeup
Power button (if you do this one, have an external usb keyboard plugged in, so you can use that to wake it): cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/power/wakeup
If it says “enabled” try: echo disabled > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/power/wakeup
Note: All the setting above are temporary. A cold reboot will return them to the previous settings.
Is there anything else electronic on the FW13 input cover?
Things attached to the EC:
Charger
Battery
Hall Sensor (Lid open/closed sensor)
Keyboard
PWM FAN
Thermal Sensor
ALS sensor (ambient light sensor)
USB PD chips.
TouchPad
Of those, only the following might be associated with the input cover:
Hall Sensor (Lid sensor)
Keyboard
Touchpad
Temp sensor ???
By removing the input cover and testing without that, we discounted things like the: Charger
Battery
PWM FAN
USB PD Chips
ALS sensor (ambient light sensor) (I think that is on the screen next to the webcam)
Not sure about this one:
Chassis Open sensor.
Regarding the:
Finger Print Sensor that is on the Input cover.
That is a USB device. Can you disable that in the BIOS?
The output of “lsusb -tv” will help find out where that is to disable its wakeup.
I tried disabling the fingerprint sensor in the bios and no change.
Then I disabled the wakeups for the things you listed and it seemed to work the first time, but after a reboot I cannot reproduce the good sleep behavior and it’s back to ~20 sec.
When I grep dmidecode it still reads “Power Switch” even though it is clearly disabled and I cannot wake the computer by physically pressing the power switch.
Is there a way to flash the EC or to reset it somehow?