You are not logged in.

#1 2023-05-14 17:38:43

willey
Member
Registered: 2023-05-14
Posts: 5

[SOLVED] 30 seconds delay of app launching after login

I tried searching and found this topic similar to the problem I have: https://bbs.archlinux.org/viewtopic.php?id=285442. It feels like dbus problem but I don't see clear answer in the threads. I don't have xdg-desktop-portal-gnome installed at all. It used to work fine and a recent upgrade seems to lead to the change of behavior, but I'm not sure which upgrade.
Following seth's suggestion, here are the diagnostic results:

echo $DBUS_SESSION_BUS_ADDRESS

unix:path=/run/user/1000/bus

loginctl session-status

2 - wenjun (1000)
           Since: Sun 2023-05-14 12:47:01 EDT; 35min ago
          Leader: 925 (sddm-helper)
            Seat: seat0; vc1
         Display: :0
         Service: sddm; type x11; class user
         Desktop: KDE
           State: active
            Unit: session-2.scope
                  ├─925 /usr/lib/sddm/sddm-helper --socket /tmp/sddm-authdcc64b00-e2d4-4e2e-8ad0-e618f6b25696 --id 1 --start /usr/bin/startplasma-x11 --user wenjun
                  ├─941 /usr/bin/kwalletd5 --pam-login 6 8
                  └─942 /usr/bin/startplasma-x11

May 14 12:47:01 willeyfw sddm-helper[940]: pam_kwallet5: final socket path: /run/user/1000/kwallet5.socket
May 14 12:47:01 willeyfw sddm-helper[942]: Adding cookie to "/home/wenjun/.Xauthority"

ps aux | grep dbus

dbus         404  0.0  0.0  10280  5632 ?        Ss   12:46   0:01 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
cups         582  0.0  0.0  16048  6272 ?        S    12:46   0:00 /usr/lib/cups/notifier/dbus dbus://
cups         584  0.0  0.0  16048  6400 ?        S    12:46   0:00 /usr/lib/cups/notifier/dbus dbus://
cups         585  0.0  0.0  16048  6272 ?        S    12:46   0:00 /usr/lib/cups/notifier/dbus dbus://
cups         587  0.0  0.0  16048  6400 ?        S    12:46   0:00 /usr/lib/cups/notifier/dbus dbus://
cups         588  0.0  0.0  16048  6272 ?        S    12:46   0:00 /usr/lib/cups/notifier/dbus dbus://
cups         590  0.0  0.0  16048  6144 ?        S    12:46   0:00 /usr/lib/cups/notifier/dbus dbus://
cups         593  0.0  0.0  16048  6400 ?        S    12:46   0:00 /usr/lib/cups/notifier/dbus dbus://
wenjun       950  0.0  0.0   9152  4736 ?        Ss   12:47   0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
wenjun      1115  0.0  0.1 238928 24960 ?        Ssl  12:47   0:00 /usr/bin/gmenudbusmenuproxy
wenjun      3528  0.0  0.0  15348  2432 pts/3    S+   13:23   0:00 grep --color=auto --binary-files=without-match dbus

pacman -Qs 'flatpak|portal'

local/xdg-desktop-portal-kde 5.27.5-1 (plasma)
    A backend implementation for xdg-desktop-portal using Qt/KF5

journalctl -b: http://0x0.st/HN27.txt
I logged in to desktop at around 12:47:00

The dbus processes look suspicious but I have no idea. Thanks.

Last edited by willey (2023-06-11 00:47:17)

Offline

#2 2023-05-14 19:20:31

seth
Member
Registered: 2012-09-03
Posts: 54,177

Re: [SOLVED] 30 seconds delay of app launching after login

There's nothing outright suspicious in those outputs or the journal.
Except maybe

May 14 12:47:03 willeyfw systemd[927]: Started Proxies GTK DBus menus to a Plasma readable format.
May 14 12:47:03 willeyfw konsole_show_menubar[1169]: kf.i18n: KLocalizedString: Using an empty domain, fix the code. msgid: "Your emails" msgid_plural: "" msgctxt: "EMAIL OF TRANSLATORS"
May 14 12:47:03 willeyfw konsole_show_menubar[1169]: kf.i18n: KLocalizedString: Using an empty domain, fix the code. msgid: "Your names" msgid_plural: "" msgctxt: "NAME OF TRANSLATORS"
May 14 12:47:28 willeyfw konsole_show_menubar[1169]: Failed to register window menu, reason: org.freedesktop.DBus.Error.NoReply ("Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.")

Do you use a centralized menubar (like MacOS)?
Can you disable that?

Are all processes affected?
If not, which are? Which are not?

Is this repetitive or does it only take 25/30s once right after login and then the system behaves as expected?

Offline

#3 2023-05-17 04:28:38

willey
Member
Registered: 2023-05-14
Posts: 5

Re: [SOLVED] 30 seconds delay of app launching after login

Sorry for the delay.

I don't think I'm using centralized menubar. I'm using KDE and its menubar out of box.

It seems to impact KDE apps like Konsole. Firefox can open right away.

It's repetitive for each login. Once pass the 25/30s the system behaves as expected.

To give more details on the problem. After I put in password and login, the wallpaper and menubar show up. But the abnormal part is that the items on the desktop don't appear and the wifi icon seems to freeze on connecting. After 25/30s the desktop items will show up and wifi will connect. I was suspicious about the wifi but I have tried disabling networkmanager once and still had the same problem.

Offline

#4 2023-05-17 05:39:37

seth
Member
Registered: 2012-09-03
Posts: 54,177

Re: [SOLVED] 30 seconds delay of app launching after login

It's repetitive for each login. Once pass the 25/30s the system behaves as expected.
… the items on the desktop don't appear … After 25/30s the desktop items will show up and wifi will connect

So if you login and get a cup of coffee, everything's automatically fine when you return?

May 14 12:47:28 willeyfw konsole_show_menubar[1169]: Failed to register window menu, reason: org.freedesktop.DBus.Error.NoReply ("Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.")
May 14 12:47:28 willeyfw kioslave5[1231]: QObject::connect: No such slot DesktopProtocol::_k_slotRedirection(KIO::Job *, QUrl)
>>> May 14 12:47:29 willeyfw plasmashell[1056]: kde.keyboardlayout: "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
>>> May 14 12:47:29 willeyfw plasmashell[1056]: kde.keyboardlayout: "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
May 14 12:47:33 willeyfw systemd[1]: systemd-hostnamed.service: Deactivated successfully.
May 14 12:47:33 willeyfw kded5[989]: QProcess: Destroyed while process ("/usr/lib/kf5/kconf_update") is still running.
May 14 12:47:33 willeyfw kded5[989]: 
May 14 12:47:33 willeyfw kded5[989]: Delayed initialization.
May 14 12:47:33 willeyfw kded5[989]: Reloading the khotkeys configuration
May 14 12:47:33 willeyfw kded5[989]: Version 2 File!
May 14 12:47:33 willeyfw kded5[989]: true
May 14 12:47:33 willeyfw kded5[989]: Imported file "/usr/share/khotkeys/defaults.khotkeys"
May 14 12:47:33 willeyfw kded5[989]: Imported file "/usr/share/khotkeys/kde32b1.khotkeys"
May 14 12:47:33 willeyfw kded5[989]: Imported file "/usr/share/khotkeys/konqueror_gestures_kde321.khotkeys"

Do you use some IM (fcitx, ibus, …), https://wiki.archlinux.org/title/Input_method
Alternatively, https://bbs.archlinux.org/viewtopic.php … 5#p2096495 (though this typically crashes plasma)

Edit:
https://forum.kde.org/viewtopic.php?f=6 … 38#p324997

Last edited by seth (2023-05-17 05:41:45)

Offline

#5 2023-05-17 14:26:10

niamlir
Member
Registered: 2023-05-17
Posts: 1

Re: [SOLVED] 30 seconds delay of app launching after login

Switching to dbus-broker as suggested here on xdg-desktop-portal issues solved the issue on my side.

If you use sway, also remove any "exec dbus-update-activation-environment ..." calls in your .config/sway/config you may have added in the past (but keep the "include /etc/sway/config.d/*")

Offline

#6 2023-05-17 14:34:34

seth
Member
Registered: 2012-09-03
Posts: 54,177

Re: [SOLVED] 30 seconds delay of app launching after login

w/o xdg-desktop-portal-gnome and the effect limited to KDE applications, the OP (who's running KDE on X11) does likely not face https://bbs.archlinux.org/viewtopic.php?id=285590

Offline

#7 2023-05-20 14:34:32

willey
Member
Registered: 2023-05-14
Posts: 5

Re: [SOLVED] 30 seconds delay of app launching after login

Thanks for the help.

seth wrote:

So if you login and get a cup of coffee, everything's automatically fine when you return?

Yes, it's like a mandated cooldown period for me to meditate.

I do have IM (ibus). Now I have uninstalled ibus and related input method, commented out the variables in /etc/environment, but the problem persists.
I tried moving away the config files in .config suggested in the linked pages, installed dbus-broker and enable the service, still no luck.

The keyboard layout error can be relevant. I tried adding a new keyboard layout in the KDE setting and now I have an icon in the menu bar to change keyboard layout. When I reboot and login, the menu bar and my usual widgets (CPU/RAM/IO/thermal) show up and working except the new keyboard layout icon. That icon doesn't show up until after the 30s cooldown. What else could I try to troubleshoot? Thanks.

Offline

#8 2023-05-20 15:09:52

seth
Member
Registered: 2012-09-03
Posts: 54,177

Re: [SOLVED] 30 seconds delay of app launching after login

There's also https://bbs.archlinux.org/viewtopic.php?id=285887
If you run top and iotop on different VTs and switch to those during the delay, do they indicate some hot process?

Offline

#9 2023-05-25 14:30:08

willey
Member
Registered: 2023-05-14
Posts: 5

Re: [SOLVED] 30 seconds delay of app launching after login

Nope. I'm not very sure about what you mean by VT. If you mean consoles like ctrl+alt+f2, that's what I tried. It seems the GUI will not proceed when I switch to anther console. So I connect to network in the console and ssh from another machine to monitor with htop and see the GUI login in realtime. Either case I don't see any CPU or IO bottleneck. There is a burst of processes and then it seems to go into idle. After the cooldown time another quick burst of processes and the computer is idle again (and ready at that time).

Offline

#10 2023-05-25 15:24:37

seth
Member
Registered: 2012-09-03
Posts: 54,177

Re: [SOLVED] 30 seconds delay of app launching after login

Did you see the other thread about kglobalaccel and the spurious ~/.Xmodmap?

Offline

#11 2023-05-25 18:47:42

feramirez
Member
Registered: 2013-03-20
Posts: 3

Re: [SOLVED] 30 seconds delay of app launching after login

I'm using KDE on wayland and I was having the same symptoms, delayed launch of kde apps after login but not others like chromium. I tried with a newly created user and there were no delays.

I haven't seen the other thread about kglobalaccel and Xmodmap, but the idea of a spurious config made me go to System Settings, and tested going back to defaults configs in those that I've changed. The delay was gone after I revert a modification in "Titlebar Buttons". (I cannot reproduce the delay even with the original configuration in Titlebar Buttons.)

After comparing config files, the only change I found was in ~/.config/kconf_updaterc, new:

[konsole.upd]
ctime=1684189738
done=konsole_globalaccel,add-hamburgermenu-to-toolbar
mtime=1683717201

old:

[konsole.upd]
done=konsole_globalaccel

Offline

#12 2023-06-11 00:46:59

willey
Member
Registered: 2023-05-14
Posts: 5

Re: [SOLVED] 30 seconds delay of app launching after login

Thanks! Resetting the Titlebar Buttons solves the problem for me too. I added the hamburger menu to the title bar, that might be the bug, but somehow can't be triggered after reset.

Offline

#13 2023-09-07 20:53:52

MAYBL8
Member
Registered: 2022-01-14
Posts: 236

Re: [SOLVED] 30 seconds delay of app launching after login

This solved my issue also. Had the same problem

Offline

#14 2023-09-07 22:57:21

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] 30 seconds delay of app launching after login

Closing this old solved topic.

Offline

Board footer

Powered by FluxBB