The problem
Since Plasma 6.8, the Xorg session is gone and Plasma only runs on Wayland. On Obarun you may see this:
dbus-run-session startplasma-wayland typed on a text console (tty) works.
- Choosing Plasma (Wayland) in SDDM gives a black screen.
- A custom session file with
Exec=dbus-run-session startplasma-wayland also gives a black screen.
Two separate problems cause this. You need to fix both.
Why it happens
1. Plasma and the user D-Bus wait for each other
D-Bus is the message bus that the programs of your desktop use to talk to each other. On Obarun, your user D-Bus is a 66 service in your user tree. When you log in, your session is
told to use that bus.
By default, this service does not start at login. It waits until a graphical display is announced, so that it knows which screen it serves. That works for Xorg sessions, and for
Wayland compositors that start first and announce their display afterwards.
Plasma works the other way around. It needs the bus before it can start its compositor, the part that draws the screen. So Plasma waits for the bus, and the bus waits for
Plasma's display. Nothing happens and the screen stays black.
Wrapping Plasma in dbus-run-session hides the problem by starting a second, private bus that 66 does not manage. Your desktop then runs on a bus that nobody watches, separate from
your user services. Don't do that. Fix the service instead.
2. ConsoleKit sends Plasma to the wrong seat
The SDDM login configuration (/etc/pam.d/sddm) registers your session with ConsoleKit. ConsoleKit puts it on a seat that has no graphics card, and marks it inactive. KWin, the
Plasma compositor, trusts ConsoleKit and looks for a graphics card on that seat only. It finds none, so nothing is displayed.
A login from a text console does not use ConsoleKit, which is why Plasma works there. On Obarun, 66-userd already keeps track of your sessions, so SDDM does not need ConsoleKit for
this.
How to check if you are affected
Run this as your user (not root):
66 status dbus
If the Source line shows /usr/share/66/service/user/dbus, your D-Bus still waits for a display (problem 1). While a Plasma login is stuck, the same command shows Status :
enabled, waiting.
Then run:
grep pam_ck_connector /etc/pam.d/sddm
If it prints a line that does not start with #, you have problem 2.
The fix
Step 1: start your user D-Bus at login (as your user, not root)
This copies the D-Bus service into your own 66 service folder without the part that waits for a display, then tells 66 to use it. Your copy takes precedence over the system one.
sed '/^\[Event\]/,$d' /usr/share/66/service/user/dbus > ~/.66/service/dbus && 66 reconfigure dbus
Check it:
66 status dbus
The Source line must now show /home/<you>/.66/service/dbus.
Step 2: stop SDDM from using ConsoleKit (as root)
This comments out the ConsoleKit line in the SDDM login configuration.
sed -i 's/^session[[:space:]]*optional[[:space:]]*pam_ck_connector.so/#&/' /etc/pam.d/sddm
Check it:
grep pam_ck_connector /etc/pam.d/sddm
The line must now start with #. pacman keeps your edit when SDDM is updated, because this file is protected as a modified configuration file.
Step 3: reboot
Reboot, then choose Plasma (Wayland) in SDDM, the regular session. If you created a custom session file with dbus-run-session, remove it, you no longer need it.
Once logged in, 66 status dbus should show Status : enabled, up.
Good to know
- Your copy in
~/.66/service/dbus replaces the system service, so future updates of the D-Bus service frontend will not reach you.
- Xorg sessions such as JWM keep working with this fix, tested through SDDM.
- This was tested in a virtual machine with Obarun, 66 0.9.1.2, Plasma 6.8.2 and SDDM 0.21.0, not on real hardware.
- As remainder, KDE is not officially supported on Obarun and I think people will begin to understand why. From their dev words, they want to use the system as a service manager for their own KDE init... For the lovers of KDE, they may be interested in some project like [SonicDE] (https://github.com/Sonic-DE)