diff --git a/README.md b/README.md index 0fd29dd..7f68e2a 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,7 @@ See code for all available configurations. | [Dell Latitude 7430](dell/latitude/7430) | `` | | [Dell Latitude 7490](dell/latitude/7490) | `` | | [Dell Poweredge R7515](dell/poweredge/r7515) | `` | +| [Dell Precision 3541](dell/precision/3541) | `` | | [Dell Precision 5530](dell/precision/5530) | `` | | [Dell XPS 13 7390](dell/xps/13-7390) | `` | | [Dell XPS 13 9300](dell/xps/13-9300) | `` | @@ -109,6 +110,8 @@ See code for all available configurations. | [Dell XPS 15 7590](dell/xps/15-7590) | `` | | [Dell XPS 15 9500, nvidia](dell/xps/15-9500/nvidia) | `` | | [Dell XPS 15 9500](dell/xps/15-9500) | `` | +| [Dell XPS 15 9520, nvidia](dell/xps/15-9520/nvidia) | `` | +| [Dell XPS 15 9520](dell/xps/15-9520) | `` | | [Dell XPS 15 9550, nvidia](dell/xps/15-9550/nvidia) | `` | | [Dell XPS 15 9550](dell/xps/15-9550) | `` | | [Dell XPS 15 9560, intel only](dell/xps/15-9560/intel) | `` | diff --git a/dell/precision/3541/default.nix b/dell/precision/3541/default.nix new file mode 100644 index 0000000..0dc2d74 --- /dev/null +++ b/dell/precision/3541/default.nix @@ -0,0 +1,28 @@ +{ lib, ... }: + +{ + imports = [ + ./intel + ]; + + # Boot loader + boot.kernelParams = [ + # fix lspci hanging with nouveau + # source https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1803179/comments/149 + "acpi_rev_override=1" + "acpi_osi=Linux" + "nouveau.modeset=0" + "pcie_aspm=force" + "drm.vblankoffdelay=1" + "nouveau.runpm=0" + "mem_sleep_default=deep" + # fix flicker + # source https://wiki.archlinux.org/index.php/Intel_graphics#Screen_flickering + "i915.enable_psr=0" + ]; + + boot.kernelModules = lib.mkDefault [ "kvm-intel" ]; + + # Recommended in NixOS/nixos-hardware#127 + services.thermald.enable = lib.mkDefault true; +} diff --git a/dell/precision/3541/intel/default.nix b/dell/precision/3541/intel/default.nix new file mode 100644 index 0000000..78a839d --- /dev/null +++ b/dell/precision/3541/intel/default.nix @@ -0,0 +1,9 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../../../common/cpu/intel + ../../../../common/pc/laptop + ../../../../common/gpu/nvidia/disable.nix + ]; +} diff --git a/dell/xps/15-9520/README.wiki b/dell/xps/15-9520/README.wiki new file mode 100644 index 0000000..dff5b2b --- /dev/null +++ b/dell/xps/15-9520/README.wiki @@ -0,0 +1,22 @@ += Dell XPS 15 9520 = + +== Tested Hardware == + +* CPU: Intel(R) Core(TM) i7-12700H CPU +* RAM: 32 GB +* HDD: 1 TiB SSD +* Screen: 15" 4k (3840✕2160) +* Graphics: NVIDIA Corporation GA107M [GeForce RTX 3050 Ti Mobile], with Intel Graphics too. +* Input: Touchscreen and trackpad. + +== Notes == + +Also tested with Dell WD19TB 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-9520/default.nix b/dell/xps/15-9520/default.nix new file mode 100644 index 0000000..f4b0eec --- /dev/null +++ b/dell/xps/15-9520/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-9520/nvidia/default.nix b/dell/xps/15-9520/nvidia/default.nix new file mode 100644 index 0000000..257462a --- /dev/null +++ b/dell/xps/15-9520/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 76b5a5a..cd7cbd7 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,7 @@ dell-latitude-7430 = import ./dell/latitude/7430; dell-latitude-7490 = import ./dell/latitude/7490; dell-poweredge-r7515 = import ./dell/poweredge/r7515; + dell-precision-3541 = import ./dell/precision/3541; dell-precision-5530 = import ./dell/precision/5530; dell-xps-13-7390 = import ./dell/xps/13-7390; dell-xps-13-9300 = import ./dell/xps/13-9300; @@ -44,6 +45,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-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; dell-xps-15-9550-nvidia = import ./dell/xps/15-9550/nvidia; dell-xps-15-9560 = import ./dell/xps/15-9560;