Bug 2050049 - The 5.16.2-5.16.5 and 5.17-rc2 kernels don't sleep properly sometimes
Summary: The 5.16.2-5.16.5 and 5.17-rc2 kernels don't sleep properly sometimes
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-03 06:06 UTC by Matt Fagnani
Modified: 2023-12-05 21:03 UTC (History)
19 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-12-05 21:03:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
the journal for a boot with drm.debug=14 log_buf_len=16M added to the 5.16.5 kernel command line (318.52 KB, text/plain)
2022-02-03 06:06 UTC, Matt Fagnani
no flags Details

Description Matt Fagnani 2022-02-03 06:06:27 UTC
Created attachment 1858835 [details]
the journal for a boot with drm.debug=14 log_buf_len=16M added to the 5.16.5 kernel command line

1. Please describe the problem:

I updated to the 5.16.2-5.16.5 kernels in a Fedora 35 KDE Plasma installation on an hp laptop with a AMD A10-9620P CPU and an integrated Radeon R5 GPU. When I've selected Sleep from sddm or Plasma 5.23.5 on Wayland with 5.16.2-5.16.5, the screen turned black, but the system didn't sleep properly sometimes. The power LED remained solid instead of turning to flashing as when normally sleeping. The fan became progressively louder over a few minutes. The system didn't wake up by moving the mouse or using the touchpad. Pressing sysrq+alt+r,e,i,s,u,b had no effect. I held the power button for 5 seconds to shut the system off after a few minutes. This problem happened about 20% of the time I selected sleep with the 5.16.2-5.16.5 kernels. The end of the journal from when the sleep problem happened was the following.

Feb 02 23:10:41 systemd[1]: Reached target Sleep.
Feb 02 23:10:41 kernel: [drm:vblank_control_worker [amdgpu]] Allow idle optimizations (MALL): 0
Feb 02 23:10:41 systemd[1]: Starting System Suspend...
Feb 02 23:10:41 systemd-sleep[1197]: Entering sleep state 'suspend'...
Feb 02 23:10:41 kernel: PM: suspend entry (deep)

The problem could have started somewhere in the 5.16 branch before 5.16.2 which will make bisecting more time-consuming. The problem might involve amdgpu. A similar problem where my system didn't sleep properly every time with 5.15.14 involved amdgpu. That previous problem was reported at
https://bugzilla.redhat.com/show_bug.cgi?id=2039621

2. What is the Version-Release number of the kernel:
kernel-5.16.5-200.fc35.x86_64

3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :
5.15.16-5.15.18 slept properly. I first noticed the issue in 5.16.2, which was the first 5.16 branch kernel I tried.

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:
Yes.
1. Boot a Fedora 35 KDE Plasma installation on a system with an integrated Radeon R5 GPU
2. Log in to Plasma on Wayland from sddm
3. Start konsole
4. Update to the 5.16.5 kernel with the updates-testing repo enabled
sudo dnf offline-upgrade download
sudo dnf offline-upgrade reboot

5. After the update is completed, boot the 5.16.5 kernel
6. Select Sleep in sddm
7. Try to wake the system by moving the mouse or touchpad. 
8. If the system wakes up, repeat 6-7 until the problem happens.

5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:
The problem occurred once with 5.17.0-0.rc2.83.fc36 from Fedora-KDE-Live-x86_64-Rawhide-20220202.n.1.iso

6. Are you running any modules that not shipped with directly Fedora's kernel?:
no

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.
I'll attach the journal for a boot with drm.debug=14 log_buf_len=16M added to the 5.16.5 kernel command line to try to get more info from amdgpu. I booted and selected Sleep from sddm three times, and the kernel didn't sleep properly and the system was unresponsive the third time.

Comment 1 Matt Fagnani 2022-02-16 04:42:00 UTC
The earliest Fedora Rawhide kernel affected by this problem which I tested was 5.16.0-0.rc2.18.fc36. 5.15.0-60.fc36 to 5.16.0-0.rc1.20211119git4c388a8e740d.17.fc36 didn't sleep, reboot, or shutdown properly always due to https://bugzilla.redhat.com/show_bug.cgi?id=2023035 https://bugzilla.kernel.org/show_bug.cgi?id=214921 6ee27ee27ba8b2e725886951ba2d2d87f113bece drm/amd/pm: avoid duplicate powergate/ungate setting fixed that previous problem and was first included in 5.16-rc2.

Mainline 5.15.0 with applied 6ee27ee27ba8b2e725886951ba2d2d87f113bece didn't have this problem, while 5.16-rc1 with that patch did have the problem. I bisected mainline between 5.15 and 5.16-rc1 while applying 6ee27ee27ba8b2e725886951ba2d2d87f113bece at each step, building, testing, then running git stash so git bisect would proceed without error. The first bad commit I found was 304ac8032d3fa2d37750969cd4b8d5736a1829d9 Merge tag 'drm-next-2021-11-12' of git://anongit.freedesktop.org/drm/drm. The kernels built at some bisection steps didn't boot properly due to a black screen at the time amdgpu was starting including some shortly before that merge commit, while those at others had a black screen shortly after sddm appeared with an amdgpu error in the journal. 5.16.6-5.16.8 had this problem. 5.16.9 hasn't had the problem yet. I reported this problem at https://gitlab.freedesktop.org/drm/amd/-/issues/1891

Comment 2 Ben Cotton 2022-11-29 17:49:06 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 Matt Fagnani 2022-11-29 19:56:21 UTC
This system freeze when sleeping has still happened sometimes in Fedora 37. The last time this problem happened was with 6.0.6.

Comment 4 Aoife Moloney 2023-11-23 00:08:20 UTC
This message is a reminder that Fedora Linux 37 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 37 on 2023-12-05.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '37'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 37 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 5 Aoife Moloney 2023-12-05 21:03:50 UTC
Fedora Linux 37 entered end-of-life (EOL) status on None.

Fedora Linux 37 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.