Running startplasma-wayland in headless mode without physical monitor

I’m trying to run KDE on the cloud machine which does not have physical monitor and stream output through remote desktop.

I used : /usr/lib/x86_64-linux-gnu/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland which I start as a systemd service

There is not so much information in the logs, kde services just timeout and core dump, like that:
systemd[7863]: plasma-ksplash.service: start operation timed out. Terminating.
systemd[7863]: plasma-ksplash.service: Main process exited, code=killed, status=15/TERM
systemd[7863]: plasma-ksplash.service: Failed with result ‘timeout’.
systemd[7863]: Failed to start plasma-ksplash.service - Splash screen shown during boot.

Process 9188 (org_kde_powerde) of user 203648 dumped core.

                                                            Module from deb systemd-252.5-2+gl0.amd64
                                                            Module from deb systemd-252.5-2+gl0.amd64
                                                            Stack trace of thread 9188:
                                                            #0  0x00007f6a732a9ccc __pthread_kill_implementation ( + 0x8accc)
                                                            #1  0x00007f6a7325aef2 __GI_raise ( + 0x3bef2)
                                                            #2  0x00007f6a73245472 __GI_abort ( + 0x26472)
                                                            #3  0x00007f6a73490c79 _ZNK14QMessageLogger5fatalEPKcz ( + 0x90c79)
                                                            #4  0x00007f6a73b34503 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv ( + 0x134503)
                                                            #5  0x00007f6a73b349b0 _ZN22QGuiApplicationPrivate21createEventDispatcherEv ( + 0x1349b0)
                                                            #6  0x00007f6a736b7f15 _ZN23QCoreApplicationPrivate4initEv ( + 0x2b7f15)
                                                            #7  0x00007f6a73b3786c _ZN22QGuiApplicationPrivate4initEv ( + 0x13786c)
                                                            #8  0x00007f6a73b38854 _ZN15QGuiApplicationC1ERiPPci ( + 0x138854)
                                                            #9  0x00005568599d4b3d n/a (org_kde_powerdevil + 0x6b3d)
                                                            #10 0x00007f6a7324618a __libc_start_call_main ( + 0x2718a)
                                                            #11 0x00007f6a73246245 __libc_start_main_impl ( + 0x27245)
                                                            #12 0x00005568599d4cd1 n/a (org_kde_powerdevil + 0x6cd1)
                                                            ELF object binary architecture: AMD x86-64

After googling a bit and comparing with mutter I realized kwin wayland does not support running without monitor.
In X11 Xfvb was used for that . But there is nothing for wayland. Mutter implemented it’s own --headless flag to run in this mode.

How do you guys run kwin autotests in CI? Maybe there is some virtual backend I can use to simulate virtual monitor.

1 Like