Framework 13 AMD sleep/s2idle issues

Hey

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).

2x5 min report from SUSE
1x5min report from Fedora 40

I’m not sure where to go from here and any help is appreciated!

Can you try without the WLAN card? That card isn’t something tested with AMD platforms IIRC.

I am not at home so couldn’t test with the OG MediaTek card, but did test without a WLAN card in it, and got around 80% sleep over 5 min:

https://gist.githubusercontent.com/ripdajacker/6007857f78775e75bfb3bf7513d299c1/raw/a858997dac980fca40c505786ae0dfab01c7212e/gistfile1.txt

Looks a lot better. You might look for WoWLAN settings for the other card being set or wake on Bluetooth or something.

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 :smile:

I got home and ran some more tests. Fedora 40 from live USB. I removed the NVME to reduce variables.

I attempted 10 runs of 75 seconds with 4 sec delay and only 7/10 attempts were successful. The shortest run was only 4 sec.

The newest report is here: https://gist.githubusercontent.com/ripdajacker/fb5b1004c3c267a3248bfe703e007443/raw/ce16bb0dd6e49d8800ed45f88df0a9e2cb4d6dfe/gistfile1.txt

I wiped the disk and installed fedora 40 on it and re-ran the tests and still no hardware sleep.

Newest report: https://gist.githubusercontent.com/ripdajacker/e46f8555d3b46f4902ad735fb091a7f9/raw/1dd38753a9454c341d9d5ed1d82f103c133adc44/gistfile1.txt

I am not sure where to go from here.

1 Like

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.

Update: It is still an issue.

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.

Ful log here

After it wakes up like the above.
I pressed the power switch in the example below.

sudo dmidecode -t system | grep -P '\tWake-up Type\: '
	Wake-up Type: Power Switch

It might tell you what caused the last wake up.

Tried with a 10 min 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”

  1. Power button
  2. Timer
  3. Battery Low

Look at previous logs, we see:

PM: Triggering wakeup from IRQ 1 ← PS/2 controller (e.g. Keyboard, Mouse)
PM: Triggering wakeup from IRQ 9 ← ACPI SCI (e.g. EC Embedded Controller)

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.

I did the same test just with 180sec this time.

ectool console before:

