From 7fd5585e07386e8cf1f335b3950e52dc1f7d4b5a Mon Sep 17 00:00:00 2001 From: RTUnreal <22859658+RTUnreal@users.noreply.github.com> Date: Thu, 4 Jan 2024 21:36:11 +0100 Subject: [PATCH 01/12] framework AMD 7040: add instructions on how to update fingerprint fw These are copied from the 13th-gen intel Framework README. They the same way. --- framework/13-inch/7040-amd/README.md | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/framework/13-inch/7040-amd/README.md b/framework/13-inch/7040-amd/README.md index be3293e..54bf5d7 100644 --- a/framework/13-inch/7040-amd/README.md +++ b/framework/13-inch/7040-amd/README.md @@ -27,3 +27,43 @@ As of firmware v03.03, a bug in the EC causes the system to wake if AC is connec ``` See [Framework AMD Ryzen 7040 Series lid wakeup behavior feedback](https://community.frame.work/t/tracking-framework-amd-ryzen-7040-series-lid-wakeup-behavior-feedback/39128/45). + +## Getting the fingerprint sensor to work + +The firmware on the fingerprint sensor needs a downgrade to make it work on Linux. +The process is documented [here](https://knowledgebase.frame.work/en_us/updating-fingerprint-reader-firmware-on-linux-for-13th-gen-and-amd-ryzen-7040-series-laptops-HJrvxv_za). + +However on recent NixOS versions also fwupd can no longer update the firmware. +Using the following snippet allows to temporarly downgrade fwupd to an old-enough version: + +```nix +{ + services.fwupd.enable = true; + # we need fwupd 1.9.7 to downgrade the fingerprint sensor firmware + services.fwupd.package = (import (builtins.fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/bb2009ca185d97813e75736c2b8d1d8bb81bde05.tar.gz"; + sha256 = "sha256:003qcrsq5g5lggfrpq31gcvj82lb065xvr7bpfa8ddsw8x4dnysk"; + }) { + inherit (pkgs) system; + }).fwupd; +} +``` + +Afterwards the downgraded driver can be downloaded and installed like this: + +``` +wget https://github.com/FrameworkComputer/linux-docs/raw/main/goodix-moc-609c-v01000330.cab +sudo fwupdtool install --allow-reinstall --allow-older goodix-moc-609c-v01000330.cab +Loading… [ - ]/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/f55npw04a2s6xmrbx4jw12xq16b3avb8-gvfs-1.52.1/lib/gio/modules/libgvfsdbus.so) +Failed to load module: /nix/store/f55npw04a2s6xmrbx4jw12xq16b3avb8-gvfs-1.52.1/lib/gio/modules/libgvfsdbus.so +Loading… [ ]12:16:46.348 FuHistory schema version 9 is unknown +Writing… [************************************* ]12:16:57.055 FuEngine failed to update-cleanup after failed update: failed to get device before update cleanup: failed to wait for detach replug: device d432baa2162a32c1554ef24bd8281953b9d07c11 did not come back + +failed to write: failed to reply: transfer timed out +``` + +The error message above is harmless. After a reboot, I was able to enroll my fingerprint like this: + +``` +sudo fprintd-enroll $USER +``` From 50944cf03617a586ae0dfd445c991ac8833a8c20 Mon Sep 17 00:00:00 2001 From: Astrid Yu Date: Thu, 4 Jan 2024 09:25:03 -0800 Subject: [PATCH 02/12] Add majorVersion option to 6.6.x --- microsoft/surface/common/kernel/linux-6.6.x/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/surface/common/kernel/linux-6.6.x/default.nix b/microsoft/surface/common/kernel/linux-6.6.x/default.nix index 645c4cf..1bd0345 100644 --- a/microsoft/surface/common/kernel/linux-6.6.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.6.x/default.nix @@ -28,7 +28,7 @@ let in { options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ version ]; + type = types.enum [ version majorVersion ]; }; config = mkIf (cfg.kernelVersion == version || cfg.kernelVersion == majorVersion) { From 3a6288ef8332ea79b618d40c7f113363286fc161 Mon Sep 17 00:00:00 2001 From: Tom Vincent Date: Fri, 29 Dec 2023 15:47:19 +0000 Subject: [PATCH 03/12] framework amd: apply headset mic fix on older kernels --- framework/13-inch/common/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/framework/13-inch/common/default.nix b/framework/13-inch/common/default.nix index e19b3f5..9f4a04a 100644 --- a/framework/13-inch/common/default.nix +++ b/framework/13-inch/common/default.nix @@ -6,9 +6,7 @@ # Fix TRRS headphones missing a mic # https://community.frame.work/t/headset-microphone-on-linux/12387/3 - # - # This is temporary until a kernel patch is submitted - boot.extraModprobeConfig = '' + boot.extraModprobeConfig = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6.8") '' options snd-hda-intel model=dell-headset-multi ''; From 03e00336034c75e67609e953ded47c23de7f90f7 Mon Sep 17 00:00:00 2001 From: Tom Vincent Date: Mon, 1 Jan 2024 17:39:02 +0000 Subject: [PATCH 04/12] framework amd: add pkgs import --- framework/13-inch/common/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/13-inch/common/default.nix b/framework/13-inch/common/default.nix index 9f4a04a..c79061a 100644 --- a/framework/13-inch/common/default.nix +++ b/framework/13-inch/common/default.nix @@ -1,4 +1,4 @@ -{ lib, ... }: { +{ lib, pkgs, ... }: { imports = [ ../../../common/pc/laptop ../../../common/pc/laptop/ssd From 172385318068519900a7d71c1024242fa6af75f0 Mon Sep 17 00:00:00 2001 From: Mika Tammi Date: Tue, 2 Jan 2024 11:57:09 +0200 Subject: [PATCH 05/12] microchip icicle-kit: Fixes to kernel * Improve by changing from legacy extraConfig to the structuredExtraConfig style kerenl configuration. * Remove few unneeded kernel modules from default configuration. * Make kernelPatches, structuredExtraConfig and extraMeta overrideable. * Change callPackage-style function to actually take the individual attributes from pkgs. * Get rid of recursive syntax. Signed-off-by: Mika Tammi --- microchip/common/bsp/linux-icicle-kit.nix | 100 +++++++++++----------- microchip/common/modules.nix | 9 +- 2 files changed, 53 insertions(+), 56 deletions(-) diff --git a/microchip/common/bsp/linux-icicle-kit.nix b/microchip/common/bsp/linux-icicle-kit.nix index 2bf1951..6ac1eb1 100644 --- a/microchip/common/bsp/linux-icicle-kit.nix +++ b/microchip/common/bsp/linux-icicle-kit.nix @@ -1,64 +1,60 @@ -{ pkgs, ... } @ args: +{ lib, buildLinux, fetchFromGitHub +, kernelPatches ? [] +, structuredExtraConfig ? {} +, extraMeta ? {} +, argsOverride ? {} +, ... } @ args: -with pkgs; - -buildLinux (args // rec { +let version = "6.1.43-linux4microchip+fpga-2023.09"; +in buildLinux (args // { + inherit version kernelPatches extraMeta; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = version; defconfig = "mpfs_defconfig"; - kernelPatches = [ - ]; - autoModules = false; - extraConfig = '' - OF_OVERLAY y - OF_CONFIGFS y - MFD_SENSEHAT_CORE m - INPUT_JOYDEV m - INPUT_JOYSTICK y - JOYSTICK_SENSEHAT m - AUXDISPLAY y - SENSEHAT_DISPLAY m - HTS221 m - IIO_ST_PRESS m - IIO_ST_LSM6DSX m - IIO_ST_MAGN_3AXIS m - POLARFIRE_SOC_DMA_NONCOHERENT y - MTD_SPI_NOR_USE_4K_SECTORS n - MTD_UBI y - MTD_CMDLINE_PARTS y - UBIFS_FS y - USB_UAS m - CRYPTO_TLS m - TLS y - MD y - BLK_DEV_MD m - MD_AUTODETECT y - MD_RAID0 m - MD_RAID1 m - MD_RAID10 m - MD_RAID456 m - DM_VERITY m - LOGO y - FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER n - FB_EFI n - EFI_STUB y - EFI y - VIRTIO y - VIRTIO_PCI y - VIRTIO_BLK y - DRM_VIRTIO_GPU y - EXT4_FS y - USBIP_CORE m - USBIP_VHCI_HCD m - USBIP_HOST m - USBIP_VUDC m - ''; + structuredExtraConfig = with lib.kernel; { + OF_OVERLAY = yes; + OF_CONFIGFS = yes; + MFD_SENSEHAT_CORE = module; + INPUT_JOYDEV = module; + INPUT_JOYSTICK = yes; + JOYSTICK_SENSEHAT = module; + AUXDISPLAY = yes; + SENSEHAT_DISPLAY = module; + HTS221 = module; + IIO_ST_PRESS = module; + IIO_ST_LSM6DSX = module; + IIO_ST_MAGN_3AXIS = module; + POLARFIRE_SOC_DMA_NONCOHERENT = yes; + MTD_SPI_NOR_USE_4K_SECTORS = no; + MTD_UBI = yes; + MTD_CMDLINE_PARTS = yes; + UBIFS_FS = yes; + USB_UAS = module; + EFI_STUB = yes; + EFI = yes; + USBIP_CORE = module; + USBIP_VHCI_HCD = module; + USBIP_HOST = module; + USBIP_VUDC = module; + CRYPTO_TLS = module; + MD = yes; + BLK_DEV_MD = module; + MD_LINEAR = module; + MD_RAID0 = module; + MD_RAID1 = module; + MD_RAID10 = module; + MD_RAID456 = module; + + # This device doesn't have any kind of display output at all + FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER = lib.mkForce no; + FB_EFI = lib.mkForce no; + } // structuredExtraConfig; src = fetchFromGitHub { owner = "linux4microchip"; @@ -66,4 +62,4 @@ buildLinux (args // rec { rev = "25e35c7c54ad853d03c14a02b189b408cb5b5eb3"; sha256 = "sha256-wj7lz247MkhxmhSHUcNeWmcZK+DL+5PAnLwTmALD97M="; }; -} // (args.argsOverride or { })) +} // argsOverride) diff --git a/microchip/common/modules.nix b/microchip/common/modules.nix index 1678f81..c6a7519 100644 --- a/microchip/common/modules.nix +++ b/microchip/common/modules.nix @@ -1,7 +1,8 @@ -{ pkgs, lib, ... }: { +{ pkgs, lib, config, ... }: { boot = { - kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/linux-icicle-kit.nix { }); - initrd.includeDefaultModules = lib.mkForce false; + kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/linux-icicle-kit.nix { + inherit (config.boot) kernelPatches; + }); + initrd.includeDefaultModules = lib.mkDefault false; }; - } From 5a721ef5f1460d01aa1571fab7f62efa51abf135 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sun, 7 Jan 2024 01:46:43 +0100 Subject: [PATCH 06/12] surface: linux 6.6.8 -> 6.6.10 --- microsoft/surface/common/kernel/linux-6.6.x/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-6.6.x/default.nix b/microsoft/surface/common/kernel/linux-6.6.x/default.nix index 1bd0345..eaa796d 100644 --- a/microsoft/surface/common/kernel/linux-6.6.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.6.x/default.nix @@ -8,7 +8,7 @@ let cfg = config.microsoft-surface; - version = "6.6.8"; + version = "6.6.10"; majorVersion = "6.6"; patchDir = repos.linux-surface + "/patches/${majorVersion}"; kernelPatches = pkgs.callPackage ./patches.nix { @@ -21,7 +21,7 @@ let extraMeta.branch = majorVersion; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "sha256-UDbENOEeSzbY2j9ImFH3+CnPeF+n94h0aFN6nqRXJBY="; + sha256 = "sha256-nuYn5MEJrsf8o+2liY6B0gGvLH6y99nX2UwfDhIFVGw="; }; }; From 34bcc25fcd921666c0de80a0753f8a4feef3e0fb Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sun, 7 Jan 2024 01:47:34 +0100 Subject: [PATCH 07/12] surface: set default kernel to major version 6.6 --- microsoft/surface/common/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 485c0e2..7499a19 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -10,7 +10,7 @@ in { ./surface-control ]; - microsoft-surface.kernelVersion = mkDefault "6.6.8"; + microsoft-surface.kernelVersion = mkDefault "6.6"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; From c478b3d56969006e015e55aaece4931f3600c1b2 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sun, 7 Jan 2024 01:51:17 +0100 Subject: [PATCH 08/12] surface: remove linux 6.1 --- microsoft/surface/common/kernel/default.nix | 1 - .../common/kernel/linux-6.1.x/default.nix | 39 ----- .../common/kernel/linux-6.1.x/patches.nix | 141 ------------------ microsoft/surface/surface-go/default.nix | 2 - 4 files changed, 183 deletions(-) delete mode 100644 microsoft/surface/common/kernel/linux-6.1.x/default.nix delete mode 100644 microsoft/surface/common/kernel/linux-6.1.x/patches.nix diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index 992ec9b..55f22da 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -5,7 +5,6 @@ let in { imports = [ - ./linux-6.1.x ./linux-6.6.x ]; diff --git a/microsoft/surface/common/kernel/linux-6.1.x/default.nix b/microsoft/surface/common/kernel/linux-6.1.x/default.nix deleted file mode 100644 index dbb61d7..0000000 --- a/microsoft/surface/common/kernel/linux-6.1.x/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - inherit (lib) mkIf mkOption types; - inherit (pkgs) fetchurl; - - inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage repos; - - cfg = config.microsoft-surface; - - version = "6.1.62"; - majorVersion = "6.1"; - patchDir = repos.linux-surface + "/patches/${majorVersion}"; - kernelPatches = pkgs.callPackage ./patches.nix { - inherit (lib) kernel; - inherit version patchDir; - }; - - kernelPackages = linuxPackage { - inherit version kernelPatches; - extraMeta.branch = majorVersion; - src = fetchurl { - url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "sha256-uf1hb6zWvs/O74i5vnGNDxZiXKs/6B0ROEgCpwkehew="; - }; - }; - - -in { - options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ version majorVersion ]; - }; - - config = mkIf (cfg.kernelVersion == version || cfg.kernelVersion == majorVersion) { - boot = { - inherit kernelPackages; - }; - }; -} diff --git a/microsoft/surface/common/kernel/linux-6.1.x/patches.nix b/microsoft/surface/common/kernel/linux-6.1.x/patches.nix deleted file mode 100644 index e197649..0000000 --- a/microsoft/surface/common/kernel/linux-6.1.x/patches.nix +++ /dev/null @@ -1,141 +0,0 @@ -{ kernel, - patchDir, - version, -}: - -[ - { - name = "microsoft-surface-patches-linux-${version}"; - patch = null; - structuredExtraConfig = with kernel; { - STREAMING_MEDIA = yes; - - # - # Surface Aggregator Module - # - SURFACE_AGGREGATOR = module; - SURFACE_AGGREGATOR_ERROR_INJECTION = no; - SURFACE_AGGREGATOR_BUS = yes; - SURFACE_AGGREGATOR_CDEV = module; - SURFACE_AGGREGATOR_HUB = module; - SURFACE_AGGREGATOR_REGISTRY = module; - SURFACE_AGGREGATOR_TABLET_SWITCH = module; - - SURFACE_ACPI_NOTIFY = module; - SURFACE_DTX = module; - SURFACE_PLATFORM_PROFILE = module; - - SURFACE_HID = module; - SURFACE_KBD = module; - - BATTERY_SURFACE = module; - CHARGER_SURFACE = module; - - # - # Surface Hotplug - # - SURFACE_HOTPLUG = module; - - # - # Intel Touch Host Controller - # - HID_ITHC = module; - - # - # IPTS touchscreen - # - # This only enables the user interface for IPTS data. - # For the touchscreen to work, you need to install iptsd. - # - MISC_IPTS = module; - - # - # Cameras: IPU3 - # - VIDEO_DW9719 = module; - VIDEO_IPU3_IMGU = module; - VIDEO_IPU3_CIO2 = module; - CIO2_BRIDGE = yes; - INTEL_SKL_INT3472 = module; - REGULATOR_TPS68470 = module; - COMMON_CLK_TPS68470 = module; - - # - # Cameras: Sensor drivers - # - VIDEO_OV5693 = module; - VIDEO_OV7251 = module; - VIDEO_OV8865 = module; - - # - # ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 - # - APDS9960 = module; - - # - # Other Drivers - # - INPUT_SOC_BUTTON_ARRAY = module; - SURFACE_3_POWER_OPREGION = module; - SURFACE_PRO3_BUTTON = module; - SURFACE_GPE = module; - SURFACE_BOOK1_DGPU_SWITCH = module; - }; - } - { - name = "ms-surface/0001-surface3-oemb"; - patch = patchDir + "/0001-surface3-oemb.patch"; - } - { - name = "ms-surface/0002-mwifiex"; - patch = patchDir + "/0002-mwifiex.patch"; - } - { - name = "ms-surface/0003-ath10k"; - patch = patchDir + "/0003-ath10k.patch"; - } - { - name = "ms-surface/0004-ipts"; - patch = patchDir + "/0004-ipts.patch"; - } - { - name = "ms-surface/0005-ithc"; - patch = patchDir + "/0005-ithc.patch"; - } - { - name = "ms-surface/0006-surface-sam"; - patch = patchDir + "/0006-surface-sam.patch"; - } - { - name = "ms-surface/0007-surface-sam-over-hid"; - patch = patchDir + "/0007-surface-sam-over-hid.patch"; - } - { - name = "ms-surface/0008-surface-button"; - patch = patchDir + "/0008-surface-button.patch"; - } - { - name = "ms-surface/0009-surface-typecover"; - patch = patchDir + "/0009-surface-typecover.patch"; - } - { - name = "ms-surface/0010-surface-shutdown"; - patch = patchDir + "/0010-surface-shutdown.patch"; - } - { - name = "ms-surface/0011-surface-gpe"; - patch = patchDir + "/0011-surface-gpe.patch"; - } - { - name = "ms-surface/0012-cameras"; - patch = patchDir + "/0012-cameras.patch"; - } - { - name = "ms-surface/0013-amd-gpio"; - patch = patchDir + "/0013-amd-gpio.patch"; - } - { - name = "ms-surface/0014-rtc"; - patch = patchDir + "/0014-rtc.patch"; - } -] diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix index a1073dd..fdd13f6 100644 --- a/microsoft/surface/surface-go/default.nix +++ b/microsoft/surface/surface-go/default.nix @@ -17,8 +17,6 @@ in { ../../../common/cpu/intel/kaby-lake ]; - microsoft-surface.kernelVersion = "6.1.62"; - boot.kernelParams = [ "i915.enable_rc6=1" "i915.modeset=1" From fe76fc35f7e4900718be13d15e3370a50b0fc79a Mon Sep 17 00:00:00 2001 From: Tom Vincent Date: Mon, 8 Jan 2024 18:25:06 +0000 Subject: [PATCH 09/12] framework amd: only apply suspend workaround on <6.7 --- framework/13-inch/7040-amd/README.md | 2 +- framework/13-inch/7040-amd/default.nix | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/13-inch/7040-amd/README.md b/framework/13-inch/7040-amd/README.md index 54bf5d7..bb46c3c 100644 --- a/framework/13-inch/7040-amd/README.md +++ b/framework/13-inch/7040-amd/README.md @@ -18,7 +18,7 @@ Then run ## Suspend/wake workaround -As of firmware v03.03, a bug in the EC causes the system to wake if AC is connected _despite_ the lid being closed. The following works around this, with the trade-off that keyboard presses also no longer wake the system. +As of firmware v03.03, a bug in the EC causes the system to wake if AC is connected _despite_ the lid being closed. A workaround has been [upstreamed](https://github.com/torvalds/linux/commit/a55bdad5dfd1efd4ed9ffe518897a21ca8e4e193) in Linux v6.7. For older kernels, the following works around this, with the trade-off that keyboard presses also no longer wake the system. ```nix { diff --git a/framework/13-inch/7040-amd/default.nix b/framework/13-inch/7040-amd/default.nix index 9f31c6b..81ff707 100644 --- a/framework/13-inch/7040-amd/default.nix +++ b/framework/13-inch/7040-amd/default.nix @@ -29,7 +29,9 @@ in # https://wireless.wiki.kernel.org/en/users/drivers/mediatek boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.1") (lib.mkDefault pkgs.linuxPackages_latest); - services.udev.extraRules = lib.optionalString cfg.preventWakeOnAC '' + # Workaround applied upstream in Linux >=6.7 (on BIOS 03.03) + # https://github.com/torvalds/linux/commit/a55bdad5dfd1efd4ed9ffe518897a21ca8e4e193 + services.udev.extraRules = lib.mkIf (lib.versionOlder pkgs.linux.version "6.7" && cfg.preventWakeOnAC) '' # Prevent wake when plugging in AC during suspend. Trade-off: keyboard wake disabled. See: # https://community.frame.work/t/tracking-framework-amd-ryzen-7040-series-lid-wakeup-behavior-feedback/39128/45 ACTION=="add", SUBSYSTEM=="serio", DRIVERS=="atkbd", ATTR{power/wakeup}="disabled" From b34a6075e9e298c4124e35c3ccaf2210c1f3a43b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 9 Jan 2024 08:27:35 +0100 Subject: [PATCH 10/12] xps-15-9560: disable broken bumblebee for now Looks like it fails to evaluate in nixpkgs just now --- dell/xps/15-9560/default.nix | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index 0affd38..49e36b1 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -1,13 +1,27 @@ -{ lib, pkgs, ... }: - { imports = [ ../../../common/cpu/intel ../../../common/cpu/intel/kaby-lake ../../../common/pc/laptop ./xps-common.nix + + # FIXME: remove this when bumblebee works again + ../../../common/gpu/nvidia/disable.nix ]; + + /* Bumblebee seems to fail to evaluate: + (stack trace truncated; use '--show-trace' to show the full trace) + + error: assertion '(useSettings -> (! libsOnly))' failed + + 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 @@ -15,11 +29,11 @@ # 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 = [ pkgs.linuxPackages.nvidia_x11 ]; - hardware.bumblebee.enable = lib.mkDefault true; - hardware.bumblebee.pmMethod = lib.mkDefault "none"; - + ##### 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"; + */ } From ef811636cc847355688804593282078bac7758d4 Mon Sep 17 00:00:00 2001 From: Lena Fuhrimann <6780471+cloudlena@users.noreply.github.com> Date: Sat, 13 Jan 2024 12:58:05 +0100 Subject: [PATCH 11/12] Add fwupd to Dell XPS 13 7390 config --- dell/xps/13-7390/README.wiki | 8 +------- dell/xps/13-7390/default.nix | 6 +++++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dell/xps/13-7390/README.wiki b/dell/xps/13-7390/README.wiki index 64b8af6..c16f342 100644 --- a/dell/xps/13-7390/README.wiki +++ b/dell/xps/13-7390/README.wiki @@ -17,10 +17,4 @@ to your configuration.nix if you cannot wake from "Sleep". See refe == Firmware upgrades == Note that this device is supported by [https://fwupd.org/ fwupd]. -To perform firmware upgrades just activate the service - - -services.fwupd.enable = true; - - -Then use fwupdmgr to perform updates. +To perform updates, simply use fwupdmgr. diff --git a/dell/xps/13-7390/default.nix b/dell/xps/13-7390/default.nix index 1aa0c4b..1f1c456 100644 --- a/dell/xps/13-7390/default.nix +++ b/dell/xps/13-7390/default.nix @@ -13,5 +13,9 @@ # - https://github.com/NixOS/nixos-hardware/issues/173 boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.6") pkgs.linuxPackages_latest; - services.thermald.enable = true; + # Cooling management + services.thermald.enable = lib.mkDefault true; + + # Allows for updating firmware via `fwupdmgr`. + services.fwupd.enable = lib.mkDefault true; } From a63273ffc77532cc3cbc482ad5b4f9706e5289b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 02:56:53 +0000 Subject: [PATCH 12/12] build(deps): bump cachix/install-nix-action from 24 to 25 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 24 to 25. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v24...v25) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 782cde3..2f01e7f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v24 + - uses: cachix/install-nix-action@v25 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version