You are not logged in.

#1 2023-08-17 14:25:57

Foaly
Member
Registered: 2014-06-12
Posts: 10

[SOLVED] Asus G14 : cannot wake up after suspend

Hi everyone,

I'm having an issue running Arch on the laptop I just received : I can't get it to come out of sleep mode. It's an Asus ROG Zephyrus G14 GA402XV-041W with Ryzen 9 7940HS and Nvidia RTX 4060. My previous laptop, a very similar but a bit older G14 from 2020, doesn't have the issue.

I installed Arch as usual following the instructions on the wiki. Only thing slightly out of the ordinary : a dm-crypt root partition. I don't have a swap. Kernel is 6.4.10-arch1-1, and nvidia drivers are version 535.98-2. Issue happens with and without any kind of GUI environnement.

Symptoms are : If I put the laptop in sleep mode (by closing the lid, or invoking systemctl suspend or echo mem > /sys/power/state), it seems to go well. It turns off, the keyboard and the LED start slowly blinking white. However, when I try to turn it on (by opening the lid or pushing the power button or any keyboard key), the keyboard turns back red again, but nothing else happens. If I let it like this for a few minutes, it gets very hot and fans start to spin, indicating that the CPU is indeed powered on. Only way to reset it is to press the power button for a few seconds.

I tried a lot of things to try to isolate the cause of the issue, among them :

- The wiki for this model (https://wiki.archlinux.org/title/ASUS_R … 02#Suspend) led me to check /sys/power/mem_sleep : only [s2idle], no deep available. By applying this patch (https://gitlab.com/marcaux/g14-2021-s3-dsdt), I managed to get s2idle [deep], which didn't visibly change anything in the suspend behaviour.

- Following advice on some other posts on the forum and this article (http://web.archive.org/web/202302040524 … ate-issues), I tried to (but was unable to) get any kind of log when resuming following a suspend :
    - I can't SSH into (or even ping the static IP of) the laptop, either through WiFi or an USB ethernet adapter
    - journalctl -b -1 doesn't show anything after Entering sleep state 'suspend'...
    - I plugged a pair of usb-to-serial adapters between the laptops and added console=tty0 console=ttyUSB0,115200 no_console_suspend ignore_loglevel to the kernel cmdline, which works fine, but doesn't print anything more when trying to resume

[  639.184909] PM: suspend entry (deep)
[  639.186932] Filesystems sync: 0.001 seconds
[  639.461153] Freezing user space processes
[  639.463050] Freezing user space processes completed (elapsed 0.001 seconds)
[  639.463135] OOM killer disabled.
[  639.463147] Freezing remaining freezable tasks
[  639.464263] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)

- Using /sys/power/pm_test (see https://www.kernel.org/doc/html/latest/ … ging.html), I couldn't reproduce the issue : freezer, devices and platform work fine, the other modes are apparently not available in s2idle (PM: Unsupported test mode for suspend to idle, please choose none/freezer/devices/platform), so I switched back to deep, after which they work fine. In all modes the OS resumes after 5 seconds and dmesg doesn't show any issue. However, even in core test mode, it doesn't look like a true suspend : the keyboard stays red instead of blinking white.

- The various hints from https://wiki.archlinux.org/title/Power_ … leshooting didn't apply or led to any change in the symptoms

- Disabling C6 state from the Ryzen CPU (see https://wiki.archlinux.org/title/Ryzen# … nd_suspend, https://forum.manjaro.org/t/system-do-n … pend/76681 and https://github.com/jfredrickson/disable-c6) didn't fix or change anything either.

- The few errors I see during boot in dmesg seem benign or irrelevant to the issue.

Sorry for the long post. I'm starting to run out of ideas, and I still don't even have a clue what part of the system (CPU, GPU, kernel module, ...) causes the issue. Any help would be appreciated ! Thanks

Last edited by Foaly (2023-08-20 10:05:56)

Offline

#2 2023-08-19 10:29:05

Foaly
Member
Registered: 2014-06-12
Posts: 10

Re: [SOLVED] Asus G14 : cannot wake up after suspend

I've continued testing some things, so far without much results :

First, I forgot to mention it, but of course Fast Boot is disabled in the parallel Windows 11 install, I double-checked again. And the different Asus tools on Windows (MyAsus, Armoury Crate) show that everything (including the UEFI firmare) is up to date.

- The idea here (https://wiki.archlinux.org/title/Laptop … fter_sleep) seemed promising, but didn't help

- I created another partition and installed another Arch on it, as simple as possible : no dm-crypt, no GUI, no gpu drivers, just pacstrap with linux and linux-firmware, and the bare minimum configuration to make it boot. Same result : unable to wake up after suspend. So it doesn't seem related to nvidia drivers or anything else I installed.

- On this same test OS I tried other kernels from https://wiki.archlinux.org/title/Kernel : linux-zen, linux-lts and linux-next-git, they all have the same issue. I wanted to try linux-lts515 or older but wasn't able to compile them for some reason.

- I bound SysRq to the mic-mute key, enabled everything (echo 1 > /proc/sys/kernel/sysrq), confirmed that they work with dmesg, and tried poking at the kernel after a wakeup. No result : journalctl -b -1 doesn't show more info, and alt-sysrq-b doesn't reboot. So if there was a doubt, this seems to confirm the kernel is not running at this point.

- After some more testing around the Ryzen C6 state, trying disabling it with https://github.com/jfredrickson/disable-c6, I realized that wakeup crashes as usual only when suspending in S3 (using the patched DSDT), but not when suspending in s2idle. In this case, it wakes up fine, but only because it doesn't actually completely suspend : keyboard backlight stays on, status LED stays solid instead of blinking, and the CPU appears to stay on because the laptop still emits heat (I can't put it into a sleeve or backpack like this). In this semi-suspended state, I roughly estimate that battery is consumed at a rate of about 8%/hour. Indeed, dmesg indicates "amd_pmc: Last suspend didn't reach deepest state".
Zenstates shows two "domains" (?) of C6 State : "Package" and "Core". I modified the script to only disable one or the other :
    - when only Package is disabled, it suspends then crashes as usual
    - when only Core is disabled, it doesn't fully suspend

So, to sum up : it looks like when everything is powered down except the Ryzen core(s) (?) the system wakes up fine, but putting the CPU Core(s) into C6 state prevents the system from resuming without a hard-reset.
I'm still not sure whether I can say that this definitely means the issue is with the C6 state of the Ryzen, or if it might still be a side-effect of something else that stays on with the CPU. For instance, I don't know how the status LED and keyboard backlight relate to the state of the CPU (they must do in some way, because when the CPU is not in C6, they stay on).
I'm also surprised that I can't find other reports online that seem related to this specific issue, since I think this is a relatively widespread (if recent) platform, and it seems to affect multiple kernels and distros (I tried with a liveusb Fedora).

Next step would be trying to look at the decompiled DSDT tables, in case this is related to ACPI not powering back on something correctly after a C6 suspend of the CPU... (I have already tried setting other "acpi_os_name" or "acpi_osi" as kernel params without any luck). But I'm a bit out of my depth here and I'm not even sure that this makes sense (from what I understand, the ACPI code in the DSDT tables is run by the kernel? So no kernel running means no ACPI function running? Or maybe this is the suspend function that doesn't set things up properly and deadlocks the firmware?)

Offline

#3 2023-08-20 10:05:36

Foaly
Member
Registered: 2014-06-12
Posts: 10

Re: [SOLVED] Asus G14 : cannot wake up after suspend

So, thanks to a life-saving tip from @Grimstroke on https://asus-linux.org/ 's Discord server, I finally managed to get it to work : the key was to downgrade the BIOS version (v310 works, v311 doesn't). The Windows "MyAsus" utility had upgraded the firmware to v312 when I received the laptop, but it looks like this version is buggy. Interestingly, the Support page on Asus's website only lists v309 and v310 (https://rog.asus.com/laptops/rog-zephyr … desk_bios/). I downloaded v310, put it in /boot (which is visible by the firmware), reset into UEFI, Advanced > EZ Flash utility v3, and downgraded from here. It didn't complain about the fact that it was an older version (though I've read that you can sometimes force it by blindly typing "risky" if it does). The laptop now wakes up from sleep perfectly.
I'll try to update the wiki to warn other users : https://wiki.archlinux.org/title/ASUS_R … 02#Suspend and https://wiki.archlinux.org/title/Laptop … mers_(ROG).

Offline

#4 2023-11-10 04:47:45

Claire
Member
Registered: 2023-09-03
Posts: 2

Re: [SOLVED] Asus G14 : cannot wake up after suspend

Just a quick note that BIOS v313 still has the same problem.

Offline

#5 2024-01-01 16:19:00

kendokka
Member
Registered: 2022-05-15
Posts: 1

Re: [SOLVED] Asus G14 : cannot wake up after suspend

I just tested the most recent BIOS version v316 and it looks like suspend is working properly with it.

Offline

Board footer

Powered by FluxBB