Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StackOS GPU Manager

StackOS GPU Manager is a Linux GPU management prototype focused on reliable hardware discovery, per-application GPU selection and hybrid-GPU systems.

The project is developed as part of the StackOS ecosystem and is also intended as a reference implementation for possible upstream integration with Linux desktop environments.

Goals

  • Detect physical GPUs reliably
  • Support AMD, Intel and NVIDIA hardware
  • Work with single-GPU and hybrid-GPU systems
  • Provide per-application GPU selection
  • Avoid depending on vendor-specific tools for basic hardware detection
  • Preserve compatibility with older and newer GPU generations
  • Expose clear failure states instead of guessing hardware information

Kernel-first architecture

Physical GPU discovery is based primarily on Linux kernel interfaces.

The main discovery source is:

/sys/bus/pci/devices/*

PCI devices with display-controller class 0x03xxxx are treated as GPU candidates.

DRM devices, render nodes, hwmon sensors and desktop GPU-policy services are used as additional sources when available, but they are not required for a GPU to exist.

This design allows hardware to remain detectable even when:

  • no DRM card is available
  • no render node exists
  • a proprietary vendor utility is unavailable
  • a legacy driver exposes only limited management interfaces

Vendor-specific tools are used only as fallbacks for information that the kernel does not expose.

GPU policy and application launching

StackOS GPU Manager can use switcheroo-control for desktop GPU policy and application launch decisions.

Hardware identity and policy are intentionally kept separate:

  • kernel interfaces determine what hardware physically exists
  • switcheroo-control provides default/discrete GPU policy
  • application preferences determine requested behavior
  • the launcher builds the final execution plan

GPU association prefers exact PCI identity.

When exact identity is unavailable, only an unambiguous fallback is accepted. Ambiguous hardware associations are not guessed.

Temperature and telemetry

Temperature information is read from kernel hwmon interfaces when available.

For proprietary NVIDIA drivers, nvidia-smi may be used only as a fallback when kernel temperature data is unavailable.

Telemetry avoids unnecessarily waking a suspended discrete GPU.

Tests

The current prototype includes 21 automated tests covering GPU discovery, hybrid systems, policy, launch planning, preferences, temperature handling, indicator behavior and UI logic.

Status

Current public prototype version: 0.1.0

The validated 0.1.0 implementation is treated as a frozen reference release. Future development should occur in later versions or dedicated development branches.

Upstream direction

The long-term goal is to use this project as technical evidence for native desktop integration.

A future upstream implementation should follow the architecture and behavior validated here while being adapted to the target desktop's native language, libraries and project conventions.

License

StackOS GPU Manager is licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later).

See the LICENSE file for licensing information.

About

Linux GPU manager with kernel-first discovery, per-application GPU selection and hybrid GPU support.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages