Skip to content

power-profiles-daemon module fails to initialize on cold start despite service readiness (a race condition?) #4959

@silencespeakstruth

Description

@silencespeakstruth

The power-profiles-daemon module fails to appear in Waybar during the initial launch of the compositor (Hyprland). It only becomes visible after a manual restart of Waybar (killall waybar && waybar). This persists even when the system daemon is confirmed to be active and the D-Bus interface is reachable before Waybar starts.

I have implemented several systemd overrides to ensure the service is fully "baked" before the bar starts:

[~] λ> cat .config/systemd/user/waybar.service 
[Unit]
Description=Waybar status bar
After=graphical-session.target
Requires=dbus.socket

[Service]
ExecStartPre=/usr/bin/gdbus wait --system net.hadess.PowerProfiles
ExecStart=/usr/bin/waybar
Restart=on-failure

[Install]
WantedBy=graphical-session.target

This works with exec-once = /usr/bin/systemctl --user waybar.service

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions