Bug 2356051

Summary: DBus units activation is broken
Product: [Fedora] Fedora Reporter: Vitaly <vitaly>
Component: systemdAssignee: systemd-maint
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 41CC: daan.j.demeyer, dominik, fedoraproject, lnykryn, msekleta, ryncsn, suraj.ghimire7, systemd-maint, yuwatana, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-03-31 12:31:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vitaly 2025-03-30 09:41:59 UTC
DBus activation of systemd units is broken on Fedora 41+.

Trying to use the /org/freedesktop/systemd1/org.freedesktop.systemd1.Manager.StartUnit method throws an error "Interactive authentication required".

However, a Polkit window should appear asking for the user's password, just like when using "systemctl start unit.service" (without sudo).

Reproducible: Always

Steps to Reproduce:
1. Shut down the service you will use in testing. In this example I will use tuned.service: sudo systemctl stop tuned.service
2. Open terminal.
3. Run the following command:
dbus-send --system --print-reply --dest=org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager.StartUnit string:tuned.service string:replace
Actual Results:  
Error org.freedesktop.DBus.Error.InteractiveAuthorizationRequired: Interactive authentication required.

Expected Results:  
Polkit window should appear asking for the user's password.

Comment 1 Dominik 'Rathann' Mierzejewski 2025-03-30 10:21:49 UTC
Just running systemctl start tuned.service as regular user has the same issue. It did bring up a polkit auth dialog before.

Comment 2 Vitaly 2025-03-30 10:34:32 UTC
> Just running systemctl start tuned.service as regular user has the same issue.

It's strange. On my system (Fedora 41 + Plasma 6.3) `systemctl start tuned.service` shows a Polkit window.

Comment 3 Lukáš Nykrýn 2025-03-31 12:31:08 UTC
You can use busctl, which has support for polkit; I guess dbus-send does not have it. Anyway, this really does not look like a bug in systemd.

busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager StartUnit ss tuned.service replace

Comment 4 Vitaly 2025-03-31 12:42:45 UTC
> You can use busctl, which has support for polkit; I guess dbus-send does not have it. Anyway, this really does not look like a bug in systemd.

What about all other applications? The bug is not in dbus-send.

Just use any Dbus debuggers, like qt6-qdbusviewer. It will throw the same error: "Interactive authentication required".

Comment 5 Lukáš Nykrýn 2025-03-31 12:47:49 UTC
I guess they need to implement the support as well. This needs to be handled in the client, not on the systemd side.

Comment 6 Vitaly 2025-03-31 13:09:48 UTC
> I guess they need to implement the support as well. This needs to be handled in the client, not on the systemd side.

How? Do you have a link to the documentation? In Fedora 39 it works fine out of the box. In other Linux distributions too.

Comment 7 Vitaly 2025-03-31 13:37:07 UTC
Yes, looks like the BUS_MESSAGE_ALLOW_INTERACTIVE_AUTHORIZATION flag is required now. It is not set by default in latest systemd versions.

busctl with --allow-interactive-authorization=false will throw the same error:

$ busctl --allow-interactive-authorization=false call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager StartUnit ss tuned.service replace
Call failed: Interactive authentication required.