isplay 21.9 %) / 1h:11 to empty]
PORT80: F90E
[117336.236000 Battery 25% (Display 21.8 %) / 1h:10 to empty]
[117353.003300 Battery 25% (Display 21.7 %) / 1h:18 to empty]
[117370.050100 Battery 25% (Display 21.6 %) / 1h:20 to empty]
[117386.828300 Battery 25% (Display 21.5 %) / 1h:16 to empty]
PORT80: F90E
[117397.361000 Battery 24% (Display 21.5 %) / 1h:16 to empty]
[117409.899800 Battery 24% (Display 21.4 %) / 1h:16 to empty]
[117426.442600 Battery 24% (Display 21.3 %) / 1h:18 to empty]
[117442.734600 Battery 24% (Display 21.2 %) / 1h:16 to empty]
PORT80: F90E
[117457.755800 Battery 24% (Display 21.1 %) / 1h:12 to empty]
[117479.348100 Battery 24% (Display 21.0 %) / 1h:15 to empty]
[117496.904300 Battery 24% (Display 20.9 %) / 1h:17 to empty]
[117511.716400 HC 0x000b]
[117511.719700 HC Suppressed: 0x97=1 0x98=0 0x113=0 0x103=0 0x115=0 0x2b=0 0x67=0 0x121=0]
[117514.951200 Battery 24% (Display 20.8 %) / 1h:17 to empty]
PORT80: F90E
[117538.512000 Battery 24% (Display 20.7 %) / 1h:19 to empty]
[117551.303700 HC 0x000b]
[117556.312200 Battery 24% (Display 20.6 %) / 1h:18 to empty]
[117573.612100 Battery 24% (Display 20.5 %) / 1h:18 to empty]
PORT80: 3F50
[117573.796800 KB Clear Buffer]
PORT80: 3F40
PORT80: 3F30
PORT80: F90E
PORT80: 3F43
PORT80: 3F54
PORT80: 3F60
PORT80: 00C7
[117574.075100 power state 17 = S0->S0ix, in 0x000f]
[117574.076300 PH S0->S0ix]
[117574.082900 Power saving enable]
[117574.092000 PH S0S0ix->S0ix]
[117574.093200 power state 5 = S0ix, in 0x000f]
[117574.094200 PH S0ix]
PORT80: F626
PORT80: 0026
[117574.651400 power state 5 = S0ix, in 0x000d]
[117574.652600 PH S0ix]
[117574.653400 power state 18 = S0ix->S3, in 0x000d]
[117574.654500 PH S0ixS3]
[117574.740600 PH S0ixS0->S3]
[117574.741600 power state 3 = S3, in 0x0005]
[117660.992700 power state 3 = S3, in 0x0007]
[117660.993900 power state 19 = S3->S0ix, in 0x0007]
[117660.995000 PH S3->S0ix]
[117661.027000 PH S3S0ix->S0ix]
[117661.028000 power state 5 = S0ix, in 0x000f]
[117661.029000 PH S0ix]
PORT80: 0000
PORT80: 0000
PORT80: 0200
PORT80: 0900
PORT80: 1015
PORT80: F90B
PORT80: F90E
[117694.110200 Battery 24% (Display 20.4 %) / 3h:36 to empty]
[117751.062400 KB unsupported cmd: 0x00]
[117751.063600 KB Clear Buffer]
[117751.091800 KB unsupported cmd: 0x00]
[117751.092800 KB Clear Buffer]
[117751.120300 KB unsupported cmd: 0x00]
[117751.121400 KB Clear Buffer]
[117751.149100 KB unsupported cmd: 0x00]
[117751.150200 KB Clear Buffer]
[117751.178100 KB unsupported cmd: 0x00]
[117751.179200 KB Clear Buffer]
[117751.212700 KB unsupported cmd: 0x00]
[117751.213800 KB Clear Buffer]
PORT80: 3F60
PORT80: 3F80
PORT80: 0DB4
[117751.393400 PH S0ix]
[117751.394300 power state 16 = S0ix->S0, in 0x000f]
[117751.395600 PH S0ixS0]
[117751.398000 Power saving disable]
[117751.401600 PH S0ixS0->S0]
[117751.402600 power state 4 = S0, in 0x000f]
PORT80: 1001
[117751.421600 KS disable]
[117751.422500 KB Clear Buffer]
[117751.425900 KS enable]
[117751.427600 KB Clear Buffer]
PORT80: 3050
[117751.432600 event set 0x0400000000000000]
PORT80: 003B
[117751.459700 event set 0x0400000000000000]
[117751.472500 Battery 23% (Display 20.3 %) / 3h:16 to empty]
[117751.478400 event set 0x0400000000000000]
PORT80: 003B
[117751.496700 event set 0x0400000000000000]
PORT80: 003B
[117751.515100 event set 0x0400000000000000]
PORT80: 003B
PORT80: 003B
[117751.537000 event set 0x0400000000000000]
PORT80: 003B
[117751.562000 event set 0x0400000000000000]
[117751.580800 event set 0x0400000000000000]
PORT80: AA8E
[117751.598700 event set 0x0400000000000000]
PORT80: 003B
[117751.617200 event set 0x0400000000000000]
PORT80: 003B
[117751.635000 event set 0x0400000000000000]
PORT80: 003B
PORT80: 003B
PORT80: 3F84
PORT80: 3F74
PORT80: 3F40
PORT80: 3F48
PORT80: 3F34
PORT80: 3F38
PORT80: 3C08
[117758.309200 HC 0x000b]
PORT80: F022
PORT80: F90E
[117766.473200 Battery 23% (Display 20.2 %) / 1h:33 to empty]
PORT80: 3F64
PORT80: 3F68
PORT80: 3F54
PORT80: 3F58
[117783.251200 Battery 23% (Display 20.1 %) / 1h:21 to empty]
[117798.274500 Battery 23% (Display 20.0 %) / 1h:12 to empty]
[117813.793200 HC 0x000b]

I then ran the s2idle script and ectool right afterwards:

