Laptop on battery
Runtime you can feel
The lower the charge, the sooner Dozed acts. At half charge it waits half as long, and at 10% a five-minute rule fires after thirty seconds.
Dozed · Version 0.1 · Linux
Dozed freezes the apps you are not looking at, so they stop waking your CPU, and thaws them the instant you switch back. Your Linux desktop runs cooler and quieter, and a laptop lasts longer on battery.
A time-lapse of six apps on one Linux desktop. The app in front keeps running. Hidden apps count down a grace period, then Dozed freezes the idle ones and caps the chat apps at 5% of a core. An app that is playing music and a terminal running a build are left alone. Switching back to a frozen app thaws it at once.
The problem
A chat app you minimised an hour ago is still running timers, redrawing and polling, sometimes hundreds of times a second. Each wakeup pulls the CPU out of its deepest sleep, so the machine never really rests. It stays warm, the fan runs, and the battery drains for work nobody asked for.
Dozed counts wakeups rather than CPU use. A busy core is usually a build or an export you started. A hidden app that keeps waking up is the waste.
One hidden app keeps waking it
The same app, dozing
Laptop on battery
The lower the charge, the sooner Dozed acts. At half charge it waits half as long, and at 10% a five-minute rule fires after thirty seconds.
Laptop plugged in
A wasted wakeup costs the same power from a charger. Dozed still acts when plugged in, with twice the patience.
Desktop
A desktop is never unplugged, rarely suspended and often left overnight with a browser and a chat client open.
The film
Turn the sound on. Every click is one wakeup, so you can hear what a hidden app does to your CPU, and what it sounds like once Dozed has frozen it.
Every click in the film is one wakeup. The 165 wakeups a second falling to 0 at the start is the measured figure, played at real speed. The six apps are a time-lapse with illustrative rates, and their total is the sum of those rates.
Try it
Six apps on one desk, with a minute passing every second. Bring another app to the front from the taskbar and see what Dozed decides about the ones left behind. It starts in dry-run, as the real one does.
Dry-run, the default. Dozed is only taking notes. Bring another app to the front and wait.
No decisions yet. Hidden apps are still inside their grace period.
The wakeup rates here are illustrative, and the model is simplified: the real one also waits four times longer while you are typing, and backs off for apps you keep coming back to. The rules, timings and output formats are the ones Dozed ships.
Proof
We could print a battery percentage here and ask you to believe it. Dozed measures your machine instead, with your apps, and tells you what it finds before it touches anything.
Dozed starts in dry-run. It watches which apps are hidden, works out what it would have done, writes that down and touches nothing.
$ systemctl --user enable --now dozed.service
After a day, the report lists every app it would have held, for how long, and the wakeups and CPU time that would have been avoided, sampled from the real processes.
$ dozectl report
A trial alternates live and dry-run in randomised pairs while the desktop is idle and compares the actual battery discharge. On a desktop it can judge by the CPU's own energy counter instead.
$ dozectl trial start
Going live is one command, and there is no way to get there by accident. An app you are unsure of can stay in monitor mode while the rest run live.
$ dozectl mode live
Over the last 24h, dozed would have:held 6 apps for a total of 4h12m of app-time — 3h30m frozen, 42m throttledsomething was held for 2h51m of that window; apps overlap, so thetotal above counts each one separatelyavoided ~310 CPU-seconds and ~2.1M wakeupscom.slack.Slack 1h40m ~ 120 CPU-s ~890k wakeupscom.discordapp.Discord 1h2m ~ 74 CPU-s ~610k wakeups...
The trial can say
“measured saving”
A number with a confidence interval, claimed only when the interval excludes zero and p is under 0.05. Six live and dry-run pairs is the fewest that can get there, so a trial takes an evening.
The trial can say
“no measurable difference”
Printed just as plainly, with the sign, when your machine does not show a saving. A tool that can only report good news is not measuring anything.
Safety
A frozen music player is a fault you notice and fix in a second. A frozen microphone is one only the people on the call can hear. So every one of these is a watched signal, and each ships as a named rule you can read.
An app that is playing sound keeps running, hidden or not.
audio-exempt
Calls, dictation and recorders are left alone for as long as they hold the mic or the camera.
capture-exempt
The app doing the sharing is exempt, and so is every window that was on screen when the share began.
screencast-exemptshared-window-exempt
Whatever has the whole screen is never held.
fullscreen-exempt
A terminal with a live child process is doing work you asked for. So is anything that has asked the system not to sleep.
long-job-exemptinhibitor-exempt
Virtual machines, containers, Syncthing, Nextcloud, Dropbox, torrent clients and backup tools ship on a never list.
never-vm-container-sync
KeePassXC, Bitwarden and 1Password stay ready to fill, and an authentication prompt is never frozen under you.
never-password-managersnever-security-prompts
RustDesk, AnyDesk, TeamViewer, VNC and RDP are capped and never frozen, so the machine stays reachable.
throttle-remote-hoststhrottle-remote-clients
Only hidden apps are candidates: minimised, on another workspace or fully covered. A visible window is left alone unless you opt that one app in.
freeze_visible = false
And when something goes wrong
These are in the code, so no config file can switch them off.
The session itself is off limits.
The compositor, systemd, D-Bus, PipeWire and the portals are refused at the last step, whatever a rule says.
If the daemon stops, everything thaws.
On a clean exit, a crash or a kill. The held set is written to disk before each freeze, and the next start releases anything left over.
Before the system suspends, everything thaws.
Timers reset on wake, so a night asleep does not count as eight hours hidden.
If it loses sight of your windows, it lets go.
A compositor helper that stops answering means nothing stays held.
One command undoes it all.
dozectl thaw --all ignores every rule and the mode. The same button is in the tray menu.
Only your own processes.
Dozed never touches a process owned by another user, and never asks for root.
Actions
A frozen chat app drops its connection and reconnects when it thaws. So Dozed has a ladder, and each rule picks its rung.
Rung 01
action = { throttle = 5 }
A hard CPU limit, set through systemd. A chat app stays connected and still notifies you. It just cannot spin.
Measured A busy loop under a 5% cap used 4.97% of a core, down from 100%.
Rung 02
action = { throttle-to = 50 }
Say how many wakeups a second an app is worth and the cap moves until it gets there. It never goes below 5%, and it says so when capping is not moving the rate.
Rung 03
action = "freeze"
The kernel's cgroup freezer stops the whole app at once. Where an app has no cgroup of its own, Dozed stops its process tree instead.
Measured 165 wakeups a second went to 0, and came back at 163 on thaw.
Rung 04
action = { doze-cycle = { every = "15m", wake = "20s" } }
Frozen, then let up for a moment on a schedule shared with every other app doing the same, so they all reconnect in one burst. Stopped for 98% of the time.
Measured by the Dozed developers on KDE Plasma 6.6.6 with Linux 7.1. Every figure on this page comes from one or two machines, and yours will differ. That is what dozectl trial is for.
Tuning
How long an app must stay hidden before Dozed acts is one multiplication, and aggression is the only term you need to touch. Plugged in, the wait doubles. On battery it shrinks with the charge, so a nearly flat laptop acts in seconds.
The arithmetic is printed wherever a decision is, so you can check it instead of trusting it. Drag the charge and pick a cell.
$ dozectl why firefox
grace 5m (base 5m x battery 1.0 x activity 1.0)
For the catch-all rule, which is what most apps hit. Prefer a window? The dashboard has every setting with its explanation beside it.
Explainable
Rules are plain TOML. The first match wins, by explicit priority, and there is no scripting language. That constraint is what lets every action map to exactly one named rule, including when the answer is that nothing happened and here is the rule that is counting down.
[[rule]]name = "chatty-apps"priority = 50# capped, Slack stays connectedaction = { throttle = 5 }[rule.match]app = ["slack", "com.slack.Slack"][rule.when]visibility = "hidden"for = "2m"
slack (desktop=slack)state throttledvisibility hiddenmode livebecause hidden for 2m, grace 1m36s (base 2m x battery 0.8 x activity 1.0)rule chatty-appsgrace 1m36s (base 2m x battery 0.8 x activity 1.0)for 2mobserved hidden idle-present on-battery 80% cpu 8.1% wakeups 900/sidentity desktop=slackrules (-> decided, * would match but outranked)-> 50 chatty-apps matched* 100 bg-idle matched, but a higher-priority rule won
Footprint
Something that can stop your applications should be small, visible and easy to remove.
Unprivileged
The installer puts everything under your home directory, and --uninstall takes every piece back out while leaving your config and recordings alone.
Private
No account, no telemetry and no update check. There is no network code in it: Dozed talks to your session bus and one local socket.
Rust
All five crates forbid unsafe Rust. The decision logic is a pure function with no I/O, so a recorded day can be replayed against a new config.
Measured
dozectl status prints the daemon's own wakeups per second. Across 135 real runs, systemd counted it using between 0.03% and 0.89% of one core.
Quiet
It says what dozing has been worth, and that is the only one. A tray icon shows what is held, with snooze and thaw one click away.
Honest
Each safety signal is listed in dozectl status as reporting, unavailable here, or degraded because a utility is missing, with the package named.
The command line
The tray icon
There is a dashboard too, dozed-gui, with a live timeline, per-app control and a config editor whose save button stays disabled while the file would not parse.
Dozed 0.1 builds from source in a few minutes and runs as your own user. Nothing is held until you switch it to live.
# Build and install for your user. No sudo.$ git clone https://github.com/amazynk/dozed.git && cd dozed && ./packaging/install.sh# Start it. It begins in dry-run and touches nothing.$ systemctl --user enable --now dozed.service# A day later, read what it would have done.$ dozectl report# Convinced? Switch it on.$ dozectl mode live
On Wayland, a small KWin script reports which windows are visible. The installer adds it. On X11 nothing extra is needed.
Developed and measured on Plasma 6.6
On Wayland, a Shell extension for GNOME 45 to 49 does the same job. On X11 nothing extra is needed.
Not in the scripted checks yet
Dozed reads the compositor's own IPC directly, so there is nothing extra to install.
Checked against headless Sway
Dozed is made by the team behind Zynk, which sends files straight between your devices. The name is borrowed from Android's Doze.