Commit 169d398b authored by David Edmundson's avatar David Edmundson
Browse files

egister Secret Agent on startup

Plasma NM's KDED is loaded on boot, but effectively does nothing until
the relevant plasmoid triggers the KDED.

This makes some sense for notifications and monitors, as it allows a
user to opt of a UI plasma network manager experience.

However, we want the secret agent as early in the boot as possible.
If a user is running NM, they definitely want this component active, and
if NM isn't running then registering the agent will no-op anyway.

DBus logs show that with this patch, I am retrieving my password and
a full 1500ms before org.kde.plasmanetworkmanagement.init is called and
my initial wifi
connected 3s faster than before this patch.

We could potentially move this kded to phase 0 and get us even earlier.

Test Plan:
Had a wifi with security set to "Store password for this user only"
Added dbus-monitor into my startup scripts

Logged in, wifi connected, logs showed a difference

Reviewers: #plasma, jgrulich!

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 429aaa6f
......@@ -53,6 +53,9 @@ NetworkManagementService::NetworkManagementService(QObject * parent, const QVari
connect(this, &KDEDModule::moduleRegistered, this, &NetworkManagementService::slotRegistered);
d->agent = new SecretAgent(this);
connect(d->agent, &SecretAgent::secretsError, this, &NetworkManagementService::secretsError);
......@@ -64,11 +67,6 @@ void NetworkManagementService::init()
if (!d->agent) {
d->agent = new SecretAgent(this);
connect(d->agent, &SecretAgent::secretsError, this, &NetworkManagementService::secretsError);
if (!d->notification) {
d->notification = new Notification(this);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment