On 7/23/24 1:46 AM, Andrei Borzenkov wrote:
busctl call org.freedesktop.login1 /org/freedesktop/login1/session/auto org.freedesktop.login1.Session SetBrightness "ssu" "backlight" "amdgpu_bl0" 4711 ```
or appropriate bindings for the language you are using.
See
https://www.freedesktop.org/software/systemd/man/latest/org.freedesktop.logi...
for details.
Andrei, Replacing the system ("busctl ...") with an implementation through dbus/dbus.h, after I get the DBusMessage pointer for the SetBrightness method, how do I then form the message with the data parameters, e.g. "ssu backlight acpi_video0 10" (or whatever the backlight value is) Is this a separate dbus call? The dbus_message_new_method_call() method only takes the method name without additional parameter information. If I attempt to include the parameter info, it throws the error _dbus_check_is_valid_member (method)? I can form the message with: dbus_msg = ::dbus_message_new_method_call ("org.freedesktop.login1", "/org/freedesktop/login1/session/auto", "org.freedesktop.login1.Session", "SetBrightness"); but what do I do with the dbus_message_new_empty_header() returned by that call? https://dbus.freedesktop.org/doc/api/html/group__DBusMessage.html#ga98ddc824... How do I finish sending the "ssu backlight acpi_video0 10" argument info? The doxygen documentation is a bit light on explanation. -- David C. Rankin, J.D.,P.E.