Skip to content

Latest commit

 

History

54 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

NAUPS4Linux : New Architecture Userspace Power-saving For Linux (formerly LinuxPartialSuspendProject)

REMARK: This documentation is incomplete and currently under development.

หมายเหตุสำหรับผู้อ่านภาษาไทย: สำหรับคนใช้ภาษาไทย พวก README/Wiki/ส่วนสำคัญ จะแปลให้นะครับแต่อาจจะช้าหน่อย เพราะผมจะเขียนเป็นภาษาอังกฤษก่อน

Welcome

This project is part of a larger initiative: We Will Make Linux Desktop Great Again!

  • If you have any questions or feedback, feel free to open an Issue.
  • Want to contribute or volunteer? Feel free to start a discussion in the "Issue" tab.

Roadmap: Project Components

  • Core Daemon
    • Runs as root
    • Runs per-user (user-space instance)
  • Desktop Environment Integration
    • <TBD>
  • systemd Integration
    • <TBD>
  • <TBD>

Roadmap: Operational Modes

Network States During Suspend

  • Disconnected: All radio devices (e.g., Bluetooth, Wi-Fi) are powered off.
  • Connected: Radio devices remain active.

Application Selection (Partial Suspend)

  • Opt-in: Explicitly add applications to an allowlist to freeze them.
  • Opt-out: Explicitly add applications to an exclusion list (blocklist) to keep them running. By default, the system freezes user cgroups (such as app.slice and background.slice).

Experiments Done

  • Does freezing an audio-playing app pause its audio?

works normally

  • Freezing cgroups for both "system.slice" and "user.slice"

Issue: Sometimes buggy—causes user screen access to fail (likely an issue with seat management).

Symptom: The system switches to the login screen $\rightarrow$ entering the password causes an infinite checking loop $\rightarrow$ manually switching via Virtual Terminal (VT) leads to a partially frozen state (stuck on the login UI, un-interactive, though the mouse cursor still moves).

Next Step: We need to find a solution (possibly via selective cgroup freezing); otherwise, User Suspending won't be viable.

FAQ

What is this project for?

What is the goal of this project?

  • First: Build base code that allows users to run specific background tasks while suspending all others.
  • Second: Improve the system for better UX, deeper integration, and higher application stability.
  • Third: Go further by promoting and advocating for this as an out-of-the-box (OOBE) feature for Linux Desktop via a freedesktop.org RFC proposal.
    • The starting point: https://www.freedesktop.org/wiki/NewProject/ Is this project the opposite of battery saving?
      Nope. Reducing unnecessary background tasks is useless if power consumption remains high. This project is battery-focused. It guarantees that you can control the tradeoff between power savings and functionality—you can choose power savings similar to traditional full suspend while retaining selective functionality (or even while fully suspended).

Is my system compatible?

  • This project is compatible with Linux distributions featuring the following components:
    • systemd
    • cgroup v2 (or newer)
    • Desktop environment integrated with systemd's cgroup management (recommended for full features)
  • However, our primary target and testing environment is the latest Ubuntu LTS release (x86_64) running GNOME.
  • We don't know how beneficial this is on non-s0ix systems, but it is definitely useful on systems supporting s0ix.

What is s0ix?
A modern power state on x86 architectures, implemented at the hardware level, that allows unused system sub-components to power down their circuits dynamically.

How does this project plan power states in user-space?: (see below)

REMARK: These power states are used internally and meant for power-users or developers. End-users have a different perspective and set of terminology.

  • Q1: Screen On
  • Q2: Screen Off (DPMS Off / DRM Suspended)
  • Q3: Partial Suspending (New state proposed by us)
  • Q3L: Low-Power Partial Suspending (New state proposed by us; same as Q3, but capped at a very low maximum power draw, e.g., $\le$ 500mW)
  • Q4: Userspace Suspending (New state proposed by us; almost all of userspace is frozen except vital services like our system and init. Because the kernel stays running, system resume is much faster)
  • Q5: Full Suspending (Standard kernel-level suspend API; s2idle on modern systems)

Sub-states (Q3+):

  • Network Status: Connected | Disconnected (Allowed Wi-Fi / Ethernet)
  • Allow Periodic Wakeup: Yes | No
    • Enables background applications and services to execute periodic tasks efficiently during brief wake intervals to conserve battery.