Bug 2320035

Summary: Kernel 6.11 hangs when resuming from sleep
Product: [Fedora] Fedora Reporter: Alvise <alvisebruniera>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED COMPLETED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 40CC: 0qrp27we, acaringi, adscvr, airlied, alciregi, bskeggs, glexposito, gwk2112, hdegoede, hpa, josef, kernel-maint, linville, lutter, masami256, mchehab, p.franken, ptalbert, rptaylor, sk_dev, steved, suraj.ghimire7
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-10 17:33:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Kernel log none

Description Alvise 2024-10-20 15:04:04 UTC
1. Please describe the problem:

When trying to resume from sleep, about 90% of the times the computer turns on but the kernel hangs indefinitely. To be sure I have tried leaving it hanging for 30 minutes in case it was just slow, and nothing happened.

The system turns on but is completely unresponsive, trying to wake it with an usb device or the power button does nothing, only resetting works.
I can tell that the computer is on because the fans are spinning and the monitor receives signal, although its a full black screen or a black screen with a clock (which I suspect is the last frame it displayed before suspending).

It is not a crash of the desktop environment because the system doesn't even respond to ssh (or even a ping).

Also after resetting the logs on journalctl do not contain information about the resuming process, the last entry is from before suspending. It looks like the computer turned on but kernel is got "stuck" even before starting to log.

I have seen other people complaining of a similar problem, linked to their mediatek bluetooth card. This is not the case as those people: 1) had logs reporting the crash on journalctl, which I don't have, and 2) worked around the issue with a script to unload and reload the kernel module, which doesn't work for me (even though my card does use their same module).

I have seen a recent post on fedora forum about seemingly the same issue, here is the link. Both mine and that post's machine are AMD systems, other than that they do not have much in common. Here is the link to the post: https://discussion.fedoraproject.org/t/system-cannot-wake-up/134199

2. What is the Version-Release number of the kernel:

6.11.3-200.fc40.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 :

The issue first appeared on 6.11.3-200.fc40.x86_64.

I am unable to replicate the issue on 6.10.12-200.fc40.x86_64

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:

The issue happens almost any time I resume from sleep:
  1. On kernel 6.11 suspend the system
  2. Try to wake the system
  3. Hangs
  4. Retry if it didn't hang

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

I haven't tried, but I will if required.

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

Yes, two. Neither of which should be related:
  * ``hid_xpadneo`` from copr https://copr.fedorainfracloud.org/coprs/sentry/xpadneo/
  * ``aura-gpu`` from this repo https://github.com/hartmark/aura-gpu

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.

There are no kernel logs available of the waking proces. The most recent logs on journalctl are from before going to sleep. I will attach the full log anyway.

8. Hardware info (in case it's relevant):

(I rolled back to 6.10 for the time being)
```
>System:
>  Kernel: 6.10.12-200.fc40.x86_64 arch: x86_64 bits: 64 compiler: gcc
>    v: 2.41-37.fc40
>  Desktop: KDE Plasma v: 6.2.1 tk: Qt v: N/A wm: kwin_wayland dm: SDDM
>    Distro: Fedora Linux 40 (KDE Plasma)
>Machine:
>  Type: Desktop System: ASRock product: B650I Lightning WiFi v: N/A
>    serial: <superuser required>
>  Mobo: ASRock model: B650I Lightning WiFi serial: <superuser required>
>    UEFI: American Megatrends LLC. v: 3.01 date: 05/10/2024
>Battery:
>  Device-1: hid-f4:73:35:a0:c6:7b-battery model: Keyboard K380 serial: N/A
>    charge: N/A status: discharging
>  Device-2: hidpp_battery_0 model: Logitech M585/M590 Multi-Device Mouse
>    serial: <filter> charge: 55% (should be ignored) status: discharging
>CPU:
>  Info: 8-core model: AMD Ryzen 7 7700X bits: 64 type: MT MCP arch: Zen 4
>    rev: 2 cache: L1: 512 KiB L2: 8 MiB L3: 32 MiB
>  Speed (MHz): avg: 545 min/max: 545/5573 cores: 1: 545 2: 545 3: 545 4: 545
>    5: 545 6: 545 7: 545 8: 545 9: 545 10: 545 11: 545 12: 545 13: 545 14: 545
>    15: 545 16: 545 bogomips: 143721
>  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
>Graphics:
>  Device-1: Advanced Micro Devices [AMD/ATI] Vega 10 XL/XT [Radeon RX 56/64]
>    driver: amdgpu v: kernel arch: GCN-5 pcie: speed: 8 GT/s lanes: 16 ports:
>    active: DP-3 empty: DP-1,DP-2,HDMI-A-1 bus-ID: 03:00.0 chip-ID: 1002:687f
>  Device-2: Sunplus Innovation SPCA2281 Web Camera
>    driver: snd-usb-audio,uvcvideo type: USB rev: 2.0 speed: 480 Mb/s lanes: 1
>    bus-ID: 5-2:2 chip-ID: 1bcf:2281
>  Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 24.1.3
>    compositor: kwin_wayland driver: X: loaded: N/A failed: amdgpu dri: radeonsi
>    gpu: amdgpu display-ID: 0
>  Monitor-1: DP-3 res: 2560x1080 size: N/A
>  API: EGL v: 1.5 platforms: device: 0 drv: radeonsi device: 1 drv: swrast
>    gbm: drv: kms_swrast surfaceless: drv: radeonsi wayland: drv: radeonsi x11:
>    drv: radeonsi
>  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.1.7 glx-v: 1.4
>    direct-render: yes renderer: AMD Radeon RX Vega (radeonsi vega10 LLVM
>    18.1.6 DRM 3.57 6.10.12-200.fc40.x86_64) device-ID: 1002:687f
>    display-ID: :0.0
>  API: Vulkan v: 1.3.290 surfaces: xcb,xlib,wayland device: 0
>    type: discrete-gpu driver: N/A device-ID: 1002:687f device: 1 type: cpu
>    driver: N/A device-ID: 10005:0000
>Audio:
>  Device-1: Advanced Micro Devices [AMD/ATI] Vega 10 HDMI Audio [Radeon 56/64]
>    driver: snd_hda_intel v: kernel pcie: speed: 8 GT/s lanes: 16
>    bus-ID: 03:00.1 chip-ID: 1002:aaf8
>  Device-2: Advanced Micro Devices [AMD] Family 17h/19h HD Audio
>    vendor: ASRock driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s
>    lanes: 16 bus-ID: 0f:00.6 chip-ID: 1022:15e3
>  Device-3: Sunplus Innovation SPCA2281 Web Camera
>    driver: snd-usb-audio,uvcvideo type: USB rev: 2.0 speed: 480 Mb/s lanes: 1
>    bus-ID: 5-2:2 chip-ID: 1bcf:2281
>  API: ALSA v: k6.10.12-200.fc40.x86_64 status: kernel-api
>  Server-1: PipeWire v: 1.0.8 status: active with: 1: pipewire-pulse
>    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
>    4: pw-jack type: plugin
>Network:
>  Device-1: MEDIATEK MT7922 802.11ax PCI Express Wireless Network Adapter
>    driver: mt7921e v: kernel pcie: speed: 5 GT/s lanes: 1 bus-ID: 0a:00.0
>    chip-ID: 14c3:0616
>  IF: wlp10s0 state: down mac: <filter>
>  Device-2: Realtek RTL8125 2.5GbE vendor: ASRock driver: r8169 v: kernel
>    pcie: speed: 5 GT/s lanes: 1 port: e000 bus-ID: 0b:00.0 chip-ID: 10ec:8125
>  IF: enp11s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
>  IF-ID-1: ztiv5mpofc state: unknown speed: 10000 Mbps duplex: full
>    mac: <filter>
>  IF-ID-2: ztklhtck7g state: unknown speed: 10000 Mbps duplex: full
>    mac: <filter>
>Bluetooth:
>  Device-1: MediaTek Wireless_Device driver: btusb v: 0.8 type: USB rev: 2.1
>    speed: 480 Mb/s lanes: 1 bus-ID: 1-12:4 chip-ID: 0e8d:0616
>  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.2
>    lmp-v: 11
>Drives:
>  Local Storage: total: 931.51 GiB used: 601.51 GiB (64.6%)
>  ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 980 PRO with Heatsink 1TB
>    size: 931.51 GiB speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 45.9 C
>Partition:
>  ID-1: / size: 929.93 GiB used: 601.14 GiB (64.6%) fs: btrfs
>    dev: /dev/nvme0n1p3
>  ID-2: /boot size: 973.4 MiB used: 364.2 MiB (37.4%) fs: ext4
>    dev: /dev/nvme0n1p2
>  ID-3: /boot/efi size: 598.8 MiB used: 19 MiB (3.2%) fs: vfat
>    dev: /dev/nvme0n1p1
>  ID-4: /home size: 929.93 GiB used: 601.14 GiB (64.6%) fs: btrfs
>    dev: /dev/nvme0n1p3
>Swap:
>  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
>    dev: /dev/zram0
>Sensors:
>  System Temperatures: cpu: 59.4 C mobo: 38.0 C gpu: amdgpu temp: 36.0 C
>    mem: 36.0 C
>  Fan Speeds (rpm): N/A gpu: amdgpu fan: 691
>Info:
>  Memory: total: 32 GiB note: est. available: 30.95 GiB used: 7.96 GiB (25.7%)
>  Processes: 439 Power: uptime: 46m wakeups: 0 Init: systemd v: 255
>    target: graphical (5) default: graphical
>  Packages: pm: rpm pkgs: N/A note: see --rpm pm: flatpak pkgs: 63
>    Compilers: clang: 18.1.8 alt: 17 gcc: 14.2.1 Shell: pwsh running-in: konsole
>    inxi: 3.3.36
```


Reproducible: Always

Comment 1 Alvise 2024-10-20 15:06:29 UTC
Created attachment 2052885 [details]
Kernel log

Full kernel log, which as I said doesn't contain any entry from the waking process

Comment 2 Alvise 2024-10-24 08:19:56 UTC
Bug still present in 6.11.4

Comment 3 Guille 2024-10-27 07:39:06 UTC
I have the same issue in Fedora 41 with kernel 6.11.5

# System Details Report
---

## Report details
- **Date generated:**                              2024-10-27 20:38:12

## Hardware Information:
- **Hardware Model:**                              ASRock B650M PG Riptide WiFi
- **Memory:**                                      64.0 GiB
- **Processor:**                                   AMD Ryzen™ 9 7900 × 24
- **Graphics:**                                    AMD Radeon™ RX 7800 XT
- **Graphics 1:**                                  AMD Radeon™ Graphics
- **Disk Capacity:**                               2.0 TB

## Software Information:
- **Firmware Version:**                            3.06
- **OS Name:**                                     Fedora Linux 41 (Workstation Edition)
- **OS Build:**                                    (null)
- **OS Type:**                                     64-bit
- **GNOME Version:**                               47
- **Windowing System:**                            Wayland
- **Kernel Version:**                              Linux 6.11.5-300.fc41.x86_64

Comment 4 Patrick Franken 2024-10-28 04:55:08 UTC
Same for me. 6.10.12-200.fc40 works, 6.11.4-201.fc40 does not.

# System Details Report
---

## Report details
- **Date generated:**                              2024-10-28 05:54:29

## Hardware Information:
- **Hardware Model:**                              Lenovo ThinkPad E14 Gen 3
- **Memory:**                                      16.0 GiB
- **Processor:**                                   AMD Ryzen™ 5 5500U with Radeon™ Graphics × 12
- **Graphics:**                                    AMD Radeon™ Graphics
- **Disk Capacity:**                               256.1 GB

## Software Information:
- **Firmware Version:**                            R1OET40W (1.19 )
- **OS Name:**                                     Fedora Linux 40 (Workstation Edition)
- **OS Build:**                                    (null)
- **OS Type:**                                     64-bit
- **GNOME Version:**                               46
- **Windowing System:**                            Wayland
- **Kernel Version:**                              Linux 6.10.12-200.fc40.x86_64

Comment 5 Alvise 2024-10-30 09:49:10 UTC
bug still present in 6.11.5

Comment 6 Alvise 2024-11-07 12:07:44 UTC
bug still present in 6.11.6

Comment 7 Guille 2024-11-08 00:16:53 UTC
I also confirm that the bug is still present in 6.11.6

Comment 8 Guille 2024-11-22 01:36:24 UTC
The issue appears to stem from Bluetooth drivers. To address this, I created a systemd service that uses rfkill to disable Bluetooth before the PC enters sleep mode and re-enable it after wake. This workaround worked for me. For more details, see: https://github.com/glexposito/bluetooth-sleep-toggle.

Comment 9 rptaylor 2024-11-29 03:20:08 UTC
I have the same problem, and it persists in kernel 6.11.8-200.fc40.x86_64. 
journalctl shows no logs from the time when the system fails to wake up. The lights turn on but nobody's home.
I have:
09:00.0 Network controller: MEDIATEK Corp. MT7921 802.11ax PCI Express Wireless Network Adapter
I believe that is also the Bluetooth controller. Wifi is turned off in Gnome settings though.

Comment 10 Alvise 2025-01-10 17:32:34 UTC
Fixed in kernel 6.12.8

Thanks for your work

Comment 11 Sujit 2025-03-02 09:17:42 UTC
Issue still persists in Kernel Linux 6.13.5-200.fc41.x86_64

Hardware Details:

Model: ASUSTeK COMPUTER INC. ASUS TUF Gaming A15 FA506NFR_FA566NFR
OS: Fedora Linux 41 (Workstation Edition)
Graphics: NVIDIA Corporation GA107 [GeForce RTX 2050]
processor : AMD Ryzen™ 7 7435HS × 16