SUMMARY When booting Fedora Linux 34 in basic graphics mode, it hangs when trying to load the KDE Plasma Wayland desktop session. STEPS TO REPRODUCE 1. Boot the system with "nomodeset" 2. Select Plasma (Wayland) session and try to log in OBSERVED RESULT Hangs at a black screen. EXPECTED RESULT KDE Plasma desktop loads. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Fedora 34 (KDE Plasma) (available in About System) KDE Plasma Version: 5.21.3 KDE Frameworks Version: 5.80 Qt Version: 5.15.2 ADDITIONAL INFORMATION This is a blocker bug for Fedora Linux 34 release: https://bugzilla.redhat.com/show_bug.cgi?id=1952431 It can be trivially reproduced with the RC ISO: https://dl.fedoraproject.org/pub/alt/stage/34_RC-1.1/Spins/x86_64/iso/Fedora-KDE-Live-x86_64-34-1.1.iso
When running it manually and having the output captured locally, I get the following output from kwin: > kwin_wayland_drm: Did not find a GPU When attempting to force framebuffer mode, I get this instead: > terminate called after throwing an instance of 'std::out_of_range' > what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0) > Compositor crashed, respawning
Unfortunately, I couldn't get a crash trace because gdb doesn't think that it's crashing when I do this. :(
This still happens with Plasma 5.21.4...
> kwin_wayland_drm: Did not find a GPU Well, it's not very surprising. If you want to run kwin with the fbdev backend (as a normal user), make sure that you have the right group (video).
(In reply to Vlad Zahorodnii from comment #4) > > kwin_wayland_drm: Did not find a GPU > > Well, it's not very surprising. If you want to run kwin with the fbdev > backend (as a normal user), make sure that you have the right group (video). I tried that, and nothing changed. Actually, I don't expect us to fallback to fbdev for an environment with no kernel modesetting. I tried fbdev only as a last-ditch attempt to see if something would work.
The fbdev backend should work even with nomodeset=1. Can you check whether kwin starts with KWIN_FB_NO_HW_VSYNC=1? By default, kwin tries to synchronize compositing to hardware vblank events. Some (bad) fbdev drivers don't implement FBIO_WAITFORVSYNC.
Nope, no dice.
Weird, works for me. In order to start kwin with fbdev, I did sudo chgrp video /data/projects/usr/bin/kwin_wayland sudo chmod g+s /data/projects/usr/bin/kwin_wayland env KWIN_FB_NO_HW_VSYNC=1 dbus-run-session kwin_wayland --framebuffer --exit-with-session=konsole note that I'm also running kwin from git master. I need to try 5.21.4...
I didn't know about those steps around making it a setgid binary (!!!), but I just tried that and nothing changed.
Odd, 5.21 works fine for me too. As is, I guess the env var wouldn't make a difference because kwin crashes... (In reply to Neal Gompa from comment #2) > Unfortunately, I couldn't get a crash trace because gdb doesn't think that > it's crashing when I do this. :( I think you need to set a catchpoint (catch throw).
https://sourceware.org/gdb/onlinedocs/gdb/Set-Catchpoints.html
Hmm, nvm. It must be something else. I'll download the iso tomorrow and try to reproduce the issue myself.
I can reproduce the issue locally on my distro by adding "nomodeset" as a kernel argument, at the very end. Even without, passing --framebuffer instead of --drm makes my kwin experience a tad worse.
(In reply to Aleix Pol from comment #13) > I can reproduce the issue locally on my distro by adding "nomodeset" as a > kernel argument, at the very end. > > Even without, passing --framebuffer instead of --drm makes my kwin > experience a tad worse. Does weston start with fbdev backend? weston --backend fbdev-backend.so
Created attachment 137829 [details] weston on fbdev with nomodeset It looks a bit wonky but it works fine. KWin doesn't seem to refresh. I added some debug info: void FramebufferVsyncMonitorHelper::poll() { qDebug() << "poll!"; if (ioctl(m_fileDescriptor, FBIO_WAITFORVSYNC)) { qDebug() << "poll error!" << strerror(errno); emit errorOccurred(); } else { qDebug() << "poll vblank!"; emit vblankOccurred(std::chrono::steady_clock::now().time_since_epoch()); } } When running from nomodeset I get: KWin::FramebufferVsyncMonitorHelper::poll poll! KWin::FramebufferVsyncMonitorHelper::poll poll error! Inappropriate ioctl for device
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/890
With the patch in the MR kwin starts for me. The whole Plasma session doesn't start yet though, but I don't think it's KWin's fault. Or at least not this actual issue we're seeing here.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/891
Git commit 4b3b5fa36808090a48fa5e4619a25c8fbc0270a6 by Aleix Pol Gonzalez, on behalf of Aleix Pol. Committed on 26/04/2021 at 12:46. Pushed by apol into branch 'master'. fb: make it easier to run on nomodeset In the few cases where the framebuffer is needed, we'd get problems because ioctl(KWIN_FB_NO_VSYNC) fails. This removes the code entirely to just use a timer to refresh. M +0 -1 src/plugins/platforms/fbdev/CMakeLists.txt M +2 -7 src/plugins/platforms/fbdev/fb_backend.cpp M +1 -1 src/plugins/platforms/fbdev/fb_backend.h D +0 -77 src/plugins/platforms/fbdev/fbvsyncmonitor.cpp D +0 -63 src/plugins/platforms/fbdev/fbvsyncmonitor.h https://invent.kde.org/plasma/kwin/commit/4b3b5fa36808090a48fa5e4619a25c8fbc0270a6
Git commit a21571c832202d53cc1305011b05a99656938ce9 by Aleix Pol Gonzalez, on behalf of Aleix Pol. Committed on 26/04/2021 at 12:57. Pushed by apol into branch 'master'. Do not run with the drm backend if there's no dri drivers Only defaults to the drm backend if there is a /dev/dri directory. M +5 -1 src/main_wayland.cpp https://invent.kde.org/plasma/kwin/commit/a21571c832202d53cc1305011b05a99656938ce9