Bug 507746 - small window preview (thumbnail) of icon-only task manager glitching on no 3d-acceleration guest (like KVM guest )
Summary: small window preview (thumbnail) of icon-only task manager glitching on no 3d...
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager widgets (other bugs)
Version First Reported In: 6.4.3
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL: https://gitlab.freedesktop.org/mesa/m...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-01 15:12 UTC by jackyzy823
Modified: 2025-09-15 15:54 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
small window preview (thumbnail) of icon-only task manager glitching (318.35 KB, image/png)
2025-08-01 15:12 UTC, jackyzy823
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jackyzy823 2025-08-01 15:12:59 UTC
Created attachment 183712 [details]
small window preview (thumbnail) of icon-only task manager glitching

SUMMARY
small window preview (thumbnail) of icon-only task manager glitching on no 3d-acceleration guest (like KVM guest )

STEPS TO REPRODUCE
1.  Install a  OS with KDE desktop  in guest VM via virt-manager with default options.
2.  Observer small window preview (thumbnail) of icon-only task manager  in the guest VM

OBSERVED RESULT
The small window preview (thumbnail) of icon-only task manager glitching 

EXPECTED RESULT
Shows normally.


ADDITIONAL INFORMATION
When you enable the OpenGL option in "Display spice" and " 3d-acceleration" in "Video virtio"  of VM, the small window preview (thumbnail) of icon-only task manager  shows normally.

Host machine has a discrete AMD Graphic card.
Comment 1 TraceyC 2025-08-05 21:33:05 UTC
Thanks for filing this bug report. Unfortunately there isn't enough information for us to try to figure out what's happening. Please add information about your system as requested in the bug report template. Copy and paste this with the information into a new comment.


SOFTWARE/OS VERSIONS -  of the host machine
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

Also, please let us know at least one distro you installed in a VM where the bug was seen. Thanks.
Comment 2 jackyzy823 2025-08-06 12:19:13 UTC
(In reply to TraceyC from comment #1)
> Thanks for filing this bug report. Unfortunately there isn't enough
> information for us to try to figure out what's happening. Please add
> information about your system as requested in the bug report template. Copy
> and paste this with the information into a new comment.
> 
> 
> SOFTWARE/OS VERSIONS -  of the host machine
> Windows: 
> macOS: 
> (available in the Info Center app, or by running `kinfo` in a terminal
> window)
> Linux/KDE Plasma: 
> KDE Plasma Version: 
> KDE Frameworks Version: 
> Qt Version: 
> 
> Also, please let us know at least one distro you installed in a VM where the
> bug was seen. Thanks.

Guest OS:
Fedora 42 KDE
KDE Plasma Version:  6.3.4
KDE Frameworks Version:  6.12.0
Qt Version: 6.8.2
Comment 3 TraceyC 2025-08-06 19:28:12 UTC
I can reproduce this with a Fedora 42 VM and a Neon Testing VM

Have you seen this graphical bug with any host systems or only in a VM? This might be due to a bug in the spice driver.
Comment 4 jackyzy823 2025-08-07 11:50:10 UTC
I only see this bug on guest VM without 3d acceleration ability.

I don't think this might be a spice driver bug. 
I tested on VMware workstation 15 too. If i disable the 3d acceleration in display settings of VM, the bug will show.
Comment 5 Nate Graham 2025-08-07 16:38:07 UTC
Yes, you need to turn on 3D acceleration. Default settings don't cut it. :) VMs' software rendering drivers are generally horrible and prone to bugs like this, which is why we recommend using 3D acceleration in your VMs when you care about how things look.
Comment 6 jackyzy823 2025-08-10 07:10:16 UTC
Add a line
"allowDmaBuf: false" after
https://invent.kde.org/plasma/plasma-desktop/-/blob/1761462c7a729872e5bd3519cff7628140bf4bf1/applets/taskmanager/package/contents/ui/PipeWireThumbnail.qml#L17 ( or on your real system `/usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/PipeWireThumbnail.qml`) could fix the bug.

I'm not sure the key reason why. It might be kpipewire doing something wrong on dmabuf. or the underly mesa driver (?) doing something wrong.
Comment 7 jackyzy823 2025-08-12 13:09:19 UTC
Some updates (for someone may be interested in)

1. Guest + no 3d-acc will use dmabuf (and have glitch)
2. Guest + 3d-acc will use memfd (no glitch)
3. Host wil use dmabuf (no glitch)

-----------------------------------------
I guess 1) there might some width/height calculation issue in guest  which causing dmabuf wrongly used.  If you set application width near to 640 , the problem will disappear
2) or sync related issue , dmabuf is changed before use.

------------------------------------------

KDE's "Alt+Tab" (task switcher 's preview) do not have glitch under Guest + no 3d-acc  .  It uses   KWin.WindowThumbnail https://invent.kde.org/plasma/kwin/-/blob/master/src/tabbox/switchers/thumbnail_grid/contents/ui/main.qml#L146 https://invent.kde.org/plasma/kwin/-/blob/master/src/scripting/windowthumbnailitem.cpp
Comment 8 jackyzy823 2025-09-04 11:49:15 UTC
Some more updates:

I think this might not be a downstream problem. I did more tests.

Using Fedora 40 KDE Live image under guest vm with no 3d acceleration , and the problem doesn't exist.

So i dig deeper (recompile kpipewire and add some logging) and found that 1) memfd is used when no 3d-acceleration 2) dmabuf is used when 3d-acceleration with  Fedora 40 KDE live image in Guest env. and KDE is 6.0.3.

So there must be something wrong (kwin? kpipewire ? or mesa?) on determine which (memfd/dmabuf) to use when there's no 3d-acceleration or have 3d-acceraltion

At least on KDE side, we should do the right determination to use memfd when no 3d-accerlation (because dmabuf is buggy under this circumstance) since it has been done correctly before.

--------------------

I also created an issue on mesa side (before my Fedora 40 tests) : https://gitlab.freedesktop.org/mesa/mesa/-/issues/13825

and also found some bugs might relevant:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/9375
https://gitlab.freedesktop.org/mesa/mesa/-/issues/12341
Comment 9 jackyzy823 2025-09-04 12:50:00 UTC
Sorry for so many updates to bother you :(

More updates:
In F40 KDE (new installed) , do `dnf update --exclude=mesa*` to update all the system except mesa, kde bumps to 6.3.3 and no bug happened. (currently mesa is still 24.0.5)

Then i update mesa to 24.1.7 (the latest one for F40) still no bug.

**THEN** i update mesa to 24.2.0 for F41 via bodhi-client `bodhi updates download --updateid FEDORA-2024-31fc8e948b` , the bug happens !
Comment 10 jackyzy823 2025-09-06 11:53:51 UTC
It might be mesa dmabuf issue for software renderer.

However we could do something on KPipewire part to remedy the issue.

So i made a MR https://invent.kde.org/plasma/kpipewire/-/merge_requests/210
Comment 11 TraceyC 2025-09-15 15:54:09 UTC
The workaround MR was closed, and there's a comment that this will be fixed when an upstream MR is merged
 https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37088.

I'm marking this upstream since the problem lies in the mesa driver. It looks like there isn't anything actionable for KDE at this point. If that changes, feel free to reopen this report. Thanks!