KDE graphics redrawing issue

I have this graphics redrawing issue, it has been going on for some time so I dont know exactly which update broke it. KDE with AMD CPU/GPU.

Overview
The problem is in redrawing and affects any graphics intensive program including KDE Plasma (the taskbar), it often happens with browsers like Firefox or any other browser based application like those running Electron.

Symptoms
It appears randomly but will always appear after some time, when it is in effect the stricken application does not redraw its window or redraws it erratically. This has the appearance of the application being frozen and not responding, however i is responding it is just a the rending that does not show it.

Workarounds
Moving the window will force redraws and is a workaround to be able to save work etc, otherwise only restarting the application helps. One workaround for Firefox is to drag tabs out to force the creation of a new window (this retains the tabs internal state).
When it happens to Plasma it can be restarted with these commands (as it happens so often I made a script):

killall plasmashell
plasmashell > /dev/null 2>&1 & disown

Currently running Linux 6.0 but the issue is the same on 5.15 LTS.

As far as I can see nothing is logged when the error occurs.

If you run Plasma as systemd service you can restart simply by

systemctl restart --user plasma-plasmashell.service

I don’t see any issues though I also use KDE with AMD GPU & CPU.

Thanks, this indeed a cleaner way to restart it.

So? This is not helpful, the only information you provide is that not every one with KDE and AMD has this problem, but that’s already assumed, this version of KDE would never have shipped if everyone with an AMD processor had the issue I am having.

Do you know which core components are involved in the redrawing? I suspect kwin but in my mind it could be anywhere from X11 to the graphics driver. Whatever is the component that is responsible for marking areas of application for redrawing has a bug here but I dont know which one that is, is this related to compositing? Any idea of how to get further information as to what component is at fault?

I have seen this issue before with KDE but that was on another computer running a nvidia optimus card and then I just attributed to one of the myriad problems that ill conceived piece of hardware caused, but now I am staring to think this one has to do with KDE rather than nvidia.

The frequency of breakage is highly random but will happen to any one particular application window about once every 3 days but since I have lots of application windows open the come out to something breaking about every 2 hours.

when you have next time the issue post logs:
journalctl -b0 -p5 --no-pager

Thanks.
A bit too much (potentially sensitive) information on those logs to post it without carefully reading through it, I might have to set up a more limited case and observe the thing breaking. Plasma for example breaks quite often, next time it does I will have a look and see if there is something interesting in that log, I will post anything I find.

In the meantime I am curious if anyone else has had a similar issue, not sure if my explanation is able to translate what it looks like, perhaps a more common way to describe it would be that applications randomly freezes, I might also make a video to show it in action.

there are no sensitive information there :face_with_peeking_eye:
you could try disabling power management on your gpu, and see if it helps, so post output from:
inxi -G

Here is a video showing a Firefox window that got bugged up, it will stay like this until the window is closed.

As can be seen the title bar of the window is not affected and gets redrawn as it should (the title changes depending on the selected tab as it should). However the contents of the window does not get their trigger for redraw as they should, but the redrawing triggers that are issued by moving the window does work so by moving the window one gets to see what its contents really are. There is one further issue in that old content sometimes is drawn over new content which can be seen at the start of the video where the application flickers between different states. These are often caused by larger redraws like for example changing the tab.

we need more info, so you have to provide output from:
inxi -Faz
and logs from when the issue happens:
journalctl -b0 -p4 --no-pager

inxi -G
Graphics:
  Device-1: AMD Renoir driver: amdgpu v: kernel
  Device-2: Chicony HD Webcam type: USB driver: uvcvideo
  Display: x11 server: X.Org v: 21.1.4 driver: X: loaded: amdgpu
    unloaded: modesetting dri: radeonsi gpu: amdgpu resolution: 1920x1080~60Hz
  OpenGL: renderer: AMD RENOIR (LLVM 14.0.6 DRM 3.48 6.0.2-2-MANJARO) v: 4.6
    Mesa 22.1.7

Kernel, KDE version and CPU/GPU as follows:

System:
  Kernel: 6.0.2-2-MANJARO
  Desktop: KDE Plasma v: 5.25.5 tk: Qt v: 5.15.6 wm: kwin_x11 vt: 1
    dm: SDDM Distro: Manjaro Linux base: Arch Linux
CPU:
    Info: model: AMD Ryzen 7 4800H with Radeon Graphics bits: 64 type: MT MCP

Seems to not be kernel related as this happens also on the LTS kernel. I tried upgrading to 6.0.2 but it did not help.

we need also the logs, dont be afraid, theres nothing sensitive there … otherwise this is just guessing… disable dynamic power management, and see if it helped:
so open this file:
kate /etc/default/grub
and in this line: GRUB_CMDLINE_LINUX_DEFAULT= inside the quotes add this parameter:
amdgpu.dpm=0
dont remove anything from there, add it to existing parameters, save the file, update grub:
sudo update-grub
reboot and test if it helped

Same issue and this has been going on for months. Using an intel gpu. I’m switching distros because this is a serious health risk to anyone who might be epileptic.

create a new topic where you describe your issue, and also provide system info:
inxi -Faz
and use formatting, click this icon in editor: </>