bus1 / dbus-broker

Linux D-Bus Message Broker
https://github.com/bus1/dbus-broker/wiki
Apache License 2.0
661 stars 78 forks source link

With dbus-broker-units, the KDE (plasma) can't be loaded #338

Closed xiangsheng closed 3 months ago

xiangsheng commented 5 months ago

I have a maybe similar problem as #337. But I can reach the SDDM screen but just get stuck here. When I try to log in, the kde tries to load the desktop environment (a black screen with an icon indicating loading in the center) and fails, just goes back to the SDDM.

I look through the journald log for the failed login. It seems the following part of log is rather suspicious. As I understand, this log says that the kwin service failed to start due to the existence of another DE, i.e. dde or deepin de. Although, I don't know why another DE exists in my system, I only use KDE, this extra DE never causes any problem before and I just ignored it.

Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Started teaching-sync.sh.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Started Snap user application autostart helper.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Failed to put bus name to hashmap: File exists
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: dde-session@x11.service: Two services allocated for the same bus name org.kde.KWin, refusing operation.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Failed to put bus name to hashmap: File exists
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: dde-session@wayland.service: Two services allocated for the same bus name org.kde.KWinWrapper, refusing operation.
Jan 16 20:30:11 xiangsheng-pc teaching-sync.sh[1623]: Setting up watches.  Beware: since -r was given, this may take a while!
Jan 16 20:30:11 xiangsheng-pc kaccess[1605]: Xlib XKB extension major= 1  minor= 0
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: app-print\x2dapplet@autostart.service: Skipped due to 'exec-condition'.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Condition check resulted in Print Queue Applet being skipped.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Finished KSplash "ready" Stage.
Jan 16 20:30:11 xiangsheng-pc systemd[1]: Started Network Manager Script Dispatcher Service.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Finished KDE Session Restoration.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: app-klipper@autostart.service: Skipped due to 'exec-condition'.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Condition check resulted in Klipper being skipped.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Started Calendar Reminders.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Started xapp-sn-watcher.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Started PulseAudio Sound System.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Started Discover.
Jan 16 20:30:11 xiangsheng-pc NetworkManager[929]: <info>  [1705408211.8095] device (wlp3s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Jan 16 20:30:11 xiangsheng-pc NetworkManager[929]: <info>  [1705408211.8098] device (wlp3s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Jan 16 20:30:11 xiangsheng-pc NetworkManager[929]: <info>  [1705408211.8103] manager: NetworkManager state is now CONNECTED_SITE
Jan 16 20:30:11 xiangsheng-pc NetworkManager[929]: <info>  [1705408211.8119] device (wlp3s0): Activation: successful, device activated.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Failed to put bus name to hashmap: File exists
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: dde-session@x11.service: Two services allocated for the same bus name org.kde.KWin, refusing operation.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Failed to put bus name to hashmap: File exists
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: dde-session@wayland.service: Two services allocated for the same bus name org.kde.KWinWrapper, refusing operation.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: dde-session-pre target, tasks to be run before the deepin desktop environment is initialized. is inactive.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Dependency failed for dde-osd service.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Dependency failed for dde-osd target.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: dde-osd.target: Job dde-osd.target/start failed with result 'dependency'.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: dde-osd.service: Job dde-osd.service/start failed with result 'dependency'.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: dde-session-initialized.target: Job dde-session-initialized.target/verify-active failed with result 'dependency'.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: dde-session-initialized.target: Triggering OnFailure= dependencies.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Stopped target plasma-workspace-x11.target.
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Stopping Clash for Windows...
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Stopping Fcitx...
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: Stopping Geoclue Demo agent...
dvdhrm commented 5 months ago

Thanks for the report! Do you use DDE? Did you try uninstalling whatever provides dde-session@.service?

xiangsheng commented 5 months ago

Thanks for the report! Do you use DDE? Did you try uninstalling whatever provides dde-session@.service?

No, I don't use it. The only reason that I keep it is because I don't know how to uninstall it completely.

dvdhrm commented 5 months ago

You can use pacman -Qo /path/to/file to see which package owns a specific file (in this case dde-session@.service. You can then use pacman -Rs <package> to remove the package.

You can also use pacman -Qs dde to find locally installed packages with dde in their name.

xiangsheng commented 5 months ago

After removing the dde, I can log into the plasma normally with dbus-broker-units. So the problem may be caused by the existence of dde.

I notice another info maybe related to this bug. That is, the following error, appearing in my opening post, also appears if I use the dbus-daemon-units.

Jan 16 20:30:11 xiangsheng-pc systemd[1104]: dde-session@x11.service: Two services allocated for the same bus name org.kde.KWin, refusing operation.

However, with dbus-daemon-units, this error only happens after I've logged into the KDE. Maybe, that is the reason why the same error doesn't lead to a failed login in dbus-daemon-units.

dvdhrm commented 3 months ago
Jan 16 20:30:11 xiangsheng-pc systemd[1104]: dde-session@x11.service: Two services allocated for the same bus name org.kde.KWin, refusing operation.

However, with dbus-daemon-units, this error only happens after I've logged into the KDE. Maybe, that is the reason why the same error doesn't lead to a failed login in dbus-daemon-units.

This error originates in systemd, which complains that multiple units in your user-instance have the same bus-name configured.

Whether this errors happens before or after you login depends on which units are available for your login manager. However, this configuration is completely outside of the control of the message bus.

I will close this bug as resolved, given that conflicting configurations lead to the issue, and this seems to be resolved. Let me know if there is more to investigate! Thanks!