PORT80: F90E
[117821.352700 Battery 23% (Display 19.9 %) / 1h:13 to empty]
PORT80: 3F50
[117825.751100 KB Clear Buffer]
PORT80: 3D01
PORT80: 3F30
PORT80: F90E
PORT80: 3F33
PORT80: 3F64
PORT80: 3F68
PORT80: 00C7
[117826.132000 power state 17 = S0->S0ix, in 0x000f]
[117826.133200 PH S0->S0ix]
[117826.135600 Power saving enable]
[117826.138400 PH S0S0ix->S0ix]
[117826.139300 power state 5 = S0ix, in 0x000f]
[117826.140400 PH S0ix]
PORT80: F626
PORT80: 0026
[117826.620800 power state 5 = S0ix, in 0x000d]
[117826.622000 PH S0ix]
[117826.622700 power state 18 = S0ix->S3, in 0x000d]
[117826.623900 PH S0ixS3]
[117826.710000 PH S0ixS0->S3]
[117826.711000 power state 3 = S3, in 0x0005]
[117854.511500 power state 3 = S3, in 0x0007]
[117854.512700 power state 19 = S3->S0ix, in 0x0007]
[117854.513800 PH S3->S0ix]
[117854.545800 PH S3S0ix->S0ix]
[117854.546800 power state 5 = S0ix, in 0x000f]
[117854.548100 PH S0ix]
PORT80: 0000
PORT80: 0000
PORT80: 0200
PORT80: 0900
PORT80: 1015
PORT80: F90E
[117886.357800 Battery 23% (Display 19.8 %) / 3h:26 to empty]
[117946.357300 Battery 23% (Display 19.7 %) / 3h:12 to empty]
[118004.226400 KB unsupported cmd: 0x00]
[118004.227500 KB Clear Buffer]
[118004.255800 KB unsupported cmd: 0x00]
[118004.256900 KB Clear Buffer]
[118004.284700 KB unsupported cmd: 0x00]
[118004.285800 KB Clear Buffer]
[118004.313900 KB unsupported cmd: 0x00]
[118004.315000 KB Clear Buffer]
[118004.342800 KB unsupported cmd: 0x00]
[118004.343900 KB Clear Buffer]
[118004.378000 KB unsupported cmd: 0x00]
[118004.379100 KB Clear Buffer]
PORT80: 3F60
[118004.452700 PH S0ix]
[118004.453800 power state 16 = S0ix->S0, in 0x000f]
[118004.455000 PH S0ixS0]
[118004.457300 Power saving disable]
PORT80: 3F70
[118004.461000 PH S0ixS0->S0]
[118004.462100 power state 4 = S0, in 0x000f]
PORT80: 1001
[118004.509500 Battery 23% (Display 19.6 %) / 3h:11 to empty]
PORT80: 0DB5
[118004.616800 KS disable]
[118004.617800 KB Clear Buffer]
[118004.621400 KS enable]
[118004.623300 KB Clear Buffer]
PORT80: 3050
[118004.627400 event set 0x0400000000000000]
PORT80: 003B
[118004.648600 event set 0x0400000000000000]
[118004.667500 event set 0x0400000000000000]
PORT80: 003B
PORT80: 003B
[118004.695800 event set 0x0400000000000000]
[118004.714400 event set 0x0400000000000000]
PORT80: 003B
PORT80: 003B
[118004.736300 event set 0x0400000000000000]
PORT80: 003B
[118004.761900 event set 0x0400000000000000]
[118004.781000 event set 0x0400000000000000]
PORT80: AA8F
[118004.799000 event set 0x0400000000000000]
PORT80: 003B
PORT80: 003B
[118004.824500 event set 0x0400000000000000]
PORT80: 003B
[118004.849300 event set 0x0400000000000000]
PORT80: 003B
PORT80: 3F74
PORT80: 3F88
PORT80: 3D08
PORT80: 3F34
PORT80: 3F38
PORT80: 3C08
[118012.301200 Battery 23% (Display 19.5 %) / 1h:49 to empty]
[118013.835900 HC 0x000b]

Note I have removed the overlapping lines from the ectool output.

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.

Sure, here it is:

