From 455496f1b4a2318924326ba1cbde9b485a3dac57 Mon Sep 17 00:00:00 2001 From: Kourosh Tafreshi Date: Thu, 28 Sep 2023 12:31:15 +0300 Subject: [PATCH] chore: Add DELL XPS 9510 --- dell/xps/15-9510/README.wiki | 22 ++++++++++++++++++++++ dell/xps/15-9510/default.nix | 18 ++++++++++++++++++ dell/xps/15-9510/nvidia/default.nix | 15 +++++++++++++++ flake.nix | 2 ++ 4 files changed, 57 insertions(+) create mode 100644 dell/xps/15-9510/README.wiki create mode 100644 dell/xps/15-9510/default.nix create mode 100644 dell/xps/15-9510/nvidia/default.nix diff --git a/dell/xps/15-9510/README.wiki b/dell/xps/15-9510/README.wiki new file mode 100644 index 0000000..ed8139b --- /dev/null +++ b/dell/xps/15-9510/README.wiki @@ -0,0 +1,22 @@ += Dell XPS 15 9510 = + +== Tested Hardware == + +* CPU: 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz +* RAM: 32 GB +* HDD: 1 TiB SSD +* Screen: 15" FHD+ (1920✕1200) +* Graphics: NVIDIA Corporation GA107M [GeForce RTX 3050 Ti Mobile] (rev a1), with Intel Corporation TigerLake-H GT1 [UHD Graphics] (rev 01). +* Input: Trackpad. + +== Notes == + +Also tested with Dell WD19S Thunderbolt Dock. + +== NVIDIA Offload == + +In order to run a program on the NVIDIA gpu, you can use the `nvidia-offload` function, for example: +``` +nvidia-offload `nix-shell -p glxinfo --run 'glxgears'` +``` +This is a short bash script that sets the proper environment variables and calls your command. diff --git a/dell/xps/15-9510/default.nix b/dell/xps/15-9510/default.nix new file mode 100644 index 0000000..f4b0eec --- /dev/null +++ b/dell/xps/15-9510/default.nix @@ -0,0 +1,18 @@ +{ lib, ... }: +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + # This will save you money and possibly your life! + services.thermald.enable = lib.mkDefault true; + + # WiFi speed is slow and crashes by default (https://bugzilla.kernel.org/show_bug.cgi?id=213381) + # disable_11ax - required until ax driver support is fixed + # power_save - works well on this card + boot.extraModprobeConfig = '' + options iwlwifi power_save=1 disable_11ax=1 + ''; +} diff --git a/dell/xps/15-9510/nvidia/default.nix b/dell/xps/15-9510/nvidia/default.nix new file mode 100644 index 0000000..257462a --- /dev/null +++ b/dell/xps/15-9510/nvidia/default.nix @@ -0,0 +1,15 @@ +{ lib, ... }: +{ + imports = [ + ../default.nix + ../../../../common/gpu/nvidia/prime.nix + ]; + + hardware.nvidia.prime = { + # Bus ID of the Intel GPU. + intelBusId = lib.mkDefault "PCI:0:2:0"; + + # Bus ID of the NVIDIA GPU. + nvidiaBusId = lib.mkDefault "PCI:1:0:0"; + }; +} diff --git a/flake.nix b/flake.nix index da43104..17b90b3 100644 --- a/flake.nix +++ b/flake.nix @@ -50,6 +50,8 @@ dell-xps-15-7590-nvidia = import ./dell/xps/15-7590/nvidia; dell-xps-15-9500 = import ./dell/xps/15-9500; dell-xps-15-9500-nvidia = import ./dell/xps/15-9500/nvidia; + dell-xps-15-9510 = import ./dell/xps/15-9510; + dell-xps-15-9510-nvidia = import ./dell/xps/15-9510/nvidia; dell-xps-15-9520 = import ./dell/xps/15-9520; dell-xps-15-9520-nvidia = import ./dell/xps/15-9520/nvidia; dell-xps-15-9550 = import ./dell/xps/15-9550;