LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   BUG: startkwayland leave processes after log out. (https://www.linuxquestions.org/questions/slackware-14/bug-startkwayland-leave-processes-after-log-out-4175693166/)

gildbg 04-05-2021 11:03 AM

BUG: startkwayland leave processes after log out.
 
Hello,

I have a problems on current x64 with wayland. My wayland packages is:
Quote:

$ pkg_info -s wayla
kwayland-5.80.0-x86_64-1
kwayland-integration-5.21.3-x86_64-1
kwayland-server-5.21.3-x86_64-1
plasma-wayland-protocols-1.1.1-x86_64-3
wayland-1.19.0-x86_64-2
wayland-protocols-1.20-noarch-3
xisxwayland-1-x86_64-3
xorg-server-xwayland-1.20.10-x86_64-5
After I click log out to exit in shell, wayland leave few processes that fire up load average to 3.40.

Quote:

user 1520 0.0 0.0 159604 4740 ? Sl 18:45 0:00 /usr/bin/gnome-keyring-daemon --daemonize --login
user 1523 0.0 0.0 7528 4300 tty1 Ss 18:45 0:00 -bash
user 1650 0.0 0.0 143492 19984 ? Sl 18:45 0:00 /usr/lib64/startplasma-waylandsession
user 1756 57.2 0.1 388452 34144 ? Sl 18:45 0:49 /usr/lib64/kactivitymanagerd
user 1790 107 0.1 276748 49776 ? Sl 18:45 1:32 /usr/lib64/kdeconnectd
user 1805 56.1 0.2 387124 66260 ? Sl 18:45 0:48 /usr/bin/korgac
user 2188 0.0 0.0 133740 13332 ? Sl 18:46 0:00 /usr/bin/kdeinit5_shutdown
user 2190 0.0 0.0 90300 27364 ? S 18:46 0:00 /usr/lib64/drkonqi -platform wayland --appname kdeconnectd --apppath /usr/lib64 --signal 6 --pid 1790 --appversion 20.12.3 --programname KDE Connect Daemon --bugaddr
ess submit@bugs.kde.org --startupid 0
user 2191 0.0 0.0 90300 27196 ? S 18:46 0:00 /usr/lib64/drkonqi -platform wayland --appname korgac --apppath /usr/bin --signal 6 --pid 1805 --appversion 5.16.3 (20.12.3) --programname KOrganizer Reminder Daemon
--bugaddress submit@bugs.kde.org --startupid 0
user 2192 0.0 0.0 90300 27388 ? S 18:46 0:00 /usr/lib64/drkonqi -platform wayland --appname kactivitymanagerd --apppath /usr/lib64 --signal 6 --pid 1756 --startupid 0
user 2193 0.0 0.0 69100 14476 ? S 18:46 0:00 /usr/bin/kdeinit5 --suicide
user 2194 0.0 0.0 69100 6492 ? Ss 18:46 0:00 /usr/bin/kdeinit5 --suicide
user 2195 0.0 0.0 89144 27580 ? S 18:46 0:00 /usr/lib64/kf5/klauncher --fd=8

This problem does not exists of I run kde with startx. I also have a problem with wayland if power manager switch off monitor for more then 30 minutes after that no login screen appear for that if I will be away from kbd more the 30 minutes I leave from X. Forgot so say, leaving the processes up is not happened every time.

LuckyCyborg 04-05-2021 11:33 AM

Quote:

Originally Posted by gildbg (Post 6237456)
Hello,

I have a problems on current x64 with wayland. My wayland packages is:


After I click log out to exit in shell, wayland leave few processes that fire up load average to 3.40.

Code:

user 1520 0.0 0.0 159604 4740 ? Sl 18:45 0:00 /usr/bin/gnome-keyring-daemon --daemonize --login
user 1523 0.0 0.0 7528 4300 tty1 Ss 18:45 0:00 -bash
user 1650 0.0 0.0 143492 19984 ? Sl 18:45 0:00 /usr/lib64/startplasma-waylandsession
user 1756 57.2 0.1 388452 34144 ? Sl 18:45 0:49 /usr/lib64/kactivitymanagerd
user 1790 107 0.1 276748 49776 ? Sl 18:45 1:32 /usr/lib64/kdeconnectd
user 1805 56.1 0.2 387124 66260 ? Sl 18:45 0:48 /usr/bin/korgac
user 2188 0.0 0.0 133740 13332 ? Sl 18:46 0:00 /usr/bin/kdeinit5_shutdown
user 2190 0.0 0.0 90300 27364 ? S 18:46 0:00 /usr/lib64/drkonqi -platform wayland --appname kdeconnectd --apppath /usr/lib64 --signal 6 --pid 1790 --appversion 20.12.3 --programname KDE Connect Daemon --bugaddr
ess submit@bugs.kde.org --startupid 0
user 2191 0.0 0.0 90300 27196 ? S 18:46 0:00 /usr/lib64/drkonqi -platform wayland --appname korgac --apppath /usr/bin --signal 6 --pid 1805 --appversion 5.16.3 (20.12.3) --programname KOrganizer Reminder Daemon
--bugaddress submit@bugs.kde.org --startupid 0
user 2192 0.0 0.0 90300 27388 ? S 18:46 0:00 /usr/lib64/drkonqi -platform wayland --appname kactivitymanagerd --apppath /usr/lib64 --signal 6 --pid 1756 --startupid 0

user 2193 0.0 0.0 69100 14476 ? S 18:46 0:00 /usr/bin/kdeinit5 --suicide
user 2194 0.0 0.0 69100 6492 ? Ss 18:46 0:00 /usr/bin/kdeinit5 --suicide
user 2195 0.0 0.0 89144 27580 ? S 18:46 0:00 /usr/lib64/kf5/klauncher --fd=8

This problem does not exists of I run kde with startx. I also have a problem with wayland if power manager switch off monitor for more then 30 minutes after that no login screen appear for that if I will be away from kbd more the 30 minutes I leave from X. Forgot so say, leaving the processes up is not happened every time.

In fact, looks like (sometimes?) you have crashes on logout - see the drkonqi instances. So, you get zombies.

Would be interesting to known about your graphics stack - which model of graphics card? Which driver you use?

Because usually the crashes on Wayland/Plasma5 are produced by the graphics stack.

BTW, did you properly setup the PipeWire daemons? On Wayland/Plasma5 they aren't that "optional" as people thinks.

gildbg 04-05-2021 02:39 PM

Sorry,

I did not setup anything. May be that is the problem, btw It's really crash something but I was thinking that is normal. How I can find a guide about PipeWire daemons, where are they
and what are they, I really don't know anything about these internal kde5 daemons ?

Here is my inxi:

Quote:

System: Kernel: 5.10.27 x86_64 bits: 64 Desktop: KDE Plasma 5.21.3 Distro: Slackware 14.2
Machine: Type: Desktop Mobo: ASRock model: X570 Phantom Gaming 4 serial: <filter> UEFI: American Megatrends v: P3.90
date: 01/26/2021
Memory: RAM: total: 31.34 GiB used: 1.22 GiB (3.9%)
RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU: Info: 8-Core model: AMD Ryzen 7 3800X bits: 64 type: MT MCP cache: L2: 4 MiB
Speed: 2795 MHz min/max: 2200/3900 MHz Core speeds (MHz): 1: 2795 2: 1865 3: 1859 4: 1862 5: 2191 6: 2191 7: 2194
8: 2195 9: 1863 10: 1861 11: 2195 12: 2195 13: 2192 14: 2196 15: 2791 16: 1861
Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] driver: amdgpu v: kernel
Display: wayland server: X.Org 1.20.10 driver: loaded: amdgpu,ati unloaded: modesetting,radeon,vesa
resolution: 2560x1440~60Hz
OpenGL: renderer: AMD SIENNA_CICHLID (DRM 3.40.0 5.10.27 LLVM 11.1.0) v: 4.6 Mesa 21.0.1
Audio: Device-1: Advanced Micro Devices [AMD/ATI] driver: snd_hda_intel
Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio driver: snd_hda_intel
Sound Server-1: ALSA v: k5.10.27 running: yes
Sound Server-2: PulseAudio v: 14.2 running: yes
Network: Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi
IF: wlan2 state: up mac: <filter>
Device-2: Intel I211 Gigabit Network driver: igb
IF: eth1 state: down mac: <filter>
Bluetooth: Device-1: Intel type: USB driver: btusb
Report: ID: hci0 state: up address: <filter> bt-v: 3.0
Drives: Local Storage: total: 2.38 TiB used: 49.04 GiB (2.0%)
ID-1: /dev/nvme0n1 vendor: Kingston model: SA2000M8500G size: 465.76 GiB
ID-2: /dev/sda vendor: Western Digital model: WD1501FASS-00W2B0 size: 1.36 TiB
ID-3: /dev/sdb vendor: PNY model: SSD2SC120G1SA754D117-443 size: 111.79 GiB
ID-4: /dev/sdc vendor: Samsung model: SSD 850 EVO 500GB size: 465.76 GiB
Partition: ID-1: / size: 97.93 GiB used: 48.97 GiB (50.0%) fs: ext4 dev: /dev/sdb1
ID-2: /boot/efi size: 95 MiB used: 71.4 MiB (75.1%) fs: vfat dev: /dev/sdc2
Swap: ID-1: swap-1 type: partition size: 11.79 GiB used: 0 KiB (0.0%) dev: /dev/sdb2
Sensors: System Temperatures: cpu: 47.6 C mobo: 37.0 C gpu: amdgpu temp: 56.0 C
Fan Speeds (RPM): fan-1: 0 fan-2: 1880 fan-3: 0 fan-4: 885 fan-5: 0 fan-6: 0 fan-7: 0 gpu: amdgpu fan: 1123
Info: Processes: 325 Uptime: 3h 40m Shell: Bash inxi: 3.3.03

