LinuxCommandLibrary

optimus-manager

Switch between Intel and NVIDIA GPUs

TLDR

Switch between different GPU modes

$ optimus-manager --switch [nvidia|integrated|hybrid]
copy

Clean up
$ optimus-manager --cleanup
copy

SYNOPSIS

optimus-manager [OPTIONS]
optimus-manager --switch {integrated|nvidia|hybrid}
optimus-manager --status
optimus-manager --set-startup-mode {integrated|nvidia|hybrid|nvidia_once}
optimus-manager --reset
optimus-manager --daemon {start|stop|status|restart}
optimus-manager --help

PARAMETERS

--switch {integrated|nvidia|hybrid}
    Changes the active GPU mode. Requires a logout/reboot to apply the new mode.

--status
    Displays the current GPU mode, configured startup settings, and daemon status.

--print-mode
    Prints only the currently active GPU mode to standard output.

--set-startup-mode {mode}
    Configures the GPU mode to be automatically set on system startup. 'nvidia_once' boots into NVIDIA mode once, then reverts.

--unset-startup-mode
    Clears any previously configured startup GPU mode, reverting to default behavior.

--temp-config
    Generates a temporary Xorg configuration file for testing purposes without applying it system-wide.

--setup-system
    Performs initial setup, creating necessary system files and service configurations.

--unset-system
    Removes all system-wide optimus-manager configurations and files.

--no-confirm
    Skips interactive confirmation prompts for potentially destructive operations.

--reset
    Resets all optimus-manager configurations to their default state and switches to integrated mode.

--daemon {action}
    Controls the optimus-manager background service (e.g., start, stop, status, restart).

--version
    Displays the installed version of optimus-manager.

--help
    Shows the command's usage information and available options.

DESCRIPTION

optimus-manager is a comprehensive solution for managing NVIDIA Optimus hybrid graphics on Linux systems. It allows users to effortlessly switch between the integrated GPU (e.g., Intel, AMD) and the dedicated NVIDIA GPU, or utilize a "hybrid" mode where the integrated GPU handles primary display output while the NVIDIA GPU is available for compute tasks and specific application offloading via PRIME.

This tool significantly simplifies the complex setup traditionally associated with Optimus, automatically handling Xorg configurations and integrating with common display managers (GDM, LightDM, SDDM). By providing a streamlined command-line interface, optimus-manager aims to improve power efficiency by allowing the NVIDIA GPU to be fully powered off when not in use (in integrated mode) and to provide full performance when the dedicated GPU is required. It addresses long-standing challenges faced by Linux users with Optimus laptops, offering a robust and user-friendly mechanism for GPU mode control.

CAVEATS

  • Requires a compatible display manager (e.g., GDM, LightDM, SDDM) for seamless operation.
  • Switching GPU modes typically requires logging out and back in, or a full system reboot.
  • In 'hybrid' mode, applications might need to be explicitly launched with tools like prime-run (from nvidia-prime package) to utilize the NVIDIA GPU.
  • While actively developed, compatibility issues can sometimes arise with specific kernel versions or bleeding-edge NVIDIA drivers.
  • Native Wayland sessions have evolving support; traditionally, optimus-manager is more robust with Xorg.

DAEMON AND CONFIGURATION

optimus-manager operates via a background daemon that monitors display manager sessions and applies GPU configurations upon login/logout. It manages Xorg configuration files (e.g., in /etc/X11/xorg.conf.d/). Users can customize its behavior by creating a configuration file at /etc/optimus-manager/optimus-manager.conf.

PRIME RENDER OFFLOAD

In 'hybrid' mode, optimus-manager leverages NVIDIA's PRIME Render Offload capabilities, allowing the integrated GPU to drive the display while the NVIDIA GPU can be used for demanding applications. This provides a balance between power efficiency and dedicated graphics performance, typically by prefixing commands with prime-run.

HISTORY

optimus-manager emerged as a community-driven solution to the persistent challenges of managing NVIDIA Optimus hybrid graphics on Linux. Building upon earlier manual configurations (like NVIDIA PRIME), its development focused on automating and simplifying the GPU switching process. It aims to provide a more user-friendly and robust experience for Optimus laptop owners, addressing issues such as power consumption and performance control that were often problematic with traditional Linux setups.

SEE ALSO

prime-run(1), xrandr(1), nvidia-smi(1), Xorg(1)

Copied to clipboard