Bug 466299

Summary: Window previews for task manager icons showed the wrong colours when using the llvmpipe driver
Product: [Plasma] kwin Reporter: Matt Fagnani <matt.fagnani>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, nate, qydwhotmail, rdieter
Priority: NOR Keywords: wayland-only
Version First Reported In: 5.27.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Recording of wrong window preview colours in VM using llvmpipe
Recording of window previews with wrong colours with kwin 5.27.1 plus the patches
Recording with Plasma 5.27.3 on Wayland with wrong window preview colours in VM

Description Matt Fagnani 2023-02-23 12:09:39 UTC
Created attachment 156640 [details]
Recording of wrong window preview colours in VM using llvmpipe

SUMMARY

I booted the Fedora 38 KDE Plasma live image Fedora-KDE-Live-x86_64-38-20230221.n.1.iso in a QEMU/KVM VM using GNOME Boxes with 3D acceleration disabled using the llvmpipe driver from mesa-dri-drivers-23.0.0~rc4-3.fc38.x86_64.
Plasma 5.27.0 on Wayland started. I started Konsole, Firefox, Dolphin, System Settings. I moved the mouse cursor over the icons in the task manager for those programs. The window previews in the tooltips for those task manager icons showed the wrong colours. For Konsole, the main part of the window preview was shown as purple when it was really black. Purple, blue and other coloured stripes were shown on the Firefox preview which weren't shown in Firefox. The Dolphin preview had light blue on its left and top parts which were actually grey. The right panel of System Settings' preview was blue when it was grey. I'm attaching a recording which shows this problem. 

This problem always seems to happen when using the llvmpipe driver. I booted the same image on bare metal from a USB flash drive using Troubleshooting > Start Fedora-38-KDE-Plasma in basic graphics mode in grub which uses the llvmpipe mesa driver and simpledrm kernel driver. The same sort of incorrect colours were shown for those programs' previews in the task manager using the llvmpipe driver on bare metal. The problem didn't happen in VMs with 3D acceleration enabled using the virgl mesa driver, and on bare metal using the radeonsi mesa driver and virtio-gpu kernel driver. The problem might be specific to llvmpipe.

STEPS TO REPRODUCE
1. Boot a Fedora 37 KDE Plasma installation updated to 2023-2-22 with updates-testing enabled
2. Log in to Plasma 5.27.0 on Wayland from sddm
3. Download Fedora-KDE-Live-x86_64-38-20230221.n.1.iso from https://koji.fedoraproject.org/koji/buildinfo?buildID=2157026
4. Install GNOME Boxes if it isn't already with sudo dnf install gnome-boxes
5. Start GNOME Boxes
6. boot the Fedora 38 KDE Plasma live image Fedora-KDE-Live-x86_64-38-20230221.n.1.iso in a QEMU/KVM VM using GNOME Boxes with 3D acceleration disabled using the llvmpipe driver
7. Start Konsole in the VM
8. Start Firefox in the VM
9. Start Dolphin in the VM
10. Start System Settings in the VM
11. Hover the cursor over the task manager icons for Konsole, Firefox, Dolphin, and System Settings so that their small window previews are shown

OBSERVED RESULT
Window previews for task manager icons showed the wrong colours when using the llvmpipe driver

EXPECTED RESULT
Window previews for task manager icons showed the correct colours when using the llvmpipe driver

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 38
(available in About System)
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2023-02-27 15:54:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3710
Comment 2 Aleix Pol 2023-02-27 18:13:05 UTC
Git commit 548ccc80361b513a2748e55f30a43d9676d08695 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 27/02/2023 at 16:54.
Pushed by apol into branch 'Plasma/5.27'.

screencasting: Choose the correct GL type to download into an image

M  +21   -3    src/plugins/screencast/screencastutils.h

https://invent.kde.org/plasma/kwin/commit/548ccc80361b513a2748e55f30a43d9676d08695
Comment 3 Matt Fagnani 2023-03-01 01:16:39 UTC
Created attachment 156844 [details]
Recording of window previews with wrong colours with kwin 5.27.1 plus the patches

I built kwin 5.27.1 plus the patches for this problem and https://bugs.kde.org/show_bug.cgi?id=466302 I booted Fedora-KDE-Live-x86_64-38-20230224.n.0.iso in a QEMU/KVM VM in GNOME Boxes with 3D acceleration disabled using the llvmpipe and virtio_gpu drivers. Plasma 5.27.1 on Wayland started. I copied and pasted the kwin rpms I built into the VM. I disabled automatic login from sddm in System Settings. I logged out of Plasma. I switched to VT2 and updated to the kwin rpms I built. I logged into Plasma 5.27.1. I started Konsole, Firefox, Dolphin, and System Settings. The window previews had darker purple where there was purple before in Konsole and other previews where there was actually black. The window previews had darker blue instead of light blue where the real programs had light grey. The patch might not be enough to fix this problem.
Comment 4 Matt Fagnani 2023-03-09 00:34:14 UTC
This problem still happens with Plasma 5.27.2 on Wayland in Fedora 37 and 38. The wrong colours appear like in the recording in comment 3. The purple parts were actually lighter than with 5.27.1.
Comment 5 Matt Fagnani 2023-03-18 19:31:45 UTC
Created attachment 157400 [details]
Recording with Plasma 5.27.3 on Wayland with wrong window preview colours in VM

The window previews had different incorrect colours in Plasma 5.27.3 when using Fedora-KDE-Live-x86_64-38-20230318.n.0.iso in a QEMU/KVM VM in GNOME Boxes with 3D acceleration disabled using the llvmpipe mesa driver and the virtio_gpu kernel driver and in a Fedora 38 KDE Plasma installation with nomodeset on the kernel command line using llvmpipe and the simpledrm kernel driver. Window previews were orange where the programs were actually light blue and vice versa. Window previews had switched red and dark blue compared to the programs. Purple was shown in the previews where the programs were pink, and pink was shown in the previews where purple was shown in the programs. I'm attaching a recording showing this problem in Plasma 5.27.3 when using Fedora-KDE-Live-x86_64-38-20230318.n.0.iso in a QEMU/KVM VM in a Fedora 38 KDE Plasma installation.
Comment 6 Fushan Wen 2023-04-13 16:10:52 UTC
Is this fixed in 5.27.4?
Comment 7 Matt Fagnani 2023-04-14 05:26:25 UTC
(In reply to Fushan Wen from comment #6)
> Is this fixed in 5.27.4?

Window previews had the correct colours in Plasma 5.27.4 with KF 5.104.0 in Fedora 38 when using llvmpipe in a VM and on bare metal. Thanks.