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

Merged
Breadway merged 3 commits from fix/bos-32-nvidia-driver-selection into main 2026-10-02 14:34:47 +08:00
Owner

Select NVIDIA open modules using exact PCI IDs from NVIDIA's supported-products tables. A linux-only system gets nvidia-open and nvidia-utils; additional kernels select nvidia-open-dkms plus every kernel's headers. Maxwell/Pascal stop with nvidia-580xx AUR guidance, and unknown/older cards fail closed. First boot records the same driver plan in nvidia-offer.json.

Added a read-only --dry-run CLI with optional mock device IDs and kernel packages. scripts/test-nvidia-plan.py validates actual CLI output for Turing/Ada, linux/LTS/zen, Maxwell/Pascal, old/unknown/mixed GPUs and rejected installation overrides. Tests, shell syntax and git diff --check pass. NVIDIA hardware installation remains unverified because no Turing+ card is available to this worker. The ID allowlist is pinned to 595.58.03 and needs updates for new hardware.

Closes #32

Select NVIDIA open modules using exact PCI IDs from NVIDIA's supported-products tables. A linux-only system gets nvidia-open and nvidia-utils; additional kernels select nvidia-open-dkms plus every kernel's headers. Maxwell/Pascal stop with nvidia-580xx AUR guidance, and unknown/older cards fail closed. First boot records the same driver plan in nvidia-offer.json. Added a read-only --dry-run CLI with optional mock device IDs and kernel packages. scripts/test-nvidia-plan.py validates actual CLI output for Turing/Ada, linux/LTS/zen, Maxwell/Pascal, old/unknown/mixed GPUs and rejected installation overrides. Tests, shell syntax and git diff --check pass. NVIDIA hardware installation remains unverified because no Turing+ card is available to this worker. The ID allowlist is pinned to 595.58.03 and needs updates for new hardware. Closes #32
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.

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.
Author
Owner

Addressed independent review's firstboot defect: JSON string escaping now handles newline and all control characters as well as quotes and backslashes. Added scripts/test-nvidia-first-boot.py, which runs the actual firstboot and setup scripts with inert probe/notification/compositor stubs and a temporary HOME/state directory. Two supported GPUs and mixed supported/legacy GPUs both produce valid JSON with matching plans. CLI selection tests, shell syntax and diff checks pass; host configs and desktop were untouched.

Addressed independent review's firstboot defect: JSON string escaping now handles newline and all control characters as well as quotes and backslashes. Added scripts/test-nvidia-first-boot.py, which runs the actual firstboot and setup scripts with inert probe/notification/compositor stubs and a temporary HOME/state directory. Two supported GPUs and mixed supported/legacy GPUs both produce valid JSON with matching plans. CLI selection tests, shell syntax and diff checks pass; host configs and desktop were untouched.
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.

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.
Sign in to join this conversation.
No description provided.