/sys/devices/pnp0/00:01/power/wakeup
/sys/devices/pnp0/00:01/rtc/rtc0/alarmtimer.0.auto/power/wakeup
/sys/devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:002/power/wakeup
/sys/devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:003/power/wakeup
/sys/devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:001/power/wakeup
/sys/devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:004/power/wakeup
/sys/devices/platform/AMDI0010:03/i2c-1/i2c-PIXA3854:00/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.16/tty/ttyS16/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.3/tty/ttyS3/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.24/tty/ttyS24/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.14/tty/ttyS14/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.1/tty/ttyS1/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.22/tty/ttyS22/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.12/tty/ttyS12/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.30/tty/ttyS30/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.20/tty/ttyS20/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.8/tty/ttyS8/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.10/tty/ttyS10/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.29/tty/ttyS29/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.19/tty/ttyS19/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.6/tty/ttyS6/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.27/tty/ttyS27/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.17/tty/ttyS17/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.4/tty/ttyS4/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.25/tty/ttyS25/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.15/tty/ttyS15/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.2/tty/ttyS2/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.23/tty/ttyS23/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.13/tty/ttyS13/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.0/tty/ttyS0/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.31/tty/ttyS31/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.21/tty/ttyS21/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.9/tty/ttyS9/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.11/tty/ttyS11/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.7/tty/ttyS7/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.28/tty/ttyS28/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.18/tty/ttyS18/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.5/tty/ttyS5/power/wakeup
/sys/devices/platform/serial8250/serial8250:0/serial8250:0.26/tty/ttyS26/power/wakeup
/sys/devices/platform/i8042/serio0/power/wakeup
/sys/devices/pci0000:00/0000:00:03.1/power/wakeup
/sys/devices/pci0000:00/0000:00:14.3/ACPI0003:00/power_supply/ACAD/power/wakeup
/sys/devices/pci0000:00/0000:00:08.3/0000:c3:00.0/power/wakeup
/sys/devices/pci0000:00/0000:00:08.3/0000:c3:00.5/domain0/power/wakeup
/sys/devices/pci0000:00/0000:00:08.3/0000:c3:00.5/domain0/0-0/usb4_port2/power/wakeup
/sys/devices/pci0000:00/0000:00:08.3/0000:c3:00.5/domain0/0-0/power/wakeup
/sys/devices/pci0000:00/0000:00:08.3/0000:c3:00.5/power/wakeup
/sys/devices/pci0000:00/0000:00:08.3/power/wakeup
/sys/devices/pci0000:00/0000:00:08.3/0000:c3:00.3/usb5/power/wakeup
/sys/devices/pci0000:00/0000:00:08.3/0000:c3:00.3/power/wakeup
/sys/devices/pci0000:00/0000:00:08.3/0000:c3:00.3/usb6/power/wakeup
/sys/devices/pci0000:00/0000:00:08.3/0000:c3:00.6/power/wakeup
/sys/devices/pci0000:00/0000:00:08.3/0000:c3:00.6/domain1/1-0/usb4_port2/power/wakeup
/sys/devices/pci0000:00/0000:00:08.3/0000:c3:00.6/domain1/1-0/power/wakeup
/sys/devices/pci0000:00/0000:00:08.3/0000:c3:00.6/domain1/power/wakeup
/sys/devices/pci0000:00/0000:00:08.3/0000:c3:00.4/power/wakeup
/sys/devices/pci0000:00/0000:00:08.3/0000:c3:00.4/usb8/power/wakeup
/sys/devices/pci0000:00/0000:00:08.3/0000:c3:00.4/usb7/power/wakeup
/sys/devices/pci0000:00/0000:00:08.1/0000:c1:00.6/power/wakeup
/sys/devices/pci0000:00/0000:00:08.1/0000:c1:00.4/usb3/power/wakeup
/sys/devices/pci0000:00/0000:00:08.1/0000:c1:00.4/power/wakeup
/sys/devices/pci0000:00/0000:00:08.1/0000:c1:00.4/usb4/power/wakeup
/sys/devices/pci0000:00/0000:00:08.1/0000:c1:00.2/power/wakeup
/sys/devices/pci0000:00/0000:00:08.1/power/wakeup
/sys/devices/pci0000:00/0000:00:08.1/0000:c1:00.0/power/wakeup
/sys/devices/pci0000:00/0000:00:08.1/0000:c1:00.5/power/wakeup
/sys/devices/pci0000:00/0000:00:08.1/0000:c1:00.3/usb1/power/wakeup
/sys/devices/pci0000:00/0000:00:08.1/0000:c1:00.3/usb1/1-5/power/wakeup
/sys/devices/pci0000:00/0000:00:08.1/0000:c1:00.3/usb1/1-4/power/wakeup
/sys/devices/pci0000:00/0000:00:08.1/0000:c1:00.3/power/wakeup
/sys/devices/pci0000:00/0000:00:08.1/0000:c1:00.3/usb2/power/wakeup
/sys/devices/pci0000:00/0000:00:08.1/0000:c1:00.1/power/wakeup
/sys/devices/pci0000:00/0000:00:02.4/0000:02:00.0/power/wakeup
/sys/devices/pci0000:00/0000:00:02.4/power/wakeup
/sys/devices/pci0000:00/0000:00:04.1/power/wakeup
/sys/devices/pci0000:00/0000:00:02.2/power/wakeup
/sys/devices/pci0000:00/0000:00:02.2/0000:01:00.0/power/wakeup
/sys/devices/pci0000:00/0000:00:08.2/0000:c2:00.0/power/wakeup
/sys/devices/pci0000:00/0000:00:08.2/power/wakeup
/sys/devices/pci0000:00/0000:00:08.2/0000:c2:00.1/power/wakeup
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/power/wakeup
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:44/PNP0C09:00/PNP0C0D:00/power/wakeup
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:44/PNP0C0A:00/power/wakeup

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.

I ran two tests. I removed the input cover, rebooted and ran 4x 180 sec with 97+ % sleep, so you might be on to something.

Here’s the s2idle report without the input cover.

The result of cat /sys/devices/platform/i8042/serio0/power/wakeup reads disabled.
Can it be the touchpad or the fingerprint reader?

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?