Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.
$ sudo python amd_s2idle.py Location of log file (default s2idle_report-2024-08-09.txt)? Debugging script for s2idle on AMD systems💻 ASUSTeK COMPUTER INC. ASUS Zenbook S 16 UM5606WA_UM5606WA (ASUS Zenbook S 16) running BIOS 5.35 (UM5606WA.308) released 07/17/2024 and EC 3.22🐧 Arch Linux🐧 Kernel 6.11.0-rc1-1-git-00269-gd9ef02e56f0f🔋 Battery BAT0 (ASUSTeK ASUS Battery) is operating at 100.86% of designChecking prerequisites for s2idle✅ Logs are provided via systemd✅ AMD Ryzen AI 9 HX 370 w/ Radeon 890M (family 1a model 24)✅ 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 9 Firmware 93.9.0)✅ USB4 driver `thunderbolt` bound to 0000:c6:00.5✅ USB4 driver `thunderbolt` bound to 0000:c6:00.6✅ System is configured for s2idle✅ NVME Micron Technology Inc 2400 NVMe SSD (DRAM-less) is configured for s2idle in BIOS✅ GPIO driver `pinctrl_amd` available✅ IOMMU properly configuredHow long should suspend cycles last in seconds (default 10)? 600How long to wait in between suspend cycles in seconds (default 4)? How many suspend cycles to run (default 1)? Started at 2024-08-09 22:18:12.742055 (cycle finish expected @ 2024-08-09 22:28:16.742069)Results from last s2idle cycle○ Suspend count: 1○ Hardware sleep cycle count: 1○ Wakeup triggered from IRQ 9: ACPI SCI○ Woke up from IRQ 9: ACPI SCI○ gpe10 increased from 180 to 186✅ Userspace suspended for 0:10:18.052243❌ Did not reach hardware sleep state🔋 Battery BAT0 lost 585000 µWh (0.74%) [Average rate 0.34W]
At this point I'm not sure what can prevent the HW from reaching s2idle and since apparently the SMU seems to be involved looking at the source of the amd_s2idle.py script, I thought it was worth reporting here.
Hmm, just noticed that I get the following on my first suspend:
[ 110.237880] ACPI: \_SB_.PCI0.GPP0.SWUS: LPI: Constraint not met; min power state:D3hot current power state:D0[ 110.237887] ACPI: \_SB_.PCI0.GPP1.SWUS: LPI: Constraint not met; min power state:D3hot current power state:D0[ 110.237892] ACPI: \_SB_.PCI0.GPP5.WLAN: LPI: Device not power manageable[ 110.237902] ACPI: \_SB_.PCI0.GPPB.IPU_: LPI: Device not power manageable[ 110.237911] ACPI: \_SB_.PLTF.C000: LPI: Device not power manageable[ 110.237913] ACPI: \_SB_.PLTF.C001: LPI: Device not power manageable[ 110.237916] ACPI: \_SB_.PLTF.C002: LPI: Device not power manageable[ 110.237918] ACPI: \_SB_.PLTF.C003: LPI: Device not power manageable[ 110.237921] ACPI: \_SB_.PLTF.C004: LPI: Device not power manageable[ 110.237924] ACPI: \_SB_.PLTF.C005: LPI: Device not power manageable[ 110.237926] ACPI: \_SB_.PLTF.C006: LPI: Device not power manageable[ 110.237928] ACPI: \_SB_.PLTF.C007: LPI: Device not power manageable[ 110.237931] ACPI: \_SB_.PLTF.C008: LPI: Device not power manageable[ 110.237934] ACPI: \_SB_.PLTF.C009: LPI: Device not power manageable[ 110.237936] ACPI: \_SB_.PLTF.C00A: LPI: Device not power manageable[ 110.237939] ACPI: \_SB_.PLTF.C00B: LPI: Device not power manageable[ 110.237941] ACPI: \_SB_.PLTF.C00C: LPI: Device not power manageable[ 110.237944] ACPI: \_SB_.PLTF.C00D: LPI: Device not power manageable[ 110.237946] ACPI: \_SB_.PLTF.C00E: LPI: Device not power manageable[ 110.237949] ACPI: \_SB_.PLTF.C00F: LPI: Device not power manageable[ 110.237951] ACPI: \_SB_.PLTF.C010: LPI: Device not power manageable[ 110.237953] ACPI: \_SB_.PLTF.C011: LPI: Device not power manageable[ 110.237956] ACPI: \_SB_.PLTF.C012: LPI: Device not power manageable[ 110.237958] ACPI: \_SB_.PLTF.C013: LPI: Device not power manageable[ 110.237961] ACPI: \_SB_.PLTF.C014: LPI: Device not power manageable[ 110.237962] ACPI: \_SB_.PLTF.C015: LPI: Device not power manageable[ 110.237965] ACPI: \_SB_.PLTF.C016: LPI: Device not power manageable[ 110.237967] ACPI: \_SB_.PLTF.C017: LPI: Device not power manageable[ 110.239362] ACPI: \_SB_.PEP_: Successfully transitioned to state screen off[ 110.240391] ACPI: \_SB_.PEP_: Successfully transitioned to state lps0 ms entry[ 110.240616] ACPI: \_SB_.PEP_: Successfully transitioned to state lps0 entry
Seems more ACPI than I'd like so I dsdt.dsl also attached my ACP DSDT in case it helps ...
I tested with 6.11-rc4 + the patch linked and it seems to help, the script now says I'm reaching sleep state and my keyboard backlight turns off while suspended.
yeah I also have the freeze (black screen for ~10 seconds, keyboard backlight is on) for 10 seconds or so on resume. PSR is off with the amdgpu.dcdebugmask=0x600, I don't know if that disables panel replay? If not can you give instructions?
yeah I also have the freeze (black screen for ~10 seconds, keyboard backlight is on) for 10 seconds or so on resume.
Can you share an s2idle report with the 6.11-rc4 + that ACP patch and we can see if anything stands out in the log? Please also set /sys/power/pm_print_times to 1 before you run amd_s2idle.py so we can get some more timing information.
But these are all power saving features, I would only turn them off for debugging purposes. File more bugs if they're broken on your system.
This was recommended by AMD to Phoronix to avoid some system hangs, and it helped for us too (https://www.phoronix.com/review/amd-radeon-890m-rdna35), so I was assuming AMD was on it. Will file if there is not a public bug on it yet .
I and @ThatOneCalculator are not using the last version of the DMCUB firmware version because it introduces new hangs for both of us. @ThatOneCalculator has an email thread about that going, might be worth moving that to a bug here.
Apologies for the late reply. Disabling the IOMMU with amd_iommu=off didn't help, the output does seem a bit different though. I don't know how to set /sys/power/pm_print_times. However, running with amd_iommu=off gave me a lot more GPIOs:
I am observing the (about) 10 seconds freeze as well on the same hardware. I have attached my report with 4.12-rc3 and these kernel arguments : "amdgpu.dcdebugmask=0x610 amd_iommu=off".
Was an issue already created for the system freezes from PSR? I am asking because I am seeing those freezes as well without that amdgpu.dcdebugmask=0x600.
Location of log file (default s2idle_report-2024-08-27.txt)? Debugging script for s2idle on AMD systems💻 ASUSTeK COMPUTER INC. ASUS Zenbook S 16 UM5606WA_UM5606WA (ASUS Zenbook S 16) running BIOS 5.35 (UM5606WA.308) released 07/17/2024 and EC 3.22🐧 Gentoo Linux🐧 Kernel 6.11.0-rc5-x86_64🔋 Battery BAT0 (ASUSTeK ASUS Battery) is operating at 100.70% of designChecking prerequisites for s2idle🚦Logs are provided via dmesg, timestamps may not be accurate over multiple cycles✅ AMD Ryzen AI 9 HX 370 w/ Radeon 890M (family 1a model 24)✅ 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 9 Firmware 93.9.0)✅ USB4 driver `thunderbolt` bound to 0000:c6:00.5✅ USB4 driver `thunderbolt` bound to 0000:c6:00.6❌ GPU firmware missing✅ System is configured for s2idle✅ NVME Sandisk Corp WD Black SN770 / PC SN740 256GB / PC SN560 (DRAM-less) NVMe SSD is configured for s2idle in BIOS✅ GPIO driver `pinctrl_amd` available🚦 Device firmware checks unavailable without fwupd gobject introspection✅ IOMMU properly configuredYour 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 https://gitlab.com/kernel-firmware/linux-firmware amdgpu 0000:c4:00.0: Direct firmware load for amdgpu/isp_4_1_0.bin failed with error -2For more information on this failure see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053856
Where to find the isp_4_1_0.bin? It's not on firmware git.
I think we should make an exclusion for that firmware binary in the script, it's totally optional. Can you run with --force and see if there is any other issues reported? Please attach the text file generated.
I got my first successful suspend in a while. I have just recompiled the kernel to enable the PM debug, and ACPI error report store. Maybe it was that that did something.
Now, something different happened: grey screen on resume, blinking keyboard. Judging by the sound still playing, the rest of the system was still operational.
Is there a way to output printk on AMD systems through the USB port debug mode like on Intel chips?
Have you modified your firmware in some way? Or is this only because of mem_sleep_default=deep on your kernel command line? We don't support deep on modern mobile APUs.
Is there a way to output printk on AMD systems through the USB port debug mode like on Intel chips?
It depends on how the OEM design is put together whether this would work. You can certainly try if there is such a port on the OEM design.
Now, something different happened: grey screen on resume, blinking keyboard. Judging by the sound still playing, the rest of the system was still operational.
That's pretty weird. Do you have a journal to go with it from that boot?
That's pretty weird. Do you have a journal to go with it from that boot?
Yes. I ran it 10 times. Some times the picture returned, some times, grey screen. The last time it returned, but froze. I was able to CTRL+F1 to console, but return to X froze the display.
I think yes, given that during these 10 suspends, it happened multiple times
These look to me to be aborted suspends that didn't actually complete. I feel this is a separate bug from what was originally raised here. Something appears wrong with the display controller at this time that it's getting all of these timeouts.
@ThatOneCalculator and @bnieuwenhuizen have you seen this at all too?
I guess you specifically were using the script and nothing notably different in your userspace setup during those attempts? Is this only happening in X? Or Wayland trips it too?
@ThatOneCalculator do you have a touchscreen model or one without digitizer? I know they have some difference in peripheral chips, different buck controller chips, etc.
Mine doesn't have a touchscreen and I haven't had any resume errors that I can remember (though I also haven't done 10 in a row, think I've done 5 per boot at most at this point)
One other thought, this machine has an Nvidia 4050 as well. I've disabled it from the Windows side using MyAsus. It doesn't show up in lspci for example, but thought I would mention it in case it could somehow be preventing reaching sleep.
Vivobook S 16 (M5606WA) with Ryzen AI 9 365 also experiences the same problem.
➜ Downloads sudo python amd_s2idle.pyLocation of log file (default s2idle_report-2024-09-09.txt)? Debugging script for s2idle on AMD systems💻 ASUSTeK COMPUTER INC. ASUS Vivobook S 16 M5606WA_M5606WA (ASUS Vivobook S 16) running BIOS 5.35 (M5606WA.303) released 07/23/2024 and EC 3.2🐧 Arch Linux🐧 Kernel 6.11.0-rc6-00011-g0984ead949bf🔋 Battery BAT1 (ASUS A32-K55) is operating at 101.60% of designChecking prerequisites for s2idle✅ Logs are provided via systemd✅ AMD Ryzen AI 9 365 w/ Radeon 880M (family 1a model 24)✅ 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 9 Firmware 93.7.0)✅ USB4 driver `thunderbolt` bound to 0000:65:00.5✅ System is configured for s2idle✅ NVME Samsung Electronics Co Ltd NVMe SSD Controller PM9C1a (DRAM-less) is configured for s2idle in BIOS✅ GPIO driver `pinctrl_amd` available✅ IOMMU disabledHow 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-09-09 15:26:19.351045 (cycle finish expected @ 2024-09-09 15:26:33.351065)Results from last s2idle cycle○ Suspend count: 1○ Hardware sleep cycle count: 1○ Wakeup triggered from IRQ 9: Disabled interrupt (acpi)○ Woke up from IRQ 9: Disabled interrupt (acpi)○ gpe04 increased from 16 to 22✅ Userspace suspended for 0:00:12.395813❌ Did not reach hardware sleep state🔋 Battery BAT1 (ASUS A32-K55) is operating at 101.60% of design
Turns out to be my disabled watchdog (by blacklist sp5100_tco)
I removed amd_pstate, amd_iommu and watchdog related cmdline arguments and settings, then Interrupt 9 came back, but the laptop was still unable to reach deepest hardware sleep state. no_opts.watchdog.txt
2024-09-09 15:26:31,728 DEBUG: ACPI: _SB_.PCI0.GPP0.SWUS: LPI: Constraint not met; min power state:D3hot current power state:D0
I don't know anything connected to GPP0 so far. To exclude the possibility of the NPU, I recompiled the kernel with the xdna driver (from patch set). But results remained the same. s2idle_report-2024-09-10.txt
Here are DSDT and several logs for more information if needed. dsdt.dsllspci.txt
I removed amd_pstate, amd_iommu and watchdog related cmdline arguments and settings, then Interrupt 9 came back, but the laptop was still unable to reach deepest hardware sleep state. no_opts.watchdog.txt
Thanks. The interrupt looks right now at least. The idle mask looks the same too.
I don't know anything connected to GPP0 so far. To exclude the possibility of the NPU, I recompiled the kernel with the xdna driver (from patch set). But results remained the same. s2idle_report-2024-09-10.txt
Actually don't use the XDNA driver right now. The v2 series has a bug on Strix where NPU prevents going into the proper state for s2idle. It's going to be fixed after v3 is posted IIRC.
BTW - are you dual booting? If so:
Could you cold boot Linux instead and see if this changes?
Does Windows work properly?
Does this laptop have an NV dGPU that is currently disabled in BIOS? If so; can you please enable it and see if anything changes? I'm wondering if that helps this GPP0 issue or not.
It takes two arguments, arg1 = lid | (idle << 16) | (power << 8), arg2=enable .
lid and power are corresponding to Windows power settings LIDACTION and PBUTTONACTION.
with values mapping below, the default values of lid and power are both 2 (Sleep).
lid/power
LIDACTION/PBUTTONACTION
Name
1
0
Do Nothing
2
1
Sleep
3
2
Hibernate
6
3
Shut Down
idle in minutes, seems to be the timeout of forcing sleep. default value of idle is max(sleep_timeout-monitor_timeout,0) + 10. (timeout from Windows power settings).
For my case, calling DEVS(0x0012008E, 0x00000202, 0x1) (i.e. setting idle timeout to 0) fixes my sleep issue.
Current asus-wmi debugfs does not support calling DEVS with more than one arguments. If anyone wants to try, use this kernel patch0001-added-call2.patch and try following script.
# run as rootcd /sys/kernel/debug/asus-nb-wmiecho 0x53564544 > method_idecho 0x12008e > dev_idecho 0x0202 > ctrl_paramecho 0x1 > ctrl_param2cat call2
Sometimes I need to close my lid or push power button to make the changes effect.
The method 0x0012008E looks to be a new addition. I have no records of it, but I also don't have any Zen or Vivo DLL to dive in to.
@PisonJay for the sake of my curiosity and to try and maintain complete records would I be able to get you to string search the asus DLL's available in Windows for things that might match this?
You may be able to find some containing GetBIOSWhisperMode which is almost always available as a debug string in the dlls. In the file I linked above there are other strings matching similar pattern that might also be found. I'd love a copy of the dlls you find.
You can also open with cutter and enable all options, then search for those strings. You might even hit some function names matching:
Asus also typically logs things with debug strings. So a wide string search could find some logging files providing clues about the args in the disassembly.
As for the actual issue here: we can definitely have this called as part of the suspend. It's almost guaranteed that if it exists and get is a valid value then it's going to be required.
I am wondering, what is causing setting the screen refresh rate other than 60 Hz to spike power consumption and fix the memory clock at 937 MHz (even if you chose a value below 60 Hz)