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.
Just running systemctl start tuned.service as regular user has the same issue. It did bring up a polkit auth dialog before.
> 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.
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
> 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".
I guess they need to implement the support as well. This needs to be handled in the client, not on the systemd side.
> 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.
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.
Found: https://doc.qt.io/qt-6/qdbusabstractinterface.html#setInteractiveAuthorizationAllowed Thanks.