PowerSifu 0.3.5 drops polling in favour of D-Bus event-driven power management
PowerSifu, a free GTK tray application for Ubuntu and Debian, manages laptop power profiles by switching settings when AC power status changes and adjusting brightness accordingly. Early versions polled system state every five seconds, waking the CPU unnecessarily even when nothing had changed — a counterproductive design for a tool meant to reduce power consumption. Version 0.3.5 replaces this with persistent D-Bus proxies that subscribe to real-time property-change notifications from UPower and power-profiles-daemon, triggering callbacks only when the power source or active profile actually changes. A lightweight 60-second reconciliation check is retained as a safety net to catch missed signals or service restarts, but it is not the primary monitoring mechanism. Weekly schedule checks were also decoupled from the main loop, now sleeping until the next minute boundary and firing once, with the timer disabled entirely if no schedules are configured.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in