Skip to content

Commit fd83b94

Browse files
Mic92JohnAZoidberg
andcommitted
framework-16-amd-ai-300-series: add nvidia submodule
Add a dedicated submodule for Framework Laptop 16 AMD AI 300 Series with NVIDIA dGPU (RTX 5070). This provides hybrid graphics configuration with PRIME offload, allowing the AMD iGPU to run by default for better battery life while making the NVIDIA dGPU available on demand via nvidia-offload. Exposed as nixosModules.framework-16-amd-ai-300-series-nvidia Co-authored-by: Daniel Schaefer <dhs@frame.work>
1 parent 899dc44 commit fd83b94

File tree

3 files changed

+59
-4
lines changed

3 files changed

+59
-4
lines changed

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@
173173
framework-amd-ai-300-series = import ./framework/13-inch/amd-ai-300-series;
174174
framework-16-7040-amd = import ./framework/16-inch/7040-amd;
175175
framework-16-amd-ai-300-series = import ./framework/16-inch/amd-ai-300-series;
176+
framework-16-amd-ai-300-series-nvidia = import ./framework/16-inch/amd-ai-300-series/nvidia;
176177
framework-desktop-amd-ai-max-300-series = import ./framework/desktop/amd-ai-max-300-series;
177178
friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4;
178179
friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s;

framework/16-inch/amd-ai-300-series/README.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,40 @@
11
# [Framework Laptop 16 AMD AI 300 Series](https://frame.work/)
22

3-
## nvidia
3+
## NVIDIA dGPU Module
44

5-
If you have an nvidia dGPU module, you can enable it via the nvidia open drivers:
5+
If you have an NVIDIA dGPU module (GeForce RTX 5070 or similar), use the nvidia submodule:
66

7+
```nix
8+
{
9+
imports = [
10+
nixos-hardware.nixosModules.framework-16-amd-ai-300-series-nvidia
11+
];
12+
}
713
```
8-
services.xserver.videoDrivers = [ "nvidia" ];
9-
hardware.nvidia.open = true; # see the note above
14+
15+
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>`.
16+
17+
**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:
18+
19+
```nix
20+
{
21+
hardware.nvidia.prime = {
22+
amdgpuBusId = "PCI:195:0:0"; # Adjust to your system
23+
nvidiaBusId = "PCI:194:0:0"; # Adjust to your system
24+
};
25+
}
26+
```
27+
28+
Find your bus IDs with:
29+
30+
```sh
31+
$ lspci | grep -E "VGA|3D|Display"
32+
c2:00.0 VGA compatible controller: NVIDIA Corporation ...
33+
c3:00.0 Display controller: Advanced Micro Devices ...
1034
```
1135

36+
Convert the hex bus ID to decimal (e.g., `c2:00.0``PCI:194:0:0`, `c3:00.0``PCI:195:0:0`).
37+
1238
See also [NVIDIA](https://wiki.nixos.org/wiki/NVIDIA) on the NixOS Wiki.
1339

1440
## Updating Firmware
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{ lib, ... }:
2+
3+
{
4+
imports = [
5+
../.
6+
../../../../common/gpu/nvidia/blackwell
7+
../../../../common/gpu/nvidia/prime.nix
8+
];
9+
10+
# Explicitly set nvidia as video driver to override modesetting from AMD module
11+
services.xserver.videoDrivers = [ "nvidia" ];
12+
13+
hardware.nvidia = {
14+
# Hybrid graphics with PRIME offload for better battery life
15+
# AMD iGPU by default, NVIDIA dGPU on demand via nvidia-offload command
16+
prime = {
17+
# WARNING: These defaults may not match your system!
18+
# Bus IDs vary depending on installed expansion cards and NVMe drives.
19+
# You MUST override these values - see README.md for instructions.
20+
# Bus IDs can be found with `lspci | grep -E "VGA|3D|Display"`
21+
amdgpuBusId = lib.mkDefault "PCI:195:0:0";
22+
nvidiaBusId = lib.mkDefault "PCI:194:0:0";
23+
};
24+
25+
# Power management for hybrid graphics
26+
powerManagement.enable = lib.mkDefault true;
27+
};
28+
}

0 commit comments

Comments
 (0)