Random freezes when video plays or discord streaming (KDE Plasma, Wayland, Discord Hardware Acceleration)

That is fantastic news. I realised yesterday that I am on mesa-git this could also cause some issues. I’ll revert back to mesa from the official arch repo to get this one. I think it’s available now in the testing packages.

I also apologies for the late response. Thanks and I wish you a good weekend as well!

1 Like

Apologies for the spam.

I have moved back to mesa 1:25.0.2-2 from the official arch repo, still on LTS kernel just in case, removed amdvlk and so far so good. STALKER 2 was the worst offender recently, as it was causing the freeze almost constantly. I’ve been alt-tabbing, turning the game on and off (as I am experimenting with mods) and I had no freeze as of yet. It seems that the new mesa update fixed the issue, at least for me.

Thanks @shadow359 for the tip about the new mesa update.

1 Like

Good Evening @jedicore!

For me you are not spamming, I would rather thank you for informing me that the new Mesa version is out of testing.

I have just updated and will see how it works with the kernel 6.13.7-zen1-1-zen. I don’t know how useful it will be if it’s stable for me, but I’ll see first.

I’ll either get back to you soon as soon as something happens or in 1-2 days with the message that it is now stable.

Edit:

Output inxi -Fxxc0z
System:

Kernel: 6.13.7-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
Desktop: KDE Plasma v: 6.3.3 tk: Qt v: N/A wm: kwin_wayland dm: SDDM
Distro: EndeavourOS base: Arch Linux

Machine:

Type: Desktop Mobo: ASRock model: X570 Taichi serial: <superuser required>
UEFI: American Megatrends v: P5.63 date: 08/22/2024

CPU:

Info: 12-core model: AMD Ryzen 9 5900X bits: 64 type: MT MCP arch: Zen 3+
rev: 0 cache: L1: 768 KiB L2: 6 MiB L3: 64 MiB
Speed (MHz): avg: 1727 min/max: 550/4951 boost: enabled cores: 1: 1727
2: 1727 3: 1727 4: 1727 5: 1727 6: 1727 7: 1727 8: 1727 9: 1727 10: 1727
11: 1727 12: 1727 13: 1727 14: 1727 15: 1727 16: 1727 17: 1727 18: 1727
19: 1727 20: 1727 21: 1727 22: 1727 23: 1727 24: 1727 bogomips: 177597
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] Navi 31 [Radeon RX 7900 XT/7900
XTX/7900 GRE/7900M] vendor: Sapphire NITRO+ driver: amdgpu v: kernel
arch: RDNA-3 pcie: speed: 16 GT/s lanes: 16 ports: active: DP-1,DP-2
empty: HDMI-A-1,HDMI-A-2,Writeback-1 bus-ID: 0f:00.0 chip-ID: 1002:744c

Display:

wayland server: X.org v: 1.21.1.16 with: Xwayland v: 24.1.6
compositor: kwin_wayland driver: X: loaded: amdgpu
unloaded: modesetting,radeon alternate: fbdev,vesa dri: radeonsi
gpu: amdgpu d-rect: 5120x1440 display-ID: 0

Monitor-1: 

