From 9fef72a2afd8f2e3b7a71e7af95fcab8f777d628 Mon Sep 17 00:00:00 2001 From: Ghislain Vaillant Date: Tue, 28 Feb 2023 12:09:36 +0100 Subject: [PATCH] dell-xps-15-7590: enable fwupd and deep sleep - This device supports firmware updates through `fwupd`. - Prefer deep sleep over s2idle which is inefficient. - Remove old cruft in the corresponding readme. --- dell/xps/15-7590/README.wiki | 33 +++++++++++---------------------- dell/xps/15-7590/default.nix | 14 +++++--------- 2 files changed, 16 insertions(+), 31 deletions(-) diff --git a/dell/xps/15-7590/README.wiki b/dell/xps/15-7590/README.wiki index 052df29..863ebc7 100644 --- a/dell/xps/15-7590/README.wiki +++ b/dell/xps/15-7590/README.wiki @@ -21,27 +21,6 @@ These settings are needed both for booting the final install, and installer itse * ''Disable Intel hardware RAID and use AHCI instead.'' Intel doesn't seem to provide a working linux driver for this. (If you just have SSD it's pointless and just slows things down needlessly anyways.) -=== Wifi === -~~Wifi does not work with kernels older than 5.1 (firmware not present) or newer~~ (https://bbs.archlinux.org/viewtopic.php?id=247705) - -Update: The 48.ucode causes the Killer wifi card to crash. The iwlfwifi-cc-a0-46.ucode works perfectly. -default.nix contains an overlay that removes the offending ucode from the linux-firmware bundle. -To use it one also needs to enable unfree firmware in their own configuration (hardware.enableRedistributableFirmware = true;) - -``` - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.grub = { - device = "nodev"; - efiSupport = true; - efiInstallAsRemovable = true; - }; - boot.loader.efi.canTouchEfiVariables = true; - boot.kernelPackages = pkgs.linuxPackages_5_1; -``` -Disable the `canTouchEfiVariables` after a boot or two to prevent NVRAM wearout. - - === After installation === * ''Add systemd-boot to UEFI boot list.'' The (uneditable anyways) settings mapping drive UUIDs to HD* work fine. @@ -50,5 +29,15 @@ Disable the `canTouchEfiVariables` after a boot or two to prevent NVRAM wearout. * ''Update BIOS.'' According to Reddit, this helps with battery life. -=== Troubleshooting === +== Firmware updates == + +This device is supported by [https://fwupd.org/ fwupd]. + +You may use fwupdmgr to perform firmware updates. + +== Power management == + +Deep sleep is preferred to the default S2 sleep mode, in order to reduce battery draining during suspend. + +See https://wiki.archlinux.org/title/Dell_XPS_15_(7590) diff --git a/dell/xps/15-7590/default.nix b/dell/xps/15-7590/default.nix index 54da3b2..5fd9b14 100644 --- a/dell/xps/15-7590/default.nix +++ b/dell/xps/15-7590/default.nix @@ -7,15 +7,8 @@ ../../../common/pc/ssd ]; - # Set to true for just the first run, then disable it. - # boot.loader.efi.canTouchEfiVariables = lib.mkDefault true; - - # Load GPU drivers. - # hardware.bumblebee.enable = lib.mkDefault true; - - # High DPI for X users. 175 "looks reasonable" but I didn't do the actual DPI - # calculation. - # services.xserver.dpi = lib.mkDefault 175; + # Force S3 sleep mode. See README.wiki for details. + boot.kernelParams = [ "mem_sleep_default=deep" ]; # Earlier font-size setup console.earlySetup = true; @@ -23,6 +16,9 @@ # Prevent small EFI partiion from filling up boot.loader.grub.configurationLimit = 10; + # Enable firmware updates via `fwupdmgr`. + services.fwupd.enable = lib.mkDefault true; + # This will save you money and possibly your life! services.thermald.enable = lib.mkDefault true; }