Hey all,
I’ve been experiencing crashes due to a mesa driver bug on the 7700S. After reaching out to both KDE and mesa, I have gotten a workaround that seems to do the trick. This only occurs if a monitor is plugged in via the USB-C DP alt-mode port on the back of the GPU.
the visuals will “freeze”, but trying to record the issue with OBS will not actually record the issue. OBS simply sees what I’m supposed to be seeing imgur video
some games (in my case, Timberborn specifically) will actually cause KDE plasma to hang completely. This is because the GPU driver resets, and KDE fails to handle the bug properly
The (temporary/workaround) solutions that I’ve found:
use gamescope. This works around the issue by bypassing the kwin compositor
As of right now, this will make the Steam overlay not work due to an an open Steam bug [1], and mangohud will not work properly [2]
turn off the Steam Overlay. I haven’t tested this more than a couple of times, but this seems to work. I don’t know if the steam overlay is actually triggering the bug somehow or what.
add KWIN_DRM_NO_DIRECT_SCANOUT=1 to /etc/environment. This is a workaround that AMD-mesa has specifically reported to work. KDE/plasma told me that this would cause a performance hit, but I have not (yet) noticed anything different.
I just want to add that the environment variable seemed to have fixed this for me as well. Been searching around for a while until finally coming across the bug report you listed.
Some games seemed to work okay, some would randomly work (Helldivers 2), while others would not work at all (Ghosts of Tsushima). Adding KWIN_DRM_NO_DIRECT_SCANOUT=1 to /etc/environment got them all working.
Insane to think this is at least a 2 year old bug.
I’m glad that the solution worked for you! It’s also great knowing I’m not the only one having this issue, since while it was happening, it felt like nobody else was experiencing it
Hopefully a solution comes around soon! It sounds like a couple of those issues might actually trace all the way back to Wayland protocols itself, so maybe Valve’s new proposal for making Wayland a little more bleeding edge will fix it!
Thank you for this. I’ve also run into this bug recently, as it causes Dolphin emulator to completely lock up your system if you go full screen with it. Interestingly, it’s not every game that I have issues with; Retroarch games are fine, for instance, as is anything I launch through Steam. Cemu also appears to behave properly in full screen.
For the games that consistently stopped refreshing when going full screen, your workarounds work. Using gamescope seems to be the most convenient option, especially if you’re using Lutris. I have noticed, though, that both gamescope and the no_direct_scanout env variable seem to have drastic effects on frame pacing for at least one game I was testing, which is butter smooth in windowed mode but feels like it’s running sub-30fps when toggling full screen.
Update: I just tried the workaround that’s been posted in this thread, and at the first couple of trials I’ve thrown at it it seems to have completely resolved the lockups. I’ll update again later if I find any noteworthy regressions.
Since I had a hard time finding a single source that gives all the steps for this workaround, they are as follows:
Open a terminal window
Run sudo nano /etc/default/grub
Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT=. This line may not exist; if it doesn’t, create it.
Append amdgpu.dcdebugmask=0x400 inside of quotes after GRUB_CMDLINE_LINUX_DEFAULT=. If any other commands already exist here, add a space before the closing quote and insert amdgpu.dcdebugmask=0x400 between the space and closing quote.
Press CTRL+X, press Y, and hit ENTER to save and close the file.
Run sudo grub2-mkconfig -o /etc/grub2.cfg to update GRUB’s boot config.
Reboot your laptop.
Enjoy your now functioning full screen apps, while waiting for AMD/KDE to fix their panel refresh kernel drivers(?)
To undo this in the future, perform the steps in order again, but remove amdgpu.dcdebugmask=0x400 from /etc/default/grub rather than appending it.