DP-1 pos: primary,left model: Idek Iiyama PL2760Q
res: 2560x1440 hz: 144 dpi: 109 diag: 685mm (27")

Monitor-2: 

DP-2 pos: right model: Dell S2721DGF res: 2560x1440 hz: 144
dpi: 109 diag: 685mm (27")

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: 25.0.2-arch1.2
glx-v: 1.4 direct-render: yes renderer: AMD Radeon RX 7900 XTX (radeonsi
navi31 LLVM 19.1.7 DRM 3.61 6.13.7-zen1-1-zen) device-ID: 1002:744c
display-ID: :1.0

API: 

Vulkan v: 1.4.309 surfaces: xcb,xlib,wayland device: 0
type: discrete-gpu driver: N/A device-ID: 1002:744c
Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
de: kscreen-console,kscreen-doctor gpu: lact wl: wayland-info
x11: xdpyinfo, xprop, xrandr

Audio:

Device-1: Advanced Micro Devices [AMD/ATI] Navi 31 HDMI/DP Audio
driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
bus-ID: 0f:00.1 chip-ID: 1002:ab30
Device-2: FiiO K5 Pro driver: snd-usb-audio type: USB rev: 2.0
speed: 480 Mb/s lanes: 1 bus-ID: 3-5:2 chip-ID: 2972:0047
Device-3: Samson Meteor condenser microphone
driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
lanes: 1 bus-ID: 5-1:2 chip-ID: 17a0:0310
API: ALSA v: k6.13.7-zen1-1-zen status: kernel-api
Server-1: PipeWire v: 1.4.1 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: Aquantia AQtion AQC107 NBase-T/IEEE 802.3an Ethernet [Atlantic
10G] vendor: QNAP Systems QM2-2P10G1TA driver: atlantic v: kernel pcie:
speed: 8 GT/s lanes: 4 port: N/A bus-ID: 03:00.0 chip-ID: 1d6a:07b1
IF: enp3s0 state: up speed: 10000 Mbps duplex: full mac: <filter>

Drives:

Local Storage: total: 7.74 TiB used: 3.76 TiB (48.6%)
ID-1: /dev/nvme0n1 vendor: Crucial model: CT2000P5SSD8 size: 1.82 TiB
speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 42.9 C
ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 980 PRO 1TB size: 931.51 GiB
speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 41.9 C
ID-3: /dev/sda vendor: Samsung model: SSD 850 PRO 512GB size: 476.94 GiB
speed: 6.0 Gb/s serial: <filter>
ID-4: /dev/sdb vendor: Crucial model: CT1000MX500SSD1 size: 931.51 GiB
speed: 6.0 Gb/s serial: <filter>
ID-5: /dev/sdc vendor: Crucial model: CT4000MX500SSD1 size: 3.64 TiB
speed: 6.0 Gb/s serial: <filter>
Partition:
ID-1: / size: 906.19 GiB used: 314.56 GiB (34.7%) fs: ext4
dev: /dev/nvme1n1p2
Swap:
ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2
dev: /dev/nvme1n1p3

Sensors:

System Temperatures: cpu: 32.5 C mobo: 36.0 C gpu: amdgpu temp: 46.0 C
mem: 56.0 C
Fan Speeds (rpm): fan-1: 665 fan-2: 634 fan-3: 591 fan-4: 666 fan-5: 2311
fan-6: 0 fan-7: 677 gpu: amdgpu fan: 16

Info:

Memory: total: 32 GiB available: 31.26 GiB used: 3.33 GiB (10.7%)
Processes: 448 Power: uptime: 1m wakeups: 0 Init: systemd v: 257
default: graphical
Packages: pm: pacman pkgs: 1533 Compilers: clang: 19.1.7 gcc: 14.2.1
Shell: Bash v: 5.2.37 running-in: konsole inxi: 3.3.37

Edit:

The system had two freezes when starting discord and 1 with firefox when playing back a video on yourube. I am now switching to the LTS kernel.

1 Like

Another update from me:
This seems to be an issue with Wayland. I’ve had freezes after updating to new mesa, not as common as before, but still there to be annoying. So I did some more digging around and I’ve seen people saying to try X11 instead of Wayland which I did.
I had no freezes or crashes since (mind you, it hasn’t been 24hrs of my trying this out yet). I’ve played some intense games on fullscreen for few hours and it didn’t crash. The only issue I’ve noticed is that the performance seems to be worse on X11. There are some games that I should easily get above 60fps but I’m getting below that.

edit:
I’ve tried wayland to see how bad the performance is on X11, but when I launched Rise of Ronin it froze before the main menu. Where as on X11 it ran with no crashes caused by Linux (the game has it’s own issues). The performance was identical.

1 Like

The desktop also froze on the LTS Kernel on one monitor, i downgraded and restarted the pc. I am back to mesa 24.3.4-1 for now.

I think I have found a workaround/fix: edit /etc/environment and add KWIN_DRM_NO_DIRECT_SCANOUT=1 to turn off direct scanout.
Make sure that the variable is active by typing this into the terminal: env | grep -w "KWIN_DRM_NO_DIRECT_SCANOUT=1". If that string is displayed, that means the environment variable has been set.

It hasn’t been a full day, just few hours, but those were few hours of playing games, some demanding, some not so demanding. Like in my previous post, when I tried Rise of Ronin, the game froze before even reaching the main menu. But with this fix let me play good few hours without freezes.
The freezes seem to be related to no direct scanout or fullscreen unredirect on GNOME. (GNOME users also have this issue).
There is no proper way to turn off the direct scannout except setting a environment variable (at least that’s what my research has shown).

I am on the latest stable kernel 6.13.8-arch1-1 as well as on mesa 25.0.2-2. Hope this helps

2 Likes

Hello @jedicore!

I can give that a try. Thank you. :slight_smile:

Edit 1: One Day later. It still works, I hope it stays that way. Anyway I just want to say Thank you again. :+1:

1 Like

glad this worked so far!

I haven’t had a freeze myself as well. direct scanout/fullscreen unredirect seems to be the causing the freezes. Let’s hope that KDE team will fix that soon

2 Likes

Good evening @jedicore!

If I have understood correctly, the bug is/will be fixed in version 6.3.4.

Links:

2 Likes

Plasma got updated to 6.3.4, but the issue is still there.

I’ve updated plasma, wayland, kde to 6.3.4, removed the environment variable, restarted the machine and tried playing a game that caused the freezes. The screen froze just like before. Having the direct scanout set to off seems to be the only fix as of right now

1 Like

Hello @jedicore!

Thank you for your post. Too bad it is still not fixed. I had the hope/impression that this update would fix it. :face_with_diagonal_mouth:

I guess we have to keep on waiting. :hourglass_not_done:

Edit: I didn’t had any micro freezes after the update but I also did not remove the variable.

what’s worse, when I logged in after the update, I had ‘micro’ freezes every minute or so caused by Power Management’s method called Inhibit. It’s waiting for a reply which it can’t get.

Just be aware when upgrading that you might need to downgrade all of the updated plasma/kwin packages :face_exhaling:

1 Like

Don’t know when the the new update actually was pushed, but there was a bunch of qt6 stuff updated, as well as mesa and lib32-mesa
I’ve upgraded it all, rebooted, kept the variable and so far no freezes. I had micro stutters when I launched Rise of the Ronin at first (this title is consistent with freezes) but so far it’s running stable. I’ve alt-tabbed (writing this while the game is running) and did other things that I was sure it would trigger the freeze and it’s working fine.

1 Like