From 89a33c8e93a64d4f65ca3a2c7bc9da24216aa0b9 Mon Sep 17 00:00:00 2001 From: Nico Elbers Date: Mon, 1 Jul 2024 23:22:53 +0200 Subject: [PATCH 1/7] omen 16-n0280nd: init --- flake.nix | 1 + omen/16-n0280nd/README.md | 5 +++++ omen/16-n0280nd/default.nix | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 omen/16-n0280nd/README.md create mode 100644 omen/16-n0280nd/default.nix diff --git a/flake.nix b/flake.nix index 545253a..5eddd5a 100644 --- a/flake.nix +++ b/flake.nix @@ -232,6 +232,7 @@ omen-14-fb0798ng = import ./omen/14-fb0798ng; omen-15-en0010ca = import ./omen/15-en0010ca; omen-16-n0005ne = import ./omen/16-n0005ne; + omen-16-n0280nd = import ./omen/16-n0280nd; omen-15-en1007sa = import ./omen/15-en1007sa; omen-15-en0002np = import ./omen/15-en0002np; onenetbook-4 = import ./onenetbook/4; diff --git a/omen/16-n0280nd/README.md b/omen/16-n0280nd/README.md new file mode 100644 index 0000000..1fa601c --- /dev/null +++ b/omen/16-n0280nd/README.md @@ -0,0 +1,5 @@ +# HP Omen 16-n0280nd + +## ACPI platform profiles + +This config enables `hp-wmi`, which allows switch between cool, balanced, and performance modes on the platform EC, used by power management tools like `power-profile-daemon` and `tlp`. diff --git a/omen/16-n0280nd/default.nix b/omen/16-n0280nd/default.nix new file mode 100644 index 0000000..3929c66 --- /dev/null +++ b/omen/16-n0280nd/default.nix @@ -0,0 +1,21 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../common/cpu/amd + ../../common/cpu/amd/pstate.nix + ../../common/gpu/nvidia/prime.nix + ../../common/pc/laptop + ../../common/pc/ssd + ]; + + # Enables ACPI platform profiles + boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + kernelModules = [ "hp-wmi" ]; + }; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:6:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} From ece5b120143233d5d19a5e6034ae8bc879c21e7a Mon Sep 17 00:00:00 2001 From: Nico Elbers Date: Tue, 9 Jul 2024 20:43:37 +0200 Subject: [PATCH 2/7] update README for omen 16-n0280nd --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 12f3bec..727a119 100644 --- a/README.md +++ b/README.md @@ -292,6 +292,7 @@ See code for all available configurations. | [Omen 15-en0010ca](omen/14-fb0798ng) | `` | | [Omen 15-en0010ca](omen/15-en0010ca) | `` | | [Omen 16-n0005ne](omen/16-n0005ne) | `` | +| [Omen 16-n0280nd](/omen/16-n0280nd) | `` | | [Omen 15-en1007sa](omen/15-en1007sa) | `` | | [Omen 15-en0002np](omen/15-en0002np) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | From 19e9c2fb7a9877f2864922276cd6ca62b07fa37a Mon Sep 17 00:00:00 2001 From: liamwb Date: Tue, 9 Jul 2024 14:02:17 +1000 Subject: [PATCH 3/7] naively pasted code from our forum discussion --- dell/xps/15-9560/default.nix | 42 ++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index aee5665..18be8fd 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -4,36 +4,30 @@ ../../../common/gpu/intel/kaby-lake ../../../common/pc/laptop ./xps-common.nix - - # FIXME: remove this when bumblebee works again - ../../../common/gpu/nvidia/disable.nix ]; +# enable opengpl and gpu drivers + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + }; - /* Bumblebee seems to fail to evaluate: - (stack trace truncated; use '--show-trace' to show the full trace) + services.xserver.videoDrivers = ["nvidia"]; - error: assertion '(useSettings -> (! libsOnly))' failed + hardware.nvidia.modesetting.enable = true; - at /home/joerg/git/nixpkgs/pkgs/os-specific/linux/nvidia-x11/generic.nix:61:1: + hardware.nvidia.prime = { + offload = { + enable = true; + enableOffloadCmd = true; # provides the nvidia-offload command + }; - 60| - 61| assert useSettings -> !libsOnly; - | ^ - 62| assert !libsOnly -> kernel != null; +# integrated + intelBusId = "PCI:0:2:0"; - # This configuration makes intel default and optionaly applications could run nvidia with optirun. - # To Optimize for your use case import intel or nvidia only configuration instead - # xps-9560/intel - # or - # xps-9560/nvidia +# dedicated + nvidiaBusId = "PCI:1:0:0"; + }; - - ##### bumblebee working, needs reboot to take affect and to use it run: optirun "" - services.xserver.videoDrivers = [ "intel" "nvidia" ]; - boot.blacklistedKernelModules = [ "nouveau" "bbswitch" ]; - boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ]; - hardware.bumblebee.enable = lib.mkDefault true; - hardware.bumblebee.pmMethod = lib.mkDefault "none"; - */ } From 42577dbb0f75c1288a26864e40da32a0d67de853 Mon Sep 17 00:00:00 2001 From: liamwb Date: Tue, 9 Jul 2024 14:13:07 +1000 Subject: [PATCH 4/7] removed parts that are included in other modules --- dell/xps/15-9560/default.nix | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index 18be8fd..d776fa5 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -4,30 +4,22 @@ ../../../common/gpu/intel/kaby-lake ../../../common/pc/laptop ./xps-common.nix + ../../../common/gpu/nvidia ]; -# enable opengpl and gpu drivers hardware.opengl = { enable = true; driSupport = true; driSupport32Bit = true; }; - services.xserver.videoDrivers = ["nvidia"]; - hardware.nvidia.modesetting.enable = true; hardware.nvidia.prime = { - offload = { - enable = true; - enableOffloadCmd = true; # provides the nvidia-offload command - }; - -# integrated + # integrated intelBusId = "PCI:0:2:0"; -# dedicated + # dedicated nvidiaBusId = "PCI:1:0:0"; }; - } From 6a4ecebce56727d0ae538b1277725cb03181124e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 9 Jul 2024 10:43:32 +0200 Subject: [PATCH 5/7] dell/xps/15-9560: use graphics option --- dell/xps/15-9560/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index d776fa5..6ad58f7 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -7,7 +7,7 @@ ../../../common/gpu/nvidia ]; - hardware.opengl = { + hardware.graphics = { enable = true; driSupport = true; driSupport32Bit = true; From 05672b50f70e47df282e974e07534d38df4f8fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 9 Jul 2024 10:48:01 +0200 Subject: [PATCH 6/7] dell/xps/15-9560: fix graphics options --- dell/xps/15-9560/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index 6ad58f7..510feab 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -7,11 +7,7 @@ ../../../common/gpu/nvidia ]; - hardware.graphics = { - enable = true; - driSupport = true; - driSupport32Bit = true; - }; + hardware.graphics.enable = true; hardware.nvidia.modesetting.enable = true; From ab165a8a6cd12781d76fe9cbccb9e975d0fb634f Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 2 Jul 2024 11:48:10 -0600 Subject: [PATCH 7/7] codeowners: Add Lyndeno for XPS-9560 This is my daily driver and I foresee this to be the case for a long while. Contributions directly to this model: - #691 - #696 Contributions indirectly affecting this model: - #692 --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/CODEOWNERS b/CODEOWNERS index 4525d6b..b197a5b 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,6 +1,7 @@ beagleboard/pocketbeagle @yegortimoshenko dell/xps/13-9370 @moredread dell/xps/13-9380 @kalbasit +dell/xps/15-9560 @Lyndeno lenovo/thinkpad/x230 @makefu @yegortimoshenko lenovo/thinkpad/x250 @Mic92 pcengines/apu @yegortimoshenko