Skip to content

[Bug] Backlight slider stops updating live after control center is closed once #728

@TimERTy

Description

@TimERTy

Describe the bug
Backlight slider value does not update in real time after the control center has been closed and reopened at least once. First open after swaync start works; every subsequent open, external brightness changes (e.g. brightnessctl, XF86MonBrightnessUp/Down) no longer move the slider while the control center is visible. Volume slider works correctly in the same session.

Root cause
src/controlCenter/widgets/backlight/backlightUtil.vala:

  • Constructor creates the FileMonitor exactly once.
  • close() (on CC hide) calls monitor.cancel(). GLib FileMonitor is single-use; once cancelled it will not emit further changed signals.
  • start() (on CC show) calls connect_monitor() which only re-wires the changed callback onto the already-cancelled monitor. The monitor is never re-created, so no events fire.

To Reproduce

  1. Enable backlight widget.
  2. Open control center, press XF86MonBrightnessUp — slider updates.
  3. Close control center.
  4. Open it again, press XF86MonBrightnessUp — slider does not update (brightness itself does change).

Expected behavior
Slider updates every time, as the volume slider does.

Proposed fix
Recreate the FileMonitor in start() before connect_monitor(), or move monitor creation into connect_monitor() itself.

Desktop

  • OS: CachyOS (Arch)
  • swaync: 0.12.6-1.1
  • Compositor: Hyprland
  • Device: gmux_backlight (Apple T2 MacBook)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions