bos-nvidia-setup installs a package Arch replaced, with no GPU check #32

Closed
opened 2026-09-26 07:28:12 +08:00 by Breadway · 6 comments
Owner

Problem

Line 124 runs pacman -S nvidia nvidia-utils. In December 2025 Arch switched the main driver to the open kernel modules (nvidia-open) with driver 590, which also dropped Pascal (GTX 10-series) and older cards. The script doesn't detect the GPU generation, so on those cards it installs a driver that doesn't support them.

Where

iso/airootfs/usr/local/bin/bos-nvidia-setup (install block around line 120). Also bos-first-boot (it writes the offer JSON).

Fix

  • Read the PCI device ID (lspci -d 10de: -nn) and classify it: Turing or newer: nvidia-open nvidia-utils; Pascal/Maxwell: refuse with a clear message pointing at the nvidia-580xx AUR packages (or install them via yay after a confirmation); older: unsupported.
  • Choose nvidia-open vs nvidia-open-dkms based on the installed kernels (linux only vs any other kernel; the latter also needs headers). Interacts with the fallback-kernel issue (BOS-33).
  • Record the chosen path in nvidia-offer.json so Settings can show it.

Acceptance

Dry-run mode (--dry-run) prints the right package set for given mocked device IDs, and the real install works on a Turing+ card.


Source: BOS v0.6.2 source review (tag dated 2026-09-19); line numbers refer to that tree. Read AGENTS.md first. One issue per branch/PR, match existing style. Add a CHANGELOG [Unreleased] entry.

## Problem Line 124 runs `pacman -S nvidia nvidia-utils`. In December 2025 Arch switched the main driver to the open kernel modules (`nvidia-open`) with driver 590, which also dropped Pascal (GTX 10-series) and older cards. The script doesn't detect the GPU generation, so on those cards it installs a driver that doesn't support them. ## Where `iso/airootfs/usr/local/bin/bos-nvidia-setup` (install block around line 120). Also `bos-first-boot` (it writes the offer JSON). ## Fix - Read the PCI device ID (`lspci -d 10de: -nn`) and classify it: Turing or newer: `nvidia-open nvidia-utils`; Pascal/Maxwell: refuse with a clear message pointing at the `nvidia-580xx` AUR packages (or install them via yay after a confirmation); older: unsupported. - Choose `nvidia-open` vs `nvidia-open-dkms` based on the installed kernels (`linux` only vs any other kernel; the latter also needs headers). Interacts with the fallback-kernel issue (BOS-33). - Record the chosen path in `nvidia-offer.json` so Settings can show it. ## Acceptance Dry-run mode (`--dry-run`) prints the right package set for given mocked device IDs, and the real install works on a Turing+ card. --- Source: BOS v0.6.2 source review (tag dated 2026-09-19); line numbers refer to that tree. Read AGENTS.md first. One issue per branch/PR, match existing style. Add a CHANGELOG `[Unreleased]` entry.
Author
Owner

Blocked before implementation: the available local BOS checkout only contains stale main at aeb3c77222e85e6199384b16dd984ece01d4cc03; Forgejo currently reports main at 67593d5887301a933170b5d0bbf4c0ba1149ecf4. Fetching current main from ssh://git@100.66.238.26:2222/Breadway/bos.git fails in this environment with socket: Operation not permitted / ssh: connect ...: failure. I did not modify the shared BOS-26 checkout or create a branch from stale trunk. Please retry when network access to Forgejo is available.

Blocked before implementation: the available local BOS checkout only contains stale `main` at `aeb3c77222e85e6199384b16dd984ece01d4cc03`; Forgejo currently reports `main` at `67593d5887301a933170b5d0bbf4c0ba1149ecf4`. Fetching current `main` from `ssh://git@100.66.238.26:2222/Breadway/bos.git` fails in this environment with `socket: Operation not permitted` / `ssh: connect ...: failure`. I did not modify the shared BOS-26 checkout or create a branch from stale trunk. Please retry when network access to Forgejo is available.
Author
Owner

Retry blocker: the saved Forgejo Tailscale URL is ssh://git@100.66.238.26:2222/Breadway/bos.git, but direct fetch fails with socket: Operation not permitted and ssh: connect ...: failure. This shell also reports failed to connect to local tailscaled, and direct HTTPS cannot resolve git.breadway.dev. I cannot obtain current main or push from this environment, so no code or branch changes were made.

Retry blocker: the saved Forgejo Tailscale URL is `ssh://git@100.66.238.26:2222/Breadway/bos.git`, but direct fetch fails with `socket: Operation not permitted` and `ssh: connect ...: failure`. This shell also reports `failed to connect to local tailscaled`, and direct HTTPS cannot resolve `git.breadway.dev`. I cannot obtain current `main` or push from this environment, so no code or branch changes were made.
Author
Owner

Retry still blocked: current shell has no running tailscaled, and git ls-remote ssh://git@100.66.238.26:2222/Breadway/bos.git refs/heads/main fails with socket: Operation not permitted and ssh: connect ...: failure. The only local main is stale, so I did not create a branch from it. No implementation changes were made.

Retry still blocked: current shell has no running `tailscaled`, and `git ls-remote ssh://git@100.66.238.26:2222/Breadway/bos.git refs/heads/main` fails with `socket: Operation not permitted` and `ssh: connect ...: failure`. The only local `main` is stale, so I did not create a branch from it. No implementation changes were made.
Author
Owner

#76

Implemented exact PCI ID classification, open vs DKMS/header selection, safe dry-run JSON plan, and firstboot driver_plan recording. Actual CLI tests cover supported, legacy, old/unknown/mixed IDs, linux/LTS/zen and mock override rejection. Shell syntax and diff checks pass. Real Turing+ installation remains hardware acceptance for review; no host configs, packages or desktop were changed.

https://git.breadway.dev/Breadway/bos/pulls/76 Implemented exact PCI ID classification, open vs DKMS/header selection, safe dry-run JSON plan, and firstboot driver_plan recording. Actual CLI tests cover supported, legacy, old/unknown/mixed IDs, linux/LTS/zen and mock override rejection. Shell syntax and diff checks pass. Real Turing+ installation remains hardware acceptance for review; no host configs, packages or desktop were changed.
Author
Owner

Independent review at 98c83a02d8 found a firstboot integration defect: two NVIDIA display devices produce multiline lspci output, but json_escape does not encode newline characters. The resulting nvidia-offer.json is invalid JSON, making the newly required driver_plan unreadable. Reproduced the actual firstboot script with an isolated temporary HOME/state directory and stubs for all desktop probes and notifications. Fix the string serialization and add a safe firstboot test with multiple GPU lines.

The CLI tests pass, and every 292 current and 160 legacy PCI ID matches its pinned official NVIDIA supported-products table. Hardware installation remains outstanding. No CI statuses are configured. Returning to TODO for this fix while keeping the PR open.
PR: #76

Independent review at 98c83a02d890c8508d2cdf7637944cd6baeed163 found a firstboot integration defect: two NVIDIA display devices produce multiline lspci output, but json_escape does not encode newline characters. The resulting nvidia-offer.json is invalid JSON, making the newly required driver_plan unreadable. Reproduced the actual firstboot script with an isolated temporary HOME/state directory and stubs for all desktop probes and notifications. Fix the string serialization and add a safe firstboot test with multiple GPU lines. The CLI tests pass, and every 292 current and 160 legacy PCI ID matches its pinned official NVIDIA supported-products table. Hardware installation remains outstanding. No CI statuses are configured. Returning to TODO for this fix while keeping the PR open. PR: https://git.breadway.dev/Breadway/bos/pulls/76
Author
Owner

Independent source and safe integration review PASS at df298c2a4b. The previously reported multiline PCI JSON defect is fixed. Independently ran the actual CLI and firstboot integration tests: two supported cards and mixed current/legacy cards produce parseable offer JSON with the expected driver_plan, preserving newline, quote, backslash and tab characters. Earlier independent comparison verified all 292 current and 160 legacy IDs exactly match the pinned official NVIDIA tables. Linux-only and DKMS/header selection, mock override rejection, shell syntax and diff checks pass. No configured CI statuses. Real Turing+ driver installation remains outstanding hardware acceptance; this review does not claim physical hardware was tested.
PR: #76

Independent source and safe integration review PASS at df298c2a4bedfe6c309ff71c990eda802ecf1f26. The previously reported multiline PCI JSON defect is fixed. Independently ran the actual CLI and firstboot integration tests: two supported cards and mixed current/legacy cards produce parseable offer JSON with the expected driver_plan, preserving newline, quote, backslash and tab characters. Earlier independent comparison verified all 292 current and 160 legacy IDs exactly match the pinned official NVIDIA tables. Linux-only and DKMS/header selection, mock override rejection, shell syntax and diff checks pass. No configured CI statuses. Real Turing+ driver installation remains outstanding hardware acceptance; this review does not claim physical hardware was tested. PR: https://git.breadway.dev/Breadway/bos/pulls/76
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/bos#32
No description provided.