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.
Admin message
The migration is almost done, at least the rest should happen in the background. There are still a few technical difference between the old cluster and the new ones, and they are summarized in this issue. Please pay attention to the TL:DR at the end of the comment.
Laptop with renoir GPU fails to return to a functional state after upgrading to Linux 5.11.
Device is a Lenovo Ideapad 14are05 (Australian Model)
Hardware description:
CPU: AMD Ryzen 7 4800U
GPU: Integrated GPU on CPU - set to 2GB VRAM
System Memory: 16GB DDR4 SODIMM
Display(s): Inbuilt Laptop Display
Type of Diplay Connection: eDP
System infomration:
Distro name and Version: Arch Linux - Up to Date
Kernel version: 5.11.arch2 and 5.11.zen2 (both exhibit same issue)
Custom kernel: N/A
AMD package version: No package
How to reproduce the issue:
Any suspend action causes the display to fail to recover after coming back out of suspend.
Reverting to 5.10 fixes the issue.
There is visual corruption and unresponsiveness in wayland and swapping TTY does not help the issue.
The display can be recovered by cat /sys/kernel/debug/dri/0/amdgpu_gpu_recover, swapping to another tty, killing sway, and then restarting.
There are a series of Fence fallback timer expired on ring sdma0 errors, as well as other errors on boot. See the attached file for journalctl grepping for (drm|amdgpu).
Plugging in another monitor to HDMI makes no difference.
The issue happens every single time suspend occurs.
I've attached both a filtered log for just amdgpu/drm and a full log of a single boot.
Also exhibits the same warnings/errors as #1488 (closed)
The suspend works fine as far as I can tell. Swaylock enables as expected and the light on the side begins to pulse. It works fine on 5.10 - I've reverted for now and it resumes from suspend without issue.
The configuration options in the BIOS on the 14are05 are pretty limited. I don't see anything about Decode above 4G in there. The iGPU config options are entirely limited to being able to increase the amount of VRAM allocated.
The laptop I use is a Xiaomi RedmiBook 16, which also has a very limited BIOS. There are no options whatsoever related to GPU (or any other hardware for that matter), just basic options such as secure boot and the boot order.
Following the link posted by @marius.andreiana , i tried to restore the "default" s2idle suspend state (the one that gave me the same issue as above), reverting the DSDT patch that gave me the S3 suspend state. Well, resume from suspend now works as expected, though i got some errors in dmesg.
I have bisected the issue to the commit 628c36d7b238e2d72158e8aba229ec79c69c157e:
commit 628c36d7b238e2d72158e8aba229ec79c69c157eAuthor: Prike Liang <Prike.Liang@amd.com>Date: Wed Sep 9 14:40:24 2020 +0800 drm/amdgpu: update amdgpu device suspend/resume sequence for s0i3 support - Need skip the RLC/CP/GFX disable for let GFXOFF enter during suspend period. - For s0i3 suspend only need suspend DCE and each IP interrupt. - Before VBIOS POSTed check and atom HW INT need set the GPU power status change to D0 in the resume period, otherwise the HW will be mess up and see the SDMA hang. - Need handle the GPU reset path during amdgpu device suspend. Signed-off-by: Prike Liang <Prike.Liang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
In particular, checks have been added in various places for amdgpu_acpi_is_s0ix_supported(), which succeeds on hardware with this issue. However, what hasn't been taken into account is that just because this check succeeds doesn't mean the system is entering S0 - in our case, the system is entering S3 instead.
agd5f/linux@b092b196 should maybe fix this issue, but I need a few minutes to test this. (edit 2: it does not)
With agd5f/linux@b092b196, an additional patch is needed to make resuming from S3 suspension work properly:
drm/amdgpu: fix failure to resume from S3 suspensionIf a system supports s0i3 sleep state but enters s3, amdgpu fails toresume from sleep properly. Add an additional check and un-gate asnecessary.Fixes: 628c36d7b238e2 ("drm/amdgpu: update amdgpu device suspend/resume sequence for s0i3 support")Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1503Signed-off-by: Rasmus Moorats <xx@nns.ee>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.cindex 6447cd6ca5a8..c3f2eb520ed9 100644--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c@@ -2678,7 +2678,7 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev) { int i, r;- if (adev->in_poweroff_reboot_com ||+ if (adev->in_poweroff_reboot_com || adev->in_suspend || !amdgpu_acpi_is_s0ix_supported(adev) || amdgpu_in_reset(adev)) { amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE); amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);@@ -3742,7 +3742,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon) amdgpu_fence_driver_suspend(adev);- if (adev->in_poweroff_reboot_com ||+ if (adev->in_poweroff_reboot_com || adev->in_suspend || !amdgpu_acpi_is_s0ix_supported(adev) || amdgpu_in_reset(adev)) r = amdgpu_device_ip_suspend_phase2(adev); else--2.30.1
I do not know what the implications of this patch are besides fixing S3. I'm unfortunately not familiar with amdgpu that much.
EDIT: Fairly certain the second adev->in_suspend check is useless as it will always succeed (it is set to true in the same function). I need someone with experience with amdgpu to write a proper patch :) This is just a quick fix.
Not sure what you mean, I still use deep suspension into S3 (with patched ACPI tables, as in the article) because s2idle keeps the machine too awake and drains the battery.
I just tested s2idle - I removed the patched ACPI tables and let the system default on s2idle, and the system (or amdgpu) no longer resumes from suspend. Using the patched ACPI tables and deep suspension is the only method for working suspension, which doesn't seem right.
The following branch should have everything you need for S0ix (modern standby) on AMD renoir platforms (barring any additional OEM specific requirements we haven't found yet):
https://gitlab.freedesktop.org/agd5f/linux/-/commits/s0ix
Please make sure you enable CONFIG_AMD_PMC in your config otherwise, you won't have the ACPI power management platform driver for AMD platforms.
If you don't want to use this branch, you will need at least the following patches:
S3 suspension works as intended with patched ACPI tables. No issues with entering or resuming from suspension.
s2idle fans stop spinning, graphics goes dark and backlight is turned off, but the power led stays on. Cannot get system to resume from this state.
CONFIG_AMD_PMC=y:
Cannot enter S3 sleep with patched ACPI tables. Power LED stays on when entering suspension, which is abnormal for S3 (at least for me). Visually the same as s2idle above. Cannot get the system to resume.
I can't apply half these patches to 5.12 which is frustrating since I don't wanna go back in kernels if I don't have to, I just want to test if this works. @agd5f do you by chance have patches for 5.12?
@agd5f and anyone else that might be reading. I just tested this on may 10th 2021.
I applied the 6 patches (dated 4/12/2021) found here
I applied them to a 5.11.0 vanilla kernel, a 5.12, and also 5.13RC1.
all 3 suspend completely fine on a 14ARE05 (ideapad 5 with a 4500U)
The catch is I had to remove the ACPI dsdt fix that was suggested in a million other sources. Once I add that back in, it all fails again. and to test whether I was entering actual s3, I saw blinking lights, and over the course of 8 hours I lost less than 2% battery power.
I also tried 5.11, 5.12, 5.13RC1 vanilla with and without the ACPI fix to see what combination would work. All of them failed to suspend.
Again let me reiterate: 6 patches applied to your kernel, no acpi fix at all WILL suspend s3. Fantastic work Alex!
1st failure to resume from suspend (after ~8 successful resumes) with
fedora-5.11-s0ix-6 Revert "platform/x86: force LPS0 functions for AMD"Revert "platform/x86: Add missing LPS0 functions for AMD"
Pressed power button, fan started briefly, led turned from sleep to on, then nothing. Keyboard caps lock didn't turn on light. Don't have another box to ssh from.
Except this, battery consumption over another night was 4%. No quirks.
Update with Linux 5.12. Similar result - a completely blank, unresponsive display. Changing TTY lets me do things, but nothing in that display recovers.
I can confirm the issue since upgrade Ubuntu 20.10 (kernel 5.8) to Ubuntu 21.04 (kernel 5.11).
I use a patch for advertising of support for S3 that worked for me with kernel 5.8.
With kernel 5.11 when I sleep my laptop (close lid) and then open lid, screen remains black.
As a workaround I switched to kernel 5.10.35 (ubuntu-mainline-kernel.sh allows installation of any kernel into Ubuntu).