From 0a944f8c6840f63a7c289580d427e0c1cd3ec3af Mon Sep 17 00:00:00 2001 From: fidgetingbits Date: Mon, 13 May 2024 08:53:53 +0800 Subject: [PATCH] dell/precision/7520: init --- README.md | 1 + dell/precision/7520/README.md | 67 +++++++++++++++++++++++++++++++++ dell/precision/7520/default.nix | 50 ++++++++++++++++++++++++ flake.nix | 1 + 4 files changed, 119 insertions(+) create mode 100644 dell/precision/7520/README.md create mode 100644 dell/precision/7520/default.nix diff --git a/README.md b/README.md index 6c8bfb2..ae31ca1 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,7 @@ See code for all available configurations. | [Dell Poweredge R7515](dell/poweredge/r7515) | `` | | [Dell Precision 3541](dell/precision/3541) | `` | | [Dell Precision 5530](dell/precision/5530) | `` | +| [Dell Precision 7520](dell/precision/7520) | `` | | [Dell XPS 13 7390](dell/xps/13-7390) | `` | | [Dell XPS 13 9300](dell/xps/13-9300) | `` | | [Dell XPS 13 9310](dell/xps/13-9310) | `` | diff --git a/dell/precision/7520/README.md b/dell/precision/7520/README.md new file mode 100644 index 0000000..b5c0946 --- /dev/null +++ b/dell/precision/7520/README.md @@ -0,0 +1,67 @@ +# Dell Precision 7520 + +This configuration opts to use the non-free nvidia driver, as UI glitching was often observed with `nouveau` when using +a compositor. + +## Device Details + +- Dell Precision 7520 (07B0) +- Intel Core i7-7820HQ CPU (Kaby Lake) +- 32GB RAM +- SK hynix SC311 SATA 1TB +- Intel HD Graphics 630 (Coffee Lake) +- NVIDIA GM206GLM [Quadro M2200 Mobile] + +## Tested Hardware + +```bash +❯ lspci -nn +00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:5910] (rev 05) +00:01.0 PCI bridge [0604]: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 05) +00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 630 [8086:591b] (rev 04) +00:04.0 Signal processing controller [1180]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [8086:1903] (rev 05) +00:14.0 USB controller [0c03]: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller [8086:a12f] (rev 31) +00:14.2 Signal processing controller [1180]: Intel Corporation 100 Series/C230 Series Chipset Family Thermal Subsystem [8086:a131] (rev 31) +00:15.0 Signal processing controller [1180]: Intel Corporation 100 Series/C230 Series Chipset Family Serial IO I2C Controller #0 [8086:a160] (rev 31) +00:15.1 Signal processing controller [1180]: Intel Corporation 100 Series/C230 Series Chipset Family Serial IO I2C Controller #1 [8086:a161] (rev 31) +00:16.0 Communication controller [0780]: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 [8086:a13a] (rev 31) +00:17.0 RAID bus controller [0104]: Intel Corporation SATA Controller [RAID mode] [8086:2822] (rev 31) +00:1c.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #2 [8086:a111] (rev f1) +00:1c.2 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #3 [8086:a112] (rev f1) +00:1c.4 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #5 [8086:a114] (rev f1) +00:1f.0 ISA bridge [0601]: Intel Corporation CM238 Chipset LPC/eSPI Controller [8086:a154] (rev 31) +00:1f.2 Memory controller [0580]: Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller [8086:a121] (rev 31) +00:1f.3 Audio device [0403]: Intel Corporation CM238 HD Audio Controller [8086:a171] (rev 31) +00:1f.4 SMBus [0c05]: Intel Corporation 100 Series/C230 Series Chipset Family SMBus [8086:a123] (rev 31) +00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (5) I219-LM [8086:15e3] (rev 31) +01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM206GLM [Quadro M2200 Mobile] [10de:1436] (rev a1) +01:00.1 Audio device [0403]: NVIDIA Corporation GM206 High Definition Audio Controller [10de:0fba] (rev a1) +02:00.0 Network controller [0280]: Intel Corporation Wireless 8265 / 8275 [8086:24fd] (rev 78) +03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader [10ec:525a] (rev 01) +04:00.0 PCI bridge [0604]: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] [8086:15da] (rev 02) +05:00.0 PCI bridge [0604]: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] [8086:15da] (rev 02) +05:01.0 PCI bridge [0604]: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] [8086:15da] (rev 02) +05:02.0 PCI bridge [0604]: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] [8086:15da] (rev 02) +3c:00.0 USB controller [0c03]: Intel Corporation JHL6340 Thunderbolt 3 USB 3.1 Controller (C step) [Alpine Ridge 2C 2016] [8086:15db] (rev 02) +``` + +## Doesn't work + +- External monitor for luks passphrase entry + +## Firmware Upgrades + +Note that this device is supported by fwupd. To perform firmware upgrades just activate the service: + +```nix +services.fwupd.enable = true; +``` + +Then use `fwupdmgr` to perform updates + +## Nvidia Driver + +The choice of the `legacy_390` driver is based on looking for PCI Device ID `10de:1436`. On the [nvidia driver site](https://www.nvidia.com/en-us/drivers/unix/legacy-gpu/) which should indicate the +driver, the exact device isn't listed. However, we can see +[here](https://linux-hardware.org/?id=pci:10de-1436-103c-1909) has nvidia driver "375.82 and newer" listed. Since the +newest nvidia drivers don't support legacy devices, the closest version newer than 375.82 was chosen. diff --git a/dell/precision/7520/default.nix b/dell/precision/7520/default.nix new file mode 100644 index 0000000..c20ea89 --- /dev/null +++ b/dell/precision/7520/default.nix @@ -0,0 +1,50 @@ +{ + config, + lib, + pkgs, + inputs, + ... +}: { + imports = [ + ../../../common/cpu/intel/kaby-lake + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ../../../common/gpu/nvidia + ]; + hardware.enableRedistributableFirmware = lib.mkDefault true; + + boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"]; + + boot = { + kernelModules = ["kvm-intel"]; + blacklistedKernelModules = ["nouveau"]; + }; + boot.kernelParams = ["i915.modeset=1"]; + + hardware.nvidia = { + package = config.boot.kernelPackages.nvidiaPackages.legacy_390; + nvidiaSettings = lib.mkDefault true; + modesetting.enable = lib.mkDefault true; + open = lib.mkDefault false; + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + hardware.opengl = { + enable = lib.mkDefault true; + driSupport = lib.mkDefault true; + driSupport32Bit = lib.mkDefault true; + }; + + # Override the intel gpu driver setting imported above + environment.variables = { + VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkOverride 990 "nvidia"); + }; + + services.thermald.enable = lib.mkDefault true; + + # available cpufreq governors: performance powersave + # The powersave mode locks the cpu to a 900mhz frequency which is not ideal + powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; +} diff --git a/flake.nix b/flake.nix index 09aefdc..a025df1 100644 --- a/flake.nix +++ b/flake.nix @@ -47,6 +47,7 @@ dell-poweredge-r7515 = import ./dell/poweredge/r7515; dell-precision-3541 = import ./dell/precision/3541; dell-precision-5530 = import ./dell/precision/5530; + dell-precision-7520 = import ./dell/precision/7520; dell-xps-13-7390 = import ./dell/xps/13-7390; dell-xps-13-9300 = import ./dell/xps/13-9300; dell-xps-13-9310 = import ./dell/xps/13-9310;