mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-30 22:21:07 +01:00
Merge pull request #1684 from NixOS/framework-16-amd-ai-300-nvidia
framework-16-amd-ai-300-series: add nvidia submodule
This commit is contained in:
commit
d62603a997
3 changed files with 59 additions and 4 deletions
|
|
@ -173,6 +173,7 @@
|
|||
framework-amd-ai-300-series = import ./framework/13-inch/amd-ai-300-series;
|
||||
framework-16-7040-amd = import ./framework/16-inch/7040-amd;
|
||||
framework-16-amd-ai-300-series = import ./framework/16-inch/amd-ai-300-series;
|
||||
framework-16-amd-ai-300-series-nvidia = import ./framework/16-inch/amd-ai-300-series/nvidia;
|
||||
framework-desktop-amd-ai-max-300-series = import ./framework/desktop/amd-ai-max-300-series;
|
||||
friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4;
|
||||
friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,40 @@
|
|||
# [Framework Laptop 16 AMD AI 300 Series](https://frame.work/)
|
||||
|
||||
## nvidia
|
||||
## NVIDIA dGPU Module
|
||||
|
||||
If you have an nvidia dGPU module, you can enable it via the nvidia open drivers:
|
||||
If you have an NVIDIA dGPU module (GeForce RTX 5070 or similar), use the nvidia submodule:
|
||||
|
||||
```nix
|
||||
{
|
||||
imports = [
|
||||
nixos-hardware.nixosModules.framework-16-amd-ai-300-series-nvidia
|
||||
];
|
||||
}
|
||||
```
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia.open = true; # see the note above
|
||||
|
||||
This enables hybrid graphics with PRIME offload: the AMD iGPU runs by default for better battery life, and the NVIDIA dGPU can be used on demand with `nvidia-offload <command>`.
|
||||
|
||||
**IMPORTANT:** You MUST override the PCI bus IDs for your specific system. The default values are examples only and will likely not match your hardware. Due to Framework 16's modular design, bus IDs vary depending on installed expansion cards and NVMe drives:
|
||||
|
||||
```nix
|
||||
{
|
||||
hardware.nvidia.prime = {
|
||||
amdgpuBusId = "PCI:195:0:0"; # Adjust to your system
|
||||
nvidiaBusId = "PCI:194:0:0"; # Adjust to your system
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Find your bus IDs with:
|
||||
|
||||
```sh
|
||||
$ lspci | grep -E "VGA|3D|Display"
|
||||
c2:00.0 VGA compatible controller: NVIDIA Corporation ...
|
||||
c3:00.0 Display controller: Advanced Micro Devices ...
|
||||
```
|
||||
|
||||
Convert the hex bus ID to decimal (e.g., `c2:00.0` → `PCI:194:0:0`, `c3:00.0` → `PCI:195:0:0`).
|
||||
|
||||
See also [NVIDIA](https://wiki.nixos.org/wiki/NVIDIA) on the NixOS Wiki.
|
||||
|
||||
## Updating Firmware
|
||||
|
|
|
|||
28
framework/16-inch/amd-ai-300-series/nvidia/default.nix
Normal file
28
framework/16-inch/amd-ai-300-series/nvidia/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../../common/gpu/nvidia/blackwell
|
||||
../../../../common/gpu/nvidia/prime.nix
|
||||
];
|
||||
|
||||
# Explicitly set nvidia as video driver to override modesetting from AMD module
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
# Hybrid graphics with PRIME offload for better battery life
|
||||
# AMD iGPU by default, NVIDIA dGPU on demand via nvidia-offload command
|
||||
prime = {
|
||||
# WARNING: These defaults may not match your system!
|
||||
# Bus IDs vary depending on installed expansion cards and NVMe drives.
|
||||
# You MUST override these values - see README.md for instructions.
|
||||
# Bus IDs can be found with `lspci | grep -E "VGA|3D|Display"`
|
||||
amdgpuBusId = lib.mkDefault "PCI:195:0:0";
|
||||
nvidiaBusId = lib.mkDefault "PCI:194:0:0";
|
||||
};
|
||||
|
||||
# Power management for hybrid graphics
|
||||
powerManagement.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue