From d31d8077bb848bb71af1f1e9ebca2d0581db902b Mon Sep 17 00:00:00 2001 From: Dmitry <1315874+dniku@users.noreply.github.com> Date: Mon, 29 Dec 2025 20:58:36 +0000 Subject: [PATCH 1/3] Revise README for AMD AI 300 Series modules Updated README to reflect changes in module recommendations and added instructions for hybrid graphics setup. --- framework/16-inch/amd-ai-300-series/README.md | 77 ++++++++++++++++--- 1 file changed, 67 insertions(+), 10 deletions(-) diff --git a/framework/16-inch/amd-ai-300-series/README.md b/framework/16-inch/amd-ai-300-series/README.md index d05fa87..8c2cfb8 100644 --- a/framework/16-inch/amd-ai-300-series/README.md +++ b/framework/16-inch/amd-ai-300-series/README.md @@ -1,8 +1,22 @@ -# [Framework Laptop 16 AMD AI 300 Series](https://frame.work/) +# [Framework Laptop 16 — AMD Ryzen AI 300 Series](https://frame.work/) -## NVIDIA dGPU Module +## Recommended modules -If you have an NVIDIA dGPU module (GeForce RTX 5070 or similar), use the nvidia submodule: +### Base (no NVIDIA dGPU module) + +Use the base module: + +```nix +{ + imports = [ + nixos-hardware.nixosModules.framework-16-amd-ai-300-series + ]; +} +``` + +### NVIDIA dGPU module (RTX 5070 etc.) + +If you have the Framework 16 NVIDIA dGPU module (GeForce RTX 5070 or similar), use the NVIDIA submodule: ```nix { @@ -14,7 +28,9 @@ If you have an NVIDIA dGPU module (GeForce RTX 5070 or similar), use the nvidia 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 `. -**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: +#### 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 { @@ -28,24 +44,65 @@ This enables hybrid graphics with PRIME offload: the AMD iGPU runs by default fo Find your bus IDs with: ```sh -$ lspci | grep -E "VGA|3D|Display" +$ nix shell nixpkgs#pciutils -c 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. +Helper: -## Updating Firmware +```sh +# Replace BDF with the lspci value like c2:00.0 +BDF="c2:00.0" +BUS="${BDF%%:*}"; REST="${BDF#*:}" +DEV="${REST%%.*}"; FUN="${REST#*.}" +printf 'PCI:%d:%d:%d\n' "$((16#$BUS))" "$((16#$DEV))" "$FUN" +``` -Everything is updateable through fwupd, so it's enabled by default. +#### Validate hybrid / offload behavior -To get the latest firmware, run: +```sh +# Default should use AMD +nix shell nixpkgs#mesa-demos -c glxinfo -B | grep -E "OpenGL vendor|OpenGL renderer" + +# Offload should use NVIDIA +nix shell nixpkgs#mesa-demos -c nvidia-offload glxinfo -B | grep -E "OpenGL vendor|OpenGL renderer" +``` + +To check whether the NVIDIA GPU is runtime-suspending at idle: + +```sh +# Replace with your NVIDIA PCI address (from `nix shell nixpkgs#pciutils -c lspci -D`) +cat /sys/bus/pci/devices/0000:??:??.?/power/runtime_status +``` + +Note: running `nvidia-smi` can wake the GPU, so it is not a reliable “is it sleeping?” probe. + +#### Optional: Battery-saver boot entry + +If you want an easy “iGPU-only” boot entry (to maximize battery life and avoid loading NVIDIA at all), you can enable the PRIME battery saver specialisation: + +```nix +{ + hardware.nvidia.primeBatterySaverSpecialisation = true; +} +``` + +This creates an additional boot entry tagged `battery-saver`. + +#### Troubleshooting notes + +* If suspend/resume fails after heavy GPU/VRAM usage, see the NixOS NVIDIA wiki for power management / VRAM save notes: https://wiki.nixos.org/wiki/NVIDIA + +## Firmware updates (fwupd) + +Firmware is updatable via `fwupd` (enabled by default). To get the latest firmware: ```sh $ fwupdmgr refresh $ fwupdmgr update ``` -- [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop16.RyzenAI300.BIOS.firmware) +* Latest BIOS update on LVFS: https://fwupd.org/lvfs/devices/work.frame.Laptop16.RyzenAI300.BIOS.firmware From 838481adb596e2d92b03dbf9baf5659ff79d5524 Mon Sep 17 00:00:00 2001 From: Dmitry <1315874+dniku@users.noreply.github.com> Date: Tue, 30 Dec 2025 11:23:51 +0000 Subject: [PATCH 2/3] Update README for nix-shell command usage --- framework/16-inch/amd-ai-300-series/README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/framework/16-inch/amd-ai-300-series/README.md b/framework/16-inch/amd-ai-300-series/README.md index 8c2cfb8..11aa900 100644 --- a/framework/16-inch/amd-ai-300-series/README.md +++ b/framework/16-inch/amd-ai-300-series/README.md @@ -44,7 +44,7 @@ The default values are examples only and will likely not match your hardware. Du Find your bus IDs with: ```sh -$ nix shell nixpkgs#pciutils -c lspci | grep -E "VGA|3D|Display" +$ nix-shell -p pciutils --run 'lspci | grep -E "VGA|3D|Display"' c2:00.0 VGA compatible controller: NVIDIA Corporation ... c3:00.0 Display controller: Advanced Micro Devices ... ``` @@ -65,16 +65,16 @@ printf 'PCI:%d:%d:%d\n' "$((16#$BUS))" "$((16#$DEV))" "$FUN" ```sh # Default should use AMD -nix shell nixpkgs#mesa-demos -c glxinfo -B | grep -E "OpenGL vendor|OpenGL renderer" +nix-shell -p mesa-demos --run 'glxinfo -B | grep -E "OpenGL vendor|OpenGL renderer"' # Offload should use NVIDIA -nix shell nixpkgs#mesa-demos -c nvidia-offload glxinfo -B | grep -E "OpenGL vendor|OpenGL renderer" +nix-shell -p mesa-demos --run 'nvidia-offload glxinfo -B | grep -E "OpenGL vendor|OpenGL renderer"' ``` To check whether the NVIDIA GPU is runtime-suspending at idle: ```sh -# Replace with your NVIDIA PCI address (from `nix shell nixpkgs#pciutils -c lspci -D`) +# Replace with your NVIDIA PCI address (from `nix-shell -p pciutils --run 'lspci -D'`) cat /sys/bus/pci/devices/0000:??:??.?/power/runtime_status ``` @@ -106,3 +106,4 @@ $ fwupdmgr update ``` * Latest BIOS update on LVFS: https://fwupd.org/lvfs/devices/work.frame.Laptop16.RyzenAI300.BIOS.firmware + From 6388e5a77bce34abc09b45148100c25824268f31 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 31 Dec 2025 09:59:50 +0000 Subject: [PATCH 3/3] Address stylistic suggestions --- framework/16-inch/amd-ai-300-series/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/framework/16-inch/amd-ai-300-series/README.md b/framework/16-inch/amd-ai-300-series/README.md index 11aa900..f02bb8b 100644 --- a/framework/16-inch/amd-ai-300-series/README.md +++ b/framework/16-inch/amd-ai-300-series/README.md @@ -74,8 +74,8 @@ nix-shell -p mesa-demos --run 'nvidia-offload glxinfo -B | grep -E "OpenGL vendo To check whether the NVIDIA GPU is runtime-suspending at idle: ```sh -# Replace with your NVIDIA PCI address (from `nix-shell -p pciutils --run 'lspci -D'`) -cat /sys/bus/pci/devices/0000:??:??.?/power/runtime_status +# Reuse $BDF from above +cat /sys/bus/pci/devices/0000:$BDF/power/runtime_status ``` Note: running `nvidia-smi` can wake the GPU, so it is not a reliable “is it sleeping?” probe. @@ -105,5 +105,4 @@ $ fwupdmgr refresh $ fwupdmgr update ``` -* Latest BIOS update on LVFS: https://fwupd.org/lvfs/devices/work.frame.Laptop16.RyzenAI300.BIOS.firmware - +- [Latest BIOS update on LVFS](https://fwupd.org/lvfs/devices/work.frame.Laptop16.RyzenAI300.BIOS.firmware)