
Narcolepsyd
https://github.com/obra/narcolepsyd- Category
- Developer Tools
- Rank
- No. 1597Tools index
Previous survey · No. 1603 ·
- Pricing
- Open Source
- Type
- TOOL
- Builder
- obra
- GitHub
- 13 stars
- Latest release
- v0.1.0
- Date
About
Idle power optimizer for Linux laptops with Intel hybrid CPUs.
What it does
Narcolepsyd watches keyboard and pointing-device activity while a laptop runs on battery. After three quiet seconds, it parks higher-power processor cores, limits remaining cores, disables turbo, favors energy savings, and suspends selected USB devices. User input restores the saved state, while the display and network remain active.
Why it's ranked here
This is a focused system daemon with a clear mechanism, conservative activation rules, and explicit state restoration. Blocking on input events keeps its own processor use low. The narrow hardware target, root requirement, fixed policy, and frequency-based core classification make it better suited to informed Linux users than broad deployment.
What's good
It saves existing frequency, turbo, core, and USB settings before changing them, then restores those values on activity or shutdown. It never offlines the first processor, activates only on battery, and pauses around named workloads such as video conferencing, encoding, media playback, and file transfer.
Tradeoffs
It requires root access to input devices and processor controls. Its three-second timeout, two-core allowance, frequency cap, battery-only behavior, and inhibitor list are fixed. Core types are inferred from maximum frequency tiers, so unusual topologies may be classified imperfectly. Hardware support is limited to Linux laptops with Intel hybrid processors and the expected frequency driver.
How to use it well
Use it on a supported Linux laptop where reading, thinking, or waiting creates frequent short idle periods. Install the Debian package or build the Rust binary, run it under systemd, and inspect journal logs during initial testing. It does not provide suspend, screen blanking, or coordinated processor, graphics, and display management.
Technical notes+
Cargo.toml defines a Rust 2024 binary with libc, log, and env_logger dependencies, plus size-oriented release settings, LTO, and symbol stripping. src/main.rs enumerates /dev/input/event* devices, identifies likely keyboards and pointing devices through ioctl capability checks, blocks in poll(2), classifies CPU tiers from sysfs maximum-frequency values, and writes sysfs controls for EPP, turbo, frequency caps, CPU online state, and USB power. .github/workflows/release.yml builds x86_64-unknown-linux-gnu binaries and amd64 Debian packages, bundling dist/narcolepsyd.service and package lifecycle scripts that manage the systemd unit.
Observed
- License
- Apache License 2.0
- Primary language
- Rust, edition 2024
- Install surface
- Debian amd64 package, standalone Linux amd64 binary, or Cargo source build
- Interface
- Root-running systemd daemon with status and logs exposed through systemd and journald
- Platform support
- Linux laptops with Intel hybrid CPUs using the Intel CPU frequency driver
- Direct dependencies
- libc, log, and env_logger
Read from README.md, Cargo.toml, src/main.rs, LICENSE, .github/workflows/release.yml.
What it can do
Optimize idle power consumption
Linux laptop with Intel hybrid CPU in idle state → Reduced power usage and extended battery life
Manage CPU core states during idle periods
Intel hybrid CPU performance and efficiency cores → Optimized core utilization for minimal power draw
Monitor system idle status
System activity and resource usage data → Real-time idle state detection and classification
Apply power management policies
Current system state and power configuration → Dynamically adjusted CPU power settings
Control Intel hybrid CPU scheduling
Running processes and system workload → Optimized task allocation between P-cores and E-cores
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.