repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

Stage polkit rule for login1 SetBrightness; note A insufficient on greeter seats

3808b202ce15d9cd54c29b620a8310f779c71652

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (2)

ironbar/PLAN.md

Modified
390 390 Known issue (scroll does not change brightness):
392 392 - `ironbar.service` runs under the user manager, so the process is in a sessionless scope. Ironbar's `systemd` brightness backend calls `org.freedesktop.login1` `SetBrightness`, which is rejected with `org.freedesktop.login1.NotYourDevice: Session is not in foreground, refusing.`
394 +Note (Option A may not be enough on multi-seat/greeter installs):
396 +- On this host the seat's `ActiveSession=4` is the greeter (Type=wayland, Class=greeter) and the user session 5 is `Idle=yes`. udev `uaccess` flips the device to whichever session holds the seat, not the user session ironbar runs in. After applying Option A, `SetBrightness` still returned `NotYourDevice`. Use Option B for this seat layout, or also configure the seat to bind the user session as active.
393 397 - Root cause is session ownership, not config: the seat's `ActiveSession` is the greeter and the user session shows `Idle=yes`, so logind does not grant the unit foreground status.
394 398 - The Ironbar config is already correct (`mode.type = systemd`, `smooth_scroll_speed = 0.5`); changing it cannot fix this. The fix is host-side, requires root, and the agent cannot apply it. One of the following must be run by the user:

polkit/10-brightness.rules

Added
new file mode 100644
1 +polkit.addRule(function(action, subject) {
2 + if (action.id == "org.freedesktop.login1.set-brightness" &&
3 + subject.local && subject.active) {
4 + return polkit.Result.YES;
5 + }
6 +});