The branch is derived from the chip family in the PCI name, not the numeric device-id ranges: those overlap between families, and a wrong guess installs a module the card cannot use. An unparseable name asks instead of guessing.
Safe ordering
Secure Boot enforcing -> generate + mokutil --import the akmods key, then stop before installing the driver and ask for a reboot. Installing an unsigned module while enforcement is on is the documented black-screen path, because the driver package blacklists nouveau as it lands. Re-run after MokManager enrolment.
Secure Boot off / Setup mode -> no signing at all. A MOK import request is never processed when enforcement is off (shim skips MokManager), so doing it would only leave a stuck request in the efivars.
No nvidia-drm.modeset=1 anywhere: RPM Fusion's kernel package enables KMS, and the flag now conflicts with Fedora's simpledrm early-boot patch.
Housekeeping
bounded (5 min) wait for the kmod build, so a reboot cannot land mid-build into a driverless boot
dnf mark user on the akmod, so dnf autoremove cannot take the driver and its compiler away
VA-API decode + vulkan offered as an opt-in extra (modules stay minimal)
idempotent: an installed branch is not reinstalled, but is still re-marked
Wiring
setup.sh gains --nvidia=auto|no (default auto, yes accepted as an alias), dispatched after the DE/TWM modules. Detected hardware decides the action: no prompt. --nvidia=no is the opt-out for nouveau or a hand-built driver. Summary section reports the module version.
Testing
Stub harness, 14 scenarios / 38 assertions, all green: every branch mapping, multi-GPU warning, Optimus (3D controller), pre-Fermi refusal, SB on-without-key / on-with-key / off / setup, unparseable-name fallback, idempotent re-run, build timeout (no false success).
Known limit (same as the rest of this repo): the harness proves control flow, not package names. akmod-nvidia*, xorg-x11-drv-nvidia*-cuda and libva-nvidia-driver are taken from the RPM Fusion howto for F44, but a real F44 run is the actual proof. Also unproven on real hardware: the MokManager interaction itself (only the pre-install gate is tested).
Installs the NVIDIA driver branch that matches the card actually in the machine.
## What it does
`modules/user/nvidia.sh` detects the GPU with `lspci -nn` and installs the branch that fits:
| Chip family in the name | Branch | Packages |
|---|---|---|
| `GB`/`AD`/`GA`/`TU` | current | `akmod-nvidia` + `xorg-x11-drv-nvidia-cuda` |
| `GV`/`GP`/`GM` | 580xx | `akmod-nvidia-580xx` + `xorg-x11-drv-nvidia-580xx{,-cuda}` |
| `GK` | 470xx | `akmod-nvidia-470xx` + ... |
| `GF` | 390xx | `akmod-nvidia-390xx` + ... |
| pre-Fermi | none | refused: 340xx is EOL + needs a longterm kernel |
The branch is derived from the **chip family in the PCI name**, not the numeric device-id ranges: those overlap between families, and a wrong guess installs a module the card cannot use. An unparseable name asks instead of guessing.
## Safe ordering
* **Secure Boot enforcing** -> generate + `mokutil --import` the akmods key, then **stop before installing the driver** and ask for a reboot. Installing an unsigned module while enforcement is on is the documented black-screen path, because the driver package blacklists nouveau as it lands. Re-run after MokManager enrolment.
* **Secure Boot off / Setup mode** -> no signing at all. A MOK import request is never processed when enforcement is off (shim skips MokManager), so doing it would only leave a stuck request in the efivars.
* No `nvidia-drm.modeset=1` anywhere: RPM Fusion's kernel package enables KMS, and the flag now conflicts with Fedora's simpledrm early-boot patch.
## Housekeeping
* bounded (5 min) wait for the kmod build, so a reboot cannot land mid-build into a driverless boot
* `dnf mark user` on the akmod, so `dnf autoremove` cannot take the driver and its compiler away
* VA-API decode + vulkan offered as an opt-in extra (modules stay minimal)
* idempotent: an installed branch is not reinstalled, but is still re-marked
## Wiring
`setup.sh` gains `--nvidia=auto|no` (default `auto`, `yes` accepted as an alias), dispatched after the DE/TWM modules. Detected hardware decides the action: no prompt. `--nvidia=no` is the opt-out for nouveau or a hand-built driver. Summary section reports the module version.
## Testing
Stub harness, 14 scenarios / 38 assertions, all green: every branch mapping, multi-GPU warning, Optimus (3D controller), pre-Fermi refusal, SB on-without-key / on-with-key / off / setup, unparseable-name fallback, idempotent re-run, build timeout (no false success).
**Known limit (same as the rest of this repo):** the harness proves control flow, not package names. `akmod-nvidia*`, `xorg-x11-drv-nvidia*-cuda` and `libva-nvidia-driver` are taken from the RPM Fusion howto for F44, but a real F44 run is the actual proof. Also unproven on real hardware: the MokManager interaction itself (only the pre-install gate is tested).
modules/user/nvidia.sh detects the card via lspci and installs the branch
that matches it: current (Turing+), 580xx (Volta/Pascal/Maxwell), 470xx
(Kepler), 390xx (Fermi); pre-Fermi is refused with an explanation.
- no prompt for a detected GPU (--nvidia=no is the opt-out, wired in setup.sh)
- Secure Boot gate: with enforcement on, the akmods key is generated and
imported and the module stops BEFORE installing the driver, so nobody gets
the documented unsigned-module black screen; off/setup-mode skips signing
entirely (a MOK import is never processed when enforcement is off)
- bounded wait for the kmod build, so a reboot cannot land mid-build
- dnf mark user on the akmod; VA-API/vulkan offered as an opt-in extra
- never sets nvidia-drm.modeset=1 (RPM Fusion enables KMS; the flag conflicts
with Fedora's simpledrm patch)
- branch chosen from the chip family in the PCI name, not the device-id
ranges, which overlap between families
Tested with a stub harness (38 assertions, 14 scenarios): all four branch
mappings, multi-GPU warning, Optimus, pre-Fermi refusal, SB on/off/setup,
unparseable name fallback, idempotent re-run, build timeout.
yuri
merged commit fec520be9d into main2026-11-13 12:39:29 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Installs the NVIDIA driver branch that matches the card actually in the machine.
What it does
modules/user/nvidia.shdetects the GPU withlspci -nnand installs the branch that fits:GB/AD/GA/TUakmod-nvidia+xorg-x11-drv-nvidia-cudaGV/GP/GMakmod-nvidia-580xx+xorg-x11-drv-nvidia-580xx{,-cuda}GKakmod-nvidia-470xx+ ...GFakmod-nvidia-390xx+ ...The branch is derived from the chip family in the PCI name, not the numeric device-id ranges: those overlap between families, and a wrong guess installs a module the card cannot use. An unparseable name asks instead of guessing.
Safe ordering
mokutil --importthe akmods key, then stop before installing the driver and ask for a reboot. Installing an unsigned module while enforcement is on is the documented black-screen path, because the driver package blacklists nouveau as it lands. Re-run after MokManager enrolment.nvidia-drm.modeset=1anywhere: RPM Fusion's kernel package enables KMS, and the flag now conflicts with Fedora's simpledrm early-boot patch.Housekeeping
dnf mark useron the akmod, sodnf autoremovecannot take the driver and its compiler awayWiring
setup.shgains--nvidia=auto|no(defaultauto,yesaccepted as an alias), dispatched after the DE/TWM modules. Detected hardware decides the action: no prompt.--nvidia=nois the opt-out for nouveau or a hand-built driver. Summary section reports the module version.Testing
Stub harness, 14 scenarios / 38 assertions, all green: every branch mapping, multi-GPU warning, Optimus (3D controller), pre-Fermi refusal, SB on-without-key / on-with-key / off / setup, unparseable-name fallback, idempotent re-run, build timeout (no false success).
Known limit (same as the rest of this repo): the harness proves control flow, not package names.
akmod-nvidia*,xorg-x11-drv-nvidia*-cudaandlibva-nvidia-driverare taken from the RPM Fusion howto for F44, but a real F44 run is the actual proof. Also unproven on real hardware: the MokManager interaction itself (only the pre-install gate is tested).