Bug 473860 - Apps should autostart only after Plasma has finished launching
Summary: Apps should autostart only after Plasma has finished launching
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Startup process (show other bugs)
Version: 5.27.7
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-28 15:48 UTC by Henning
Modified: 2024-01-13 18:30 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henning 2023-08-28 15:48:50 UTC
I have following autostart programs:
- Dolphin RPM
- Nextcloud RPM
- Mullvad VPN RPM
- Thunderbird Flatpak
- Libreoffice Flatpak
- qBittorrent Flatpak
- Signal Desktop Flatpak
- SyncThingy Flatpak

What happens when logging in (exiting SDDM) is:
- Dolphin loads
- The Flatpak apps load 
- The plasma panel shows up reeeallly slow
- The apps finish loading

This means that I have apps display before the Plasma panel and all the menus are even there. The Apps have SSD decorations, thats all I can see of "Plasma"

The Panel also loads really slow, the elements fly in and it stutters a bit.

The whole result doesnt look responsive and modern at all.

PROPOSAL
1. Have Plasma load privileged. So until plasma is not fully loaded, no apps start. This should be settable with a setting though, for example a VPN service may be wanted to start privileged
2. Have the option to add some delay, using a slider for example. 

I simply edited the .desktop entries in ~/.config/autostart and added "sleep 5 && " before the command in "Exec="

I will report the result

--- Software ---
OS: Fedora Linux 38.20230828.0 (Kinoite)
KDE Plasma: 5.27.7
KDE Frameworks: 5.109.0
Qt: 5.15.10
Kernel: 6.4.12-200.fc38.x86_64
Compositor: wayland

--- Hardware ---
CPU: AMD Ryzen 5 PRO 3500U w/ Radeon Vega Mobile Gfx
RAM: 13.5 GB
GPU: AMD Radeon Vega 8 Graphics
Video memory: 2048MB
Comment 1 Nate Graham 2023-08-28 19:38:55 UTC
> So until plasma is not fully loaded, no apps start
If we did this, I strongly suspect people would complain about it and say that their autostart apps show up too slowly and it looks bad.

That said, it would automatically bug Bug 323151, Bug 467619, Bug 462735, and Bug 416265, so it may be worth doing anyway.
Comment 2 Henning 2023-08-28 21:58:19 UTC
323151 sounds pretty important
467619 is an app issue but also useful


416265 this is basically my bug.

So the quick solution (as I tried to phrase it) would be to simply give Plasma the privilege to start first. Currently apps have this, it would really not be a problem. But then the question, what should start first and in what order?

Network
Plasma Panel
privileged autostart services/Apps
autostart scripts
autostart apps

maybe?
Comment 3 Henning 2023-08-30 10:16:30 UTC
Edit: I tried two things and both fail for some reason:

1. I edited the desktop entries in the autostart folder and added "sleep 10" in front of the line in the "Exec=" line. They didnt launch at all.

2. I created a script that simply runs all the apps and has sleep commands in between. Made it executable, enabled in the systemsettings page to create the desktop entry, but no apps starting too???

I am very confused. These are both manual workarounds, but they should work?
Comment 4 Henning 2023-08-30 10:17:33 UTC
sorry, bad wording.

1. example: "Exec=sleep 10 && COMMAND"

2. example
#!/bin/bash

COMMAND

sleep 3
COMMAND

sleep 5 
COMMAND

depending on when the apps should run
Comment 5 Nate Graham 2023-08-30 16:26:35 UTC
Adding sleeps is a workaround that we won't support upstream. Fixing this will require code changes to adjust the ordering of how things are started.