Skip to content

Backlight module: Extreme I/O flooding when interval is not explicitly set #5020

@SanikSun

Description

@SanikSun

After the recent update, I noticed that the backlight module causes excessive file system activity. Using fatrace, I observed that Waybar constantly opens/closes the root directory and backlight paths multiple times per second.

This behavior occurs even when the brightness isn't being changed. It seems like the module is stuck in a loop or polling too aggressively.
my settings:
"backlight": {
"scroll-step": 5,
"min-length": 3,
"tooltip": true,
"tooltip-format": "{percent}% {icon}",
"device": "acpi_video1",
"format": "{icon}",
"format-icons": [ "󰽤","󰪞", "󰪟", "󰪠", "󰪡", "󰪢", "󰪣", "󰪤", "󰪥"],
"on-click-middle": "sh -c '[ $(cat /sys/class/backlight/acpi_video1/brightness) -lt 10 ] && brightnessctl -q -d acpi_video1 set 100 2>/dev/null || brightnessctl -q -d acpi_video1 set 5 2>/dev/null'"
},

Log Example (recorded within just 1 second)
➜ sudo fatrace -f CW
waybar(175830): CO /
waybar(175830): C /
waybar(175830): C /
waybar(175830): CO /
waybar(175830): C /
waybar(175830): C /
waybar(175830): CO /
waybar(175830): C /
waybar(175830): C /
waybar(175830): C /
waybar(175830): CO /
waybar(175830): C /
waybar(175830): C /
Environment:
OS: Manjaro Linux (Kernel 6.18 LTS)

Hardware: Laptop with acpi_video0 / acpi_video1 backlight interfaces

Waybar Version: v0.15.0

Workaround:
Setting "interval": 10 (or higher) in the config stops the flood, but the default behavior (without a set interval) is causing significant I/O overhead.

Sorry, this is my first post on GitHub and my English is poor. I am using a translator, but the logs speak for themselves

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions