You are not logged in.

#1 2023-05-11 17:17:27

fhftsai256
Member
Registered: 2020-05-12
Posts: 14

[SOLVED] org.kde.kpasswdserver Missing from DBus in Sway Sessions

This is a follow-up thread from this resolved issue. The solution worked for a while but it was then failed again. I'm not sure what I have touched the system other than adding an additional environment variable to systemd (GTK_USE_PORTAL=1).

The symptom is that dolphin can not communicate with kiod_kpasswdserver in sway sessions, but it works fine in plasma-wayland sessions.

$ dolphin
kf.kio.core: Can't communicate with kiod_kpasswdserver (for checkAuthInfo)!
kf.kio.core: Can't communicate with kiod_kpasswdserver (for checkAuthInfo)!
kf.kio.core: Can't communicate with kiod_kpasswdserver (for queryAuthInfo)!
kf.kio.core: "Communication with the local password server failed"

Based on logs from dbus-monitor, org.kde.kpasswdserver and org.kde.KIOFuse are missing from DBus.

error time=1683821780.215226 sender=org.freedesktop.DBus -> destination=:1.130 error_name=org.freedesktop.DBus.Error.NameHasNoOwner reply_serial=27
   string "Could not get owner of name 'org.kde.KIOFuse': no such name"
error time=1683821780.593010 sender=org.freedesktop.DBus -> destination=:1.131 error_name=org.freedesktop.DBus.Error.NameHasNoOwner reply_serial=3
   string "Could not get owner of name 'org.kde.kpasswdserver': no such name"

I couldn't find the proper service that registers kpasswdserver to DBus after a few hours of searching on the Internet. Upon entering a new Sway session, plasma-xdg-desktop-portal-kde is the only running service that contains the keyword "plasma". I could manually start other possibly related services but wouldn't help

$ systemctl --user status plasma-xdg-desktop-portal-kde
● plasma-xdg-desktop-portal-kde.service - Xdg Desktop Portal For KDE
     Loaded: loaded (/usr/lib/systemd/user/plasma-xdg-desktop-portal-kde.service; static)
     Active: active (running) since Thu 2023-05-11 12:39:54 EDT; 33min ago
   Main PID: 1619 (xdg-desktop-por)
      Tasks: 4 (limit: 18712)
     Memory: 18.7M
        CPU: 145ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/plasma-xdg-desktop-portal-kde.service
             └─1619 /usr/lib/xdg-desktop-portal-kde

$ systemctl --user status plasma-kded
● plasma-kded.service - KDE Daemon
     Loaded: loaded (/usr/lib/systemd/user/plasma-kded.service; static)
     Active: active (running) since Thu 2023-05-11 12:46:10 EDT; 13min ago
   Main PID: 5315 (kded5)
      Tasks: 4 (limit: 18712)
     Memory: 7.9M
        CPU: 78ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/plasma-kded.service
             └─5315 /usr/bin/kded5

$  systemctl --user status plasma-kactivitymanagerd.service
● plasma-kactivitymanagerd.service - KActivityManager Activity manager Service
     Loaded: loaded (/usr/lib/systemd/user/plasma-kactivitymanagerd.service; static)
     Active: active (running) since Thu 2023-05-11 12:40:13 EDT; 20min ago
   Main PID: 2232 (kactivitymanage)
      Tasks: 7 (limit: 18712)
     Memory: 9.7M
        CPU: 138ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/background.slice/plasma-kactivitymanagerd.service
             └─2232 /usr/lib/kactivitymanagerd

$  systemctl --user status plasma-ksmserver.service
× plasma-ksmserver.service - KDE Session Management Server
     Loaded: loaded (/usr/lib/systemd/user/plasma-ksmserver.service; disabled; preset: enabled)
     Active: failed (Result: core-dump) since Thu 2023-05-11 12:40:05 EDT; 21min ago
   Main PID: 2068 (code=dumped, signal=ABRT)
        CPU: 45ms

May 11 12:40:05 cyt-ht-9315 systemd[1449]: Starting KDE Session Management Server...
May 11 12:40:05 cyt-ht-9315 ksmserver[2068]: org.kde.kf5.ksmserver: Cannot connect to the X server
May 11 12:40:05 cyt-ht-9315 ksmserver[2068]: qt.qpa.xcb: could not connect to display
May 11 12:40:05 cyt-ht-9315 ksmserver[2068]: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
May 11 12:40:05 cyt-ht-9315 ksmserver[2068]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                                             
                                             Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
...

And here are a few environment variables set in systemd (with systemctl --user show-environment):

QT_QPA_PLATFORM=wayland
GTK_USE_PORTAL=1
WAYLAND_DISPLAY=wayland-1
XDG_SESSION_TYPE=wayland

Any suggestions that I can bring kpasswdserver back onto DBus? Thanks.

Last edited by fhftsai256 (2023-05-13 03:11:14)

Offline

#2 2023-05-12 19:14:43

obap74
Member
Registered: 2021-03-18
Posts: 99

Re: [SOLVED] org.kde.kpasswdserver Missing from DBus in Sway Sessions

I'm having the same issue/errors on AwesomeWM when trying to use FISH or SFTP. MTP is also broken.

All of these work fine with PCManFM-Qt on AwesomeWM and used to work just fine when using KDE Plasma.

I haven't found a solution yet.

Edit: Adding

dbus-update-activation-environment --systemd --all

to my ~/.xinitrc file did the trick.

Last edited by obap74 (2023-05-13 12:11:19)

Offline

#3 2023-05-13 03:10:53

fhftsai256
Member
Registered: 2020-05-12
Posts: 14

Re: [SOLVED] org.kde.kpasswdserver Missing from DBus in Sway Sessions

For some reason, I introduced a typo in my startup script so that the command `dbus-update-activation-environment` failed. The environment variable was imported for systemd, but DBus wasn't aware of them. The startup script now looks like:

export _JAVA_AWT_WM_NONREPARENTING=1
export QT_AUTO_SCREEN_SCALE_FACTOR=1
export QT_QPA_PLATFORM=wayland-egl
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export GTK_USE_PORTAL=1
export GDK_BACKEND=wayland
export SDL_VIDEODRIVER=wayland
export MOZ_ENABLE_WAYLAND=1
export MOZ_ACCELERATED=1
export MOZ_WEBRENDER=1

dbus-update-activation-environment --systemd --all

I still have no idea why those variables (MOZ_ENABLE_WAYLAND in particular) are not passed to applications launched from key bindings (bindsym), but at least org.kde.kpasswdserver is now registered in DBus.

Offline

#4 2023-05-13 07:36:27

progandy
Member
Registered: 2012-05-17
Posts: 5,320

Re: [SOLVED] org.kde.kpasswdserver Missing from DBus in Sway Sessions

fhftsai256 wrote:

I still have no idea why those variables (MOZ_ENABLE_WAYLAND in particular) are not passed to applications launched from key bindings (bindsym), but at least org.kde.kpasswdserver is now registered in DBus.

Variables that are set after sway starts will not be available in sway and programs launched with exec in the sway configuration. If sway is not started as a systemd user service, then it won't get variables from the systemd environment either.

You'll have to set the variables in a file that is sourced by the process that starts sway, that depends on how you start your sway session. If you need further help, please start a new thread.
https://wiki.archlinux.org/title/Environment_variables


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

Board footer

Powered by FluxBB