← Home

Open source · Windows utility

OLED Sleeper

Dims or blacks out individual OLED monitors, each on its own idle timer. C# and WPF over DDC/CI, with no external dependencies.

Quorthon13/OLED-SleeperBlack out or dim idle secondary monitors. The screen wakes instantly on mouse or keyboard activity. A simple wizard lets you choose which displays to manage and set a custom idle timer.C#Stars138Forks15MITfetchingView on GitHub →

Context

Interface elements that never move, such as taskbars and status bars, burn permanently into an OLED panel if they sit there long enough.

Windows tracks idle time globally, which does not fit a multi-monitor desk. Typing on the primary screen counts as activity everywhere, so a secondary monitor showing a static dashboard stays fully lit.

OLED Sleeper manages each display on its own. Every monitor gets its own timer, its own criteria for what counts as idle, and its own action when the timer expires.

There are two actions. Dimming goes over DDC/CI, which talks to the monitor hardware directly. Blacking out draws a full-screen black overlay. The utility never issues a hardware power-off command.

Two monitors on a desk. Work continues on the left display while the right one, left idle, blacks out under a full-screen overlay on its own timer.
Two displays, two independent timers. The idle one blacks out under a full-screen overlay while the one being worked on is left alone.

Constraints

Decisions

Command pattern, with detection separated from execution

Instead of
Event handlers wired directly to displays
Why
Three ways of detecting idle and two actions is six wirings under plain handlers. With a command in between, detection emits and the executor runs, and neither knows about the other. A fourth detector becomes one emitter, and a third action becomes one command.

Zero external dependencies

Instead of
Existing wrapper libraries for Win32 and DDC/CI
Why
I wrote the Win32 and DDC/CI integrations by hand rather than pulling in wrappers. The whole codebase is auditable that way, and when a bug arrives from hardware I do not own, I can fix it in my own code instead of waiting for an upstream maintainer.

Black overlay, not OS monitor power-off

Instead of
The Windows API call that powers the display off
Why
The Windows display-change pipeline is slow. Triggering it freezes the OS while it runs and force-migrates every open window off the disabled monitor. An OLED panel has no backlight, so a pure black overlay turns the pixels off and reaches the same hardware state. The windows stay where they were and the OS never stalls.
Command flow from idle detection to display actionThree ways of detecting that a display is idle — cursor movement on that display, activity in the focused application, and system-wide input — all produce the same command. The command is then executed as either blacking the panel out with a full-screen overlay or dimming it over DDC/CI. A new detector or a new action is added on one side without touching the other.DETECTIONMouse onthat displayFocusedapplicationSystem-wideinput+ newdetectorIdle commandWHICHEVER DETECTOR FIREDACTIONBlack outBLACK OVERLAYDim panelDDC/CI · VCP+ new action
Detection produces a command; whatever executes it does not know which detector fired. Extending either side is an addition on that side alone.

What I owned

I did the whole project: design, implementation, releases, and issue triage.

Outcome

The utility is distributed on SourceForge and was picked up on Hacker News.

Most updates since the first release fix hardware quirks that users reported. The split between detection and action is what made those cheap: a fix landed in the detection files or in the action files, and rarely in both.

Having no dependencies means no maintenance work arrives from third-party library updates.

Stack

← All work