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 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) | `` | diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index aee5665..510feab 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -4,36 +4,18 @@ ../../../common/gpu/intel/kaby-lake ../../../common/pc/laptop ./xps-common.nix - - # FIXME: remove this when bumblebee works again - ../../../common/gpu/nvidia/disable.nix + ../../../common/gpu/nvidia ]; + hardware.graphics.enable = true; - /* Bumblebee seems to fail to evaluate: - (stack trace truncated; use '--show-trace' to show the full trace) + hardware.nvidia.modesetting.enable = true; - error: assertion '(useSettings -> (! libsOnly))' failed + hardware.nvidia.prime = { + # integrated + intelBusId = "PCI:0:2:0"; - at /home/joerg/git/nixpkgs/pkgs/os-specific/linux/nvidia-x11/generic.nix:61:1: - - 60| - 61| assert useSettings -> !libsOnly; - | ^ - 62| assert !libsOnly -> kernel != null; - - # 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 - - - ##### 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"; - */ + # dedicated + nvidiaBusId = "PCI:1:0:0"; + }; } diff --git a/flake.nix b/flake.nix index 68a27fe..a1da1a5 100644 --- a/flake.nix +++ b/flake.nix @@ -233,6 +233,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"; + }; +}