Arch Linux generally, kde 5.6.1, frameworks 16.03.80 1) After login to virtual terminal: $ ps lU 1000 F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 1000 30821 1 20 0 33956 4512 ep_pol Ss ? 0:00 /usr/lib/systemd/systemd --user 5 1000 30826 30821 20 0 105628 2116 - S ? 0:00 (sd-pam) 4 1000 30831 30817 20 0 16696 4752 wait Ss tty1 0:00 -bash 0 1000 30838 30831 20 0 32320 2956 - R+ tty1 0:00 ps lU 1000 2) Run startx with startkde 3) Exit kde with "leave", "logging out" 4) Run: $ ps lU 1000 F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 1000 12915 1 20 0 33960 4428 ep_pol Ss ? 0:00 /usr/lib/systemd/systemd --user 5 1000 12921 12915 20 0 105628 2080 - S ? 0:00 (sd-pam) 4 1000 12926 12908 20 0 16696 4536 wait Ss tty1 0:00 -bash 0 1000 12966 12915 20 0 33052 3908 ep_pol Ss ? 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation 0 1000 13050 12915 20 0 479028 13228 poll_s Sl ? 0:00 /usr/lib/telepathy/mission-control-5 0 1000 13060 12915 20 0 748068 35624 poll_s Sl ? 0:00 /usr/lib/gnome-online-accounts/goa-daemon 0 1000 13067 12915 20 0 270808 5348 poll_s Ssl ? 0:00 /usr/lib/gvfs/gvfsd 0 1000 13072 12915 20 0 404444 7340 futex_ Sl ? 0:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes 0 1000 13080 12915 20 0 280964 6524 poll_s Sl ? 0:00 /usr/lib/gnome-online-accounts/goa-identity-service 0 1000 13097 12915 20 0 176596 4904 poll_s Sl ? 0:00 /usr/lib/dconf/dconf-service 0 1000 13137 12915 9 -11 448752 12320 poll_s S<sl ? 9:12 /usr/bin/pulseaudio --daemonize=no 0 1000 13147 13137 20 0 81868 3328 poll_s S ? 0:00 /usr/lib/pulse/gconf-helper 0 1000 13150 12915 20 0 60676 5108 poll_s S ? 0:00 /usr/lib/GConf/gconfd-2 0 1000 13688 12915 20 0 339880 7536 poll_s Ssl ? 0:00 /usr/lib/at-spi2-core/at-spi-bus-launcher 0 1000 13715 13688 20 0 32576 3136 ep_pol S ? 0:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3 1 1000 20461 1 20 0 165076 824 poll_s Ss ? 0:01 gpg-agent --homedir /home/james/.gnupg --use-standard-socket --daemon 0 1000 21518 12915 20 0 304952 7728 poll_s Ssl ? 0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor 0 1000 27429 12915 20 0 187452 5344 poll_s Ssl ? 0:00 /usr/lib/gvfs/gvfsd-metadata 0 1000 30567 12926 20 0 32320 3128 - R+ tty1 0:00 ps lU 1000 Fifteen "extra" processes are left running that were ''not'' running before starting kde. kde should clean-up after itself when exiting. Possibly, some of these processes were started by systemd or dbus? But still, an "exit" should "exit cleanly". Reproducible: Always
I'm curious - how, and by what, are these gnome services being started? Is this a dbus/systemd thing? And if so, how would kde get a handle on these services? Or, is kde starting these gnome services directly?
Aha! Apparently, KDE just needs to kill the still running dbus-daemon. After startkde: $ ps lU 1000 F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 1000 30004 1 20 0 33960 4548 ep_pol Ss ? 0:00 /usr/lib/systemd/systemd --user 5 1000 30005 30004 20 0 105628 1992 - S ? 0:00 (sd-pam) 4 1000 30014 29996 20 0 16696 4808 wait Ss tty1 0:00 -bash 0 1000 30152 30004 20 0 32844 3708 ep_pol Ss ? 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation 0 1000 30230 30004 20 0 478896 13588 poll_s Sl ? 0:00 /usr/lib/telepathy/mission-control-5 0 1000 30239 30004 20 0 747796 32000 poll_s Sl ? 0:00 /usr/lib/gnome-online-accounts/goa-daemon 0 1000 30247 30004 20 0 270808 6028 poll_s Ssl ? 0:00 /usr/lib/gvfs/gvfsd 0 1000 30252 30004 20 0 338908 7572 futex_ Sl ? 0:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes 0 1000 30264 30004 20 0 280960 6276 poll_s Sl ? 0:00 /usr/lib/gnome-online-accounts/goa-identity-service 0 1000 30298 30004 20 0 176600 4880 poll_s Sl ? 0:00 /usr/lib/dconf/dconf-service 0 1000 30406 30014 20 0 34440 3136 - R+ tty1 0:00 ps lUjames Then: $ kill 30152 $ ps lU 1000 F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 1000 30004 1 20 0 34044 4564 ep_pol Ss ? 0:00 /usr/lib/systemd/systemd --user 5 1000 30005 30004 20 0 105628 1992 - S ? 0:00 (sd-pam) 4 1000 30014 29996 20 0 16696 4808 wait Ss tty1 0:00 -bash 0 1000 30414 30014 20 0 34440 3092 - R+ tty1 0:00 ps lUjames And, that is back to the initial state. The pivotal process is /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation and the parent process id for all of these "left-overs" here is 30004, the original login "/usr/lib/systemd/systemd --user". Hmm - so how could kde deduce the pid of this "left-over" dbus-daemon process? Then, "kill <pid>" could just be added to the end of startkde. And, is this a dbus or systemd bug, in some sense? Since systemd starts these processes with kde, but then just "leaves them around" after exit? Or, did kde "ask" for systemd to start these?
*** This bug has been marked as a duplicate of bug 417889 ***
*** This bug has been marked as a duplicate of bug 244250 ***