Bug 466633 - Black lines or bands flickered horizontally when using Plasma 5.27.1 on Wayland with nomodeset on the kernel command line in VMs
Summary: Black lines or bands flickered horizontally when using Plasma 5.27.1 on Wayla...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.1
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-01 03:30 UTC by Matt Fagnani
Modified: 2024-04-24 16:41 UTC (History)
3 users (show)

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


Attachments
Recording of the black bands flickering when using Konsole in Plasma 5.27.1 on Wayland with nomodeset, llvmpipe, and simpledrm in a VM (1.63 MB, video/mp4)
2023-03-01 03:30 UTC, Matt Fagnani
Details
Journal for boot of Plasma 5.27.1 showing horizontal black bands flickering (252.56 KB, text/plain)
2023-03-01 03:33 UTC, Matt Fagnani
Details
drm_info output from in the VM (5.06 KB, text/plain)
2023-03-03 20:58 UTC, Matt Fagnani
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Fagnani 2023-03-01 03:30:42 UTC
Created attachment 156846 [details]
Recording of the black bands flickering when using Konsole in Plasma 5.27.1 on Wayland with nomodeset, llvmpipe, and simpledrm in a VM

SUMMARY

I booted the Fedora 38 KDE Plasma live image Fedora-KDE-Live-x86_64-38-20230224.n.0.iso in a QEMU/KVM VM using GNOME Boxes with 3D acceleration disabled by selecting Troubleshooting > Start Fedora-KDE-Live 38 in basic graphics mode in grub which puts nomodeset on the kernel command line and uses the llvmpipe driver from mesa-dri-drivers-23.0.0~rc4-3.fc38.x86_64 and the simpledrm driver from the 6.2.0 kernel. Plasma 5.27.1 on Wayland started. I started Konsole. I ran programs such as sudo dnf upgrade in Konsole. Black lines or bands flickered horizontally starting at the top of the Konsole window. When I moved the cursor over the black lines/bands, the path of the cursor showed up as no longer being black. The black lines/bands showed up lower on the screen sometimes and also when using other programs or when the background was shown. I'm attaching a recording of this problem. The problem usually appeared after a few seconds to a minute of using Konsole.

There were many repeated journal errors like the following when the black lines/bands were shown.
Feb 28 21:39:45 kwin_wayland[1442]: kwin_wayland_drm: Failed to create AR24 framebuffer: Invalid argument

This problem didn't happen when using the same image with basic graphics mode with nomodeset, llvmpipe and simpledrm on bare metal, or with llvmpipe and virtio_gpu, llvmpipe and virgl in VMs, or radeonsi and amdgpu drivers on bare metal. The problem might be specific to the combination of using nomodeset, llvmpipe, and simpledrm in VMs.

STEPS TO REPRODUCE
1. Boot a Fedora 37 KDE Plasma installation updated to 2023-2-28 with updates-testing enabled
2. Log in to Plasma 5.27.1 on Wayland from sddm
3. Download Fedora-KDE-Live-x86_64-38-20230224.n.0.iso from https://koji.fedoraproject.org/koji/buildinfo?buildID=2159238
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-20230224.n.0.iso in a QEMU/KVM VM using GNOME Boxes with 3D acceleration disabled using the llvmpipe driver
7. In grub, Select Troubleshooting > Start Fedora-KDE-Live 38 in basic graphics mode
8. Start Konsole in Plasma 5.27.1 on Wayland in the VM
9. Run sudo dnf upgrade in Konsole
10. Move the mouse cursor around over the top of Konsole until the black lines/bands flicker

OBSERVED RESULT
Black lines or bands flickered horizontally when using Plasma 5.27.1 on Wayland with nomodeset on the kernel command line in VMs

EXPECTED RESULT
No black lines or bands would appear on the screen

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

