- Remove check for kded and confupdate stages in SplashApp, those setStage()
calls were removed a long time ago[1]
- Rename 'kinit' stage to 'startPlasma', since it's called from startplasma
- Remove startKDEInit(), it was declared but not defined anywhere, most
likely left-over from a previous refactor.
https://phabricator.kde.org/R297:185afa8a3af8002172d8f5d6aa08c57244422a12
Previously the call to ksplash was being emitted by plasma-session. This
isn't used in the systemd startup so it was introduced in a somewhat
messy script.
This script has an issue:
If ksplash is disabled the bus name won't be registered. Typically this
isn't an issue. However to avoid a race condition ksplash registers
itself as being DBus activatable, so that the dbus server holds
dispatching the message.
This combo means ksmserver our unit is considered as not running until
our script times out. This then defers other things in the chain that
depend on ksmserver.
Moving the call into the relevant piece of code into ksmserver unifies
things into a single path and gives us more control.
BUG: 432364
We want to last until all jobs are finished and the notification sound
thread has finished. The design intention was to let QEventLoopLocker
handle all of it implicitly, but that doesn't work when we call quit
explicitly.
BUG: 422948
The initial comment about disabling quitLock is deprecated since we
added a QCoreApplication around the startup.
We can then use Qt's mechanism to delay application exit till the
notification thread finishes.
This presumably has been a bug for a while, but noticable in 5.19 after
even more startup performance improvements.
BUG: 422948
(cherry picked from commit ef4b84869612318ecb3cec44bd6c713ad545114f)
Summary:
plasma-session goes to great lengths to make sure we have the latest env
vars from kcminit in future spawned jobs.
However one part got broke in some refactor, we capture the system
environment when we make the job, not when we're about to launch.
This means potentially kded5 and ksmserver wouldn't have the envs
kcminit set.
I've not noticed any practical impact from this.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28626
Summary:
This was a deliberate decision to remove this in
c673a83226
The logic being that kdeinit should auto launch itself if required.
In practice this exposes a presumably pre-existing bug in kdeinit
autostarting where the env is not set correctly.
Test Plan:
qdbus org.kde.klauncher5 /KLauncher org.kde.KLauncher.exec_blind /opt/kde5/bin/kate ""
kate opened
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27868
Summary:
Currently startplasma spawns plasma-session then sits around waiting for
that to finish
plasma-session spawns all the startup then also just sits around doing
nothing
This patch makes plasma-session spawn all the startup and then quit.
It also splits the owner of the org.kde.shutdown interface to be on
demand. plasma-shutdown asks ksmserver to quit and then if applicable
runs the shutdown scripts or not.
Startplasma then knows when to exit by monitoring the DBus service
status directly.
The benefits are that we save some resources by not needing
plasma-session lingering about.
It also means the shutdown interface is re-usable as-is when the pending
systemd startup method is used.
Test Plan:
Logged in and:
- ran killall ksmserver, session ended as before
- logged out and cancelled due to unsaved changes
- logged out and completed logout
- logged out and rebooted
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27629
Summary:
If for some reason a service is started before StartServiceJob runs, we
will end up blocking forever.
Test Plan: Logged in
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27471
Summary: Load only once and share
Test Plan: Restarted. Also made a small test app that I'll submit once this is in as it depends.
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D23719
This allows new startup procedures to use a session manager and also
allows us to slowly replace the session manager without breaking plasma.
Following on from the previous refactor, Startup and Shutdown are moved
from kmserver and the previous calls into KSMserver are replaced with
DBus calls.
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D21995
Summary:
KSMServer has two modes, the slightly ancient mode (XSMP), and the
really ancient legacy mode (XSM).
When startup was rewritten in 96a595f1b8
we accidentally dropped the call that invokes restore of the legacy
session as well as the normal mode.
BUG: 404318
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D19028
Summary:
We don't need to introspect at runtime as KDED installs the interface
XML file.
Oddly KDED's package is called KDED not KF5KDED, hence the separate
find_package, I don't know if that's a bug in frameworks or not.
Test Plan: Compiles
Reviewers: #plasma, romangg
Reviewed By: #plasma, romangg
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16628
Summary:
kcminit had a slot to start processing something and a signal to emit
when it's finished.
For DBus that's quite bad practice as it can leave you hanging in the
case of a kcminit crashing. It's better to use the return of the
original call to signal when something is done.
From ksmserver we can then just use DBus timeouts set on the interface
than a secondary timer.
We also remove a pointless blocking call to kcminit introspecting
everything, if kcminit is not running it will return with an error
immediately which is no slower than checking first if it's not running
and faster if it is.
Test Plan:
Logged in
Session logs showed kcminit ran
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: zzag, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16587
Summary:
The old code checked ksmserver->defaultSession in the Startup
constructor before ksmserver was set up by main.cpp
This refactor moves it to the job, so we'll be checking if we're
restoring or not after ksmserver has been set up by main.cpp as well as
making the initial code path a bit clearer.
Test Plan:
Logged in with session restore
Logged in with a default session
Reviewers: ahartmetz
Reviewed By: ahartmetz
Subscribers: ahartmetz, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16550
Summary:
The code is effectively 3 startup phases each of which has some parallel
methods that need to be complete before moving onto the next phase.
The old code had a tonne of methods all of which tracking what state
we're in and trying to start the next method in the chain handling
things out of order.
This simplifies everything into 3 composite kjobs. A lot more classes,
but each one tiny with the flow more readable.
Code should be effectively the same. The startup sound is moved ever so
slightly earlier to be when phase 2 starts rather than just after
kcminit2 finishes (midway through the old phase 2), but no significant
behavioural changes here.
Test Plan: Logged in with session restore and without
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: apol, broulik, anthonyfieroni, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16231
Summary:
Everything related to Plasma startup goes in Startup everything relating
to X session management stays in KSMServer. Restoring the window
manager currently stays inside ksmserver as it passes the session ID as
an argument and at various points checks if something the client is the
WM.
Relevant methods move to server.cpp to keep one class per cpp file.
KSMServer gains some signals as it can no longer call the startup methods
directly to continue the process.
This is part of a cleanup series in ksmserver. (The friend class will disappear
in the next commit)
Behaviour should remain identical.
Test Plan: Logged in on X
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16225
Summary:
ksmserver autostart had a system where processes, such as plasma, could
block the startup phase from moving on.
It is currently entirely unused.
It's very difficult to use properly, plasmashell has to block startup
before ksmserver moves on to phase 1. Racey at best.
I did hack it to work, and it does make a surprising positive
improvement to bootup. Worth exploring the idea properly, but implemented
better.
We should be able to get the same results by
blocking and waiting for the DBus name in the autostart desktop file to
become registered rather than having a ksmserver-specific solution.
Test Plan: Compiles, can still login
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16042
Since Phonon 4.9, this code fails to play a login sound if the sound
file is specified as absolute file path (without "file://"). The reason
is that QUrl() treats the parameter as Url (not as file path), and this
only accidentally worked with earlier Phonon versions but not any more.
This patch uses QUrl::fromUserInput() instead to create a QUrl from the
string in the settings file, which fixes the problem.
This is the same change as
https://phabricator.kde.org/R289:9db06adc8114163f401417064b07772139bc36bc
in knotifications.
A more detailed explanation of the problem can be found in
https://bugs.kde.org/show_bug.cgi?id=337276#c12 .
BUG: 392725
FIXED-IN: 5.12.5
Differential Revision: https://phabricator.kde.org/D12606
Summary:
It's an overly slow call and it gets in the way on a process that needs
to be responsive
Test Plan: Still boots
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9090
Merge commit 6e6f1beda4 appeared
to not include the headers included in the original revert in
the 5.8 branch, causing stable branch build failures on Neon,KDE
and Kubuntu CIs. So add these back to 5.9 branch.
KRun::runApplication will show blocking error dialogs if it fails to
find the executable
This means we don't autostart the next app, which could be fatal if it
comes before...
Summary:
...kwin/plasma
We shouldn't be having blocking calls in ksmserver it can deadlock
And even in the best case we'd still end up blocking ksplash for 30
seconds
We then port to KProcess which was part of the motivation behind the
patch as it
has better stdout handling
This reverts commit 0f19e92f3e.
BUG: 379254
Also added port of autostarting applications to KProcess
It has better stdout handling
Test Plan: Logged in, still got my main session
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5618
Follow-up to the previous commit. KProcess has saner defaults for simply
launching an app and being done with it, no lost stdout/stderr or even SIGPIPE.
CCBUG: 369391
CCBUG: 370528
The "move" (copy in fact) of the autostart code from klauncher simply
switched to QProcess. This resulted in a number of problems, as the incorrect
handling of .desktop file command if it had placeholders (worked around
already), kdeinit is no longer used (not sure how much that matters nowadays)
and finally QProcess simply eats all stdout/stderr of all such processes
(which, when daemonized, can lead even to the processes getting SIGPIPE'd).
If the application to start is a KService, simply launch it as such.
BUG: 369391
BUG: 370528
Normally kWin is launched simply as "kwin" ("kwin_x11", whatever), but
in some cases it's restart command may be "/usr/bin/kwin", most notably
when KWin restarts itself after a crash. Failing to recognize this client
as the WM leads to KWin starting without any session management restoring.
CCBUG: 377756
Follow-up to the previous commit. KProcess has saner defaults for simply
launching an app and being done with it, no lost stdout/stderr or even SIGPIPE.
CCBUG: 369391
CCBUG: 370528