Ubuntu gpu-manager: Automatic GPU & Driver Setup

Overview

Modern Ubuntu installations rely on background orchestration tools to dynamically configure display adapters without requiring manual intervention from system administrators. At the heart of this graphic stack bootstrap lies gpu-manager, an internal helper responsible for discovering installed video adapters and tailoring Xorg or Wayland driver configurations accordingly. This tutorial walks through the operational mechanics of gpu-manager, demonstrating how to inspect video hardware, test configuration dry runs, and verify startup services from the command line.

Verifying and Preparing the gpu-manager Environment

Before probing the graphics subsystem, confirm that the binary is available on your machine or deploy the underlying package using which gpu-manager || (apt-get update -qq && apt-get install -y ubuntu-drivers-common).

Verifying binary availability and installing ubuntu-drivers-common

Under the hood, gpu-manager scans the PCI bus during system initialization, determines whether proprietary or open-source drivers should drive the available displays, and generates matching runtime configs.
When auditing hardware behavior or diagnosing driver conflicts, the following switches prove indispensable:
⚙️ [Core CLI Flags]

--help : Displays the full synopsis of supported parameters and auxiliary flags.
--dry-run : Simulates display detection and rule processing without applying modifications to system configuration files.
--log <파일> : Diverts execution output to a designated custom log path instead of the system default.

Inspecting help documentation for gpu-manager

To verify the packaging origin of the executable, invoke dpkg -S $(which gpu-manager). The output demonstrates that the binary is maintained directly by the ubuntu-drivers-common package, which houses Ubuntu’s primary automated driver detection logic.

Querying package ownership with dpkg

Auditing Graphics Hardware and Driver Associations

A comprehensive view of active display hardware and attached kernel modules can be gathered by running lspci -nnk | grep -iA3 -E 'vga|3d|display'.
In the terminal output below, the system identifies an integrated AMD Renoir GPU controller, properly bound to and driven by the native amdgpu kernel driver.

Checking PCI graphics devices and active kernel drivers

Querying package repositories for recommended driver bundles is typically accomplished via ubuntu-drivers devices.
In this test instance, the command reached an execution timeout while evaluating device fingerprints against package indices, a common occurrence when network mirrors experience lag or when proprietary packages are not required for the detected chipset.

Querying recommended packages using ubuntu-drivers devices

Confirm whether legacy static display configurations exist by executing ls -l /etc/X11/xorg.conf*.
The absence of these files indicates that the display server relies entirely on dynamic kernel mode setting (KMS) and runtime device discovery rather than hard-coded configuration files.

Checking for static Xorg configuration files

Simulating Device Detection and Inspecting Diagnostics

Testing how the system responds to hardware detection without writing changes to the disk can be evaluated safely using gpu-manager --dry-run.
The diagnostic trace confirms target boot-state paths, examines module loading routines, and successfully validates that the amdgpu driver stack is recognized across all detection checkpoints.

Performing a dry run simulation with gpu-manager

To inspect persistent boot logs generated by previous runs, execute test -f /var/log/gpu-manager.log && head -n 25 /var/log/gpu-manager.log || echo 'No existing log file'.
When testing in containerized instances or environments where dynamic log creation is bypassed, the command cleanly indicates the absence of an active log file.

Checking the presence of the system gpu-manager log

You can isolate driver and vendor identifiers across system logs with grep -i -E 'vendor|driver|card' /var/log/gpu-manager.log 2>/dev/null || echo 'Log check complete'.
Because no static log file was populated on this host, the shell pipelines cleanly to the fallback notification without throwing standard error noise.

Filtering log entries for vendor and driver keywords

Validating Systemd Startup Hooks and Driver States

To ensure dynamic hardware evaluation occurs on every system boot, inspect the unit state using systemctl list-unit-files | grep -i gpu-manager || echo 'gpu-manager service check'.
The output confirms that gpu-manager.service is actively enabled, establishing that the service triggers automatically during the early target milestones of the boot sequence.

Verifying systemd unit file status for gpu-manager

To view all display-related drivers actively operating inside kernel space, run lsmod | grep -i -E 'nvidia|nouveau|amdgpu|i915'.
The returned listing demonstrates that amdgpu and its dependent Direct Rendering Manager (DRM) support modules are resident in memory and actively servicing the display pipeline.

Listing active graphics kernel modules with lsmod

Finally, examine historical boot parameters preserved by the driver management subsystem by reading cat /var/lib/ubuntu-drivers-common/last_gfx_boot 2>/dev/null || echo 'Last gfx boot status checked'.
The recorded fingerprint string 1002:1636;0000:04:00:0;1 encapsulates the PCI vendor and model IDs alongside the bus address and active configuration state, serving as the baseline comparison for subsequent boots.

Inspecting previous graphics boot record state

Understanding how gpu-manager detects hardware and interfaces with kernel modules makes troubleshooting graphics stack issues on Ubuntu straightforward. Leveraging these diagnostic commands will help you maintain a resilient and stable display environment across different GPU platforms.