GPU crash during gaming and streaming

My Mesa drivers crashed pretty hard during a gaming session where I also streamed. I had OBS streaming to Twitch, I was chatting with friends on Discord and I was also playing Project Zomboid.

Here is my system (inxi -Fzxx):

System:
Kernel: 6.10.6-200.fc40.x86_64 arch: x86_64 bits: 64 compiler: gcc
v: 2.41-37.fc40
Desktop: KDE Plasma v: 6.1.4 tk: Qt v: N/A wm: kwin_wayland dm: SDDM
Distro: Fedora Linux 40 (KDE Plasma)
Machine:
Type: Desktop System: ASUS product: N/A v: N/A serial:
Mobo: ASUSTeK model: TUF GAMING X670E-PLUS WIFI v: Rev 1.xx
serial: part-nu: SKU UEFI: American Megatrends v: 2613
date: 04/12/2024
Battery:
ID-1: hidpp_battery_0 charge: 99% condition: N/A volts: 4.2 min: N/A
model: Logitech G915 TKL LIGHTSPEED Wireless RGB Mechanical Gaming Keyboard
serial: status: full
Device-1: hidpp_battery_1 model: Logitech Wireless Mouse MX Master 3
serial: charge: 100% (should be ignored) status: discharging
CPU:
Info: 16-core model: AMD Ryzen 9 7950X3D bits: 64 type: MT MCP MCM
arch: Zen 4 rev: 2 cache: L1: 1024 KiB L2: 16 MiB L3: 128 MiB
Speed (MHz): avg: 1628 high: 4740 min/max: 545/5759 cores: 1: 4214 2: 3729
3: 545 4: 545 5: 3181 6: 3741 7: 545 8: 545 9: 545 10: 4046 11: 545 12: 3705
13: 545 14: 4740 15: 545 16: 545 17: 545 18: 4093 19: 545 20: 545 21: 545
22: 545 23: 545 24: 545 25: 545 26: 545 27: 545 28: 4737 29: 545 30: 545
31: 545 32: 3932 bogomips: 268809
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: AMD Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] driver: amdgpu
v: kernel arch: RDNA-3 pcie: speed: 16 GT/s lanes: 16 ports:
active: DP-1,DP-3 empty: DP-2,HDMI-A-1,Writeback-1 bus-ID: 03:00.0
chip-ID: 1002:744c
Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 24.1.2
compositor: kwin_wayland driver: X: loaded: amdgpu
unloaded: fbdev,modesetting,radeon,vesa dri: radeonsi gpu: amdgpu
d-rect: 4800x1152 display-ID: 0
Monitor-1: DP-1 pos: right res: 2752x1152 size: N/A
Monitor-2: DP-3 pos: primary,left res: 2048x1152 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.6 glx-v: 1.4
direct-render: yes renderer: AMD Radeon RX 7900 XT (radeonsi navi31 LLVM
18.1.6 DRM 3.57 6.10.6-200.fc40.x86_64) device-ID: 1002:744c
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:744c device: 1 type: cpu
driver: N/A device-ID: 10005:0000
Audio:
Device-1: AMD Navi 31 HDMI/DP Audio driver: snd_hda_intel v: kernel pcie:
speed: 16 GT/s lanes: 16 bus-ID: 03:00.1 chip-ID: 1002:ab30
Device-2: AMD Family 17h/19h HD Audio vendor: ASUSTeK
driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
bus-ID: 12:00.6 chip-ID: 1022:15e3
Device-3: BigBen Interactive Nacon Streaming Microphone
driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
lanes: 1 bus-ID: 3-4:2 chip-ID: 146b:0e03
Device-4: Logitech PRO X 2 LIGHTSPEED
driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 2.0 speed: 12 Mb/s
lanes: 1 bus-ID: 9-2:2 chip-ID: 046d:0af7
API: ALSA v: k6.10.6-200.fc40.x86_64 status: kernel-api
Server-1: PipeWire v: 1.0.7 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: Realtek RTL8125 2.5GbE vendor: ASUSTeK driver: r8169 v: kernel
pcie: speed: 5 GT/s lanes: 1 port: e000 bus-ID: 0c:00.0 chip-ID: 10ec:8125
IF: eno1 state: up speed: 1000 Mbps duplex: full mac:
Bluetooth:
Device-1: Foxconn / Hon Hai Wireless_Device driver: btusb v: 0.8 type: USB
rev: 2.1 speed: 480 Mb/s lanes: 1 bus-ID: 5-2:2 chip-ID: 0489:e0e2
Report: btmgmt ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
rfk-block: hardware: no software: yes address: bt-v: 5.2 lmp-v: 11
Drives:
Local Storage: total: 6.37 TiB used: 1.24 TiB (19.5%)
ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 990 PRO 4TB size: 3.64 TiB
speed: 63.2 Gb/s lanes: 4 serial: temp: 54.9 C
ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 980 PRO 2TB size: 1.82 TiB
speed: 63.2 Gb/s lanes: 4 serial: temp: 38.9 C
ID-3: /dev/sda vendor: Crucial model: CT1000MX500SSD1 size: 931.51 GiB
speed: 6.0 Gb/s serial:
Partition:
ID-1: / size: 3.64 TiB used: 623.29 GiB (16.7%) fs: btrfs
dev: /dev/nvme0n1p4
ID-2: /boot size: 973.4 MiB used: 363.9 MiB (37.4%) fs: ext4
dev: /dev/nvme0n1p3
ID-3: /boot/efi size: 597.8 MiB used: 19 MiB (3.2%) fs: vfat
dev: /dev/nvme0n1p2
ID-4: /home size: 3.64 TiB used: 623.29 GiB (16.7%) fs: btrfs
dev: /dev/nvme0n1p4
Swap:
ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
dev: /dev/zram0
Sensors:
System Temperatures: cpu: 51.2 C mobo: N/A gpu: amdgpu temp: 61.0 C
mem: 79.0 C
Fan Speeds (rpm): N/A gpu: amdgpu fan: 513
Info:
Memory: total: 32 GiB note: est. available: 31.04 GiB used: 7.05 GiB (22.7%)
Processes: 629 Power: uptime: 40m wakeups: 0 Init: systemd v: 255
target: graphical (5) default: graphical
Packages: pm: flatpak pkgs: 30 Compilers: N/A Shell: Bash v: 5.2.26
running-in: konsole inxi: 3.3.34

Attached in the link is my crash log (journalctl --boot=-1). Is there any way to avoid, or atleast fix Mesa crashed after they happen?
Link to crashlog

It’s probably due to a bug in de amdgpu kernel driver. If you boot with kernel 6.9.* it will probably not happen. A fix is on the way but might not be available until kernel 6.11.

Also welcome @theshin !