LuckyCyborg 04-05-2021 02:57 PM

Quote:

Originally Posted by gildbg (Post 6237519)
Sorry,

I did not setup anything. May be that is the problem, btw It's really crash something but I was thinking that is normal. How I can find a guide about PipeWire daemons, where are they
and what are they, I really don't know anything about these internal kde5 daemons ?

You can take a look on this feature request:

https://www.linuxquestions.org/quest...ml#post6232769

Unless you want to use PipeWire also as audio server, you do not need the third XDG desktop file for pipewire-pulse.

Please note that that feature request uses a small daemon supervisor, described there:

https://www.linuxquestions.org/quest...ed-4175691414/

I use also myself (on multiple systems) the design proposed by @ZhaoLin1457 and works perfectly.

Probably it's the best way to tame the PipeWire daemons on a non-systemd distro like Slackware. You will find many details about the particularities of running those PipeWire daemons on the threads I suggested you.

BTW, the PipeWire itself is included already on Slackware-current, BUT just as dead weight (no startup setup), because it's a hard dependency of Plasma5.

However, the PipeWire is not something internal to Plasma5, but the very successor of PulseAudio, as an Audio/Video server.

Think that is something like the PulseVideo - which was its original name, BTW...

Quote:

Originally Posted by gildbg (Post 6237519)
Here is my inxi:

Firstly, you are kind to stop using QUOTEs ? Please use CODEs instead!

To make some sense on the previously quoted post of yours, I had to replace manually your QUOTEs with CODEs.

Anyway, at the first sight, your box should run fine the Wayland/Plasma5.

PS. After you setup properly the PipeWire daemons, you will notice also that the taskbar thumbnails work like on X11/Plasma5. ;)

ctrlaltca 04-05-2021 02:58 PM

I experience the same problem with a zombie kdeconnectd eating up 100% of one cpu core after a session logout.
The nice part is that even if i disable kdeconnectd from the tray settings, it gets started anyway.
By now my workaround is to just uninstall the package.
Same graphics stack as gildbg, amdgpu (ryzen 7 4700)

gildbg 04-06-2021 12:18 AM

1 Attachment(s)
My apologies about quotes, I did not know the rules of the community. I forgot to mentioned I used X or wayland on init 3.


I make these changes but no effect, I see this error when I start the plasma, I also attach full log.

Code:

not a reply org.freedesktop.locale1 QDBusMessage(type=Error, service="org.freedesktop.DBus", error name="org.freedesktop.DBus.Error.ServiceUnknown", error message="The name org.freedesktop.locale1 was not provided by any .service
files", signature="s", contents=("The name org.freedesktop.locale1 was not provided by any .service files") )

I need to kill manual process kdeinit5_shutdown to shutdown other processes.

Code:

/usr/bin/xprop:  unable to open display ':0'
"xprop" ("-root", "-remove", "KDE_FULL_SESSION") exited with code 1
/usr/bin/xprop:  unable to open display ':0'
"xprop" ("-root", "-remove", "KDE_SESSION_VERSION") exited with code 1
startplasma-waylandsession: Starting up...startplasma-waylandsession: Shutting down...
startplasma-waylandsession: Done.
qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
kf.init.klauncher: No D-Bus session-bus found. Check if you have started the D-Bus server.
kdeinit5: Communication error with launcher. Exiting!

qt.qpa.wayland: Failed to initialize EGL display 3001
qt.qpa.wayland: Failed to initialize EGL display 3001
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = drkonqi path = /usr/lib64 pid = 2164
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = drkonqi path = /usr/lib64 pid = 2163
KCrash: Arguments: /usr/lib64/drkonqi KCrash: Arguments: /usr/lib64/drkonqi --appname kdeconnectd --appname korgac --apppath /usr/lib64 --apppath /usr/bin --signal 6 --signal 6 --pid 1828 --pid 2059 --appversion 20.12.3 --appversi
on 5.16.3 (20.12.3) --programname --programname KDE Connect Daemon --bugaddress KOrganizer Reminder Daemon --bugaddress submit@bugs.kde.org submit@bugs.kde.org --startupid --startupid 0
0 KCrash: Attempting to start /usr/lib64/drkonqi

KCrash: Attempting to start /usr/lib64/drkonqi
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
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, webgl, xcb.

Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
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, webgl, xcb.


walecha 04-06-2021 05:05 AM

I'm usually running plasma wayland through sddm. But sometime I do it like this:
Code:

XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=KDE /usr/bin/dbus-run-session /usr/bin/startplasma-wayland

gildbg 04-06-2021 09:35 AM

Does not help, result is the same.

walecha 04-06-2021 08:39 PM

Why your desktop session is searching for org.freedesktop.locale1? Mine don't have org.freedesktop.locale1 and I believe Slackware does not have it by default.
Code:

$ gdbus introspect --system --dest org.freedesktop.locale1 --object-path /org/freedesktop/locale1
Error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.locale1 was not provided by any .service files
FAIL

$ qdbus | grep -i org.freedesktop
 org.freedesktop.secrets
 org.freedesktop.ScreenSaver
 org.freedesktop.PowerManagement
 org.freedesktop.PowerManagement.Inhibit
 org.freedesktop.Notifications
 org.freedesktop.portal.Fcitx
 org.freedesktop.portal.Desktop
 org.freedesktop.portal.Documents
 org.freedesktop.impl.portal.PermissionStore
 org.freedesktop.impl.portal.desktop.gtk
 org.freedesktop.impl.portal.desktop.kde
org.freedesktop.DBus

Correction: Plasma desktop is indeed searching for org.freedesktop.locale1

gildbg 04-07-2021 11:39 AM

The update from today does not fix the problem. Before writing, I had found a topic with a similar problem specifically for local1 again for Slackware and Alien had replied that it can be started already, but had not written that the problem was fixed.

LuckyCyborg 04-07-2021 11:51 AM

BTW, the systemd-localed which the Wayland/Plasma5 wants to contact via DBUS path org.freedesktop.locale1 have a stand-alone implementation:

https://github.com/pierre-labastie/blocaled

It is made for LFS, but probably could be adapted and packaged for Slackware.

Honestly I am also interested by this "elocaled" because it looks like a missing piece of Wayland/Plasma5 on Slackware.

gildbg 04-07-2021 03:09 PM

I try it, compiled both libdaemon from http://0pointer.de/lennart/projects/libdaemon/ and blocaled-0.3. With startplasma-wayland is not started. I got error Could not start D-Bus. Can you call qdbus? With startkwayland the error for locale1 is not appear, but on logout process still leaved and fire up cpu. I think something else is not work correct, because kdeinit5_shutdown and /usr/lib64/drkonqi is not loaded if I use startx.

gildbg 04-09-2021 12:48 AM

Hello,

here us update. I can start now startplasma-wayland without libdaemon and blocaled library witch does not not want to start with error:

Code:

not a reply org.freedesktop.locale1 QDBusMessage(type=Error, service="org.freedesktop.DBus", error name="org.freedesktop.DBus.Error.ServiceUnknown", error message="The name org.freedesktop.locale1 was not provided by any .service
files", signature="s", contents=("The name org.freedesktop.locale1 was not provided by any .service files") )

I use follow shell script.

Code:

#!/bin/sh

export QT_QPA_PLATFORM="wayland-egl"
export $(dbus-launch)
export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib64/qt5/plugins/platforms
export GDK_BACKEND="wayland"
#export WAYLAND_DEBUG="1"
/usr/bin/dbus-run-session  /usr/bin/startplasma-wayland --xwayland --exit-with-session=/usr/lib64/startplasma-waylandsession

The problem is after exit with Log out, leave the process /usr/bin/dbus-daemon --syslog --fork --print-pid 4 --print-address 6 --session and need to be killed manual. Don't know how to resolve this issue. Also I see in debug log file that Driver and GPU class is unknown, not no idea from where this is taken.

Code:

OpenGL vendor string:                  AMD
OpenGL renderer string:                AMD Radeon RX 6800 XT (SIENNA_CICHLID, DRM 3.40.0, 5.10.28, LLVM 11.1.0)
OpenGL version string:                  4.6 (Core Profile) Mesa 21.0.2
OpenGL shading language version string: 4.60
Driver:                                Unknown
GPU class:                              Unknown
OpenGL version:                        4.6
GLSL version:                          4.60
Mesa version:                          21.0.2
Linux kernel version:                  5.10.28
Requires strict binding:                no
GLSL shaders:                          yes
Texture NPOT support:                  yes
Virtual Machine:                        no


walecha 04-09-2021 09:50 AM

About the GPU log, it's just an informative log. As long as your GPU is using the correct driver, you can check using lspci -k, no worries. My intel haswell gpu is also labeled as unknown in GPU class.
Quote:

Originally Posted by gildbg (Post 6238851)
Code:

#!/bin/sh

export QT_QPA_PLATFORM="wayland-egl"
export $(dbus-launch)
export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib64/qt5/plugins/platforms
export GDK_BACKEND="wayland"
#export WAYLAND_DEBUG="1"
/usr/bin/dbus-run-session  /usr/bin/startplasma-wayland --xwayland --exit-with-session=/usr/lib64/startplasma-waylandsession

The problem is after exit with Log out, leave the process /usr/bin/dbus-daemon --syslog --fork --print-pid 4 --print-address 6 --session and need to be killed manual. Don't know how to resolve this issue. Also I see in debug log file that Driver and GPU class is unknown, not no idea from where this is taken.

About the dbus-daemon session, I think you should modified the script like this:
Code:

if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
  eval $(dbus-launch --sh-syntax --exit-with-session)
fi

exec /usr/bin/startplasma-wayland

Or just use
Code:

exec /usr/bin/dbus-run-session /usr/bin/startplasma-wayland
That way your 'exec' command will replace the bash script process and controlling the whole process (including the session dbus) until it exits.

gildbg 04-09-2021 01:16 PM

Thanks, that help but these processes again was leaved after exit. Оnce every 30 times happens as opposed to starting startkwayland each time. It's seems they crash for something and then is happened. I will try to look in forum if have kde5 group to ask them how to debug that problem.

Code:

user 1650 0.0 0.0 143492 19984 ? Sl 18:45 0:00 /usr/lib64/startplasma-waylandsession
user 1756 57.2 0.1 388452 34144 ? Sl 18:45 0:49 /usr/lib64/kactivitymanagerd
user 1790 107 0.1 276748 49776 ? Sl 18:45 1:32 /usr/lib64/kdeconnectd
user 1805 56.1 0.2 387124 66260 ? Sl 18:45 0:48 /usr/bin/korgac
user 2188 0.0 0.0 133740 13332 ? Sl 18:46 0:00 /usr/bin/kdeinit5_shutdown
user 2190 0.0 0.0 90300 27364 ? S 18:46 0:00 /usr/lib64/drkonqi -platform wayland --appname kdeconnectd --apppath /usr/lib64 --signal 6 --pid 1790 --appversion 20.12.3 --programname KDE Connect Daemon --bugaddr
ess submit@bugs.kde.org --startupid 0
user 2191 0.0 0.0 90300 27196 ? S 18:46 0:00 /usr/lib64/drkonqi -platform wayland --appname korgac --apppath /usr/bin --signal 6 --pid 1805 --appversion 5.16.3 (20.12.3) --programname KOrganizer Reminder Daemon
--bugaddress submit@bugs.kde.org --startupid 0
user 2192 0.0 0.0 90300 27388 ? S 18:46 0:00 /usr/lib64/drkonqi -platform wayland --appname kactivitymanagerd --apppath /usr/lib64 --signal 6 --pid 1756 --startupid 0
user 2193 0.0 0.0 69100 14476 ? S 18:46 0:00 /usr/bin/kdeinit5 --suicide
user 2194 0.0 0.0 69100 6492 ? Ss 18:46 0:00 /usr/bin/kdeinit5 --suicide
user 2195 0.0 0.0 89144 27580 ? S 18:46 0:00 /usr/lib64/kf5/klauncher --fd=8



All times are GMT -5. The time now is 10:47 AM.