From 0cbc36e2455c780b34f6329e4e71640b341eb658 Mon Sep 17 00:00:00 2001 From: Emre Cebi Date: Mon, 18 Mar 2024 21:50:42 +0100 Subject: [PATCH] ASUS TUF FA507NV added. --- README.md | 1 + asus/fa507nv/README.md | 2 ++ asus/fa507nv/default.nix | 21 +++++++++++++++++++++ common/gpu/nvidia/prime-sync.nix | 10 ++++++++++ flake.nix | 2 ++ 5 files changed, 36 insertions(+) create mode 100644 asus/fa507nv/README.md create mode 100644 asus/fa507nv/default.nix create mode 100644 common/gpu/nvidia/prime-sync.nix diff --git a/README.md b/README.md index be88d61..1e1ba98 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,7 @@ See code for all available configurations. | [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | | [Asus TUF FA507RM](asus/fa507rm) | `` | +| [Asus TUF FA507NV](asus/fa507nv) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Deciso DEC series](deciso/dec) | `` | | [Dell G3 3779](dell/g3/3779) | `` | diff --git a/asus/fa507nv/README.md b/asus/fa507nv/README.md new file mode 100644 index 0000000..2ff39bf --- /dev/null +++ b/asus/fa507nv/README.md @@ -0,0 +1,2 @@ +# ASUS TUF A15 FA507NV +As Nvidia offload is not available for AMD CPU, nvidia prime is using sync. Additionally the kernel is set to latest as the keyboard and wireless drivers does not work in the default LTS kernel. \ No newline at end of file diff --git a/asus/fa507nv/default.nix b/asus/fa507nv/default.nix new file mode 100644 index 0000000..ca534c7 --- /dev/null +++ b/asus/fa507nv/default.nix @@ -0,0 +1,21 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../common/cpu/amd + ../../common/cpu/amd/raphael/igpu.nix + ../../common/cpu/amd/pstate.nix + ../../common/gpu/nvidia + ../../common/gpu/nvidia/prime-sync.nix + ../../common/hidpi.nix + ../../common/pc/laptop + ../../common/pc/ssd + ]; + + boot.kernelPackages = pkgs.linuxPackages_latest; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:54:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + } diff --git a/common/gpu/nvidia/prime-sync.nix b/common/gpu/nvidia/prime-sync.nix new file mode 100644 index 0000000..245fae3 --- /dev/null +++ b/common/gpu/nvidia/prime-sync.nix @@ -0,0 +1,10 @@ +{ lib, config, ... }: + +{ + imports = [ ./. ]; + + hardware.nvidia.prime = { + # For people who want to use sync insted of offload. Esipecially for AMD CPU users + sync.enable = lib.mkOverride 990 true; + }; +} diff --git a/flake.nix b/flake.nix index 0a245a3..123f9f2 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,7 @@ asus-battery = import ./asus/battery.nix; asus-ally-rc71l = import ./asus/ally/rc71l; asus-fx504gd = import ./asus/fx504gd; + asus-fa507nv = import ./asus/fa507nv; asus-fa507rm = import ./asus/fa507rm; asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace; asus-rog-strix-g513im = import ./asus/rog-strix/g513im; @@ -249,6 +250,7 @@ common-gpu-intel = import ./common/gpu/intel; common-gpu-intel-disable = import ./common/gpu/intel/disable.nix; common-gpu-nvidia = import ./common/gpu/nvidia/prime.nix; + common-gpu-nvidia-sync = import ./common/gpu/nvidia/prime-sync.nix; common-gpu-nvidia-nonprime = import ./common/gpu/nvidia; common-gpu-nvidia-disable = import ./common/gpu/nvidia/disable.nix; common-hidpi = import ./common/hidpi.nix;