repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

Document Ironbar brightness logind requirement

a75b2ee27f8ec640f143bc571fce1bd85d2c1436

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (1)

ironbar/PLAN.md

Modified
387 387 - Brightness visible/readable in screenshots.
388 388 - No config/service errors.
390 +Known issue (scroll does not change brightness):
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.`
393 +- 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 +- 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:
396 + ```sh
397 + # Option A: udev uaccess for the backlight device (recommended, no root service needed)
398 + sudo tee /etc/udev/rules.d/90-backlight-uaccess.rules <<'EOF'
399 + ACTION=="add", SUBSYSTEM=="backlight", TAG+="uaccess"
400 + EOF
401 + sudo udevadm control --reload && sudo udevadm trigger
402 + ```
404 + ```sh
405 + # Option B: polkit rule for login1 SetBrightness
406 + sudo tee /etc/polkit-1/rules.d/10-brightness.rules <<'EOF'
407 + polkit.addRule(function(action, subject) {
408 + if (action.id == "org.freedesktop.login1.set-brightness" &&
409 + subject.local && subject.active) {
410 + return polkit.Result.YES;
412 + });
413 + EOF
414 + ```
416 + ```sh
417 + # Option C: uaccess group on the backlight files + add user to video group
418 + sudo chgrp video /sys/class/backlight/intel_backlight/brightness
419 + sudo chmod 664 /sys/class/backlight/intel_backlight/brightness
420 + sudo usermod -aG video oli
421 + ```
423 +- The agent does not run `sudo` and does not edit `/etc`. The user must pick one option and run it. After that, restart `ironbar.service` and physical scroll on the brightness module will change `intel_backlight`/brightness without a logind `NotYourDevice` error.
390 425 ### Step 9 — bindmode
392 427 Difficulty: easy-medium.