Bug 2356051 - DBus units activation is broken
Summary: DBus units activation is broken
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 41
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-03-30 09:41 UTC by Vitaly
Modified: 2025-03-31 13:40 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-03-31 12:31:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.