ADDITIONAL INFORMATION
The mouse cursor in the VM seemed to be lagging behind the cursor of the host when using the nomodeset, llvmpipe, simpledrm combination with the problem, but not otherwise.
Comment 1 Matt Fagnani 2023-03-01 03:33:58 UTC
Created attachment 156847 [details]
Journal for boot of Plasma 5.27.1 showing horizontal black bands flickering
Comment 2 Zamundaaa 2023-03-03 14:56:32 UTC
Please attach the output of drm_info (https://gitlab.freedesktop.org/emersion/drm_info) from in the VM.
Comment 3 Matt Fagnani 2023-03-03 20:58:16 UTC
Created attachment 156974 [details]
drm_info output from in the VM

I booted the Fedora 38 live image Fedora-KDE-Live-x86_64-38-20230302.n.0.iso in a QEMU/KVM VM using GNOME Boxes in basic graphics mode in grub with nomodeset on the kernel command line. The llvmpipe mesa 23.0.0-rc4 and simpledrm drivers from the 6.2.0 kernel were in use. Plasma 5.27.1 on Wayland started. I started Konsole and installed drm_info with sudo dnf install drm_info. The black bars appeared at the top of the screen while installing drm_info. I'm attaching the drm_info output. The black lines/bars showed up at two other times when using the VM. Thanks.
Comment 4 Zamundaaa 2023-08-02 11:34:39 UTC
I've seen similar glitches in git master on bare metal, there it was caused by llvmpipe not doing synchronization properly.
Is this still happening with 5.27.7? If so, can you test a patch on top of that?
Comment 5 Matt Fagnani 2023-08-07 18:37:52 UTC
(In reply to Zamundaaa from comment #4)
> I've seen similar glitches in git master on bare metal, there it was caused
> by llvmpipe not doing synchronization properly.
> Is this still happening with 5.27.7? If so, can you test a patch on top of
> that?

I haven't seen this problem with Plasma 5.27.6 in Fedora Rawhide VMs using Fedora-KDE-Live-x86_64-Rawhide-20230805.n.0.iso with nomodeset on the kernel command line and the simpledrm 5.5-rc4 kernel driver, llvmpipe from Mesa 23.1.5, KF 5.108.0, Qt 5.15.10. So the problem might been fixed already. 5.27.7 hasn't been built completely for Fedora yet. I'll comment if I see the problem again with 5.27.7 after it's built for Fedora. I read the instructions for building Plasma a while ago, but I haven't tried building it before. Thanks.
Comment 6 Vince 2024-01-01 10:33:23 UTC
(In reply to Zamundaaa from comment #4)
> I've seen similar glitches in git master on bare metal, there it was caused
> by llvmpipe not doing synchronization properly.
> Is this still happening with 5.27.7? If so, can you test a patch on top of
> that?

I've got the same black flickering issue on bare metal Ubuntu 22.04.03 LTS
Operating System: Ubuntu 22.04.3 LTS
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.3
Kernel Version: 6.6.8-060608-generic (64-bit)
Graphics Platform: X11
Graphics Processor: AMD Radeon R7 270 Series
Comment 7 Zamundaaa 2024-04-24 16:41:04 UTC
(In reply to Vince from comment #6)
> Graphics Platform: X11
Oh, I didn't notice that before. If this still happens for you, please test if the glitches go away after disabling the compositor (Alt+Shift+F12). If they do, make a new bug report for KWin, and if they don't, make one for the X server (https://gitlab.freedesktop.org/xorg/xserver/-/issues)

(In reply to Matt Fagnani from comment #5)
> I haven't seen this problem with Plasma 5.27.6 in Fedora Rawhide VMs using
> Fedora-KDE-Live-x86_64-Rawhide-20230805.n.0.iso with nomodeset on the kernel
> command line and the simpledrm 5.5-rc4 kernel driver, llvmpipe from Mesa
> 23.1.5, KF 5.108.0, Qt 5.15.10. So the problem might been fixed already.
> 5.27.7 hasn't been built completely for Fedora yet. I'll comment if I see
> the problem again with 5.27.7 after it's built for Fedora. I read the
> instructions for building Plasma a while ago, but I haven't tried building
> it before. Thanks.
I assume it's been fixed then