Skip to content

Battery module interval sometimes doesn't work #5253

Description

@BBaoVanC

Describe the bug
Sometimes the battery module will just continuously update multiple times a second, ignoring the configured interval (or default 60 seconds).

To reproduce
I have no idea, it just happens sometimes. I don't see any errors or warnings in the log and haven't found any specific condition to cause it. Once it starts happening, it keeps doing it for a while even if I restart waybar.

// vim: ft=jsonc
{
    "height": 30,
    "spacing": 4,
    "position": "top",
    "layer": "bottom", // prevent covering up floating windows

    "reload_style_on_change": true,

    "modules-right": [
        "battery",
    ],
    "battery": {
        "states": {
            "warning": 30,
            "critical": 15,
        },
        "format": "{icon} {capacity}% {power:.3g}W",
        "format-charging": "󰂄 {capacity}% {power:.3g}W",
        "format-plugged": " {capacity}%",
        "format-alt": "{icon} {time} ({power:.2g}W)",
        // "format-good": "", // An empty format will hide the module
        // "format-full": "",
        "format-icons": ["", "", "", "", ""],
    },
}

Expected behaviour
The battery module should respect the interval set in the config.

Environment

  • Waybar version (waybar --version): v0.15.0
  • Installed from (distro package / source / other): Arch Linux package
  • Compositor and version (Sway, Hyprland, River, …): niri 26.04 (8ed0da4)

Debug output
Run waybar -l debug and paste any relevant output:

Nothing really relevant, other than the "Discharging" spam (which coincides with the updates) due to another bug. It does say the interval is correct though:

[2026-08-13 22:35:32.377] [debug] battery: worker interval is 60000

Additional context
Anything else that might help.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions