From 18af97340c507206f3638df4d4b7999fd32484d3 Mon Sep 17 00:00:00 2001 From: Symphorien Gibol Date: Sat, 1 May 2021 17:45:25 +0200 Subject: [PATCH 0001/1476] dell precision 5530: avoid screen flicker --- dell/precision/5530/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dell/precision/5530/default.nix b/dell/precision/5530/default.nix index 52e0dd55..b97bf0c1 100644 --- a/dell/precision/5530/default.nix +++ b/dell/precision/5530/default.nix @@ -7,9 +7,9 @@ ../../../common/pc/laptop/ssd ]; - # https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1803179/comments/149 - # fix lspci hanging with nouveau 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" @@ -18,5 +18,8 @@ "scsi_mod.use_blk_mq=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" ]; } From b8a0c5251f7c99ce731321524ed106fbf1aca031 Mon Sep 17 00:00:00 2001 From: Symphorien Gibol Date: Sat, 1 May 2021 17:46:04 +0200 Subject: [PATCH 0002/1476] dell precision 5530: remove irrelevant disk related setting --- dell/precision/5530/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/dell/precision/5530/default.nix b/dell/precision/5530/default.nix index b97bf0c1..05e1d4af 100644 --- a/dell/precision/5530/default.nix +++ b/dell/precision/5530/default.nix @@ -15,7 +15,6 @@ "nouveau.modeset=0" "pcie_aspm=force" "drm.vblankoffdelay=1" - "scsi_mod.use_blk_mq=1" "nouveau.runpm=0" "mem_sleep_default=deep" # fix flicker From e4ce746d5b21ee068152754ae7e71201ca48890d Mon Sep 17 00:00:00 2001 From: Bryan Honof Date: Wed, 26 May 2021 18:54:50 +0200 Subject: [PATCH 0003/1476] Add check for power-profiles-daemon.enable Gnome 40 now uses power-profile-daemon https://gitlab.freedesktop.org/hadess/power-profiles-daemon , which clashes with tlp. This check will disable tlp whenever it finds that the power-profiles-daemon is activated. --- common/pc/laptop/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/common/pc/laptop/default.nix b/common/pc/laptop/default.nix index 946d066d..b1e91ad5 100644 --- a/common/pc/laptop/default.nix +++ b/common/pc/laptop/default.nix @@ -3,5 +3,12 @@ { imports = [ ../. ]; - services.tlp.enable = lib.mkDefault true; + # Gnome 40 introduced a new way of managing power, without tlp. + # However, these 2 services clash when enabled simultaneously. + # https://github.com/NixOS/nixos-hardware/issues/260 + services.tlp.enable = + if config.services.power-profiles-daemon.enable == true then + false + else + true; } From 2bc26b3c5c571b3609e3a50f35e67419c7688085 Mon Sep 17 00:00:00 2001 From: Bryan Honof Date: Wed, 26 May 2021 19:00:01 +0200 Subject: [PATCH 0004/1476] Add lib.mkDefault to the statement --- common/pc/laptop/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/pc/laptop/default.nix b/common/pc/laptop/default.nix index b1e91ad5..87bdca45 100644 --- a/common/pc/laptop/default.nix +++ b/common/pc/laptop/default.nix @@ -6,9 +6,9 @@ # Gnome 40 introduced a new way of managing power, without tlp. # However, these 2 services clash when enabled simultaneously. # https://github.com/NixOS/nixos-hardware/issues/260 - services.tlp.enable = - if config.services.power-profiles-daemon.enable == true then + services.tlp.enable = lib.mkDefault + (if config.services.power-profiles-daemon.enable == true then false else - true; + true); } From 1fe5b7686d83ab6fc3af7304332ee69940300999 Mon Sep 17 00:00:00 2001 From: Bryan Honof Date: Thu, 27 May 2021 00:15:49 +0200 Subject: [PATCH 0005/1476] Update common/pc/laptop/default.nix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- common/pc/laptop/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/common/pc/laptop/default.nix b/common/pc/laptop/default.nix index 87bdca45..0117956c 100644 --- a/common/pc/laptop/default.nix +++ b/common/pc/laptop/default.nix @@ -6,9 +6,5 @@ # Gnome 40 introduced a new way of managing power, without tlp. # However, these 2 services clash when enabled simultaneously. # https://github.com/NixOS/nixos-hardware/issues/260 - services.tlp.enable = lib.mkDefault - (if config.services.power-profiles-daemon.enable == true then - false - else - true); + services.tlp.enable = lib.mkDefault !config.services.power-profiles-daemon.enable; } From 2bc0b595b53ddf00dd36419c7df824abc620d75a Mon Sep 17 00:00:00 2001 From: Tom Bereknyei Date: Thu, 27 May 2021 18:41:26 +0000 Subject: [PATCH 0006/1476] surface: add iptsd --- microsoft/surface/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 955c6d24..7b53f0df 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -5,4 +5,9 @@ environment.systemPackages = with pkgs; [ surface-control ]; users.groups.surface-control = { }; services.udev.packages = [ pkgs.surface-control ]; + systemd.services.iptsd = { + description = "IPTSD"; + script = "${pkgs.iptsd}/bin/iptsd"; + wantedBy = [ "multi-user.target" ]; + }; } From ca33f586e7aed0cfab8c071c5f3359b8aaf043fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 29 May 2021 10:19:00 +0200 Subject: [PATCH 0007/1476] fix evaluation --- common/pc/laptop/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/pc/laptop/default.nix b/common/pc/laptop/default.nix index 0117956c..309e999a 100644 --- a/common/pc/laptop/default.nix +++ b/common/pc/laptop/default.nix @@ -6,5 +6,5 @@ # Gnome 40 introduced a new way of managing power, without tlp. # However, these 2 services clash when enabled simultaneously. # https://github.com/NixOS/nixos-hardware/issues/260 - services.tlp.enable = lib.mkDefault !config.services.power-profiles-daemon.enable; + services.tlp.enable = lib.mkDefault (!config.services.power-profiles-daemon.enable); } From f39a23dab76c60d10c2a3c62d3460d1797df237e Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 5 Apr 2021 10:29:34 +0200 Subject: [PATCH 0008/1476] Add mnt-reform2-nitrogen8m https://mntre.com/ --- README.md | 1 + flake.nix | 1 + mnt/reform2-nitrogen8m/default.nix | 86 ++++++++++++++++ mnt/reform2-nitrogen8m/kernel/default.nix | 97 +++++++++++++++++++ mnt/reform2-nitrogen8m/kernel/linux-5.7.nix | 18 ++++ mnt/reform2-nitrogen8m/uboot/default.nix | 16 +++ mnt/reform2-nitrogen8m/uboot/env_vars.patch | 57 +++++++++++ .../uboot/shell-syntax.patch | 13 +++ 8 files changed, 289 insertions(+) create mode 100644 mnt/reform2-nitrogen8m/default.nix create mode 100644 mnt/reform2-nitrogen8m/kernel/default.nix create mode 100644 mnt/reform2-nitrogen8m/kernel/linux-5.7.nix create mode 100644 mnt/reform2-nitrogen8m/uboot/default.nix create mode 100644 mnt/reform2-nitrogen8m/uboot/env_vars.patch create mode 100644 mnt/reform2-nitrogen8m/uboot/shell-syntax.patch diff --git a/README.md b/README.md index 6ba22cd4..bad49485 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ See code for all available configurations. | [Lenovo ThinkPad X13][] | `` | | [Microsoft Surface Pro 3][] | `` | +| [MNT Reform (i.MX8M)][] | `` | | [MSI GS60 2QE][] | `` | | PC Engines APU | `` | | [Raspberry Pi 2][] | `` | diff --git a/flake.nix b/flake.nix index 97934ce5..8cf42f70 100644 --- a/flake.nix +++ b/flake.nix @@ -73,6 +73,7 @@ lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13-yoga; microsoft-surface = import ./microsoft/surface; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; + mnt-reform2-nitrogen8m = import ./mnt/reform2-nitrogen8m; pcengines-apu = import ./pcengines/apu; raspberry-pi-2 = import ./raspberry-pi/2; raspberry-pi-4 = import ./raspberry-pi/4; diff --git a/mnt/reform2-nitrogen8m/default.nix b/mnt/reform2-nitrogen8m/default.nix new file mode 100644 index 00000000..a66c6810 --- /dev/null +++ b/mnt/reform2-nitrogen8m/default.nix @@ -0,0 +1,86 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ ../../common/pc/laptop/ssd ]; + + boot = { + kernelPackages = lib.mkDefault pkgs.linuxPackages_reformNitrogen8m_latest; + + kernelParams = [ "console=ttymxc0,115200" "console=tty1" "pci=nomsi" ]; + + extraModprobeConfig = "options imx-dcss dcss_use_hdmi=0"; + + initrd = { + kernelModules = [ "nwl-dsi" "imx-dcss" ]; + availableKernelModules = # hack to remove ATA modules + lib.mkForce ([ + "cryptd" + "dm_crypt" + "dm_mod" + "input_leds" + "mmc_block" + "nvme" + "usbhid" + "xhci_hcd" + ] ++ config.boot.initrd.luks.cryptoModules); + }; + + loader = { + generic-extlinux-compatible.enable = lib.mkDefault true; + grub.enable = lib.mkDefault false; + timeout = lib.mkDefault 1; + # Cannot interact with U-Boot directly + }; + }; + + environment.etc."systemd/system.conf".text = "DefaultTimeoutStopSec=15s"; + + environment.systemPackages = with pkgs; [ brightnessctl usbutils ]; + + hardware.deviceTree.name = lib.mkDefault "freescale/imx8mq-mnt-reform2.dtb"; + + hardware.pulseaudio.daemon.config.default-sample-rate = lib.mkDefault "48000"; + + nixpkgs = { + system = "aarch64-linux"; + overlays = [ + (final: prev: + with final; { + + linux_5_7 = callPackage ./kernel/linux-5.7.nix { + kernelPatches = [ + kernelPatches.bridge_stp_helper + kernelPatches.request_key_helper + kernelPatches.export_kernel_fpu_functions."5.3" + ]; + }; + + linux_reformNitrogen8m_latest = + callPackage ./kernel { kernelPatches = [ ]; }; + + linuxPackages_reformNitrogen8m_latest = + linuxPackagesFor linux_reformNitrogen8m_latest; + + ubootReformImx8mq = callPackage ./uboot { }; + + }) + ]; + }; + + programs.sway.extraPackages = # unbloat + lib.mkDefault (with pkgs; [ swaylock swayidle xwayland ]); + + system.activationScripts.asound = let + initialAsoundState = pkgs.fetchurl { + url = + "https://source.mnt.re/reform/reform-system-image/-/raw/84bec717ad7366b1d385f3200da192efb0f5bccb/reform2-imx8mq/template-etc/asound.state"; + sha256 = "11wfy8fad5mhr6bga36k7lri85wq74rfzwj9bb9j5rp5cll4jnmb"; + }; + in '' + if [ ! -e "/var/lib/alsa/asound.state" ]; then + mkdir -p /var/lib/alsa + cp ${initialAsoundState} /var/lib/alsa/asound.state + fi + ''; + +} diff --git a/mnt/reform2-nitrogen8m/kernel/default.nix b/mnt/reform2-nitrogen8m/kernel/default.nix new file mode 100644 index 00000000..d5b6a29e --- /dev/null +++ b/mnt/reform2-nitrogen8m/kernel/default.nix @@ -0,0 +1,97 @@ +{ lib, buildLinux, fetchurl, fetchgit, linux_5_7, kernelPatches, ... }@args: + +let + linux = linux_5_7; + systemImageSrc = fetchgit { + url = "https://source.mnt.re/reform/reform-system-image.git"; + rev = "ef6bae4def9ef08ee388254abf4f1839d44c07a1"; + sha256 = "03nnwjzm8a0bk821p6sfscd04x3jgj29l16ccdkg10xcv2g2z5s8"; + } + "/reform2-imx8mq"; +in lib.overrideDerivation (buildLinux (args // { + inherit (linux) src version; + + features = { + efiBootStub = false; + iwlwifi = false; + } // (args.features or { }); + + kernelPatches = let + patchDir = "${systemImageSrc}/template-kernel/patches"; + reformPatches = map ({ name, extraConfig ? "" }: { + inherit name extraConfig; + patch = "${patchDir}/${name}.patch"; + }) [ + { + name = "0001-drm-bridge-Add-NWL-MIPI-DSI-host-controller-support"; + extraConfig = '' + DRM_NWL_MIPI_DSI m + ''; + } + { name = "0002-dt-bindings-display-bridge-Add-binding-for-NWL-mipi-"; } + { + name = + "0003-DCSS-v4-Add-support-for-iMX8MQ-Display-Controller-Subsystem"; + extraConfig = '' + DRM_IMX_DCSS m + ''; + } + { name = "4101-media-vb2-wait-for-dmabuf-fences"; } + { name = "4201-HACK-media-vb2-don-t-validate-buffer-length"; } + { name = "44f0bbdcf0433052b4e85940cb41d04c13fdad57"; } + { name = "git.linuxtv.org-28a202c55963386b8bc45bcc52029362e9aa0d33"; } + { name = "git.linuxtv.org-88d06362d1d052e4c844ac95a2ca308ed4d90452"; } + { name = "mnt1000-pcie-reparent-clocks"; } + { name = "mnt1001-pcie-support-internal-refclk-aspm"; } + { name = "mnt2000-audio-wm8960-add-dacslope-setting"; } + { name = "mnt2001-audio-sai-workaround-rate-matching"; } + { name = "mnt3000-imx-dcss-tweak-DCSS-pixel-rate-to-prevent-sporadic-d"; } + { name = "mnt3001-nwl-dsi-disable-bridge_mode_fixup-that-breaks-hs-vs-"; } + { name = "mnt3002-MNT-Reform2-add-simple-panel-Innolux-N125HCE-GN1"; } + { + name = "mnt3003-MNT-Reform-import-cadence-HDMI-driver-for-imx8mq-fro"; + extraConfig = '' + DRM_CDNS_AUDIO m + DRM_CDNS_DP m + DRM_CDNS_HDMI m + DRM_CDNS_HDMI_CEC m + DRM_CDNS_MHDP m + ''; + } + { name = "mnt3004-MNT-Reform-imx8mq-add-PHY_27M-clock"; } + { name = "mnt3005-MNT-Reform-imx8mq-DCSS-add-module-option-to-toggle-h"; } + { name = "mnt3006-MNT-Reform-imx8mq-add-PHY_27M-clock-missing-define"; } + { + name = "mnt3007-MNT-Reform-imx8mq-missing-kconf-makefile-for-cadence"; + extraConfig = '' + DRM_IMX_CDNS_MHDP m + DRM_IMX_DCSS m + ''; + } + { + name = "mnt3008-MNT-Reform-imx8mq-missing-makefile-change-for-imx-dc"; + extraConfig = '' + DRM_IMX_DCSS m + ''; + } + ]; + in lib.lists.unique (kernelPatches ++ reformPatches ++ [{ + name = "MNT-Reform-imx8mq-config"; + patch = null; + extraConfig = fetchurl { + url = + "https://github.com/NixOS/nixos-hardware/releases/download/mnt-reform2-nitrogen8m-v1/kernel-config"; + sha256 = "1brazbr9zflb29i4fjhwn1z87bg475lqvzkksvi5n775zx28fk65"; + }; + }]); + + allowImportFromDerivation = true; + +} // (args.argsOverride or { }))) (attrs: { + prePatch = attrs.prePatch + '' + cp ${systemImageSrc}/template-kernel/*.dts arch/arm64/boot/dts/freescale/ + cp ${systemImageSrc}/template-kernel/*.dtsi arch/arm64/boot/dts/freescale/ + echo 'dtb-$(CONFIG_ARCH_MXC) += imx8mq-mnt-reform2.dtb' >> \ + arch/arm64/boot/dts/freescale/Makefile + ''; + makeFlags = attrs.makeFlags ++ [ "LOADADDR=0x40480000" ]; +}) diff --git a/mnt/reform2-nitrogen8m/kernel/linux-5.7.nix b/mnt/reform2-nitrogen8m/kernel/linux-5.7.nix new file mode 100644 index 00000000..dd02af3e --- /dev/null +++ b/mnt/reform2-nitrogen8m/kernel/linux-5.7.nix @@ -0,0 +1,18 @@ +{ lib, stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: + +with lib; + +buildLinux (args // rec { + version = "5.7.19"; + + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; + + # branchVersion needs to be x.y + extraMeta.branch = versions.majorMinor version; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; + sha256 = "1rwzp51ddlkdzanj6i8jqj5yh0njpzn7ly4r8nnzwkdfp5465721"; + }; +} // (args.argsOverride or {})) diff --git a/mnt/reform2-nitrogen8m/uboot/default.nix b/mnt/reform2-nitrogen8m/uboot/default.nix new file mode 100644 index 00000000..0265d6a3 --- /dev/null +++ b/mnt/reform2-nitrogen8m/uboot/default.nix @@ -0,0 +1,16 @@ +{ buildUBoot, fetchgit }: + +buildUBoot rec { + pname = "uboot-reform2-imx8mq"; + version = "2020-06-01"; + src = fetchgit { + url = "https://source.mntmn.com/MNT/reform-boundary-uboot.git"; + rev = version; + sha256 = "0ychnwhisjqm0gzyz0nv9xynl9g114xmxpwz4vm0l5w6sc60jshw"; + }; + defconfig = "nitrogen8m_som_4g_defconfig"; + extraMeta.platforms = [ "aarch64-linux" ]; + filesToInstall = [ "flash.bin" ]; + patches = [ ./shell-syntax.patch ./env_vars.patch ]; + makeFlags = filesToInstall; +} diff --git a/mnt/reform2-nitrogen8m/uboot/env_vars.patch b/mnt/reform2-nitrogen8m/uboot/env_vars.patch new file mode 100644 index 00000000..6abb1176 --- /dev/null +++ b/mnt/reform2-nitrogen8m/uboot/env_vars.patch @@ -0,0 +1,57 @@ +commit 32ba0e0bf12827a67959f435e457fb4594a6708f +Author: Emery Hemingway +Date: Mon Jul 27 10:18:38 2020 +0200 + + reform: set envvars for booting NixOS + +diff --git a/board/boundary/nitrogen8m_som/nitrogen8m_som.c b/board/boundary/nitrogen8m_som/nitrogen8m_som.c +index d4d866001d..d1fac5934f 100644 +--- a/board/boundary/nitrogen8m_som/nitrogen8m_som.c ++++ b/board/boundary/nitrogen8m_som/nitrogen8m_som.c +@@ -322,17 +322,13 @@ void init_usb_clk(int usbno); + + static void set_env_vars(void) + { +- printf("set_env_vars()"); +- env_set("board", "MNT Reform 2.0"); // "nitrogen8m_som"); ++#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG ++ if (!env_get("board")) ++ env_set("board", "imx8mq-mnt-reform2"); + env_set("soc", "imx8mq"); + env_set("imx_cpu", get_imx_type((get_cpu_rev() & 0xFF000) >> 12)); + env_set("uboot_defconfig", CONFIG_DEFCONFIG); +- +- // MNT Reform 2 +- env_set("fdt_addr", "0x50000000"); +- env_set("bootargs", "noinitrd root=/dev/mmcblk1p1 rootwait rw console=ttymxc0,115200 console=tty1 cma=512M no_console_suspend pci=nomsi"); +- env_set("bootcmd", "ext4load mmc 1 ${loadaddr} /Image; ext4load mmc 1 ${fdt_addr} /imx8mq-mnt-reform2.dtb; booti ${loadaddr} - ${fdt_addr}"); +- env_set("bootdelay", "1"); ++#endif + } + + void board_set_default_env(void) +diff --git a/include/configs/nitrogen8m_som.h b/include/configs/nitrogen8m_som.h +index 3ada3900db..548e7cd71c 100644 +--- a/include/configs/nitrogen8m_som.h ++++ b/include/configs/nitrogen8m_som.h +@@ -208,7 +208,7 @@ + #define SYS_AUXCORE_BOOTDATA_DDR 0x80000000 + #define SYS_AUXCORE_BOOTDATA_TCM 0x007E0000 + +-/*#define CONFIG_EXTRA_ENV_SETTINGS \ ++#define CONFIG_EXTRA_ENV_SETTINGS \ + "console=" BD_CONSOLE "\0" \ + "env_dev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ + "env_part=" __stringify(CONFIG_SYS_MMC_ENV_PART) "\0" \ +@@ -247,7 +247,10 @@ + "setenv ipaddr 10.0.0.2; " \ + "setenv netmask 255.255.255.0; " \ + "setenv serverip 10.0.0.1;\0" \ +- BOOTENV*/ ++ BOOTENV \ ++ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ ++ "ramdisk_addr_r=0x44480000\0" \ ++ "fdt_addr_r=0x43000000\0" + + /* + * PCI express diff --git a/mnt/reform2-nitrogen8m/uboot/shell-syntax.patch b/mnt/reform2-nitrogen8m/uboot/shell-syntax.patch new file mode 100644 index 00000000..aeec47bb --- /dev/null +++ b/mnt/reform2-nitrogen8m/uboot/shell-syntax.patch @@ -0,0 +1,13 @@ +diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib +index f8c3fff1d1..bb68e119e2 100644 +--- a/scripts/Makefile.lib ++++ b/scripts/Makefile.lib +@@ -299,7 +299,7 @@ quiet_cmd_dtc = DTC $@ + # Modified for U-Boot + # Bring in any U-Boot-specific include at the end of the file + cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ +- (cat $<; $(if $(u_boot_dtsi),echo '\#include "$(u_boot_dtsi)"')) > $(pre-tmp); \ ++ (cat $<; $(if $(u_boot_dtsi),echo '#include "$(u_boot_dtsi)"')) > $(pre-tmp); \ + $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \ + $(DTC) -O dtb -o $@ -b 0 \ + -i $(dir $<) $(DTC_FLAGS) \ From 3fc630f84c9c4b542844169d3ec17c369b6d242b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 30 May 2021 22:10:22 +0200 Subject: [PATCH 0009/1476] pc/laptop: fix evaluation on 20.09 (#270) --- common/pc/laptop/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/pc/laptop/default.nix b/common/pc/laptop/default.nix index 309e999a..9121b5f0 100644 --- a/common/pc/laptop/default.nix +++ b/common/pc/laptop/default.nix @@ -6,5 +6,6 @@ # Gnome 40 introduced a new way of managing power, without tlp. # However, these 2 services clash when enabled simultaneously. # https://github.com/NixOS/nixos-hardware/issues/260 - services.tlp.enable = lib.mkDefault (!config.services.power-profiles-daemon.enable); + services.tlp.enable = lib.mkDefault ((lib.versionOlder (lib.versions.majorMinor lib.version) "21.05") + || !config.services.power-profiles-daemon.enable); } From c941aecfc383e3e94eb0611dde1161a9c5e95cb6 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Sun, 30 May 2021 12:52:18 +0000 Subject: [PATCH 0010/1476] raspberry-pi/4: Add tc358743 option --- raspberry-pi/4/default.nix | 1 + raspberry-pi/4/tc358743.nix | 211 ++++++++++++++++++++++++++++++++++++ 2 files changed, 212 insertions(+) create mode 100644 raspberry-pi/4/tc358743.nix diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index d50325a1..d9f5f9b7 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -4,6 +4,7 @@ imports = [ ./dwc2.nix ./modesetting.nix + ./tc358743.nix ]; boot = { diff --git a/raspberry-pi/4/tc358743.nix b/raspberry-pi/4/tc358743.nix new file mode 100644 index 00000000..840953aa --- /dev/null +++ b/raspberry-pi/4/tc358743.nix @@ -0,0 +1,211 @@ +{ config, lib, ... }: + +let + cfg = config.hardware.raspberry-pi."4".tc358743; +in +{ + options.hardware = { + raspberry-pi."4".tc358743 = { + enable = lib.mkEnableOption '' + Enable support for the Toshiba TC358743 HDMI-to-CSI-2 converter. + + This can be tested with a plugged in converter device and for example + running ustreamer (which starts webservice providing a camera stream): + ''${pkgs.ustreamer}/bin/ustreamer --persistent --dv-timings + ''; + }; + }; + + config = lib.mkIf cfg.enable { + hardware.deviceTree.overlays = [ + { + name = "tc358743-overlay"; + dtsText = '' + /dts-v1/; + + / { + compatible = "brcm,bcm2711"; + + fragment@0 { + target = <0xffffffff>; + + __overlay__ { + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + tc358743@0f { + compatible = "toshiba,tc358743"; + reg = <0x0f>; + status = "okay"; + clocks = <0x01>; + clock-names = "refclk"; + + port { + + endpoint { + remote-endpoint = <0x02>; + clock-lanes = <0x00>; + clock-noncontinuous; + link-frequencies = <0x00 0x1cf7c580>; + phandle = <0x03>; + }; + }; + }; + }; + }; + + fragment@1 { + target = <0xffffffff>; + + __overlay__ { + status = "okay"; + + port { + + endpoint { + remote-endpoint = <0x03>; + phandle = <0x02>; + }; + }; + }; + }; + + fragment@2 { + target = <0x03>; + + __overlay__ { + data-lanes = <0x01 0x02>; + }; + }; + + fragment@3 { + target = <0x03>; + + __dormant__ { + data-lanes = <0x01 0x02 0x03 0x04>; + }; + }; + + fragment@4 { + target = <0xffffffff>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@5 { + target = <0xffffffff>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@6 { + target-path = [2f 00]; + + __overlay__ { + + bridge-clk { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x19bfcc0>; + phandle = <0x01>; + }; + }; + }; + + fragment@7 { + target = <0x02>; + + __overlay__ { + data-lanes = <0x01 0x02>; + }; + }; + + fragment@8 { + target = <0x02>; + + __dormant__ { + data-lanes = <0x01 0x02 0x03 0x04>; + }; + }; + + __overrides__ { + 4lane = "\0\0\0\0-2+3-7+8"; + link-frequency = [00 00 00 03 6c 69 6e 6b 2d 66 72 65 71 75 65 6e 63 69 65 73 23 30 00]; + }; + + __symbols__ { + tc358743 = "/fragment@0/__overlay__/tc358743@0f/port/endpoint"; + csi1_ep = "/fragment@1/__overlay__/port/endpoint"; + tc358743_clk = "/fragment@6/__overlay__/bridge-clk"; + }; + + __fixups__ { + i2c_csi_dsi = "/fragment@0:target:0"; + csi1 = "/fragment@1:target:0"; + i2c0if = "/fragment@4:target:0"; + i2c0mux = "/fragment@5:target:0"; + }; + + __local_fixups__ { + + fragment@0 { + + __overlay__ { + + tc358743@0f { + clocks = <0x00>; + + port { + + endpoint { + remote-endpoint = <0x00>; + }; + }; + }; + }; + }; + + fragment@1 { + + __overlay__ { + + port { + + endpoint { + remote-endpoint = <0x00>; + }; + }; + }; + }; + + fragment@2 { + target = <0x00>; + }; + + fragment@3 { + target = <0x00>; + }; + + fragment@7 { + target = <0x00>; + }; + + fragment@8 { + target = <0x00>; + }; + + __overrides__ { + link-frequency = <0x00>; + }; + }; + }; + ''; + } + ]; + }; +} From 1abe955ad50905c75b8b044f838bd9231b1bc490 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 31 May 2021 16:18:09 +0200 Subject: [PATCH 0011/1476] mnt/reform2-nitrogen8m: read kernel config into a string --- mnt/reform2-nitrogen8m/kernel/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mnt/reform2-nitrogen8m/kernel/default.nix b/mnt/reform2-nitrogen8m/kernel/default.nix index d5b6a29e..81719ad9 100644 --- a/mnt/reform2-nitrogen8m/kernel/default.nix +++ b/mnt/reform2-nitrogen8m/kernel/default.nix @@ -77,11 +77,11 @@ in lib.overrideDerivation (buildLinux (args // { in lib.lists.unique (kernelPatches ++ reformPatches ++ [{ name = "MNT-Reform-imx8mq-config"; patch = null; - extraConfig = fetchurl { + extraConfig = builtins.readFile (fetchurl { url = "https://github.com/NixOS/nixos-hardware/releases/download/mnt-reform2-nitrogen8m-v1/kernel-config"; sha256 = "1brazbr9zflb29i4fjhwn1z87bg475lqvzkksvi5n775zx28fk65"; - }; + }); }]); allowImportFromDerivation = true; From d38958a6aa5bdbf3239f26a04689f3d9ae7da0c0 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 31 May 2021 17:35:42 +0200 Subject: [PATCH 0012/1476] Revert mnt/reform2-nitrogen8m Kernel config is too big to be stored here. --- README.md | 1 - flake.nix | 1 - mnt/reform2-nitrogen8m/default.nix | 86 ---------------- mnt/reform2-nitrogen8m/kernel/default.nix | 97 ------------------- mnt/reform2-nitrogen8m/kernel/linux-5.7.nix | 18 ---- mnt/reform2-nitrogen8m/uboot/default.nix | 16 --- mnt/reform2-nitrogen8m/uboot/env_vars.patch | 57 ----------- .../uboot/shell-syntax.patch | 13 --- 8 files changed, 289 deletions(-) delete mode 100644 mnt/reform2-nitrogen8m/default.nix delete mode 100644 mnt/reform2-nitrogen8m/kernel/default.nix delete mode 100644 mnt/reform2-nitrogen8m/kernel/linux-5.7.nix delete mode 100644 mnt/reform2-nitrogen8m/uboot/default.nix delete mode 100644 mnt/reform2-nitrogen8m/uboot/env_vars.patch delete mode 100644 mnt/reform2-nitrogen8m/uboot/shell-syntax.patch diff --git a/README.md b/README.md index bad49485..6ba22cd4 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,6 @@ See code for all available configurations. | [Lenovo ThinkPad X13][] | `` | | [Microsoft Surface Pro 3][] | `` | -| [MNT Reform (i.MX8M)][] | `` | | [MSI GS60 2QE][] | `` | | PC Engines APU | `` | | [Raspberry Pi 2][] | `` | diff --git a/flake.nix b/flake.nix index 8cf42f70..97934ce5 100644 --- a/flake.nix +++ b/flake.nix @@ -73,7 +73,6 @@ lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13-yoga; microsoft-surface = import ./microsoft/surface; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; - mnt-reform2-nitrogen8m = import ./mnt/reform2-nitrogen8m; pcengines-apu = import ./pcengines/apu; raspberry-pi-2 = import ./raspberry-pi/2; raspberry-pi-4 = import ./raspberry-pi/4; diff --git a/mnt/reform2-nitrogen8m/default.nix b/mnt/reform2-nitrogen8m/default.nix deleted file mode 100644 index a66c6810..00000000 --- a/mnt/reform2-nitrogen8m/default.nix +++ /dev/null @@ -1,86 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ ../../common/pc/laptop/ssd ]; - - boot = { - kernelPackages = lib.mkDefault pkgs.linuxPackages_reformNitrogen8m_latest; - - kernelParams = [ "console=ttymxc0,115200" "console=tty1" "pci=nomsi" ]; - - extraModprobeConfig = "options imx-dcss dcss_use_hdmi=0"; - - initrd = { - kernelModules = [ "nwl-dsi" "imx-dcss" ]; - availableKernelModules = # hack to remove ATA modules - lib.mkForce ([ - "cryptd" - "dm_crypt" - "dm_mod" - "input_leds" - "mmc_block" - "nvme" - "usbhid" - "xhci_hcd" - ] ++ config.boot.initrd.luks.cryptoModules); - }; - - loader = { - generic-extlinux-compatible.enable = lib.mkDefault true; - grub.enable = lib.mkDefault false; - timeout = lib.mkDefault 1; - # Cannot interact with U-Boot directly - }; - }; - - environment.etc."systemd/system.conf".text = "DefaultTimeoutStopSec=15s"; - - environment.systemPackages = with pkgs; [ brightnessctl usbutils ]; - - hardware.deviceTree.name = lib.mkDefault "freescale/imx8mq-mnt-reform2.dtb"; - - hardware.pulseaudio.daemon.config.default-sample-rate = lib.mkDefault "48000"; - - nixpkgs = { - system = "aarch64-linux"; - overlays = [ - (final: prev: - with final; { - - linux_5_7 = callPackage ./kernel/linux-5.7.nix { - kernelPatches = [ - kernelPatches.bridge_stp_helper - kernelPatches.request_key_helper - kernelPatches.export_kernel_fpu_functions."5.3" - ]; - }; - - linux_reformNitrogen8m_latest = - callPackage ./kernel { kernelPatches = [ ]; }; - - linuxPackages_reformNitrogen8m_latest = - linuxPackagesFor linux_reformNitrogen8m_latest; - - ubootReformImx8mq = callPackage ./uboot { }; - - }) - ]; - }; - - programs.sway.extraPackages = # unbloat - lib.mkDefault (with pkgs; [ swaylock swayidle xwayland ]); - - system.activationScripts.asound = let - initialAsoundState = pkgs.fetchurl { - url = - "https://source.mnt.re/reform/reform-system-image/-/raw/84bec717ad7366b1d385f3200da192efb0f5bccb/reform2-imx8mq/template-etc/asound.state"; - sha256 = "11wfy8fad5mhr6bga36k7lri85wq74rfzwj9bb9j5rp5cll4jnmb"; - }; - in '' - if [ ! -e "/var/lib/alsa/asound.state" ]; then - mkdir -p /var/lib/alsa - cp ${initialAsoundState} /var/lib/alsa/asound.state - fi - ''; - -} diff --git a/mnt/reform2-nitrogen8m/kernel/default.nix b/mnt/reform2-nitrogen8m/kernel/default.nix deleted file mode 100644 index 81719ad9..00000000 --- a/mnt/reform2-nitrogen8m/kernel/default.nix +++ /dev/null @@ -1,97 +0,0 @@ -{ lib, buildLinux, fetchurl, fetchgit, linux_5_7, kernelPatches, ... }@args: - -let - linux = linux_5_7; - systemImageSrc = fetchgit { - url = "https://source.mnt.re/reform/reform-system-image.git"; - rev = "ef6bae4def9ef08ee388254abf4f1839d44c07a1"; - sha256 = "03nnwjzm8a0bk821p6sfscd04x3jgj29l16ccdkg10xcv2g2z5s8"; - } + "/reform2-imx8mq"; -in lib.overrideDerivation (buildLinux (args // { - inherit (linux) src version; - - features = { - efiBootStub = false; - iwlwifi = false; - } // (args.features or { }); - - kernelPatches = let - patchDir = "${systemImageSrc}/template-kernel/patches"; - reformPatches = map ({ name, extraConfig ? "" }: { - inherit name extraConfig; - patch = "${patchDir}/${name}.patch"; - }) [ - { - name = "0001-drm-bridge-Add-NWL-MIPI-DSI-host-controller-support"; - extraConfig = '' - DRM_NWL_MIPI_DSI m - ''; - } - { name = "0002-dt-bindings-display-bridge-Add-binding-for-NWL-mipi-"; } - { - name = - "0003-DCSS-v4-Add-support-for-iMX8MQ-Display-Controller-Subsystem"; - extraConfig = '' - DRM_IMX_DCSS m - ''; - } - { name = "4101-media-vb2-wait-for-dmabuf-fences"; } - { name = "4201-HACK-media-vb2-don-t-validate-buffer-length"; } - { name = "44f0bbdcf0433052b4e85940cb41d04c13fdad57"; } - { name = "git.linuxtv.org-28a202c55963386b8bc45bcc52029362e9aa0d33"; } - { name = "git.linuxtv.org-88d06362d1d052e4c844ac95a2ca308ed4d90452"; } - { name = "mnt1000-pcie-reparent-clocks"; } - { name = "mnt1001-pcie-support-internal-refclk-aspm"; } - { name = "mnt2000-audio-wm8960-add-dacslope-setting"; } - { name = "mnt2001-audio-sai-workaround-rate-matching"; } - { name = "mnt3000-imx-dcss-tweak-DCSS-pixel-rate-to-prevent-sporadic-d"; } - { name = "mnt3001-nwl-dsi-disable-bridge_mode_fixup-that-breaks-hs-vs-"; } - { name = "mnt3002-MNT-Reform2-add-simple-panel-Innolux-N125HCE-GN1"; } - { - name = "mnt3003-MNT-Reform-import-cadence-HDMI-driver-for-imx8mq-fro"; - extraConfig = '' - DRM_CDNS_AUDIO m - DRM_CDNS_DP m - DRM_CDNS_HDMI m - DRM_CDNS_HDMI_CEC m - DRM_CDNS_MHDP m - ''; - } - { name = "mnt3004-MNT-Reform-imx8mq-add-PHY_27M-clock"; } - { name = "mnt3005-MNT-Reform-imx8mq-DCSS-add-module-option-to-toggle-h"; } - { name = "mnt3006-MNT-Reform-imx8mq-add-PHY_27M-clock-missing-define"; } - { - name = "mnt3007-MNT-Reform-imx8mq-missing-kconf-makefile-for-cadence"; - extraConfig = '' - DRM_IMX_CDNS_MHDP m - DRM_IMX_DCSS m - ''; - } - { - name = "mnt3008-MNT-Reform-imx8mq-missing-makefile-change-for-imx-dc"; - extraConfig = '' - DRM_IMX_DCSS m - ''; - } - ]; - in lib.lists.unique (kernelPatches ++ reformPatches ++ [{ - name = "MNT-Reform-imx8mq-config"; - patch = null; - extraConfig = builtins.readFile (fetchurl { - url = - "https://github.com/NixOS/nixos-hardware/releases/download/mnt-reform2-nitrogen8m-v1/kernel-config"; - sha256 = "1brazbr9zflb29i4fjhwn1z87bg475lqvzkksvi5n775zx28fk65"; - }); - }]); - - allowImportFromDerivation = true; - -} // (args.argsOverride or { }))) (attrs: { - prePatch = attrs.prePatch + '' - cp ${systemImageSrc}/template-kernel/*.dts arch/arm64/boot/dts/freescale/ - cp ${systemImageSrc}/template-kernel/*.dtsi arch/arm64/boot/dts/freescale/ - echo 'dtb-$(CONFIG_ARCH_MXC) += imx8mq-mnt-reform2.dtb' >> \ - arch/arm64/boot/dts/freescale/Makefile - ''; - makeFlags = attrs.makeFlags ++ [ "LOADADDR=0x40480000" ]; -}) diff --git a/mnt/reform2-nitrogen8m/kernel/linux-5.7.nix b/mnt/reform2-nitrogen8m/kernel/linux-5.7.nix deleted file mode 100644 index dd02af3e..00000000 --- a/mnt/reform2-nitrogen8m/kernel/linux-5.7.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: - -with lib; - -buildLinux (args // rec { - version = "5.7.19"; - - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; - - # branchVersion needs to be x.y - extraMeta.branch = versions.majorMinor version; - - src = fetchurl { - url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "1rwzp51ddlkdzanj6i8jqj5yh0njpzn7ly4r8nnzwkdfp5465721"; - }; -} // (args.argsOverride or {})) diff --git a/mnt/reform2-nitrogen8m/uboot/default.nix b/mnt/reform2-nitrogen8m/uboot/default.nix deleted file mode 100644 index 0265d6a3..00000000 --- a/mnt/reform2-nitrogen8m/uboot/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ buildUBoot, fetchgit }: - -buildUBoot rec { - pname = "uboot-reform2-imx8mq"; - version = "2020-06-01"; - src = fetchgit { - url = "https://source.mntmn.com/MNT/reform-boundary-uboot.git"; - rev = version; - sha256 = "0ychnwhisjqm0gzyz0nv9xynl9g114xmxpwz4vm0l5w6sc60jshw"; - }; - defconfig = "nitrogen8m_som_4g_defconfig"; - extraMeta.platforms = [ "aarch64-linux" ]; - filesToInstall = [ "flash.bin" ]; - patches = [ ./shell-syntax.patch ./env_vars.patch ]; - makeFlags = filesToInstall; -} diff --git a/mnt/reform2-nitrogen8m/uboot/env_vars.patch b/mnt/reform2-nitrogen8m/uboot/env_vars.patch deleted file mode 100644 index 6abb1176..00000000 --- a/mnt/reform2-nitrogen8m/uboot/env_vars.patch +++ /dev/null @@ -1,57 +0,0 @@ -commit 32ba0e0bf12827a67959f435e457fb4594a6708f -Author: Emery Hemingway -Date: Mon Jul 27 10:18:38 2020 +0200 - - reform: set envvars for booting NixOS - -diff --git a/board/boundary/nitrogen8m_som/nitrogen8m_som.c b/board/boundary/nitrogen8m_som/nitrogen8m_som.c -index d4d866001d..d1fac5934f 100644 ---- a/board/boundary/nitrogen8m_som/nitrogen8m_som.c -+++ b/board/boundary/nitrogen8m_som/nitrogen8m_som.c -@@ -322,17 +322,13 @@ void init_usb_clk(int usbno); - - static void set_env_vars(void) - { -- printf("set_env_vars()"); -- env_set("board", "MNT Reform 2.0"); // "nitrogen8m_som"); -+#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG -+ if (!env_get("board")) -+ env_set("board", "imx8mq-mnt-reform2"); - env_set("soc", "imx8mq"); - env_set("imx_cpu", get_imx_type((get_cpu_rev() & 0xFF000) >> 12)); - env_set("uboot_defconfig", CONFIG_DEFCONFIG); -- -- // MNT Reform 2 -- env_set("fdt_addr", "0x50000000"); -- env_set("bootargs", "noinitrd root=/dev/mmcblk1p1 rootwait rw console=ttymxc0,115200 console=tty1 cma=512M no_console_suspend pci=nomsi"); -- env_set("bootcmd", "ext4load mmc 1 ${loadaddr} /Image; ext4load mmc 1 ${fdt_addr} /imx8mq-mnt-reform2.dtb; booti ${loadaddr} - ${fdt_addr}"); -- env_set("bootdelay", "1"); -+#endif - } - - void board_set_default_env(void) -diff --git a/include/configs/nitrogen8m_som.h b/include/configs/nitrogen8m_som.h -index 3ada3900db..548e7cd71c 100644 ---- a/include/configs/nitrogen8m_som.h -+++ b/include/configs/nitrogen8m_som.h -@@ -208,7 +208,7 @@ - #define SYS_AUXCORE_BOOTDATA_DDR 0x80000000 - #define SYS_AUXCORE_BOOTDATA_TCM 0x007E0000 - --/*#define CONFIG_EXTRA_ENV_SETTINGS \ -+#define CONFIG_EXTRA_ENV_SETTINGS \ - "console=" BD_CONSOLE "\0" \ - "env_dev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ - "env_part=" __stringify(CONFIG_SYS_MMC_ENV_PART) "\0" \ -@@ -247,7 +247,10 @@ - "setenv ipaddr 10.0.0.2; " \ - "setenv netmask 255.255.255.0; " \ - "setenv serverip 10.0.0.1;\0" \ -- BOOTENV*/ -+ BOOTENV \ -+ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ -+ "ramdisk_addr_r=0x44480000\0" \ -+ "fdt_addr_r=0x43000000\0" - - /* - * PCI express diff --git a/mnt/reform2-nitrogen8m/uboot/shell-syntax.patch b/mnt/reform2-nitrogen8m/uboot/shell-syntax.patch deleted file mode 100644 index aeec47bb..00000000 --- a/mnt/reform2-nitrogen8m/uboot/shell-syntax.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib -index f8c3fff1d1..bb68e119e2 100644 ---- a/scripts/Makefile.lib -+++ b/scripts/Makefile.lib -@@ -299,7 +299,7 @@ quiet_cmd_dtc = DTC $@ - # Modified for U-Boot - # Bring in any U-Boot-specific include at the end of the file - cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ -- (cat $<; $(if $(u_boot_dtsi),echo '\#include "$(u_boot_dtsi)"')) > $(pre-tmp); \ -+ (cat $<; $(if $(u_boot_dtsi),echo '#include "$(u_boot_dtsi)"')) > $(pre-tmp); \ - $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \ - $(DTC) -O dtb -o $@ -b 0 \ - -i $(dir $<) $(DTC_FLAGS) \ From b2186d6c3cdc58fb3a8def0f608bcae61138cc6f Mon Sep 17 00:00:00 2001 From: Pavel Nazarov Date: Tue, 1 Jun 2021 07:30:09 +0300 Subject: [PATCH 0013/1476] Add lenovo-thinkpad-p1 (#266) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- README.md | 4 ++++ flake.nix | 2 ++ lenovo/thinkpad/p1/3th-gen/audio.nix | 7 +++++++ lenovo/thinkpad/p1/3th-gen/default.nix | 7 +++++++ lenovo/thinkpad/p1/3th-gen/nvidia.nix | 13 +++++++++++++ lenovo/thinkpad/p1/default.nix | 17 +++++++++++++++++ 6 files changed, 50 insertions(+) create mode 100644 lenovo/thinkpad/p1/3th-gen/audio.nix create mode 100644 lenovo/thinkpad/p1/3th-gen/default.nix create mode 100644 lenovo/thinkpad/p1/3th-gen/nvidia.nix create mode 100644 lenovo/thinkpad/p1/default.nix diff --git a/README.md b/README.md index 6ba22cd4..5845f8ea 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,8 @@ See code for all available configurations. | Lenovo ThinkPad L13 | `` | | Lenovo ThinkPad L14 (Intel) | ` | | Lenovo ThinkPad L14 (AMD) | ` | +| Lenovo ThinkPad P1 | `` | +| Lenovo ThinkPad P1 Gen 3 | `` | | Lenovo ThinkPad P53 | `` | | Lenovo ThinkPad T14 | `` | | Lenovo ThinkPad T14 AMD Gen 1 | `` | @@ -169,6 +171,8 @@ See code for all available configurations. [Google Pixelbook]: google/pixelbook [GPD MicroPC]: gpd/micropc [Inverse Path USB armory]: inversepath/usbarmory +[Lenovo ThinkPad P1]: lenovo/thinkpad/p1 +[Lenovo ThinkPad P1 (3th Gen)]: lenovo/thinkpad/p1/3th-gen [Lenovo ThinkPad X1 (6th Gen)]: lenovo/thinkpad/x1/6th-gen [Lenovo ThinkPad X1 (7th Gen)]: lenovo/thinkpad/x1/7th-gen [Lenovo ThinkPad X13]: lenovo/thinkpad/x13 diff --git a/flake.nix b/flake.nix index 97934ce5..1d37f227 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,8 @@ lenovo-thinkpad-l13 = import ./lenovo/thinkpad/l13; lenovo-thinkpad-l14-intel = import ./lenovo/thinkpad/l14/intel; lenovo-thinkpad-l14-amd = import ./lenovo/thinkpad/l14/amd; + lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1; + lenovo-thinkpad-p1-gen3 = import ./lenovo/thinkpad/p1/3th-gen; lenovo-thinkpad-p53 = import ./lenovo/thinkpad/p53; lenovo-thinkpad-t14 = import ./lenovo/thinkpad/t14; lenovo-thinkpad-t14-amd-gen1 = import ./lenovo/thinkpad/t14/amd/gen1; diff --git a/lenovo/thinkpad/p1/3th-gen/audio.nix b/lenovo/thinkpad/p1/3th-gen/audio.nix new file mode 100644 index 00000000..8b6c854f --- /dev/null +++ b/lenovo/thinkpad/p1/3th-gen/audio.nix @@ -0,0 +1,7 @@ +{ lib, pkgs, ... }: +{ + # This can be removed when the default kernel is at least version 5.11 due to sof module + boot.kernelPackages = lib.mkIf + (lib.versionOlder pkgs.linux.version "5.11") + (lib.mkDefault pkgs.linuxPackages_latest); +} diff --git a/lenovo/thinkpad/p1/3th-gen/default.nix b/lenovo/thinkpad/p1/3th-gen/default.nix new file mode 100644 index 00000000..3eb9eaaf --- /dev/null +++ b/lenovo/thinkpad/p1/3th-gen/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ../. + ./audio.nix + ./nvidia.nix + ]; +} diff --git a/lenovo/thinkpad/p1/3th-gen/nvidia.nix b/lenovo/thinkpad/p1/3th-gen/nvidia.nix new file mode 100644 index 00000000..62d9ebc5 --- /dev/null +++ b/lenovo/thinkpad/p1/3th-gen/nvidia.nix @@ -0,0 +1,13 @@ +{ lib, pkgs, ... }: +{ + hardware.nvidia.modesetting.enable = true; + hardware.opengl.driSupport32Bit = true; + hardware.opengl.enable = true; + + 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/lenovo/thinkpad/p1/default.nix b/lenovo/thinkpad/p1/default.nix new file mode 100644 index 00000000..b3554c24 --- /dev/null +++ b/lenovo/thinkpad/p1/default.nix @@ -0,0 +1,17 @@ +{ + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/nvidia.nix + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/ssd + ]; + + # Need to set Thunderbolt to "BIOS Assist Mode" + # https://forums.lenovo.com/t5/Other-Linux-Discussions/T480-CPU-temperature-and-fan-speed-under-linux/m-p/4114832 + boot.kernelParams = [ "acpi_backlight=native" ]; + + # Emulate mouse wheel on trackpoint + # hardware.trackpoint.emulateWheel = true; + + services.fprintd.enable = true; +} From cf3508aab6123ad958b6aa6e766cb65c572ad41d Mon Sep 17 00:00:00 2001 From: James Walker Date: Wed, 2 Jun 2021 20:47:23 -0400 Subject: [PATCH 0014/1476] raspberry-pi/4: Add poe-hat option --- raspberry-pi/4/default.nix | 1 + raspberry-pi/4/poe-hat.nix | 122 +++++++++++++++++++++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 raspberry-pi/4/poe-hat.nix diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index d9f5f9b7..36991907 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -4,6 +4,7 @@ imports = [ ./dwc2.nix ./modesetting.nix + ./poe-hat.nix ./tc358743.nix ]; diff --git a/raspberry-pi/4/poe-hat.nix b/raspberry-pi/4/poe-hat.nix new file mode 100644 index 00000000..a7ef673a --- /dev/null +++ b/raspberry-pi/4/poe-hat.nix @@ -0,0 +1,122 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.hardware.raspberry-pi."4".poe-hat; +in { + options.hardware = { + raspberry-pi."4".poe-hat = { + enable = lib.mkEnableOption '' + Enable support for the Raspberry Pi POE Hat. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + # Configure for modesetting in the device tree + hardware.deviceTree = { + overlays = [ + # Equivalent to: https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts + { + name = "rpi-poe-overlay"; + dtsText = '' + /* + * Overlay for the Raspberry Pi POE HAT. + */ + /dts-v1/; + /plugin/; + + / { + compatible = "brcm,bcm2711"; + + fragment@0 { + target-path = "/"; + __overlay__ { + fan0: rpi-poe-fan@0 { + compatible = "raspberrypi,rpi-poe-fan"; + firmware = <&firmware>; + cooling-min-state = <0>; + cooling-max-state = <4>; + #cooling-cells = <2>; + cooling-levels = <0 1 10 100 255>; + status = "okay"; + }; + }; + }; + + fragment@1 { + target = <&cpu_thermal>; + __overlay__ { + trips { + trip0: trip0 { + temperature = <40000>; + hysteresis = <2000>; + type = "active"; + }; + trip1: trip1 { + temperature = <45000>; + hysteresis = <2000>; + type = "active"; + }; + trip2: trip2 { + temperature = <50000>; + hysteresis = <2000>; + type = "active"; + }; + trip3: trip3 { + temperature = <55000>; + hysteresis = <5000>; + type = "active"; + }; + }; + cooling-maps { + map0 { + trip = <&trip0>; + cooling-device = <&fan0 0 1>; + }; + map1 { + trip = <&trip1>; + cooling-device = <&fan0 1 2>; + }; + map2 { + trip = <&trip2>; + cooling-device = <&fan0 2 3>; + }; + map3 { + trip = <&trip3>; + cooling-device = <&fan0 3 4>; + }; + }; + }; + }; + + fragment@2 { + target-path = "/__overrides__"; + __overlay__ { + poe_fan_temp0 = <&trip0>,"temperature:0"; + poe_fan_temp0_hyst = <&trip0>,"hysteresis:0"; + poe_fan_temp1 = <&trip1>,"temperature:0"; + poe_fan_temp1_hyst = <&trip1>,"hysteresis:0"; + poe_fan_temp2 = <&trip2>,"temperature:0"; + poe_fan_temp2_hyst = <&trip2>,"hysteresis:0"; + poe_fan_temp3 = <&trip3>,"temperature:0"; + poe_fan_temp3_hyst = <&trip3>,"hysteresis:0"; + }; + }; + + __overrides__ { + poe_fan_temp0 = <&trip0>,"temperature:0"; + poe_fan_temp0_hyst = <&trip0>,"hysteresis:0"; + poe_fan_temp1 = <&trip1>,"temperature:0"; + poe_fan_temp1_hyst = <&trip1>,"hysteresis:0"; + poe_fan_temp2 = <&trip2>,"temperature:0"; + poe_fan_temp2_hyst = <&trip2>,"hysteresis:0"; + poe_fan_temp3 = <&trip3>,"temperature:0"; + poe_fan_temp3_hyst = <&trip3>,"hysteresis:0"; + }; + }; + ''; + } + ]; + }; + }; +} From fccbee72df707c3fb074854668deee6e1ff02351 Mon Sep 17 00:00:00 2001 From: cwyc <16950437+cwyc@users.noreply.github.com> Date: Tue, 8 Jun 2021 05:09:01 -0400 Subject: [PATCH 0015/1476] thinkpad t14s amd: add amd gpu module (#271) --- lenovo/thinkpad/t14s/amd/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/t14s/amd/default.nix b/lenovo/thinkpad/t14s/amd/default.nix index 2b860e84..fbd9f204 100644 --- a/lenovo/thinkpad/t14s/amd/default.nix +++ b/lenovo/thinkpad/t14s/amd/default.nix @@ -4,6 +4,7 @@ imports = [ ../. ../../../../common/cpu/amd + ../../../../common/gpu/amd ]; # For support of newer AMD GPUs, backlight and internal microphone From 59a171c8332cdb700e8e27f40d0f9c7d73c9cc36 Mon Sep 17 00:00:00 2001 From: Andy Richardson Date: Wed, 9 Jun 2021 12:46:01 +0100 Subject: [PATCH 0016/1476] Fix 9500 wifi support --- dell/xps/15-9500/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dell/xps/15-9500/default.nix b/dell/xps/15-9500/default.nix index c7beda4d..bc41e242 100644 --- a/dell/xps/15-9500/default.nix +++ b/dell/xps/15-9500/default.nix @@ -18,4 +18,11 @@ in # Thermald doesn't have a default config for the 9500 yet, the one in this repo # was generated with dptfxtract-static (https://github.com/intel/dptfxtract) services.thermald.configFile = lib.mkDefault thermald-conf; + + # WiFi speed is slow and crashes by default + # disable_11ax - doesn't actually disable AX but will fix the speed and crashes + # power_save - works well on this card + boot.extraModprobeConfig = '' + options iwlwifi power_save=1 disable_11ax=1 + ''; } From d41711076e6659db6ea608bd556cd925fe830026 Mon Sep 17 00:00:00 2001 From: Andy Richardson Date: Wed, 9 Jun 2021 12:51:33 +0100 Subject: [PATCH 0017/1476] Update default.nix --- dell/xps/15-9500/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dell/xps/15-9500/default.nix b/dell/xps/15-9500/default.nix index bc41e242..22659ceb 100644 --- a/dell/xps/15-9500/default.nix +++ b/dell/xps/15-9500/default.nix @@ -20,7 +20,7 @@ in services.thermald.configFile = lib.mkDefault thermald-conf; # WiFi speed is slow and crashes by default - # disable_11ax - doesn't actually disable AX but will fix the speed and crashes + # 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 From 6392ffbafb6c13a0f5d72759666f4b15ef056e4a Mon Sep 17 00:00:00 2001 From: Andy Richardson Date: Wed, 9 Jun 2021 13:18:05 +0100 Subject: [PATCH 0018/1476] Update default.nix --- dell/xps/15-9500/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dell/xps/15-9500/default.nix b/dell/xps/15-9500/default.nix index 22659ceb..7d346a27 100644 --- a/dell/xps/15-9500/default.nix +++ b/dell/xps/15-9500/default.nix @@ -19,7 +19,7 @@ in # was generated with dptfxtract-static (https://github.com/intel/dptfxtract) services.thermald.configFile = lib.mkDefault thermald-conf; - # WiFi speed is slow and crashes by default + # 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 = '' From b0f31689acd3c7da53ad003ff392205c3131efa3 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 11 Jun 2021 17:04:10 -0300 Subject: [PATCH 0019/1476] Remove intel drivers from nvidia-disable Two reasons for this change: - `intel` drivers are not updated from quite a long time (since ~2019), and `modesetting` is the preferred one for Intel iGPUs. - Technically you may want to disable NVIDIA GPUs on laptops with AMD processors too. We don't want to pin `modesetting` here because it is already the default since PR: https://github.com/NixOS/nixpkgs/pull/111551. --- common/gpu/nvidia-disable.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/common/gpu/nvidia-disable.nix b/common/gpu/nvidia-disable.nix index 53c53d9e..f2e2158f 100644 --- a/common/gpu/nvidia-disable.nix +++ b/common/gpu/nvidia-disable.nix @@ -6,5 +6,4 @@ ##### disable nvidia, very nice battery life. hardware.nvidiaOptimus.disable = lib.mkDefault true; boot.blacklistedKernelModules = lib.mkDefault [ "nouveau" "nvidia" ]; - services.xserver.videoDrivers = lib.mkDefault [ "intel" ]; } From a67ed0c3a2d1b31f8233195cbd36bb2501bdf1bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 12 Jun 2021 10:13:10 +0100 Subject: [PATCH 0020/1476] Add Lenovo Thinkpad T480 --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/t480/default.nix | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 lenovo/thinkpad/t480/default.nix diff --git a/README.md b/README.md index 5845f8ea..8f271fa7 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,7 @@ See code for all available configurations. | Lenovo ThinkPad T460 | `` | | Lenovo ThinkPad T460s | `` | | Lenovo ThinkPad T470s | `` | +| Lenovo ThinkPad T480 | `` | | Lenovo ThinkPad T480s | `` | | Lenovo ThinkPad T490 | `` | | Lenovo ThinkPad T495 | `` | diff --git a/flake.nix b/flake.nix index 1d37f227..5353d264 100644 --- a/flake.nix +++ b/flake.nix @@ -55,6 +55,7 @@ lenovo-thinkpad-t460 = import ./lenovo/thinkpad/t460; lenovo-thinkpad-t460s = import ./lenovo/thinkpad/t460s; lenovo-thinkpad-t470s = import ./lenovo/thinkpad/t470s; + lenovo-thinkpad-t480 = import ./lenovo/thinkpad/t480; lenovo-thinkpad-t480s = import ./lenovo/thinkpad/t480s; lenovo-thinkpad-t490 = import ./lenovo/thinkpad/t490; lenovo-thinkpad-t495 = import ./lenovo/thinkpad/t495; diff --git a/lenovo/thinkpad/t480/default.nix b/lenovo/thinkpad/t480/default.nix new file mode 100644 index 00000000..1a14afa6 --- /dev/null +++ b/lenovo/thinkpad/t480/default.nix @@ -0,0 +1,11 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop/acpi_call.nix + ../. + ]; + + services.throttled.enable = lib.mkDefault true; +} From d4f7a768c08bd2d999971074742e597f066d3099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 13 Jun 2021 09:11:52 +0200 Subject: [PATCH 0021/1476] README.md: fix tests --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5845f8ea..0904112f 100644 --- a/README.md +++ b/README.md @@ -104,8 +104,8 @@ See code for all available configurations. | Lenovo ThinkPad L13 | `` | | Lenovo ThinkPad L14 (Intel) | ` | | Lenovo ThinkPad L14 (AMD) | ` | -| Lenovo ThinkPad P1 | `` | -| Lenovo ThinkPad P1 Gen 3 | `` | +| Lenovo ThinkPad P1 | `` | +| Lenovo ThinkPad P1 Gen 3 | `` | | Lenovo ThinkPad P53 | `` | | Lenovo ThinkPad T14 | `` | | Lenovo ThinkPad T14 AMD Gen 1 | `` | From adfa06e0a9c39a0e4894335d38aa265252d21a86 Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Sun, 6 Jun 2021 18:28:46 +0200 Subject: [PATCH 0022/1476] onenetbook/4: init, fix stylus --- README.md | 2 + onenetbook/4/default.nix | 21 ++++++++ onenetbook/4/goodix-stylus-mastykin/Makefile | 7 +++ .../4/goodix-stylus-mastykin/default.nix | 49 +++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 onenetbook/4/default.nix create mode 100644 onenetbook/4/goodix-stylus-mastykin/Makefile create mode 100644 onenetbook/4/goodix-stylus-mastykin/default.nix diff --git a/README.md b/README.md index d346b73f..f70a7050 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,7 @@ See code for all available configurations. | [Lenovo ThinkPad X1 (7th Gen)][] | `` | | Lenovo ThinkPad X1 Extreme Gen 2 | `` | | [Lenovo ThinkPad X13][] | `` | | [Microsoft Surface Pro 3][] | `` | | [MSI GS60 2QE][] | `` | @@ -181,6 +182,7 @@ See code for all available configurations. [Lenovo ThinkPad X260]: lenovo/thinkpad/x260 [Microsoft Surface Pro 3]: microsoft/surface-pro/3 [MSI GS60 2QE]: msi/gs60 +[One-Netbook OneNetbook 4]: onenetbook/4 [Raspberry Pi 2]: raspberry-pi/2 [Samsung Series 9 NP900X3C]: samsung/np900x3c [System76 (generic)]: system76 diff --git a/onenetbook/4/default.nix b/onenetbook/4/default.nix new file mode 100644 index 00000000..c02ba8ad --- /dev/null +++ b/onenetbook/4/default.nix @@ -0,0 +1,21 @@ +{ pkgs, config, ... }: + +{ + imports = [ + ../../common/cpu/intel + ../../common/pc/laptop + ../../common/pc/laptop/ssd + ]; + + # OneNetbook 4 has `GXTP7386:00 27C6:011A Stylus` exporting no buttons in 5.12 + # and libinput does't consider it a tablet without them, but a touchscreen. + # This leads to real weird effects, + # starting from clicking as soon as the pen gets tracked. + # A kernel patch exists to resolve that, compiled as an out-of-tree module here + # to avoid recompiling the kernel for such a small change. + # `hid-multitouch-onenetbook4` is the fixed one, don't use `hid-multitouch`. + boot.blacklistedKernelModules = [ "hid-multitouch" ]; + boot.extraModulePackages = [ + (config.boot.kernelPackages.callPackage ./goodix-stylus-mastykin {}) + ]; +} diff --git a/onenetbook/4/goodix-stylus-mastykin/Makefile b/onenetbook/4/goodix-stylus-mastykin/Makefile new file mode 100644 index 00000000..7896ce05 --- /dev/null +++ b/onenetbook/4/goodix-stylus-mastykin/Makefile @@ -0,0 +1,7 @@ +obj-m += hid-multitouch-onenetbook4.o + +all: + make -C $(KERNEL_DIR) M=$(PWD) modules + +install: + make -C $(KERNEL_DIR) M=$(PWD) modules_install diff --git a/onenetbook/4/goodix-stylus-mastykin/default.nix b/onenetbook/4/goodix-stylus-mastykin/default.nix new file mode 100644 index 00000000..2f534a95 --- /dev/null +++ b/onenetbook/4/goodix-stylus-mastykin/default.nix @@ -0,0 +1,49 @@ +{ stdenv, lib, kernel, fetchpatch }: + +stdenv.mkDerivation rec { + name = "hid-multitouch-onenetbook4-${version}"; + version = kernel.version; + + hardeningDisable = [ "pic" "format" ]; + nativeBuildInputs = kernel.moduleBuildDependencies; + + src = ./.; + patches = [ + (fetchpatch { + url = "https://marc.info/?l=linux-input&m=161847127221531&q=p3"; + name = "goodix-stylus-mastykin-1-pen-support.patch"; + sha256 = "sha256-1oc8OvfhScYvtsMeV9A4hU+09i59tEJ6HZS6jspsJR8="; + }) + (fetchpatch { + url = "https://marc.info/?l=linux-input&m=161847127221531&q=p4"; + name = "goodix-stylus-mastykin-2-buttons.patch"; + sha256 = "sha256-HxmR8iEgoj4PJopGWJdWsjFxbfISwTMzz+HyG81mRG4="; + }) + ]; + + postUnpack = '' + tar -C goodix-stylus-mastykin \ + --strip-components=3 -xf ${kernel.src} --wildcards \ + '*/drivers/hid/hid-ids.h' '*/drivers/hid/hid-multitouch.c' + ''; + patchFlags = "-p3"; + postPatch = '' + mv hid-multitouch.c hid-multitouch-onenetbook4.c + substituteInPlace hid-multitouch-onenetbook4.c --replace \ + '.name = "hid-multitouch",' \ + '.name = "hid-multitouch-onenetbook4",' + substituteInPlace hid-multitouch-onenetbook4.c --replace \ + I2C_DEVICE_ID_GOODIX_0113 \ + 0x011A + ''; + + makeFlags = [ + "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "INSTALL_MOD_PATH=$(out)" + ]; + + meta = with lib; { + description = "hid-multitouch module patched for OneNetbook 4"; + platforms = platforms.linux; + }; +} From 9a4e7bdd2a7b256b6103a5adbf10175a59365664 Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Sun, 6 Jun 2021 20:13:16 +0200 Subject: [PATCH 0023/1476] onenetbook/4: fix accelerometer --- onenetbook/4/default.nix | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/onenetbook/4/default.nix b/onenetbook/4/default.nix index c02ba8ad..374b69a5 100644 --- a/onenetbook/4/default.nix +++ b/onenetbook/4/default.nix @@ -1,5 +1,9 @@ -{ pkgs, config, ... }: +{ pkgs, config, lib, ... }: +let + iio-sensor-proxy-supports-rotation = + lib.versionAtLeast pkgs.iio-sensor-proxy.version "3.0"; +in { imports = [ ../../common/cpu/intel @@ -18,4 +22,31 @@ boot.extraModulePackages = [ (config.boot.kernelPackages.callPackage ./goodix-stylus-mastykin {}) ]; + + # OneNetbook 4 has an accelerometer, + hardware.sensor.iio.enable = lib.mkDefault iio-sensor-proxy-supports-rotation; + # said accelerometer needs rotation, rotation needs iio-sensor-proxy >= 3.0 + services.udev.extraHwdb = lib.mkIf iio-sensor-proxy-supports-rotation '' + acpi:BOSC0200:BOSC0200:* + ACCEL_MOUNT_MATRIX=0, 1, 0; 0, 0, 1; 1, 0, 0 + ''; + # (this at least gets normal/left-up/right-up/bottom-up right) + # Until https://github.com/NixOS/nixpkgs/pull/125989 reaches you, you can use + #nixpkgs.overlays = [ + # (self: super: { + # iio-sensor-proxy = + # if (lib.versionOlder super.iio-sensor-proxy.version "3.0") then + # (super.iio-sensor-proxy.overrideAttrs (oa: rec { + # version = "3.0"; + # src = pkgs.fetchFromGitLab { + # domain = "gitlab.freedesktop.org"; + # owner = "hadess"; + # repo = "iio-sensor-proxy"; + # rev = version; + # sha256 = "0ngbz1vkbjci3ml6p47jh6c6caipvbkm8mxrc8ayr6vc2p9l1g49"; + # }; + # })) + # else super.iio-sensor-proxy; + # }) + #]; } From 4f74b8b63af6d896369b3c6bcd87eafa665e8b64 Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Sat, 26 Jun 2021 12:05:54 +0200 Subject: [PATCH 0024/1476] onenetbook/4: update stylus patch for 5.12.12 --- .../5.12.12.patch.patch | 17 +++++++++ .../4/goodix-stylus-mastykin/default.nix | 35 ++++++++++++------- 2 files changed, 39 insertions(+), 13 deletions(-) create mode 100644 onenetbook/4/goodix-stylus-mastykin/5.12.12.patch.patch diff --git a/onenetbook/4/goodix-stylus-mastykin/5.12.12.patch.patch b/onenetbook/4/goodix-stylus-mastykin/5.12.12.patch.patch new file mode 100644 index 00000000..8cd8f313 --- /dev/null +++ b/onenetbook/4/goodix-stylus-mastykin/5.12.12.patch.patch @@ -0,0 +1,17 @@ +--- orig/patch1 ++++ updated/patch1 +@@ -10,11 +10,11 @@ + /* quirks to control the device */ + #define MT_QUIRK_NOT_SEEN_MEANS_UP BIT(0) + #define MT_QUIRK_SLOT_IS_CONTACTID BIT(1) +-@@ -70,6 +73,7 @@ +- #define MT_QUIRK_WIN8_PTP_BUTTONS BIT(18) ++@@ -71,6 +74,7 @@ + #define MT_QUIRK_SEPARATE_APP_REPORT BIT(19) + #define MT_QUIRK_FORCE_MULTI_INPUT BIT(20) +-+#define MT_QUIRK_NON_MT_PEN BIT(21) ++ #define MT_QUIRK_DISABLE_WAKEUP BIT(21) +++#define MT_QUIRK_NON_MT_PEN BIT(22) + + #define MT_INPUTMODE_TOUCHSCREEN 0x02 + #define MT_INPUTMODE_TOUCHPAD 0x03 diff --git a/onenetbook/4/goodix-stylus-mastykin/default.nix b/onenetbook/4/goodix-stylus-mastykin/default.nix index 2f534a95..d80749c8 100644 --- a/onenetbook/4/goodix-stylus-mastykin/default.nix +++ b/onenetbook/4/goodix-stylus-mastykin/default.nix @@ -1,5 +1,25 @@ -{ stdenv, lib, kernel, fetchpatch }: +{ stdenv, lib, kernel, fetchpatch, runCommandNoCC, patch }: +let + patch1_original = fetchpatch { + url = "https://marc.info/?l=linux-input&m=161847127221531&q=p3"; + name = "goodix-stylus-mastykin-1-pen-support.patch"; + sha256 = "sha256-1oc8OvfhScYvtsMeV9A4hU+09i59tEJ6HZS6jspsJR8="; + }; + patch1_updated_5_12_12 = runCommandNoCC + "goodix-stylus-mastykin-1-pen-support-5.12.12.patch" {} + '' + cat ${patch1_original} > $out + ${patch}/bin/patch $out < ${./5.12.12.patch.patch} + ''; + patch1 = if (lib.versionAtLeast kernel.version "5.12.12") then + patch1_updated_5_12_12 else patch1_original; + patch2 = fetchpatch { + url = "https://marc.info/?l=linux-input&m=161847127221531&q=p4"; + name = "goodix-stylus-mastykin-2-buttons.patch"; + sha256 = "sha256-HxmR8iEgoj4PJopGWJdWsjFxbfISwTMzz+HyG81mRG4="; + }; +in stdenv.mkDerivation rec { name = "hid-multitouch-onenetbook4-${version}"; version = kernel.version; @@ -8,18 +28,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = kernel.moduleBuildDependencies; src = ./.; - patches = [ - (fetchpatch { - url = "https://marc.info/?l=linux-input&m=161847127221531&q=p3"; - name = "goodix-stylus-mastykin-1-pen-support.patch"; - sha256 = "sha256-1oc8OvfhScYvtsMeV9A4hU+09i59tEJ6HZS6jspsJR8="; - }) - (fetchpatch { - url = "https://marc.info/?l=linux-input&m=161847127221531&q=p4"; - name = "goodix-stylus-mastykin-2-buttons.patch"; - sha256 = "sha256-HxmR8iEgoj4PJopGWJdWsjFxbfISwTMzz+HyG81mRG4="; - }) - ]; + patches = [ patch1 patch2 ]; postUnpack = '' tar -C goodix-stylus-mastykin \ From a4a9796b73318ad254c4555d5e722acef0b6818b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 26 Jun 2021 15:11:18 +0200 Subject: [PATCH 0025/1476] p1: remove nvidia module again --- lenovo/thinkpad/p1/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lenovo/thinkpad/p1/default.nix b/lenovo/thinkpad/p1/default.nix index b3554c24..3575693c 100644 --- a/lenovo/thinkpad/p1/default.nix +++ b/lenovo/thinkpad/p1/default.nix @@ -1,7 +1,9 @@ { imports = [ ../../../common/cpu/intel - ../../../common/gpu/nvidia.nix + # might need nvidia module but we don't know the PCI ids: + # https://github.com/NixOS/nixos-hardware/pull/274#discussion_r650483740 + #../../../common/gpu/nvidia.nix ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ]; From 49cb5fb3d34e718dabd025c6d8162a5a4413b521 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 30 Jun 2021 16:18:18 +0200 Subject: [PATCH 0026/1476] Add L13 Yoga --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/l13-yoga/default.nix | 15 +++++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 lenovo/thinkpad/l13-yoga/default.nix diff --git a/README.md b/README.md index f70a7050..24a8d6ec 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ See code for all available configurations. | Lenovo ThinkPad E470 | `` | | Lenovo ThinkPad E495 | `` | | Lenovo ThinkPad L13 | `` | +| Lenovo ThinkPad L13 Yoga | `` | | Lenovo ThinkPad L14 (Intel) | ` | | Lenovo ThinkPad L14 (AMD) | ` | | Lenovo ThinkPad P1 | `` | diff --git a/flake.nix b/flake.nix index 5353d264..a7ad2a33 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,7 @@ lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; lenovo-thinkpad-e495 = import ./lenovo/thinkpad/e495; lenovo-thinkpad-l13 = import ./lenovo/thinkpad/l13; + lenovo-thinkpad-l13-yoga = import ./lenovo/thinkpad/l13-yoga; lenovo-thinkpad-l14-intel = import ./lenovo/thinkpad/l14/intel; lenovo-thinkpad-l14-amd = import ./lenovo/thinkpad/l14/amd; lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1; diff --git a/lenovo/thinkpad/l13-yoga/default.nix b/lenovo/thinkpad/l13-yoga/default.nix new file mode 100644 index 00000000..b93e2fb1 --- /dev/null +++ b/lenovo/thinkpad/l13-yoga/default.nix @@ -0,0 +1,15 @@ +{ nixos, lib, pkgs, config, stdenv, ... }: +{ + imports = [ + ../. + ../../../common/cpu/intel + ../../../common/pc/laptop/acpi_call.nix + ]; + + services.throttled.enable = lib.mkDefault true; + + # automatic screen orientation + hardware.sensor.iio.enable = true; + + services.xserver.wacom.enable = lib.mkDefault config.services.xserver.enable; +} From 244e81c2a7a86bdb80249bed9337b92697cf75cf Mon Sep 17 00:00:00 2001 From: Sandro Date: Wed, 30 Jun 2021 23:50:00 +0200 Subject: [PATCH 0027/1476] toshiba/swanky: remove usage of alias --- toshiba/swanky/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toshiba/swanky/default.nix b/toshiba/swanky/default.nix index 8361df66..2f552802 100644 --- a/toshiba/swanky/default.nix +++ b/toshiba/swanky/default.nix @@ -18,9 +18,9 @@ in # Sound requires a custom UCM config: system.replaceRuntimeDependencies = [{ - original = pkgs.alsaLib; + original = pkgs.alsa-lib; - replacement = pkgs.alsaLib.overrideAttrs (super: { + replacement = pkgs.alsa-lib.overrideAttrs (super: { postFixup = "cp -r ${ucm}/chtmax98090 $out/share/alsa/ucm"; }); }]; From 03085184c93706b992eabe383d2cf17a186355ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 1 Jul 2021 07:32:03 +0200 Subject: [PATCH 0028/1476] thinkpad-l13: add ssd --- lenovo/thinkpad/l13/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/l13/default.nix b/lenovo/thinkpad/l13/default.nix index 3c09f509..95308ab9 100644 --- a/lenovo/thinkpad/l13/default.nix +++ b/lenovo/thinkpad/l13/default.nix @@ -3,6 +3,7 @@ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/ssd ../. ]; From 96e678dbc434fca912a37bfba69f0cc5c9d16439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 1 Jul 2021 10:04:31 +0200 Subject: [PATCH 0029/1476] README: inline links A lot of links where broken. Inlining links for all profiles makes it easier to review and contribute. --- README.md | 215 ++++++++++++++++++++++-------------------------------- 1 file changed, 89 insertions(+), 126 deletions(-) diff --git a/README.md b/README.md index f70a7050..159b15e5 100644 --- a/README.md +++ b/README.md @@ -65,132 +65,95 @@ you can easily pin to a particular revision if you desire more stability. See code for all available configurations. -| Model | Path | -| --------------------------------- | -------------------------------------------------- | -| [Acer Aspire 4810T][] | `` | -| Airis N990 | `` | -| Apple MacBook Air 3,X | `` | -| Apple MacBook Air 4,X | `` | -| Apple MacBook Air 6,X | `` | -| [Apple MacBook Pro 10,1][] | `` | -| Apple MacBook Pro 12,1 | `` | -| Asus TUF FX504GD | `` | -| BeagleBoard PocketBeagle | `` | -| [Dell G3 3779][] | `` | -| Dell Latitude 3480 | `` | -| Dell Precision 5530 | `` | -| [Dell XPS E7240][] | `` | -| [Dell XPS 13 7390][] | `` | -| [Dell XPS 13 9310][] | `` | -| [Dell XPS 13 9343][] | `` | -| [Dell XPS 13 9360][] | `` | -| [Dell XPS 13 9370][] | `` | -| [Dell XPS 13 9380][] | `` | -| [Dell XPS 15 7590][] | `` | -| [Dell XPS 15 9550][] | `` | -| [Dell XPS 15 9550, nvidia][] | `` | -| [Dell XPS 15 9560][] | `` | -| [Dell XPS 15 9560, intel only][] | `` | -| [Dell XPS 15 9560, nvidia only][] | `` | -| [Dell XPS 15 9500][] | `` | -| [Dell XPS 15 9500, nvidia][] | `` | -| FriendlyARM NanoPC-T4 | `` | -| [Google Pixelbook][] | `` | -| [GPD MicroPC][] | `` | -| [Inverse Path USB armory][] | `` | -| Lenovo IdeaPad Z510 | `` | -| Lenovo ThinkPad E470 | `` | -| Lenovo ThinkPad E495 | `` | -| Lenovo ThinkPad L13 | `` | -| Lenovo ThinkPad L14 (Intel) | ` | -| Lenovo ThinkPad L14 (AMD) | ` | -| Lenovo ThinkPad P1 | `` | -| Lenovo ThinkPad P1 Gen 3 | `` | -| Lenovo ThinkPad P53 | `` | -| Lenovo ThinkPad T14 | `` | -| Lenovo ThinkPad T14 AMD Gen 1 | `` | -| Lenovo ThinkPad T14s | `` | -| Lenovo ThinkPad T14s AMD Gen 1 | `` | -| Lenovo ThinkPad T410 | `` | -| Lenovo ThinkPad T420 | `` | -| Lenovo ThinkPad T430 | `` | -| Lenovo ThinkPad T440s | `` | -| Lenovo ThinkPad T440p | `` | -| Lenovo ThinkPad T450s | `` | -| Lenovo ThinkPad T460 | `` | -| Lenovo ThinkPad T460s | `` | -| Lenovo ThinkPad T470s | `` | -| Lenovo ThinkPad T480 | `` | -| Lenovo ThinkPad T480s | `` | -| Lenovo ThinkPad T490 | `` | -| Lenovo ThinkPad T495 | `` | -| Lenovo ThinkPad X113 Yoga | `` | -| Lenovo ThinkPad X140e | `` | -| Lenovo ThinkPad X200s | `` | -| Lenovo ThinkPad X220 | `` | -| Lenovo ThinkPad X230 | `` | -| Lenovo ThinkPad X250 | `` | -| [Lenovo ThinkPad X260][] | `` | -| Lenovo ThinkPad X270 | `` | -| Lenovo ThinkPad X280 | `` | -| [Lenovo ThinkPad X1 (6th Gen)][] | `` | -| [Lenovo ThinkPad X1 (7th Gen)][] | `` | -| Lenovo ThinkPad X1 Extreme Gen 2 | `` | -| [Lenovo ThinkPad X13][] | `` | -| [Microsoft Surface Pro 3][] | `` | -| [MSI GS60 2QE][] | `` | -| PC Engines APU | `` | -| [Raspberry Pi 2][] | `` | -| [Raspberry Pi 4][] | `` | -| [Samsung Series 9 NP900X3C][] | `` | -| [Purism Librem 13v3][] | `` | -| [Purism Librem 15v3][] | `` | -| Supermicro A1SRi-2758F | `` | -| Supermicro X10SLL-F | `` | -| [System76 (generic)][] | `` | -| [System76 Darter Pro 6][] | `` | -| [Toshiba Chromebook 2 `swanky`][] | `` | -| [Tuxedo InfinityBook v4][] | `` | - -[Acer Aspire 4810T]: acer/aspire/4810t -[Asus TUF FX504GD]: asus/fx504gd -[Apple MacBook Pro 10,1]: apple/macbook-pro/10-1 -[Dell G3 3779]: dell/g3/3779 -[Dell XPS E7240]: dell/e7240 -[Dell XPS 13 7390]: dell/xps/13-7390 -[Dell XPS 13 9343]: dell/xps/13-9343 -[Dell XPS 13 9310]: dell/xps/13-9310 -[Dell XPS 13 9360]: dell/xps/13-9360 -[Dell XPS 13 9370]: dell/xps/13-9370 -[Dell XPS 13 9380]: dell/xps/13-9380 -[Dell XPS 15 7590]: dell/xps/15-7590 -[Dell XPS 15 9550]: dell/xps/15-9550 -[Dell XPS 15 9560]: dell/xps/15-9560 -[Dell XPS 15 9560, intel only]: dell/xps/15-9560/intel -[Dell XPS 15 9560, nvidia only]: dell/xps/15-9560/nvidia -[Google Pixelbook]: google/pixelbook -[GPD MicroPC]: gpd/micropc -[Inverse Path USB armory]: inversepath/usbarmory -[Lenovo ThinkPad P1]: lenovo/thinkpad/p1 -[Lenovo ThinkPad P1 (3th Gen)]: lenovo/thinkpad/p1/3th-gen -[Lenovo ThinkPad X1 (6th Gen)]: lenovo/thinkpad/x1/6th-gen -[Lenovo ThinkPad X1 (7th Gen)]: lenovo/thinkpad/x1/7th-gen -[Lenovo ThinkPad X13]: lenovo/thinkpad/x13 -[Lenovo ThinkPad X13 Yoga]: lenovo/thinkpad/x13-yoga -[Lenovo ThinkPad X260]: lenovo/thinkpad/x260 -[Microsoft Surface Pro 3]: microsoft/surface-pro/3 -[MSI GS60 2QE]: msi/gs60 -[One-Netbook OneNetbook 4]: onenetbook/4 -[Raspberry Pi 2]: raspberry-pi/2 -[Samsung Series 9 NP900X3C]: samsung/np900x3c -[System76 (generic)]: system76 -[System76 Darter Pro 6]: system76/darp6 -[Purism Librem 13v3]: purism/librem/13v3 -[Purism Librem 15v5]: purism/librem/15v5 -[Toshiba Chromebook 2 `swanky`]: toshiba/swanky -[Tuxedo InfinityBook v4]: nixos-hardware/tuxedo/infinitybook/v4 +| Model | Path | +| ------------------------------------------------------------------- | -------------------------------------------------- | +| [Acer Aspire 4810T](acer/aspire/4810t) | `` | +| [Airis N990](airis/n990) | `` | +| [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | +| [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | +| [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | +| [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | +| [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | +| [Asus TUF FX504GD](asus/fx504gd) | `` | +| [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | +| [Dell G3 3779](dell/g3/3779) | `` | +| [Dell Latitude 3480](dell/latitude/3480) | `` | +| [Dell Precision 5530](dell/precision/5530) | `` | +| [Dell XPS E7240](dell/e7240) | `` | +| [Dell XPS 13 7390](dell/xps/13-7390) | `` | +| [Dell XPS 13 9310](dell/xps/13-9310) | `` | +| [Dell XPS 13 9343](dell/xps/13-9343) | `` | +| [Dell XPS 13 9360](dell/xps/13-9360) | `` | +| [Dell XPS 13 9370](dell/xps/13-9370) | `` | +| [Dell XPS 13 9380](dell/xps/13-9380) | `` | +| [Dell XPS 15 7590](dell/xps/15-7590) | `` | +| [Dell XPS 15 9550](dell/xps/15-9550) | `` | +| [Dell XPS 15 9550, nvidia](dell/xps/15-9550/nvidia) | `` | +| [Dell XPS 15 9560](dell/xps/15-9560) | `` | +| [Dell XPS 15 9560, intel only](dell/xps/15-9560/intel) | `` | +| [Dell XPS 15 9560, nvidia only](dell/xps/15-9560/nvidia) | `` | +| [Dell XPS 15 9500](dell/xps/15-9500) | `` | +| [Dell XPS 15 9500, nvidia](dell/xps/15-9500/nvidia) | `` | +| [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | +| [Google Pixelbook](google/pixelbook) | `` | +| [GPD MicroPC](gpd/micropc) | `` | +| [Inverse Path USB armory](inversepath/usbarmory) | `` | +| [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | +| [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | +| [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | +| [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | +| [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | +| [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | +| [Lenovo ThinkPad P1](thinkpad/p1) | `` | +| [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | +| [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | +| [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | +| [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | +| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | +| [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | +| [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `` | +| [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `` | +| [Lenovo ThinkPad T430](lenovo/thinkpad/t430) | `` | +| [Lenovo ThinkPad T440s](lenovo/thinkpad/t440s) | `` | +| [Lenovo ThinkPad T440p](lenovo/thinkpad/t440p) | `` | +| [Lenovo ThinkPad T450s](lenovo/thinkpad/t450s) | `` | +| [Lenovo ThinkPad T460](lenovo/thinkpad/t460) | `` | +| [Lenovo ThinkPad T460s](lenovo/thinkpad/t460s) | `` | +| [Lenovo ThinkPad T470s](lenovo/thinkpad/t470s) | `` | +| [Lenovo ThinkPad T480](lenovo/thinkpad/t480) | `` | +| [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `` | +| [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | +| [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | +| [Lenovo ThinkPad X113 Yoga](lenovo/thinkpad/x13-yoga) | `` | +| [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | +| [Lenovo ThinkPad X200s](lenovo/thinkpad/x200s) | `` | +| [Lenovo ThinkPad X220](lenovo/thinkpad/x220) | `` | +| [Lenovo ThinkPad X230](lenovo/thinkpad/x230) | `` | +| [Lenovo ThinkPad X250](lenovo/thinkpad/x250) | `` | +| [Lenovo ThinkPad X260](lenovo/thinkpad/x260) | `` | +| [Lenovo ThinkPad X270](lenovo/thinkpad/x270) | `` | +| [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | +| [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | +| [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | +| [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | +| [Lenovo ThinkPad X13](lenovo/thinkpad/x13) | `` | +| [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | +| [MSI GS60 2QE](msi/gs60) | `` | +| [PC Engines APU](pcengines/apu) | `` | +| [Raspberry Pi 2](raspberry-pi/2) | `` | +| [Raspberry Pi 4](raspberry-pi/4) | `` | +| [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | +| [Purism Librem 13v3](purism/librem/13v3) | `` | +| [Purism Librem 15v3](purism/librem/15v3) | `` | +| [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | +| [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | +| [System76 (generic)](system76) | `` | +| [System76 Darter Pro 6](system76/darp6) | `` | +| [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | +| [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | ## How to contribute a new device profile From 53b0197e38262a81841c6a087400865336d6e6c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 1 Jul 2021 10:18:20 +0200 Subject: [PATCH 0030/1476] README: resolve symlinks for some profiles --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 159b15e5..47383f57 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ See code for all available configurations. | [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | | [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | | [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | -| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | +| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | | [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | | [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `` | | [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `` | @@ -147,7 +147,7 @@ See code for all available configurations. | [Raspberry Pi 4](raspberry-pi/4) | `` | | [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | | [Purism Librem 13v3](purism/librem/13v3) | `` | -| [Purism Librem 15v3](purism/librem/15v3) | `` | +| [Purism Librem 15v3](purism/librem/13v3) | `` | | [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | | [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | | [System76 (generic)](system76) | `` | From 6a77d708e731600948d9ad5d53338f103f243c70 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 1 Jul 2021 11:42:08 +0200 Subject: [PATCH 0031/1476] leovo/thinkpad/l13-yoga: Use L13's definition --- lenovo/thinkpad/l13-yoga/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lenovo/thinkpad/l13-yoga/default.nix b/lenovo/thinkpad/l13-yoga/default.nix index b93e2fb1..df95b14f 100644 --- a/lenovo/thinkpad/l13-yoga/default.nix +++ b/lenovo/thinkpad/l13-yoga/default.nix @@ -1,13 +1,9 @@ { nixos, lib, pkgs, config, stdenv, ... }: { imports = [ - ../. - ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix + ../l13 ]; - services.throttled.enable = lib.mkDefault true; - # automatic screen orientation hardware.sensor.iio.enable = true; From c076216644bcd1112a6e02094a81c2c461d7cbab Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 1 Jul 2021 13:52:08 +0200 Subject: [PATCH 0032/1476] lenovo/thinkpad: Refactor of yogas --- README.md | 4 ++-- flake.nix | 4 ++-- .../thinkpad/{l13-yoga/default.nix => l13/yoga.nix} | 6 ++---- lenovo/thinkpad/x13-yoga/default.nix | 13 ------------- lenovo/thinkpad/x13/yoga.nix | 8 ++++++++ lenovo/thinkpad/yoga.nix | 6 ++++++ 6 files changed, 20 insertions(+), 21 deletions(-) rename lenovo/thinkpad/{l13-yoga/default.nix => l13/yoga.nix} (64%) delete mode 100644 lenovo/thinkpad/x13-yoga/default.nix create mode 100644 lenovo/thinkpad/x13/yoga.nix create mode 100644 lenovo/thinkpad/yoga.nix diff --git a/README.md b/README.md index cb30dd3d..98609ab4 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ See code for all available configurations. | [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | | [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | | [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | -| [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13-yoga) | `` | +| [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13/yoga.nix) | `` | | [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | | [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | | [Lenovo ThinkPad P1](thinkpad/p1) | `` | @@ -125,7 +125,7 @@ See code for all available configurations. | [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `` | | [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | | [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | -| [Lenovo ThinkPad X113 Yoga](lenovo/thinkpad/x13-yoga) | `` | +| [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga.nix) | `` | | [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | | [Lenovo ThinkPad X200s](lenovo/thinkpad/x200s) | `` | | [Lenovo ThinkPad X220](lenovo/thinkpad/x220) | `` | diff --git a/flake.nix b/flake.nix index a7ad2a33..67349b32 100644 --- a/flake.nix +++ b/flake.nix @@ -37,7 +37,7 @@ lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; lenovo-thinkpad-e495 = import ./lenovo/thinkpad/e495; lenovo-thinkpad-l13 = import ./lenovo/thinkpad/l13; - lenovo-thinkpad-l13-yoga = import ./lenovo/thinkpad/l13-yoga; + lenovo-thinkpad-l13-yoga = import ./lenovo/thinkpad/l13-yoga/yoga.nix; lenovo-thinkpad-l14-intel = import ./lenovo/thinkpad/l14/intel; lenovo-thinkpad-l14-amd = import ./lenovo/thinkpad/l14/amd; lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1; @@ -74,7 +74,7 @@ lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme; lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2; lenovo-thinkpad-x13 = import ./lenovo/thinkpad/x13; - lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13-yoga; + lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13/yoga.nix; microsoft-surface = import ./microsoft/surface; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; pcengines-apu = import ./pcengines/apu; diff --git a/lenovo/thinkpad/l13-yoga/default.nix b/lenovo/thinkpad/l13/yoga.nix similarity index 64% rename from lenovo/thinkpad/l13-yoga/default.nix rename to lenovo/thinkpad/l13/yoga.nix index df95b14f..fb11aac5 100644 --- a/lenovo/thinkpad/l13-yoga/default.nix +++ b/lenovo/thinkpad/l13/yoga.nix @@ -1,11 +1,9 @@ { nixos, lib, pkgs, config, stdenv, ... }: { imports = [ - ../l13 + ./. + ../yoga.nix ]; - # automatic screen orientation - hardware.sensor.iio.enable = true; - services.xserver.wacom.enable = lib.mkDefault config.services.xserver.enable; } diff --git a/lenovo/thinkpad/x13-yoga/default.nix b/lenovo/thinkpad/x13-yoga/default.nix deleted file mode 100644 index 2653910d..00000000 --- a/lenovo/thinkpad/x13-yoga/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, lib, ... }: { - imports = [ - ../. - ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix - ../../../common/pc/laptop/ssd - ]; - - # automatic screen orientation - hardware.sensor.iio.enable = true; - - services.xserver.wacom.enable = lib.mkDefault config.services.xserver.enable; -} diff --git a/lenovo/thinkpad/x13/yoga.nix b/lenovo/thinkpad/x13/yoga.nix new file mode 100644 index 00000000..00a962ba --- /dev/null +++ b/lenovo/thinkpad/x13/yoga.nix @@ -0,0 +1,8 @@ +{ config, lib, ... }: { + imports = [ + ./. + ../yoga.nix + ]; + + services.xserver.wacom.enable = lib.mkDefault config.services.xserver.enable; +} diff --git a/lenovo/thinkpad/yoga.nix b/lenovo/thinkpad/yoga.nix new file mode 100644 index 00000000..c624e1b6 --- /dev/null +++ b/lenovo/thinkpad/yoga.nix @@ -0,0 +1,6 @@ +{ config, lib, pkgs, ... }: + +{ + # automatic screen orientation + hardware.sensor.iio.enable = true; +} From f08cf2d7f7d48e97ba13e5554a9b0802a35fd080 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 1 Jul 2021 14:03:59 +0200 Subject: [PATCH 0033/1476] lenovo/thinkpad: #283 Use directory instead of file --- README.md | 4 ++-- flake.nix | 4 ++-- lenovo/thinkpad/l13/{yoga.nix => yoga/default.nix} | 4 ++-- lenovo/thinkpad/x13/{yoga.nix => yoga/default.nix} | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) rename lenovo/thinkpad/l13/{yoga.nix => yoga/default.nix} (88%) rename lenovo/thinkpad/x13/{yoga.nix => yoga/default.nix} (87%) diff --git a/README.md b/README.md index 98609ab4..94bc34a7 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ See code for all available configurations. | [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | | [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | | [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | -| [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13/yoga.nix) | `` | +| [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13/yoga) | `` | | [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | | [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | | [Lenovo ThinkPad P1](thinkpad/p1) | `` | @@ -125,7 +125,7 @@ See code for all available configurations. | [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `` | | [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | | [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | -| [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga.nix) | `` | +| [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | | [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | | [Lenovo ThinkPad X200s](lenovo/thinkpad/x200s) | `` | | [Lenovo ThinkPad X220](lenovo/thinkpad/x220) | `` | diff --git a/flake.nix b/flake.nix index 67349b32..b0b93f2a 100644 --- a/flake.nix +++ b/flake.nix @@ -37,7 +37,7 @@ lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; lenovo-thinkpad-e495 = import ./lenovo/thinkpad/e495; lenovo-thinkpad-l13 = import ./lenovo/thinkpad/l13; - lenovo-thinkpad-l13-yoga = import ./lenovo/thinkpad/l13-yoga/yoga.nix; + lenovo-thinkpad-l13-yoga = import ./lenovo/thinkpad/l13-yoga/yoga; lenovo-thinkpad-l14-intel = import ./lenovo/thinkpad/l14/intel; lenovo-thinkpad-l14-amd = import ./lenovo/thinkpad/l14/amd; lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1; @@ -74,7 +74,7 @@ lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme; lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2; lenovo-thinkpad-x13 = import ./lenovo/thinkpad/x13; - lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13/yoga.nix; + lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13/yoga; microsoft-surface = import ./microsoft/surface; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; pcengines-apu = import ./pcengines/apu; diff --git a/lenovo/thinkpad/l13/yoga.nix b/lenovo/thinkpad/l13/yoga/default.nix similarity index 88% rename from lenovo/thinkpad/l13/yoga.nix rename to lenovo/thinkpad/l13/yoga/default.nix index fb11aac5..3fb6f162 100644 --- a/lenovo/thinkpad/l13/yoga.nix +++ b/lenovo/thinkpad/l13/yoga/default.nix @@ -1,8 +1,8 @@ { nixos, lib, pkgs, config, stdenv, ... }: { imports = [ - ./. - ../yoga.nix + ../. + ../../yoga.nix ]; services.xserver.wacom.enable = lib.mkDefault config.services.xserver.enable; diff --git a/lenovo/thinkpad/x13/yoga.nix b/lenovo/thinkpad/x13/yoga/default.nix similarity index 87% rename from lenovo/thinkpad/x13/yoga.nix rename to lenovo/thinkpad/x13/yoga/default.nix index 00a962ba..dfabfd41 100644 --- a/lenovo/thinkpad/x13/yoga.nix +++ b/lenovo/thinkpad/x13/yoga/default.nix @@ -1,7 +1,7 @@ { config, lib, ... }: { imports = [ - ./. - ../yoga.nix + ../. + ../../yoga.nix ]; services.xserver.wacom.enable = lib.mkDefault config.services.xserver.enable; From 723e8f796c9f84cf949a67c854fb1bffd2130cb6 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 1 Jul 2021 23:14:45 +0200 Subject: [PATCH 0034/1476] lenovo/thinkpad: Added x13-yoga for backwards-compability --- lenovo/thinkpad/x13-yoga/default.nix | 1 + 1 file changed, 1 insertion(+) create mode 120000 lenovo/thinkpad/x13-yoga/default.nix diff --git a/lenovo/thinkpad/x13-yoga/default.nix b/lenovo/thinkpad/x13-yoga/default.nix new file mode 120000 index 00000000..bc0296c1 --- /dev/null +++ b/lenovo/thinkpad/x13-yoga/default.nix @@ -0,0 +1 @@ +/home/vherrmann/repos/nixos-hardware/lenovo/thinkpad/x13/yoga/default.nix \ No newline at end of file From 19071fde4fb01201ebdb615ad2324a890608ccb3 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 3 Jul 2021 09:17:31 +0200 Subject: [PATCH 0035/1476] lenovo/thinkpad/x13-yoga: Use relative symlink --- lenovo/thinkpad/x13-yoga/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/thinkpad/x13-yoga/default.nix b/lenovo/thinkpad/x13-yoga/default.nix index bc0296c1..1674a694 120000 --- a/lenovo/thinkpad/x13-yoga/default.nix +++ b/lenovo/thinkpad/x13-yoga/default.nix @@ -1 +1 @@ -/home/vherrmann/repos/nixos-hardware/lenovo/thinkpad/x13/yoga/default.nix \ No newline at end of file +../x13/yoga/default.nix \ No newline at end of file From acc32e590b6fc1b3ccac09b3df21042fadb7797e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Sun, 25 Jul 2021 12:11:47 +0200 Subject: [PATCH 0036/1476] lenovo/thinkpad/t420: use cpu/intel/sandy-bridge --- lenovo/thinkpad/t420/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/thinkpad/t420/default.nix b/lenovo/thinkpad/t420/default.nix index 5d3efe83..11cc1cc1 100644 --- a/lenovo/thinkpad/t420/default.nix +++ b/lenovo/thinkpad/t420/default.nix @@ -3,7 +3,7 @@ { imports = [ ../. - ../../../common/cpu/intel + ../../../common/cpu/intel/sandy-bridge ../../../common/pc/laptop/acpi_call.nix ]; } From 107ab6ac423699407eeaaef79c8050af6df769c6 Mon Sep 17 00:00:00 2001 From: figsoda Date: Sun, 25 Jul 2021 17:14:52 -0400 Subject: [PATCH 0037/1476] add asus rog zephyrus ga401 --- README.md | 1 + asus/zephyrus/ga401/default.nix | 21 +++++++++++++++++++++ flake.nix | 1 + 3 files changed, 23 insertions(+) create mode 100644 asus/zephyrus/ga401/default.nix diff --git a/README.md b/README.md index 94bc34a7..b187da62 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ See code for all available configurations. | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | +| [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Dell G3 3779](dell/g3/3779) | `` | | [Dell Latitude 3480](dell/latitude/3480) | `` | diff --git a/asus/zephyrus/ga401/default.nix b/asus/zephyrus/ga401/default.nix new file mode 100644 index 00000000..9148e1da --- /dev/null +++ b/asus/zephyrus/ga401/default.nix @@ -0,0 +1,21 @@ +{ ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/gpu/nvidia.nix + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:4:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + + # fixes mic mute button + services.udev.extraHwdb = '' + evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* + KEYBOARD_KEY_ff31007c=f20 + ''; +} diff --git a/flake.nix b/flake.nix index b0b93f2a..9224dfc3 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,7 @@ nixosModules = { dell-aspire-4810t = import ./acer/aspire/4810t; asus-fx504gd = import ./asus/fx504gd; + asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; apple-macbook-air-3 = import ./apple/macbook-air/3; apple-macbook-air-4 = import apple/macbook-air/4; apple-macbook-air-6 = import apple/macbook-air/6; From f22552c2e25c124a8dfb1e4dc0818cf9bef9b866 Mon Sep 17 00:00:00 2001 From: Terin Stock Date: Mon, 26 Jul 2021 16:33:28 -0700 Subject: [PATCH 0038/1476] xps/13-9310: remove custom patches The Linux kernel now has wireless patches upstreamed into the Linux kernel. We can remove our custom build, but preserve enabling the bluetooth drivers. --- dell/xps/13-9310/default.nix | 259 ++--------------------------------- 1 file changed, 15 insertions(+), 244 deletions(-) diff --git a/dell/xps/13-9310/default.nix b/dell/xps/13-9310/default.nix index 52eb9d58..155659d8 100644 --- a/dell/xps/13-9310/default.nix +++ b/dell/xps/13-9310/default.nix @@ -4,250 +4,21 @@ # Includes the Wi-Fi and Bluetooth firmware for the QCA6390. hardware.enableRedistributableFirmware = true; - # Wi-Fi currently requires a specific set of patches to function. - # To ensure these patches do not conflict, we pin to a specific version here. - # TODO: Remove this once patches have finally landed in mainline. - boot.kernelPackages = let - linux_patched_pkg = - { buildLinux, fetchurl, modDirVersionArg ? null, ... }@args: - buildLinux (args // rec { - version = "5.10.18"; - modDirVersion = if (modDirVersionArg == null) then - builtins.replaceStrings [ "-" ] [ ".0-" ] version - else - modDirVersionArg; - src = fetchurl { - url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "04dnkg5j73f6cd8ws1prrrjx37srz7rm66bj6slmnfzp3cmyxh9v"; - }; - - # kvalo qca6390 patches - # https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/log/?h=ath11k-qca6390-bringup - kernelPatches = [ - { - name = "add-64-bit-check-before-reading-msi-high-addr"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=065c9528cc508cfbf6e3399582df29f76f56163c"; - sha256 = "1mqhwags919vlxllzqh5kj4b2l869swvfwa89jk804a1l4l02fmv"; - }; - } - { - name = "pci-support-platforms-with-one-msi-vector"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=59c6d022df8efb450f82d33dd6a6812935bd022f"; - sha256 = "0sxbb58bnryb9hic1cyc8dzrzachhca7a6hywyzz1pksh9syhs5y"; - }; - } - { - name = "fix-monitor-status-dma-unmap-direction"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=fa4eea695afb286ae38beb30dabf251335cb4a62"; - sha256 = "1sh3d8ck4nlg671j2y8f07394xrqlnbrvh9rmy4l1zfpz7wa7d10"; - }; - } - { - name = "hook-mhi-suspend-and-resume"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=762fe5bc2dd1e43ef307a375861b1a8c414b14e3"; - sha256 = "154p8gp4smmmkhyx127f6rib04xd5bn38a3n4893rbyyb5kckv40"; - }; - } - { - name = "implement-hif-suspend-and-resume-functions"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=2f164833bcca14e8aec0b2566eae4b5a7d09ee6f"; - sha256 = "1ic968y1ivlgfhbj67ds809zqas7n50kc6wb8jgksk227dvagnip"; - }; - } - { - name = "read-select_window-register-to-ensure-write-is-finished"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=6afab932ece78fedc1538c20c2aefdd13aa6c9d0"; - sha256 = "19jiz9mf868rj57ljjdb3n97sfi6x78ac9kgd7fhg1bh0zjjiskp"; - }; - } - { - name = "implement-htc-suspend-related-callbacks"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=69ab2835b82c176e793195243e1400d4f8db3647"; - sha256 = "1gba5h0s6c6zjplw8zyqc2qj21ly1m2xzbgznml159wzj2xvzb2m"; - }; - } - { - name = "put-target-to-suspend-when-system-enters-suspend-state"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=68023bee4d61ea2b02af49bba00adabba51d8b6b"; - sha256 = "05aqdjd5xps0wncrh41r805fn2rpnhw53pn02a374g81bbifwa5q"; - }; - } - { - name = "pci-print-a-warning-if-firmware-crashed"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=23dcef9436560a033703164c4daff9e36e640969"; - sha256 = "0m45wvilr2cgdkpdjzcz4hdzsfs596ibjsvd7sdksjbrp5wslla1"; - }; - } - { - name = "qmi-print-allocated-memory-segment-addresses-and-sizes"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=a327caa4a5a677161a6f1d29514e8cb42236e956"; - sha256 = "1id6xz7siw1x2xa00psqvr4h5zb0xd83apy0cyv4jqzkd5x1kwl0"; - }; - } - { - name = "put-hw-to-dbs-using-mode"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=ce8b5dfc16a0b84ac9ab2d508c2d5e66e8bf179a"; - sha256 = "0gcnzn82mjdqy3ly494xfawqb9xvwd01dcdr43cw8ik92jggs4sf"; - }; - } - { - name = "fix-pcie-link-unstable-issue"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=a82a3aee7cde95d533c28cad3749e3c354011896"; - sha256 = "0r26g7j7kkm76bippp79vd462ykc8k8p0bxr7pshhkyazs6v1ij3"; - }; - } - { - name = "fix-pci-l1ss-clock-unstable-problem"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=08816aab67540e6babc558dafa973fc905a9afa1"; - sha256 = "180hp6iwgw7cqiiwhp9cnzwr5z9n26pphi2j693x751crzr0xkzw"; - }; - } - { - name = "disable-otp-write-privilege"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=86c5a1d6983e647a55448c80f94eb8f0aa97dfad"; - sha256 = "176g07kpsqnkc3vpfx2lhlrksmdg05m0zxn1i5yfvksczp2215iq"; - }; - } - { - name = "disable-aspm-l0sls-before-downloading-firmware"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=8bd374e3305359ca0be9fe88e8a1edc1abd537eb"; - sha256 = "1grjsf6jvn536cz6wil79l2lzc90ga1c7sisv9j0qac7jzr7x5rz"; - }; - } - { - name = "purge-rx-pktlog-when-entering-suspend"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=6f481de563dd108bd3df616c80e60f308b7a48e3"; - sha256 = "14qd1qv8v3mcslj7crzrw0ib1caa7vbnq7jkq163248658bbmk6p"; - }; - } - { - name = "set-credit_update-flag-for-flow-controlled-ep-only"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=6e0fba395a054cd58d87b3749f1f4ff2f3fef92e"; - sha256 = "0sgjxj6m3fdlgdfg7rv5fajfmbmrccy5asrammlgbc7gh5sn9ac4"; - }; - } - { - name = "implement-wow-enable-and-wow-wakeup-command"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=cfca935c92d8f2b31c95e7fd074645245f54492a"; - sha256 = "0dwbsqkw3f8v676s0x3jv04w0qk36ypvnwh02rx4qfdk38sh0j3j"; - }; - } - { - name = "add-ce-irq-enable-and-disable-hif-layer-functions"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=9297794a5d5af5e82b9554677f959add281a5b76"; - sha256 = "0hl93l8khh36drllxii969nvkb6p4hh28gnjyg0y10adm5q9b4ac"; - }; - } - { - name = "put-target-to-wow-state-when-suspend-happens"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=d448ef6decab05c499ffc005c56307a6fc1f1abe"; - sha256 = "17pgbmsryg96626xpbkzd0c27z71lsy7ygli4c6d4dzk5b9594zn"; - }; - } - { - name = "vdev-delete-sync-with-fw"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=c1d3ee50859a2d2c132a8461fdabde568df5ee20"; - sha256 = "1dscfdqv5x3h024gryh0464mky0j6z681rliiix17kdh172vxx52"; - }; - } - { - name = "peer-delete-sync-with-fw"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=6244933ddba318b36bb00c48eeb8d63a24a901c2"; - sha256 = "0p1663w0lik44gwyfzmxxiwnc3s9n3p46aappla8pbfk9wdgw86d"; - }; - } - { - name = "start-vdev-if-bss-peer-already-created"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=c58d077298d91c61c2466a50b58181a234474381"; - sha256 = "1462w29isnlfqs4bavzprhj48wbzvmwasbzh4djzfnsjm0ld7z90"; - }; - } - { - name = "hack-mhi-disable-m2-state"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=cdda596d45a99fed1fe74b0605de6b220c955c0b"; - sha256 = "0wfmaygzl8fav8lr67pjnhqskm6mh9ykcwqh71ijxvfn0kbq9fqg"; - }; - } - { - name = "hack-revert-place-pages-to-tail"; - patch = pkgs.fetchpatch { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=60fad49a69e7b2f896ce7b1ade4ed532227b8e22"; - sha256 = "0zhzjyym42r3rjwh55vk6p423lhz7555mb7xjqk63lczrsc221nm"; - }; - } - - # Extra config required for Bluetooth. - # NOTE: Should consider upstreaming this to the default nix config. - # Especially the `SERIAL_DEV_BUS` and `SERIAL_DEV_CTRL_TTYPORT` - # options, as these are the recommended defaults. - { - name = "enable-qca6390-bluetooth"; - patch = null; - extraConfig = '' - BT_QCA m - BT_HCIUART m - BT_HCIUART_QCA y - BT_HCIUART_SERDEV y - SERIAL_DEV_BUS y - SERIAL_DEV_CTRL_TTYPORT y - ''; - } - ]; - - # Enable some extra kernel modules for QCA6390 bluetooth. - kernelModules = [ "btqca" "hci_qca" "hci_uart" ]; - } // (args.argsOverride or { })); - linux_patched = pkgs.callPackage linux_patched_pkg { }; - in pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux_patched); + boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_5_12; + # TODO: upstream this to NixOS + boot.kernelPatches = [{ + name = "enable-qca6390-bluetooth"; + patch = null; + extraConfig = '' + BT_QCA m + BT_HCIUART m + BT_HCIUART_QCA y + BT_HCIUART_SERDEV y + SERIAL_DEV_BUS y + SERIAL_DEV_CTRL_TTYPORT y + ''; + }]; + boot.kernelModules = [ "btqca" "hci_qca" "hci_uart" ]; # Touchpad goes over i2c. # Without this we get errors in dmesg on boot and hangs when shutting down. From 09ed30ff3bb67f5efe9c77e0d79aca01793526ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 30 Jul 2021 19:26:52 +0200 Subject: [PATCH 0039/1476] rpi4/poe-hat: improve enable option slightly --- raspberry-pi/4/poe-hat.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raspberry-pi/4/poe-hat.nix b/raspberry-pi/4/poe-hat.nix index a7ef673a..ea191291 100644 --- a/raspberry-pi/4/poe-hat.nix +++ b/raspberry-pi/4/poe-hat.nix @@ -6,7 +6,7 @@ in { options.hardware = { raspberry-pi."4".poe-hat = { enable = lib.mkEnableOption '' - Enable support for the Raspberry Pi POE Hat. + support for the Raspberry Pi POE Hat. ''; }; }; From c8cbe529536e10249cfc020c546803bd46ea7807 Mon Sep 17 00:00:00 2001 From: Devin Singh Date: Mon, 2 Aug 2021 11:55:36 -0500 Subject: [PATCH 0040/1476] linux_surface 5.10.19->5.13.4 --- microsoft/surface/kernel/default.nix | 2 +- .../surface/kernel/linux-5.10.19/default.nix | 125 ------------------ .../kernel/linux-5.10.19/linux-5.10.19.nix | 18 --- .../surface/kernel/linux-5.13.4/default.nix | 120 +++++++++++++++++ .../kernel/linux-5.13.4/linux-5.13.4.nix | 22 +++ microsoft/surface/repos.nix | 31 +++-- 6 files changed, 158 insertions(+), 160 deletions(-) delete mode 100644 microsoft/surface/kernel/linux-5.10.19/default.nix delete mode 100644 microsoft/surface/kernel/linux-5.10.19/linux-5.10.19.nix create mode 100644 microsoft/surface/kernel/linux-5.13.4/default.nix create mode 100644 microsoft/surface/kernel/linux-5.13.4/linux-5.13.4.nix diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/kernel/default.nix index 82401533..5eb6013d 100644 --- a/microsoft/surface/kernel/default.nix +++ b/microsoft/surface/kernel/default.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, ... }: { - boot.kernelPackages = pkgs.callPackage ./linux-5.10.19 {}; + boot.kernelPackages = pkgs.callPackage ./linux-5.13.4 { }; } diff --git a/microsoft/surface/kernel/linux-5.10.19/default.nix b/microsoft/surface/kernel/linux-5.10.19/default.nix deleted file mode 100644 index e13e872f..00000000 --- a/microsoft/surface/kernel/linux-5.10.19/default.nix +++ /dev/null @@ -1,125 +0,0 @@ -{ config, lib, pkgs, ... }: -let - repos = (pkgs.callPackage ../../repos.nix {}); - patches = repos.linux-surface + "/patches"; - surface_kernelPatches = [ - { name = "microsoft-surface-patches-linux-5.10.19"; - patch = null; - extraConfig = '' - # - # Surface Aggregator Module - # - SURFACE_AGGREGATOR m - SURFACE_AGGREGATOR_ERROR_INJECTION n - SURFACE_AGGREGATOR_BUS y - SURFACE_AGGREGATOR_CDEV m - SURFACE_AGGREGATOR_REGISTRY m - - SURFACE_ACPI_NOTIFY m - SURFACE_DTX m - SURFACE_PERFMODE m - - SURFACE_HID m - SURFACE_KBD m - - BATTERY_SURFACE m - CHARGER_SURFACE m - - # - # These built-in modules are required for the Surface Aggregator Module - # See: https://github.com/linux-surface/surface-aggregator-module/wiki/Testing-and-Installing - # - SERIAL_DEV_BUS y - SERIAL_DEV_CTRL_TTYPORT y - - # - # Surface Hotplug - # - SURFACE_HOTPLUG m - - # - # IPTS touchscreen - # - # This only enables the user interface for IPTS data. - # For the touchscreen to work, you need to install iptsd. - # - MISC_IPTS m - - # - # Cameras: IPU3 - # - ## Not yet supported in the patches - # VIDEO_IPU3_IMGU m - VIDEO_IPU3_CIO2 m - CIO2_BRIDGE y - INTEL_SKL_INT3472 m - - # - # Cameras: Sensor drivers - # - VIDEO_OV5693 m - ## Not yet supported in the patches - # VIDEO_OV8865 m - - # - # ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 - # - APDS9960 m - - # - # Other Drivers - # - INPUT_SOC_BUTTON_ARRAY m - SURFACE_3_BUTTON m - SURFACE_3_POWER_OPREGION m - SURFACE_PRO3_BUTTON m - SURFACE_GPE m - SURFACE_BOOK1_DGPU_SWITCH m - ''; - } - { - name = "ms-surface/0001-surface3-oemb"; - patch = patches + "/5.10/0001-surface3-oemb.patch"; - } - { - name = "ms-surface/0002-wifi"; - patch = patches + "/5.10/0002-wifi.patch"; - } - { - name = "ms-surface/0003-ipts"; - patch = patches + "/5.10/0003-ipts.patch"; - } - { - name = "ms-surface/0004-surface-gpe"; - patch = patches + "/5.10/0004-surface-gpe.patch"; - } - { - name = "ms-surface/0005-surface-sam-over-hid"; - patch = patches + "/5.10/0005-surface-sam-over-hid.patch"; - } - { - name = "ms-surface/0006-surface-sam"; - patch = patches + "/5.10/0006-surface-sam.patch"; - } - { - name = "ms-surface/0007-surface-hotplug"; - patch = patches + "/5.10/0007-surface-hotplug.patch"; - } - { - name = "ms-surface/0008-surface-typecover"; - patch = patches + "/5.10/0008-surface-typecover.patch"; - } - { - name = "ms-surface/0009-surface-sensors"; - patch = patches + "/5.10/0009-surface-sensors.patch"; - } - { - name = "ms-surface/0010-cameras"; - patch = patches + "/5.10/0010-cameras.patch"; - } - ]; -in (with pkgs; recurseIntoAttrs (linuxPackagesFor ( - callPackage ./linux-5.10.19.nix { - kernelPatches = surface_kernelPatches; - } - ))) diff --git a/microsoft/surface/kernel/linux-5.10.19/linux-5.10.19.nix b/microsoft/surface/kernel/linux-5.10.19/linux-5.10.19.nix deleted file mode 100644 index bfa0eb25..00000000 --- a/microsoft/surface/kernel/linux-5.10.19/linux-5.10.19.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args: - -with lib; - -buildLinux (args // rec { - version = "5.10.19"; - - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; - - # branchVersion needs to be x.y - extraMeta.branch = versions.majorMinor version; - - src = fetchurl { - url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "1mml5a30ky0khzj3r6ahybycbbszk86agq62qclwq2kzvsqbprr7"; - }; -} // (args.argsOverride or {})) diff --git a/microsoft/surface/kernel/linux-5.13.4/default.nix b/microsoft/surface/kernel/linux-5.13.4/default.nix new file mode 100644 index 00000000..7aa01529 --- /dev/null +++ b/microsoft/surface/kernel/linux-5.13.4/default.nix @@ -0,0 +1,120 @@ +{ config, lib, pkgs, ... }: +let + repos = (pkgs.callPackage ../../repos.nix { }); + patches = repos.linux-surface + "/patches"; + surface_kernelPatches = [ + { + name = "microsoft-surface-patches-linux-5.13.4"; + patch = null; + structuredExtraConfig = with lib.kernel; { + # + # Surface Aggregator Module + # + SURFACE_AGGREGATOR = module; + SURFACE_AGGREGATOR_ERROR_INJECTION = no; + SURFACE_AGGREGATOR_BUS = yes; + SURFACE_AGGREGATOR_CDEV = module; + SURFACE_AGGREGATOR_REGISTRY = 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; + + # + # 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_IPU3_IMGU = module; + VIDEO_IPU3_CIO2 = module; + CIO2_BRIDGE = yes; + INTEL_SKL_INT3472 = module; + + # + # Cameras: Sensor drivers + # + VIDEO_OV5693 = 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_BUTTON = 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 = patches + "/5.13/0001-surface3-oemb.patch"; + } + { + name = "ms-surface/0002-mwifiex"; + patch = patches + "/5.13/0002-mwifiex.patch"; + } + { + name = "ms-surface/0003-ath10k"; + patch = patches + "/5.13/0003-ath10k.patch"; + } + { + name = "ms-surface/0004-ipts"; + patch = patches + "/5.13/0004-ipts.patch"; + } + { + name = "ms-surface/0005-surface-sam-over-hid"; + patch = patches + "/5.13/0005-surface-sam-over-hid.patch"; + } + { + name = "ms-surface/0006-surface-sam"; + patch = patches + "/5.13/0006-surface-sam.patch"; + } + { + name = "ms-surface/0007-surface-hotplug"; + patch = patches + "/5.13/0007-surface-hotplug.patch"; + } + { + name = "ms-surface/0008-surface-typecover"; + patch = patches + "/5.13/0008-surface-typecover.patch"; + } + { + name = "ms-surface/0009-cameras"; + patch = patches + "/5.13/0009-cameras.patch"; + } + { + name = "ms-surface/0010-amd-gpio"; + patch = patches + "/5.13/0010-amd-gpio.patch"; + } + { + name = "ms-surface/0011-amd-s0ix"; + patch = patches + "/5.13/0011-amd-s0ix.patch"; + } + ]; +in (with pkgs; + recurseIntoAttrs (linuxPackagesFor (callPackage ./linux-5.13.4.nix { + kernelPatches = surface_kernelPatches; + }))) diff --git a/microsoft/surface/kernel/linux-5.13.4/linux-5.13.4.nix b/microsoft/surface/kernel/linux-5.13.4/linux-5.13.4.nix new file mode 100644 index 00000000..025d72ed --- /dev/null +++ b/microsoft/surface/kernel/linux-5.13.4/linux-5.13.4.nix @@ -0,0 +1,22 @@ +{ lib, stdenv, buildPackages, fetchurl, perl, buildLinux +, modDirVersionArg ? null, ... }@args: + +with lib; + +buildLinux (args // rec { + version = "5.13.4"; + + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = if (modDirVersionArg == null) then + concatStringsSep "." (take 3 (splitVersion "${version}.0")) + else + modDirVersionArg; + + # branchVersion needs to be x.y + extraMeta.branch = versions.majorMinor version; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; + sha256 = "7192cd2f654aa6083451dea01b80748fe1eebcf2476a589ef4146590030e7d6c"; + }; +} // (args.argsOverride or { })) diff --git a/microsoft/surface/repos.nix b/microsoft/surface/repos.nix index 466f6f25..21327c4b 100644 --- a/microsoft/surface/repos.nix +++ b/microsoft/surface/repos.nix @@ -1,29 +1,28 @@ -{ lib, pkgs, fetchFromGitHub, fetchurl }: -{ +{ lib, pkgs, fetchFromGitHub, fetchurl }: { linux-surface = fetchFromGitHub { - owner="linux-surface"; - repo="linux-surface"; - rev="f8fab978a480a4ed57e9ebb6928683b2e443c1c5"; - sha256="0zwybprwjckpapxm6gxzh6hwdd1w91g5sjxn6z52zlvvjpkmw959"; + owner = "linux-surface"; + repo = "linux-surface"; + rev = "4130746c31606aebaccef58997b650beda9049f7"; + sha256 = "0r74z0hj3rg8bn2arh2zj8p7awk7fi14gpyrs5h44lwxw4351xky"; }; ath10k-firmware = fetchFromGitHub { - owner="kvalo"; - repo="ath10k-firmware"; - rev="84b47062aab31d67156e0a3ef593a6999a12864b"; - sha256="0l8wfj8z4jbb31nzqkaxisby0n6061ix01c5di9bq66iby59j8py"; + owner = "kvalo"; + repo = "ath10k-firmware"; + rev = "c987e38cbdb90dcb4e477d5dd21de66c77996435"; + sha256 = "16a67baxlga8vb43zbby2s7kpp4488vczg3manmr9g3wxnhhb9n3"; }; surface-go-ath10k-firmware_upstream = fetchurl { - url="https://support.killernetworking.com/K1535_Debian/board.bin"; + url = "https://support.killernetworking.com/K1535_Debian/board.bin"; # url="https://www.killernetworking.com/support/K1535_Debian/board.bin"; - sha256="0l8wfj8z4jbb31nzqkaxisby0n6061ix01c5di9bq66iby59j8py"; + sha256 = "0l8wfj8z4jbb31nzqkaxisby0n6061ix01c5di9bq66iby59j8py"; }; surface-go-ath10k-firmware_backup = fetchFromGitHub { - owner="mexisme"; - repo="linux-surface_ath10k-firmware"; - rev="74e5409e699383d6ca2bc4da4a8433d16f3850b1"; - sha256="169vgvxpgad9anmchs22fj5qm6ahzjfdnwhd8pc280q705vx6pjk"; + owner = "mexisme"; + repo = "linux-surface_ath10k-firmware"; + rev = "74e5409e699383d6ca2bc4da4a8433d16f3850b1"; + sha256 = "169vgvxpgad9anmchs22fj5qm6ahzjfdnwhd8pc280q705vx6pjk"; }; } From 8296b88560d8ac07a885452e094cd454de90ea9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Wed, 4 Aug 2021 13:54:40 +0200 Subject: [PATCH 0041/1476] Add Thinkpad P14s --- README.md | 1 + lenovo/thinkpad/p14s/amd/gen2/default.nix | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 lenovo/thinkpad/p14s/amd/gen2/default.nix diff --git a/README.md b/README.md index b187da62..25caa0f8 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ See code for all available configurations. | [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | | [Lenovo ThinkPad P1](thinkpad/p1) | `` | | [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | +| [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | | [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | | [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | | [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | diff --git a/lenovo/thinkpad/p14s/amd/gen2/default.nix b/lenovo/thinkpad/p14s/amd/gen2/default.nix new file mode 100644 index 00000000..ee3d52ae --- /dev/null +++ b/lenovo/thinkpad/p14s/amd/gen2/default.nix @@ -0,0 +1,21 @@ + +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../../../../../common/pc/laptop/acpi_call.nix + ]; + + # For suspending to RAM, set Config -> Power -> Sleep State to "Linux" in EFI. + + # amdgpu.backlight=0 makes the backlight work + # acpi_backlight=none allows the backlight save/load systemd service to work. + boot.kernelParams = ["amdgpu.backlight=0" "acpi_backlight=none"]; + + # Wifi support + boot.extraModulePackages = [ config.boot.kernelPackages.rtw89 ]; + hardware.firmware = [ pkgs.rtw89-firmware ]; + + # For support of newer AMD GPUs, backlight and internal microphone + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.13") pkgs.linuxPackages_latest; +} \ No newline at end of file From 745dd440719439197ee7821ad61fff1de557b55d Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Sat, 14 Aug 2021 17:17:21 +0200 Subject: [PATCH 0042/1476] raspberry-pi/4: Add audio option --- raspberry-pi/4/audio.nix | 40 ++++++++++++++++++++++++++++++++++++++ raspberry-pi/4/default.nix | 1 + 2 files changed, 41 insertions(+) create mode 100644 raspberry-pi/4/audio.nix diff --git a/raspberry-pi/4/audio.nix b/raspberry-pi/4/audio.nix new file mode 100644 index 00000000..3ee189a5 --- /dev/null +++ b/raspberry-pi/4/audio.nix @@ -0,0 +1,40 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.hardware.raspberry-pi."4".audio; +in +{ + options.hardware = { + raspberry-pi."4".audio = { + enable = lib.mkEnableOption '' + configuration for audio + ''; + }; + }; + + config = lib.mkIf cfg.enable { + hardware.deviceTree = { + overlays = [ + # Equivalent to dtparam=audio=on + { + name = "audio-on-overlay"; + dtsText = '' + /dts-v1/; + /plugin/; + / { + compatible = "brcm,bcm2711"; + fragment@0 { + target = <&audio>; + + __overlay__ { + status = "okay"; + }; + }; + }; + ''; + } + ]; + }; + }; +} + diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index 36991907..2fe97e1a 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -2,6 +2,7 @@ { imports = [ + ./audio.nix ./dwc2.nix ./modesetting.nix ./poe-hat.nix From eb385fad1e6dcbe4289ff88b0095ac0791931677 Mon Sep 17 00:00:00 2001 From: Daniel Ebbert Date: Wed, 18 Aug 2021 11:58:49 +0200 Subject: [PATCH 0043/1476] lenovo/thinkpad/e495: use native acpi backlight --- lenovo/thinkpad/e495/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lenovo/thinkpad/e495/default.nix b/lenovo/thinkpad/e495/default.nix index 51ddb5cf..60f8efb3 100644 --- a/lenovo/thinkpad/e495/default.nix +++ b/lenovo/thinkpad/e495/default.nix @@ -8,4 +8,10 @@ # see https://github.com/NixOS/nixpkgs/issues/69289 boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest; + + boot.kernelParams = [ + # Force use of the thinkpad_acpi driver for backlight control. + # This allows the backlight save/load systemd service to work. + "acpi_backlight=native" + ]; } From 22f1a185cf2ce57e7334b6a44aaad19c5fedc770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 18 Aug 2021 17:53:34 +0200 Subject: [PATCH 0044/1476] xps-13-9310: fix evaluation --- dell/xps/13-9310/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dell/xps/13-9310/default.nix b/dell/xps/13-9310/default.nix index 155659d8..811d1f5b 100644 --- a/dell/xps/13-9310/default.nix +++ b/dell/xps/13-9310/default.nix @@ -4,7 +4,7 @@ # Includes the Wi-Fi and Bluetooth firmware for the QCA6390. hardware.enableRedistributableFirmware = true; - boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_5_12; + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (lib.mkDefault pkgs.linuxPackages_latest); # TODO: upstream this to NixOS boot.kernelPatches = [{ name = "enable-qca6390-bluetooth"; From 6f10c889c0c0144a76086bae609bad2383e0ac07 Mon Sep 17 00:00:00 2001 From: Daniel Ebbert Date: Wed, 18 Aug 2021 12:43:51 +0200 Subject: [PATCH 0045/1476] Init Lenovo ThinkPad E14 --- README.md | 2 ++ flake.nix | 2 ++ lenovo/thinkpad/e14/amd/default.nix | 23 +++++++++++++++++++++++ lenovo/thinkpad/e14/default.nix | 14 ++++++++++++++ lenovo/thinkpad/e14/intel/default.nix | 10 ++++++++++ 5 files changed, 51 insertions(+) create mode 100644 lenovo/thinkpad/e14/amd/default.nix create mode 100644 lenovo/thinkpad/e14/default.nix create mode 100644 lenovo/thinkpad/e14/intel/default.nix diff --git a/README.md b/README.md index 25caa0f8..e0866552 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,8 @@ See code for all available configurations. | [GPD MicroPC](gpd/micropc) | `` | | [Inverse Path USB armory](inversepath/usbarmory) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | +| [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | +| [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | | [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | | [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | | [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | diff --git a/flake.nix b/flake.nix index 9224dfc3..c6707d0e 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,8 @@ gpd-micropc = import ./gpd/micropc; inversepath-usbarmory = import ./inversepath/usbarmory; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; + lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel; + lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; lenovo-thinkpad-e495 = import ./lenovo/thinkpad/e495; lenovo-thinkpad-l13 = import ./lenovo/thinkpad/l13; diff --git a/lenovo/thinkpad/e14/amd/default.nix b/lenovo/thinkpad/e14/amd/default.nix new file mode 100644 index 00000000..c2d1534f --- /dev/null +++ b/lenovo/thinkpad/e14/amd/default.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../../common/cpu/amd + ]; + + boot.kernelParams = [ + # With BIOS version 1.12 and the IOMMU enabled, the amdgpu driver + # either crashes or is not able to attach to the GPU depending on + # the kernel version. I've seen no issues with the IOMMU disabled. + # + # BIOS version 1.13 claims to fix IOMMU issues, but we leave the + # IOMMU off to avoid a sad experience for those people that drew + # the short straw when they bought their laptop. + "iommu=off" + ]; + + # As of writing this, Linux 5.8 is the oldest kernel that is still + # supported and has decent Renoir support. + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.8") pkgs.linuxPackages_latest; +} diff --git a/lenovo/thinkpad/e14/default.nix b/lenovo/thinkpad/e14/default.nix new file mode 100644 index 00000000..e014b7d0 --- /dev/null +++ b/lenovo/thinkpad/e14/default.nix @@ -0,0 +1,14 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../common/pc/laptop/acpi_call.nix + ]; + + boot.kernelParams = [ + # Force use of the thinkpad_acpi driver for backlight control. + # This allows the backlight save/load systemd service to work. + "acpi_backlight=native" + ]; +} diff --git a/lenovo/thinkpad/e14/intel/default.nix b/lenovo/thinkpad/e14/intel/default.nix new file mode 100644 index 00000000..088289f3 --- /dev/null +++ b/lenovo/thinkpad/e14/intel/default.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../../common/cpu/intel + ]; + + services.throttled.enable = lib.mkDefault true; +} From e45d775c9358381243c292f3fde8c9f89744b2d8 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Sat, 14 Aug 2021 17:42:22 +0200 Subject: [PATCH 0046/1476] raspberry-pi/4: Include tsched=0 fix in audio module This applies a commonly suggested fix for pulseaudio sound glitches. --- raspberry-pi/4/audio.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/raspberry-pi/4/audio.nix b/raspberry-pi/4/audio.nix index 3ee189a5..9bccfda7 100644 --- a/raspberry-pi/4/audio.nix +++ b/raspberry-pi/4/audio.nix @@ -35,6 +35,12 @@ in } ]; }; + + # set tsched=0 in pulseaudio config to avoid audio glitches + # see https://wiki.archlinux.org/title/PulseAudio/Troubleshooting#Glitches,_skips_or_crackling + hardware.pulseaudio.configFile = lib.mkDefault pkgs.runCommand "default.pa" {} '' + sed 's/module-udev-detect$/module-udev-detect tsched=0/' ${config.hardware.pulseaudio.package}/etc/pulse/default.pa > $out + ''; }; } From d2d9a58a5c03ea15b401c186508c171c07f9c4f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 21 Aug 2021 09:22:25 +0100 Subject: [PATCH 0047/1476] remove systemd-boot from hardware profiles (#307) - We should not enable canTouchEfiVariables by default as this wears out the EFI storage. - We should not set systemd-boot as default. This is up to the user to decide. There are exceptions when hardware only supports specific bootloaders so. --- apple/macbook-pro/10-1/default.nix | 4 ---- dell/xps/13-9360/default.nix | 6 ------ dell/xps/15-9560/xps-common.nix | 4 ---- 3 files changed, 14 deletions(-) diff --git a/apple/macbook-pro/10-1/default.nix b/apple/macbook-pro/10-1/default.nix index e029ef21..4d31b1ca 100644 --- a/apple/macbook-pro/10-1/default.nix +++ b/apple/macbook-pro/10-1/default.nix @@ -6,10 +6,6 @@ ../../../common/pc/laptop/ssd ]; - # TODO: boot loader - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - # TODO: reverse compat hardware.opengl.driSupport32Bit = true; diff --git a/dell/xps/13-9360/default.nix b/dell/xps/13-9360/default.nix index 68eedc8c..f40f6e0c 100644 --- a/dell/xps/13-9360/default.nix +++ b/dell/xps/13-9360/default.nix @@ -8,12 +8,6 @@ boot.blacklistedKernelModules = [ "psmouse" ]; # touchpad goes over i2c - # TODO: decide on boot loader policy - boot.loader = { - efi.canTouchEfiVariables = lib.mkDefault true; - systemd-boot.enable = lib.mkDefault true; - }; - # This will save you money and possibly your life! services.thermald.enable = true; } diff --git a/dell/xps/15-9560/xps-common.nix b/dell/xps/15-9560/xps-common.nix index 62aae078..a8361cef 100644 --- a/dell/xps/15-9560/xps-common.nix +++ b/dell/xps/15-9560/xps-common.nix @@ -1,10 +1,6 @@ { lib, ... }: { - - # Boot loader - boot.loader.systemd-boot.enable = lib.mkDefault true; - boot.loader.efi.canTouchEfiVariables = lib.mkDefault true; boot.kernelParams = lib.mkDefault [ "acpi_rev_override" ]; # This will save you money and possibly your life! From ad1114ee372a52aa0b4934f72835bd14a212a642 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Mon, 23 Aug 2021 13:42:59 +0200 Subject: [PATCH 0048/1476] raspberry-pi/4: fix usage of mkDefault in audio module --- raspberry-pi/4/audio.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/raspberry-pi/4/audio.nix b/raspberry-pi/4/audio.nix index 9bccfda7..38773864 100644 --- a/raspberry-pi/4/audio.nix +++ b/raspberry-pi/4/audio.nix @@ -38,9 +38,9 @@ in # set tsched=0 in pulseaudio config to avoid audio glitches # see https://wiki.archlinux.org/title/PulseAudio/Troubleshooting#Glitches,_skips_or_crackling - hardware.pulseaudio.configFile = lib.mkDefault pkgs.runCommand "default.pa" {} '' + hardware.pulseaudio.configFile = lib.mkOverride 990 (pkgs.runCommand "default.pa" {} '' sed 's/module-udev-detect$/module-udev-detect tsched=0/' ${config.hardware.pulseaudio.package}/etc/pulse/default.pa > $out - ''; + ''); }; } From 286e778ab53c3196f7a7fee7a390537d739392da Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 25 Aug 2021 12:06:29 +1200 Subject: [PATCH 0049/1476] Fix source repo for MS Surface ATH10k Firmware image --- .../surface/firmware/surface-go/ath10k/ath10k-replace.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix b/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix index 909131df..8a67bb60 100644 --- a/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix +++ b/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix @@ -1,8 +1,7 @@ {stdenv, lib, pkgs, firmwareLinuxNonfree, ...}: let repos = (pkgs.callPackage ../../../repos.nix {}); - # killernetworking_firmware = ./K1535_Debian; - killernetworking_firmware = repos.ath10k-firmware + "/K1535_Debian"; + killernetworking_firmware = repos.surface-go-ath10k-firmware_backup + "/K1535_Debian"; in firmwareLinuxNonfree.overrideAttrs (old: rec { pname = "microsoft-surface-go-firmware-linux-nonfree"; @@ -23,7 +22,7 @@ firmwareLinuxNonfree.overrideAttrs (old: rec { cp ${killernetworking_firmware}/board.bin $out/lib/firmware/ath10k/QCA6174/hw3.0/ ''; - outputHash = "1nc56qii96dfvxnv3ad3lxz2rzyqcbldk0h9rbm3l2pgamkvj8dw"; + outputHash = "1zvahsp06vikp83r89wkccwq7mixjiwcv10chw1xyikfjkqr48hr"; meta = with lib; { description = "Standard binary firmware collection, adjusted with the Surface Go WiFi firmware"; From 12cced4eebf2b06193ce043cee9017e5efdbd319 Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 25 Aug 2021 16:57:46 +1200 Subject: [PATCH 0050/1476] Fix outputHash --- microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix b/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix index 8a67bb60..f950d9b7 100644 --- a/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix +++ b/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix @@ -22,7 +22,7 @@ firmwareLinuxNonfree.overrideAttrs (old: rec { cp ${killernetworking_firmware}/board.bin $out/lib/firmware/ath10k/QCA6174/hw3.0/ ''; - outputHash = "1zvahsp06vikp83r89wkccwq7mixjiwcv10chw1xyikfjkqr48hr"; + outputHash = "176cf5b9f370x2a532h2afjfkrxy13gqdygc11bam0sg8dlnrv21"; meta = with lib; { description = "Standard binary firmware collection, adjusted with the Surface Go WiFi firmware"; From 49f1d1e1f83a394a9a69bf2e5443de352ffd7924 Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Wed, 25 Aug 2021 23:23:35 +0200 Subject: [PATCH 0051/1476] lenovo/thinkpad/l14/amd: enable AMD GPU config --- lenovo/thinkpad/l14/amd/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/l14/amd/default.nix b/lenovo/thinkpad/l14/amd/default.nix index c2d1534f..bf475f73 100644 --- a/lenovo/thinkpad/l14/amd/default.nix +++ b/lenovo/thinkpad/l14/amd/default.nix @@ -4,6 +4,7 @@ imports = [ ../. ../../../../common/cpu/amd + ../../../../common/gpu/amd ]; boot.kernelParams = [ From 9ff8606e7ee40e32395d672f540c6f4072aeb24d Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Wed, 25 Aug 2021 23:27:37 +0200 Subject: [PATCH 0052/1476] lenovo/thinkpad/l14/amd: switch to soft iommu mode to prevent mmcblk kernel panic --- lenovo/thinkpad/l14/amd/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lenovo/thinkpad/l14/amd/default.nix b/lenovo/thinkpad/l14/amd/default.nix index bf475f73..d2803e2f 100644 --- a/lenovo/thinkpad/l14/amd/default.nix +++ b/lenovo/thinkpad/l14/amd/default.nix @@ -12,10 +12,13 @@ # either crashes or is not able to attach to the GPU depending on # the kernel version. I've seen no issues with the IOMMU disabled. # - # BIOS version 1.13 claims to fix IOMMU issues, but we leave the - # IOMMU off to avoid a sad experience for those people that drew + # BIOS version 1.13 fixes the IOMMU issues, but we leave the IOMMU + # in software mode to avoid a sad experience for those people that drew # the short straw when they bought their laptop. - "iommu=off" + # + # Do not set iommu=off, because this will cause the SD-Card reader + # driver to kernel panic. + "iommu=soft" ]; # As of writing this, Linux 5.8 is the oldest kernel that is still From 2c549a1bfb593f03c7107348fea07f5f894ed7ad Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Wed, 25 Aug 2021 23:27:53 +0200 Subject: [PATCH 0053/1476] lenovo/thinkpad/l14: enable SSD config --- lenovo/thinkpad/l14/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/l14/default.nix b/lenovo/thinkpad/l14/default.nix index e014b7d0..42bf0147 100644 --- a/lenovo/thinkpad/l14/default.nix +++ b/lenovo/thinkpad/l14/default.nix @@ -3,6 +3,7 @@ { imports = [ ../. + ../../../common/pc/laptop/ssd ../../../common/pc/laptop/acpi_call.nix ]; From 03eba5720afdea051ba32c2c06c9424c3c2f300e Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Wed, 25 Aug 2021 23:28:28 +0200 Subject: [PATCH 0054/1476] lenovo/thinkpad/l14/amd: drop workaround for old kernels ... because the latest supported NixOS runs on Linux 5.10 by default. --- lenovo/thinkpad/l14/amd/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lenovo/thinkpad/l14/amd/default.nix b/lenovo/thinkpad/l14/amd/default.nix index d2803e2f..bb216211 100644 --- a/lenovo/thinkpad/l14/amd/default.nix +++ b/lenovo/thinkpad/l14/amd/default.nix @@ -20,8 +20,4 @@ # driver to kernel panic. "iommu=soft" ]; - - # As of writing this, Linux 5.8 is the oldest kernel that is still - # supported and has decent Renoir support. - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.8") pkgs.linuxPackages_latest; } From 48b7c1c7828af8a86d4faadbb7d878ed80647c8b Mon Sep 17 00:00:00 2001 From: Daniel Ebbert Date: Wed, 1 Sep 2021 09:34:21 +0200 Subject: [PATCH 0055/1476] Update E14 AMD --- lenovo/thinkpad/e14/amd/default.nix | 11 ++++------- lenovo/thinkpad/e14/default.nix | 1 + 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lenovo/thinkpad/e14/amd/default.nix b/lenovo/thinkpad/e14/amd/default.nix index c2d1534f..d39c7d91 100644 --- a/lenovo/thinkpad/e14/amd/default.nix +++ b/lenovo/thinkpad/e14/amd/default.nix @@ -4,6 +4,7 @@ imports = [ ../. ../../../../common/cpu/amd + ../../../../common/gpu/amd ]; boot.kernelParams = [ @@ -11,13 +12,9 @@ # either crashes or is not able to attach to the GPU depending on # the kernel version. I've seen no issues with the IOMMU disabled. # - # BIOS version 1.13 claims to fix IOMMU issues, but we leave the - # IOMMU off to avoid a sad experience for those people that drew + # BIOS version 1.13 fixes the IOMMU issues, but we leave the IOMMU + # in software mode to avoid a sad experience for those people that drew # the short straw when they bought their laptop. - "iommu=off" + "iommu=soft" ]; - - # As of writing this, Linux 5.8 is the oldest kernel that is still - # supported and has decent Renoir support. - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.8") pkgs.linuxPackages_latest; } diff --git a/lenovo/thinkpad/e14/default.nix b/lenovo/thinkpad/e14/default.nix index e014b7d0..42bf0147 100644 --- a/lenovo/thinkpad/e14/default.nix +++ b/lenovo/thinkpad/e14/default.nix @@ -3,6 +3,7 @@ { imports = [ ../. + ../../../common/pc/laptop/ssd ../../../common/pc/laptop/acpi_call.nix ]; From b55dbe886fb13be26ea3f6e7273924fa75187b55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Sep 2021 02:02:00 +0000 Subject: [PATCH 0056/1476] build(deps): bump cachix/install-nix-action from 13 to 14 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 13 to 14. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v13...v14) --- 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 2605d503..76dff269 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: cachix/install-nix-action@v13 + - uses: cachix/install-nix-action@v14 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version From 95ce025962d70c27cb77f4691404548c2acbb2b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Thu, 16 Sep 2021 12:41:30 +0200 Subject: [PATCH 0057/1476] lenovo/thinkpad/t420: add tp-smapi The T420 seems to have partial (readonly) support for the tp-smapi module, which TLP can make use of: > Install tp-smapi kernel modules for extended battery info (e.g. the cycle count) --- lenovo/thinkpad/t420/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/t420/default.nix b/lenovo/thinkpad/t420/default.nix index 11cc1cc1..be05d1ec 100644 --- a/lenovo/thinkpad/t420/default.nix +++ b/lenovo/thinkpad/t420/default.nix @@ -3,6 +3,7 @@ { imports = [ ../. + ../tp-smapi.nix ../../../common/cpu/intel/sandy-bridge ../../../common/pc/laptop/acpi_call.nix ]; From a57fc74bc3c88537b7f80bc7bee428dd9e9a34ca Mon Sep 17 00:00:00 2001 From: Johannes Arnold Date: Tue, 28 Sep 2021 19:23:41 +0200 Subject: [PATCH 0058/1476] AMD: include 32-bit driver for Vulkan --- common/gpu/amd/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix index 3f98e98b..30252de5 100644 --- a/common/gpu/amd/default.nix +++ b/common/gpu/amd/default.nix @@ -10,6 +10,10 @@ amdvlk ]; + hardware.opengl.extraPackages32 = with pkgs; [ + driversi686Linux.amdvlk + ]; + hardware.opengl = { driSupport = lib.mkDefault true; driSupport32Bit = lib.mkDefault true; From 4cac4fbeefefe3d56af244578c30db63baf0fb67 Mon Sep 17 00:00:00 2001 From: Konstantin vz'One Enchant Date: Sun, 3 Oct 2021 15:13:49 +0300 Subject: [PATCH 0059/1476] Apply SSD optimization for Dell XPS 13 9310 --- dell/xps/13-9310/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dell/xps/13-9310/default.nix b/dell/xps/13-9310/default.nix index 811d1f5b..b36793bc 100644 --- a/dell/xps/13-9310/default.nix +++ b/dell/xps/13-9310/default.nix @@ -1,5 +1,10 @@ { lib, pkgs, ... }: { - imports = [ ../../../common/cpu/intel ../../../common/pc/laptop ]; + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + # Includes the Wi-Fi and Bluetooth firmware for the QCA6390. hardware.enableRedistributableFirmware = true; From 3c474df27929026a06e261dd6ec1c70998163cbd Mon Sep 17 00:00:00 2001 From: Gaute Ravndal Date: Sat, 9 Oct 2021 16:46:22 +0200 Subject: [PATCH 0060/1476] Add basic support for the thinkpad t550 --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/t550/default.nix | 9 +++++++++ 3 files changed, 11 insertions(+) create mode 100644 lenovo/thinkpad/t550/default.nix diff --git a/README.md b/README.md index e0866552..f59ce759 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,7 @@ See code for all available configurations. | [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `` | | [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | | [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | +| [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | | [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | | [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | | [Lenovo ThinkPad X200s](lenovo/thinkpad/x200s) | `` | diff --git a/flake.nix b/flake.nix index c6707d0e..62731b25 100644 --- a/flake.nix +++ b/flake.nix @@ -63,6 +63,7 @@ lenovo-thinkpad-t480s = import ./lenovo/thinkpad/t480s; lenovo-thinkpad-t490 = import ./lenovo/thinkpad/t490; lenovo-thinkpad-t495 = import ./lenovo/thinkpad/t495; + lenovo-thinkpad-t550 = import ./lenovo/thinkpad/t550; lenovo-thinkpad-x140e = import ./lenovo/thinkpad/x140e; lenovo-thinkpad-x200s = import ./lenovo/thinkpad/x200s; lenovo-thinkpad-x220 = import ./lenovo/thinkpad/x220; diff --git a/lenovo/thinkpad/t550/default.nix b/lenovo/thinkpad/t550/default.nix new file mode 100644 index 00000000..e6233717 --- /dev/null +++ b/lenovo/thinkpad/t550/default.nix @@ -0,0 +1,9 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop/acpi_call.nix + ../. + ]; +} From 36d75fdcdc64046f6b0ba51515be46806453cf02 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Wed, 20 Oct 2021 00:54:06 +0200 Subject: [PATCH 0061/1476] Update X230 config using available common settings --- lenovo/thinkpad/x230/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/x230/default.nix b/lenovo/thinkpad/x230/default.nix index 58b09f4c..418b68c8 100644 --- a/lenovo/thinkpad/x230/default.nix +++ b/lenovo/thinkpad/x230/default.nix @@ -4,6 +4,7 @@ imports = [ ../. ../../../common/cpu/intel + ../../../common/pc/laptop ../../../common/pc/laptop/acpi_call.nix ]; From fdf8fa5d20829d786da6b765589f962a7de13028 Mon Sep 17 00:00:00 2001 From: "P. R. d. O" Date: Tue, 26 Oct 2021 19:50:38 -0600 Subject: [PATCH 0062/1476] lenovo.thinkpad.t430: fix boot.kernelParams --- lenovo/thinkpad/t430/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/thinkpad/t430/default.nix b/lenovo/thinkpad/t430/default.nix index bdad1be9..9c5580ef 100644 --- a/lenovo/thinkpad/t430/default.nix +++ b/lenovo/thinkpad/t430/default.nix @@ -10,7 +10,7 @@ boot = { kernelParams = [ # fixes brightness keys, see https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_T430s - "acpi_osi\='!Windows 2012'" + ''acpi_osi="!Windows 2012"'' ]; }; } From 590a2cc182110cd859b144c1eec2f894b0f396d8 Mon Sep 17 00:00:00 2001 From: Yuka Date: Thu, 28 Oct 2021 20:35:27 +0200 Subject: [PATCH 0063/1476] flake: add lenovo-thinkpad to nixosModules --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 62731b25..563e4227 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,7 @@ gpd-micropc = import ./gpd/micropc; inversepath-usbarmory = import ./inversepath/usbarmory; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; + lenovo-thinkpad = import ./lenovo/thinkpad; lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel; lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; From 09419f8341d239e6930031b65039cc9e498b8c68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 28 Oct 2021 21:03:21 +0200 Subject: [PATCH 0064/1476] README: fix syntax --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f59ce759..7371a56a 100644 --- a/README.md +++ b/README.md @@ -142,9 +142,8 @@ See code for all available configurations. | [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | | [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | | [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | -| [Lenovo ThinkPad X13](lenovo/thinkpad/x13) | `` | +| [One-Netbook OneNetbook 4](onenetbook/4) | `` | | [Microsoft Surface Range](microsoft/surface) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | | [MSI GS60 2QE](msi/gs60) | `` | From b2083d1b60565857adbf7f27963362e5b1afc14a Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Sun, 7 Nov 2021 14:05:31 +0530 Subject: [PATCH 0065/1476] Dell latitude 7490 support --- dell/latitude/7490/README.wiki | 36 ++++++++++++++++++++++++++++++++++ dell/latitude/7490/default.nix | 10 ++++++++++ 2 files changed, 46 insertions(+) create mode 100644 dell/latitude/7490/README.wiki create mode 100644 dell/latitude/7490/default.nix diff --git a/dell/latitude/7490/README.wiki b/dell/latitude/7490/README.wiki new file mode 100644 index 00000000..a4360767 --- /dev/null +++ b/dell/latitude/7490/README.wiki @@ -0,0 +1,36 @@ += Dell Latitude 7490 = + +== Tested Hardware == + +``` shellsession +$ lspci -nn +00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 08) +00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07) +00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 08) +00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21) +00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21) +00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21) +00:15.1 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 (rev 21) +00:15.2 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #2 (rev 21) +00:15.3 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #3 (rev 21) +00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21) +00:16.3 Serial controller: Intel Corporation Sunrise Point-LP Active Management Technology - SOL (rev 21) +00:17.0 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode] (rev 21) +00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1) +00:1c.2 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #3 (rev f1) +00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1) +00:1f.0 ISA bridge: Intel Corporation Sunrise Point LPC Controller/eSPI Controller (rev 21) +00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21) +00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21) +00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21) +00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (4) I219-LM (rev 21) +01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01) +02:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78) +``` + +=== Before installation === + +These settings are needed both for booting the final install, and +installer itself. Therefore, they must be done first. + +- ''Disable Secure Boot (but keep UEFI Boot).'' diff --git a/dell/latitude/7490/default.nix b/dell/latitude/7490/default.nix new file mode 100644 index 00000000..a368f441 --- /dev/null +++ b/dell/latitude/7490/default.nix @@ -0,0 +1,10 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ]; + + services.thermald.enable = lib.mkDefault true; +} From b50c73d420405517c9fa35fe3f565782a7562be9 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Sun, 7 Nov 2021 14:42:36 +0530 Subject: [PATCH 0066/1476] Update README and flakes --- README.md | 1 + flake.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 7371a56a..043ac391 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ See code for all available configurations. | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Dell G3 3779](dell/g3/3779) | `` | | [Dell Latitude 3480](dell/latitude/3480) | `` | +| [Dell Latitude 7490](dell/latitude/7490) | `` | | [Dell Precision 5530](dell/precision/5530) | `` | | [Dell XPS E7240](dell/e7240) | `` | | [Dell XPS 13 7390](dell/xps/13-7390) | `` | diff --git a/flake.nix b/flake.nix index 563e4227..1549a3cb 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,7 @@ beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; dell-g3-3779 = import ./dell/g3/3779; dell-latitude-3480 = import ./dell/latitude/3480; + dell-latitude-7490 = import ./dell/latitude/7490; dell-precision-5530 = import ./dell/precision/5530; dell-e7240 = import ./dell/e7240; dell-xps-13-7390 = import ./dell/xps/13-7390; From e819a2993ac491aeb98846d5d8cabd6264208a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 13 Nov 2021 08:36:23 +0100 Subject: [PATCH 0067/1476] fix github workflow --- .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 76dff269..c17c8fd6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: cachix/install-nix-action@v14 + - uses: cachix/install-nix-action@v15 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version From debc98ff9c873ff9d0755d2c9ac8ebd241053b4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 13 Nov 2021 08:31:52 +0100 Subject: [PATCH 0068/1476] add dell poweredge r7515 --- README.md | 1 + dell/poweredge/README.md | 15 +++++++++++++++ dell/poweredge/r7515/default.nix | 6 ++++++ flake.nix | 1 + 4 files changed, 23 insertions(+) create mode 100644 dell/poweredge/README.md create mode 100644 dell/poweredge/r7515/default.nix diff --git a/README.md b/README.md index 043ac391..8175cbec 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ See code for all available configurations. | [Dell G3 3779](dell/g3/3779) | `` | | [Dell Latitude 3480](dell/latitude/3480) | `` | | [Dell Latitude 7490](dell/latitude/7490) | `` | +| [Dell Poweredge R7515](dell/poweredge/r7515) | `` | | [Dell Precision 5530](dell/precision/5530) | `` | | [Dell XPS E7240](dell/e7240) | `` | | [Dell XPS 13 7390](dell/xps/13-7390) | `` | diff --git a/dell/poweredge/README.md b/dell/poweredge/README.md new file mode 100644 index 00000000..80f875e2 --- /dev/null +++ b/dell/poweredge/README.md @@ -0,0 +1,15 @@ +[Dell Poweredge R7515](https://www.dell.com/en-us/work/shop/productdetailstxn/poweredge-r7515#techspecs_section) + +## Install bios update via UEFI + +UEFI updates cannot be updated via the iDrac since it only supports BIOS +firmware files. If you use systemd boot you can however download the EFI +firmware file and put it in `/boot/EFI/Dell/bios-update.efi`. + +Also write the following efi boot entry file as +`/boot/loader/entries/z-efi-update.conf`: + +``` +title EFI update +efi /efi/Dell/bios-update.efi +``` diff --git a/dell/poweredge/r7515/default.nix b/dell/poweredge/r7515/default.nix new file mode 100644 index 00000000..7816bd0d --- /dev/null +++ b/dell/poweredge/r7515/default.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ../../../common/cpu/amd + ]; +} diff --git a/flake.nix b/flake.nix index 1549a3cb..5ad085cf 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,7 @@ dell-latitude-3480 = import ./dell/latitude/3480; dell-latitude-7490 = import ./dell/latitude/7490; dell-precision-5530 = import ./dell/precision/5530; + dell-poweredge-r7515 = import ./dell/poweredge/r7515; dell-e7240 = import ./dell/e7240; dell-xps-13-7390 = import ./dell/xps/13-7390; dell-xps-13-9310 = import ./dell/xps/13-9310; From 1464b7f955a239e59d93e9a77309beb860c76155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 13 Nov 2021 08:36:23 +0100 Subject: [PATCH 0069/1476] fix github workflow --- .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 76dff269..c17c8fd6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: cachix/install-nix-action@v14 + - uses: cachix/install-nix-action@v15 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version From 82ada4b2b3b96f4f2a149051a835d0431a13f80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 13 Nov 2021 08:48:29 +0100 Subject: [PATCH 0070/1476] add supermicro x12scz-tln4f --- README.md | 1 + flake.nix | 1 + supermicro/a1sri-2758f/default.nix | 3 +-- supermicro/default.nix | 5 +++++ supermicro/x10sll-f/default.nix | 6 ++++-- supermicro/x12scz-tln4f/default.nix | 7 +++++++ 6 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 supermicro/default.nix create mode 100644 supermicro/x12scz-tln4f/default.nix diff --git a/README.md b/README.md index 043ac391..a87ef633 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,7 @@ See code for all available configurations. | [Purism Librem 15v3](purism/librem/13v3) | `` | | [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | | [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | +| [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | | [System76 (generic)](system76) | `` | | [System76 Darter Pro 6](system76/darp6) | `` | | [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | diff --git a/flake.nix b/flake.nix index 1549a3cb..100039dc 100644 --- a/flake.nix +++ b/flake.nix @@ -93,6 +93,7 @@ purism-librem-15v3 = import ./purism/librem/15v3; supermicro-a1sri-2758f = import ./supermicro/a1sri-2758f; supermicro-x10sll-f = import ./supermicro/x10sll-f; + supermicro-x12scz-tln4f = import ./supermicro/x12scz-tln4f; thoshiba-swanky = import ./toshiba/swanky; tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; common-cpu-amd = import ./common/cpu/amd; diff --git a/supermicro/a1sri-2758f/default.nix b/supermicro/a1sri-2758f/default.nix index 3ffdc0c6..10ea2af4 100644 --- a/supermicro/a1sri-2758f/default.nix +++ b/supermicro/a1sri-2758f/default.nix @@ -4,6 +4,5 @@ { pkgs, ... }: { - boot.kernelModules = [ "ipmi_devintf" "ipmi_si" ]; - environment.systemPackages = [ pkgs.ipmitool ]; + imports = [ ../. ]; } diff --git a/supermicro/default.nix b/supermicro/default.nix new file mode 100644 index 00000000..9c5a2bb3 --- /dev/null +++ b/supermicro/default.nix @@ -0,0 +1,5 @@ +{ pkgs, ... }: +{ + boot.kernelModules = [ "ipmi_devintf" "ipmi_si" ]; + environment.systemPackages = [ pkgs.ipmitool ]; +} diff --git a/supermicro/x10sll-f/default.nix b/supermicro/x10sll-f/default.nix index 10c6cc01..86bc1be3 100644 --- a/supermicro/x10sll-f/default.nix +++ b/supermicro/x10sll-f/default.nix @@ -1,9 +1,11 @@ { config, pkgs, ... }: { - environment.systemPackages = with pkgs; [ ipmitool ]; + imports = [ + ../. + ]; - boot.kernelModules = [ "jc42" "ipmi_devintf" "ipmi_si" "tpm_rng" ]; + boot.kernelModules = [ "jc42" "tpm_rng" ]; # services.cron.systemCronJobs = [ # # Reset 5-minute watchdog timer every minute diff --git a/supermicro/x12scz-tln4f/default.nix b/supermicro/x12scz-tln4f/default.nix new file mode 100644 index 00000000..fca0c3bc --- /dev/null +++ b/supermicro/x12scz-tln4f/default.nix @@ -0,0 +1,7 @@ +{ ... }: +{ + imports = [ + ../../common/cpu/intel + ../. + ]; +} From 5190a9b4f21f4de28a396c1a214c1fef92c4d256 Mon Sep 17 00:00:00 2001 From: Bob van der Linden Date: Mon, 15 Nov 2021 22:14:15 +0100 Subject: [PATCH 0071/1476] fix(intel): add opengl packages for 32bit --- common/cpu/intel/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/cpu/intel/default.nix b/common/cpu/intel/default.nix index ad945f39..daa4e871 100644 --- a/common/cpu/intel/default.nix +++ b/common/cpu/intel/default.nix @@ -12,4 +12,11 @@ libvdpau-va-gl intel-media-driver ]; + + hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ + vaapiIntel + vaapiVdpau + libvdpau-va-gl + intel-media-driver + ]; } From 70409005dd46a805a45e1d128c6a2d2eecebfcb2 Mon Sep 17 00:00:00 2001 From: Philipp Dargel Date: Wed, 17 Nov 2021 07:34:41 +0100 Subject: [PATCH 0072/1476] microsoft/surface: add serial dev bus config --- microsoft/surface/kernel/linux-5.13.4/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/microsoft/surface/kernel/linux-5.13.4/default.nix b/microsoft/surface/kernel/linux-5.13.4/default.nix index 7aa01529..fe2b7286 100644 --- a/microsoft/surface/kernel/linux-5.13.4/default.nix +++ b/microsoft/surface/kernel/linux-5.13.4/default.nix @@ -25,6 +25,12 @@ let BATTERY_SURFACE = module; CHARGER_SURFACE = module; + + # + # Surface laptop 1 keyboard + # + SERIAL_DEV_BUS = yes; + SERIAL_DEV_CTRL_TTYPORT = yes; # # Surface Hotplug From 15e8b8148730790c301d0a9d628edb44ed2a4c78 Mon Sep 17 00:00:00 2001 From: DavHau Date: Thu, 18 Nov 2021 10:11:58 +0700 Subject: [PATCH 0073/1476] Revert "Merge pull request #333 from bobvanderlinden/pr-intel-32bit" This reverts commit ad0b7c5a9585f1b622560ab1a90b562a6ac45e18, reversing changes made to 4045d5f43aff4440661d8912fc6e373188d15b5b. --- common/cpu/intel/default.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/common/cpu/intel/default.nix b/common/cpu/intel/default.nix index daa4e871..ad945f39 100644 --- a/common/cpu/intel/default.nix +++ b/common/cpu/intel/default.nix @@ -12,11 +12,4 @@ libvdpau-va-gl intel-media-driver ]; - - hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ - vaapiIntel - vaapiVdpau - libvdpau-va-gl - intel-media-driver - ]; } From 0492dd8216377dad6cafe52ec7275fede993e45f Mon Sep 17 00:00:00 2001 From: Mark Karpov Date: Tue, 16 Nov 2021 16:40:15 +0100 Subject: [PATCH 0074/1476] Add a config for the 9th generation of Lenovo Thinkpad X1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This solves lagging noticeable on high-resolution screens. Co-authored-by: Jörg Thalheim --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/x1/9th-gen/default.nix | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 lenovo/thinkpad/x1/9th-gen/default.nix diff --git a/README.md b/README.md index 7e71efb8..45c9b7c0 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,7 @@ See code for all available configurations. | [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | | [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | | [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | +| [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | | [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | | [Lenovo ThinkPad X13](lenovo/thinkpad/x13) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | diff --git a/flake.nix b/flake.nix index deba6924..49d2f9dd 100644 --- a/flake.nix +++ b/flake.nix @@ -78,6 +78,7 @@ lenovo-thinkpad-x1 = import ./lenovo/thinkpad/x1; lenovo-thinkpad-x1-6th-gen = import ./lenovo/thinkpad/x1/6th-gen; lenovo-thinkpad-x1-7th-gen = import ./lenovo/thinkpad/x1/7th-gen; + lenovo-thinkpad-x1-9th-gen = import ./lenovo/thinkpad/x1/9th-gen; lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme; lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2; lenovo-thinkpad-x13 = import ./lenovo/thinkpad/x13; diff --git a/lenovo/thinkpad/x1/9th-gen/default.nix b/lenovo/thinkpad/x1/9th-gen/default.nix new file mode 100644 index 00000000..21987a86 --- /dev/null +++ b/lenovo/thinkpad/x1/9th-gen/default.nix @@ -0,0 +1,11 @@ +{ lib, pkgs, ... }: +{ + imports = [ + ../. + ]; + + # This solves lagging noticeable on high-resolution screens. + boot.kernelPackages = lib.mkIf + (lib.versionOlder pkgs.linux.version "5.15") + (lib.mkDefault pkgs.linuxPackages_latest); +} From 6479f584f7247f43eba2f37304bcb085f8ae8995 Mon Sep 17 00:00:00 2001 From: Pasquale Date: Fri, 19 Nov 2021 00:01:56 +0100 Subject: [PATCH 0075/1476] Added ROG Strix G733QS --- README.md | 1 + asus/battery.nix | 21 +++++++++++++++++ asus/rog-strix/g733qs/default.nix | 29 ++++++++++++++++++++++++ asus/rog-strix/g733qs/hda-jack-retask.fw | 16 +++++++++++++ flake.nix | 2 ++ 5 files changed, 69 insertions(+) create mode 100644 asus/battery.nix create mode 100644 asus/rog-strix/g733qs/default.nix create mode 100644 asus/rog-strix/g733qs/hda-jack-retask.fw diff --git a/README.md b/README.md index 45c9b7c0..f90a220b 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ See code for all available configurations. | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | +| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Dell G3 3779](dell/g3/3779) | `` | diff --git a/asus/battery.nix b/asus/battery.nix new file mode 100644 index 00000000..c2a275b0 --- /dev/null +++ b/asus/battery.nix @@ -0,0 +1,21 @@ +{ config, pkgs, lib, ... }: +let + p = pkgs.writeScriptBin "charge-upto" '' + echo ''${0:-100} > /sys/class/power_supply/BAT0/charge_control_end_threshold + ''; + cfg = config.hardware.asus; +in + +{ + options.hardware.asus.chargeUpto = lib.mkOption { + description = "Maximum level of charge for your battery, as a percentage."; + default = 100; + type = lib.types.int; + }; + config = { + environment.systemPackages = [ p ]; + systemd.tmpfiles.rules = [ + "w /sys/class/power_supply/BAT0/charge_control_end_threshold - - - - ${toString cfg.chargeUpto}" + ]; + }; +} diff --git a/asus/rog-strix/g733qs/default.nix b/asus/rog-strix/g733qs/default.nix new file mode 100644 index 00000000..2884104a --- /dev/null +++ b/asus/rog-strix/g733qs/default.nix @@ -0,0 +1,29 @@ +{ config, pkgs, lib, ... }: +{ + imports = [ + ../../../common/cpu/amd + ../../../common/gpu/nvidia.nix + ../../../common/pc/laptop + ../../../common/pc/ssd + ../../battery.nix + ]; + + # fixing audio by overriding pins as suggested in + # https://www.reddit.com/r/ASUS/comments/mfokva/asus_strix_scar_17_g733qs_and_linux/ + hardware.firmware = [ + (pkgs.runCommand "jack-retask" { } '' + install -D ${./hda-jack-retask.fw} $out/lib/firmware/hda-jack-retask.fw + '') + ]; + boot.extraModprobeConfig = '' + options snd-hda-intel patch=hda-jack-retask.fw + ''; + # before 5.12 it would interpret every keystroke as the power button + boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; + + hardware.nvidia.prime = { + offload.enable = lib.mkDefault true; + amdgpuBusId = "PCI:5:0:0"; + nvidiaBusId = "PCI:1:0:1"; + }; +} diff --git a/asus/rog-strix/g733qs/hda-jack-retask.fw b/asus/rog-strix/g733qs/hda-jack-retask.fw new file mode 100644 index 00000000..0797187e --- /dev/null +++ b/asus/rog-strix/g733qs/hda-jack-retask.fw @@ -0,0 +1,16 @@ +[codec] +0x10ec0285 0x10431e6e 0 + +[pincfg] +0x12 0x90a60140 +0x13 0x40000000 +0x14 0x90170152 +0x16 0x411111f0 +0x17 0x90170110 +0x18 0x411111f0 +0x19 0x03a19020 +0x1a 0x411111f0 +0x1b 0x411111f0 +0x1d 0x40663a45 +0x1e 0x90170151 +0x21 0x03211020 diff --git a/flake.nix b/flake.nix index 49d2f9dd..84a1d6dc 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,9 @@ outputs = { self }: { nixosModules = { dell-aspire-4810t = import ./acer/aspire/4810t; + asus-battery = import ./asus/battery.nix; asus-fx504gd = import ./asus/fx504gd; + asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; apple-macbook-air-3 = import ./apple/macbook-air/3; apple-macbook-air-4 = import apple/macbook-air/4; From a9de532758241c1aec78f62ea677ff635c0cb288 Mon Sep 17 00:00:00 2001 From: pasqui23 Date: Sat, 20 Nov 2021 22:23:42 +0000 Subject: [PATCH 0076/1476] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f90a220b..52a7df80 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ See code for all available configurations. | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | -| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | +| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Dell G3 3779](dell/g3/3779) | `` | From 4161f8aee8c750fb7b0c3605f257877d9e9c42ae Mon Sep 17 00:00:00 2001 From: pasqui23 Date: Sat, 20 Nov 2021 22:26:52 +0000 Subject: [PATCH 0077/1476] Update asus/battery.nix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- asus/battery.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asus/battery.nix b/asus/battery.nix index c2a275b0..e9bb2544 100644 --- a/asus/battery.nix +++ b/asus/battery.nix @@ -7,7 +7,7 @@ let in { - options.hardware.asus.chargeUpto = lib.mkOption { + options.hardware.asus.battery.chargeUpto = lib.mkOption { description = "Maximum level of charge for your battery, as a percentage."; default = 100; type = lib.types.int; @@ -15,7 +15,7 @@ in config = { environment.systemPackages = [ p ]; systemd.tmpfiles.rules = [ - "w /sys/class/power_supply/BAT0/charge_control_end_threshold - - - - ${toString cfg.chargeUpto}" + "w /sys/class/power_supply/BAT0/charge_control_end_threshold - - - - ${toString cfg.battery.chargeUpto}" ]; }; } From 3332a12b47249dac21b2cd2718433d8fd29c61c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Nov 2021 02:03:04 +0000 Subject: [PATCH 0078/1476] build(deps): bump cachix/install-nix-action from 15 to 16 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 15 to 16. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v15...v16) --- 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 c17c8fd6..8e75b05a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: cachix/install-nix-action@v15 + - uses: cachix/install-nix-action@v16 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version From 2051241010c87ffda348c97c092a1358753f8ecd Mon Sep 17 00:00:00 2001 From: pasqui23 Date: Wed, 24 Nov 2021 20:49:28 +0000 Subject: [PATCH 0079/1476] g733qs: lates linux only if kernel older than 5.12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- asus/rog-strix/g733qs/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asus/rog-strix/g733qs/default.nix b/asus/rog-strix/g733qs/default.nix index 2884104a..89ec2a7a 100644 --- a/asus/rog-strix/g733qs/default.nix +++ b/asus/rog-strix/g733qs/default.nix @@ -19,7 +19,7 @@ options snd-hda-intel patch=hda-jack-retask.fw ''; # before 5.12 it would interpret every keystroke as the power button - boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (lib.mkDefault pkgs.linuxPackages_latest); hardware.nvidia.prime = { offload.enable = lib.mkDefault true; From 1794de7d78fcc70337800ee5cbce171ae138ec15 Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Thu, 25 Nov 2021 09:42:19 +1000 Subject: [PATCH 0080/1476] xps-9310: Remove upstreamed kernel patches with custom config I've upstreamed these patches in NixOS/nixpkgs#144409, which means we no longer have to build the kernel every time we update just to get bluetooth working :tada: While these changes have landed in master, they haven't been back-ported to 21.05. They will be available via 21.11, which I'm currently testing (along with this commit) by setting my `nixos` channel to the necessary nixpkgs pre-release branch, e.g. ```bash sudo nix-channel --remove nixos sudo nix-channel --add https://github.com/NixOS/nixpkgs/archive/release-21.11.tar.gz nixos sudo nix-channel --update nixos ``` *Note that if you use the above branch like I am, you might miss the cache on some pkgs and spend even longer building those (looking at you libreoffice).* As of writing this PR, the current kernel is 5.15.4 and all seems to be working well. --- dell/xps/13-9310/default.nix | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/dell/xps/13-9310/default.nix b/dell/xps/13-9310/default.nix index b36793bc..8f8fabba 100644 --- a/dell/xps/13-9310/default.nix +++ b/dell/xps/13-9310/default.nix @@ -4,26 +4,13 @@ ../../../common/pc/laptop ../../../common/pc/ssd ]; - + # Includes the Wi-Fi and Bluetooth firmware for the QCA6390. hardware.enableRedistributableFirmware = true; + # Requires at least 5.12 for working wi-fi and bluetooth. boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (lib.mkDefault pkgs.linuxPackages_latest); - # TODO: upstream this to NixOS - boot.kernelPatches = [{ - name = "enable-qca6390-bluetooth"; - patch = null; - extraConfig = '' - BT_QCA m - BT_HCIUART m - BT_HCIUART_QCA y - BT_HCIUART_SERDEV y - SERIAL_DEV_BUS y - SERIAL_DEV_CTRL_TTYPORT y - ''; - }]; - boot.kernelModules = [ "btqca" "hci_qca" "hci_uart" ]; # Touchpad goes over i2c. # Without this we get errors in dmesg on boot and hangs when shutting down. From eafbea9efd854d969a89e8de9f1ac3597afa068a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 25 Nov 2021 08:40:38 +0100 Subject: [PATCH 0081/1476] nanopc-t4: use kernelParams to set tty baud rate we no longer support mingetty.serialSpeed. --- friendlyarm/nanopc-t4/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/friendlyarm/nanopc-t4/default.nix b/friendlyarm/nanopc-t4/default.nix index b18e0a06..61b86576 100644 --- a/friendlyarm/nanopc-t4/default.nix +++ b/friendlyarm/nanopc-t4/default.nix @@ -8,7 +8,7 @@ }; # UART debug console bitrates. - services.mingetty.serialSpeed = [ 1500000 115200 ]; + boot.kernelParams = [ "console=ttyS2,1500000" ]; # Enable additional firmware (such as Wi-Fi drivers). hardware.enableRedistributableFirmware = lib.mkDefault true; From 6b3f79de09c3de7c91ab51e55e87879f61b6faec Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Mon, 29 Nov 2021 16:08:07 +0530 Subject: [PATCH 0082/1476] Add Intel NUC 8i7BEH (#343) --- README.md | 1 + flake.nix | 1 + intel/nuc/8i7beh/README.md | 39 ++++++++++++++++++++++++++++++++++++ intel/nuc/8i7beh/default.nix | 9 +++++++++ 4 files changed, 50 insertions(+) create mode 100644 intel/nuc/8i7beh/README.md create mode 100644 intel/nuc/8i7beh/default.nix diff --git a/README.md b/README.md index 52a7df80..5b4414bb 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,7 @@ See code for all available configurations. | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [Google Pixelbook](google/pixelbook) | `` | | [GPD MicroPC](gpd/micropc) | `` | +| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Inverse Path USB armory](inversepath/usbarmory) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | diff --git a/flake.nix b/flake.nix index 84a1d6dc..20072200 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,7 @@ friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; google-pixelbook = import ./google/pixelbook; gpd-micropc = import ./gpd/micropc; + intel-nuc-8i7beh = import ./intel/nuc/8i7beh; inversepath-usbarmory = import ./inversepath/usbarmory; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-thinkpad = import ./lenovo/thinkpad; diff --git a/intel/nuc/8i7beh/README.md b/intel/nuc/8i7beh/README.md new file mode 100644 index 00000000..c3735024 --- /dev/null +++ b/intel/nuc/8i7beh/README.md @@ -0,0 +1,39 @@ +# NUC + +## Tested Hardware + +``` shellsession +$ lspci -nnn +00:00.0 Host bridge [0600]: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers [8086:3ed0] (rev 08) +00:02.0 VGA compatible controller [0300]: Intel Corporation CoffeeLake-U GT3e [Iris Plus Graphics 655] [8086:3ea5] (rev 01) +00:08.0 System peripheral [0880]: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model [8086:1911] +00:12.0 Signal processing controller [1180]: Intel Corporation Cannon Point-LP Thermal Controller [8086:9df9] (rev 30) +00:14.0 USB controller [0c03]: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller [8086:9ded] (rev 30) +00:14.2 RAM memory [0500]: Intel Corporation Cannon Point-LP Shared SRAM [8086:9def] (rev 30) +00:14.3 Network controller [0280]: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] [8086:9df0] (rev 30) +00:16.0 Communication controller [0780]: Intel Corporation Cannon Point-LP MEI Controller #1 [8086:9de0] (rev 30) +00:17.0 SATA controller [0106]: Intel Corporation Cannon Point-LP SATA Controller [AHCI Mode] [8086:9dd3] (rev 30) +00:1c.0 PCI bridge [0604]: Intel Corporation Cannon Point-LP PCI Express Root Port #1 [8086:9db8] (rev f0) +00:1c.4 PCI bridge [0604]: Intel Corporation Cannon Point-LP PCI Express Root Port #5 [8086:9dbc] (rev f0) +00:1d.0 PCI bridge [0604]: Intel Corporation Cannon Point-LP PCI Express Root Port #9 [8086:9db0] (rev f0) +00:1d.6 PCI bridge [0604]: Intel Corporation Cannon Point-LP PCI Express Root Port #15 [8086:9db6] (rev f0) +00:1f.0 ISA bridge [0601]: Intel Corporation Cannon Point-LP LPC Controller [8086:9d84] (rev 30) +00:1f.3 Audio device [0403]: Intel Corporation Cannon Point-LP High Definition Audio Controller [8086:9dc8] (rev 30) +00:1f.4 SMBus [0c05]: Intel Corporation Cannon Point-LP SMBus Controller [8086:9da3] (rev 30) +00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller [8086:9da4] (rev 30) +00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (6) I219-V [8086:15be] (rev 30) +3b:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983 [144d:a808] +3c:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader [10ec:522a] (rev 01) +``` + +## Before Instalation + +These settings are needed both for booting the final install, and +installer itself. Therefore, they must be done first. + +- Disable Secure Boot (but keep UEFI Boot). + +# References + +- [Intel Product page](https://ark.intel.com/content/www/us/en/ark/products/126140/intel-nuc-kit-nuc8i7beh.html) +- [Arch Wiki on Intel NUC](https://wiki.archlinux.org/title/Intel_NUC) diff --git a/intel/nuc/8i7beh/default.nix b/intel/nuc/8i7beh/default.nix new file mode 100644 index 00000000..9cd9d4f6 --- /dev/null +++ b/intel/nuc/8i7beh/default.nix @@ -0,0 +1,9 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ]; + + services.thermald.enable = lib.mkDefault true; +} From 1bc731fde4af337134331572889de8dd8dbff897 Mon Sep 17 00:00:00 2001 From: "M. Ian Graham" Date: Sat, 11 Dec 2021 00:51:56 +0900 Subject: [PATCH 0083/1476] rpi4: Add option to turn on the ARM I2C bus (i2c1). --- raspberry-pi/4/default.nix | 1 + raspberry-pi/4/i2c1.nix | 44 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 raspberry-pi/4/i2c1.nix diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index 2fe97e1a..d94a9f9b 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -4,6 +4,7 @@ imports = [ ./audio.nix ./dwc2.nix + ./i2c1.nix ./modesetting.nix ./poe-hat.nix ./tc358743.nix diff --git a/raspberry-pi/4/i2c1.nix b/raspberry-pi/4/i2c1.nix new file mode 100644 index 00000000..a93acb30 --- /dev/null +++ b/raspberry-pi/4/i2c1.nix @@ -0,0 +1,44 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.hardware.raspberry-pi."4".i2c1; +in +{ + options.hardware = { + raspberry-pi."4".i2c1 = { + enable = lib.mkEnableOption '' + Turn on the ARM I2C bus (/dev/i2c-1 on GPIO pins 3 and 5) and enable access from the i2c group. + After a reboot, i2c-tools (e.g. i2cdetect -F 1) should work for root or any user in i2c. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + hardware = { + i2c.enable = true; + deviceTree = { + overlays = [ + # Equivalent to dtparam=i2c1=on + { + name = "i2c1-on-overlay"; + dtsText = '' + /dts-v1/; + /plugin/; + / { + compatible = "brcm,bcm2711"; + fragment@0 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + }; + }; + }; + ''; + } + ]; + }; + }; + }; +} From e81c9aed162c49b6652c18b85b2fed131a1968c2 Mon Sep 17 00:00:00 2001 From: "M. Ian Graham" Date: Sat, 11 Dec 2021 05:08:24 +0900 Subject: [PATCH 0084/1476] raspberry-pi/4/i2c1: indentation fix --- raspberry-pi/4/i2c1.nix | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/raspberry-pi/4/i2c1.nix b/raspberry-pi/4/i2c1.nix index a93acb30..27db73e0 100644 --- a/raspberry-pi/4/i2c1.nix +++ b/raspberry-pi/4/i2c1.nix @@ -22,20 +22,20 @@ in { name = "i2c1-on-overlay"; dtsText = '' - /dts-v1/; - /plugin/; - / { - compatible = "brcm,bcm2711"; - fragment@0 { - target = <&i2c1>; - __overlay__ { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; + /dts-v1/; + /plugin/; + / { + compatible = "brcm,bcm2711"; + fragment@0 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + }; }; }; - }; - ''; + ''; } ]; }; From 41c4e294f441f2aa655f7d8985623ec07a4314af Mon Sep 17 00:00:00 2001 From: "M. Ian Graham" Date: Sat, 11 Dec 2021 08:34:25 +0900 Subject: [PATCH 0085/1476] raspberry-pi/4/i2c1: factor out easy dts into helper, add i2c0 --- raspberry-pi/4/default.nix | 1 + raspberry-pi/4/i2c0.nix | 25 +++++++++++++++++++++++++ raspberry-pi/4/i2c1.nix | 25 +++---------------------- raspberry-pi/4/overlay.nix | 18 ++++++++++++++++++ 4 files changed, 47 insertions(+), 22 deletions(-) create mode 100644 raspberry-pi/4/i2c0.nix create mode 100644 raspberry-pi/4/overlay.nix diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index d94a9f9b..7d1bce44 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -4,6 +4,7 @@ imports = [ ./audio.nix ./dwc2.nix + ./i2c0.nix ./i2c1.nix ./modesetting.nix ./poe-hat.nix diff --git a/raspberry-pi/4/i2c0.nix b/raspberry-pi/4/i2c0.nix new file mode 100644 index 00000000..e4fa7793 --- /dev/null +++ b/raspberry-pi/4/i2c0.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.hardware.raspberry-pi."4".i2c0; + inherit (import ./overlay.nix) simple-pi4-overlay; +in +{ + options.hardware = { + raspberry-pi."4".i2c0 = { + enable = lib.mkEnableOption '' + Turn on the VideoCore I2C bus (maps to /dev/i2c-22) and enable access from the i2c group. + After a reboot, i2c-tools (e.g. i2cdetect -F 22) should work for root or any user in i2c. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + hardware = { + i2c.enable = lib.mkDefault true; + deviceTree = { + overlays = [ (simple-pi4-overlay { target = "i2c0if"; status = "okay"; }) ]; + }; + }; + }; +} diff --git a/raspberry-pi/4/i2c1.nix b/raspberry-pi/4/i2c1.nix index 27db73e0..02d26235 100644 --- a/raspberry-pi/4/i2c1.nix +++ b/raspberry-pi/4/i2c1.nix @@ -2,6 +2,7 @@ let cfg = config.hardware.raspberry-pi."4".i2c1; + inherit (import ./overlay.nix) simple-pi4-overlay; in { options.hardware = { @@ -15,29 +16,9 @@ in config = lib.mkIf cfg.enable { hardware = { - i2c.enable = true; + i2c.enable = lib.mkDefault true; deviceTree = { - overlays = [ - # Equivalent to dtparam=i2c1=on - { - name = "i2c1-on-overlay"; - dtsText = '' - /dts-v1/; - /plugin/; - / { - compatible = "brcm,bcm2711"; - fragment@0 { - target = <&i2c1>; - __overlay__ { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; - }; - }; - }; - ''; - } - ]; + overlays = [ (simple-pi4-overlay { target = "i2c1"; status = "okay"; }) ]; }; }; }; diff --git a/raspberry-pi/4/overlay.nix b/raspberry-pi/4/overlay.nix new file mode 100644 index 00000000..d32e75f0 --- /dev/null +++ b/raspberry-pi/4/overlay.nix @@ -0,0 +1,18 @@ +{ + simple-pi4-overlay = { target, status }: { + name = "${target}-${status}-overlay"; + dtsText = '' + /dts-v1/; + /plugin/; + / { + compatible = "brcm,bcm2711"; + fragment@0 { + target = <&${target}>; + __overlay__ { + status = "${status}"; + }; + }; + }; + ''; + }; +} From 8f1bf828d8606fe38a02df312cf14546ae200a72 Mon Sep 17 00:00:00 2001 From: "M. Ian Graham" Date: Sat, 11 Dec 2021 10:26:21 +0900 Subject: [PATCH 0086/1476] raspberry-pi/4/i2c: refactor i2c stuff into single file --- raspberry-pi/4/default.nix | 3 +-- raspberry-pi/4/i2c.nix | 47 ++++++++++++++++++++++++++++++++++++++ raspberry-pi/4/i2c0.nix | 25 -------------------- raspberry-pi/4/i2c1.nix | 25 -------------------- raspberry-pi/4/overlay.nix | 18 --------------- 5 files changed, 48 insertions(+), 70 deletions(-) create mode 100644 raspberry-pi/4/i2c.nix delete mode 100644 raspberry-pi/4/i2c0.nix delete mode 100644 raspberry-pi/4/i2c1.nix delete mode 100644 raspberry-pi/4/overlay.nix diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index 7d1bce44..fac4cc17 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -4,8 +4,7 @@ imports = [ ./audio.nix ./dwc2.nix - ./i2c0.nix - ./i2c1.nix + ./i2c.nix ./modesetting.nix ./poe-hat.nix ./tc358743.nix diff --git a/raspberry-pi/4/i2c.nix b/raspberry-pi/4/i2c.nix new file mode 100644 index 00000000..93c1c6d9 --- /dev/null +++ b/raspberry-pi/4/i2c.nix @@ -0,0 +1,47 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.hardware.raspberry-pi."4"; + simple-overlay = { target, status }: { + name = "${target}-${status}-overlay"; + dtsText = '' + /dts-v1/; + /plugin/; + / { + compatible = "brcm,bcm2711"; + fragment@0 { + target = <&${target}>; + __overlay__ { + status = "${status}"; + }; + }; + }; + ''; + }; +in +{ + options.hardware.raspberry-pi."4" = { + i2c0.enable = lib.mkEnableOption '' + Turn on the VideoCore I2C bus (maps to /dev/i2c-22) and enable access from the i2c group. + After a reboot, i2c-tools (e.g. i2cdetect -F 22) should work for root or any user in i2c. + ''; + i2c1.enable = lib.mkEnableOption '' + Turn on the ARM I2C bus (/dev/i2c-1 on GPIO pins 3 and 5) and enable access from the i2c group. + After a reboot, i2c-tools (e.g. i2cdetect -F 1) should work for root or any user in i2c. + ''; + }; + config.hardware = lib.mkMerge [ + (lib.mkIf cfg.i2c0.enable { + i2c.enable = lib.mkDefault true; + deviceTree = { + overlays = [ (simple-overlay { target = "i2c0if"; status = "okay"; }) ]; + }; + }) + (lib.mkIf cfg.i2c1.enable { + i2c.enable = lib.mkDefault true; + deviceTree = { + overlays = [ (simple-overlay { target = "i2c1"; status = "okay"; }) ]; + }; + }) + ]; +} diff --git a/raspberry-pi/4/i2c0.nix b/raspberry-pi/4/i2c0.nix deleted file mode 100644 index e4fa7793..00000000 --- a/raspberry-pi/4/i2c0.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.hardware.raspberry-pi."4".i2c0; - inherit (import ./overlay.nix) simple-pi4-overlay; -in -{ - options.hardware = { - raspberry-pi."4".i2c0 = { - enable = lib.mkEnableOption '' - Turn on the VideoCore I2C bus (maps to /dev/i2c-22) and enable access from the i2c group. - After a reboot, i2c-tools (e.g. i2cdetect -F 22) should work for root or any user in i2c. - ''; - }; - }; - - config = lib.mkIf cfg.enable { - hardware = { - i2c.enable = lib.mkDefault true; - deviceTree = { - overlays = [ (simple-pi4-overlay { target = "i2c0if"; status = "okay"; }) ]; - }; - }; - }; -} diff --git a/raspberry-pi/4/i2c1.nix b/raspberry-pi/4/i2c1.nix deleted file mode 100644 index 02d26235..00000000 --- a/raspberry-pi/4/i2c1.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.hardware.raspberry-pi."4".i2c1; - inherit (import ./overlay.nix) simple-pi4-overlay; -in -{ - options.hardware = { - raspberry-pi."4".i2c1 = { - enable = lib.mkEnableOption '' - Turn on the ARM I2C bus (/dev/i2c-1 on GPIO pins 3 and 5) and enable access from the i2c group. - After a reboot, i2c-tools (e.g. i2cdetect -F 1) should work for root or any user in i2c. - ''; - }; - }; - - config = lib.mkIf cfg.enable { - hardware = { - i2c.enable = lib.mkDefault true; - deviceTree = { - overlays = [ (simple-pi4-overlay { target = "i2c1"; status = "okay"; }) ]; - }; - }; - }; -} diff --git a/raspberry-pi/4/overlay.nix b/raspberry-pi/4/overlay.nix deleted file mode 100644 index d32e75f0..00000000 --- a/raspberry-pi/4/overlay.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - simple-pi4-overlay = { target, status }: { - name = "${target}-${status}-overlay"; - dtsText = '' - /dts-v1/; - /plugin/; - / { - compatible = "brcm,bcm2711"; - fragment@0 { - target = <&${target}>; - __overlay__ { - status = "${status}"; - }; - }; - }; - ''; - }; -} From c662415158ecc79f58c5af83af277fd220c63b63 Mon Sep 17 00:00:00 2001 From: Ming-Chuan Date: Sun, 12 Dec 2021 00:00:48 +0800 Subject: [PATCH 0087/1476] Fix typo --- intel/nuc/8i7beh/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intel/nuc/8i7beh/README.md b/intel/nuc/8i7beh/README.md index c3735024..35774101 100644 --- a/intel/nuc/8i7beh/README.md +++ b/intel/nuc/8i7beh/README.md @@ -26,7 +26,7 @@ $ lspci -nnn 3c:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader [10ec:522a] (rev 01) ``` -## Before Instalation +## Before Installation These settings are needed both for booting the final install, and installer itself. Therefore, they must be done first. From e936b337b01ceed4a4e690589de0bf8a58e5f1b9 Mon Sep 17 00:00:00 2001 From: maydayv7 Date: Sat, 11 Dec 2021 21:37:01 +0530 Subject: [PATCH 0088/1476] Add Dell Inspiron 5509 --- README.md | 1 + dell/inspiron/5509/README.wiki | 47 ++++++++++++++++++++++++++++++++++ dell/inspiron/5509/default.nix | 23 +++++++++++++++++ flake.nix | 1 + 4 files changed, 72 insertions(+) create mode 100644 dell/inspiron/5509/README.wiki create mode 100644 dell/inspiron/5509/default.nix diff --git a/README.md b/README.md index 5b4414bb..12fc9399 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ See code for all available configurations. | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Dell G3 3779](dell/g3/3779) | `` | +| [Dell Inspiron 5509](dell/inspiron/5509) | `` | | [Dell Latitude 3480](dell/latitude/3480) | `` | | [Dell Latitude 7490](dell/latitude/7490) | `` | | [Dell Poweredge R7515](dell/poweredge/r7515) | `` | diff --git a/dell/inspiron/5509/README.wiki b/dell/inspiron/5509/README.wiki new file mode 100644 index 00000000..3bee4248 --- /dev/null +++ b/dell/inspiron/5509/README.wiki @@ -0,0 +1,47 @@ += Dell Inspiron 5509 = + +== Tested Hardware == + +``` shellsession +$ lspci -nn +00:00.0 Host bridge [0600]: Intel Corporation 11th Gen Core Processor Host Bridge/DRAM Registers [8086:9a14] (rev 01) +00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] [8086:9a49] (rev 01) +00:04.0 Signal processing controller [1180]: Intel Corporation TigerLake-LP Dynamic Tuning Processor Participant [8086:9a03] (rev 01) +00:06.0 PCI bridge [0604]: Intel Corporation 11th Gen Core Processor PCIe Controller [8086:9a09] (rev 01) +00:07.0 PCI bridge [0604]: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #0 [8086:9a23] (rev 01) +00:0a.0 Signal processing controller [1180]: Intel Corporation Tigerlake Telemetry Aggregator Driver [8086:9a0d] (rev 01) +00:0d.0 USB controller [0c03]: Intel Corporation Tiger Lake-LP Thunderbolt 4 USB Controller [8086:9a13] (rev 01) +00:0d.2 USB controller [0c03]: Intel Corporation Tiger Lake-LP Thunderbolt 4 NHI #0 [8086:9a1b] (rev 01) +00:12.0 Serial controller [0700]: Intel Corporation Tiger Lake-LP Integrated Sensor Hub [8086:a0fc] (rev 20) +00:14.0 USB controller [0c03]: Intel Corporation Tiger Lake-LP USB 3.2 Gen 2x1 xHCI Host Controller [8086:a0ed] (rev 20) +00:14.2 RAM memory [0500]: Intel Corporation Tiger Lake-LP Shared SRAM [8086:a0ef] (rev 20) +00:15.0 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #0 [8086:a0e8] (rev 20) +00:15.1 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #1 [8086:a0e9] (rev 20) +00:16.0 Communication controller [0780]: Intel Corporation Tiger Lake-LP Management Engine Interface [8086:a0e0] (rev 20) +00:1c.0 PCI bridge [0604]: Intel Corporation Device [8086:a0be] (rev 20) +00:1f.0 ISA bridge [0601]: Intel Corporation Tiger Lake-LP LPC Controller [8086:a082] (rev 20) +00:1f.3 Multimedia audio controller [0401]: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller [8086:a0c8] (rev 20) +00:1f.4 SMBus [0c05]: Intel Corporation Tiger Lake-LP SMBus Controller [8086:a0a3] (rev 20) +00:1f.5 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP SPI Controller [8086:a0a4] (rev 20) +01:00.0 Non-Volatile memory controller [0108]: SK hynix Device [1c5c:174a] +2c:00.0 Network controller [0280]: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter [168c:003e] (rev 32) +``` + +=== Before Installation === + +These settings are needed both for booting the final install, and +installer itself. Therefore, they must be done first: + +- ''Disable Secure Boot (but keep UEFI Boot)'' +- ''Disable RAID and use AHCI'' + +== 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 diff --git a/dell/inspiron/5509/default.nix b/dell/inspiron/5509/default.nix new file mode 100644 index 00000000..f934486f --- /dev/null +++ b/dell/inspiron/5509/default.nix @@ -0,0 +1,23 @@ +{ lib, ... }: +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + # Essential Firmware + hardware.enableRedistributableFirmware = lib.mkDefault true; + + # Cooling Management + services.thermald.enable = lib.mkDefault true; + + services.xserver = { + # GPU Driver Setting + videoDrivers = lib.mkDefault [ "intel" ]; + + # Touchpad + libinput.touchpad.tapping = true; + libinput.touchpad.tappingDragLock = true; + }; +} diff --git a/flake.nix b/flake.nix index 20072200..999ab693 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,7 @@ apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; dell-g3-3779 = import ./dell/g3/3779; + dell-inspiron-5509 = import ./dell/inspiron/5509; dell-latitude-3480 = import ./dell/latitude/3480; dell-latitude-7490 = import ./dell/latitude/7490; dell-precision-5530 = import ./dell/precision/5530; From 7904e1d34f3d6810b8378069b14238a99c979b7a Mon Sep 17 00:00:00 2001 From: maydayv7 Date: Sat, 11 Dec 2021 22:08:12 +0530 Subject: [PATCH 0089/1476] Update README --- dell/inspiron/5509/{README.wiki => README.md} | 21 +++++++++---------- dell/inspiron/5509/default.nix | 5 +---- 2 files changed, 11 insertions(+), 15 deletions(-) rename dell/inspiron/5509/{README.wiki => README.md} (89%) diff --git a/dell/inspiron/5509/README.wiki b/dell/inspiron/5509/README.md similarity index 89% rename from dell/inspiron/5509/README.wiki rename to dell/inspiron/5509/README.md index 3bee4248..03e74503 100644 --- a/dell/inspiron/5509/README.wiki +++ b/dell/inspiron/5509/README.md @@ -1,7 +1,6 @@ -= Dell Inspiron 5509 = - -== Tested Hardware == +## Dell Inspiron 5509 +### Tested Hardware ``` shellsession $ lspci -nn 00:00.0 Host bridge [0600]: Intel Corporation 11th Gen Core Processor Host Bridge/DRAM Registers [8086:9a14] (rev 01) @@ -27,21 +26,21 @@ $ lspci -nn 2c:00.0 Network controller [0280]: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter [168c:003e] (rev 32) ``` -=== Before Installation === +### Before Installation These settings are needed both for booting the final install, and installer itself. Therefore, they must be done first: -- ''Disable Secure Boot (but keep UEFI Boot)'' -- ''Disable RAID and use AHCI'' ++ Disable *Secure* Boot (but keep **UEFI** Boot) ++ Disable *RAID* and use **AHCI** -== Firmware Upgrades == +### Firmware Upgrades -Note that this device is supported by [https://fwupd.org/ fwupd]. +Note that this device is supported by [fwupd](https://fwupd.org). To perform firmware upgrades just activate the service: - +``` services.fwupd.enable = true; - +``` -Then use fwupdmgr to perform updates +Then use `fwupdmgr` to perform updates diff --git a/dell/inspiron/5509/default.nix b/dell/inspiron/5509/default.nix index f934486f..9e49b622 100644 --- a/dell/inspiron/5509/default.nix +++ b/dell/inspiron/5509/default.nix @@ -12,11 +12,8 @@ # Cooling Management services.thermald.enable = lib.mkDefault true; + # Touchpad services.xserver = { - # GPU Driver Setting - videoDrivers = lib.mkDefault [ "intel" ]; - - # Touchpad libinput.touchpad.tapping = true; libinput.touchpad.tappingDragLock = true; }; From 5bc70870386358b6de2901300058d7b014714ccc Mon Sep 17 00:00:00 2001 From: ilian Date: Sun, 19 Dec 2021 11:44:09 +0100 Subject: [PATCH 0090/1476] thinkpad/x1: import ssd config for relevant models --- lenovo/thinkpad/x1/6th-gen/default.nix | 1 + lenovo/thinkpad/x1/7th-gen/default.nix | 1 + lenovo/thinkpad/x1/9th-gen/default.nix | 1 + 3 files changed, 3 insertions(+) diff --git a/lenovo/thinkpad/x1/6th-gen/default.nix b/lenovo/thinkpad/x1/6th-gen/default.nix index 00446b8c..b244e970 100644 --- a/lenovo/thinkpad/x1/6th-gen/default.nix +++ b/lenovo/thinkpad/x1/6th-gen/default.nix @@ -10,6 +10,7 @@ imports = [ ../. ../../../../common/pc/laptop/acpi_call.nix + ../../../../common/pc/laptop/ssd ]; # New ThinkPads have a different TrackPoint manufacturer/name. diff --git a/lenovo/thinkpad/x1/7th-gen/default.nix b/lenovo/thinkpad/x1/7th-gen/default.nix index 8349d056..d9af5ebe 100644 --- a/lenovo/thinkpad/x1/7th-gen/default.nix +++ b/lenovo/thinkpad/x1/7th-gen/default.nix @@ -2,6 +2,7 @@ imports = [ ../. ../../../../common/pc/laptop/acpi_call.nix + ../../../../common/pc/laptop/ssd ./audio.nix ]; } diff --git a/lenovo/thinkpad/x1/9th-gen/default.nix b/lenovo/thinkpad/x1/9th-gen/default.nix index 21987a86..a52f02b7 100644 --- a/lenovo/thinkpad/x1/9th-gen/default.nix +++ b/lenovo/thinkpad/x1/9th-gen/default.nix @@ -2,6 +2,7 @@ { imports = [ ../. + ../../../../common/pc/laptop/ssd ]; # This solves lagging noticeable on high-resolution screens. From b166aab83e43c8db70ed47ec2d7a568d4284f712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 26 Dec 2021 10:15:40 +0100 Subject: [PATCH 0091/1476] x13: fix loading psmouse --- lenovo/thinkpad/x13/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/thinkpad/x13/default.nix b/lenovo/thinkpad/x13/default.nix index b9eeba79..88c94185 100644 --- a/lenovo/thinkpad/x13/default.nix +++ b/lenovo/thinkpad/x13/default.nix @@ -8,5 +8,5 @@ ]; # Somehow psmouse does not load automatically on boot for me - boot.kernelModules = [ "psmouse" ]; + boot.initrd.kernelModules = [ "psmouse" ]; } From eaddb934ed57f2a055821be930c8d6a4e54d11a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 28 Dec 2021 10:23:19 +0100 Subject: [PATCH 0092/1476] drop usbarmory The kernel has not been updated in ages (since 2016) and the used cached is no longer reachable. Hence I assume this is no longer used. --- README.md | 1 - flake.nix | 1 - inversepath/usbarmory/README.txt | 6 - inversepath/usbarmory/default.nix | 46 - inversepath/usbarmory/host.nix | 19 - inversepath/usbarmory/kernel.config | 995 ---------------------- inversepath/usbarmory/kernel.nix | 20 - inversepath/usbarmory/usbarmory-dts.patch | 418 --------- 8 files changed, 1506 deletions(-) delete mode 100644 inversepath/usbarmory/README.txt delete mode 100644 inversepath/usbarmory/default.nix delete mode 100644 inversepath/usbarmory/host.nix delete mode 100644 inversepath/usbarmory/kernel.config delete mode 100644 inversepath/usbarmory/kernel.nix delete mode 100644 inversepath/usbarmory/usbarmory-dts.patch diff --git a/README.md b/README.md index 12fc9399..f974d92d 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,6 @@ See code for all available configurations. | [Google Pixelbook](google/pixelbook) | `` | | [GPD MicroPC](gpd/micropc) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | -| [Inverse Path USB armory](inversepath/usbarmory) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | diff --git a/flake.nix b/flake.nix index 999ab693..f1eaf502 100644 --- a/flake.nix +++ b/flake.nix @@ -39,7 +39,6 @@ google-pixelbook = import ./google/pixelbook; gpd-micropc = import ./gpd/micropc; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; - inversepath-usbarmory = import ./inversepath/usbarmory; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-thinkpad = import ./lenovo/thinkpad; lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel; diff --git a/inversepath/usbarmory/README.txt b/inversepath/usbarmory/README.txt deleted file mode 100644 index 31922a8d..00000000 --- a/inversepath/usbarmory/README.txt +++ /dev/null @@ -1,6 +0,0 @@ -USB Armory network interface support - -- rename the Armory USB network interface -- set Armory inteface ip to 10.0.0.2/24 -- enable NAT and forward Armory interface -- add the name 'armory' to /etc/hosts diff --git a/inversepath/usbarmory/default.nix b/inversepath/usbarmory/default.nix deleted file mode 100644 index 5c329f82..00000000 --- a/inversepath/usbarmory/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - boot = { - extraModprobeConfig = lib.mkDefault '' - options g_ether use_eem=0 dev_addr=1a:55:89:a2:69:41 host_addr=1a:55:89:a2:69:42 - ''; - - kernelModules = [ "ledtrig_heartbeat" "ci_hdrc_imx" "g_ether" ]; - kernelPackages = lib.mkDefault pkgs.linuxPackages_usbarmory; - kernelParams = [ "console=ttymxc0,115200" ]; - - loader.generic-extlinux-compatible.enable = lib.mkDefault true; - }; - - networking = { - defaultGateway = "172.16.0.1"; - firewall.enable = lib.mkDefault false; - hostName = "usbarmory"; - - interfaces.usb0.ip4 = [ - { address = "172.16.0.2"; prefixLength = 24; } - ]; - - nameservers = [ "8.8.8.8" ]; - }; - - nix = { - binaryCaches = [ "http://nixos-arm.dezgeg.me/channel" ]; - binaryCachePublicKeys = [ "nixos-arm.dezgeg.me-1:xBaUKS3n17BZPKeyxL4JfbTqECsT+ysbDJz29kLFRW0=%" ]; - }; - - nixpkgs.overlays = [(final: previous: { - linuxPackages_usbarmory = final.recurseIntoAttrs - (final.linuxPackagesFor (import ./kernel.nix { - inherit (final) stdenv buildLinux fetchurl; - })); - })]; - - sound.enable = lib.mkDefault false; - - services = { - openssh.enable = lib.mkDefault true; - openssh.permitRootLogin = lib.mkDefault "without-password"; - }; -} diff --git a/inversepath/usbarmory/host.nix b/inversepath/usbarmory/host.nix deleted file mode 100644 index 42cef490..00000000 --- a/inversepath/usbarmory/host.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ dev ? "armory0" }: - -{ - services.udev.extraRules = '' - SUBSYSTEM=="net", ACTION=="add", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="a4a2", NAME="${staticDevName}" - ''; - - networking = { - interfaces."${staticDevName}".ip4 = [{ - address = "10.0.0.2"; - prefixLength = 24; - }]; - nat = { - enable = true; - internalInterfaces = [ dev ]; - }; - extraHosts = "10.0.0.1 armory"; - }; -} diff --git a/inversepath/usbarmory/kernel.config b/inversepath/usbarmory/kernel.config deleted file mode 100644 index e2fa2973..00000000 --- a/inversepath/usbarmory/kernel.config +++ /dev/null @@ -1,995 +0,0 @@ -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_MIGHT_HAVE_PCI=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_HAVE_LATENCYTOP_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_FIX_EARLYCON_MEM=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_ARCH_SUPPORTS_UPROBES=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_ARM_PATCH_PHYS_VIRT=y -CONFIG_GENERIC_BUG=y -CONFIG_PGTABLE_LEVELS=2 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y -CONFIG_DMIID=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -CONFIG_HAVE_KERNEL_LZ4=y -CONFIG_KERNEL_GZIP=y -CONFIG_DEFAULT_HOSTNAME="usbarmory" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -CONFIG_CROSS_MEMORY_ATTACH=y -CONFIG_FHANDLE=y -CONFIG_USELIB=y -CONFIG_AUDIT=y -CONFIG_HAVE_ARCH_AUDITSYSCALL=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_GENERIC_IRQ_SHOW_LEVEL=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_CHIP=y -CONFIG_IRQ_DOMAIN=y -CONFIG_HANDLE_DOMAIN_IRQ=y -CONFIG_IRQ_FORCED_THREADING=y -CONFIG_SPARSE_IRQ=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_TICK_CPU_ACCOUNTING=y -CONFIG_PREEMPT_RCU=y -CONFIG_SRCU=y -CONFIG_RCU_STALL_COMMON=y -CONFIG_BUILD_BIN2C=y -CONFIG_IKCONFIG=m -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_PID_NS=y -CONFIG_NET_NS=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_BPF=y -CONFIG_EXPERT=y -CONFIG_UID16=y -CONFIG_MULTIUSER=y -CONFIG_SYSFS_SYSCALL=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_ADVISE_SYSCALLS=y -CONFIG_MEMBARRIER=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_COMPAT_BRK=y -CONFIG_SLUB=y -CONFIG_HAVE_OPROFILE=y -CONFIG_JUMP_LABEL=y -CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y -CONFIG_ARCH_USE_BUILTIN_BSWAP=y -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_OPTPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_CLK=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_PERF_REGS=y -CONFIG_HAVE_PERF_USER_STACK_DUMP=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_CC_STACKPROTECTOR=y -CONFIG_CC_STACKPROTECTOR_NONE=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_HAVE_MOD_ARCH_SPECIFIC=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_ARCH_HAS_ELF_RANDOMIZE=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y -CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -CONFIG_BLK_CMDLINE_PARSER=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y -CONFIG_EFI_STUB=y -CONFIG_CMDLINE_PARTITION=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=m -CONFIG_IOSCHED_CFQ=m -CONFIG_DEFAULT_NOOP=y -CONFIG_DEFAULT_IOSCHED="noop" -CONFIG_ASN1=m -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_FREEZER=y -CONFIG_MMU=y -CONFIG_ARCH_MULTIPLATFORM=y -CONFIG_ARCH_MULTI_V7=y -CONFIG_ARCH_MULTI_V6_V7=y -CONFIG_ARCH_MXC=y -CONFIG_MXC_TZIC=y -CONFIG_HAVE_IMX_SRC=y -CONFIG_SOC_IMX5=y -CONFIG_SOC_IMX53=y -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y -CONFIG_ARM_THUMB=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_KUSER_HELPERS=y -CONFIG_OUTER_CACHE=y -CONFIG_OUTER_CACHE_SYNC=y -CONFIG_MIGHT_HAVE_CACHE_L2X0=y -CONFIG_CACHE_L2X0=y -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -CONFIG_ARM_HEAVY_MB=y -CONFIG_MULTI_IRQ_HANDLER=y -CONFIG_HAVE_SMP=y -CONFIG_VMSPLIT_2G=y -CONFIG_PAGE_OFFSET=0x80000000 -CONFIG_ARCH_NR_GPIO=0 -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -CONFIG_HZ_FIXED=0 -CONFIG_HZ_100=y -CONFIG_HZ=100 -CONFIG_SCHED_HRTICK=y -CONFIG_AEABI=y -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_CPU_SW_DOMAIN_PAN=y -CONFIG_ARCH_WANT_GENERAL_HUGETLB=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -CONFIG_NO_BOOTMEM=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_KSM=y -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_NEED_PER_CPU_KM=y -CONFIG_CLEANCACHE=y -CONFIG_ZPOOL=m -CONFIG_ZBUD=m -CONFIG_ZSMALLOC=m -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -CONFIG_SECCOMP=y -CONFIG_SWIOTLB=y -CONFIG_IOMMU_HELPER=y -CONFIG_USE_OF=y -CONFIG_ATAGS=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="noinitrd console=ttymxc0,115200 root=/dev/mmcblk0p1 rw rootfstype=ext4 ip=off" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -CONFIG_AUTO_ZRELADDR=y -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m -CONFIG_CPUFREQ_DT=y -CONFIG_CPU_IDLE=y -CONFIG_CPU_IDLE_GOV_LADDER=y -CONFIG_CPU_IDLE_GOV_MENU=y -CONFIG_VFP=y -CONFIG_VFPv3=y -CONFIG_NEON=y -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_SCRIPT=y -CONFIG_COREDUMP=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_PM_SLEEP=y -CONFIG_PM=y -CONFIG_PM_OPP=y -CONFIG_PM_CLK=y -CONFIG_CPU_PM=y -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y -CONFIG_NET_INGRESS=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=m -CONFIG_XFRM_USER=m -CONFIG_XFRM_SUB_POLICY=y -CONFIG_XFRM_MIGRATE=y -CONFIG_XFRM_STATISTICS=y -CONFIG_XFRM_IPCOMP=m -CONFIG_NET_KEY=m -CONFIG_NET_KEY_MIGRATE=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE_DEMUX=m -CONFIG_NET_IP_TUNNEL=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_SYN_COOKIES=y -CONFIG_NET_IPVTI=m -CONFIG_NET_UDP_TUNNEL=m -CONFIG_NET_FOU=m -CONFIG_NET_FOU_IP_TUNNELS=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_XFRM_MODE_BEET=m -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -CONFIG_INET_UDP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y -CONFIG_TCP_CONG_BIC=m -CONFIG_TCP_CONG_CUBIC=y -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m -CONFIG_TCP_CONG_YEAH=m -CONFIG_TCP_CONG_ILLINOIS=m -CONFIG_DEFAULT_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -CONFIG_TCP_MD5SIG=y -CONFIG_IPV6=m -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_MIP6=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_INET6_XFRM_MODE_BEET=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_VTI=m -CONFIG_IPV6_SIT=m -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=m -CONFIG_IPV6_GRE=m -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -CONFIG_NETFILTER=y -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=m -CONFIG_NETFILTER_INGRESS=y -CONFIG_NETFILTER_NETLINK=m -CONFIG_NF_CONNTRACK=m -CONFIG_NF_LOG_COMMON=m -CONFIG_NF_CONNTRACK_MARK=y -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CT_PROTO_GRE=m -CONFIG_NF_CONNTRACK_FTP=m -CONFIG_NF_CONNTRACK_H323=m -CONFIG_NF_CONNTRACK_IRC=m -CONFIG_NF_CONNTRACK_BROADCAST=m -CONFIG_NF_CONNTRACK_NETBIOS_NS=m -CONFIG_NF_CONNTRACK_SNMP=m -CONFIG_NF_CONNTRACK_PPTP=m -CONFIG_NF_CONNTRACK_SANE=m -CONFIG_NF_CONNTRACK_SIP=m -CONFIG_NF_CONNTRACK_TFTP=m -CONFIG_NF_CT_NETLINK=m -CONFIG_NF_CT_NETLINK_TIMEOUT=m -CONFIG_NF_NAT=m -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_FTP=m -CONFIG_NF_NAT_IRC=m -CONFIG_NF_NAT_SIP=m -CONFIG_NF_NAT_TFTP=m -CONFIG_NF_NAT_REDIRECT=m -CONFIG_NETFILTER_SYNPROXY=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_HL=m -CONFIG_NETFILTER_XT_TARGET_LED=m -CONFIG_NETFILTER_XT_NAT=m -CONFIG_NETFILTER_XT_TARGET_NETMAP=m -CONFIG_NETFILTER_XT_TARGET_REDIRECT=m -CONFIG_NETFILTER_XT_TARGET_TEE=m -CONFIG_NETFILTER_XT_TARGET_TPROXY=m -CONFIG_NETFILTER_XT_TARGET_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_BPF=m -CONFIG_NETFILTER_XT_MATCH_CGROUP=m -CONFIG_NETFILTER_XT_MATCH_ECN=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HL=m -CONFIG_NETFILTER_XT_MATCH_IPRANGE=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_OWNER=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_TIME=m -CONFIG_NETFILTER_XT_MATCH_U32=m -CONFIG_NF_DEFRAG_IPV4=m -CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_NF_CONNTRACK_PROC_COMPAT=y -CONFIG_NF_DUP_IPV4=m -CONFIG_NF_LOG_ARP=m -CONFIG_NF_LOG_IPV4=m -CONFIG_NF_REJECT_IPV4=m -CONFIG_NF_NAT_IPV4=m -CONFIG_NF_NAT_MASQUERADE_IPV4=m -CONFIG_NF_NAT_SNMP_BASIC=m -CONFIG_NF_NAT_PROTO_GRE=m -CONFIG_NF_NAT_PPTP=m -CONFIG_NF_NAT_H323=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_RPFILTER=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_SYNPROXY=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_NF_DEFRAG_IPV6=m -CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_NF_DUP_IPV6=m -CONFIG_NF_REJECT_IPV6=m -CONFIG_NF_LOG_IPV6=m -CONFIG_NF_NAT_IPV6=m -CONFIG_NF_NAT_MASQUERADE_IPV6=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_MH=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_TARGET_SYNPROXY=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_RAW=m -CONFIG_IP6_NF_NAT=m -CONFIG_IP6_NF_TARGET_MASQUERADE=m -CONFIG_IP6_NF_TARGET_NPT=m -CONFIG_L2TP=m -CONFIG_STP=m -CONFIG_BRIDGE=m -CONFIG_BRIDGE_IGMP_SNOOPING=y -CONFIG_HAVE_NET_DSA=y -CONFIG_VLAN_8021Q=m -CONFIG_LLC=m -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_CLS=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_CGROUP=m -CONFIG_NET_CLS_BPF=m -CONFIG_NET_SCH_FIFO=y -CONFIG_CGROUP_NET_CLASSID=y -CONFIG_NET_RX_BUSY_POLL=y -CONFIG_BQL=y -CONFIG_BPF_JIT=y -CONFIG_FIB_RULES=y -CONFIG_WIRELESS=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_CFG80211=m -CONFIG_CFG80211_DEFAULT_PS=y -CONFIG_CFG80211_CRDA_SUPPORT=y -CONFIG_CFG80211_WEXT=y -CONFIG_MAC80211=m -CONFIG_MAC80211_HAS_RC=y -CONFIG_MAC80211_RC_MINSTREL=y -CONFIG_MAC80211_RC_MINSTREL_HT=y -CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y -CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" -CONFIG_MAC80211_STA_HASH_MAX_SIZE=0 -CONFIG_HAVE_BPF_JIT=y -CONFIG_UEVENT_HELPER=y -CONFIG_UEVENT_HELPER_PATH="" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_FW_LOADER=m -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -CONFIG_SOC_BUS=y -CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=m -CONFIG_REGMAP_MMIO=m -CONFIG_MTD=m -CONFIG_MTD_OF_PARTS=m -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -CONFIG_MTD_M25P80=m -CONFIG_MTD_BLOCK2MTD=m -CONFIG_MTD_SPI_NOR=m -CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y -CONFIG_DTC=y -CONFIG_OF=y -CONFIG_OF_FLATTREE=y -CONFIG_OF_EARLY_FLATTREE=y -CONFIG_OF_ADDRESS=y -CONFIG_OF_IRQ=y -CONFIG_OF_NET=y -CONFIG_OF_MTD=y -CONFIG_OF_RESERVED_MEM=y -CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y -CONFIG_BLK_DEV=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -CONFIG_SRAM=y -CONFIG_EEPROM_93CX6=m -CONFIG_SCSI_MOD=m -CONFIG_SCSI=m -CONFIG_SCSI_DMA=y -CONFIG_SCSI_PROC_FS=y -CONFIG_BLK_DEV_SD=m -CONFIG_SCSI_LOWLEVEL=y -CONFIG_MD=y -CONFIG_BLK_DEV_DM_BUILTIN=y -CONFIG_BLK_DEV_DM=y -CONFIG_DM_BUFIO=y -CONFIG_DM_CRYPT=y -CONFIG_DM_VERITY=y -CONFIG_NETDEVICES=y -CONFIG_NET_CORE=y -CONFIG_DUMMY=m -CONFIG_VXLAN=m -CONFIG_TUN=m -CONFIG_VETH=m -CONFIG_PPP=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOL2TP=m -CONFIG_SLHC=m -CONFIG_USB_NET_DRIVERS=m -CONFIG_WLAN=y -CONFIG_RTL8187=m -CONFIG_RT2X00=m -CONFIG_RT2500USB=m -CONFIG_RT73USB=m -CONFIG_RT2800USB=m -CONFIG_RT2800USB_RT33XX=y -CONFIG_RT2800USB_RT35XX=y -CONFIG_RT2800USB_RT3573=y -CONFIG_RT2800USB_RT53XX=y -CONFIG_RT2800USB_RT55XX=y -CONFIG_RT2800USB_UNKNOWN=y -CONFIG_RT2800_LIB=m -CONFIG_RT2X00_LIB_USB=m -CONFIG_RT2X00_LIB=m -CONFIG_RT2X00_LIB_FIRMWARE=y -CONFIG_RT2X00_LIB_CRYPTO=y -CONFIG_RT2X00_LIB_LEDS=y -CONFIG_RT2X00_DEBUG=y -CONFIG_RTL_CARDS=m -CONFIG_RTL8192CU=m -CONFIG_RTLWIFI=m -CONFIG_RTLWIFI_USB=m -CONFIG_RTLWIFI_DEBUG=y -CONFIG_RTL8192C_COMMON=m -CONFIG_RTL8XXXU=m -CONFIG_INPUT=y -CONFIG_INPUT_LEDS=m -CONFIG_INPUT_MOUSEDEV=m -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_EVDEV=m -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=m -CONFIG_MOUSE_PS2_FOCALTECH=y -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_SYNAPTICS_USB=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_PROPERTIES=y -CONFIG_TOUCHSCREEN_USB_COMPOSITE=m -CONFIG_TOUCHSCREEN_USB_E2I=y -CONFIG_SERIO=y -CONFIG_SERIO_SERPORT=y -CONFIG_SERIO_LIBPS2=y -CONFIG_TTY=y -CONFIG_VT=y -CONFIG_CONSOLE_TRANSLATIONS=y -CONFIG_VT_CONSOLE=y -CONFIG_VT_CONSOLE_SLEEP=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_DEVMEM=y -CONFIG_DEVKMEM=y -CONFIG_SERIAL_EARLYCON=y -CONFIG_SERIAL_IMX=y -CONFIG_SERIAL_IMX_CONSOLE=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_HW_RANDOM=m -CONFIG_I2C=m -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_CHARDEV=m -CONFIG_I2C_HELPER_AUTO=y -CONFIG_I2C_IMX=m -CONFIG_SPI=y -CONFIG_SPI_DEBUG=y -CONFIG_SPI_MASTER=y -CONFIG_SPI_BITBANG=m -CONFIG_SPI_IMX=m -CONFIG_SPI_SPIDEV=m -CONFIG_PPS=y -CONFIG_PINCTRL=y -CONFIG_PINMUX=y -CONFIG_PINCONF=y -CONFIG_PINCTRL_IMX=y -CONFIG_PINCTRL_IMX53=y -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_OF_GPIO=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_GENERIC=y -CONFIG_GPIO_GENERIC_PLATFORM=y -CONFIG_GPIO_MXC=y -CONFIG_POWER_SUPPLY=y -CONFIG_POWER_AVS=y -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_CORE=y -CONFIG_SOFT_WATCHDOG=m -CONFIG_GPIO_WATCHDOG=m -CONFIG_IMX2_WDT=m -CONFIG_SSB_POSSIBLE=y -CONFIG_BCMA_POSSIBLE=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_LTC3589=m -CONFIG_DUMMY_CONSOLE=y -CONFIG_HID=y -CONFIG_HID_GENERIC=m -CONFIG_USB_HID=m -CONFIG_USB_HIDDEV=y -CONFIG_USB_KBD=m -CONFIG_USB_MOUSE=m -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=m -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=m -CONFIG_USB_DEFAULT_PERSIST=y -CONFIG_USB_OTG=y -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_STORAGE=m -CONFIG_USB_CHIPIDEA=m -CONFIG_USB_CHIPIDEA_OF=m -CONFIG_USB_CHIPIDEA_UDC=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_CHIPIDEA_DEBUG=y -CONFIG_USB_PHY=y -CONFIG_NOP_USB_XCEIV=y -CONFIG_USB_GADGET=m -CONFIG_USB_GADGET_DEBUG_FS=y -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 -CONFIG_USB_LIBCOMPOSITE=m -CONFIG_USB_F_ACM=m -CONFIG_USB_F_SS_LB=m -CONFIG_USB_U_SERIAL=m -CONFIG_USB_U_ETHER=m -CONFIG_USB_F_SERIAL=m -CONFIG_USB_F_OBEX=m -CONFIG_USB_F_NCM=m -CONFIG_USB_F_ECM=m -CONFIG_USB_F_EEM=m -CONFIG_USB_F_SUBSET=m -CONFIG_USB_F_RNDIS=m -CONFIG_USB_F_MASS_STORAGE=m -CONFIG_USB_F_FS=m -CONFIG_USB_F_HID=m -CONFIG_USB_F_PRINTER=m -CONFIG_USB_CONFIGFS=m -CONFIG_USB_CONFIGFS_SERIAL=y -CONFIG_USB_CONFIGFS_ACM=y -CONFIG_USB_CONFIGFS_OBEX=y -CONFIG_USB_CONFIGFS_NCM=y -CONFIG_USB_CONFIGFS_ECM=y -CONFIG_USB_CONFIGFS_ECM_SUBSET=y -CONFIG_USB_CONFIGFS_RNDIS=y -CONFIG_USB_CONFIGFS_EEM=y -CONFIG_USB_CONFIGFS_MASS_STORAGE=y -CONFIG_USB_CONFIGFS_F_LB_SS=y -CONFIG_USB_CONFIGFS_F_FS=y -CONFIG_USB_CONFIGFS_F_HID=y -CONFIG_USB_CONFIGFS_F_PRINTER=y -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_ETH_RNDIS=y -CONFIG_USB_ETH_EEM=y -CONFIG_USB_G_NCM=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_FUNCTIONFS=m -CONFIG_USB_FUNCTIONFS_ETH=y -CONFIG_USB_FUNCTIONFS_RNDIS=y -CONFIG_USB_FUNCTIONFS_GENERIC=y -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_USB_G_PRINTER=m -CONFIG_USB_CDC_COMPOSITE=m -CONFIG_USB_G_ACM_MS=m -CONFIG_USB_G_MULTI=m -CONFIG_USB_G_MULTI_RNDIS=y -CONFIG_USB_G_MULTI_CDC=y -CONFIG_USB_G_HID=m -CONFIG_MMC=y -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=8 -CONFIG_MMC_BLOCK_BOUNCE=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_IO_ACCESSORS=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_ESDHC_IMX=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=m -CONFIG_LEDS_GPIO=m -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_ONESHOT=m -CONFIG_LEDS_TRIGGER_HEARTBEAT=m -CONFIG_LEDS_TRIGGER_BACKLIGHT=m -CONFIG_LEDS_TRIGGER_CPU=y -CONFIG_LEDS_TRIGGER_GPIO=m -CONFIG_LEDS_TRIGGER_DEFAULT_ON=m -CONFIG_LEDS_TRIGGER_TRANSIENT=m -CONFIG_EDAC_ATOMIC_SCRUB=y -CONFIG_EDAC_SUPPORT=y -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_SYSTOHC_DEVICE="rtc0" -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -CONFIG_RTC_INTF_DEV_UIE_EMUL=y -CONFIG_RTC_DRV_IMXDI=y -CONFIG_RTC_DRV_MXC=y -CONFIG_DMADEVICES=y -CONFIG_DMA_ENGINE=y -CONFIG_DMA_OF=y -CONFIG_IMX_SDMA=m -CONFIG_CLKDEV_LOOKUP=y -CONFIG_HAVE_CLK_PREPARE=y -CONFIG_COMMON_CLK=y -CONFIG_CLKSRC_OF=y -CONFIG_CLKSRC_PROBE=y -CONFIG_CLKSRC_MMIO=y -CONFIG_CLKSRC_IMX_GPT=y -CONFIG_IOMMU_SUPPORT=y -CONFIG_EXTCON=m -CONFIG_IRQCHIP=y -CONFIG_ARCH_HAS_RESET_CONTROLLER=y -CONFIG_DCACHE_WORD_ACCESS=y -CONFIG_EXT4_FS=y -CONFIG_EXT4_USE_FOR_EXT2=y -CONFIG_JBD2=y -CONFIG_FS_MBCACHE=y -CONFIG_EXPORTFS=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_AUTOFS4_FS=y -CONFIG_FUSE_FS=m -CONFIG_OVERLAY_FS=y -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -CONFIG_NTFS_FS=m -CONFIG_NTFS_RW=y -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_KERNFS=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -CONFIG_ECRYPT_FS=m -CONFIG_ECRYPT_FS_MESSAGING=y -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -CONFIG_SQUASHFS=y -CONFIG_SQUASHFS_FILE_DIRECT=y -CONFIG_SQUASHFS_DECOMP_SINGLE=y -CONFIG_SQUASHFS_ZLIB=y -CONFIG_SQUASHFS_LZ4=y -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -CONFIG_NETWORK_FILESYSTEMS=y -CONFIG_NFS_FS=m -CONFIG_NFS_V2=m -CONFIG_NFS_V3=m -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_GRACE_PERIOD=m -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_CIFS=m -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_UTF8=y -CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1024 -CONFIG_DEBUG_FS=y -CONFIG_SECTION_MISMATCH_WARN_ONLY=y -CONFIG_DEBUG_KERNEL=y -CONFIG_HAVE_DEBUG_KMEMLEAK=y -CONFIG_LOCKUP_DETECTOR=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1 -CONFIG_DETECT_HUNG_TASK=y -CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=0 -CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y -CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1 -CONFIG_PANIC_ON_OOPS_VALUE=0 -CONFIG_PANIC_TIMEOUT=5 -CONFIG_SCHED_DEBUG=y -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_RCU_CPU_STALL_TIMEOUT=21 -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACING_SUPPORT=y -CONFIG_LKDTM=m -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_STRICT_DEVMEM=y -CONFIG_ARM_UNWIND=y -CONFIG_DEBUG_IMX_UART_PORT=1 -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" -CONFIG_KEYS=y -CONFIG_ENCRYPTED_KEYS=m -CONFIG_SECURITY=y -CONFIG_SECURITYFS=y -CONFIG_INTEGRITY=y -CONFIG_DEFAULT_SECURITY_DAC=y -CONFIG_DEFAULT_SECURITY="" -CONFIG_CRYPTO=y -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=m -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG=m -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_RNG_DEFAULT=m -CONFIG_CRYPTO_PCOMP=m -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_AKCIPHER2=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -CONFIG_CRYPTO_USER=m -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -CONFIG_CRYPTO_GF128MUL=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_NULL2=y -CONFIG_CRYPTO_WORKQUEUE=y -CONFIG_CRYPTO_AUTHENC=m -CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_CCM=m -CONFIG_CRYPTO_GCM=m -CONFIG_CRYPTO_SEQIV=m -CONFIG_CRYPTO_ECHAINIV=m -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_CTR=m -CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_XTS=y -CONFIG_CRYPTO_CMAC=m -CONFIG_CRYPTO_HMAC=m -CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_GHASH=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_AES=y -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_ZLIB=m -CONFIG_CRYPTO_LZO=m -CONFIG_CRYPTO_ANSI_CPRNG=m -CONFIG_CRYPTO_DRBG_MENU=m -CONFIG_CRYPTO_DRBG_HMAC=y -CONFIG_CRYPTO_DRBG_HASH=y -CONFIG_CRYPTO_DRBG_CTR=y -CONFIG_CRYPTO_DRBG=m -CONFIG_CRYPTO_JITTERENTROPY=m -CONFIG_CRYPTO_USER_API=m -CONFIG_CRYPTO_USER_API_HASH=m -CONFIG_CRYPTO_USER_API_SKCIPHER=m -CONFIG_CRYPTO_USER_API_RNG=m -CONFIG_CRYPTO_HASH_INFO=y -CONFIG_CRYPTO_HW=y -CONFIG_CRYPTO_DEV_SAHARA=y -CONFIG_ASYMMETRIC_KEY_TYPE=m -CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m -CONFIG_PUBLIC_KEY_ALGO_RSA=m -CONFIG_X509_CERTIFICATE_PARSER=m -CONFIG_PKCS7_MESSAGE_PARSER=m -CONFIG_BITREVERSE=y -CONFIG_HAVE_ARCH_BITREVERSE=y -CONFIG_RATIONAL=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_NET_UTILS=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y -CONFIG_CRC_CCITT=m -CONFIG_CRC16=y -CONFIG_CRC_ITU_T=m -CONFIG_CRC32=y -CONFIG_CRC32_SLICEBY8=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -CONFIG_LZ4_DECOMPRESS=y -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_ASSOCIATIVE_ARRAY=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT_MAP=y -CONFIG_HAS_DMA=y -CONFIG_DQL=y -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -CONFIG_CLZ_TAB=y -CONFIG_MPILIB=m -CONFIG_LIBFDT=y -CONFIG_OID_REGISTRY=m -CONFIG_ARCH_HAS_SG_CHAIN=y diff --git a/inversepath/usbarmory/kernel.nix b/inversepath/usbarmory/kernel.nix deleted file mode 100644 index 4cf6fd7f..00000000 --- a/inversepath/usbarmory/kernel.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ stdenv, buildLinux, fetchurl }: - -buildLinux { - inherit stdenv; - version = "4.4.0"; - - src = fetchurl { - url = "mirror://kernel/linux/kernel/v4.x/linux-4.4.tar.xz"; - sha256 = "401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2"; - }; - - configfile = ./kernel.config; - - kernelPatches = [{ - patch = ./usbarmory-dts.patch; - name = "usbarmory-dts"; - }]; - - allowImportFromDerivation = true; -} diff --git a/inversepath/usbarmory/usbarmory-dts.patch b/inversepath/usbarmory/usbarmory-dts.patch deleted file mode 100644 index e29c6dd3..00000000 --- a/inversepath/usbarmory/usbarmory-dts.patch +++ /dev/null @@ -1,418 +0,0 @@ -diff -Nru linux-4.4-orig/arch/arm/boot/dts/imx53-usbarmory-common.dtsi linux-4.4/arch/arm/boot/dts/imx53-usbarmory-common.dtsi ---- linux-4.4-orig/arch/arm/boot/dts/imx53-usbarmory-common.dtsi 1969-12-31 18:00:00.000000000 -0600 -+++ linux-4.4/arch/arm/boot/dts/imx53-usbarmory-common.dtsi 2016-02-04 08:31:38.730794858 -0600 -@@ -0,0 +1,241 @@ -+/* -+ * USB armory MkI device tree include file -+ * https://inversepath.com/usbarmory -+ * -+ * Copyright (C) 2015, Inverse Path -+ * Andrej Rosano -+ * -+ * Licensed under GPLv2 -+ */ -+ -+#include "imx53.dtsi" -+ -+/ { -+ model = "Inverse Path USB armory"; -+ compatible = "inversepath,imx53-usbarmory", "fsl,imx53"; -+}; -+ -+/ { -+ chosen { -+ stdout-path = &uart1; -+ }; -+ -+ memory { -+ reg = <0x70000000 0x20000000>; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&led_pin_gpio4_27>; -+ -+ user { -+ label = "LED"; -+ gpios = <&gpio4 27 0>; -+ linux,default-trigger = "heartbeat"; -+ }; -+ }; -+ -+ soc { -+ aips@60000000 { -+ sahara: crypto@63ff8000 { -+ compatible = "fsl,imx53-sahara"; -+ reg = <0x63ff8000 0x4000>; -+ interrupts = <19 20>; -+ clocks = <&clks IMX5_CLK_SAHARA_IPG_GATE>, -+ <&clks IMX5_CLK_SAHARA_IPG_GATE>; -+ clock-names = "ipg", "ahb"; -+ }; -+ }; -+ }; -+}; -+ -+&cpu0 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a8"; -+ reg = <0x0>; -+ clocks = <&clks IMX5_CLK_ARM>; -+ clock-latency = <61036>; -+ voltage-tolerance = <5>; -+ operating-points = < -+ /* kHz */ -+ 166666 850000 -+ 400000 900000 -+ 800000 1050000 -+ >; -+}; -+ -+&esdhc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_esdhc1>; -+ status = "okay"; -+}; -+ -+&iomuxc { -+ pinctrl-names = "default"; -+ -+ imx53-usbarmory { -+ led_pin_gpio4_27: led_gpio4_27@0 { -+ fsl,pins = < -+ MX53_PAD_DISP0_DAT6__GPIO4_27 0x80000000 -+ >; -+ }; -+ -+ pinctrl_esdhc1: esdhc1grp { -+ fsl,pins = < -+ MX53_PAD_SD1_DATA0__ESDHC1_DAT0 0x1d5 -+ MX53_PAD_SD1_DATA1__ESDHC1_DAT1 0x1d5 -+ MX53_PAD_SD1_DATA2__ESDHC1_DAT2 0x1d5 -+ MX53_PAD_SD1_DATA3__ESDHC1_DAT3 0x1d5 -+ MX53_PAD_SD1_CMD__ESDHC1_CMD 0x1d5 -+ MX53_PAD_SD1_CLK__ESDHC1_CLK 0x1d5 -+ >; -+ }; -+ -+ pinctrl_i2c1_pmic: i2c1grp_pmic { -+ fsl,pins = < -+ MX53_PAD_EIM_D21__I2C1_SCL 0xc0000000 -+ MX53_PAD_EIM_D28__I2C1_SDA 0xc0000000 -+ >; -+ }; -+ -+ /* -+ UART mode pin header configration: -+ pin number: 1 2 3 4 5 6 7 -+ function: GND 5V ? ? TX RX ? -+ */ -+ pinctrl_uart1: uart1grp { -+ fsl,pins = < -+ MX53_PAD_CSI0_DAT10__UART1_TXD_MUX 0x1e4 -+ MX53_PAD_CSI0_DAT11__UART1_RXD_MUX 0x1e4 -+ >; -+ }; -+ -+ /* -+ GPIO mode pin header configuration: -+ 1 2 3 4 5 6 7 -+ GND 5V GPIO5[26] GPIO5[27] GPIO5[28] GPIO5[29] GPIO5[30] -+ */ -+ pinctrl_gpio5: gpio5grp { -+ fsl,pins = < -+ MX53_PAD_CSI0_DAT8__GPIO5_26 0xc0 -+ MX53_PAD_CSI0_DAT9__GPIO5_27 0xc0 -+ MX53_PAD_CSI0_DAT10__GPIO5_28 0xc0 -+ MX53_PAD_CSI0_DAT11__GPIO5_29 0xc0 -+ MX53_PAD_CSI0_DAT12__GPIO5_30 0xc0 -+ >; -+ }; -+ -+ /* -+ SPI mode pin header configuration: -+ 1 2 3 4 5 6 7 -+ GND 5V SCLK MOSI MISO /SS0 /SS1 -+ */ -+ pinctrl_ecspi2: ecspi2grp { -+ fsl,pins = < -+ MX53_PAD_CSI0_DAT8__ECSPI2_SCLK 0x80000000 -+ MX53_PAD_CSI0_DAT9__ECSPI2_MOSI 0x80000000 -+ MX53_PAD_CSI0_DAT10__ECSPI2_MISO 0x80000000 -+ MX53_PAD_CSI0_DAT11__GPIO5_29 0x80000000 -+ MX53_PAD_CSI0_DAT12__GPIO5_30 0x80000000 -+ >; -+ }; -+ -+ /* -+ I2C mode pin header configuration: -+ 1 2 3 4 5 6 7 -+ GND 5V SDA SCL GPIO5[28] GPIO5[29] GPIO5[30] -+ */ -+ pinctrl_i2c1_pinheader: i2c1grp_pinheader { -+ fsl,pins = < -+ MX53_PAD_CSI0_DAT8__I2C1_SDA 0xc0000000 -+ MX53_PAD_CSI0_DAT9__I2C1_SCL 0xc0000000 -+ MX53_PAD_CSI0_DAT10__GPIO5_28 0x80000000 -+ MX53_PAD_CSI0_DAT11__GPIO5_29 0x80000000 -+ MX53_PAD_CSI0_DAT12__GPIO5_30 0x80000000 -+ >; -+ }; -+ }; -+}; -+ -+&uart1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_uart1>; -+ status = "okay"; -+}; -+ -+&vpu { -+ status = "okay"; -+}; -+ -+&i2c1 { -+ pinctrl-0 = <&pinctrl_i2c1_pmic>; -+ status = "okay"; -+ ltc3589: pmic@34 { -+ compatible = "lltc,ltc3589-2"; -+ reg = <0x34>; -+ regulators { -+ sw1_reg: sw1 { -+ regulator-min-microvolt = <591930>; -+ regulator-max-microvolt = <1224671>; -+ lltc,fb-voltage-divider = <100000 158000>; -+ regulator-ramp-delay = <7000>; -+ regulator-boot-on; -+ regulator-always-on; -+ }; -+ -+ sw2_reg: sw2 { -+ regulator-min-microvolt = <704123>; -+ regulator-max-microvolt = <1456803>; -+ lltc,fb-voltage-divider = <180000 191000>; -+ regulator-ramp-delay = <7000>; -+ regulator-boot-on; -+ regulator-always-on; -+ }; -+ -+ sw3_reg: sw3 { -+ regulator-min-microvolt = <1341250>; -+ regulator-max-microvolt = <2775000>; -+ lltc,fb-voltage-divider = <270000 100000>; -+ regulator-ramp-delay = <7000>; -+ regulator-boot-on; -+ regulator-always-on; -+ }; -+ -+ bb_out_reg: bb-out { -+ regulator-min-microvolt = <3387341>; -+ regulator-max-microvolt = <3387341>; -+ lltc,fb-voltage-divider = <511000 158000>; -+ regulator-boot-on; -+ regulator-always-on; -+ }; -+ ldo1_reg: ldo1 { -+ regulator-min-microvolt = <1306329>; -+ regulator-max-microvolt = <1306329>; -+ lltc,fb-voltage-divider = <100000 158000>; -+ regulator-boot-on; -+ regulator-always-on; -+ }; -+ -+ ldo2_reg: ldo2 { -+ regulator-min-microvolt = <704123>; -+ regulator-max-microvolt = <1456806>; -+ lltc,fb-voltage-divider = <180000 191000>; -+ regulator-ramp-delay = <7000>; -+ regulator-boot-on; -+ regulator-always-on; -+ }; -+ -+ ldo3_reg: ldo3 { -+ regulator-min-microvolt = <2800000>; -+ regulator-max-microvolt = <2800000>; -+ regulator-boot-on; -+ }; -+ -+ ldo4_reg: ldo4 { -+ regulator-min-microvolt = <1200000>; -+ regulator-max-microvolt = <3200000>; -+ }; -+ }; -+ }; -+}; -diff -Nru linux-4.4-orig/arch/arm/boot/dts/imx53-usbarmory.dts linux-4.4/arch/arm/boot/dts/imx53-usbarmory.dts ---- linux-4.4-orig/arch/arm/boot/dts/imx53-usbarmory.dts 1969-12-31 18:00:00.000000000 -0600 -+++ linux-4.4/arch/arm/boot/dts/imx53-usbarmory.dts 2016-02-04 08:31:38.730794858 -0600 -@@ -0,0 +1,18 @@ -+/* -+ * USB armory MkI device mode device tree file -+ * https://inversepath.com/usbarmory -+ * -+ * Copyright (C) 2015, Inverse Path -+ * Andrej Rosano -+ * -+ * Licensed under GPLv2 -+ */ -+ -+/dts-v1/; -+ -+#include "imx53-usbarmory-common.dtsi" -+ -+&usbotg { -+ dr_mode = "peripheral"; -+ status = "okay"; -+}; -diff -Nru linux-4.4-orig/arch/arm/boot/dts/imx53-usbarmory-gpio.dts linux-4.4/arch/arm/boot/dts/imx53-usbarmory-gpio.dts ---- linux-4.4-orig/arch/arm/boot/dts/imx53-usbarmory-gpio.dts 1969-12-31 18:00:00.000000000 -0600 -+++ linux-4.4/arch/arm/boot/dts/imx53-usbarmory-gpio.dts 2016-02-04 08:31:38.730794858 -0600 -@@ -0,0 +1,26 @@ -+/* -+ * USB armory MkI device mode device tree file -+ * https://inversepath.com/usbarmory -+ * -+ * Copyright (C) 2015, Inverse Path -+ * Andrej Rosano -+ * -+ * Licensed under GPLv2 -+ */ -+ -+/dts-v1/; -+ -+#include "imx53-usbarmory-common.dtsi" -+ -+&usbotg { -+ dr_mode = "peripheral"; -+ status = "okay"; -+}; -+ -+&iomuxc { -+ pinctrl-0 = <&pinctrl_gpio5>; -+}; -+ -+&uart1 { -+ status = "disabled"; -+}; -diff -Nru linux-4.4-orig/arch/arm/boot/dts/imx53-usbarmory-host.dts linux-4.4/arch/arm/boot/dts/imx53-usbarmory-host.dts ---- linux-4.4-orig/arch/arm/boot/dts/imx53-usbarmory-host.dts 1969-12-31 18:00:00.000000000 -0600 -+++ linux-4.4/arch/arm/boot/dts/imx53-usbarmory-host.dts 2016-02-04 08:31:38.730794858 -0600 -@@ -0,0 +1,18 @@ -+/* -+ * USB armory MkI host mode device tree file -+ * https://inversepath.com/usbarmory -+ * -+ * Copyright (C) 2015, Inverse Path -+ * Andrej Rosano -+ * -+ * Licensed under GPLv2 -+ */ -+ -+/dts-v1/; -+ -+#include "imx53-usbarmory-common.dtsi" -+ -+&usbotg { -+ dr_mode = "host"; -+ status = "okay"; -+}; -diff -Nru linux-4.4-orig/arch/arm/boot/dts/imx53-usbarmory-i2c.dts linux-4.4/arch/arm/boot/dts/imx53-usbarmory-i2c.dts ---- linux-4.4-orig/arch/arm/boot/dts/imx53-usbarmory-i2c.dts 1969-12-31 18:00:00.000000000 -0600 -+++ linux-4.4/arch/arm/boot/dts/imx53-usbarmory-i2c.dts 2016-02-04 08:31:38.730794858 -0600 -@@ -0,0 +1,32 @@ -+/* -+ * USB armory MkI device mode device tree file -+ * https://inversepath.com/usbarmory -+ * -+ * Copyright (C) 2015, Inverse Path -+ * Andrej Rosano -+ * -+ * Licensed under GPLv2 -+ */ -+ -+/dts-v1/; -+ -+#include "imx53-usbarmory-common.dtsi" -+ -+&usbotg { -+ dr_mode = "peripheral"; -+ status = "okay"; -+}; -+ -+&uart1 { -+ status = "disabled"; -+}; -+ -+&iomuxc { -+ pinctrl-0 = <&pinctrl_i2c1_pinheader>; -+}; -+ -+&i2c1 { -+ ltc3589: pmic@34 { -+ status = "disabled"; -+ }; -+}; -diff -Nru linux-4.4-orig/arch/arm/boot/dts/imx53-usbarmory-spi.dts linux-4.4/arch/arm/boot/dts/imx53-usbarmory-spi.dts ---- linux-4.4-orig/arch/arm/boot/dts/imx53-usbarmory-spi.dts 1969-12-31 18:00:00.000000000 -0600 -+++ linux-4.4/arch/arm/boot/dts/imx53-usbarmory-spi.dts 2016-02-04 08:31:38.730794858 -0600 -@@ -0,0 +1,45 @@ -+/* -+ * USB armory MkI device mode device tree file -+ * https://inversepath.com/usbarmory -+ * -+ * Copyright (C) 2015, Inverse Path -+ * Andrej Rosano -+ * -+ * Licensed under GPLv2 -+ */ -+ -+/dts-v1/; -+ -+#include "imx53-usbarmory-common.dtsi" -+ -+&usbotg { -+ dr_mode = "peripheral"; -+ status = "okay"; -+}; -+ -+&uart1 { -+ status = "disabled"; -+}; -+ -+&iomuxc { -+ pinctrl-0 = <&pinctrl_ecspi2>; -+}; -+ -+&ecspi2 { -+ fsl,spi-num-chipselects = <2>; -+ cs-gpios = <&gpio5 29 0>, <&gpio5 30 0>; -+ status = "okay"; -+ -+ flash: m25p40@0 { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ compatible = "st,m25p40", "st,m25p"; -+ spi-max-frequency = <20000000>; -+ reg = <0>; -+ -+ partition@0 { -+ label = "test-partition"; -+ reg = <0x0 0x80000>; -+ }; -+ }; -+}; -diff -Nru linux-4.4-orig/arch/arm/boot/dts/Makefile linux-4.4/arch/arm/boot/dts/Makefile ---- linux-4.4-orig/arch/arm/boot/dts/Makefile 2016-02-04 13:29:20.880919101 -0600 -+++ linux-4.4/arch/arm/boot/dts/Makefile 2016-02-04 13:27:10.733849955 -0600 -@@ -278,6 +278,10 @@ - imx53-smd.dtb \ - imx53-tx53-x03x.dtb \ - imx53-tx53-x13x.dtb \ -+ imx53-usbarmory.dtb \ -+ imx53-usbarmory-host.dtb \ -+ imx53-usbarmory-i2c.dtb \ -+ imx53-usbarmory-gpio.dtb \ - imx53-voipac-bsb.dtb - dtb-$(CONFIG_SOC_IMX6Q) += \ - imx6dl-apf6dev.dtb \ From 5041a3f8008b4c16bb0564b7862ce2b0c2912016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 28 Dec 2021 10:29:31 +0100 Subject: [PATCH 0093/1476] drop no-longer reachable torrent --- raspberry-pi/2/README.org | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/raspberry-pi/2/README.org b/raspberry-pi/2/README.org index 842919b1..56384537 100644 --- a/raspberry-pi/2/README.org +++ b/raspberry-pi/2/README.org @@ -8,16 +8,3 @@ There are still some drawbacks: NixOS does not provide a /boot/config.txt (the FAT32 partition). Making NixOS work in the Raspberry PI 2 is mainly the result of the recent work of ambro718, Dezgeg and viric (#nixos@irc.freenode.net). - -** Download - -If you want to test, you can flash this 4GB SD image (DOS partition table + -fat32 + ext4 rootfs): - -magnet:?xt=urn:btih:0def3f6acb3bceddb22cb24098f58e40e2853ec2&dn=rpi2-nixos-4b09501f2-img.xz&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80 - -Then you should be able to nixos-rebuild any configuration.nix changes. - -The image is the result of a "nixos-install" alone. No root password has been -set, and it does not include a nixpkgs checkout or channel. In fact I (viric) -created the FS into a NBD, not a real SD, to create this image. From 04666907d44215577d566daf0b2f89686f967236 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 7 Jan 2022 17:52:30 +0100 Subject: [PATCH 0094/1476] add Supermicro M11SDV-8C-LN4F. --- README.md | 5 +-- flake.nix | 1 + supermicro/m11sdv-8c-ln4f/README.md | 47 +++++++++++++++++++++++++++ supermicro/m11sdv-8c-ln4f/default.nix | 8 +++++ 4 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 supermicro/m11sdv-8c-ln4f/README.md create mode 100644 supermicro/m11sdv-8c-ln4f/default.nix diff --git a/README.md b/README.md index f974d92d..e29a5789 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ See code for all available configurations. | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | -| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | +| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Dell G3 3779](dell/g3/3779) | `` | @@ -102,7 +102,7 @@ See code for all available configurations. | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [Google Pixelbook](google/pixelbook) | `` | | [GPD MicroPC](gpd/micropc) | `` | -| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | +| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | @@ -159,6 +159,7 @@ See code for all available configurations. | [Purism Librem 13v3](purism/librem/13v3) | `` | | [Purism Librem 15v3](purism/librem/13v3) | `` | | [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | +| [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | | [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | | [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | | [System76 (generic)](system76) | `` | diff --git a/flake.nix b/flake.nix index f1eaf502..419a27cc 100644 --- a/flake.nix +++ b/flake.nix @@ -97,6 +97,7 @@ purism-librem-13v3 = import ./purism/librem/13v3; purism-librem-15v3 = import ./purism/librem/15v3; supermicro-a1sri-2758f = import ./supermicro/a1sri-2758f; + supermicro-m11sdv-8c-ln4f = import ./supermicro/m11sdv-8c-ln4f; supermicro-x10sll-f = import ./supermicro/x10sll-f; supermicro-x12scz-tln4f = import ./supermicro/x12scz-tln4f; thoshiba-swanky = import ./toshiba/swanky; diff --git a/supermicro/m11sdv-8c-ln4f/README.md b/supermicro/m11sdv-8c-ln4f/README.md new file mode 100644 index 00000000..720b5ad5 --- /dev/null +++ b/supermicro/m11sdv-8c-ln4f/README.md @@ -0,0 +1,47 @@ += Supermicro M11SDV-8C-LN4F = + +== Tested Hardware == + +``` shellsession +$ lspci -nn +00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Root Complex [1022:1450] +00:00.2 IOMMU [0806]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) I/O Memory Management Unit [1022:1451] +00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452] +00:01.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge [1022:1453] +00:01.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge [1022:1453] +00:01.5 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge [1022:1453] +00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452] +00:03.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452] +00:03.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge [1022:1453] +00:04.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452] +00:07.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452] +00:07.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B [1022:1454] +00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452] +00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B [1022:1454] +00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 59) +00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51) +00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 0 [1022:1460] +00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 1 [1022:1461] +00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 2 [1022:1462] +00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 3 [1022:1463] +00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 4 [1022:1464] +00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5 [1022:1465] +00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 6 [1022:1466] +00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7 [1022:1467] +01:00.0 Non-Volatile memory controller [0108]: Toshiba Corporation XG6 NVMe SSD Controller [1179:011a] +02:00.0 PCI bridge [0604]: ASPEED Technology, Inc. AST1150 PCI-to-PCI Bridge [1a03:1150] (rev 04) +03:00.0 VGA compatible controller [0300]: ASPEED Technology, Inc. ASPEED Graphics Family [1a03:2000] (rev 41) +04:00.0 Ethernet controller [0200]: Intel Corporation I350 Gigabit Network Connection [8086:1521] (rev 01) +04:00.1 Ethernet controller [0200]: Intel Corporation I350 Gigabit Network Connection [8086:1521] (rev 01) +04:00.2 Ethernet controller [0200]: Intel Corporation I350 Gigabit Network Connection [8086:1521] (rev 01) +04:00.3 Ethernet controller [0200]: Intel Corporation I350 Gigabit Network Connection [8086:1521] (rev 01) +05:00.0 Serial Attached SCSI controller [0107]: Broadcom / LSI SAS3008 PCI-Express Fusion-MPT SAS-3 [1000:0097] (rev 02) +06:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Zeppelin/Raven/Raven2 PCIe Dummy Function [1022:145a] +06:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Platform Security Processor [1022:1456] +06:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Zeppelin USB 3.0 Host controller [1022:145f] +07:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Zeppelin/Renoir PCIe Dummy Function [1022:1455] +07:00.1 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Zeppelin Cryptographic Coprocessor NTBCCP [1022:1468] +07:00.2 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 51) +07:00.3 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) HD Audio Controller [1022:1457] + +``` diff --git a/supermicro/m11sdv-8c-ln4f/default.nix b/supermicro/m11sdv-8c-ln4f/default.nix new file mode 100644 index 00000000..a7ee071e --- /dev/null +++ b/supermicro/m11sdv-8c-ln4f/default.nix @@ -0,0 +1,8 @@ +# https://www.supermicro.com/en/products/motherboard/M11SDV-8C-LN4F +{ ... }: +{ + imports = [ + ../../common/cpu/amd + ../. + ]; +} From 6bdf6d3cda84de472961528dc236788714272daa Mon Sep 17 00:00:00 2001 From: Brandon Weeks Date: Mon, 10 Jan 2022 00:47:30 -0800 Subject: [PATCH 0095/1476] thinkpad/x1: enable Intel IOMMU --- lenovo/thinkpad/x1/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lenovo/thinkpad/x1/default.nix b/lenovo/thinkpad/x1/default.nix index 870d9a85..7f4b565b 100644 --- a/lenovo/thinkpad/x1/default.nix +++ b/lenovo/thinkpad/x1/default.nix @@ -3,4 +3,6 @@ ../. ../../../common/cpu/intel ]; + + boot.kernelParams = [ "intel_iommu=on" ]; } From 961c0499dfb76dcbe4d2d6b50ee2200526416243 Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Mon, 27 Dec 2021 12:00:00 +0000 Subject: [PATCH 0096/1476] add dell inspiron-5515 --- README.md | 1 + dell/inspiron/5515/README.md | 55 ++++++++++++++++++++++++++++++ dell/inspiron/5515/default.nix | 28 +++++++++++++++ dell/inspiron/5515/fix_touchpad.sh | 25 ++++++++++++++ flake.nix | 1 + 5 files changed, 110 insertions(+) create mode 100644 dell/inspiron/5515/README.md create mode 100644 dell/inspiron/5515/default.nix create mode 100755 dell/inspiron/5515/fix_touchpad.sh diff --git a/README.md b/README.md index 12fc9399..e1b036a1 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ See code for all available configurations. | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Dell G3 3779](dell/g3/3779) | `` | | [Dell Inspiron 5509](dell/inspiron/5509) | `` | +| [Dell Inspiron 5515](dell/inspiron/5515) | `` | | [Dell Latitude 3480](dell/latitude/3480) | `` | | [Dell Latitude 7490](dell/latitude/7490) | `` | | [Dell Poweredge R7515](dell/poweredge/r7515) | `` | diff --git a/dell/inspiron/5515/README.md b/dell/inspiron/5515/README.md new file mode 100644 index 00000000..4a4c24e8 --- /dev/null +++ b/dell/inspiron/5515/README.md @@ -0,0 +1,55 @@ +## Dell Inspiron 5509 + +### Tested Hardware +``` shellsession +$ lspci -nn +00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Root Complex [1022:1630] +00:00.2 IOMMU [0806]: Advanced Micro Devices, Inc. [AMD] Renoir IOMMU [1022:1631] +00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge [1022:1632] +00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge [1022:1632] +00:02.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge [1022:1634] +00:02.4 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge [1022:1634] +00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge [1022:1632] +00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus [1022:1635] +00:08.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus [1022:1635] +00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 51) +00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51) +00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 0 [1022:1448] +00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 1 [1022:1449] +00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 2 [1022:144a] +00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 3 [1022:144b] +00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 4 [1022:144c] +00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 5 [1022:144d] +00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 6 [1022:144e] +00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 7 [1022:144f] +01:00.0 Network controller [0280]: Intel Corporation Wi-Fi 6 AX200 [8086:2723] (rev 1a) +02:00.0 Non-Volatile memory controller [0108]: KIOXIA Corporation Device [1e0f:0001] +03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Lucienne [1002:164c] (rev c1) +03:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:1637] +03:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor [1022:15df] +03:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1 [1022:1639] +03:00.4 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1 [1022:1639] +03:00.5 Multimedia controller [0480]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor [1022:15e2] (rev 01) +03:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller [1022:15e3] +04:00.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 81) +04:00.1 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 81) +``` + +### Before Installation + +These settings are needed both for booting the final install, and +installer itself. Therefore, they must be done first: + ++ Disable *Secure* Boot (but keep **UEFI** Boot) ++ Disable *RAID* and use **AHCI** + +### Firmware Upgrades + +Note that this device is supported by [fwupd](https://fwupd.org). +To perform firmware upgrades just activate the service: + +``` +services.fwupd.enable = true; +``` + +Then use `fwupdmgr` to perform updates diff --git a/dell/inspiron/5515/default.nix b/dell/inspiron/5515/default.nix new file mode 100644 index 00000000..5f9f7c2d --- /dev/null +++ b/dell/inspiron/5515/default.nix @@ -0,0 +1,28 @@ +{ lib, pkgs, ... }: +{ + imports = [ + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + hardware.enableRedistributableFirmware = lib.mkDefault true; + + # touchpad identifies itself as DELL0A78:00 27C6:0D42 Touchpad in xinput list + # it sometimes fails to register (ps2 mouse emulation works, but not scrolling) + # hack around it by unloading and reloading module i2c_hid + systemd.services.fix-touchpad = { + path = [ pkgs.kmod ]; + serviceConfig.ExecStart = "${./fix_touchpad.sh}"; + description = "reload touchpad driver"; + # must run at boot (and not too early), and after suspend + wantedBy = [ "display-manager.service" "sleep.target" ]; + after = [ "sleep.target" ]; + }; + + + # fix suspend + # https://bbs.archlinux.org/viewtopic.php?id=266108 says linux >= 5.12 required + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") pkgs.linuxPackages_latest; + + +} diff --git a/dell/inspiron/5515/fix_touchpad.sh b/dell/inspiron/5515/fix_touchpad.sh new file mode 100755 index 00000000..b776dcee --- /dev/null +++ b/dell/inspiron/5515/fix_touchpad.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +set -eux + +unload () { + if modprobe -r "$1" 2>&1; + then echo ok + else echo fail + fi +} + +wait_unload() { + while sleep 1; do + case "$(unload "$1")" in + *is\ in\ use*) :;; + *ok*) return 0;; + *) echo giving up; return 1; + esac + done +} + +wait_unload i2c_hid_acpi +wait_unload i2c_hid +modprobe i2c_hid +modprobe i2c_hid_acpi diff --git a/flake.nix b/flake.nix index 999ab693..a8a6e7d2 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,7 @@ beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; dell-g3-3779 = import ./dell/g3/3779; dell-inspiron-5509 = import ./dell/inspiron/5509; + dell-inspiron-5515 = import ./dell/inspiron/5515; dell-latitude-3480 = import ./dell/latitude/3480; dell-latitude-7490 = import ./dell/latitude/7490; dell-precision-5530 = import ./dell/precision/5530; From 346c13e609824865c00cf45a58796d8f214a8e9e Mon Sep 17 00:00:00 2001 From: Nelson Jeppesen <50854675+NelsonJeppesen@users.noreply.github.com> Date: Sat, 8 Jan 2022 18:54:11 -0800 Subject: [PATCH 0097/1476] add xps 17 9710 --- README.md | 1 + dell/xps/17-9710/README.wiki | 44 ++++++++++++++++++++++++++++++ dell/xps/17-9710/intel/README.wiki | 1 + dell/xps/17-9710/intel/default.nix | 13 +++++++++ flake.nix | 1 + 5 files changed, 60 insertions(+) create mode 100644 dell/xps/17-9710/README.wiki create mode 120000 dell/xps/17-9710/intel/README.wiki create mode 100644 dell/xps/17-9710/intel/default.nix diff --git a/README.md b/README.md index f974d92d..c89c34f9 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,7 @@ See code for all available configurations. | [Dell XPS 15 9560, nvidia only](dell/xps/15-9560/nvidia) | `` | | [Dell XPS 15 9500](dell/xps/15-9500) | `` | | [Dell XPS 15 9500, nvidia](dell/xps/15-9500/nvidia) | `` | +| [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [Google Pixelbook](google/pixelbook) | `` | | [GPD MicroPC](gpd/micropc) | `` | diff --git a/dell/xps/17-9710/README.wiki b/dell/xps/17-9710/README.wiki new file mode 100644 index 00000000..e46168e5 --- /dev/null +++ b/dell/xps/17-9710/README.wiki @@ -0,0 +1,44 @@ += Dell XPS 17 9710 = + +There are two major hardware variants. Intel-only and NVidia + +This has only been tested with the Intel-only variant + +== Firmware Configuration == + +Enter the bios by repeatedly pressing F2 when the laptop turns on + +=== Before installation === + +These settings are needed both for booting the final install, and installer itself. Therefore, they must be done first. + +==== Method One ==== + +* Click ''Restore Settings'' button a select ''BIOS Defaults'', not to be confused with ''Factory Settings'' + +==== Method Two ==== + +* ''Disable Secure Boot (but keep UEFI Boot).'' Thankfully doing so is as easy as changing any other simple setting. + +* ''Disable Intel hardware RAID and use AHCI instead.'' Intel doesn't seem to provide a working linux driver for this + +== Optional == + +=== 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. + +=== Enable fingerprint reader === + +Activate the service + + +services.fprintd.enable = true; + diff --git a/dell/xps/17-9710/intel/README.wiki b/dell/xps/17-9710/intel/README.wiki new file mode 120000 index 00000000..4ba8dc70 --- /dev/null +++ b/dell/xps/17-9710/intel/README.wiki @@ -0,0 +1 @@ +../README.wiki \ No newline at end of file diff --git a/dell/xps/17-9710/intel/default.nix b/dell/xps/17-9710/intel/default.nix new file mode 100644 index 00000000..b07c6095 --- /dev/null +++ b/dell/xps/17-9710/intel/default.nix @@ -0,0 +1,13 @@ +{ lib, pkgs, ... }: { + imports = [ + ../../../../common/cpu/intel + ../../../../common/pc/laptop + ../../../../common/pc/ssd + ]; + + # Includes the Wi-Fi and Bluetooth firmware + hardware.enableRedistributableFirmware = true; + + # Requires at least 5.12 for working sound + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (lib.mkDefault pkgs.linuxPackages_latest); +} diff --git a/flake.nix b/flake.nix index f1eaf502..c7662c5b 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,7 @@ dell-xps-15-9560-nvidia = import ./dell/xps/15-9560/nvidia; dell-xps-15-9500 = import ./dell/xps/15-9500; dell-xps-15-9500-nvidia = import ./dell/xps/15-9500/nvidia; + dell-xps-17-9710-intel = import ./dell/xps/17-9710/intel; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; google-pixelbook = import ./google/pixelbook; gpd-micropc = import ./gpd/micropc; From f8eff138d838f8415e2be1614955de25104082bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 31 Jan 2022 06:05:05 +0100 Subject: [PATCH 0098/1476] fix test profile --- tests/build-profile.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/build-profile.nix b/tests/build-profile.nix index c4509d36..0d477b2d 100644 --- a/tests/build-profile.nix +++ b/tests/build-profile.nix @@ -1,8 +1,8 @@ { profile }: let - shim = { - boot.loader.systemd-boot.enable = true; + shim = { config, ... }: { + boot.loader.systemd-boot.enable = !config.boot.loader.generic-extlinux-compatible.enable && !config.boot.loader.raspberryPi.enable; fileSystems."/" = { device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000"; From 7dd944da98ba96170364283c75a3176d4f10e179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 1 Feb 2022 22:12:04 +0100 Subject: [PATCH 0099/1476] p14s: starting with 5.16 we have this kernel module upstream --- lenovo/thinkpad/p14s/amd/gen2/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lenovo/thinkpad/p14s/amd/gen2/default.nix b/lenovo/thinkpad/p14s/amd/gen2/default.nix index ee3d52ae..062ad8f0 100644 --- a/lenovo/thinkpad/p14s/amd/gen2/default.nix +++ b/lenovo/thinkpad/p14s/amd/gen2/default.nix @@ -13,9 +13,8 @@ boot.kernelParams = ["amdgpu.backlight=0" "acpi_backlight=none"]; # Wifi support - boot.extraModulePackages = [ config.boot.kernelPackages.rtw89 ]; hardware.firmware = [ pkgs.rtw89-firmware ]; # For support of newer AMD GPUs, backlight and internal microphone boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.13") pkgs.linuxPackages_latest; -} \ No newline at end of file +} From b9fb6c76d12b349da594a8d7022b8424ad4d6852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 25 Jan 2022 07:57:07 +0100 Subject: [PATCH 0100/1476] microsoft/surface: just inline hardware_configuration Everything in nixos-hardware should be hardware configuration after all. --- microsoft/surface/default.nix | 21 ++++++++++++++++++-- microsoft/surface/hardware_configuration.nix | 17 ---------------- 2 files changed, 19 insertions(+), 19 deletions(-) delete mode 100644 microsoft/surface/hardware_configuration.nix diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 7b53f0df..7452c107 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -1,6 +1,23 @@ { config, lib, pkgs, ... }: { - imports = - [ ./kernel ./hardware_configuration.nix ./firmware/surface-go/ath10k ]; + imports = [ + ./kernel + ./firmware/surface-go/ath10k + ]; + + boot.extraModprobeConfig = lib.mkDefault '' + options i915 enable_fbc=1 enable_rc6=1 modeset=1 + options snd_hda_intel power_save=1 + options snd_ac97_codec power_save=1 + options iwlwifi power_save=Y + options iwldvm force_cam=N + ''; + + boot.kernelParams = [ "mem_sleep_default=deep" ]; + + # NOTE: Check the README before enabling TLP: + services.tlp.enable = lib.mkDefault false; + + hardware.sensor.iio.enable = lib.mkDefault true; environment.systemPackages = with pkgs; [ surface-control ]; users.groups.surface-control = { }; diff --git a/microsoft/surface/hardware_configuration.nix b/microsoft/surface/hardware_configuration.nix deleted file mode 100644 index ba06b307..00000000 --- a/microsoft/surface/hardware_configuration.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, pkgs, ... }: -{ - boot.extraModprobeConfig = lib.mkDefault '' - options i915 enable_fbc=1 enable_rc6=1 modeset=1 - options snd_hda_intel power_save=1 - options snd_ac97_codec power_save=1 - options iwlwifi power_save=Y - options iwldvm force_cam=N - ''; - - boot.kernelParams = [ "mem_sleep_default=deep" ]; - - # NOTE: Check the README before enabling TLP: - services.tlp.enable = lib.mkDefault false; - - hardware.sensor.iio.enable = lib.mkDefault true; -} From 5e720c70a8483d64dc7a28cb4c1d9aa2836a0189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 25 Jan 2022 07:57:50 +0100 Subject: [PATCH 0101/1476] microsoft/surface: enable redistributable firmware --- microsoft/surface/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 7452c107..56dfd07d 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -17,6 +17,8 @@ # NOTE: Check the README before enabling TLP: services.tlp.enable = lib.mkDefault false; + # i.e. needed for wifi firmware, see https://github.com/NixOS/nixos-hardware/issues/364 + hardware.enableRedistributableFirmware = lib.mkDefault true; hardware.sensor.iio.enable = lib.mkDefault true; environment.systemPackages = with pkgs; [ surface-control ]; From ce38b7abb108091a6ba6bb356b38339463aaba20 Mon Sep 17 00:00:00 2001 From: Ronny Esterluss Date: Tue, 1 Feb 2022 14:16:50 +0100 Subject: [PATCH 0102/1476] added thinkpad t14 gen2 and copied t14s files where applicable --- lenovo/thinkpad/t14 | 1 - lenovo/thinkpad/t14/amd/default.nix | 12 ++++++++++++ lenovo/thinkpad/t14/amd/gen2/default.nix | 11 +++++++++++ lenovo/thinkpad/t14/default.nix | 20 ++++++++++++++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) delete mode 120000 lenovo/thinkpad/t14 create mode 100644 lenovo/thinkpad/t14/amd/default.nix create mode 100644 lenovo/thinkpad/t14/amd/gen2/default.nix create mode 100644 lenovo/thinkpad/t14/default.nix diff --git a/lenovo/thinkpad/t14 b/lenovo/thinkpad/t14 deleted file mode 120000 index 7be5dd83..00000000 --- a/lenovo/thinkpad/t14 +++ /dev/null @@ -1 +0,0 @@ -t14s/ \ No newline at end of file diff --git a/lenovo/thinkpad/t14/amd/default.nix b/lenovo/thinkpad/t14/amd/default.nix new file mode 100644 index 00000000..fbd9f204 --- /dev/null +++ b/lenovo/thinkpad/t14/amd/default.nix @@ -0,0 +1,12 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../../common/cpu/amd + ../../../../common/gpu/amd + ]; + + # For support of newer AMD GPUs, backlight and internal microphone + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.8") pkgs.linuxPackages_latest; +} diff --git a/lenovo/thinkpad/t14/amd/gen2/default.nix b/lenovo/thinkpad/t14/amd/gen2/default.nix new file mode 100644 index 00000000..653ca92e --- /dev/null +++ b/lenovo/thinkpad/t14/amd/gen2/default.nix @@ -0,0 +1,11 @@ + +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ]; + + # For support of MEDIATEK Corp. Device 7961 wireless network controller, see https://lwn.net/Articles/843303/ + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") pkgs.linuxPackages_latest; +} diff --git a/lenovo/thinkpad/t14/default.nix b/lenovo/thinkpad/t14/default.nix new file mode 100644 index 00000000..d783b21a --- /dev/null +++ b/lenovo/thinkpad/t14/default.nix @@ -0,0 +1,20 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../common/pc/laptop/acpi_call.nix + ]; + + # For suspending to RAM to work, set Config -> Power -> Sleep State to "Linux" in EFI. + # See https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Suspend_issues + + # Fingerprint sensor requires a firmware-update to work. + + # Force use of the thinkpad_acpi driver for backlight control. + # This allows the backlight save/load systemd service to work. + boot.kernelParams = [ "acpi_backlight=native" ]; + + # see https://github.com/NixOS/nixpkgs/issues/69289 + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest; +} From 2e4ee9d5e88e733ab5d3fb55ca1d004215266fa3 Mon Sep 17 00:00:00 2001 From: Ronny Esterluss Date: Wed, 2 Feb 2022 10:54:59 +0100 Subject: [PATCH 0103/1476] removed empty newline --- lenovo/thinkpad/t14/amd/gen2/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/lenovo/thinkpad/t14/amd/gen2/default.nix b/lenovo/thinkpad/t14/amd/gen2/default.nix index 653ca92e..367e3988 100644 --- a/lenovo/thinkpad/t14/amd/gen2/default.nix +++ b/lenovo/thinkpad/t14/amd/gen2/default.nix @@ -1,4 +1,3 @@ - { config, lib, pkgs, ... }: { From 58103331f57386780bd9a7ec3a94d68a7460243b Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Mon, 24 Jan 2022 21:15:10 +0100 Subject: [PATCH 0104/1476] hp/elitebook/2560p: Initial commit --- hp/elitebook/2560p/default.nix | 22 ++++++++++++++++++++++ hp/elitebook/2560p/igpu.nix | 28 ++++++++++++++++++++++++++++ hp/elitebook/2560p/network.nix | 12 ++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 hp/elitebook/2560p/default.nix create mode 100644 hp/elitebook/2560p/igpu.nix create mode 100644 hp/elitebook/2560p/network.nix diff --git a/hp/elitebook/2560p/default.nix b/hp/elitebook/2560p/default.nix new file mode 100644 index 00000000..2055532b --- /dev/null +++ b/hp/elitebook/2560p/default.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: +with lib; +let + xcfg = config.services.xserver; +in +{ + imports = [ + ../../../common/cpu/intel + ../../../common/cpu/intel/sandy-bridge + ../../../common/pc + ../../../common/pc/laptop + ../../../common/pc/laptop/hdd + ../../../common/pc/hdd + + ./network.nix + ./igpu.nix + ]; + + config = { + services.thermald.enable = mkDefault true; + }; +} diff --git a/hp/elitebook/2560p/igpu.nix b/hp/elitebook/2560p/igpu.nix new file mode 100644 index 00000000..2b6c789b --- /dev/null +++ b/hp/elitebook/2560p/igpu.nix @@ -0,0 +1,28 @@ +{ config, pkgs, lib, ... }: +with lib; +let + xcfg = config.services.xserver; + cfg = config.hardware.hp.elitebook.graphics; +in +{ + options.hardware.hp.elitebook.graphics = { + enable = mkOption { + default = xcfg.enable; + example = !xcfg.enable; + description = "Wether to enable iGPU related settings for HP Elitebook laptops"; + type = types.bool; + }; + }; + + config = mkIf cfg.enable { + boot.initrd.kernelModules = [ "i915" ]; + hardware.opengl = { + enable = mkDefault true; + extraPackages = with pkgs; [ + vaapiIntel + libvdpau-va-gl + ]; + }; + }; +} + diff --git a/hp/elitebook/2560p/network.nix b/hp/elitebook/2560p/network.nix new file mode 100644 index 00000000..23c52844 --- /dev/null +++ b/hp/elitebook/2560p/network.nix @@ -0,0 +1,12 @@ +{ config, pkgs, lib, ... }: +with lib; +{ + config = { + # Wifi can't connect if rand mac address is used + networking.networkmanager.extraConfig = concatStringsSep "\n" [ + "[device]" + "match-device=driver:iwlwifi" + "wifi.scan-rand-mac-address=no" + ]; + }; +} From 12d52a8025fb98c3edaf9672342e79f20eebd451 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Mon, 24 Jan 2022 21:25:42 +0100 Subject: [PATCH 0105/1476] hp/elitebook/2560p: Update project README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d9133620..b0445b71 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,7 @@ See code for all available configurations. | [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [Google Pixelbook](google/pixelbook) | `` | +| [HP Elitebook 2560p](hp/elitebook/2560p) | `` | | [GPD MicroPC](gpd/micropc) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | From 27032fb49376d45d289e9b578079c4ac4b16b182 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Tue, 25 Jan 2022 09:55:24 +0100 Subject: [PATCH 0106/1476] hp/elitebook/2560p: Remove redundant graphics settings. --- hp/elitebook/2560p/default.nix | 1 - hp/elitebook/2560p/igpu.nix | 28 ---------------------------- 2 files changed, 29 deletions(-) delete mode 100644 hp/elitebook/2560p/igpu.nix diff --git a/hp/elitebook/2560p/default.nix b/hp/elitebook/2560p/default.nix index 2055532b..de34e157 100644 --- a/hp/elitebook/2560p/default.nix +++ b/hp/elitebook/2560p/default.nix @@ -13,7 +13,6 @@ in ../../../common/pc/hdd ./network.nix - ./igpu.nix ]; config = { diff --git a/hp/elitebook/2560p/igpu.nix b/hp/elitebook/2560p/igpu.nix deleted file mode 100644 index 2b6c789b..00000000 --- a/hp/elitebook/2560p/igpu.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ config, pkgs, lib, ... }: -with lib; -let - xcfg = config.services.xserver; - cfg = config.hardware.hp.elitebook.graphics; -in -{ - options.hardware.hp.elitebook.graphics = { - enable = mkOption { - default = xcfg.enable; - example = !xcfg.enable; - description = "Wether to enable iGPU related settings for HP Elitebook laptops"; - type = types.bool; - }; - }; - - config = mkIf cfg.enable { - boot.initrd.kernelModules = [ "i915" ]; - hardware.opengl = { - enable = mkDefault true; - extraPackages = with pkgs; [ - vaapiIntel - libvdpau-va-gl - ]; - }; - }; -} - From e93140487c260c743a00052fb33d0aa6c9f0a846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 4 Feb 2022 13:59:12 +0100 Subject: [PATCH 0107/1476] elitebook/2560p: fix reference in markdown --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b0445b71..aeb5ef90 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ you can easily pin to a particular revision if you desire more stability. See code for all available configurations. | Model | Path | -| ------------------------------------------------------------------- | -------------------------------------------------- | +|---------------------------------------------------------------------|----------------------------------------------------| | [Acer Aspire 4810T](acer/aspire/4810t) | `` | | [Airis N990](airis/n990) | `` | | [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | @@ -75,7 +75,7 @@ See code for all available configurations. | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | -| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | +| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Dell G3 3779](dell/g3/3779) | `` | @@ -103,7 +103,7 @@ See code for all available configurations. | [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [Google Pixelbook](google/pixelbook) | `` | -| [HP Elitebook 2560p](hp/elitebook/2560p) | `` | +| [HP Elitebook 2560p](hp/elitebook/2560p) | `` | | [GPD MicroPC](gpd/micropc) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | From 6e9617a7333bcb0466bbc270576653cf22d8bb9a Mon Sep 17 00:00:00 2001 From: Ronny Esterluss Date: Fri, 4 Feb 2022 15:10:46 +0100 Subject: [PATCH 0108/1476] readded t14 amd gen1 to new folder structure --- README.md | 5 +++-- lenovo/thinkpad/t14/amd/gen1/default.nix | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 lenovo/thinkpad/t14/amd/gen1/default.nix diff --git a/README.md b/README.md index d9133620..5728c162 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ See code for all available configurations. | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | -| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | +| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Dell G3 3779](dell/g3/3779) | `` | @@ -120,7 +120,8 @@ See code for all available configurations. | [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | | [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | | [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | -| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | +| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | +| [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | | [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | | [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `` | | [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `` | diff --git a/lenovo/thinkpad/t14/amd/gen1/default.nix b/lenovo/thinkpad/t14/amd/gen1/default.nix new file mode 100644 index 00000000..cb1ec7d8 --- /dev/null +++ b/lenovo/thinkpad/t14/amd/gen1/default.nix @@ -0,0 +1,8 @@ + +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ]; +} From 1c5bade89567f0bbad4aa9ff80606c3d0ca52b98 Mon Sep 17 00:00:00 2001 From: Ronny Esterluss Date: Tue, 8 Feb 2022 08:56:25 +0100 Subject: [PATCH 0109/1476] updated flake.nix to include t14 amd gen2 --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 593513c0..ecc4695c 100644 --- a/flake.nix +++ b/flake.nix @@ -56,6 +56,7 @@ lenovo-thinkpad-p53 = import ./lenovo/thinkpad/p53; lenovo-thinkpad-t14 = import ./lenovo/thinkpad/t14; lenovo-thinkpad-t14-amd-gen1 = import ./lenovo/thinkpad/t14/amd/gen1; + lenovo-thinkpad-t14-amd-gen2 = import ./lenovo/thinkpad/t14/amd/gen2; lenovo-thinkpad-t14s = import ./lenovo/thinkpad/t14s; lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1; lenovo-thinkpad-t410 = import ./lenovo/thinkpad/t410; From 6aeea68f603834b46cc0d2a8e9c792317077967c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Jatu=C5=BEis?= Date: Sat, 12 Feb 2022 09:56:26 +0200 Subject: [PATCH 0110/1476] lenovo-thinkpad-l13-yoga: fix flake output --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 593513c0..39671ccb 100644 --- a/flake.nix +++ b/flake.nix @@ -48,7 +48,7 @@ lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; lenovo-thinkpad-e495 = import ./lenovo/thinkpad/e495; lenovo-thinkpad-l13 = import ./lenovo/thinkpad/l13; - lenovo-thinkpad-l13-yoga = import ./lenovo/thinkpad/l13-yoga/yoga; + lenovo-thinkpad-l13-yoga = import ./lenovo/thinkpad/l13/yoga; lenovo-thinkpad-l14-intel = import ./lenovo/thinkpad/l14/intel; lenovo-thinkpad-l14-amd = import ./lenovo/thinkpad/l14/amd; lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1; From 6b6f4f8dd68dce3829be27948c9910e52bb64bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 12 Feb 2022 19:42:05 +0100 Subject: [PATCH 0111/1476] thinkpad/x1/6th-gen/QHD: drop gtk hidpi env variables Those actually break Gnome/wayland. They might work on x11. --- lenovo/thinkpad/x1/6th-gen/QHD/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lenovo/thinkpad/x1/6th-gen/QHD/default.nix b/lenovo/thinkpad/x1/6th-gen/QHD/default.nix index 0b8555fb..b6495ea1 100644 --- a/lenovo/thinkpad/x1/6th-gen/QHD/default.nix +++ b/lenovo/thinkpad/x1/6th-gen/QHD/default.nix @@ -10,11 +10,6 @@ services.xserver.dpi = 210; fonts.fontconfig.dpi = 210; - # Fix sizes of GTK/GNOME ui elements - environment.variables = { - GDK_SCALE = lib.mkDefault "2"; - GDK_DPI_SCALE= lib.mkDefault "0.5"; - }; # Enable readable font on console. The example configuration that # follows is taliored towards western languages. To see how to # configure the font download the source tarball from From f3a00cd93200da0ae01182129f4c7e8b33c85504 Mon Sep 17 00:00:00 2001 From: dev-null-undefined <50732964+dev-null-undefined@users.noreply.github.com> Date: Mon, 14 Feb 2022 12:58:40 +0100 Subject: [PATCH 0112/1476] Added msi-gs60 to flake modules --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 593513c0..5f62ab25 100644 --- a/flake.nix +++ b/flake.nix @@ -90,6 +90,7 @@ lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13/yoga; microsoft-surface = import ./microsoft/surface; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; + msi-gs60 = import ./msi/gs60; pcengines-apu = import ./pcengines/apu; raspberry-pi-2 = import ./raspberry-pi/2; raspberry-pi-4 = import ./raspberry-pi/4; From 93647384a6289809c28172e1e7d95bda03d843dc Mon Sep 17 00:00:00 2001 From: Daniel Kilimnik Date: Sat, 19 Feb 2022 21:03:49 +0100 Subject: [PATCH 0113/1476] flake.nix add missing profiles --- flake.nix | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/flake.nix b/flake.nix index 7d5c70c1..329c8328 100644 --- a/flake.nix +++ b/flake.nix @@ -3,16 +3,18 @@ outputs = { self }: { nixosModules = { - dell-aspire-4810t = import ./acer/aspire/4810t; + acer-aspire-4810t = import ./acer/aspire/4810t; + airis-n990 = import ./airis/n990; + apple-macbook-air-3 = import ./apple/macbook-air/3; + apple-macbook-air-4 = import ./apple/macbook-air/4; + apple-macbook-air-6 = import ./apple/macbook-air/6; + apple-macbook-pro-10-1 = import ./apple/macbook-pro/10-1; + apple-macbook-pro-11-5 = import ./apple/macbook-pro/11-5; + apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; asus-battery = import ./asus/battery.nix; asus-fx504gd = import ./asus/fx504gd; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; - apple-macbook-air-3 = import ./apple/macbook-air/3; - apple-macbook-air-4 = import apple/macbook-air/4; - apple-macbook-air-6 = import apple/macbook-air/6; - apple-macbook-pro-10-1 = import ./apple/macbook-pro/10-1; - apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; dell-g3-3779 = import ./dell/g3/3779; dell-inspiron-5509 = import ./dell/inspiron/5509; @@ -40,6 +42,7 @@ friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; google-pixelbook = import ./google/pixelbook; gpd-micropc = import ./gpd/micropc; + hp-elitebook-2560p = import ./hp/elitebook/2560p; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-thinkpad = import ./lenovo/thinkpad; @@ -53,6 +56,7 @@ lenovo-thinkpad-l14-amd = import ./lenovo/thinkpad/l14/amd; lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1; lenovo-thinkpad-p1-gen3 = import ./lenovo/thinkpad/p1/3th-gen; + lenovo-thinkpad-p14s-amd-gen2 = import ./lenovo/thinkpad/p14s/amd/gen2; lenovo-thinkpad-p53 = import ./lenovo/thinkpad/p53; lenovo-thinkpad-t14 = import ./lenovo/thinkpad/t14; lenovo-thinkpad-t14-amd-gen1 = import ./lenovo/thinkpad/t14/amd/gen1; @@ -62,8 +66,8 @@ lenovo-thinkpad-t410 = import ./lenovo/thinkpad/t410; lenovo-thinkpad-t420 = import ./lenovo/thinkpad/t420; lenovo-thinkpad-t430 = import ./lenovo/thinkpad/t430; - lenovo-thinkpad-t440s = import ./lenovo/thinkpad/t440s; lenovo-thinkpad-t440p = import ./lenovo/thinkpad/t440p; + lenovo-thinkpad-t440s = import ./lenovo/thinkpad/t440s; lenovo-thinkpad-t450s = import ./lenovo/thinkpad/t450s; lenovo-thinkpad-t460 = import ./lenovo/thinkpad/t460; lenovo-thinkpad-t460s = import ./lenovo/thinkpad/t460s; @@ -73,14 +77,6 @@ lenovo-thinkpad-t490 = import ./lenovo/thinkpad/t490; lenovo-thinkpad-t495 = import ./lenovo/thinkpad/t495; lenovo-thinkpad-t550 = import ./lenovo/thinkpad/t550; - lenovo-thinkpad-x140e = import ./lenovo/thinkpad/x140e; - lenovo-thinkpad-x200s = import ./lenovo/thinkpad/x200s; - lenovo-thinkpad-x220 = import ./lenovo/thinkpad/x220; - lenovo-thinkpad-x230 = import ./lenovo/thinkpad/x230; - lenovo-thinkpad-x250 = import ./lenovo/thinkpad/x250; - lenovo-thinkpad-x260 = import ./lenovo/thinkpad/x260; - lenovo-thinkpad-x270 = import ./lenovo/thinkpad/x270; - lenovo-thinkpad-x280 = import ./lenovo/thinkpad/x280; lenovo-thinkpad-x1 = import ./lenovo/thinkpad/x1; lenovo-thinkpad-x1-6th-gen = import ./lenovo/thinkpad/x1/6th-gen; lenovo-thinkpad-x1-7th-gen = import ./lenovo/thinkpad/x1/7th-gen; @@ -89,22 +85,32 @@ lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2; lenovo-thinkpad-x13 = import ./lenovo/thinkpad/x13; lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13/yoga; + lenovo-thinkpad-x140e = import ./lenovo/thinkpad/x140e; + lenovo-thinkpad-x200s = import ./lenovo/thinkpad/x200s; + lenovo-thinkpad-x220 = import ./lenovo/thinkpad/x220; + lenovo-thinkpad-x230 = import ./lenovo/thinkpad/x230; + lenovo-thinkpad-x250 = import ./lenovo/thinkpad/x250; + lenovo-thinkpad-x260 = import ./lenovo/thinkpad/x260; + lenovo-thinkpad-x270 = import ./lenovo/thinkpad/x270; + lenovo-thinkpad-x280 = import ./lenovo/thinkpad/x280; microsoft-surface = import ./microsoft/surface; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; msi-gs60 = import ./msi/gs60; + onenetbook-4 = import ./onenetbook/4; pcengines-apu = import ./pcengines/apu; + purism-librem-13v3 = import ./purism/librem/13v3; + purism-librem-15v3 = import ./purism/librem/15v3; raspberry-pi-2 = import ./raspberry-pi/2; raspberry-pi-4 = import ./raspberry-pi/4; samsung-np900x3c = import ./samsung/np900x3c; - system76 = import ./system76; - system76-darp6 = import ./system76/darp6; - purism-librem-13v3 = import ./purism/librem/13v3; - purism-librem-15v3 = import ./purism/librem/15v3; + supermicro = import ./supermicro; supermicro-a1sri-2758f = import ./supermicro/a1sri-2758f; supermicro-m11sdv-8c-ln4f = import ./supermicro/m11sdv-8c-ln4f; supermicro-x10sll-f = import ./supermicro/x10sll-f; supermicro-x12scz-tln4f = import ./supermicro/x12scz-tln4f; - thoshiba-swanky = import ./toshiba/swanky; + system76 = import ./system76; + system76-darp6 = import ./system76/darp6; + toshiba-swanky = import ./toshiba/swanky; tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; common-cpu-amd = import ./common/cpu/amd; common-cpu-intel = import ./common/cpu/intel; From acded13f27aaabc91702f184ea147420f53b691f Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sat, 19 Feb 2022 16:01:05 -0800 Subject: [PATCH 0114/1476] asus/battery.nix: fix chargeUpto after suspend/resume, make script optional --- asus/battery.nix | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/asus/battery.nix b/asus/battery.nix index e9bb2544..79f480a5 100644 --- a/asus/battery.nix +++ b/asus/battery.nix @@ -3,19 +3,35 @@ let p = pkgs.writeScriptBin "charge-upto" '' echo ''${0:-100} > /sys/class/power_supply/BAT0/charge_control_end_threshold ''; - cfg = config.hardware.asus; + cfg = config.hardware.asus.battery; in { - options.hardware.asus.battery.chargeUpto = lib.mkOption { - description = "Maximum level of charge for your battery, as a percentage."; - default = 100; - type = lib.types.int; + options.hardware.asus.battery = { + chargeUpto = lib.mkOption { + description = "Maximum level of charge for your battery, as a percentage."; + default = 100; + type = lib.types.int; + }; + addChargeUptoScript = lib.mkOption { + description = "Whether to add charge-upto to environment.systemPackages. `charge-upto 75` temporarily sets the charge limit to 75%."; + default = true; + type = lib.types.bool; + }; }; config = { - environment.systemPackages = [ p ]; - systemd.tmpfiles.rules = [ - "w /sys/class/power_supply/BAT0/charge_control_end_threshold - - - - ${toString cfg.battery.chargeUpto}" - ]; + environment.systemPackages = lib.mkIf cfg.addChargeUptoScript [ p ]; + systemd.services.battery-charge-threshold = { + wantedBy = [ "local-fs.target" "suspend.target" ]; + after = [ "local-fs.target" "suspend.target" ]; + description = "Set the battery charge threshold to ${toString cfg.chargeUpto}%"; + startLimitBurst = 5; + startLimitIntervalSec = 1; + serviceConfig = { + Type = "oneshot"; + Restart = "on-failure"; + ExecStart = "/bin/sh -c 'echo ${toString cfg.chargeUpto} > /sys/class/power_supply/BAT0/charge_control_end_threshold'"; + }; + }; }; } From 472f72a42d14a598f7a4f4c7423e9805ab4ee489 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sun, 20 Feb 2022 06:16:38 -0800 Subject: [PATCH 0115/1476] Apply @Mic92's pkgs.runtimeShell suggestion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- asus/battery.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asus/battery.nix b/asus/battery.nix index 79f480a5..14c45e36 100644 --- a/asus/battery.nix +++ b/asus/battery.nix @@ -30,7 +30,7 @@ in serviceConfig = { Type = "oneshot"; Restart = "on-failure"; - ExecStart = "/bin/sh -c 'echo ${toString cfg.chargeUpto} > /sys/class/power_supply/BAT0/charge_control_end_threshold'"; + ExecStart = "${pkgs.runtimeShell} -c 'echo ${toString cfg.chargeUpto} > /sys/class/power_supply/BAT0/charge_control_end_threshold'"; }; }; }; From b633d393e2097f267e67277eee3ca0f04a94d87a Mon Sep 17 00:00:00 2001 From: Mason Mackaman Date: Sun, 20 Feb 2022 12:23:14 -0500 Subject: [PATCH 0116/1476] Refactor ath10k-replace to no longer need an outputHash The outputHash would change and frequently cause this to not work. This gets around the issue by using the built version firmwareLinuxNonfree as a source instead of trying to patch it directly. --- .../surface-go/ath10k/ath10k-replace.nix | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix b/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix index f950d9b7..be0e4fea 100644 --- a/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix +++ b/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix @@ -3,30 +3,23 @@ let repos = (pkgs.callPackage ../../../repos.nix {}); killernetworking_firmware = repos.surface-go-ath10k-firmware_backup + "/K1535_Debian"; in -firmwareLinuxNonfree.overrideAttrs (old: rec { +stdenv.mkDerivation { pname = "microsoft-surface-go-firmware-linux-nonfree"; - srcs = [ - firmwareLinuxNonfree.src - killernetworking_firmware - ]; - sourceRoot = firmwareLinuxNonfree.src; - - dontMakeSourcesWritable = true; - postInstall = '' - # Delete the non-working firmware: - rm -v $out/lib/firmware/ath10k/QCA6174/{hw2.1,hw3.0}/board.bin - rm -v $out/lib/firmware/ath10k/QCA6174/{hw2.1,hw3.0}/board-2.bin + inherit (firmwareLinuxNonfree) version; + src = firmwareLinuxNonfree; + phases = [ "unpackPhase" "installPhase" ]; + installPhase = '' # Install the Surface Go Wifi firmware: - cp ${killernetworking_firmware}/board.bin $out/lib/firmware/ath10k/QCA6174/hw2.1/ - cp ${killernetworking_firmware}/board.bin $out/lib/firmware/ath10k/QCA6174/hw3.0/ - ''; + cp ${killernetworking_firmware}/board.bin lib/firmware/ath10k/QCA6174/hw2.1/ + cp ${killernetworking_firmware}/board.bin lib/firmware/ath10k/QCA6174/hw3.0/ - outputHash = "176cf5b9f370x2a532h2afjfkrxy13gqdygc11bam0sg8dlnrv21"; + mkdir $out; cp -r ./. $out + ''; meta = with lib; { description = "Standard binary firmware collection, adjusted with the Surface Go WiFi firmware"; platforms = platforms.linux; priority = 5; }; -}) +} From ca893110b3f842cc54135dc796922317e87f6ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 23 Feb 2022 10:23:56 +0100 Subject: [PATCH 0117/1476] assus/battery: rename option to match nixpkgs convention --- asus/battery.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asus/battery.nix b/asus/battery.nix index 14c45e36..c9a45b15 100644 --- a/asus/battery.nix +++ b/asus/battery.nix @@ -13,14 +13,14 @@ in default = 100; type = lib.types.int; }; - addChargeUptoScript = lib.mkOption { + enableChargeUptoScript = lib.mkOption { description = "Whether to add charge-upto to environment.systemPackages. `charge-upto 75` temporarily sets the charge limit to 75%."; default = true; type = lib.types.bool; }; }; config = { - environment.systemPackages = lib.mkIf cfg.addChargeUptoScript [ p ]; + environment.systemPackages = lib.mkIf cfg.enableChargeUptoScript [ p ]; systemd.services.battery-charge-threshold = { wantedBy = [ "local-fs.target" "suspend.target" ]; after = [ "local-fs.target" "suspend.target" ]; From 1c076b237f3b7b3c178e8672c7c700f295fbdb7e Mon Sep 17 00:00:00 2001 From: ettom <36895504+ettom@users.noreply.github.com> Date: Mon, 21 Feb 2022 22:06:43 +0200 Subject: [PATCH 0118/1476] Add rpi4 pwm0 support --- raspberry-pi/4/default.nix | 1 + raspberry-pi/4/pwm0.nix | 50 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 raspberry-pi/4/pwm0.nix diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index fac4cc17..fcaf5adc 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -8,6 +8,7 @@ ./modesetting.nix ./poe-hat.nix ./tc358743.nix + ./pwm0.nix ]; boot = { diff --git a/raspberry-pi/4/pwm0.nix b/raspberry-pi/4/pwm0.nix new file mode 100644 index 00000000..37ae3a1f --- /dev/null +++ b/raspberry-pi/4/pwm0.nix @@ -0,0 +1,50 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.hardware.raspberry-pi."4".pwm0; +in +{ + options.hardware = { + raspberry-pi."4".pwm0 = { + enable = lib.mkEnableOption '' + Enable support for the hardware pwm0 channel on GPIO_18 + ''; + }; + }; + + config = lib.mkIf cfg.enable { + hardware.deviceTree = { + overlays = [{ + name = "pwm-overlay"; + dtsText = '' + /dts-v1/; + /plugin/; + / { + compatible = "brcm,bcm2711"; + + fragment@0 { + target = <&gpio>; + __overlay__ { + pwm_pins: pwm_pins { + brcm,pins = <18>; + brcm,function = <2>; /* Alt5 */ + }; + }; + }; + + fragment@1 { + target = <&pwm>; + __overlay__ { + pinctrl-names = "default"; + assigned-clock-rates = <100000000>; + status = "okay"; + pinctrl-0 = <&pwm_pins>; + }; + }; + + }; + ''; + }]; + }; + }; +} From 1da3ba110c8940146588c9adf52811e70f449eb1 Mon Sep 17 00:00:00 2001 From: ilkecan Date: Fri, 25 Feb 2022 15:17:00 +0000 Subject: [PATCH 0119/1476] common/cpu/intel: define VDPAU_DRIVER env variable `libvdpau-va-gl` is a wrapper around VAAPI to have a VDPAU driver, which is required for Intel GPU's. `VDPAU_DRIVER` environment variable is set to "va_gl", since it defaults to "nvidia". --- common/cpu/intel/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/cpu/intel/default.nix b/common/cpu/intel/default.nix index ad945f39..273360d2 100644 --- a/common/cpu/intel/default.nix +++ b/common/cpu/intel/default.nix @@ -3,6 +3,10 @@ { boot.initrd.kernelModules = [ "i915" ]; + environment.variables = { + VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); + }; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; From 3e4d52da0a4734225d292667a735dcc67dcef551 Mon Sep 17 00:00:00 2001 From: kiana-S Date: Mon, 24 Jan 2022 22:41:12 -0500 Subject: [PATCH 0120/1476] surface/kernel: 5.13.4 -> 5.16.11 --- microsoft/surface/kernel/default.nix | 2 +- .../surface/kernel/linux-5.13.4/default.nix | 126 ------------------ .../kernel/linux-5.13.4/linux-5.13.4.nix | 22 --- microsoft/surface/kernel/linux-5.16.11.nix | 87 ++++++++++++ microsoft/surface/repos.nix | 14 +- 5 files changed, 92 insertions(+), 159 deletions(-) delete mode 100644 microsoft/surface/kernel/linux-5.13.4/default.nix delete mode 100644 microsoft/surface/kernel/linux-5.13.4/linux-5.13.4.nix create mode 100644 microsoft/surface/kernel/linux-5.16.11.nix diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/kernel/default.nix index 5eb6013d..354fe907 100644 --- a/microsoft/surface/kernel/default.nix +++ b/microsoft/surface/kernel/default.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, ... }: { - boot.kernelPackages = pkgs.callPackage ./linux-5.13.4 { }; + boot.kernelPackages = pkgs.callPackage ./linux-5.16.11.nix { }; } diff --git a/microsoft/surface/kernel/linux-5.13.4/default.nix b/microsoft/surface/kernel/linux-5.13.4/default.nix deleted file mode 100644 index fe2b7286..00000000 --- a/microsoft/surface/kernel/linux-5.13.4/default.nix +++ /dev/null @@ -1,126 +0,0 @@ -{ config, lib, pkgs, ... }: -let - repos = (pkgs.callPackage ../../repos.nix { }); - patches = repos.linux-surface + "/patches"; - surface_kernelPatches = [ - { - name = "microsoft-surface-patches-linux-5.13.4"; - patch = null; - structuredExtraConfig = with lib.kernel; { - # - # Surface Aggregator Module - # - SURFACE_AGGREGATOR = module; - SURFACE_AGGREGATOR_ERROR_INJECTION = no; - SURFACE_AGGREGATOR_BUS = yes; - SURFACE_AGGREGATOR_CDEV = module; - SURFACE_AGGREGATOR_REGISTRY = 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 laptop 1 keyboard - # - SERIAL_DEV_BUS = yes; - SERIAL_DEV_CTRL_TTYPORT = yes; - - # - # Surface Hotplug - # - SURFACE_HOTPLUG = 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_IPU3_IMGU = module; - VIDEO_IPU3_CIO2 = module; - CIO2_BRIDGE = yes; - INTEL_SKL_INT3472 = module; - - # - # Cameras: Sensor drivers - # - VIDEO_OV5693 = 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_BUTTON = 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 = patches + "/5.13/0001-surface3-oemb.patch"; - } - { - name = "ms-surface/0002-mwifiex"; - patch = patches + "/5.13/0002-mwifiex.patch"; - } - { - name = "ms-surface/0003-ath10k"; - patch = patches + "/5.13/0003-ath10k.patch"; - } - { - name = "ms-surface/0004-ipts"; - patch = patches + "/5.13/0004-ipts.patch"; - } - { - name = "ms-surface/0005-surface-sam-over-hid"; - patch = patches + "/5.13/0005-surface-sam-over-hid.patch"; - } - { - name = "ms-surface/0006-surface-sam"; - patch = patches + "/5.13/0006-surface-sam.patch"; - } - { - name = "ms-surface/0007-surface-hotplug"; - patch = patches + "/5.13/0007-surface-hotplug.patch"; - } - { - name = "ms-surface/0008-surface-typecover"; - patch = patches + "/5.13/0008-surface-typecover.patch"; - } - { - name = "ms-surface/0009-cameras"; - patch = patches + "/5.13/0009-cameras.patch"; - } - { - name = "ms-surface/0010-amd-gpio"; - patch = patches + "/5.13/0010-amd-gpio.patch"; - } - { - name = "ms-surface/0011-amd-s0ix"; - patch = patches + "/5.13/0011-amd-s0ix.patch"; - } - ]; -in (with pkgs; - recurseIntoAttrs (linuxPackagesFor (callPackage ./linux-5.13.4.nix { - kernelPatches = surface_kernelPatches; - }))) diff --git a/microsoft/surface/kernel/linux-5.13.4/linux-5.13.4.nix b/microsoft/surface/kernel/linux-5.13.4/linux-5.13.4.nix deleted file mode 100644 index 025d72ed..00000000 --- a/microsoft/surface/kernel/linux-5.13.4/linux-5.13.4.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ lib, stdenv, buildPackages, fetchurl, perl, buildLinux -, modDirVersionArg ? null, ... }@args: - -with lib; - -buildLinux (args // rec { - version = "5.13.4"; - - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = if (modDirVersionArg == null) then - concatStringsSep "." (take 3 (splitVersion "${version}.0")) - else - modDirVersionArg; - - # branchVersion needs to be x.y - extraMeta.branch = versions.majorMinor version; - - src = fetchurl { - url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "7192cd2f654aa6083451dea01b80748fe1eebcf2476a589ef4146590030e7d6c"; - }; -} // (args.argsOverride or { })) diff --git a/microsoft/surface/kernel/linux-5.16.11.nix b/microsoft/surface/kernel/linux-5.16.11.nix new file mode 100644 index 00000000..022c0692 --- /dev/null +++ b/microsoft/surface/kernel/linux-5.16.11.nix @@ -0,0 +1,87 @@ +{ lib, callPackage, linuxPackagesFor, ... }: +# To test the kernel build: +# nix-build -E "with import {}; (pkgs.callPackage ./linux-5.16.11.nix {}).kernel" +let + repos = callPackage ../repos.nix {}; + linuxPkg = { fetchurl, buildLinux, ... }@args: + buildLinux (args // rec { + version = "5.16.11"; + modDirVersion = version; + extraMeta.branch = "5.16"; + + src = repos.linux-surface-kernel; + + kernelPatches = [{ + name = "microsoft-surface-patches-linux-5.16.2"; + patch = null; + structuredExtraConfig = with lib.kernel; { + # + # Surface Aggregator Module + # + SURFACE_AGGREGATOR = module; + SURFACE_AGGREGATOR_ERROR_INJECTION = no; + SURFACE_AGGREGATOR_BUS = yes; + SURFACE_AGGREGATOR_CDEV = module; + SURFACE_AGGREGATOR_REGISTRY = 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 laptop 1 keyboard + # + SERIAL_DEV_BUS = yes; + SERIAL_DEV_CTRL_TTYPORT = yes; + + # + # Surface Hotplug + # + SURFACE_HOTPLUG = 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_IPU3_IMGU = module; + VIDEO_IPU3_CIO2 = module; + CIO2_BRIDGE = yes; + INTEL_SKL_INT3472 = module; + + # + # Cameras: Sensor drivers + # + VIDEO_OV5693 = 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_BUTTON = module; + SURFACE_3_POWER_OPREGION = module; + SURFACE_PRO3_BUTTON = module; + SURFACE_GPE = module; + SURFACE_BOOK1_DGPU_SWITCH = module; + }; + }]; + } // (args.argsOverride or {})); +in lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg {})) diff --git a/microsoft/surface/repos.nix b/microsoft/surface/repos.nix index 21327c4b..1ee00b9a 100644 --- a/microsoft/surface/repos.nix +++ b/microsoft/surface/repos.nix @@ -1,9 +1,9 @@ { lib, pkgs, fetchFromGitHub, fetchurl }: { - linux-surface = fetchFromGitHub { + linux-surface-kernel = fetchFromGitHub { owner = "linux-surface"; - repo = "linux-surface"; - rev = "4130746c31606aebaccef58997b650beda9049f7"; - sha256 = "0r74z0hj3rg8bn2arh2zj8p7awk7fi14gpyrs5h44lwxw4351xky"; + repo = "kernel"; + rev = "db94c89f56d6ceae03ca3802e11197f48e6c539f"; + sha256 = "0c58ri0i9gdb4w7l361pnkvq6ap17kmgnxngh0bcdmgn4dc88wx2"; }; ath10k-firmware = fetchFromGitHub { @@ -13,12 +13,6 @@ sha256 = "16a67baxlga8vb43zbby2s7kpp4488vczg3manmr9g3wxnhhb9n3"; }; - surface-go-ath10k-firmware_upstream = fetchurl { - url = "https://support.killernetworking.com/K1535_Debian/board.bin"; - # url="https://www.killernetworking.com/support/K1535_Debian/board.bin"; - sha256 = "0l8wfj8z4jbb31nzqkaxisby0n6061ix01c5di9bq66iby59j8py"; - }; - surface-go-ath10k-firmware_backup = fetchFromGitHub { owner = "mexisme"; repo = "linux-surface_ath10k-firmware"; From b94d24f85565df3ebff8a064d74edfa6ca84d103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 4 Mar 2022 13:36:17 +0100 Subject: [PATCH 0121/1476] rpi2: unset nix.buildCores by default it already sets buildCores == available cores --- raspberry-pi/2/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/raspberry-pi/2/default.nix b/raspberry-pi/2/default.nix index 4774c15f..d22db5b5 100644 --- a/raspberry-pi/2/default.nix +++ b/raspberry-pi/2/default.nix @@ -20,8 +20,6 @@ }; }; - nix.buildCores = 4; - nixpkgs.config.platform = lib.systems.platforms.raspberrypi2; # cpufrequtils doesn't build on ARM From d27442ac2f885b263e84536b23483d740d8f89a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 4 Mar 2022 13:40:16 +0100 Subject: [PATCH 0122/1476] import editorconfig from nixpkgs some sections that were not applicable were left out --- .editorconfig | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..83477a75 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,48 @@ +# EditorConfig configuration for nixpkgs +# https://EditorConfig.org + +# Top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file, utf-8 charset +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +charset = utf-8 + +# Ignore diffs/patches +[*.{diff,patch}] +end_of_line = unset +insert_final_newline = unset +trim_trailing_whitespace = unset + +# see https://nixos.org/nixpkgs/manual/#chap-conventions + +# Match json/lockfiles/markdown/nix/perl/python/ruby/shell/docbook files, set indent to spaces +[*.{json,lock,md,nix,pl,pm,py,rb,sh,xml}] +indent_style = space + +# Match docbook files, set indent width of one +[*.xml] +indent_size = 1 + +# Match json/lockfiles/markdown/nix/ruby files, set indent width of two +[*.{json,lock,md,nix,rb}] +indent_size = 2 + +# Match perl/python/shell scripts, set indent width of four +[*.{pl,pm,py,sh}] +indent_size = 4 + +# Match gemfiles, set indent to spaces with width of two +[Gemfile] +indent_size = 2 +indent_style = space + +# Disable file types or individual files +# some of these files may be auto-generated and/or require significant changes + +[*.{c,h}] +insert_final_newline = unset +trim_trailing_whitespace = unset From 478cc4aa6e029a5afaf75a26ee3601b522b5d217 Mon Sep 17 00:00:00 2001 From: Nicholas Sielicki Date: Sun, 6 Mar 2022 19:25:42 +0000 Subject: [PATCH 0123/1476] make comment more clear that it applies to all igpus, not just intel --- common/gpu/nvidia-disable.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/gpu/nvidia-disable.nix b/common/gpu/nvidia-disable.nix index f2e2158f..c6516af9 100644 --- a/common/gpu/nvidia-disable.nix +++ b/common/gpu/nvidia-disable.nix @@ -1,7 +1,7 @@ { lib, pkgs, ... }: { - # This runs only Intel and nvidia does not drain power. + # This runs only intel/amdgpu igpus and nvidia dgpus do not drain power. ##### disable nvidia, very nice battery life. hardware.nvidiaOptimus.disable = lib.mkDefault true; From b6d10e0e1b1437317e70df529911dc548caa8bd2 Mon Sep 17 00:00:00 2001 From: Nicholas Sielicki Date: Sun, 6 Mar 2022 19:43:06 +0000 Subject: [PATCH 0124/1476] Fix alphabetical sort on readme table --- README.md | 50 +++++++++++++++++++++++++------------------------- flake.nix | 23 ++++++++++++----------- 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 4e0d41ba..b9f5ce77 100644 --- a/README.md +++ b/README.md @@ -72,11 +72,11 @@ See code for all available configurations. | [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | | [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | | [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | -| [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | -| [Asus TUF FX504GD](asus/fx504gd) | `` | +| [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | +| [Asus TUF FX504GD](asus/fx504gd) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Dell G3 3779](dell/g3/3779) | `` | | [Dell Inspiron 5509](dell/inspiron/5509) | `` | @@ -85,7 +85,6 @@ See code for all available configurations. | [Dell Latitude 7490](dell/latitude/7490) | `` | | [Dell Poweredge R7515](dell/poweredge/r7515) | `` | | [Dell Precision 5530](dell/precision/5530) | `` | -| [Dell XPS E7240](dell/e7240) | `` | | [Dell XPS 13 7390](dell/xps/13-7390) | `` | | [Dell XPS 13 9310](dell/xps/13-9310) | `` | | [Dell XPS 13 9343](dell/xps/13-9343) | `` | @@ -93,42 +92,43 @@ See code for all available configurations. | [Dell XPS 13 9370](dell/xps/13-9370) | `` | | [Dell XPS 13 9380](dell/xps/13-9380) | `` | | [Dell XPS 15 7590](dell/xps/15-7590) | `` | -| [Dell XPS 15 9550](dell/xps/15-9550) | `` | +| [Dell XPS 15 9500, nvidia](dell/xps/15-9500/nvidia) | `` | +| [Dell XPS 15 9500](dell/xps/15-9500) | `` | | [Dell XPS 15 9550, nvidia](dell/xps/15-9550/nvidia) | `` | -| [Dell XPS 15 9560](dell/xps/15-9560) | `` | +| [Dell XPS 15 9550](dell/xps/15-9550) | `` | | [Dell XPS 15 9560, intel only](dell/xps/15-9560/intel) | `` | | [Dell XPS 15 9560, nvidia only](dell/xps/15-9560/nvidia) | `` | -| [Dell XPS 15 9500](dell/xps/15-9500) | `` | -| [Dell XPS 15 9500, nvidia](dell/xps/15-9500/nvidia) | `` | +| [Dell XPS 15 9560](dell/xps/15-9560) | `` | | [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | +| [Dell XPS E7240](dell/e7240) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | +| [GPD MicroPC](gpd/micropc) | `` | | [Google Pixelbook](google/pixelbook) | `` | | [HP Elitebook 2560p](hp/elitebook/2560p) | `` | -| [GPD MicroPC](gpd/micropc) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | -| [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | +| [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | | [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | | [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | -| [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | | [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13/yoga) | `` | -| [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | +| [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | | [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | -| [Lenovo ThinkPad P1](thinkpad/p1) | `` | +| [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | | [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | | [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | +| [Lenovo ThinkPad P1](thinkpad/p1) | `` | | [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | -| [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | -| [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | | [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | | [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | +| [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | | [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | +| [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | | [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `` | | [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `` | | [Lenovo ThinkPad T430](lenovo/thinkpad/t430) | `` | -| [Lenovo ThinkPad T440s](lenovo/thinkpad/t440s) | `` | | [Lenovo ThinkPad T440p](lenovo/thinkpad/t440p) | `` | +| [Lenovo ThinkPad T440s](lenovo/thinkpad/t440s) | `` | | [Lenovo ThinkPad T450s](lenovo/thinkpad/t450s) | `` | | [Lenovo ThinkPad T460](lenovo/thinkpad/t460) | `` | | [Lenovo ThinkPad T460s](lenovo/thinkpad/t460s) | `` | @@ -138,7 +138,12 @@ See code for all available configurations. | [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | | [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | | [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | +| [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | +| [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | +| [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | +| [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | | [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | +| [Lenovo ThinkPad X13](lenovo/thinkpad/x13) | `` | | [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | | [Lenovo ThinkPad X200s](lenovo/thinkpad/x200s) | `` | | [Lenovo ThinkPad X220](lenovo/thinkpad/x220) | `` | @@ -147,21 +152,16 @@ See code for all available configurations. | [Lenovo ThinkPad X260](lenovo/thinkpad/x260) | `` | | [Lenovo ThinkPad X270](lenovo/thinkpad/x270) | `` | | [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | -| [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | -| [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | -| [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | -| [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | -| [Lenovo ThinkPad X13](lenovo/thinkpad/x13) | `` | -| [One-Netbook OneNetbook 4](onenetbook/4) | `` | -| [Microsoft Surface Range](microsoft/surface) | `` | -| [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | | [MSI GS60 2QE](msi/gs60) | `` | +| [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | +| [Microsoft Surface Range](microsoft/surface) | `` | +| [One-Netbook OneNetbook 4](onenetbook/4) | `` | | [PC Engines APU](pcengines/apu) | `` | +| [Purism Librem 13v3](purism/librem/13v3) | `` | +| [Purism Librem 15v3](purism/librem/13v3) | `` | | [Raspberry Pi 2](raspberry-pi/2) | `` | | [Raspberry Pi 4](raspberry-pi/4) | `` | | [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | -| [Purism Librem 13v3](purism/librem/13v3) | `` | -| [Purism Librem 15v3](purism/librem/13v3) | `` | | [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | | [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | | [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | diff --git a/flake.nix b/flake.nix index 329c8328..3669436b 100644 --- a/flake.nix +++ b/flake.nix @@ -16,14 +16,14 @@ asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; + dell-e7240 = import ./dell/e7240; dell-g3-3779 = import ./dell/g3/3779; dell-inspiron-5509 = import ./dell/inspiron/5509; dell-inspiron-5515 = import ./dell/inspiron/5515; dell-latitude-3480 = import ./dell/latitude/3480; dell-latitude-7490 = import ./dell/latitude/7490; - dell-precision-5530 = import ./dell/precision/5530; dell-poweredge-r7515 = import ./dell/poweredge/r7515; - dell-e7240 = import ./dell/e7240; + dell-precision-5530 = import ./dell/precision/5530; dell-xps-13-7390 = import ./dell/xps/13-7390; dell-xps-13-9310 = import ./dell/xps/13-9310; dell-xps-13-9343 = import ./dell/xps/13-9343; @@ -31,13 +31,13 @@ dell-xps-13-9370 = import ./dell/xps/13-9370; dell-xps-13-9380 = import ./dell/xps/13-9380; dell-xps-15-7590 = import ./dell/xps/15-7590; + dell-xps-15-9500 = import ./dell/xps/15-9500; + dell-xps-15-9500-nvidia = import ./dell/xps/15-9500/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; dell-xps-15-9560-intel = import ./dell/xps/15-9560/intel; dell-xps-15-9560-nvidia = import ./dell/xps/15-9560/nvidia; - dell-xps-15-9500 = import ./dell/xps/15-9500; - dell-xps-15-9500-nvidia = import ./dell/xps/15-9500/nvidia; dell-xps-17-9710-intel = import ./dell/xps/17-9710/intel; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; google-pixelbook = import ./google/pixelbook; @@ -46,14 +46,14 @@ intel-nuc-8i7beh = import ./intel/nuc/8i7beh; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-thinkpad = import ./lenovo/thinkpad; - lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel; lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; + lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel; lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; lenovo-thinkpad-e495 = import ./lenovo/thinkpad/e495; lenovo-thinkpad-l13 = import ./lenovo/thinkpad/l13; lenovo-thinkpad-l13-yoga = import ./lenovo/thinkpad/l13/yoga; - lenovo-thinkpad-l14-intel = import ./lenovo/thinkpad/l14/intel; lenovo-thinkpad-l14-amd = import ./lenovo/thinkpad/l14/amd; + lenovo-thinkpad-l14-intel = import ./lenovo/thinkpad/l14/intel; lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1; lenovo-thinkpad-p1-gen3 = import ./lenovo/thinkpad/p1/3th-gen; lenovo-thinkpad-p14s-amd-gen2 = import ./lenovo/thinkpad/p14s/amd/gen2; @@ -112,22 +112,23 @@ system76-darp6 = import ./system76/darp6; toshiba-swanky = import ./toshiba/swanky; tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; + common-cpu-amd = import ./common/cpu/amd; common-cpu-intel = import ./common/cpu/intel; common-cpu-intel-kaby-lake = import ./common/cpu/intel/kaby-lake; common-cpu-intel-sandy-bridge = import ./common/cpu/intel/sandy-bridge; - common-gpu-nvidia = import ./common/gpu/nvidia.nix; - common-gpu-nvidia-disable = import ./common/gpu/nvidia-disable.nix; common-gpu-amd = import ./common/gpu/amd; common-gpu-amd-sea-islands = import ./common/gpu/amd/sea-islands; common-gpu-amd-southern-islands = import ./common/gpu/amd/southern-islands; + common-gpu-nvidia = import ./common/gpu/nvidia.nix; + common-gpu-nvidia-disable = import ./common/gpu/nvidia-disable.nix; + common-pc = import ./common/pc; common-pc-hdd = import ./common/pc/hdd; + common-pc-laptop = import ./common/pc/laptop; + common-pc-laptop-acpi_call = import ./common/pc/laptop/acpi_call.nix; common-pc-laptop-hdd = import ./common/pc/laptop/hdd; common-pc-laptop-ssd = import ./common/pc/ssd; - common-pc-laptop-acpi_call = import ./common/pc/laptop/acpi_call.nix; - common-pc-laptop = import ./common/pc/laptop; common-pc-ssd = import ./common/pc/ssd; - common-pc = import ./common/pc; }; }; } From 72d490399892ad8f53f039056c27940a397ee6b8 Mon Sep 17 00:00:00 2001 From: Nicholas Sielicki Date: Sun, 6 Mar 2022 19:43:55 +0000 Subject: [PATCH 0125/1476] add lenovo legion 5 15ARH05H --- README.md | 1 + flake.nix | 1 + lenovo/legion/15arh05h/default.nix | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 lenovo/legion/15arh05h/default.nix diff --git a/README.md b/README.md index b9f5ce77..9b2338ab 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,7 @@ See code for all available configurations. | [HP Elitebook 2560p](hp/elitebook/2560p) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | +| [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | | [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | diff --git a/flake.nix b/flake.nix index 3669436b..f8b88d4a 100644 --- a/flake.nix +++ b/flake.nix @@ -45,6 +45,7 @@ hp-elitebook-2560p = import ./hp/elitebook/2560p; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; + lenovo-legion-15arh05h = import ./lenovo/legion/15arh05h; lenovo-thinkpad = import ./lenovo/thinkpad; lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel; diff --git a/lenovo/legion/15arh05h/default.nix b/lenovo/legion/15arh05h/default.nix new file mode 100644 index 00000000..16627486 --- /dev/null +++ b/lenovo/legion/15arh05h/default.nix @@ -0,0 +1,20 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/gpu/nvidia.nix + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + # Specify bus id of Nvidia and Intel graphics. + hardware.nvidia.prime = { + amdgpuBusId = "PCI:6:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + + # Cooling management + services.thermald.enable = lib.mkDefault true; + +} From 10f6346d98a2c1fc63d87d709fa3ef7f75215c9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 02:02:31 +0000 Subject: [PATCH 0126/1476] build(deps): bump actions/checkout from 2 to 3 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout 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 8e75b05a..e8a35d75 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ jobs: tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: cachix/install-nix-action@v16 with: nix_path: nixpkgs=channel:nixos-unstable From f7244a341fc1318a744d9bdf42d34a88581fb508 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Wed, 2 Feb 2022 11:11:11 -0600 Subject: [PATCH 0127/1476] feat(framework): Add initial settings - Enable deep sleep - Use kernel that's 5.12 or latest - Enable fingerprint scanner - HiDPI --- flake.nix | 1 + framework/default.nix | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 framework/default.nix diff --git a/flake.nix b/flake.nix index f8b88d4a..a6b05aa3 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,7 @@ dell-xps-15-9560-intel = import ./dell/xps/15-9560/intel; dell-xps-15-9560-nvidia = import ./dell/xps/15-9560/nvidia; dell-xps-17-9710-intel = import ./dell/xps/17-9710/intel; + framework = import ./framework; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; google-pixelbook = import ./google/pixelbook; gpd-micropc = import ./gpd/micropc; diff --git a/framework/default.nix b/framework/default.nix new file mode 100644 index 00000000..d36b5955 --- /dev/null +++ b/framework/default.nix @@ -0,0 +1,27 @@ +{ lib, pkgs, ... }: { + imports = [ + ../common/cpu/intel + ../common/pc/laptop + ../common/pc/laptop/ssd + ]; + + # For Power consumption + # https://kvark.github.io/linux/framework/2021/10/17/framework-nixos.html + boot.kernelParams = [ "mem_sleep_default=deep" ]; + + # Requires at least 5.12 for working wi-fi and bluetooth. + # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (lib.mkDefault pkgs.linuxPackages_latest); + + # For fingerprint support + services.fprintd.enable = true; + + # HiDPI + hardware.video.hidpi.enable = lib.mkDefault true; + services.xserver.dpi = 200; + environment.variables = { + GDK_SCALE = "2"; + GDK_DPI_SCALE = "0.5"; + _JAVA_OPTIONS = "-Dsun.java2d.uiScale=2"; + }; +} From 4a7e3d64f496be6636fefeaf0024eb752fc3320c Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Fri, 4 Feb 2022 10:06:29 -0600 Subject: [PATCH 0128/1476] fix(framework): Follow x1 QHD settings --- framework/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/framework/default.nix b/framework/default.nix index d36b5955..3cfa523b 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -17,11 +17,16 @@ services.fprintd.enable = true; # HiDPI - hardware.video.hidpi.enable = lib.mkDefault true; + # Leaving here for documentation + # hardware.video.hidpi.enable = lib.mkDefault true; + + # Fix font sizes in X services.xserver.dpi = 200; + fonts.fontconfig.dpi = 200; + + # Fix sizes of GTK/GNOME ui elements environment.variables = { - GDK_SCALE = "2"; - GDK_DPI_SCALE = "0.5"; - _JAVA_OPTIONS = "-Dsun.java2d.uiScale=2"; + GDK_SCALE = lib.mkDefault "2"; + GDK_DPI_SCALE = lib.mkDefault "0.5"; }; } From d0fd296ecd5bdaa8c03723489ddda73143afb7a4 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Fri, 4 Feb 2022 10:10:45 -0600 Subject: [PATCH 0129/1476] docs: Add framework --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9b2338ab..9503c1ec 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,7 @@ See code for all available configurations. | [Dell XPS 15 9560](dell/xps/15-9560) | `` | | [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | | [Dell XPS E7240](dell/e7240) | `` | +| [Framework](framework) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [GPD MicroPC](gpd/micropc) | `` | | [Google Pixelbook](google/pixelbook) | `` | From 59753d2f8a2b0f56174d401d2edec31c0623301d Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Fri, 4 Feb 2022 10:20:10 -0600 Subject: [PATCH 0130/1476] fix(framework): Remove fonts.fontconfig.dpi It no longer has any effect and tests fail then. --- framework/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/framework/default.nix b/framework/default.nix index 3cfa523b..1b9a29bf 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -22,7 +22,6 @@ # Fix font sizes in X services.xserver.dpi = 200; - fonts.fontconfig.dpi = 200; # Fix sizes of GTK/GNOME ui elements environment.variables = { From 081907627cf036c4259cd22260c041ac462ea0da Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Tue, 8 Mar 2022 09:17:02 -0600 Subject: [PATCH 0131/1476] fix(framework): Drop GTK environment variables https://github.com/NixOS/nixos-hardware/pull/376 --- framework/default.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/framework/default.nix b/framework/default.nix index 1b9a29bf..678f78c3 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -21,11 +21,5 @@ # hardware.video.hidpi.enable = lib.mkDefault true; # Fix font sizes in X - services.xserver.dpi = 200; - - # Fix sizes of GTK/GNOME ui elements - environment.variables = { - GDK_SCALE = lib.mkDefault "2"; - GDK_DPI_SCALE = lib.mkDefault "0.5"; - }; + # services.xserver.dpi = 200; } From abd470874bcbe9be30209a04724dd6b17f4d93f7 Mon Sep 17 00:00:00 2001 From: Martino Fontana Date: Wed, 16 Mar 2022 17:01:29 +0100 Subject: [PATCH 0132/1476] AMD: Prefer RADV --- common/gpu/amd/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix index 30252de5..b11854d4 100644 --- a/common/gpu/amd/default.nix +++ b/common/gpu/amd/default.nix @@ -18,4 +18,6 @@ driSupport = lib.mkDefault true; driSupport32Bit = lib.mkDefault true; }; + + environment.variables.AMD_VULKAN_ICD = "RADV"; } From 83c1cd4a5a9dc813ee9aa112e00df0943ceb3df4 Mon Sep 17 00:00:00 2001 From: Markus Schneider Date: Wed, 16 Mar 2022 18:25:14 +0100 Subject: [PATCH 0133/1476] add support for lenovo X1 yoga --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/x1/yoga/default.nix | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100644 lenovo/thinkpad/x1/yoga/default.nix diff --git a/README.md b/README.md index 9503c1ec..1acfe193 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,7 @@ See code for all available configurations. | [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | | [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | | [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | +| [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | | [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | | [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | | [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | diff --git a/flake.nix b/flake.nix index a6b05aa3..68ff7206 100644 --- a/flake.nix +++ b/flake.nix @@ -80,6 +80,7 @@ lenovo-thinkpad-t495 = import ./lenovo/thinkpad/t495; lenovo-thinkpad-t550 = import ./lenovo/thinkpad/t550; lenovo-thinkpad-x1 = import ./lenovo/thinkpad/x1; + lenovo-thinkpad-x1-yoga = import ./lenovo/thinkpad/x1/yoga; lenovo-thinkpad-x1-6th-gen = import ./lenovo/thinkpad/x1/6th-gen; lenovo-thinkpad-x1-7th-gen = import ./lenovo/thinkpad/x1/7th-gen; lenovo-thinkpad-x1-9th-gen = import ./lenovo/thinkpad/x1/9th-gen; diff --git a/lenovo/thinkpad/x1/yoga/default.nix b/lenovo/thinkpad/x1/yoga/default.nix new file mode 100644 index 00000000..dfabfd41 --- /dev/null +++ b/lenovo/thinkpad/x1/yoga/default.nix @@ -0,0 +1,8 @@ +{ config, lib, ... }: { + imports = [ + ../. + ../../yoga.nix + ]; + + services.xserver.wacom.enable = lib.mkDefault config.services.xserver.enable; +} From 17890dd7589817d657c08558554af398ee764c54 Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Wed, 23 Mar 2022 02:17:40 +0100 Subject: [PATCH 0134/1476] add asus rog zephyrus ga503 Signed-off-by: Mark Sagi-Kazar --- README.md | 1 + asus/zephyrus/ga503/default.nix | 15 +++++++++++++++ flake.nix | 1 + 3 files changed, 17 insertions(+) create mode 100644 asus/zephyrus/ga503/default.nix diff --git a/README.md b/README.md index 9503c1ec..f073dd80 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,7 @@ See code for all available configurations. | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | +| [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Dell G3 3779](dell/g3/3779) | `` | diff --git a/asus/zephyrus/ga503/default.nix b/asus/zephyrus/ga503/default.nix new file mode 100644 index 00000000..de282a14 --- /dev/null +++ b/asus/zephyrus/ga503/default.nix @@ -0,0 +1,15 @@ +{ ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/gpu/nvidia.nix + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:7:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} diff --git a/flake.nix b/flake.nix index a6b05aa3..bee38711 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,7 @@ asus-fx504gd = import ./asus/fx504gd; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; + asus-zephyrus-ga503 = import ./asus/zephyrus/ga503; beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; dell-e7240 = import ./dell/e7240; dell-g3-3779 = import ./dell/g3/3779; From 1e9c05daf2d5fe2b43c011e6d1075a3d9c84e93c Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Wed, 23 Mar 2022 13:26:43 +0100 Subject: [PATCH 0135/1476] fix: asus zephyrus g15 mute button Signed-off-by: Mark Sagi-Kazar --- asus/zephyrus/ga503/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/asus/zephyrus/ga503/default.nix b/asus/zephyrus/ga503/default.nix index de282a14..5597c81a 100644 --- a/asus/zephyrus/ga503/default.nix +++ b/asus/zephyrus/ga503/default.nix @@ -12,4 +12,10 @@ amdgpuBusId = "PCI:7:0:0"; nvidiaBusId = "PCI:1:0:0"; }; + + # fixes mic mute button + services.udev.extraHwdb = '' + evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* + KEYBOARD_KEY_ff31007c=f20 + ''; } From 27e7087af51fbc88ef4a08bce0584b97db97454b Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Wed, 23 Mar 2022 13:33:30 +0100 Subject: [PATCH 0136/1476] Add lenovo legion 7 slim 15ach6 --- README.md | 1 + flake.nix | 1 + lenovo/legion/15ach6/default.nix | 31 +++++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 lenovo/legion/15ach6/default.nix diff --git a/README.md b/README.md index 9503c1ec..08e22524 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,7 @@ See code for all available configurations. | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | +| [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | | [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | diff --git a/flake.nix b/flake.nix index a6b05aa3..618ba963 100644 --- a/flake.nix +++ b/flake.nix @@ -46,6 +46,7 @@ hp-elitebook-2560p = import ./hp/elitebook/2560p; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; + lenovo-legion-15ach6 = import ./lenovo/legion/15ach6; lenovo-legion-15arh05h = import ./lenovo/legion/15arh05h; lenovo-thinkpad = import ./lenovo/thinkpad; lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; diff --git a/lenovo/legion/15ach6/default.nix b/lenovo/legion/15ach6/default.nix new file mode 100644 index 00000000..98326d14 --- /dev/null +++ b/lenovo/legion/15ach6/default.nix @@ -0,0 +1,31 @@ +{ lib, ... }: { + imports = [ + ../../../common/cpu/amd + ../../../common/gpu/amd + ../../../common/gpu/nvidia.nix + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:5:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + + services.thermald.enable = lib.mkDefault true; + + # https://wiki.archlinux.org/title/backlight#Backlight_is_always_at_full_brightness_after_a_reboot_with_amdgpu_driver + systemd.services.fix-brightness = { + before = [ "systemd-backlight@backlight:amdgpu_bl0.service" ]; + description = "Convert 16-bit brightness values to 8-bit before systemd-backlight applies it"; + script = '' + BRIGHTNESS_FILE="/var/lib/systemd/backlight/pci-0000:05:00.0:backlight:amdgpu_bl0" + BRIGHTNESS=$(cat "$BRIGHTNESS_FILE") + BRIGHTNESS=$(($BRIGHTNESS*255/65535)) + BRIGHTNESS=''${BRIGHTNESS/.*} # truncating to int, just in case + echo $BRIGHTNESS > "$BRIGHTNESS_FILE" + ''; + serviceConfig.Type = "oneshot"; + wantedBy = [ "multi-user.target" ]; + }; +} From 8c6b7739005422f9f07dd03e1d434c0e856fb99a Mon Sep 17 00:00:00 2001 From: Guilherme Ananias Date: Thu, 24 Mar 2022 13:43:32 -0300 Subject: [PATCH 0137/1476] add laptop/ssd module to thinkpad-t14 --- lenovo/thinkpad/t14/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/t14/default.nix b/lenovo/thinkpad/t14/default.nix index d783b21a..18802e6e 100644 --- a/lenovo/thinkpad/t14/default.nix +++ b/lenovo/thinkpad/t14/default.nix @@ -4,6 +4,7 @@ imports = [ ../. ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/ssd ]; # For suspending to RAM to work, set Config -> Power -> Sleep State to "Linux" in EFI. From e1b2cf65a7dcf07980a0e238e9af255d5fea3672 Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Mon, 28 Mar 2022 12:11:57 +0200 Subject: [PATCH 0138/1476] add: pinebook-pro --- README.md | 6 +- flake.nix | 1 + pine64/pinebook-pro/README.md | 97 ++++++++ pine64/pinebook-pro/default.nix | 90 +++++++ .../firmware/ap6256-firmware/default.nix | 41 ++++ pine64/pinebook-pro/kernel/default.nix | 90 +++++++ .../pinebook-pro/keyboard-updater/default.nix | 26 ++ pine64/pinebook-pro/overlay.nix | 11 + pine64/pinebook-pro/sound/reset-sound.rb | 227 ++++++++++++++++++ 9 files changed, 586 insertions(+), 3 deletions(-) create mode 100644 pine64/pinebook-pro/README.md create mode 100644 pine64/pinebook-pro/default.nix create mode 100644 pine64/pinebook-pro/firmware/ap6256-firmware/default.nix create mode 100644 pine64/pinebook-pro/kernel/default.nix create mode 100644 pine64/pinebook-pro/keyboard-updater/default.nix create mode 100644 pine64/pinebook-pro/overlay.nix create mode 100644 pine64/pinebook-pro/sound/reset-sound.rb diff --git a/README.md b/README.md index 0d782a81..3978d37e 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,6 @@ There is also experimental flake support. In your `/etc/nixos/flake.nix` add the } ``` - ### Using fetchGit You can fetch the git repository directly: @@ -66,7 +65,7 @@ you can easily pin to a particular revision if you desire more stability. See code for all available configurations. | Model | Path | -|---------------------------------------------------------------------|----------------------------------------------------| +| ------------------------------------------------------------------- | -------------------------------------------------- | | [Acer Aspire 4810T](acer/aspire/4810t) | `` | | [Airis N990](airis/n990) | `` | | [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | @@ -110,7 +109,7 @@ See code for all available configurations. | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | -| [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | +| [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | | [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | @@ -162,6 +161,7 @@ See code for all available configurations. | [Microsoft Surface Range](microsoft/surface) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | | [PC Engines APU](pcengines/apu) | `` | +| [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | | [Purism Librem 13v3](purism/librem/13v3) | `` | | [Purism Librem 15v3](purism/librem/13v3) | `` | | [Raspberry Pi 2](raspberry-pi/2) | `` | diff --git a/flake.nix b/flake.nix index cf698b55..990f44f9 100644 --- a/flake.nix +++ b/flake.nix @@ -103,6 +103,7 @@ msi-gs60 = import ./msi/gs60; onenetbook-4 = import ./onenetbook/4; pcengines-apu = import ./pcengines/apu; + pine64-pinebook-pro = import ./pine64/pinebook-pro; purism-librem-13v3 = import ./purism/librem/13v3; purism-librem-15v3 = import ./purism/librem/15v3; raspberry-pi-2 = import ./raspberry-pi/2; diff --git a/pine64/pinebook-pro/README.md b/pine64/pinebook-pro/README.md new file mode 100644 index 00000000..bde456e3 --- /dev/null +++ b/pine64/pinebook-pro/README.md @@ -0,0 +1,97 @@ +> **NOTE**: This is an attempt to port [samueldr](https://github.com/samueldr/)'s [wip-pinebookpro](https://github.com/samueldr/wip-pinebook-pro) to [nixos-hardware](https://github.com/NixOS/nixos-hardware). Credit for the work done goes to the original authors. + +## Using in your configuration + +To use this configuration simply add this module to your configuration. + +```nix +{ + imports = [ + ${nixos-hardware}/pine64/pinebook-pro + ]; +} +``` + +That entry point will try to maximize the hardware compatibility. + +## Current state + +Currently everything seems to work but this is not guaranteed it will be forever. + +### Kernel + +This uses a pinned kernel that imitates a manually tested version of [Manjaro ARM kernel](https://gitlab.manjaro.org/manjaro-arm/packages/core/linux/-/blob/master/PKGBUILD), this way one can update `nixpkgs` without worrying too much. +This is default kernel but the current mainline kernel `linuxPackages_latest` seems to work too. + +### Known issues + +#### HDMI over Type-C + +HDMI over Type-C works only for the custom kernel and the audio dosen't work (it's an upstream problem). + +#### `rockchipdrm` and `efifb` + +This can be worked around by booting with the `efifb=off` kernel command-line. + +This is already handled for you by this configuration. If using the generic +UEFI AArch64 iso, you will need to add the option yourself to the command-line +using GRUB. + +#### _EFI_ and poweroff + +When booted using EFI, the system will not power off. It will stay seemingly +stuck with the LED and display turned off. + +A [workaround exists](https://github.com/Tow-Boot/Tow-Boot/commit/818cae1b84a7702f2a509927f2819900c2881979#diff-20f50d9d8d5d6c059b87ad66fbc5df26d9fc46251763547ca9bdcc75564a4368), +and is built in recent Tow-Boot (make sure your release is 2021.10-004 or more recent). + +### _Tow-Boot_ + +We highly suggest installing _Tow-Boot_ to the SPI Flash. + +- https://github.com/Tow-Boot/Tow-Boot + +Having the firmware installed to SPI makes the device act basically like a +normal computer. No need for weird incantations to setup the platform boot +firmware. + +Alternatively, starting from the _Tow-Boot_ disk image on eMMC is easier to +deal with and understand than having to deal with _U-Boot_ manually. + +### Mainline _U-Boot_ + +Mainline U-Boot has full support for graphics since 2021.04. The current +unstable relases of Nixpkgs are at 2021.04 at least. + +``` + $ nix-build -A pkgs.ubootPinebookPro +``` + +Note that the default U-Boot build does not do anything with LED on startup. + +## Keyboard firmware + +> **WARNING**: Some hardware batches for the Pinebook Pro ship with the +> wrong chip for the keyboard controller. While it will work with the +> firmware it ships with, it _may brick_ while flashing the updated +> firmware. [See this comment on the firmware repository](https://github.com/jackhumbert/pinebook-pro-keyboard-updater/issues/33#issuecomment-850889285). +> +> It is unclear how to identify said hardware from a running system. + +To determine which keyboard controller you have, you will need to disassemble +the Pinebook Pro as per [the Pine64 +wiki](https://wiki.pine64.org/wiki/Pinebook_Pro#Keyboard), and make sure that +the IC next to the U23 marking on the main board is an **SH68F83**. + +```sh + $ nix-build -A pkgs.pinebookpro-keyboard-updater + $ sudo ./result/bin/updater step-1 + $ sudo poweroff + # ... + $ sudo ./result/bin/updater step-2 + $ sudo poweroff + # ... + $ sudo ./result/bin/updater flash-kb-revised +``` + +Note: poweroff must be used, reboot does not turn the hardware "off" enough. diff --git a/pine64/pinebook-pro/default.nix b/pine64/pinebook-pro/default.nix new file mode 100644 index 00000000..692c56d6 --- /dev/null +++ b/pine64/pinebook-pro/default.nix @@ -0,0 +1,90 @@ +# This configuration file can be safely imported in your system configuration. +{ config, pkgs, lib, ... }: + +{ + nixpkgs.overlays = [ + (import ./overlay.nix) + ]; + + boot.kernelPackages = lib.mkDefault pkgs.pinebookpro-manjaro-kernel; + + # This list of modules is not entirely minified, but represents + # a set of modules that is required for the display to work in stage-1. + # Further minification can be done, but requires trial-and-error mainly. + boot.initrd.kernelModules = [ + # Rockchip modules + "rockchip_rga" + "rockchip_saradc" + "rockchip_thermal" + "rockchipdrm" + + # GPU/Display modules + "analogix_dp" + "cec" + "drm" + "drm_kms_helper" + "dw_hdmi" + "dw_mipi_dsi" + "gpu_sched" + "panel_edp" + "panel_simple" + "panfrost" + "pwm_bl" + + # USB / Type-C related modules + "fusb302" + "tcpm" + "typec" + + # Misc. modules + "cw2015_battery" + "gpio_charger" + "rtc_rk808" + ]; + + services.udev.extraHwdb = lib.mkMerge [ + # https://gitlab.manjaro.org/manjaro-arm/packages/community/pinebookpro-post-install/blob/master/10-usb-kbd.hwdb + '' + evdev:input:b0003v258Ap001E* + KEYBOARD_KEY_700a5=brightnessdown + KEYBOARD_KEY_700a6=brightnessup + KEYBOARD_KEY_70066=sleep + '' + + # https://github.com/elementary/os/blob/05a5a931806d4ed8bc90396e9e91b5ac6155d4d4/build-pinebookpro.sh#L253-L257 + # Disable the "keyboard mouse" in libinput. This is reported by the keyboard firmware + # and is probably a placeholder for a TrackPoint style mouse that doesn't exist + '' + evdev:input:b0003v258Ap001Ee0110-e0,1,2,4,k110,111,112,r0,1,am4,lsfw + ID_INPUT=0 + ID_INPUT_MOUSE=0 + '' + ]; + + # https://github.com/elementary/os/blob/05a5a931806d4ed8bc90396e9e91b5ac6155d4d4/build-pinebookpro.sh#L253-L257 + # Mark the keyboard as internal, so that "disable when typing" works for the touchpad + environment.etc."libinput/local-overrides.quirks".text = '' + [Pinebook Pro Keyboard] + MatchUdevType=keyboard + MatchBus=usb + MatchVendor=0x258A + MatchProduct=0x001E + AttrKeyboardIntegration=internal + ''; + + hardware.enableRedistributableFirmware = true; + hardware.firmware = [ + pkgs.pinebookpro-ap6256-firmware + ]; + + systemd.tmpfiles.rules = [ + # Tweak the minimum frequencies of the GPU and CPU governors to get a bit more performance + # https://github.com/elementary/os/blob/05a5a931806d4ed8bc90396e9e91b5ac6155d4d4/build-pinebookpro.sh#L288-L294 + "w- /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq - - - - 1200000" + "w- /sys/devices/system/cpu/cpufreq/policy4/scaling_min_freq - - - - 1008000" + "w- /sys/class/devfreq/ff9a0000.gpu/min_freq - - - - 600000000" + ]; + + # The default powersave makes the wireless connection unusable. + networking.networkmanager.wifi.powersave = lib.mkDefault false; +} diff --git a/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix b/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix new file mode 100644 index 00000000..3d10f044 --- /dev/null +++ b/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix @@ -0,0 +1,41 @@ +{ lib +, fetchFromGitLab +, fetchurl +, runCommandNoCC +}: + +let + src = fetchFromGitLab { + domain = "gitlab.manjaro.org"; + owner = "manjaro-arm"; + repo = "packages/community/ap6256-firmware"; + rev = "007c6dd132263624db9ea6ce8dde4fc2108f21b7"; + sha256 = "sha256-Agqz05W7Rhl0NNQwpW4aQqs9YZmYyci9OXKzEKA30uk="; + }; +in +runCommandNoCC "pinebookpro-ap6256-firmware" +{ + meta = with lib; { + license = licenses.unfreeRedistributable; + }; +} '' + (PS4=" $ "; set -x + cp ${src}/"BCM4345C5.hcd" "BCM4345C5.hcd" + cp ${src}/"fw_bcm43456c5_ag.bin" "fw_bcm43456c5_ag.bin" + cp ${src}/"brcmfmac43456-sdio.clm_blob" "brcmfmac43456-sdio.clm_blob" + cp ${src}/"nvram_ap6256.txt" "nvram_ap6256.txt" + mkdir -p $out/lib/firmware/brcm + # Bluetooth firmware + install -Dm644 "BCM4345C5.hcd" -t "$out/lib/firmware/" + install -Dm644 "BCM4345C5.hcd" "$out/lib/firmware/brcm/BCM.hcd" + install -Dm644 "BCM4345C5.hcd" -t "$out/lib/firmware/brcm/" + # Wifi firmware + install -Dm644 "nvram_ap6256.txt" -t "$out/lib/firmware/" + install -Dm644 "fw_bcm43456c5_ag.bin" "$out/lib/firmware/brcm/brcmfmac43456-sdio.bin" + install -Dm644 "brcmfmac43456-sdio.clm_blob" "$out/lib/firmware/brcm/brcmfmac43456-sdio.clm_blob" + install -Dm644 "nvram_ap6256.txt" "$out/lib/firmware/brcm/brcmfmac43456-sdio.radxa,rockpi4b.txt" + install -Dm644 "nvram_ap6256.txt" "$out/lib/firmware/brcm/brcmfmac43456-sdio.radxa,rockpi4c.txt" + install -Dm644 "nvram_ap6256.txt" "$out/lib/firmware/brcm/brcmfmac43456-sdio.pine64,pinebook-pro.txt" + install -Dm644 "nvram_ap6256.txt" "$out/lib/firmware/brcm/brcmfmac43456-sdio.pine64,rockpro64-v2.1.txt" + ) +'' diff --git a/pine64/pinebook-pro/kernel/default.nix b/pine64/pinebook-pro/kernel/default.nix new file mode 100644 index 00000000..a900df7b --- /dev/null +++ b/pine64/pinebook-pro/kernel/default.nix @@ -0,0 +1,90 @@ +{ pkgs, ... }: + +let + pinnedNixpkgs = import + (builtins.fetchTarball { + name = "nixos-unstable-2022-03-28"; + url = "https://github.com/nixos/nixpkgs/archive/ce8cbe3c01fd8ee2de526ccd84bbf9b82397a510.tar.gz"; + sha256 = "19xfad7pxsp6nkrkjhn36w77w92m60ysq7njn711slw74yj6ibxv"; + }) + { + system = "aarch64-linux"; + }; + + patches = [ + # Assorted Manjaro ARM patches + "1001-arm64-dts-allwinner-add-hdmi-sound-to-pine-devices.patch" # Pine64 + "1002-arm64-dts-allwinner-add-ohci-ehci-to-h5-nanopi.patch" # Nanopi Neo Plus 2 + "1003-drm-bridge-analogix_dp-Add-enable_psr-param.patch" # Pinebook Pro + "1004-gpu-drm-add-new-display-resolution-2560x1440.patch" # Odroid + "1005-panfrost-Silence-Panfrost-gem-shrinker-loggin.patch" # Panfrost + "1006-arm64-dts-rockchip-Add-Firefly-Station-p1-support.patch" # Firelfy Station P1 + "1007-drm-rockchip-add-support-for-modeline-32MHz-e.patch" # DP Alt Mode + "1008-rk3399-rp64-pcie-Reimplement-rockchip-PCIe-bus-scan-delay.patch" # RockPro64 + "1010-arm64-dts-amlogic-add-initial-Beelink-GT1-Ultimate-dev.patch" # Beelink + "1011-arm64-dts-amlogic-add-meson-g12b-ugoos-am6-plus.patch" # Meson Ugoos + "1012-drm-panfrost-scheduler-improvements.patch" # Panfrost + "1013-arm64-dts-rockchip-Add-PCIe-bus-scan-delay-to-RockPr.patch" # RockPro64 + "1014-drm-rockchip-support-gamma-control-on-RK3399.patch" # RK3399 VOP + "1015-media-rockchip-rga-do-proper-error-checking-in-probe.patch" # Rockchip RGA + "1016-arm64-dts-rockchip-switch-to-hs200-on-rockpi4.patch" # Radxa Rock Pi 4 + "1017-arm64-dts-meson-remove-CPU-opps-below-1GHz-for-G12B-boards.patch" # AMLogic [1/2] + "1018-arm64-dts-meson-remove-CPU-opps-below-1GHz-for-SM1-boards.patch" # AMLogic [2/2] + "1019-arm64-dts-rockchip-Add-PCIe-bus-scan-delay-to-Rock-P.patch" # Radxa Rock Pi 4 + + # Assorted Pinebook, PinePhone and PineTab patches + "2001-Bluetooth-Add-new-quirk-for-broken-local-ext-features.patch" # Bluetooth + "2002-Bluetooth-btrtl-add-support-for-the-RTL8723CS.patch" # Bluetooth + "2003-arm64-allwinner-a64-enable-Bluetooth-On-Pinebook.patch" # Bluetooth + "2004-arm64-dts-allwinner-enable-bluetooth-pinetab-pinepho.patch" # Bluetooth + "2005-staging-add-rtl8723cs-driver.patch" # Realtek WiFi + "2006-arm64-dts-allwinner-pinetab-add-accelerometer.patch" # Accelerometer + "2007-arm64-dts-allwinner-pinetab-enable-jack-detection.patch" # Audio + "2008-brcmfmac-USB-probing-provides-no-board-type.patch" # Bluetooth + "2009-dts-rockchip-Adapt-and-adopt-Type-C-support-from-Pin.patch" # DP Alt Mode + + # Pinebook Pro Type-C patches from megous; original patch numbers found + # on https://xff.cz/kernels/5.17/patches/ are retained, with just the first + # digit changed from 0 to 3, to make tracking easier + "3170-arm64-dts-rk3399-pinebook-pro-Fix-USB-PD-charging.patch" + "3172-arm64-dts-rk3399-pinebook-pro-Improve-Type-C-support.patch" + "3174-arm64-dts-rk3399-pinebook-pro-Remove-redundant-pinct.patch" + "3178-arm64-dts-rk3399-pinebook-pro-Don-t-allow-usb2-phy-d.patch" + "3339-drm-rockchip-cdn-dp-Disable-CDN-DP-on-disconnect.patch" + "3355-usb-typec-fusb302-Set-the-current-before-enabling-pu.patch" + "3359-usb-typec-fusb302-Update-VBUS-state-even-if-VBUS-int.patch" + "3361-usb-typec-fusb302-Add-OF-extcon-support.patch" + "3362-usb-typec-fusb302-Fix-register-definitions.patch" + "3363-usb-typec-fusb302-Clear-interrupts-before-we-start-t.patch" + "3364-usb-typec-typec-extcon-Add-typec-extcon-bridge-drive.patch" + "3365-phy-rockchip-typec-Make-sure-the-plug-orientation-is.patch" + "3372-phy-rockchip-inno-usb2-More-robust-charger-detection.patch" + "3373-usb-typec-extcon-Don-t-touch-charger-proprties.patch" + ]; + + manjaro-patches = pinnedNixpkgs.fetchgit { + url = "https://gitlab.manjaro.org/manjaro-arm/packages/core/linux.git"; + rev = "d68667dfeb33a40a1ee5d6563ff4815e57ed9084"; + sha256 = "04wb8nx5yw1r044i2cnd1dy4fc7whgn343iid0gqmyg5rk1ack2v"; + }; + + create-patch = p: { + name = p; + patch = "${manjaro-patches}/${p}"; + }; + + manjaro-kernel = pinnedNixpkgs.linuxPackagesFor (pinnedNixpkgs.linuxKernel.kernels.linux_5_16.override { + argsOverride = rec { + kernelPatches = map create-patch patches; + version = "5.16.18"; + modDirVersion = version; + src = builtins.fetchurl { + url = "https://www.kernel.org/pub/linux/kernel/v5.x/linux-${version}.tar.xz"; + sha256 = "sha256:096f80m2czj8khvil7s037pqdf1s6pklqn5d9419jqkz7v70piry"; + }; + }; + }); +in +{ + inherit manjaro-kernel; +} diff --git a/pine64/pinebook-pro/keyboard-updater/default.nix b/pine64/pinebook-pro/keyboard-updater/default.nix new file mode 100644 index 00000000..3f3cf712 --- /dev/null +++ b/pine64/pinebook-pro/keyboard-updater/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchFromGitHub, xxd, libusb }: + +stdenv.mkDerivation { + pname = "pinebook-pro-keyboard-updater"; + version = "2021-07-28"; + + nativeBuildInputs = [ + xxd + ]; + + buildInputs = [ + libusb + ]; + + installPhase = '' + mkdir -p $out/bin + cp -v updater $out/bin + ''; + + src = fetchFromGitHub { + owner = "dragan-simic"; + repo = "pinebook-pro-keyboard-updater"; + rev = "bd8d2ea48992b3e6ddd0b9435d21b74cdcf97224"; + hash = "sha256-3+Qsa5lk1EJrLvPSyWthqBMTqJCigbJSmnsS6hdu+w8="; + }; +} diff --git a/pine64/pinebook-pro/overlay.nix b/pine64/pinebook-pro/overlay.nix new file mode 100644 index 00000000..9cc4f50e --- /dev/null +++ b/pine64/pinebook-pro/overlay.nix @@ -0,0 +1,11 @@ +final: super: + +let + inherit (final) callPackage kernelPatches linuxPackagesFor; + kernels = callPackage ./kernel { }; +in +{ + pinebookpro-manjaro-kernel = kernels.manjaro-kernel; + pinebookpro-ap6256-firmware = callPackage ./firmware/ap6256-firmware { }; + pinebookpro-keyboard-updater = callPackage ./keyboard-updater { }; +} diff --git a/pine64/pinebook-pro/sound/reset-sound.rb b/pine64/pinebook-pro/sound/reset-sound.rb new file mode 100644 index 00000000..d92c2b74 --- /dev/null +++ b/pine64/pinebook-pro/sound/reset-sound.rb @@ -0,0 +1,227 @@ +#!/usr/bin/env nix-shell +#! nix-shell -p ruby alsaUtils -i ruby + +# This script resets the sound state to the minimum required for it to work. +# It will set the control that pulseaudio uses to 20%, everything else to the +# level expected for it to work. The rest will be off or to their default. + +require "open3" +require "shellwords" + +def run(*cmd) + puts " $ #{cmd.shelljoin}" + system(*cmd) +end + +FINAL_STATE = { + ## Simple mixer control 'Headphone',0 + ## Capabilities: pvolume + ## Playback channels: Front Left - Front Right + ## Limits: Playback 0 - 3 + ## Mono: + ## Front Left: Playback 0 [0%] [-48.00dB] + ## Front Right: Playback 0 [0%] [-48.00dB] + "Headphone,0" => "20%", + ## Simple mixer control 'Headphone Mixer',0 + ## Capabilities: volume + ## Playback channels: Front Left - Front Right + ## Capture channels: Front Left - Front Right + ## Limits: 0 - 11 + ## Front Left: 0 [0%] [-12.00dB] + ## Front Right: 0 [0%] [-12.00dB] + "Headphone Mixer,0" => "0", + ## Simple mixer control 'Mic Boost',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [on] + "Mic Boost,0" => "off", + ## Simple mixer control 'Playback Polarity',0 + ## Capabilities: enum + ## Items: 'Normal' 'R Invert' 'L Invert' 'L + R Invert' + ## Item0: 'Normal' + "Playback Polarity,0" => "L Invert", + ## Simple mixer control 'Capture Polarity',0 + ## Capabilities: enum + ## Items: 'Normal' 'Invert' + ## Item0: 'Normal' + "Capture Polarity,0" => "Normal", + ## Simple mixer control 'ADC',0 + ## Capabilities: cvolume cvolume-joined + ## Capture channels: Mono + ## Limits: Capture 0 - 192 + ## Mono: Capture 0 [0%] [-99999.99dB] + "ADC,0" => "0", + ## Simple mixer control 'ADC Double Fs',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "ADC Double Fs,0" => "off", + ## Simple mixer control 'ADC PGA Gain',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 10 + ## Mono: 0 [0%] + "ADC PGA Gain,0" => "0", + ## Simple mixer control 'ADC Soft Ramp',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [on] + "ADC Soft Ramp,0" => "on", + ## Simple mixer control 'ALC',0 + ## Capabilities: cswitch cswitch-joined + ## Capture channels: Mono + ## Mono: Capture [off] + "ALC,0" => "nocap", + ## Simple mixer control 'ALC Capture Attack Time',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 10 + ## Mono: 0 [0%] + "ALC Capture Attack Time,0" => "0", + ## Simple mixer control 'ALC Capture Decay Time',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 10 + ## Mono: 0 [0%] + "ALC Capture Decay Time,0" => "0", + ## Simple mixer control 'ALC Capture Hold Time',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 10 + ## Mono: 0 [0%] + "ALC Capture Hold Time,0" => "0", + ## Simple mixer control 'ALC Capture Max',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 28 + ## Mono: 0 [0%] [-6.50dB] + "ALC Capture Max,0" => "0", + ## Simple mixer control 'ALC Capture Min',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 28 + ## Mono: 0 [0%] [-12.00dB] + "ALC Capture Min,0" => "0", + ## Simple mixer control 'ALC Capture Noise Gate',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "ALC Capture Noise Gate,0" => "off", + ## Simple mixer control 'ALC Capture Noise Gate Threshold',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 31 + ## Mono: 0 [0%] + "ALC Capture Noise Gate Threshold,0" => "0", + ## Simple mixer control 'ALC Capture Noise Gate Type',0 + ## Capabilities: enum + ## Items: 'Constant PGA Gain' 'Mute ADC Output' + ## Item0: 'Constant PGA Gain' + "ALC Capture Noise Gate Type,0" => "Constant PGA Gain", + ## Simple mixer control 'ALC Capture Target',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 10 + ## Mono: 0 [0%] [-16.50dB] + "ALC Capture Target,0" => "0", + ## Simple mixer control 'DAC',0 + ## Capabilities: pvolume + ## Playback channels: Front Left - Front Right + ## Limits: Playback 0 - 192 + ## Mono: + ## Front Left: Playback 0 [0%] [-99999.99dB] + ## Front Right: Playback 0 [0%] [-99999.99dB] + "DAC,0" => "100%", + ## Simple mixer control 'DAC Double Fs',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "DAC Double Fs,0" => "off", + ## Simple mixer control 'DAC Mono Mix',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "DAC Mono Mix,0" => "off", + ## Simple mixer control 'DAC Notch Filter',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "DAC Notch Filter,0" => "off", + ## Simple mixer control 'DAC Soft Ramp',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [on] + "DAC Soft Ramp,0" => "on", + ## Simple mixer control 'DAC Soft Ramp Rate',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 4 + ## Mono: 0 [0%] + "DAC Soft Ramp Rate,0" => "0", + ## Simple mixer control 'DAC Source Mux',0 + ## Capabilities: enum + ## Items: 'LDATA TO LDAC, RDATA TO RDAC' 'LDATA TO LDAC, LDATA TO RDAC' 'RDATA TO LDAC, RDATA TO RDAC' 'RDATA TO LDAC, LDATA TO RDAC' + ## Item0: 'LDATA TO LDAC, RDATA TO RDAC' + "DAC Source Mux,0" => "LDATA TO LDAC, RDATA TO RDAC", + ## Simple mixer control 'DAC Stereo Enhancement',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 7 + ## Mono: 0 [0%] + "DAC Stereo Enhancement,0" => "0", + ## Simple mixer control 'Differential Mux',0 + ## Capabilities: enum + ## Items: 'lin1-rin1' 'lin2-rin2' 'lin1-rin1 with 20db Boost' 'lin2-rin2 with 20db Boost' + ## Item0: 'lin1-rin1' + "Differential Mux,0" => "lin1-rin1", + ## Simple mixer control 'Digital Mic Mux',0 + ## Capabilities: enum + ## Items: 'dmic disable' 'dmic data at high level' 'dmic data at low level' + ## Item0: 'dmic disable' + "Digital Mic Mux,0" => "dmic disable", + ## Simple mixer control 'Left Headphone Mixer LLIN',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "Left Headphone Mixer LLIN,0" => "off", + ## Simple mixer control 'Left Headphone Mixer Left DAC',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "Left Headphone Mixer Left DAC,0" => "on", + ## Simple mixer control 'Left Headphone Mux',0 + ## Capabilities: enum + ## Items: 'lin1-rin1' 'lin2-rin2' 'lin-rin with Boost' 'lin-rin with Boost and PGA' + ## Item0: 'lin1-rin1' + "Left Headphone Mux,0" => "lin1-rin1", + ## Simple mixer control 'Right Headphone Mixer RLIN',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "Right Headphone Mixer RLIN,0" => "off", + ## Simple mixer control 'Right Headphone Mixer Right DAC',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "Right Headphone Mixer Right DAC,0" => "on", + ## Simple mixer control 'Right Headphone Mux',0 + ## Capabilities: enum + ## Items: 'lin1-rin1' 'lin2-rin2' 'lin-rin with Boost' 'lin-rin with Boost and PGA' + ## Item0: 'lin1-rin1' + "Right Headphone Mux,0" => "lin1-rin1", +} + +FINAL_STATE.each do |name, value| + run("amixer", "-c0", "sset", name, value.to_s) + raise "Error setting #{name} to #{value}" unless $?.success? +end From ae3ac92431a5d0614e961043643bfc852ee09d41 Mon Sep 17 00:00:00 2001 From: vroad <396351+vroad@users.noreply.github.com> Date: Thu, 31 Mar 2022 10:44:20 +0900 Subject: [PATCH 0139/1476] Remove swappiness config --- common/pc/hdd/default.nix | 6 +----- common/pc/ssd/default.nix | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/common/pc/hdd/default.nix b/common/pc/hdd/default.nix index 8cc5ada0..869badb2 100644 --- a/common/pc/hdd/default.nix +++ b/common/pc/hdd/default.nix @@ -1,7 +1,3 @@ { lib, ... }: -{ - boot.kernel.sysctl = { - "vm.swappiness" = lib.mkDefault 10; - }; -} +{} diff --git a/common/pc/ssd/default.nix b/common/pc/ssd/default.nix index 00922e64..c29d03b4 100644 --- a/common/pc/ssd/default.nix +++ b/common/pc/ssd/default.nix @@ -1,9 +1,5 @@ { lib, ... }: { - boot.kernel.sysctl = { - "vm.swappiness" = lib.mkDefault 1; - }; - services.fstrim.enable = lib.mkDefault true; } From 638263b724cbddd0ed36fd3cb928c966506e9fa4 Mon Sep 17 00:00:00 2001 From: workflow <4farlion@gmail.com> Date: Fri, 1 Apr 2022 09:42:10 +0100 Subject: [PATCH 0140/1476] Add Dell XPS 17 9700 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ivan Malison Co-authored-by: Jörg Thalheim --- CONTRIBUTING.md | 2 +- README.md | 2 + dell/xps/17-9700/README.wiki | 62 +++++++++++++++++++++++++++++ dell/xps/17-9700/common.nix | 27 +++++++++++++ dell/xps/17-9700/intel/default.nix | 10 +++++ dell/xps/17-9700/nvidia/default.nix | 15 +++++++ flake.nix | 2 + 7 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 dell/xps/17-9700/README.wiki create mode 100644 dell/xps/17-9700/common.nix create mode 100644 dell/xps/17-9700/intel/default.nix create mode 100644 dell/xps/17-9700/nvidia/default.nix diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ea468923..30f8aecb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,7 @@ Where possible, use module imports to share code between similar hardware varian # Performance -Profiles should favor usability and stability, so performance improvements should either be conservative or +Profiles should favor usability and stability, so performance improvements should either be conservative or be guarded behind additional NixOS module options. If it makes sense to have a performance-focussed config, it can be declared in a separate profile. diff --git a/README.md b/README.md index 0d782a81..d5f81abf 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,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 17 9700, intel](dell/xps/15-9700/intel) | `` | | [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/xps/17-9700/README.wiki b/dell/xps/17-9700/README.wiki new file mode 100644 index 00000000..4c4585d1 --- /dev/null +++ b/dell/xps/17-9700/README.wiki @@ -0,0 +1,62 @@ += Dell XPS 17 9700 = + +== Tested Hardware == +CPU: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz +Screen: 17" FHD(1920x1200) InfinityEdge + +00:00.0 Host bridge: Intel Corporation 10th Gen Core Processor Host Bridge/DRAM Registers (rev 02) +00:01.0 PCI bridge: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) (rev 02) +00:02.0 VGA compatible controller: Intel Corporation CometLake-H GT2 [UHD Graphics] (rev 05) +00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 02) +00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model +00:12.0 Signal processing controller: Intel Corporation Comet Lake PCH Thermal Controller +00:13.0 Serial controller: Intel Corporation Device 06fc +00:14.0 USB controller: Intel Corporation Comet Lake USB 3.1 xHCI Host Controller +00:14.2 RAM memory: Intel Corporation Comet Lake PCH Shared SRAM +00:14.3 Network controller: Intel Corporation Comet Lake PCH CNVi WiFi +00:15.0 Serial bus controller [0c80]: Intel Corporation Comet Lake PCH Serial IO I2C Controller #0 +00:15.1 Serial bus controller [0c80]: Intel Corporation Comet Lake PCH Serial IO I2C Controller #1 +00:16.0 Communication controller: Intel Corporation Comet Lake HECI Controller +00:1b.0 PCI bridge: Intel Corporation Comet Lake PCI Express Root Port #17 (rev f0) +00:1c.0 PCI bridge: Intel Corporation Device 06b8 (rev f0) +00:1c.4 PCI bridge: Intel Corporation Device 06bc (rev f0) +00:1d.0 PCI bridge: Intel Corporation Comet Lake PCI Express Root Port #9 (rev f0) +00:1f.0 ISA bridge: Intel Corporation Device 068e +00:1f.3 Multimedia audio controller: Intel Corporation Comet Lake PCH cAVS +00:1f.4 SMBus: Intel Corporation Comet Lake PCH SMBus Controller +00:1f.5 Serial bus controller [0c80]: Intel Corporation Comet Lake PCH SPI Controller +01:00.0 3D controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Ti Mobile] (rev ff) +02:00.0 Non-Volatile memory controller: SK hynix Device 1639 +03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5260 PCI Express Card Reader (rev 01) +04:00.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06) +05:00.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06) +05:01.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06) +05:02.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06) +05:04.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06) +06:00.0 System peripheral: Intel Corporation JHL7540 Thunderbolt 3 NHI [Titan Ridge 4C 2018] (rev 06) +3a:00.0 USB controller: Intel Corporation JHL7540 Thunderbolt 3 USB Controller [Titan Ridge 4C 2018] (rev 06) +6e:00.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06) +6f:00.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06) +6f:01.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06) +6f:02.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06) +6f:04.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06) +70:00.0 System peripheral: Intel Corporation JHL7540 Thunderbolt 3 NHI [Titan Ridge 4C 2018] (rev 06) +a4:00.0 USB controller: Intel Corporation JHL7540 Thunderbolt 3 USB Controller [Titan Ridge 4C 2018] (rev 06) + + +== Firmware Configuration == + +Not much tweaking of NixOS itself was needed. But we currently cannot automate +the firmware setup, so this must be done by hand. + +=== Before installation === + +These settings are needed both for booting the final install, and installer +itself. Therefore, they must be done first. + +* ''Disable Secure Boot (but keep UEFI Boot).'' Thankfully doing so is as easy as + changing any other simple setting. + +* ''Disable Intel hardware RAID and use AHCI instead.'' Intel doesn't seem to + provide a working linux drivr for this. (If you just have SSD it's pointless + and just slows things down needlessly anyways.) diff --git a/dell/xps/17-9700/common.nix b/dell/xps/17-9700/common.nix new file mode 100644 index 00000000..986da90a --- /dev/null +++ b/dell/xps/17-9700/common.nix @@ -0,0 +1,27 @@ +{ lib, pkgs, ... }: + +{ + # Boot loader + boot.kernelParams = lib.mkDefault [ "acpi_rev_override" ]; + boot.kernelModules = lib.mkDefault [ "kvm-intel" ]; + + hardware.enableRedistributableFirmware = lib.mkDefault true; + + # This will save you money and possibly your life! + services.thermald.enable = lib.mkDefault true; + + boot.kernelPatches = [{ + name = "enable-soundwire-drivers"; + patch = null; + extraConfig = '' + SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES y + SND_SOC_INTEL_SOUNDWIRE_SOF_MACH m + SND_SOC_RT1308 m + ''; + ignoreConfigErrors = true; + }]; + + boot.kernelPackages = + lib.mkIf (lib.versionOlder pkgs.linux.version "5.11") + pkgs.linuxPackages_latest; +} diff --git a/dell/xps/17-9700/intel/default.nix b/dell/xps/17-9700/intel/default.nix new file mode 100644 index 00000000..4a9a1687 --- /dev/null +++ b/dell/xps/17-9700/intel/default.nix @@ -0,0 +1,10 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../../../common/cpu/intel + ../../../../common/pc/laptop + ../../../../common/gpu/nvidia-disable.nix + ../common.nix + ]; +} diff --git a/dell/xps/17-9700/nvidia/default.nix b/dell/xps/17-9700/nvidia/default.nix new file mode 100644 index 00000000..8002870b --- /dev/null +++ b/dell/xps/17-9700/nvidia/default.nix @@ -0,0 +1,15 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../../../common/cpu/intel + ../../../../common/pc/laptop + ../../../../common/gpu/nvidia.nix + ../common.nix + ]; + + hardware.nvidia.prime = { + nvidiaBusId = lib.mkDefault "PCI:1:0:0"; + intelBusId = lib.mkDefault "PCI:0:2:0"; + }; +} diff --git a/flake.nix b/flake.nix index cf698b55..1057d411 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,8 @@ dell-xps-15-9560 = import ./dell/xps/15-9560; dell-xps-15-9560-intel = import ./dell/xps/15-9560/intel; dell-xps-15-9560-nvidia = import ./dell/xps/15-9560/nvidia; + dell-xps-17-9700-intel = import ./dell/xps/17-9700/intel; + dell-xps-17-9700-nvidia = import ./dell/xps/17-9700/nvidia; dell-xps-17-9710-intel = import ./dell/xps/17-9710/intel; framework = import ./framework; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; From 08cf55e7b6166c2338028491620f73bacdc90742 Mon Sep 17 00:00:00 2001 From: Thomas Woolford Date: Fri, 1 Apr 2022 23:06:12 +1030 Subject: [PATCH 0141/1476] Remove `intel_iommu=on` by default for all X1 models. IOMMU still breaks suspend/resume on multiple Lenovo models including X1. Currently broken on at least Gen4 which I'm testing on. Hard locks the system during suspend. This thread claims it works on Gen4 with kernel 5.16.1 but it doesn't work on my hardware, firmware fully updated. https://bugzilla.kernel.org/show_bug.cgi?id=197029 This should probably be turned on individually for models known to work until it can be more thoroughly tested. --- lenovo/thinkpad/x1/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/lenovo/thinkpad/x1/default.nix b/lenovo/thinkpad/x1/default.nix index 7f4b565b..870d9a85 100644 --- a/lenovo/thinkpad/x1/default.nix +++ b/lenovo/thinkpad/x1/default.nix @@ -3,6 +3,4 @@ ../. ../../../common/cpu/intel ]; - - boot.kernelParams = [ "intel_iommu=on" ]; } From 6d1bd5bc2e8b9992a3f57e416ba50fbed5516db6 Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Fri, 1 Apr 2022 19:07:06 +0200 Subject: [PATCH 0142/1476] Custom patched kernel is not the default anymore --- pine64/pinebook-pro/README.md | 5 +-- pine64/pinebook-pro/default.nix | 2 +- pine64/pinebook-pro/kernel/default.nix | 42 +------------------------- pine64/pinebook-pro/overlay.nix | 2 +- 4 files changed, 6 insertions(+), 45 deletions(-) diff --git a/pine64/pinebook-pro/README.md b/pine64/pinebook-pro/README.md index bde456e3..178d6372 100644 --- a/pine64/pinebook-pro/README.md +++ b/pine64/pinebook-pro/README.md @@ -20,8 +20,9 @@ Currently everything seems to work but this is not guaranteed it will be forever ### Kernel -This uses a pinned kernel that imitates a manually tested version of [Manjaro ARM kernel](https://gitlab.manjaro.org/manjaro-arm/packages/core/linux/-/blob/master/PKGBUILD), this way one can update `nixpkgs` without worrying too much. -This is default kernel but the current mainline kernel `linuxPackages_latest` seems to work too. +By default this uses the latest upstream kernel but the overlay makes available `pinebookpro-unstable-manjaro-kernel` +which is built from a pinned kernel version and makes available the DP alt mode over Type-C. +This kernel is unstable and some sporadic kernel panics may occur, use at your own risk. ### Known issues diff --git a/pine64/pinebook-pro/default.nix b/pine64/pinebook-pro/default.nix index 692c56d6..a570d6ea 100644 --- a/pine64/pinebook-pro/default.nix +++ b/pine64/pinebook-pro/default.nix @@ -6,7 +6,7 @@ (import ./overlay.nix) ]; - boot.kernelPackages = lib.mkDefault pkgs.pinebookpro-manjaro-kernel; + boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; # This list of modules is not entirely minified, but represents # a set of modules that is required for the display to work in stage-1. diff --git a/pine64/pinebook-pro/kernel/default.nix b/pine64/pinebook-pro/kernel/default.nix index a900df7b..72880eaf 100644 --- a/pine64/pinebook-pro/kernel/default.nix +++ b/pine64/pinebook-pro/kernel/default.nix @@ -12,40 +12,6 @@ let }; patches = [ - # Assorted Manjaro ARM patches - "1001-arm64-dts-allwinner-add-hdmi-sound-to-pine-devices.patch" # Pine64 - "1002-arm64-dts-allwinner-add-ohci-ehci-to-h5-nanopi.patch" # Nanopi Neo Plus 2 - "1003-drm-bridge-analogix_dp-Add-enable_psr-param.patch" # Pinebook Pro - "1004-gpu-drm-add-new-display-resolution-2560x1440.patch" # Odroid - "1005-panfrost-Silence-Panfrost-gem-shrinker-loggin.patch" # Panfrost - "1006-arm64-dts-rockchip-Add-Firefly-Station-p1-support.patch" # Firelfy Station P1 - "1007-drm-rockchip-add-support-for-modeline-32MHz-e.patch" # DP Alt Mode - "1008-rk3399-rp64-pcie-Reimplement-rockchip-PCIe-bus-scan-delay.patch" # RockPro64 - "1010-arm64-dts-amlogic-add-initial-Beelink-GT1-Ultimate-dev.patch" # Beelink - "1011-arm64-dts-amlogic-add-meson-g12b-ugoos-am6-plus.patch" # Meson Ugoos - "1012-drm-panfrost-scheduler-improvements.patch" # Panfrost - "1013-arm64-dts-rockchip-Add-PCIe-bus-scan-delay-to-RockPr.patch" # RockPro64 - "1014-drm-rockchip-support-gamma-control-on-RK3399.patch" # RK3399 VOP - "1015-media-rockchip-rga-do-proper-error-checking-in-probe.patch" # Rockchip RGA - "1016-arm64-dts-rockchip-switch-to-hs200-on-rockpi4.patch" # Radxa Rock Pi 4 - "1017-arm64-dts-meson-remove-CPU-opps-below-1GHz-for-G12B-boards.patch" # AMLogic [1/2] - "1018-arm64-dts-meson-remove-CPU-opps-below-1GHz-for-SM1-boards.patch" # AMLogic [2/2] - "1019-arm64-dts-rockchip-Add-PCIe-bus-scan-delay-to-Rock-P.patch" # Radxa Rock Pi 4 - - # Assorted Pinebook, PinePhone and PineTab patches - "2001-Bluetooth-Add-new-quirk-for-broken-local-ext-features.patch" # Bluetooth - "2002-Bluetooth-btrtl-add-support-for-the-RTL8723CS.patch" # Bluetooth - "2003-arm64-allwinner-a64-enable-Bluetooth-On-Pinebook.patch" # Bluetooth - "2004-arm64-dts-allwinner-enable-bluetooth-pinetab-pinepho.patch" # Bluetooth - "2005-staging-add-rtl8723cs-driver.patch" # Realtek WiFi - "2006-arm64-dts-allwinner-pinetab-add-accelerometer.patch" # Accelerometer - "2007-arm64-dts-allwinner-pinetab-enable-jack-detection.patch" # Audio - "2008-brcmfmac-USB-probing-provides-no-board-type.patch" # Bluetooth - "2009-dts-rockchip-Adapt-and-adopt-Type-C-support-from-Pin.patch" # DP Alt Mode - - # Pinebook Pro Type-C patches from megous; original patch numbers found - # on https://xff.cz/kernels/5.17/patches/ are retained, with just the first - # digit changed from 0 to 3, to make tracking easier "3170-arm64-dts-rk3399-pinebook-pro-Fix-USB-PD-charging.patch" "3172-arm64-dts-rk3399-pinebook-pro-Improve-Type-C-support.patch" "3174-arm64-dts-rk3399-pinebook-pro-Remove-redundant-pinct.patch" @@ -76,15 +42,9 @@ let manjaro-kernel = pinnedNixpkgs.linuxPackagesFor (pinnedNixpkgs.linuxKernel.kernels.linux_5_16.override { argsOverride = rec { kernelPatches = map create-patch patches; - version = "5.16.18"; - modDirVersion = version; - src = builtins.fetchurl { - url = "https://www.kernel.org/pub/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "sha256:096f80m2czj8khvil7s037pqdf1s6pklqn5d9419jqkz7v70piry"; - }; }; }); in { - inherit manjaro-kernel; + inherit unstable-manjaro-kernel; } diff --git a/pine64/pinebook-pro/overlay.nix b/pine64/pinebook-pro/overlay.nix index 9cc4f50e..d540d72d 100644 --- a/pine64/pinebook-pro/overlay.nix +++ b/pine64/pinebook-pro/overlay.nix @@ -5,7 +5,7 @@ let kernels = callPackage ./kernel { }; in { - pinebookpro-manjaro-kernel = kernels.manjaro-kernel; + pinebookpro-unstable-manjaro-kernel = kernels.manjaro-kernel; pinebookpro-ap6256-firmware = callPackage ./firmware/ap6256-firmware { }; pinebookpro-keyboard-updater = callPackage ./keyboard-updater { }; } From be88ca8b75333f0f7b4ae698b8737a95f1f247f7 Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Fri, 8 Apr 2022 10:41:13 +0200 Subject: [PATCH 0143/1476] Update pine64/pinebook-pro/README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- pine64/pinebook-pro/README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pine64/pinebook-pro/README.md b/pine64/pinebook-pro/README.md index 178d6372..473da441 100644 --- a/pine64/pinebook-pro/README.md +++ b/pine64/pinebook-pro/README.md @@ -20,9 +20,7 @@ Currently everything seems to work but this is not guaranteed it will be forever ### Kernel -By default this uses the latest upstream kernel but the overlay makes available `pinebookpro-unstable-manjaro-kernel` -which is built from a pinned kernel version and makes available the DP alt mode over Type-C. -This kernel is unstable and some sporadic kernel panics may occur, use at your own risk. +This module defaults to the latest upstream kernel. Attempts have been made to use manjaro's kernel that makes the DP alt mode available over Type-C, but it turns out that the kernel is unstable and some sporadic kernel panics may occur. If you want to test version, you can grab the nix expression from this commit: https://github.com/NixOS/nixos-hardware/blob/6d1bd5bc2e8b9992a3f57e416ba50fbed5516db6/pine64/pinebook-pro/kernel/default.nix ### Known issues From cb8db9e1bb2801fb1cd520d7bc9776117e597a73 Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Fri, 8 Apr 2022 10:58:58 +0200 Subject: [PATCH 0144/1476] New source for `ap6256-firmware` and removed unstable kernel --- pine64/pinebook-pro/default.nix | 2 +- .../firmware/ap6256-firmware/default.nix | 14 +++--- pine64/pinebook-pro/kernel/default.nix | 50 ------------------- pine64/pinebook-pro/overlay.nix | 5 +- 4 files changed, 8 insertions(+), 63 deletions(-) delete mode 100644 pine64/pinebook-pro/kernel/default.nix diff --git a/pine64/pinebook-pro/default.nix b/pine64/pinebook-pro/default.nix index a570d6ea..799596cf 100644 --- a/pine64/pinebook-pro/default.nix +++ b/pine64/pinebook-pro/default.nix @@ -74,7 +74,7 @@ hardware.enableRedistributableFirmware = true; hardware.firmware = [ - pkgs.pinebookpro-ap6256-firmware + (pkgs.callPackage ./firmware/ap6256-firmware { }) ]; systemd.tmpfiles.rules = [ diff --git a/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix b/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix index 3d10f044..2c66766f 100644 --- a/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix +++ b/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix @@ -1,16 +1,14 @@ { lib -, fetchFromGitLab -, fetchurl +, fetchFromGitHub , runCommandNoCC }: let - src = fetchFromGitLab { - domain = "gitlab.manjaro.org"; - owner = "manjaro-arm"; - repo = "packages/community/ap6256-firmware"; - rev = "007c6dd132263624db9ea6ce8dde4fc2108f21b7"; - sha256 = "sha256-Agqz05W7Rhl0NNQwpW4aQqs9YZmYyci9OXKzEKA30uk="; + src = fetchFromGitHub { + owner = "nix-community"; + repo = "rkwifibt"; + rev = "421b7dd8f3c67f66910710838a0be03f3575a3c9"; + sha256 = "175qcjfaz7nhpyh0hxiih53k3hly407lkpxgissvldghxrw01ccn"; }; in runCommandNoCC "pinebookpro-ap6256-firmware" diff --git a/pine64/pinebook-pro/kernel/default.nix b/pine64/pinebook-pro/kernel/default.nix deleted file mode 100644 index 72880eaf..00000000 --- a/pine64/pinebook-pro/kernel/default.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ pkgs, ... }: - -let - pinnedNixpkgs = import - (builtins.fetchTarball { - name = "nixos-unstable-2022-03-28"; - url = "https://github.com/nixos/nixpkgs/archive/ce8cbe3c01fd8ee2de526ccd84bbf9b82397a510.tar.gz"; - sha256 = "19xfad7pxsp6nkrkjhn36w77w92m60ysq7njn711slw74yj6ibxv"; - }) - { - system = "aarch64-linux"; - }; - - patches = [ - "3170-arm64-dts-rk3399-pinebook-pro-Fix-USB-PD-charging.patch" - "3172-arm64-dts-rk3399-pinebook-pro-Improve-Type-C-support.patch" - "3174-arm64-dts-rk3399-pinebook-pro-Remove-redundant-pinct.patch" - "3178-arm64-dts-rk3399-pinebook-pro-Don-t-allow-usb2-phy-d.patch" - "3339-drm-rockchip-cdn-dp-Disable-CDN-DP-on-disconnect.patch" - "3355-usb-typec-fusb302-Set-the-current-before-enabling-pu.patch" - "3359-usb-typec-fusb302-Update-VBUS-state-even-if-VBUS-int.patch" - "3361-usb-typec-fusb302-Add-OF-extcon-support.patch" - "3362-usb-typec-fusb302-Fix-register-definitions.patch" - "3363-usb-typec-fusb302-Clear-interrupts-before-we-start-t.patch" - "3364-usb-typec-typec-extcon-Add-typec-extcon-bridge-drive.patch" - "3365-phy-rockchip-typec-Make-sure-the-plug-orientation-is.patch" - "3372-phy-rockchip-inno-usb2-More-robust-charger-detection.patch" - "3373-usb-typec-extcon-Don-t-touch-charger-proprties.patch" - ]; - - manjaro-patches = pinnedNixpkgs.fetchgit { - url = "https://gitlab.manjaro.org/manjaro-arm/packages/core/linux.git"; - rev = "d68667dfeb33a40a1ee5d6563ff4815e57ed9084"; - sha256 = "04wb8nx5yw1r044i2cnd1dy4fc7whgn343iid0gqmyg5rk1ack2v"; - }; - - create-patch = p: { - name = p; - patch = "${manjaro-patches}/${p}"; - }; - - manjaro-kernel = pinnedNixpkgs.linuxPackagesFor (pinnedNixpkgs.linuxKernel.kernels.linux_5_16.override { - argsOverride = rec { - kernelPatches = map create-patch patches; - }; - }); -in -{ - inherit unstable-manjaro-kernel; -} diff --git a/pine64/pinebook-pro/overlay.nix b/pine64/pinebook-pro/overlay.nix index d540d72d..8d140f02 100644 --- a/pine64/pinebook-pro/overlay.nix +++ b/pine64/pinebook-pro/overlay.nix @@ -1,11 +1,8 @@ final: super: let - inherit (final) callPackage kernelPatches linuxPackagesFor; - kernels = callPackage ./kernel { }; + inherit (final) callPackage; in { - pinebookpro-unstable-manjaro-kernel = kernels.manjaro-kernel; - pinebookpro-ap6256-firmware = callPackage ./firmware/ap6256-firmware { }; pinebookpro-keyboard-updater = callPackage ./keyboard-updater { }; } From 710e33cb937fe4eb630c444d210b96653ddbb76a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 9 Apr 2022 09:02:56 +0200 Subject: [PATCH 0145/1476] pine64/pinebook-pro: typos in README --- pine64/pinebook-pro/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pine64/pinebook-pro/README.md b/pine64/pinebook-pro/README.md index 473da441..b6c08118 100644 --- a/pine64/pinebook-pro/README.md +++ b/pine64/pinebook-pro/README.md @@ -20,7 +20,11 @@ Currently everything seems to work but this is not guaranteed it will be forever ### Kernel -This module defaults to the latest upstream kernel. Attempts have been made to use manjaro's kernel that makes the DP alt mode available over Type-C, but it turns out that the kernel is unstable and some sporadic kernel panics may occur. If you want to test version, you can grab the nix expression from this commit: https://github.com/NixOS/nixos-hardware/blob/6d1bd5bc2e8b9992a3f57e416ba50fbed5516db6/pine64/pinebook-pro/kernel/default.nix +This module defaults to the latest upstream kernel. Attempts have been made to +use manjaro's kernel that makes the DP alt mode available over Type-C, but it +turns out that the kernel is unstable and some sporadic kernel panics may occur. +If you want to this kernel, you can grab the nix expression from this commit: +https://github.com/NixOS/nixos-hardware/blob/6d1bd5bc2e8b9992a3f57e416ba50fbed5516db6/pine64/pinebook-pro/kernel/default.nix ### Known issues From 850308db3ef0bcc7454155063b5fec28b4ffbc8c Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Sat, 9 Apr 2022 09:10:42 +0200 Subject: [PATCH 0146/1476] Add: pinebook-pro @aciceri MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- README.md | 6 +- flake.nix | 1 + pine64/pinebook-pro/README.md | 100 ++++++++ pine64/pinebook-pro/default.nix | 90 +++++++ .../firmware/ap6256-firmware/default.nix | 39 +++ .../pinebook-pro/keyboard-updater/default.nix | 26 ++ pine64/pinebook-pro/overlay.nix | 8 + pine64/pinebook-pro/sound/reset-sound.rb | 227 ++++++++++++++++++ 8 files changed, 494 insertions(+), 3 deletions(-) create mode 100644 pine64/pinebook-pro/README.md create mode 100644 pine64/pinebook-pro/default.nix create mode 100644 pine64/pinebook-pro/firmware/ap6256-firmware/default.nix create mode 100644 pine64/pinebook-pro/keyboard-updater/default.nix create mode 100644 pine64/pinebook-pro/overlay.nix create mode 100644 pine64/pinebook-pro/sound/reset-sound.rb diff --git a/README.md b/README.md index 0d782a81..3978d37e 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,6 @@ There is also experimental flake support. In your `/etc/nixos/flake.nix` add the } ``` - ### Using fetchGit You can fetch the git repository directly: @@ -66,7 +65,7 @@ you can easily pin to a particular revision if you desire more stability. See code for all available configurations. | Model | Path | -|---------------------------------------------------------------------|----------------------------------------------------| +| ------------------------------------------------------------------- | -------------------------------------------------- | | [Acer Aspire 4810T](acer/aspire/4810t) | `` | | [Airis N990](airis/n990) | `` | | [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | @@ -110,7 +109,7 @@ See code for all available configurations. | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | -| [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | +| [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | | [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | @@ -162,6 +161,7 @@ See code for all available configurations. | [Microsoft Surface Range](microsoft/surface) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | | [PC Engines APU](pcengines/apu) | `` | +| [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | | [Purism Librem 13v3](purism/librem/13v3) | `` | | [Purism Librem 15v3](purism/librem/13v3) | `` | | [Raspberry Pi 2](raspberry-pi/2) | `` | diff --git a/flake.nix b/flake.nix index cf698b55..990f44f9 100644 --- a/flake.nix +++ b/flake.nix @@ -103,6 +103,7 @@ msi-gs60 = import ./msi/gs60; onenetbook-4 = import ./onenetbook/4; pcengines-apu = import ./pcengines/apu; + pine64-pinebook-pro = import ./pine64/pinebook-pro; purism-librem-13v3 = import ./purism/librem/13v3; purism-librem-15v3 = import ./purism/librem/15v3; raspberry-pi-2 = import ./raspberry-pi/2; diff --git a/pine64/pinebook-pro/README.md b/pine64/pinebook-pro/README.md new file mode 100644 index 00000000..b6c08118 --- /dev/null +++ b/pine64/pinebook-pro/README.md @@ -0,0 +1,100 @@ +> **NOTE**: This is an attempt to port [samueldr](https://github.com/samueldr/)'s [wip-pinebookpro](https://github.com/samueldr/wip-pinebook-pro) to [nixos-hardware](https://github.com/NixOS/nixos-hardware). Credit for the work done goes to the original authors. + +## Using in your configuration + +To use this configuration simply add this module to your configuration. + +```nix +{ + imports = [ + ${nixos-hardware}/pine64/pinebook-pro + ]; +} +``` + +That entry point will try to maximize the hardware compatibility. + +## Current state + +Currently everything seems to work but this is not guaranteed it will be forever. + +### Kernel + +This module defaults to the latest upstream kernel. Attempts have been made to +use manjaro's kernel that makes the DP alt mode available over Type-C, but it +turns out that the kernel is unstable and some sporadic kernel panics may occur. +If you want to this kernel, you can grab the nix expression from this commit: +https://github.com/NixOS/nixos-hardware/blob/6d1bd5bc2e8b9992a3f57e416ba50fbed5516db6/pine64/pinebook-pro/kernel/default.nix + +### Known issues + +#### HDMI over Type-C + +HDMI over Type-C works only for the custom kernel and the audio dosen't work (it's an upstream problem). + +#### `rockchipdrm` and `efifb` + +This can be worked around by booting with the `efifb=off` kernel command-line. + +This is already handled for you by this configuration. If using the generic +UEFI AArch64 iso, you will need to add the option yourself to the command-line +using GRUB. + +#### _EFI_ and poweroff + +When booted using EFI, the system will not power off. It will stay seemingly +stuck with the LED and display turned off. + +A [workaround exists](https://github.com/Tow-Boot/Tow-Boot/commit/818cae1b84a7702f2a509927f2819900c2881979#diff-20f50d9d8d5d6c059b87ad66fbc5df26d9fc46251763547ca9bdcc75564a4368), +and is built in recent Tow-Boot (make sure your release is 2021.10-004 or more recent). + +### _Tow-Boot_ + +We highly suggest installing _Tow-Boot_ to the SPI Flash. + +- https://github.com/Tow-Boot/Tow-Boot + +Having the firmware installed to SPI makes the device act basically like a +normal computer. No need for weird incantations to setup the platform boot +firmware. + +Alternatively, starting from the _Tow-Boot_ disk image on eMMC is easier to +deal with and understand than having to deal with _U-Boot_ manually. + +### Mainline _U-Boot_ + +Mainline U-Boot has full support for graphics since 2021.04. The current +unstable relases of Nixpkgs are at 2021.04 at least. + +``` + $ nix-build -A pkgs.ubootPinebookPro +``` + +Note that the default U-Boot build does not do anything with LED on startup. + +## Keyboard firmware + +> **WARNING**: Some hardware batches for the Pinebook Pro ship with the +> wrong chip for the keyboard controller. While it will work with the +> firmware it ships with, it _may brick_ while flashing the updated +> firmware. [See this comment on the firmware repository](https://github.com/jackhumbert/pinebook-pro-keyboard-updater/issues/33#issuecomment-850889285). +> +> It is unclear how to identify said hardware from a running system. + +To determine which keyboard controller you have, you will need to disassemble +the Pinebook Pro as per [the Pine64 +wiki](https://wiki.pine64.org/wiki/Pinebook_Pro#Keyboard), and make sure that +the IC next to the U23 marking on the main board is an **SH68F83**. + +```sh + $ nix-build -A pkgs.pinebookpro-keyboard-updater + $ sudo ./result/bin/updater step-1 + $ sudo poweroff + # ... + $ sudo ./result/bin/updater step-2 + $ sudo poweroff + # ... + $ sudo ./result/bin/updater flash-kb-revised +``` + +Note: poweroff must be used, reboot does not turn the hardware "off" enough. diff --git a/pine64/pinebook-pro/default.nix b/pine64/pinebook-pro/default.nix new file mode 100644 index 00000000..799596cf --- /dev/null +++ b/pine64/pinebook-pro/default.nix @@ -0,0 +1,90 @@ +# This configuration file can be safely imported in your system configuration. +{ config, pkgs, lib, ... }: + +{ + nixpkgs.overlays = [ + (import ./overlay.nix) + ]; + + boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; + + # This list of modules is not entirely minified, but represents + # a set of modules that is required for the display to work in stage-1. + # Further minification can be done, but requires trial-and-error mainly. + boot.initrd.kernelModules = [ + # Rockchip modules + "rockchip_rga" + "rockchip_saradc" + "rockchip_thermal" + "rockchipdrm" + + # GPU/Display modules + "analogix_dp" + "cec" + "drm" + "drm_kms_helper" + "dw_hdmi" + "dw_mipi_dsi" + "gpu_sched" + "panel_edp" + "panel_simple" + "panfrost" + "pwm_bl" + + # USB / Type-C related modules + "fusb302" + "tcpm" + "typec" + + # Misc. modules + "cw2015_battery" + "gpio_charger" + "rtc_rk808" + ]; + + services.udev.extraHwdb = lib.mkMerge [ + # https://gitlab.manjaro.org/manjaro-arm/packages/community/pinebookpro-post-install/blob/master/10-usb-kbd.hwdb + '' + evdev:input:b0003v258Ap001E* + KEYBOARD_KEY_700a5=brightnessdown + KEYBOARD_KEY_700a6=brightnessup + KEYBOARD_KEY_70066=sleep + '' + + # https://github.com/elementary/os/blob/05a5a931806d4ed8bc90396e9e91b5ac6155d4d4/build-pinebookpro.sh#L253-L257 + # Disable the "keyboard mouse" in libinput. This is reported by the keyboard firmware + # and is probably a placeholder for a TrackPoint style mouse that doesn't exist + '' + evdev:input:b0003v258Ap001Ee0110-e0,1,2,4,k110,111,112,r0,1,am4,lsfw + ID_INPUT=0 + ID_INPUT_MOUSE=0 + '' + ]; + + # https://github.com/elementary/os/blob/05a5a931806d4ed8bc90396e9e91b5ac6155d4d4/build-pinebookpro.sh#L253-L257 + # Mark the keyboard as internal, so that "disable when typing" works for the touchpad + environment.etc."libinput/local-overrides.quirks".text = '' + [Pinebook Pro Keyboard] + MatchUdevType=keyboard + MatchBus=usb + MatchVendor=0x258A + MatchProduct=0x001E + AttrKeyboardIntegration=internal + ''; + + hardware.enableRedistributableFirmware = true; + hardware.firmware = [ + (pkgs.callPackage ./firmware/ap6256-firmware { }) + ]; + + systemd.tmpfiles.rules = [ + # Tweak the minimum frequencies of the GPU and CPU governors to get a bit more performance + # https://github.com/elementary/os/blob/05a5a931806d4ed8bc90396e9e91b5ac6155d4d4/build-pinebookpro.sh#L288-L294 + "w- /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq - - - - 1200000" + "w- /sys/devices/system/cpu/cpufreq/policy4/scaling_min_freq - - - - 1008000" + "w- /sys/class/devfreq/ff9a0000.gpu/min_freq - - - - 600000000" + ]; + + # The default powersave makes the wireless connection unusable. + networking.networkmanager.wifi.powersave = lib.mkDefault false; +} diff --git a/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix b/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix new file mode 100644 index 00000000..2c66766f --- /dev/null +++ b/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix @@ -0,0 +1,39 @@ +{ lib +, fetchFromGitHub +, runCommandNoCC +}: + +let + src = fetchFromGitHub { + owner = "nix-community"; + repo = "rkwifibt"; + rev = "421b7dd8f3c67f66910710838a0be03f3575a3c9"; + sha256 = "175qcjfaz7nhpyh0hxiih53k3hly407lkpxgissvldghxrw01ccn"; + }; +in +runCommandNoCC "pinebookpro-ap6256-firmware" +{ + meta = with lib; { + license = licenses.unfreeRedistributable; + }; +} '' + (PS4=" $ "; set -x + cp ${src}/"BCM4345C5.hcd" "BCM4345C5.hcd" + cp ${src}/"fw_bcm43456c5_ag.bin" "fw_bcm43456c5_ag.bin" + cp ${src}/"brcmfmac43456-sdio.clm_blob" "brcmfmac43456-sdio.clm_blob" + cp ${src}/"nvram_ap6256.txt" "nvram_ap6256.txt" + mkdir -p $out/lib/firmware/brcm + # Bluetooth firmware + install -Dm644 "BCM4345C5.hcd" -t "$out/lib/firmware/" + install -Dm644 "BCM4345C5.hcd" "$out/lib/firmware/brcm/BCM.hcd" + install -Dm644 "BCM4345C5.hcd" -t "$out/lib/firmware/brcm/" + # Wifi firmware + install -Dm644 "nvram_ap6256.txt" -t "$out/lib/firmware/" + install -Dm644 "fw_bcm43456c5_ag.bin" "$out/lib/firmware/brcm/brcmfmac43456-sdio.bin" + install -Dm644 "brcmfmac43456-sdio.clm_blob" "$out/lib/firmware/brcm/brcmfmac43456-sdio.clm_blob" + install -Dm644 "nvram_ap6256.txt" "$out/lib/firmware/brcm/brcmfmac43456-sdio.radxa,rockpi4b.txt" + install -Dm644 "nvram_ap6256.txt" "$out/lib/firmware/brcm/brcmfmac43456-sdio.radxa,rockpi4c.txt" + install -Dm644 "nvram_ap6256.txt" "$out/lib/firmware/brcm/brcmfmac43456-sdio.pine64,pinebook-pro.txt" + install -Dm644 "nvram_ap6256.txt" "$out/lib/firmware/brcm/brcmfmac43456-sdio.pine64,rockpro64-v2.1.txt" + ) +'' diff --git a/pine64/pinebook-pro/keyboard-updater/default.nix b/pine64/pinebook-pro/keyboard-updater/default.nix new file mode 100644 index 00000000..3f3cf712 --- /dev/null +++ b/pine64/pinebook-pro/keyboard-updater/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchFromGitHub, xxd, libusb }: + +stdenv.mkDerivation { + pname = "pinebook-pro-keyboard-updater"; + version = "2021-07-28"; + + nativeBuildInputs = [ + xxd + ]; + + buildInputs = [ + libusb + ]; + + installPhase = '' + mkdir -p $out/bin + cp -v updater $out/bin + ''; + + src = fetchFromGitHub { + owner = "dragan-simic"; + repo = "pinebook-pro-keyboard-updater"; + rev = "bd8d2ea48992b3e6ddd0b9435d21b74cdcf97224"; + hash = "sha256-3+Qsa5lk1EJrLvPSyWthqBMTqJCigbJSmnsS6hdu+w8="; + }; +} diff --git a/pine64/pinebook-pro/overlay.nix b/pine64/pinebook-pro/overlay.nix new file mode 100644 index 00000000..8d140f02 --- /dev/null +++ b/pine64/pinebook-pro/overlay.nix @@ -0,0 +1,8 @@ +final: super: + +let + inherit (final) callPackage; +in +{ + pinebookpro-keyboard-updater = callPackage ./keyboard-updater { }; +} diff --git a/pine64/pinebook-pro/sound/reset-sound.rb b/pine64/pinebook-pro/sound/reset-sound.rb new file mode 100644 index 00000000..d92c2b74 --- /dev/null +++ b/pine64/pinebook-pro/sound/reset-sound.rb @@ -0,0 +1,227 @@ +#!/usr/bin/env nix-shell +#! nix-shell -p ruby alsaUtils -i ruby + +# This script resets the sound state to the minimum required for it to work. +# It will set the control that pulseaudio uses to 20%, everything else to the +# level expected for it to work. The rest will be off or to their default. + +require "open3" +require "shellwords" + +def run(*cmd) + puts " $ #{cmd.shelljoin}" + system(*cmd) +end + +FINAL_STATE = { + ## Simple mixer control 'Headphone',0 + ## Capabilities: pvolume + ## Playback channels: Front Left - Front Right + ## Limits: Playback 0 - 3 + ## Mono: + ## Front Left: Playback 0 [0%] [-48.00dB] + ## Front Right: Playback 0 [0%] [-48.00dB] + "Headphone,0" => "20%", + ## Simple mixer control 'Headphone Mixer',0 + ## Capabilities: volume + ## Playback channels: Front Left - Front Right + ## Capture channels: Front Left - Front Right + ## Limits: 0 - 11 + ## Front Left: 0 [0%] [-12.00dB] + ## Front Right: 0 [0%] [-12.00dB] + "Headphone Mixer,0" => "0", + ## Simple mixer control 'Mic Boost',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [on] + "Mic Boost,0" => "off", + ## Simple mixer control 'Playback Polarity',0 + ## Capabilities: enum + ## Items: 'Normal' 'R Invert' 'L Invert' 'L + R Invert' + ## Item0: 'Normal' + "Playback Polarity,0" => "L Invert", + ## Simple mixer control 'Capture Polarity',0 + ## Capabilities: enum + ## Items: 'Normal' 'Invert' + ## Item0: 'Normal' + "Capture Polarity,0" => "Normal", + ## Simple mixer control 'ADC',0 + ## Capabilities: cvolume cvolume-joined + ## Capture channels: Mono + ## Limits: Capture 0 - 192 + ## Mono: Capture 0 [0%] [-99999.99dB] + "ADC,0" => "0", + ## Simple mixer control 'ADC Double Fs',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "ADC Double Fs,0" => "off", + ## Simple mixer control 'ADC PGA Gain',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 10 + ## Mono: 0 [0%] + "ADC PGA Gain,0" => "0", + ## Simple mixer control 'ADC Soft Ramp',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [on] + "ADC Soft Ramp,0" => "on", + ## Simple mixer control 'ALC',0 + ## Capabilities: cswitch cswitch-joined + ## Capture channels: Mono + ## Mono: Capture [off] + "ALC,0" => "nocap", + ## Simple mixer control 'ALC Capture Attack Time',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 10 + ## Mono: 0 [0%] + "ALC Capture Attack Time,0" => "0", + ## Simple mixer control 'ALC Capture Decay Time',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 10 + ## Mono: 0 [0%] + "ALC Capture Decay Time,0" => "0", + ## Simple mixer control 'ALC Capture Hold Time',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 10 + ## Mono: 0 [0%] + "ALC Capture Hold Time,0" => "0", + ## Simple mixer control 'ALC Capture Max',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 28 + ## Mono: 0 [0%] [-6.50dB] + "ALC Capture Max,0" => "0", + ## Simple mixer control 'ALC Capture Min',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 28 + ## Mono: 0 [0%] [-12.00dB] + "ALC Capture Min,0" => "0", + ## Simple mixer control 'ALC Capture Noise Gate',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "ALC Capture Noise Gate,0" => "off", + ## Simple mixer control 'ALC Capture Noise Gate Threshold',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 31 + ## Mono: 0 [0%] + "ALC Capture Noise Gate Threshold,0" => "0", + ## Simple mixer control 'ALC Capture Noise Gate Type',0 + ## Capabilities: enum + ## Items: 'Constant PGA Gain' 'Mute ADC Output' + ## Item0: 'Constant PGA Gain' + "ALC Capture Noise Gate Type,0" => "Constant PGA Gain", + ## Simple mixer control 'ALC Capture Target',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 10 + ## Mono: 0 [0%] [-16.50dB] + "ALC Capture Target,0" => "0", + ## Simple mixer control 'DAC',0 + ## Capabilities: pvolume + ## Playback channels: Front Left - Front Right + ## Limits: Playback 0 - 192 + ## Mono: + ## Front Left: Playback 0 [0%] [-99999.99dB] + ## Front Right: Playback 0 [0%] [-99999.99dB] + "DAC,0" => "100%", + ## Simple mixer control 'DAC Double Fs',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "DAC Double Fs,0" => "off", + ## Simple mixer control 'DAC Mono Mix',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "DAC Mono Mix,0" => "off", + ## Simple mixer control 'DAC Notch Filter',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "DAC Notch Filter,0" => "off", + ## Simple mixer control 'DAC Soft Ramp',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [on] + "DAC Soft Ramp,0" => "on", + ## Simple mixer control 'DAC Soft Ramp Rate',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 4 + ## Mono: 0 [0%] + "DAC Soft Ramp Rate,0" => "0", + ## Simple mixer control 'DAC Source Mux',0 + ## Capabilities: enum + ## Items: 'LDATA TO LDAC, RDATA TO RDAC' 'LDATA TO LDAC, LDATA TO RDAC' 'RDATA TO LDAC, RDATA TO RDAC' 'RDATA TO LDAC, LDATA TO RDAC' + ## Item0: 'LDATA TO LDAC, RDATA TO RDAC' + "DAC Source Mux,0" => "LDATA TO LDAC, RDATA TO RDAC", + ## Simple mixer control 'DAC Stereo Enhancement',0 + ## Capabilities: volume volume-joined + ## Playback channels: Mono + ## Capture channels: Mono + ## Limits: 0 - 7 + ## Mono: 0 [0%] + "DAC Stereo Enhancement,0" => "0", + ## Simple mixer control 'Differential Mux',0 + ## Capabilities: enum + ## Items: 'lin1-rin1' 'lin2-rin2' 'lin1-rin1 with 20db Boost' 'lin2-rin2 with 20db Boost' + ## Item0: 'lin1-rin1' + "Differential Mux,0" => "lin1-rin1", + ## Simple mixer control 'Digital Mic Mux',0 + ## Capabilities: enum + ## Items: 'dmic disable' 'dmic data at high level' 'dmic data at low level' + ## Item0: 'dmic disable' + "Digital Mic Mux,0" => "dmic disable", + ## Simple mixer control 'Left Headphone Mixer LLIN',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "Left Headphone Mixer LLIN,0" => "off", + ## Simple mixer control 'Left Headphone Mixer Left DAC',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "Left Headphone Mixer Left DAC,0" => "on", + ## Simple mixer control 'Left Headphone Mux',0 + ## Capabilities: enum + ## Items: 'lin1-rin1' 'lin2-rin2' 'lin-rin with Boost' 'lin-rin with Boost and PGA' + ## Item0: 'lin1-rin1' + "Left Headphone Mux,0" => "lin1-rin1", + ## Simple mixer control 'Right Headphone Mixer RLIN',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "Right Headphone Mixer RLIN,0" => "off", + ## Simple mixer control 'Right Headphone Mixer Right DAC',0 + ## Capabilities: pswitch pswitch-joined + ## Playback channels: Mono + ## Mono: Playback [off] + "Right Headphone Mixer Right DAC,0" => "on", + ## Simple mixer control 'Right Headphone Mux',0 + ## Capabilities: enum + ## Items: 'lin1-rin1' 'lin2-rin2' 'lin-rin with Boost' 'lin-rin with Boost and PGA' + ## Item0: 'lin1-rin1' + "Right Headphone Mux,0" => "lin1-rin1", +} + +FINAL_STATE.each do |name, value| + run("amixer", "-c0", "sset", name, value.to_s) + raise "Error setting #{name} to #{value}" unless $?.success? +end From f4160a629bac3538939a3005c8b5c7fb320bcf59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 08:07:30 +0100 Subject: [PATCH 0147/1476] build(deps): bump cachix/install-nix-action from 16 to 17 (#404) Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 16 to 17. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v16...v17) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .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 e8a35d75..d837d029 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v16 + - uses: cachix/install-nix-action@v17 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version From 68c87edeb979e10ccb29db2125a6bbd372092f28 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Tue, 5 Apr 2022 00:00:08 +0200 Subject: [PATCH 0148/1476] dell-xps-15-9560-nvidia: use Nvidia Offload mode to save battery power Also rename deprecated `hardware.nvidia.optimus_prime.*' to `hardware.nvidia.prime.*' since NixOS 20.09. > The hardware.nvidia.optimus_prime.enable service has been renamed to > hardware.nvidia.prime.sync.enable and has many new enhancements. > Related nvidia prime settings may have also changed. See https://nixos.org/manual/nixos/stable/release-notes.html#sec-release-20.09 --- dell/xps/15-9560/nvidia/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dell/xps/15-9560/nvidia/default.nix b/dell/xps/15-9560/nvidia/default.nix index 2cd5d1b1..a7ba2416 100644 --- a/dell/xps/15-9560/nvidia/default.nix +++ b/dell/xps/15-9560/nvidia/default.nix @@ -3,6 +3,7 @@ { imports = [ ../../../../common/cpu/intel + ../../../../common/gpu/nvidia.nix ../../../../common/pc/laptop ../xps-common.nix ]; @@ -11,10 +12,11 @@ # This runs only nvidia, great for games or heavy use of render applications ##### disable intel, run nvidia only and as default - services.xserver.videoDrivers = lib.mkDefault ["nvidia"]; - hardware.nvidia.modesetting.enable = lib.mkDefault true; - hardware.nvidia.optimus_prime.enable = lib.mkDefault true; - hardware.nvidia.optimus_prime.nvidiaBusId = lib.mkDefault "PCI:1:0:0"; - hardware.nvidia.optimus_prime.intelBusId = lib.mkDefault "PCI:0:2:0"; + 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"; + }; } From 32e12dbc2060f6bdf77a08059a063b95b2fd7d77 Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Tue, 12 Apr 2022 11:27:54 +0200 Subject: [PATCH 0149/1476] Missing clm blob for Pinebook's AP6256 firmware --- .../ap6256-firmware/brcmfmac43456-sdio.clm_blob | Bin 0 -> 14036 bytes .../firmware/ap6256-firmware/default.nix | 9 +++++---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 pine64/pinebook-pro/firmware/ap6256-firmware/brcmfmac43456-sdio.clm_blob diff --git a/pine64/pinebook-pro/firmware/ap6256-firmware/brcmfmac43456-sdio.clm_blob b/pine64/pinebook-pro/firmware/ap6256-firmware/brcmfmac43456-sdio.clm_blob new file mode 100644 index 0000000000000000000000000000000000000000..3b9b5bdc15cd0a58a000441c3903539e0e3de080 GIT binary patch literal 14036 zcmZ?r@prOeU|{&Ava^Jdfq{XE0Rli`Q_L6`G&ipK4-sKtxM0S>z{0@5(B%>Y7IXIT zRd8_(ab#fNVPImg)H5{DGc+)TsRq%8dPbIdCLk6FYe+FLIOpVg<`(1^l~^el>KU8q z8G|I?*r_N#F(o-aSJyz#04~T7Xvh#~#1Lo%avui+1H%Ie28Ikt1_owkW)@}+W=>{q z78VwE77i9J7H(E{R&EXsPEJm4Zf-R-H9a*mH9NIDwKBCjwKlarwfSo6_4Lfl%nMo#OM*q=;^}h>B{IC%;*`y=oP@^9mM1v&gkRG=o7-|6Uyil#^~$F=o`Z5 z8^P%3!|3PF7~sPg5W*M`$r$9%7!=AF?8+GI$r$X-7!t%D63!GF%*@8b#K_3VI9Qwo zauXBOO$=;Itc;9|>`W|-jEqcNEMS)kf=Nb3hX0Im%nZyvOe{XkOiltUPyu!i1|};8 z78iCFFD@o89u^l~7K9{|12dBaGfXL~2LlsGJ13Ke0FntTAnnXdPMj=Oa8p^`7+3D4kKvl5WF|atXf>Ml~0E?3lix$Yn{~(7jg|M>tvB7L%OacWuC@L60zJvrb z6O$h+NEwJH$I8H1!OFRAZ7@R$$%7|Dy&S5DG&)HrU)wolL0G} z6)Ou93&_>r$Ok1O5oRVvA6U4uFk3LNIB>IAh_HYZz#PgHz{+F;(g}7e$SyxbOh$m6 z>t(>;Wys)V#NcJj;AO(#Wy;`X#^7bn;AO$!WeF+c53n;ZaPjc+@e2qF35$sGFfcMP zv#_$Ub8vETvw%1pFi8%WFeslhaxro<@-Xr;@-ZNUadYu8YrwXsGC@7^v8&IH;tkl&G|*^r%cwS*Ws9Wuu0UhK-Jnfq{XEfsKiY ziH(VaNr_2~Nsq|{lcg3m77h*$4k->LDJdxhDJ3a2DJ>}-DLp9@QkG_vWK?9-WHe-S zWb|Y#EvYH#DVb2wQ&ZE@(bCg0p=D`LPtSy&r4uGhSUPp;)P+-*PTe?j;moB=mohLi zGqN(WF^VyXNwJ7Y>4!6k$uNm2FiNpV>H0-5OX)_iNa^{32>%FXDgAI}DT4@RDMJvB zWRfysk_u;%ieQvsk+JfNV3x5CXO^*vV3M(8maz|Kl5t>?@ne?p3ulrEV3G-El8IoJ z^NV1X^N(PX3t*BDXOfR#RA5qwU{Z`=RAN+SRAJV&i(t}?U^cOfU@~!FGKpZcV+?1E za5Z3vaAb%GWpE5-@(KVK`JqfsevDoLjNU<@DkCTqR6jB^Ffgb{GB60hVg(jWLg)e_ zqDp!!Dh@0u6IiBhWHB-@w9qv$)-|wHFto5THM26ZU|?ekkzxpmU|?s85M+!nW8`9r zU|@(4VPIi$kYaL(U}9v_5M9(Ax;gmjSQ2G9g|H26C<;QAcKtpgN+#j3zMG=gI@##E0dovqnjBc2a_KogBQp| zKN*G)ONJmXkQ-T<{e&64G#ULsw)!zL`0z0Ji7>D+hR86mGlmE=axsQ5GO#e($S^T7 zS_s1=B0v%mj3A%NfJ|X$3K3=u0r@n9ks(Bcfq{XA$w`LEDV&Ls$xN8R%#4AJDMp4N z030U5j6NWh5sVBzpfGWgfrN>LFoT5|0}G>t6cZz(fgs3I5X(Z4frT0BVo!)?yfh%5 z@!>{N#Ksh&$WQ>bK!ULZYyk^Hi3kG=tA!Mkn+}teDU*vGlUoE6BfE(JgOfCaiwuK_ zB7>a@gNGg{8?$g*Nil?IGx!)Y_?R+ySTF>*GPndX1cWdIgfRp}F$BaguyR=mFgi&y z2FNhlDKa{#Fb3%|dKobKm@s;nG6q;MaU=wQU? zW5LM5Y{0$e1{VtkKX3lM^i2 z%Yr1>m_ndQGC~-d`4~Z&4=kPnN*^J@j47b>5yHrj0?G~+Qc!<@G7B3dQXrmyI-D62 z5zyQSO-z_BVzSW%hc%OhEGQ+jF%{@S5@dlaV*$v*0(OQ15e5b(2QelG873Ac3n_+> za0XT;6G6rRQ2sPvfaC}l?Bbw!4bWloFk=dEVhZqK3J7OnWHS?FZ~!M{0~H1b9R>$b zsbV0;U?9a{qt9RiGTlIw(Ew~Z6N7;W0}C_AbbYYJ%pi;9!FGe<)rSLYJ*$Njql*+% zkS;@@HG@Yus9X|c48Tyv1WIL~vdlmb6znW44pIyOdJF;n;1tASBFN|?$LM1S%Ih2~ z4h#$)91I>pFbkL*beUYNm|Xn80mkYi$lxT);H1jnWWeBL#=yevCB@*O1IjZ_wxDEb z7XmKG*jxk|?PM8k)ET1;80}2Jg&K3X#rW}#|Tpo%85|*j$m6N z7+Bd5>a`h@3>nK{TDZVgh%m4qxecz19mQ>MjWFlI^)kE2GT68>xCAq>vRVl;y2vov zC^0(eGP)QuafwGtls0uU?WV8Wg0tW^L zHxULlmJlf>A6+INKPI0DCT5lZK?V<51`h*JvB<_0Cc_Zs$H2}MCd?RSz{tfI#t5l_ zg8V^M9V@uPG(=RGLf{IMDMX$rB!Y>VDMXAR#EgNBIYfpb!iFItf`OemLYOf|oiWCY zk&8Kkks*egAx4COjmblX!NZS%naM|((Z_(1g$YuJGcs8SGdO54!1;_8;tVWIAu>!M zcAzR)926`Hpl}ceg%UG57p{*<3u;c13`3e711nRKFk>31;!I*>NaF^@jUa~L$winkL4y%o_7>QI8brd3B^sax5hFthH@K0&;AF?Z$fPCA=%B&K!el4I zTzbU#~C$bK+1$c%0TTjP~dJgkK;7WM z%%CK~z{2PUa)Tep4St}eGz$wTDO)kw_<>ubEEd8HHmVFZ2B2z!jVVNqAtV5l5=0my zj6o@Zi6KH5l-#8l%nTSz=cEHkJn3snX$lt9gk0tb)> zgc(b;KptRZDB)#bL1}}7vmU4o&IoFgGn$w&urY!fzo5F7i!lJyz((aV1xP_!#{uBB z02fmL0|Qu@PXq%ys1D^~^a1Je31?sj6`Wj*E})PHn{ER#9TX7Y<_;sMqrnJj%7BX~ zMn6!UZ(#yz{DK;SEGSJt7C&Q99)~vI*zK^k+gKniP-u&d*+Q4e%8tn{f{Bqu58N8F z&;T`eSeRT)z_mG(6S#rK#F!G!#Kag9&cMPL6wbiN7-YsMgxQy3VfA5P_F-rC;bHdS zWp)x^W@NErU~pn%u;XE{0tKrT1G5t+vy}idBdZnzgApr(4HttM4}%^rsH?!t%*d#~ z%)r8G#lY;s&g{j*>;f@_)qsJ)ij~2Mi@}PA!3<=M10#bA4}$|A10$;u1EU2iqYW3M z1rMVYFCz<+6BC1j00SeV6Eh_nE(SLlLZr_880IXO9%r)2s=X*4?_q)10xe? zc!`^lg&B`=tZobp0qhI`JPZN63?2dujI34+j4rH<0bGnOJd8HHj4aG<49p&!%pM?5 zfqcu#;Ks$^#KT|*a%dO>LmekWm;eJKvmXOv9Xq2RFCzVG zVa4dc3K|>$)-Tn zu`pVI#H>L6a{#4O6J`d`*b}n@H?xHZGb5881A_@CC>ev4S%8%Jfmq<62?4QuSis{I z7$fISK`bN;o+C!inZ1LUNgg?OXF(l2XK{1|596Z_p@arAg6B9`BpDbSLl_vm0@xY6 zgM=6Yjbs>tLgg5O9hDhEgH;(KLi8CJ80;B9VK2tS0H&K5A!BEgL z6E>(IGZO9#26qnTeVhyo z49pKfj%Q$HWZ-3DzRJve2Q;_C`~)n>$jBhc#304YpvS@-!^)h-#$3$KT*AS82c(g~ zpOGPei6M}gA&7+`n3W-fjUkksA&i3|oRcAviy?}eA)1FFhL`y=AM+J{Mn1*|QVa|? zSQ!}j*%%nS%@`O?vN14tNHQ>3GBGeT=rS*|5Gw=29CikVGwcvKYLX=kkT_M9VqoxeVPpW! zJMEVM#Tz37$hsPK2GDpMc)qL*#13I#0HugdMh1q6Fa`$D^wlQ@28M_zZU#dJ1_m7o z1_ll$1_ldh1_tFs22DwAX$EHHJO(Z9|NlQQC>JqkN@>e5FdH~B@PR}G44fDkgcu|k z1Pq)R_&8NK83Y}jA&LbYT^RVRRNWa29bFmtxOur56dYX{`K)*YK@2v&M3pQCLq|85 z8g~Z1INo#y1xI%#J`oiu24hE01|AU}DF$IjPexW@PDuu4M;`{Lb{{6F$-WGH94hP# zjE;T`d_ueu3<{3^P=`4N!kiJrz^BBk%)sCn#0XZy;1~=uIhY4(atO@i5JtWrUKa)h z#}JqmAaG*kth++k|mVQSoAYCIVDWO(Hm7@Ry< z_+(WGBC(6$T2WDJ3`HIb_`jFQVM){(mPDOlA?6GUF;Jp)_J9VRvj;TjoIRjH=L`)f zLuYRWzGRgg20>>Z20kucE(S(tUr5jiI{PsgXISMkFgW|E@yV$uFbF#PGw=!W@-rwn z`wN1@$JjXl>OtoqP)ZPCP;d@{Nrf`-ajX76VBj1EGcX*cID$bh-Yl6x&>0jOpxopf z33Fj2%!N@f$49}WqM%YPuw>)n$_z>BF0Sn0z%+F6g2btSi#Jrei#Jrei#JTWFEqei zps_6M62-vB!OOv*;A+6Y$ImOopy28Z@{RUaaxI#0mpc^Q5K*8eX303Uo z303Uo#Q@2bZXge;x-$s6!4kHcKO~$D-GZQYxdp+r2eCrJ#~qYCLAuiM@cbMbdgP?wQ4~C{6_Yej?AsGn<0rwC_aO^O(p1VB zm_1;&d%$e>fZ6U50x^ftBNXCz1&>f@(0PPHUFhiosU|@67+)c84X8q6<;z#CWf1Um zQIjZ8tYcvC1O+B2ay?-Q$f%= z)dLtnGncCTpu)<_h(VPD%rIt94F)qz7*rL(3{wVG6)?k$K~)vZFlSIz12ZfbRAa#m zO9nnwbyWriFOc6sX~WBxfiG3Hj6u-LpMj5&mytoi%b%H#QI&zg&?|sJHA>4D)P`eJ zh3E=kQjJpg2Z=EAMe%xo7%Uo5T7C?SUIDBckq`!(dYGmcNQ7N0T;ChS;4q1>_5m?C z)j~BqK@2Xn5D>%Lk-A)v|zr#oL8}FN?Q?fyEo-LS8opMQ>Qb_V$2g z2X7B1aE&kM?FlWuyuBHWxGlLE7`$Pz$anm5)P}ox#vMf`Kocw}^qoJCZ?wTMXpFNM=agJp7pUUI zz~JKut=4@UnZR|EppO%zf>!WxVg>uu(8n3-9UoAp24#F7XorEU&`pbs?pG57>Sv$+o})%n0uoewP4`M|Q34=h{xgfjD4$+|Hp z`haQ>P?qrtgXTD&Flbu!iDcm8R{MWIz}Jz1k6%}SLBZFNk&i={1H@qBoH zib3rH@ea(%-Y z!O?B#8v!Y87<0=uFvE?3FJ2~z0W`J8r>v^NVCd%wtw#MkAytX7A1I(eLFeZKjY>ZsXjJ-v$}zB% zKTOIWCKbS-&11mBz~Bc8AFy4a417ZW|9=qhi-KfN1-~d3a7)I}9~1>3bNqdw+5;RJ zv>6PP7!(2=1^MJv6d8;IT%isNa20{HWCB1{8_47UcLqKtUPcCn0BFWn2=IVrhX8K| zzD$`y2E_oFF9Kk`2!Qz_0AxGZ96xAk2?&DLO#wk_kl+n~R%8qTus98X#c2R6P6NWB zSuX%oe}R%sKqMo$3Ca)<2`z{M4H=lYnYbB1YxWrQ7<51kMs5pk69(o$M+Ux3)nW$2 zAW-ap(pV5QVG9Pq!Z`>Q&Oxwn4gw`MP|yWIGpu0{s1*k)!-GN@!3l{mD3poMN5++me_(p(F9f;25ERG1cyoTiOGsF zCuWHVr32@PiB zFksaOG1#>%_02%KIM^&Xzzj}qb8ce>=Fmt6y+pG-28K|W!@@vqT2KlPgLXLu!(i1` zm@A}9&JgAbYAmHP2!??I9IP1HNf!?Dgt|El8kh`Wek^>+GC2%_VWAA*dQdPN6kjTV z3j4)temS&J;V2Ch;S`lHyV93nN!oUz=461IN85ANM8Tgn%c_+e&fk6Sx z2x4H&W3FOghzMp-W|wAWP>cv+00)agLHGeorgh|9kAcBE0B7|AQRv;3@U=igO zVH33%j0Q=ui#iC#fEXO2j)Jiu2B(OVKpcp{CF(2~1X9c`?J5)k zV(`eg35S9hyt3{hVIT&dBC8}DgHl8YzXFQ{D}z!*D1%TCpDTkxL>PlSw>Zesa0Vl9 zOB)8|hzJHbP}fx<0@iDbh+v7z3Jq z6rvoVJ)kIGX!REbE6})^{xb_oN$AQ&FtAuiF}vw7TbVMuMKFsn{AUuE5|3bF3Xx(C zLGT%voTQkYBAC?~Sy;rS1a-yjg4xHF*&&G8 zCxTfBp#Y@UPlwsTl-b3C+0UI>3+!4s2PUQvMdpGCW+b!NY^0b2beVl@nLUD-eZrUn zqM1dQ{xbz145a#K`Ve&7#J&5n6;Vy zGs;1j+)S)kBO5IdIO#Ckn1Ui15}}IlfQAIAG=!fL!HlL4;y*u-I15&L3_(t@V`2=k zW7cK*&m;;;bxbz8%q|hkx{UvsVWmdF;D&d9c2f2X7L5ev*k2$~}lw?sfg95-om)XS%^AW)y8~c2dkyI?MrP z%u$ZaVgAfz5zK;@@BRO zVRncBWnNIJ14>p3%<4>B%%DUe7s0?`AkJ)|%50#?Y+=l7V8(3W%4`tGtP{bk#>5QP zz`&@Xz^u;rAEtpxLje?gqD)+j;xY`38ZyjApj;Hrz^D?=tO7CEMlPIzNkg7lC7fB2 z=|79OjGUDmC=Qr4fk{IKWSl&x5R?IHlL2WHhgfJW7tX)}EpI%S zgTk4`m^cx}u_(we%UCgk7X3yrD>5RM>bHMv!0pXeumLzI}c7}-I}?fD{@7(IHPaa&Y$bVOfg}@9K*}&M`pGb}fNBykCdLpkXe9$G#zMeVlQP(Ua#nHyOiUqi%pn0#fj zFgZvuTNr>U0%ma;341w6ET}Vq(xU`Yt*Qk!0|zHJ)Q1S#gQ|23V^9b}Dl;9BxGq$&F0+*#vmL~6>2T1h2e3VI;S7vH;b106 zG$ovwfsKKI;e`}&>&!u0fmj*QwgT}(wgQQ=FoE|8i7`oqGwL$w+B5!VjA0aFj9?UI zlw#Jkk6@CD(9+Vf(#q1R((2Nht+m?9$|}pMD=RCjDyu7Nc2!kXSJmvQ)m>d(vuDqq Kz1r28fdK#}@ Date: Mon, 7 Mar 2022 15:20:43 -0500 Subject: [PATCH 0150/1476] split CPU and GPU from common/cpu/intel fix #388 --- common/cpu/intel/cpu-only.nix | 6 ++++++ common/cpu/intel/default.nix | 17 +++-------------- common/gpu/intel.nix | 15 +++++++++++++++ common/gpu/nvidia.nix | 4 ++++ flake.nix | 1 + 5 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 common/cpu/intel/cpu-only.nix create mode 100644 common/gpu/intel.nix diff --git a/common/cpu/intel/cpu-only.nix b/common/cpu/intel/cpu-only.nix new file mode 100644 index 00000000..f48b0361 --- /dev/null +++ b/common/cpu/intel/cpu-only.nix @@ -0,0 +1,6 @@ +{ config, lib, pkgs, ... }: + +{ + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/common/cpu/intel/default.nix b/common/cpu/intel/default.nix index 273360d2..966505f1 100644 --- a/common/cpu/intel/default.nix +++ b/common/cpu/intel/default.nix @@ -1,19 +1,8 @@ { config, lib, pkgs, ... }: { - boot.initrd.kernelModules = [ "i915" ]; - - environment.variables = { - VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); - }; - - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; - - hardware.opengl.extraPackages = with pkgs; [ - vaapiIntel - vaapiVdpau - libvdpau-va-gl - intel-media-driver + imports = [ + ./cpu-only.nix + ../../gpu/intel.nix ]; } diff --git a/common/gpu/intel.nix b/common/gpu/intel.nix new file mode 100644 index 00000000..31db8b44 --- /dev/null +++ b/common/gpu/intel.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: + +{ + boot.initrd.kernelModules = [ "i915" ]; + + environment.variables = { + VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); + }; + + hardware.opengl.extraPackages = with pkgs; [ + vaapiIntel + libvdpau-va-gl + intel-media-driver + ]; +} diff --git a/common/gpu/nvidia.nix b/common/gpu/nvidia.nix index fed9fa98..365dbfa3 100644 --- a/common/gpu/nvidia.nix +++ b/common/gpu/nvidia.nix @@ -19,4 +19,8 @@ in offload.enable = lib.mkDefault true; # Hardware should specify the bus ID for intel/nvidia devices }; + + hardware.opengl.extraPackages = with pkgs; [ + vaapiVdpau + ]; } diff --git a/flake.nix b/flake.nix index 990f44f9..2d121981 100644 --- a/flake.nix +++ b/flake.nix @@ -121,6 +121,7 @@ common-cpu-amd = import ./common/cpu/amd; common-cpu-intel = import ./common/cpu/intel; + common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only; common-cpu-intel-kaby-lake = import ./common/cpu/intel/kaby-lake; common-cpu-intel-sandy-bridge = import ./common/cpu/intel/sandy-bridge; common-gpu-amd = import ./common/gpu/amd; From bb8b3f19e041747d9ad45a83ac6b07093720833d Mon Sep 17 00:00:00 2001 From: Bruno Bigras Date: Tue, 12 Apr 2022 11:17:21 -0400 Subject: [PATCH 0151/1476] Update flake.nix Co-authored-by: amesgen --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 2d121981..53f1d7d0 100644 --- a/flake.nix +++ b/flake.nix @@ -121,7 +121,7 @@ common-cpu-amd = import ./common/cpu/amd; common-cpu-intel = import ./common/cpu/intel; - common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only; + common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix; common-cpu-intel-kaby-lake = import ./common/cpu/intel/kaby-lake; common-cpu-intel-sandy-bridge = import ./common/cpu/intel/sandy-bridge; common-gpu-amd = import ./common/gpu/amd; From 5c95599061f04d7e02822981c5967611a475c628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 13 Apr 2022 10:27:33 +0100 Subject: [PATCH 0152/1476] framework: bump kernel version (#406) * framework: bump kernel version --- framework/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/default.nix b/framework/default.nix index 678f78c3..599f5f73 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -9,9 +9,9 @@ # https://kvark.github.io/linux/framework/2021/10/17/framework-nixos.html boot.kernelParams = [ "mem_sleep_default=deep" ]; - # Requires at least 5.12 for working wi-fi and bluetooth. + # Requires at least 5.16 for working wi-fi and bluetooth. # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") (lib.mkDefault pkgs.linuxPackages_latest); # For fingerprint support services.fprintd.enable = true; From 4a0cdc97c85cb941e8ff4a91226bbc92ca20cd9e Mon Sep 17 00:00:00 2001 From: workflow <4farlion@gmail.com> Date: Fri, 15 Apr 2022 10:39:16 +0100 Subject: [PATCH 0153/1476] no longer ignore kernel config errors --- dell/xps/17-9700/common.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/dell/xps/17-9700/common.nix b/dell/xps/17-9700/common.nix index 986da90a..04241061 100644 --- a/dell/xps/17-9700/common.nix +++ b/dell/xps/17-9700/common.nix @@ -18,7 +18,6 @@ SND_SOC_INTEL_SOUNDWIRE_SOF_MACH m SND_SOC_RT1308 m ''; - ignoreConfigErrors = true; }]; boot.kernelPackages = From b750b56a20a335056c1211b91ae16a7fa057f1c2 Mon Sep 17 00:00:00 2001 From: koalp Date: Sat, 9 Apr 2022 23:48:00 +0200 Subject: [PATCH 0154/1476] feat: add acpi_call and ssd for thinkpad x270 acpi_call is required to use tlp on lenovo thinkpad x270 and some x270 have an ssd. Therefor, acpi_call and ssd have been added to the lenovo thinkpad x270 hardware config. --- lenovo/thinkpad/x270/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lenovo/thinkpad/x270/default.nix b/lenovo/thinkpad/x270/default.nix index af4991b3..726736f7 100644 --- a/lenovo/thinkpad/x270/default.nix +++ b/lenovo/thinkpad/x270/default.nix @@ -2,6 +2,8 @@ imports = [ ../. ../../../common/cpu/intel + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/ssd ]; boot.kernelParams = [ From f3dfd30170425adbc377ee502c3b4af13541b3ae Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Thu, 19 May 2022 15:51:19 -0400 Subject: [PATCH 0155/1476] framework: Fix headphone noise when on powersave https://community.frame.work/t/headphone-jack-intermittent-noise/5246/55 --- framework/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/framework/default.nix b/framework/default.nix index 599f5f73..15ac0d21 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -16,6 +16,12 @@ # For fingerprint support services.fprintd.enable = true; + # Fix headphone noise when on powersave + # https://community.frame.work/t/headphone-jack-intermittent-noise/5246/55 + services.udev.extraRules = '' + SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0xa0e0", ATTR{power/control}="on" + ''; + # HiDPI # Leaving here for documentation # hardware.video.hidpi.enable = lib.mkDefault true; From 34485f1807befc9b104e59e0716e7a5cd0967fcb Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Thu, 19 May 2022 15:56:34 -0400 Subject: [PATCH 0156/1476] framework: Fix TRRS headphones missing a mic As in the below forum post, this is not perhaps the most ideal solution to the problem, but it is the simplest. https://community.frame.work/t/headset-microphone-on-linux/12387/3 --- framework/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/framework/default.nix b/framework/default.nix index 599f5f73..647b1a76 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -13,6 +13,12 @@ # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") (lib.mkDefault pkgs.linuxPackages_latest); + # Fix TRRS headphones missing a mic + # https://community.frame.work/t/headset-microphone-on-linux/12387/3 + boot.extraModprobeConfig = '' + options snd-hda-intel model=dell-headset-multi + ''; + # For fingerprint support services.fprintd.enable = true; From 162fb7a9878f8ba190196190f3bb98b599eb2141 Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Sun, 1 May 2022 15:19:58 -0700 Subject: [PATCH 0157/1476] framework: acpilight should be used --- framework/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework/default.nix b/framework/default.nix index 31aadd87..ecbbfcb2 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -28,6 +28,11 @@ SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0xa0e0", ATTR{power/control}="on" ''; + # Mis-detected by nixos-generate-config + # https://github.com/NixOS/nixpkgs/issues/171093 + # https://wiki.archlinux.org/title/Framework_Laptop#Changing_the_brightness_of_the_monitor_does_not_work + hardware.acpilight.enable = lib.mkDefault true; + # HiDPI # Leaving here for documentation # hardware.video.hidpi.enable = lib.mkDefault true; From de8271f760987a29a8a181675d7b36cb3f324f11 Mon Sep 17 00:00:00 2001 From: Reed Riley Date: Fri, 20 May 2022 11:05:03 -0400 Subject: [PATCH 0158/1476] framework: make it possible to disable fprintd if desired --- framework/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/default.nix b/framework/default.nix index ecbbfcb2..84797b31 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -20,7 +20,7 @@ ''; # For fingerprint support - services.fprintd.enable = true; + services.fprintd.enable = lib.mkDefault true; # Fix headphone noise when on powersave # https://community.frame.work/t/headphone-jack-intermittent-noise/5246/55 From 4a8259f0e255d0406728a4ff250b18aecf7eceeb Mon Sep 17 00:00:00 2001 From: Reed Riley Date: Thu, 19 May 2022 09:43:13 -0400 Subject: [PATCH 0159/1476] framework: add nvme.noacpi=1 --- framework/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/framework/default.nix b/framework/default.nix index 84797b31..431d23b5 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -5,9 +5,14 @@ ../common/pc/laptop/ssd ]; - # For Power consumption - # https://kvark.github.io/linux/framework/2021/10/17/framework-nixos.html - boot.kernelParams = [ "mem_sleep_default=deep" ]; + boot.kernelParams = [ + # For Power consumption + # https://kvark.github.io/linux/framework/2021/10/17/framework-nixos.html + "mem_sleep_default=deep" + # For Power consumption + # https://community.frame.work/t/linux-battery-life-tuning/6665/156 + "nvme.noacpi=1" + ]; # Requires at least 5.16 for working wi-fi and bluetooth. # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 From e850604127367e29af0285e0c1a3482b94f76fae Mon Sep 17 00:00:00 2001 From: JSteinbach Date: Sat, 14 May 2022 20:57:52 +0200 Subject: [PATCH 0160/1476] Add Dell Latitude 5520 --- README.md | 1 + dell/latitude/5520/README.md | 66 ++++++++++++++++++++++++++++++++++ dell/latitude/5520/default.nix | 18 ++++++++++ flake.nix | 1 + 4 files changed, 86 insertions(+) create mode 100644 dell/latitude/5520/README.md create mode 100644 dell/latitude/5520/default.nix diff --git a/README.md b/README.md index 8412349b..bf6a8f4c 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ See code for all available configurations. | [Dell Inspiron 5509](dell/inspiron/5509) | `` | | [Dell Inspiron 5515](dell/inspiron/5515) | `` | | [Dell Latitude 3480](dell/latitude/3480) | `` | +| [Dell Latitude 5520](dell/latitude/5520) | `` | | [Dell Latitude 7490](dell/latitude/7490) | `` | | [Dell Poweredge R7515](dell/poweredge/r7515) | `` | | [Dell Precision 5530](dell/precision/5530) | `` | diff --git a/dell/latitude/5520/README.md b/dell/latitude/5520/README.md new file mode 100644 index 00000000..83e7c9d0 --- /dev/null +++ b/dell/latitude/5520/README.md @@ -0,0 +1,66 @@ +# Dell Latitude 5520 + +## Hardware + +- 11th Gen Intel® Core™ i7-1185G7, vPro® (12 MB cache, 4 cores, 8 threads, 3.00 to 4.80 GHz Turbo) +- Intel® Iris® Xe Graphics Capable with Thunderbolt for i7-1185G7 vPro® processor +- 15.6" FHD (1920x1080) Non-Touch, Anti-Glare, 250nits +- 16 GB, 1 x 16 GB, DDR4, 3200 MHz +- 512 GB, M.2, PCIe NVMe, SSD, Class 35 +- Dimensions + - Height: 0.78 in. (19.87 mm) + - Width: 14.09 in. (357.8 mm) + - Depth: 9.19 in. (233.3 mm) + - Weight: 3.50 lbs. (1.59 kg) +- Power + - 4 Cell, 63 Wh, ExpressCharge™ Capable + - 65W Type-C EPEAT Adapter +- Ports + - 1 RJ-45 Ethernet port + - 1 USB 3.2 Gen 1 port + - 1 USB 3.2 Gen 1 port with PowerShare + - 2 Thunderbolt 4 ports with DisplayPort Alt Mode/USB4/Power Delivery for 11th Generation Intel® Core™ i3/i5/i7 processors + - 1 HDMI 2.0 port for 11th Generation Intel® Core™ i3/i5/i7 processors + - 1 Universal audio port + +```shellsession +↳ lspci -nn +00:00.0 Host bridge [0600]: Intel Corporation 11th Gen Core Processor Host Bridge/DRAM Registers [8086:9a14] (rev 01) +00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] [8086:9a49] (rev 01) +00:04.0 Signal processing controller [1180]: Intel Corporation TigerLake-LP Dynamic Tuning Processor Participant [8086:9a03] (rev 01) +00:07.0 PCI bridge [0604]: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #0 [8086:9a23] (rev 01) +00:07.1 PCI bridge [0604]: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #1 [8086:9a25] (rev 01) +00:0d.0 USB controller [0c03]: Intel Corporation Tiger Lake-LP Thunderbolt 4 USB Controller [8086:9a13] (rev 01) +00:0d.2 USB controller [0c03]: Intel Corporation Tiger Lake-LP Thunderbolt 4 NHI #0 [8086:9a1b] (rev 01) +00:12.0 Serial controller [0700]: Intel Corporation Tiger Lake-LP Integrated Sensor Hub [8086:a0fc] (rev 20) +00:14.0 USB controller [0c03]: Intel Corporation Tiger Lake-LP USB 3.2 Gen 2x1 xHCI Host Controller [8086:a0ed] (rev 20) +00:14.2 RAM memory [0500]: Intel Corporation Tiger Lake-LP Shared SRAM [8086:a0ef] (rev 20) +00:14.3 Network controller [0280]: Intel Corporation Wi-Fi 6 AX201 [8086:a0f0] (rev 20) +00:15.0 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #0 [8086:a0e8] (rev 20) +00:15.1 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #1 [8086:a0e9] (rev 20) +00:16.0 Communication controller [0780]: Intel Corporation Tiger Lake-LP Management Engine Interface [8086:a0e0] (rev 20) +00:16.3 Serial controller [0700]: Intel Corporation Device [8086:a0e3] (rev 20) +00:1c.0 PCI bridge [0604]: Intel Corporation Device [8086:a0be] (rev 20) +00:1d.0 PCI bridge [0604]: Intel Corporation Tiger Lake-LP PCI Express Root Port #9 [8086:a0b0] (rev 20) +00:1f.0 ISA bridge [0601]: Intel Corporation Tiger Lake-LP LPC Controller [8086:a082] (rev 20) +00:1f.3 Audio device [0403]: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller [8086:a0c8] (rev 20) +00:1f.4 SMBus [0c05]: Intel Corporation Tiger Lake-LP SMBus Controller [8086:a0a3] (rev 20) +00:1f.5 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP SPI Controller [8086:a0a4] (rev 20) +00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (13) I219-LM [8086:15fb] (rev 20) +71:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader [10ec:525a] (rev 01) +72:00.0 Non-Volatile memory controller [0108]: SK hynix Device [1c5c:174a] +``` + +## Firmware Upgrade Manager + +_Dell Latitude 5520_ seems to be supported by [fwupd](https://fwupd.org), as it is found in the [device list](https://fwupd.org/lvfs/devices/). Use `fwupdmgr` to perform updates. + +## Other Stuff + +Here I list a few useful things from other configs. As I don't fully understand the implications I didn't enable them. + +- `services.throttled.enable`: a fix for Intel CPU throttling +- `boot.blacklistedKernelModules = [ "psmouse" ];`: "touchpad goes over i2c" (whatever that means) +- `boot.blacklistedKernelModules = [ "firewire_ohci" ];`: fix for SD card reader (from the [Arch Wiki](https://wiki.archlinux.org/title/Dell_Latitude_E5520)) +- `boot.kernelParams = [ "mem_sleep_default=deep" ];`: Force S3 sleep mode to preserve battery during sleep + diff --git a/dell/latitude/5520/default.nix b/dell/latitude/5520/default.nix new file mode 100644 index 00000000..f53ba080 --- /dev/null +++ b/dell/latitude/5520/default.nix @@ -0,0 +1,18 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + # Essential Firmware + hardware.enableRedistributableFirmware = lib.mkDefault true; + + # Cooling Management + services.thermald.enable = lib.mkDefault true; + + # Enable fwupd + services.fwupd.enable = lib.mkDefault true; +} diff --git a/flake.nix b/flake.nix index 32827ec0..c9237297 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,7 @@ dell-inspiron-5509 = import ./dell/inspiron/5509; dell-inspiron-5515 = import ./dell/inspiron/5515; dell-latitude-3480 = import ./dell/latitude/3480; + dell-latitude-5520 = import ./dell/latitude/5520; dell-latitude-7490 = import ./dell/latitude/7490; dell-poweredge-r7515 = import ./dell/poweredge/r7515; dell-precision-5530 = import ./dell/precision/5530; From 169611d1d7e698147b3443f829c81d0d64e51a14 Mon Sep 17 00:00:00 2001 From: Shu Lin Date: Mon, 23 May 2022 21:46:43 +0800 Subject: [PATCH 0161/1476] update readme: known issue --- dell/xps/13-7390/README.wiki | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dell/xps/13-7390/README.wiki b/dell/xps/13-7390/README.wiki index 6ec37d0f..64b8af6f 100644 --- a/dell/xps/13-7390/README.wiki +++ b/dell/xps/13-7390/README.wiki @@ -4,6 +4,16 @@ You need to disable RAID and use AHCI instead as described [https://wiki.ubuntu.com/Dell/XPS/XPS-13-7390-2-in-1 here]. +== Known Issues == + +If your BIOS version is greater than or equal to 1.0.13, you may need to add + + +systemd.sleep.extraConfig = "SuspendState=freeze"; + + +to your configuration.nix if you cannot wake from "Sleep". See reference [https://askubuntu.com/a/1194128 here]. + == Firmware upgrades == Note that this device is supported by [https://fwupd.org/ fwupd]. From 0f0087734304be2ad294136a919598d5b1ed7dbc Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Mon, 23 May 2022 10:28:22 -0500 Subject: [PATCH 0162/1476] docs(framework): Add notes about updating firmware https://github.com/NixOS/nixos-hardware/pull/406#issuecomment-1132577510 --- framework/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 framework/README.md diff --git a/framework/README.md b/framework/README.md new file mode 100644 index 00000000..e8d10e04 --- /dev/null +++ b/framework/README.md @@ -0,0 +1,17 @@ +# [Framework Laptop](https://frame.work/) + +## Updating Firmware + +First put enable `fwupd` + +```nix +services.fwupd.enable = true; +``` + +Then run + +```sh + $ sudo fwupdmgr update +``` + +[Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.TGL.BIOS.firmware) From 07e5049f8f36d064fbbb91a21238adfd3e737334 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Tue, 31 May 2022 13:38:23 +0200 Subject: [PATCH 0163/1476] p14s: ensure rtw89 driver is available --- lenovo/thinkpad/p14s/amd/gen2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lenovo/thinkpad/p14s/amd/gen2/default.nix b/lenovo/thinkpad/p14s/amd/gen2/default.nix index 062ad8f0..8f0e257b 100644 --- a/lenovo/thinkpad/p14s/amd/gen2/default.nix +++ b/lenovo/thinkpad/p14s/amd/gen2/default.nix @@ -15,6 +15,6 @@ # Wifi support hardware.firmware = [ pkgs.rtw89-firmware ]; - # For support of newer AMD GPUs, backlight and internal microphone - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.13") pkgs.linuxPackages_latest; + # For mainline support of rtw89 wireless networking + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; } From 0543980bd62216ed625301bc1221fe55265d8dd7 Mon Sep 17 00:00:00 2001 From: Raphiel Rollerscaperers Date: Tue, 24 May 2022 00:06:12 +0700 Subject: [PATCH 0164/1476] msi/gl62: init This commit initialize support for MS-16J61 (Laptop) Motherboard with unified BIOS of E16J6IMS, which includes: - MSI GL62 6QD - MSI GL62 6QC - MSI CX62 6QD - MSI CR62 6M --- README.md | 1 + flake.nix | 1 + msi/gl62/default.nix | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 msi/gl62/default.nix diff --git a/README.md b/README.md index bf6a8f4c..f1769128 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,7 @@ See code for all available configurations. | [Lenovo ThinkPad X270](lenovo/thinkpad/x270) | `` | | [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | | [MSI GS60 2QE](msi/gs60) | `` | +| [MSI GL62/CX62](msi/gl62) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | | [Microsoft Surface Range](microsoft/surface) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | diff --git a/flake.nix b/flake.nix index c9237297..5f9bee01 100644 --- a/flake.nix +++ b/flake.nix @@ -104,6 +104,7 @@ microsoft-surface = import ./microsoft/surface; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; msi-gs60 = import ./msi/gs60; + msi-gl62 = import ./msi/gl62; onenetbook-4 = import ./onenetbook/4; pcengines-apu = import ./pcengines/apu; pine64-pinebook-pro = import ./pine64/pinebook-pro; diff --git a/msi/gl62/default.nix b/msi/gl62/default.nix new file mode 100644 index 00000000..afba7359 --- /dev/null +++ b/msi/gl62/default.nix @@ -0,0 +1,27 @@ +{ config, lib, ... }: + +{ + imports = [ + ../../common/pc/laptop/ssd + ../../common/cpu/intel + ../../common/gpu/nvidia.nix + ../../common/pc/laptop + ]; + + boot.kernelParams = [ + # For Power consumption in case of NVME SSD + # was installed. + "nvme.noacpi=1" + + # For fixing interferences with Fn- action keys + "video.report_key_events=0" + ]; + + 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"; + }; +} From 03fd7b6bd0724c71fe21c200f94bf6c2c4d2a011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 1 Jun 2022 06:27:46 +0200 Subject: [PATCH 0165/1476] msi/gl62: also include basic README --- msi/gl62/README.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 msi/gl62/README.md diff --git a/msi/gl62/README.md b/msi/gl62/README.md new file mode 100644 index 00000000..d04f9623 --- /dev/null +++ b/msi/gl62/README.md @@ -0,0 +1,6 @@ +This module is for MS-16J61-based laptops with unified BIOS of E16J6IMS, which includes: + +- MSI GL62 6QD +- MSI GL62 6QC +- MSI CX62 6QD +- MSI CR62 6M From 26291dec5bc0ea4ed1534fddbb4debc9b08d9e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Tue, 21 Jun 2022 06:12:29 +0200 Subject: [PATCH 0166/1476] flake.nix: add common-gpu-intel --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 5f9bee01..df1c185d 100644 --- a/flake.nix +++ b/flake.nix @@ -131,6 +131,7 @@ common-gpu-amd = import ./common/gpu/amd; common-gpu-amd-sea-islands = import ./common/gpu/amd/sea-islands; common-gpu-amd-southern-islands = import ./common/gpu/amd/southern-islands; + common-gpu-intel = import ./common/gpu/intel.nix; common-gpu-nvidia = import ./common/gpu/nvidia.nix; common-gpu-nvidia-disable = import ./common/gpu/nvidia-disable.nix; common-pc = import ./common/pc; From 9ec5f52ea235cdafa93f6fa69bf4183e8d8c1b23 Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Thu, 23 Jun 2022 09:29:16 +0200 Subject: [PATCH 0167/1476] Add lenovo legion 7 16ITHg6 --- flake.nix | 1 + lenovo/legion/16ithg6/default.nix | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 lenovo/legion/16ithg6/default.nix diff --git a/flake.nix b/flake.nix index df1c185d..4dc9d227 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,7 @@ lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-legion-15ach6 = import ./lenovo/legion/15ach6; lenovo-legion-15arh05h = import ./lenovo/legion/15arh05h; + lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; lenovo-thinkpad = import ./lenovo/thinkpad; lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel; diff --git a/lenovo/legion/16ithg6/default.nix b/lenovo/legion/16ithg6/default.nix new file mode 100644 index 00000000..e63c165c --- /dev/null +++ b/lenovo/legion/16ithg6/default.nix @@ -0,0 +1,19 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/nvidia.nix + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + # Specify bus id of Nvidia and Intel graphics. + hardware.nvidia.prime = { + intelBusId = "PCI:00:02:0"; + nvidiaBusId = "PCI:01:00:0"; + }; + + # Cooling management + services.thermald.enable = lib.mkDefault true; +} From 9194b8e949bed0be52729de9c1ed96674c0d3758 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 24 Jun 2022 23:45:31 +0100 Subject: [PATCH 0168/1476] nvidia: remove `-a` flag from exec The `-a` from exec sets the `$0` from the process. So `exec -a "$0"` would set the name of the new process to `nvidia-offload` (the name of the script), however this is causing issues with a few programs that try to interpret `$0` in a special way. For example, see `wine`: ``` $ nvidia-offload /nix/store/zhv91s26gsrl1w8yn9800xd03a31r3wj-wine-osu-7.0/bin/wine .osu/drive_c/osu/osu\!.exe /nix/store/zhv91s26gsrl1w8yn9800xd03a31r3wj-wine-osu-7.0/bin/nvidia-offload: could not open ``` What I think `wine` is doing here is trying to re-exec `wine` again, but to do so it tries to figure out the original call of wine by readind `$0`, and will fail in this case because the `$0` was changed because of the `nvidia-offload` script using `-a` flag, as explained above. Instead, let's simplify this. There is no good reason to rename the `$0` from the script anyway (it just sets a few environment variables), so let's just remove it. We may lose the ability to know if the command is being offloaded, but I think having more commands to work is a good trade-off. --- common/gpu/nvidia.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/gpu/nvidia.nix b/common/gpu/nvidia.nix index 365dbfa3..dffeb2ab 100644 --- a/common/gpu/nvidia.nix +++ b/common/gpu/nvidia.nix @@ -8,7 +8,7 @@ let export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 export __GLX_VENDOR_LIBRARY_NAME=nvidia export __VK_LAYER_NV_optimus=NVIDIA_only - exec -a "$0" "$@" + exec "$@" ''; in { From a3dfc3100b26fe664214e37a8eeb171af2f50b99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= <123550+andresilva@users.noreply.github.com> Date: Sun, 26 Jun 2022 13:20:38 +0100 Subject: [PATCH 0169/1476] flake.nix: add macbook-pro --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 4dc9d227..6db6c5b7 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,7 @@ apple-macbook-air-3 = import ./apple/macbook-air/3; apple-macbook-air-4 = import ./apple/macbook-air/4; apple-macbook-air-6 = import ./apple/macbook-air/6; + apple-macbook-pro = import ./apple/macbook-pro; apple-macbook-pro-10-1 = import ./apple/macbook-pro/10-1; apple-macbook-pro-11-5 = import ./apple/macbook-pro/11-5; apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; From 3d9b6a6215412a5206dea4edefef6f8edd4d1134 Mon Sep 17 00:00:00 2001 From: Samuel Hierholzer Date: Tue, 28 Jun 2022 08:28:04 +0200 Subject: [PATCH 0170/1476] Fix Wifi for Lenovo Thinkpad T14s Gen1 --- lenovo/thinkpad/t14s/amd/gen1/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lenovo/thinkpad/t14s/amd/gen1/default.nix b/lenovo/thinkpad/t14s/amd/gen1/default.nix index cb1ec7d8..06627212 100644 --- a/lenovo/thinkpad/t14s/amd/gen1/default.nix +++ b/lenovo/thinkpad/t14s/amd/gen1/default.nix @@ -5,4 +5,9 @@ imports = [ ../. ]; + # Wifi support + hardware.firmware = [ pkgs.rtw89-firmware ]; + + # For mainline support of rtw89 wireless networking + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; } From c3aa1fae79e684bf0aba290b45c2f688c3ea5af1 Mon Sep 17 00:00:00 2001 From: Konrad Borowski Date: Tue, 28 Jun 2022 06:57:34 +0200 Subject: [PATCH 0171/1476] lenovo/thinkpad/x1-extreme/gen4: add module --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/x1-extreme/gen4/default.nix | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 lenovo/thinkpad/x1-extreme/gen4/default.nix diff --git a/README.md b/README.md index f1769128..462912f9 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,7 @@ See code for all available configurations. | [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | | [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | | [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | +| [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | | [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | | [Lenovo ThinkPad X13](lenovo/thinkpad/x13) | `` | | [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | diff --git a/flake.nix b/flake.nix index 6db6c5b7..06d488c9 100644 --- a/flake.nix +++ b/flake.nix @@ -93,6 +93,7 @@ lenovo-thinkpad-x1-9th-gen = import ./lenovo/thinkpad/x1/9th-gen; lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme; lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2; + lenovo-thinkpad-x1-extreme-gen4 = import ./lenovo/thinkpad/x1-extreme/gen4; lenovo-thinkpad-x13 = import ./lenovo/thinkpad/x13; lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13/yoga; lenovo-thinkpad-x140e = import ./lenovo/thinkpad/x140e; diff --git a/lenovo/thinkpad/x1-extreme/gen4/default.nix b/lenovo/thinkpad/x1-extreme/gen4/default.nix new file mode 100644 index 00000000..f52fe1ec --- /dev/null +++ b/lenovo/thinkpad/x1-extreme/gen4/default.nix @@ -0,0 +1,16 @@ +{ config, lib, ... }: + +{ + imports = [ + ../. + ]; + + # New ThinkPads have a different TrackPoint manufacturer/name. + hardware.trackpoint.device = "TPPS/2 Elan TrackPoint"; + + # Set the right DPI. xdpyinfo says the screen is 677x423 mm but + # it actually is 344×215 mm. + services.xserver.monitorSection = lib.mkDefault '' + DisplaySize 344 215 + ''; +} From 0efe78c51adc601905e683af68052cac828abd22 Mon Sep 17 00:00:00 2001 From: SuperSamus <40663462+SuperSamus@users.noreply.github.com> Date: Sat, 2 Jul 2022 23:39:55 +0200 Subject: [PATCH 0172/1476] AMD: Add lib.mkDefault to AMD_VULKAN_ICD --- common/gpu/amd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix index b11854d4..762b3c04 100644 --- a/common/gpu/amd/default.nix +++ b/common/gpu/amd/default.nix @@ -19,5 +19,5 @@ driSupport32Bit = lib.mkDefault true; }; - environment.variables.AMD_VULKAN_ICD = "RADV"; + environment.variables.AMD_VULKAN_ICD = lib.mkDefault "RADV"; } From f90db4cb9e0ebc8ec767f088e324f54eef167b29 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 4 Jul 2022 23:24:35 -0400 Subject: [PATCH 0173/1476] add p50 and p51 --- README.md | 2 + lenovo/thinkpad/p50/default.nix | 100 +++++++++++++++++++++++++++++++ lenovo/thinkpad/p51/default.nix | 101 ++++++++++++++++++++++++++++++++ 3 files changed, 203 insertions(+) create mode 100644 lenovo/thinkpad/p50/default.nix create mode 100644 lenovo/thinkpad/p51/default.nix diff --git a/README.md b/README.md index 462912f9..13005f23 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,8 @@ See code for all available configurations. | [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | | [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | | [Lenovo ThinkPad P1](thinkpad/p1) | `` | +| [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | +| [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `` | | [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | | [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | | [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | diff --git a/lenovo/thinkpad/p50/default.nix b/lenovo/thinkpad/p50/default.nix new file mode 100644 index 00000000..f9bdee9f --- /dev/null +++ b/lenovo/thinkpad/p50/default.nix @@ -0,0 +1,100 @@ +{ lib, ... }: +{ + imports = [ + ../../../common/gpu/nvidia.nix + ../../../common/cpu/intel + ../../../common/pc/laptop/acpi_call.nix + ../. + ]; + + hardware = { + nvidia = { + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + + # is this too much? It's convenient for Steam. + opengl = { + driSupport = lib.mkDefault true; + driSupport32Bit = lib.mkDefault true; + }; + }; + + # Sleep + # ----- + # + # The system will not resume from sleep properly while on battery power in + # either offload mode or sync mode. When it tries to resume, it gets to a + # state with a cursor in the top left hand side of the panel, the power LED + # goes from flashing to solid, and thereafter cannot be interacted with (even + # over SSH) and must be power cycled forcefully. Sometimes it doesn't even + # finish going to sleep before this behavior kicks in. + # + # When on AC, the machine either wakes up from sleep before being asked to + # (or maybe never gets to sleep state), or it goes into a sleep state and it + # appears consistently resume properly when it does. + # + # But the machine actually sleeps and resumes reliably when tlp is disabled + # fully or partially. Disabling RUNTIME_PM and AHCI_RUNTIME_PM appears to be + # enough to allow it to work when tlp is active. I couldn't figure out a + # more granular way to get it working, despite trying to do a per-device + # binary search via powertop. + # + # My personal configuration to make this work looks like this: + # + # {config, lib, ...}: + # + # { + # services.tlp = { + # settings = { + # # DISK_DEVICES must be specified for AHCI_RUNTIME_PM settings to work right. + # DISK_DEVICES = "nvme0n1 nvme1n1 sda sdb"; + # + # # with AHCI_RUNTIME_PM_ON_AC/BAT set to defaults in battery mode, P51 + # # can't resume from sleep and P50 can't go to sleep. + # AHCI_RUNTIME_PM_ON_AC = "on"; + # AHCI_RUNTIME_PM_ON_BAT = "on"; + # + # # with RUNTIME_PM_ON_BAT/AC set to defaults, P50/P51 can't go to sleep + # RUNTIME_PM_ON_AC = "on"; + # RUNTIME_PM_ON_BAT = "on"; + # }; + # }; + # } + # + # I'm thinking this is too aggressive to put into shared config, and folks may + # be concerned with the hit on battery life. + # + # throttled vs. thermald + # ----------------------- + # + # NB: the p53 profile currently uses throttled to prevent too-eager CPU + # throttling. I understand throttled to have been a workaround solution at + # the time the p53 profile was created (throttled's original name was + # "lenovo_fix"). thermald would have been preferred if it worked at the + # time. + # + # I read + # https://wiki.archlinux.org/title/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Power_management.2FThrottling_issues + # as saying that thermald is fixed under the circumstance that led to the + # development of throttled given version 5.12+ of the kernel combined + # with version 2.4.3+ of thermald. At the time of this writing, the + # stable NixOS kernel is 5.15 and 2.4.9 of thermald. + # + # In the meantime, I also ran the "s-tui" program which can stress test the + # system, while eyeing up the core temps and CPU frequency under three + # scenarios: under thermald, under throttled, and with neither. None of the + # scenarios seem to have massively improved fan behavior, core temps, or + # average CPU frequency than another. The highest core temp always seems to + # hover around 90 degrees C, the lowest CPU Ghz around 3.4 on a 3.8Ghz machine. + # + # I ended up choosing throttled because subjectively, the fans seem quieter + # when it's stressed and it allows the average temps to get a degree or two + # higher when running throttled than when running in the other two scenarios, + # but still substantially under critical temp. + + services.throttled.enable = lib.mkDefault true; + +} diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix new file mode 100644 index 00000000..9fa04196 --- /dev/null +++ b/lenovo/thinkpad/p51/default.nix @@ -0,0 +1,101 @@ +{ lib, ... }: +{ + imports = [ + ../../../common/gpu/nvidia.nix + ../../../common/cpu/intel + ../../../common/cpu/intel/kaby-lake + ../../../common/pc/laptop/acpi_call.nix + ../. + ]; + + hardware = { + nvidia = { + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + + # is this too much? It's convenient for Steam. + opengl = { + driSupport = lib.mkDefault true; + driSupport32Bit = lib.mkDefault true; + }; + }; + + # Sleep + # ----- + # + # The system will not resume from sleep properly while on battery power in + # either offload mode or sync mode. When it tries to resume, it gets to a + # state with a cursor in the top left hand side of the panel, the power LED + # goes from flashing to solid, and thereafter cannot be interacted with (even + # over SSH) and must be power cycled forcefully. Sometimes it doesn't even + # finish going to sleep before this behavior kicks in. + # + # When on AC, the machine either wakes up from sleep before being asked to + # (or maybe never gets to sleep state), or it goes into a sleep state and it + # appears consistently resume properly when it does. + # + # But the machine actually sleeps and resumes reliably when tlp is disabled + # fully or partially. Disabling RUNTIME_PM and AHCI_RUNTIME_PM appears to be + # enough to allow it to work when tlp is active. I couldn't figure out a + # more granular way to get it working, despite trying to do a per-device + # binary search via powertop. + # + # My personal configuration to make sleep work looks like this: + # + # {config, lib, ...}: + # + # { + # services.tlp = { + # settings = { + # # DISK_DEVICES must be specified for AHCI_RUNTIME_PM settings to work right. + # DISK_DEVICES = "nvme0n1 nvme1n1 sda sdb"; + # + # # with AHCI_RUNTIME_PM_ON_AC/BAT set to defaults in battery mode, P51 + # # can't resume from sleep and P50 can't go to sleep. + # AHCI_RUNTIME_PM_ON_AC = "on"; + # AHCI_RUNTIME_PM_ON_BAT = "on"; + # + # # with RUNTIME_PM_ON_BAT/AC set to defaults, P50/P51 can't go to sleep + # RUNTIME_PM_ON_AC = "on"; + # RUNTIME_PM_ON_BAT = "on"; + # }; + # }; + # } + # + # I'm thinking this is too aggressive to put into shared config, and folks may + # be concerned with the hit on battery life. + # + # throttled vs. thermald + # ----------------------- + # + # NB: the p53 profile currently uses throttled to prevent too-eager CPU + # throttling. I understand throttled to have been a workaround solution at + # the time the p53 profile was created (throttled's original name was + # "lenovo_fix"). thermald would have been preferred if it worked at the + # time. + # + # I read + # https://wiki.archlinux.org/title/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Power_management.2FThrottling_issues + # as saying that thermald is fixed under the circumstance that led to the + # development of throttled given version 5.12+ of the kernel combined + # with version 2.4.3+ of thermald. At the time of this writing, the + # stable NixOS kernel is 5.15 and 2.4.9 of thermald. + # + # In the meantime, I also ran the "s-tui" program which can stress test the + # system, while eyeing up the core temps and CPU frequency under three + # scenarios: under thermald, under throttled, and with neither. None of the + # scenarios seem to have massively improved fan behavior, core temps, or + # average CPU frequency than another. The highest core temp always seems to + # hover around 90 degrees C, the lowest CPU Ghz around 3.4 on a 3.8Ghz machine. + # + # I ended up choosing throttled because subjectively, the fans seem quieter + # when it's stressed and it allows the average temps to get a degree or two + # higher when running throttled than when running in the other two scenarios, + # but still substantially under critical temp. + + services.throttled.enable = lib.mkDefault true; + +} From e36b0c4022ddd6ac69cdd8ed5d798bc0fd8d938e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 5 Jul 2022 14:39:22 -0400 Subject: [PATCH 0174/1476] add p52 --- README.md | 1 + lenovo/thinkpad/p52/default.nix | 66 +++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 lenovo/thinkpad/p52/default.nix diff --git a/README.md b/README.md index 462912f9..abdafecc 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,7 @@ See code for all available configurations. | [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | | [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | | [Lenovo ThinkPad P1](thinkpad/p1) | `` | +| [Lenovo ThinkPad P52](lenovo/thinkpad/p52) | `` | | [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | | [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | | [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | diff --git a/lenovo/thinkpad/p52/default.nix b/lenovo/thinkpad/p52/default.nix new file mode 100644 index 00000000..42d42dd8 --- /dev/null +++ b/lenovo/thinkpad/p52/default.nix @@ -0,0 +1,66 @@ +{ lib, ... }: +{ + imports = [ + ../../../common/gpu/nvidia.nix + ../../../common/cpu/intel + ../../../common/pc/laptop/acpi_call.nix + ../. + ]; + + hardware = { + nvidia = { + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + + # is this too much? It's convenient for Steam. + opengl = { + driSupport = lib.mkDefault true; + driSupport32Bit = lib.mkDefault true; + }; + }; + + # Sleep + # ----- + # + # The system will not stay asleep properly while on battery power or AC in + # either offload mode or sync mode. This is true whether TLP is enabled or + # disabled. When the system is told to sleep, it will appear to go into a + # sleep state, but within five minutes (and sometimes much more quickly; in + # my case especially if a USB hub is connected), it will wake itself. I + # attempted to identify what was causing this to happen, but was not + # successful. Note that this behavior is different from that of the P50 or + # P51, both of which can be convinced to sleep by changing TLP config. + # + # throttled vs. thermald + # ----------------------- + # + # NB: the p53 profile currently uses throttled to prevent too-eager CPU + # throttling. I understand throttled to have been a workaround solution at + # the time the p53 profile was created (throttled's original name was + # "lenovo_fix"). thermald would have been preferred if it worked at the + # time. + # + # I read + # https://wiki.archlinux.org/title/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Power_management.2FThrottling_issues + # as saying that thermald is fixed under the circumstance that led to the + # development of throttled given version 5.12+ of the kernel combined + # with version 2.4.3+ of thermald. At the time of this writing, the + # stable NixOS kernel is 5.15 and 2.4.9 of thermald. + # + # In the meantime, I also ran the "s-tui" program which can stress test the + # system, while eyeing up the core temps and CPU frequency under three + # scenarios: under thermald, under throttled, and with neither. None of the + # scenarios seem to have massively improved fan behavior, core temps, or + # average CPU frequency than another. The highest core temp always seems to + # hover around 90 degrees C, the lowest CPU Ghz around 3.4 on a 3.8Ghz machine. + # + # I ended up choosing throttled because subjectively, the fans seem quieter + # when it's stressed and it allows the average temps to get a degree or two + # higher when running throttled than when running in the other two scenarios, + # but still substantially under critical temp. + + services.thermald.enable = lib.mkDefault true; +} From ac75bbc47637e5e46fd7b8d1b153348f0d306b99 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 5 Jul 2022 17:45:16 -0400 Subject: [PATCH 0175/1476] transform sleep comment into optionally includable expression --- lenovo/thinkpad/p50/default.nix | 46 ++------------------------------- lenovo/thinkpad/p50/sleep.nix | 41 +++++++++++++++++++++++++++++ lenovo/thinkpad/p51/default.nix | 46 ++------------------------------- lenovo/thinkpad/p51/sleep.nix | 41 +++++++++++++++++++++++++++++ 4 files changed, 86 insertions(+), 88 deletions(-) create mode 100644 lenovo/thinkpad/p50/sleep.nix create mode 100644 lenovo/thinkpad/p51/sleep.nix diff --git a/lenovo/thinkpad/p50/default.nix b/lenovo/thinkpad/p50/default.nix index f9bdee9f..f1f6038b 100644 --- a/lenovo/thinkpad/p50/default.nix +++ b/lenovo/thinkpad/p50/default.nix @@ -22,50 +22,8 @@ }; }; - # Sleep - # ----- - # - # The system will not resume from sleep properly while on battery power in - # either offload mode or sync mode. When it tries to resume, it gets to a - # state with a cursor in the top left hand side of the panel, the power LED - # goes from flashing to solid, and thereafter cannot be interacted with (even - # over SSH) and must be power cycled forcefully. Sometimes it doesn't even - # finish going to sleep before this behavior kicks in. - # - # When on AC, the machine either wakes up from sleep before being asked to - # (or maybe never gets to sleep state), or it goes into a sleep state and it - # appears consistently resume properly when it does. - # - # But the machine actually sleeps and resumes reliably when tlp is disabled - # fully or partially. Disabling RUNTIME_PM and AHCI_RUNTIME_PM appears to be - # enough to allow it to work when tlp is active. I couldn't figure out a - # more granular way to get it working, despite trying to do a per-device - # binary search via powertop. - # - # My personal configuration to make this work looks like this: - # - # {config, lib, ...}: - # - # { - # services.tlp = { - # settings = { - # # DISK_DEVICES must be specified for AHCI_RUNTIME_PM settings to work right. - # DISK_DEVICES = "nvme0n1 nvme1n1 sda sdb"; - # - # # with AHCI_RUNTIME_PM_ON_AC/BAT set to defaults in battery mode, P51 - # # can't resume from sleep and P50 can't go to sleep. - # AHCI_RUNTIME_PM_ON_AC = "on"; - # AHCI_RUNTIME_PM_ON_BAT = "on"; - # - # # with RUNTIME_PM_ON_BAT/AC set to defaults, P50/P51 can't go to sleep - # RUNTIME_PM_ON_AC = "on"; - # RUNTIME_PM_ON_BAT = "on"; - # }; - # }; - # } - # - # I'm thinking this is too aggressive to put into shared config, and folks may - # be concerned with the hit on battery life. + # See sleep.nix inside this directory for code that allows the system to + # sleep properly (out of the box, it will not) at the cost of battery life. # # throttled vs. thermald # ----------------------- diff --git a/lenovo/thinkpad/p50/sleep.nix b/lenovo/thinkpad/p50/sleep.nix new file mode 100644 index 00000000..fb2f6f80 --- /dev/null +++ b/lenovo/thinkpad/p50/sleep.nix @@ -0,0 +1,41 @@ +# Sleep +# ----- +# +# Without this configuration, the system will not resume from sleep properly +# while on battery power in either offload mode or sync mode. When it tries to +# resume, it gets to a state with a cursor in the top left hand side of the +# panel, the power LED goes from flashing to solid, and thereafter cannot be +# interacted with (even over SSH) and must be power cycled forcefully. +# Sometimes it doesn't even finish going to sleep before this behavior kicks +# in. +# +# When on AC, the machine either wakes up from sleep before being asked to +# (or maybe never gets to sleep state), or it goes into a sleep state and it +# appears consistently resume properly when it does. +# +# But the machine actually sleeps and resumes reliably when tlp is disabled +# fully or partially. Disabling RUNTIME_PM and AHCI_RUNTIME_PM appears to be +# enough to allow it to work when tlp is active. This will negatively effect +# battery life. I couldn't figure out a more granular way to get it working, +# despite trying to do a per-device binary search via powertop. +# + +{config, lib, ...}: + +{ + services.tlp = { + settings = { + # DISK_DEVICES must be specified for AHCI_RUNTIME_PM settings to work right. + DISK_DEVICES = "nvme0n1 nvme1n1 sda sdb"; + + # with AHCI_RUNTIME_PM_ON_AC/BAT set to defaults in battery mode, P51 + # can't resume from sleep and P50 can't go to sleep. + AHCI_RUNTIME_PM_ON_AC = "on"; + AHCI_RUNTIME_PM_ON_BAT = "on"; + + # with RUNTIME_PM_ON_BAT/AC set to defaults, P50/P51 can't go to sleep + RUNTIME_PM_ON_AC = "on"; + RUNTIME_PM_ON_BAT = "on"; + }; + }; +} diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix index 9fa04196..01d3c650 100644 --- a/lenovo/thinkpad/p51/default.nix +++ b/lenovo/thinkpad/p51/default.nix @@ -23,50 +23,8 @@ }; }; - # Sleep - # ----- - # - # The system will not resume from sleep properly while on battery power in - # either offload mode or sync mode. When it tries to resume, it gets to a - # state with a cursor in the top left hand side of the panel, the power LED - # goes from flashing to solid, and thereafter cannot be interacted with (even - # over SSH) and must be power cycled forcefully. Sometimes it doesn't even - # finish going to sleep before this behavior kicks in. - # - # When on AC, the machine either wakes up from sleep before being asked to - # (or maybe never gets to sleep state), or it goes into a sleep state and it - # appears consistently resume properly when it does. - # - # But the machine actually sleeps and resumes reliably when tlp is disabled - # fully or partially. Disabling RUNTIME_PM and AHCI_RUNTIME_PM appears to be - # enough to allow it to work when tlp is active. I couldn't figure out a - # more granular way to get it working, despite trying to do a per-device - # binary search via powertop. - # - # My personal configuration to make sleep work looks like this: - # - # {config, lib, ...}: - # - # { - # services.tlp = { - # settings = { - # # DISK_DEVICES must be specified for AHCI_RUNTIME_PM settings to work right. - # DISK_DEVICES = "nvme0n1 nvme1n1 sda sdb"; - # - # # with AHCI_RUNTIME_PM_ON_AC/BAT set to defaults in battery mode, P51 - # # can't resume from sleep and P50 can't go to sleep. - # AHCI_RUNTIME_PM_ON_AC = "on"; - # AHCI_RUNTIME_PM_ON_BAT = "on"; - # - # # with RUNTIME_PM_ON_BAT/AC set to defaults, P50/P51 can't go to sleep - # RUNTIME_PM_ON_AC = "on"; - # RUNTIME_PM_ON_BAT = "on"; - # }; - # }; - # } - # - # I'm thinking this is too aggressive to put into shared config, and folks may - # be concerned with the hit on battery life. + # See sleep.nix inside this directory for code that allows the system to + # sleep properly (out of the box, it will not) at the cost of battery life. # # throttled vs. thermald # ----------------------- diff --git a/lenovo/thinkpad/p51/sleep.nix b/lenovo/thinkpad/p51/sleep.nix new file mode 100644 index 00000000..fb2f6f80 --- /dev/null +++ b/lenovo/thinkpad/p51/sleep.nix @@ -0,0 +1,41 @@ +# Sleep +# ----- +# +# Without this configuration, the system will not resume from sleep properly +# while on battery power in either offload mode or sync mode. When it tries to +# resume, it gets to a state with a cursor in the top left hand side of the +# panel, the power LED goes from flashing to solid, and thereafter cannot be +# interacted with (even over SSH) and must be power cycled forcefully. +# Sometimes it doesn't even finish going to sleep before this behavior kicks +# in. +# +# When on AC, the machine either wakes up from sleep before being asked to +# (or maybe never gets to sleep state), or it goes into a sleep state and it +# appears consistently resume properly when it does. +# +# But the machine actually sleeps and resumes reliably when tlp is disabled +# fully or partially. Disabling RUNTIME_PM and AHCI_RUNTIME_PM appears to be +# enough to allow it to work when tlp is active. This will negatively effect +# battery life. I couldn't figure out a more granular way to get it working, +# despite trying to do a per-device binary search via powertop. +# + +{config, lib, ...}: + +{ + services.tlp = { + settings = { + # DISK_DEVICES must be specified for AHCI_RUNTIME_PM settings to work right. + DISK_DEVICES = "nvme0n1 nvme1n1 sda sdb"; + + # with AHCI_RUNTIME_PM_ON_AC/BAT set to defaults in battery mode, P51 + # can't resume from sleep and P50 can't go to sleep. + AHCI_RUNTIME_PM_ON_AC = "on"; + AHCI_RUNTIME_PM_ON_BAT = "on"; + + # with RUNTIME_PM_ON_BAT/AC set to defaults, P50/P51 can't go to sleep + RUNTIME_PM_ON_AC = "on"; + RUNTIME_PM_ON_BAT = "on"; + }; + }; +} From 005e19d6f06b086f82c10a28ff6d9c2c036f4471 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 7 Jul 2022 09:31:42 -0400 Subject: [PATCH 0176/1476] required to make wireless work --- lenovo/thinkpad/p50/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lenovo/thinkpad/p50/default.nix b/lenovo/thinkpad/p50/default.nix index f1f6038b..dd8a3950 100644 --- a/lenovo/thinkpad/p50/default.nix +++ b/lenovo/thinkpad/p50/default.nix @@ -22,6 +22,9 @@ }; }; + # reqired to make wireless work + hardware.enableAllFirmware = true; + # See sleep.nix inside this directory for code that allows the system to # sleep properly (out of the box, it will not) at the cost of battery life. # From 22cdffc9253f3e37baf41468893fe604e735a8ad Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 7 Jul 2022 10:00:40 -0400 Subject: [PATCH 0177/1476] turns out hardware.enableAllFirmware is also required for p51 wireless --- lenovo/thinkpad/p51/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix index 01d3c650..fd4d6f49 100644 --- a/lenovo/thinkpad/p51/default.nix +++ b/lenovo/thinkpad/p51/default.nix @@ -23,6 +23,9 @@ }; }; + # reqired to make wireless work + hardware.enableAllFirmware = true; + # See sleep.nix inside this directory for code that allows the system to # sleep properly (out of the box, it will not) at the cost of battery life. # From f5d9dd114fff730f96236bbea733cc37947391fc Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 8 Jul 2022 23:11:43 -0400 Subject: [PATCH 0178/1476] cannot replicate findings for sleep not working when system has no usb or external video plugged in to it, make wireless work --- lenovo/thinkpad/p52/default.nix | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/lenovo/thinkpad/p52/default.nix b/lenovo/thinkpad/p52/default.nix index 42d42dd8..763c7427 100644 --- a/lenovo/thinkpad/p52/default.nix +++ b/lenovo/thinkpad/p52/default.nix @@ -22,18 +22,9 @@ }; }; - # Sleep - # ----- - # - # The system will not stay asleep properly while on battery power or AC in - # either offload mode or sync mode. This is true whether TLP is enabled or - # disabled. When the system is told to sleep, it will appear to go into a - # sleep state, but within five minutes (and sometimes much more quickly; in - # my case especially if a USB hub is connected), it will wake itself. I - # attempted to identify what was causing this to happen, but was not - # successful. Note that this behavior is different from that of the P50 or - # P51, both of which can be convinced to sleep by changing TLP config. - # + # required to make wireless work + hardware.enableAllFirmware = true; + # throttled vs. thermald # ----------------------- # From bd873a980740c1cbd9d2982ebd12067af3397b09 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 9 Jul 2022 04:36:30 -0400 Subject: [PATCH 0179/1476] cannot replicate sleep problem without external monitor or any usb device plugged in --- lenovo/thinkpad/p50/default.nix | 9 +++----- lenovo/thinkpad/p50/sleep.nix | 41 --------------------------------- lenovo/thinkpad/p51/default.nix | 5 +--- lenovo/thinkpad/p51/sleep.nix | 41 --------------------------------- 4 files changed, 4 insertions(+), 92 deletions(-) delete mode 100644 lenovo/thinkpad/p50/sleep.nix delete mode 100644 lenovo/thinkpad/p51/sleep.nix diff --git a/lenovo/thinkpad/p50/default.nix b/lenovo/thinkpad/p50/default.nix index dd8a3950..e9523fce 100644 --- a/lenovo/thinkpad/p50/default.nix +++ b/lenovo/thinkpad/p50/default.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ lib, pkgs, ... }: { imports = [ ../../../common/gpu/nvidia.nix @@ -22,12 +22,9 @@ }; }; - # reqired to make wireless work + # required to make wireless work hardware.enableAllFirmware = true; - - # See sleep.nix inside this directory for code that allows the system to - # sleep properly (out of the box, it will not) at the cost of battery life. - # + # throttled vs. thermald # ----------------------- # diff --git a/lenovo/thinkpad/p50/sleep.nix b/lenovo/thinkpad/p50/sleep.nix deleted file mode 100644 index fb2f6f80..00000000 --- a/lenovo/thinkpad/p50/sleep.nix +++ /dev/null @@ -1,41 +0,0 @@ -# Sleep -# ----- -# -# Without this configuration, the system will not resume from sleep properly -# while on battery power in either offload mode or sync mode. When it tries to -# resume, it gets to a state with a cursor in the top left hand side of the -# panel, the power LED goes from flashing to solid, and thereafter cannot be -# interacted with (even over SSH) and must be power cycled forcefully. -# Sometimes it doesn't even finish going to sleep before this behavior kicks -# in. -# -# When on AC, the machine either wakes up from sleep before being asked to -# (or maybe never gets to sleep state), or it goes into a sleep state and it -# appears consistently resume properly when it does. -# -# But the machine actually sleeps and resumes reliably when tlp is disabled -# fully or partially. Disabling RUNTIME_PM and AHCI_RUNTIME_PM appears to be -# enough to allow it to work when tlp is active. This will negatively effect -# battery life. I couldn't figure out a more granular way to get it working, -# despite trying to do a per-device binary search via powertop. -# - -{config, lib, ...}: - -{ - services.tlp = { - settings = { - # DISK_DEVICES must be specified for AHCI_RUNTIME_PM settings to work right. - DISK_DEVICES = "nvme0n1 nvme1n1 sda sdb"; - - # with AHCI_RUNTIME_PM_ON_AC/BAT set to defaults in battery mode, P51 - # can't resume from sleep and P50 can't go to sleep. - AHCI_RUNTIME_PM_ON_AC = "on"; - AHCI_RUNTIME_PM_ON_BAT = "on"; - - # with RUNTIME_PM_ON_BAT/AC set to defaults, P50/P51 can't go to sleep - RUNTIME_PM_ON_AC = "on"; - RUNTIME_PM_ON_BAT = "on"; - }; - }; -} diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix index fd4d6f49..e3fe36c4 100644 --- a/lenovo/thinkpad/p51/default.nix +++ b/lenovo/thinkpad/p51/default.nix @@ -23,12 +23,9 @@ }; }; - # reqired to make wireless work + # required to make wireless work hardware.enableAllFirmware = true; - # See sleep.nix inside this directory for code that allows the system to - # sleep properly (out of the box, it will not) at the cost of battery life. - # # throttled vs. thermald # ----------------------- # diff --git a/lenovo/thinkpad/p51/sleep.nix b/lenovo/thinkpad/p51/sleep.nix deleted file mode 100644 index fb2f6f80..00000000 --- a/lenovo/thinkpad/p51/sleep.nix +++ /dev/null @@ -1,41 +0,0 @@ -# Sleep -# ----- -# -# Without this configuration, the system will not resume from sleep properly -# while on battery power in either offload mode or sync mode. When it tries to -# resume, it gets to a state with a cursor in the top left hand side of the -# panel, the power LED goes from flashing to solid, and thereafter cannot be -# interacted with (even over SSH) and must be power cycled forcefully. -# Sometimes it doesn't even finish going to sleep before this behavior kicks -# in. -# -# When on AC, the machine either wakes up from sleep before being asked to -# (or maybe never gets to sleep state), or it goes into a sleep state and it -# appears consistently resume properly when it does. -# -# But the machine actually sleeps and resumes reliably when tlp is disabled -# fully or partially. Disabling RUNTIME_PM and AHCI_RUNTIME_PM appears to be -# enough to allow it to work when tlp is active. This will negatively effect -# battery life. I couldn't figure out a more granular way to get it working, -# despite trying to do a per-device binary search via powertop. -# - -{config, lib, ...}: - -{ - services.tlp = { - settings = { - # DISK_DEVICES must be specified for AHCI_RUNTIME_PM settings to work right. - DISK_DEVICES = "nvme0n1 nvme1n1 sda sdb"; - - # with AHCI_RUNTIME_PM_ON_AC/BAT set to defaults in battery mode, P51 - # can't resume from sleep and P50 can't go to sleep. - AHCI_RUNTIME_PM_ON_AC = "on"; - AHCI_RUNTIME_PM_ON_BAT = "on"; - - # with RUNTIME_PM_ON_BAT/AC set to defaults, P50/P51 can't go to sleep - RUNTIME_PM_ON_AC = "on"; - RUNTIME_PM_ON_BAT = "on"; - }; - }; -} From c2295916b3280e342eaaab168fe886dcba9341fc Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 10 Jul 2022 19:10:49 -0400 Subject: [PATCH 0180/1476] mkDefault consistency --- lenovo/thinkpad/p52/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lenovo/thinkpad/p52/default.nix b/lenovo/thinkpad/p52/default.nix index 763c7427..78d700de 100644 --- a/lenovo/thinkpad/p52/default.nix +++ b/lenovo/thinkpad/p52/default.nix @@ -10,8 +10,8 @@ hardware = { nvidia = { prime = { - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:1:0:0"; + intelBusId = lib.mkDefault "PCI:0:2:0"; + nvidiaBusId = lib.mkDefault "PCI:1:0:0"; }; }; @@ -23,7 +23,7 @@ }; # required to make wireless work - hardware.enableAllFirmware = true; + hardware.enableAllFirmware = lib.mkDefault true; # throttled vs. thermald # ----------------------- From 47cb2be872750256d5749c9462baae8c69042783 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 10 Jul 2022 19:13:48 -0400 Subject: [PATCH 0181/1476] mkDefault consistency --- lenovo/thinkpad/p50/default.nix | 6 +++--- lenovo/thinkpad/p51/default.nix | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lenovo/thinkpad/p50/default.nix b/lenovo/thinkpad/p50/default.nix index e9523fce..4b249bf8 100644 --- a/lenovo/thinkpad/p50/default.nix +++ b/lenovo/thinkpad/p50/default.nix @@ -10,8 +10,8 @@ hardware = { nvidia = { prime = { - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:1:0:0"; + intelBusId = lib.mkDefault "PCI:0:2:0"; + nvidiaBusId = lib.mkDefault "PCI:1:0:0"; }; }; @@ -23,7 +23,7 @@ }; # required to make wireless work - hardware.enableAllFirmware = true; + hardware.enableAllFirmware = lib.mkDefault true; # throttled vs. thermald # ----------------------- diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix index e3fe36c4..0b3d16bb 100644 --- a/lenovo/thinkpad/p51/default.nix +++ b/lenovo/thinkpad/p51/default.nix @@ -11,8 +11,8 @@ hardware = { nvidia = { prime = { - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:1:0:0"; + intelBusId = lib.mkDefault "PCI:0:2:0"; + nvidiaBusId = lib.mkDefault "PCI:1:0:0"; }; }; @@ -24,7 +24,7 @@ }; # required to make wireless work - hardware.enableAllFirmware = true; + hardware.enableAllFirmware = lib.mkDefault true; # throttled vs. thermald # ----------------------- From 20530b31ef90a9a9a28089251bfaf4f16b2894a2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 11 Jul 2022 14:04:34 -0400 Subject: [PATCH 0182/1476] flake changes --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index 06d488c9..9e35d0ff 100644 --- a/flake.nix +++ b/flake.nix @@ -66,6 +66,8 @@ lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1; lenovo-thinkpad-p1-gen3 = import ./lenovo/thinkpad/p1/3th-gen; lenovo-thinkpad-p14s-amd-gen2 = import ./lenovo/thinkpad/p14s/amd/gen2; + lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50; + lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51; lenovo-thinkpad-p53 = import ./lenovo/thinkpad/p53; lenovo-thinkpad-t14 = import ./lenovo/thinkpad/t14; lenovo-thinkpad-t14-amd-gen1 = import ./lenovo/thinkpad/t14/amd/gen1; From 6bd8ae54091b42d270b9400bd89805dc8e01166b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 11 Jul 2022 14:05:13 -0400 Subject: [PATCH 0183/1476] flake changes --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 06d488c9..dad2715d 100644 --- a/flake.nix +++ b/flake.nix @@ -66,6 +66,7 @@ lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1; lenovo-thinkpad-p1-gen3 = import ./lenovo/thinkpad/p1/3th-gen; lenovo-thinkpad-p14s-amd-gen2 = import ./lenovo/thinkpad/p14s/amd/gen2; + lenovo-thinkpad-p52 = import ./lenovo/thinkpad/p52; lenovo-thinkpad-p53 = import ./lenovo/thinkpad/p53; lenovo-thinkpad-t14 = import ./lenovo/thinkpad/t14; lenovo-thinkpad-t14-amd-gen1 = import ./lenovo/thinkpad/t14/amd/gen1; From 116ae977abe00cbe19fcbc66484e1c93eba7da0c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 11 Jul 2022 17:44:39 -0400 Subject: [PATCH 0184/1476] throttled consistency --- lenovo/thinkpad/p52/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/thinkpad/p52/default.nix b/lenovo/thinkpad/p52/default.nix index 78d700de..3679f693 100644 --- a/lenovo/thinkpad/p52/default.nix +++ b/lenovo/thinkpad/p52/default.nix @@ -53,5 +53,5 @@ # higher when running throttled than when running in the other two scenarios, # but still substantially under critical temp. - services.thermald.enable = lib.mkDefault true; + services.throttled.enable = lib.mkDefault true; } From fd08b05aed34178156174264ef9cb5af9a6b913b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 12 Jul 2022 17:11:02 -0400 Subject: [PATCH 0185/1476] comment about acpi errors --- lenovo/thinkpad/p52/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lenovo/thinkpad/p52/default.nix b/lenovo/thinkpad/p52/default.nix index 3679f693..cdfb8030 100644 --- a/lenovo/thinkpad/p52/default.nix +++ b/lenovo/thinkpad/p52/default.nix @@ -25,6 +25,9 @@ # required to make wireless work hardware.enableAllFirmware = lib.mkDefault true; + # fix suspend/resume screen corruption + #hardware.nvidia.powerManagement.enable = true; + # throttled vs. thermald # ----------------------- # From 6261a2842933491190fb2d20959513a252afb7af Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 12 Jul 2022 20:01:42 -0400 Subject: [PATCH 0186/1476] conditionally turn on power management and modesetting when we are in sync mode --- lenovo/thinkpad/p50/default.nix | 15 +++++++++++++-- lenovo/thinkpad/p51/default.nix | 15 +++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/lenovo/thinkpad/p50/default.nix b/lenovo/thinkpad/p50/default.nix index 4b249bf8..04f88cf2 100644 --- a/lenovo/thinkpad/p50/default.nix +++ b/lenovo/thinkpad/p50/default.nix @@ -1,5 +1,4 @@ -{ lib, pkgs, ... }: -{ +{ lib, config, ... }: { imports = [ ../../../common/gpu/nvidia.nix ../../../common/cpu/intel @@ -25,6 +24,18 @@ # required to make wireless work hardware.enableAllFirmware = lib.mkDefault true; + # fix suspend/resume screen corruption in sync mode + hardware.nvidia.powerManagement = + lib.mkIf config.hardware.nvidia.prime.sync.enable { + enable = lib.mkDefault true; + }; + + # fix screen tearing in sync mode + hardware.nvidia.modesetting = + lib.mkIf config.hardware.nvidia.prime.sync.enable { + enable = lib.mkDefault true; + }; + # throttled vs. thermald # ----------------------- # diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix index 0b3d16bb..d3de7949 100644 --- a/lenovo/thinkpad/p51/default.nix +++ b/lenovo/thinkpad/p51/default.nix @@ -1,5 +1,4 @@ -{ lib, ... }: -{ +{ config, lib, ... }: { imports = [ ../../../common/gpu/nvidia.nix ../../../common/cpu/intel @@ -26,6 +25,18 @@ # required to make wireless work hardware.enableAllFirmware = lib.mkDefault true; + # fix suspend/resume screen corruption in sync mode + hardware.nvidia.powerManagement = + lib.mkIf config.hardware.nvidia.prime.sync.enable { + enable = lib.mkDefault true; + }; + + # fix screen tearing in sync mode + hardware.nvidia.modesetting = + lib.mkIf config.hardware.nvidia.prime.sync.enable { + enable = lib.mkDefault true; + }; + # throttled vs. thermald # ----------------------- # From e8e0e7dc37a2e768ef19adcfde4d8f98da33e405 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 12 Jul 2022 20:02:44 -0400 Subject: [PATCH 0187/1476] conditionally turn on power management and modesetting when we are in sync mode --- lenovo/thinkpad/p52/default.nix | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/lenovo/thinkpad/p52/default.nix b/lenovo/thinkpad/p52/default.nix index cdfb8030..eac81b6f 100644 --- a/lenovo/thinkpad/p52/default.nix +++ b/lenovo/thinkpad/p52/default.nix @@ -1,5 +1,4 @@ -{ lib, ... }: -{ +{ lib, config, ... }: { imports = [ ../../../common/gpu/nvidia.nix ../../../common/cpu/intel @@ -25,9 +24,21 @@ # required to make wireless work hardware.enableAllFirmware = lib.mkDefault true; - # fix suspend/resume screen corruption - #hardware.nvidia.powerManagement.enable = true; - + # fix suspend/resume screen corruption in sync mode + hardware.nvidia.powerManagement = + lib.mkIf config.hardware.nvidia.prime.sync.enable { + enable = lib.mkDefault true; + }; + + # fix screen tearing in sync mode + hardware.nvidia.modesetting = + lib.mkIf config.hardware.nvidia.prime.sync.enable { + enable = lib.mkDefault true; + }; + + # silence ACPI "errors" at boot shown before NixOS stage 1 output (default is 4) + #boot.consoleLogLevel = 3; + # throttled vs. thermald # ----------------------- # From a3f33268997e8cbbd11927abc60d21de0995b458 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 12 Jul 2022 23:01:26 -0400 Subject: [PATCH 0188/1476] add comment about normalizing dpi between sync and offload mode --- lenovo/thinkpad/p50/default.nix | 5 +++++ lenovo/thinkpad/p51/default.nix | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lenovo/thinkpad/p50/default.nix b/lenovo/thinkpad/p50/default.nix index 04f88cf2..48cf6054 100644 --- a/lenovo/thinkpad/p50/default.nix +++ b/lenovo/thinkpad/p50/default.nix @@ -36,6 +36,11 @@ enable = lib.mkDefault true; }; + # Make the DPI the same in sync mode as in offload mode (disabled because + # these thinkpads come with many kinds of screens, but this is valid for the + # 1920x1080 ones) + #services.xserver.dpi = 96; + # throttled vs. thermald # ----------------------- # diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix index d3de7949..ff6cbdfd 100644 --- a/lenovo/thinkpad/p51/default.nix +++ b/lenovo/thinkpad/p51/default.nix @@ -37,6 +37,11 @@ enable = lib.mkDefault true; }; + # Make the DPI the same in sync mode as in offload mode (disabled because + # these thinkpads come with many kinds of screens, but this is valid for the + # 1920x1080 ones) + #services.xserver.dpi = 96; + # throttled vs. thermald # ----------------------- # From 66f8f007d07f6e32b1cb08ac10a75045b7eb0310 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 12 Jul 2022 23:02:05 -0400 Subject: [PATCH 0189/1476] add comment about normalizing dpi between sync and offload mode --- lenovo/thinkpad/p52/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lenovo/thinkpad/p52/default.nix b/lenovo/thinkpad/p52/default.nix index eac81b6f..dc0d99b4 100644 --- a/lenovo/thinkpad/p52/default.nix +++ b/lenovo/thinkpad/p52/default.nix @@ -36,6 +36,11 @@ enable = lib.mkDefault true; }; + # Make the DPI the same in sync mode as in offload mode (disabled because + # these thinkpads come with many kinds of screens, but this is valid for the + # 1920x1080 ones) + #services.xserver.dpi = 96; + # silence ACPI "errors" at boot shown before NixOS stage 1 output (default is 4) #boot.consoleLogLevel = 3; From 6aafb9960b426b6031b413c55f420ddd38f8e047 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 13 Jul 2022 01:15:35 -0400 Subject: [PATCH 0190/1476] comment about silencing ACPI errors --- lenovo/thinkpad/p51/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix index ff6cbdfd..5701c85c 100644 --- a/lenovo/thinkpad/p51/default.nix +++ b/lenovo/thinkpad/p51/default.nix @@ -42,6 +42,9 @@ # 1920x1080 ones) #services.xserver.dpi = 96; + # silence ACPI "errors" at boot shown before NixOS stage 1 output (default is 4) + #boot.consoleLogLevel = 3; + # throttled vs. thermald # ----------------------- # From 122ae8476ae39d8157a244887a0eccfdc63ae29c Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Sun, 17 Jul 2022 18:19:45 +0200 Subject: [PATCH 0191/1476] Fix legion 7 slim 15ach6 --- lenovo/legion/15ach6/default.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lenovo/legion/15ach6/default.nix b/lenovo/legion/15ach6/default.nix index 98326d14..0c718230 100644 --- a/lenovo/legion/15ach6/default.nix +++ b/lenovo/legion/15ach6/default.nix @@ -1,4 +1,6 @@ -{ lib, ... }: { +{ lib, config, ... }: +let kernelPackages = config.boot.kernelPackages; +in { imports = [ ../../../common/cpu/amd ../../../common/gpu/amd @@ -16,10 +18,19 @@ # https://wiki.archlinux.org/title/backlight#Backlight_is_always_at_full_brightness_after_a_reboot_with_amdgpu_driver systemd.services.fix-brightness = { - before = [ "systemd-backlight@backlight:amdgpu_bl0.service" ]; + before = [ + "systemd-backlight@backlight:${ + if lib.versionOlder kernelPackages.kernel.version "5.18" then "amdgpu_bl0" else "nvidia_wmi_ec_backlight" + }.service" + ]; description = "Convert 16-bit brightness values to 8-bit before systemd-backlight applies it"; script = '' - BRIGHTNESS_FILE="/var/lib/systemd/backlight/pci-0000:05:00.0:backlight:amdgpu_bl0" + BRIGHTNESS_FILE="/var/lib/systemd/backlight/${ + if lib.versionOlder kernelPackages.kernel.version "5.18" then + "pci-0000:05:00.0:backlight:amdgpu_bl0" + else + "platform-PNP0C14:00:backlight:nvidia_wmi_ec_backlight" + }" BRIGHTNESS=$(cat "$BRIGHTNESS_FILE") BRIGHTNESS=$(($BRIGHTNESS*255/65535)) BRIGHTNESS=''${BRIGHTNESS/.*} # truncating to int, just in case From e3259b25ebfe0afd8e1590d43950a4b9c2387de7 Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Sun, 17 Jul 2022 18:19:45 +0200 Subject: [PATCH 0192/1476] Fix legion 7 slim 15ach6 --- lenovo/legion/15ach6/default.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lenovo/legion/15ach6/default.nix b/lenovo/legion/15ach6/default.nix index 98326d14..0c718230 100644 --- a/lenovo/legion/15ach6/default.nix +++ b/lenovo/legion/15ach6/default.nix @@ -1,4 +1,6 @@ -{ lib, ... }: { +{ lib, config, ... }: +let kernelPackages = config.boot.kernelPackages; +in { imports = [ ../../../common/cpu/amd ../../../common/gpu/amd @@ -16,10 +18,19 @@ # https://wiki.archlinux.org/title/backlight#Backlight_is_always_at_full_brightness_after_a_reboot_with_amdgpu_driver systemd.services.fix-brightness = { - before = [ "systemd-backlight@backlight:amdgpu_bl0.service" ]; + before = [ + "systemd-backlight@backlight:${ + if lib.versionOlder kernelPackages.kernel.version "5.18" then "amdgpu_bl0" else "nvidia_wmi_ec_backlight" + }.service" + ]; description = "Convert 16-bit brightness values to 8-bit before systemd-backlight applies it"; script = '' - BRIGHTNESS_FILE="/var/lib/systemd/backlight/pci-0000:05:00.0:backlight:amdgpu_bl0" + BRIGHTNESS_FILE="/var/lib/systemd/backlight/${ + if lib.versionOlder kernelPackages.kernel.version "5.18" then + "pci-0000:05:00.0:backlight:amdgpu_bl0" + else + "platform-PNP0C14:00:backlight:nvidia_wmi_ec_backlight" + }" BRIGHTNESS=$(cat "$BRIGHTNESS_FILE") BRIGHTNESS=$(($BRIGHTNESS*255/65535)) BRIGHTNESS=''${BRIGHTNESS/.*} # truncating to int, just in case From b19015a0ba6be4cbe3a87994133e8b11ef33b6ce Mon Sep 17 00:00:00 2001 From: Mark K Gardner Date: Fri, 15 Jul 2022 08:36:55 -0400 Subject: [PATCH 0193/1476] Adds support for Thinkpad T460p --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/t460p/default.nix | 9 +++++++++ 3 files changed, 11 insertions(+) create mode 100644 lenovo/thinkpad/t460p/default.nix diff --git a/README.md b/README.md index 67b11b69..e3f3a771 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,7 @@ See code for all available configurations. | [Lenovo ThinkPad T440s](lenovo/thinkpad/t440s) | `` | | [Lenovo ThinkPad T450s](lenovo/thinkpad/t450s) | `` | | [Lenovo ThinkPad T460](lenovo/thinkpad/t460) | `` | +| [Lenovo ThinkPad T460p](lenovo/thinkpad/t460p) | `` | | [Lenovo ThinkPad T460s](lenovo/thinkpad/t460s) | `` | | [Lenovo ThinkPad T470s](lenovo/thinkpad/t470s) | `` | | [Lenovo ThinkPad T480](lenovo/thinkpad/t480) | `` | diff --git a/flake.nix b/flake.nix index 652f5423..7337b68f 100644 --- a/flake.nix +++ b/flake.nix @@ -82,6 +82,7 @@ lenovo-thinkpad-t440s = import ./lenovo/thinkpad/t440s; lenovo-thinkpad-t450s = import ./lenovo/thinkpad/t450s; lenovo-thinkpad-t460 = import ./lenovo/thinkpad/t460; + lenovo-thinkpad-t460p = import ./lenovo/thinkpad/t460p; lenovo-thinkpad-t460s = import ./lenovo/thinkpad/t460s; lenovo-thinkpad-t470s = import ./lenovo/thinkpad/t470s; lenovo-thinkpad-t480 = import ./lenovo/thinkpad/t480; diff --git a/lenovo/thinkpad/t460p/default.nix b/lenovo/thinkpad/t460p/default.nix new file mode 100644 index 00000000..e6233717 --- /dev/null +++ b/lenovo/thinkpad/t460p/default.nix @@ -0,0 +1,9 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop/acpi_call.nix + ../. + ]; +} From fed22c2d6008b39f57e692b1fa58407f7ca109be Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Sat, 5 Mar 2022 12:00:00 +0000 Subject: [PATCH 0194/1476] inspiron-5515: fix race for fix-touchpad.sh On rare occasions, the module would be removed before suspend and the touchpad would be disabled on boot. --- dell/inspiron/5515/default.nix | 11 ++++++++--- dell/inspiron/5515/fix_touchpad.sh | 5 +++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/dell/inspiron/5515/default.nix b/dell/inspiron/5515/default.nix index 5f9f7c2d..5e1fa648 100644 --- a/dell/inspiron/5515/default.nix +++ b/dell/inspiron/5515/default.nix @@ -12,13 +12,18 @@ # hack around it by unloading and reloading module i2c_hid systemd.services.fix-touchpad = { path = [ pkgs.kmod ]; - serviceConfig.ExecStart = "${./fix_touchpad.sh}"; + serviceConfig.ExecStart = ''${pkgs.systemd}/bin/systemd-inhibit --what=sleep --why="fixing touchpad must finish before sleep" --mode=delay ${./fix_touchpad.sh}''; + serviceConfig.Type = "oneshot"; description = "reload touchpad driver"; # must run at boot (and not too early), and after suspend - wantedBy = [ "display-manager.service" "sleep.target" ]; - after = [ "sleep.target" ]; + wantedBy = [ "display-manager.service" "post-resume.target" ]; + # prevent running before suspend + after = [ "post-resume.target" ]; }; + # so that post-resume.service exists + powerManagement.enable = true; + # fix suspend # https://bbs.archlinux.org/viewtopic.php?id=266108 says linux >= 5.12 required diff --git a/dell/inspiron/5515/fix_touchpad.sh b/dell/inspiron/5515/fix_touchpad.sh index b776dcee..46388c4f 100755 --- a/dell/inspiron/5515/fix_touchpad.sh +++ b/dell/inspiron/5515/fix_touchpad.sh @@ -11,10 +11,11 @@ unload () { wait_unload() { while sleep 1; do - case "$(unload "$1")" in + output="$(unload "$1")" + case "$output" in *is\ in\ use*) :;; *ok*) return 0;; - *) echo giving up; return 1; + *) echo "modprobe said: $output"; echo giving up; return 1; esac done } From 5e9934fa077fb326001972bc4754bf45b33180eb Mon Sep 17 00:00:00 2001 From: paki23 Date: Sat, 30 Jul 2022 18:21:03 +0200 Subject: [PATCH 0195/1476] pstate:init fixup pstate --- common/cpu/amd/pstate.nix | 9 +++++++++ flake.nix | 1 + 2 files changed, 10 insertions(+) create mode 100644 common/cpu/amd/pstate.nix diff --git a/common/cpu/amd/pstate.nix b/common/cpu/amd/pstate.nix new file mode 100644 index 00000000..35d8be0d --- /dev/null +++ b/common/cpu/amd/pstate.nix @@ -0,0 +1,9 @@ +{ lib, config, ... }: { + #Enables the amd cpu scaling https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html + + imports = [ ./. ]; + boot = lib.mkIf (!lib.versionOlder config.boot.kernelPackages.kernel.version "5.17") { + kernelParams = [ "initcall_blacklist=acpi_cpufreq_init" ]; + kernelModules = [ "amd-pstate" ]; + }; +} diff --git a/flake.nix b/flake.nix index 7337b68f..7f02785e 100644 --- a/flake.nix +++ b/flake.nix @@ -131,6 +131,7 @@ tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; common-cpu-amd = import ./common/cpu/amd; + common-cpu-amd-pstate = import ./common/cpu/amd/pstate.nix; common-cpu-intel = import ./common/cpu/intel; common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix; common-cpu-intel-kaby-lake = import ./common/cpu/intel/kaby-lake; From b183aac0ac4115a4aae4592e761e4e79ac287324 Mon Sep 17 00:00:00 2001 From: paki23 Date: Sat, 30 Jul 2022 18:21:18 +0200 Subject: [PATCH 0196/1476] g733qs: addded amd pstate handling --- asus/rog-strix/g733qs/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asus/rog-strix/g733qs/default.nix b/asus/rog-strix/g733qs/default.nix index 89ec2a7a..8e5fde1e 100644 --- a/asus/rog-strix/g733qs/default.nix +++ b/asus/rog-strix/g733qs/default.nix @@ -1,7 +1,7 @@ { config, pkgs, lib, ... }: { imports = [ - ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix ../../../common/gpu/nvidia.nix ../../../common/pc/laptop ../../../common/pc/ssd From 8732fa9eb5f4d98ed0986e8cf7214057beec0cb0 Mon Sep 17 00:00:00 2001 From: paki23 Date: Sun, 31 Jul 2022 20:13:42 +0200 Subject: [PATCH 0197/1476] clarify amd pstate --- common/cpu/amd/pstate.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/common/cpu/amd/pstate.nix b/common/cpu/amd/pstate.nix index 35d8be0d..62c88f0e 100644 --- a/common/cpu/amd/pstate.nix +++ b/common/cpu/amd/pstate.nix @@ -1,5 +1,6 @@ { lib, config, ... }: { #Enables the amd cpu scaling https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html + #On recent AMD cupus this can be more energy efficient imports = [ ./. ]; boot = lib.mkIf (!lib.versionOlder config.boot.kernelPackages.kernel.version "5.17") { From 68a27c2b00fd6e4ed23b7093c226ef604fdf4f0f Mon Sep 17 00:00:00 2001 From: pasqui23 Date: Mon, 1 Aug 2022 12:03:29 +0200 Subject: [PATCH 0198/1476] Clarify kernel version condition Co-authored-by: Sandro --- common/cpu/amd/pstate.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/cpu/amd/pstate.nix b/common/cpu/amd/pstate.nix index 62c88f0e..efd01f16 100644 --- a/common/cpu/amd/pstate.nix +++ b/common/cpu/amd/pstate.nix @@ -1,9 +1,9 @@ { lib, config, ... }: { - #Enables the amd cpu scaling https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html - #On recent AMD cupus this can be more energy efficient + # Enables the amd cpu scaling https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html + # On recent AMD cupus this can be more energy efficient imports = [ ./. ]; - boot = lib.mkIf (!lib.versionOlder config.boot.kernelPackages.kernel.version "5.17") { + boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "5.17") { kernelParams = [ "initcall_blacklist=acpi_cpufreq_init" ]; kernelModules = [ "amd-pstate" ]; }; From a01a1095e4226dcb3ba68937831c7cc90a8eedea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 1 Aug 2022 14:14:12 +0200 Subject: [PATCH 0199/1476] amd pstate: small typo --- common/cpu/amd/pstate.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/cpu/amd/pstate.nix b/common/cpu/amd/pstate.nix index efd01f16..7d5c2c08 100644 --- a/common/cpu/amd/pstate.nix +++ b/common/cpu/amd/pstate.nix @@ -1,6 +1,6 @@ { lib, config, ... }: { # Enables the amd cpu scaling https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html - # On recent AMD cupus this can be more energy efficient + # On recent AMD CPUs this can be more energy efficient. imports = [ ./. ]; boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "5.17") { From bb846f8ed9cb92d5d88ca21346eb7365ec6ffa2f Mon Sep 17 00:00:00 2001 From: Andrew Kvalheim Date: Wed, 3 Aug 2022 09:44:40 -0700 Subject: [PATCH 0200/1476] Add Dell XPS 13 9350 Reviewed on a Dell XPS 13 Developer Edition 9350. No Skylake-specific configuration is necessary: - RC6 sleep is automatically detected configured by default, and `i915.enable_rc6` no longer exists. - Frame buffer compression (FBC) is automatically detected and enabled by default, so `i915.enable_fbc` is unnecessary. - Panel self refresh (PSR) is automatically detected and enabled by default, so `i915.enable_psr` is unnecessary. Wireless card detection log: iwlwifi 0000:3a:00.0: Detected Intel(R) Dual Band Wireless AC 8260, REV=0x204 Touchpad detection log: psmouse serio1: synaptics: queried max coordinates: x [..5666], y [..4734] psmouse serio1: synaptics: queried min coordinates: x [1276..], y [1118..] psmouse serio1: synaptics: Your touchpad (PNP: DLL0704 PNP0f13) says it can support a different bus. If i2c-hid and hid-rmi are not used, you might want to try setting psmouse.synaptics_intertouch to 1 and report this to linux-input@vger.kernel.org. psmouse serio1: synaptics: Advanced gesture mode init failed: -5 psmouse serio1: synaptics: Unable to initialize device. input: DLL0704:01 06CB:76AE Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-8/i2c-DLL0704:01/0018:06CB:76AE.0004/input/input26 input: DLL0704:01 06CB:76AE Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-8/i2c-DLL0704:01/0018:06CB:76AE.0004/input/input27 hid-multitouch 0018:06CB:76AE.0004: input,hidraw3: I2C HID v1.00 Mouse [DLL0704:01 06CB:76AE] on i2c-DLL0704:01 psmouse serio1: Failed to enable mouse on isa0060/serio1 i915 debug log: i915 device info: pciid=0x1926 rev=0x0a platform=SKYLAKE (subplatform=0x1) gen=9 i915 device info: graphics version: 9 i915 device info: media version: 9 i915 device info: display version: 9 i915 device info: gt: 3 i915 device info: iommu: disabled i915 device info: memory-regions: 5 i915 device info: page-sizes: 11000 i915 device info: platform: SKYLAKE i915 device info: ppgtt-size: 48 i915 device info: ppgtt-type: 2 i915 device info: dma_mask_size: 39 i915 device info: is_mobile: no i915 device info: is_lp: no i915 device info: require_force_probe: no i915 device info: is_dgfx: no i915 device info: has_64bit_reloc: yes i915 device info: gpu_reset_clobbers_display: no i915 device info: has_reset_engine: yes i915 device info: has_global_mocs: no i915 device info: has_gt_uc: yes i915 device info: has_l3_dpf: no i915 device info: has_llc: yes i915 device info: has_logical_ring_contexts: yes i915 device info: has_logical_ring_elsq: no i915 device info: has_mslices: no i915 device info: has_pooled_eu: no i915 device info: has_rc6: yes i915 device info: has_rc6p: no i915 device info: has_rps: yes i915 device info: has_runtime_pm: yes i915 device info: has_snoop: no i915 device info: has_coherent_ggtt: yes i915 device info: unfenced_needs_alignment: no i915 device info: hws_needs_physical: no i915 device info: cursor_needs_physical: no i915 device info: has_cdclk_crawl: no i915 device info: has_dmc: yes i915 device info: has_ddi: yes i915 device info: has_dp_mst: yes i915 device info: has_dsb: no i915 device info: has_dsc: no i915 device info: has_fbc: yes i915 device info: has_fpga_dbg: yes i915 device info: has_gmch: no i915 device info: has_hdcp: yes i915 device info: has_hotplug: yes i915 device info: has_hti: no i915 device info: has_ipc: yes i915 device info: has_modular_fia: no i915 device info: has_overlay: no i915 device info: has_psr: yes i915 device info: has_psr_hw_tracking: yes i915 device info: overlay_needs_physical: no i915 device info: supports_tv: no i915 device info: rawclk rate: 24000 kHz i915 device info: available engines: 40f i915 device info: slice total: 2, mask=0003 i915 device info: subslice total: 6 i915 device info: slice0: 3 subslices, mask=00000007 i915 device info: slice1: 3 subslices, mask=00000007 i915 device info: slice2: 0 subslices, mask=00000000 i915 device info: EU total: 48 i915 device info: EU per subslice: 8 i915 device info: has slice power gating: yes i915 device info: has subslice power gating: no i915 device info: has EU power gating: yes --- README.md | 1 + dell/xps/13-9350/default.nix | 15 +++++++++++++++ flake.nix | 1 + 3 files changed, 17 insertions(+) create mode 100644 dell/xps/13-9350/default.nix diff --git a/README.md b/README.md index e3f3a771..61ecbce7 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ See code for all available configurations. | [Dell XPS 13 7390](dell/xps/13-7390) | `` | | [Dell XPS 13 9310](dell/xps/13-9310) | `` | | [Dell XPS 13 9343](dell/xps/13-9343) | `` | +| [Dell XPS 13 9350](dell/xps/13-9350) | `` | | [Dell XPS 13 9360](dell/xps/13-9360) | `` | | [Dell XPS 13 9370](dell/xps/13-9370) | `` | | [Dell XPS 13 9380](dell/xps/13-9380) | `` | diff --git a/dell/xps/13-9350/default.nix b/dell/xps/13-9350/default.nix new file mode 100644 index 00000000..38c27865 --- /dev/null +++ b/dell/xps/13-9350/default.nix @@ -0,0 +1,15 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + # The touchpad uses I²C, so PS/2 is unnecessary + boot.blacklistedKernelModules = [ "psmouse" ]; + + # Recommended in NixOS/nixos-hardware#127 + services.thermald.enable = lib.mkDefault true; +} diff --git a/flake.nix b/flake.nix index 7f02785e..7ce89372 100644 --- a/flake.nix +++ b/flake.nix @@ -30,6 +30,7 @@ dell-xps-13-7390 = import ./dell/xps/13-7390; dell-xps-13-9310 = import ./dell/xps/13-9310; dell-xps-13-9343 = import ./dell/xps/13-9343; + dell-xps-13-9350 = import ./dell/xps/13-9350; dell-xps-13-9360 = import ./dell/xps/13-9360; dell-xps-13-9370 = import ./dell/xps/13-9370; dell-xps-13-9380 = import ./dell/xps/13-9380; From 128dad1c8d358c4941fa7cd14cf5a2715eea94d6 Mon Sep 17 00:00:00 2001 From: Karolis Stasaitis Date: Sun, 7 Aug 2022 11:16:37 +0200 Subject: [PATCH 0201/1476] raspberry-pi-4: add poe-plus-hat, update poe-hat, use dtmerge instead of ftoverlay --- raspberry-pi/4/apply-overlays-dtmerge.nix | 30 +++ raspberry-pi/4/default.nix | 2 + raspberry-pi/4/pkgs-overlays.nix | 22 +++ raspberry-pi/4/poe-hat.nix | 81 ++++++-- raspberry-pi/4/poe-plus-hat.nix | 223 ++++++++++++++++++++++ 5 files changed, 343 insertions(+), 15 deletions(-) create mode 100644 raspberry-pi/4/apply-overlays-dtmerge.nix create mode 100644 raspberry-pi/4/pkgs-overlays.nix create mode 100644 raspberry-pi/4/poe-plus-hat.nix diff --git a/raspberry-pi/4/apply-overlays-dtmerge.nix b/raspberry-pi/4/apply-overlays-dtmerge.nix new file mode 100644 index 00000000..0d17bb8a --- /dev/null +++ b/raspberry-pi/4/apply-overlays-dtmerge.nix @@ -0,0 +1,30 @@ +{ lib, pkgs, stdenvNoCC, dtc, libraspberrypi }: + +with lib; { + applyOverlays = (base: overlays': stdenvNoCC.mkDerivation { + name = "device-tree-overlays"; + nativeBuildInputs = [ dtc ]; + buildCommand = let + overlays = toList overlays'; + in '' + mkdir -p $out + cd ${base} + find . -type f -name '*.dtb' -print0 \ + | xargs -0 cp -v --no-preserve=mode --target-directory $out --parents + for dtb in $(find $out -type f -name '*.dtb'); do + dtbCompat="$( fdtget -t s $dtb / compatible )" + ${flip (concatMapStringsSep "\n") overlays (o: '' + overlayCompat="$( fdtget -t s ${o.dtboFile} / compatible )" + # overlayCompat in dtbCompat + if [[ "$dtbCompat" =~ "$overlayCompat" ]]; then + echo "Applying overlay ${o.name} to $( basename $dtb )" + mv $dtb{,.in} + cp ${o.dtboFile}{,.dtbo} + ${libraspberrypi}/bin/dtmerge "$dtb.in" "$dtb" ${o.dtboFile}.dtbo; + rm $dtb.in ${o.dtboFile}.dtbo + fi + '')} + done + ''; + }); +} diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index fcaf5adc..d85063a8 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -7,8 +7,10 @@ ./i2c.nix ./modesetting.nix ./poe-hat.nix + ./poe-plus-hat.nix ./tc358743.nix ./pwm0.nix + ./pkgs-overlays.nix ]; boot = { diff --git a/raspberry-pi/4/pkgs-overlays.nix b/raspberry-pi/4/pkgs-overlays.nix new file mode 100644 index 00000000..4b3c16d8 --- /dev/null +++ b/raspberry-pi/4/pkgs-overlays.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, modulesPath, ... }: +let + callPackage = path: overrides: + let f = import path; + in f ((builtins.intersectAttrs (builtins.functionArgs f) pkgs) // overrides); + cfg = config.hardware.raspberry-pi."4".apply-overlays-dtmerge; + dt_ao_overlay = (final: prev: { + deviceTree.applyOverlays = (prev.callPackage ./apply-overlays-dtmerge.nix { }).applyOverlays; + }); +in { + options.hardware = { + raspberry-pi."4".apply-overlays-dtmerge = { + enable = lib.mkEnableOption '' + replace deviceTree.applyOverlays implementation to use dtmerge from libraspberrypi. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + nixpkgs.overlays = [ dt_ao_overlay ]; + }; +} diff --git a/raspberry-pi/4/poe-hat.nix b/raspberry-pi/4/poe-hat.nix index ea191291..bda99252 100644 --- a/raspberry-pi/4/poe-hat.nix +++ b/raspberry-pi/4/poe-hat.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -let +let cfg = config.hardware.raspberry-pi."4".poe-hat; in { options.hardware = { @@ -12,10 +12,11 @@ in { }; config = lib.mkIf cfg.enable { - # Configure for modesetting in the device tree + hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true; + hardware.deviceTree = { overlays = [ - # Equivalent to: https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts + # Equivalent to: https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts { name = "rpi-poe-overlay"; dtsText = '' @@ -31,14 +32,11 @@ in { fragment@0 { target-path = "/"; __overlay__ { - fan0: rpi-poe-fan@0 { - compatible = "raspberrypi,rpi-poe-fan"; - firmware = <&firmware>; - cooling-min-state = <0>; - cooling-max-state = <4>; - #cooling-cells = <2>; + fan: pwm-fan { + compatible = "pwm-fan"; cooling-levels = <0 1 10 100 255>; - status = "okay"; + #cooling-cells = <2>; + pwms = <&fwpwm 0 80000>; }; }; }; @@ -71,19 +69,19 @@ in { cooling-maps { map0 { trip = <&trip0>; - cooling-device = <&fan0 0 1>; + cooling-device = <&fan 0 1>; }; map1 { trip = <&trip1>; - cooling-device = <&fan0 1 2>; + cooling-device = <&fan 1 2>; }; map2 { trip = <&trip2>; - cooling-device = <&fan0 2 3>; + cooling-device = <&fan 2 3>; }; map3 { trip = <&trip3>; - cooling-device = <&fan0 3 4>; + cooling-device = <&fan 3 4>; }; }; }; @@ -91,7 +89,7 @@ in { fragment@2 { target-path = "/__overrides__"; - __overlay__ { + params: __overlay__ { poe_fan_temp0 = <&trip0>,"temperature:0"; poe_fan_temp0_hyst = <&trip0>,"hysteresis:0"; poe_fan_temp1 = <&trip1>,"temperature:0"; @@ -100,6 +98,54 @@ in { poe_fan_temp2_hyst = <&trip2>,"hysteresis:0"; poe_fan_temp3 = <&trip3>,"temperature:0"; poe_fan_temp3_hyst = <&trip3>,"hysteresis:0"; + poe_fan_i2c = <&fwpwm>,"status=disabled", + <&poe_mfd>,"status=okay", + <&fan>,"pwms:0=",<&poe_mfd_pwm>; + }; + }; + + fragment@3 { + target = <&firmware>; + __overlay__ { + fwpwm: pwm { + compatible = "raspberrypi,firmware-poe-pwm"; + #pwm-cells = <2>; + }; + }; + }; + + fragment@4 { + target = <&i2c0>; + i2c_bus: __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + + poe_mfd: poe@51 { + compatible = "raspberrypi,poe-core"; + reg = <0x51>; + status = "disabled"; + + poe_mfd_pwm: poe_pwm@f0 { + compatible = "raspberrypi,poe-pwm"; + reg = <0xf0>; + status = "okay"; + #pwm-cells = <2>; + }; + }; + }; + }; + + fragment@5 { + target = <&i2c0if>; + __dormant__ { + status = "okay"; + }; + }; + + fragment@6 { + target = <&i2c0mux>; + __dormant__ { + status = "okay"; }; }; @@ -112,6 +158,11 @@ in { poe_fan_temp2_hyst = <&trip2>,"hysteresis:0"; poe_fan_temp3 = <&trip3>,"temperature:0"; poe_fan_temp3_hyst = <&trip3>,"hysteresis:0"; + i2c = <0>, "+5+6", + <&fwpwm>,"status=disabled", + <&i2c_bus>,"status=okay", + <&poe_mfd>,"status=okay", + <&fan>,"pwms:0=",<&poe_mfd_pwm>; }; }; ''; diff --git a/raspberry-pi/4/poe-plus-hat.nix b/raspberry-pi/4/poe-plus-hat.nix new file mode 100644 index 00000000..79177fed --- /dev/null +++ b/raspberry-pi/4/poe-plus-hat.nix @@ -0,0 +1,223 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.hardware.raspberry-pi."4".poe-plus-hat; +in { + options.hardware = { + raspberry-pi."4".poe-plus-hat = { + enable = lib.mkEnableOption '' + support for the Raspberry Pi PoE+ HAT. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true; + + hardware.deviceTree = { + overlays = [ + # Combined equivalent to: + # * https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts + # * https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/rpi-poe-plus-overlay.dts + { + name = "rpi-poe-plus-overlay"; + dtsText = '' + /* + * Overlay for the Raspberry Pi POE HAT. + */ + /dts-v1/; + /plugin/; + + / { + compatible = "brcm,bcm2711"; + + fragment@0 { + target-path = "/"; + __overlay__ { + fan: pwm-fan { + compatible = "pwm-fan"; + cooling-levels = <0 1 10 100 255>; + #cooling-cells = <2>; + pwms = <&fwpwm 0 80000>; + }; + }; + }; + + fragment@1 { + target = <&cpu_thermal>; + __overlay__ { + trips { + trip0: trip0 { + temperature = <40000>; + hysteresis = <2000>; + type = "active"; + }; + trip1: trip1 { + temperature = <45000>; + hysteresis = <2000>; + type = "active"; + }; + trip2: trip2 { + temperature = <50000>; + hysteresis = <2000>; + type = "active"; + }; + trip3: trip3 { + temperature = <55000>; + hysteresis = <5000>; + type = "active"; + }; + }; + cooling-maps { + map0 { + trip = <&trip0>; + cooling-device = <&fan 0 1>; + }; + map1 { + trip = <&trip1>; + cooling-device = <&fan 1 2>; + }; + map2 { + trip = <&trip2>; + cooling-device = <&fan 2 3>; + }; + map3 { + trip = <&trip3>; + cooling-device = <&fan 3 4>; + }; + }; + }; + }; + + fragment@2 { + target-path = "/__overrides__"; + params: __overlay__ { + poe_fan_temp0 = <&trip0>,"temperature:0"; + poe_fan_temp0_hyst = <&trip0>,"hysteresis:0"; + poe_fan_temp1 = <&trip1>,"temperature:0"; + poe_fan_temp1_hyst = <&trip1>,"hysteresis:0"; + poe_fan_temp2 = <&trip2>,"temperature:0"; + poe_fan_temp2_hyst = <&trip2>,"hysteresis:0"; + poe_fan_temp3 = <&trip3>,"temperature:0"; + poe_fan_temp3_hyst = <&trip3>,"hysteresis:0"; + poe_fan_i2c = <&fwpwm>,"status=disabled", + <&poe_mfd>,"status=okay", + <&fan>,"pwms:0=",<&poe_mfd_pwm>; + }; + }; + + fragment@3 { + target = <&firmware>; + __overlay__ { + fwpwm: pwm { + compatible = "raspberrypi,firmware-poe-pwm"; + #pwm-cells = <2>; + }; + }; + }; + + fragment@4 { + target = <&i2c0>; + i2c_bus: __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + + poe_mfd: poe@51 { + compatible = "raspberrypi,poe-core"; + reg = <0x51>; + status = "disabled"; + + poe_mfd_pwm: poe_pwm@f0 { + compatible = "raspberrypi,poe-pwm"; + reg = <0xf0>; + status = "okay"; + #pwm-cells = <2>; + }; + }; + }; + }; + + fragment@5 { + target = <&i2c0if>; + __dormant__ { + status = "okay"; + }; + }; + + fragment@6 { + target = <&i2c0mux>; + __dormant__ { + status = "okay"; + }; + }; + + __overrides__ { + poe_fan_temp0 = <&trip0>,"temperature:0"; + poe_fan_temp0_hyst = <&trip0>,"hysteresis:0"; + poe_fan_temp1 = <&trip1>,"temperature:0"; + poe_fan_temp1_hyst = <&trip1>,"hysteresis:0"; + poe_fan_temp2 = <&trip2>,"temperature:0"; + poe_fan_temp2_hyst = <&trip2>,"hysteresis:0"; + poe_fan_temp3 = <&trip3>,"temperature:0"; + poe_fan_temp3_hyst = <&trip3>,"hysteresis:0"; + i2c = <0>, "+5+6", + <&fwpwm>,"status=disabled", + <&i2c_bus>,"status=okay", + <&poe_mfd>,"status=okay", + <&fan>,"pwms:0=",<&poe_mfd_pwm>; + }; + }; + + // SPDX-License-Identifier: (GPL-2.0 OR MIT) + // Overlay for the Raspberry Pi PoE+ HAT. + + / { + compatible = "brcm,bcm2711"; + + fragment@10 { + target-path = "/"; + __overlay__ { + rpi_poe_power_supply: rpi-poe-power-supply { + compatible = "raspberrypi,rpi-poe-power-supply"; + firmware = <&firmware>; + status = "okay"; + }; + }; + }; + fragment@11 { + target = <&poe_mfd>; + __overlay__ { + rpi-poe-power-supply@f2 { + compatible = "raspberrypi,rpi-poe-power-supply"; + reg = <0xf2>; + status = "okay"; + }; + }; + }; + + __overrides__ { + i2c = <0>, "+5+6", + <&fwpwm>,"status=disabled", + <&rpi_poe_power_supply>,"status=disabled", + <&i2c_bus>,"status=okay", + <&poe_mfd>,"status=okay", + <&fan>,"pwms:0=",<&poe_mfd_pwm>; + }; + }; + + &fan { + cooling-levels = <0 32 64 128 255>; + }; + + ¶ms { + poe_fan_i2c = <&fwpwm>,"status=disabled", + <&rpi_poe_power_supply>,"status=disabled", + <&poe_mfd>,"status=okay", + <&fan>,"pwms:0=",<&poe_mfd_pwm>; + }; + ''; + } + ]; + }; + }; +} From 245d8f9f97d35a607822ed51bafd7c105c0e819a Mon Sep 17 00:00:00 2001 From: Karolis Stasaitis Date: Mon, 8 Aug 2022 18:27:49 +0200 Subject: [PATCH 0202/1476] apply review suggestions from @06kellyjac Co-authored-by: j-k --- raspberry-pi/4/apply-overlays-dtmerge.nix | 4 +++- raspberry-pi/4/pkgs-overlays.nix | 6 ++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/raspberry-pi/4/apply-overlays-dtmerge.nix b/raspberry-pi/4/apply-overlays-dtmerge.nix index 0d17bb8a..8a325ab5 100644 --- a/raspberry-pi/4/apply-overlays-dtmerge.nix +++ b/raspberry-pi/4/apply-overlays-dtmerge.nix @@ -1,9 +1,11 @@ +# modification of nixpkgs deviceTree.applyOverlays to resolve https://github.com/NixOS/nixpkgs/issues/125354 +# https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/device-tree/default.nix { lib, pkgs, stdenvNoCC, dtc, libraspberrypi }: with lib; { applyOverlays = (base: overlays': stdenvNoCC.mkDerivation { name = "device-tree-overlays"; - nativeBuildInputs = [ dtc ]; + nativeBuildInputs = [ dtc libraspberrypi ]; buildCommand = let overlays = toList overlays'; in '' diff --git a/raspberry-pi/4/pkgs-overlays.nix b/raspberry-pi/4/pkgs-overlays.nix index 4b3c16d8..c290d2ab 100644 --- a/raspberry-pi/4/pkgs-overlays.nix +++ b/raspberry-pi/4/pkgs-overlays.nix @@ -1,17 +1,15 @@ { config, lib, pkgs, modulesPath, ... }: let - callPackage = path: overrides: - let f = import path; - in f ((builtins.intersectAttrs (builtins.functionArgs f) pkgs) // overrides); cfg = config.hardware.raspberry-pi."4".apply-overlays-dtmerge; dt_ao_overlay = (final: prev: { - deviceTree.applyOverlays = (prev.callPackage ./apply-overlays-dtmerge.nix { }).applyOverlays; + deviceTree.applyOverlays = (prev.callPackage ./apply-overlays-dtmerge.nix { }) }); in { options.hardware = { raspberry-pi."4".apply-overlays-dtmerge = { enable = lib.mkEnableOption '' replace deviceTree.applyOverlays implementation to use dtmerge from libraspberrypi. + this can resolve issues with applying dtbs for the pi. ''; }; }; From 3f0991b531648e1a529d8eb14b483d628c29846b Mon Sep 17 00:00:00 2001 From: Karolis Stasaitis Date: Mon, 8 Aug 2022 18:41:30 +0200 Subject: [PATCH 0203/1476] export a single function from apply-overlays-dtmerge --- raspberry-pi/4/apply-overlays-dtmerge.nix | 54 +++++++++++------------ 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/raspberry-pi/4/apply-overlays-dtmerge.nix b/raspberry-pi/4/apply-overlays-dtmerge.nix index 8a325ab5..71175094 100644 --- a/raspberry-pi/4/apply-overlays-dtmerge.nix +++ b/raspberry-pi/4/apply-overlays-dtmerge.nix @@ -2,31 +2,29 @@ # https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/device-tree/default.nix { lib, pkgs, stdenvNoCC, dtc, libraspberrypi }: -with lib; { - applyOverlays = (base: overlays': stdenvNoCC.mkDerivation { - name = "device-tree-overlays"; - nativeBuildInputs = [ dtc libraspberrypi ]; - buildCommand = let - overlays = toList overlays'; - in '' - mkdir -p $out - cd ${base} - find . -type f -name '*.dtb' -print0 \ - | xargs -0 cp -v --no-preserve=mode --target-directory $out --parents - for dtb in $(find $out -type f -name '*.dtb'); do - dtbCompat="$( fdtget -t s $dtb / compatible )" - ${flip (concatMapStringsSep "\n") overlays (o: '' - overlayCompat="$( fdtget -t s ${o.dtboFile} / compatible )" - # overlayCompat in dtbCompat - if [[ "$dtbCompat" =~ "$overlayCompat" ]]; then - echo "Applying overlay ${o.name} to $( basename $dtb )" - mv $dtb{,.in} - cp ${o.dtboFile}{,.dtbo} - ${libraspberrypi}/bin/dtmerge "$dtb.in" "$dtb" ${o.dtboFile}.dtbo; - rm $dtb.in ${o.dtboFile}.dtbo - fi - '')} - done - ''; - }); -} +with lib; (base: overlays': stdenvNoCC.mkDerivation { + name = "device-tree-overlays"; + nativeBuildInputs = [ dtc libraspberrypi ]; + buildCommand = let + overlays = toList overlays'; + in '' + mkdir -p $out + cd ${base} + find . -type f -name '*.dtb' -print0 \ + | xargs -0 cp -v --no-preserve=mode --target-directory $out --parents + for dtb in $(find $out -type f -name '*.dtb'); do + dtbCompat="$( fdtget -t s $dtb / compatible )" + ${flip (concatMapStringsSep "\n") overlays (o: '' + overlayCompat="$( fdtget -t s ${o.dtboFile} / compatible )" + # overlayCompat in dtbCompat + if [[ "$dtbCompat" =~ "$overlayCompat" ]]; then + echo "Applying overlay ${o.name} to $( basename $dtb )" + mv $dtb{,.in} + cp ${o.dtboFile}{,.dtbo} + ${libraspberrypi}/bin/dtmerge "$dtb.in" "$dtb" ${o.dtboFile}.dtbo; + rm $dtb.in ${o.dtboFile}.dtbo + fi + '')} + done + ''; +}); From f410badac50c0710c1b98ad7de23c48848b3a84f Mon Sep 17 00:00:00 2001 From: Karolis Stasaitis Date: Mon, 8 Aug 2022 18:46:26 +0200 Subject: [PATCH 0204/1476] added missing semicolon --- raspberry-pi/4/pkgs-overlays.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raspberry-pi/4/pkgs-overlays.nix b/raspberry-pi/4/pkgs-overlays.nix index c290d2ab..71db89f6 100644 --- a/raspberry-pi/4/pkgs-overlays.nix +++ b/raspberry-pi/4/pkgs-overlays.nix @@ -2,7 +2,7 @@ let cfg = config.hardware.raspberry-pi."4".apply-overlays-dtmerge; dt_ao_overlay = (final: prev: { - deviceTree.applyOverlays = (prev.callPackage ./apply-overlays-dtmerge.nix { }) + deviceTree.applyOverlays = (prev.callPackage ./apply-overlays-dtmerge.nix { }); }); in { options.hardware = { From bfc438a27590e225d4eddd180a7d332ceadb67ea Mon Sep 17 00:00:00 2001 From: Karolis Stasaitis Date: Mon, 8 Aug 2022 18:56:33 +0200 Subject: [PATCH 0205/1476] misplaced semicolon --- raspberry-pi/4/apply-overlays-dtmerge.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raspberry-pi/4/apply-overlays-dtmerge.nix b/raspberry-pi/4/apply-overlays-dtmerge.nix index 71175094..c890e5af 100644 --- a/raspberry-pi/4/apply-overlays-dtmerge.nix +++ b/raspberry-pi/4/apply-overlays-dtmerge.nix @@ -27,4 +27,4 @@ with lib; (base: overlays': stdenvNoCC.mkDerivation { '')} done ''; -}); +}) From f217e0c09ae7a951e6fe5ed08c2a87a8729118cf Mon Sep 17 00:00:00 2001 From: Karolis Stasaitis Date: Mon, 8 Aug 2022 19:07:05 +0200 Subject: [PATCH 0206/1476] use dtmerge from nativeBuildInputs --- raspberry-pi/4/apply-overlays-dtmerge.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raspberry-pi/4/apply-overlays-dtmerge.nix b/raspberry-pi/4/apply-overlays-dtmerge.nix index c890e5af..4e4bc7b2 100644 --- a/raspberry-pi/4/apply-overlays-dtmerge.nix +++ b/raspberry-pi/4/apply-overlays-dtmerge.nix @@ -21,7 +21,7 @@ with lib; (base: overlays': stdenvNoCC.mkDerivation { echo "Applying overlay ${o.name} to $( basename $dtb )" mv $dtb{,.in} cp ${o.dtboFile}{,.dtbo} - ${libraspberrypi}/bin/dtmerge "$dtb.in" "$dtb" ${o.dtboFile}.dtbo; + dtmerge "$dtb.in" "$dtb" ${o.dtboFile}.dtbo; rm $dtb.in ${o.dtboFile}.dtbo fi '')} From 18575b969ceb9f89c5f4327ac6a0f5b5cf9623de Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Tue, 9 Aug 2022 06:04:43 +1000 Subject: [PATCH 0207/1476] pine64-pinebook-pro: remove superfluous bright/sleep keys Upstream udev has had that since 2020: https://github.com/systemd/systemd/commit/f25e30dec4958ba3ab972b823210fcbc9dd231da --- pine64/pinebook-pro/default.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pine64/pinebook-pro/default.nix b/pine64/pinebook-pro/default.nix index 799596cf..7dfc4283 100644 --- a/pine64/pinebook-pro/default.nix +++ b/pine64/pinebook-pro/default.nix @@ -43,14 +43,6 @@ ]; services.udev.extraHwdb = lib.mkMerge [ - # https://gitlab.manjaro.org/manjaro-arm/packages/community/pinebookpro-post-install/blob/master/10-usb-kbd.hwdb - '' - evdev:input:b0003v258Ap001E* - KEYBOARD_KEY_700a5=brightnessdown - KEYBOARD_KEY_700a6=brightnessup - KEYBOARD_KEY_70066=sleep - '' - # https://github.com/elementary/os/blob/05a5a931806d4ed8bc90396e9e91b5ac6155d4d4/build-pinebookpro.sh#L253-L257 # Disable the "keyboard mouse" in libinput. This is reported by the keyboard firmware # and is probably a placeholder for a TrackPoint style mouse that doesn't exist From 45f23f335e4310764af3b5fbf5126e874e622412 Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Wed, 10 Aug 2022 23:09:12 +1000 Subject: [PATCH 0208/1476] pine64-pinebook-pro: remove inappropriate overriding of min_freq Power management should be left to a power management daemon (e.g. gnome-power-manager) or for users to set/override themselves. I use governor 'schedutil', which is big.LITTLE aware, and thus can sensibly downclock, but min_freq prevents that. --- pine64/pinebook-pro/default.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pine64/pinebook-pro/default.nix b/pine64/pinebook-pro/default.nix index 799596cf..ac631661 100644 --- a/pine64/pinebook-pro/default.nix +++ b/pine64/pinebook-pro/default.nix @@ -77,14 +77,6 @@ (pkgs.callPackage ./firmware/ap6256-firmware { }) ]; - systemd.tmpfiles.rules = [ - # Tweak the minimum frequencies of the GPU and CPU governors to get a bit more performance - # https://github.com/elementary/os/blob/05a5a931806d4ed8bc90396e9e91b5ac6155d4d4/build-pinebookpro.sh#L288-L294 - "w- /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq - - - - 1200000" - "w- /sys/devices/system/cpu/cpufreq/policy4/scaling_min_freq - - - - 1008000" - "w- /sys/class/devfreq/ff9a0000.gpu/min_freq - - - - 600000000" - ]; - # The default powersave makes the wireless connection unusable. networking.networkmanager.wifi.powersave = lib.mkDefault false; } From 128bfab1ffe63629e3c91bcd9363fd94e50c4ccd Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Thu, 11 Aug 2022 20:46:37 +1000 Subject: [PATCH 0209/1476] pine64-pinebook-pro: remove unused firmware blob brcmfmac43456-sdio.clm_blob became unused as of https://github.com/NixOS/nixos-hardware/commit/3849fd959843be8f40651d38a46eb14af17f3918#diff-29a21aa2e853dac8828dabac348f6b5449c9ebe6192b6ba4bd7e118f90734fe6 (see that 'clm_blob' is removed) Rather, this file exists in the src repo: https://github.com/nix-community/rkwifibt/blob/ef8e000ddde8be5ae9a82a5e58e7278d5ca4b150/clm_blob/broadcom/AP6256/brcmfmac43456-sdio.clm_blob --- .../ap6256-firmware/brcmfmac43456-sdio.clm_blob | Bin 14036 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 pine64/pinebook-pro/firmware/ap6256-firmware/brcmfmac43456-sdio.clm_blob diff --git a/pine64/pinebook-pro/firmware/ap6256-firmware/brcmfmac43456-sdio.clm_blob b/pine64/pinebook-pro/firmware/ap6256-firmware/brcmfmac43456-sdio.clm_blob deleted file mode 100644 index 3b9b5bdc15cd0a58a000441c3903539e0e3de080..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14036 zcmZ?r@prOeU|{&Ava^Jdfq{XE0Rli`Q_L6`G&ipK4-sKtxM0S>z{0@5(B%>Y7IXIT zRd8_(ab#fNVPImg)H5{DGc+)TsRq%8dPbIdCLk6FYe+FLIOpVg<`(1^l~^el>KU8q z8G|I?*r_N#F(o-aSJyz#04~T7Xvh#~#1Lo%avui+1H%Ie28Ikt1_owkW)@}+W=>{q z78VwE77i9J7H(E{R&EXsPEJm4Zf-R-H9a*mH9NIDwKBCjwKlarwfSo6_4Lfl%nMo#OM*q=;^}h>B{IC%;*`y=oP@^9mM1v&gkRG=o7-|6Uyil#^~$F=o`Z5 z8^P%3!|3PF7~sPg5W*M`$r$9%7!=AF?8+GI$r$X-7!t%D63!GF%*@8b#K_3VI9Qwo zauXBOO$=;Itc;9|>`W|-jEqcNEMS)kf=Nb3hX0Im%nZyvOe{XkOiltUPyu!i1|};8 z78iCFFD@o89u^l~7K9{|12dBaGfXL~2LlsGJ13Ke0FntTAnnXdPMj=Oa8p^`7+3D4kKvl5WF|atXf>Ml~0E?3lix$Yn{~(7jg|M>tvB7L%OacWuC@L60zJvrb z6O$h+NEwJH$I8H1!OFRAZ7@R$$%7|Dy&S5DG&)HrU)wolL0G} z6)Ou93&_>r$Ok1O5oRVvA6U4uFk3LNIB>IAh_HYZz#PgHz{+F;(g}7e$SyxbOh$m6 z>t(>;Wys)V#NcJj;AO(#Wy;`X#^7bn;AO$!WeF+c53n;ZaPjc+@e2qF35$sGFfcMP zv#_$Ub8vETvw%1pFi8%WFeslhaxro<@-Xr;@-ZNUadYu8YrwXsGC@7^v8&IH;tkl&G|*^r%cwS*Ws9Wuu0UhK-Jnfq{XEfsKiY ziH(VaNr_2~Nsq|{lcg3m77h*$4k->LDJdxhDJ3a2DJ>}-DLp9@QkG_vWK?9-WHe-S zWb|Y#EvYH#DVb2wQ&ZE@(bCg0p=D`LPtSy&r4uGhSUPp;)P+-*PTe?j;moB=mohLi zGqN(WF^VyXNwJ7Y>4!6k$uNm2FiNpV>H0-5OX)_iNa^{32>%FXDgAI}DT4@RDMJvB zWRfysk_u;%ieQvsk+JfNV3x5CXO^*vV3M(8maz|Kl5t>?@ne?p3ulrEV3G-El8IoJ z^NV1X^N(PX3t*BDXOfR#RA5qwU{Z`=RAN+SRAJV&i(t}?U^cOfU@~!FGKpZcV+?1E za5Z3vaAb%GWpE5-@(KVK`JqfsevDoLjNU<@DkCTqR6jB^Ffgb{GB60hVg(jWLg)e_ zqDp!!Dh@0u6IiBhWHB-@w9qv$)-|wHFto5THM26ZU|?ekkzxpmU|?s85M+!nW8`9r zU|@(4VPIi$kYaL(U}9v_5M9(Ax;gmjSQ2G9g|H26C<;QAcKtpgN+#j3zMG=gI@##E0dovqnjBc2a_KogBQp| zKN*G)ONJmXkQ-T<{e&64G#ULsw)!zL`0z0Ji7>D+hR86mGlmE=axsQ5GO#e($S^T7 zS_s1=B0v%mj3A%NfJ|X$3K3=u0r@n9ks(Bcfq{XA$w`LEDV&Ls$xN8R%#4AJDMp4N z030U5j6NWh5sVBzpfGWgfrN>LFoT5|0}G>t6cZz(fgs3I5X(Z4frT0BVo!)?yfh%5 z@!>{N#Ksh&$WQ>bK!ULZYyk^Hi3kG=tA!Mkn+}teDU*vGlUoE6BfE(JgOfCaiwuK_ zB7>a@gNGg{8?$g*Nil?IGx!)Y_?R+ySTF>*GPndX1cWdIgfRp}F$BaguyR=mFgi&y z2FNhlDKa{#Fb3%|dKobKm@s;nG6q;MaU=wQU? zW5LM5Y{0$e1{VtkKX3lM^i2 z%Yr1>m_ndQGC~-d`4~Z&4=kPnN*^J@j47b>5yHrj0?G~+Qc!<@G7B3dQXrmyI-D62 z5zyQSO-z_BVzSW%hc%OhEGQ+jF%{@S5@dlaV*$v*0(OQ15e5b(2QelG873Ac3n_+> za0XT;6G6rRQ2sPvfaC}l?Bbw!4bWloFk=dEVhZqK3J7OnWHS?FZ~!M{0~H1b9R>$b zsbV0;U?9a{qt9RiGTlIw(Ew~Z6N7;W0}C_AbbYYJ%pi;9!FGe<)rSLYJ*$Njql*+% zkS;@@HG@Yus9X|c48Tyv1WIL~vdlmb6znW44pIyOdJF;n;1tASBFN|?$LM1S%Ih2~ z4h#$)91I>pFbkL*beUYNm|Xn80mkYi$lxT);H1jnWWeBL#=yevCB@*O1IjZ_wxDEb z7XmKG*jxk|?PM8k)ET1;80}2Jg&K3X#rW}#|Tpo%85|*j$m6N z7+Bd5>a`h@3>nK{TDZVgh%m4qxecz19mQ>MjWFlI^)kE2GT68>xCAq>vRVl;y2vov zC^0(eGP)QuafwGtls0uU?WV8Wg0tW^L zHxULlmJlf>A6+INKPI0DCT5lZK?V<51`h*JvB<_0Cc_Zs$H2}MCd?RSz{tfI#t5l_ zg8V^M9V@uPG(=RGLf{IMDMX$rB!Y>VDMXAR#EgNBIYfpb!iFItf`OemLYOf|oiWCY zk&8Kkks*egAx4COjmblX!NZS%naM|((Z_(1g$YuJGcs8SGdO54!1;_8;tVWIAu>!M zcAzR)926`Hpl}ceg%UG57p{*<3u;c13`3e711nRKFk>31;!I*>NaF^@jUa~L$winkL4y%o_7>QI8brd3B^sax5hFthH@K0&;AF?Z$fPCA=%B&K!el4I zTzbU#~C$bK+1$c%0TTjP~dJgkK;7WM z%%CK~z{2PUa)Tep4St}eGz$wTDO)kw_<>ubEEd8HHmVFZ2B2z!jVVNqAtV5l5=0my zj6o@Zi6KH5l-#8l%nTSz=cEHkJn3snX$lt9gk0tb)> zgc(b;KptRZDB)#bL1}}7vmU4o&IoFgGn$w&urY!fzo5F7i!lJyz((aV1xP_!#{uBB z02fmL0|Qu@PXq%ys1D^~^a1Je31?sj6`Wj*E})PHn{ER#9TX7Y<_;sMqrnJj%7BX~ zMn6!UZ(#yz{DK;SEGSJt7C&Q99)~vI*zK^k+gKniP-u&d*+Q4e%8tn{f{Bqu58N8F z&;T`eSeRT)z_mG(6S#rK#F!G!#Kag9&cMPL6wbiN7-YsMgxQy3VfA5P_F-rC;bHdS zWp)x^W@NErU~pn%u;XE{0tKrT1G5t+vy}idBdZnzgApr(4HttM4}%^rsH?!t%*d#~ z%)r8G#lY;s&g{j*>;f@_)qsJ)ij~2Mi@}PA!3<=M10#bA4}$|A10$;u1EU2iqYW3M z1rMVYFCz<+6BC1j00SeV6Eh_nE(SLlLZr_880IXO9%r)2s=X*4?_q)10xe? zc!`^lg&B`=tZobp0qhI`JPZN63?2dujI34+j4rH<0bGnOJd8HHj4aG<49p&!%pM?5 zfqcu#;Ks$^#KT|*a%dO>LmekWm;eJKvmXOv9Xq2RFCzVG zVa4dc3K|>$)-Tn zu`pVI#H>L6a{#4O6J`d`*b}n@H?xHZGb5881A_@CC>ev4S%8%Jfmq<62?4QuSis{I z7$fISK`bN;o+C!inZ1LUNgg?OXF(l2XK{1|596Z_p@arAg6B9`BpDbSLl_vm0@xY6 zgM=6Yjbs>tLgg5O9hDhEgH;(KLi8CJ80;B9VK2tS0H&K5A!BEgL z6E>(IGZO9#26qnTeVhyo z49pKfj%Q$HWZ-3DzRJve2Q;_C`~)n>$jBhc#304YpvS@-!^)h-#$3$KT*AS82c(g~ zpOGPei6M}gA&7+`n3W-fjUkksA&i3|oRcAviy?}eA)1FFhL`y=AM+J{Mn1*|QVa|? zSQ!}j*%%nS%@`O?vN14tNHQ>3GBGeT=rS*|5Gw=29CikVGwcvKYLX=kkT_M9VqoxeVPpW! zJMEVM#Tz37$hsPK2GDpMc)qL*#13I#0HugdMh1q6Fa`$D^wlQ@28M_zZU#dJ1_m7o z1_ll$1_ldh1_tFs22DwAX$EHHJO(Z9|NlQQC>JqkN@>e5FdH~B@PR}G44fDkgcu|k z1Pq)R_&8NK83Y}jA&LbYT^RVRRNWa29bFmtxOur56dYX{`K)*YK@2v&M3pQCLq|85 z8g~Z1INo#y1xI%#J`oiu24hE01|AU}DF$IjPexW@PDuu4M;`{Lb{{6F$-WGH94hP# zjE;T`d_ueu3<{3^P=`4N!kiJrz^BBk%)sCn#0XZy;1~=uIhY4(atO@i5JtWrUKa)h z#}JqmAaG*kth++k|mVQSoAYCIVDWO(Hm7@Ry< z_+(WGBC(6$T2WDJ3`HIb_`jFQVM){(mPDOlA?6GUF;Jp)_J9VRvj;TjoIRjH=L`)f zLuYRWzGRgg20>>Z20kucE(S(tUr5jiI{PsgXISMkFgW|E@yV$uFbF#PGw=!W@-rwn z`wN1@$JjXl>OtoqP)ZPCP;d@{Nrf`-ajX76VBj1EGcX*cID$bh-Yl6x&>0jOpxopf z33Fj2%!N@f$49}WqM%YPuw>)n$_z>BF0Sn0z%+F6g2btSi#Jrei#Jrei#JTWFEqei zps_6M62-vB!OOv*;A+6Y$ImOopy28Z@{RUaaxI#0mpc^Q5K*8eX303Uo z303Uo#Q@2bZXge;x-$s6!4kHcKO~$D-GZQYxdp+r2eCrJ#~qYCLAuiM@cbMbdgP?wQ4~C{6_Yej?AsGn<0rwC_aO^O(p1VB zm_1;&d%$e>fZ6U50x^ftBNXCz1&>f@(0PPHUFhiosU|@67+)c84X8q6<;z#CWf1Um zQIjZ8tYcvC1O+B2ay?-Q$f%= z)dLtnGncCTpu)<_h(VPD%rIt94F)qz7*rL(3{wVG6)?k$K~)vZFlSIz12ZfbRAa#m zO9nnwbyWriFOc6sX~WBxfiG3Hj6u-LpMj5&mytoi%b%H#QI&zg&?|sJHA>4D)P`eJ zh3E=kQjJpg2Z=EAMe%xo7%Uo5T7C?SUIDBckq`!(dYGmcNQ7N0T;ChS;4q1>_5m?C z)j~BqK@2Xn5D>%Lk-A)v|zr#oL8}FN?Q?fyEo-LS8opMQ>Qb_V$2g z2X7B1aE&kM?FlWuyuBHWxGlLE7`$Pz$anm5)P}ox#vMf`Kocw}^qoJCZ?wTMXpFNM=agJp7pUUI zz~JKut=4@UnZR|EppO%zf>!WxVg>uu(8n3-9UoAp24#F7XorEU&`pbs?pG57>Sv$+o})%n0uoewP4`M|Q34=h{xgfjD4$+|Hp z`haQ>P?qrtgXTD&Flbu!iDcm8R{MWIz}Jz1k6%}SLBZFNk&i={1H@qBoH zib3rH@ea(%-Y z!O?B#8v!Y87<0=uFvE?3FJ2~z0W`J8r>v^NVCd%wtw#MkAytX7A1I(eLFeZKjY>ZsXjJ-v$}zB% zKTOIWCKbS-&11mBz~Bc8AFy4a417ZW|9=qhi-KfN1-~d3a7)I}9~1>3bNqdw+5;RJ zv>6PP7!(2=1^MJv6d8;IT%isNa20{HWCB1{8_47UcLqKtUPcCn0BFWn2=IVrhX8K| zzD$`y2E_oFF9Kk`2!Qz_0AxGZ96xAk2?&DLO#wk_kl+n~R%8qTus98X#c2R6P6NWB zSuX%oe}R%sKqMo$3Ca)<2`z{M4H=lYnYbB1YxWrQ7<51kMs5pk69(o$M+Ux3)nW$2 zAW-ap(pV5QVG9Pq!Z`>Q&Oxwn4gw`MP|yWIGpu0{s1*k)!-GN@!3l{mD3poMN5++me_(p(F9f;25ERG1cyoTiOGsF zCuWHVr32@PiB zFksaOG1#>%_02%KIM^&Xzzj}qb8ce>=Fmt6y+pG-28K|W!@@vqT2KlPgLXLu!(i1` zm@A}9&JgAbYAmHP2!??I9IP1HNf!?Dgt|El8kh`Wek^>+GC2%_VWAA*dQdPN6kjTV z3j4)temS&J;V2Ch;S`lHyV93nN!oUz=461IN85ANM8Tgn%c_+e&fk6Sx z2x4H&W3FOghzMp-W|wAWP>cv+00)agLHGeorgh|9kAcBE0B7|AQRv;3@U=igO zVH33%j0Q=ui#iC#fEXO2j)Jiu2B(OVKpcp{CF(2~1X9c`?J5)k zV(`eg35S9hyt3{hVIT&dBC8}DgHl8YzXFQ{D}z!*D1%TCpDTkxL>PlSw>Zesa0Vl9 zOB)8|hzJHbP}fx<0@iDbh+v7z3Jq z6rvoVJ)kIGX!REbE6})^{xb_oN$AQ&FtAuiF}vw7TbVMuMKFsn{AUuE5|3bF3Xx(C zLGT%voTQkYBAC?~Sy;rS1a-yjg4xHF*&&G8 zCxTfBp#Y@UPlwsTl-b3C+0UI>3+!4s2PUQvMdpGCW+b!NY^0b2beVl@nLUD-eZrUn zqM1dQ{xbz145a#K`Ve&7#J&5n6;Vy zGs;1j+)S)kBO5IdIO#Ckn1Ui15}}IlfQAIAG=!fL!HlL4;y*u-I15&L3_(t@V`2=k zW7cK*&m;;;bxbz8%q|hkx{UvsVWmdF;D&d9c2f2X7L5ev*k2$~}lw?sfg95-om)XS%^AW)y8~c2dkyI?MrP z%u$ZaVgAfz5zK;@@BRO zVRncBWnNIJ14>p3%<4>B%%DUe7s0?`AkJ)|%50#?Y+=l7V8(3W%4`tGtP{bk#>5QP zz`&@Xz^u;rAEtpxLje?gqD)+j;xY`38ZyjApj;Hrz^D?=tO7CEMlPIzNkg7lC7fB2 z=|79OjGUDmC=Qr4fk{IKWSl&x5R?IHlL2WHhgfJW7tX)}EpI%S zgTk4`m^cx}u_(we%UCgk7X3yrD>5RM>bHMv!0pXeumLzI}c7}-I}?fD{@7(IHPaa&Y$bVOfg}@9K*}&M`pGb}fNBykCdLpkXe9$G#zMeVlQP(Ua#nHyOiUqi%pn0#fj zFgZvuTNr>U0%ma;341w6ET}Vq(xU`Yt*Qk!0|zHJ)Q1S#gQ|23V^9b}Dl;9BxGq$&F0+*#vmL~6>2T1h2e3VI;S7vH;b106 zG$ovwfsKKI;e`}&>&!u0fmj*QwgT}(wgQQ=FoE|8i7`oqGwL$w+B5!VjA0aFj9?UI zlw#Jkk6@CD(9+Vf(#q1R((2Nht+m?9$|}pMD=RCjDyu7Nc2!kXSJmvQ)m>d(vuDqq Kz1r28fdK#}@ Date: Tue, 2 Aug 2022 20:32:29 +0200 Subject: [PATCH 0210/1476] raspberry-pi-4: add i2c clock-frequency option --- raspberry-pi/4/i2c.nix | 50 ++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/raspberry-pi/4/i2c.nix b/raspberry-pi/4/i2c.nix index 93c1c6d9..786581ee 100644 --- a/raspberry-pi/4/i2c.nix +++ b/raspberry-pi/4/i2c.nix @@ -2,7 +2,8 @@ let cfg = config.hardware.raspberry-pi."4"; - simple-overlay = { target, status }: { + optionalProperty = name: value: lib.optionalString (value != null) "${name} = <${builtins.toString value}>;"; + simple-overlay = { target, status, frequency }: { name = "${target}-${status}-overlay"; dtsText = '' /dts-v1/; @@ -13,6 +14,7 @@ let target = <&${target}>; __overlay__ { status = "${status}"; + ${optionalProperty "clock-frequency" frequency} }; }; }; @@ -21,26 +23,52 @@ let in { options.hardware.raspberry-pi."4" = { - i2c0.enable = lib.mkEnableOption '' - Turn on the VideoCore I2C bus (maps to /dev/i2c-22) and enable access from the i2c group. - After a reboot, i2c-tools (e.g. i2cdetect -F 22) should work for root or any user in i2c. - ''; - i2c1.enable = lib.mkEnableOption '' - Turn on the ARM I2C bus (/dev/i2c-1 on GPIO pins 3 and 5) and enable access from the i2c group. - After a reboot, i2c-tools (e.g. i2cdetect -F 1) should work for root or any user in i2c. - ''; + i2c0 = { + enable = lib.mkEnableOption '' + Turn on the VideoCore I2C bus (maps to /dev/i2c-22) and enable access from the i2c group. + After a reboot, i2c-tools (e.g. i2cdetect -F 22) should work for root or any user in i2c. + ''; + frequency = lib.mkOption { + type = lib.types.nullOr lib.types.int; + default = null; + description = '' + interface clock-frequency + ''; + }; + }; + i2c1 = { + enable = lib.mkEnableOption '' + Turn on the ARM I2C bus (/dev/i2c-1 on GPIO pins 3 and 5) and enable access from the i2c group. + After a reboot, i2c-tools (e.g. i2cdetect -F 1) should work for root or any user in i2c. + ''; + frequency = lib.mkOption { + type = lib.types.nullOr lib.types.int; + default = null; + description = '' + interface clock-frequency + ''; + }; + }; }; config.hardware = lib.mkMerge [ (lib.mkIf cfg.i2c0.enable { i2c.enable = lib.mkDefault true; deviceTree = { - overlays = [ (simple-overlay { target = "i2c0if"; status = "okay"; }) ]; + overlays = [ (simple-overlay { + target = "i2c0if"; + status = "okay"; + frequency = cfg.i2c0.frequency; + }) ]; }; }) (lib.mkIf cfg.i2c1.enable { i2c.enable = lib.mkDefault true; deviceTree = { - overlays = [ (simple-overlay { target = "i2c1"; status = "okay"; }) ]; + overlays = [ (simple-overlay { + target = "i2c1"; + status = "okay"; + frequency = cfg.i2c1.frequency; + }) ]; }; }) ]; From 2284621815598261bd444cded4053eb0d8e02f8e Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Wed, 17 Aug 2022 14:45:50 +0200 Subject: [PATCH 0211/1476] Quirks no more needed --- lenovo/thinkpad/x1/7th-gen/audio.nix | 15 --------------- lenovo/thinkpad/x1/7th-gen/default.nix | 1 - 2 files changed, 16 deletions(-) delete mode 100644 lenovo/thinkpad/x1/7th-gen/audio.nix diff --git a/lenovo/thinkpad/x1/7th-gen/audio.nix b/lenovo/thinkpad/x1/7th-gen/audio.nix deleted file mode 100644 index f6ecf58a..00000000 --- a/lenovo/thinkpad/x1/7th-gen/audio.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ lib, pkgs, ... }: -{ - # This can be removed when the default kernel is at least version 5.6 - # https://github.com/NixOS/nixpkgs/pull/86168 - boot.kernelPackages = lib.mkIf - (lib.versionOlder pkgs.linux.version "5.6") - (lib.mkDefault pkgs.linuxPackages_latest); - - # This can be removed when PulseAudio is at least version 14 - # https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_7)#Audio - hardware.pulseaudio.extraConfig = '' - load-module module-alsa-sink device=hw:0,0 channels=4 - load-module module-alsa-source device=hw:0,6 channels=4 - ''; -} diff --git a/lenovo/thinkpad/x1/7th-gen/default.nix b/lenovo/thinkpad/x1/7th-gen/default.nix index d9af5ebe..c886002b 100644 --- a/lenovo/thinkpad/x1/7th-gen/default.nix +++ b/lenovo/thinkpad/x1/7th-gen/default.nix @@ -3,6 +3,5 @@ ../. ../../../../common/pc/laptop/acpi_call.nix ../../../../common/pc/laptop/ssd - ./audio.nix ]; } From adbeb1a5d672df746b1009cddc7d68919f81e7e3 Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Wed, 17 Aug 2022 14:50:42 +0200 Subject: [PATCH 0212/1476] Enable `throttled` for Thinkpad X1 gen 7 too Even if this device is currently not mentioned upstream between the devices that need this I stressed my machine (using `s-tui`) with and without and I can confirm that it incremented the average CPU frequency during the stress test (from 1.8/2GHz to around 3GHz). --- lenovo/thinkpad/x1/7th-gen/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lenovo/thinkpad/x1/7th-gen/default.nix b/lenovo/thinkpad/x1/7th-gen/default.nix index c886002b..1547e053 100644 --- a/lenovo/thinkpad/x1/7th-gen/default.nix +++ b/lenovo/thinkpad/x1/7th-gen/default.nix @@ -1,7 +1,10 @@ +{ lib, ... }: { imports = [ ../. ../../../../common/pc/laptop/acpi_call.nix ../../../../common/pc/laptop/ssd ]; + + services.throttled.enable = lib.mkDefault true; } From 7ffa41766accb949920459813bdf324e3edb9286 Mon Sep 17 00:00:00 2001 From: Philippe Schaaf Date: Wed, 17 Aug 2022 11:25:31 +0200 Subject: [PATCH 0213/1476] added lenovo thinkpad T590 Copied from T550 and T490 config. Omit the pulseaudio profile from T490 config for now. Signed-off-by: Philippe Schaaf --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/t590/default.nix | 13 +++++++++++++ 3 files changed, 15 insertions(+) create mode 100644 lenovo/thinkpad/t590/default.nix diff --git a/README.md b/README.md index 61ecbce7..9345c973 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,7 @@ See code for all available configurations. | [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | | [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | | [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | +| [Lenovo ThinkPad T590](lenovo/thinkpad/t590) | `` | | [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | | [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | | [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | diff --git a/flake.nix b/flake.nix index 7ce89372..057875f2 100644 --- a/flake.nix +++ b/flake.nix @@ -91,6 +91,7 @@ lenovo-thinkpad-t490 = import ./lenovo/thinkpad/t490; lenovo-thinkpad-t495 = import ./lenovo/thinkpad/t495; lenovo-thinkpad-t550 = import ./lenovo/thinkpad/t550; + lenovo-thinkpad-t590 = import ./lenovo/thinkpad/t590; lenovo-thinkpad-x1 = import ./lenovo/thinkpad/x1; lenovo-thinkpad-x1-yoga = import ./lenovo/thinkpad/x1/yoga; lenovo-thinkpad-x1-6th-gen = import ./lenovo/thinkpad/x1/6th-gen; diff --git a/lenovo/thinkpad/t590/default.nix b/lenovo/thinkpad/t590/default.nix new file mode 100644 index 00000000..6a4cc7b8 --- /dev/null +++ b/lenovo/thinkpad/t590/default.nix @@ -0,0 +1,13 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop/acpi_call.nix + ../. + ]; + + services = { + throttled.enable = lib.mkDefault true; + }; +} From fb635bfba081e9e707571abaf462d27d81580072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marijan=20Petri=C4=8Devi=C4=87?= Date: Thu, 1 Sep 2022 09:47:30 +0200 Subject: [PATCH 0214/1476] lenovo/z: add Lenovo Thinkpad Z(13) Co-authored-by: toastal --- README.md | 2 ++ flake.nix | 2 ++ lenovo/thinkpad/z/default.nix | 23 +++++++++++++++++++++++ lenovo/thinkpad/z/z13/default.nix | 5 +++++ 4 files changed, 32 insertions(+) create mode 100644 lenovo/thinkpad/z/default.nix create mode 100644 lenovo/thinkpad/z/z13/default.nix diff --git a/README.md b/README.md index 61ecbce7..6e42cd4b 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,8 @@ See code for all available configurations. | [Lenovo ThinkPad X260](lenovo/thinkpad/x260) | `` | | [Lenovo ThinkPad X270](lenovo/thinkpad/x270) | `` | | [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | +| [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | +| [Lenovo ThinkPad Z13](lenovo/thinkpad/z/z13) | `` | | [MSI GS60 2QE](msi/gs60) | `` | | [MSI GL62/CX62](msi/gl62) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | diff --git a/flake.nix b/flake.nix index 7ce89372..94cdba69 100644 --- a/flake.nix +++ b/flake.nix @@ -109,6 +109,8 @@ lenovo-thinkpad-x260 = import ./lenovo/thinkpad/x260; lenovo-thinkpad-x270 = import ./lenovo/thinkpad/x270; lenovo-thinkpad-x280 = import ./lenovo/thinkpad/x280; + lenovo-thinkpad-z = import ./lenovo/thinkpad/z; + lenovo-thinkpad-z13 = import ./lenovo/thinkpad/z/z13; microsoft-surface = import ./microsoft/surface; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; msi-gs60 = import ./msi/gs60; diff --git a/lenovo/thinkpad/z/default.nix b/lenovo/thinkpad/z/default.nix new file mode 100644 index 00000000..c3fdda25 --- /dev/null +++ b/lenovo/thinkpad/z/default.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: { + imports = [ + ../../../lenovo/thinkpad + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ../../../common/pc/laptop + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/ssd + ]; + # kernel versions prior to 5.18 won't boot + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.18") (lib.mkDefault pkgs.linuxPackages_5_18); + + hardware.enableRedistributableFirmware = lib.mkDefault true; + hardware.trackpoint.device = lib.mkDefault "TPPS/2 Elan TrackPoint"; + hardware.video.hidpi.enable = lib.mkDefault true; + + services.fprintd.enable = lib.mkDefault true; + + # kernel versions below 6.0 don't contain ACPI suspend2idle drivers for the Z13s AMD hardware + # my Z13 froze after waking up from suspend/ hibernate + services.logind.lidSwitch = lib.mkIf (lib.versionOlder pkgs.linux.version "6.00") (lib.mkDefault "lock"); +} diff --git a/lenovo/thinkpad/z/z13/default.nix b/lenovo/thinkpad/z/z13/default.nix new file mode 100644 index 00000000..b351777f --- /dev/null +++ b/lenovo/thinkpad/z/z13/default.nix @@ -0,0 +1,5 @@ +{ config, lib, pkgs, ... }: { + imports = [ + ../../../../lenovo/thinkpad/z + ]; +} From dcb10523831fd7431dcd87445e1c66c6e6a996e2 Mon Sep 17 00:00:00 2001 From: Sandro Date: Sun, 4 Sep 2022 19:59:03 +0200 Subject: [PATCH 0215/1476] Quote URL literal --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4df757fe..3146eeff 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ There is also experimental flake support. In your `/etc/nixos/flake.nix` add the ```nix { description = "NixOS configuration with flakes"; - inputs.nixos-hardware.url = github:NixOS/nixos-hardware/master; + inputs.nixos-hardware.url = "github:NixOS/nixos-hardware/master"; outputs = { self, nixpkgs, nixos-hardware }: { # replace with your actual hostname From a318b2ebfae401ab3adecb88641d0da2111d0a4a Mon Sep 17 00:00:00 2001 From: Rehno Lindeque Date: Tue, 6 Sep 2022 18:49:29 +0000 Subject: [PATCH 0216/1476] apple/macbook-pro/11-5: explicitly turn on redistributable firmware --- apple/macbook-pro/11-5/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apple/macbook-pro/11-5/default.nix b/apple/macbook-pro/11-5/default.nix index a53b5d8a..1fe60aea 100644 --- a/apple/macbook-pro/11-5/default.nix +++ b/apple/macbook-pro/11-5/default.nix @@ -10,9 +10,11 @@ in imports = [ ../. ../../../common/pc/laptop/ssd - ]; + # Enable broadcom-43xx firmware + hardware.enableRedistributableFirmware = true; + # Apparently this is currently only supported by ati_unfree drivers, not ati hardware.opengl.driSupport32Bit = false; From c38ec64187c534bcb6d1d99ec40269ea33fa080e Mon Sep 17 00:00:00 2001 From: Rehno Lindeque Date: Tue, 6 Sep 2022 19:32:22 +0000 Subject: [PATCH 0217/1476] apple/macbook-pro/11-5: Use the newer amdgpu driver --- apple/macbook-pro/11-5/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/apple/macbook-pro/11-5/default.nix b/apple/macbook-pro/11-5/default.nix index 1fe60aea..d641abdc 100644 --- a/apple/macbook-pro/11-5/default.nix +++ b/apple/macbook-pro/11-5/default.nix @@ -10,16 +10,15 @@ in imports = [ ../. ../../../common/pc/laptop/ssd + + # Radeon Venus XT is a GCN 1 microarchitecture + # (amdgpu driver support is experimental and must be explicitly enabled) + ../../../common/gpu/amd/southern-islands ]; # Enable broadcom-43xx firmware hardware.enableRedistributableFirmware = true; - # Apparently this is currently only supported by ati_unfree drivers, not ati - hardware.opengl.driSupport32Bit = false; - - services.xserver.videoDrivers = [ "ati" ]; - services.udev.extraRules = # Disable XHC1 wakeup signal to avoid resume getting triggered some time # after suspend. Reboot required for this to take effect. From a930f43803c1c7111cd53445b552437da5e8866d Mon Sep 17 00:00:00 2001 From: Rehno Lindeque Date: Wed, 7 Sep 2022 15:36:38 +0000 Subject: [PATCH 0218/1476] apple/macbook-pro/11-5: document amdgpu driver choice --- apple/macbook-pro/11-5/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apple/macbook-pro/11-5/README.md b/apple/macbook-pro/11-5/README.md index 17e5ef1d..782c720f 100644 --- a/apple/macbook-pro/11-5/README.md +++ b/apple/macbook-pro/11-5/README.md @@ -22,11 +22,19 @@ This configuration will **not** work with MacBook Pro 11,2 or 11,3 models. ## Graphics -The [MacBookPro11,4 and MacBookPro11,5](https://support.apple.com/kb/SP719) models ship with a discrete ATI graphics card (whereas MacBookPro11,2 and MacBookPro11,3 ship with NVidia cards). This is alongside the usual integrated Intel GPU. +The [MacBookPro11,4 and MacBookPro11,5](https://support.apple.com/kb/SP719) models ship with a discrete ATI/AMD graphics card (whereas MacBookPro11,2 and MacBookPro11,3 ship with NVidia cards). This is alongside the usual integrated Intel GPU. You may wish to look into dynamic switching between integrated and discrete graphics, but this config doesn't attempt it. +Currently this uses the experimental `si_support` to disable the older radeon driver and enable the more modern `amdgpu` driver. + ## Additional resources * Arch linux wiki: [MacBookPro11,x](https://wiki.archlinux.org/index.php/MacBookPro11,x) * Kernel patches: [MacBookPro11,x](https://bugzilla.kernel.org/buglist.cgi?quicksearch=macbookpro11) + +For more context about experimental `amdgpu` support, see: + +* [Enabling AMDGPU by default for SI & CIK (November 2021)](https://gitlab.freedesktop.org/drm/amd/-/issues/1776) +* [Enabling AMDGPU by default for SI & CIK (August 2020))](https://lists.freedesktop.org/archives/amd-gfx/2020-August/052243.html) +* [Feature support matrix](https://wiki.gentoo.org/wiki/AMDGPU#Feature_support) From 1d100017018efb0d79022dfe8c010f14250f9117 Mon Sep 17 00:00:00 2001 From: Rehno Lindeque Date: Wed, 7 Sep 2022 15:37:40 +0000 Subject: [PATCH 0219/1476] apple/macbook-pro/11-5: Links to hardware probes --- apple/macbook-pro/11-5/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apple/macbook-pro/11-5/README.md b/apple/macbook-pro/11-5/README.md index 782c720f..8feb1c75 100644 --- a/apple/macbook-pro/11-5/README.md +++ b/apple/macbook-pro/11-5/README.md @@ -28,6 +28,16 @@ You may wish to look into dynamic switching between integrated and discrete grap Currently this uses the experimental `si_support` to disable the older radeon driver and enable the more modern `amdgpu` driver. +## Hardware probes + +Hardware probes generated with `nix run nixpkgs#hw-probe -- -all -upload`: + +* Probe [#305905e674](https://linux-hardware.org/?probe=305905e674) of Apple MacBookPro11,5 + +DRM (Direct Rendering Manager) snapshots generated with `drm_info -j | curl -d @- https://drmdb.emersion.fr/submit`: + +* Snapshot [#e8f8076f1f1b](https://drmdb.emersion.fr/snapshots/e8f8076f1f1b) + ## Additional resources * Arch linux wiki: [MacBookPro11,x](https://wiki.archlinux.org/index.php/MacBookPro11,x) From 821ddbaf1cb6ff5ecfdf12cf51759f6605a7dad7 Mon Sep 17 00:00:00 2001 From: Rehno Lindeque Date: Wed, 7 Sep 2022 15:41:28 +0000 Subject: [PATCH 0220/1476] apple/macbook-pro/11-5: make enableRedistributableFirmware an optional default (uniformity with other configs) --- apple/macbook-pro/11-5/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple/macbook-pro/11-5/default.nix b/apple/macbook-pro/11-5/default.nix index d641abdc..926753f1 100644 --- a/apple/macbook-pro/11-5/default.nix +++ b/apple/macbook-pro/11-5/default.nix @@ -17,7 +17,7 @@ in ]; # Enable broadcom-43xx firmware - hardware.enableRedistributableFirmware = true; + hardware.enableRedistributableFirmware = lib.mkDefault true; services.udev.extraRules = # Disable XHC1 wakeup signal to avoid resume getting triggered some time From fd68d65507fc362f763bc8e6127e322b6e63e864 Mon Sep 17 00:00:00 2001 From: Rehno Lindeque Date: Wed, 7 Sep 2022 15:45:43 +0000 Subject: [PATCH 0221/1476] apple/macbook-pro/11-5: add to top-level README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3146eeff..2561c80d 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ See code for all available configurations. | [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | | [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | | [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | +| [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | From a4345da27ed2ac532b60078cdb4d0093303b14d0 Mon Sep 17 00:00:00 2001 From: Rehno Lindeque Date: Wed, 7 Sep 2022 16:53:00 +0000 Subject: [PATCH 0222/1476] apple/macbook-pro/11-5: driver choice should be optional since si_support is experimental --- apple/macbook-pro/11-5/README.md | 23 +++++++++++++++++++---- apple/macbook-pro/11-5/default.nix | 4 ---- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/apple/macbook-pro/11-5/README.md b/apple/macbook-pro/11-5/README.md index 8feb1c75..4c586e3a 100644 --- a/apple/macbook-pro/11-5/README.md +++ b/apple/macbook-pro/11-5/README.md @@ -24,19 +24,34 @@ This configuration will **not** work with MacBook Pro 11,2 or 11,3 models. The [MacBookPro11,4 and MacBookPro11,5](https://support.apple.com/kb/SP719) models ship with a discrete ATI/AMD graphics card (whereas MacBookPro11,2 and MacBookPro11,3 ship with NVidia cards). This is alongside the usual integrated Intel GPU. -You may wish to look into dynamic switching between integrated and discrete graphics, but this config doesn't attempt it. +To switch from the older `radeon` driver to the newer `amdgpu` driver (via experimental `si_support`), include `nixos-hardware.nixosModules.common-gpu-amd-southern-islands` (or `${nixos-hardware}/common/gpu/amd/southern-islands`) in your configuration. This will get you vulkan support among other benefits. -Currently this uses the experimental `si_support` to disable the older radeon driver and enable the more modern `amdgpu` driver. +For example, in your `flake.nix`: + +```nix +nixosConfigurations = { + macbook-pro-11-5 = lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + nixos-hardware.nixosModules.apple-macbook-pro-11-5 + nixos-hardware.nixosModules.common-gpu-amd-southern-islands + { + # Your personal configuration + } + ]; + }; +}; +``` ## Hardware probes Hardware probes generated with `nix run nixpkgs#hw-probe -- -all -upload`: -* Probe [#305905e674](https://linux-hardware.org/?probe=305905e674) of Apple MacBookPro11,5 +* Probe [#305905e674](https://linux-hardware.org/?probe=305905e674) of Apple MacBookPro11,5 (with `amdgpu` driver) DRM (Direct Rendering Manager) snapshots generated with `drm_info -j | curl -d @- https://drmdb.emersion.fr/submit`: -* Snapshot [#e8f8076f1f1b](https://drmdb.emersion.fr/snapshots/e8f8076f1f1b) +* Snapshot [#e8f8076f1f1b](https://drmdb.emersion.fr/snapshots/e8f8076f1f1b) (with `amdgpu` driver) ## Additional resources diff --git a/apple/macbook-pro/11-5/default.nix b/apple/macbook-pro/11-5/default.nix index 926753f1..434e8e75 100644 --- a/apple/macbook-pro/11-5/default.nix +++ b/apple/macbook-pro/11-5/default.nix @@ -10,10 +10,6 @@ in imports = [ ../. ../../../common/pc/laptop/ssd - - # Radeon Venus XT is a GCN 1 microarchitecture - # (amdgpu driver support is experimental and must be explicitly enabled) - ../../../common/gpu/amd/southern-islands ]; # Enable broadcom-43xx firmware From 33642d338f6b3a047a128b5ba574d18e34994da9 Mon Sep 17 00:00:00 2001 From: Rehno Lindeque Date: Wed, 7 Sep 2022 17:10:58 +0000 Subject: [PATCH 0223/1476] apple/macbook-pro/11-5: add a note about switching between integrated and discrete graphics --- apple/macbook-pro/11-5/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apple/macbook-pro/11-5/README.md b/apple/macbook-pro/11-5/README.md index 4c586e3a..63fa1194 100644 --- a/apple/macbook-pro/11-5/README.md +++ b/apple/macbook-pro/11-5/README.md @@ -43,6 +43,11 @@ nixosConfigurations = { }; ``` +## Power management + +You may also wish to look into dynamic switching between integrated and discrete graphics, but this config doesn't currently attempt it. +See the removed [hardware.amdHybridGraphics.disable](https://github.com/NixOS/nixpkgs/pull/33915) option for an entry point. + ## Hardware probes Hardware probes generated with `nix run nixpkgs#hw-probe -- -all -upload`: From 3ed1ae8ef7d9f34470a624ea322ca816545dbbfe Mon Sep 17 00:00:00 2001 From: Weathercold Date: Fri, 9 Sep 2022 23:45:13 -0400 Subject: [PATCH 0224/1476] inspiron-7405: init --- README.md | 1 + dell/inspiron/7405/README.md | 49 ++++++++++++++++++++++++++++++++++ dell/inspiron/7405/default.nix | 17 ++++++++++++ flake.nix | 1 + 4 files changed, 68 insertions(+) create mode 100644 dell/inspiron/7405/README.md create mode 100644 dell/inspiron/7405/default.nix diff --git a/README.md b/README.md index 4df757fe..bd2ea965 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ See code for all available configurations. | [Dell G3 3779](dell/g3/3779) | `` | | [Dell Inspiron 5509](dell/inspiron/5509) | `` | | [Dell Inspiron 5515](dell/inspiron/5515) | `` | +| [Dell Inspiron 7405](dell/inspiron/7405) | `` | | [Dell Latitude 3480](dell/latitude/3480) | `` | | [Dell Latitude 5520](dell/latitude/5520) | `` | | [Dell Latitude 7490](dell/latitude/7490) | `` | diff --git a/dell/inspiron/7405/README.md b/dell/inspiron/7405/README.md new file mode 100644 index 00000000..dcdc14f1 --- /dev/null +++ b/dell/inspiron/7405/README.md @@ -0,0 +1,49 @@ +## Dell Inspiron 7405 + +### Tested Hardware + +``` shellsession +$ lspci -nn +00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne Root Complex [1022:1630] +00:00.2 IOMMU [0806]: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne IOMMU [1022:1631] +00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge [1022:1632] +00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge [1022:1632] +00:02.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge [1022:1634] +00:02.4 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge [1022:1634] +00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge [1022:1632] +00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus [1022:1635] +00:08.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus [1022:1635] +00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 51) +00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51) +00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 0 [1022:1448] +00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 1 [1022:1449] +00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 2 [1022:144a] +00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 3 [1022:144b] +00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 4 [1022:144c] +00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 5 [1022:144d] +00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 6 [1022:144e] +00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 7 [1022:144f] +01:00.0 Network controller [0280]: Intel Corporation Wi-Fi 6 AX200 [8086:2723] (rev 1a) +02:00.0 Non-Volatile memory controller [0108]: SK hynix BC511 [1c5c:1339] +03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Renoir [1002:1636] (rev c2) +03:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller [1002:1637] +03:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor [1022:15df] +03:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1 [1022:1639] +03:00.4 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1 [1022:1639] +03:00.5 Multimedia controller [0480]: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor [1022:15e2] (rev 01) +03:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller [1022:15e3] +03:00.7 Signal processing controller [1180]: Advanced Micro Devices, Inc. [AMD] Sensor Fusion Hub [1022:15e4] +04:00.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 81) +04:00.1 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 81) +``` + +### Extra Configuration + +#### Bluetooth + +To enable bluetooth support, set `hardware.bluetooth.enable = true;`. + +#### Firmware Upgrades + +This device is partially supported by [fwupd](https://fwupd.org).\ +To perform firmware upgrades, add `services.fwupd.enable = true;`, then use `fwupdmgr` to perform updates. \ No newline at end of file diff --git a/dell/inspiron/7405/default.nix b/dell/inspiron/7405/default.nix new file mode 100644 index 00000000..06ccf92f --- /dev/null +++ b/dell/inspiron/7405/default.nix @@ -0,0 +1,17 @@ +{ lib, ... }: + +with lib; + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/gpu/amd + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + # TSC is unstable + boot.kernelParams = [ "notsc" "trace_clock=local" ]; + + hardware.enableRedistributableFirmware = mkDefault true; +} diff --git a/flake.nix b/flake.nix index defec0ee..b34e847c 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,7 @@ dell-g3-3779 = import ./dell/g3/3779; dell-inspiron-5509 = import ./dell/inspiron/5509; dell-inspiron-5515 = import ./dell/inspiron/5515; + dell-inspiron-7405 = import ./dell/inspiron/7405; dell-latitude-3480 = import ./dell/latitude/3480; dell-latitude-5520 = import ./dell/latitude/5520; dell-latitude-7490 = import ./dell/latitude/7490; From bb36cedc0a2a6624264b2ac75d679967717ff7e3 Mon Sep 17 00:00:00 2001 From: Weathercold Date: Fri, 9 Sep 2022 23:45:57 -0400 Subject: [PATCH 0225/1476] README.md: fix dead links, align table --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bd2ea965..666bc510 100644 --- a/README.md +++ b/README.md @@ -97,13 +97,13 @@ 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 17 9700, intel](dell/xps/15-9700/intel) | `` | | [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) | `` | | [Dell XPS 15 9560, nvidia only](dell/xps/15-9560/nvidia) | `` | | [Dell XPS 15 9560](dell/xps/15-9560) | `` | +| [Dell XPS 17 9700, intel](dell/xps/17-9700/intel) | `` | | [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | | [Dell XPS E7240](dell/e7240) | `` | | [Framework](framework) | `` | @@ -125,7 +125,7 @@ See code for all available configurations. | [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | | [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | | [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | -| [Lenovo ThinkPad P1](thinkpad/p1) | `` | +| [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | | [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | | [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `` | | [Lenovo ThinkPad P52](lenovo/thinkpad/p52) | `` | @@ -167,8 +167,8 @@ See code for all available configurations. | [Lenovo ThinkPad X260](lenovo/thinkpad/x260) | `` | | [Lenovo ThinkPad X270](lenovo/thinkpad/x270) | `` | | [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | -| [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | -| [Lenovo ThinkPad Z13](lenovo/thinkpad/z/z13) | `` | +| [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | +| [Lenovo ThinkPad Z13](lenovo/thinkpad/z/z13) | `` | | [MSI GS60 2QE](msi/gs60) | `` | | [MSI GL62/CX62](msi/gl62) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | From 3040e3422d488f029e855d6429c094f9a1527436 Mon Sep 17 00:00:00 2001 From: Weathercold Date: Sat, 10 Sep 2022 01:08:51 -0400 Subject: [PATCH 0226/1476] CONTRIBUTING.md: rewrite --- CONTRIBUTING.md | 40 +++++++++++++++++++++++++++++----------- README.md | 15 +++++++-------- 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 30f8aecb..d7c8f554 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,14 @@ -# Writing profiles +# Contributing a Device Profile + +## 1. Writing profiles + +Create an appropriate directory and start writing your expression. When setting an option, use `lib.mkDefault` unless: -- The option *must* be set and the user should get an error if they try to override it. -- The setting should merge with the user's settings (typical for list or set options). +- The option *must* be set and the user should get an error if they try to + override it. +- The setting should merge with the user's settings (typical for list or set + options). For example: @@ -15,17 +21,29 @@ For example: } ``` -Try to avoid "opinionated" settings relating to optional features like sound, bluetooth, choice of bootloader etc. +Where possible, use module imports to share code between similar hardware +variants. In most cases, import: +- a cpu module; +- a gpu module; +- either the pc or the laptop module; +- either the HDD or the SSD module. -Where possible, use module imports to share code between similar hardware variants. +Try to avoid "opinionated" settings relating to optional features like sound, +bluetooth, choice of bootloader etc. You can mention these in the readme. -# Performance +Profiles should favor usability and stability, so performance improvements +should either be conservative or be guarded behind additional NixOS module +options. If it makes sense to have a performance-focussed config, it can be +declared in a separate profile. -Profiles should favor usability and stability, so performance improvements should either be conservative or -be guarded behind additional NixOS module options. +## 2. Adding Entry -If it makes sense to have a performance-focussed config, it can be declared in a separate profile. +Link the profile in the table in README.md and in flake.nix. -# Testing +## 3. Testing -Because profiles can only be tested with the appropriate hardware, quality assurance is up to *you*. +Run ./tests/run.py to test building. The test script script will parse all the +profiles from the README.md. + +Because profiles can only be tested with the appropriate hardware, quality +assurance is up to *you*. diff --git a/README.md b/README.md index 4df757fe..d1c55928 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,10 @@ imports = [ New updates to the expressions here will be fetched when you update the channel. -## Using nix flakes support +### Using nix flakes support -There is also experimental flake support. In your `/etc/nixos/flake.nix` add the following: +There is also experimental flake support. In your `/etc/nixos/flake.nix` add +the following: ```nix { @@ -60,6 +61,10 @@ imports = [ Unlike the channel, this will update the git repository on a rebuild. However, you can easily pin to a particular revision if you desire more stability. +## How to contribute a new device profile + +See [CONTRIBUTING.md](./CONTRIBUTING.md). + ## List of Profiles See code for all available configurations. @@ -188,9 +193,3 @@ See code for all available configurations. | [System76 Darter Pro 6](system76/darp6) | `` | | [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | | [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | - -## How to contribute a new device profile - -1. Add your device profile expression in the appropriate directory -2. Link it in the table in README.md and in flake.nix -3. Run ./tests/run.py to test it. The test script script will parse all the profiles from the README.md From 1f9058d65db2ae0a8d32b05b484c431f339b829e Mon Sep 17 00:00:00 2001 From: Guekka <39066502+Guekka@users.noreply.github.com> Date: Mon, 12 Sep 2022 13:50:33 +0200 Subject: [PATCH 0227/1476] add lenovo ideapad 5 15arh05 --- README.md | 1 + flake.nix | 1 + lenovo/ideapad/15arh05/default.nix | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 lenovo/ideapad/15arh05/default.nix diff --git a/README.md b/README.md index 2561c80d..d7d21968 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,7 @@ See code for all available configurations. | [Google Pixelbook](google/pixelbook) | `` | | [HP Elitebook 2560p](hp/elitebook/2560p) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | +| [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | | [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | diff --git a/flake.nix b/flake.nix index defec0ee..d1980f37 100644 --- a/flake.nix +++ b/flake.nix @@ -51,6 +51,7 @@ gpd-micropc = import ./gpd/micropc; hp-elitebook-2560p = import ./hp/elitebook/2560p; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; + lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-legion-15ach6 = import ./lenovo/legion/15ach6; lenovo-legion-15arh05h = import ./lenovo/legion/15arh05h; diff --git a/lenovo/ideapad/15arh05/default.nix b/lenovo/ideapad/15arh05/default.nix new file mode 100644 index 00000000..24abae67 --- /dev/null +++ b/lenovo/ideapad/15arh05/default.nix @@ -0,0 +1,20 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/gpu/nvidia.nix + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + # Specify bus id of Nvidia and Intel graphics. + hardware.nvidia.prime = { + amdgpuBusId = "PCI:5:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + + # Cooling management + services.thermald.enable = lib.mkDefault true; + +} From 3918f03d0debe32ce0062baba67751c3fe88bae9 Mon Sep 17 00:00:00 2001 From: Robert Ricci Date: Mon, 12 Sep 2022 11:53:42 -0600 Subject: [PATCH 0228/1476] Initial support for Framework 12th Gen Intel Core This commit simply replicates the base Framework, future commits will specialize for this version --- README.md | 1 + framework/12th-gen-intel/README.md | 17 ++++++++++ framework/12th-gen-intel/default.nix | 47 ++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 framework/12th-gen-intel/README.md create mode 100644 framework/12th-gen-intel/default.nix diff --git a/README.md b/README.md index 2561c80d..f86b9c45 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,7 @@ See code for all available configurations. | [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | | [Dell XPS E7240](dell/e7240) | `` | | [Framework](framework) | `` | +| [Framework 12th Gen Intel Core](framework/12th-gen-intel) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [GPD MicroPC](gpd/micropc) | `` | | [Google Pixelbook](google/pixelbook) | `` | diff --git a/framework/12th-gen-intel/README.md b/framework/12th-gen-intel/README.md new file mode 100644 index 00000000..e8d10e04 --- /dev/null +++ b/framework/12th-gen-intel/README.md @@ -0,0 +1,17 @@ +# [Framework Laptop](https://frame.work/) + +## Updating Firmware + +First put enable `fwupd` + +```nix +services.fwupd.enable = true; +``` + +Then run + +```sh + $ sudo fwupdmgr update +``` + +[Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.TGL.BIOS.firmware) diff --git a/framework/12th-gen-intel/default.nix b/framework/12th-gen-intel/default.nix new file mode 100644 index 00000000..a67a70d7 --- /dev/null +++ b/framework/12th-gen-intel/default.nix @@ -0,0 +1,47 @@ +{ lib, pkgs, ... }: { + imports = [ + ../../common/cpu/intel + ../../common/pc/laptop + ../../common/pc/laptop/ssd + ]; + + boot.kernelParams = [ + # For Power consumption + # https://kvark.github.io/linux/framework/2021/10/17/framework-nixos.html + "mem_sleep_default=deep" + # For Power consumption + # https://community.frame.work/t/linux-battery-life-tuning/6665/156 + "nvme.noacpi=1" + ]; + + # Requires at least 5.16 for working wi-fi and bluetooth. + # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") (lib.mkDefault pkgs.linuxPackages_latest); + + # Fix TRRS headphones missing a mic + # https://community.frame.work/t/headset-microphone-on-linux/12387/3 + boot.extraModprobeConfig = '' + options snd-hda-intel model=dell-headset-multi + ''; + + # For fingerprint support + services.fprintd.enable = lib.mkDefault true; + + # Fix headphone noise when on powersave + # https://community.frame.work/t/headphone-jack-intermittent-noise/5246/55 + services.udev.extraRules = '' + SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0xa0e0", ATTR{power/control}="on" + ''; + + # Mis-detected by nixos-generate-config + # https://github.com/NixOS/nixpkgs/issues/171093 + # https://wiki.archlinux.org/title/Framework_Laptop#Changing_the_brightness_of_the_monitor_does_not_work + hardware.acpilight.enable = lib.mkDefault true; + + # HiDPI + # Leaving here for documentation + # hardware.video.hidpi.enable = lib.mkDefault true; + + # Fix font sizes in X + # services.xserver.dpi = 200; +} From f0b864738dad352be659abd5e486dbb0b64cb3e9 Mon Sep 17 00:00:00 2001 From: Robert Ricci Date: Mon, 12 Sep 2022 19:22:04 -0600 Subject: [PATCH 0229/1476] Set options specific to the 12th gen Framework It requires a newer kernel than the 11th gen, and has some 'media keys' that require different handling --- framework/12th-gen-intel/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/framework/12th-gen-intel/default.nix b/framework/12th-gen-intel/default.nix index a67a70d7..63adb484 100644 --- a/framework/12th-gen-intel/default.nix +++ b/framework/12th-gen-intel/default.nix @@ -14,9 +14,13 @@ "nvme.noacpi=1" ]; - # Requires at least 5.16 for working wi-fi and bluetooth. - # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") (lib.mkDefault pkgs.linuxPackages_latest); + # This enables the brightness keys to work + # https://community.frame.work/t/12th-gen-not-sending-xf86monbrightnessup-down/20605/11 + boot.blacklistedKernelModules = [ "hid-sensor-hub" ]; + + # Alder Lake CPUs benefit from kernel 5.18 for ThreadDirector + # https://www.tomshardware.com/news/intel-thread-director-coming-to-linux-5-18 + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.18") (lib.mkDefault pkgs.linuxPackages_latest); # Fix TRRS headphones missing a mic # https://community.frame.work/t/headset-microphone-on-linux/12387/3 From 3aaf1fe6ee3f360633c3c24c0563d440a7376412 Mon Sep 17 00:00:00 2001 From: Robert Ricci Date: Mon, 12 Sep 2022 22:49:26 -0600 Subject: [PATCH 0230/1476] Add framework-12th-gen-intel to flake.nix --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index defec0ee..3d7f5cf5 100644 --- a/flake.nix +++ b/flake.nix @@ -46,6 +46,7 @@ dell-xps-17-9700-nvidia = import ./dell/xps/17-9700/nvidia; dell-xps-17-9710-intel = import ./dell/xps/17-9710/intel; framework = import ./framework; + framework-12th-gen-intel = import ./framework/12th-gen-intel; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; google-pixelbook = import ./google/pixelbook; gpd-micropc = import ./gpd/micropc; From 305bbc24424d91e202dfc7bb35e8c29607c4de56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Tue, 13 Sep 2022 12:16:46 +0100 Subject: [PATCH 0231/1476] tinkpad t14s amd: enable deep sleep --- lenovo/thinkpad/t14s/amd/gen1/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lenovo/thinkpad/t14s/amd/gen1/default.nix b/lenovo/thinkpad/t14s/amd/gen1/default.nix index 06627212..13dc790d 100644 --- a/lenovo/thinkpad/t14s/amd/gen1/default.nix +++ b/lenovo/thinkpad/t14s/amd/gen1/default.nix @@ -10,4 +10,7 @@ # For mainline support of rtw89 wireless networking boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; + + # Enable energy savings during sleep + boot.kernelParams = ["mem_sleep_default=deep"]; } From f6f318b52a189f9e510f5bc85fe52656260c6e39 Mon Sep 17 00:00:00 2001 From: CalebJohn Date: Tue, 13 Sep 2022 16:27:39 -0700 Subject: [PATCH 0232/1476] Add thinkpad t14 amd gen3 --- README.md | 1 + lenovo/thinkpad/t14/amd/gen3/default.nix | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 lenovo/thinkpad/t14/amd/gen3/default.nix diff --git a/README.md b/README.md index 2561c80d..af3914fe 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,7 @@ See code for all available configurations. | [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | | [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | | [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | +| [Lenovo ThinkPad T14 AMD Gen 3](lenovo/thinkpad/t14/amd/gen3) | `` | | [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | | [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | | [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | diff --git a/lenovo/thinkpad/t14/amd/gen3/default.nix b/lenovo/thinkpad/t14/amd/gen3/default.nix new file mode 100644 index 00000000..56578984 --- /dev/null +++ b/lenovo/thinkpad/t14/amd/gen3/default.nix @@ -0,0 +1,11 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ]; + + # For the Qualcomm NFA-725A (Device 1103) wireless network controller + # See https://bugzilla.redhat.com/show_bug.cgi?id=2047878 + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; +} From 667b40e827b3dd58d54eb9ce560fa306809b1f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 14 Sep 2022 07:19:16 +0200 Subject: [PATCH 0233/1476] tests/run: enable experimental nix-command --- tests/run.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/run.py b/tests/run.py index 2f514d12..77dae8ee 100755 --- a/tests/run.py +++ b/tests/run.py @@ -38,6 +38,7 @@ def build_profile( cmd = [ "nix", "build", + "--extra-experimental-features", "nix-command", "-f", "build-profile.nix", "-I", From e55c862c77791df13fea1e2f237e132e6c425d8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 14 Sep 2022 07:24:15 +0200 Subject: [PATCH 0234/1476] contributing: document how to run a single test --- CONTRIBUTING.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d7c8f554..ff02a6cf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,5 +45,11 @@ Link the profile in the table in README.md and in flake.nix. Run ./tests/run.py to test building. The test script script will parse all the profiles from the README.md. +You can also just specify a single profile like this: + +``` + ./tests/run.py '' +``` + Because profiles can only be tested with the appropriate hardware, quality assurance is up to *you*. From bfbc3a181d28f12e1e8de733b37f10a4686e2b9e Mon Sep 17 00:00:00 2001 From: Celso Miranda <769237+celsomiranda@users.noreply.github.com> Date: Wed, 14 Sep 2022 06:25:11 +0100 Subject: [PATCH 0235/1476] Add support for Omen en00015p laptop (#457) --- README.md | 1 + flake.nix | 1 + omen/en00015p/default.nix | 15 +++++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 omen/en00015p/default.nix diff --git a/README.md b/README.md index 0600c98e..8c56dacc 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,7 @@ See code for all available configurations. | [MSI GL62/CX62](msi/gl62) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | | [Microsoft Surface Range](microsoft/surface) | `` | +| [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | | [PC Engines APU](pcengines/apu) | `` | | [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | diff --git a/flake.nix b/flake.nix index b34e847c..e13487f5 100644 --- a/flake.nix +++ b/flake.nix @@ -117,6 +117,7 @@ microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; msi-gs60 = import ./msi/gs60; msi-gl62 = import ./msi/gl62; + omen-en00015p = import ./omen/en00015p; onenetbook-4 = import ./onenetbook/4; pcengines-apu = import ./pcengines/apu; pine64-pinebook-pro = import ./pine64/pinebook-pro; diff --git a/omen/en00015p/default.nix b/omen/en00015p/default.nix new file mode 100644 index 00000000..8a97003b --- /dev/null +++ b/omen/en00015p/default.nix @@ -0,0 +1,15 @@ +{ ... }: + +{ + imports = [ + ../../common/cpu/amd + ../../common/gpu/nvidia.nix + ../../common/pc/laptop + ../../common/pc/ssd + ]; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:6:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} From 1cf38622653249a4b5f843107f6b4b3d29e41463 Mon Sep 17 00:00:00 2001 From: Markus Kohlhase Date: Tue, 13 Sep 2022 12:20:25 +0200 Subject: [PATCH 0236/1476] Add lenovo/thinkpad/p16s/amd/gen1 --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/p16s/amd/gen1/default.nix | 6 ++++++ 3 files changed, 8 insertions(+) create mode 100644 lenovo/thinkpad/p16s/amd/gen1/default.nix diff --git a/README.md b/README.md index a6ee0863..47cc48ce 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,7 @@ See code for all available configurations. | [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | | [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | | [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | +| [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | | [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | | [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | | [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `` | diff --git a/flake.nix b/flake.nix index bbe0c800..40638935 100644 --- a/flake.nix +++ b/flake.nix @@ -70,6 +70,7 @@ lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1; lenovo-thinkpad-p1-gen3 = import ./lenovo/thinkpad/p1/3th-gen; lenovo-thinkpad-p14s-amd-gen2 = import ./lenovo/thinkpad/p14s/amd/gen2; + lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1; lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50; lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51; lenovo-thinkpad-p52 = import ./lenovo/thinkpad/p52; diff --git a/lenovo/thinkpad/p16s/amd/gen1/default.nix b/lenovo/thinkpad/p16s/amd/gen1/default.nix new file mode 100644 index 00000000..5b7bfe4e --- /dev/null +++ b/lenovo/thinkpad/p16s/amd/gen1/default.nix @@ -0,0 +1,6 @@ +{ config, lib, pkgs, ... }: + +{ + # For mainline support of rtw89 wireless networking + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; +} From 7aac946a06f2f9c8846260fa036a64d2d1f26eb0 Mon Sep 17 00:00:00 2001 From: CalebJohn Date: Wed, 14 Sep 2022 11:47:23 -0700 Subject: [PATCH 0237/1476] Add thinkpad t14 amd gen3 to flake --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index defec0ee..1924888e 100644 --- a/flake.nix +++ b/flake.nix @@ -74,6 +74,7 @@ lenovo-thinkpad-t14 = import ./lenovo/thinkpad/t14; lenovo-thinkpad-t14-amd-gen1 = import ./lenovo/thinkpad/t14/amd/gen1; lenovo-thinkpad-t14-amd-gen2 = import ./lenovo/thinkpad/t14/amd/gen2; + lenovo-thinkpad-t14-amd-gen3 = import ./lenovo/thinkpad/t14/amd/gen3; lenovo-thinkpad-t14s = import ./lenovo/thinkpad/t14s; lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1; lenovo-thinkpad-t410 = import ./lenovo/thinkpad/t410; From 3774a528de7faf9c452e3c02fed4191593d2c585 Mon Sep 17 00:00:00 2001 From: Yureka Date: Wed, 21 Sep 2022 17:18:27 +0200 Subject: [PATCH 0238/1476] kobol/helios4: init --- flake.nix | 1 + kobol/helios4/default.nix | 17 +++++++ kobol/helios4/modules/90-helios4-hwmon.rules | 18 ++++++++ kobol/helios4/modules/fancontrol.nix | 44 ++++++++++++++++++ kobol/helios4/overlay.nix | 48 ++++++++++++++++++++ 5 files changed, 128 insertions(+) create mode 100644 kobol/helios4/default.nix create mode 100644 kobol/helios4/modules/90-helios4-hwmon.rules create mode 100644 kobol/helios4/modules/fancontrol.nix create mode 100644 kobol/helios4/overlay.nix diff --git a/flake.nix b/flake.nix index 62731b25..8c5acd94 100644 --- a/flake.nix +++ b/flake.nix @@ -84,6 +84,7 @@ pcengines-apu = import ./pcengines/apu; raspberry-pi-2 = import ./raspberry-pi/2; raspberry-pi-4 = import ./raspberry-pi/4; + kobol-helios4 = import ./kobol/helios4; samsung-np900x3c = import ./samsung/np900x3c; system76 = import ./system76; system76-darp6 = import ./system76/darp6; diff --git a/kobol/helios4/default.nix b/kobol/helios4/default.nix new file mode 100644 index 00000000..b40c6833 --- /dev/null +++ b/kobol/helios4/default.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: + +{ + imports = [ + ./modules/fancontrol.nix + ]; + + nixpkgs.overlays = [ + (import ./overlay.nix) + ]; + + nixpkgs.hostPlatform = "armv7l-linux"; + + boot.initrd.availableKernelModules = [ "ahci_mvebu" ]; + + boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_5_15_helios4; +} diff --git a/kobol/helios4/modules/90-helios4-hwmon.rules b/kobol/helios4/modules/90-helios4-hwmon.rules new file mode 100644 index 00000000..4cfa649b --- /dev/null +++ b/kobol/helios4/modules/90-helios4-hwmon.rules @@ -0,0 +1,18 @@ +# Helios4 persistent hwmon +ACTION=="remove", GOTO="helios4_hwmon_end" +# +KERNELS=="j10-pwm", SUBSYSTEMS=="platform", ENV{_HELIOS4_FAN_}="j10", ENV{_IS_HELIOS4_FAN_}="1", ENV{IS_HELIOS4_HWMON}="1" +KERNELS=="j17-pwm", SUBSYSTEMS=="platform", ENV{_HELIOS4_FAN_}="j17", ENV{_IS_HELIOS4_FAN_}="1", ENV{IS_HELIOS4_HWMON}="1" +KERNELS=="0-004c", SUBSYSTEMS=="i2c", DRIVERS=="lm75", ENV{IS_HELIOS4_HWMON}="1" +SUBSYSTEM!="hwmon", GOTO="helios4_hwmon_end" +ENV{HWMON_PATH}="/sys%p" +# +ATTR{name}=="f1072004mdiomii00", ENV{IS_HELIOS4_HWMON}="1", ENV{HELIOS4_SYMLINK}="/dev/thermal-eth" +ATTR{name}=="armada_thermal", ENV{IS_HELIOS4_HWMON}="1", ENV{HELIOS4_SYMLINK}="/dev/thermal-cpu" +ATTR{name}=="f10e4078.thermal", ENV{IS_HELIOS4_HWMON}="1", ENV{HELIOS4_SYMLINK}="/dev/thermal-cpu" +# +ENV{IS_HELIOS4_HWMON}=="1", ATTR{name}=="lm75", ENV{HELIOS4_SYMLINK}="/dev/thermal-board" +ENV{_IS_HELIOS4_FAN_}=="1", ENV{HELIOS4_SYMLINK}="/dev/fan-$env{_HELIOS4_FAN_}" +# +ENV{IS_HELIOS4_HWMON}=="1", RUN+="/bin/ln -sf $env{HWMON_PATH} $env{HELIOS4_SYMLINK}" +LABEL="helios4_hwmon_end" diff --git a/kobol/helios4/modules/fancontrol.nix b/kobol/helios4/modules/fancontrol.nix new file mode 100644 index 00000000..27722765 --- /dev/null +++ b/kobol/helios4/modules/fancontrol.nix @@ -0,0 +1,44 @@ +{ pkgs, ... }: + +{ + hardware.fancontrol.enable = true; + hardware.fancontrol.config = '' + # Helios4 PWM Fan Control Configuration + # Temp source : /dev/thermal-cpu + INTERVAL=10 + FCTEMPS=/dev/fan-j10/pwm1=/dev/thermal-cpu/temp1_input /dev/fan-j17/pwm1=/dev/thermal-cpu/temp1_input + MINTEMP=/dev/fan-j10/pwm1=40 /dev/fan-j17/pwm1=40 + MAXTEMP=/dev/fan-j10/pwm1=80 /dev/fan-j17/pwm1=80 + MINSTART=/dev/fan-j10/pwm1=20 /dev/fan-j17/pwm1=20 + MINSTOP=/dev/fan-j10/pwm1=29 /dev/fan-j17/pwm1=29 + MINPWM=0 + ''; + + boot.kernelModules = [ "lm75" ]; + + services.udev.packages = [ + # Fan control + (pkgs.callPackage ( + { stdenv, lib, coreutils }: + stdenv.mkDerivation { + name = "helios4-udev-fancontrol"; + + dontUnpack = true; + dontBuild = true; + + installPhase = '' + mkdir -p "$out/etc/udev/rules.d/"; + install -Dm644 "${./90-helios4-hwmon.rules}" \ + "$out/etc/udev/rules.d/90-helios4-hwmon.rules" + substituteInPlace "$out/etc/udev/rules.d/90-helios4-hwmon.rules" \ + --replace '/bin/ln' '${lib.getBin coreutils}/bin/ln' + ''; + + meta = with lib; { + description = "Udev rules for fancontrol for the Helios4"; + platforms = platforms.linux; + }; + } + ) {}) + ]; +} diff --git a/kobol/helios4/overlay.nix b/kobol/helios4/overlay.nix new file mode 100644 index 00000000..cef49d55 --- /dev/null +++ b/kobol/helios4/overlay.nix @@ -0,0 +1,48 @@ +final: prev: { + linux_5_15_helios4 = final.linux_5_15.override { + kernelPatches = [ + # A patch to get both PWM fans working + # the patch has been successfully applied to 5.15 and 5.19 + { + patch = final.fetchpatch { + url = "https://raw.githubusercontent.com/armbian/build/03dbd9d3a733f097e23595e76ac60771c655ebf1/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch"; + sha256 = "sha256-0h7v3Nua1LuHf4h53WdYEBrbUA9dOGdF06TDBlDplOQ="; + }; + } + # support for Wake-On-Lan + { + patch = final.fetchpatch { + url = "https://raw.githubusercontent.com/armbian/build/03dbd9d3a733f097e23595e76ac60771c655ebf1/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-add_wake_on_gpio_support.patch"; + sha256 = "sha256-OrvnVCU55P0U78jdoxGRJvl29i+Rvq8AdEGSCCpxa2I="; + }; + } + { + patch = final.fetchpatch { + url = "https://raw.githubusercontent.com/armbian/build/03dbd9d3a733f097e23595e76ac60771c655ebf1/patch/kernel/archive/mvebu-5.15/94-helios4-dts-add-wake-on-lan-support.patch"; + sha256 = "sha256-ai4161bTC22023eaVVWsvbk6fQKjkv0P4DQ4DA1Zgow="; + }; + } + + ]; + defconfig = "mvebu_v7_defconfig"; + # Make the kernel build a bit faster by disabling GPU modules, which we don't need anyways + structuredExtraConfig = with final.lib.kernel; { + DRM = no; + }; + }; + + ubootHelios4 = final.buildUBoot rec { + defconfig = "helios4_defconfig"; + filesToInstall = [ "u-boot-spl.kwb" ]; + # 2021.07 and later are broken, similar to this bug report: + # https://www.mail-archive.com/u-boot@lists.denx.de/msg451013.html# + version = "2021.04"; + src = final.fetchFromGitHub { + owner = "u-boot"; + repo = "u-boot"; + rev = "v${version}"; + sha256 = "sha256-QxrTPcx0n0NWUJ990EuIWyOBtknW/fHDRcrYP0yQzTo="; + }; + patches = []; + }; +} From cc5d50203078bb350737b0b12c90e216c514b71e Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Sun, 25 Sep 2022 13:56:03 +0200 Subject: [PATCH 0239/1476] onenetbook/4: stop using runCommandNoCC --- onenetbook/4/goodix-stylus-mastykin/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onenetbook/4/goodix-stylus-mastykin/default.nix b/onenetbook/4/goodix-stylus-mastykin/default.nix index d80749c8..2c12ca67 100644 --- a/onenetbook/4/goodix-stylus-mastykin/default.nix +++ b/onenetbook/4/goodix-stylus-mastykin/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, kernel, fetchpatch, runCommandNoCC, patch }: +{ stdenv, lib, kernel, fetchpatch, runCommand, patch }: let patch1_original = fetchpatch { @@ -6,7 +6,7 @@ let name = "goodix-stylus-mastykin-1-pen-support.patch"; sha256 = "sha256-1oc8OvfhScYvtsMeV9A4hU+09i59tEJ6HZS6jspsJR8="; }; - patch1_updated_5_12_12 = runCommandNoCC + patch1_updated_5_12_12 = runCommand "goodix-stylus-mastykin-1-pen-support-5.12.12.patch" {} '' cat ${patch1_original} > $out From 2aa0939a6558b0d740c2bd0eff7d8cb8e052bd36 Mon Sep 17 00:00:00 2001 From: ThreshMain Date: Wed, 28 Sep 2022 01:57:22 +0200 Subject: [PATCH 0240/1476] Fixed utillinux package renaming --- msi/gs60/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msi/gs60/default.nix b/msi/gs60/default.nix index bd1db27b..4bc34ef1 100644 --- a/msi/gs60/default.nix +++ b/msi/gs60/default.nix @@ -20,10 +20,10 @@ # Laptop can't correctly suspend if wlan is active powerManagement = { powerDownCommands = '' - ${pkgs.utillinux}/bin/rfkill block wlan + ${pkgs.util-linux}/bin/rfkill block wlan ''; resumeCommands = '' - ${pkgs.utillinux}/bin/rfkill unblock wlan + ${pkgs.util-linux}/bin/rfkill unblock wlan ''; }; } From 9b98a70d46b109bcc82bbafdd0c918330d791fed Mon Sep 17 00:00:00 2001 From: "Winston R. Milling" Date: Wed, 28 Sep 2022 10:44:52 -0500 Subject: [PATCH 0241/1476] Update disused function to runCommand runCommandNoCC is deprecated. --- pine64/pinebook-pro/firmware/ap6256-firmware/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix b/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix index bb3708b9..caddfb26 100644 --- a/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix +++ b/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix @@ -1,6 +1,6 @@ { lib , fetchFromGitHub -, runCommandNoCC +, runCommand }: let @@ -11,7 +11,7 @@ let sha256 = "0ac7z3m5mnmk1qhf9pq9s3y6ky8jmd3ggn8m29797z1ng40q3cka"; }; in -runCommandNoCC "pinebookpro-ap6256-firmware" +runCommand "pinebookpro-ap6256-firmware" { meta = with lib; { license = licenses.unfreeRedistributable; From 5c0995a0126c10838ec40406c40eb3d7558cb2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 29 Sep 2022 13:32:55 +0200 Subject: [PATCH 0242/1476] thinkpad-z: fix eval --- lenovo/thinkpad/z/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/thinkpad/z/default.nix b/lenovo/thinkpad/z/default.nix index c3fdda25..e1cf6b20 100644 --- a/lenovo/thinkpad/z/default.nix +++ b/lenovo/thinkpad/z/default.nix @@ -9,7 +9,7 @@ ../../../common/pc/laptop/ssd ]; # kernel versions prior to 5.18 won't boot - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.18") (lib.mkDefault pkgs.linuxPackages_5_18); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.18") (lib.mkDefault pkgs.linuxPackages_latest); hardware.enableRedistributableFirmware = lib.mkDefault true; hardware.trackpoint.device = lib.mkDefault "TPPS/2 Elan TrackPoint"; From 3a5dd128e410097d5b2538382b636f52c746798a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 29 Sep 2022 23:42:38 +0200 Subject: [PATCH 0243/1476] add bors configuration --- bors.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 bors.toml diff --git a/bors.toml b/bors.toml new file mode 100644 index 00000000..b750afae --- /dev/null +++ b/bors.toml @@ -0,0 +1,2 @@ +cut_body_after = "" # don't include text from the PR body in the merge commit message +status = [ "tests" ] From a2dab346f9e4da7cf2298bef1c973152f76a4f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 1 Oct 2022 14:51:04 +0200 Subject: [PATCH 0244/1476] CONTRIBUTING.md: mention bors --- CONTRIBUTING.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ff02a6cf..5745bf0b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,3 +53,11 @@ You can also just specify a single profile like this: Because profiles can only be tested with the appropriate hardware, quality assurance is up to *you*. + +# For reviewers: + +This repository has bors enabled for easier merging after a successfull build: + +* `bors try` - check if the PR builds. +* `bors merge` - same as `bors try` but will also merge the PR if it builds successfully. +* https://bors.tech/documentation/ From 1788d8f74ef890442f883c95cd37efeb2d61e375 Mon Sep 17 00:00:00 2001 From: K900 Date: Sun, 2 Oct 2022 12:50:42 +0300 Subject: [PATCH 0245/1476] lenovo/thinkpad/x1-extreme: remove acpi_call It's deprecated and doesn't work correctly anyway. Recent firmwares can power the GPU off if it drops off the bus, which can be forced with udev rules. --- lenovo/thinkpad/x1-extreme/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/lenovo/thinkpad/x1-extreme/default.nix b/lenovo/thinkpad/x1-extreme/default.nix index 09a0ec17..2e4c10e0 100644 --- a/lenovo/thinkpad/x1-extreme/default.nix +++ b/lenovo/thinkpad/x1-extreme/default.nix @@ -2,7 +2,6 @@ imports = [ ../. ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ]; } From 32ee2e607094cc640c9ee6161aa25d2f20b0275c Mon Sep 17 00:00:00 2001 From: con-f-use Date: Wed, 5 Oct 2022 11:40:14 +0200 Subject: [PATCH 0246/1476] framework-12th-gen-intel: workaround iGPU hangs --- framework/12th-gen-intel/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/12th-gen-intel/default.nix b/framework/12th-gen-intel/default.nix index 63adb484..e855a701 100644 --- a/framework/12th-gen-intel/default.nix +++ b/framework/12th-gen-intel/default.nix @@ -12,6 +12,9 @@ # For Power consumption # https://community.frame.work/t/linux-battery-life-tuning/6665/156 "nvme.noacpi=1" + # Workaround iGPU hangs + # https://discourse.nixos.org/t/intel-12th-gen-igpu-freezes/21768/4 + "i915.enable_psr=1" ]; # This enables the brightness keys to work From de2ea2beee098e96baafd7cc3250e1e768294994 Mon Sep 17 00:00:00 2001 From: nicoo Date: Wed, 5 Oct 2022 15:57:50 +0200 Subject: [PATCH 0247/1476] Add GPD Pocket 3 module to nixos-hardware --- gpd/pocket-3/default.nix | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 gpd/pocket-3/default.nix diff --git a/gpd/pocket-3/default.nix b/gpd/pocket-3/default.nix new file mode 100644 index 00000000..d2f4bf28 --- /dev/null +++ b/gpd/pocket-3/default.nix @@ -0,0 +1,43 @@ +{ lib, pkgs, ... }: +let inherit (lib) mkDefault; +in +{ + imports = [ + ../../common/pc/laptop + ../../common/pc/laptop/ssd + ]; + + # Necessary kernel modules + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "thunderbolt" ]; + + # GPU is an Intel Iris Xe, on a “TigerLake” mobile CPU + boot.initrd.kernelModules = [ "i915" ]; # Early loading so the passphrase prompt appears on external displays + services.xserver.videoDrivers = [ "intel" ]; + hardware.opengl.extraPackages = with pkgs; [ intel-media-driver vaapiIntel ]; + + boot.kernelParams = [ + # S3 suspend is broken as of Sept. 2022 (screen does not come back properly), use S2 + "mem_sleep_default=s2idle" + + # The GPD Pocket3 uses a tablet OLED display, that is mounted rotated 90° counter-clockwise + "fbcon=rotate:1" "video=DSI-1:panel_orientation=right_side_up" + ]; + + fonts.fontconfig = { + subpixel.rgba = "vbgr"; # Pixel order for rotated screen + + # The OLED display has √(1920² + 1200²) px / 8in ≃ 283 dpi + # Per the documentation, antialiasing, hinting, etc. have no visible effect at such high pixel densities anyhow. + hinting.enable = mkDefault false; + antialias = false; #TODO(nicoo): Fix nixpkgs' HiDPI module + }; + + # More HiDPI settings + hardware.video.hidpi.enable = true; + services.xserver.dpi = 280; + + # Necessary for audio support on the 1195G7 model + boot.extraModprobeConfig = '' + options snd-intel-dspcfg dsp_driver=1 + ''; +} From 1c535dc0497f7f4f92a562f8d033abf944bfc3e2 Mon Sep 17 00:00:00 2001 From: nicoo Date: Wed, 5 Oct 2022 16:41:29 +0200 Subject: [PATCH 0248/1476] gpd/pocket-3: Only workaround hidpi module bug on NixOS < 22.11 Assumes NixOS/nixpkgs#194594 gets merged. --- gpd/pocket-3/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gpd/pocket-3/default.nix b/gpd/pocket-3/default.nix index d2f4bf28..59de138d 100644 --- a/gpd/pocket-3/default.nix +++ b/gpd/pocket-3/default.nix @@ -1,5 +1,5 @@ { lib, pkgs, ... }: -let inherit (lib) mkDefault; +let inherit (lib) mkDefault mkIf; in { imports = [ @@ -28,8 +28,9 @@ in # The OLED display has √(1920² + 1200²) px / 8in ≃ 283 dpi # Per the documentation, antialiasing, hinting, etc. have no visible effect at such high pixel densities anyhow. + # Set manually, as the hiDPI module had incorrect settings prior to NixOS 22.11; see nixpkgs#194594. hinting.enable = mkDefault false; - antialias = false; #TODO(nicoo): Fix nixpkgs' HiDPI module + antialias = mkIf (lib.versionOlder (lib.versions.majorMinor lib.version) "22.11") false; }; # More HiDPI settings From d5de1c72cfcee3dfaeacc5878f7a77ccc9270897 Mon Sep 17 00:00:00 2001 From: nicoo Date: Wed, 5 Oct 2022 19:23:38 +0200 Subject: [PATCH 0249/1476] Update README & flake.nix --- README.md | 1 + flake.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 3978d37e..3dc37687 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,7 @@ See code for all available configurations. | [Framework](framework) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [GPD MicroPC](gpd/micropc) | `` | +| [GPD Pocket 3](gpd/pocket-3) | `` | | [Google Pixelbook](google/pixelbook) | `` | | [HP Elitebook 2560p](hp/elitebook/2560p) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | diff --git a/flake.nix b/flake.nix index 990f44f9..f8d6559e 100644 --- a/flake.nix +++ b/flake.nix @@ -44,6 +44,7 @@ friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; google-pixelbook = import ./google/pixelbook; gpd-micropc = import ./gpd/micropc; + gpd-pocket-3 = import ./gpd/pocket-3; hp-elitebook-2560p = import ./hp/elitebook/2560p; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; From 18c0cbb6b49d7b4402c9eb9fd0690e4bd3d31b63 Mon Sep 17 00:00:00 2001 From: Michael Eden Date: Fri, 7 Oct 2022 10:59:54 -0400 Subject: [PATCH 0250/1476] raspberrypi/4: allow pi libs to detect pi 4 --- raspberry-pi/4/cpu-revision.nix | 25 +++++++++++++++++++++++++ raspberry-pi/4/default.nix | 1 + 2 files changed, 26 insertions(+) create mode 100644 raspberry-pi/4/cpu-revision.nix diff --git a/raspberry-pi/4/cpu-revision.nix b/raspberry-pi/4/cpu-revision.nix new file mode 100644 index 00000000..8ac2c551 --- /dev/null +++ b/raspberry-pi/4/cpu-revision.nix @@ -0,0 +1,25 @@ +{ ... }: +{ + hardware.deviceTree.overlays = [ + { + name = "rpi4-cpu-revision"; + dtsText = '' + /dts-v1/; + /plugin/; + + / { + compatible = "raspberrypi,4-model-b"; + + fragment@0 { + target-path = "/"; + __overlay__ { + system { + linux,revision = <0x00d03114>; + }; + }; + }; + }; + ''; + } + ]; +} diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index d85063a8..13cf4175 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -3,6 +3,7 @@ { imports = [ ./audio.nix + ./cpu-revision.nix ./dwc2.nix ./i2c.nix ./modesetting.nix From 2c14c0f8611278a7ca47a00e7b30e9e69a80bae0 Mon Sep 17 00:00:00 2001 From: Madoura Date: Sat, 8 Oct 2022 04:10:18 -0500 Subject: [PATCH 0251/1476] flake: add starfive-visionfive-v1 --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 6bfd46b8..3d0757d4 100644 --- a/flake.nix +++ b/flake.nix @@ -132,6 +132,7 @@ raspberry-pi-4 = import ./raspberry-pi/4; kobol-helios4 = import ./kobol/helios4; samsung-np900x3c = import ./samsung/np900x3c; + starfive-visionfive-v1 = import ./starfive/visionfive/v1; supermicro = import ./supermicro; supermicro-a1sri-2758f = import ./supermicro/a1sri-2758f; supermicro-m11sdv-8c-ln4f = import ./supermicro/m11sdv-8c-ln4f; From c156c31e1dd86cfd7e5c5a95c4c0ce005d35881f Mon Sep 17 00:00:00 2001 From: Madoura Date: Sat, 8 Oct 2022 10:26:44 -0500 Subject: [PATCH 0252/1476] readme: add starfive visionfive v1 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 80510852..367a6131 100644 --- a/README.md +++ b/README.md @@ -193,6 +193,7 @@ See code for all available configurations. | [Raspberry Pi 2](raspberry-pi/2) | `` | | [Raspberry Pi 4](raspberry-pi/4) | `` | | [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | +| [StarFive VisionFive v1](starfive/visionfive/v1) | `` | | [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | | [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | | [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | From 68e08aa56b38fb6758ffc859b065c88634e13046 Mon Sep 17 00:00:00 2001 From: Madoura Date: Sat, 8 Oct 2022 10:27:03 -0500 Subject: [PATCH 0253/1476] starfive/visionfive/v1: init --- starfive/visionfive/v1/README.md | 25 +++++++++++++ starfive/visionfive/v1/default.nix | 31 ++++++++++++++++ starfive/visionfive/v1/firmware.nix | 35 ++++++++++++++++++ starfive/visionfive/v1/linux.nix | 36 +++++++++++++++++++ starfive/visionfive/v1/sd-image-installer.nix | 12 +++++++ starfive/visionfive/v1/sd-image.nix | 29 +++++++++++++++ starfive/visionfive/v1/uboot.nix | 17 +++++++++ 7 files changed, 185 insertions(+) create mode 100644 starfive/visionfive/v1/README.md create mode 100644 starfive/visionfive/v1/default.nix create mode 100644 starfive/visionfive/v1/firmware.nix create mode 100644 starfive/visionfive/v1/linux.nix create mode 100644 starfive/visionfive/v1/sd-image-installer.nix create mode 100644 starfive/visionfive/v1/sd-image.nix create mode 100644 starfive/visionfive/v1/uboot.nix diff --git a/starfive/visionfive/v1/README.md b/starfive/visionfive/v1/README.md new file mode 100644 index 00000000..704a1847 --- /dev/null +++ b/starfive/visionfive/v1/README.md @@ -0,0 +1,25 @@ +### Build the SD image +- ``nix-build "" -A config.system.build.sdImage -I nixos-config=iso.nix`` + +- ``iso.nix`` + ```nix + { config, ... }: + + { + imports = [ ]; + # or imports = [ "${nixos-hardware-directory}/starfive/visionfive/v1/sd-image-installer.nix" ]; + + nixpkgs.crossSystem = { + config = "riscv64-unknown-linux-gnu"; + system = "riscv64-linux"; + }; + } + ``` + +### Relevant documentation +- Flashing +- - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/hardware_connection.html +- - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/using_xmodem1.html +- Recovery +- - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/hardware_setup.html +- - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/for_maclinux4.html diff --git a/starfive/visionfive/v1/default.nix b/starfive/visionfive/v1/default.nix new file mode 100644 index 00000000..4a3c3dd0 --- /dev/null +++ b/starfive/visionfive/v1/default.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, ...}: + +{ + hardware.deviceTree.name = lib.mkDefault "starfive/jh7100-starfive-visionfive-v1.dtb"; + systemd.services."serial-getty@hvc0".enable = lib.mkDefault false; + environment.systemPackages = with pkgs; lib.mkDefault [ mtdutils ]; + + boot = { + # Force no ZFS (from nixos/modules/profiles/base.nix) until updated to kernel 6.0 + supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; + consoleLogLevel = lib.mkDefault 7; + kernelPackages = lib.mkDefault (pkgs.callPackage ./linux.nix { inherit (config.boot) kernelPatches; }); + + kernelParams = lib.mkDefault [ + "console=tty0" + "console=ttyS0,115200n8" + "earlycon=sbi" + ]; + + initrd.kernelModules = lib.mkDefault [ + "dw-axi-dmac-platform" + "dw_mmc-pltfm" + "spi-dw-mmio" + ]; + + loader = { + grub.enable = lib.mkDefault false; + generic-extlinux-compatible.enable = lib.mkDefault true; + }; + }; +} diff --git a/starfive/visionfive/v1/firmware.nix b/starfive/visionfive/v1/firmware.nix new file mode 100644 index 00000000..3ea63757 --- /dev/null +++ b/starfive/visionfive/v1/firmware.nix @@ -0,0 +1,35 @@ +{ runCommand +, buildPackages +, pkgs +}: + +let + uboot = pkgs.callPackage ./uboot.nix { }; + + opensbi = pkgs.opensbi.override { + withPayload = "${uboot}/u-boot.bin"; + withFDT = "${uboot}/u-boot.dtb"; + }; +in runCommand "firmware-starfive-visionfive-v1" { + nativeBuildInputs = with buildPackages; [ xxd ]; +} '' + function handle_file { + inFile=$1 + echo inFile: $inFile + outFile=$2 + inSize=`stat -c "%s" $inFile` + inSize32HexBe=`printf "%08x\n" $inSize` + inSize32HexLe=''${inSize32HexBe:6:2}''${inSize32HexBe:4:2}''${inSize32HexBe:2:2}''${inSize32HexBe:0:2} + echo "inSize: $inSize (0x$inSize32HexBe, LE:0x$inSize32HexLe)" + echo $inSize32HexLe | xxd -r -ps > $outFile + cat $inFile >> $outFile + echo outFile: $outFile + outSize=`stat -c "%s" $outFile` + outSize32HexBe=`printf "%08x\n" $outSize` + echo "outSize: $outSize (0x$outSize32HexBe)" + } + + mkdir -p "$out/nix-support" + echo "file bin \"$out/opensbi_u-boot_starfive_visionfive_v1.bin\"" >> "$out/nix-support/hydra-build-products" + handle_file ${opensbi}/share/opensbi/lp64/generic/firmware/fw_payload.bin $out/opensbi_u-boot_starfive_visionfive_v1.bin +'' diff --git a/starfive/visionfive/v1/linux.nix b/starfive/visionfive/v1/linux.nix new file mode 100644 index 00000000..88909099 --- /dev/null +++ b/starfive/visionfive/v1/linux.nix @@ -0,0 +1,36 @@ +{ lib +, callPackage +, linuxPackagesFor +, kernelPatches +, ... }: + +let + modDirVersion = "6.0.0"; + + linuxPkg = { fetchFromGitHub, buildLinux, ... } @ args: + buildLinux (args // { + inherit modDirVersion kernelPatches; + version = "${modDirVersion}-starfive-visionfive-v1"; + + src = fetchFromGitHub { + owner = "starfive-tech"; + repo = "linux"; + rev = "cfcb617265422c0af0ae5bc9688dceba2d10b27a"; + sha256 = "sha256-EAMCOtJZ51xSLySQPaZyomfa/1Xs9kNedz04tIbELqg="; + }; + + defconfig = "starfive_jh7100_fedora_defconfig"; + + structuredExtraConfig = with lib.kernel; { + KEXEC = yes; + SERIAL_8250_DW = yes; + PINCTRL_STARFIVE = yes; + DW_AXI_DMAC_STARFIVE = yes; + PTP_1588_CLOCK = yes; + STMMAC_ETH = yes; + STMMAC_PCI = yes; + }; + + extraMeta.branch = "visionfive"; + } // (args.argsOverride or { })); +in lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg { })) diff --git a/starfive/visionfive/v1/sd-image-installer.nix b/starfive/visionfive/v1/sd-image-installer.nix new file mode 100644 index 00000000..c08ba961 --- /dev/null +++ b/starfive/visionfive/v1/sd-image-installer.nix @@ -0,0 +1,12 @@ +# To build, use: +# nix-build "" -I nixos-config=starfive/visionfive/v1/sd-image-installer.nix -A config.system.build.sdImage +{ + imports = [ + + ./sd-image.nix + ]; + + # the installation media is also the installation target, + # so we don't want to provide the installation configuration.nix. + installer.cloneConfig = false; +} diff --git a/starfive/visionfive/v1/sd-image.nix b/starfive/visionfive/v1/sd-image.nix new file mode 100644 index 00000000..7a8aa815 --- /dev/null +++ b/starfive/visionfive/v1/sd-image.nix @@ -0,0 +1,29 @@ +# To build, use: +# nix-build "" -I nixos-config=starfive/visionfive/v1/sd-image.nix -A config.system.build.sdImage +{ config, pkgs, ... }: + +let + firmware = pkgs.callPackage ./firmware.nix { }; +in { + imports = [ + + + ./default.nix + ]; + + sdImage = { + imageName = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}-starfive-visionfive-v1.img"; + + # We have to use custom boot firmware since we do not support + # StarFive's Fedora MMC partition layout. Thus, we include this in + # the image's firmware partition so the user can flash the custom firmware. + populateFirmwareCommands = '' + cp ${firmware}/opensbi_u-boot_starfive_visionfive_v1.bin firmware/opensbi_u-boot_starfive_visionfive_v1.bin + ''; + + populateRootCommands = '' + mkdir -p ./files/boot + ${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d ./files/boot + ''; + }; +} diff --git a/starfive/visionfive/v1/uboot.nix b/starfive/visionfive/v1/uboot.nix new file mode 100644 index 00000000..9eebeb9f --- /dev/null +++ b/starfive/visionfive/v1/uboot.nix @@ -0,0 +1,17 @@ +{ fetchFromGitHub +, buildUBoot +}: + +buildUBoot { + version = "2022.04"; + + src = fetchFromGitHub { + owner = "Madouura"; + repo = "u-boot"; + rev = "fe61fbcc8c5d3f7a589d2a6ea61855ab77de621f"; + sha256 = "sha256-jMZYxAHB37pNzzLdb8wupZA1CeD0gB84x18B7XVzq/M="; + }; + + defconfig = "starfive_jh7100_visionfive_smode_defconfig"; + filesToInstall = [ "u-boot.bin" "u-boot.dtb" ]; +} From 7ab8eab291fad85fd49959812dfcdf2ecaf44804 Mon Sep 17 00:00:00 2001 From: Madoura Date: Sun, 9 Oct 2022 21:44:16 -0500 Subject: [PATCH 0254/1476] starfive/visionfive/v1: Fix README indentation --- starfive/visionfive/v1/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/starfive/visionfive/v1/README.md b/starfive/visionfive/v1/README.md index 704a1847..5476943e 100644 --- a/starfive/visionfive/v1/README.md +++ b/starfive/visionfive/v1/README.md @@ -6,13 +6,13 @@ { config, ... }: { - imports = [ ]; - # or imports = [ "${nixos-hardware-directory}/starfive/visionfive/v1/sd-image-installer.nix" ]; + imports = [ ]; + # or imports = [ "${nixos-hardware-directory}/starfive/visionfive/v1/sd-image-installer.nix" ]; - nixpkgs.crossSystem = { - config = "riscv64-unknown-linux-gnu"; - system = "riscv64-linux"; - }; + nixpkgs.crossSystem = { + config = "riscv64-unknown-linux-gnu"; + system = "riscv64-linux"; + }; } ``` From 322dc8db3e2a40cdb5a03ed9e094d8666029b9e9 Mon Sep 17 00:00:00 2001 From: Edgar B <39066502+Guekka@users.noreply.github.com> Date: Fri, 14 Oct 2022 05:36:13 +0000 Subject: [PATCH 0255/1476] 15arh05: fix tlp scaling governor --- lenovo/ideapad/15arh05/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lenovo/ideapad/15arh05/default.nix b/lenovo/ideapad/15arh05/default.nix index 24abae67..5f2d8d75 100644 --- a/lenovo/ideapad/15arh05/default.nix +++ b/lenovo/ideapad/15arh05/default.nix @@ -17,4 +17,8 @@ # Cooling management services.thermald.enable = lib.mkDefault true; + # tlp defaults to "powersave", which doesn't exist on this laptop + services.tlp.settings = { + CPU_SCALING_GOVERNOR_ON_BAT = "schedutil"; + }; } From d3e383e974fea21fde01864d67c6c231f597df5f Mon Sep 17 00:00:00 2001 From: Edgar B <39066502+Guekka@users.noreply.github.com> Date: Fri, 14 Oct 2022 05:38:50 +0000 Subject: [PATCH 0256/1476] 15arh05: add acpi_call This can be used by tools like shaansubbaiah/powercontrol to enable fast charging --- lenovo/ideapad/15arh05/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/ideapad/15arh05/default.nix b/lenovo/ideapad/15arh05/default.nix index 5f2d8d75..9914544d 100644 --- a/lenovo/ideapad/15arh05/default.nix +++ b/lenovo/ideapad/15arh05/default.nix @@ -5,6 +5,7 @@ ../../../common/cpu/amd ../../../common/gpu/nvidia.nix ../../../common/pc/laptop + ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ]; From 821c9f1d35948ca1f8b0b9966b6c1b983d5ba049 Mon Sep 17 00:00:00 2001 From: Davide Dapelo Date: Sat, 15 Oct 2022 13:54:18 +0100 Subject: [PATCH 0257/1476] Add support for ssd to Lenovo ThinkPad T480s --- lenovo/thinkpad/t480s/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/t480s/default.nix b/lenovo/thinkpad/t480s/default.nix index 1a14afa6..6cefeaab 100644 --- a/lenovo/thinkpad/t480s/default.nix +++ b/lenovo/thinkpad/t480s/default.nix @@ -4,6 +4,7 @@ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/ssd ../. ]; From 17eef273bd2392c52cfc02b7dac52518756ce32f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Oct 2022 02:03:11 +0000 Subject: [PATCH 0258/1476] build(deps): bump cachix/install-nix-action from 17 to 18 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 17 to 18. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v17...v18) --- 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 d837d029..5953fef4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v17 + - uses: cachix/install-nix-action@v18 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version From 99ed0bc663445cbb4d7501f120f5628e9e77c836 Mon Sep 17 00:00:00 2001 From: Zane van Iperen Date: Fri, 21 Oct 2022 00:29:37 +1000 Subject: [PATCH 0259/1476] apple/macbook-pro: add support for 14,1 Extracted from my system configs. There's still a few issues with this machine: 1. Audio is a lost cause. Will probably need to bribe an Apple or Cirrus engineer for the datasheet. 2. The thunderbolt module will oops upon system resume, and subsequently refuse to work until next reboot. 3. The d3cold state needs to be disabled on the NVME controller for it to wake up. 4. The Bluetooth UART (/dev/ttyS0) is created and then deleted by udev in early boot. I am yet to figure out why. Hack around it by reloading the 8250_dw module, causing it to be re-created. --- apple/macbook-pro/14-1/README.md | 17 +++++++ apple/macbook-pro/14-1/btfix.sh | 38 ++++++++++++++ apple/macbook-pro/14-1/default.nix | 51 +++++++++++++++++++ apple/macbook-pro/14-1/disable-nvme-d3cold.sh | 18 +++++++ flake.nix | 1 + 5 files changed, 125 insertions(+) create mode 100644 apple/macbook-pro/14-1/README.md create mode 100755 apple/macbook-pro/14-1/btfix.sh create mode 100644 apple/macbook-pro/14-1/default.nix create mode 100755 apple/macbook-pro/14-1/disable-nvme-d3cold.sh diff --git a/apple/macbook-pro/14-1/README.md b/apple/macbook-pro/14-1/README.md new file mode 100644 index 00000000..a8941d14 --- /dev/null +++ b/apple/macbook-pro/14-1/README.md @@ -0,0 +1,17 @@ +# MacBook Pro 14,1 + +## Audio + +Audio is a lost cause. Bribe an Apple or Cirrus engineer for the datasheet. ;) + +## Thunderbolt + +The thunderbolt module will oops upon system resume, and subsequently refuse to work until next reboot. + +## Suspend/Resume + +The d3cold state needs to be disabled on the NVME controller for it to wake up. + +## Bluetooth +The Bluetooth UART (/dev/ttyS0) is created and then deleted by udev in early boot. +Hack around it by reloading the 8250_dw module, causing it to be re-created. diff --git a/apple/macbook-pro/14-1/btfix.sh b/apple/macbook-pro/14-1/btfix.sh new file mode 100755 index 00000000..f555bba8 --- /dev/null +++ b/apple/macbook-pro/14-1/btfix.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +set -euo pipefail + +## +# For some reason /dev/ttyS0 is created, and then removed by udev. We need this +# for bluetooth, and the only way to get it again is to reload 8502_dw. Do so. +## + + +## +# /sys/devices/pci0000:00/0000:00:1e.0/driver -> intel-lpss +# /sys/bus/pci/devices/0000:00:1e.0 +# /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:8a/BCM2E7C:00 +## + +# udevadm info --query=all --path=/sys/bus/serial/devices/serial0-0 +# P: /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial0/serial0-0 +# M: serial0-0 +# R: 0 +# U: serial +# E: DEVPATH=/devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial0/serial0-0 +# E: SUBSYSTEM=serial +# E: MODALIAS=acpi:BCM2E7C:APPLE-UART-BLTH: +# E: USEC_INITIALIZED=12406199 +# E: PATH=/nix/store/56jhf2k9q31gwvhjxmm2akkkhi4a8nz1-udev-path/bin:/nix/store/56jhf2k9q31gwvhjxmm2akkkhi4a8nz1-udev-path/sbin +# E: ID_VENDOR_FROM_DATABASE=Broadcom + + +if [[ ! -e "/sys/devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/tty/ttyS0" ]]; then + if [[ -e /sys/module/8250_dw ]]; then + rmmod 8250_dw + fi + + modprobe 8250_dw +fi + +exec btattach --protocol=h4 --bredr=/dev/ttyS0 --speed=3000000 diff --git a/apple/macbook-pro/14-1/default.nix b/apple/macbook-pro/14-1/default.nix new file mode 100644 index 00000000..551649b4 --- /dev/null +++ b/apple/macbook-pro/14-1/default.nix @@ -0,0 +1,51 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = [ + ../. + ../../../common/pc/laptop/ssd + ]; + + ## + # Make the keyboard work in stage1 + # https://www.kernelconfig.io/config_keyboard_applespi + ## + boot.initrd.kernelModules = [ "applespi" "spi_pxa2xx_platform" "intel_lpss_pci" "applesmc" ]; + + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest; + + ## + # Disable d3cold on the NVME controller so the machine can actually + # wake up. + # https://github.com/Dunedan/mbp-2016-linux + ## + systemd.services.disable-nvme-d3cold = { + description = "Disables d3cold on the NVME controller"; + before = [ "suspend.target" ]; + path = [ pkgs.bash pkgs.coreutils ]; + + serviceConfig.Type = "oneshot"; + serviceConfig.ExecStart = ./disable-nvme-d3cold.sh; + serviceConfig.TimeoutSec = 0; + + wantedBy = [ "multi-user.target" "suspend.target" ]; + }; + + ## + # For some reason /dev/ttyS0 is created, and then removed by udev. We need this + # for bluetooth, and the only way to get it again is to reload 8502_dw. Luckily, + # nothing else uses it. + ## + systemd.services.btattach-bcm2e7c = lib.mkIf config.hardware.bluetooth.enable { + before = [ "bluetooth.target" ]; + + # Hacky, as it's a different device, but this always comes after ttyS0 + after = [ "sys-devices-platform-serial8250-tty-ttyS1.device" ]; + path = [ pkgs.bash pkgs.kmod pkgs.bluez ]; + + serviceConfig.Type = "simple"; + serviceConfig.ExecStart = ./btfix.sh; + + wantedBy = [ "multi-user.target" ]; + }; +} diff --git a/apple/macbook-pro/14-1/disable-nvme-d3cold.sh b/apple/macbook-pro/14-1/disable-nvme-d3cold.sh new file mode 100755 index 00000000..055299d4 --- /dev/null +++ b/apple/macbook-pro/14-1/disable-nvme-d3cold.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +driver_path=/sys/bus/pci/devices/0000:01:00.0 + +if [[ ! -e "$driver_path" ]]; then + echo "$driver_path does not exist, exiting..." + exit 1 +fi + +driver=$(basename $(readlink "$driver_path/driver")) + +if [[ "$driver" -ne "nvme" ]]; then + echo "$driver_path is not an NVME device, got $driver, exiting..." + exit 1 +fi + +echo 0 > "$driver_path/d3cold_allowed" + diff --git a/flake.nix b/flake.nix index 3d0757d4..2f019a83 100644 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,7 @@ apple-macbook-pro-10-1 = import ./apple/macbook-pro/10-1; apple-macbook-pro-11-5 = import ./apple/macbook-pro/11-5; apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; + apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1; asus-battery = import ./asus/battery.nix; asus-fx504gd = import ./asus/fx504gd; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; From ba122332574dcd08291bb8c81140cfe2d04bf038 Mon Sep 17 00:00:00 2001 From: Zane van Iperen Date: Sat, 22 Oct 2022 17:37:58 +1000 Subject: [PATCH 0260/1476] apple/macbook-pro/14-1: fix service script paths Doesn't require Nix to keep around the entire nixos-hardware repo. --- apple/macbook-pro/14-1/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apple/macbook-pro/14-1/default.nix b/apple/macbook-pro/14-1/default.nix index 551649b4..45616841 100644 --- a/apple/macbook-pro/14-1/default.nix +++ b/apple/macbook-pro/14-1/default.nix @@ -25,7 +25,7 @@ path = [ pkgs.bash pkgs.coreutils ]; serviceConfig.Type = "oneshot"; - serviceConfig.ExecStart = ./disable-nvme-d3cold.sh; + serviceConfig.ExecStart = "${./disable-nvme-d3cold.sh}"; serviceConfig.TimeoutSec = 0; wantedBy = [ "multi-user.target" "suspend.target" ]; @@ -44,7 +44,7 @@ path = [ pkgs.bash pkgs.kmod pkgs.bluez ]; serviceConfig.Type = "simple"; - serviceConfig.ExecStart = ./btfix.sh; + serviceConfig.ExecStart = "${./btfix.sh}"; wantedBy = [ "multi-user.target" ]; }; From 2c27afc7eda8f35327e9a8b7c6c45f4a9b1d602f Mon Sep 17 00:00:00 2001 From: MayNiklas Date: Sat, 22 Oct 2022 15:35:24 +0200 Subject: [PATCH 0261/1476] add lenovo/thinkpad/x1/yoga/7th-gen --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/x1/yoga/7th-gen/default.nix | 14 ++++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 lenovo/thinkpad/x1/yoga/7th-gen/default.nix diff --git a/README.md b/README.md index 367a6131..012e707e 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,7 @@ See code for all available configurations. | [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | | [Lenovo ThinkPad T590](lenovo/thinkpad/t590) | `` | | [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | +| [Lenovo ThinkPad X1 Yoga Gen 7](lenovo/thinkpad/x1/yoga/7th-gen/) | `` | | [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | | [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | | [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | diff --git a/flake.nix b/flake.nix index 3d0757d4..7ce6c90b 100644 --- a/flake.nix +++ b/flake.nix @@ -100,6 +100,7 @@ lenovo-thinkpad-t590 = import ./lenovo/thinkpad/t590; lenovo-thinkpad-x1 = import ./lenovo/thinkpad/x1; lenovo-thinkpad-x1-yoga = import ./lenovo/thinkpad/x1/yoga; + lenovo-thinkpad-x1-yoga-7th-gen = import ./lenovo/thinkpad/x1/yoga/7th-gen; lenovo-thinkpad-x1-6th-gen = import ./lenovo/thinkpad/x1/6th-gen; lenovo-thinkpad-x1-7th-gen = import ./lenovo/thinkpad/x1/7th-gen; lenovo-thinkpad-x1-9th-gen = import ./lenovo/thinkpad/x1/9th-gen; diff --git a/lenovo/thinkpad/x1/yoga/7th-gen/default.nix b/lenovo/thinkpad/x1/yoga/7th-gen/default.nix new file mode 100644 index 00000000..d95ad1ec --- /dev/null +++ b/lenovo/thinkpad/x1/yoga/7th-gen/default.nix @@ -0,0 +1,14 @@ +{ lib, pkgs, ... }: { + imports = [ + ../. + ../../../../../common/pc/laptop/ssd + ]; + + # This laptop is too new for the kernel currently in nixos-unstable. + # On Kernel 5.15.x, dmesg shows the `hardware is newer than drivers` message. + # When starting the system with 5.15.x, only a tty is being displayed. + # After our tests, at least version 5.19 is required for the system to work properly. + boot.kernelPackages = lib.mkIf + (lib.versionOlder pkgs.linux.version "5.19") + (lib.mkDefault pkgs.linuxPackages_latest); +} From c9c1a5294e4ec378882351af1a3462862c61cb96 Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Thu, 27 Oct 2022 00:15:20 +0100 Subject: [PATCH 0262/1476] raspberry-pi/4: add pcie_brcmstb and reset-raspberrypi to kernelParams This is required for things like USB Boot to work correctly Co-authored-by: Samuel Dionne-Riel --- raspberry-pi/4/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index 13cf4175..f93a236e 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -16,7 +16,13 @@ boot = { kernelPackages = lib.mkDefault pkgs.linuxPackages_rpi4; - initrd.availableKernelModules = [ "usbhid" "usb_storage" "vc4" ]; + initrd.availableKernelModules = [ + "usbhid" + "usb_storage" + "vc4" + "pcie_brcmstb" # required for the pcie bus to work + "reset-raspberrypi" # required for vl805 firmware to load + ]; loader = { grub.enable = lib.mkDefault false; From d6945f0ca1c2819a444b324d05b5fe27baeee89d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 27 Oct 2022 08:01:47 +0200 Subject: [PATCH 0263/1476] macbook-14-1: also add to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 367a6131..b2efa0df 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ See code for all available configurations. | [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | | [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | +| [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | From 379773671e481acf71dcfdc760c81c65da6ba25c Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Thu, 27 Oct 2022 13:25:13 +0100 Subject: [PATCH 0264/1476] .github/PULL_REQUEST_TEMPLATE.md: init --- .github/PULL_REQUEST_TEMPLATE.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..bf8c6df7 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ +###### Description of changes + + +###### Things done + + + +- [ ] Tested the changes in your own NixOS Configuration +- [ ] Tested the changes end-to-end by using your fork of `nixos-hardware` and + importing it via `` or Flake input + From e79d0fc1849c271d8398816748ba38a892f2e488 Mon Sep 17 00:00:00 2001 From: Archit Gupta Date: Sat, 29 Oct 2022 23:22:25 -0700 Subject: [PATCH 0265/1476] framework: Add iio in order to enable brightness control Enabling iio makes the framework's brightness controls available to desktop environments like Gnome. --- framework/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/default.nix b/framework/default.nix index 431d23b5..4ce0f582 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -38,6 +38,9 @@ # https://wiki.archlinux.org/title/Framework_Laptop#Changing_the_brightness_of_the_monitor_does_not_work hardware.acpilight.enable = lib.mkDefault true; + # Needed for desktop environments to detect/manage display brightness + hardware.sensor.iio.enable = lib.mkDefault true; + # HiDPI # Leaving here for documentation # hardware.video.hidpi.enable = lib.mkDefault true; From 6c2ae977a7f36b7b8bd8d87c9f2a0cf32ecf2a19 Mon Sep 17 00:00:00 2001 From: Madoura Date: Fri, 4 Nov 2022 11:55:16 -0500 Subject: [PATCH 0266/1476] starfive/visionfive/v1: Make sd-image more flake-friendly --- starfive/visionfive/v1/sd-image-installer.nix | 6 ++++-- starfive/visionfive/v1/sd-image.nix | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/starfive/visionfive/v1/sd-image-installer.nix b/starfive/visionfive/v1/sd-image-installer.nix index c08ba961..1b321327 100644 --- a/starfive/visionfive/v1/sd-image-installer.nix +++ b/starfive/visionfive/v1/sd-image-installer.nix @@ -1,12 +1,14 @@ # To build, use: # nix-build "" -I nixos-config=starfive/visionfive/v1/sd-image-installer.nix -A config.system.build.sdImage +{ modulesPath, ... }: + { imports = [ - + "${modulesPath}/profiles/installation-device.nix" ./sd-image.nix ]; - # the installation media is also the installation target, + # The installation media is also the installation target, # so we don't want to provide the installation configuration.nix. installer.cloneConfig = false; } diff --git a/starfive/visionfive/v1/sd-image.nix b/starfive/visionfive/v1/sd-image.nix index 7a8aa815..6b4acfc5 100644 --- a/starfive/visionfive/v1/sd-image.nix +++ b/starfive/visionfive/v1/sd-image.nix @@ -1,13 +1,13 @@ # To build, use: -# nix-build "" -I nixos-config=starfive/visionfive/v1/sd-image.nix -A config.system.build.sdImage -{ config, pkgs, ... }: +# nix-build "" -I nixos-config=starfive/visionfive/v1/sd-image.nix -A config.system.build.sdImage +{ config, pkgs, modulesPath, ... }: let firmware = pkgs.callPackage ./firmware.nix { }; in { imports = [ - - + "${modulesPath}/profiles/base.nix" + "${modulesPath}/installer/sd-card/sd-image.nix" ./default.nix ]; From ca3a7fca0298f0f7f3a34cf552394eb4310514b5 Mon Sep 17 00:00:00 2001 From: Madoura Date: Fri, 4 Nov 2022 11:56:02 -0500 Subject: [PATCH 0267/1476] starfive/visionfive/v1: Make README.MD formatting more readable --- starfive/visionfive/v1/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/starfive/visionfive/v1/README.md b/starfive/visionfive/v1/README.md index 5476943e..eb7a631f 100644 --- a/starfive/visionfive/v1/README.md +++ b/starfive/visionfive/v1/README.md @@ -1,4 +1,4 @@ -### Build the SD image +## Build the SD image - ``nix-build "" -A config.system.build.sdImage -I nixos-config=iso.nix`` - ``iso.nix`` @@ -16,10 +16,10 @@ } ``` -### Relevant documentation +## Relevant documentation - Flashing -- - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/hardware_connection.html -- - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/using_xmodem1.html + - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/hardware_connection.html + - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/using_xmodem1.html - Recovery -- - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/hardware_setup.html -- - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/for_maclinux4.html + - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/hardware_setup.html + - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/for_maclinux4.html From 7b063efe673a47fb230beab1383575ef8a023e97 Mon Sep 17 00:00:00 2001 From: Daniel Reimer Date: Sat, 5 Nov 2022 22:13:53 -0700 Subject: [PATCH 0268/1476] add lenovo/thinkpad/x1/10th-gen --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/x1/10th-gen/default.nix | 10 ++++++++++ 3 files changed, 12 insertions(+) create mode 100644 lenovo/thinkpad/x1/10th-gen/default.nix diff --git a/README.md b/README.md index bd283646..0c815894 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,7 @@ See code for all available configurations. | [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | | [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | | [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | +| [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `` | | [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | | [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | | [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | diff --git a/flake.nix b/flake.nix index 4532619f..2391384a 100644 --- a/flake.nix +++ b/flake.nix @@ -105,6 +105,7 @@ lenovo-thinkpad-x1-6th-gen = import ./lenovo/thinkpad/x1/6th-gen; lenovo-thinkpad-x1-7th-gen = import ./lenovo/thinkpad/x1/7th-gen; lenovo-thinkpad-x1-9th-gen = import ./lenovo/thinkpad/x1/9th-gen; + lenovo-thinkpad-x1-10th-gen = import ./lenovo/thinkpad/x1/10th-gen; lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme; lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2; lenovo-thinkpad-x1-extreme-gen4 = import ./lenovo/thinkpad/x1-extreme/gen4; diff --git a/lenovo/thinkpad/x1/10th-gen/default.nix b/lenovo/thinkpad/x1/10th-gen/default.nix new file mode 100644 index 00000000..c06e8395 --- /dev/null +++ b/lenovo/thinkpad/x1/10th-gen/default.nix @@ -0,0 +1,10 @@ +{ lib, pkgs, ... }: +{ + imports = [ + ../. + ../../../../common/pc/laptop/ssd + ]; + + # Use the right Intel graphics driver + boot.kernelParams = [ "i915.force_probe=46a6" ]; +} From 191d3ca91d7275b32c059b96c5e8808f832311d0 Mon Sep 17 00:00:00 2001 From: Aidan Pinard Date: Wed, 9 Nov 2022 08:47:07 -0400 Subject: [PATCH 0269/1476] Changed asus battery script to work with multiple battery names. Signed-off-by: Aidan Pinard --- asus/battery.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asus/battery.nix b/asus/battery.nix index c9a45b15..d61e3502 100644 --- a/asus/battery.nix +++ b/asus/battery.nix @@ -1,7 +1,7 @@ { config, pkgs, lib, ... }: let p = pkgs.writeScriptBin "charge-upto" '' - echo ''${0:-100} > /sys/class/power_supply/BAT0/charge_control_end_threshold + echo ''${0:-100} > /sys/class/power_supply/BAT?/charge_control_end_threshold ''; cfg = config.hardware.asus.battery; in @@ -30,7 +30,7 @@ in serviceConfig = { Type = "oneshot"; Restart = "on-failure"; - ExecStart = "${pkgs.runtimeShell} -c 'echo ${toString cfg.chargeUpto} > /sys/class/power_supply/BAT0/charge_control_end_threshold'"; + ExecStart = "${pkgs.runtimeShell} -c 'echo ${toString cfg.chargeUpto} > /sys/class/power_supply/BAT?/charge_control_end_threshold'"; }; }; }; From 17fbd802fbbb9a7d648c577a28181da1bf3190da Mon Sep 17 00:00:00 2001 From: Yureka Date: Thu, 10 Nov 2022 13:30:29 +0100 Subject: [PATCH 0270/1476] kobol/helios4: update kernel patches --- kobol/helios4/overlay.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kobol/helios4/overlay.nix b/kobol/helios4/overlay.nix index cef49d55..8453bb3c 100644 --- a/kobol/helios4/overlay.nix +++ b/kobol/helios4/overlay.nix @@ -5,20 +5,20 @@ final: prev: { # the patch has been successfully applied to 5.15 and 5.19 { patch = final.fetchpatch { - url = "https://raw.githubusercontent.com/armbian/build/03dbd9d3a733f097e23595e76ac60771c655ebf1/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch"; - sha256 = "sha256-0h7v3Nua1LuHf4h53WdYEBrbUA9dOGdF06TDBlDplOQ="; + url = "https://raw.githubusercontent.com/armbian/build/bd3466eef2106ea13e85e821f5d852ff97465e6c/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch"; + sha256 = "sha256-eQqMp0+MZd30zkl8DE89oB7czvyqCkfwF2k0EZ69jr0="; }; } # support for Wake-On-Lan { patch = final.fetchpatch { - url = "https://raw.githubusercontent.com/armbian/build/03dbd9d3a733f097e23595e76ac60771c655ebf1/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-add_wake_on_gpio_support.patch"; + url = "https://raw.githubusercontent.com/armbian/build/bd3466eef2106ea13e85e821f5d852ff97465e6c/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-add_wake_on_gpio_support.patch"; sha256 = "sha256-OrvnVCU55P0U78jdoxGRJvl29i+Rvq8AdEGSCCpxa2I="; }; } { patch = final.fetchpatch { - url = "https://raw.githubusercontent.com/armbian/build/03dbd9d3a733f097e23595e76ac60771c655ebf1/patch/kernel/archive/mvebu-5.15/94-helios4-dts-add-wake-on-lan-support.patch"; + url = "https://raw.githubusercontent.com/armbian/build/bd3466eef2106ea13e85e821f5d852ff97465e6c/patch/kernel/archive/mvebu-5.15/94-helios4-dts-add-wake-on-lan-support.patch"; sha256 = "sha256-ai4161bTC22023eaVVWsvbk6fQKjkv0P4DQ4DA1Zgow="; }; } From d43d5ad52aebe85890f27fae34481c10d17e2ef2 Mon Sep 17 00:00:00 2001 From: Quinn Dougherty Date: Mon, 31 Oct 2022 09:09:33 -0400 Subject: [PATCH 0271/1476] Latitude 3340: init --- README.md | 3 ++- dell/latitude/3340/default.nix | 9 +++++++++ flake.nix | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 dell/latitude/3340/default.nix diff --git a/README.md b/README.md index 0c815894..528aa684 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ See code for all available configurations. | [Dell Inspiron 5509](dell/inspiron/5509) | `` | | [Dell Inspiron 5515](dell/inspiron/5515) | `` | | [Dell Inspiron 7405](dell/inspiron/7405) | `` | +| [Dell Latitude 3340](dell/latitude/3340) | `` | | [Dell Latitude 3480](dell/latitude/3480) | `` | | [Dell Latitude 5520](dell/latitude/5520) | `` | | [Dell Latitude 7490](dell/latitude/7490) | `` | @@ -117,7 +118,7 @@ See code for all available configurations. | [Framework 12th Gen Intel Core](framework/12th-gen-intel) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [GPD MicroPC](gpd/micropc) | `` | -| [GPD Pocket 3](gpd/pocket-3) | `` | +| [GPD Pocket 3](gpd/pocket-3) | `` | | [Google Pixelbook](google/pixelbook) | `` | | [HP Elitebook 2560p](hp/elitebook/2560p) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | diff --git a/dell/latitude/3340/default.nix b/dell/latitude/3340/default.nix new file mode 100644 index 00000000..c7cf888d --- /dev/null +++ b/dell/latitude/3340/default.nix @@ -0,0 +1,9 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; +} diff --git a/flake.nix b/flake.nix index 2391384a..238d2d7b 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,7 @@ dell-inspiron-5509 = import ./dell/inspiron/5509; dell-inspiron-5515 = import ./dell/inspiron/5515; dell-inspiron-7405 = import ./dell/inspiron/7405; + dell-latitude-3340 = import ./dell/latitude/3340; dell-latitude-3480 = import ./dell/latitude/3480; dell-latitude-5520 = import ./dell/latitude/5520; dell-latitude-7490 = import ./dell/latitude/7490; From 435a9c652666bf3533df9f592e54c588e649b7f4 Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Fri, 11 Nov 2022 13:43:35 +0000 Subject: [PATCH 0272/1476] Add support for ssd to Lenovo ThinkPad T480 --- lenovo/thinkpad/t480/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/t480/default.nix b/lenovo/thinkpad/t480/default.nix index 1a14afa6..6cefeaab 100644 --- a/lenovo/thinkpad/t480/default.nix +++ b/lenovo/thinkpad/t480/default.nix @@ -4,6 +4,7 @@ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/ssd ../. ]; From 7e60458d8646f79a5df228913f87f59cc14414da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Sun, 13 Nov 2022 01:32:01 +0000 Subject: [PATCH 0273/1476] common/gpu/nvidia*: Migrate to common/gpu/nvidia/* and add non-prime Fixes #338 --- common/gpu/nvidia-disable.nix | 14 ++++++++------ common/gpu/nvidia.nix | 28 +++++++--------------------- common/gpu/nvidia/default.nix | 8 ++++++++ common/gpu/nvidia/disable.nix | 9 +++++++++ common/gpu/nvidia/prime.nix | 22 ++++++++++++++++++++++ flake.nix | 5 +++-- 6 files changed, 57 insertions(+), 29 deletions(-) create mode 100644 common/gpu/nvidia/default.nix create mode 100644 common/gpu/nvidia/disable.nix create mode 100644 common/gpu/nvidia/prime.nix diff --git a/common/gpu/nvidia-disable.nix b/common/gpu/nvidia-disable.nix index c6516af9..3f28c4e6 100644 --- a/common/gpu/nvidia-disable.nix +++ b/common/gpu/nvidia-disable.nix @@ -1,9 +1,11 @@ -{ lib, pkgs, ... }: - { - # This runs only intel/amdgpu igpus and nvidia dgpus do not drain power. + imports = [ ./nvidia/disable.nix ]; - ##### disable nvidia, very nice battery life. - hardware.nvidiaOptimus.disable = lib.mkDefault true; - boot.blacklistedKernelModules = lib.mkDefault [ "nouveau" "nvidia" ]; + warnings = [ + '' + DEPRECATED: The module has been deprecated. + + Switch to using instead. + '' + ]; } diff --git a/common/gpu/nvidia.nix b/common/gpu/nvidia.nix index dffeb2ab..9443b06a 100644 --- a/common/gpu/nvidia.nix +++ b/common/gpu/nvidia.nix @@ -1,26 +1,12 @@ -{ lib, pkgs, ... }: - -# This creates a new 'nvidia-offload' program that runs the application passed to it on the GPU -# As per https://nixos.wiki/wiki/Nvidia -let - nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" '' - export __NV_PRIME_RENDER_OFFLOAD=1 - export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 - export __GLX_VENDOR_LIBRARY_NAME=nvidia - export __VK_LAYER_NV_optimus=NVIDIA_only - exec "$@" - ''; -in { - services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ]; - environment.systemPackages = [ nvidia-offload ]; + imports = [ ./nvidia/prime.nix ]; - hardware.nvidia.prime = { - offload.enable = lib.mkDefault true; - # Hardware should specify the bus ID for intel/nvidia devices - }; + warnings = [ + '' + DEPRECATED: The module has been deprecated. - hardware.opengl.extraPackages = with pkgs; [ - vaapiVdpau + Switch to using instead if you use prime offloading. + If you are using this without prime, consider switching to instead. + '' ]; } diff --git a/common/gpu/nvidia/default.nix b/common/gpu/nvidia/default.nix new file mode 100644 index 00000000..47f2d347 --- /dev/null +++ b/common/gpu/nvidia/default.nix @@ -0,0 +1,8 @@ +{ lib, pkgs, ... }: + +{ + services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ]; + hardware.opengl.extraPackages = with pkgs; [ + vaapiVdpau + ]; +} diff --git a/common/gpu/nvidia/disable.nix b/common/gpu/nvidia/disable.nix new file mode 100644 index 00000000..c6516af9 --- /dev/null +++ b/common/gpu/nvidia/disable.nix @@ -0,0 +1,9 @@ +{ lib, pkgs, ... }: + +{ + # This runs only intel/amdgpu igpus and nvidia dgpus do not drain power. + + ##### disable nvidia, very nice battery life. + hardware.nvidiaOptimus.disable = lib.mkDefault true; + boot.blacklistedKernelModules = lib.mkDefault [ "nouveau" "nvidia" ]; +} diff --git a/common/gpu/nvidia/prime.nix b/common/gpu/nvidia/prime.nix new file mode 100644 index 00000000..79cf9fd1 --- /dev/null +++ b/common/gpu/nvidia/prime.nix @@ -0,0 +1,22 @@ +{ lib, pkgs, ... }: + +# This creates a new 'nvidia-offload' program that runs the application passed to it on the GPU +# As per https://nixos.wiki/wiki/Nvidia +let + nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" '' + export __NV_PRIME_RENDER_OFFLOAD=1 + export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 + export __GLX_VENDOR_LIBRARY_NAME=nvidia + export __VK_LAYER_NV_optimus=NVIDIA_only + exec "$@" + ''; +in { + imports = [ ./. ]; + + environment.systemPackages = [ nvidia-offload ]; + + hardware.nvidia.prime = { + offload.enable = lib.mkDefault true; + # Hardware should specify the bus ID for intel/nvidia devices + }; +} diff --git a/flake.nix b/flake.nix index 238d2d7b..c18d9935 100644 --- a/flake.nix +++ b/flake.nix @@ -157,8 +157,9 @@ common-gpu-amd-sea-islands = import ./common/gpu/amd/sea-islands; common-gpu-amd-southern-islands = import ./common/gpu/amd/southern-islands; common-gpu-intel = import ./common/gpu/intel.nix; - common-gpu-nvidia = import ./common/gpu/nvidia.nix; - common-gpu-nvidia-disable = import ./common/gpu/nvidia-disable.nix; + common-gpu-nvidia = import ./common/gpu/nvidia/prime.nix; + common-gpu-nvidia-nonprime = import ./common/gpu/nvidia; + common-gpu-nvidia-disable = import ./common/gpu/nvidia/disable.nix; common-pc = import ./common/pc; common-pc-hdd = import ./common/pc/hdd; common-pc-laptop = import ./common/pc/laptop; From cdd049a353645cbeaba48cb9e339123b9aeae743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Sun, 13 Nov 2022 01:54:59 +0000 Subject: [PATCH 0274/1476] treewide: Migrate to new nvidia modules --- asus/rog-strix/g733qs/default.nix | 2 +- asus/zephyrus/ga401/default.nix | 2 +- asus/zephyrus/ga503/default.nix | 2 +- dell/g3/3779/default.nix | 2 +- dell/xps/15-9500/nvidia/default.nix | 2 +- dell/xps/15-9550/default.nix | 2 +- dell/xps/15-9550/nvidia/default.nix | 2 +- dell/xps/15-9560/intel/default.nix | 2 +- dell/xps/15-9560/nvidia/default.nix | 2 +- dell/xps/17-9700/intel/default.nix | 2 +- dell/xps/17-9700/nvidia/default.nix | 2 +- lenovo/ideapad/15arh05/default.nix | 2 +- lenovo/legion/15ach6/default.nix | 2 +- lenovo/legion/15arh05h/default.nix | 2 +- lenovo/legion/16ithg6/default.nix | 2 +- lenovo/thinkpad/e470/default.nix | 2 +- lenovo/thinkpad/p1/default.nix | 2 +- lenovo/thinkpad/p50/default.nix | 2 +- lenovo/thinkpad/p51/default.nix | 2 +- lenovo/thinkpad/p52/default.nix | 2 +- msi/gl62/default.nix | 2 +- omen/en00015p/default.nix | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/asus/rog-strix/g733qs/default.nix b/asus/rog-strix/g733qs/default.nix index 8e5fde1e..b49a44c0 100644 --- a/asus/rog-strix/g733qs/default.nix +++ b/asus/rog-strix/g733qs/default.nix @@ -2,7 +2,7 @@ { imports = [ ../../../common/cpu/amd/pstate.nix - ../../../common/gpu/nvidia.nix + ../../../common/gpu/nvidia/prime.nix ../../../common/pc/laptop ../../../common/pc/ssd ../../battery.nix diff --git a/asus/zephyrus/ga401/default.nix b/asus/zephyrus/ga401/default.nix index 9148e1da..2130ca79 100644 --- a/asus/zephyrus/ga401/default.nix +++ b/asus/zephyrus/ga401/default.nix @@ -3,7 +3,7 @@ { imports = [ ../../../common/cpu/amd - ../../../common/gpu/nvidia.nix + ../../../common/gpu/nvidia/prime.nix ../../../common/pc/laptop ../../../common/pc/ssd ]; diff --git a/asus/zephyrus/ga503/default.nix b/asus/zephyrus/ga503/default.nix index 5597c81a..94e86847 100644 --- a/asus/zephyrus/ga503/default.nix +++ b/asus/zephyrus/ga503/default.nix @@ -3,7 +3,7 @@ { imports = [ ../../../common/cpu/amd - ../../../common/gpu/nvidia.nix + ../../../common/gpu/nvidia/prime.nix ../../../common/pc/laptop ../../../common/pc/ssd ]; diff --git a/dell/g3/3779/default.nix b/dell/g3/3779/default.nix index 8c9b3d32..80deb299 100644 --- a/dell/g3/3779/default.nix +++ b/dell/g3/3779/default.nix @@ -3,7 +3,7 @@ { imports = [ ../../../common/cpu/intel - ../../../common/gpu/nvidia.nix + ../../../common/gpu/nvidia/prime.nix ../../../common/pc/laptop ../../../common/pc/laptop/ssd ]; diff --git a/dell/xps/15-9500/nvidia/default.nix b/dell/xps/15-9500/nvidia/default.nix index 451b6eb7..f2fa3ae7 100644 --- a/dell/xps/15-9500/nvidia/default.nix +++ b/dell/xps/15-9500/nvidia/default.nix @@ -2,7 +2,7 @@ { imports = [ ../default.nix - ../../../../common/gpu/nvidia.nix + ../../../../common/gpu/nvidia/prime.nix ]; hardware.nvidia.prime = { diff --git a/dell/xps/15-9550/default.nix b/dell/xps/15-9550/default.nix index 0fdfeeed..2150a981 100644 --- a/dell/xps/15-9550/default.nix +++ b/dell/xps/15-9550/default.nix @@ -5,7 +5,7 @@ ../../../common/cpu/intel ../../../common/pc/laptop # To just use Intel integrated graphics with Intel's open source driver - # ../../../common/gpu/nvidia-disable + # ../../../common/gpu/nvidia/disable.nix ]; # TODO: boot loader diff --git a/dell/xps/15-9550/nvidia/default.nix b/dell/xps/15-9550/nvidia/default.nix index 451b6eb7..f2fa3ae7 100644 --- a/dell/xps/15-9550/nvidia/default.nix +++ b/dell/xps/15-9550/nvidia/default.nix @@ -2,7 +2,7 @@ { imports = [ ../default.nix - ../../../../common/gpu/nvidia.nix + ../../../../common/gpu/nvidia/prime.nix ]; hardware.nvidia.prime = { diff --git a/dell/xps/15-9560/intel/default.nix b/dell/xps/15-9560/intel/default.nix index 7c8eadd7..a4531497 100644 --- a/dell/xps/15-9560/intel/default.nix +++ b/dell/xps/15-9560/intel/default.nix @@ -4,7 +4,7 @@ imports = [ ../../../../common/cpu/intel ../../../../common/pc/laptop - ../../../../common/gpu/nvidia-disable.nix + ../../../../common/gpu/nvidia/disable.nix ../xps-common.nix ]; } diff --git a/dell/xps/15-9560/nvidia/default.nix b/dell/xps/15-9560/nvidia/default.nix index a7ba2416..3e78ebac 100644 --- a/dell/xps/15-9560/nvidia/default.nix +++ b/dell/xps/15-9560/nvidia/default.nix @@ -3,7 +3,7 @@ { imports = [ ../../../../common/cpu/intel - ../../../../common/gpu/nvidia.nix + ../../../../common/gpu/nvidia/prime.nix ../../../../common/pc/laptop ../xps-common.nix ]; diff --git a/dell/xps/17-9700/intel/default.nix b/dell/xps/17-9700/intel/default.nix index 4a9a1687..0176bfde 100644 --- a/dell/xps/17-9700/intel/default.nix +++ b/dell/xps/17-9700/intel/default.nix @@ -4,7 +4,7 @@ imports = [ ../../../../common/cpu/intel ../../../../common/pc/laptop - ../../../../common/gpu/nvidia-disable.nix + ../../../../common/gpu/nvidia/disable.nix ../common.nix ]; } diff --git a/dell/xps/17-9700/nvidia/default.nix b/dell/xps/17-9700/nvidia/default.nix index 8002870b..7e1e3e10 100644 --- a/dell/xps/17-9700/nvidia/default.nix +++ b/dell/xps/17-9700/nvidia/default.nix @@ -4,7 +4,7 @@ imports = [ ../../../../common/cpu/intel ../../../../common/pc/laptop - ../../../../common/gpu/nvidia.nix + ../../../../common/gpu/nvidia/prime.nix ../common.nix ]; diff --git a/lenovo/ideapad/15arh05/default.nix b/lenovo/ideapad/15arh05/default.nix index 9914544d..fda5cd02 100644 --- a/lenovo/ideapad/15arh05/default.nix +++ b/lenovo/ideapad/15arh05/default.nix @@ -3,7 +3,7 @@ { imports = [ ../../../common/cpu/amd - ../../../common/gpu/nvidia.nix + ../../../common/gpu/nvidia/prime.nix ../../../common/pc/laptop ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd diff --git a/lenovo/legion/15ach6/default.nix b/lenovo/legion/15ach6/default.nix index 0c718230..0cbc0f43 100644 --- a/lenovo/legion/15ach6/default.nix +++ b/lenovo/legion/15ach6/default.nix @@ -4,7 +4,7 @@ in { imports = [ ../../../common/cpu/amd ../../../common/gpu/amd - ../../../common/gpu/nvidia.nix + ../../../common/gpu/nvidia/prime.nix ../../../common/pc/laptop ../../../common/pc/laptop/ssd ]; diff --git a/lenovo/legion/15arh05h/default.nix b/lenovo/legion/15arh05h/default.nix index 16627486..603fd9e3 100644 --- a/lenovo/legion/15arh05h/default.nix +++ b/lenovo/legion/15arh05h/default.nix @@ -3,7 +3,7 @@ { imports = [ ../../../common/cpu/amd - ../../../common/gpu/nvidia.nix + ../../../common/gpu/nvidia/prime.nix ../../../common/pc/laptop ../../../common/pc/laptop/ssd ]; diff --git a/lenovo/legion/16ithg6/default.nix b/lenovo/legion/16ithg6/default.nix index e63c165c..cf0244ea 100644 --- a/lenovo/legion/16ithg6/default.nix +++ b/lenovo/legion/16ithg6/default.nix @@ -3,7 +3,7 @@ { imports = [ ../../../common/cpu/intel - ../../../common/gpu/nvidia.nix + ../../../common/gpu/nvidia/prime.nix ../../../common/pc/laptop ../../../common/pc/laptop/ssd ]; diff --git a/lenovo/thinkpad/e470/default.nix b/lenovo/thinkpad/e470/default.nix index c9bf8331..e9c52141 100644 --- a/lenovo/thinkpad/e470/default.nix +++ b/lenovo/thinkpad/e470/default.nix @@ -4,7 +4,7 @@ imports = [ ../. ../../../common/cpu/intel/kaby-lake - ../../../common/gpu/nvidia.nix + ../../../common/gpu/nvidia/prime.nix ]; hardware.nvidia.prime = { diff --git a/lenovo/thinkpad/p1/default.nix b/lenovo/thinkpad/p1/default.nix index 3575693c..4c68bdb9 100644 --- a/lenovo/thinkpad/p1/default.nix +++ b/lenovo/thinkpad/p1/default.nix @@ -3,7 +3,7 @@ ../../../common/cpu/intel # might need nvidia module but we don't know the PCI ids: # https://github.com/NixOS/nixos-hardware/pull/274#discussion_r650483740 - #../../../common/gpu/nvidia.nix + #../../../common/gpu/nvidia/prime.nix ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ]; diff --git a/lenovo/thinkpad/p50/default.nix b/lenovo/thinkpad/p50/default.nix index 48cf6054..3e77eb58 100644 --- a/lenovo/thinkpad/p50/default.nix +++ b/lenovo/thinkpad/p50/default.nix @@ -1,6 +1,6 @@ { lib, config, ... }: { imports = [ - ../../../common/gpu/nvidia.nix + ../../../common/gpu/nvidia/prime.nix ../../../common/cpu/intel ../../../common/pc/laptop/acpi_call.nix ../. diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix index 5701c85c..4c9be3c4 100644 --- a/lenovo/thinkpad/p51/default.nix +++ b/lenovo/thinkpad/p51/default.nix @@ -1,6 +1,6 @@ { config, lib, ... }: { imports = [ - ../../../common/gpu/nvidia.nix + ../../../common/gpu/nvidia/prime.nix ../../../common/cpu/intel ../../../common/cpu/intel/kaby-lake ../../../common/pc/laptop/acpi_call.nix diff --git a/lenovo/thinkpad/p52/default.nix b/lenovo/thinkpad/p52/default.nix index dc0d99b4..31c9294a 100644 --- a/lenovo/thinkpad/p52/default.nix +++ b/lenovo/thinkpad/p52/default.nix @@ -1,6 +1,6 @@ { lib, config, ... }: { imports = [ - ../../../common/gpu/nvidia.nix + ../../../common/gpu/nvidia/prime.nix ../../../common/cpu/intel ../../../common/pc/laptop/acpi_call.nix ../. diff --git a/msi/gl62/default.nix b/msi/gl62/default.nix index afba7359..6f3f91cb 100644 --- a/msi/gl62/default.nix +++ b/msi/gl62/default.nix @@ -4,7 +4,7 @@ imports = [ ../../common/pc/laptop/ssd ../../common/cpu/intel - ../../common/gpu/nvidia.nix + ../../common/gpu/nvidia/prime.nix ../../common/pc/laptop ]; diff --git a/omen/en00015p/default.nix b/omen/en00015p/default.nix index 8a97003b..78e1c3d2 100644 --- a/omen/en00015p/default.nix +++ b/omen/en00015p/default.nix @@ -3,7 +3,7 @@ { imports = [ ../../common/cpu/amd - ../../common/gpu/nvidia.nix + ../../common/gpu/nvidia/prime.nix ../../common/pc/laptop ../../common/pc/ssd ]; From bf212c4ef57b100c97735a210a3895d3dcc69aa9 Mon Sep 17 00:00:00 2001 From: dasNessie Date: Sat, 19 Nov 2022 14:33:56 +0100 Subject: [PATCH 0275/1476] Add Ethernet Support on Framework Add Ethernet Expansion Card support for the framework laptop. Due to automatic USB device suspension, the Ethernet Expansion Card was not working. Adding a udev rule to only suspend the card after 20 seconds fixes the problem. The framework support confirmed via email that all current Ethernet Expansion Cards share the same Product ID. --- framework/12th-gen-intel/default.nix | 7 +++++-- framework/default.nix | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/framework/12th-gen-intel/default.nix b/framework/12th-gen-intel/default.nix index e855a701..8d9bf674 100644 --- a/framework/12th-gen-intel/default.nix +++ b/framework/12th-gen-intel/default.nix @@ -34,10 +34,13 @@ # For fingerprint support services.fprintd.enable = lib.mkDefault true; - # Fix headphone noise when on powersave - # https://community.frame.work/t/headphone-jack-intermittent-noise/5246/55 + # Custom udev rules services.udev.extraRules = '' + # Fix headphone noise when on powersave + # https://community.frame.work/t/headphone-jack-intermittent-noise/5246/55 SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0xa0e0", ATTR{power/control}="on" + # Ethernet expansion card support + ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" ''; # Mis-detected by nixos-generate-config diff --git a/framework/default.nix b/framework/default.nix index 4ce0f582..2c07ff45 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -27,10 +27,13 @@ # For fingerprint support services.fprintd.enable = lib.mkDefault true; - # Fix headphone noise when on powersave - # https://community.frame.work/t/headphone-jack-intermittent-noise/5246/55 + # Custom udev rules services.udev.extraRules = '' + # Fix headphone noise when on powersave + # https://community.frame.work/t/headphone-jack-intermittent-noise/5246/55 SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0xa0e0", ATTR{power/control}="on" + # Ethernet expansion card support + ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" ''; # Mis-detected by nixos-generate-config From 56bb7c93b35ffb0d6a6f8dde01bc30d029893825 Mon Sep 17 00:00:00 2001 From: 4JX <79868816+4JX@users.noreply.github.com> Date: Wed, 23 Nov 2022 20:36:56 +0100 Subject: [PATCH 0276/1476] Add Lenovo Legion 5 Pro Gen 6 --- README.md | 1 + flake.nix | 1 + lenovo/legion/16ach6h/default.nix | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 lenovo/legion/16ach6h/default.nix diff --git a/README.md b/README.md index 528aa684..a2396188 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,7 @@ See code for all available configurations. | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | | [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | +| [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | | [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | diff --git a/flake.nix b/flake.nix index c18d9935..602d2dc1 100644 --- a/flake.nix +++ b/flake.nix @@ -60,6 +60,7 @@ lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-legion-15ach6 = import ./lenovo/legion/15ach6; lenovo-legion-15arh05h = import ./lenovo/legion/15arh05h; + lenovo-legion-16ach6h = import ./lenovo/legion/16ach6h; lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; lenovo-thinkpad = import ./lenovo/thinkpad; lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; diff --git a/lenovo/legion/16ach6h/default.nix b/lenovo/legion/16ach6h/default.nix new file mode 100644 index 00000000..fae288d1 --- /dev/null +++ b/lenovo/legion/16ach6h/default.nix @@ -0,0 +1,18 @@ +{ lib, config, ... }: +let kernelPackages = config.boot.kernelPackages; +in { + imports = [ + ../../../common/cpu/amd + ../../../common/gpu/amd + ../../../common/gpu/nvidia/prime.nix + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:6:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + + services.thermald.enable = lib.mkDefault true; +} From 776287c48330090d26d51c0f0d7dcedd9aeedf98 Mon Sep 17 00:00:00 2001 From: 4JX <79868816+4JX@users.noreply.github.com> Date: Thu, 24 Nov 2022 00:12:24 +0100 Subject: [PATCH 0277/1476] Add some data about the device used --- lenovo/legion/16ach6h/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lenovo/legion/16ach6h/README.md diff --git a/lenovo/legion/16ach6h/README.md b/lenovo/legion/16ach6h/README.md new file mode 100644 index 00000000..cf489fa3 --- /dev/null +++ b/lenovo/legion/16ach6h/README.md @@ -0,0 +1,19 @@ +## Setup at the time of testing +``` +$ nix-info -m + - system: `"x86_64-linux"` + - host os: `Linux 6.0.9, NixOS, 22.11 (Raccoon), 22.11beta19.c9538a9b707` + - multi-user?: `yes` + - sandbox: `yes` + - version: `nix-env (Nix) 2.11.0` + - channels(root): `"nixos-22.11"` + - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos` + ``` + ``` + $ lspci +... +01:00.0 VGA compatible controller: NVIDIA Corporation GA104M [GeForce RTX 3070 Mobile / Max-Q] (rev a1) +... +06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne (rev c5) +... +``` \ No newline at end of file From b441875a5068472e8ee25e3ed237c0be271fa4e7 Mon Sep 17 00:00:00 2001 From: 4JX <79868816+4JX@users.noreply.github.com> Date: Thu, 24 Nov 2022 16:39:20 +0100 Subject: [PATCH 0278/1476] Apply suggestion --- lenovo/legion/16ach6h/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lenovo/legion/16ach6h/default.nix b/lenovo/legion/16ach6h/default.nix index fae288d1..db13b9f4 100644 --- a/lenovo/legion/16ach6h/default.nix +++ b/lenovo/legion/16ach6h/default.nix @@ -1,6 +1,6 @@ -{ lib, config, ... }: -let kernelPackages = config.boot.kernelPackages; -in { +{ lib, ... }: + +{ imports = [ ../../../common/cpu/amd ../../../common/gpu/amd From b32b188154bda2f0b430afac19e404216aaded23 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 28 Nov 2022 20:00:53 +1300 Subject: [PATCH 0279/1476] Convert the repos.linux-surface-kernel set to a function --- microsoft/surface/repos.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/microsoft/surface/repos.nix b/microsoft/surface/repos.nix index 1ee00b9a..3ee09a9d 100644 --- a/microsoft/surface/repos.nix +++ b/microsoft/surface/repos.nix @@ -1,10 +1,11 @@ { lib, pkgs, fetchFromGitHub, fetchurl }: { - linux-surface-kernel = fetchFromGitHub { - owner = "linux-surface"; - repo = "kernel"; - rev = "db94c89f56d6ceae03ca3802e11197f48e6c539f"; - sha256 = "0c58ri0i9gdb4w7l361pnkvq6ap17kmgnxngh0bcdmgn4dc88wx2"; - }; + # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: + linux-surface-kernel = { rev, sha256 }: + fetchFromGitHub { + owner = "linux-surface"; + repo = "kernel"; + inherit rev sha256; + }; ath10k-firmware = fetchFromGitHub { owner = "kvalo"; From 35e317a280f6457c5ba085d985175346fa6694b7 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 28 Nov 2022 20:01:29 +1300 Subject: [PATCH 0280/1476] Use new repos.linux-surface-kernel function --- microsoft/surface/kernel/linux-5.16.11.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/microsoft/surface/kernel/linux-5.16.11.nix b/microsoft/surface/kernel/linux-5.16.11.nix index 022c0692..ae8dbd4e 100644 --- a/microsoft/surface/kernel/linux-5.16.11.nix +++ b/microsoft/surface/kernel/linux-5.16.11.nix @@ -9,7 +9,11 @@ let modDirVersion = version; extraMeta.branch = "5.16"; - src = repos.linux-surface-kernel; + src = repos.linux-surface-kernel { + # Kernel 5.16.11 + rev = "db94c89f56d6ceae03ca3802e11197f48e6c539f"; + sha256 = "0c58ri0i9gdb4w7l361pnkvq6ap17kmgnxngh0bcdmgn4dc88wx2"; + }; kernelPatches = [{ name = "microsoft-surface-patches-linux-5.16.2"; From 158f86bb326dd3529f288bb476464f61679a41c3 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 28 Nov 2022 20:23:51 +1300 Subject: [PATCH 0281/1476] DRY the MS Surface kernel module --- microsoft/surface/kernel/default.nix | 38 +++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/kernel/default.nix index 354fe907..1a1ca6b2 100644 --- a/microsoft/surface/kernel/default.nix +++ b/microsoft/surface/kernel/default.nix @@ -1,5 +1,37 @@ -{ config, lib, pkgs, ... }: +{ lib, + buildLinux, + callPackage, + linuxPackagesFor, + ... +}: -{ - boot.kernelPackages = pkgs.callPackage ./linux-5.16.11.nix { }; +# To test the kernel build: +# nix-build -E "with import {}; (pkgs.callPackage ./. {}).kernel" + +let + inherit (lib) kernel recurseIntoAttrs; + repos = callPackage ../repos.nix {}; + + linuxPackage = + { version, + modDirVersion ? version, + branch, + src, + kernelPatches ? [], + ... + }: let + buildLinux' = buildLinux { + inherit version src kernelPatches; + modDirVersion = version; + extraMeta.branch = branch; + }; + linuxPackagesFor' = (linuxPackagesFor buildLinux'); + in recurseIntoAttrs linuxPackagesFor'; + + linux-5_16_11 = linuxPackage ( + callPackage ./linux-5.16.11.nix { inherit repos; } + ); + +in { + boot.kernelPackages = linux-5_16_11; } From 3de7b6e0c58abe80fa5bdab87be66464898639ee Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 28 Nov 2022 20:28:52 +1300 Subject: [PATCH 0282/1476] Use the newly refactored code --- microsoft/surface/kernel/default.nix | 2 +- microsoft/surface/kernel/linux-5.16.11.nix | 156 ++++++++++----------- 2 files changed, 79 insertions(+), 79 deletions(-) diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/kernel/default.nix index 1a1ca6b2..b2669198 100644 --- a/microsoft/surface/kernel/default.nix +++ b/microsoft/surface/kernel/default.nix @@ -6,7 +6,7 @@ }: # To test the kernel build: -# nix-build -E "with import {}; (pkgs.callPackage ./. {}).kernel" +# nix-build -E "with import {}; (pkgs.callPackage ./. {}).boot.kernelPackages.kernel" let inherit (lib) kernel recurseIntoAttrs; diff --git a/microsoft/surface/kernel/linux-5.16.11.nix b/microsoft/surface/kernel/linux-5.16.11.nix index ae8dbd4e..60835316 100644 --- a/microsoft/surface/kernel/linux-5.16.11.nix +++ b/microsoft/surface/kernel/linux-5.16.11.nix @@ -1,91 +1,91 @@ -{ lib, callPackage, linuxPackagesFor, ... }: -# To test the kernel build: -# nix-build -E "with import {}; (pkgs.callPackage ./linux-5.16.11.nix {}).kernel" +{ lib, + repos, +}: + let - repos = callPackage ../repos.nix {}; - linuxPkg = { fetchurl, buildLinux, ... }@args: - buildLinux (args // rec { - version = "5.16.11"; - modDirVersion = version; - extraMeta.branch = "5.16"; + inherit (lib) kernel; + version = "5.16.11"; - src = repos.linux-surface-kernel { - # Kernel 5.16.11 - rev = "db94c89f56d6ceae03ca3802e11197f48e6c539f"; - sha256 = "0c58ri0i9gdb4w7l361pnkvq6ap17kmgnxngh0bcdmgn4dc88wx2"; - }; +in { + inherit version; + modDirVersion = version; + branch = "5.16"; + src = repos.linux-surface-kernel { + # Kernel 5.16.11 from the linux-surface/kernel repo: + rev = "db94c89f56d6ceae03ca3802e11197f48e6c539f"; + sha256 = "0c58ri0i9gdb4w7l361pnkvq6ap17kmgnxngh0bcdmgn4dc88wx2"; + }; + kernelPatches = [{ + name = "microsoft-surface-patches-linux-${version}"; + patch = null; + structuredExtraConfig = with kernel; { + # + # Surface Aggregator Module + # + SURFACE_AGGREGATOR = module; + SURFACE_AGGREGATOR_ERROR_INJECTION = no; + SURFACE_AGGREGATOR_BUS = yes; + SURFACE_AGGREGATOR_CDEV = module; + SURFACE_AGGREGATOR_REGISTRY = module; - kernelPatches = [{ - name = "microsoft-surface-patches-linux-5.16.2"; - patch = null; - structuredExtraConfig = with lib.kernel; { - # - # Surface Aggregator Module - # - SURFACE_AGGREGATOR = module; - SURFACE_AGGREGATOR_ERROR_INJECTION = no; - SURFACE_AGGREGATOR_BUS = yes; - SURFACE_AGGREGATOR_CDEV = module; - SURFACE_AGGREGATOR_REGISTRY = module; + SURFACE_ACPI_NOTIFY = module; + SURFACE_DTX = module; + SURFACE_PLATFORM_PROFILE = module; - SURFACE_ACPI_NOTIFY = module; - SURFACE_DTX = module; - SURFACE_PLATFORM_PROFILE = module; + SURFACE_HID = module; + SURFACE_KBD = module; - SURFACE_HID = module; - SURFACE_KBD = module; + BATTERY_SURFACE = module; + CHARGER_SURFACE = module; - BATTERY_SURFACE = module; - CHARGER_SURFACE = module; + # + # Surface laptop 1 keyboard + # + SERIAL_DEV_BUS = yes; + SERIAL_DEV_CTRL_TTYPORT = yes; - # - # Surface laptop 1 keyboard - # - SERIAL_DEV_BUS = yes; - SERIAL_DEV_CTRL_TTYPORT = yes; + # + # Surface Hotplug + # + SURFACE_HOTPLUG = module; - # - # Surface Hotplug - # - SURFACE_HOTPLUG = 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; - # - # 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_IPU3_IMGU = module; + VIDEO_IPU3_CIO2 = module; + CIO2_BRIDGE = yes; + INTEL_SKL_INT3472 = module; - # - # Cameras: IPU3 - # - VIDEO_IPU3_IMGU = module; - VIDEO_IPU3_CIO2 = module; - CIO2_BRIDGE = yes; - INTEL_SKL_INT3472 = module; + # + # Cameras: Sensor drivers + # + VIDEO_OV5693 = module; + VIDEO_OV8865 = module; - # - # Cameras: Sensor drivers - # - VIDEO_OV5693 = module; - VIDEO_OV8865 = module; + # + # ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 + # + APDS9960 = module; - # - # ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 - # - APDS9960 = module; + # + # Other Drivers + # + INPUT_SOC_BUTTON_ARRAY = module; + SURFACE_3_BUTTON = module; + SURFACE_3_POWER_OPREGION = module; + SURFACE_PRO3_BUTTON = module; + SURFACE_GPE = module; + SURFACE_BOOK1_DGPU_SWITCH = module; + }; + }]; +} - # - # Other Drivers - # - INPUT_SOC_BUTTON_ARRAY = module; - SURFACE_3_BUTTON = module; - SURFACE_3_POWER_OPREGION = module; - SURFACE_PRO3_BUTTON = module; - SURFACE_GPE = module; - SURFACE_BOOK1_DGPU_SWITCH = module; - }; - }]; - } // (args.argsOverride or {})); -in lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg {})) From 50ce82cc84b7fd4394c1387f3155bc7c100d7bdf Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 28 Nov 2022 22:26:47 +1300 Subject: [PATCH 0283/1476] Fix for unexpected recursion error Might be related to how these packages access "pkgs" ? --- microsoft/surface/kernel/default.nix | 14 +++++--------- microsoft/surface/repos.nix | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/kernel/default.nix index b2669198..1920dfef 100644 --- a/microsoft/surface/kernel/default.nix +++ b/microsoft/surface/kernel/default.nix @@ -1,16 +1,12 @@ -{ lib, - buildLinux, - callPackage, - linuxPackagesFor, - ... -}: +{ config, lib, pkgs, ... }: # To test the kernel build: # nix-build -E "with import {}; (pkgs.callPackage ./. {}).boot.kernelPackages.kernel" let inherit (lib) kernel recurseIntoAttrs; - repos = callPackage ../repos.nix {}; + inherit (pkgs) buildLinux linuxPackagesFor; + repos = pkgs.callPackage ../repos.nix {}; linuxPackage = { version, @@ -25,11 +21,11 @@ let modDirVersion = version; extraMeta.branch = branch; }; - linuxPackagesFor' = (linuxPackagesFor buildLinux'); + linuxPackagesFor' = linuxPackagesFor buildLinux'; in recurseIntoAttrs linuxPackagesFor'; linux-5_16_11 = linuxPackage ( - callPackage ./linux-5.16.11.nix { inherit repos; } + pkgs.callPackage ./linux-5.16.11.nix { inherit repos; } ); in { diff --git a/microsoft/surface/repos.nix b/microsoft/surface/repos.nix index 3ee09a9d..42e31de7 100644 --- a/microsoft/surface/repos.nix +++ b/microsoft/surface/repos.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, fetchFromGitHub, fetchurl }: { +{ fetchFromGitHub, fetchurl }: { # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: linux-surface-kernel = { rev, sha256 }: fetchFromGitHub { From 5d0ade69589d2d53397137ef900322a43947b416 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 28 Nov 2022 23:21:34 +1300 Subject: [PATCH 0284/1476] Add-back linux-surface/linux-surface repo, for easy access to the kernel patches --- microsoft/surface/repos.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/microsoft/surface/repos.nix b/microsoft/surface/repos.nix index 42e31de7..586d0943 100644 --- a/microsoft/surface/repos.nix +++ b/microsoft/surface/repos.nix @@ -1,4 +1,11 @@ { fetchFromGitHub, fetchurl }: { + linux-surface = fetchFromGitHub { + owner = "linux-surface"; + repo = "linux-surface"; + rev = "6d0fa58a6eadda44b35a3c5e60db2ed0fa0c101e"; + sha256 = "sha256-Jf6DN/pZaGIk58pA+CUylpl09Wi4vA3vKZC60b3WcOg="; + }; + # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: linux-surface-kernel = { rev, sha256 }: fetchFromGitHub { From d93d29bdc980a80eb1643184d4429e84046b162d Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 28 Nov 2022 23:21:34 +1300 Subject: [PATCH 0285/1476] Add-back linux-surface/linux-surface repo, for easy access to the kernel patches --- microsoft/surface/repos.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/microsoft/surface/repos.nix b/microsoft/surface/repos.nix index 1ee00b9a..586d0943 100644 --- a/microsoft/surface/repos.nix +++ b/microsoft/surface/repos.nix @@ -1,11 +1,19 @@ -{ lib, pkgs, fetchFromGitHub, fetchurl }: { - linux-surface-kernel = fetchFromGitHub { +{ fetchFromGitHub, fetchurl }: { + linux-surface = fetchFromGitHub { owner = "linux-surface"; - repo = "kernel"; - rev = "db94c89f56d6ceae03ca3802e11197f48e6c539f"; - sha256 = "0c58ri0i9gdb4w7l361pnkvq6ap17kmgnxngh0bcdmgn4dc88wx2"; + repo = "linux-surface"; + rev = "6d0fa58a6eadda44b35a3c5e60db2ed0fa0c101e"; + sha256 = "sha256-Jf6DN/pZaGIk58pA+CUylpl09Wi4vA3vKZC60b3WcOg="; }; + # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: + linux-surface-kernel = { rev, sha256 }: + fetchFromGitHub { + owner = "linux-surface"; + repo = "kernel"; + inherit rev sha256; + }; + ath10k-firmware = fetchFromGitHub { owner = "kvalo"; repo = "ath10k-firmware"; From a51973c994d614f8af069394064966ef8b7237b0 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 28 Nov 2022 23:43:50 +1300 Subject: [PATCH 0286/1476] Add linux-surface patches for 5.19.2 --- microsoft/surface/kernel/linux-5.19.2.nix | 71 +++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 microsoft/surface/kernel/linux-5.19.2.nix diff --git a/microsoft/surface/kernel/linux-5.19.2.nix b/microsoft/surface/kernel/linux-5.19.2.nix new file mode 100644 index 00000000..f893e81e --- /dev/null +++ b/microsoft/surface/kernel/linux-5.19.2.nix @@ -0,0 +1,71 @@ +{ lib, + fetchurl, +}: + +let + inherit (lib) kernel; + version = "5.19.2"; + +in { + inherit version; + modDirVersion = version; + branch = "5.19"; + src = fetchurl { + url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; + sha256 = "sha256-SOQKH1UB7GxA48htPVMZIAtojy2TYPcoMwhNdIAf5j0="; + }; + patches = repos.linux-surface + "/patches/${branch}"; + + kernelPatches = [ + { + name = "microsoft-surface-patches-linux-${version}"; + patch = null; + structuredExtraConfig = with lib.kernel; { + }; + } + { + name = "ms-surface/0001-surface3-oemb"; + patch = patches + "/0001-surface3-oemb.patch"; + } + { + name = "ms-surface/0002-mwifiex"; + patch = patches + "/0002-mwifiex.patch"; + } + { + name = "ms-surface/0003-ath10k"; + patch = patches + "/0003-ath10k.patch"; + } + { + name = "ms-surface/0004-ipts"; + patch = patches + "/0004-ipts.patch"; + } + { + name = "ms-surface/0005-surface-sam"; + patch = patches + "/0005-surface-sam.patch"; + } + { + name = "ms-surface/0006-surface-sam-over-hid"; + patch = patches + "/0006-surface-sam-over-hid.patch"; + } + { + name = "ms-surface/0007-surface-button"; + patch = patches + "/0007-surface-button.patch"; + } + { + name = "ms-surface/0008-surface-typecover"; + patch = patches + "/0008-surface-typecover.patch"; + } + { + name = "ms-surface/0009-surface-gpe"; + patch = patches + "/0009-surface-gpe.patch"; + } + { + name = "ms-surface/0010-cameras"; + patch = patches + "/0010-cameras.patch"; + } + { + name = "ms-surface/0011-amd-gpio"; + patch = patches + "/0011-amd-gpio.patch"; + } + ]; +} From 87adbffa11fc633470fe8411b477b77975c0a8f3 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 29 Nov 2022 00:00:31 +1300 Subject: [PATCH 0287/1476] Fix-ups --- microsoft/surface/kernel/default.nix | 35 +++++++++++++++++++++-- microsoft/surface/kernel/linux-5.19.2.nix | 7 +++-- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/kernel/default.nix index 354fe907..97fd1740 100644 --- a/microsoft/surface/kernel/default.nix +++ b/microsoft/surface/kernel/default.nix @@ -1,5 +1,36 @@ { config, lib, pkgs, ... }: -{ - boot.kernelPackages = pkgs.callPackage ./linux-5.16.11.nix { }; +# To test the kernel build: +# nix-build -E "with import {}; (pkgs.callPackage ./. {}).boot.kernelPackages.kernel" + +let + inherit (lib) kernel recurseIntoAttrs; + inherit (pkgs) buildLinux linuxPackagesFor; + repos = pkgs.callPackage ../repos.nix {}; + + linuxPackage = + { version, + modDirVersion ? version, + branch, + src, + kernelPatches ? [], + ... + }: let + buildLinux' = buildLinux { + inherit version src kernelPatches; + modDirVersion = version; + extraMeta.branch = branch; + }; + linuxPackagesFor' = linuxPackagesFor buildLinux'; + in recurseIntoAttrs linuxPackagesFor'; + + linux-5_16_11 = linuxPackage ( + pkgs.callPackage ./linux-5.16.11.nix { inherit repos; } + ); + linux-5_19_2 = linuxPackage ( + pkgs.callPackage ./linux-5.19.2.nix { inherit repos; } + ); + +in { + boot.kernelPackages = linux-5_19_2; } diff --git a/microsoft/surface/kernel/linux-5.19.2.nix b/microsoft/surface/kernel/linux-5.19.2.nix index f893e81e..c941b887 100644 --- a/microsoft/surface/kernel/linux-5.19.2.nix +++ b/microsoft/surface/kernel/linux-5.19.2.nix @@ -1,20 +1,21 @@ { lib, fetchurl, + repos, }: let inherit (lib) kernel; version = "5.19.2"; + branch = "5.19"; + patches = repos.linux-surface + "/patches/${branch}"; in { - inherit version; + inherit version branch; modDirVersion = version; - branch = "5.19"; src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; sha256 = "sha256-SOQKH1UB7GxA48htPVMZIAtojy2TYPcoMwhNdIAf5j0="; }; - patches = repos.linux-surface + "/patches/${branch}"; kernelPatches = [ { From e18b759b1bc093e08c69f9ce1086b990d8d3baa8 Mon Sep 17 00:00:00 2001 From: Alexandre Acebedo Date: Sat, 3 Dec 2022 17:19:05 +0100 Subject: [PATCH 0288/1476] Add support for GA402 --- README.md | 1 + asus/zephyrus/ga402/default.nix | 20 ++++++++++++++++++++ flake.nix | 1 + 3 files changed, 22 insertions(+) create mode 100644 asus/zephyrus/ga402/default.nix diff --git a/README.md b/README.md index a2396188..d420276c 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ See code for all available configurations. | [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | +| [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | | [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | diff --git a/asus/zephyrus/ga402/default.nix b/asus/zephyrus/ga402/default.nix new file mode 100644 index 00000000..de938ad3 --- /dev/null +++ b/asus/zephyrus/ga402/default.nix @@ -0,0 +1,20 @@ +{ ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ../../../common/pc/laptop + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/ssd + ]; + + services = { + asusd.enable = true; + }; + + boot = { + kernelParams = [ "pcie_aspm.policy=powersupersave" "acpi.prefer_microsoft_dsm_guid=1" ]; + }; +} diff --git a/flake.nix b/flake.nix index 602d2dc1..5c4f4c94 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,7 @@ asus-fx504gd = import ./asus/fx504gd; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; + asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; asus-zephyrus-ga503 = import ./asus/zephyrus/ga503; beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; dell-e7240 = import ./dell/e7240; From 56566dc47f906eda44b3622c11b75d40dc619e68 Mon Sep 17 00:00:00 2001 From: Alexandre Acebedo Date: Sat, 3 Dec 2022 17:38:26 +0100 Subject: [PATCH 0289/1476] fixup! Add support for GA402 --- asus/zephyrus/ga402/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asus/zephyrus/ga402/default.nix b/asus/zephyrus/ga402/default.nix index de938ad3..0208cfdd 100644 --- a/asus/zephyrus/ga402/default.nix +++ b/asus/zephyrus/ga402/default.nix @@ -1,4 +1,4 @@ -{ ... }: +{ lib, ... }: { imports = [ @@ -11,7 +11,7 @@ ]; services = { - asusd.enable = true; + asusd.enable = lib.mkDefault true; }; boot = { From f17316259fb4fcda31513e4d46568746644b9fb7 Mon Sep 17 00:00:00 2001 From: Alexandre Acebedo Date: Sat, 3 Dec 2022 17:41:33 +0100 Subject: [PATCH 0290/1476] fixup! Add support for GA402 --- asus/zephyrus/ga402/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/asus/zephyrus/ga402/default.nix b/asus/zephyrus/ga402/default.nix index 0208cfdd..3d666af4 100644 --- a/asus/zephyrus/ga402/default.nix +++ b/asus/zephyrus/ga402/default.nix @@ -6,7 +6,6 @@ ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd ../../../common/pc/laptop - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ]; From 250d6991c9f47142350ee8a37ca07f06b49a7eee Mon Sep 17 00:00:00 2001 From: Christoph Charles <23055925+christophcharles@users.noreply.github.com> Date: Sun, 4 Dec 2022 17:34:44 +0100 Subject: [PATCH 0291/1476] surface/kernel: 5.16.11 -> 5.19.17 --- microsoft/surface/kernel/default.nix | 2 +- microsoft/surface/kernel/linux-5.16.11.nix | 87 ------------ .../surface/kernel/linux-5.19.17/default.nix | 126 ++++++++++++++++++ .../kernel/linux-5.19.17/linux-5.19.17.nix | 22 +++ microsoft/surface/repos.nix | 8 +- 5 files changed, 153 insertions(+), 92 deletions(-) delete mode 100644 microsoft/surface/kernel/linux-5.16.11.nix create mode 100644 microsoft/surface/kernel/linux-5.19.17/default.nix create mode 100644 microsoft/surface/kernel/linux-5.19.17/linux-5.19.17.nix diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/kernel/default.nix index 354fe907..0f23cf60 100644 --- a/microsoft/surface/kernel/default.nix +++ b/microsoft/surface/kernel/default.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, ... }: { - boot.kernelPackages = pkgs.callPackage ./linux-5.16.11.nix { }; + boot.kernelPackages = pkgs.callPackage ./linux-5.19.17 { }; } diff --git a/microsoft/surface/kernel/linux-5.16.11.nix b/microsoft/surface/kernel/linux-5.16.11.nix deleted file mode 100644 index 022c0692..00000000 --- a/microsoft/surface/kernel/linux-5.16.11.nix +++ /dev/null @@ -1,87 +0,0 @@ -{ lib, callPackage, linuxPackagesFor, ... }: -# To test the kernel build: -# nix-build -E "with import {}; (pkgs.callPackage ./linux-5.16.11.nix {}).kernel" -let - repos = callPackage ../repos.nix {}; - linuxPkg = { fetchurl, buildLinux, ... }@args: - buildLinux (args // rec { - version = "5.16.11"; - modDirVersion = version; - extraMeta.branch = "5.16"; - - src = repos.linux-surface-kernel; - - kernelPatches = [{ - name = "microsoft-surface-patches-linux-5.16.2"; - patch = null; - structuredExtraConfig = with lib.kernel; { - # - # Surface Aggregator Module - # - SURFACE_AGGREGATOR = module; - SURFACE_AGGREGATOR_ERROR_INJECTION = no; - SURFACE_AGGREGATOR_BUS = yes; - SURFACE_AGGREGATOR_CDEV = module; - SURFACE_AGGREGATOR_REGISTRY = 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 laptop 1 keyboard - # - SERIAL_DEV_BUS = yes; - SERIAL_DEV_CTRL_TTYPORT = yes; - - # - # Surface Hotplug - # - SURFACE_HOTPLUG = 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_IPU3_IMGU = module; - VIDEO_IPU3_CIO2 = module; - CIO2_BRIDGE = yes; - INTEL_SKL_INT3472 = module; - - # - # Cameras: Sensor drivers - # - VIDEO_OV5693 = 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_BUTTON = module; - SURFACE_3_POWER_OPREGION = module; - SURFACE_PRO3_BUTTON = module; - SURFACE_GPE = module; - SURFACE_BOOK1_DGPU_SWITCH = module; - }; - }]; - } // (args.argsOverride or {})); -in lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg {})) diff --git a/microsoft/surface/kernel/linux-5.19.17/default.nix b/microsoft/surface/kernel/linux-5.19.17/default.nix new file mode 100644 index 00000000..1be27241 --- /dev/null +++ b/microsoft/surface/kernel/linux-5.19.17/default.nix @@ -0,0 +1,126 @@ +{ config, lib, pkgs, ... }: +let + repos = (pkgs.callPackage ../../repos.nix { }); + patches = repos.linux-surface + "/patches"; + surface_kernelPatches = [ + { + name = "microsoft-surface-patches-linux-5.19.17"; + patch = null; + structuredExtraConfig = with lib.kernel; { + # + # Surface Aggregator Module + # + SURFACE_AGGREGATOR = module; + SURFACE_AGGREGATOR_ERROR_INJECTION = no; + SURFACE_AGGREGATOR_BUS = yes; + SURFACE_AGGREGATOR_CDEV = module; + SURFACE_AGGREGATOR_REGISTRY = 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 laptop 1 keyboard + # + SERIAL_DEV_BUS = yes; + SERIAL_DEV_CTRL_TTYPORT = yes; + + # + # Surface Hotplug + # + SURFACE_HOTPLUG = 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_IPU3_IMGU = module; + VIDEO_IPU3_CIO2 = module; + CIO2_BRIDGE = yes; + INTEL_SKL_INT3472 = module; + + # + # Cameras: Sensor drivers + # + VIDEO_OV5693 = 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_BUTTON = 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 = patches + "/5.19/0001-surface3-oemb.patch"; + } + { + name = "ms-surface/0002-mwifiex"; + patch = patches + "/5.19/0002-mwifiex.patch"; + } + { + name = "ms-surface/0003-ath10k"; + patch = patches + "/5.19/0003-ath10k.patch"; + } + { + name = "ms-surface/0004-ipts"; + patch = patches + "/5.19/0004-ipts.patch"; + } + { + name = "ms-surface/0005-surface-sam"; + patch = patches + "/5.19/0005-surface-sam.patch"; + } + { + name = "ms-surface/0006-surface-sam-over-hid"; + patch = patches + "/5.19/0006-surface-sam-over-hid.patch"; + } + { + name = "ms-surface/0007-surface-button"; + patch = patches + "/5.19/0007-surface-button.patch"; + } + { + name = "ms-surface/0008-surface-typecover"; + patch = patches + "/5.19/0008-surface-typecover.patch"; + } + { + name = "ms-surface/0009-surface-gpe"; + patch = patches + "/5.19/0009-surface-gpe.patch"; + } + { + name = "ms-surface/0010-cameras"; + patch = patches + "/5.19/0010-cameras.patch"; + } + { + name = "ms-surface/0011-amd-gpio"; + patch = patches + "/5.19/0011-amd-gpio.patch"; + } + ]; +in (with pkgs; + recurseIntoAttrs (linuxPackagesFor (callPackage ./linux-5.19.17.nix { + kernelPatches = surface_kernelPatches; + }))) diff --git a/microsoft/surface/kernel/linux-5.19.17/linux-5.19.17.nix b/microsoft/surface/kernel/linux-5.19.17/linux-5.19.17.nix new file mode 100644 index 00000000..6cc725eb --- /dev/null +++ b/microsoft/surface/kernel/linux-5.19.17/linux-5.19.17.nix @@ -0,0 +1,22 @@ +{ lib, stdenv, buildPackages, fetchurl, perl, buildLinux +, modDirVersionArg ? null, ... }@args: + +with lib; + +buildLinux (args // rec { + version = "5.19.17"; + + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = if (modDirVersionArg == null) then + concatStringsSep "." (take 3 (splitVersion "${version}.0")) + else + modDirVersionArg; + + # branchVersion needs to be x.y + extraMeta.branch = versions.majorMinor version; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; + sha256 = "sha256-yTuzhKl60fCk8Y5ELOApEkJyL3gCPspliyI0RUHwlIk="; + }; +} // (args.argsOverride or { })) diff --git a/microsoft/surface/repos.nix b/microsoft/surface/repos.nix index 1ee00b9a..c2feeb37 100644 --- a/microsoft/surface/repos.nix +++ b/microsoft/surface/repos.nix @@ -1,9 +1,9 @@ { lib, pkgs, fetchFromGitHub, fetchurl }: { - linux-surface-kernel = fetchFromGitHub { + linux-surface = fetchFromGitHub { owner = "linux-surface"; - repo = "kernel"; - rev = "db94c89f56d6ceae03ca3802e11197f48e6c539f"; - sha256 = "0c58ri0i9gdb4w7l361pnkvq6ap17kmgnxngh0bcdmgn4dc88wx2"; + repo = "linux-surface"; + rev = "fe2bed0f88a1803d87cd1805dc81272be32844ae"; + sha256 = "sha256-sOJ4oN1F+/bNrGcqxh2IG4rn6twu//TExnn+qmQPW/0="; }; ath10k-firmware = fetchFromGitHub { From 87597ab307c5eaae6142f9adcfb1e47dac472eec Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 5 Dec 2022 13:37:20 +1300 Subject: [PATCH 0292/1476] Remove obsolete files --- microsoft/surface/kernel/linux-5.16.11.nix | 91 ---------------------- microsoft/surface/kernel/linux-5.19.2.nix | 72 ----------------- 2 files changed, 163 deletions(-) delete mode 100644 microsoft/surface/kernel/linux-5.16.11.nix delete mode 100644 microsoft/surface/kernel/linux-5.19.2.nix diff --git a/microsoft/surface/kernel/linux-5.16.11.nix b/microsoft/surface/kernel/linux-5.16.11.nix deleted file mode 100644 index 60835316..00000000 --- a/microsoft/surface/kernel/linux-5.16.11.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ lib, - repos, -}: - -let - inherit (lib) kernel; - version = "5.16.11"; - -in { - inherit version; - modDirVersion = version; - branch = "5.16"; - src = repos.linux-surface-kernel { - # Kernel 5.16.11 from the linux-surface/kernel repo: - rev = "db94c89f56d6ceae03ca3802e11197f48e6c539f"; - sha256 = "0c58ri0i9gdb4w7l361pnkvq6ap17kmgnxngh0bcdmgn4dc88wx2"; - }; - kernelPatches = [{ - name = "microsoft-surface-patches-linux-${version}"; - patch = null; - structuredExtraConfig = with kernel; { - # - # Surface Aggregator Module - # - SURFACE_AGGREGATOR = module; - SURFACE_AGGREGATOR_ERROR_INJECTION = no; - SURFACE_AGGREGATOR_BUS = yes; - SURFACE_AGGREGATOR_CDEV = module; - SURFACE_AGGREGATOR_REGISTRY = 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 laptop 1 keyboard - # - SERIAL_DEV_BUS = yes; - SERIAL_DEV_CTRL_TTYPORT = yes; - - # - # Surface Hotplug - # - SURFACE_HOTPLUG = 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_IPU3_IMGU = module; - VIDEO_IPU3_CIO2 = module; - CIO2_BRIDGE = yes; - INTEL_SKL_INT3472 = module; - - # - # Cameras: Sensor drivers - # - VIDEO_OV5693 = 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_BUTTON = module; - SURFACE_3_POWER_OPREGION = module; - SURFACE_PRO3_BUTTON = module; - SURFACE_GPE = module; - SURFACE_BOOK1_DGPU_SWITCH = module; - }; - }]; -} - diff --git a/microsoft/surface/kernel/linux-5.19.2.nix b/microsoft/surface/kernel/linux-5.19.2.nix deleted file mode 100644 index c941b887..00000000 --- a/microsoft/surface/kernel/linux-5.19.2.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ lib, - fetchurl, - repos, -}: - -let - inherit (lib) kernel; - version = "5.19.2"; - branch = "5.19"; - patches = repos.linux-surface + "/patches/${branch}"; - -in { - inherit version branch; - modDirVersion = version; - src = fetchurl { - url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "sha256-SOQKH1UB7GxA48htPVMZIAtojy2TYPcoMwhNdIAf5j0="; - }; - - kernelPatches = [ - { - name = "microsoft-surface-patches-linux-${version}"; - patch = null; - structuredExtraConfig = with lib.kernel; { - }; - } - { - name = "ms-surface/0001-surface3-oemb"; - patch = patches + "/0001-surface3-oemb.patch"; - } - { - name = "ms-surface/0002-mwifiex"; - patch = patches + "/0002-mwifiex.patch"; - } - { - name = "ms-surface/0003-ath10k"; - patch = patches + "/0003-ath10k.patch"; - } - { - name = "ms-surface/0004-ipts"; - patch = patches + "/0004-ipts.patch"; - } - { - name = "ms-surface/0005-surface-sam"; - patch = patches + "/0005-surface-sam.patch"; - } - { - name = "ms-surface/0006-surface-sam-over-hid"; - patch = patches + "/0006-surface-sam-over-hid.patch"; - } - { - name = "ms-surface/0007-surface-button"; - patch = patches + "/0007-surface-button.patch"; - } - { - name = "ms-surface/0008-surface-typecover"; - patch = patches + "/0008-surface-typecover.patch"; - } - { - name = "ms-surface/0009-surface-gpe"; - patch = patches + "/0009-surface-gpe.patch"; - } - { - name = "ms-surface/0010-cameras"; - patch = patches + "/0010-cameras.patch"; - } - { - name = "ms-surface/0011-amd-gpio"; - patch = patches + "/0011-amd-gpio.patch"; - } - ]; -} From b01a6d58df799cd87ba9cf9a2b23ecb114d5e221 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 5 Dec 2022 13:38:14 +1300 Subject: [PATCH 0293/1476] Remove obsolete file --- microsoft/surface/kernel/linux-5.16.11.nix | 91 ---------------------- 1 file changed, 91 deletions(-) delete mode 100644 microsoft/surface/kernel/linux-5.16.11.nix diff --git a/microsoft/surface/kernel/linux-5.16.11.nix b/microsoft/surface/kernel/linux-5.16.11.nix deleted file mode 100644 index 60835316..00000000 --- a/microsoft/surface/kernel/linux-5.16.11.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ lib, - repos, -}: - -let - inherit (lib) kernel; - version = "5.16.11"; - -in { - inherit version; - modDirVersion = version; - branch = "5.16"; - src = repos.linux-surface-kernel { - # Kernel 5.16.11 from the linux-surface/kernel repo: - rev = "db94c89f56d6ceae03ca3802e11197f48e6c539f"; - sha256 = "0c58ri0i9gdb4w7l361pnkvq6ap17kmgnxngh0bcdmgn4dc88wx2"; - }; - kernelPatches = [{ - name = "microsoft-surface-patches-linux-${version}"; - patch = null; - structuredExtraConfig = with kernel; { - # - # Surface Aggregator Module - # - SURFACE_AGGREGATOR = module; - SURFACE_AGGREGATOR_ERROR_INJECTION = no; - SURFACE_AGGREGATOR_BUS = yes; - SURFACE_AGGREGATOR_CDEV = module; - SURFACE_AGGREGATOR_REGISTRY = 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 laptop 1 keyboard - # - SERIAL_DEV_BUS = yes; - SERIAL_DEV_CTRL_TTYPORT = yes; - - # - # Surface Hotplug - # - SURFACE_HOTPLUG = 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_IPU3_IMGU = module; - VIDEO_IPU3_CIO2 = module; - CIO2_BRIDGE = yes; - INTEL_SKL_INT3472 = module; - - # - # Cameras: Sensor drivers - # - VIDEO_OV5693 = 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_BUTTON = module; - SURFACE_3_POWER_OPREGION = module; - SURFACE_PRO3_BUTTON = module; - SURFACE_GPE = module; - SURFACE_BOOK1_DGPU_SWITCH = module; - }; - }]; -} - From d2b7a0fb9a62feb21e98ea43da2cda787132bd92 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 5 Dec 2022 14:40:24 +1300 Subject: [PATCH 0294/1476] Kernel 6.0.11 for MS Surface Devices --- microsoft/surface/kernel/default.nix | 4 -- microsoft/surface/kernel/linux-6.0.11.nix | 65 +++++++++++++++++++++++ 2 files changed, 65 insertions(+), 4 deletions(-) diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/kernel/default.nix index 2a17bbb2..74293ff6 100644 --- a/microsoft/surface/kernel/default.nix +++ b/microsoft/surface/kernel/default.nix @@ -33,9 +33,5 @@ let ); in { -<<<<<<< Updated upstream - boot.kernelPackages = linux-5_19_17; -======= boot.kernelPackages = linux-6_0_11; ->>>>>>> Stashed changes } diff --git a/microsoft/surface/kernel/linux-6.0.11.nix b/microsoft/surface/kernel/linux-6.0.11.nix index 6cfd457f..1eb2f84d 100644 --- a/microsoft/surface/kernel/linux-6.0.11.nix +++ b/microsoft/surface/kernel/linux-6.0.11.nix @@ -22,6 +22,71 @@ in { name = "microsoft-surface-patches-linux-${version}"; patch = null; structuredExtraConfig = with lib.kernel; { + # + # Surface Aggregator Module + # + CONFIG_SURFACE_AGGREGATOR = module; + CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION = no; + CONFIG_SURFACE_AGGREGATOR_BUS = yes; + CONFIG_SURFACE_AGGREGATOR_CDEV = module; + CONFIG_SURFACE_AGGREGATOR_HUB = module; + CONFIG_SURFACE_AGGREGATOR_REGISTRY = module; + CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH = module; + + CONFIG_SURFACE_ACPI_NOTIFY = module; + CONFIG_SURFACE_DTX = module; + CONFIG_SURFACE_PLATFORM_PROFILE = module; + + CONFIG_SURFACE_HID = module; + CONFIG_SURFACE_KBD = module; + + CONFIG_BATTERY_SURFACE = module; + CONFIG_CHARGER_SURFACE = module; + + # + # Surface Hotplug + # + CONFIG_SURFACE_HOTPLUG = module; + + # + # IPTS touchscreen + # + # This only enables the user interface for IPTS data. + # For the touchscreen to work, you need to install iptsd. + # + CONFIG_MISC_IPTS = module; + + # + # Cameras: IPU3 + # + CONFIG_VIDEO_DW9719 = module; + CONFIG_VIDEO_IPU3_IMGU = module; + CONFIG_VIDEO_IPU3_CIO2 = module; + CONFIG_CIO2_BRIDGE = yes; + CONFIG_INTEL_SKL_INT3472 = module; + CONFIG_REGULATOR_TPS68470 = module; + CONFIG_COMMON_CLK_TPS68470 = module; + + # + # Cameras: Sensor drivers + # + CONFIG_VIDEO_OV5693 = module; + CONFIG_VIDEO_OV7251 = module; + CONFIG_VIDEO_OV8865 = module; + + # + # ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 + # + CONFIG_APDS9960 = module; + + # + # Other Drivers + # + CONFIG_INPUT_SOC_BUTTON_ARRAY = module; + CONFIG_SURFACE_3_POWER_OPREGION = module; + CONFIG_SURFACE_PRO3_BUTTON = module; + CONFIG_SURFACE_GPE = module; + CONFIG_SURFACE_BOOK1_DGPU_SWITCH = module; }; } { From f99c9d5b1f537f60ec371a2105b7dae8073ff735 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 5 Dec 2022 16:01:37 +1300 Subject: [PATCH 0295/1476] Tidy-up --- microsoft/surface/default.nix | 28 +++++++++++++------ .../surface-go/ath10k/ath10k-replace.nix | 7 +++-- .../firmware/surface-go/ath10k/default.nix | 13 +++++---- microsoft/surface/kernel/linux-5.19.17.nix | 5 +--- microsoft/surface/repos.nix | 4 ++- 5 files changed, 36 insertions(+), 21 deletions(-) diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 56dfd07d..da01f16f 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -1,10 +1,15 @@ -{ config, lib, pkgs, ... }: { +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkDefault; + +in { imports = [ ./kernel ./firmware/surface-go/ath10k ]; - boot.extraModprobeConfig = lib.mkDefault '' + boot.extraModprobeConfig = mkDefault '' options i915 enable_fbc=1 enable_rc6=1 modeset=1 options snd_hda_intel power_save=1 options snd_ac97_codec power_save=1 @@ -15,18 +20,25 @@ boot.kernelParams = [ "mem_sleep_default=deep" ]; # NOTE: Check the README before enabling TLP: - services.tlp.enable = lib.mkDefault false; + services.tlp.enable = mkDefault false; # i.e. needed for wifi firmware, see https://github.com/NixOS/nixos-hardware/issues/364 - hardware.enableRedistributableFirmware = lib.mkDefault true; - hardware.sensor.iio.enable = lib.mkDefault true; + hardware.enableRedistributableFirmware = mkDefault true; + hardware.sensor.iio.enable = mkDefault true; - environment.systemPackages = with pkgs; [ surface-control ]; + environment.systemPackages = [ + pkgs.surface-control + ]; users.groups.surface-control = { }; - services.udev.packages = [ pkgs.surface-control ]; + services.udev.packages = [ + pkgs.surface-control + ]; + systemd.services.iptsd = { description = "IPTSD"; script = "${pkgs.iptsd}/bin/iptsd"; - wantedBy = [ "multi-user.target" ]; + wantedBy = [ + "multi-user.target" + ]; }; } diff --git a/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix b/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix index be0e4fea..e62307d0 100644 --- a/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix +++ b/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix @@ -1,9 +1,10 @@ -{stdenv, lib, pkgs, firmwareLinuxNonfree, ...}: +{ stdenv, lib, pkgs, firmwareLinuxNonfree, ... }: + let repos = (pkgs.callPackage ../../../repos.nix {}); killernetworking_firmware = repos.surface-go-ath10k-firmware_backup + "/K1535_Debian"; -in -stdenv.mkDerivation { + +in stdenv.mkDerivation { pname = "microsoft-surface-go-firmware-linux-nonfree"; inherit (firmwareLinuxNonfree) version; src = firmwareLinuxNonfree; diff --git a/microsoft/surface/firmware/surface-go/ath10k/default.nix b/microsoft/surface/firmware/surface-go/ath10k/default.nix index b23fe2e5..f861f8eb 100644 --- a/microsoft/surface/firmware/surface-go/ath10k/default.nix +++ b/microsoft/surface/firmware/surface-go/ath10k/default.nix @@ -1,21 +1,24 @@ { config, lib, pkgs, ... }: + let + inherit (lib) mkDefault mkEnableOption mkIf; + cfg = config.hardware.microsoft-surface.firmware.surface-go-ath10k; -in -{ + +in { options = { hardware.microsoft-surface.firmware.surface-go-ath10k = { - replace = lib.mkEnableOption ''Use the "board.bin" firmware for ath10k-based WiFi on Surface Go.''; + replace = mkEnableOption ''Use the "board.bin" firmware for ath10k-based WiFi on Surface Go.''; }; }; - config = lib.mkIf cfg.replace { + config = mkIf cfg.replace { hardware.enableAllFirmware = true; hardware.firmware = [ (pkgs.callPackage ./ath10k-replace.nix {}) ]; - boot.extraModprobeConfig = lib.mkDefault '' + boot.extraModprobeConfig = mkDefault '' options ath10k_core skip_otp=Y ''; }; diff --git a/microsoft/surface/kernel/linux-5.19.17.nix b/microsoft/surface/kernel/linux-5.19.17.nix index 6093c9b4..ddd8c912 100644 --- a/microsoft/surface/kernel/linux-5.19.17.nix +++ b/microsoft/surface/kernel/linux-5.19.17.nix @@ -1,7 +1,4 @@ -{ lib, - fetchurl, - repos, -}: +{ lib, fetchurl, repos,}: let inherit (lib) kernel; diff --git a/microsoft/surface/repos.nix b/microsoft/surface/repos.nix index 586d0943..b5f3f053 100644 --- a/microsoft/surface/repos.nix +++ b/microsoft/surface/repos.nix @@ -1,4 +1,6 @@ -{ fetchFromGitHub, fetchurl }: { +{ fetchFromGitHub, fetchurl }: + +{ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; From e37520e48b3882f4ec773d2e56d41dd914cae34d Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 5 Dec 2022 17:32:25 +1300 Subject: [PATCH 0296/1476] Rearrange the kernels to make them self-defining --- microsoft/surface/default.nix | 2 + microsoft/surface/kernel/default.nix | 37 ++--- microsoft/surface/kernel/linux-5.19.17.nix | 135 ---------------- .../surface/kernel/linux-5.19.17/default.nix | 153 ++++++++++++++++++ microsoft/surface/kernel/linux-package.nix | 23 +++ 5 files changed, 188 insertions(+), 162 deletions(-) delete mode 100644 microsoft/surface/kernel/linux-5.19.17.nix create mode 100644 microsoft/surface/kernel/linux-5.19.17/default.nix create mode 100644 microsoft/surface/kernel/linux-package.nix diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index da01f16f..e193d2a0 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -9,6 +9,8 @@ in { ./firmware/surface-go/ath10k ]; + microsoft-surface.kernel-version = mkDefault "5.19.17"; + boot.extraModprobeConfig = mkDefault '' options i915 enable_fbc=1 enable_rc6=1 modeset=1 options snd_hda_intel power_save=1 diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/kernel/default.nix index 893f1bde..0c8dcfce 100644 --- a/microsoft/surface/kernel/default.nix +++ b/microsoft/surface/kernel/default.nix @@ -1,33 +1,16 @@ { config, lib, pkgs, ... }: -# To test the kernel build: -# nix-build -E "with import {}; (pkgs.callPackage ./. {}).boot.kernelPackages.kernel" - let - inherit (lib) kernel recurseIntoAttrs; - inherit (pkgs) buildLinux linuxPackagesFor; - repos = pkgs.callPackage ../repos.nix {}; - - linuxPackage = - { version, - modDirVersion ? version, - branch, - src, - kernelPatches ? [], - ... - }: let - buildLinux' = buildLinux { - inherit version src kernelPatches; - modDirVersion = version; - extraMeta.branch = branch; - }; - linuxPackagesFor' = linuxPackagesFor buildLinux'; - in recurseIntoAttrs linuxPackagesFor'; - - linux-5_19_17 = linuxPackage ( - pkgs.callPackage ./linux-5.19.17.nix { inherit repos; } - ); + inherit (lib) mkOption types; in { - boot.kernelPackages = linux-5_19_17; + imports = [ + ./linux-5.19.17 + ]; + + options.microsoft-surface.kernel-version = mkOption { + description = "Kernel Version to use (patched for MS Surface)"; + type = types.enum [ ]; + # default = "5.19.17"; + }; } diff --git a/microsoft/surface/kernel/linux-5.19.17.nix b/microsoft/surface/kernel/linux-5.19.17.nix deleted file mode 100644 index ddd8c912..00000000 --- a/microsoft/surface/kernel/linux-5.19.17.nix +++ /dev/null @@ -1,135 +0,0 @@ -{ lib, fetchurl, repos,}: - -let - inherit (lib) kernel; - version = "5.19.17"; - branch = "5.19"; - patches = repos.linux-surface + "/patches/${branch}"; - -in { - inherit version branch; - modDirVersion = version; - src = fetchurl { - url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "sha256-yTuzhKl60fCk8Y5ELOApEkJyL3gCPspliyI0RUHwlIk="; - }; - - kernelPatches = [ - { - name = "microsoft-surface-patches-linux-${version}"; - patch = null; - structuredExtraConfig = with lib.kernel; { - # - # Surface Aggregator Module - # - SURFACE_AGGREGATOR = module; - SURFACE_AGGREGATOR_ERROR_INJECTION = no; - SURFACE_AGGREGATOR_BUS = yes; - SURFACE_AGGREGATOR_CDEV = module; - SURFACE_AGGREGATOR_REGISTRY = 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 laptop 1 keyboard - # - SERIAL_DEV_BUS = yes; - SERIAL_DEV_CTRL_TTYPORT = yes; - - # - # Surface Hotplug - # - SURFACE_HOTPLUG = 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_IPU3_IMGU = module; - VIDEO_IPU3_CIO2 = module; - CIO2_BRIDGE = yes; - INTEL_SKL_INT3472 = module; - - # - # Cameras: Sensor drivers - # - VIDEO_OV5693 = 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_BUTTON = 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 = patches + "/0001-surface3-oemb.patch"; - } - { - name = "ms-surface/0002-mwifiex"; - patch = patches + "/0002-mwifiex.patch"; - } - { - name = "ms-surface/0003-ath10k"; - patch = patches + "/0003-ath10k.patch"; - } - { - name = "ms-surface/0004-ipts"; - patch = patches + "/0004-ipts.patch"; - } - { - name = "ms-surface/0005-surface-sam"; - patch = patches + "/0005-surface-sam.patch"; - } - { - name = "ms-surface/0006-surface-sam-over-hid"; - patch = patches + "/0006-surface-sam-over-hid.patch"; - } - { - name = "ms-surface/0007-surface-button"; - patch = patches + "/0007-surface-button.patch"; - } - { - name = "ms-surface/0008-surface-typecover"; - patch = patches + "/0008-surface-typecover.patch"; - } - { - name = "ms-surface/0009-surface-gpe"; - patch = patches + "/0009-surface-gpe.patch"; - } - { - name = "ms-surface/0010-cameras"; - patch = patches + "/0010-cameras.patch"; - } - { - name = "ms-surface/0011-amd-gpio"; - patch = patches + "/0011-amd-gpio.patch"; - } - ]; -} diff --git a/microsoft/surface/kernel/linux-5.19.17/default.nix b/microsoft/surface/kernel/linux-5.19.17/default.nix new file mode 100644 index 00000000..e1bf29da --- /dev/null +++ b/microsoft/surface/kernel/linux-5.19.17/default.nix @@ -0,0 +1,153 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) kernel mkIf mkOption types; + inherit (pkgs) fetchurl; + + inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage repos; + + cfg = config.microsoft-surface.kernel-version; + + version = "5.19.17"; + extraMeta.branch = "5.19"; + patches = repos.linux-surface + "/patches/${extraMeta.branch}"; + + kernelPackages = linuxPackage { + inherit version extraMeta; + # modDirVersion = version; + src = fetchurl { + url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; + sha256 = "sha256-yTuzhKl60fCk8Y5ELOApEkJyL3gCPspliyI0RUHwlIk="; + }; + + kernelPatches = [ + { + name = "microsoft-surface-patches-linux-${version}"; + patch = null; + structuredExtraConfig = with lib.kernel; { + # + # Surface Aggregator Module + # + SURFACE_AGGREGATOR = module; + SURFACE_AGGREGATOR_ERROR_INJECTION = no; + SURFACE_AGGREGATOR_BUS = yes; + SURFACE_AGGREGATOR_CDEV = module; + SURFACE_AGGREGATOR_REGISTRY = 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 laptop 1 keyboard + # + SERIAL_DEV_BUS = yes; + SERIAL_DEV_CTRL_TTYPORT = yes; + + # + # Surface Hotplug + # + SURFACE_HOTPLUG = 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_IPU3_IMGU = module; + VIDEO_IPU3_CIO2 = module; + CIO2_BRIDGE = yes; + INTEL_SKL_INT3472 = module; + + # + # Cameras: Sensor drivers + # + VIDEO_OV5693 = 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_BUTTON = 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 = patches + "/0001-surface3-oemb.patch"; + } + { + name = "ms-surface/0002-mwifiex"; + patch = patches + "/0002-mwifiex.patch"; + } + { + name = "ms-surface/0003-ath10k"; + patch = patches + "/0003-ath10k.patch"; + } + { + name = "ms-surface/0004-ipts"; + patch = patches + "/0004-ipts.patch"; + } + { + name = "ms-surface/0005-surface-sam"; + patch = patches + "/0005-surface-sam.patch"; + } + { + name = "ms-surface/0006-surface-sam-over-hid"; + patch = patches + "/0006-surface-sam-over-hid.patch"; + } + { + name = "ms-surface/0007-surface-button"; + patch = patches + "/0007-surface-button.patch"; + } + { + name = "ms-surface/0008-surface-typecover"; + patch = patches + "/0008-surface-typecover.patch"; + } + { + name = "ms-surface/0009-surface-gpe"; + patch = patches + "/0009-surface-gpe.patch"; + } + { + name = "ms-surface/0010-cameras"; + patch = patches + "/0010-cameras.patch"; + } + { + name = "ms-surface/0011-amd-gpio"; + patch = patches + "/0011-amd-gpio.patch"; + } + ]; + }; + +in { + options.microsoft-surface.kernel-version = mkOption { + type = types.enum [ "5.19.17" ]; + }; + + config = mkIf (cfg == "5.19.17") { + boot = { + inherit kernelPackages; + }; + }; +} diff --git a/microsoft/surface/kernel/linux-package.nix b/microsoft/surface/kernel/linux-package.nix new file mode 100644 index 00000000..4858e4f5 --- /dev/null +++ b/microsoft/surface/kernel/linux-package.nix @@ -0,0 +1,23 @@ +{ lib, + buildLinux, + callPackage, + fetchurl, + linuxPackagesFor, +}: + +let + inherit (lib) kernel recurseIntoAttrs; + +in { + repos = callPackage ../repos.nix {}; + + linuxPackage = + { version, + modDirVersion ? version, + ... + } @ args: + let + buildLinux' = buildLinux (args // { inherit modDirVersion; }); + linuxPackagesFor' = linuxPackagesFor buildLinux'; + in recurseIntoAttrs linuxPackagesFor'; +} From e84ab22523d77f340594282b130ebcfbbdb93a5b Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 5 Dec 2022 17:38:21 +1300 Subject: [PATCH 0297/1476] Extract the kernel patches out --- .../surface/kernel/linux-5.19.17/default.nix | 130 +----------------- .../surface/kernel/linux-5.19.17/patches.nix | 123 +++++++++++++++++ 2 files changed, 130 insertions(+), 123 deletions(-) create mode 100644 microsoft/surface/kernel/linux-5.19.17/patches.nix diff --git a/microsoft/surface/kernel/linux-5.19.17/default.nix b/microsoft/surface/kernel/linux-5.19.17/default.nix index e1bf29da..d33a43e0 100644 --- a/microsoft/surface/kernel/linux-5.19.17/default.nix +++ b/microsoft/surface/kernel/linux-5.19.17/default.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let - inherit (lib) kernel mkIf mkOption types; + inherit (lib) mkIf mkOption types; inherit (pkgs) fetchurl; inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage repos; @@ -10,134 +10,18 @@ let version = "5.19.17"; extraMeta.branch = "5.19"; - patches = repos.linux-surface + "/patches/${extraMeta.branch}"; + patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; + kernelPatches = pkgs.callPackage ./patches.nix { + inherit (lib) kernel; + inherit version patchDir; + }; kernelPackages = linuxPackage { - inherit version extraMeta; - # modDirVersion = version; + inherit version extraMeta kernelPatches; src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; sha256 = "sha256-yTuzhKl60fCk8Y5ELOApEkJyL3gCPspliyI0RUHwlIk="; }; - - kernelPatches = [ - { - name = "microsoft-surface-patches-linux-${version}"; - patch = null; - structuredExtraConfig = with lib.kernel; { - # - # Surface Aggregator Module - # - SURFACE_AGGREGATOR = module; - SURFACE_AGGREGATOR_ERROR_INJECTION = no; - SURFACE_AGGREGATOR_BUS = yes; - SURFACE_AGGREGATOR_CDEV = module; - SURFACE_AGGREGATOR_REGISTRY = 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 laptop 1 keyboard - # - SERIAL_DEV_BUS = yes; - SERIAL_DEV_CTRL_TTYPORT = yes; - - # - # Surface Hotplug - # - SURFACE_HOTPLUG = 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_IPU3_IMGU = module; - VIDEO_IPU3_CIO2 = module; - CIO2_BRIDGE = yes; - INTEL_SKL_INT3472 = module; - - # - # Cameras: Sensor drivers - # - VIDEO_OV5693 = 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_BUTTON = 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 = patches + "/0001-surface3-oemb.patch"; - } - { - name = "ms-surface/0002-mwifiex"; - patch = patches + "/0002-mwifiex.patch"; - } - { - name = "ms-surface/0003-ath10k"; - patch = patches + "/0003-ath10k.patch"; - } - { - name = "ms-surface/0004-ipts"; - patch = patches + "/0004-ipts.patch"; - } - { - name = "ms-surface/0005-surface-sam"; - patch = patches + "/0005-surface-sam.patch"; - } - { - name = "ms-surface/0006-surface-sam-over-hid"; - patch = patches + "/0006-surface-sam-over-hid.patch"; - } - { - name = "ms-surface/0007-surface-button"; - patch = patches + "/0007-surface-button.patch"; - } - { - name = "ms-surface/0008-surface-typecover"; - patch = patches + "/0008-surface-typecover.patch"; - } - { - name = "ms-surface/0009-surface-gpe"; - patch = patches + "/0009-surface-gpe.patch"; - } - { - name = "ms-surface/0010-cameras"; - patch = patches + "/0010-cameras.patch"; - } - { - name = "ms-surface/0011-amd-gpio"; - patch = patches + "/0011-amd-gpio.patch"; - } - ]; }; in { diff --git a/microsoft/surface/kernel/linux-5.19.17/patches.nix b/microsoft/surface/kernel/linux-5.19.17/patches.nix new file mode 100644 index 00000000..86a71415 --- /dev/null +++ b/microsoft/surface/kernel/linux-5.19.17/patches.nix @@ -0,0 +1,123 @@ +{ kernel, + patchDir, + version, +}: + +[ + { + name = "microsoft-surface-patches-linux-${version}"; + patch = null; + structuredExtraConfig = with kernel; { + # + # Surface Aggregator Module + # + SURFACE_AGGREGATOR = module; + SURFACE_AGGREGATOR_ERROR_INJECTION = no; + SURFACE_AGGREGATOR_BUS = yes; + SURFACE_AGGREGATOR_CDEV = module; + SURFACE_AGGREGATOR_REGISTRY = 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 laptop 1 keyboard + # + SERIAL_DEV_BUS = yes; + SERIAL_DEV_CTRL_TTYPORT = yes; + + # + # Surface Hotplug + # + SURFACE_HOTPLUG = 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_IPU3_IMGU = module; + VIDEO_IPU3_CIO2 = module; + CIO2_BRIDGE = yes; + INTEL_SKL_INT3472 = module; + + # + # Cameras: Sensor drivers + # + VIDEO_OV5693 = 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_BUTTON = 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-surface-sam"; + patch = patchDir + "/0005-surface-sam.patch"; + } + { + name = "ms-surface/0006-surface-sam-over-hid"; + patch = patchDir + "/0006-surface-sam-over-hid.patch"; + } + { + name = "ms-surface/0007-surface-button"; + patch = patchDir + "/0007-surface-button.patch"; + } + { + name = "ms-surface/0008-surface-typecover"; + patch = patchDir + "/0008-surface-typecover.patch"; + } + { + name = "ms-surface/0009-surface-gpe"; + patch = patchDir + "/0009-surface-gpe.patch"; + } + { + name = "ms-surface/0010-cameras"; + patch = patchDir + "/0010-cameras.patch"; + } + { + name = "ms-surface/0011-amd-gpio"; + patch = patchDir + "/0011-amd-gpio.patch"; + } +] From be728899cfc9c9c53910b5f1bb928c06fd6688ff Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 5 Dec 2022 17:39:24 +1300 Subject: [PATCH 0298/1476] Tidy-up --- microsoft/surface/default.nix | 2 +- microsoft/surface/kernel/default.nix | 5 ++--- microsoft/surface/kernel/linux-5.19.17/default.nix | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index e193d2a0..22f6c6c4 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -9,7 +9,7 @@ in { ./firmware/surface-go/ath10k ]; - microsoft-surface.kernel-version = mkDefault "5.19.17"; + microsoft-surface.kernelVersion = mkDefault "5.19.17"; boot.extraModprobeConfig = mkDefault '' options i915 enable_fbc=1 enable_rc6=1 modeset=1 diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/kernel/default.nix index 0c8dcfce..627ed3d3 100644 --- a/microsoft/surface/kernel/default.nix +++ b/microsoft/surface/kernel/default.nix @@ -8,9 +8,8 @@ in { ./linux-5.19.17 ]; - options.microsoft-surface.kernel-version = mkOption { + options.microsoft-surface.kernelVersion = mkOption { description = "Kernel Version to use (patched for MS Surface)"; - type = types.enum [ ]; - # default = "5.19.17"; + type = types.enum [ ]; }; } diff --git a/microsoft/surface/kernel/linux-5.19.17/default.nix b/microsoft/surface/kernel/linux-5.19.17/default.nix index d33a43e0..6cc1830b 100644 --- a/microsoft/surface/kernel/linux-5.19.17/default.nix +++ b/microsoft/surface/kernel/linux-5.19.17/default.nix @@ -6,7 +6,7 @@ let inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage repos; - cfg = config.microsoft-surface.kernel-version; + cfg = config.microsoft-surface; version = "5.19.17"; extraMeta.branch = "5.19"; @@ -25,11 +25,11 @@ let }; in { - options.microsoft-surface.kernel-version = mkOption { + options.microsoft-surface.kernelVersion = mkOption { type = types.enum [ "5.19.17" ]; }; - config = mkIf (cfg == "5.19.17") { + config = mkIf (cfg.kernelVersion == "5.19.17") { boot = { inherit kernelPackages; }; From cd760508241d2bfe18c2aed64cee04043694ac14 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 5 Dec 2022 17:51:33 +1300 Subject: [PATCH 0299/1476] Update for code refactor --- microsoft/surface/default.nix | 2 +- microsoft/surface/kernel/linux-6.0.11.nix | 133 ------------------ .../surface/kernel/linux-6.0.11/default.nix | 38 +++++ .../surface/kernel/linux-6.0.11/patches.nix | 118 ++++++++++++++++ 4 files changed, 157 insertions(+), 134 deletions(-) delete mode 100644 microsoft/surface/kernel/linux-6.0.11.nix create mode 100644 microsoft/surface/kernel/linux-6.0.11/default.nix create mode 100644 microsoft/surface/kernel/linux-6.0.11/patches.nix diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 22f6c6c4..9a59e9ff 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -9,7 +9,7 @@ in { ./firmware/surface-go/ath10k ]; - microsoft-surface.kernelVersion = mkDefault "5.19.17"; + microsoft-surface.kernelVersion = mkDefault "6.0.11"; boot.extraModprobeConfig = mkDefault '' options i915 enable_fbc=1 enable_rc6=1 modeset=1 diff --git a/microsoft/surface/kernel/linux-6.0.11.nix b/microsoft/surface/kernel/linux-6.0.11.nix deleted file mode 100644 index 1eb2f84d..00000000 --- a/microsoft/surface/kernel/linux-6.0.11.nix +++ /dev/null @@ -1,133 +0,0 @@ -{ lib, - fetchurl, - repos, -}: - -let - inherit (lib) kernel; - version = "6.0.11"; - branch = "6.0"; - patches = repos.linux-surface + "/patches/${branch}"; - -in { - inherit version branch; - modDirVersion = version; - src = fetchurl { - url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "sha256-K65hMeZJceHjT/OV+lQpcRNMhXvbCykGmrhHx8mpx2I="; - }; - - kernelPatches = [ - { - name = "microsoft-surface-patches-linux-${version}"; - patch = null; - structuredExtraConfig = with lib.kernel; { - # - # Surface Aggregator Module - # - CONFIG_SURFACE_AGGREGATOR = module; - CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION = no; - CONFIG_SURFACE_AGGREGATOR_BUS = yes; - CONFIG_SURFACE_AGGREGATOR_CDEV = module; - CONFIG_SURFACE_AGGREGATOR_HUB = module; - CONFIG_SURFACE_AGGREGATOR_REGISTRY = module; - CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH = module; - - CONFIG_SURFACE_ACPI_NOTIFY = module; - CONFIG_SURFACE_DTX = module; - CONFIG_SURFACE_PLATFORM_PROFILE = module; - - CONFIG_SURFACE_HID = module; - CONFIG_SURFACE_KBD = module; - - CONFIG_BATTERY_SURFACE = module; - CONFIG_CHARGER_SURFACE = module; - - # - # Surface Hotplug - # - CONFIG_SURFACE_HOTPLUG = module; - - # - # IPTS touchscreen - # - # This only enables the user interface for IPTS data. - # For the touchscreen to work, you need to install iptsd. - # - CONFIG_MISC_IPTS = module; - - # - # Cameras: IPU3 - # - CONFIG_VIDEO_DW9719 = module; - CONFIG_VIDEO_IPU3_IMGU = module; - CONFIG_VIDEO_IPU3_CIO2 = module; - CONFIG_CIO2_BRIDGE = yes; - CONFIG_INTEL_SKL_INT3472 = module; - CONFIG_REGULATOR_TPS68470 = module; - CONFIG_COMMON_CLK_TPS68470 = module; - - # - # Cameras: Sensor drivers - # - CONFIG_VIDEO_OV5693 = module; - CONFIG_VIDEO_OV7251 = module; - CONFIG_VIDEO_OV8865 = module; - - # - # ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 - # - CONFIG_APDS9960 = module; - - # - # Other Drivers - # - CONFIG_INPUT_SOC_BUTTON_ARRAY = module; - CONFIG_SURFACE_3_POWER_OPREGION = module; - CONFIG_SURFACE_PRO3_BUTTON = module; - CONFIG_SURFACE_GPE = module; - CONFIG_SURFACE_BOOK1_DGPU_SWITCH = module; - }; - } - { - name = "ms-surface/0001-surface3-oemb"; - patch = patches + "/0001-surface3-oemb.patch"; - } - { - name = "ms-surface/0002-mwifiex"; - patch = patches + "/0002-mwifiex.patch"; - } - { - name = "ms-surface/0003-ath10k"; - patch = patches + "/0003-ath10k.patch"; - } - { - name = "ms-surface/0004-ipts"; - patch = patches + "/0004-ipts.patch"; - } - { - name = "ms-surface/0005-surface-sam"; - patch = patches + "/0005-surface-sam.patch"; - } - { - name = "ms-surface/0006-surface-sam-over-hid"; - patch = patches + "/0006-surface-sam-over-hid.patch"; - } - { - name = "ms-surface/0007-surface-button"; - patch = patches + "/0007-surface-button.patch"; - } - { - name = "ms-surface/0008-surface-typecover"; - patch = patches + "/0008-surface-typecover.patch"; - } - { - name = "ms-surface/0009-cameras"; - patch = patches + "/0009-cameras.patch"; - } - # { - # name = "ms-surface/0010-amd-gpio"; - # patch = patches + "/0010-amd-gpio.patch"; - # } - ]; -} diff --git a/microsoft/surface/kernel/linux-6.0.11/default.nix b/microsoft/surface/kernel/linux-6.0.11/default.nix new file mode 100644 index 00000000..652f2412 --- /dev/null +++ b/microsoft/surface/kernel/linux-6.0.11/default.nix @@ -0,0 +1,38 @@ +{ 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.0.11"; + extraMeta.branch = "6.0"; + patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; + kernelPatches = pkgs.callPackage ./patches.nix { + inherit (lib) kernel; + inherit version patchDir; + }; + + kernelPackages = linuxPackage { + inherit version extraMeta kernelPatches; + src = fetchurl { + url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; + sha256 = "sha256-K65hMeZJceHjT/OV+lQpcRNMhXvbCykGmrhHx8mpx2I="; + }; + }; + + +in { + options.microsoft-surface.kernelVersion = mkOption { + type = types.enum [ "6.0.11" ]; + }; + + config = mkIf (cfg.kernelVersion == "6.0.11") { + boot = { + inherit kernelPackages; + }; + }; +} diff --git a/microsoft/surface/kernel/linux-6.0.11/patches.nix b/microsoft/surface/kernel/linux-6.0.11/patches.nix new file mode 100644 index 00000000..e111c268 --- /dev/null +++ b/microsoft/surface/kernel/linux-6.0.11/patches.nix @@ -0,0 +1,118 @@ +{ kernel, + patchDir, + version, +}: + +[ + { + name = "microsoft-surface-patches-linux-${version}"; + patch = null; + structuredExtraConfig = with kernel; { + # + # Surface Aggregator Module + # + CONFIG_SURFACE_AGGREGATOR = module; + CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION = no; + CONFIG_SURFACE_AGGREGATOR_BUS = yes; + CONFIG_SURFACE_AGGREGATOR_CDEV = module; + CONFIG_SURFACE_AGGREGATOR_HUB = module; + CONFIG_SURFACE_AGGREGATOR_REGISTRY = module; + CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH = module; + + CONFIG_SURFACE_ACPI_NOTIFY = module; + CONFIG_SURFACE_DTX = module; + CONFIG_SURFACE_PLATFORM_PROFILE = module; + + CONFIG_SURFACE_HID = module; + CONFIG_SURFACE_KBD = module; + + CONFIG_BATTERY_SURFACE = module; + CONFIG_CHARGER_SURFACE = module; + + # + # Surface Hotplug + # + CONFIG_SURFACE_HOTPLUG = module; + + # + # IPTS touchscreen + # + # This only enables the user interface for IPTS data. + # For the touchscreen to work, you need to install iptsd. + # + CONFIG_MISC_IPTS = module; + + # + # Cameras: IPU3 + # + CONFIG_VIDEO_DW9719 = module; + CONFIG_VIDEO_IPU3_IMGU = module; + CONFIG_VIDEO_IPU3_CIO2 = module; + CONFIG_CIO2_BRIDGE = yes; + CONFIG_INTEL_SKL_INT3472 = module; + CONFIG_REGULATOR_TPS68470 = module; + CONFIG_COMMON_CLK_TPS68470 = module; + + # + # Cameras: Sensor drivers + # + CONFIG_VIDEO_OV5693 = module; + CONFIG_VIDEO_OV7251 = module; + CONFIG_VIDEO_OV8865 = module; + + # + # ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 + # + CONFIG_APDS9960 = module; + + # + # Other Drivers + # + CONFIG_INPUT_SOC_BUTTON_ARRAY = module; + CONFIG_SURFACE_3_POWER_OPREGION = module; + CONFIG_SURFACE_PRO3_BUTTON = module; + CONFIG_SURFACE_GPE = module; + CONFIG_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-surface-sam"; + patch = patchDir + "/0005-surface-sam.patch"; + } + { + name = "ms-surface/0006-surface-sam-over-hid"; + patch = patchDir + "/0006-surface-sam-over-hid.patch"; + } + { + name = "ms-surface/0007-surface-button"; + patch = patchDir + "/0007-surface-button.patch"; + } + { + name = "ms-surface/0008-surface-typecover"; + patch = patchDir + "/0008-surface-typecover.patch"; + } + { + name = "ms-surface/0009-cameras"; + patch = patchDir + "/0009-cameras.patch"; + } + # { + # name = "ms-surface/0010-amd-gpio"; + # patch = patchDir + "/0010-amd-gpio.patch"; + # } +] From b35c93e8a22eaa5aa755e8faa6c9070731d3b78b Mon Sep 17 00:00:00 2001 From: ChaosAttractor <46527539+LostAttractor@users.noreply.github.com> Date: Fri, 16 Dec 2022 06:58:12 +0800 Subject: [PATCH 0300/1476] Add mkDefault to services.xserver.videoDrivers = [ "amdgpu" ]; --- common/gpu/amd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix index 762b3c04..9b1d77c8 100644 --- a/common/gpu/amd/default.nix +++ b/common/gpu/amd/default.nix @@ -2,7 +2,7 @@ { boot.initrd.kernelModules = [ "amdgpu" ]; - services.xserver.videoDrivers = [ "amdgpu" ]; + services.xserver.videoDrivers = lib.mkDefault [ "amdgpu" ]; hardware.opengl.extraPackages = with pkgs; [ rocm-opencl-icd From b67160bb7f479e5042eeadd4453517e2d27ebca6 Mon Sep 17 00:00:00 2001 From: K900 Date: Fri, 16 Dec 2022 17:43:40 +0300 Subject: [PATCH 0301/1476] cpu/amd/pstate: enable correctly on kernel 6.1+ There is no separate module now, and a clean option to enable it. --- common/cpu/amd/pstate.nix | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/common/cpu/amd/pstate.nix b/common/cpu/amd/pstate.nix index 7d5c2c08..ab07a91f 100644 --- a/common/cpu/amd/pstate.nix +++ b/common/cpu/amd/pstate.nix @@ -1,10 +1,22 @@ -{ lib, config, ... }: { +{ lib, config, ... }: +let + kver = config.boot.kernelPackages.kernel.version; +in +{ # Enables the amd cpu scaling https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html # On recent AMD CPUs this can be more energy efficient. imports = [ ./. ]; - boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "5.17") { - kernelParams = [ "initcall_blacklist=acpi_cpufreq_init" ]; - kernelModules = [ "amd-pstate" ]; - }; + boot = lib.mkMerge [ + (lib.mkIf ( + (lib.versionAtLeast kver "5.17") + && (lib.versionOlder kver "6.1") + ) { + kernelParams = [ "initcall_blacklist=acpi_cpufreq_init" ]; + kernelModules = [ "amd-pstate" ]; + }) + (lib.mkIf (lib.versionAtLeast kver "6.1") { + kernelParams = [ "amd_pstate=passive" ]; + }) + ]; } From a1a8723bf9786436f0f784736a5c1e55c7e330b0 Mon Sep 17 00:00:00 2001 From: ChaosAttractor <46527539+LostAttractor@users.noreply.github.com> Date: Fri, 16 Dec 2022 05:01:50 +0800 Subject: [PATCH 0302/1476] Add a option to add(or disadd) amdgpu to kernelModule Add a option to add(or disadd) amdgpu to boot.initrd.kernelModule --- common/gpu/amd/default.nix | 46 ++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix index 762b3c04..91ba0b77 100644 --- a/common/gpu/amd/default.nix +++ b/common/gpu/amd/default.nix @@ -1,23 +1,35 @@ { config, lib, pkgs, ... }: { - boot.initrd.kernelModules = [ "amdgpu" ]; - services.xserver.videoDrivers = [ "amdgpu" ]; - - hardware.opengl.extraPackages = with pkgs; [ - rocm-opencl-icd - rocm-opencl-runtime - amdvlk - ]; - - hardware.opengl.extraPackages32 = with pkgs; [ - driversi686Linux.amdvlk - ]; - - hardware.opengl = { - driSupport = lib.mkDefault true; - driSupport32Bit = lib.mkDefault true; + options.hardware.amdgpu.loadInInitrd = lib.mkEnableOption (lib.mdDoc + "loading `amdgpu` kernelModule at stage 1. (Add `amdgpu` to `boot.initrd.kernelModules`)" + ) // { + default = true; }; - environment.variables.AMD_VULKAN_ICD = lib.mkDefault "RADV"; + config = lib.mkMerge [ + { + services.xserver.videoDrivers = lib.mkDefault [ "amdgpu" ]; + + hardware.opengl.extraPackages = with pkgs; [ + rocm-opencl-icd + rocm-opencl-runtime + amdvlk + ]; + + hardware.opengl.extraPackages32 = with pkgs; [ + driversi686Linux.amdvlk + ]; + + hardware.opengl = { + driSupport = lib.mkDefault true; + driSupport32Bit = lib.mkDefault true; + }; + + environment.variables.AMD_VULKAN_ICD = lib.mkDefault "RADV"; + } + (lib.mkIf config.hardware.amdgpu.loadInInitrd { + boot.initrd.kernelModules = [ "amdgpu" ]; + }) + ]; } From 262146dc7631b962b515e7e972930f6e12607d7f Mon Sep 17 00:00:00 2001 From: ChaosAttractor <46527539+LostAttractor@users.noreply.github.com> Date: Fri, 16 Dec 2022 07:59:45 +0800 Subject: [PATCH 0303/1476] Override edid of built-in display MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the problem that the edid of the built-in display only provided 60hz mode when use Hybrid Graphics It appears to be a Lenovo firmware issue and i try to fix it. This issue still reproducible on BIOS version GKCN58WW(22/12/16) Lenovo Legion 5 Pro is a laptop which support a technology called "DDG" that can allow you switch between discrete graphics mode and hybrid mode (optiums). In discrete graphics mode, the firmware provides the correct edid and anything works fine, the built-in display work well at 165hz. But if switch to hybrid mode, the firmware provides a different edid, causing the built-in display only can work at 60hz. So I extracted the edid file of discrete graphics mode and override the edid that built-in display provide to solve this problem. Co-Authored-By: Jörg Thalheim --- lenovo/legion/16ach6h/default.nix | 3 +++ lenovo/legion/16ach6h/edid/16ach6h.bin | Bin 0 -> 384 bytes lenovo/legion/16ach6h/edid/default.nix | 15 +++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 lenovo/legion/16ach6h/edid/16ach6h.bin create mode 100644 lenovo/legion/16ach6h/edid/default.nix diff --git a/lenovo/legion/16ach6h/default.nix b/lenovo/legion/16ach6h/default.nix index db13b9f4..afdc7d9b 100644 --- a/lenovo/legion/16ach6h/default.nix +++ b/lenovo/legion/16ach6h/default.nix @@ -7,8 +7,11 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/pc/laptop ../../../common/pc/laptop/ssd + ./edid ]; + hardware.amdgpu.loadInInitrd = lib.mkDefault false; + hardware.nvidia.prime = { amdgpuBusId = "PCI:6:0:0"; nvidiaBusId = "PCI:1:0:0"; diff --git a/lenovo/legion/16ach6h/edid/16ach6h.bin b/lenovo/legion/16ach6h/edid/16ach6h.bin new file mode 100644 index 0000000000000000000000000000000000000000..87256135d9cf7597594d013d06d1814148d2f91e GIT binary patch literal 384 zcmZSh4+ac;`3zzVARx!cvQ6OBq Date: Fri, 16 Dec 2022 08:00:42 +0800 Subject: [PATCH 0304/1476] Enable hardware.nvidia.powerManagement Update default.nix --- lenovo/legion/16ach6h/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lenovo/legion/16ach6h/default.nix b/lenovo/legion/16ach6h/default.nix index afdc7d9b..af807f73 100644 --- a/lenovo/legion/16ach6h/default.nix +++ b/lenovo/legion/16ach6h/default.nix @@ -12,9 +12,13 @@ hardware.amdgpu.loadInInitrd = lib.mkDefault false; - hardware.nvidia.prime = { - amdgpuBusId = "PCI:6:0:0"; - nvidiaBusId = "PCI:1:0:0"; + hardware.nvidia = { + powerManagement.enable = lib.mkDefault true; + + prime = { + amdgpuBusId = "PCI:6:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; }; services.thermald.enable = lib.mkDefault true; From dea6ef85a18bcd66bb4dfcf5a649d9404f2377cd Mon Sep 17 00:00:00 2001 From: ChaosAttractor <46527539+LostAttractor@users.noreply.github.com> Date: Mon, 19 Dec 2022 13:02:28 +0800 Subject: [PATCH 0305/1476] Enable hardware.nvidia.modesetting --- lenovo/legion/16ach6h/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/legion/16ach6h/default.nix b/lenovo/legion/16ach6h/default.nix index af807f73..4ecfd5a4 100644 --- a/lenovo/legion/16ach6h/default.nix +++ b/lenovo/legion/16ach6h/default.nix @@ -13,6 +13,7 @@ hardware.amdgpu.loadInInitrd = lib.mkDefault false; hardware.nvidia = { + modesetting.enable = lib.mkDefault true; powerManagement.enable = lib.mkDefault true; prime = { From b53fc0a7858871e58332ee02ffbc0f256a0d5afe Mon Sep 17 00:00:00 2001 From: ChaosAttractor <46527539+LostAttractor@users.noreply.github.com> Date: Mon, 19 Dec 2022 13:03:23 +0800 Subject: [PATCH 0306/1476] =?UTF-8?q?Add=20specialisation=20for=20?= =?UTF-8?q?=E2=80=9CDDG"=20mode=20is=20enabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lenovo/legion/16ach6h/default.nix | 36 ++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/lenovo/legion/16ach6h/default.nix b/lenovo/legion/16ach6h/default.nix index 4ecfd5a4..d8149e1a 100644 --- a/lenovo/legion/16ach6h/default.nix +++ b/lenovo/legion/16ach6h/default.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ config, lib, ... }: { imports = [ @@ -10,17 +10,29 @@ ./edid ]; - hardware.amdgpu.loadInInitrd = lib.mkDefault false; + config = lib.mkMerge [ + { + hardware.amdgpu.loadInInitrd = lib.mkDefault false; - hardware.nvidia = { - modesetting.enable = lib.mkDefault true; - powerManagement.enable = lib.mkDefault true; + hardware.nvidia = { + modesetting.enable = lib.mkDefault true; + powerManagement.enable = lib.mkDefault true; + }; + + services.thermald.enable = lib.mkDefault true; - prime = { - amdgpuBusId = "PCI:6:0:0"; - nvidiaBusId = "PCI:1:0:0"; - }; - }; + specialisation.ddg.configuration = { + # This specialisation is for the case where "DDG" (A hardware feature that can enable in bios) is enabled, since the amd igpu is blocked at hardware level and the built-in display is directly connected to the dgpu, we no longer need the amdgpu and prime configuration. + services.xserver.videoDrivers = [ "nvidia" ]; # This will override services.xserver.videoDrivers = lib.mkDefault [ "amdgpu" "nvidia" ]; + hardware.nvidia.prime.offload.enable = false; + }; + } - services.thermald.enable = lib.mkDefault true; -} + (lib.mkIf (config.specialisation != {}) { + hardware.nvidia.prime = { + amdgpuBusId = "PCI:6:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }) + ]; +} \ No newline at end of file From 9c0fa60e49cf29ae423efb1c54014ae5c8601941 Mon Sep 17 00:00:00 2001 From: s1341 Date: Mon, 19 Dec 2022 12:41:50 +0200 Subject: [PATCH 0307/1476] Latitude 7430: init --- README.md | 1 + dell/latitude/7430/default.nix | 21 +++++++++++++++++++++ flake.nix | 1 + 3 files changed, 23 insertions(+) create mode 100644 dell/latitude/7430/default.nix diff --git a/README.md b/README.md index d420276c..120b781e 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ See code for all available configurations. | [Dell Latitude 3340](dell/latitude/3340) | `` | | [Dell Latitude 3480](dell/latitude/3480) | `` | | [Dell Latitude 5520](dell/latitude/5520) | `` | +| [Dell Latitude 7430](dell/latitude/7430) | `` | | [Dell Latitude 7490](dell/latitude/7490) | `` | | [Dell Poweredge R7515](dell/poweredge/r7515) | `` | | [Dell Precision 5530](dell/precision/5530) | `` | diff --git a/dell/latitude/7430/default.nix b/dell/latitude/7430/default.nix new file mode 100644 index 00000000..a7d737b1 --- /dev/null +++ b/dell/latitude/7430/default.nix @@ -0,0 +1,21 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + boot.kernelParams = [ + # needed for Intel Iris Xe + "i915.force_probe=46a8" + "i915.enable_guc=3" + "i915.fastboot=1" + # needed for keyboard + "i8042.dumbkbd=1" + "i8042.nopnp=1" + ]; + + services.xserver.videoDrivers = lib.mkDefault [ "intel" ]; +} diff --git a/flake.nix b/flake.nix index 5c4f4c94..64d13512 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,7 @@ dell-latitude-3340 = import ./dell/latitude/3340; dell-latitude-3480 = import ./dell/latitude/3480; dell-latitude-5520 = import ./dell/latitude/5520; + dell-latitude-7430 = import ./dell/latitude/7430; dell-latitude-7490 = import ./dell/latitude/7490; dell-poweredge-r7515 = import ./dell/poweredge/r7515; dell-precision-5530 = import ./dell/precision/5530; From ab165ab191793e277dd2ce1e3a77cc621f4600b5 Mon Sep 17 00:00:00 2001 From: ChaosAttractor <46527539+LostAttractor@users.noreply.github.com> Date: Mon, 19 Dec 2022 22:55:29 +0800 Subject: [PATCH 0308/1476] Add standalone hybrid only and nvidia only modules --- README.md | 2 ++ flake.nix | 2 ++ lenovo/legion/16ach6h/README.md | 5 +++ lenovo/legion/16ach6h/default.nix | 41 ++++-------------------- lenovo/legion/16ach6h/hybrid/default.nix | 28 ++++++++++++++++ lenovo/legion/16ach6h/nvidia/default.nix | 7 ++++ 6 files changed, 51 insertions(+), 34 deletions(-) create mode 100644 lenovo/legion/16ach6h/hybrid/default.nix create mode 100644 lenovo/legion/16ach6h/nvidia/default.nix diff --git a/README.md b/README.md index d420276c..be2a480b 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,8 @@ See code for all available configurations. | [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | | [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | | [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | +| [Lenovo Legion 5 Pro 16ach6h (Hybrid)](lenovo/legion/16ach6h/hybrid)| `` | +| [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia)| `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | | [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | diff --git a/flake.nix b/flake.nix index 5c4f4c94..ac81c51d 100644 --- a/flake.nix +++ b/flake.nix @@ -62,6 +62,8 @@ lenovo-legion-15ach6 = import ./lenovo/legion/15ach6; lenovo-legion-15arh05h = import ./lenovo/legion/15arh05h; lenovo-legion-16ach6h = import ./lenovo/legion/16ach6h; + lenovo-legion-16ach6h-hybrid = import ./lenovo/legion/16ach6h/hybrid; + lenovo-legion-16ach6h-nvidia = import ./lenovo/legion/16ach6h/nvidia; lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; lenovo-thinkpad = import ./lenovo/thinkpad; lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; diff --git a/lenovo/legion/16ach6h/README.md b/lenovo/legion/16ach6h/README.md index cf489fa3..f8c1190e 100644 --- a/lenovo/legion/16ach6h/README.md +++ b/lenovo/legion/16ach6h/README.md @@ -1,3 +1,8 @@ +## Introduction +Due to the introduction of DDG feature, you may toggle DDG frequently, so for the default settings of this laptop, we use "specialization" feature of Nix so that you can easily select the required graphics card driver in the startup menu. +**But It will slow down NixOS evaluation by factor 2 and increase memory usage.** +So if you don't need specialization feature, you can just use hybrid only configuration or nvidia only (DDG only) configuration + ## Setup at the time of testing ``` $ nix-info -m diff --git a/lenovo/legion/16ach6h/default.nix b/lenovo/legion/16ach6h/default.nix index d8149e1a..e8932314 100644 --- a/lenovo/legion/16ach6h/default.nix +++ b/lenovo/legion/16ach6h/default.nix @@ -1,38 +1,11 @@ -{ config, lib, ... }: +{ ... }: { - imports = [ - ../../../common/cpu/amd - ../../../common/gpu/amd - ../../../common/gpu/nvidia/prime.nix - ../../../common/pc/laptop - ../../../common/pc/laptop/ssd - ./edid - ]; + imports = [ ./hybrid ]; - config = lib.mkMerge [ - { - hardware.amdgpu.loadInInitrd = lib.mkDefault false; - - hardware.nvidia = { - modesetting.enable = lib.mkDefault true; - powerManagement.enable = lib.mkDefault true; - }; - - services.thermald.enable = lib.mkDefault true; - - specialisation.ddg.configuration = { - # This specialisation is for the case where "DDG" (A hardware feature that can enable in bios) is enabled, since the amd igpu is blocked at hardware level and the built-in display is directly connected to the dgpu, we no longer need the amdgpu and prime configuration. - services.xserver.videoDrivers = [ "nvidia" ]; # This will override services.xserver.videoDrivers = lib.mkDefault [ "amdgpu" "nvidia" ]; - hardware.nvidia.prime.offload.enable = false; - }; - } - - (lib.mkIf (config.specialisation != {}) { - hardware.nvidia.prime = { - amdgpuBusId = "PCI:6:0:0"; - nvidiaBusId = "PCI:1:0:0"; - }; - }) - ]; + specialisation.ddg.configuration = { + # This specialisation is for the case where "DDG" (A hardware feature that can enable in bios) is enabled, since the amd igpu is blocked at hardware level and the built-in display is directly connected to the dgpu, we no longer need the amdgpu and prime configuration. + services.xserver.videoDrivers = [ "nvidia" ]; # This will override services.xserver.videoDrivers = lib.mkDefault [ "amdgpu" "nvidia" ]; + hardware.nvidia.prime.offload.enable = false; + }; } \ No newline at end of file diff --git a/lenovo/legion/16ach6h/hybrid/default.nix b/lenovo/legion/16ach6h/hybrid/default.nix new file mode 100644 index 00000000..8a56a48d --- /dev/null +++ b/lenovo/legion/16ach6h/hybrid/default.nix @@ -0,0 +1,28 @@ +{ config, lib, ... }: + +{ + imports = [ + ../../../../common/cpu/amd + ../../../../common/gpu/amd + ../../../../common/gpu/nvidia/prime.nix + ../../../../common/pc/laptop + ../../../../common/pc/laptop/ssd + ../edid + ]; + + hardware = { + amdgpu.loadInInitrd = lib.mkDefault false; + + nvidia = { + modesetting.enable = lib.mkDefault true; + powerManagement.enable = lib.mkDefault true; + + prime = { + amdgpuBusId = "PCI:6:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + }; + + services.thermald.enable = lib.mkDefault true; +} \ No newline at end of file diff --git a/lenovo/legion/16ach6h/nvidia/default.nix b/lenovo/legion/16ach6h/nvidia/default.nix new file mode 100644 index 00000000..e54fc207 --- /dev/null +++ b/lenovo/legion/16ach6h/nvidia/default.nix @@ -0,0 +1,7 @@ +{ ... }: + +{ + imports = [ ../hybrid ]; + services.xserver.videoDrivers = [ "nvidia" ]; # This will override services.xserver.videoDrivers = lib.mkDefault [ "amdgpu" "nvidia" ]; + hardware.nvidia.prime.offload.enable = false; +} \ No newline at end of file From 93b1cdbb77f87848edd399eae47b8323820ee05e Mon Sep 17 00:00:00 2001 From: Karolis Stasaitis Date: Sat, 17 Dec 2022 12:33:45 +0100 Subject: [PATCH 0309/1476] raspberry-pi/4: dtmerge update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- raspberry-pi/4/apply-overlays-dtmerge.nix | 50 ++++++++++++++++------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/raspberry-pi/4/apply-overlays-dtmerge.nix b/raspberry-pi/4/apply-overlays-dtmerge.nix index 4e4bc7b2..72830295 100644 --- a/raspberry-pi/4/apply-overlays-dtmerge.nix +++ b/raspberry-pi/4/apply-overlays-dtmerge.nix @@ -1,5 +1,5 @@ # modification of nixpkgs deviceTree.applyOverlays to resolve https://github.com/NixOS/nixpkgs/issues/125354 -# https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/device-tree/default.nix +# derived from https://github.com/NixOS/nixpkgs/blob/916ca8f2b0c208def051f8ea9760c534a40309db/pkgs/os-specific/linux/device-tree/default.nix { lib, pkgs, stdenvNoCC, dtc, libraspberrypi }: with lib; (base: overlays': stdenvNoCC.mkDerivation { @@ -9,22 +9,42 @@ with lib; (base: overlays': stdenvNoCC.mkDerivation { overlays = toList overlays'; in '' mkdir -p $out - cd ${base} + cd "${base}" find . -type f -name '*.dtb' -print0 \ - | xargs -0 cp -v --no-preserve=mode --target-directory $out --parents - for dtb in $(find $out -type f -name '*.dtb'); do - dtbCompat="$( fdtget -t s $dtb / compatible )" + | xargs -0 cp -v --no-preserve=mode --target-directory "$out" --parents + + for dtb in $(find "$out" -type f -name '*.dtb'); do + dtbCompat=$(fdtget -t s "$dtb" / compatible 2>/dev/null || true) + # skip files without `compatible` string + test -z "$dtbCompat" && continue + ${flip (concatMapStringsSep "\n") overlays (o: '' - overlayCompat="$( fdtget -t s ${o.dtboFile} / compatible )" - # overlayCompat in dtbCompat - if [[ "$dtbCompat" =~ "$overlayCompat" ]]; then - echo "Applying overlay ${o.name} to $( basename $dtb )" - mv $dtb{,.in} - cp ${o.dtboFile}{,.dtbo} - dtmerge "$dtb.in" "$dtb" ${o.dtboFile}.dtbo; - rm $dtb.in ${o.dtboFile}.dtbo + overlayCompat="$(fdtget -t s "${o.dtboFile}" / compatible)" + + # skip incompatible and non-matching overlays + if [[ ! "$dtbCompat" =~ "$overlayCompat" ]]; then + echo "Skipping overlay ${o.name}: incompatible with $(basename "$dtb")" + continue fi + ${optionalString ((o.filter or null) != null) '' + if [[ "''${dtb//${o.filter}/}" == "$dtb" ]]; then + echo "Skipping overlay ${o.name}: filter does not match $(basename "$dtb")" + continue + fi + ''} + + echo -n "Applying overlay ${o.name} to $(basename "$dtb")... " + mv "$dtb"{,.in} + + # dtmerge requires a .dtbo ext for dtbo files, otherwise it adds it to the given file implicitly + dtboWithExt="$TMPDIR/$(basename "${o.dtboFile}").dtbo" + cp -r ${o.dtboFile} "$dtboWithExt" + + dtmerge "$dtb.in" "$dtb" "$dtboWithExt" + + echo "ok" + rm "$dtb.in" "$dtboWithExt" '')} - done - ''; + + done''; }) From 485f3bc2f27b63c558bee579b6a0d5c10291c1ec Mon Sep 17 00:00:00 2001 From: suliman Date: Sat, 24 Dec 2022 02:38:10 +0300 Subject: [PATCH 0310/1476] Add LENOVO Yoga 6 13ALC6 82ND --- README.md | 1 + flake.nix | 1 + lenovo/yoga/6/13ALC6/default.nix | 51 ++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 lenovo/yoga/6/13ALC6/default.nix diff --git a/README.md b/README.md index 1d73f7ae..fa388d1e 100644 --- a/README.md +++ b/README.md @@ -189,6 +189,7 @@ See code for all available configurations. | [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | | [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | | [Lenovo ThinkPad Z13](lenovo/thinkpad/z/z13) | `` | +| [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | | [MSI GS60 2QE](msi/gs60) | `` | | [MSI GL62/CX62](msi/gl62) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | diff --git a/flake.nix b/flake.nix index 5b79eca3..387ffbb4 100644 --- a/flake.nix +++ b/flake.nix @@ -127,6 +127,7 @@ lenovo-thinkpad-x280 = import ./lenovo/thinkpad/x280; lenovo-thinkpad-z = import ./lenovo/thinkpad/z; lenovo-thinkpad-z13 = import ./lenovo/thinkpad/z/z13; + lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; microsoft-surface = import ./microsoft/surface; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; msi-gs60 = import ./msi/gs60; diff --git a/lenovo/yoga/6/13ALC6/default.nix b/lenovo/yoga/6/13ALC6/default.nix new file mode 100644 index 00000000..97b6739a --- /dev/null +++ b/lenovo/yoga/6/13ALC6/default.nix @@ -0,0 +1,51 @@ +{ lib, pkgs, ... }: + +{ + boot.initrd.kernelModules = [ + "amdgpu" + "ideapad_laptop" + ]; + services.xserver.videoDrivers = [ "amdgpu" ]; + hardware.opengl.extraPackages = with pkgs; [ + rocm-opencl-icd + rocm-opencl-runtime + amdvlk + vaapiVdpau + libvdpau-va-gl + ]; + hardware.opengl.extraPackages32 = with pkgs; [ + driversi686Linux.amdvlk + ]; + hardware.opengl = { + driSupport = lib.mkDefault true; + driSupport32Bit = lib.mkDefault true; + }; + environment.variables.AMD_VULKAN_ICD = lib.mkDefault "RADV"; + + # Latest Kernel + boot.kernelPackages = pkgs.linuxPackages_latest; + + hardware.bluetooth.powerOnBoot = lib.mkDefault false; + services.power-profiles-daemon.enable = false; + services.tlp.enable = lib.mkDefault true; + # automatic screen orientation, only works in X11 + hardware.sensor.iio.enable = true; + # energy savings + boot.kernelParams = ["mem_sleep_default=deep" "pcie_aspm.policy=powersupersave"]; + powerManagement.enable = lib.mkDefault true; + powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; + services.tlp.settings = { + # CPU + CPU_SCALING_GOVERNOR_ON_BAT="ondemand"; + CPU_SCALING_GOVERNOR_ON_AC="performance"; + CPU_BOOST_ON_AC=1; + CPU_BOOST_ON_BAT=0; + # Stop charging battery at 60%, ideapad_laptop driver required + #STOP_CHARGE_THRESH_BAT0=1; + # Stop charging battery at 100% + STOP_CHARGE_THRESH_BAT0=0; + # GPU + RADEON_DPM_PERF_LEVEL_ON_AC="auto"; + RADEON_DPM_PERF_LEVEL_ON_BAT="low"; + }; +} From 2e8fce47c8bd3a0936ac9e4e5d7983fc96caa25e Mon Sep 17 00:00:00 2001 From: suliman Date: Wed, 28 Dec 2022 23:10:35 +0300 Subject: [PATCH 0311/1476] Reusing modules --- lenovo/yoga/6/13ALC6/default.nix | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/lenovo/yoga/6/13ALC6/default.nix b/lenovo/yoga/6/13ALC6/default.nix index 97b6739a..16977018 100644 --- a/lenovo/yoga/6/13ALC6/default.nix +++ b/lenovo/yoga/6/13ALC6/default.nix @@ -1,36 +1,24 @@ { lib, pkgs, ... }: { - boot.initrd.kernelModules = [ - "amdgpu" - "ideapad_laptop" + imports = [ + ../../../thinkpad/yoga.nix + ../../../../common/gpu/amd/default.nix ]; - services.xserver.videoDrivers = [ "amdgpu" ]; + + boot.initrd.kernelModules = [ "ideapad_laptop" ]; hardware.opengl.extraPackages = with pkgs; [ - rocm-opencl-icd - rocm-opencl-runtime - amdvlk vaapiVdpau libvdpau-va-gl ]; - hardware.opengl.extraPackages32 = with pkgs; [ - driversi686Linux.amdvlk - ]; - hardware.opengl = { - driSupport = lib.mkDefault true; - driSupport32Bit = lib.mkDefault true; - }; - environment.variables.AMD_VULKAN_ICD = lib.mkDefault "RADV"; # Latest Kernel - boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; + # energy savings hardware.bluetooth.powerOnBoot = lib.mkDefault false; services.power-profiles-daemon.enable = false; services.tlp.enable = lib.mkDefault true; - # automatic screen orientation, only works in X11 - hardware.sensor.iio.enable = true; - # energy savings boot.kernelParams = ["mem_sleep_default=deep" "pcie_aspm.policy=powersupersave"]; powerManagement.enable = lib.mkDefault true; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; From a30c4834f48a8d4da5c5d46926287cda4665078a Mon Sep 17 00:00:00 2001 From: me00001 <37930867+me00001@users.noreply.github.com> Date: Thu, 29 Dec 2022 13:23:08 +0300 Subject: [PATCH 0312/1476] set a minimum kernel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- lenovo/yoga/6/13ALC6/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lenovo/yoga/6/13ALC6/default.nix b/lenovo/yoga/6/13ALC6/default.nix index 16977018..3b1cf964 100644 --- a/lenovo/yoga/6/13ALC6/default.nix +++ b/lenovo/yoga/6/13ALC6/default.nix @@ -12,8 +12,7 @@ libvdpau-va-gl ]; - # Latest Kernel - boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.1") pkgs.linuxPackages_latest; # energy savings hardware.bluetooth.powerOnBoot = lib.mkDefault false; From 114881dd3dc7de292625886995f23d5b35fb715a Mon Sep 17 00:00:00 2001 From: suliman Date: Thu, 29 Dec 2022 14:42:08 +0300 Subject: [PATCH 0313/1476] Minimum required version is 5.16 based on https://linux-hardware.org/?id=pci:10ec-8852-17aa-4852 --- lenovo/yoga/6/13ALC6/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/yoga/6/13ALC6/default.nix b/lenovo/yoga/6/13ALC6/default.nix index 3b1cf964..629cea81 100644 --- a/lenovo/yoga/6/13ALC6/default.nix +++ b/lenovo/yoga/6/13ALC6/default.nix @@ -12,7 +12,7 @@ libvdpau-va-gl ]; - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.1") pkgs.linuxPackages_latest; + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; # energy savings hardware.bluetooth.powerOnBoot = lib.mkDefault false; From 993e6c8726f6c75bab73236d1bce94a2e79160f2 Mon Sep 17 00:00:00 2001 From: suliman Date: Thu, 29 Dec 2022 16:50:43 +0300 Subject: [PATCH 0314/1476] removo TLP --- lenovo/yoga/6/13ALC6/default.nix | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/lenovo/yoga/6/13ALC6/default.nix b/lenovo/yoga/6/13ALC6/default.nix index 629cea81..6b830c3c 100644 --- a/lenovo/yoga/6/13ALC6/default.nix +++ b/lenovo/yoga/6/13ALC6/default.nix @@ -16,23 +16,5 @@ # energy savings hardware.bluetooth.powerOnBoot = lib.mkDefault false; - services.power-profiles-daemon.enable = false; - services.tlp.enable = lib.mkDefault true; boot.kernelParams = ["mem_sleep_default=deep" "pcie_aspm.policy=powersupersave"]; - powerManagement.enable = lib.mkDefault true; - powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; - services.tlp.settings = { - # CPU - CPU_SCALING_GOVERNOR_ON_BAT="ondemand"; - CPU_SCALING_GOVERNOR_ON_AC="performance"; - CPU_BOOST_ON_AC=1; - CPU_BOOST_ON_BAT=0; - # Stop charging battery at 60%, ideapad_laptop driver required - #STOP_CHARGE_THRESH_BAT0=1; - # Stop charging battery at 100% - STOP_CHARGE_THRESH_BAT0=0; - # GPU - RADEON_DPM_PERF_LEVEL_ON_AC="auto"; - RADEON_DPM_PERF_LEVEL_ON_BAT="low"; - }; } From c1a38081fa17eb4d1692f4df27bd48e59ac12b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 29 Dec 2022 13:52:15 +0000 Subject: [PATCH 0315/1476] Update lenovo/yoga/6/13ALC6/default.nix --- lenovo/yoga/6/13ALC6/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/yoga/6/13ALC6/default.nix b/lenovo/yoga/6/13ALC6/default.nix index 6b830c3c..b56bc9cc 100644 --- a/lenovo/yoga/6/13ALC6/default.nix +++ b/lenovo/yoga/6/13ALC6/default.nix @@ -12,6 +12,7 @@ libvdpau-va-gl ]; + # latest kernel needed to make wifi work boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; # energy savings From 49485f5569f290bf9d3daf893d9df3daf4d016be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 29 Dec 2022 13:53:01 +0000 Subject: [PATCH 0316/1476] Update lenovo/yoga/6/13ALC6/default.nix --- lenovo/yoga/6/13ALC6/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/lenovo/yoga/6/13ALC6/default.nix b/lenovo/yoga/6/13ALC6/default.nix index b56bc9cc..bd2e80ca 100644 --- a/lenovo/yoga/6/13ALC6/default.nix +++ b/lenovo/yoga/6/13ALC6/default.nix @@ -16,6 +16,5 @@ boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; # energy savings - hardware.bluetooth.powerOnBoot = lib.mkDefault false; boot.kernelParams = ["mem_sleep_default=deep" "pcie_aspm.policy=powersupersave"]; } From b1582825dda721e4feeeec782b34bf9af9f7f5f3 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 5 Dec 2022 12:41:54 +1300 Subject: [PATCH 0317/1476] Support for the Dell XPS 13, 9300 model --- dell/xps/13-9300/README.wiki | 20 ++++++++++++++++++++ dell/xps/13-9300/default.nix | 29 +++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 dell/xps/13-9300/README.wiki create mode 100644 dell/xps/13-9300/default.nix diff --git a/dell/xps/13-9300/README.wiki b/dell/xps/13-9300/README.wiki new file mode 100644 index 00000000..f92ae270 --- /dev/null +++ b/dell/xps/13-9300/README.wiki @@ -0,0 +1,20 @@ += Dell XPS 13 9300 = + +== 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. + +== Battery drain when sleeping == + +The laptop uses the S2 sleep mode by default instead of S3, which leads to +draining a lot of battery during sleep. + +See https://wiki.archlinux.org/index.php/Dell_XPS_13_(9300)#Power_Management +and https://bugzilla.kernel.org/show_bug.cgi?id=199689#c3 for reference diff --git a/dell/xps/13-9300/default.nix b/dell/xps/13-9300/default.nix new file mode 100644 index 00000000..6ec94ea1 --- /dev/null +++ b/dell/xps/13-9300/default.nix @@ -0,0 +1,29 @@ +{ config, lib, ... }: + +let + inherit (lib) mkDefault; + +in { + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/intel.nix + ../../../common/pc/laptop + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/ssd + ]; + + # Force S3 sleep mode. See README.wiki for details. + boot.kernelParams = [ "mem_sleep_default=deep" ]; + + # Touchpad goes over i2c, and the psmouse module interferes with it + boot.blacklistedKernelModules = [ "psmouse" ]; + + # Includes the Wi-Fi and Bluetooth firmware for the QCA6390. + hardware.enableRedistributableFirmware = mkDefault true; + + # Allows for updating firmware via `fwupdmgr`. + services.fwupd.enable = mkDefault true; + + # This will save you money and possibly your life! + services.thermald.enable = mkDefault true; +} From 97900e1e7eb3257a037ce5cfc3544787295685d9 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 5 Dec 2022 13:26:28 +1300 Subject: [PATCH 0318/1476] Support reloading i2c-designware module(s) after resuming --- dell/xps/13-9300/default.nix | 4 ++ .../sleep-resume/i2c-designware/default.nix | 42 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 dell/xps/sleep-resume/i2c-designware/default.nix diff --git a/dell/xps/13-9300/default.nix b/dell/xps/13-9300/default.nix index 6ec94ea1..9c379aed 100644 --- a/dell/xps/13-9300/default.nix +++ b/dell/xps/13-9300/default.nix @@ -10,6 +10,7 @@ in { ../../../common/pc/laptop ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/ssd + ../sleep-resume/i2c-designware ]; # Force S3 sleep mode. See README.wiki for details. @@ -26,4 +27,7 @@ in { # This will save you money and possibly your life! services.thermald.enable = mkDefault true; + + # Reloads i2c-designware module after suspend + services.sleep-resume.i2c-designware.enable = mkDefault true; } diff --git a/dell/xps/sleep-resume/i2c-designware/default.nix b/dell/xps/sleep-resume/i2c-designware/default.nix new file mode 100644 index 00000000..55be5494 --- /dev/null +++ b/dell/xps/sleep-resume/i2c-designware/default.nix @@ -0,0 +1,42 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkOption types; + + reloadDesignware = pkgs.writeShellApplication { + name = "reload-i2c-designware.sh"; + runtimeInputs = [ pkgs.kmod ]; + text = '' + # Reload the i2c Designware driver after resuming from sleep. + + # Wait up-to 0.5 second for each module to be unloaded: + # (It should never take this long) + modprobe -r --wait 500 i2c_designware_platform + modprobe -r --wait 500 i2c_designware_core + modprobe -r --wait 500 i2c_hid_acpi + modprobe -r --wait 500 i2c_hid + + # Should reload the module dependencies automatically: + modprobe i2c_designware_platform + ''; + }; + + cfg = config.services.sleep-resume.i2c-designware; +in { + options = { + services.sleep-resume.i2c-designware = { + enable = mkOption { + default = false; + type = types.bool; + description = "Reload the i2c_designware driver after resuming from sleep."; + }; + }; + }; + + config = mkIf cfg.enable { + powerManagement.resumeCommands = "${reloadDesignware}/bin/reload-i2c-designware.sh"; + }; +} + + + From 0cee376703b8e53d9538c2786211dbcd5396c48b Mon Sep 17 00:00:00 2001 From: mexisme Date: Fri, 30 Dec 2022 13:37:26 +1300 Subject: [PATCH 0319/1476] Support reloading btusb module after resuming --- dell/xps/sleep-resume/bluetooth/default.nix | 40 +++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 dell/xps/sleep-resume/bluetooth/default.nix diff --git a/dell/xps/sleep-resume/bluetooth/default.nix b/dell/xps/sleep-resume/bluetooth/default.nix new file mode 100644 index 00000000..e23e9c66 --- /dev/null +++ b/dell/xps/sleep-resume/bluetooth/default.nix @@ -0,0 +1,40 @@ +{config, lib, pkgs, ...}: + +let + inherit (lib) mkIf mkOption types; + + reloadBtusb = pkgs.writeShellApplication { + name = "reload-btusb.sh"; + runtimeInputs = [ + pkgs.coreutils + pkgs.kmod + ]; + text = '' + # Reload Bluetooth after resuming from sleep. + + # Wait up-to 0.5 second for the module to be unloaded: + # (It should never take this long) + modprobe -r --wait 500 btusb + + # "btusb" sometimes seems to need a little bit of time to settle after unloading: + sleep 0.2 + modprobe btusb + ''; + }; + + cfg = config.services.sleep-resume.bluetooth; +in { + options = { + services.sleep-resume.bluetooth = { + enable = mkOption { + default = false; + type = types.bool; + description = "Reload Bluetooth after resuming from sleep"; + }; + }; + }; + + config = mkIf cfg.enable { + powerManagement.resumeCommands = "${reloadBtusb}/bin/reload-btusb.sh"; + }; +} From ed291da4ab7e14ef3cff9c94a23247fa3cd7e7ae Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 5 Dec 2022 12:43:29 +1300 Subject: [PATCH 0320/1476] Update flake.nix and root README.md --- README.md | 1 + flake.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index fa388d1e..ee044bde 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,7 @@ See code for all available configurations. | [Dell Poweredge R7515](dell/poweredge/r7515) | `` | | [Dell Precision 5530](dell/precision/5530) | `` | | [Dell XPS 13 7390](dell/xps/13-7390) | `` | +| [Dell XPS 13 9300](dell/xps/13-9300) | `` | | [Dell XPS 13 9310](dell/xps/13-9310) | `` | | [Dell XPS 13 9343](dell/xps/13-9343) | `` | | [Dell XPS 13 9350](dell/xps/13-9350) | `` | diff --git a/flake.nix b/flake.nix index 387ffbb4..0a006c98 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,7 @@ dell-poweredge-r7515 = import ./dell/poweredge/r7515; 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; dell-xps-13-9310 = import ./dell/xps/13-9310; dell-xps-13-9343 = import ./dell/xps/13-9343; dell-xps-13-9350 = import ./dell/xps/13-9350; From 03c6d1515228ff524d63f532a2a6709dfd561a70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 31 Dec 2022 11:52:38 +0100 Subject: [PATCH 0321/1476] treewide: apply deadnix and statix --- airis/n990/default.nix | 2 +- apple/macbook-pro/10-1/default.nix | 2 -- apple/macbook-pro/11-5/default.nix | 4 ++-- apple/macbook-pro/14-1/default.nix | 2 +- asus/rog-strix/g733qs/default.nix | 2 +- common/cpu/intel/cpu-only.nix | 2 +- common/cpu/intel/default.nix | 2 -- common/gpu/nvidia/disable.nix | 2 +- common/pc/hdd/default.nix | 2 -- dell/e7240/default.nix | 2 -- dell/g3/3779/default.nix | 2 +- dell/latitude/3340/default.nix | 2 +- dell/latitude/3480/default.nix | 2 +- dell/latitude/5520/default.nix | 2 +- dell/latitude/7430/default.nix | 2 +- dell/latitude/7490/default.nix | 2 +- dell/precision/5530/default.nix | 2 -- dell/xps/13-9300/default.nix | 2 +- dell/xps/13-9360/default.nix | 2 -- dell/xps/13-9370/default.nix | 2 +- dell/xps/13-9380/default.nix | 2 -- dell/xps/15-7590/default.nix | 5 ++--- dell/xps/15-9500/nvidia/default.nix | 2 +- dell/xps/15-9550/nvidia/default.nix | 2 +- dell/xps/15-9560/intel/default.nix | 2 -- dell/xps/15-9560/nvidia/default.nix | 2 +- dell/xps/17-9700/intel/default.nix | 2 -- dell/xps/17-9700/nvidia/default.nix | 2 +- flake.nix | 2 +- hp/elitebook/2560p/default.nix | 5 +---- hp/elitebook/2560p/network.nix | 2 +- intel/nuc/8i7beh/default.nix | 2 +- kobol/helios4/overlay.nix | 2 +- lenovo/ideapad/15arh05/default.nix | 2 +- lenovo/ideapad/z510/default.nix | 2 -- lenovo/legion/15ach6/default.nix | 3 ++- lenovo/legion/15arh05h/default.nix | 2 +- lenovo/legion/16ach6h/edid/default.nix | 2 +- lenovo/legion/16ach6h/hybrid/default.nix | 2 +- lenovo/legion/16ithg6/default.nix | 2 +- lenovo/thinkpad/default.nix | 2 +- lenovo/thinkpad/e14/amd/default.nix | 2 -- lenovo/thinkpad/e14/default.nix | 2 +- lenovo/thinkpad/e14/intel/default.nix | 2 +- lenovo/thinkpad/e470/default.nix | 2 +- lenovo/thinkpad/e495/default.nix | 2 +- lenovo/thinkpad/l13/default.nix | 2 +- lenovo/thinkpad/l13/yoga/default.nix | 2 +- lenovo/thinkpad/l14/amd/default.nix | 2 -- lenovo/thinkpad/l14/default.nix | 2 -- lenovo/thinkpad/l14/intel/default.nix | 2 +- lenovo/thinkpad/p1/3th-gen/nvidia.nix | 2 +- lenovo/thinkpad/p14s/amd/gen2/default.nix | 2 +- lenovo/thinkpad/p16s/amd/gen1/default.nix | 2 +- lenovo/thinkpad/p53/default.nix | 2 +- lenovo/thinkpad/t14/amd/default.nix | 2 +- lenovo/thinkpad/t14/amd/gen1/default.nix | 3 --- lenovo/thinkpad/t14/amd/gen2/default.nix | 2 +- lenovo/thinkpad/t14/amd/gen3/default.nix | 2 +- lenovo/thinkpad/t14/default.nix | 2 +- lenovo/thinkpad/t14s/amd/default.nix | 2 +- lenovo/thinkpad/t14s/amd/gen1/default.nix | 2 +- lenovo/thinkpad/t14s/default.nix | 2 +- lenovo/thinkpad/t410/default.nix | 2 -- lenovo/thinkpad/t420/default.nix | 2 -- lenovo/thinkpad/t430/default.nix | 2 -- lenovo/thinkpad/t440p/default.nix | 2 +- lenovo/thinkpad/t440s/default.nix | 2 -- lenovo/thinkpad/t450s/default.nix | 2 -- lenovo/thinkpad/t460/default.nix | 2 -- lenovo/thinkpad/t460p/default.nix | 2 -- lenovo/thinkpad/t460s/default.nix | 2 -- lenovo/thinkpad/t470s/default.nix | 2 -- lenovo/thinkpad/t480/default.nix | 2 +- lenovo/thinkpad/t480s/default.nix | 2 +- lenovo/thinkpad/t490/default.nix | 2 +- lenovo/thinkpad/t495/default.nix | 2 +- lenovo/thinkpad/t550/default.nix | 2 -- lenovo/thinkpad/t590/default.nix | 2 +- lenovo/thinkpad/x1-extreme/gen2/default.nix | 2 +- lenovo/thinkpad/x1-extreme/gen4/default.nix | 2 +- lenovo/thinkpad/x1/10th-gen/default.nix | 1 - lenovo/thinkpad/x1/6th-gen/QHD/default.nix | 2 -- lenovo/thinkpad/x1/6th-gen/default.nix | 2 +- lenovo/thinkpad/x13/default.nix | 2 +- lenovo/thinkpad/x140e/default.nix | 2 +- lenovo/thinkpad/x200s/default.nix | 2 -- lenovo/thinkpad/x220/default.nix | 2 -- lenovo/thinkpad/x230/default.nix | 2 +- lenovo/thinkpad/x280/default.nix | 2 +- lenovo/thinkpad/yoga.nix | 2 -- lenovo/thinkpad/z/default.nix | 2 +- lenovo/thinkpad/z/z13/default.nix | 2 +- microsoft/surface-pro/3/default.nix | 1 - microsoft/surface/default.nix | 2 +- .../surface/firmware/surface-go/ath10k/ath10k-replace.nix | 2 +- microsoft/surface/kernel/default.nix | 2 +- microsoft/surface/kernel/linux-package.nix | 3 +-- microsoft/surface/repos.nix | 2 +- msi/gl62/default.nix | 2 +- msi/gs60/default.nix | 2 +- onenetbook/4/goodix-stylus-mastykin/default.nix | 2 +- pine64/pinebook-pro/default.nix | 2 +- pine64/pinebook-pro/overlay.nix | 2 +- raspberry-pi/4/apply-overlays-dtmerge.nix | 2 +- raspberry-pi/4/cpu-revision.nix | 1 - raspberry-pi/4/dwc2.nix | 2 +- raspberry-pi/4/i2c.nix | 6 +++--- raspberry-pi/4/modesetting.nix | 2 +- raspberry-pi/4/pkgs-overlays.nix | 8 ++++---- raspberry-pi/4/poe-hat.nix | 2 +- raspberry-pi/4/poe-plus-hat.nix | 2 +- raspberry-pi/4/pwm0.nix | 2 +- supermicro/a1sri-2758f/default.nix | 3 --- supermicro/x10sll-f/default.nix | 2 -- system76/default.nix | 2 +- toshiba/swanky/default.nix | 4 ++-- 117 files changed, 93 insertions(+), 162 deletions(-) diff --git a/airis/n990/default.nix b/airis/n990/default.nix index ae068131..e4711419 100644 --- a/airis/n990/default.nix +++ b/airis/n990/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ pkgs, ... }: { imports = [ ../../common/pc/laptop ]; diff --git a/apple/macbook-pro/10-1/default.nix b/apple/macbook-pro/10-1/default.nix index 4d31b1ca..37030966 100644 --- a/apple/macbook-pro/10-1/default.nix +++ b/apple/macbook-pro/10-1/default.nix @@ -1,5 +1,3 @@ -{ lib, pkgs, ... }: - { imports = [ ../. diff --git a/apple/macbook-pro/11-5/default.nix b/apple/macbook-pro/11-5/default.nix index 434e8e75..81eda9b2 100644 --- a/apple/macbook-pro/11-5/default.nix +++ b/apple/macbook-pro/11-5/default.nix @@ -1,8 +1,8 @@ -{ lib, config, pkgs, ... }: +{ lib, config, ... }: let - kernelPackages = config.boot.kernelPackages; + inherit (config.boot) kernelPackages; in diff --git a/apple/macbook-pro/14-1/default.nix b/apple/macbook-pro/14-1/default.nix index 45616841..6b1fd74c 100644 --- a/apple/macbook-pro/14-1/default.nix +++ b/apple/macbook-pro/14-1/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ config, lib, pkgs, ... }: { imports = [ diff --git a/asus/rog-strix/g733qs/default.nix b/asus/rog-strix/g733qs/default.nix index b49a44c0..b981aeff 100644 --- a/asus/rog-strix/g733qs/default.nix +++ b/asus/rog-strix/g733qs/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ pkgs, lib, ... }: { imports = [ ../../../common/cpu/amd/pstate.nix diff --git a/common/cpu/intel/cpu-only.nix b/common/cpu/intel/cpu-only.nix index f48b0361..c30f0c57 100644 --- a/common/cpu/intel/cpu-only.nix +++ b/common/cpu/intel/cpu-only.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: { hardware.cpu.intel.updateMicrocode = diff --git a/common/cpu/intel/default.nix b/common/cpu/intel/default.nix index 966505f1..5c1663f2 100644 --- a/common/cpu/intel/default.nix +++ b/common/cpu/intel/default.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { imports = [ ./cpu-only.nix diff --git a/common/gpu/nvidia/disable.nix b/common/gpu/nvidia/disable.nix index c6516af9..72e89c20 100644 --- a/common/gpu/nvidia/disable.nix +++ b/common/gpu/nvidia/disable.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { # This runs only intel/amdgpu igpus and nvidia dgpus do not drain power. diff --git a/common/pc/hdd/default.nix b/common/pc/hdd/default.nix index 869badb2..0967ef42 100644 --- a/common/pc/hdd/default.nix +++ b/common/pc/hdd/default.nix @@ -1,3 +1 @@ -{ lib, ... }: - {} diff --git a/dell/e7240/default.nix b/dell/e7240/default.nix index 3334a745..102da6bb 100644 --- a/dell/e7240/default.nix +++ b/dell/e7240/default.nix @@ -1,5 +1,3 @@ -{ lib, pkgs, ... }: - { imports = [ ../../common/cpu/intel diff --git a/dell/g3/3779/default.nix b/dell/g3/3779/default.nix index 80deb299..83216ebf 100644 --- a/dell/g3/3779/default.nix +++ b/dell/g3/3779/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/dell/latitude/3340/default.nix b/dell/latitude/3340/default.nix index c7cf888d..d50b024c 100644 --- a/dell/latitude/3340/default.nix +++ b/dell/latitude/3340/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ ... }: { imports = [ diff --git a/dell/latitude/3480/default.nix b/dell/latitude/3480/default.nix index 86be458a..7f6116a6 100644 --- a/dell/latitude/3480/default.nix +++ b/dell/latitude/3480/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/dell/latitude/5520/default.nix b/dell/latitude/5520/default.nix index f53ba080..6ad43309 100644 --- a/dell/latitude/5520/default.nix +++ b/dell/latitude/5520/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/dell/latitude/7430/default.nix b/dell/latitude/7430/default.nix index a7d737b1..b69fd5c4 100644 --- a/dell/latitude/7430/default.nix +++ b/dell/latitude/7430/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/dell/latitude/7490/default.nix b/dell/latitude/7490/default.nix index a368f441..9bed2433 100644 --- a/dell/latitude/7490/default.nix +++ b/dell/latitude/7490/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/dell/precision/5530/default.nix b/dell/precision/5530/default.nix index 05e1d4af..24071f0a 100644 --- a/dell/precision/5530/default.nix +++ b/dell/precision/5530/default.nix @@ -1,5 +1,3 @@ -{ lib, pkgs, ... }: - { imports = [ ../../../common/cpu/intel diff --git a/dell/xps/13-9300/default.nix b/dell/xps/13-9300/default.nix index 9c379aed..148b6f91 100644 --- a/dell/xps/13-9300/default.nix +++ b/dell/xps/13-9300/default.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ lib, ... }: let inherit (lib) mkDefault; diff --git a/dell/xps/13-9360/default.nix b/dell/xps/13-9360/default.nix index f40f6e0c..f1ea3787 100644 --- a/dell/xps/13-9360/default.nix +++ b/dell/xps/13-9360/default.nix @@ -1,5 +1,3 @@ -{ lib, pkgs, ... }: - { imports = [ ../../../common/cpu/intel/kaby-lake diff --git a/dell/xps/13-9370/default.nix b/dell/xps/13-9370/default.nix index dbe852f0..10362b3b 100644 --- a/dell/xps/13-9370/default.nix +++ b/dell/xps/13-9370/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/dell/xps/13-9380/default.nix b/dell/xps/13-9380/default.nix index 162cc261..5d74103b 100644 --- a/dell/xps/13-9380/default.nix +++ b/dell/xps/13-9380/default.nix @@ -1,5 +1,3 @@ -{ lib, pkgs, ... }: - { imports = [ ../../../common/cpu/intel diff --git a/dell/xps/15-7590/default.nix b/dell/xps/15-7590/default.nix index e42cec30..98b08764 100644 --- a/dell/xps/15-7590/default.nix +++ b/dell/xps/15-7590/default.nix @@ -1,4 +1,3 @@ -{ lib, ... }: { imports = [ ../../../common/cpu/intel @@ -25,8 +24,8 @@ # The 48.ucode causes the Killer wifi card to crash. # The iwlfwifi-cc-a0-46.ucode works perfectly nixpkgs.overlays = [ - (self: super: { - firmwareLinuxNonfree = super.firmwareLinuxNonfree.overrideAttrs (old: { + (_self: super: { + firmwareLinuxNonfree = super.firmwareLinuxNonfree.overrideAttrs (_old: { src = super.fetchgit { url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"; diff --git a/dell/xps/15-9500/nvidia/default.nix b/dell/xps/15-9500/nvidia/default.nix index f2fa3ae7..257462a4 100644 --- a/dell/xps/15-9500/nvidia/default.nix +++ b/dell/xps/15-9500/nvidia/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { imports = [ ../default.nix diff --git a/dell/xps/15-9550/nvidia/default.nix b/dell/xps/15-9550/nvidia/default.nix index f2fa3ae7..257462a4 100644 --- a/dell/xps/15-9550/nvidia/default.nix +++ b/dell/xps/15-9550/nvidia/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { imports = [ ../default.nix diff --git a/dell/xps/15-9560/intel/default.nix b/dell/xps/15-9560/intel/default.nix index a4531497..c4d51ea6 100644 --- a/dell/xps/15-9560/intel/default.nix +++ b/dell/xps/15-9560/intel/default.nix @@ -1,5 +1,3 @@ -{ lib, pkgs, ... }: - { imports = [ ../../../../common/cpu/intel diff --git a/dell/xps/15-9560/nvidia/default.nix b/dell/xps/15-9560/nvidia/default.nix index 3e78ebac..229a6efb 100644 --- a/dell/xps/15-9560/nvidia/default.nix +++ b/dell/xps/15-9560/nvidia/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/dell/xps/17-9700/intel/default.nix b/dell/xps/17-9700/intel/default.nix index 0176bfde..2adca86f 100644 --- a/dell/xps/17-9700/intel/default.nix +++ b/dell/xps/17-9700/intel/default.nix @@ -1,5 +1,3 @@ -{ lib, pkgs, ... }: - { imports = [ ../../../../common/cpu/intel diff --git a/dell/xps/17-9700/nvidia/default.nix b/dell/xps/17-9700/nvidia/default.nix index 7e1e3e10..446a0b76 100644 --- a/dell/xps/17-9700/nvidia/default.nix +++ b/dell/xps/17-9700/nvidia/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/flake.nix b/flake.nix index 0a006c98..4c8f8543 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { description = "nixos-hardware"; - outputs = { self }: { + outputs = _: { nixosModules = { acer-aspire-4810t = import ./acer/aspire/4810t; airis-n990 = import ./airis/n990; diff --git a/hp/elitebook/2560p/default.nix b/hp/elitebook/2560p/default.nix index de34e157..38e5d600 100644 --- a/hp/elitebook/2560p/default.nix +++ b/hp/elitebook/2560p/default.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: with lib; -let - xcfg = config.services.xserver; -in { imports = [ ../../../common/cpu/intel diff --git a/hp/elitebook/2560p/network.nix b/hp/elitebook/2560p/network.nix index 23c52844..2fa94e96 100644 --- a/hp/elitebook/2560p/network.nix +++ b/hp/elitebook/2560p/network.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, lib, ... }: with lib; { config = { diff --git a/intel/nuc/8i7beh/default.nix b/intel/nuc/8i7beh/default.nix index 9cd9d4f6..5dfed4ef 100644 --- a/intel/nuc/8i7beh/default.nix +++ b/intel/nuc/8i7beh/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/kobol/helios4/overlay.nix b/kobol/helios4/overlay.nix index 8453bb3c..41aa9d98 100644 --- a/kobol/helios4/overlay.nix +++ b/kobol/helios4/overlay.nix @@ -1,4 +1,4 @@ -final: prev: { +final: _prev: { linux_5_15_helios4 = final.linux_5_15.override { kernelPatches = [ # A patch to get both PWM fans working diff --git a/lenovo/ideapad/15arh05/default.nix b/lenovo/ideapad/15arh05/default.nix index fda5cd02..46dfd24f 100644 --- a/lenovo/ideapad/15arh05/default.nix +++ b/lenovo/ideapad/15arh05/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/lenovo/ideapad/z510/default.nix b/lenovo/ideapad/z510/default.nix index 83f65680..d26ed0b0 100644 --- a/lenovo/ideapad/z510/default.nix +++ b/lenovo/ideapad/z510/default.nix @@ -1,5 +1,3 @@ -{ lib, ... }: - { imports = [ ../. diff --git a/lenovo/legion/15ach6/default.nix b/lenovo/legion/15ach6/default.nix index 0cbc0f43..3a03d6f1 100644 --- a/lenovo/legion/15ach6/default.nix +++ b/lenovo/legion/15ach6/default.nix @@ -1,5 +1,6 @@ { lib, config, ... }: -let kernelPackages = config.boot.kernelPackages; +let + inherit (config.boot) kernelPackages; in { imports = [ ../../../common/cpu/amd diff --git a/lenovo/legion/15arh05h/default.nix b/lenovo/legion/15arh05h/default.nix index 603fd9e3..6ab02dc7 100644 --- a/lenovo/legion/15arh05h/default.nix +++ b/lenovo/legion/15arh05h/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/lenovo/legion/16ach6h/edid/default.nix b/lenovo/legion/16ach6h/edid/default.nix index d9d8b521..ec77c244 100644 --- a/lenovo/legion/16ach6h/edid/default.nix +++ b/lenovo/legion/16ach6h/edid/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ...}: +{ pkgs, ...}: let # This file was obtained from the display while "DDG" mode was enabled. diff --git a/lenovo/legion/16ach6h/hybrid/default.nix b/lenovo/legion/16ach6h/hybrid/default.nix index 8a56a48d..0deee0e6 100644 --- a/lenovo/legion/16ach6h/hybrid/default.nix +++ b/lenovo/legion/16ach6h/hybrid/default.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ lib, ... }: { imports = [ diff --git a/lenovo/legion/16ithg6/default.nix b/lenovo/legion/16ithg6/default.nix index cf0244ea..e0dca1eb 100644 --- a/lenovo/legion/16ithg6/default.nix +++ b/lenovo/legion/16ithg6/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/lenovo/thinkpad/default.nix b/lenovo/thinkpad/default.nix index 99d4937e..989f6a41 100644 --- a/lenovo/thinkpad/default.nix +++ b/lenovo/thinkpad/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: { imports = [ ../../common/pc/laptop ]; diff --git a/lenovo/thinkpad/e14/amd/default.nix b/lenovo/thinkpad/e14/amd/default.nix index d39c7d91..ff362d95 100644 --- a/lenovo/thinkpad/e14/amd/default.nix +++ b/lenovo/thinkpad/e14/amd/default.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { imports = [ ../. diff --git a/lenovo/thinkpad/e14/default.nix b/lenovo/thinkpad/e14/default.nix index 42bf0147..a073b58d 100644 --- a/lenovo/thinkpad/e14/default.nix +++ b/lenovo/thinkpad/e14/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ ... }: { imports = [ diff --git a/lenovo/thinkpad/e14/intel/default.nix b/lenovo/thinkpad/e14/intel/default.nix index 088289f3..64d2f177 100644 --- a/lenovo/thinkpad/e14/intel/default.nix +++ b/lenovo/thinkpad/e14/intel/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/lenovo/thinkpad/e470/default.nix b/lenovo/thinkpad/e470/default.nix index e9c52141..32007321 100644 --- a/lenovo/thinkpad/e470/default.nix +++ b/lenovo/thinkpad/e470/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: { imports = [ diff --git a/lenovo/thinkpad/e495/default.nix b/lenovo/thinkpad/e495/default.nix index 60f8efb3..41c6b31d 100644 --- a/lenovo/thinkpad/e495/default.nix +++ b/lenovo/thinkpad/e495/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: { imports = [ diff --git a/lenovo/thinkpad/l13/default.nix b/lenovo/thinkpad/l13/default.nix index 95308ab9..449756ba 100644 --- a/lenovo/thinkpad/l13/default.nix +++ b/lenovo/thinkpad/l13/default.nix @@ -1,4 +1,4 @@ -{ nixos, lib, pkgs, config, stdenv, ... }: +{ lib, ... }: { imports = [ ../../../common/cpu/intel diff --git a/lenovo/thinkpad/l13/yoga/default.nix b/lenovo/thinkpad/l13/yoga/default.nix index 3fb6f162..8c41a412 100644 --- a/lenovo/thinkpad/l13/yoga/default.nix +++ b/lenovo/thinkpad/l13/yoga/default.nix @@ -1,4 +1,4 @@ -{ nixos, lib, pkgs, config, stdenv, ... }: +{ lib, config, ... }: { imports = [ ../. diff --git a/lenovo/thinkpad/l14/amd/default.nix b/lenovo/thinkpad/l14/amd/default.nix index bb216211..c21cbce9 100644 --- a/lenovo/thinkpad/l14/amd/default.nix +++ b/lenovo/thinkpad/l14/amd/default.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { imports = [ ../. diff --git a/lenovo/thinkpad/l14/default.nix b/lenovo/thinkpad/l14/default.nix index 42bf0147..b3d031d4 100644 --- a/lenovo/thinkpad/l14/default.nix +++ b/lenovo/thinkpad/l14/default.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { imports = [ ../. diff --git a/lenovo/thinkpad/l14/intel/default.nix b/lenovo/thinkpad/l14/intel/default.nix index 088289f3..64d2f177 100644 --- a/lenovo/thinkpad/l14/intel/default.nix +++ b/lenovo/thinkpad/l14/intel/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/lenovo/thinkpad/p1/3th-gen/nvidia.nix b/lenovo/thinkpad/p1/3th-gen/nvidia.nix index 62d9ebc5..08081071 100644 --- a/lenovo/thinkpad/p1/3th-gen/nvidia.nix +++ b/lenovo/thinkpad/p1/3th-gen/nvidia.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { hardware.nvidia.modesetting.enable = true; hardware.opengl.driSupport32Bit = true; diff --git a/lenovo/thinkpad/p14s/amd/gen2/default.nix b/lenovo/thinkpad/p14s/amd/gen2/default.nix index 8f0e257b..c80a7030 100644 --- a/lenovo/thinkpad/p14s/amd/gen2/default.nix +++ b/lenovo/thinkpad/p14s/amd/gen2/default.nix @@ -1,5 +1,5 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: { imports = [ diff --git a/lenovo/thinkpad/p16s/amd/gen1/default.nix b/lenovo/thinkpad/p16s/amd/gen1/default.nix index 5b7bfe4e..1cf17485 100644 --- a/lenovo/thinkpad/p16s/amd/gen1/default.nix +++ b/lenovo/thinkpad/p16s/amd/gen1/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: { # For mainline support of rtw89 wireless networking diff --git a/lenovo/thinkpad/p53/default.nix b/lenovo/thinkpad/p53/default.nix index a499d5c2..84e60fab 100644 --- a/lenovo/thinkpad/p53/default.nix +++ b/lenovo/thinkpad/p53/default.nix @@ -1,4 +1,4 @@ -{ nixos, pkgs, lib, config, stdenv, ... }: +{ lib, ... }: { imports = [ ../../../common/cpu/intel diff --git a/lenovo/thinkpad/t14/amd/default.nix b/lenovo/thinkpad/t14/amd/default.nix index fbd9f204..cbef7c0b 100644 --- a/lenovo/thinkpad/t14/amd/default.nix +++ b/lenovo/thinkpad/t14/amd/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: { imports = [ diff --git a/lenovo/thinkpad/t14/amd/gen1/default.nix b/lenovo/thinkpad/t14/amd/gen1/default.nix index cb1ec7d8..665d3d41 100644 --- a/lenovo/thinkpad/t14/amd/gen1/default.nix +++ b/lenovo/thinkpad/t14/amd/gen1/default.nix @@ -1,6 +1,3 @@ - -{ config, lib, pkgs, ... }: - { imports = [ ../. diff --git a/lenovo/thinkpad/t14/amd/gen2/default.nix b/lenovo/thinkpad/t14/amd/gen2/default.nix index 367e3988..795b9a81 100644 --- a/lenovo/thinkpad/t14/amd/gen2/default.nix +++ b/lenovo/thinkpad/t14/amd/gen2/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: { imports = [ diff --git a/lenovo/thinkpad/t14/amd/gen3/default.nix b/lenovo/thinkpad/t14/amd/gen3/default.nix index 56578984..617a3a43 100644 --- a/lenovo/thinkpad/t14/amd/gen3/default.nix +++ b/lenovo/thinkpad/t14/amd/gen3/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: { imports = [ diff --git a/lenovo/thinkpad/t14/default.nix b/lenovo/thinkpad/t14/default.nix index 18802e6e..3466e95d 100644 --- a/lenovo/thinkpad/t14/default.nix +++ b/lenovo/thinkpad/t14/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: { imports = [ diff --git a/lenovo/thinkpad/t14s/amd/default.nix b/lenovo/thinkpad/t14s/amd/default.nix index fbd9f204..cbef7c0b 100644 --- a/lenovo/thinkpad/t14s/amd/default.nix +++ b/lenovo/thinkpad/t14s/amd/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: { imports = [ diff --git a/lenovo/thinkpad/t14s/amd/gen1/default.nix b/lenovo/thinkpad/t14s/amd/gen1/default.nix index 13dc790d..9dd565d9 100644 --- a/lenovo/thinkpad/t14s/amd/gen1/default.nix +++ b/lenovo/thinkpad/t14s/amd/gen1/default.nix @@ -1,5 +1,5 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: { imports = [ diff --git a/lenovo/thinkpad/t14s/default.nix b/lenovo/thinkpad/t14s/default.nix index d783b21a..182071a7 100644 --- a/lenovo/thinkpad/t14s/default.nix +++ b/lenovo/thinkpad/t14s/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: { imports = [ diff --git a/lenovo/thinkpad/t410/default.nix b/lenovo/thinkpad/t410/default.nix index c40801ff..9cb15b3d 100644 --- a/lenovo/thinkpad/t410/default.nix +++ b/lenovo/thinkpad/t410/default.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { imports = [ ../. diff --git a/lenovo/thinkpad/t420/default.nix b/lenovo/thinkpad/t420/default.nix index be05d1ec..a3c7db40 100644 --- a/lenovo/thinkpad/t420/default.nix +++ b/lenovo/thinkpad/t420/default.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { imports = [ ../. diff --git a/lenovo/thinkpad/t430/default.nix b/lenovo/thinkpad/t430/default.nix index 9c5580ef..47f2d6b9 100644 --- a/lenovo/thinkpad/t430/default.nix +++ b/lenovo/thinkpad/t430/default.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { imports = [ ../. diff --git a/lenovo/thinkpad/t440p/default.nix b/lenovo/thinkpad/t440p/default.nix index 4dd40857..53a93c21 100644 --- a/lenovo/thinkpad/t440p/default.nix +++ b/lenovo/thinkpad/t440p/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/lenovo/thinkpad/t440s/default.nix b/lenovo/thinkpad/t440s/default.nix index c40ad90f..ccfa9e55 100644 --- a/lenovo/thinkpad/t440s/default.nix +++ b/lenovo/thinkpad/t440s/default.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { imports = [ ../. diff --git a/lenovo/thinkpad/t450s/default.nix b/lenovo/thinkpad/t450s/default.nix index e6233717..548f6881 100644 --- a/lenovo/thinkpad/t450s/default.nix +++ b/lenovo/thinkpad/t450s/default.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { imports = [ ../../../common/cpu/intel diff --git a/lenovo/thinkpad/t460/default.nix b/lenovo/thinkpad/t460/default.nix index e6233717..548f6881 100644 --- a/lenovo/thinkpad/t460/default.nix +++ b/lenovo/thinkpad/t460/default.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { imports = [ ../../../common/cpu/intel diff --git a/lenovo/thinkpad/t460p/default.nix b/lenovo/thinkpad/t460p/default.nix index e6233717..548f6881 100644 --- a/lenovo/thinkpad/t460p/default.nix +++ b/lenovo/thinkpad/t460p/default.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { imports = [ ../../../common/cpu/intel diff --git a/lenovo/thinkpad/t460s/default.nix b/lenovo/thinkpad/t460s/default.nix index e6233717..548f6881 100644 --- a/lenovo/thinkpad/t460s/default.nix +++ b/lenovo/thinkpad/t460s/default.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { imports = [ ../../../common/cpu/intel diff --git a/lenovo/thinkpad/t470s/default.nix b/lenovo/thinkpad/t470s/default.nix index e6233717..548f6881 100644 --- a/lenovo/thinkpad/t470s/default.nix +++ b/lenovo/thinkpad/t470s/default.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { imports = [ ../../../common/cpu/intel diff --git a/lenovo/thinkpad/t480/default.nix b/lenovo/thinkpad/t480/default.nix index 6cefeaab..bfca9122 100644 --- a/lenovo/thinkpad/t480/default.nix +++ b/lenovo/thinkpad/t480/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/lenovo/thinkpad/t480s/default.nix b/lenovo/thinkpad/t480s/default.nix index 6cefeaab..bfca9122 100644 --- a/lenovo/thinkpad/t480s/default.nix +++ b/lenovo/thinkpad/t480s/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/lenovo/thinkpad/t490/default.nix b/lenovo/thinkpad/t490/default.nix index 3578da66..c20d2136 100644 --- a/lenovo/thinkpad/t490/default.nix +++ b/lenovo/thinkpad/t490/default.nix @@ -1,4 +1,4 @@ -{ nixos, lib, pkgs, config, stdenv, ... }: +{ lib, ... }: { imports = [ ../../../common/cpu/intel diff --git a/lenovo/thinkpad/t495/default.nix b/lenovo/thinkpad/t495/default.nix index 64957e6e..ef508134 100644 --- a/lenovo/thinkpad/t495/default.nix +++ b/lenovo/thinkpad/t495/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: { imports = [ diff --git a/lenovo/thinkpad/t550/default.nix b/lenovo/thinkpad/t550/default.nix index e6233717..548f6881 100644 --- a/lenovo/thinkpad/t550/default.nix +++ b/lenovo/thinkpad/t550/default.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { imports = [ ../../../common/cpu/intel diff --git a/lenovo/thinkpad/t590/default.nix b/lenovo/thinkpad/t590/default.nix index 6a4cc7b8..3beea72e 100644 --- a/lenovo/thinkpad/t590/default.nix +++ b/lenovo/thinkpad/t590/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/lenovo/thinkpad/x1-extreme/gen2/default.nix b/lenovo/thinkpad/x1-extreme/gen2/default.nix index 6b0ebbd5..17147b53 100644 --- a/lenovo/thinkpad/x1-extreme/gen2/default.nix +++ b/lenovo/thinkpad/x1-extreme/gen2/default.nix @@ -19,7 +19,7 @@ with lib; hardware.bumblebee.connectDisplay = true; nixpkgs.overlays = [ - (self: super: { + (_self: super: { bumblebee = super.bumblebee.override { extraNvidiaDeviceOptions = '' Option "AllowEmptyInitialConfiguration" diff --git a/lenovo/thinkpad/x1-extreme/gen4/default.nix b/lenovo/thinkpad/x1-extreme/gen4/default.nix index f52fe1ec..0c8cf191 100644 --- a/lenovo/thinkpad/x1-extreme/gen4/default.nix +++ b/lenovo/thinkpad/x1-extreme/gen4/default.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ lib, ... }: { imports = [ diff --git a/lenovo/thinkpad/x1/10th-gen/default.nix b/lenovo/thinkpad/x1/10th-gen/default.nix index c06e8395..75a23d85 100644 --- a/lenovo/thinkpad/x1/10th-gen/default.nix +++ b/lenovo/thinkpad/x1/10th-gen/default.nix @@ -1,4 +1,3 @@ -{ lib, pkgs, ... }: { imports = [ ../. diff --git a/lenovo/thinkpad/x1/6th-gen/QHD/default.nix b/lenovo/thinkpad/x1/6th-gen/QHD/default.nix index b6495ea1..84d7f715 100644 --- a/lenovo/thinkpad/x1/6th-gen/QHD/default.nix +++ b/lenovo/thinkpad/x1/6th-gen/QHD/default.nix @@ -1,6 +1,4 @@ # X1 6th generation with a QHD (2560x1440px) display -{ config, lib, pkgs, ... }: - { imports = [ ../. diff --git a/lenovo/thinkpad/x1/6th-gen/default.nix b/lenovo/thinkpad/x1/6th-gen/default.nix index b244e970..24fe6761 100644 --- a/lenovo/thinkpad/x1/6th-gen/default.nix +++ b/lenovo/thinkpad/x1/6th-gen/default.nix @@ -5,7 +5,7 @@ # # Enable the lower-power S3 suspend state by upgrading the BIOS to version >= 1.30, # then manually selecting Linux in the power management section. -{ config, pkgs, lib, ... }: +{ lib, ... }: { imports = [ ../. diff --git a/lenovo/thinkpad/x13/default.nix b/lenovo/thinkpad/x13/default.nix index 88c94185..911dc5b0 100644 --- a/lenovo/thinkpad/x13/default.nix +++ b/lenovo/thinkpad/x13/default.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: { +{ ... }: { # Reference to hardware: https://certification.ubuntu.com/hardware/202004-27844 imports = [ ../. diff --git a/lenovo/thinkpad/x140e/default.nix b/lenovo/thinkpad/x140e/default.nix index c03410e9..fbc6df92 100644 --- a/lenovo/thinkpad/x140e/default.nix +++ b/lenovo/thinkpad/x140e/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/lenovo/thinkpad/x200s/default.nix b/lenovo/thinkpad/x200s/default.nix index 5a637d63..1a6d40eb 100644 --- a/lenovo/thinkpad/x200s/default.nix +++ b/lenovo/thinkpad/x200s/default.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { imports = [ ../. diff --git a/lenovo/thinkpad/x220/default.nix b/lenovo/thinkpad/x220/default.nix index b28e2784..ec8b45c9 100644 --- a/lenovo/thinkpad/x220/default.nix +++ b/lenovo/thinkpad/x220/default.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { imports = [ ../. diff --git a/lenovo/thinkpad/x230/default.nix b/lenovo/thinkpad/x230/default.nix index 418b68c8..995bb449 100644 --- a/lenovo/thinkpad/x230/default.nix +++ b/lenovo/thinkpad/x230/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, ... }: { imports = [ diff --git a/lenovo/thinkpad/x280/default.nix b/lenovo/thinkpad/x280/default.nix index a9423e54..880458e7 100644 --- a/lenovo/thinkpad/x280/default.nix +++ b/lenovo/thinkpad/x280/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ lib, ... }: { imports = [ diff --git a/lenovo/thinkpad/yoga.nix b/lenovo/thinkpad/yoga.nix index c624e1b6..559d3272 100644 --- a/lenovo/thinkpad/yoga.nix +++ b/lenovo/thinkpad/yoga.nix @@ -1,5 +1,3 @@ -{ config, lib, pkgs, ... }: - { # automatic screen orientation hardware.sensor.iio.enable = true; diff --git a/lenovo/thinkpad/z/default.nix b/lenovo/thinkpad/z/default.nix index e1cf6b20..b3c8be1b 100644 --- a/lenovo/thinkpad/z/default.nix +++ b/lenovo/thinkpad/z/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: { +{ lib, pkgs, ... }: { imports = [ ../../../lenovo/thinkpad ../../../common/cpu/amd diff --git a/lenovo/thinkpad/z/z13/default.nix b/lenovo/thinkpad/z/z13/default.nix index b351777f..cf1a5b48 100644 --- a/lenovo/thinkpad/z/z13/default.nix +++ b/lenovo/thinkpad/z/z13/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: { +{ imports = [ ../../../../lenovo/thinkpad/z ]; diff --git a/microsoft/surface-pro/3/default.nix b/microsoft/surface-pro/3/default.nix index 4fa8f79a..7e80d1d9 100644 --- a/microsoft/surface-pro/3/default.nix +++ b/microsoft/surface-pro/3/default.nix @@ -1,4 +1,3 @@ -{ lib, ... }: { imports = [ ../../surface ]; } diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 9a59e9ff..2952daed 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: let inherit (lib) mkDefault; diff --git a/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix b/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix index e62307d0..e6b84e1f 100644 --- a/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix +++ b/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix @@ -1,7 +1,7 @@ { stdenv, lib, pkgs, firmwareLinuxNonfree, ... }: let - repos = (pkgs.callPackage ../../../repos.nix {}); + repos = pkgs.callPackage ../../../repos.nix {}; killernetworking_firmware = repos.surface-go-ath10k-firmware_backup + "/K1535_Debian"; in stdenv.mkDerivation { diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/kernel/default.nix index 4fc495f0..6eba2ca8 100644 --- a/microsoft/surface/kernel/default.nix +++ b/microsoft/surface/kernel/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, ... }: let inherit (lib) mkOption types; diff --git a/microsoft/surface/kernel/linux-package.nix b/microsoft/surface/kernel/linux-package.nix index 4858e4f5..c115df10 100644 --- a/microsoft/surface/kernel/linux-package.nix +++ b/microsoft/surface/kernel/linux-package.nix @@ -1,12 +1,11 @@ { lib, buildLinux, callPackage, - fetchurl, linuxPackagesFor, }: let - inherit (lib) kernel recurseIntoAttrs; + inherit (lib) recurseIntoAttrs; in { repos = callPackage ../repos.nix {}; diff --git a/microsoft/surface/repos.nix b/microsoft/surface/repos.nix index 0e58c0c1..b15dd7ec 100644 --- a/microsoft/surface/repos.nix +++ b/microsoft/surface/repos.nix @@ -1,4 +1,4 @@ -{ fetchFromGitHub, fetchurl }: +{ fetchFromGitHub }: { linux-surface = fetchFromGitHub { diff --git a/msi/gl62/default.nix b/msi/gl62/default.nix index 6f3f91cb..049ffcfb 100644 --- a/msi/gl62/default.nix +++ b/msi/gl62/default.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ lib, ... }: { imports = [ diff --git a/msi/gs60/default.nix b/msi/gs60/default.nix index 4bc34ef1..70d608b7 100644 --- a/msi/gs60/default.nix +++ b/msi/gs60/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ pkgs, ... }: { imports = [ ../../common/cpu/intel diff --git a/onenetbook/4/goodix-stylus-mastykin/default.nix b/onenetbook/4/goodix-stylus-mastykin/default.nix index 2c12ca67..2329073b 100644 --- a/onenetbook/4/goodix-stylus-mastykin/default.nix +++ b/onenetbook/4/goodix-stylus-mastykin/default.nix @@ -22,7 +22,7 @@ let in stdenv.mkDerivation rec { name = "hid-multitouch-onenetbook4-${version}"; - version = kernel.version; + inherit (kernel) version; hardeningDisable = [ "pic" "format" ]; nativeBuildInputs = kernel.moduleBuildDependencies; diff --git a/pine64/pinebook-pro/default.nix b/pine64/pinebook-pro/default.nix index ca83f097..ea77ad33 100644 --- a/pine64/pinebook-pro/default.nix +++ b/pine64/pinebook-pro/default.nix @@ -1,5 +1,5 @@ # This configuration file can be safely imported in your system configuration. -{ config, pkgs, lib, ... }: +{ pkgs, lib, ... }: { nixpkgs.overlays = [ diff --git a/pine64/pinebook-pro/overlay.nix b/pine64/pinebook-pro/overlay.nix index 8d140f02..be45573e 100644 --- a/pine64/pinebook-pro/overlay.nix +++ b/pine64/pinebook-pro/overlay.nix @@ -1,4 +1,4 @@ -final: super: +final: _super: let inherit (final) callPackage; diff --git a/raspberry-pi/4/apply-overlays-dtmerge.nix b/raspberry-pi/4/apply-overlays-dtmerge.nix index 72830295..84995032 100644 --- a/raspberry-pi/4/apply-overlays-dtmerge.nix +++ b/raspberry-pi/4/apply-overlays-dtmerge.nix @@ -1,6 +1,6 @@ # modification of nixpkgs deviceTree.applyOverlays to resolve https://github.com/NixOS/nixpkgs/issues/125354 # derived from https://github.com/NixOS/nixpkgs/blob/916ca8f2b0c208def051f8ea9760c534a40309db/pkgs/os-specific/linux/device-tree/default.nix -{ lib, pkgs, stdenvNoCC, dtc, libraspberrypi }: +{ lib, stdenvNoCC, dtc, libraspberrypi }: with lib; (base: overlays': stdenvNoCC.mkDerivation { name = "device-tree-overlays"; diff --git a/raspberry-pi/4/cpu-revision.nix b/raspberry-pi/4/cpu-revision.nix index 8ac2c551..54db83af 100644 --- a/raspberry-pi/4/cpu-revision.nix +++ b/raspberry-pi/4/cpu-revision.nix @@ -1,4 +1,3 @@ -{ ... }: { hardware.deviceTree.overlays = [ { diff --git a/raspberry-pi/4/dwc2.nix b/raspberry-pi/4/dwc2.nix index 4ee30911..bdb63b18 100644 --- a/raspberry-pi/4/dwc2.nix +++ b/raspberry-pi/4/dwc2.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: let cfg = config.hardware.raspberry-pi."4".dwc2; diff --git a/raspberry-pi/4/i2c.nix b/raspberry-pi/4/i2c.nix index 786581ee..0355397e 100644 --- a/raspberry-pi/4/i2c.nix +++ b/raspberry-pi/4/i2c.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: let cfg = config.hardware.raspberry-pi."4"; @@ -57,7 +57,7 @@ in overlays = [ (simple-overlay { target = "i2c0if"; status = "okay"; - frequency = cfg.i2c0.frequency; + inherit (cfg.i2c0) frequency; }) ]; }; }) @@ -67,7 +67,7 @@ in overlays = [ (simple-overlay { target = "i2c1"; status = "okay"; - frequency = cfg.i2c1.frequency; + inherit (cfg.i2c1) frequency; }) ]; }; }) diff --git a/raspberry-pi/4/modesetting.nix b/raspberry-pi/4/modesetting.nix index 8151f931..b1f734b3 100644 --- a/raspberry-pi/4/modesetting.nix +++ b/raspberry-pi/4/modesetting.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: let cfg = config.hardware.raspberry-pi."4".fkms-3d; diff --git a/raspberry-pi/4/pkgs-overlays.nix b/raspberry-pi/4/pkgs-overlays.nix index 71db89f6..cc639d46 100644 --- a/raspberry-pi/4/pkgs-overlays.nix +++ b/raspberry-pi/4/pkgs-overlays.nix @@ -1,9 +1,9 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ config, lib, ... }: let cfg = config.hardware.raspberry-pi."4".apply-overlays-dtmerge; - dt_ao_overlay = (final: prev: { - deviceTree.applyOverlays = (prev.callPackage ./apply-overlays-dtmerge.nix { }); - }); + dt_ao_overlay = _final: prev: { + deviceTree.applyOverlays = prev.callPackage ./apply-overlays-dtmerge.nix { }; + }; in { options.hardware = { raspberry-pi."4".apply-overlays-dtmerge = { diff --git a/raspberry-pi/4/poe-hat.nix b/raspberry-pi/4/poe-hat.nix index bda99252..6759f42f 100644 --- a/raspberry-pi/4/poe-hat.nix +++ b/raspberry-pi/4/poe-hat.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: let cfg = config.hardware.raspberry-pi."4".poe-hat; diff --git a/raspberry-pi/4/poe-plus-hat.nix b/raspberry-pi/4/poe-plus-hat.nix index 79177fed..e0627b69 100644 --- a/raspberry-pi/4/poe-plus-hat.nix +++ b/raspberry-pi/4/poe-plus-hat.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: let cfg = config.hardware.raspberry-pi."4".poe-plus-hat; diff --git a/raspberry-pi/4/pwm0.nix b/raspberry-pi/4/pwm0.nix index 37ae3a1f..5470eaf4 100644 --- a/raspberry-pi/4/pwm0.nix +++ b/raspberry-pi/4/pwm0.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: let cfg = config.hardware.raspberry-pi."4".pwm0; diff --git a/supermicro/a1sri-2758f/default.nix b/supermicro/a1sri-2758f/default.nix index 10ea2af4..3dfc3a7c 100644 --- a/supermicro/a1sri-2758f/default.nix +++ b/supermicro/a1sri-2758f/default.nix @@ -1,8 +1,5 @@ # http://www.supermicro.com/products/motherboard/Atom/X10/A1SRi-2758F.cfm # This board contains a TPM header, but you must supply your own module. - -{ pkgs, ... }: - { imports = [ ../. ]; } diff --git a/supermicro/x10sll-f/default.nix b/supermicro/x10sll-f/default.nix index 86bc1be3..c0200510 100644 --- a/supermicro/x10sll-f/default.nix +++ b/supermicro/x10sll-f/default.nix @@ -1,5 +1,3 @@ -{ config, pkgs, ... }: - { imports = [ ../. diff --git a/system76/default.nix b/system76/default.nix index 8a881c04..b2605cc8 100644 --- a/system76/default.nix +++ b/system76/default.nix @@ -2,7 +2,7 @@ # # https://system76.com/ -{ config, lib, ... }: +{ lib, ... }: { imports = [ ../common/pc ]; diff --git a/toshiba/swanky/default.nix b/toshiba/swanky/default.nix index 2f552802..32e3b126 100644 --- a/toshiba/swanky/default.nix +++ b/toshiba/swanky/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ pkgs, ... }: let ucm = pkgs.fetchzip { @@ -20,7 +20,7 @@ in system.replaceRuntimeDependencies = [{ original = pkgs.alsa-lib; - replacement = pkgs.alsa-lib.overrideAttrs (super: { + replacement = pkgs.alsa-lib.overrideAttrs (_super: { postFixup = "cp -r ${ucm}/chtmax98090 $out/share/alsa/ucm"; }); }]; From c82db46e75024a54d1c9360e9de6af4274990a5a Mon Sep 17 00:00:00 2001 From: Hiram Tanner Date: Sat, 31 Dec 2022 20:46:26 +0900 Subject: [PATCH 0322/1476] Added configuration for panasonic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update panasonic/letsnote/cf-lx4/default.nix Co-authored-by: Jörg Thalheim Added profile to flake.nix --- README.md | 1 + flake.nix | 1 + panasonic/letsnote/cf-lx4/default.nix | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 panasonic/letsnote/cf-lx4/default.nix diff --git a/README.md b/README.md index ee044bde..5ff1c15d 100644 --- a/README.md +++ b/README.md @@ -197,6 +197,7 @@ See code for all available configurations. | [Microsoft Surface Range](microsoft/surface) | `` | | [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | +| [Panasonic Let's Note CF-LX4 ](panasonic/letsnote/cf-lx4) | `` | | [PC Engines APU](pcengines/apu) | `` | | [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | | [Purism Librem 13v3](purism/librem/13v3) | `` | diff --git a/flake.nix b/flake.nix index 4c8f8543..67aeeb48 100644 --- a/flake.nix +++ b/flake.nix @@ -129,6 +129,7 @@ lenovo-thinkpad-z = import ./lenovo/thinkpad/z; lenovo-thinkpad-z13 = import ./lenovo/thinkpad/z/z13; lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; + letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; microsoft-surface = import ./microsoft/surface; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; msi-gs60 = import ./msi/gs60; diff --git a/panasonic/letsnote/cf-lx4/default.nix b/panasonic/letsnote/cf-lx4/default.nix new file mode 100644 index 00000000..6b965980 --- /dev/null +++ b/panasonic/letsnote/cf-lx4/default.nix @@ -0,0 +1,11 @@ +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + # Force use of the intel_backlight driver for backlight control. + # This allows the backlight save/load systemd service to work. + boot.kernelParams = [ "acpi_backlight=video" ]; +} From 6517e0efcbbb061b212df461dd782b0056a96f39 Mon Sep 17 00:00:00 2001 From: figsoda Date: Sun, 1 Jan 2023 12:31:25 -0500 Subject: [PATCH 0323/1476] asus-zephyrus-ga402: fix mic mute button --- asus/zephyrus/ga402/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/asus/zephyrus/ga402/default.nix b/asus/zephyrus/ga402/default.nix index 3d666af4..c0c1ee9c 100644 --- a/asus/zephyrus/ga402/default.nix +++ b/asus/zephyrus/ga402/default.nix @@ -11,6 +11,12 @@ services = { asusd.enable = lib.mkDefault true; + + # fixes mic mute button + udev.extraHwdb = '' + evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* + KEYBOARD_KEY_ff31007c=f20 + ''; }; boot = { From 800786f11d0d195af558d67db151a33055604087 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 9 Jan 2023 23:05:15 +1300 Subject: [PATCH 0324/1476] Add Kernel 6.0.17 --- microsoft/surface/kernel/default.nix | 1 + .../surface/kernel/linux-6.0.17/default.nix | 38 ++++++ .../surface/kernel/linux-6.0.17/patches.nix | 122 ++++++++++++++++++ 3 files changed, 161 insertions(+) create mode 100644 microsoft/surface/kernel/linux-6.0.17/default.nix create mode 100644 microsoft/surface/kernel/linux-6.0.17/patches.nix diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/kernel/default.nix index 6eba2ca8..2b19413b 100644 --- a/microsoft/surface/kernel/default.nix +++ b/microsoft/surface/kernel/default.nix @@ -7,6 +7,7 @@ in { imports = [ ./linux-5.19.17 ./linux-6.0.11 + ./linux-6.0.17 ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/kernel/linux-6.0.17/default.nix b/microsoft/surface/kernel/linux-6.0.17/default.nix new file mode 100644 index 00000000..51960650 --- /dev/null +++ b/microsoft/surface/kernel/linux-6.0.17/default.nix @@ -0,0 +1,38 @@ +{ 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.0.17"; + extraMeta.branch = "6.0"; + patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; + kernelPatches = pkgs.callPackage ./patches.nix { + inherit (lib) kernel; + inherit version patchDir; + }; + + kernelPackages = linuxPackage { + inherit version extraMeta kernelPatches; + src = fetchurl { + url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; + sha256 = "sha256-p+6SCSpUWbtGq/C1RJpOV+i3klkaxOesBO0lQtLOHQg="; + }; + }; + + +in { + options.microsoft-surface.kernelVersion = mkOption { + type = types.enum [ "6.0.17" ]; + }; + + config = mkIf (cfg.kernelVersion == "6.0.17") { + boot = { + inherit kernelPackages; + }; + }; +} diff --git a/microsoft/surface/kernel/linux-6.0.17/patches.nix b/microsoft/surface/kernel/linux-6.0.17/patches.nix new file mode 100644 index 00000000..7b0d0967 --- /dev/null +++ b/microsoft/surface/kernel/linux-6.0.17/patches.nix @@ -0,0 +1,122 @@ +{ kernel, + patchDir, + version, +}: + +[ + { + name = "microsoft-surface-patches-linux-${version}"; + patch = null; + structuredExtraConfig = with kernel; { + # + # Surface Aggregator Module + # + CONFIG_SURFACE_AGGREGATOR = module; + CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION = no; + CONFIG_SURFACE_AGGREGATOR_BUS = yes; + CONFIG_SURFACE_AGGREGATOR_CDEV = module; + CONFIG_SURFACE_AGGREGATOR_HUB = module; + CONFIG_SURFACE_AGGREGATOR_REGISTRY = module; + CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH = module; + + CONFIG_SURFACE_ACPI_NOTIFY = module; + CONFIG_SURFACE_DTX = module; + CONFIG_SURFACE_PLATFORM_PROFILE = module; + + CONFIG_SURFACE_HID = module; + CONFIG_SURFACE_KBD = module; + + CONFIG_BATTERY_SURFACE = module; + CONFIG_CHARGER_SURFACE = module; + + # + # Surface Hotplug + # + CONFIG_SURFACE_HOTPLUG = module; + + # + # IPTS touchscreen + # + # This only enables the user interface for IPTS data. + # For the touchscreen to work, you need to install iptsd. + # + CONFIG_MISC_IPTS = module; + + # + # Cameras: IPU3 + # + CONFIG_VIDEO_DW9719 = module; + CONFIG_VIDEO_IPU3_IMGU = module; + CONFIG_VIDEO_IPU3_CIO2 = module; + CONFIG_CIO2_BRIDGE = yes; + CONFIG_INTEL_SKL_INT3472 = module; + CONFIG_REGULATOR_TPS68470 = module; + CONFIG_COMMON_CLK_TPS68470 = module; + + # + # Cameras: Sensor drivers + # + CONFIG_VIDEO_OV5693 = module; + CONFIG_VIDEO_OV7251 = module; + CONFIG_VIDEO_OV8865 = module; + + # + # ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 + # + CONFIG_APDS9960 = module; + + # + # Other Drivers + # + CONFIG_INPUT_SOC_BUTTON_ARRAY = module; + CONFIG_SURFACE_3_POWER_OPREGION = module; + CONFIG_SURFACE_PRO3_BUTTON = module; + CONFIG_SURFACE_GPE = module; + CONFIG_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-surface-sam"; + patch = patchDir + "/0005-surface-sam.patch"; + } + { + name = "ms-surface/0006-surface-sam-over-hid"; + patch = patchDir + "/0006-surface-sam-over-hid.patch"; + } + { + name = "ms-surface/0007-surface-button"; + patch = patchDir + "/0007-surface-button.patch"; + } + { + name = "ms-surface/0008-surface-typecover"; + patch = patchDir + "/0008-surface-typecover.patch"; + } + { + name = "ms-surface/0009-cameras"; + patch = patchDir + "/0009-cameras.patch"; + } + { + name = "ms-surface/0010-amd-gpio"; + patch = patchDir + "/0010-amd-gpio.patch"; + } + { + name = "ms-surface/0011-rtc"; + patch = patchDir + "/0011-rtc.patch"; + } +] From 0ee9d61fa68486b1b9ff8ddaf9f0dd91662e8766 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 9 Jan 2023 23:44:36 +1300 Subject: [PATCH 0325/1476] Update the rev. and sha256 of linux-surface repo to match latest "master" --- microsoft/surface/repos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/repos.nix b/microsoft/surface/repos.nix index b15dd7ec..eb9e5fa3 100644 --- a/microsoft/surface/repos.nix +++ b/microsoft/surface/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "8995c6b3b4fb659397f4ebc760c6ac8b5efc5488"; - sha256 = "sha256-r7nbW0WKmvw7mMZL1BzuFwgwftyN5FIfP5xLDiQMEiI="; + rev = "487e64047ca047dde9a062909a87410e7bb86845"; + sha256 = "sha256-HTIuRBZk0prhUPd2KnsXGo+ZyBsMwERN7P8WJH1RG3M="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From 9020a320f5bd3c550a427b3a6c945979a68168bf Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 9 Jan 2023 23:45:16 +1300 Subject: [PATCH 0326/1476] Install kernel 6.0.17 by default --- microsoft/surface/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 2952daed..1c0e6280 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -9,7 +9,7 @@ in { ./firmware/surface-go/ath10k ]; - microsoft-surface.kernelVersion = mkDefault "6.0.11"; + microsoft-surface.kernelVersion = mkDefault "6.0.17"; boot.extraModprobeConfig = mkDefault '' options i915 enable_fbc=1 enable_rc6=1 modeset=1 From 321d5ec9f7e862872496f857a5885e56190d3616 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 12:16:03 +1300 Subject: [PATCH 0327/1476] Add kernel 6.1.3 --- microsoft/surface/kernel/default.nix | 1 + .../surface/kernel/linux-6.1.3/default.nix | 38 ++++++ .../surface/kernel/linux-6.1.3/patches.nix | 122 ++++++++++++++++++ 3 files changed, 161 insertions(+) create mode 100644 microsoft/surface/kernel/linux-6.1.3/default.nix create mode 100644 microsoft/surface/kernel/linux-6.1.3/patches.nix diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/kernel/default.nix index 6eba2ca8..f44bf602 100644 --- a/microsoft/surface/kernel/default.nix +++ b/microsoft/surface/kernel/default.nix @@ -7,6 +7,7 @@ in { imports = [ ./linux-5.19.17 ./linux-6.0.11 + ./linux-6.1.3 ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/kernel/linux-6.1.3/default.nix b/microsoft/surface/kernel/linux-6.1.3/default.nix new file mode 100644 index 00000000..bd9c0ec6 --- /dev/null +++ b/microsoft/surface/kernel/linux-6.1.3/default.nix @@ -0,0 +1,38 @@ +{ 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.3"; + extraMeta.branch = "6.1"; + patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; + kernelPatches = pkgs.callPackage ./patches.nix { + inherit (lib) kernel; + inherit version patchDir; + }; + + kernelPackages = linuxPackage { + inherit version extraMeta kernelPatches; + src = fetchurl { + url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; + sha256 = "sha256-bcia56dRPkM8WXxzRu1/9L/RFepDo7XiemvbOMVYAxc="; + }; + }; + + +in { + options.microsoft-surface.kernelVersion = mkOption { + type = types.enum [ "6.1.3" ]; + }; + + config = mkIf (cfg.kernelVersion == "6.1.3") { + boot = { + inherit kernelPackages; + }; + }; +} diff --git a/microsoft/surface/kernel/linux-6.1.3/patches.nix b/microsoft/surface/kernel/linux-6.1.3/patches.nix new file mode 100644 index 00000000..7b0d0967 --- /dev/null +++ b/microsoft/surface/kernel/linux-6.1.3/patches.nix @@ -0,0 +1,122 @@ +{ kernel, + patchDir, + version, +}: + +[ + { + name = "microsoft-surface-patches-linux-${version}"; + patch = null; + structuredExtraConfig = with kernel; { + # + # Surface Aggregator Module + # + CONFIG_SURFACE_AGGREGATOR = module; + CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION = no; + CONFIG_SURFACE_AGGREGATOR_BUS = yes; + CONFIG_SURFACE_AGGREGATOR_CDEV = module; + CONFIG_SURFACE_AGGREGATOR_HUB = module; + CONFIG_SURFACE_AGGREGATOR_REGISTRY = module; + CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH = module; + + CONFIG_SURFACE_ACPI_NOTIFY = module; + CONFIG_SURFACE_DTX = module; + CONFIG_SURFACE_PLATFORM_PROFILE = module; + + CONFIG_SURFACE_HID = module; + CONFIG_SURFACE_KBD = module; + + CONFIG_BATTERY_SURFACE = module; + CONFIG_CHARGER_SURFACE = module; + + # + # Surface Hotplug + # + CONFIG_SURFACE_HOTPLUG = module; + + # + # IPTS touchscreen + # + # This only enables the user interface for IPTS data. + # For the touchscreen to work, you need to install iptsd. + # + CONFIG_MISC_IPTS = module; + + # + # Cameras: IPU3 + # + CONFIG_VIDEO_DW9719 = module; + CONFIG_VIDEO_IPU3_IMGU = module; + CONFIG_VIDEO_IPU3_CIO2 = module; + CONFIG_CIO2_BRIDGE = yes; + CONFIG_INTEL_SKL_INT3472 = module; + CONFIG_REGULATOR_TPS68470 = module; + CONFIG_COMMON_CLK_TPS68470 = module; + + # + # Cameras: Sensor drivers + # + CONFIG_VIDEO_OV5693 = module; + CONFIG_VIDEO_OV7251 = module; + CONFIG_VIDEO_OV8865 = module; + + # + # ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 + # + CONFIG_APDS9960 = module; + + # + # Other Drivers + # + CONFIG_INPUT_SOC_BUTTON_ARRAY = module; + CONFIG_SURFACE_3_POWER_OPREGION = module; + CONFIG_SURFACE_PRO3_BUTTON = module; + CONFIG_SURFACE_GPE = module; + CONFIG_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-surface-sam"; + patch = patchDir + "/0005-surface-sam.patch"; + } + { + name = "ms-surface/0006-surface-sam-over-hid"; + patch = patchDir + "/0006-surface-sam-over-hid.patch"; + } + { + name = "ms-surface/0007-surface-button"; + patch = patchDir + "/0007-surface-button.patch"; + } + { + name = "ms-surface/0008-surface-typecover"; + patch = patchDir + "/0008-surface-typecover.patch"; + } + { + name = "ms-surface/0009-cameras"; + patch = patchDir + "/0009-cameras.patch"; + } + { + name = "ms-surface/0010-amd-gpio"; + patch = patchDir + "/0010-amd-gpio.patch"; + } + { + name = "ms-surface/0011-rtc"; + patch = patchDir + "/0011-rtc.patch"; + } +] From 05bbf0f04069eaf515b319606664adc49c1fa55f Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 9 Jan 2023 23:44:36 +1300 Subject: [PATCH 0328/1476] Update the rev. and sha256 of linux-surface repo to match latest "master" --- microsoft/surface/repos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/repos.nix b/microsoft/surface/repos.nix index b15dd7ec..eb9e5fa3 100644 --- a/microsoft/surface/repos.nix +++ b/microsoft/surface/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "8995c6b3b4fb659397f4ebc760c6ac8b5efc5488"; - sha256 = "sha256-r7nbW0WKmvw7mMZL1BzuFwgwftyN5FIfP5xLDiQMEiI="; + rev = "487e64047ca047dde9a062909a87410e7bb86845"; + sha256 = "sha256-HTIuRBZk0prhUPd2KnsXGo+ZyBsMwERN7P8WJH1RG3M="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From cb4f9dca64e16dc469222a49d596e2c32d7dea50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 10 Jan 2023 00:31:59 +0100 Subject: [PATCH 0329/1476] fix evaluation of rpi4 --- tests/run.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/run.py b/tests/run.py index 77dae8ee..8cc92f97 100755 --- a/tests/run.py +++ b/tests/run.py @@ -34,6 +34,8 @@ def build_profile( system = "x86_64-linux" if "raspberry-pi/2" in profile: system = "armv7l-linux" + if "raspberry-pi/4" in profile: + system = "aarch64-linux" cmd = [ "nix", From 51e3be9885b7d095eb1f7ba8a62ef6771e616e28 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 12:41:58 +1300 Subject: [PATCH 0330/1476] Remove kernel 6.0.11 from MS Surface profile --- microsoft/surface/kernel/default.nix | 1 - .../surface/kernel/linux-6.0.11/default.nix | 38 ------ .../surface/kernel/linux-6.0.11/patches.nix | 118 ------------------ 3 files changed, 157 deletions(-) delete mode 100644 microsoft/surface/kernel/linux-6.0.11/default.nix delete mode 100644 microsoft/surface/kernel/linux-6.0.11/patches.nix diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/kernel/default.nix index 2b19413b..af2a2ba6 100644 --- a/microsoft/surface/kernel/default.nix +++ b/microsoft/surface/kernel/default.nix @@ -6,7 +6,6 @@ let in { imports = [ ./linux-5.19.17 - ./linux-6.0.11 ./linux-6.0.17 ]; diff --git a/microsoft/surface/kernel/linux-6.0.11/default.nix b/microsoft/surface/kernel/linux-6.0.11/default.nix deleted file mode 100644 index 652f2412..00000000 --- a/microsoft/surface/kernel/linux-6.0.11/default.nix +++ /dev/null @@ -1,38 +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.0.11"; - extraMeta.branch = "6.0"; - patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; - kernelPatches = pkgs.callPackage ./patches.nix { - inherit (lib) kernel; - inherit version patchDir; - }; - - kernelPackages = linuxPackage { - inherit version extraMeta kernelPatches; - src = fetchurl { - url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "sha256-K65hMeZJceHjT/OV+lQpcRNMhXvbCykGmrhHx8mpx2I="; - }; - }; - - -in { - options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ "6.0.11" ]; - }; - - config = mkIf (cfg.kernelVersion == "6.0.11") { - boot = { - inherit kernelPackages; - }; - }; -} diff --git a/microsoft/surface/kernel/linux-6.0.11/patches.nix b/microsoft/surface/kernel/linux-6.0.11/patches.nix deleted file mode 100644 index e111c268..00000000 --- a/microsoft/surface/kernel/linux-6.0.11/patches.nix +++ /dev/null @@ -1,118 +0,0 @@ -{ kernel, - patchDir, - version, -}: - -[ - { - name = "microsoft-surface-patches-linux-${version}"; - patch = null; - structuredExtraConfig = with kernel; { - # - # Surface Aggregator Module - # - CONFIG_SURFACE_AGGREGATOR = module; - CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION = no; - CONFIG_SURFACE_AGGREGATOR_BUS = yes; - CONFIG_SURFACE_AGGREGATOR_CDEV = module; - CONFIG_SURFACE_AGGREGATOR_HUB = module; - CONFIG_SURFACE_AGGREGATOR_REGISTRY = module; - CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH = module; - - CONFIG_SURFACE_ACPI_NOTIFY = module; - CONFIG_SURFACE_DTX = module; - CONFIG_SURFACE_PLATFORM_PROFILE = module; - - CONFIG_SURFACE_HID = module; - CONFIG_SURFACE_KBD = module; - - CONFIG_BATTERY_SURFACE = module; - CONFIG_CHARGER_SURFACE = module; - - # - # Surface Hotplug - # - CONFIG_SURFACE_HOTPLUG = module; - - # - # IPTS touchscreen - # - # This only enables the user interface for IPTS data. - # For the touchscreen to work, you need to install iptsd. - # - CONFIG_MISC_IPTS = module; - - # - # Cameras: IPU3 - # - CONFIG_VIDEO_DW9719 = module; - CONFIG_VIDEO_IPU3_IMGU = module; - CONFIG_VIDEO_IPU3_CIO2 = module; - CONFIG_CIO2_BRIDGE = yes; - CONFIG_INTEL_SKL_INT3472 = module; - CONFIG_REGULATOR_TPS68470 = module; - CONFIG_COMMON_CLK_TPS68470 = module; - - # - # Cameras: Sensor drivers - # - CONFIG_VIDEO_OV5693 = module; - CONFIG_VIDEO_OV7251 = module; - CONFIG_VIDEO_OV8865 = module; - - # - # ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 - # - CONFIG_APDS9960 = module; - - # - # Other Drivers - # - CONFIG_INPUT_SOC_BUTTON_ARRAY = module; - CONFIG_SURFACE_3_POWER_OPREGION = module; - CONFIG_SURFACE_PRO3_BUTTON = module; - CONFIG_SURFACE_GPE = module; - CONFIG_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-surface-sam"; - patch = patchDir + "/0005-surface-sam.patch"; - } - { - name = "ms-surface/0006-surface-sam-over-hid"; - patch = patchDir + "/0006-surface-sam-over-hid.patch"; - } - { - name = "ms-surface/0007-surface-button"; - patch = patchDir + "/0007-surface-button.patch"; - } - { - name = "ms-surface/0008-surface-typecover"; - patch = patchDir + "/0008-surface-typecover.patch"; - } - { - name = "ms-surface/0009-cameras"; - patch = patchDir + "/0009-cameras.patch"; - } - # { - # name = "ms-surface/0010-amd-gpio"; - # patch = patchDir + "/0010-amd-gpio.patch"; - # } -] From 03df3d2d530a69fe1d006c1a161f76885d3ffb2a Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 15:22:06 +1300 Subject: [PATCH 0331/1476] Move files around... - "kernel" and "repos.nix" --> "common/" - "firmware/surface-go/ath10k" --> "surface-go/firmware/ath10k" - Update where "kernel", "firmware/surface-go" and "repos.nix" can be found --- microsoft/surface/common/default.nix | 7 +++++++ microsoft/surface/{ => common}/kernel/default.nix | 0 .../{ => common}/kernel/linux-5.19.17/default.nix | 0 .../{ => common}/kernel/linux-5.19.17/patches.nix | 0 .../{ => common}/kernel/linux-6.0.11/default.nix | 0 .../kernel/linux-6.1.3}/patches.nix | 12 ++++++++---- .../surface/{ => common}/kernel/linux-package.nix | 0 microsoft/surface/{ => common}/repos.nix | 0 microsoft/surface/default.nix | 4 ++-- .../firmware}/ath10k/ath10k-replace.nix | 2 +- .../firmware}/ath10k/default.nix | 0 11 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 microsoft/surface/common/default.nix rename microsoft/surface/{ => common}/kernel/default.nix (100%) rename microsoft/surface/{ => common}/kernel/linux-5.19.17/default.nix (100%) rename microsoft/surface/{ => common}/kernel/linux-5.19.17/patches.nix (100%) rename microsoft/surface/{ => common}/kernel/linux-6.0.11/default.nix (100%) rename microsoft/surface/{kernel/linux-6.0.11 => common/kernel/linux-6.1.3}/patches.nix (94%) rename microsoft/surface/{ => common}/kernel/linux-package.nix (100%) rename microsoft/surface/{ => common}/repos.nix (100%) rename microsoft/surface/{firmware/surface-go => surface-go/firmware}/ath10k/ath10k-replace.nix (93%) rename microsoft/surface/{firmware/surface-go => surface-go/firmware}/ath10k/default.nix (100%) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix new file mode 100644 index 00000000..d7e1cfa8 --- /dev/null +++ b/microsoft/surface/common/default.nix @@ -0,0 +1,7 @@ +{ ... }: + +{ + imports = [ + ./kernel + ]; +} diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/common/kernel/default.nix similarity index 100% rename from microsoft/surface/kernel/default.nix rename to microsoft/surface/common/kernel/default.nix diff --git a/microsoft/surface/kernel/linux-5.19.17/default.nix b/microsoft/surface/common/kernel/linux-5.19.17/default.nix similarity index 100% rename from microsoft/surface/kernel/linux-5.19.17/default.nix rename to microsoft/surface/common/kernel/linux-5.19.17/default.nix diff --git a/microsoft/surface/kernel/linux-5.19.17/patches.nix b/microsoft/surface/common/kernel/linux-5.19.17/patches.nix similarity index 100% rename from microsoft/surface/kernel/linux-5.19.17/patches.nix rename to microsoft/surface/common/kernel/linux-5.19.17/patches.nix diff --git a/microsoft/surface/kernel/linux-6.0.11/default.nix b/microsoft/surface/common/kernel/linux-6.0.11/default.nix similarity index 100% rename from microsoft/surface/kernel/linux-6.0.11/default.nix rename to microsoft/surface/common/kernel/linux-6.0.11/default.nix diff --git a/microsoft/surface/kernel/linux-6.0.11/patches.nix b/microsoft/surface/common/kernel/linux-6.1.3/patches.nix similarity index 94% rename from microsoft/surface/kernel/linux-6.0.11/patches.nix rename to microsoft/surface/common/kernel/linux-6.1.3/patches.nix index e111c268..7b0d0967 100644 --- a/microsoft/surface/kernel/linux-6.0.11/patches.nix +++ b/microsoft/surface/common/kernel/linux-6.1.3/patches.nix @@ -111,8 +111,12 @@ name = "ms-surface/0009-cameras"; patch = patchDir + "/0009-cameras.patch"; } - # { - # name = "ms-surface/0010-amd-gpio"; - # patch = patchDir + "/0010-amd-gpio.patch"; - # } + { + name = "ms-surface/0010-amd-gpio"; + patch = patchDir + "/0010-amd-gpio.patch"; + } + { + name = "ms-surface/0011-rtc"; + patch = patchDir + "/0011-rtc.patch"; + } ] diff --git a/microsoft/surface/kernel/linux-package.nix b/microsoft/surface/common/kernel/linux-package.nix similarity index 100% rename from microsoft/surface/kernel/linux-package.nix rename to microsoft/surface/common/kernel/linux-package.nix diff --git a/microsoft/surface/repos.nix b/microsoft/surface/common/repos.nix similarity index 100% rename from microsoft/surface/repos.nix rename to microsoft/surface/common/repos.nix diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 2952daed..795262b1 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -5,8 +5,8 @@ let in { imports = [ - ./kernel - ./firmware/surface-go/ath10k + ./common + ./surface-go/firmware/ath10k ]; microsoft-surface.kernelVersion = mkDefault "6.0.11"; diff --git a/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix b/microsoft/surface/surface-go/firmware/ath10k/ath10k-replace.nix similarity index 93% rename from microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix rename to microsoft/surface/surface-go/firmware/ath10k/ath10k-replace.nix index e6b84e1f..6cc55fa2 100644 --- a/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix +++ b/microsoft/surface/surface-go/firmware/ath10k/ath10k-replace.nix @@ -1,7 +1,7 @@ { stdenv, lib, pkgs, firmwareLinuxNonfree, ... }: let - repos = pkgs.callPackage ../../../repos.nix {}; + repos = pkgs.callPackage ../../../common/repos.nix {}; killernetworking_firmware = repos.surface-go-ath10k-firmware_backup + "/K1535_Debian"; in stdenv.mkDerivation { diff --git a/microsoft/surface/firmware/surface-go/ath10k/default.nix b/microsoft/surface/surface-go/firmware/ath10k/default.nix similarity index 100% rename from microsoft/surface/firmware/surface-go/ath10k/default.nix rename to microsoft/surface/surface-go/firmware/ath10k/default.nix From 5e6d5f2d8826fcd28dc164a9cc88120d81fc406f Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 15:35:48 +1300 Subject: [PATCH 0332/1476] Doc comment --- microsoft/surface/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 795262b1..7b5e4bd1 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -19,6 +19,7 @@ in { options iwldvm force_cam=N ''; + # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = [ "mem_sleep_default=deep" ]; # NOTE: Check the README before enabling TLP: From 51122e95a1a79a076cbbaea572cca0f20e6c23d9 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 15:43:25 +1300 Subject: [PATCH 0333/1476] Extract _actually_ common code out of microsoft/surface/default.nix --- microsoft/surface/common/default.nix | 19 +++++++++++++++++-- microsoft/surface/default.nix | 12 ------------ 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index d7e1cfa8..95d83a0c 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -1,7 +1,22 @@ -{ ... }: +{ lib, ... }: -{ +let + inherit (lib) mkDefault; + +in { imports = [ ./kernel ]; + + microsoft-surface.kernelVersion = mkDefault "6.0.11"; + + # Seems to be required to properly enable S0ix "Modern Standby": + boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; + + # NOTE: Check the README before enabling TLP: + services.tlp.enable = mkDefault false; + + # i.e. needed for wifi firmware, see https://github.com/NixOS/nixos-hardware/issues/364 + hardware.enableRedistributableFirmware = mkDefault true; + hardware.sensor.iio.enable = mkDefault true; } diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 7b5e4bd1..e1befefb 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -9,8 +9,6 @@ in { ./surface-go/firmware/ath10k ]; - microsoft-surface.kernelVersion = mkDefault "6.0.11"; - boot.extraModprobeConfig = mkDefault '' options i915 enable_fbc=1 enable_rc6=1 modeset=1 options snd_hda_intel power_save=1 @@ -19,16 +17,6 @@ in { options iwldvm force_cam=N ''; - # Seems to be required to properly enable S0ix "Modern Standby": - boot.kernelParams = [ "mem_sleep_default=deep" ]; - - # NOTE: Check the README before enabling TLP: - services.tlp.enable = mkDefault false; - - # i.e. needed for wifi firmware, see https://github.com/NixOS/nixos-hardware/issues/364 - hardware.enableRedistributableFirmware = mkDefault true; - hardware.sensor.iio.enable = mkDefault true; - environment.systemPackages = [ pkgs.surface-control ]; From 0ce988ea8a1d9fbc61128cf8d31b45af4b3d0138 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 15:59:44 +1300 Subject: [PATCH 0334/1476] Extract IPTSd management into new option-enabled module --- microsoft/surface/common/default.nix | 1 + microsoft/surface/common/ipts/default.nix | 27 +++++++++++++++++++++++ microsoft/surface/default.nix | 8 +------ 3 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 microsoft/surface/common/ipts/default.nix diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 95d83a0c..cf837755 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -6,6 +6,7 @@ let in { imports = [ ./kernel + ./ipts ]; microsoft-surface.kernelVersion = mkDefault "6.0.11"; diff --git a/microsoft/surface/common/ipts/default.nix b/microsoft/surface/common/ipts/default.nix new file mode 100644 index 00000000..4faf49e4 --- /dev/null +++ b/microsoft/surface/common/ipts/default.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkDefault mkEnableOption mkIf mkMerge; + + cfg = config.microsoft-surface.ipts; + +in { + options.microsoft-surface.ipts = { + enable = mkEnableOption "Enable IPTSd for Microsoft Surface"; + }; + + config = mkMerge [ + { + microsoft-surface.ipts.enable = mkDefault false; + } + + (mkIf cfg.enable { + systemd.services.iptsd = { + description = "IPTSD"; + path = with pkgs; [ iptsd ]; + script = "iptsd"; + wantedBy = [ "multi-user.target" ]; + }; + }) + ]; +} diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index e1befefb..6b847494 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -25,11 +25,5 @@ in { pkgs.surface-control ]; - systemd.services.iptsd = { - description = "IPTSD"; - script = "${pkgs.iptsd}/bin/iptsd"; - wantedBy = [ - "multi-user.target" - ]; - }; + microsoft-surface.ipts.enable = true; } From f0835cb45cefc30b629c5ebbc99b04f305104562 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 16:04:46 +1300 Subject: [PATCH 0335/1476] Extract "surface-control" management into new option-enabled module --- microsoft/surface/common/default.nix | 1 + .../common/surface-control/default.nix | 25 +++++++++++++++++++ microsoft/surface/default.nix | 9 +------ 3 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 microsoft/surface/common/surface-control/default.nix diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index cf837755..8c1fd838 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -7,6 +7,7 @@ in { imports = [ ./kernel ./ipts + ./surface-control ]; microsoft-surface.kernelVersion = mkDefault "6.0.11"; diff --git a/microsoft/surface/common/surface-control/default.nix b/microsoft/surface/common/surface-control/default.nix new file mode 100644 index 00000000..4927c24e --- /dev/null +++ b/microsoft/surface/common/surface-control/default.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: + + +let + inherit (lib) mkDefault mkEnableOption mkIf mkMerge; + + cfg = config.microsoft-surface.surface-control; + +in { + options.microsoft-surface.surface-control = { + enable = mkEnableOption "Enable 'surface-control' for Microsoft Surface"; + }; + + config = mkMerge [ + { + microsoft-surface.surface-control.enable = mkDefault false; + } + + (mkIf cfg.enable { + environment.systemPackages = with pkgs; [ surface-control ]; + services.udev.packages = with pkgs; [ surface-control]; + users.groups.surface-control = { }; + }) + ]; +} diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 6b847494..5b541c91 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -17,13 +17,6 @@ in { options iwldvm force_cam=N ''; - environment.systemPackages = [ - pkgs.surface-control - ]; - users.groups.surface-control = { }; - services.udev.packages = [ - pkgs.surface-control - ]; - + microsoft-surface.surface-control.enable = true; microsoft-surface.ipts.enable = true; } From ab0c9fe7ce53dca2cd870cfa57b45dd912c03800 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 16:13:38 +1300 Subject: [PATCH 0336/1476] Move the last of the code into ./microsoft/common/old --- microsoft/surface/default.nix | 14 +------------- microsoft/surface/old/default.nix | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 microsoft/surface/old/default.nix diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 5b541c91..0633c4e0 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -5,18 +5,6 @@ let in { imports = [ - ./common - ./surface-go/firmware/ath10k + ./old ]; - - boot.extraModprobeConfig = mkDefault '' - options i915 enable_fbc=1 enable_rc6=1 modeset=1 - options snd_hda_intel power_save=1 - options snd_ac97_codec power_save=1 - options iwlwifi power_save=Y - options iwldvm force_cam=N - ''; - - microsoft-surface.surface-control.enable = true; - microsoft-surface.ipts.enable = true; } diff --git a/microsoft/surface/old/default.nix b/microsoft/surface/old/default.nix new file mode 100644 index 00000000..d8a2d675 --- /dev/null +++ b/microsoft/surface/old/default.nix @@ -0,0 +1,22 @@ +{ lib, pkgs, ... }: + +let + inherit (lib) mkDefault; + +in { + imports = [ + ../common + ../surface-go/firmware/ath10k + ]; + + boot.extraModprobeConfig = mkDefault '' + options i915 enable_fbc=1 enable_rc6=1 modeset=1 + options snd_hda_intel power_save=1 + options snd_ac97_codec power_save=1 + options iwlwifi power_save=Y + options iwldvm force_cam=N + ''; + + microsoft-surface.surface-control.enable = true; + microsoft-surface.ipts.enable = true; +} From fb5ac7720795bfd8414be4594a5a07e64725049c Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 16:27:28 +1300 Subject: [PATCH 0337/1476] Add warning when importing microsoft/surface/ from now on --- microsoft/surface/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 0633c4e0..63aac11c 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -1,10 +1,12 @@ -{ lib, pkgs, ... }: +{ lib, ... }: let - inherit (lib) mkDefault; + inherit (lib) warn; in { imports = [ - ./old + ( warn + "Please don't import microsoft/surface/ (default.nix) any longer; use microsoft/surface/old or see microsoft/surface/old/README.md for more details." + ./old ) ]; } From 6518a931507a4670bf8cdf78ef60168a1142e725 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 16:30:15 +1300 Subject: [PATCH 0338/1476] Update README.md and flake.nix --- README.md | 1 + flake.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 5ff1c15d..aca01019 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,7 @@ See code for all available configurations. | [MSI GL62/CX62](msi/gl62) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | | [Microsoft Surface Range](microsoft/surface) | `` | +| [Microsoft Surface Range (Old Behaviour)](microsoft/surface/old) | `` | | [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | | [Panasonic Let's Note CF-LX4 ](panasonic/letsnote/cf-lx4) | `` | diff --git a/flake.nix b/flake.nix index 67aeeb48..82d769b3 100644 --- a/flake.nix +++ b/flake.nix @@ -131,6 +131,7 @@ lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; microsoft-surface = import ./microsoft/surface; + microsoft-surface-old-behaviour = import ./microsoft/surface/old; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; msi-gs60 = import ./msi/gs60; msi-gl62 = import ./msi/gl62; From 330cdaa125bd8856d316e0c01428cbaee80be90a Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 16:55:23 +1300 Subject: [PATCH 0339/1476] README.md --- microsoft/surface/old/README.md | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 microsoft/surface/old/README.md diff --git a/microsoft/surface/old/README.md b/microsoft/surface/old/README.md new file mode 100644 index 00000000..a61fc5f4 --- /dev/null +++ b/microsoft/surface/old/README.md @@ -0,0 +1,51 @@ +# Changes to the microsoft/surface top-level + +## Overview + +When I (@mexisme) created the microsoft/surface profile, there weren't that many differences between +the various models of Surface. + +I had just acquired a Surface Go 1, and it was mostly safe to enable all the options for all the +models, and they would fail gracefully enough that we could mostly ignore warnings or errors. + +Now, however --- as-of 2023-01-10 --- we have a much wider variety of chipsets, incl. models with +some of the newer AMD CPUs, and this is breaking small things in annoying ways for more people. + +## Changes + +### Model Specialisations + +In keeping with the broader structure of "nixos-hardware", I've also changed the structure of the +microsoft/surface profile to make it easier for people to specialise for their hardware. + +Any code or modules that are specialised for a Surface model now have their own directory under this +top-level. + +E.g. I am moving the Surface Go specialisations into `surface-go/`, and there may be further +specialisations like `surface-go-3/`. + +### "Common" modules + +All the "common" modules that were once in the top-level of the microsoft/surface profile have moved +under the `common/` directory. + +Tools / services that are shared among several models are now extracted to their own module under +`common/` and imported by `common/default.nix`. +These new "common" modules now have an `enable` option, which is `false` by default. + +### "Old Behaviour" module + +The original `./default.nix` module has been replaced by a new `old/` module, which replicates the +original behaviour. + +The new `./default.nix` will load the new `old/` module, but will also pop-up a warning asking users +to update how they use the microsoft/surface profile from now on. +This warning will probably change to a fail assertion at some point in the future. + +## Adding a new Model Specialisation + +This hasn't been finalised, partly as I now only have access to a Surface Go 1, these days, so I'm +maybe not the best custodian of this code any longer. + +However, hopefully the (imminent) `surface-go/` module is a reasonable exmample, and we should be +able to gather more examples for more model specialisations over time. From 36f3e30fff4c45d2b56e5b0e55b7a8157aab2633 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 16:57:32 +1300 Subject: [PATCH 0340/1476] README.md --- microsoft/surface/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/microsoft/surface/README.md b/microsoft/surface/README.md index 458120f4..57a35bd3 100644 --- a/microsoft/surface/README.md +++ b/microsoft/surface/README.md @@ -1,3 +1,8 @@ +# NOTE: Structure changes from 2023-01-10 + +Please read the [Old Behaviour README](./old/README.md) to understand how some structural changes to +the code might affect you! + # Derivatives for Microsoft Surface notebooks These derivatives use the patches from the [linux-surface repo](https://github.com/linux-surface/linux-surface/tree/master/patches). From 210e621c62d00bed1e9e4d4839a39ce2e4f4e237 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 17:17:07 +1300 Subject: [PATCH 0341/1476] Create model specialisation for MS Surface Go --- microsoft/surface/surface-go/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 microsoft/surface/surface-go/default.nix diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix new file mode 100644 index 00000000..6bfa33bc --- /dev/null +++ b/microsoft/surface/surface-go/default.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkDefault mkEnableOption mkIf mkMerge; +in { + imports = [ + ../common + ./firmware/ath10k + ]; + + boot.extraModprobeConfig = mkDefault '' + options i915 enable_fbc=1 enable_rc6=1 modeset=1 + options snd_hda_intel power_save=1 + options snd_ac97_codec power_save=1 + options iwlwifi power_save=Y + options iwldvm force_cam=N + ''; +} From d8df3d756af19a4889c50cd5eb8276795e79454d Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 17:18:47 +1300 Subject: [PATCH 0342/1476] Update README.md and flake.nix --- README.md | 1 + flake.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index aca01019..31e35339 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,7 @@ See code for all available configurations. | [MSI GL62/CX62](msi/gl62) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | | [Microsoft Surface Range](microsoft/surface) | `` | +| [Microsoft Surface Go](microsoft/surface/surface-go) | `` | | [Microsoft Surface Range (Old Behaviour)](microsoft/surface/old) | `` | | [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | diff --git a/flake.nix b/flake.nix index 82d769b3..eb538c88 100644 --- a/flake.nix +++ b/flake.nix @@ -131,6 +131,7 @@ lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; microsoft-surface = import ./microsoft/surface; + microsoft-surface-go = import ./microsoft/surface/surface-go; microsoft-surface-old-behaviour = import ./microsoft/surface/old; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; msi-gs60 = import ./msi/gs60; From cca014c8b07818dcf5d47bdb9fe908c505097c88 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 17:19:58 +1300 Subject: [PATCH 0343/1476] Fix README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aca01019..b0fa76ea 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,7 @@ See code for all available configurations. | [MSI GS60 2QE](msi/gs60) | `` | | [MSI GL62/CX62](msi/gl62) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | -| [Microsoft Surface Range](microsoft/surface) | `` | +| [Microsoft Surface Range (Deprecated version)](microsoft/surface) | `` | | [Microsoft Surface Range (Old Behaviour)](microsoft/surface/old) | `` | | [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | From bd17dc47068f10ee794da890092c5db5e265594e Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 15:22:06 +1300 Subject: [PATCH 0344/1476] Move files around... - "kernel" and "repos.nix" --> "common/" - "firmware/surface-go/ath10k" --> "surface-go/firmware/ath10k" - Update where "kernel", "firmware/surface-go" and "repos.nix" can be found --- microsoft/surface/common/default.nix | 7 ++ .../surface/{ => common}/kernel/default.nix | 0 .../kernel/linux-5.19.17/default.nix | 0 .../kernel/linux-5.19.17/patches.nix | 0 .../kernel/linux-6.0.11/default.nix | 0 .../{ => common}/kernel/linux-package.nix | 0 microsoft/surface/{ => common}/repos.nix | 0 microsoft/surface/default.nix | 4 +- .../surface/kernel/linux-6.0.11/patches.nix | 118 ------------------ .../firmware}/ath10k/ath10k-replace.nix | 2 +- .../firmware}/ath10k/default.nix | 0 11 files changed, 10 insertions(+), 121 deletions(-) create mode 100644 microsoft/surface/common/default.nix rename microsoft/surface/{ => common}/kernel/default.nix (100%) rename microsoft/surface/{ => common}/kernel/linux-5.19.17/default.nix (100%) rename microsoft/surface/{ => common}/kernel/linux-5.19.17/patches.nix (100%) rename microsoft/surface/{ => common}/kernel/linux-6.0.11/default.nix (100%) rename microsoft/surface/{ => common}/kernel/linux-package.nix (100%) rename microsoft/surface/{ => common}/repos.nix (100%) delete mode 100644 microsoft/surface/kernel/linux-6.0.11/patches.nix rename microsoft/surface/{firmware/surface-go => surface-go/firmware}/ath10k/ath10k-replace.nix (93%) rename microsoft/surface/{firmware/surface-go => surface-go/firmware}/ath10k/default.nix (100%) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix new file mode 100644 index 00000000..d7e1cfa8 --- /dev/null +++ b/microsoft/surface/common/default.nix @@ -0,0 +1,7 @@ +{ ... }: + +{ + imports = [ + ./kernel + ]; +} diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/common/kernel/default.nix similarity index 100% rename from microsoft/surface/kernel/default.nix rename to microsoft/surface/common/kernel/default.nix diff --git a/microsoft/surface/kernel/linux-5.19.17/default.nix b/microsoft/surface/common/kernel/linux-5.19.17/default.nix similarity index 100% rename from microsoft/surface/kernel/linux-5.19.17/default.nix rename to microsoft/surface/common/kernel/linux-5.19.17/default.nix diff --git a/microsoft/surface/kernel/linux-5.19.17/patches.nix b/microsoft/surface/common/kernel/linux-5.19.17/patches.nix similarity index 100% rename from microsoft/surface/kernel/linux-5.19.17/patches.nix rename to microsoft/surface/common/kernel/linux-5.19.17/patches.nix diff --git a/microsoft/surface/kernel/linux-6.0.11/default.nix b/microsoft/surface/common/kernel/linux-6.0.11/default.nix similarity index 100% rename from microsoft/surface/kernel/linux-6.0.11/default.nix rename to microsoft/surface/common/kernel/linux-6.0.11/default.nix diff --git a/microsoft/surface/kernel/linux-package.nix b/microsoft/surface/common/kernel/linux-package.nix similarity index 100% rename from microsoft/surface/kernel/linux-package.nix rename to microsoft/surface/common/kernel/linux-package.nix diff --git a/microsoft/surface/repos.nix b/microsoft/surface/common/repos.nix similarity index 100% rename from microsoft/surface/repos.nix rename to microsoft/surface/common/repos.nix diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 2952daed..795262b1 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -5,8 +5,8 @@ let in { imports = [ - ./kernel - ./firmware/surface-go/ath10k + ./common + ./surface-go/firmware/ath10k ]; microsoft-surface.kernelVersion = mkDefault "6.0.11"; diff --git a/microsoft/surface/kernel/linux-6.0.11/patches.nix b/microsoft/surface/kernel/linux-6.0.11/patches.nix deleted file mode 100644 index e111c268..00000000 --- a/microsoft/surface/kernel/linux-6.0.11/patches.nix +++ /dev/null @@ -1,118 +0,0 @@ -{ kernel, - patchDir, - version, -}: - -[ - { - name = "microsoft-surface-patches-linux-${version}"; - patch = null; - structuredExtraConfig = with kernel; { - # - # Surface Aggregator Module - # - CONFIG_SURFACE_AGGREGATOR = module; - CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION = no; - CONFIG_SURFACE_AGGREGATOR_BUS = yes; - CONFIG_SURFACE_AGGREGATOR_CDEV = module; - CONFIG_SURFACE_AGGREGATOR_HUB = module; - CONFIG_SURFACE_AGGREGATOR_REGISTRY = module; - CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH = module; - - CONFIG_SURFACE_ACPI_NOTIFY = module; - CONFIG_SURFACE_DTX = module; - CONFIG_SURFACE_PLATFORM_PROFILE = module; - - CONFIG_SURFACE_HID = module; - CONFIG_SURFACE_KBD = module; - - CONFIG_BATTERY_SURFACE = module; - CONFIG_CHARGER_SURFACE = module; - - # - # Surface Hotplug - # - CONFIG_SURFACE_HOTPLUG = module; - - # - # IPTS touchscreen - # - # This only enables the user interface for IPTS data. - # For the touchscreen to work, you need to install iptsd. - # - CONFIG_MISC_IPTS = module; - - # - # Cameras: IPU3 - # - CONFIG_VIDEO_DW9719 = module; - CONFIG_VIDEO_IPU3_IMGU = module; - CONFIG_VIDEO_IPU3_CIO2 = module; - CONFIG_CIO2_BRIDGE = yes; - CONFIG_INTEL_SKL_INT3472 = module; - CONFIG_REGULATOR_TPS68470 = module; - CONFIG_COMMON_CLK_TPS68470 = module; - - # - # Cameras: Sensor drivers - # - CONFIG_VIDEO_OV5693 = module; - CONFIG_VIDEO_OV7251 = module; - CONFIG_VIDEO_OV8865 = module; - - # - # ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 - # - CONFIG_APDS9960 = module; - - # - # Other Drivers - # - CONFIG_INPUT_SOC_BUTTON_ARRAY = module; - CONFIG_SURFACE_3_POWER_OPREGION = module; - CONFIG_SURFACE_PRO3_BUTTON = module; - CONFIG_SURFACE_GPE = module; - CONFIG_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-surface-sam"; - patch = patchDir + "/0005-surface-sam.patch"; - } - { - name = "ms-surface/0006-surface-sam-over-hid"; - patch = patchDir + "/0006-surface-sam-over-hid.patch"; - } - { - name = "ms-surface/0007-surface-button"; - patch = patchDir + "/0007-surface-button.patch"; - } - { - name = "ms-surface/0008-surface-typecover"; - patch = patchDir + "/0008-surface-typecover.patch"; - } - { - name = "ms-surface/0009-cameras"; - patch = patchDir + "/0009-cameras.patch"; - } - # { - # name = "ms-surface/0010-amd-gpio"; - # patch = patchDir + "/0010-amd-gpio.patch"; - # } -] diff --git a/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix b/microsoft/surface/surface-go/firmware/ath10k/ath10k-replace.nix similarity index 93% rename from microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix rename to microsoft/surface/surface-go/firmware/ath10k/ath10k-replace.nix index e6b84e1f..6cc55fa2 100644 --- a/microsoft/surface/firmware/surface-go/ath10k/ath10k-replace.nix +++ b/microsoft/surface/surface-go/firmware/ath10k/ath10k-replace.nix @@ -1,7 +1,7 @@ { stdenv, lib, pkgs, firmwareLinuxNonfree, ... }: let - repos = pkgs.callPackage ../../../repos.nix {}; + repos = pkgs.callPackage ../../../common/repos.nix {}; killernetworking_firmware = repos.surface-go-ath10k-firmware_backup + "/K1535_Debian"; in stdenv.mkDerivation { diff --git a/microsoft/surface/firmware/surface-go/ath10k/default.nix b/microsoft/surface/surface-go/firmware/ath10k/default.nix similarity index 100% rename from microsoft/surface/firmware/surface-go/ath10k/default.nix rename to microsoft/surface/surface-go/firmware/ath10k/default.nix From 7ff6c2fd67ed586f20dc4272279820a26cb996e6 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 15:35:48 +1300 Subject: [PATCH 0345/1476] Doc comment --- microsoft/surface/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 795262b1..7b5e4bd1 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -19,6 +19,7 @@ in { options iwldvm force_cam=N ''; + # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = [ "mem_sleep_default=deep" ]; # NOTE: Check the README before enabling TLP: From 391211b3511b3f3a2669691cfe54480eb17f3565 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 15:43:25 +1300 Subject: [PATCH 0346/1476] Extract _actually_ common code out of microsoft/surface/default.nix --- microsoft/surface/common/default.nix | 19 +++++++++++++++++-- microsoft/surface/default.nix | 12 ------------ 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index d7e1cfa8..95d83a0c 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -1,7 +1,22 @@ -{ ... }: +{ lib, ... }: -{ +let + inherit (lib) mkDefault; + +in { imports = [ ./kernel ]; + + microsoft-surface.kernelVersion = mkDefault "6.0.11"; + + # Seems to be required to properly enable S0ix "Modern Standby": + boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; + + # NOTE: Check the README before enabling TLP: + services.tlp.enable = mkDefault false; + + # i.e. needed for wifi firmware, see https://github.com/NixOS/nixos-hardware/issues/364 + hardware.enableRedistributableFirmware = mkDefault true; + hardware.sensor.iio.enable = mkDefault true; } diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 7b5e4bd1..e1befefb 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -9,8 +9,6 @@ in { ./surface-go/firmware/ath10k ]; - microsoft-surface.kernelVersion = mkDefault "6.0.11"; - boot.extraModprobeConfig = mkDefault '' options i915 enable_fbc=1 enable_rc6=1 modeset=1 options snd_hda_intel power_save=1 @@ -19,16 +17,6 @@ in { options iwldvm force_cam=N ''; - # Seems to be required to properly enable S0ix "Modern Standby": - boot.kernelParams = [ "mem_sleep_default=deep" ]; - - # NOTE: Check the README before enabling TLP: - services.tlp.enable = mkDefault false; - - # i.e. needed for wifi firmware, see https://github.com/NixOS/nixos-hardware/issues/364 - hardware.enableRedistributableFirmware = mkDefault true; - hardware.sensor.iio.enable = mkDefault true; - environment.systemPackages = [ pkgs.surface-control ]; From b8f4e971714112c72f05992bf63b3fa9cf117451 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 15:59:44 +1300 Subject: [PATCH 0347/1476] Extract IPTSd management into new option-enabled module --- microsoft/surface/common/default.nix | 1 + microsoft/surface/common/ipts/default.nix | 27 +++++++++++++++++++++++ microsoft/surface/default.nix | 8 +------ 3 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 microsoft/surface/common/ipts/default.nix diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 95d83a0c..cf837755 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -6,6 +6,7 @@ let in { imports = [ ./kernel + ./ipts ]; microsoft-surface.kernelVersion = mkDefault "6.0.11"; diff --git a/microsoft/surface/common/ipts/default.nix b/microsoft/surface/common/ipts/default.nix new file mode 100644 index 00000000..4faf49e4 --- /dev/null +++ b/microsoft/surface/common/ipts/default.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkDefault mkEnableOption mkIf mkMerge; + + cfg = config.microsoft-surface.ipts; + +in { + options.microsoft-surface.ipts = { + enable = mkEnableOption "Enable IPTSd for Microsoft Surface"; + }; + + config = mkMerge [ + { + microsoft-surface.ipts.enable = mkDefault false; + } + + (mkIf cfg.enable { + systemd.services.iptsd = { + description = "IPTSD"; + path = with pkgs; [ iptsd ]; + script = "iptsd"; + wantedBy = [ "multi-user.target" ]; + }; + }) + ]; +} diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index e1befefb..6b847494 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -25,11 +25,5 @@ in { pkgs.surface-control ]; - systemd.services.iptsd = { - description = "IPTSD"; - script = "${pkgs.iptsd}/bin/iptsd"; - wantedBy = [ - "multi-user.target" - ]; - }; + microsoft-surface.ipts.enable = true; } From 5b27563b0202d9fd70054552dcfbb2302a1dc5eb Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 16:04:46 +1300 Subject: [PATCH 0348/1476] Extract "surface-control" management into new option-enabled module --- microsoft/surface/common/default.nix | 1 + .../common/surface-control/default.nix | 25 +++++++++++++++++++ microsoft/surface/default.nix | 9 +------ 3 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 microsoft/surface/common/surface-control/default.nix diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index cf837755..8c1fd838 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -7,6 +7,7 @@ in { imports = [ ./kernel ./ipts + ./surface-control ]; microsoft-surface.kernelVersion = mkDefault "6.0.11"; diff --git a/microsoft/surface/common/surface-control/default.nix b/microsoft/surface/common/surface-control/default.nix new file mode 100644 index 00000000..4927c24e --- /dev/null +++ b/microsoft/surface/common/surface-control/default.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: + + +let + inherit (lib) mkDefault mkEnableOption mkIf mkMerge; + + cfg = config.microsoft-surface.surface-control; + +in { + options.microsoft-surface.surface-control = { + enable = mkEnableOption "Enable 'surface-control' for Microsoft Surface"; + }; + + config = mkMerge [ + { + microsoft-surface.surface-control.enable = mkDefault false; + } + + (mkIf cfg.enable { + environment.systemPackages = with pkgs; [ surface-control ]; + services.udev.packages = with pkgs; [ surface-control]; + users.groups.surface-control = { }; + }) + ]; +} diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 6b847494..5b541c91 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -17,13 +17,6 @@ in { options iwldvm force_cam=N ''; - environment.systemPackages = [ - pkgs.surface-control - ]; - users.groups.surface-control = { }; - services.udev.packages = [ - pkgs.surface-control - ]; - + microsoft-surface.surface-control.enable = true; microsoft-surface.ipts.enable = true; } From cca1f04705171080e18f8f270fc98d168811054f Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 16:13:38 +1300 Subject: [PATCH 0349/1476] Move the last of the code into ./microsoft/common/old --- microsoft/surface/default.nix | 14 +------------- microsoft/surface/old/default.nix | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 microsoft/surface/old/default.nix diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 5b541c91..0633c4e0 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -5,18 +5,6 @@ let in { imports = [ - ./common - ./surface-go/firmware/ath10k + ./old ]; - - boot.extraModprobeConfig = mkDefault '' - options i915 enable_fbc=1 enable_rc6=1 modeset=1 - options snd_hda_intel power_save=1 - options snd_ac97_codec power_save=1 - options iwlwifi power_save=Y - options iwldvm force_cam=N - ''; - - microsoft-surface.surface-control.enable = true; - microsoft-surface.ipts.enable = true; } diff --git a/microsoft/surface/old/default.nix b/microsoft/surface/old/default.nix new file mode 100644 index 00000000..d8a2d675 --- /dev/null +++ b/microsoft/surface/old/default.nix @@ -0,0 +1,22 @@ +{ lib, pkgs, ... }: + +let + inherit (lib) mkDefault; + +in { + imports = [ + ../common + ../surface-go/firmware/ath10k + ]; + + boot.extraModprobeConfig = mkDefault '' + options i915 enable_fbc=1 enable_rc6=1 modeset=1 + options snd_hda_intel power_save=1 + options snd_ac97_codec power_save=1 + options iwlwifi power_save=Y + options iwldvm force_cam=N + ''; + + microsoft-surface.surface-control.enable = true; + microsoft-surface.ipts.enable = true; +} From c52e0880de7100b0590dd3e3d39cbbc63ef45485 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 16:27:28 +1300 Subject: [PATCH 0350/1476] Add warning when importing microsoft/surface/ from now on --- microsoft/surface/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 0633c4e0..63aac11c 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -1,10 +1,12 @@ -{ lib, pkgs, ... }: +{ lib, ... }: let - inherit (lib) mkDefault; + inherit (lib) warn; in { imports = [ - ./old + ( warn + "Please don't import microsoft/surface/ (default.nix) any longer; use microsoft/surface/old or see microsoft/surface/old/README.md for more details." + ./old ) ]; } From 20cc307602f461001a6de0e33f7a773a1c2f4f0a Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 16:30:15 +1300 Subject: [PATCH 0351/1476] Update README.md and flake.nix --- README.md | 1 + flake.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 5ff1c15d..aca01019 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,7 @@ See code for all available configurations. | [MSI GL62/CX62](msi/gl62) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | | [Microsoft Surface Range](microsoft/surface) | `` | +| [Microsoft Surface Range (Old Behaviour)](microsoft/surface/old) | `` | | [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | | [Panasonic Let's Note CF-LX4 ](panasonic/letsnote/cf-lx4) | `` | diff --git a/flake.nix b/flake.nix index 67aeeb48..82d769b3 100644 --- a/flake.nix +++ b/flake.nix @@ -131,6 +131,7 @@ lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; microsoft-surface = import ./microsoft/surface; + microsoft-surface-old-behaviour = import ./microsoft/surface/old; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; msi-gs60 = import ./msi/gs60; msi-gl62 = import ./msi/gl62; From cd560b1ec3498f0fc3c5d6b266e7c49b2677eebc Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 16:55:23 +1300 Subject: [PATCH 0352/1476] README.md --- microsoft/surface/old/README.md | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 microsoft/surface/old/README.md diff --git a/microsoft/surface/old/README.md b/microsoft/surface/old/README.md new file mode 100644 index 00000000..a61fc5f4 --- /dev/null +++ b/microsoft/surface/old/README.md @@ -0,0 +1,51 @@ +# Changes to the microsoft/surface top-level + +## Overview + +When I (@mexisme) created the microsoft/surface profile, there weren't that many differences between +the various models of Surface. + +I had just acquired a Surface Go 1, and it was mostly safe to enable all the options for all the +models, and they would fail gracefully enough that we could mostly ignore warnings or errors. + +Now, however --- as-of 2023-01-10 --- we have a much wider variety of chipsets, incl. models with +some of the newer AMD CPUs, and this is breaking small things in annoying ways for more people. + +## Changes + +### Model Specialisations + +In keeping with the broader structure of "nixos-hardware", I've also changed the structure of the +microsoft/surface profile to make it easier for people to specialise for their hardware. + +Any code or modules that are specialised for a Surface model now have their own directory under this +top-level. + +E.g. I am moving the Surface Go specialisations into `surface-go/`, and there may be further +specialisations like `surface-go-3/`. + +### "Common" modules + +All the "common" modules that were once in the top-level of the microsoft/surface profile have moved +under the `common/` directory. + +Tools / services that are shared among several models are now extracted to their own module under +`common/` and imported by `common/default.nix`. +These new "common" modules now have an `enable` option, which is `false` by default. + +### "Old Behaviour" module + +The original `./default.nix` module has been replaced by a new `old/` module, which replicates the +original behaviour. + +The new `./default.nix` will load the new `old/` module, but will also pop-up a warning asking users +to update how they use the microsoft/surface profile from now on. +This warning will probably change to a fail assertion at some point in the future. + +## Adding a new Model Specialisation + +This hasn't been finalised, partly as I now only have access to a Surface Go 1, these days, so I'm +maybe not the best custodian of this code any longer. + +However, hopefully the (imminent) `surface-go/` module is a reasonable exmample, and we should be +able to gather more examples for more model specialisations over time. From 9491d40621da9da9ce66cd239d7ee146510beb7e Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 16:57:32 +1300 Subject: [PATCH 0353/1476] README.md --- microsoft/surface/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/microsoft/surface/README.md b/microsoft/surface/README.md index 458120f4..57a35bd3 100644 --- a/microsoft/surface/README.md +++ b/microsoft/surface/README.md @@ -1,3 +1,8 @@ +# NOTE: Structure changes from 2023-01-10 + +Please read the [Old Behaviour README](./old/README.md) to understand how some structural changes to +the code might affect you! + # Derivatives for Microsoft Surface notebooks These derivatives use the patches from the [linux-surface repo](https://github.com/linux-surface/linux-surface/tree/master/patches). From 9e1f036688f0a2abe0e2ec1504637de22c37661a Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 17:19:58 +1300 Subject: [PATCH 0354/1476] Fix README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aca01019..b0fa76ea 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,7 @@ See code for all available configurations. | [MSI GS60 2QE](msi/gs60) | `` | | [MSI GL62/CX62](msi/gl62) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | -| [Microsoft Surface Range](microsoft/surface) | `` | +| [Microsoft Surface Range (Deprecated version)](microsoft/surface) | `` | | [Microsoft Surface Range (Old Behaviour)](microsoft/surface/old) | `` | | [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | From c1580f8d81c63ce2b3396d304f5db6fdaf782582 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 22:03:38 +1300 Subject: [PATCH 0355/1476] Update warning message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- microsoft/surface/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 63aac11c..0d9a22f8 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -6,7 +6,7 @@ let in { imports = [ ( warn - "Please don't import microsoft/surface/ (default.nix) any longer; use microsoft/surface/old or see microsoft/surface/old/README.md for more details." + "Please do not import microsoft/surface/ (default.nix) directly; use microsoft/surface/old or see microsoft/surface/old/README.md for more details." ./old ) ]; } From 157a74d8a47e46da908e1c1f22d645b2085343c1 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 22:32:40 +1300 Subject: [PATCH 0356/1476] "old" --> "deprecated" --- README.md | 4 ++-- flake.nix | 2 +- .../surface/{old/README.md => OLD-BEHAVIOUR-DEPRECATION.md} | 6 +++--- microsoft/surface/README.md | 2 +- microsoft/surface/default.nix | 2 +- microsoft/surface/{old => deprecated}/default.nix | 0 6 files changed, 8 insertions(+), 8 deletions(-) rename microsoft/surface/{old/README.md => OLD-BEHAVIOUR-DEPRECATION.md} (91%) rename microsoft/surface/{old => deprecated}/default.nix (100%) diff --git a/README.md b/README.md index b0fa76ea..12360329 100644 --- a/README.md +++ b/README.md @@ -194,8 +194,8 @@ See code for all available configurations. | [MSI GS60 2QE](msi/gs60) | `` | | [MSI GL62/CX62](msi/gl62) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | -| [Microsoft Surface Range (Deprecated version)](microsoft/surface) | `` | -| [Microsoft Surface Range (Old Behaviour)](microsoft/surface/old) | `` | +| [Microsoft Surface Range (Deprecated)](microsoft/surface) | `` | +| [Microsoft Surface Range (Deprecated)](microsoft/surface/deprecated)| `` | | [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | | [Panasonic Let's Note CF-LX4 ](panasonic/letsnote/cf-lx4) | `` | diff --git a/flake.nix b/flake.nix index 82d769b3..233aec5f 100644 --- a/flake.nix +++ b/flake.nix @@ -131,7 +131,7 @@ lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; microsoft-surface = import ./microsoft/surface; - microsoft-surface-old-behaviour = import ./microsoft/surface/old; + microsoft-surface-deprecated = import ./microsoft/surface/deprecated; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; msi-gs60 = import ./msi/gs60; msi-gl62 = import ./msi/gl62; diff --git a/microsoft/surface/old/README.md b/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md similarity index 91% rename from microsoft/surface/old/README.md rename to microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md index a61fc5f4..1519a832 100644 --- a/microsoft/surface/old/README.md +++ b/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md @@ -33,12 +33,12 @@ Tools / services that are shared among several models are now extracted to their `common/` and imported by `common/default.nix`. These new "common" modules now have an `enable` option, which is `false` by default. -### "Old Behaviour" module +### "Deprecated Behaviour" module -The original `./default.nix` module has been replaced by a new `old/` module, which replicates the +The original `./default.nix` module has been replaced by a new `deprecated/` module, which replicates the original behaviour. -The new `./default.nix` will load the new `old/` module, but will also pop-up a warning asking users +The new `./default.nix` will load the new `deprecated/` module, but will also pop-up a warning asking users to update how they use the microsoft/surface profile from now on. This warning will probably change to a fail assertion at some point in the future. diff --git a/microsoft/surface/README.md b/microsoft/surface/README.md index 57a35bd3..6238eb63 100644 --- a/microsoft/surface/README.md +++ b/microsoft/surface/README.md @@ -1,6 +1,6 @@ # NOTE: Structure changes from 2023-01-10 -Please read the [Old Behaviour README](./old/README.md) to understand how some structural changes to +Please read the [Deprecated Behaviour README](./deprecated/README.md) to understand how some structural changes to the code might affect you! # Derivatives for Microsoft Surface notebooks diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 0d9a22f8..5ed90462 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -7,6 +7,6 @@ in { imports = [ ( warn "Please do not import microsoft/surface/ (default.nix) directly; use microsoft/surface/old or see microsoft/surface/old/README.md for more details." - ./old ) + ./deprecated ) ]; } diff --git a/microsoft/surface/old/default.nix b/microsoft/surface/deprecated/default.nix similarity index 100% rename from microsoft/surface/old/default.nix rename to microsoft/surface/deprecated/default.nix From f00dee1fdfe2975c5f80dbb79a4e6ff8fee1d3c0 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 23:22:29 +1300 Subject: [PATCH 0357/1476] Remove the "deprecated" module - It makes more sense to error-out and provide information on how to update. --- README.md | 1 - flake.nix | 1 - microsoft/surface/deprecated/default.nix | 22 ---------------------- 3 files changed, 24 deletions(-) delete mode 100644 microsoft/surface/deprecated/default.nix diff --git a/README.md b/README.md index 12360329..7fc7517e 100644 --- a/README.md +++ b/README.md @@ -195,7 +195,6 @@ See code for all available configurations. | [MSI GL62/CX62](msi/gl62) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | | [Microsoft Surface Range (Deprecated)](microsoft/surface) | `` | -| [Microsoft Surface Range (Deprecated)](microsoft/surface/deprecated)| `` | | [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | | [Panasonic Let's Note CF-LX4 ](panasonic/letsnote/cf-lx4) | `` | diff --git a/flake.nix b/flake.nix index 233aec5f..67aeeb48 100644 --- a/flake.nix +++ b/flake.nix @@ -131,7 +131,6 @@ lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; microsoft-surface = import ./microsoft/surface; - microsoft-surface-deprecated = import ./microsoft/surface/deprecated; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; msi-gs60 = import ./msi/gs60; msi-gl62 = import ./msi/gl62; diff --git a/microsoft/surface/deprecated/default.nix b/microsoft/surface/deprecated/default.nix deleted file mode 100644 index d8a2d675..00000000 --- a/microsoft/surface/deprecated/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ lib, pkgs, ... }: - -let - inherit (lib) mkDefault; - -in { - imports = [ - ../common - ../surface-go/firmware/ath10k - ]; - - boot.extraModprobeConfig = mkDefault '' - options i915 enable_fbc=1 enable_rc6=1 modeset=1 - options snd_hda_intel power_save=1 - options snd_ac97_codec power_save=1 - options iwlwifi power_save=Y - options iwldvm force_cam=N - ''; - - microsoft-surface.surface-control.enable = true; - microsoft-surface.ipts.enable = true; -} From 9d4505d4e11afd3c7037b74d87ace16fb047de06 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 10 Jan 2023 23:05:27 +1300 Subject: [PATCH 0358/1476] Update README --- README.md | 2 +- flake.nix | 1 + .../surface/OLD-BEHAVIOUR-DEPRECATION.md | 10 ++++ microsoft/surface/README.md | 46 ++++++++++++++----- 4 files changed, 47 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7fc7517e..3306655c 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,7 @@ See code for all available configurations. | [MSI GS60 2QE](msi/gs60) | `` | | [MSI GL62/CX62](msi/gl62) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | -| [Microsoft Surface Range (Deprecated)](microsoft/surface) | `` | +| [Microsoft Surface Range (Common Modules)](microsoft/surface/common)| `` | | [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | | [Panasonic Let's Note CF-LX4 ](panasonic/letsnote/cf-lx4) | `` | diff --git a/flake.nix b/flake.nix index 67aeeb48..87acc3e7 100644 --- a/flake.nix +++ b/flake.nix @@ -131,6 +131,7 @@ lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; microsoft-surface = import ./microsoft/surface; + microsoft-surface-common = import ./microsoft/surface/common; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; msi-gs60 = import ./msi/gs60; msi-gl62 = import ./msi/gl62; diff --git a/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md b/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md index 1519a832..e93a81d8 100644 --- a/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md +++ b/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md @@ -11,6 +11,16 @@ models, and they would fail gracefully enough that we could mostly ignore warnin Now, however --- as-of 2023-01-10 --- we have a much wider variety of chipsets, incl. models with some of the newer AMD CPUs, and this is breaking small things in annoying ways for more people. +## How to update + +By preference, there will already be a specialised module for your model's configuration. + +If not, the `microsoft/surface/common/` module can also be imported directly, and the options +provided can be used in your own system's configuration. + +Alternatively, you can create a new specialisation for your model under `microsoft/surface` +configured for that model. + ## Changes ### Model Specialisations diff --git a/microsoft/surface/README.md b/microsoft/surface/README.md index 6238eb63..6b16cdf8 100644 --- a/microsoft/surface/README.md +++ b/microsoft/surface/README.md @@ -1,13 +1,28 @@ # NOTE: Structure changes from 2023-01-10 -Please read the [Deprecated Behaviour README](./deprecated/README.md) to understand how some structural changes to +Please read the [Deprecated Behaviour README](./OLD-BEHAVIOUR-DEPRECATED.md) to understand how some structural changes to the code might affect you! -# Derivatives for Microsoft Surface notebooks +# Derivations for Microsoft Surface notebooks These derivatives use the patches from the [linux-surface repo](https://github.com/linux-surface/linux-surface/tree/master/patches). -## Kernel +## Importing + +By preference, there will already be a specialised module for your model's configuration. + +If not, the `microsoft/surface/common/` module can also be imported directly, and the options +provided can be used in your own system's configuration. + +Alternatively, you can create a new specialisation for your model under `microsoft/surface` +configured for that model. + +## Common Modules + +Most shared / common modules are under the [`common/`](./common/) directory. +This includes the patched kernel build modules, as well as tools and service like `IPTSd` and `surface-control`. + +### Kernel The kernel needs several patches to make it work correctly with some of the hardware on various Surface models, e.g. keyboard/trackpad, camera, wifi. @@ -16,21 +31,19 @@ Not all hardware is fully supported, but the [linux-surface feature matrix](https://github.com/linux-surface/linux-surface/wiki/Supported-Devices-and-Features#feature-matrix) provides details on which devices are supported on which types of machine. -The kernel-specific derivations are under the `kernel/` sub-directory. +The kernel-specific derivations are under the [`common/kernel/`](./common/kernel/) sub-directory. In order to simplify maintenance of the Nix code, only the most-recent kernel patch-set is expected to be maintained in this repo. _*NOTE:*_ Some built-in Kernel config items need to be set, that aren't set by default: - https://github.com/linux-surface/surface-aggregator-module/wiki/Testing-and-Installing -## Firmware, Drivers and Support Tools - -### WiFi - -For the Surface Go, please see the "Issues" sections below. +### Support Tools ### IPTS +Enable this with the `microsoft-surface.ipts.enable = true;` config option. + IPTS is used on most of the Surface range, except for Surface Go and Surface Laptop 3 (AMD version). Older kernels used specialised firmware which used a method that's no longer supported by the @@ -49,10 +62,21 @@ kernel-space driver into events for the HID / input sub-system. #### surface-control +Enable this with the `config.microsoft-surface.surface-control.enable = true;` config option. + For controlling the performance modes and other aspects of the device, the [`surface-control`](https://github.com/linux-surface/surface-control) tool is included. To be able to control the performance mode without using `sudo`, add your user to the `surface-control` group. +## Firmware and Drivers + +### WiFi on Surface Go + +For the Surface Go, please see the "Issues" sections below. + +Including the [`microsoft/surface/surface-go/firmware/ath-10k/`](./surface-go/firmware/ath-10k/) +module will replace the default firmware with the updated firmware. + # ToDo's Not Done See: [TODO.org](./TODO.org) @@ -73,8 +97,8 @@ You will see messages like "Can't ping firmware". The most effective fix to-date is to remove the `board-2.bin` file or replace it with a copy of the `board.bin` file. -The derivative in `firmware/surface-go/ath10k/` can configure this, if you set the option -`config.hardware.microsoft-surface.firmware.surface-go-ath10k.replace` to `true`. +The derivative in `surface-go/firmware/ath10k/` can configure this, with the +`config.hardware.microsoft-surface.firmware.surface-go-ath10k.replace = true` config option. _*NOTE:*_ This is destructive, as it deletes all the `board.bin` and `board-2.bin` files for the `ath10k` QCA6174 device, and replaces them with KillerNetworking's version. From ee8fef414961d3d04250a03cb5a071882f286f44 Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 11 Jan 2023 00:01:21 +1300 Subject: [PATCH 0359/1476] Use the module assertions option, instead - Assertion (failure) when trying to use microsoft/surface/default.nix --- microsoft/surface/default.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 5ed90462..395e05de 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -1,12 +1,10 @@ -{ lib, ... }: +{ ... }: -let - inherit (lib) warn; - -in { - imports = [ - ( warn - "Please do not import microsoft/surface/ (default.nix) directly; use microsoft/surface/old or see microsoft/surface/old/README.md for more details." - ./deprecated ) +{ + assertions = [ + { + assertion = false; + message = "Importing microsoft/surface/ (default.nix) directly is deprecated! See microsoft/surface/OLD-BEHAVIOUR-DEPRECATED.md for more details."; + } ]; } From 63be2f98546ae64aedb8716fa6b0771903f291a3 Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 11 Jan 2023 01:54:53 +1300 Subject: [PATCH 0360/1476] Update README.md to reference surface-go module --- microsoft/surface/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/microsoft/surface/README.md b/microsoft/surface/README.md index 6b16cdf8..b7887525 100644 --- a/microsoft/surface/README.md +++ b/microsoft/surface/README.md @@ -10,6 +10,7 @@ These derivatives use the patches from the [linux-surface repo](https://github.c ## Importing By preference, there will already be a specialised module for your model's configuration. +e.g. The `microsoft/surface/surface-go` module configures for the Surface Go. If not, the `microsoft/surface/common/` module can also be imported directly, and the options provided can be used in your own system's configuration. From 30066d1886a111a917f82154ac90167b0042b29d Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 11 Jan 2023 02:06:33 +1300 Subject: [PATCH 0361/1476] Tidy-up --- microsoft/surface/surface-go/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix index 6bfa33bc..99041e32 100644 --- a/microsoft/surface/surface-go/default.nix +++ b/microsoft/surface/surface-go/default.nix @@ -1,7 +1,7 @@ -{ config, lib, pkgs, ... }: +{ lib, ... }: let - inherit (lib) mkDefault mkEnableOption mkIf mkMerge; + inherit (lib) mkDefault; in { imports = [ ../common From de3ec80522011e938a55c3964d9e1f8826215796 Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 11 Jan 2023 02:11:52 +1300 Subject: [PATCH 0362/1476] Add Surface Pro (Intel) --- README.md | 3 ++- flake.nix | 3 ++- microsoft/surface/surface-pro-intel/default.nix | 12 ++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 microsoft/surface/surface-pro-intel/default.nix diff --git a/README.md b/README.md index 62d8b848..95ba1598 100644 --- a/README.md +++ b/README.md @@ -193,9 +193,10 @@ See code for all available configurations. | [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | | [MSI GS60 2QE](msi/gs60) | `` | | [MSI GL62/CX62](msi/gl62) | `` | -| [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | | [Microsoft Surface Go](microsoft/surface/surface-go) | `` | +| [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel)| ``| | [Microsoft Surface Range (Common Modules)](microsoft/surface/common)| `` | +| [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | | [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | | [Panasonic Let's Note CF-LX4 ](panasonic/letsnote/cf-lx4) | `` | diff --git a/flake.nix b/flake.nix index e5f587e2..605d6cd6 100644 --- a/flake.nix +++ b/flake.nix @@ -130,8 +130,9 @@ lenovo-thinkpad-z13 = import ./lenovo/thinkpad/z/z13; lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; - microsoft-surface-common = import ./microsoft/surface/common; microsoft-surface-go = import ./microsoft/surface/surface-go; + microsoft-surface-pro-intel = import ./microsoft/surface/surface-pro-intel; + microsoft-surface-common = import ./microsoft/surface/common; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; msi-gs60 = import ./msi/gs60; msi-gl62 = import ./msi/gl62; diff --git a/microsoft/surface/surface-pro-intel/default.nix b/microsoft/surface/surface-pro-intel/default.nix new file mode 100644 index 00000000..6ca5e5e7 --- /dev/null +++ b/microsoft/surface/surface-pro-intel/default.nix @@ -0,0 +1,12 @@ +{ lib, ... }: + +let + inherit (lib) mkDefault; +in { + imports = [ + ../common + ]; + + microsoft-surface.ipts.enable = true; + microsoft-surface.surface-control.enable = true; +} From 7b721546842f5f5824d736ba68c5ad87a66b36e9 Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 11 Jan 2023 02:12:39 +1300 Subject: [PATCH 0363/1476] Update Surface Pro 3 to reference microsoft/surface/surface-pro-intel --- microsoft/surface-pro/3/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/surface-pro/3/default.nix b/microsoft/surface-pro/3/default.nix index 7e80d1d9..989d53ae 100644 --- a/microsoft/surface-pro/3/default.nix +++ b/microsoft/surface-pro/3/default.nix @@ -1,3 +1,3 @@ { - imports = [ ../../surface ]; + imports = [ ../../surface/surface-pro-intel ]; } From 80e8d29a9cd605f6230640f57b8f2a7833b6249f Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 11 Jan 2023 02:24:06 +1300 Subject: [PATCH 0364/1476] Update Surface Go to depend on other PC modules - SSD - Intel Kaby Lake - Intel GPU --- microsoft/surface/surface-go/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix index 99041e32..7026c337 100644 --- a/microsoft/surface/surface-go/default.nix +++ b/microsoft/surface/surface-go/default.nix @@ -6,10 +6,18 @@ in { imports = [ ../common ./firmware/ath10k + ../../../common/pc + ../../../common/pc/ssd + ../../../common/cpu/intel + ../../../common/cpu/intel/kaby-lake + ]; + + boot.kernelParams = [ + "i915.enable_rc6=1" + "i915.modeset=1" ]; boot.extraModprobeConfig = mkDefault '' - options i915 enable_fbc=1 enable_rc6=1 modeset=1 options snd_hda_intel power_save=1 options snd_ac97_codec power_save=1 options iwlwifi power_save=Y From 42ec6296f22f224849bfeb7cb12a138b81a1ac7d Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 11 Jan 2023 02:25:48 +1300 Subject: [PATCH 0365/1476] fixup! Update Surface Pro 3 to reference microsoft/surface/surface-pro-intel --- microsoft/surface/surface-pro-intel/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/microsoft/surface/surface-pro-intel/default.nix b/microsoft/surface/surface-pro-intel/default.nix index 6ca5e5e7..21c50c88 100644 --- a/microsoft/surface/surface-pro-intel/default.nix +++ b/microsoft/surface/surface-pro-intel/default.nix @@ -5,6 +5,9 @@ let in { imports = [ ../common + ../../../common/pc + ../../../common/pc/ssd + ../../../common/cpu/intel ]; microsoft-surface.ipts.enable = true; From 8e6d03d3493bd3714e6e62c5a837f37850fc7807 Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 11 Jan 2023 02:32:24 +1300 Subject: [PATCH 0366/1476] Update OLD-BEHAVIOUR-DEPRECATION.md --- .../surface/OLD-BEHAVIOUR-DEPRECATION.md | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md b/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md index e93a81d8..516dc181 100644 --- a/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md +++ b/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md @@ -2,11 +2,11 @@ ## Overview -When I (@mexisme) created the microsoft/surface profile, there weren't that many differences between +When the microsoft/surface profile was created, there weren't that many differences between the various models of Surface. -I had just acquired a Surface Go 1, and it was mostly safe to enable all the options for all the -models, and they would fail gracefully enough that we could mostly ignore warnings or errors. +e.g. I had just acquired a Surface Go 1, and it was mostly safe to enable all the options for all the +models, and they would fail gracefully enough that you could mostly ignore warnings or errors. Now, however --- as-of 2023-01-10 --- we have a much wider variety of chipsets, incl. models with some of the newer AMD CPUs, and this is breaking small things in annoying ways for more people. @@ -31,9 +31,6 @@ microsoft/surface profile to make it easier for people to specialise for their h Any code or modules that are specialised for a Surface model now have their own directory under this top-level. -E.g. I am moving the Surface Go specialisations into `surface-go/`, and there may be further -specialisations like `surface-go-3/`. - ### "Common" modules All the "common" modules that were once in the top-level of the microsoft/surface profile have moved @@ -41,16 +38,7 @@ under the `common/` directory. Tools / services that are shared among several models are now extracted to their own module under `common/` and imported by `common/default.nix`. -These new "common" modules now have an `enable` option, which is `false` by default. - -### "Deprecated Behaviour" module - -The original `./default.nix` module has been replaced by a new `deprecated/` module, which replicates the -original behaviour. - -The new `./default.nix` will load the new `deprecated/` module, but will also pop-up a warning asking users -to update how they use the microsoft/surface profile from now on. -This warning will probably change to a fail assertion at some point in the future. +Most "common" modules now have an `enable` option, which is `false` by default. ## Adding a new Model Specialisation From 2cd5ae60b1c68dcbba0ce50d1c49d8082f88142a Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 11 Jan 2023 10:48:24 +1300 Subject: [PATCH 0367/1476] Use URL to docs, instead of short-form MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- microsoft/surface/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 395e05de..1943157a 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -4,7 +4,7 @@ assertions = [ { assertion = false; - message = "Importing microsoft/surface/ (default.nix) directly is deprecated! See microsoft/surface/OLD-BEHAVIOUR-DEPRECATED.md for more details."; + message = "Importing microsoft/surface/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/microsoft/surface/OLD-BEHAVIOUR-DEPRECATED.md for more details."; } ]; } From 6832e876631de9212889f094d258f395adbf17cd Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 11 Jan 2023 10:57:10 +1300 Subject: [PATCH 0368/1476] Add some doc comments --- microsoft/surface/surface-go/default.nix | 5 +++++ microsoft/surface/surface-pro-intel/default.nix | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix index 7026c337..fdd13f6c 100644 --- a/microsoft/surface/surface-go/default.nix +++ b/microsoft/surface/surface-go/default.nix @@ -1,5 +1,9 @@ { lib, ... }: +# This module is intended to support the Surface Go range of devices. +# The current version of this targets the Go 1, and other versions of the device may need further +# config changes to work well. + let inherit (lib) mkDefault; in { @@ -8,6 +12,7 @@ in { ./firmware/ath10k ../../../common/pc ../../../common/pc/ssd + # The Intel CPU module auto-includes Intel's GPU: ../../../common/cpu/intel ../../../common/cpu/intel/kaby-lake ]; diff --git a/microsoft/surface/surface-pro-intel/default.nix b/microsoft/surface/surface-pro-intel/default.nix index 21c50c88..abbd5313 100644 --- a/microsoft/surface/surface-pro-intel/default.nix +++ b/microsoft/surface/surface-pro-intel/default.nix @@ -1,5 +1,9 @@ { lib, ... }: +# This module is intended to support the Surface Pro range, specifically those with Intel CPUs. +# It's expected it will work equally well on many other Surface models, but they may need further +# config changes to work well. + let inherit (lib) mkDefault; in { @@ -7,6 +11,7 @@ in { ../common ../../../common/pc ../../../common/pc/ssd + # The Intel CPU module auto-includes Intel's GPU: ../../../common/cpu/intel ]; From f67688dcf5a3725bbf42746488027c8d039b9a0b Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 11 Jan 2023 11:13:46 +1300 Subject: [PATCH 0369/1476] Add specialisation for Surface Laptop (AMD) --- README.md | 1 + flake.nix | 1 + .../surface/surface-laptop-amd/default.nix | 22 +++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 microsoft/surface/surface-laptop-amd/default.nix diff --git a/README.md b/README.md index 95ba1598..bd6086b0 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,7 @@ See code for all available configurations. | [MSI GL62/CX62](msi/gl62) | `` | | [Microsoft Surface Go](microsoft/surface/surface-go) | `` | | [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel)| ``| +| [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd)| ``| | [Microsoft Surface Range (Common Modules)](microsoft/surface/common)| `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | | [Omen en00015p](omen/en00015p) | `` | diff --git a/flake.nix b/flake.nix index 605d6cd6..d0c6457f 100644 --- a/flake.nix +++ b/flake.nix @@ -132,6 +132,7 @@ letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; microsoft-surface-go = import ./microsoft/surface/surface-go; microsoft-surface-pro-intel = import ./microsoft/surface/surface-pro-intel; + microsoft-surface-laptop-amd = import ./microsoft/surface/surface-laptop-amd; microsoft-surface-common = import ./microsoft/surface/common; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; msi-gs60 = import ./msi/gs60; diff --git a/microsoft/surface/surface-laptop-amd/default.nix b/microsoft/surface/surface-laptop-amd/default.nix new file mode 100644 index 00000000..9a647dd5 --- /dev/null +++ b/microsoft/surface/surface-laptop-amd/default.nix @@ -0,0 +1,22 @@ +{ lib, ... }: + +# This module is intended to support the Surface Laptop range, specifically those with AMD CPUs. +# It's expected it will work equally well on many other Surface models, but they may need further +# config changes to work well. + +let + inherit (lib) mkDefault; +in { + imports = [ + ../common + ../../../common/pc + ../../../common/pc/ssd + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ]; + + # Note: The IPTS module is not often required on devices with Surface Laptop 3 (AMD). + microsoft-surface.ipts.enable = true; + microsoft-surface.surface-control.enable = true; +} From 01d1f9604e26953f43b77c2e173e31c9af8075dd Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 11 Jan 2023 12:10:06 +1300 Subject: [PATCH 0370/1476] Update TODO's --- microsoft/surface/TODO.org | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/microsoft/surface/TODO.org b/microsoft/surface/TODO.org index bf1f0f7a..f5526c30 100644 --- a/microsoft/surface/TODO.org +++ b/microsoft/surface/TODO.org @@ -42,14 +42,18 @@ * Support Tools ** TODO Incorporate @hpfr's function(s) from this commit: - https://github.com/hpfr/system/commit/03fa1b0a83f8a336e812910d0d50f5247a8a630c -** TODO Create derivative for `iptsd` touch-screen daemon - - [ ] Download - - [ ] Install binary - - [ ] Enable via systemd + - @hpfr's repo forked for posterity, as he no longer has a Surface: + https://github.com/mexisme/hpfr-nix-linux-surface-system/commit/03fa1b0a83f8a336e812910d0d50f5247a8a630c +** DONE Create derivative for `iptsd` touch-screen daemon +- State "DONE" from "TODO" [2023-01-11 Wed 12:09] + - [X] Download + - [X] Install binary + - [X] Enable via systemd ** TODO Create derivative to patch and rebuild libwacom - github.com/linux-surface/libwacom-surface - The plan is to do this in a separate PR against `nixpkgs` instead of `nixos-hardware` -** TODO Create derivative to install `surface-control` +** DONE Create derivative to install `surface-control` +- State "DONE" from "TODO" [2023-01-11 Wed 12:05] - Download github.com/linux-surface/surface-control ** TODO Create derivative to install `surface-dtx-daemon` - Download github.com/linux-surface/surface-dtx-daemon From 62e8ddb93f08487f63dbb339d1e572b214bf81d9 Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 11 Jan 2023 12:11:44 +1300 Subject: [PATCH 0371/1476] Deadnix fixes --- microsoft/surface/surface-laptop-amd/default.nix | 6 ++---- microsoft/surface/surface-pro-intel/default.nix | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/microsoft/surface/surface-laptop-amd/default.nix b/microsoft/surface/surface-laptop-amd/default.nix index 9a647dd5..4985911f 100644 --- a/microsoft/surface/surface-laptop-amd/default.nix +++ b/microsoft/surface/surface-laptop-amd/default.nix @@ -1,12 +1,10 @@ -{ lib, ... }: +{ ... }: # This module is intended to support the Surface Laptop range, specifically those with AMD CPUs. # It's expected it will work equally well on many other Surface models, but they may need further # config changes to work well. -let - inherit (lib) mkDefault; -in { +{ imports = [ ../common ../../../common/pc diff --git a/microsoft/surface/surface-pro-intel/default.nix b/microsoft/surface/surface-pro-intel/default.nix index abbd5313..026843a3 100644 --- a/microsoft/surface/surface-pro-intel/default.nix +++ b/microsoft/surface/surface-pro-intel/default.nix @@ -1,12 +1,10 @@ -{ lib, ... }: +{ ... }: # This module is intended to support the Surface Pro range, specifically those with Intel CPUs. # It's expected it will work equally well on many other Surface models, but they may need further # config changes to work well. -let - inherit (lib) mkDefault; -in { +{ imports = [ ../common ../../../common/pc From c58b1fb5a50ea25724cfb7ef0f23b7a32145fd0a Mon Sep 17 00:00:00 2001 From: damianoognissanti <97738787+damianoognissanti@users.noreply.github.com> Date: Sat, 14 Jan 2023 08:34:30 +0100 Subject: [PATCH 0372/1476] Fixed typo One line said nixes instead of nixos --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bd6086b0..503b6baf 100644 --- a/README.md +++ b/README.md @@ -210,7 +210,7 @@ See code for all available configurations. | [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | | [StarFive VisionFive v1](starfive/visionfive/v1) | `` | | [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | -| [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | +| [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | | [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | | [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | | [System76 (generic)](system76) | `` | From 320866b9853a8478e75120cc9ff8796489ad8e54 Mon Sep 17 00:00:00 2001 From: Ivan Petkov Date: Mon, 16 Jan 2023 19:57:10 -0800 Subject: [PATCH 0373/1476] raspberry-pi/4/dtmerge: fix application of overlays Previously whenever an overlay was found to be incompatible with a base device tree blob, the entire base dtb would be skipped in favor of processing the next one. This had the unfortunate effect where overlays would not fully be applied if any incompatibility was found. For example, this is an issue with build device trees specific for one flavor of raspberry pi if the overlay was not compatible _everywhere_. The solution is to forego the `continue` keyword if an overlay is in compatible and instead use a compound conditional statement to skip incompatible overlays but continue trying to apply it to any remaining dtbs. --- raspberry-pi/4/apply-overlays-dtmerge.nix | 30 +++++++++++------------ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/raspberry-pi/4/apply-overlays-dtmerge.nix b/raspberry-pi/4/apply-overlays-dtmerge.nix index 84995032..e5b52d37 100644 --- a/raspberry-pi/4/apply-overlays-dtmerge.nix +++ b/raspberry-pi/4/apply-overlays-dtmerge.nix @@ -24,26 +24,24 @@ with lib; (base: overlays': stdenvNoCC.mkDerivation { # skip incompatible and non-matching overlays if [[ ! "$dtbCompat" =~ "$overlayCompat" ]]; then echo "Skipping overlay ${o.name}: incompatible with $(basename "$dtb")" - continue - fi - ${optionalString ((o.filter or null) != null) '' - if [[ "''${dtb//${o.filter}/}" == "$dtb" ]]; then - echo "Skipping overlay ${o.name}: filter does not match $(basename "$dtb")" - continue - fi + elif ${if ((o.filter or null) == null) then "false" else '' + [[ "''${dtb//${o.filter}/}" == "$dtb" ]] ''} + then + echo "Skipping overlay ${o.name}: filter does not match $(basename "$dtb")" + else + echo -n "Applying overlay ${o.name} to $(basename "$dtb")... " + mv "$dtb"{,.in} - echo -n "Applying overlay ${o.name} to $(basename "$dtb")... " - mv "$dtb"{,.in} + # dtmerge requires a .dtbo ext for dtbo files, otherwise it adds it to the given file implicitly + dtboWithExt="$TMPDIR/$(basename "${o.dtboFile}").dtbo" + cp -r ${o.dtboFile} "$dtboWithExt" - # dtmerge requires a .dtbo ext for dtbo files, otherwise it adds it to the given file implicitly - dtboWithExt="$TMPDIR/$(basename "${o.dtboFile}").dtbo" - cp -r ${o.dtboFile} "$dtboWithExt" + dtmerge "$dtb.in" "$dtb" "$dtboWithExt" - dtmerge "$dtb.in" "$dtb" "$dtboWithExt" - - echo "ok" - rm "$dtb.in" "$dtboWithExt" + echo "ok" + rm "$dtb.in" "$dtboWithExt" + fi '')} done''; From 5c836a9a365eee0b4d730db70f78bda2fa286e20 Mon Sep 17 00:00:00 2001 From: mexisme Date: Thu, 19 Jan 2023 03:06:56 +1300 Subject: [PATCH 0374/1476] Typo: "CONFIG_" prefix in structuredExtraConfig patches - Unintentional typo, due to copy-paste from linux-surface upstream config --- .../common/kernel/linux-6.0.17/patches.nix | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-6.0.17/patches.nix b/microsoft/surface/common/kernel/linux-6.0.17/patches.nix index 7b0d0967..f0ba2c9c 100644 --- a/microsoft/surface/common/kernel/linux-6.0.17/patches.nix +++ b/microsoft/surface/common/kernel/linux-6.0.17/patches.nix @@ -11,28 +11,28 @@ # # Surface Aggregator Module # - CONFIG_SURFACE_AGGREGATOR = module; - CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION = no; - CONFIG_SURFACE_AGGREGATOR_BUS = yes; - CONFIG_SURFACE_AGGREGATOR_CDEV = module; - CONFIG_SURFACE_AGGREGATOR_HUB = module; - CONFIG_SURFACE_AGGREGATOR_REGISTRY = module; - CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH = 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; - CONFIG_SURFACE_ACPI_NOTIFY = module; - CONFIG_SURFACE_DTX = module; - CONFIG_SURFACE_PLATFORM_PROFILE = module; + SURFACE_ACPI_NOTIFY = module; + SURFACE_DTX = module; + SURFACE_PLATFORM_PROFILE = module; - CONFIG_SURFACE_HID = module; - CONFIG_SURFACE_KBD = module; + SURFACE_HID = module; + SURFACE_KBD = module; - CONFIG_BATTERY_SURFACE = module; - CONFIG_CHARGER_SURFACE = module; + BATTERY_SURFACE = module; + CHARGER_SURFACE = module; # # Surface Hotplug # - CONFIG_SURFACE_HOTPLUG = module; + SURFACE_HOTPLUG = module; # # IPTS touchscreen @@ -40,39 +40,39 @@ # This only enables the user interface for IPTS data. # For the touchscreen to work, you need to install iptsd. # - CONFIG_MISC_IPTS = module; + MISC_IPTS = module; # # Cameras: IPU3 # - CONFIG_VIDEO_DW9719 = module; - CONFIG_VIDEO_IPU3_IMGU = module; - CONFIG_VIDEO_IPU3_CIO2 = module; - CONFIG_CIO2_BRIDGE = yes; - CONFIG_INTEL_SKL_INT3472 = module; - CONFIG_REGULATOR_TPS68470 = module; - CONFIG_COMMON_CLK_TPS68470 = module; + 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 # - CONFIG_VIDEO_OV5693 = module; - CONFIG_VIDEO_OV7251 = module; - CONFIG_VIDEO_OV8865 = module; + VIDEO_OV5693 = module; + VIDEO_OV7251 = module; + VIDEO_OV8865 = module; # # ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 # - CONFIG_APDS9960 = module; + APDS9960 = module; # # Other Drivers # - CONFIG_INPUT_SOC_BUTTON_ARRAY = module; - CONFIG_SURFACE_3_POWER_OPREGION = module; - CONFIG_SURFACE_PRO3_BUTTON = module; - CONFIG_SURFACE_GPE = module; - CONFIG_SURFACE_BOOK1_DGPU_SWITCH = module; + INPUT_SOC_BUTTON_ARRAY = module; + SURFACE_3_POWER_OPREGION = module; + SURFACE_PRO3_BUTTON = module; + SURFACE_GPE = module; + SURFACE_BOOK1_DGPU_SWITCH = module; }; } { From 2933836fa59d45d897f53a92deb712c77d43325a Mon Sep 17 00:00:00 2001 From: mexisme Date: Thu, 19 Jan 2023 03:11:39 +1300 Subject: [PATCH 0375/1476] Typo: "CONFIG_" prefix in structuredExtraConfig patches - Unintentional typo, due to copy-paste from linux-surface upstream config --- .../common/kernel/linux-6.1.3/patches.nix | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-6.1.3/patches.nix b/microsoft/surface/common/kernel/linux-6.1.3/patches.nix index 7b0d0967..f0ba2c9c 100644 --- a/microsoft/surface/common/kernel/linux-6.1.3/patches.nix +++ b/microsoft/surface/common/kernel/linux-6.1.3/patches.nix @@ -11,28 +11,28 @@ # # Surface Aggregator Module # - CONFIG_SURFACE_AGGREGATOR = module; - CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION = no; - CONFIG_SURFACE_AGGREGATOR_BUS = yes; - CONFIG_SURFACE_AGGREGATOR_CDEV = module; - CONFIG_SURFACE_AGGREGATOR_HUB = module; - CONFIG_SURFACE_AGGREGATOR_REGISTRY = module; - CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH = 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; - CONFIG_SURFACE_ACPI_NOTIFY = module; - CONFIG_SURFACE_DTX = module; - CONFIG_SURFACE_PLATFORM_PROFILE = module; + SURFACE_ACPI_NOTIFY = module; + SURFACE_DTX = module; + SURFACE_PLATFORM_PROFILE = module; - CONFIG_SURFACE_HID = module; - CONFIG_SURFACE_KBD = module; + SURFACE_HID = module; + SURFACE_KBD = module; - CONFIG_BATTERY_SURFACE = module; - CONFIG_CHARGER_SURFACE = module; + BATTERY_SURFACE = module; + CHARGER_SURFACE = module; # # Surface Hotplug # - CONFIG_SURFACE_HOTPLUG = module; + SURFACE_HOTPLUG = module; # # IPTS touchscreen @@ -40,39 +40,39 @@ # This only enables the user interface for IPTS data. # For the touchscreen to work, you need to install iptsd. # - CONFIG_MISC_IPTS = module; + MISC_IPTS = module; # # Cameras: IPU3 # - CONFIG_VIDEO_DW9719 = module; - CONFIG_VIDEO_IPU3_IMGU = module; - CONFIG_VIDEO_IPU3_CIO2 = module; - CONFIG_CIO2_BRIDGE = yes; - CONFIG_INTEL_SKL_INT3472 = module; - CONFIG_REGULATOR_TPS68470 = module; - CONFIG_COMMON_CLK_TPS68470 = module; + 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 # - CONFIG_VIDEO_OV5693 = module; - CONFIG_VIDEO_OV7251 = module; - CONFIG_VIDEO_OV8865 = module; + VIDEO_OV5693 = module; + VIDEO_OV7251 = module; + VIDEO_OV8865 = module; # # ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 # - CONFIG_APDS9960 = module; + APDS9960 = module; # # Other Drivers # - CONFIG_INPUT_SOC_BUTTON_ARRAY = module; - CONFIG_SURFACE_3_POWER_OPREGION = module; - CONFIG_SURFACE_PRO3_BUTTON = module; - CONFIG_SURFACE_GPE = module; - CONFIG_SURFACE_BOOK1_DGPU_SWITCH = module; + INPUT_SOC_BUTTON_ARRAY = module; + SURFACE_3_POWER_OPREGION = module; + SURFACE_PRO3_BUTTON = module; + SURFACE_GPE = module; + SURFACE_BOOK1_DGPU_SWITCH = module; }; } { From ab4c0eedb668a142403b4ea94ce64f401a1a0ab9 Mon Sep 17 00:00:00 2001 From: mexisme Date: Thu, 19 Jan 2023 13:20:36 +1300 Subject: [PATCH 0376/1476] Begin updating to kernel 6.1.6 --- microsoft/surface/common/kernel/default.nix | 2 +- .../common/kernel/{linux-6.1.3 => linux-6.1.6}/default.nix | 0 .../common/kernel/{linux-6.1.3 => linux-6.1.6}/patches.nix | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename microsoft/surface/common/kernel/{linux-6.1.3 => linux-6.1.6}/default.nix (100%) rename microsoft/surface/common/kernel/{linux-6.1.3 => linux-6.1.6}/patches.nix (100%) diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index dbaa678e..f8044d3c 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -7,7 +7,7 @@ in { imports = [ ./linux-5.19.17 ./linux-6.0.17 - ./linux-6.1.3 + ./linux-6.1.6 ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.1.3/default.nix b/microsoft/surface/common/kernel/linux-6.1.6/default.nix similarity index 100% rename from microsoft/surface/common/kernel/linux-6.1.3/default.nix rename to microsoft/surface/common/kernel/linux-6.1.6/default.nix diff --git a/microsoft/surface/common/kernel/linux-6.1.3/patches.nix b/microsoft/surface/common/kernel/linux-6.1.6/patches.nix similarity index 100% rename from microsoft/surface/common/kernel/linux-6.1.3/patches.nix rename to microsoft/surface/common/kernel/linux-6.1.6/patches.nix From 863953246fd2e8c21ed8799a26564cfc2ca4a7b7 Mon Sep 17 00:00:00 2001 From: mexisme Date: Thu, 19 Jan 2023 13:26:43 +1300 Subject: [PATCH 0377/1476] Update to kernel 6.1.6 --- microsoft/surface/common/kernel/linux-6.1.6/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-6.1.6/default.nix b/microsoft/surface/common/kernel/linux-6.1.6/default.nix index bd9c0ec6..86c17a98 100644 --- a/microsoft/surface/common/kernel/linux-6.1.6/default.nix +++ b/microsoft/surface/common/kernel/linux-6.1.6/default.nix @@ -8,7 +8,7 @@ let cfg = config.microsoft-surface; - version = "6.1.3"; + version = "6.1.6"; extraMeta.branch = "6.1"; patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; kernelPatches = pkgs.callPackage ./patches.nix { @@ -20,17 +20,17 @@ let inherit version extraMeta kernelPatches; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "sha256-bcia56dRPkM8WXxzRu1/9L/RFepDo7XiemvbOMVYAxc="; + sha256 = "sha256-Pk2OVh2lcDogWujXsr7WxcZPxCme68v9IEgeY7V9XuM="; }; }; in { options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ "6.1.3" ]; + type = types.enum [ "6.1.6" ]; }; - config = mkIf (cfg.kernelVersion == "6.1.3") { + config = mkIf (cfg.kernelVersion == "6.1.6") { boot = { inherit kernelPackages; }; From 2316f4cb8cacf78ec0faf827c0f7a5929ff1b316 Mon Sep 17 00:00:00 2001 From: mexisme Date: Thu, 19 Jan 2023 13:54:46 +1300 Subject: [PATCH 0378/1476] Configure MS Surface Go to use kernel 6.1.6 --- microsoft/surface/surface-go/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix index fdd13f6c..b57d73e3 100644 --- a/microsoft/surface/surface-go/default.nix +++ b/microsoft/surface/surface-go/default.nix @@ -17,6 +17,8 @@ in { ../../../common/cpu/intel/kaby-lake ]; + microsoft-surface.kernelVersion = "6.1.6"; + boot.kernelParams = [ "i915.enable_rc6=1" "i915.modeset=1" From 27b616b63ac917583879969d909b673918cc8979 Mon Sep 17 00:00:00 2001 From: mexisme Date: Thu, 19 Jan 2023 14:36:57 +1300 Subject: [PATCH 0379/1476] Update repo rev and SHA-256 for linux-surface --- microsoft/surface/common/repos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index eb9e5fa3..f10ad9a1 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "487e64047ca047dde9a062909a87410e7bb86845"; - sha256 = "sha256-HTIuRBZk0prhUPd2KnsXGo+ZyBsMwERN7P8WJH1RG3M="; + rev = "91240ac43dfdfb3e68bbc604def84685a218fab9"; + sha256 = "sha256-Jf7tthFWj67Esjx+/ZwG7BYlN7zWS26e1TbsznNxE9Q="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From 906737f5801d9809e60259f3e54d85728c7fc642 Mon Sep 17 00:00:00 2001 From: mexisme Date: Thu, 19 Jan 2023 17:00:17 +1300 Subject: [PATCH 0380/1476] Enable STREAMING_MEDIA kernel option --- microsoft/surface/common/kernel/linux-6.1.6/patches.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/microsoft/surface/common/kernel/linux-6.1.6/patches.nix b/microsoft/surface/common/kernel/linux-6.1.6/patches.nix index f0ba2c9c..7b3cfdca 100644 --- a/microsoft/surface/common/kernel/linux-6.1.6/patches.nix +++ b/microsoft/surface/common/kernel/linux-6.1.6/patches.nix @@ -8,6 +8,8 @@ name = "microsoft-surface-patches-linux-${version}"; patch = null; structuredExtraConfig = with kernel; { + STREAMING_MEDIA = yes; + # # Surface Aggregator Module # From 759a06ec4a4dbcb1f33ebab074477a6e49a9dba7 Mon Sep 17 00:00:00 2001 From: surfaceflinger Date: Fri, 20 Jan 2023 21:35:06 +0100 Subject: [PATCH 0381/1476] lenovo/thinkpad/t440p: force load thinkpad_acpi thinkpad_acpi doesn't load automatically on corebooted Lenovo ThinkPads T440p (but works fine if force_loaded). Doesn't affect users with stock firmware. --- lenovo/thinkpad/t440p/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/t440p/default.nix b/lenovo/thinkpad/t440p/default.nix index 53a93c21..8d93291f 100644 --- a/lenovo/thinkpad/t440p/default.nix +++ b/lenovo/thinkpad/t440p/default.nix @@ -9,6 +9,7 @@ boot = { extraModprobeConfig = lib.mkDefault '' options bbswitch use_acpi_to_detect_card_state=1 + options thinkpad_acpi force_load=1 fan_control=1 ''; # TODO: probably enable tcsd? Is this line necessary? kernelModules = [ "tpm-rng" ]; From f83f6d143789f576e6f2d9edcaa7ea21cd609733 Mon Sep 17 00:00:00 2001 From: ChaosAttractor Date: Tue, 24 Jan 2023 01:28:00 +0800 Subject: [PATCH 0382/1476] 16ach6h: Add tags for Dual-Direct GFX (DDG) specialisation --- lenovo/legion/16ach6h/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lenovo/legion/16ach6h/default.nix b/lenovo/legion/16ach6h/default.nix index e8932314..4041c09d 100644 --- a/lenovo/legion/16ach6h/default.nix +++ b/lenovo/legion/16ach6h/default.nix @@ -4,7 +4,8 @@ imports = [ ./hybrid ]; specialisation.ddg.configuration = { - # This specialisation is for the case where "DDG" (A hardware feature that can enable in bios) is enabled, since the amd igpu is blocked at hardware level and the built-in display is directly connected to the dgpu, we no longer need the amdgpu and prime configuration. + # This specialisation is for the case where "DDG" (Dual-Direct GFX, A hardware feature that can enable in bios) is enabled, since the amd igpu is blocked at hardware level and the built-in display is directly connected to the dgpu, we no longer need the amdgpu and prime configuration. + system.nixos.tags = [ "Dual-Direct-GFX-Mode" ]; services.xserver.videoDrivers = [ "nvidia" ]; # This will override services.xserver.videoDrivers = lib.mkDefault [ "amdgpu" "nvidia" ]; hardware.nvidia.prime.offload.enable = false; }; From d25ac8d999db568b7eb9f831434ac7797df421db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 24 Jan 2023 08:54:28 +0000 Subject: [PATCH 0383/1476] Update lenovo/thinkpad/t440p/default.nix --- lenovo/thinkpad/t440p/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/thinkpad/t440p/default.nix b/lenovo/thinkpad/t440p/default.nix index 8d93291f..144b7d06 100644 --- a/lenovo/thinkpad/t440p/default.nix +++ b/lenovo/thinkpad/t440p/default.nix @@ -7,7 +7,7 @@ ]; boot = { - extraModprobeConfig = lib.mkDefault '' + extraModprobeConfig = '' options bbswitch use_acpi_to_detect_card_state=1 options thinkpad_acpi force_load=1 fan_control=1 ''; From 68136fdd0a77626de0207c152f8c116ff8da6bb7 Mon Sep 17 00:00:00 2001 From: "Winston R. Milling" Date: Sun, 29 Jan 2023 14:48:35 -0600 Subject: [PATCH 0384/1476] Lenovo Y530-15ICH Initial Commit --- lenovo/legion/15ich/README.md | 18 ++++++++++++++++++ lenovo/legion/15ich/default.nix | 25 +++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 lenovo/legion/15ich/README.md create mode 100644 lenovo/legion/15ich/default.nix diff --git a/lenovo/legion/15ich/README.md b/lenovo/legion/15ich/README.md new file mode 100644 index 00000000..3ef2c7e6 --- /dev/null +++ b/lenovo/legion/15ich/README.md @@ -0,0 +1,18 @@ +## Setup at the time of testing +``` +$ nix-info -m + - system: `"x86_64-linux"` + - host os: `Linux 5.15.90, NixOS, 22.11 (Raccoon), 22.11.2058.ce20e9ebe19` + - multi-user?: `yes` + - sandbox: `yes` + - version: `nix-env (Nix) 2.11.1` + - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos` + ``` + ``` + $ lspci +... +00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630] +... +01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1) +... +``` diff --git a/lenovo/legion/15ich/default.nix b/lenovo/legion/15ich/default.nix new file mode 100644 index 00000000..9fa70b7b --- /dev/null +++ b/lenovo/legion/15ich/default.nix @@ -0,0 +1,25 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/nvidia/prime.nix + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ../../../common/pc/laptop/hdd + ]; + + hardware = { + nvidia = { + modesetting.enable = lib.mkDefault true; + powerManagement.enable = lib.mkDefault true; + + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + }; + + services.thermald.enable = lib.mkDefault true; +} From 5af4dc5d52a306272f4d4a97079aeef3888ae210 Mon Sep 17 00:00:00 2001 From: ChaosAttractor <46527539+LostAttractor@users.noreply.github.com> Date: Sat, 28 Jan 2023 23:46:56 +0800 Subject: [PATCH 0385/1476] Add the option of whether to install the opencl environment and whether to use amdvlk for amdgpu --- common/gpu/amd/default.nix | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix index 91ba0b77..e86bb010 100644 --- a/common/gpu/amd/default.nix +++ b/common/gpu/amd/default.nix @@ -6,11 +6,30 @@ ) // { default = true; }; + options.hardware.amdgpu.amdvlk = lib.mkEnableOption (lib.mdDoc + "use amdvlk drivers instead mesa radv drivers" + ) // { + default = true; + }; + options.hardware.amdgpu.opencl = lib.mkEnableOption (lib.mdDoc + "rocm opencl runtime (Install rocm-opencl-icd and rocm-opencl-runtime)" + ) // { + default = true; + }; config = lib.mkMerge [ { services.xserver.videoDrivers = lib.mkDefault [ "amdgpu" ]; - + + hardware.opengl = { + driSupport = lib.mkDefault true; + driSupport32Bit = lib.mkDefault true; + }; + } + (lib.mkIf config.hardware.amdgpu.loadInInitrd { + boot.initrd.kernelModules = [ "amdgpu" ]; + }) + (lib.mkIf config.hardware.amdgpu.amdvlk { hardware.opengl.extraPackages = with pkgs; [ rocm-opencl-icd rocm-opencl-runtime @@ -20,16 +39,14 @@ hardware.opengl.extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ]; - - hardware.opengl = { - driSupport = lib.mkDefault true; - driSupport32Bit = lib.mkDefault true; - }; - + environment.variables.AMD_VULKAN_ICD = lib.mkDefault "RADV"; - } - (lib.mkIf config.hardware.amdgpu.loadInInitrd { - boot.initrd.kernelModules = [ "amdgpu" ]; + }) + (lib.mkIf config.hardware.amdgpu.opencl { + hardware.opengl.extraPackages = with pkgs; [ + rocm-opencl-icd + rocm-opencl-runtime + ]; }) ]; } From be60a34c1a6c3aa3e878fb5030e44c6d0f316af9 Mon Sep 17 00:00:00 2001 From: ChaosAttractor <46527539+LostAttractor@users.noreply.github.com> Date: Sat, 28 Jan 2023 23:49:25 +0800 Subject: [PATCH 0386/1476] 16ach6h: disable amdvlk and rocm-opencl for nvidia-only mode --- lenovo/legion/16ach6h/default.nix | 8 +++++++- lenovo/legion/16ach6h/nvidia/default.nix | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lenovo/legion/16ach6h/default.nix b/lenovo/legion/16ach6h/default.nix index 4041c09d..523d9d03 100644 --- a/lenovo/legion/16ach6h/default.nix +++ b/lenovo/legion/16ach6h/default.nix @@ -7,6 +7,12 @@ # This specialisation is for the case where "DDG" (Dual-Direct GFX, A hardware feature that can enable in bios) is enabled, since the amd igpu is blocked at hardware level and the built-in display is directly connected to the dgpu, we no longer need the amdgpu and prime configuration. system.nixos.tags = [ "Dual-Direct-GFX-Mode" ]; services.xserver.videoDrivers = [ "nvidia" ]; # This will override services.xserver.videoDrivers = lib.mkDefault [ "amdgpu" "nvidia" ]; - hardware.nvidia.prime.offload.enable = false; + hardware = { + nvidia.prime.offload.enable = false; + amdgpu = { + amdvlk = false; + opencl = false; + }; + }; }; } \ No newline at end of file diff --git a/lenovo/legion/16ach6h/nvidia/default.nix b/lenovo/legion/16ach6h/nvidia/default.nix index e54fc207..85f7ee15 100644 --- a/lenovo/legion/16ach6h/nvidia/default.nix +++ b/lenovo/legion/16ach6h/nvidia/default.nix @@ -3,5 +3,11 @@ { imports = [ ../hybrid ]; services.xserver.videoDrivers = [ "nvidia" ]; # This will override services.xserver.videoDrivers = lib.mkDefault [ "amdgpu" "nvidia" ]; - hardware.nvidia.prime.offload.enable = false; + hardware = { + nvidia.prime.offload.enable = false; + amdgpu = { + amdvlk = false; + opencl = false; + }; + }; } \ No newline at end of file From 48e4621f98be9d58e9d5e4eef7be2cf80b0b5df7 Mon Sep 17 00:00:00 2001 From: "Winston R. Milling" Date: Tue, 7 Feb 2023 07:09:22 -0600 Subject: [PATCH 0387/1476] Add flake and readme links --- README.md | 1 + flake.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 503b6baf..e15c7a70 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,7 @@ See code for all available configurations. | [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | | [Lenovo Legion 5 Pro 16ach6h (Hybrid)](lenovo/legion/16ach6h/hybrid)| `` | | [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia)| `` | +| [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | | [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | diff --git a/flake.nix b/flake.nix index d0c6457f..6a74cdfa 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,7 @@ lenovo-legion-16ach6h-hybrid = import ./lenovo/legion/16ach6h/hybrid; lenovo-legion-16ach6h-nvidia = import ./lenovo/legion/16ach6h/nvidia; lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; + lenovo-legion-y530-15ich = import ./lenovo/legion/15ich; lenovo-thinkpad = import ./lenovo/thinkpad; lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel; From 56ad55261c313f3736193fb6a10d71713de161c8 Mon Sep 17 00:00:00 2001 From: ChaosAttractor <46527539+LostAttractor@users.noreply.github.com> Date: Wed, 8 Feb 2023 18:56:30 +0800 Subject: [PATCH 0388/1476] zephyrus ga401: add amdgpu driver --- asus/zephyrus/ga401/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/asus/zephyrus/ga401/default.nix b/asus/zephyrus/ga401/default.nix index 2130ca79..df1c2843 100644 --- a/asus/zephyrus/ga401/default.nix +++ b/asus/zephyrus/ga401/default.nix @@ -3,6 +3,7 @@ { imports = [ ../../../common/cpu/amd + ../../../common/gpu/amd ../../../common/gpu/nvidia/prime.nix ../../../common/pc/laptop ../../../common/pc/ssd From 0b49fc7783e7125c8ec48abd2bb6bb902421f5f6 Mon Sep 17 00:00:00 2001 From: ChaosAttractor <46527539+LostAttractor@users.noreply.github.com> Date: Wed, 8 Feb 2023 18:56:56 +0800 Subject: [PATCH 0389/1476] zephyrus ga401: add amd cpu pstate --- asus/zephyrus/ga401/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/asus/zephyrus/ga401/default.nix b/asus/zephyrus/ga401/default.nix index df1c2843..7c6f75d9 100644 --- a/asus/zephyrus/ga401/default.nix +++ b/asus/zephyrus/ga401/default.nix @@ -3,6 +3,7 @@ { imports = [ ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd ../../../common/gpu/nvidia/prime.nix ../../../common/pc/laptop From b5416e9171d95e7ed94abad325218f78a8fab5f8 Mon Sep 17 00:00:00 2001 From: ChaosAttractor <46527539+LostAttractor@users.noreply.github.com> Date: Wed, 8 Feb 2023 18:57:46 +0800 Subject: [PATCH 0390/1476] zephyrus ga401: change pc/ssd to pc/laptop/ssd --- asus/zephyrus/ga401/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asus/zephyrus/ga401/default.nix b/asus/zephyrus/ga401/default.nix index 7c6f75d9..32a8e700 100644 --- a/asus/zephyrus/ga401/default.nix +++ b/asus/zephyrus/ga401/default.nix @@ -7,7 +7,7 @@ ../../../common/gpu/amd ../../../common/gpu/nvidia/prime.nix ../../../common/pc/laptop - ../../../common/pc/ssd + ../../../common/pc/laptop/ssd ]; hardware.nvidia.prime = { From 8732ed0a3629705be34295982ffd4bfb6bd07750 Mon Sep 17 00:00:00 2001 From: ChaosAttractor <46527539+LostAttractor@users.noreply.github.com> Date: Wed, 8 Feb 2023 18:58:59 +0800 Subject: [PATCH 0391/1476] 16ach6h: add amd cpu pstate --- lenovo/legion/16ach6h/hybrid/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/legion/16ach6h/hybrid/default.nix b/lenovo/legion/16ach6h/hybrid/default.nix index 0deee0e6..62dffd4e 100644 --- a/lenovo/legion/16ach6h/hybrid/default.nix +++ b/lenovo/legion/16ach6h/hybrid/default.nix @@ -3,6 +3,7 @@ { imports = [ ../../../../common/cpu/amd + ../../../../common/cpu/amd/pstate.nix ../../../../common/gpu/amd ../../../../common/gpu/nvidia/prime.nix ../../../../common/pc/laptop From b45bd0353ae2857ca6d0990860c0bf5c4bdb6f53 Mon Sep 17 00:00:00 2001 From: ChaosAttractor Date: Thu, 9 Feb 2023 12:41:39 +0800 Subject: [PATCH 0392/1476] Change lib.mkDefault to lib.mkOverride 990 for hardware.nvidia.prime.offload.enable Fix conflict to https://github.com/NixOS/nixpkgs/commit/2a7130d13a032093f5394ef0961842d1e1928789 --- asus/rog-strix/g733qs/default.nix | 1 - common/gpu/nvidia/prime.nix | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/asus/rog-strix/g733qs/default.nix b/asus/rog-strix/g733qs/default.nix index b981aeff..1515285f 100644 --- a/asus/rog-strix/g733qs/default.nix +++ b/asus/rog-strix/g733qs/default.nix @@ -22,7 +22,6 @@ boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (lib.mkDefault pkgs.linuxPackages_latest); hardware.nvidia.prime = { - offload.enable = lib.mkDefault true; amdgpuBusId = "PCI:5:0:0"; nvidiaBusId = "PCI:1:0:1"; }; diff --git a/common/gpu/nvidia/prime.nix b/common/gpu/nvidia/prime.nix index 79cf9fd1..d2ba65b0 100644 --- a/common/gpu/nvidia/prime.nix +++ b/common/gpu/nvidia/prime.nix @@ -16,7 +16,7 @@ in { environment.systemPackages = [ nvidia-offload ]; hardware.nvidia.prime = { - offload.enable = lib.mkDefault true; + offload.enable = lib.mkOverride 990 true; # Hardware should specify the bus ID for intel/nvidia devices }; } From 445db26b8864bf34c236f936a9330272f232cd51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 9 Feb 2023 09:04:15 +0000 Subject: [PATCH 0393/1476] Update lenovo/legion/16ach6h/nvidia/default.nix --- lenovo/legion/16ach6h/nvidia/default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lenovo/legion/16ach6h/nvidia/default.nix b/lenovo/legion/16ach6h/nvidia/default.nix index 85f7ee15..31de5c12 100644 --- a/lenovo/legion/16ach6h/nvidia/default.nix +++ b/lenovo/legion/16ach6h/nvidia/default.nix @@ -3,6 +3,19 @@ { imports = [ ../hybrid ]; services.xserver.videoDrivers = [ "nvidia" ]; # This will override services.xserver.videoDrivers = lib.mkDefault [ "amdgpu" "nvidia" ]; + # When I play the game through proton, I found that in the case of Dual-Direct GFX + # enabled (dGPU disabled), proton will crash directly. But in the case of hybrid, + # the game runs fine with or without nvidia-offload After investigation, this is + # because when writing the specialization of Dual-Direct GFX, I did not completely + # remove all packages for amd igpu. I only removed amdgpu from + # services.xserver.videoDrivers by overriding. This is because the specialization + # of nix cannot implement such an operation as canceling an import. In the end, if + # it is enabled in Dual-Direct GFX In the absence of amd igpu, the amdvlk package + # caused the proton to crash. In order to solve this problem, I add the option of + # whether to enable amdvlk to the configuration file of amd gpu, and open it by + # default, and turn it off in specialization, so as to delete amdvlk package and + # other packages for amd igpu in specialization. At the same time, I also added an + # option to amdgpu's opencl runtime. hardware = { nvidia.prime.offload.enable = false; amdgpu = { From 51ec9ab517ed69dfefd330ffd3973b485e24e3b0 Mon Sep 17 00:00:00 2001 From: Pavel Atanasov Date: Thu, 9 Feb 2023 20:17:37 +0200 Subject: [PATCH 0394/1476] lenovo/thinkpad/t520: create Borrow `t420`'s config since the machines only mainly differ in screen size --- lenovo/thinkpad/t520/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 lenovo/thinkpad/t520/default.nix diff --git a/lenovo/thinkpad/t520/default.nix b/lenovo/thinkpad/t520/default.nix new file mode 100644 index 00000000..a3c7db40 --- /dev/null +++ b/lenovo/thinkpad/t520/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ../. + ../tp-smapi.nix + ../../../common/cpu/intel/sandy-bridge + ../../../common/pc/laptop/acpi_call.nix + ]; +} From 5c55f2428f571fe06e382c800454176b4f8b67f5 Mon Sep 17 00:00:00 2001 From: ChaosAttractor Date: Fri, 10 Feb 2023 01:06:28 +0800 Subject: [PATCH 0395/1476] zephyrus ga401: Enable asusd services --- asus/zephyrus/ga401/default.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/asus/zephyrus/ga401/default.nix b/asus/zephyrus/ga401/default.nix index 32a8e700..49ab039e 100644 --- a/asus/zephyrus/ga401/default.nix +++ b/asus/zephyrus/ga401/default.nix @@ -1,4 +1,4 @@ -{ ... }: +{ lib, ... }: { imports = [ @@ -15,9 +15,13 @@ nvidiaBusId = "PCI:1:0:0"; }; - # fixes mic mute button - services.udev.extraHwdb = '' - evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* - KEYBOARD_KEY_ff31007c=f20 - ''; + services = { + asusd.enable = lib.mkDefault true; + + # fixes mic mute button + udev.extraHwdb = '' + evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* + KEYBOARD_KEY_ff31007c=f20 + ''; + }; } From 0d8c852503581906dada5e8a22ca5d9248f87427 Mon Sep 17 00:00:00 2001 From: ChaosAttractor Date: Fri, 10 Feb 2023 14:54:19 +0800 Subject: [PATCH 0396/1476] zephyrus ga401: Enable nvidia powerManagement & modesetting (nvidia-drm) --- asus/zephyrus/ga401/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/asus/zephyrus/ga401/default.nix b/asus/zephyrus/ga401/default.nix index 49ab039e..4899dd79 100644 --- a/asus/zephyrus/ga401/default.nix +++ b/asus/zephyrus/ga401/default.nix @@ -10,9 +10,17 @@ ../../../common/pc/laptop/ssd ]; - hardware.nvidia.prime = { - amdgpuBusId = "PCI:4:0:0"; - nvidiaBusId = "PCI:1:0:0"; + hardware.nvidia = { + # PCI-Express Runtime D3 Power Management is enabled by default on this laptop + # But it can fix screen tearing & suspend/resume screen corruption in sync mode + modesetting.enable = lib.mkDefault true; + # Enable DRM kernel mode setting + powerManagement.enable = lib.mkDefault true; + + prime = { + amdgpuBusId = "PCI:4:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; }; services = { From 85fb2c41b60b53742e124cbaae52f95da51f18ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Feb 2023 03:14:50 +0000 Subject: [PATCH 0397/1476] Bump cachix/install-nix-action from 18 to 19 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 18 to 19. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v18...v19) --- 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 5953fef4..87a24fd3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v18 + - uses: cachix/install-nix-action@v19 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version From 1156f4d66eadbe2de96be3b3fabb6c39b94ebf5e Mon Sep 17 00:00:00 2001 From: Martino Fontana Date: Fri, 17 Feb 2023 15:27:13 +0100 Subject: [PATCH 0398/1476] AMD: disable amdvlk install by default Nobody recommends using amdvlk over RADV. Also don't set environment variable that sets the use of RADV when installing amdvlk --- common/gpu/amd/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix index e86bb010..f213ba9f 100644 --- a/common/gpu/amd/default.nix +++ b/common/gpu/amd/default.nix @@ -8,9 +8,7 @@ }; options.hardware.amdgpu.amdvlk = lib.mkEnableOption (lib.mdDoc "use amdvlk drivers instead mesa radv drivers" - ) // { - default = true; - }; + ); options.hardware.amdgpu.opencl = lib.mkEnableOption (lib.mdDoc "rocm opencl runtime (Install rocm-opencl-icd and rocm-opencl-runtime)" ) // { @@ -39,8 +37,6 @@ hardware.opengl.extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ]; - - environment.variables.AMD_VULKAN_ICD = lib.mkDefault "RADV"; }) (lib.mkIf config.hardware.amdgpu.opencl { hardware.opengl.extraPackages = with pkgs; [ From b4bf2550b36654399b26fcf436744f198658d203 Mon Sep 17 00:00:00 2001 From: Martino Fontana Date: Fri, 17 Feb 2023 15:28:07 +0100 Subject: [PATCH 0399/1476] AMD: don't install OpenCL by enabling amdvlk --- common/gpu/amd/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix index f213ba9f..c3b38c27 100644 --- a/common/gpu/amd/default.nix +++ b/common/gpu/amd/default.nix @@ -29,8 +29,6 @@ }) (lib.mkIf config.hardware.amdgpu.amdvlk { hardware.opengl.extraPackages = with pkgs; [ - rocm-opencl-icd - rocm-opencl-runtime amdvlk ]; From 7c7a8f70827d55361b7def502f38b8757e09065f Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Sat, 18 Feb 2023 15:55:05 +0000 Subject: [PATCH 0400/1476] raspberry-pi/4: don't use an alias for the kernel pkg --- raspberry-pi/4/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index f93a236e..6c5b1ba1 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -15,7 +15,7 @@ ]; boot = { - kernelPackages = lib.mkDefault pkgs.linuxPackages_rpi4; + kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi4; initrd.availableKernelModules = [ "usbhid" "usb_storage" From 576be211f095c3305110a83c579f006ee42799cc Mon Sep 17 00:00:00 2001 From: piousdeer <31318219+piousdeer@users.noreply.github.com> Date: Sun, 19 Feb 2023 23:45:40 +0700 Subject: [PATCH 0401/1476] lenovo/legion/16ach6h: disable thermald It's for Intel laptops. 16ach6h is not one of them. --- lenovo/legion/16ach6h/hybrid/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/lenovo/legion/16ach6h/hybrid/default.nix b/lenovo/legion/16ach6h/hybrid/default.nix index 0deee0e6..76841dbe 100644 --- a/lenovo/legion/16ach6h/hybrid/default.nix +++ b/lenovo/legion/16ach6h/hybrid/default.nix @@ -23,6 +23,4 @@ }; }; }; - - services.thermald.enable = lib.mkDefault true; } \ No newline at end of file From 1c319687c124f180f10c306719555d183d75246a Mon Sep 17 00:00:00 2001 From: necrophcodr Date: Sun, 12 Feb 2023 00:37:34 +0100 Subject: [PATCH 0402/1476] gpd/win-2: init --- README.md | 1 + flake.nix | 1 + gpd/win-2/default.nix | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 gpd/win-2/default.nix diff --git a/README.md b/README.md index e15c7a70..0ab62a8c 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,7 @@ See code for all available configurations. | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [GPD MicroPC](gpd/micropc) | `` | | [GPD Pocket 3](gpd/pocket-3) | `` | +| [GPD WIN 2](gpd/win-2) | `` | | [Google Pixelbook](google/pixelbook) | `` | | [HP Elitebook 2560p](hp/elitebook/2560p) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | diff --git a/flake.nix b/flake.nix index 6a74cdfa..2fd70fff 100644 --- a/flake.nix +++ b/flake.nix @@ -57,6 +57,7 @@ google-pixelbook = import ./google/pixelbook; gpd-micropc = import ./gpd/micropc; gpd-pocket-3 = import ./gpd/pocket-3; + gpd-win-2 = import ./gpd/win-2; hp-elitebook-2560p = import ./hp/elitebook/2560p; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; diff --git a/gpd/win-2/default.nix b/gpd/win-2/default.nix new file mode 100644 index 00000000..522b62f3 --- /dev/null +++ b/gpd/win-2/default.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ...}: +{ + imports = [ + ../../common/cpu/intel + ../../common/pc/ssd + ]; + + boot.kernelParams = [ + "fbcon=rotate:1" + "video=eDP-1:panel_orientation=right_side_up" + ]; + + services.tlp.enable = lib.mkDefault ((lib.versionOlder (lib.versions.majorMinor lib.version) "21.05") + || !config.services.power-profiles-daemon.enable); + + # Required for grub to properly display the boot menu. + boot.loader.grub.gfxmodeEfi = lib.mkDefault "720x1280x32"; + +} From 75b6ec4775ddfe657f19d02bee7f063bd7229620 Mon Sep 17 00:00:00 2001 From: Ivan Nikolaenko Date: Wed, 18 Jan 2023 14:49:38 +0200 Subject: [PATCH 0403/1476] Add NXP i.MX8 SOC family support. Currently there are two devices supported: * imx8qm-mek * imx8qxp-mek Signed-off-by: Ivan Nikolaenko --- flake.nix | 1 + nxp/README.md | 18 ++++ nxp/common/bsp/imx-atf.nix | 22 +++++ nxp/common/bsp/imx-firmware.nix | 68 +++++++++++++++ nxp/common/bsp/imx-mkimage.nix | 31 +++++++ nxp/common/bsp/imx-optee-os.nix | 79 ++++++++++++++++++ nxp/common/bsp/imx-uboot.nix | 63 ++++++++++++++ nxp/common/bsp/linux-imx8.nix | 49 +++++++++++ nxp/common/modules.nix | 18 ++++ nxp/common/overlay.nix | 3 + .../0001-Add-UEFI-boot-for-imx8qm.patch | 83 +++++++++++++++++++ .../0001-Add-UEFI-boot-for-imx8qxp.patch | 83 +++++++++++++++++++ nxp/imx8qm-mek/default.nix | 20 +++++ nxp/imx8qm-mek/overlay.nix | 3 + nxp/imx8qxp-mek/overlay.nix | 3 + 15 files changed, 544 insertions(+) create mode 100644 nxp/README.md create mode 100644 nxp/common/bsp/imx-atf.nix create mode 100644 nxp/common/bsp/imx-firmware.nix create mode 100644 nxp/common/bsp/imx-mkimage.nix create mode 100644 nxp/common/bsp/imx-optee-os.nix create mode 100644 nxp/common/bsp/imx-uboot.nix create mode 100644 nxp/common/bsp/linux-imx8.nix create mode 100644 nxp/common/modules.nix create mode 100644 nxp/common/overlay.nix create mode 100644 nxp/common/patches/0001-Add-UEFI-boot-for-imx8qm.patch create mode 100644 nxp/common/patches/0001-Add-UEFI-boot-for-imx8qxp.patch create mode 100644 nxp/imx8qm-mek/default.nix create mode 100644 nxp/imx8qm-mek/overlay.nix create mode 100644 nxp/imx8qxp-mek/overlay.nix diff --git a/flake.nix b/flake.nix index 2fd70fff..90bd4335 100644 --- a/flake.nix +++ b/flake.nix @@ -139,6 +139,7 @@ microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; msi-gs60 = import ./msi/gs60; msi-gl62 = import ./msi/gl62; + nxp-imx8qm-mek = import ./nxp/imx8qm-mek; omen-en00015p = import ./omen/en00015p; onenetbook-4 = import ./onenetbook/4; pcengines-apu = import ./pcengines/apu; diff --git a/nxp/README.md b/nxp/README.md new file mode 100644 index 00000000..e3bcd537 --- /dev/null +++ b/nxp/README.md @@ -0,0 +1,18 @@ +# NXP i.MX8 SOC family support + +## 1. Supported devices + - [i.MX8QuadMax Multisensory Enablement Kit](https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-8quadmax-multisensory-enablement-kit-mek:MCIMX8QM-CPU) (**imx8qm-mek**) - device-specific U-boot and Linux kernel, nixos configuration example. + - [i.MX8QuadXPlus Multisensory Enablement Kit](https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-8quadxplus-multisensory-enablement-kit-mek:MCIMX8QXP-CPU) (**imx8qxp-mek**) - device-specific U-Boot and Linux kernel. + +## 2. How to use +Currently this NXP overlay is used for generating EFI-bootable NixOS images. [Tow-Boot](https://tow-boot.org/) is used as a bootloader in our case, but U-Boot can also be used. + +Code snippet example that enables imx8qm configuration: +``` +{ nixos-hardware, }: { + system = "aarch64-linux"; + modules = [ + nixos-hardware.nixosModules.imx8qm-mek + ]; +} +``` diff --git a/nxp/common/bsp/imx-atf.nix b/nxp/common/bsp/imx-atf.nix new file mode 100644 index 00000000..ec2c751d --- /dev/null +++ b/nxp/common/bsp/imx-atf.nix @@ -0,0 +1,22 @@ +{ + buildArmTrustedFirmware , + targetBoard , + fetchgit , +}: + +{ + armTrustedFirmwareiMX8 = buildArmTrustedFirmware rec { + src = fetchgit { + url = "https://source.codeaurora.org/external/imx/imx-atf"; + # tag: "lf_v2.6" + rev = "c6a19b1a351308cc73443283f6aa56b2eff791b8"; + sha256 = "sha256-C046MrZBDFuzBdnjuPC2fAGtXzZjTWRrO8nYTf1rjeg="; + }; + platform = targetBoard; + enableParallelBuilding = true; + # To build with tee.bin use extraMakeFlags = [ "bl31 SPD=opteed" ]; + extraMakeFlags = [ "PIE_LDFLAGS=--no-warn-rwx-segments LDFLAGS=--no-warn-rwx-segments" "bl31" ]; + extraMeta.platforms = ["aarch64-linux"]; + filesToInstall = ["build/${targetBoard}/release/bl31.bin"]; + }; +} diff --git a/nxp/common/bsp/imx-firmware.nix b/nxp/common/bsp/imx-firmware.nix new file mode 100644 index 00000000..207d7ea2 --- /dev/null +++ b/nxp/common/bsp/imx-firmware.nix @@ -0,0 +1,68 @@ +{ + pkgs , + targetBoard, +}: + +let + + imxurl = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO"; + + fwHdmiVersion = "8.16"; + fwScVersion = "1.13.0"; + fwSecoVersion = "3.8.6"; + + firmwareHdmi = pkgs.fetchurl rec { + url = "${imxurl}/firmware-imx-${fwHdmiVersion}.bin"; + sha256 = "Bun+uxE5z7zvxnlRwI0vjowKFqY4CgKyiGjbZuilER0="; + executable = true; + }; + + firmwareSc = pkgs.fetchurl rec { + url = "${imxurl}/imx-sc-firmware-${fwScVersion}.bin"; + sha256 = "YUaBIVCeOOTvifhiEIbKgyGsLZYufv5rs2isdSrw4dc="; + executable = true; + }; + + firmwareSeco = pkgs.fetchurl rec { + url = "${imxurl}/imx-seco-${fwSecoVersion}.bin"; + sha256 = "eoG19xn283fsP2jP49hD4dIBRwEQqFQ9k3yVWOM8uKQ="; + executable = true; + }; + +in +pkgs.stdenv.mkDerivation rec { + + pname = "imx-firmware"; + version = "5.15.X_1.0.0-Yocto"; + + dontPatch = true; + dontConfigure = true; + dontBuild = true; + + sourceRoot = "."; + + unpackPhase = '' + ${firmwareHdmi} --auto-accept --force + ${firmwareSc} --auto-accept --force + ${firmwareSeco} --auto-accept --force + ''; + + filesToInstall = [ + "firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/dpfw.bin" + "firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/hdmi?xfw.bin" + ] ++ pkgs.lib.optional ( targetBoard == "imx8qm" ) + ("imx-sc-firmware-${fwScVersion}/mx8qm-mek-scfw-tcm.bin" + " " + + "imx-seco-${fwSecoVersion}/firmware/seco/mx8qmb0-ahab-container.img") + ++ pkgs.lib.optional ( targetBoard == "imx8qxp" ) + ("imx-sc-firmware-${fwScVersion}/mx8qx-mek-scfw-tcm.bin" + " " + + "imx-seco-${fwSecoVersion}/firmware/seco/mx8qxc0-ahab-container.img"); + + installPhase = '' + mkdir -p $out + cp ${pkgs.lib.concatStringsSep " " filesToInstall} $out + ''; + + meta = with pkgs.lib; { + license = licenses.unfree; + }; +} diff --git a/nxp/common/bsp/imx-mkimage.nix b/nxp/common/bsp/imx-mkimage.nix new file mode 100644 index 00000000..94877cec --- /dev/null +++ b/nxp/common/bsp/imx-mkimage.nix @@ -0,0 +1,31 @@ +{ pkgs }: + +with pkgs; +pkgs.stdenv.mkDerivation rec { + pname = "imx-mkimage"; + version = "lf-5.15.32-2.0.0"; + + src = fetchgit { + url = "https://source.codeaurora.org/external/imx/imx-mkimage.git"; + rev = version; + sha256 = "sha256-31pib5DTDPVfiAAoOSzK8HWUlnuiNnfXQIsxbjneMCc="; + leaveDotGit = true; + }; + + nativeBuildInputs = [ + git + ]; + + buildInputs = [ + git + glibc.static + ]; + + makeFlags = [ + "bin" + ]; + + installPhase = '' + install -m 0755 mkimage_imx8 $out + ''; +} diff --git a/nxp/common/bsp/imx-optee-os.nix b/nxp/common/bsp/imx-optee-os.nix new file mode 100644 index 00000000..2ec0e3bd --- /dev/null +++ b/nxp/common/bsp/imx-optee-os.nix @@ -0,0 +1,79 @@ +{ + pkgs, +}: + +let + + pkgsCross = import { + crossSystem = { + config = "aarch64-unknown-linux-gnu"; + }; + }; + + outdir = "out/arm-plat-imx/core"; + python3 = pkgs.buildPackages.python3; + toolchain = pkgsCross.gcc9Stdenv.cc; + binutils = pkgsCross.gcc9Stdenv.cc.bintools.bintools_bin; + cpp = pkgs.buildPackages.gcc; + +in +pkgs.stdenv.mkDerivation rec { + + pname = "imx-optee-os"; + version = "5.15.32_2.0.0"; + + buildInputs = [ + python3 + ]; + + enableParallelBuilding = true; + + propagatedBuildInputs = with python3.pkgs; [ + pycryptodomex + pyelftools + cryptography + ]; + + src = fetchGit { + url = "https://source.codeaurora.org/external/imx/imx-optee-os.git"; + ref = "lf-5.15.32_2.0.0"; + }; + + postPatch = '' + substituteInPlace scripts/arm32_sysreg.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace scripts/gen_tee_bin.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace scripts/pem_to_pub_c.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ + --replace '/bin/bash' '${pkgs.bash}/bin/bash' + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp + ''; + + makeFlags = [ + "PLATFORM=imx" + "PLATFORM_FLAVOR=mx8qmmek" + "CFG_ARM64_core=y" + "CFG_TEE_TA_LOG_LEVEL=0" + "CFG_TEE_CORE_LOG_LEVEL=0" + "CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}" + "CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}" + ]; + + installPhase = '' + mkdir -p $out + cp ${outdir}/tee-raw.bin $out/tee.bin + ''; +} diff --git a/nxp/common/bsp/imx-uboot.nix b/nxp/common/bsp/imx-uboot.nix new file mode 100644 index 00000000..1b868faf --- /dev/null +++ b/nxp/common/bsp/imx-uboot.nix @@ -0,0 +1,63 @@ +{ pkgs , + targetBoard, +}: + +with pkgs; let + inherit buildUBoot; + + imx8qxp-attrs = { + atf = "imx8qx"; + ahab = "mx8qxc0-ahab-container.img"; + scfw = "mx8qx-mek-scfw-tcm.bin"; + soc = "QX"; + patches = [ ../patches/0001-Add-UEFI-boot-for-imx8qxp.patch ]; + }; + + imx8qm-attrs = { + atf = "imx8qm"; + ahab = "mx8qmb0-ahab-container.img"; + scfw = "mx8qm-mek-scfw-tcm.bin"; + soc = "QM"; + patches = [ ../patches/0001-Add-UEFI-boot-on-imx8qm_mek.patch ]; + }; + + imx8-attrs = if (targetBoard == "imx8qxp") then imx8qxp-attrs + else if (targetBoard == "imx8qm") then imx8qm-attrs + else {}; + + inherit (callPackage ./imx-atf.nix { inherit buildArmTrustedFirmware; targetBoard = imx8-attrs.atf; }) armTrustedFirmwareiMX8; + imx-firmware = callPackage ./imx-firmware.nix { inherit pkgs targetBoard; }; + imx-mkimage = buildPackages.callPackage ./imx-mkimage.nix { inherit pkgs; }; +in { + ubootImx8 = buildUBoot { + version = "2022.04"; + src = fetchgit { + url = "https://source.codeaurora.org/external/imx/uboot-imx.git"; + # tag: "lf_v2022.04" + rev = "1c881f4da83cc05bee50f352fa183263d7e2622b"; + sha256 = "sha256-0TS6VH6wq6PwZUq6ekbuLaisZ9LrE0/haU9nseGdiE0="; + }; + BL31 = "${armTrustedFirmwareiMX8}/bl31.bin"; + patches = imx8-attrs.patches; + enableParallelBuilding = true; + defconfig = "${targetBoard}_mek_defconfig"; + extraMeta.platforms = ["aarch64-linux"]; + preBuildPhases = [ "copyBinaries" ]; + + copyBinaries = '' + install -m 0644 ${imx-firmware}/${imx8-attrs.ahab} ./ahab-container.img + install -m 0644 ${imx-firmware}/${imx8-attrs.scfw} ./${imx8-attrs.scfw} + install -m 0644 $BL31 ./u-boot-atf.bin + ''; + postBuild = '' + ${imx-mkimage} -commit > head.hash + cat u-boot.bin head.hash > u-boot-hash.bin + dd if=u-boot-hash.bin of=u-boot-atf.bin bs=1K seek=128 + ${imx-mkimage} -soc ${imx8-attrs.soc} -rev B0 -append ahab-container.img -c -scfw ${imx8-attrs.scfw} -ap u-boot-atf.bin a35 0x80000000 -out flash.bin + ''; + filesToInstall = [ "flash.bin" ]; + }; + + inherit imx-firmware; +} + diff --git a/nxp/common/bsp/linux-imx8.nix b/nxp/common/bsp/linux-imx8.nix new file mode 100644 index 00000000..926a0475 --- /dev/null +++ b/nxp/common/bsp/linux-imx8.nix @@ -0,0 +1,49 @@ +{ pkgs, ... } @ args: + +with pkgs; + +buildLinux (args // rec { + version = "5.15.71"; + + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = version; + + defconfig = "imx_v8_defconfig"; + + kernelPatches = [ + ]; + + autoModules = false; + + extraConfig = '' + CRYPTO_TLS m + TLS 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 + ''; + + src = fetchFromGitHub { + owner = "nxp-imx"; + repo = "linux-imx"; + # tag: refs/tags/lf-5.15.71-2.2.0 + rev = "3313732e9984cb8a6b10a9085c7e18d58e770d56"; + sha256 = "sha256-PBRiSgjPOq4keiwPOfNOswf1Zzdbn6YOjpOgv4/Oscc="; + }; +} // (args.argsOverride or { })) diff --git a/nxp/common/modules.nix b/nxp/common/modules.nix new file mode 100644 index 00000000..4bc9df4c --- /dev/null +++ b/nxp/common/modules.nix @@ -0,0 +1,18 @@ +{ pkgs, lib, ... }: { + nixpkgs.overlays = [ + (import ./overlay.nix) + ]; + + nixpkgs.hostPlatform = "aarch64-linux"; + + boot = { + kernelPackages = pkgs.linuxPackagesFor pkgs.linux_imx8; + kernelParams = [ "console=ttyLP0,115200n8" ]; + loader.grub.enable = lib.mkDefault true; + initrd.includeDefaultModules = lib.mkForce false; + }; + + disabledModules = [ "profiles/all-hardware.nix" ]; + + hardware.deviceTree.enable = true; +} diff --git a/nxp/common/overlay.nix b/nxp/common/overlay.nix new file mode 100644 index 00000000..61c0853b --- /dev/null +++ b/nxp/common/overlay.nix @@ -0,0 +1,3 @@ +final: prev: { + linux_imx8 = final.callPackage ./bsp/linux-imx8.nix { pkgs = final; }; +} diff --git a/nxp/common/patches/0001-Add-UEFI-boot-for-imx8qm.patch b/nxp/common/patches/0001-Add-UEFI-boot-for-imx8qm.patch new file mode 100644 index 00000000..bf94ba9f --- /dev/null +++ b/nxp/common/patches/0001-Add-UEFI-boot-for-imx8qm.patch @@ -0,0 +1,83 @@ +From c2535837ee018bb6336f7043394072aaadcace34 Mon Sep 17 00:00:00 2001 +From: Panu Finnila +Date: Mon, 12 Sep 2022 16:33:16 +0300 +Subject: [PATCH] Add UEFI boot for imx8qm + +Signed-off-by: Panu Finnila +--- + configs/imx8qm_mek_defconfig | 9 ++++++++- + include/configs/imx8qm_mek.h | 20 +++++++++++++++++++- + 2 files changed, 27 insertions(+), 2 deletions(-) + +diff --git a/configs/imx8qm_mek_defconfig b/configs/imx8qm_mek_defconfig +index 29e9d796a6..1ed6eeee57 100644 +--- a/configs/imx8qm_mek_defconfig ++++ b/configs/imx8qm_mek_defconfig +@@ -31,7 +31,7 @@ CONFIG_PANIC_HANG=y + CONFIG_OF_SYSTEM_SETUP=y + CONFIG_BOOTDELAY=3 + CONFIG_USE_BOOTCOMMAND=y +-CONFIG_BOOTCOMMAND="mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if test ${sec_boot} = yes; then if run loadcntr; then run mmcboot; else run netboot; fi; else if run loadimage; then run mmcboot; else run netboot; fi; fi; fi; else booti ${loadaddr} - ${fdt_addr}; fi" ++CONFIG_BOOTCOMMAND="run loadhdp; hdp load ${hdp_addr}; run distro_bootcmd;" + CONFIG_LOG=y + CONFIG_BOARD_EARLY_INIT_F=y + CONFIG_SPL_BOARD_INIT=y +@@ -196,3 +196,10 @@ CONFIG_SYS_WHITE_ON_BLACK=y + CONFIG_SPLASH_SCREEN=y + CONFIG_SPLASH_SCREEN_ALIGN=y + CONFIG_CMD_BMP=y ++CONFIG_DISTRO_DEFAULTS=y ++CONFIG_CMD_BOOTEFI_SELFTEST=y ++CONFIG_CMD_BOOTEFI=y ++CONFIG_EFI_LOADER=y ++CONFIG_BLK=y ++CONFIG_PARTITIONS=y ++CONFIG_DM_DEVICE_REMOVE=n +diff --git a/include/configs/imx8qm_mek.h b/include/configs/imx8qm_mek.h +index ed5c179fc7..ab5b58ec32 100644 +--- a/include/configs/imx8qm_mek.h ++++ b/include/configs/imx8qm_mek.h +@@ -138,6 +138,22 @@ + "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \ + "m4boot_1=run loadm4image_1; dcache flush; bootaux ${loadaddr} 1\0" \ + ++#ifdef CONFIG_DISTRO_DEFAULTS ++#define BOOT_TARGET_DEVICES(func) \ ++ func(MMC, mmc, 1) \ ++ func(MMC, mmc, 0) ++ ++#include ++#else ++#define BOOTENV ++#endif ++ ++#define MEM_LAYOUT_ENV_SETTINGS \ ++ "fdt_addr_r=0x83000000\0" \ ++ "kernel_addr_r=0x80200000\0" \ ++ "ramdisk_addr_r=0x83100000\0" \ ++ "scriptaddr=0x83200000\0" \ ++ + #ifdef CONFIG_NAND_BOOT + #define MFG_NAND_PARTITION "mtdparts=gpmi-nand:128m(boot),32m(kernel),16m(dtb),8m(misc),-(rootfs) " + #else +@@ -166,6 +182,8 @@ + /* Initial environment variables */ + #define CONFIG_EXTRA_ENV_SETTINGS \ + CONFIG_MFG_ENV_SETTINGS \ ++ MEM_LAYOUT_ENV_SETTINGS \ ++ BOOTENV \ + M4_BOOT_ENV \ + XEN_BOOT_ENV \ + JAILHOUSE_ENV\ +@@ -179,7 +197,7 @@ + "cntr_addr=0x98000000\0" \ + "cntr_file=os_cntr_signed.bin\0" \ + "boot_fdt=try\0" \ +- FDT_FILE \ ++ "fdtfile=imx8qm-mek-hdmi.dtb\0" \ + "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ + "mmcpart=1\0" \ + "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ +-- +2.25.1 + diff --git a/nxp/common/patches/0001-Add-UEFI-boot-for-imx8qxp.patch b/nxp/common/patches/0001-Add-UEFI-boot-for-imx8qxp.patch new file mode 100644 index 00000000..9b7ef479 --- /dev/null +++ b/nxp/common/patches/0001-Add-UEFI-boot-for-imx8qxp.patch @@ -0,0 +1,83 @@ +From 884b162cabdc198121be36bb7ee40922f8689d77 Mon Sep 17 00:00:00 2001 +From: Grigoriy Romanov +Date: Tue, 20 Dec 2022 13:32:03 +0200 +Subject: [PATCH] Add UEFI boot for imx8qxp + +Signed-off-by: Grigoriy Romanov +--- + configs/imx8qxp_mek_defconfig | 9 ++++++++- + include/configs/imx8qxp_mek.h | 20 +++++++++++++++++++- + 2 files changed, 27 insertions(+), 2 deletions(-) + +diff --git a/configs/imx8qxp_mek_defconfig b/configs/imx8qxp_mek_defconfig +index eda9d2cc00..e498ca1d5b 100644 +--- a/configs/imx8qxp_mek_defconfig ++++ b/configs/imx8qxp_mek_defconfig +@@ -32,7 +32,7 @@ CONFIG_OF_BOARD_SETUP=y + CONFIG_OF_SYSTEM_SETUP=y + CONFIG_BOOTDELAY=3 + CONFIG_USE_BOOTCOMMAND=y +-CONFIG_BOOTCOMMAND="mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if test ${sec_boot} = yes; then if run loadcntr; then run mmcboot; else run netboot; fi; else if run loadimage; then run mmcboot; else run netboot; fi; fi; fi; else booti ${loadaddr} - ${fdt_addr}; fi" ++CONFIG_BOOTCOMMAND="run distro_bootcmd;" + CONFIG_LOG=y + CONFIG_BOARD_EARLY_INIT_F=y + CONFIG_SPL_BOARD_INIT=y +@@ -194,3 +194,10 @@ CONFIG_SYS_WHITE_ON_BLACK=y + CONFIG_SPLASH_SCREEN=y + CONFIG_SPLASH_SCREEN_ALIGN=y + CONFIG_CMD_BMP=y ++CONFIG_DISTRO_DEFAULTS=y ++CONFIG_CMD_BOOTEFI_SELFTEST=y ++CONFIG_CMD_BOOTEFI=y ++CONFIG_EFI_LOADER=y ++CONFIG_BLK=y ++CONFIG_PARTITIONS=y ++CONFIG_DM_DEVICE_REMOVE=n +diff --git a/include/configs/imx8qxp_mek.h b/include/configs/imx8qxp_mek.h +index 2886a3b99b..7cc89336b7 100644 +--- a/include/configs/imx8qxp_mek.h ++++ b/include/configs/imx8qxp_mek.h +@@ -52,6 +52,22 @@ + #define AHAB_ENV "sec_boot=no\0" + #endif + ++#ifdef CONFIG_DISTRO_DEFAULTS ++#define BOOT_TARGET_DEVICES(func) \ ++ func(MMC, mmc, 1) \ ++ func(MMC, mmc, 0) ++ ++#include ++#else ++#define BOOTENV ++#endif ++ ++#define MEM_LAYOUT_ENV_SETTINGS \ ++ "fdt_addr_r=0x83000000\0" \ ++ "kernel_addr_r=0x80200000\0" \ ++ "ramdisk_addr_r=0x83100000\0" \ ++ "scriptaddr=0x83200000\0" \ ++ + /* Boot M4 */ + #define M4_BOOT_ENV \ + "m4_0_image=m4_0.bin\0" \ +@@ -108,6 +124,8 @@ + /* Initial environment variables */ + #define CONFIG_EXTRA_ENV_SETTINGS \ + CONFIG_MFG_ENV_SETTINGS \ ++ MEM_LAYOUT_ENV_SETTINGS \ ++ BOOTENV \ + M4_BOOT_ENV \ + XEN_BOOT_ENV \ + JAILHOUSE_ENV\ +@@ -121,7 +139,7 @@ + "cntr_addr=0x98000000\0" \ + "cntr_file=os_cntr_signed.bin\0" \ + "boot_fdt=try\0" \ +- "fdt_file=undefined\0" \ ++ "fdtfile=imx8qxp-mek.dtb\0" \ + "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ + "mmcpart=1\0" \ + "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ +-- +2.34.1 + diff --git a/nxp/imx8qm-mek/default.nix b/nxp/imx8qm-mek/default.nix new file mode 100644 index 00000000..300b9344 --- /dev/null +++ b/nxp/imx8qm-mek/default.nix @@ -0,0 +1,20 @@ +{ pkgs, lib, ... }: + +{ + nixpkgs.overlays = [ + (import ./overlay.nix) + ]; + + imports = [ + ../common/modules.nix + ]; + + boot.loader.grub.extraFiles = { + "imx8qm-mek.dtb" = "${pkgs.linux_imx8}/dtbs/freescale/imx8qm-mek.dtb"; + }; + + hardware.deviceTree = { + filter = "imx8qm-*.dtb"; + name = "imx8qm-mek.dtb"; + }; +} diff --git a/nxp/imx8qm-mek/overlay.nix b/nxp/imx8qm-mek/overlay.nix new file mode 100644 index 00000000..81df2e8a --- /dev/null +++ b/nxp/imx8qm-mek/overlay.nix @@ -0,0 +1,3 @@ +final: _prev: { + inherit ( final.callPackage ./bsp/u-boot/imx8/imx-uboot.nix { pkgs = final; targetBoard = "imx8qm"; }) ubootImx8 imx-firmware; +} diff --git a/nxp/imx8qxp-mek/overlay.nix b/nxp/imx8qxp-mek/overlay.nix new file mode 100644 index 00000000..fe4b82d4 --- /dev/null +++ b/nxp/imx8qxp-mek/overlay.nix @@ -0,0 +1,3 @@ +final: prev: { + inherit ( final.callPackage ./bsp/u-boot/imx8/imx-uboot.nix { pkgs = final; targetBoard = "imx8qxp"; }) ubootImx8 imx-firmware; +} From 6f1da80bd034c550220ec9777bc52af9f5af762d Mon Sep 17 00:00:00 2001 From: reo101 Date: Mon, 20 Feb 2023 18:04:27 +0200 Subject: [PATCH 0404/1476] lenovo/thinkpad/t520: reference in `README.md` and `flake.nix` --- README.md | 1 + flake.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index e15c7a70..42d16a99 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,7 @@ See code for all available configurations. | [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `` | | [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | | [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | +| [Lenovo ThinkPad T520](lenovo/thinkpad/t520) | `` | | [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | | [Lenovo ThinkPad T590](lenovo/thinkpad/t590) | `` | | [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | diff --git a/flake.nix b/flake.nix index 6a74cdfa..d2ad3ea8 100644 --- a/flake.nix +++ b/flake.nix @@ -105,6 +105,7 @@ lenovo-thinkpad-t480s = import ./lenovo/thinkpad/t480s; lenovo-thinkpad-t490 = import ./lenovo/thinkpad/t490; lenovo-thinkpad-t495 = import ./lenovo/thinkpad/t495; + lenovo-thinkpad-t520 = import ./lenovo/thinkpad/t520; lenovo-thinkpad-t550 = import ./lenovo/thinkpad/t550; lenovo-thinkpad-t590 = import ./lenovo/thinkpad/t590; lenovo-thinkpad-x1 = import ./lenovo/thinkpad/x1; From 93030acc16854853024f67686d76b0cc463b56bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 18 Feb 2023 07:04:56 +0100 Subject: [PATCH 0405/1476] p14s: do not include acpi_backlight on newer kernel versions --- lenovo/thinkpad/p14s/amd/gen2/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lenovo/thinkpad/p14s/amd/gen2/default.nix b/lenovo/thinkpad/p14s/amd/gen2/default.nix index c80a7030..fb4e3e4d 100644 --- a/lenovo/thinkpad/p14s/amd/gen2/default.nix +++ b/lenovo/thinkpad/p14s/amd/gen2/default.nix @@ -1,6 +1,4 @@ - -{ lib, pkgs, ... }: - +{ lib, pkgs, config, ... }: { imports = [ ../../../../../common/pc/laptop/acpi_call.nix @@ -9,8 +7,9 @@ # For suspending to RAM, set Config -> Power -> Sleep State to "Linux" in EFI. # amdgpu.backlight=0 makes the backlight work - # acpi_backlight=none allows the backlight save/load systemd service to work. - boot.kernelParams = ["amdgpu.backlight=0" "acpi_backlight=none"]; + # acpi_backlight=none allows the backlight save/load systemd service to work on older kernel versions + boot.kernelParams = [ "amdgpu.backlight=0" ] ++ lib.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.1.6") "acpi_backlight=none"; + # Wifi support hardware.firmware = [ pkgs.rtw89-firmware ]; From fb4ff6250eaff6e82eb13ad7fe705a45c24390dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Wed, 22 Feb 2023 14:02:07 +0100 Subject: [PATCH 0406/1476] t14s,p14s: remove rtw89-firmware if linux-firmware new enough --- lenovo/thinkpad/p14s/amd/gen2/default.nix | 2 +- lenovo/thinkpad/t14s/amd/gen1/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lenovo/thinkpad/p14s/amd/gen2/default.nix b/lenovo/thinkpad/p14s/amd/gen2/default.nix index fb4e3e4d..4fefc37d 100644 --- a/lenovo/thinkpad/p14s/amd/gen2/default.nix +++ b/lenovo/thinkpad/p14s/amd/gen2/default.nix @@ -12,7 +12,7 @@ # Wifi support - hardware.firmware = [ pkgs.rtw89-firmware ]; + hardware.firmware = lib.mkIf (lib.versionOlder pkgs.linux-firmware.version "20230210") [ pkgs.rtw89-firmware ]; # For mainline support of rtw89 wireless networking boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; diff --git a/lenovo/thinkpad/t14s/amd/gen1/default.nix b/lenovo/thinkpad/t14s/amd/gen1/default.nix index 9dd565d9..f6bb75af 100644 --- a/lenovo/thinkpad/t14s/amd/gen1/default.nix +++ b/lenovo/thinkpad/t14s/amd/gen1/default.nix @@ -6,7 +6,7 @@ ../. ]; # Wifi support - hardware.firmware = [ pkgs.rtw89-firmware ]; + hardware.firmware = lib.mkIf (lib.versionOlder pkgs.linux-firmware.version "20230210") [ pkgs.rtw89-firmware ]; # For mainline support of rtw89 wireless networking boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; From c37aed2394f54568f5e3d56a7c61133672422eb8 Mon Sep 17 00:00:00 2001 From: Ghislain Vaillant Date: Sat, 25 Feb 2023 19:13:22 +0100 Subject: [PATCH 0407/1476] Add NVIDIA config for Dell XPS 15 7590 --- dell/xps/15-7590/nvidia/default.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 dell/xps/15-7590/nvidia/default.nix diff --git a/dell/xps/15-7590/nvidia/default.nix b/dell/xps/15-7590/nvidia/default.nix new file mode 100644 index 00000000..1ab11ac2 --- /dev/null +++ b/dell/xps/15-7590/nvidia/default.nix @@ -0,0 +1,15 @@ +{lib, ...}: +{ + imports = [ + ../. + ../../../../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"; + }; +} From c0effe665880b91e373ee0c7468e256805e8157a Mon Sep 17 00:00:00 2001 From: Ghislain Vaillant Date: Sat, 25 Feb 2023 22:55:37 +0100 Subject: [PATCH 0408/1476] Add profile for Dell XPS 15 7590 NVIDIA --- README.md | 1 + flake.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 1cf7e8ea..af1ac317 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ See code for all available configurations. | [Dell XPS 13 9360](dell/xps/13-9360) | `` | | [Dell XPS 13 9370](dell/xps/13-9370) | `` | | [Dell XPS 13 9380](dell/xps/13-9380) | `` | +| [Dell XPS 15 7590, nvidia](dell/xps/15-7590/nvidia) | `` | | [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) | `` | diff --git a/flake.nix b/flake.nix index 53698924..4f7cdfb0 100644 --- a/flake.nix +++ b/flake.nix @@ -41,6 +41,7 @@ dell-xps-13-9370 = import ./dell/xps/13-9370; dell-xps-13-9380 = import ./dell/xps/13-9380; dell-xps-15-7590 = import ./dell/xps/15-7590; + 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-9550 = import ./dell/xps/15-9550; From 4bf15d3dfd6ae9a1e2c6389fae0b5d7a16f639bf Mon Sep 17 00:00:00 2001 From: Ghislain Vaillant Date: Sat, 25 Feb 2023 19:57:50 +0100 Subject: [PATCH 0409/1476] Enable thermald for Dell XPS 15 7590 --- dell/xps/15-7590/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dell/xps/15-7590/default.nix b/dell/xps/15-7590/default.nix index 98b08764..44ade790 100644 --- a/dell/xps/15-7590/default.nix +++ b/dell/xps/15-7590/default.nix @@ -1,3 +1,5 @@ +{ lib, ... }: + { imports = [ ../../../common/cpu/intel @@ -21,6 +23,9 @@ # Prevent small EFI partiion from filling up boot.loader.grub.configurationLimit = 10; + # This will save you money and possibly your life! + services.thermald.enable = lib.mkDefault true; + # The 48.ucode causes the Killer wifi card to crash. # The iwlfwifi-cc-a0-46.ucode works perfectly nixpkgs.overlays = [ From 4f1565e56d51907b9a7e234a4763b3b4f8f0e7dd Mon Sep 17 00:00:00 2001 From: Ghislain Vaillant Date: Sun, 26 Feb 2023 21:02:04 +0100 Subject: [PATCH 0410/1476] Remove override of WiFi module for Dell XPS 15 7590 --- dell/xps/15-7590/default.nix | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/dell/xps/15-7590/default.nix b/dell/xps/15-7590/default.nix index 44ade790..54da3b26 100644 --- a/dell/xps/15-7590/default.nix +++ b/dell/xps/15-7590/default.nix @@ -25,23 +25,4 @@ # This will save you money and possibly your life! services.thermald.enable = lib.mkDefault true; - - # The 48.ucode causes the Killer wifi card to crash. - # The iwlfwifi-cc-a0-46.ucode works perfectly - nixpkgs.overlays = [ - (_self: super: { - firmwareLinuxNonfree = super.firmwareLinuxNonfree.overrideAttrs (_old: { - src = super.fetchgit { - url = - "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"; - rev = "bf13a71b18af229b4c900b321ef1f8443028ded8"; - sha256 = "1dcaqdqyffxiadx420pg20157wqidz0c0ca5mrgyfxgrbh6a4mdj"; - }; - postInstall = '' - rm $out/lib/firmware/iwlwifi-cc-a0-48.ucode - ''; - outputHash = "0dq48i1cr8f0qx3nyq50l9w9915vhgpwmwiw3b4yhisbc3afyay4"; - }); - }) - ]; } From d7a5d6a29abbc93fa2ee717dec08194d1db6f597 Mon Sep 17 00:00:00 2001 From: Kiskae Date: Mon, 27 Feb 2023 13:59:06 +0100 Subject: [PATCH 0411/1476] common/gpu/intel*: Migrate to common/gpu/intel/* and add disable --- common/cpu/intel/default.nix | 2 +- common/gpu/intel.nix | 16 ++++++---------- common/gpu/intel/default.nix | 15 +++++++++++++++ common/gpu/intel/disable.nix | 7 +++++++ dell/xps/13-9300/default.nix | 2 +- flake.nix | 3 ++- 6 files changed, 32 insertions(+), 13 deletions(-) create mode 100644 common/gpu/intel/default.nix create mode 100644 common/gpu/intel/disable.nix diff --git a/common/cpu/intel/default.nix b/common/cpu/intel/default.nix index 5c1663f2..fe9f96b7 100644 --- a/common/cpu/intel/default.nix +++ b/common/cpu/intel/default.nix @@ -1,6 +1,6 @@ { imports = [ ./cpu-only.nix - ../../gpu/intel.nix + ../../gpu/intel ]; } diff --git a/common/gpu/intel.nix b/common/gpu/intel.nix index 31db8b44..d4256f65 100644 --- a/common/gpu/intel.nix +++ b/common/gpu/intel.nix @@ -1,15 +1,11 @@ -{ config, lib, pkgs, ... }: - { - boot.initrd.kernelModules = [ "i915" ]; + imports = [ ./intel ]; - environment.variables = { - VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); - }; + warnings = [ + '' + DEPRECATED: The module has been deprecated. - hardware.opengl.extraPackages = with pkgs; [ - vaapiIntel - libvdpau-va-gl - intel-media-driver + Switch to using instead. + '' ]; } diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix new file mode 100644 index 00000000..31db8b44 --- /dev/null +++ b/common/gpu/intel/default.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: + +{ + boot.initrd.kernelModules = [ "i915" ]; + + environment.variables = { + VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); + }; + + hardware.opengl.extraPackages = with pkgs; [ + vaapiIntel + libvdpau-va-gl + intel-media-driver + ]; +} diff --git a/common/gpu/intel/disable.nix b/common/gpu/intel/disable.nix new file mode 100644 index 00000000..46b6b013 --- /dev/null +++ b/common/gpu/intel/disable.nix @@ -0,0 +1,7 @@ +{ lib, ... }: + +{ + boot.blacklistedKernelModules = lib.mkDefault [ "i915" ]; + # KMS will load the module, regardless of blacklisting + boot.kernelParams = lib.mkDefault [ "i915.modeset=0" ]; +} diff --git a/dell/xps/13-9300/default.nix b/dell/xps/13-9300/default.nix index 148b6f91..101165ee 100644 --- a/dell/xps/13-9300/default.nix +++ b/dell/xps/13-9300/default.nix @@ -6,7 +6,7 @@ let in { imports = [ ../../../common/cpu/intel - ../../../common/gpu/intel.nix + ../../../common/gpu/intel ../../../common/pc/laptop ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/ssd diff --git a/flake.nix b/flake.nix index 4f7cdfb0..c276c1d9 100644 --- a/flake.nix +++ b/flake.nix @@ -172,7 +172,8 @@ common-gpu-amd = import ./common/gpu/amd; common-gpu-amd-sea-islands = import ./common/gpu/amd/sea-islands; common-gpu-amd-southern-islands = import ./common/gpu/amd/southern-islands; - common-gpu-intel = import ./common/gpu/intel.nix; + common-gpu-intel = import ./common/gpu/intel; + common-gpu-intel-disable = import ./common/gpu/intel/disable.nix; common-gpu-nvidia = import ./common/gpu/nvidia/prime.nix; common-gpu-nvidia-nonprime = import ./common/gpu/nvidia; common-gpu-nvidia-disable = import ./common/gpu/nvidia/disable.nix; From 9fef72a2afd8f2e3b7a71e7af95fcab8f777d628 Mon Sep 17 00:00:00 2001 From: Ghislain Vaillant Date: Tue, 28 Feb 2023 12:09:36 +0100 Subject: [PATCH 0412/1476] 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 052df291..863ebc77 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 54da3b26..5fd9b142 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; } From defc8e4677936687ea10ed3fbb1d342abdf8249e Mon Sep 17 00:00:00 2001 From: c3r5b8 Date: Sat, 4 Mar 2023 18:39:37 +0200 Subject: [PATCH 0413/1476] Fix disabling Nvidia dGPU --- common/gpu/nvidia/disable.nix | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/common/gpu/nvidia/disable.nix b/common/gpu/nvidia/disable.nix index 72e89c20..83e7d093 100644 --- a/common/gpu/nvidia/disable.nix +++ b/common/gpu/nvidia/disable.nix @@ -4,6 +4,23 @@ # This runs only intel/amdgpu igpus and nvidia dgpus do not drain power. ##### disable nvidia, very nice battery life. - hardware.nvidiaOptimus.disable = lib.mkDefault true; + boot.extraModprobeConfig = lib.mkDefault '' + blacklist nouveau + options nouveau modeset=0 + ''; + + services.udev.extraRules = lib.mkDefault '' + # Remove NVIDIA USB xHCI Host Controller devices, if present + ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1" + + # Remove NVIDIA USB Type-C UCSI devices, if present + ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1" + + # Remove NVIDIA Audio devices, if present + ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1" + + # Remove NVIDIA VGA/3D controller devices + ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1" + ''; boot.blacklistedKernelModules = lib.mkDefault [ "nouveau" "nvidia" ]; -} +} \ No newline at end of file From ae64b45fc4c2d2af8d40ebe69704ccf57fca3b81 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sun, 5 Mar 2023 18:08:24 +0100 Subject: [PATCH 0414/1476] Add Hardkernel HC4 support --- README.md | 1 + flake.nix | 1 + hardkernel/odroid-hc4/default.nix | 26 ++++++++++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 hardkernel/odroid-hc4/default.nix diff --git a/README.md b/README.md index af1ac317..f5f2517e 100644 --- a/README.md +++ b/README.md @@ -202,6 +202,7 @@ See code for all available configurations. | [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd)| ``| | [Microsoft Surface Range (Common Modules)](microsoft/surface/common)| `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | +| [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | | [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | | [Panasonic Let's Note CF-LX4 ](panasonic/letsnote/cf-lx4) | `` | diff --git a/flake.nix b/flake.nix index c276c1d9..4e01a118 100644 --- a/flake.nix +++ b/flake.nix @@ -142,6 +142,7 @@ msi-gs60 = import ./msi/gs60; msi-gl62 = import ./msi/gl62; nxp-imx8qm-mek = import ./nxp/imx8qm-mek; + hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; omen-en00015p = import ./omen/en00015p; onenetbook-4 = import ./onenetbook/4; pcengines-apu = import ./pcengines/apu; diff --git a/hardkernel/odroid-hc4/default.nix b/hardkernel/odroid-hc4/default.nix new file mode 100644 index 00000000..804e6b7e --- /dev/null +++ b/hardkernel/odroid-hc4/default.nix @@ -0,0 +1,26 @@ +{ lib, ... }: + +{ + # Based on the config from https://www.armbian.com/odroid-hc4/ + hardware.fancontrol = { + enable = lib.mkDefault true; + config = lib.mkDefault '' + INTERVAL=10 + DEVPATH=hwmon0=devices/virtual/thermal/thermal_zone0 hwmon2=devices/platform/pwm-fan + DEVNAME=hwmon0=cpu_thermal hwmon2=pwmfan + FCTEMPS=hwmon2/pwm1=hwmon0/temp1_input + FCFANS= hwmon2/pwm1=hwmon2/fan1_input + MINTEMP=hwmon2/pwm1=50 + MAXTEMP=hwmon2/pwm1=60 + MINSTART=hwmon2/pwm1=20 + MINSTOP=hwmon2/pwm1=28 + MINPWM=hwmon2/pwm1=0 + MAXPWM=hwmon2/pwm1=255 + ''; + }; + + # Linux 5.15 sometimes crash under heavy network usage + systemd.watchdog.runtimeTime = lib.mkDefault "1min"; + + hardware.deviceTree.filter = "meson-sm1-odroid-hc4.dtb"; +} From e38cf02bf7428f37030745eca2a415332c37a873 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 02:56:36 +0000 Subject: [PATCH 0415/1476] Bump cachix/install-nix-action from 19 to 20 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 19 to 20. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v19...v20) --- 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 87a24fd3..080bae92 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v19 + - uses: cachix/install-nix-action@v20 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version From 630a8e3e4eea61d35524699f2f59dbc64886357d Mon Sep 17 00:00:00 2001 From: K900 Date: Mon, 6 Mar 2023 12:08:52 +0300 Subject: [PATCH 0416/1476] common/gpu/amd: use modesetting driver by default Follows upstream nixpkgs --- common/gpu/amd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix index c3b38c27..62cd77fc 100644 --- a/common/gpu/amd/default.nix +++ b/common/gpu/amd/default.nix @@ -17,7 +17,7 @@ config = lib.mkMerge [ { - services.xserver.videoDrivers = lib.mkDefault [ "amdgpu" ]; + services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ]; hardware.opengl = { driSupport = lib.mkDefault true; From 826a2714d788187b27ee519abc5284de54d12464 Mon Sep 17 00:00:00 2001 From: Ivan Nikolaenko Date: Tue, 7 Mar 2023 12:05:26 +0200 Subject: [PATCH 0417/1476] nxp: imx8: Fix wrong paths to imx-uboot.nix file In addition, adjust code formatting and improve documentation Signed-off-by: Ivan Nikolaenko --- nxp/README.md | 4 +++- nxp/common/bsp/imx-uboot.nix | 2 +- nxp/imx8qm-mek/default.nix | 2 +- nxp/imx8qm-mek/overlay.nix | 4 ++-- nxp/imx8qxp-mek/overlay.nix | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/nxp/README.md b/nxp/README.md index e3bcd537..463bb7ed 100644 --- a/nxp/README.md +++ b/nxp/README.md @@ -5,7 +5,9 @@ - [i.MX8QuadXPlus Multisensory Enablement Kit](https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-8quadxplus-multisensory-enablement-kit-mek:MCIMX8QXP-CPU) (**imx8qxp-mek**) - device-specific U-Boot and Linux kernel. ## 2. How to use -Currently this NXP overlay is used for generating EFI-bootable NixOS images. [Tow-Boot](https://tow-boot.org/) is used as a bootloader in our case, but U-Boot can also be used. +Currently this NXP overlay is used for generating EFI-bootable NixOS images. +I recommend to use [Tow-Boot](https://tow-boot.org/) as a bootloader, but U-Boot from this overlay can also be used. +U-Boot was tested separately from NixOS. Code snippet example that enables imx8qm configuration: ``` diff --git a/nxp/common/bsp/imx-uboot.nix b/nxp/common/bsp/imx-uboot.nix index 1b868faf..a92a6e48 100644 --- a/nxp/common/bsp/imx-uboot.nix +++ b/nxp/common/bsp/imx-uboot.nix @@ -18,7 +18,7 @@ with pkgs; let ahab = "mx8qmb0-ahab-container.img"; scfw = "mx8qm-mek-scfw-tcm.bin"; soc = "QM"; - patches = [ ../patches/0001-Add-UEFI-boot-on-imx8qm_mek.patch ]; + patches = [ ../patches/0001-Add-UEFI-boot-for-imx8qm.patch ]; }; imx8-attrs = if (targetBoard == "imx8qxp") then imx8qxp-attrs diff --git a/nxp/imx8qm-mek/default.nix b/nxp/imx8qm-mek/default.nix index 300b9344..05f243c3 100644 --- a/nxp/imx8qm-mek/default.nix +++ b/nxp/imx8qm-mek/default.nix @@ -10,7 +10,7 @@ ]; boot.loader.grub.extraFiles = { - "imx8qm-mek.dtb" = "${pkgs.linux_imx8}/dtbs/freescale/imx8qm-mek.dtb"; + "imx8qm-mek.dtb" = "${pkgs.linux_imx8}/dtbs/freescale/imx8qm-mek.dtb"; }; hardware.deviceTree = { diff --git a/nxp/imx8qm-mek/overlay.nix b/nxp/imx8qm-mek/overlay.nix index 81df2e8a..db250883 100644 --- a/nxp/imx8qm-mek/overlay.nix +++ b/nxp/imx8qm-mek/overlay.nix @@ -1,3 +1,3 @@ -final: _prev: { - inherit ( final.callPackage ./bsp/u-boot/imx8/imx-uboot.nix { pkgs = final; targetBoard = "imx8qm"; }) ubootImx8 imx-firmware; +final: prev: { + inherit ( final.callPackage ../common/bsp/imx-uboot.nix { pkgs = final; targetBoard = "imx8qm"; }) ubootImx8 imx-firmware; } diff --git a/nxp/imx8qxp-mek/overlay.nix b/nxp/imx8qxp-mek/overlay.nix index fe4b82d4..21b339d7 100644 --- a/nxp/imx8qxp-mek/overlay.nix +++ b/nxp/imx8qxp-mek/overlay.nix @@ -1,3 +1,3 @@ final: prev: { - inherit ( final.callPackage ./bsp/u-boot/imx8/imx-uboot.nix { pkgs = final; targetBoard = "imx8qxp"; }) ubootImx8 imx-firmware; + inherit ( final.callPackage ../common/bsp/imx-uboot.nix { pkgs = final; targetBoard = "imx8qxp"; }) ubootImx8 imx-firmware; } From e72756d0b46832bfeabeef4635bfebe863114613 Mon Sep 17 00:00:00 2001 From: Ghislain Vaillant Date: Tue, 7 Mar 2023 21:08:32 +0100 Subject: [PATCH 0418/1476] Enable NVIDIA power management for Dell XPS 7590 --- dell/xps/15-7590/nvidia/default.nix | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/dell/xps/15-7590/nvidia/default.nix b/dell/xps/15-7590/nvidia/default.nix index 1ab11ac2..a4130e85 100644 --- a/dell/xps/15-7590/nvidia/default.nix +++ b/dell/xps/15-7590/nvidia/default.nix @@ -5,11 +5,21 @@ ../../../../common/gpu/nvidia/prime.nix ]; - hardware.nvidia.prime = { - # Bus ID of the Intel GPU. - intelBusId = lib.mkDefault "PCI:0:2:0"; + hardware.nvidia = { + powerManagement = { + # Enable NVIDIA power management. + enable = lib.mkDefault true; + + # Enable dynamic power management. + finegrained = lib.mkDefault true; + }; - # Bus ID of the NVIDIA GPU. - nvidiaBusId = lib.mkDefault "PCI:1:0:0"; + 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"; + }; }; } From 3287cde1d08ec8c828a5dbb7e33d949a04b64217 Mon Sep 17 00:00:00 2001 From: enc0urage <127197575+enc0urage@users.noreply.github.com> Date: Fri, 17 Mar 2023 07:50:53 +0000 Subject: [PATCH 0419/1476] gpd/p2-max: init --- README.md | 1 + flake.nix | 1 + gpd/p2-max/default.nix | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 gpd/p2-max/default.nix diff --git a/README.md b/README.md index f5f2517e..0ee926aa 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,7 @@ See code for all available configurations. | [Framework 12th Gen Intel Core](framework/12th-gen-intel) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [GPD MicroPC](gpd/micropc) | `` | +| [GPD P2 Max](gpd/p2-max) | `` | | [GPD Pocket 3](gpd/pocket-3) | `` | | [GPD WIN 2](gpd/win-2) | `` | | [Google Pixelbook](google/pixelbook) | `` | diff --git a/flake.nix b/flake.nix index 4e01a118..c5a9a45f 100644 --- a/flake.nix +++ b/flake.nix @@ -57,6 +57,7 @@ friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; google-pixelbook = import ./google/pixelbook; gpd-micropc = import ./gpd/micropc; + gpd-p2-max = import ./gpd/p2-max; gpd-pocket-3 = import ./gpd/pocket-3; gpd-win-2 = import ./gpd/win-2; hp-elitebook-2560p = import ./hp/elitebook/2560p; diff --git a/gpd/p2-max/default.nix b/gpd/p2-max/default.nix new file mode 100644 index 00000000..e2587a74 --- /dev/null +++ b/gpd/p2-max/default.nix @@ -0,0 +1,11 @@ +{lib, ...}: { + imports = [ + ../../common/pc/laptop + ../../common/pc/laptop/ssd + ../../common/cpu/intel + ../../common/cpu/intel/kaby-lake + ]; + + # HiDPI settings + hardware.video.hidpi.enable = lib.mkDefault true; +} From bde6ca292c29ad3fa41ecbd052403f0663d41dc1 Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Sun, 19 Mar 2023 00:10:04 +0100 Subject: [PATCH 0420/1476] onenetbook/4: update stylus patch for 6.1 --- .../4/goodix-stylus-mastykin/6.1.patch.patch | 18 ++++++++++++++++++ .../4/goodix-stylus-mastykin/default.nix | 14 ++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 onenetbook/4/goodix-stylus-mastykin/6.1.patch.patch diff --git a/onenetbook/4/goodix-stylus-mastykin/6.1.patch.patch b/onenetbook/4/goodix-stylus-mastykin/6.1.patch.patch new file mode 100644 index 00000000..643b727d --- /dev/null +++ b/onenetbook/4/goodix-stylus-mastykin/6.1.patch.patch @@ -0,0 +1,18 @@ +--- orig/patch1 2023-03-19 00:07:17.419793837 +0100 ++++ updated/patch1 2023-03-19 00:08:09.493618699 +0100 +@@ -10,11 +10,11 @@ + /* quirks to control the device */ + #define MT_QUIRK_NOT_SEEN_MEANS_UP BIT(0) + #define MT_QUIRK_SLOT_IS_CONTACTID BIT(1) +-@@ -70,6 +73,7 @@ +- #define MT_QUIRK_WIN8_PTP_BUTTONS BIT(18) +- #define MT_QUIRK_SEPARATE_APP_REPORT BIT(19) ++@@ -72,6 +75,7 @@ + #define MT_QUIRK_FORCE_MULTI_INPUT BIT(20) +-+#define MT_QUIRK_NON_MT_PEN BIT(21) ++ #define MT_QUIRK_DISABLE_WAKEUP BIT(21) ++ #define MT_QUIRK_ORIENTATION_INVERT BIT(22) +++#define MT_QUIRK_NON_MT_PEN BIT(23) + + #define MT_INPUTMODE_TOUCHSCREEN 0x02 + #define MT_INPUTMODE_TOUCHPAD 0x03 diff --git a/onenetbook/4/goodix-stylus-mastykin/default.nix b/onenetbook/4/goodix-stylus-mastykin/default.nix index 2329073b..3a6c0e00 100644 --- a/onenetbook/4/goodix-stylus-mastykin/default.nix +++ b/onenetbook/4/goodix-stylus-mastykin/default.nix @@ -12,8 +12,18 @@ let cat ${patch1_original} > $out ${patch}/bin/patch $out < ${./5.12.12.patch.patch} ''; - patch1 = if (lib.versionAtLeast kernel.version "5.12.12") then - patch1_updated_5_12_12 else patch1_original; + patch1_updated_6_1 = runCommand + "goodix-stylus-mastykin-1-pen-support-6.1.patch" {} + '' + cat ${patch1_original} > $out + ${patch}/bin/patch $out < ${./6.1.patch.patch} + ''; + patch1 = + if (lib.versionAtLeast kernel.version "6.1") then + patch1_updated_6_1 + else if (lib.versionAtLeast kernel.version "5.12.12") then + patch1_updated_5_12_12 + else patch1_original; patch2 = fetchpatch { url = "https://marc.info/?l=linux-input&m=161847127221531&q=p4"; name = "goodix-stylus-mastykin-2-buttons.patch"; From 2f074d636d1156302f58e67ef35905de08bac152 Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Sun, 19 Mar 2023 00:14:03 +0100 Subject: [PATCH 0421/1476] onenetbook/4: remove stale iio-sensor-proxy <3.0 branch --- onenetbook/4/default.nix | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/onenetbook/4/default.nix b/onenetbook/4/default.nix index 374b69a5..9ac16b50 100644 --- a/onenetbook/4/default.nix +++ b/onenetbook/4/default.nix @@ -1,9 +1,5 @@ { pkgs, config, lib, ... }: -let - iio-sensor-proxy-supports-rotation = - lib.versionAtLeast pkgs.iio-sensor-proxy.version "3.0"; -in { imports = [ ../../common/cpu/intel @@ -24,29 +20,11 @@ in ]; # OneNetbook 4 has an accelerometer, - hardware.sensor.iio.enable = lib.mkDefault iio-sensor-proxy-supports-rotation; + hardware.sensor.iio.enable = true; # said accelerometer needs rotation, rotation needs iio-sensor-proxy >= 3.0 - services.udev.extraHwdb = lib.mkIf iio-sensor-proxy-supports-rotation '' + services.udev.extraHwdb = '' acpi:BOSC0200:BOSC0200:* ACCEL_MOUNT_MATRIX=0, 1, 0; 0, 0, 1; 1, 0, 0 ''; # (this at least gets normal/left-up/right-up/bottom-up right) - # Until https://github.com/NixOS/nixpkgs/pull/125989 reaches you, you can use - #nixpkgs.overlays = [ - # (self: super: { - # iio-sensor-proxy = - # if (lib.versionOlder super.iio-sensor-proxy.version "3.0") then - # (super.iio-sensor-proxy.overrideAttrs (oa: rec { - # version = "3.0"; - # src = pkgs.fetchFromGitLab { - # domain = "gitlab.freedesktop.org"; - # owner = "hadess"; - # repo = "iio-sensor-proxy"; - # rev = version; - # sha256 = "0ngbz1vkbjci3ml6p47jh6c6caipvbkm8mxrc8ayr6vc2p9l1g49"; - # }; - # })) - # else super.iio-sensor-proxy; - # }) - #]; } From 98b4788c85ba05714a92004a2771942da4c91c7a Mon Sep 17 00:00:00 2001 From: toastal Date: Sun, 19 Mar 2023 16:29:39 +0700 Subject: [PATCH 0422/1476] init morefine-m600 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Morefine M600 is an AMD-powered Mini PC CPU options (all 6000-series mobile):: • R9-6900HX • R9-6850H • R7-6850U • R7-6800H • R5-6600U If bought with RAM + HDD, you would be getting DDR5 RAM @ 4800MHz & an NVMe drive, however, it can also be purchased “barebone” with the wireless card also being replacable. --- README.md | 1 + flake.nix | 1 + morefine/m600/default.nix | 12 ++++++++++++ 3 files changed, 14 insertions(+) create mode 100644 morefine/m600/default.nix diff --git a/README.md b/README.md index 0ee926aa..5da1f796 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,7 @@ See code for all available configurations. | [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd)| ``| | [Microsoft Surface Range (Common Modules)](microsoft/surface/common)| `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | +| [Morefine M600](morefine/m600) | `` | | [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | | [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | diff --git a/flake.nix b/flake.nix index c5a9a45f..d58b284a 100644 --- a/flake.nix +++ b/flake.nix @@ -140,6 +140,7 @@ microsoft-surface-laptop-amd = import ./microsoft/surface/surface-laptop-amd; microsoft-surface-common = import ./microsoft/surface/common; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; + morefine-m600 = import ./morefine/m600; msi-gs60 = import ./msi/gs60; msi-gl62 = import ./msi/gl62; nxp-imx8qm-mek = import ./nxp/imx8qm-mek; diff --git a/morefine/m600/default.nix b/morefine/m600/default.nix new file mode 100644 index 00000000..db4ed247 --- /dev/null +++ b/morefine/m600/default.nix @@ -0,0 +1,12 @@ +{ lib, pkgs, ...}: { + imports = [ + ../../common/cpu/amd + ../../common/cpu/amd/pstate.nix + ../../common/gpu/amd + ]; + + hardware.enableRedistributableFirmware = lib.mkDefault true; + + # If the wireless card is not replaced + # boot.initrd.availableKernelModules = [ "r8169" ]; +} From 739fd62a503e1c24039173b364def89f9e7a5557 Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 23 Mar 2023 16:46:38 +0300 Subject: [PATCH 0423/1476] treewide: move hidpi settings to another module, make conditional on nixos version --- common/hidpi.nix | 12 ++++++++++++ flake.nix | 1 + gpd/p2-max/default.nix | 6 ++---- gpd/pocket-3/default.nix | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 common/hidpi.nix diff --git a/common/hidpi.nix b/common/hidpi.nix new file mode 100644 index 00000000..1b030859 --- /dev/null +++ b/common/hidpi.nix @@ -0,0 +1,12 @@ +{ lib, pkgs, ... }: +let + # This option is removed from NixOS 23.05 and up + nixosVersion = lib.versions.majorMinor lib.version; + config = if lib.versionOlder nixosVersion "23.05" then { + hardware.video.hidpi.enable = lib.mkDefault true; + } else { + # Just set the console font, don't mess with the font settings + console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz"; + console.earlySetup = lib.mkDefault true; + }; +in config diff --git a/flake.nix b/flake.nix index d58b284a..bd5ad100 100644 --- a/flake.nix +++ b/flake.nix @@ -180,6 +180,7 @@ common-gpu-nvidia = import ./common/gpu/nvidia/prime.nix; common-gpu-nvidia-nonprime = import ./common/gpu/nvidia; common-gpu-nvidia-disable = import ./common/gpu/nvidia/disable.nix; + common-hidpi = import ./common/hidpi.nix; common-pc = import ./common/pc; common-pc-hdd = import ./common/pc/hdd; common-pc-laptop = import ./common/pc/laptop; diff --git a/gpd/p2-max/default.nix b/gpd/p2-max/default.nix index e2587a74..f3118644 100644 --- a/gpd/p2-max/default.nix +++ b/gpd/p2-max/default.nix @@ -1,11 +1,9 @@ -{lib, ...}: { +{ imports = [ ../../common/pc/laptop ../../common/pc/laptop/ssd ../../common/cpu/intel ../../common/cpu/intel/kaby-lake + ../../common/hidpi.nix ]; - - # HiDPI settings - hardware.video.hidpi.enable = lib.mkDefault true; } diff --git a/gpd/pocket-3/default.nix b/gpd/pocket-3/default.nix index 59de138d..64417b9d 100644 --- a/gpd/pocket-3/default.nix +++ b/gpd/pocket-3/default.nix @@ -5,6 +5,7 @@ in imports = [ ../../common/pc/laptop ../../common/pc/laptop/ssd + ../../common/hidpi.nix ]; # Necessary kernel modules @@ -34,7 +35,6 @@ in }; # More HiDPI settings - hardware.video.hidpi.enable = true; services.xserver.dpi = 280; # Necessary for audio support on the 1195G7 model From 7daa0f589d66d272fc4f0c73ba2e67cf7ff30e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 25 Mar 2023 11:33:15 +0100 Subject: [PATCH 0424/1476] drop hidpi comment this option no longer exists --- framework/12th-gen-intel/default.nix | 4 ---- framework/default.nix | 4 ---- 2 files changed, 8 deletions(-) diff --git a/framework/12th-gen-intel/default.nix b/framework/12th-gen-intel/default.nix index 8d9bf674..c912f315 100644 --- a/framework/12th-gen-intel/default.nix +++ b/framework/12th-gen-intel/default.nix @@ -48,10 +48,6 @@ # https://wiki.archlinux.org/title/Framework_Laptop#Changing_the_brightness_of_the_monitor_does_not_work hardware.acpilight.enable = lib.mkDefault true; - # HiDPI - # Leaving here for documentation - # hardware.video.hidpi.enable = lib.mkDefault true; - # Fix font sizes in X # services.xserver.dpi = 200; } diff --git a/framework/default.nix b/framework/default.nix index 2c07ff45..bbb38e5d 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -44,10 +44,6 @@ # Needed for desktop environments to detect/manage display brightness hardware.sensor.iio.enable = lib.mkDefault true; - # HiDPI - # Leaving here for documentation - # hardware.video.hidpi.enable = lib.mkDefault true; - # Fix font sizes in X # services.xserver.dpi = 200; } From 449ab4e6252cfdec69a98daa7677ad2a51ddfbc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 25 Mar 2023 11:35:20 +0100 Subject: [PATCH 0425/1476] thinkpad-z: move to hidpi module --- lenovo/thinkpad/z/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/thinkpad/z/default.nix b/lenovo/thinkpad/z/default.nix index b3c8be1b..d37af1f8 100644 --- a/lenovo/thinkpad/z/default.nix +++ b/lenovo/thinkpad/z/default.nix @@ -7,13 +7,13 @@ ../../../common/pc/laptop ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd + ../../../common/hidpi.nix # can be dropped after nixos 23.05 ]; # kernel versions prior to 5.18 won't boot boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.18") (lib.mkDefault pkgs.linuxPackages_latest); hardware.enableRedistributableFirmware = lib.mkDefault true; hardware.trackpoint.device = lib.mkDefault "TPPS/2 Elan TrackPoint"; - hardware.video.hidpi.enable = lib.mkDefault true; services.fprintd.enable = lib.mkDefault true; From a0eda74ee0aec5c161c602eb32ae0365127af935 Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Sat, 25 Mar 2023 14:23:33 +0100 Subject: [PATCH 0426/1476] lenovo legion 7 slim 15ach6: add hidpi settings --- lenovo/legion/15ach6/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lenovo/legion/15ach6/default.nix b/lenovo/legion/15ach6/default.nix index 3a03d6f1..fac30f00 100644 --- a/lenovo/legion/15ach6/default.nix +++ b/lenovo/legion/15ach6/default.nix @@ -6,6 +6,7 @@ in { ../../../common/cpu/amd ../../../common/gpu/amd ../../../common/gpu/nvidia/prime.nix + ../../../common/hidpi.nix ../../../common/pc/laptop ../../../common/pc/laptop/ssd ]; @@ -17,6 +18,9 @@ in { services.thermald.enable = lib.mkDefault true; + # √(3840² + 2160²) px / 15.60 in ≃ 282 dpi + services.xserver.dpi = 282; + # https://wiki.archlinux.org/title/backlight#Backlight_is_always_at_full_brightness_after_a_reboot_with_amdgpu_driver systemd.services.fix-brightness = { before = [ From bd6381e513123178593dc8af13b02afeacd912ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Christ?= Date: Sun, 26 Mar 2023 20:00:39 +0200 Subject: [PATCH 0427/1476] raspberry-pi/4: Add touch support for official 7" display. --- raspberry-pi/4/touch-ft5406.nix | 65 +++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 raspberry-pi/4/touch-ft5406.nix diff --git a/raspberry-pi/4/touch-ft5406.nix b/raspberry-pi/4/touch-ft5406.nix new file mode 100644 index 00000000..12bb768b --- /dev/null +++ b/raspberry-pi/4/touch-ft5406.nix @@ -0,0 +1,65 @@ +{ config, lib, ... }: + +let + cfg = config.hardware.raspberry-pi."4".touch-ft5406; +in +{ + options.hardware = { + raspberry-pi."4".touch-ft5406 = { + enable = lib.mkEnableOption '' + Enable the touch controller of the official Raspberry Pi touch diplay. + + The overlay is taken from the official Raspberry Pi Linux fork, and + the `compatible` field is updated to match the target device tree. + https://github.com/raspberrypi/linux/blob/14b35093ca68bf2c81bbc90aace5007142b40b40/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts + + For more information about the touch display, please refer to: + https://www.raspberrypi.com/documentation/accessories/display.html + ''; + }; + }; + + config = lib.mkIf cfg.enable { + # Configure for modesetting in the device tree + hardware.deviceTree = { + overlays = [ + # this *should* be equivalent to (which doesn't work): + # https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/dwc2-overlay.dts + # but actually it's obtained using + # dtc -I dtb -O dts ${config.hardware.deviceTree.kernelPackage}/dtbs/overlays/dwc2.dtbo + # (changes: modified top-level "compatible" field) + # which is slightly different and works + { + name = "rpi-ft5406-overlay"; + dtsText = '' + /dts-v1/; + /plugin/; + + / { + compatible = "brcm,bcm2711"; + + fragment@0 { + target-path = "/soc/firmware"; + __overlay__ { + ts: touchscreen { + compatible = "raspberrypi,firmware-ts"; + touchscreen-size-x = <800>; + touchscreen-size-y = <480>; + }; + }; + }; + + __overrides__ { + touchscreen-size-x = <&ts>,"touchscreen-size-x:0"; + touchscreen-size-y = <&ts>,"touchscreen-size-y:0"; + touchscreen-inverted-x = <&ts>,"touchscreen-inverted-x?"; + touchscreen-inverted-y = <&ts>,"touchscreen-inverted-y?"; + touchscreen-swapped-x-y = <&ts>,"touchscreen-swapped-x-y?"; + }; + }; + ''; + } + ]; + }; + }; +} From 3023004e9903bc2f726da7c4a6724cf55f45bfff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Christ?= Date: Sun, 26 Mar 2023 20:11:16 +0200 Subject: [PATCH 0428/1476] raspberry-pi/4: Fix comments and indentation. --- raspberry-pi/4/touch-ft5406.nix | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/raspberry-pi/4/touch-ft5406.nix b/raspberry-pi/4/touch-ft5406.nix index 12bb768b..5cc0a70f 100644 --- a/raspberry-pi/4/touch-ft5406.nix +++ b/raspberry-pi/4/touch-ft5406.nix @@ -20,15 +20,8 @@ in }; config = lib.mkIf cfg.enable { - # Configure for modesetting in the device tree hardware.deviceTree = { overlays = [ - # this *should* be equivalent to (which doesn't work): - # https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/dwc2-overlay.dts - # but actually it's obtained using - # dtc -I dtb -O dts ${config.hardware.deviceTree.kernelPackage}/dtbs/overlays/dwc2.dtbo - # (changes: modified top-level "compatible" field) - # which is slightly different and works { name = "rpi-ft5406-overlay"; dtsText = '' @@ -55,7 +48,7 @@ in touchscreen-inverted-x = <&ts>,"touchscreen-inverted-x?"; touchscreen-inverted-y = <&ts>,"touchscreen-inverted-y?"; touchscreen-swapped-x-y = <&ts>,"touchscreen-swapped-x-y?"; - }; + }; }; ''; } From 39fb4bb20e3d429ba541927d265e35a87b886534 Mon Sep 17 00:00:00 2001 From: Ioannis Koutras Date: Sun, 26 Mar 2023 20:20:39 +0200 Subject: [PATCH 0429/1476] microsoft-surface: upgrade kernel 6.1.6 to 6.1.18 --- microsoft/surface/common/kernel/default.nix | 2 +- .../{linux-6.1.6 => linux-6.1.18}/default.nix | 8 +-- .../{linux-6.1.6 => linux-6.1.18}/patches.nix | 49 +++++++++++++------ microsoft/surface/common/repos.nix | 4 +- microsoft/surface/surface-go/default.nix | 2 +- 5 files changed, 43 insertions(+), 22 deletions(-) rename microsoft/surface/common/kernel/{linux-6.1.6 => linux-6.1.18}/default.nix (80%) rename microsoft/surface/common/kernel/{linux-6.1.6 => linux-6.1.18}/patches.nix (65%) diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index f8044d3c..ffb4d2b8 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -7,7 +7,7 @@ in { imports = [ ./linux-5.19.17 ./linux-6.0.17 - ./linux-6.1.6 + ./linux-6.1.18 ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.1.6/default.nix b/microsoft/surface/common/kernel/linux-6.1.18/default.nix similarity index 80% rename from microsoft/surface/common/kernel/linux-6.1.6/default.nix rename to microsoft/surface/common/kernel/linux-6.1.18/default.nix index 86c17a98..cbf228d6 100644 --- a/microsoft/surface/common/kernel/linux-6.1.6/default.nix +++ b/microsoft/surface/common/kernel/linux-6.1.18/default.nix @@ -8,7 +8,7 @@ let cfg = config.microsoft-surface; - version = "6.1.6"; + version = "6.1.18"; extraMeta.branch = "6.1"; patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; kernelPatches = pkgs.callPackage ./patches.nix { @@ -20,17 +20,17 @@ let inherit version extraMeta kernelPatches; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "sha256-Pk2OVh2lcDogWujXsr7WxcZPxCme68v9IEgeY7V9XuM="; + sha256 = "sha256-hCrBXv8Ob7DBUP34P09qr2tMEjnc+MFOIidiDsCuFB4="; }; }; in { options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ "6.1.6" ]; + type = types.enum [ "6.1.18" ]; }; - config = mkIf (cfg.kernelVersion == "6.1.6") { + config = mkIf (cfg.kernelVersion == "6.1.18") { boot = { inherit kernelPackages; }; diff --git a/microsoft/surface/common/kernel/linux-6.1.6/patches.nix b/microsoft/surface/common/kernel/linux-6.1.18/patches.nix similarity index 65% rename from microsoft/surface/common/kernel/linux-6.1.6/patches.nix rename to microsoft/surface/common/kernel/linux-6.1.18/patches.nix index 7b3cfdca..78c7cea2 100644 --- a/microsoft/surface/common/kernel/linux-6.1.6/patches.nix +++ b/microsoft/surface/common/kernel/linux-6.1.18/patches.nix @@ -36,6 +36,11 @@ # SURFACE_HOTPLUG = module; + # + # Intel Touch Host Controller + # + HID_ITHC = module; + # # IPTS touchscreen # @@ -94,31 +99,47 @@ patch = patchDir + "/0004-ipts.patch"; } { - name = "ms-surface/0005-surface-sam"; - patch = patchDir + "/0005-surface-sam.patch"; + name = "ms-surface/0005-ithc"; + patch = patchDir + "/0005-ithc.patch"; } { - name = "ms-surface/0006-surface-sam-over-hid"; - patch = patchDir + "/0006-surface-sam-over-hid.patch"; + name = "ms-surface/0006-surface-sam"; + patch = patchDir + "/0006-surface-sam.patch"; } { - name = "ms-surface/0007-surface-button"; - patch = patchDir + "/0007-surface-button.patch"; + name = "ms-surface/0007-surface-sam-over-hid"; + patch = patchDir + "/0007-surface-sam-over-hid.patch"; } { - name = "ms-surface/0008-surface-typecover"; - patch = patchDir + "/0008-surface-typecover.patch"; + name = "ms-surface/0008-surface-button"; + patch = patchDir + "/0008-surface-button.patch"; } { - name = "ms-surface/0009-cameras"; - patch = patchDir + "/0009-cameras.patch"; + name = "ms-surface/0009-surface-typecover"; + patch = patchDir + "/0009-surface-typecover.patch"; } { - name = "ms-surface/0010-amd-gpio"; - patch = patchDir + "/0010-amd-gpio.patch"; + name = "ms-surface/0010-surface-shutdown"; + patch = patchDir + "/0010-surface-shutdown.patch"; } { - name = "ms-surface/0011-rtc"; - patch = patchDir + "/0011-rtc.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"; + } + { + name = "ms-surface/0015-intel-thread-director"; + patch = patchDir + "/0015-intel-thread-director.patch"; } ] diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index f10ad9a1..982fefd8 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "91240ac43dfdfb3e68bbc604def84685a218fab9"; - sha256 = "sha256-Jf7tthFWj67Esjx+/ZwG7BYlN7zWS26e1TbsznNxE9Q="; + rev = "efe7ddadd4aad3d1a6531334fe086931ec8640a1"; + sha256 = "sha256-WgJHLY4vU4lsZ6M0hOng8TMVRALxQeSwQM4QX6DzrbI="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix index b57d73e3..b4f990e3 100644 --- a/microsoft/surface/surface-go/default.nix +++ b/microsoft/surface/surface-go/default.nix @@ -17,7 +17,7 @@ in { ../../../common/cpu/intel/kaby-lake ]; - microsoft-surface.kernelVersion = "6.1.6"; + microsoft-surface.kernelVersion = "6.1.18"; boot.kernelParams = [ "i915.enable_rc6=1" From 160e7e12d7dcf8013f8ce9b3143d7b823764c813 Mon Sep 17 00:00:00 2001 From: louib Date: Sat, 25 Mar 2023 19:38:01 -0400 Subject: [PATCH 0430/1476] feat: add backlight support for rpi4 --- raspberry-pi/4/backlight.nix | 50 ++++++++++++++++++++++++++++++++++++ raspberry-pi/4/default.nix | 4 ++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 raspberry-pi/4/backlight.nix diff --git a/raspberry-pi/4/backlight.nix b/raspberry-pi/4/backlight.nix new file mode 100644 index 00000000..f8714216 --- /dev/null +++ b/raspberry-pi/4/backlight.nix @@ -0,0 +1,50 @@ +{ config, lib, ... }: + +let + cfg = config.hardware.raspberry-pi."4".backlight; +in +{ + options.hardware = { + raspberry-pi."4".backlight = { + enable = lib.mkEnableOption '' + Enable the backlight support for the Raspberry Pi official Touch Display + ''; + }; + }; + + config = lib.mkIf cfg.enable { + hardware.deviceTree = { + overlays = [ + # This overlay was originally taken from: + # https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts + # The only modification made was to change the compatible field to bcm2711 + { + name = "rpi-backlight-overlay"; + dtsText = '' + /* + * Devicetree overlay for mailbox-driven Raspberry Pi DSI Display + * backlight controller + */ + /dts-v1/; + /plugin/; + + / { + compatible = "brcm,bcm2711"; + + fragment@0 { + target-path = "/"; + __overlay__ { + rpi_backlight: rpi_backlight { + compatible = "raspberrypi,rpi-backlight"; + firmware = <&firmware>; + status = "okay"; + }; + }; + }; + }; + ''; + } + ]; + }; + }; +} diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index 6c5b1ba1..ab399f77 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -1,8 +1,9 @@ -{ lib, pkgs, ...}: +{ lib, pkgs, ... }: { imports = [ ./audio.nix + ./backlight.nix ./cpu-revision.nix ./dwc2.nix ./i2c.nix @@ -22,6 +23,7 @@ "vc4" "pcie_brcmstb" # required for the pcie bus to work "reset-raspberrypi" # required for vl805 firmware to load + "rpi_backlight" # required for backlight support ]; loader = { From 70a8ff0a2511c300a7ab4dc8a9ab03328d52da5a Mon Sep 17 00:00:00 2001 From: Steffen Weitz Date: Sun, 26 Mar 2023 23:53:18 +0200 Subject: [PATCH 0431/1476] Add settings for AMD Raphael iGPU --- common/cpu/amd/raphael/igpu.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 common/cpu/amd/raphael/igpu.nix diff --git a/common/cpu/amd/raphael/igpu.nix b/common/cpu/amd/raphael/igpu.nix new file mode 100644 index 00000000..1192d413 --- /dev/null +++ b/common/cpu/amd/raphael/igpu.nix @@ -0,0 +1,15 @@ +{ lib, pkgs, ... }: + +{ + # Disables scatter/gather which was introduced with kernel version 6.2 + # It produces completely white or flashing screens when enabled while using the iGPU of Ryzen 7000-series CPUs (Raphael) + + imports = [ ../. ]; + + boot = lib.mkMerge [ + (lib.mkIf (lib.versionOlder pkgs.linux.version "6.1") { + kernelPackages = pkgs.linuxPackages_latest; + kernelParams = lib.mkMerge [["amdgpu.sg_display=0"]]; + }) + ]; +} From 5d4755338109a5c6600650a7246b267bf7e2ea11 Mon Sep 17 00:00:00 2001 From: Steffen Weitz Date: Mon, 27 Mar 2023 10:34:07 +0200 Subject: [PATCH 0432/1476] Remove unnecessary mkMerge --- common/cpu/amd/raphael/igpu.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/cpu/amd/raphael/igpu.nix b/common/cpu/amd/raphael/igpu.nix index 1192d413..45d97d33 100644 --- a/common/cpu/amd/raphael/igpu.nix +++ b/common/cpu/amd/raphael/igpu.nix @@ -9,7 +9,7 @@ boot = lib.mkMerge [ (lib.mkIf (lib.versionOlder pkgs.linux.version "6.1") { kernelPackages = pkgs.linuxPackages_latest; - kernelParams = lib.mkMerge [["amdgpu.sg_display=0"]]; + kernelParams = ["amdgpu.sg_display=0"]; }) ]; } From 5fc0f2352069cadea929afe201532b8673488ab3 Mon Sep 17 00:00:00 2001 From: Steffen Weitz Date: Mon, 27 Mar 2023 21:18:10 +0200 Subject: [PATCH 0433/1476] Add module import to flake --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index bd5ad100..8a2f54f4 100644 --- a/flake.nix +++ b/flake.nix @@ -168,6 +168,7 @@ common-cpu-amd = import ./common/cpu/amd; common-cpu-amd-pstate = import ./common/cpu/amd/pstate.nix; + common-cpu-amd-raphael-igpu = import ./common/cpu/amd/raphael/igpu.nix; common-cpu-intel = import ./common/cpu/intel; common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix; common-cpu-intel-kaby-lake = import ./common/cpu/intel/kaby-lake; From b7c184da76c87dde8ae25446e0ccb252b6ff7a02 Mon Sep 17 00:00:00 2001 From: louib Date: Mon, 27 Mar 2023 20:49:46 -0400 Subject: [PATCH 0434/1476] fix: add missing touch-ft5406 export to raspberry-pi config --- raspberry-pi/4/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index ab399f77..07ae53f2 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -11,6 +11,7 @@ ./poe-hat.nix ./poe-plus-hat.nix ./tc358743.nix + ./touch-ft5406.nix ./pwm0.nix ./pkgs-overlays.nix ]; From 523e6f9faf4599d4144d9a4ac71a74be587bb0fd Mon Sep 17 00:00:00 2001 From: louib Date: Tue, 28 Mar 2023 22:16:02 -0400 Subject: [PATCH 0435/1476] fix: remove rpi_backlight driver from rpi4 config --- raspberry-pi/4/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index ab399f77..13dc2b66 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -23,7 +23,6 @@ "vc4" "pcie_brcmstb" # required for the pcie bus to work "reset-raspberrypi" # required for vl805 firmware to load - "rpi_backlight" # required for backlight support ]; loader = { From 9dbe8dea5fee7180991f4a65d1a5876422f33681 Mon Sep 17 00:00:00 2001 From: Steffen Weitz Date: Wed, 29 Mar 2023 11:32:52 +0200 Subject: [PATCH 0436/1476] Add condition for kernel version 6.2 and above --- common/cpu/amd/raphael/igpu.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/cpu/amd/raphael/igpu.nix b/common/cpu/amd/raphael/igpu.nix index 45d97d33..82514c27 100644 --- a/common/cpu/amd/raphael/igpu.nix +++ b/common/cpu/amd/raphael/igpu.nix @@ -1,6 +1,7 @@ { lib, pkgs, ... }: { + # Sets the kernel version to the latest kernel to make the usage of the iGPU possible if your kernel version is too old # Disables scatter/gather which was introduced with kernel version 6.2 # It produces completely white or flashing screens when enabled while using the iGPU of Ryzen 7000-series CPUs (Raphael) @@ -11,5 +12,9 @@ kernelPackages = pkgs.linuxPackages_latest; kernelParams = ["amdgpu.sg_display=0"]; }) + + (lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.2") { + kernelParams = ["amdgpu.sg_display=0"]; + }) ]; } From d28d2a249455cd1b3b59db23ba7ae62c1d550279 Mon Sep 17 00:00:00 2001 From: Konrad Borowski Date: Mon, 3 Apr 2023 09:18:09 +0200 Subject: [PATCH 0437/1476] Load acpi_call module only if tlp is being used power-profiles-daemon cannot use acpi_call. This avoids taining the kernel by installing an unnecessary kernel module. --- common/pc/laptop/acpi_call.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/pc/laptop/acpi_call.nix b/common/pc/laptop/acpi_call.nix index f8c17dcc..76e4b276 100644 --- a/common/pc/laptop/acpi_call.nix +++ b/common/pc/laptop/acpi_call.nix @@ -1,9 +1,9 @@ # acpi_call makes tlp work for newer thinkpads -{ config, ... }: +{ config, lib, ... }: { - boot = { + boot = lib.mkIf config.services.tlp.enable { kernelModules = [ "acpi_call" ]; extraModulePackages = with config.boot.kernelPackages; [ acpi_call ]; }; From d2f0dce97bbcda8c9600027b24a5d3c3a7405eaf Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Wed, 5 Apr 2023 16:56:09 +0200 Subject: [PATCH 0438/1476] Lenovo legion 7i 16ithg6: add hidpi settings --- lenovo/legion/16ithg6/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lenovo/legion/16ithg6/default.nix b/lenovo/legion/16ithg6/default.nix index e0dca1eb..e26461dd 100644 --- a/lenovo/legion/16ithg6/default.nix +++ b/lenovo/legion/16ithg6/default.nix @@ -6,6 +6,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/pc/laptop ../../../common/pc/laptop/ssd + ../../../common/hidpi.nix ]; # Specify bus id of Nvidia and Intel graphics. @@ -16,4 +17,7 @@ # Cooling management services.thermald.enable = lib.mkDefault true; + + # √(2560² + 1600²) px / 16 in ≃ 189 dpi + services.xserver.dpi = 189; } From 0cc1214203def995d0863a389bbbe002c24a377f Mon Sep 17 00:00:00 2001 From: Jakob Leifhelm Date: Sun, 16 Apr 2023 22:43:32 +0200 Subject: [PATCH 0439/1476] Init starfive visionfive 2 --- flake.nix | 1 + starfive/visionfive/v2/README.md | 5 ++ starfive/visionfive/v2/default.nix | 25 +++++++++ starfive/visionfive/v2/firmware.nix | 56 +++++++++++++++++++ starfive/visionfive/v2/fix-memory-size.patch | 13 +++++ starfive/visionfive/v2/linux_6_3.nix | 28 ++++++++++ starfive/visionfive/v2/opensbi.nix | 42 ++++++++++++++ starfive/visionfive/v2/sd-image-installer.nix | 11 ++++ starfive/visionfive/v2/sd-image.nix | 51 +++++++++++++++++ starfive/visionfive/v2/spl-tool.nix | 18 ++++++ starfive/visionfive/v2/uboot.nix | 20 +++++++ 11 files changed, 270 insertions(+) create mode 100644 starfive/visionfive/v2/README.md create mode 100644 starfive/visionfive/v2/default.nix create mode 100644 starfive/visionfive/v2/firmware.nix create mode 100644 starfive/visionfive/v2/fix-memory-size.patch create mode 100644 starfive/visionfive/v2/linux_6_3.nix create mode 100644 starfive/visionfive/v2/opensbi.nix create mode 100644 starfive/visionfive/v2/sd-image-installer.nix create mode 100644 starfive/visionfive/v2/sd-image.nix create mode 100644 starfive/visionfive/v2/spl-tool.nix create mode 100644 starfive/visionfive/v2/uboot.nix diff --git a/flake.nix b/flake.nix index 8a2f54f4..76b5a5a6 100644 --- a/flake.nix +++ b/flake.nix @@ -156,6 +156,7 @@ kobol-helios4 = import ./kobol/helios4; samsung-np900x3c = import ./samsung/np900x3c; starfive-visionfive-v1 = import ./starfive/visionfive/v1; + starfive-visionfive-2 = import ./starfive/visionfive/v2; supermicro = import ./supermicro; supermicro-a1sri-2758f = import ./supermicro/a1sri-2758f; supermicro-m11sdv-8c-ln4f = import ./supermicro/m11sdv-8c-ln4f; diff --git a/starfive/visionfive/v2/README.md b/starfive/visionfive/v2/README.md new file mode 100644 index 00000000..10496e73 --- /dev/null +++ b/starfive/visionfive/v2/README.md @@ -0,0 +1,5 @@ +# Creating SD-Image + +``` nix + +``` diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix new file mode 100644 index 00000000..8cdd6085 --- /dev/null +++ b/starfive/visionfive/v2/default.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: { + boot = { + # Force no ZFS (from nixos/modules/profiles/base.nix) until updated to kernel 6.0 + supportedFilesystems = + lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; + consoleLogLevel = lib.mkDefault 7; + kernelPackages = + lib.mkDefault (pkgs.callPackage ./linux_6_3.nix { inherit (config.boot) kernelPatches; }); + + kernelParams = + lib.mkDefault [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ]; + + initrd.availableKernelModules = [ + "dw_mmc_starfive" + ]; + + loader = { + grub.enable = lib.mkDefault false; + generic-extlinux-compatible.enable = lib.mkDefault true; + }; + + hardware.deviceTree.name = + lib.mkDefault "starfive/jh7110-starfive-visionfive-2-v1.3b.dtb"; + }; +} diff --git a/starfive/visionfive/v2/firmware.nix b/starfive/visionfive/v2/firmware.nix new file mode 100644 index 00000000..c313068b --- /dev/null +++ b/starfive/visionfive/v2/firmware.nix @@ -0,0 +1,56 @@ +{ callPackage, runCommand, writeText, stdenv, dtc }: +let + uboot = callPackage ./uboot.nix { }; + opensbi = callPackage ./opensbi.nix { + withPayload = "${uboot}/u-boot.bin"; + withFDT = "${uboot}/starfive_visionfive2.dtb"; + }; + spl-tool = callPackage ./spl-tool.nix { }; + its-file = writeText "visionfive2-uboot-fit-image.its" '' + /dts-v1/; + + / { + description = "U-boot-spl FIT image for JH7110 VisionFive2"; + #address-cells = <2>; + + images { + firmware { + description = "u-boot"; + data = /incbin/("${opensbi}/share/opensbi/lp64/generic/firmware/fw_payload.bin"); + type = "firmware"; + arch = "riscv"; + os = "u-boot"; + load = <0x0 0x40000000>; + entry = <0x0 0x40000000>; + compression = "none"; + }; + }; + + configurations { + default = "config-1"; + + config-1 { + description = "U-boot-spl FIT config for JH7110 VisionFive2"; + firmware = "firmware"; + }; + }; + }; + ''; +in { + inherit opensbi uboot; + spl = runCommand "starfive-visionfive2-spl" { } '' + mkdir -p $out/share/starfive-visionfive2/ + ln -s ${uboot}/u-boot-spl.bin . + ${spl-tool}/bin/spl_tool -c -f ./u-boot-spl.bin + cp u-boot-spl.bin.normal.out $out/share/starfive-visionfive2/spl.bin + ''; + uboot-fit-image = stdenv.mkDerivation { + name = "starfive-visionfive2-uboot-fit-image"; + nativeBuildInputs = [ dtc ]; + phases = [ "installPhase" ]; + installPhase = '' + mkdir -p $out/share/starfive-visionfive2/ + ${uboot}/mkimage -f ${its-file} -A riscv -O u-boot -T firmware $out/share/starfive-visionfive2/visionfive2_fw_payload.img + ''; + }; +} diff --git a/starfive/visionfive/v2/fix-memory-size.patch b/starfive/visionfive/v2/fix-memory-size.patch new file mode 100644 index 00000000..a8bd5bc2 --- /dev/null +++ b/starfive/visionfive/v2/fix-memory-size.patch @@ -0,0 +1,13 @@ +diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +index 752bb0b6fd00..93670da6cabd 100644 +--- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi ++++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +@@ -30,7 +30,7 @@ cpus { + + memory@40000000 { + device_type = "memory"; +- reg = <0x0 0x40000000 0x1 0x0>; ++ reg = <0x0 0x40000000 0x2 0x0>; + }; + + thermal-zones { diff --git a/starfive/visionfive/v2/linux_6_3.nix b/starfive/visionfive/v2/linux_6_3.nix new file mode 100644 index 00000000..88c7887a --- /dev/null +++ b/starfive/visionfive/v2/linux_6_3.nix @@ -0,0 +1,28 @@ +{ lib, callPackage, linuxPackagesFor, kernelPatches, fetchpatch, ... }: + +let + modDirVersion = "6.3.0-rc3"; + linuxPkg = { lib, fetchFromGitHub, buildLinux, ... }@args: + buildLinux (args // { + version = "${modDirVersion}-starfive-visionfive2"; + + src = fetchFromGitHub { + owner = "starfive-tech"; + repo = "linux"; + rev = "2a6909fb414dfc72ae391791ec6edc3eedd13e6f"; + sha256 = "sha256-FeY6N+hk0PTpuIuA1hkcS+B+ozn6iHV6YaRVx1kuYHc="; + }; + + inherit modDirVersion; + kernelPatches = [{ patch = ./fix-memory-size.patch; }] ++ kernelPatches; + + structuredExtraConfig = with lib.kernel; { + PL330_DMA = no; + PINCTRL_STARFIVE_JH7110_SYS = yes; + SERIAL_8250_DW = yes; + }; + + extraMeta.branch = "JH7110_VisionFive2_upstream"; + } // (args.argsOverride or { })); + +in lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg { })) diff --git a/starfive/visionfive/v2/opensbi.nix b/starfive/visionfive/v2/opensbi.nix new file mode 100644 index 00000000..6a7e84fe --- /dev/null +++ b/starfive/visionfive/v2/opensbi.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, fetchFromGitHub +, python3 +, withPlatform ? "generic" +, withPayload ? null +, withFDT ? null +}: + +stdenv.mkDerivation rec { + pname = "opensbi"; + version = "1.3-git-2868f26"; + + src = fetchFromGitHub { + owner = "riscv-software-src"; + repo = "opensbi"; + rev = "2868f26131308ff345382084681ea89c5b0159f1"; + sha256 = "sha256-E+nVFLSpH6lQ2nVmMlVRTr7qYRVY0ULW7gUvAyTr90I="; + }; + + postPatch = '' + patchShebangs ./scripts + ''; + + nativeBuildInputs = [ python3 ]; + + installFlags = [ + "I=$(out)" + ]; + + makeFlags = [ + "PLATFORM=${withPlatform}" + "FW_TEXT_START=0x40000000" + ] ++ lib.optionals (withPayload != null) [ + "FW_PAYLOAD_PATH=${withPayload}" + ] ++ lib.optionals (withFDT != null) [ + "FW_FDT_PATH=${withFDT}" + ]; + + dontStrip = true; + dontPatchELF = true; +} diff --git a/starfive/visionfive/v2/sd-image-installer.nix b/starfive/visionfive/v2/sd-image-installer.nix new file mode 100644 index 00000000..ee9d3647 --- /dev/null +++ b/starfive/visionfive/v2/sd-image-installer.nix @@ -0,0 +1,11 @@ +{ modulesPath, ... }: +{ + imports = [ + "${modulesPath}/profiles/installation-device.nix" + ./sd-image.nix + ]; + + # The installation media is also the installation target, + # so we don't want to provide the installation configuration.nix. + installer.cloneConfig = false; +} diff --git a/starfive/visionfive/v2/sd-image.nix b/starfive/visionfive/v2/sd-image.nix new file mode 100644 index 00000000..06af34c6 --- /dev/null +++ b/starfive/visionfive/v2/sd-image.nix @@ -0,0 +1,51 @@ +{ config, pkgs, lib, modulesPath, ... }: + +let + firmware = pkgs.callPackage ./firmware.nix { }; +in { + imports = [ + "${modulesPath}/profiles/base.nix" + "${modulesPath}/installer/sd-card/sd-image.nix" + ./default.nix + ]; + + sdImage = { + imageName = + "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}-starfive-visionfive2.img"; + + # Overridden by postBuildCommands + populateFirmwareCommands = ""; + + firmwarePartitionOffset = 4; + firmwareSize = 4; + + postBuildCommands = '' + # preserve root partition + eval $(partx $img -o START,SECTORS --nr 2 --pairs) + + # increase image size for gpt backup header + truncate -s '+2M' $img + + sfdisk $img < Date: Sun, 16 Apr 2023 22:53:29 +0200 Subject: [PATCH 0440/1476] starfive-visionfive2: Add README.md --- starfive/visionfive/v2/README.md | 53 +++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/starfive/visionfive/v2/README.md b/starfive/visionfive/v2/README.md index 10496e73..4dea95f2 100644 --- a/starfive/visionfive/v2/README.md +++ b/starfive/visionfive/v2/README.md @@ -1,5 +1,56 @@ -# Creating SD-Image +# Creating a SD-Image +Create and configure the `flake.nix` file: ``` nix +{ + # Kernel is broken on riscv64 see https://github.com/NixOS/nixpkgs/issues/225756 + inputs.nixpkgs.url = + "github:nixos/nixpkgs/c3e12e57c3e3d5c84cc500420be4507b3de33e90"; + inputs.nixos-hardware.url = "github:nixos/nixos-hardware"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + outputs = { self, nixpkgs, nixos-hardware, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + rec { + packages.default = packages.sd-image; + packages.sd-image = (import "${nixpkgs}/nixos" { + configuration = + { config, ... }: { + imports = [ + "${nixos-hardware}/starfive/visionfive/v2/sd-image-installer.nix" + ]; + # If you want to use ssh set a password + # users.users.nixos.password = "super secure password"; + # OR add your public ssh key + # users.users.nixos.openssh.authorizedKeys.keys = [ "ssh-rsa ..." ]; + + # AND configure networking + # networking.interfaces.end0.useDHCP = true; + # networking.interfaces.end1.useDHCP = true; + + # If you have the 2A variant uncomment the following line + # hardware.deviceTree.name = + # lib.mkDefault "starfive/jh7110-starfive-visionfive-2-v1.2a.dtb"; + + # Additional configuration goes here + + sdImage.compressImage = false; + + nixpkgs.crossSystem = { + config = "riscv64-unknown-linux-gnu"; + system = "riscv64-linux"; + }; + + system.stateVersion = "23.05"; + }; + inherit system; + }).config.system.build.sdImage; + }); +} +``` + +Build the sd image. + +``` sh +nix build .# ``` From 34f96de8c9ad390d8717e3ca6260afd5f500de04 Mon Sep 17 00:00:00 2001 From: Jakob Leifhelm Date: Sun, 16 Apr 2023 22:54:39 +0200 Subject: [PATCH 0441/1476] starfive-visionfive2: add to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5da1f796..0fd29dd3 100644 --- a/README.md +++ b/README.md @@ -216,6 +216,7 @@ See code for all available configurations. | [Raspberry Pi 4](raspberry-pi/4) | `` | | [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | | [StarFive VisionFive v1](starfive/visionfive/v1) | `` | +| [StarFive VisionFive 2](starfive/visionfive/v2) | `` | | [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | | [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | | [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | From 7b2aec9939065fe56e424a47164906de721c9c84 Mon Sep 17 00:00:00 2001 From: Jakob Leifhelm Date: Tue, 18 Apr 2023 09:15:12 +0200 Subject: [PATCH 0442/1476] starfive visionfive2: Fix deviceTree name --- starfive/visionfive/v2/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index 8cdd6085..91a76454 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -18,8 +18,8 @@ grub.enable = lib.mkDefault false; generic-extlinux-compatible.enable = lib.mkDefault true; }; + }; hardware.deviceTree.name = lib.mkDefault "starfive/jh7110-starfive-visionfive-2-v1.3b.dtb"; - }; } From 4fb7708a20fc1f6ba5de3d3767efed34979c2f56 Mon Sep 17 00:00:00 2001 From: Jakob Leifhelm Date: Tue, 18 Apr 2023 09:19:48 +0200 Subject: [PATCH 0443/1476] starfive visionfive2: Update spl_tool --- starfive/visionfive/v2/spl-tool.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/starfive/visionfive/v2/spl-tool.nix b/starfive/visionfive/v2/spl-tool.nix index f56841f4..39498454 100644 --- a/starfive/visionfive/v2/spl-tool.nix +++ b/starfive/visionfive/v2/spl-tool.nix @@ -6,8 +6,8 @@ stdenv.mkDerivation rec{ src = fetchFromGitHub { owner = "starfive-tech"; repo = "soft_3rdpart"; - rev = "cd7b50cd9f9eca66c23ebd19f06a172ce0be591f"; - sha256 = "sha256-hRmP74gz0Y9KnSwXCjxEiArJE+FonI9rGghZTK54qGs="; + rev = "89ff3396250538548643c3322f74640712b80893"; + sha256 = "sha256-Ni3pBWKgr4bYJb/uJ+5EbSQl6JwWoO2lZFk2Xpi63IA="; sparseCheckout = [ "spl_tool" ]; }; sourceRoot = "source/spl_tool"; From f5298eb1d7be19f8651649cbdf16068b6ce7ad50 Mon Sep 17 00:00:00 2001 From: Jakob Leifhelm Date: Tue, 18 Apr 2023 10:40:20 +0200 Subject: [PATCH 0444/1476] starfive visionfive2: Fix kernel on nixos-unstable --- starfive/visionfive/v2/README.md | 4 +--- starfive/visionfive/v2/default.nix | 2 +- .../visionfive/v2/{linux_6_3.nix => linux-6.3.nix} | 11 ++++++++++- 3 files changed, 12 insertions(+), 5 deletions(-) rename starfive/visionfive/v2/{linux_6_3.nix => linux-6.3.nix} (70%) diff --git a/starfive/visionfive/v2/README.md b/starfive/visionfive/v2/README.md index 4dea95f2..d6655ce3 100644 --- a/starfive/visionfive/v2/README.md +++ b/starfive/visionfive/v2/README.md @@ -3,9 +3,7 @@ Create and configure the `flake.nix` file: ``` nix { - # Kernel is broken on riscv64 see https://github.com/NixOS/nixpkgs/issues/225756 - inputs.nixpkgs.url = - "github:nixos/nixpkgs/c3e12e57c3e3d5c84cc500420be4507b3de33e90"; + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; inputs.nixos-hardware.url = "github:nixos/nixos-hardware"; inputs.flake-utils.url = "github:numtide/flake-utils"; outputs = { self, nixpkgs, nixos-hardware, flake-utils }: diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index 91a76454..ffe6a68c 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -5,7 +5,7 @@ lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; consoleLogLevel = lib.mkDefault 7; kernelPackages = - lib.mkDefault (pkgs.callPackage ./linux_6_3.nix { inherit (config.boot) kernelPatches; }); + lib.mkDefault (pkgs.callPackage ./linux-6.3.nix { inherit (config.boot) kernelPatches; }); kernelParams = lib.mkDefault [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ]; diff --git a/starfive/visionfive/v2/linux_6_3.nix b/starfive/visionfive/v2/linux-6.3.nix similarity index 70% rename from starfive/visionfive/v2/linux_6_3.nix rename to starfive/visionfive/v2/linux-6.3.nix index 88c7887a..f35c0711 100644 --- a/starfive/visionfive/v2/linux_6_3.nix +++ b/starfive/visionfive/v2/linux-6.3.nix @@ -14,7 +14,16 @@ let }; inherit modDirVersion; - kernelPatches = [{ patch = ./fix-memory-size.patch; }] ++ kernelPatches; + kernelPatches = [ + { patch = ./fix-memory-size.patch; } + { + patch = fetchpatch { + url = + "https://github.com/torvalds/linux/commit/d83806c4c0cccc0d6d3c3581a11983a9c186a138.diff"; + hash = "sha256-xUnEJkzQRIIBF/0GIpS0Cd+h6OdSiJlyva5xwxtleE0="; + }; + } + ] ++ kernelPatches; structuredExtraConfig = with lib.kernel; { PL330_DMA = no; From 16d6b81a4760d9a4991bcd99b6351e182059cdc5 Mon Sep 17 00:00:00 2001 From: Jakob Leifhelm Date: Sun, 23 Apr 2023 18:11:02 +0200 Subject: [PATCH 0445/1476] starfive visionfive2: Fix cross compilation --- starfive/visionfive/v2/firmware.nix | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/starfive/visionfive/v2/firmware.nix b/starfive/visionfive/v2/firmware.nix index c313068b..97592b3c 100644 --- a/starfive/visionfive/v2/firmware.nix +++ b/starfive/visionfive/v2/firmware.nix @@ -1,11 +1,11 @@ -{ callPackage, runCommand, writeText, stdenv, dtc }: +{ callPackage, pkgsBuildHost, runCommand, writeText, stdenv, dtc }: let uboot = callPackage ./uboot.nix { }; opensbi = callPackage ./opensbi.nix { withPayload = "${uboot}/u-boot.bin"; withFDT = "${uboot}/starfive_visionfive2.dtb"; }; - spl-tool = callPackage ./spl-tool.nix { }; + spl-tool = pkgsBuildHost.callPackage ./spl-tool.nix { }; its-file = writeText "visionfive2-uboot-fit-image.its" '' /dts-v1/; @@ -38,12 +38,17 @@ let ''; in { inherit opensbi uboot; - spl = runCommand "starfive-visionfive2-spl" { } '' - mkdir -p $out/share/starfive-visionfive2/ - ln -s ${uboot}/u-boot-spl.bin . - ${spl-tool}/bin/spl_tool -c -f ./u-boot-spl.bin - cp u-boot-spl.bin.normal.out $out/share/starfive-visionfive2/spl.bin - ''; + spl = stdenv.mkDerivation { + name = "starfive-visionfive2-spl"; + depsBuildBuild = [ spl-tool ]; + phases = [ "installPhase" ]; + installPhase = '' + mkdir -p $out/share/starfive-visionfive2/ + ln -s ${uboot}/u-boot-spl.bin . + spl_tool -c -f ./u-boot-spl.bin + cp u-boot-spl.bin.normal.out $out/share/starfive-visionfive2/spl.bin + ''; + }; uboot-fit-image = stdenv.mkDerivation { name = "starfive-visionfive2-uboot-fit-image"; nativeBuildInputs = [ dtc ]; From 2ce2f3f9789a24f4ddd7f925b7b5f67ec8920e33 Mon Sep 17 00:00:00 2001 From: Jakob Leifhelm Date: Sun, 23 Apr 2023 18:43:25 +0200 Subject: [PATCH 0446/1476] starfive visionfive2: fix flake check --- starfive/visionfive/v2/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/starfive/visionfive/v2/README.md b/starfive/visionfive/v2/README.md index d6655ce3..51e811f4 100644 --- a/starfive/visionfive/v2/README.md +++ b/starfive/visionfive/v2/README.md @@ -5,8 +5,13 @@ Create and configure the `flake.nix` file: { inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; inputs.nixos-hardware.url = "github:nixos/nixos-hardware"; + + # Some dependencies of this flake are not yet available on non linux systems + inputs.systems.url = "github:nix-systems/x86_64-linux"; inputs.flake-utils.url = "github:numtide/flake-utils"; - outputs = { self, nixpkgs, nixos-hardware, flake-utils }: + inputs.flake-utils.inputs.systems.follows = "systems"; + + outputs = { self, nixpkgs, nixos-hardware, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system: rec { packages.default = packages.sd-image; From ba8b9209ce99b572b971678cb7f0341c2f20f518 Mon Sep 17 00:00:00 2001 From: Ganga Ram Date: Wed, 26 Apr 2023 11:46:11 +0400 Subject: [PATCH 0447/1476] Add Microchip Icicle-kit board support. * Uses Linux kernel released by Microchip - https://github.com/linux4microchip/linux.git - Ver: v5.15 Tag: linux4microchip+fpga-2023.02 * Uses UBoot released by Microchip - Ver: uboot-2022-01 Tag: linux4microchip+fpga-2023.02 To generate NixOS sd image for MICROCHIP icicle-kit refer: https://github.com/tiiuae/ghaf.git Signed-off-by: Ganga Ram --- README.md | 1 + flake.nix | 1 + microchip/README.md | 17 +++++ .../common/bsp/hss-payload-generator.nix | 50 ++++++++++++++ microchip/common/bsp/linux-icicle-kit.nix | 69 +++++++++++++++++++ ...nvironment-for-Microchip-Iciclle-Kit.patch | 26 +++++++ microchip/common/bsp/uboot.nix | 32 +++++++++ microchip/common/bsp/uboot.yaml | 36 ++++++++++ microchip/common/modules.nix | 11 +++ microchip/common/overlay.nix | 3 + microchip/icicle-kit/default.nix | 15 ++++ microchip/icicle-kit/overlay.nix | 3 + 12 files changed, 264 insertions(+) create mode 100644 microchip/README.md create mode 100644 microchip/common/bsp/hss-payload-generator.nix create mode 100644 microchip/common/bsp/linux-icicle-kit.nix create mode 100644 microchip/common/bsp/patches/0001-Boot-environment-for-Microchip-Iciclle-Kit.patch create mode 100644 microchip/common/bsp/uboot.nix create mode 100644 microchip/common/bsp/uboot.yaml create mode 100644 microchip/common/modules.nix create mode 100644 microchip/common/overlay.nix create mode 100644 microchip/icicle-kit/default.nix create mode 100644 microchip/icicle-kit/overlay.nix diff --git a/README.md b/README.md index 5da1f796..37e1c754 100644 --- a/README.md +++ b/README.md @@ -198,6 +198,7 @@ See code for all available configurations. | [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | | [MSI GS60 2QE](msi/gs60) | `` | | [MSI GL62/CX62](msi/gl62) | `` | +| [Micrchip Icicle Kit](microchip/icicle-kit) | `` | | [Microsoft Surface Go](microsoft/surface/surface-go) | `` | | [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel)| ``| | [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd)| ``| diff --git a/flake.nix b/flake.nix index 8a2f54f4..853256e2 100644 --- a/flake.nix +++ b/flake.nix @@ -135,6 +135,7 @@ lenovo-thinkpad-z13 = import ./lenovo/thinkpad/z/z13; lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; + microchip-icicle-kit = import ./microchip/icicle-kit; microsoft-surface-go = import ./microsoft/surface/surface-go; microsoft-surface-pro-intel = import ./microsoft/surface/surface-pro-intel; microsoft-surface-laptop-amd = import ./microsoft/surface/surface-laptop-amd; diff --git a/microchip/README.md b/microchip/README.md new file mode 100644 index 00000000..261c799b --- /dev/null +++ b/microchip/README.md @@ -0,0 +1,17 @@ +# Microchip Icicle-kit board support + +## 1. Supported devices + - [Microchip Icicle Kit](https://www.microchip.com/en-us/development-tool/MPFS-ICICLE-KIT-ES) (**mpfs-icicle-kit**) - device-specific U-boot and Linux kernel, nixos configuration example. + +## 2. How to use? +Currently this overlay is used for generating bootable NixOS SD images. + +Code snippet example that enables icicle-kit configuration: +``` +{ nixos-hardware, }: { + system = "aarch64-linux"; + modules = [ + nixos-hardware.nixosModules.icicle-kit + ]; +} +``` diff --git a/microchip/common/bsp/hss-payload-generator.nix b/microchip/common/bsp/hss-payload-generator.nix new file mode 100644 index 00000000..4044d51f --- /dev/null +++ b/microchip/common/bsp/hss-payload-generator.nix @@ -0,0 +1,50 @@ +{ pkgs, ...}: +with pkgs; +stdenv.mkDerivation rec { + pname = "hss"; + version = "v2022.09"; + + src = fetchFromGitHub { + owner = "polarfire-soc"; + repo = "hart-software-services"; + rev = version; + sha256 = "sha256-j/nda7//CjJW09zt/YrBy6h+q+VKE5t/ueXxDzwVWQ0="; + }; + + depsBuildBuild = [ + buildPackages.stdenv.cc + ]; + + nativeBuildInputs = with buildPackages; [ + libyaml + elfutils + openssl + zlib + ]; + + patchPhase = '' + runHook prePatch + + substituteInPlace ./tools/hss-payload-generator/Makefile \ + --replace "/bin/bash" "bash" + + runHook postPatch + ''; + + buildPhase = '' + runHook preBuild + + make -C ./tools/hss-payload-generator + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp ./tools/hss-payload-generator/hss-payload-generator $out + + runHook postConfigure + ''; +} diff --git a/microchip/common/bsp/linux-icicle-kit.nix b/microchip/common/bsp/linux-icicle-kit.nix new file mode 100644 index 00000000..627e7407 --- /dev/null +++ b/microchip/common/bsp/linux-icicle-kit.nix @@ -0,0 +1,69 @@ +{ pkgs, ... } @ args: + +with pkgs; + +buildLinux (args // rec { + version = "5.15.92-linux4microchip+fpga-2023.02"; + + # 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 + ''; + + src = fetchFromGitHub { + owner = "linux4microchip"; + repo = "linux"; + rev = "360a547daec2a69169be49d3da9cca8b1ecb325f"; + sha256 = "sha256-ri2d91bHmcFkV2PjwRNho1XQixKttJKoG/qiOdeB01M="; + }; +} // (args.argsOverride or { })) diff --git a/microchip/common/bsp/patches/0001-Boot-environment-for-Microchip-Iciclle-Kit.patch b/microchip/common/bsp/patches/0001-Boot-environment-for-Microchip-Iciclle-Kit.patch new file mode 100644 index 00000000..164505e0 --- /dev/null +++ b/microchip/common/bsp/patches/0001-Boot-environment-for-Microchip-Iciclle-Kit.patch @@ -0,0 +1,26 @@ +From 2085960b5dfc7058d572cfb90fa349efe9bacdf2 Mon Sep 17 00:00:00 2001 +From: Ganga Ram +Date: Mon, 24 Apr 2023 10:15:22 +0400 +Subject: [PATCH] Boot environment for Microchip Iciclle Kit + +Signed-off-by: Ganga Ram +--- + include/configs/microchip_mpfs_icicle.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/include/configs/microchip_mpfs_icicle.h b/include/configs/microchip_mpfs_icicle.h +index 9ef5425c9f..c8a1f7c9df 100644 +--- a/include/configs/microchip_mpfs_icicle.h ++++ b/include/configs/microchip_mpfs_icicle.h +@@ -71,6 +71,9 @@ + #define CONFIG_EXTRA_ENV_SETTINGS \ + "bootm_size=0x10000000\0" \ + "scriptaddr=0x8e000000\0" \ ++ "kernel_addr_r=0x8e000000\0" \ ++ "ramdisk_addr_r=0x90000000\0" \ ++ "fdt_addr_r=0x92000000\0" \ + BOOTENV_DESIGN_OVERLAYS \ + BOOTENV \ + +-- +2.39.2 diff --git a/microchip/common/bsp/uboot.nix b/microchip/common/bsp/uboot.nix new file mode 100644 index 00000000..900547b0 --- /dev/null +++ b/microchip/common/bsp/uboot.nix @@ -0,0 +1,32 @@ +{ + pkgs, targetBoard, ... +}: + +with pkgs; let + payload-generator = pkgs.callPackage ./hss-payload-generator.nix {}; + payload_config = ./uboot.yaml; +in +buildUBoot rec { + pname = "uboot"; + version = "linux4microchip+fpga-2023.02"; + + src = fetchFromGitHub { + owner = "polarfire-soc"; + repo = "u-boot"; + rev = "b356a897b11ef19dcbe7870530f23f3a978c1714"; + sha256 = "sha256-ouNLnDBeEsaY/xr5tAVBUtLlj0eylWbKdlU+bQ2Ciq4="; + }; + + extraMakeFlags = [ + "OPENSBI=${opensbi}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin" + ]; + + patches = [ ./patches/0001-Boot-environment-for-Microchip-Iciclle-Kit.patch ]; + defconfig = "${targetBoard}_defconfig"; + enableParallelBuilding = true; + extraMeta.platforms = ["riscv64-linux"]; + postBuild = '' + ${payload-generator}/hss-payload-generator -c ${payload_config} payload.bin + ''; + filesToInstall = [ "payload.bin" ]; +} diff --git a/microchip/common/bsp/uboot.yaml b/microchip/common/bsp/uboot.yaml new file mode 100644 index 00000000..7cb69d32 --- /dev/null +++ b/microchip/common/bsp/uboot.yaml @@ -0,0 +1,36 @@ +# +# HSS Payload Generator - sample configuration file +# + +# First, we can optionally set a name for our image, otherwise one will be created +# dynamically +set-name: 'PolarFire-SoC-HSS::U-Boot' + +# +# Next, we'll define the entry point addresses for each hart, as follows: +# +hart-entry-points: {u54_1: '0x80200000', u54_2: '0x80200000', u54_3: '0x80200000', u54_4: '0x80200000'} + +# +# Finally, we'll define some payloads (source ELF files) that will be placed at certain +# regions in memory +# The payload section is defined with the keyword payloads, and then a number of +# individual +# payload descriptors. +# +# Each payload has a name (path to its ELF file), an owner-hart, and optionally 1-3 +# secondary-harts. +# +# Additionally, it has a privilege mode in which it will start execution. +# * Valid privilege modes are PRV_M, PRV_S and PRV_U. +# +# +# In the following example: +# * test/u-boot-icicle-kit-es-2020.10-r0.bin is the Das U-Boot bootloader (binary + +# concatenated DTB), and it runs on U54_1, U54_2 and U54_4. +# It expects to start in PRV_S. +# +# Case only matters for the ELF path names, not the keywords. +# +payloads: + u-boot.bin: {exec-addr: '0x80200000', owner-hart: u54_1, secondary-hart: u54_2, secondary-hart: u54_3, secondary-hart: u54_4, priv-mode: prv_s} diff --git a/microchip/common/modules.nix b/microchip/common/modules.nix new file mode 100644 index 00000000..9876b19f --- /dev/null +++ b/microchip/common/modules.nix @@ -0,0 +1,11 @@ +{ pkgs, lib, ... }: { + nixpkgs.overlays = [ + (import ./overlay.nix) + ]; + + boot = { + kernelPackages = pkgs.linuxPackagesFor pkgs.linux-icicle-kit; + initrd.includeDefaultModules = lib.mkForce false; + }; + +} diff --git a/microchip/common/overlay.nix b/microchip/common/overlay.nix new file mode 100644 index 00000000..007756ca --- /dev/null +++ b/microchip/common/overlay.nix @@ -0,0 +1,3 @@ +final: prev: { + linux-icicle-kit = final.callPackage ./bsp/linux-icicle-kit.nix { pkgs = final; boot = prev.uboot-icicle-kit; }; +} diff --git a/microchip/icicle-kit/default.nix b/microchip/icicle-kit/default.nix new file mode 100644 index 00000000..19fb228a --- /dev/null +++ b/microchip/icicle-kit/default.nix @@ -0,0 +1,15 @@ +{ pkgs, lib, ... }: + +{ + nixpkgs.overlays = [ + (import ./overlay.nix) + ]; + + imports = [ + ../common/modules.nix + ]; + + hardware.deviceTree = { + name = "microchip/mpfs-icicle-kit.dtb"; + }; +} diff --git a/microchip/icicle-kit/overlay.nix b/microchip/icicle-kit/overlay.nix new file mode 100644 index 00000000..f145dcf6 --- /dev/null +++ b/microchip/icicle-kit/overlay.nix @@ -0,0 +1,3 @@ +final: _prev: { + uboot-icicle-kit = final.callPackage ./../common/bsp/uboot.nix { pkgs = final; targetBoard = "microchip_mpfs_icicle";}; +} From b13c895f11f41e7f64d150074845252a927c56c5 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sat, 29 Apr 2023 11:18:48 +0100 Subject: [PATCH 0448/1476] Add config for Dell XPS 15 9520 --- dell/xps/15-9520/README.wiki | 22 ++++++++++++++++++++++ dell/xps/15-9520/default.nix | 18 ++++++++++++++++++ dell/xps/15-9520/nvidia/default.nix | 15 +++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 dell/xps/15-9520/README.wiki create mode 100644 dell/xps/15-9520/default.nix create mode 100644 dell/xps/15-9520/nvidia/default.nix diff --git a/dell/xps/15-9520/README.wiki b/dell/xps/15-9520/README.wiki new file mode 100644 index 00000000..dff5b2bc --- /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 00000000..f4b0eecd --- /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 00000000..257462a4 --- /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"; + }; +} From b0fd96252521a42c2c691c7eb0fffb958b6f49b4 Mon Sep 17 00:00:00 2001 From: Jakob Leifhelm Date: Sat, 29 Apr 2023 16:50:06 +0200 Subject: [PATCH 0449/1476] starfive visionfive2: update u-boot --- starfive/visionfive/v2/uboot.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/starfive/visionfive/v2/uboot.nix b/starfive/visionfive/v2/uboot.nix index 6a6cd65f..be156b79 100644 --- a/starfive/visionfive/v2/uboot.nix +++ b/starfive/visionfive/v2/uboot.nix @@ -6,8 +6,8 @@ buildUBoot { src = fetchFromGitHub { owner = "starfive-tech"; repo = "u-boot"; - rev = "688befadf1d337dee3593e6cc0fe1c737cc150bd"; - sha256 = "sha256-RGADEJRZyuzjblxowdHnhj78eMJBIWnvkwEcpSen5Oo="; + rev = "ac0ac696256abf412826d74ee918dd417e207d7b"; + sha256 = "sha256-cyEMKkTIiET8hnWgD6poZSzfjmRAqUtyRQM0yvNY230="; }; defconfig = "starfive_visionfive2_defconfig"; From 0cfe255229e2f617377feaceb3e890d9cf884125 Mon Sep 17 00:00:00 2001 From: Jakob Leifhelm Date: Sat, 29 Apr 2023 16:50:43 +0200 Subject: [PATCH 0450/1476] starfive visionfive2: update kernel --- starfive/visionfive/v2/default.nix | 9 ++++----- starfive/visionfive/v2/linux-6.3.nix | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index ffe6a68c..ee1ab3fa 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -4,15 +4,14 @@ supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; consoleLogLevel = lib.mkDefault 7; - kernelPackages = - lib.mkDefault (pkgs.callPackage ./linux-6.3.nix { inherit (config.boot) kernelPatches; }); + kernelPackages = lib.mkDefault (pkgs.callPackage ./linux-6.3.nix { + inherit (config.boot) kernelPatches; + }); kernelParams = lib.mkDefault [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ]; - initrd.availableKernelModules = [ - "dw_mmc_starfive" - ]; + initrd.availableKernelModules = [ "dw_mmc_starfive" ]; loader = { grub.enable = lib.mkDefault false; diff --git a/starfive/visionfive/v2/linux-6.3.nix b/starfive/visionfive/v2/linux-6.3.nix index f35c0711..0a07584b 100644 --- a/starfive/visionfive/v2/linux-6.3.nix +++ b/starfive/visionfive/v2/linux-6.3.nix @@ -1,7 +1,7 @@ { lib, callPackage, linuxPackagesFor, kernelPatches, fetchpatch, ... }: let - modDirVersion = "6.3.0-rc3"; + modDirVersion = "6.3.0-rc4"; linuxPkg = { lib, fetchFromGitHub, buildLinux, ... }@args: buildLinux (args // { version = "${modDirVersion}-starfive-visionfive2"; @@ -9,8 +9,8 @@ let src = fetchFromGitHub { owner = "starfive-tech"; repo = "linux"; - rev = "2a6909fb414dfc72ae391791ec6edc3eedd13e6f"; - sha256 = "sha256-FeY6N+hk0PTpuIuA1hkcS+B+ozn6iHV6YaRVx1kuYHc="; + rev = "a57bdb1d13f93c8fc1b3c668cc74d585bb20f3f8"; + sha256 = "sha256-jnQnJChIGCyJt+zwGfUTsMhrwmWek/ngIM6Pae6OXuI="; }; inherit modDirVersion; From 576903907ae821792bdf82cdbb09e81e5d8972b1 Mon Sep 17 00:00:00 2001 From: angelos Date: Sat, 29 Apr 2023 00:36:47 +0300 Subject: [PATCH 0451/1476] add dell precision 3541 --- README.md | 1 + dell/precision/3541/default.nix | 28 +++++++++++++++++++++++++++ dell/precision/3541/intel/default.nix | 9 +++++++++ 3 files changed, 38 insertions(+) create mode 100644 dell/precision/3541/default.nix create mode 100644 dell/precision/3541/intel/default.nix diff --git a/README.md b/README.md index 5da1f796..e2e8c42e 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) | `` | diff --git a/dell/precision/3541/default.nix b/dell/precision/3541/default.nix new file mode 100644 index 00000000..0dc2d744 --- /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 00000000..78a839d4 --- /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 + ]; +} From 03548beefd2a015e8db3e5f6171bbdd5435f2fc1 Mon Sep 17 00:00:00 2001 From: angelos Date: Sun, 30 Apr 2023 14:01:13 +0300 Subject: [PATCH 0452/1476] add dell precision 3541 to flake.nix --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 8a2f54f4..6ab4e707 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; From 8792ddc50c954685c5588e53dccf49847e5a1e54 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Sun, 30 Apr 2023 16:38:50 +0100 Subject: [PATCH 0453/1476] Add Dell XPS 9520 to flake and README --- README.md | 2 ++ flake.nix | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index af1ac317..2966b7f8 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,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/flake.nix b/flake.nix index c276c1d9..c506f4fb 100644 --- a/flake.nix +++ b/flake.nix @@ -44,6 +44,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; From 23ac1ecb8fdccbf880c0d051b5df69745543db3e Mon Sep 17 00:00:00 2001 From: Idris Raja Date: Mon, 1 May 2023 20:57:22 -0500 Subject: [PATCH 0454/1476] Update README.md fix bad link --- microsoft/surface/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/surface/README.md b/microsoft/surface/README.md index b7887525..197a5461 100644 --- a/microsoft/surface/README.md +++ b/microsoft/surface/README.md @@ -1,6 +1,6 @@ # NOTE: Structure changes from 2023-01-10 -Please read the [Deprecated Behaviour README](./OLD-BEHAVIOUR-DEPRECATED.md) to understand how some structural changes to +Please read the [Deprecated Behaviour README](./OLD-BEHAVIOUR-DEPRECATION.md) to understand how some structural changes to the code might affect you! # Derivations for Microsoft Surface notebooks From adab6fd8e96ee67f8b7afbf91a7e990694d76e52 Mon Sep 17 00:00:00 2001 From: Mateusz Majewski Date: Mon, 1 May 2023 14:02:01 +0200 Subject: [PATCH 0455/1476] hardkernel/odroid-hc4: fix fancontrol on 5.15 kernel Source for the fancontrol config mentions that one of the lines should be deleted for the 5.15 kernel. Fixes #616. Co-authored-by: Sandro --- hardkernel/odroid-hc4/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hardkernel/odroid-hc4/default.nix b/hardkernel/odroid-hc4/default.nix index 804e6b7e..e591a871 100644 --- a/hardkernel/odroid-hc4/default.nix +++ b/hardkernel/odroid-hc4/default.nix @@ -1,22 +1,28 @@ -{ lib, ... }: +{ config, lib, ... }: { # Based on the config from https://www.armbian.com/odroid-hc4/ hardware.fancontrol = { enable = lib.mkDefault true; - config = lib.mkDefault '' + config = let + # According to https://www.armbian.com/odroid-hc4/ the FCFANS line should be removed on kernel 5.15. + kernelVersion = config.boot.kernelPackages.kernel.version; + needFcFans = lib.versions.majorMinor kernelVersion != "5.15"; + in lib.mkDefault ('' INTERVAL=10 DEVPATH=hwmon0=devices/virtual/thermal/thermal_zone0 hwmon2=devices/platform/pwm-fan DEVNAME=hwmon0=cpu_thermal hwmon2=pwmfan FCTEMPS=hwmon2/pwm1=hwmon0/temp1_input + '' + lib.optionalString needFcFans '' FCFANS= hwmon2/pwm1=hwmon2/fan1_input + '' + '' MINTEMP=hwmon2/pwm1=50 MAXTEMP=hwmon2/pwm1=60 MINSTART=hwmon2/pwm1=20 MINSTOP=hwmon2/pwm1=28 MINPWM=hwmon2/pwm1=0 MAXPWM=hwmon2/pwm1=255 - ''; + ''); }; # Linux 5.15 sometimes crash under heavy network usage From 31f8d1c36431153b98606e0b0c4427140ab8dc69 Mon Sep 17 00:00:00 2001 From: Paul Jewell Date: Fri, 5 May 2023 06:59:00 +0100 Subject: [PATCH 0456/1476] Added Lenovo Thinkpad x390 --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/x390/default.nix | 13 +++++++++++++ 3 files changed, 15 insertions(+) create mode 100644 lenovo/thinkpad/x390/default.nix diff --git a/README.md b/README.md index 5da1f796..efc488cc 100644 --- a/README.md +++ b/README.md @@ -193,6 +193,7 @@ See code for all available configurations. | [Lenovo ThinkPad X260](lenovo/thinkpad/x260) | `` | | [Lenovo ThinkPad X270](lenovo/thinkpad/x270) | `` | | [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | +| [Lenovo ThinkPad X390](lenovo/thinkpad/x390) | `` | | [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | | [Lenovo ThinkPad Z13](lenovo/thinkpad/z/z13) | `` | | [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | diff --git a/flake.nix b/flake.nix index 8a2f54f4..7f38edd4 100644 --- a/flake.nix +++ b/flake.nix @@ -131,6 +131,7 @@ lenovo-thinkpad-x260 = import ./lenovo/thinkpad/x260; lenovo-thinkpad-x270 = import ./lenovo/thinkpad/x270; lenovo-thinkpad-x280 = import ./lenovo/thinkpad/x280; + lenovo-thinkpad-x390 = import ./lenovo/thinkpad/x390; lenovo-thinkpad-z = import ./lenovo/thinkpad/z; lenovo-thinkpad-z13 = import ./lenovo/thinkpad/z/z13; lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; diff --git a/lenovo/thinkpad/x390/default.nix b/lenovo/thinkpad/x390/default.nix new file mode 100644 index 00000000..19a030c3 --- /dev/null +++ b/lenovo/thinkpad/x390/default.nix @@ -0,0 +1,13 @@ +{ lib, ... }: + +{ + imports = [ + ../. + ../../../common/cpu/intel + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/ssd/default.nix + ]; + + services.throttled.enable = lib.mkDefault true; +} + From d626c3f873e20e56f59bea88430f83328a355933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 5 May 2023 08:35:58 +0200 Subject: [PATCH 0457/1476] add missing nxp boards This was an overside in https://github.com/NixOS/nixos-hardware/pull/556 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7f68e2a3..ab6c0e5a 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,7 @@ See code for all available configurations. | [GPD WIN 2](gpd/win-2) | `` | | [Google Pixelbook](google/pixelbook) | `` | | [HP Elitebook 2560p](hp/elitebook/2560p) | `` | +| [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | From db08b1f13fe125d3dfeac89745ea3f362442eede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 5 May 2023 08:45:09 +0200 Subject: [PATCH 0458/1476] tests: fix conflicts with profiles using grub --- tests/build-profile.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/build-profile.nix b/tests/build-profile.nix index 0d477b2d..b28d9521 100644 --- a/tests/build-profile.nix +++ b/tests/build-profile.nix @@ -3,6 +3,8 @@ let shim = { config, ... }: { boot.loader.systemd-boot.enable = !config.boot.loader.generic-extlinux-compatible.enable && !config.boot.loader.raspberryPi.enable; + # we forcefully disable grub here just for testing purposes, even though some profiles might still use grub in the end. + boot.loader.grub.enable = false; fileSystems."/" = { device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000"; From c84a8f242331c513a310aff7ebf83cabd11de3bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 5 May 2023 08:17:52 +0200 Subject: [PATCH 0459/1476] nxp-imx8: drop kernel overlay With overlays one cannot re-use nixpkgs across different machines, which is a performance issues. In this instance it's not really needed. --- nxp/common/modules.nix | 6 +----- nxp/common/overlay.nix | 3 --- nxp/imx8qm-mek/default.nix | 4 ++-- 3 files changed, 3 insertions(+), 10 deletions(-) delete mode 100644 nxp/common/overlay.nix diff --git a/nxp/common/modules.nix b/nxp/common/modules.nix index 4bc9df4c..16bf0ca4 100644 --- a/nxp/common/modules.nix +++ b/nxp/common/modules.nix @@ -1,12 +1,8 @@ { pkgs, lib, ... }: { - nixpkgs.overlays = [ - (import ./overlay.nix) - ]; - nixpkgs.hostPlatform = "aarch64-linux"; boot = { - kernelPackages = pkgs.linuxPackagesFor pkgs.linux_imx8; + kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/linux-imx8.nix { }); kernelParams = [ "console=ttyLP0,115200n8" ]; loader.grub.enable = lib.mkDefault true; initrd.includeDefaultModules = lib.mkForce false; diff --git a/nxp/common/overlay.nix b/nxp/common/overlay.nix deleted file mode 100644 index 61c0853b..00000000 --- a/nxp/common/overlay.nix +++ /dev/null @@ -1,3 +0,0 @@ -final: prev: { - linux_imx8 = final.callPackage ./bsp/linux-imx8.nix { pkgs = final; }; -} diff --git a/nxp/imx8qm-mek/default.nix b/nxp/imx8qm-mek/default.nix index 05f243c3..4974455c 100644 --- a/nxp/imx8qm-mek/default.nix +++ b/nxp/imx8qm-mek/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ pkgs, ... }: { nixpkgs.overlays = [ @@ -10,7 +10,7 @@ ]; boot.loader.grub.extraFiles = { - "imx8qm-mek.dtb" = "${pkgs.linux_imx8}/dtbs/freescale/imx8qm-mek.dtb"; + "imx8qm-mek.dtb" = "${pkgs.callPackage ../common/bsp/linux-imx8.nix { }}/dtbs/freescale/imx8qm-mek.dtb"; }; hardware.deviceTree = { From 1ffd9949eef6ae6db3bde1ccd1565605dff12932 Mon Sep 17 00:00:00 2001 From: Florian Brandes Date: Thu, 11 May 2023 21:29:42 +0200 Subject: [PATCH 0460/1476] raspberry-pi."4": update poe hat overlay to work with newer kernel fixes #626 Signed-off-by: Florian Brandes --- raspberry-pi/4/poe-hat.nix | 101 ++++++++++--------- raspberry-pi/4/poe-plus-hat.nix | 169 +++++++++++++++++--------------- 2 files changed, 144 insertions(+), 126 deletions(-) diff --git a/raspberry-pi/4/poe-hat.nix b/raspberry-pi/4/poe-hat.nix index 6759f42f..e631c126 100644 --- a/raspberry-pi/4/poe-hat.nix +++ b/raspberry-pi/4/poe-hat.nix @@ -16,7 +16,7 @@ in { hardware.deviceTree = { overlays = [ - # Equivalent to: https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts + # Equivalent to: https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts { name = "rpi-poe-overlay"; dtsText = '' @@ -27,7 +27,7 @@ in { /plugin/; / { - compatible = "brcm,bcm2711"; + compatible = "brcm,bcm2835"; fragment@0 { target-path = "/"; @@ -44,50 +44,59 @@ in { fragment@1 { target = <&cpu_thermal>; __overlay__ { - trips { - trip0: trip0 { - temperature = <40000>; - hysteresis = <2000>; - type = "active"; - }; - trip1: trip1 { - temperature = <45000>; - hysteresis = <2000>; - type = "active"; - }; - trip2: trip2 { - temperature = <50000>; - hysteresis = <2000>; - type = "active"; - }; - trip3: trip3 { - temperature = <55000>; - hysteresis = <5000>; - type = "active"; - }; - }; - cooling-maps { - map0 { - trip = <&trip0>; - cooling-device = <&fan 0 1>; - }; - map1 { - trip = <&trip1>; - cooling-device = <&fan 1 2>; - }; - map2 { - trip = <&trip2>; - cooling-device = <&fan 2 3>; - }; - map3 { - trip = <&trip3>; - cooling-device = <&fan 3 4>; - }; - }; + polling-delay = <2000>; /* milliseconds */ }; }; fragment@2 { + target = <&thermal_trips>; + __overlay__ { + trip0: trip0 { + temperature = <40000>; + hysteresis = <2000>; + type = "active"; + }; + trip1: trip1 { + temperature = <45000>; + hysteresis = <2000>; + type = "active"; + }; + trip2: trip2 { + temperature = <50000>; + hysteresis = <2000>; + type = "active"; + }; + trip3: trip3 { + temperature = <55000>; + hysteresis = <5000>; + type = "active"; + }; + }; + }; + + fragment@3 { + target = <&cooling_maps>; + __overlay__ { + map0 { + trip = <&trip0>; + cooling-device = <&fan 0 1>; + }; + map1 { + trip = <&trip1>; + cooling-device = <&fan 1 2>; + }; + map2 { + trip = <&trip2>; + cooling-device = <&fan 2 3>; + }; + map3 { + trip = <&trip3>; + cooling-device = <&fan 3 4>; + }; + }; + }; + + fragment@4 { target-path = "/__overrides__"; params: __overlay__ { poe_fan_temp0 = <&trip0>,"temperature:0"; @@ -104,7 +113,7 @@ in { }; }; - fragment@3 { + fragment@5 { target = <&firmware>; __overlay__ { fwpwm: pwm { @@ -114,7 +123,7 @@ in { }; }; - fragment@4 { + fragment@6 { target = <&i2c0>; i2c_bus: __overlay__ { #address-cells = <1>; @@ -135,14 +144,14 @@ in { }; }; - fragment@5 { + fragment@7 { target = <&i2c0if>; __dormant__ { status = "okay"; }; }; - fragment@6 { + fragment@8 { target = <&i2c0mux>; __dormant__ { status = "okay"; diff --git a/raspberry-pi/4/poe-plus-hat.nix b/raspberry-pi/4/poe-plus-hat.nix index e0627b69..e7309c8b 100644 --- a/raspberry-pi/4/poe-plus-hat.nix +++ b/raspberry-pi/4/poe-plus-hat.nix @@ -1,6 +1,6 @@ { config, lib, ... }: -let +let cfg = config.hardware.raspberry-pi."4".poe-plus-hat; in { options.hardware = { @@ -17,8 +17,8 @@ in { hardware.deviceTree = { overlays = [ # Combined equivalent to: - # * https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts - # * https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/rpi-poe-plus-overlay.dts + # * https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts + # * https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-plus-overlay.dts { name = "rpi-poe-plus-overlay"; dtsText = '' @@ -29,7 +29,7 @@ in { /plugin/; / { - compatible = "brcm,bcm2711"; + compatible = "brcm,bcm2835"; fragment@0 { target-path = "/"; @@ -46,50 +46,59 @@ in { fragment@1 { target = <&cpu_thermal>; __overlay__ { - trips { - trip0: trip0 { - temperature = <40000>; - hysteresis = <2000>; - type = "active"; - }; - trip1: trip1 { - temperature = <45000>; - hysteresis = <2000>; - type = "active"; - }; - trip2: trip2 { - temperature = <50000>; - hysteresis = <2000>; - type = "active"; - }; - trip3: trip3 { - temperature = <55000>; - hysteresis = <5000>; - type = "active"; - }; - }; - cooling-maps { - map0 { - trip = <&trip0>; - cooling-device = <&fan 0 1>; - }; - map1 { - trip = <&trip1>; - cooling-device = <&fan 1 2>; - }; - map2 { - trip = <&trip2>; - cooling-device = <&fan 2 3>; - }; - map3 { - trip = <&trip3>; - cooling-device = <&fan 3 4>; - }; - }; + polling-delay = <2000>; /* milliseconds */ }; }; fragment@2 { + target = <&thermal_trips>; + __overlay__ { + trip0: trip0 { + temperature = <40000>; + hysteresis = <2000>; + type = "active"; + }; + trip1: trip1 { + temperature = <45000>; + hysteresis = <2000>; + type = "active"; + }; + trip2: trip2 { + temperature = <50000>; + hysteresis = <2000>; + type = "active"; + }; + trip3: trip3 { + temperature = <55000>; + hysteresis = <5000>; + type = "active"; + }; + }; + }; + + fragment@3 { + target = <&cooling_maps>; + __overlay__ { + map0 { + trip = <&trip0>; + cooling-device = <&fan 0 1>; + }; + map1 { + trip = <&trip1>; + cooling-device = <&fan 1 2>; + }; + map2 { + trip = <&trip2>; + cooling-device = <&fan 2 3>; + }; + map3 { + trip = <&trip3>; + cooling-device = <&fan 3 4>; + }; + }; + }; + + fragment@4 { target-path = "/__overrides__"; params: __overlay__ { poe_fan_temp0 = <&trip0>,"temperature:0"; @@ -106,7 +115,7 @@ in { }; }; - fragment@3 { + fragment@5 { target = <&firmware>; __overlay__ { fwpwm: pwm { @@ -116,7 +125,7 @@ in { }; }; - fragment@4 { + fragment@6 { target = <&i2c0>; i2c_bus: __overlay__ { #address-cells = <1>; @@ -137,14 +146,14 @@ in { }; }; - fragment@5 { + fragment@7 { target = <&i2c0if>; __dormant__ { status = "okay"; }; }; - fragment@6 { + fragment@8 { target = <&i2c0mux>; __dormant__ { status = "okay"; @@ -172,48 +181,48 @@ in { // Overlay for the Raspberry Pi PoE+ HAT. / { - compatible = "brcm,bcm2711"; + compatible = "brcm,bcm2835"; - fragment@10 { - target-path = "/"; - __overlay__ { - rpi_poe_power_supply: rpi-poe-power-supply { - compatible = "raspberrypi,rpi-poe-power-supply"; - firmware = <&firmware>; - status = "okay"; - }; - }; + fragment@10 { + target-path = "/"; + __overlay__ { + rpi_poe_power_supply: rpi-poe-power-supply { + compatible = "raspberrypi,rpi-poe-power-supply"; + firmware = <&firmware>; + status = "okay"; + }; }; - fragment@11 { - target = <&poe_mfd>; - __overlay__ { - rpi-poe-power-supply@f2 { - compatible = "raspberrypi,rpi-poe-power-supply"; - reg = <0xf2>; - status = "okay"; - }; - }; + }; + fragment@11 { + target = <&poe_mfd>; + __overlay__ { + rpi-poe-power-supply@f2 { + compatible = "raspberrypi,rpi-poe-power-supply"; + reg = <0xf2>; + status = "okay"; + }; }; + }; - __overrides__ { - i2c = <0>, "+5+6", - <&fwpwm>,"status=disabled", - <&rpi_poe_power_supply>,"status=disabled", - <&i2c_bus>,"status=okay", - <&poe_mfd>,"status=okay", - <&fan>,"pwms:0=",<&poe_mfd_pwm>; - }; + __overrides__ { + i2c = <0>, "+5+6", + <&fwpwm>,"status=disabled", + <&rpi_poe_power_supply>,"status=disabled", + <&i2c_bus>,"status=okay", + <&poe_mfd>,"status=okay", + <&fan>,"pwms:0=",<&poe_mfd_pwm>; + }; }; &fan { - cooling-levels = <0 32 64 128 255>; + cooling-levels = <0 32 64 128 255>; }; ¶ms { - poe_fan_i2c = <&fwpwm>,"status=disabled", - <&rpi_poe_power_supply>,"status=disabled", - <&poe_mfd>,"status=okay", - <&fan>,"pwms:0=",<&poe_mfd_pwm>; + poe_fan_i2c = <&fwpwm>,"status=disabled", + <&rpi_poe_power_supply>,"status=disabled", + <&poe_mfd>,"status=okay", + <&fan>,"pwms:0=",<&poe_mfd_pwm>; }; ''; } From 40a9f0ed77b720db44b49c6dbc049d0920952d91 Mon Sep 17 00:00:00 2001 From: Florian Brandes Date: Fri, 12 May 2023 17:57:39 +0200 Subject: [PATCH 0461/1476] raspberry-pi."4": add assertion and update some source comments Signed-off-by: Florian Brandes --- raspberry-pi/4/backlight.nix | 3 ++- raspberry-pi/4/default.nix | 10 +++++++++- raspberry-pi/4/modesetting.nix | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/raspberry-pi/4/backlight.nix b/raspberry-pi/4/backlight.nix index f8714216..31c0e906 100644 --- a/raspberry-pi/4/backlight.nix +++ b/raspberry-pi/4/backlight.nix @@ -16,8 +16,9 @@ in hardware.deviceTree = { overlays = [ # This overlay was originally taken from: - # https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts + # https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts # The only modification made was to change the compatible field to bcm2711 + # this is the same as for the 5.15.y kernel { name = "rpi-backlight-overlay"; dtsText = '' diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index 6101698b..acbfcf0c 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, pkgs, config, ... }: { imports = [ @@ -34,6 +34,14 @@ hardware.deviceTree.filter = "bcm2711-rpi-*.dtb"; + + assertions = [ + { + assertion = (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1"); + message = "This version of raspberry pi 4 dts overlays requires a newer kernel version (>=6.1). Please upgrade nixpkgs for this system."; + } + ]; + # Required for the Wireless firmware hardware.enableRedistributableFirmware = true; } diff --git a/raspberry-pi/4/modesetting.nix b/raspberry-pi/4/modesetting.nix index b1f734b3..b74e686f 100644 --- a/raspberry-pi/4/modesetting.nix +++ b/raspberry-pi/4/modesetting.nix @@ -31,7 +31,7 @@ in hardware.deviceTree = { overlays = [ # Equivalent to: - # https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/cma-overlay.dts + # https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/cma-overlay.dts { name = "rpi4-cma-overlay"; dtsText = '' @@ -52,7 +52,7 @@ in ''; } # Equivalent to: - # https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts + # https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts { name = "rpi4-vc4-fkms-v3d-overlay"; dtsText = '' From aa85ea337b275c3aeb6ce8b4fe5ff621a2842502 Mon Sep 17 00:00:00 2001 From: Florian Brandes Date: Fri, 12 May 2023 18:01:50 +0200 Subject: [PATCH 0462/1476] raspberry-pi."4": fix compatible string Signed-off-by: Florian Brandes --- raspberry-pi/4/poe-hat.nix | 2 +- raspberry-pi/4/poe-plus-hat.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/raspberry-pi/4/poe-hat.nix b/raspberry-pi/4/poe-hat.nix index e631c126..b31dc42f 100644 --- a/raspberry-pi/4/poe-hat.nix +++ b/raspberry-pi/4/poe-hat.nix @@ -27,7 +27,7 @@ in { /plugin/; / { - compatible = "brcm,bcm2835"; + compatible = "brcm,bcm2711"; fragment@0 { target-path = "/"; diff --git a/raspberry-pi/4/poe-plus-hat.nix b/raspberry-pi/4/poe-plus-hat.nix index e7309c8b..e6f806f7 100644 --- a/raspberry-pi/4/poe-plus-hat.nix +++ b/raspberry-pi/4/poe-plus-hat.nix @@ -29,7 +29,7 @@ in { /plugin/; / { - compatible = "brcm,bcm2835"; + compatible = "brcm,bcm2711"; fragment@0 { target-path = "/"; @@ -181,7 +181,7 @@ in { // Overlay for the Raspberry Pi PoE+ HAT. / { - compatible = "brcm,bcm2835"; + compatible = "brcm,bcm2711"; fragment@10 { target-path = "/"; From 5febaab6bd0e119a3f6223aa219e614c02593d06 Mon Sep 17 00:00:00 2001 From: Florian Brandes Date: Fri, 12 May 2023 19:47:31 +0200 Subject: [PATCH 0463/1476] raspberry-pi."4": fix build error with poe-hat, because of incompatibility with compute module Signed-off-by: Florian Brandes --- raspberry-pi/4/default.nix | 2 +- raspberry-pi/4/poe-hat.nix | 2 ++ raspberry-pi/4/poe-plus-hat.nix | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index acbfcf0c..7c442ff3 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -32,7 +32,7 @@ }; }; - hardware.deviceTree.filter = "bcm2711-rpi-*.dtb"; + hardware.deviceTree.filter = lib.mkDefault "bcm2711-rpi-*.dtb"; assertions = [ diff --git a/raspberry-pi/4/poe-hat.nix b/raspberry-pi/4/poe-hat.nix index b31dc42f..5d6cf8d0 100644 --- a/raspberry-pi/4/poe-hat.nix +++ b/raspberry-pi/4/poe-hat.nix @@ -13,6 +13,8 @@ in { config = lib.mkIf cfg.enable { hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true; + # doesn't work for the CM module, so we exclude e.g. bcm2711-rpi-cm4.dts + hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb"; hardware.deviceTree = { overlays = [ diff --git a/raspberry-pi/4/poe-plus-hat.nix b/raspberry-pi/4/poe-plus-hat.nix index e6f806f7..bd7c28ec 100644 --- a/raspberry-pi/4/poe-plus-hat.nix +++ b/raspberry-pi/4/poe-plus-hat.nix @@ -13,6 +13,8 @@ in { config = lib.mkIf cfg.enable { hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true; + # doesn't work for the CM module, so we exclude e.g. bcm2711-rpi-cm4.dts + hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb"; hardware.deviceTree = { overlays = [ From e39036d599ad51d6a3f77f7e96bfa630f4991410 Mon Sep 17 00:00:00 2001 From: ghostbuster91 Date: Sat, 6 May 2023 15:47:54 +0200 Subject: [PATCH 0464/1476] feat: Add focus m2 gen1 --- README.md | 1 + flake.nix | 1 + focus/m2/gen1/default.nix | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 focus/m2/gen1/default.nix diff --git a/README.md b/README.md index 83aaf389..59a923cd 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,7 @@ See code for all available configurations. | [Framework](framework) | `` | | [Framework 12th Gen Intel Core](framework/12th-gen-intel) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | +| [Focus M2 Gen 1](focus/m2/gen1) | `` | | [GPD MicroPC](gpd/micropc) | `` | | [GPD P2 Max](gpd/p2-max) | `` | | [GPD Pocket 3](gpd/pocket-3) | `` | diff --git a/flake.nix b/flake.nix index b6581156..c6348dc1 100644 --- a/flake.nix +++ b/flake.nix @@ -58,6 +58,7 @@ framework = import ./framework; framework-12th-gen-intel = import ./framework/12th-gen-intel; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; + focus-m2-gen1 = import ./focus/m2/gen1; google-pixelbook = import ./google/pixelbook; gpd-micropc = import ./gpd/micropc; gpd-p2-max = import ./gpd/p2-max; diff --git a/focus/m2/gen1/default.nix b/focus/m2/gen1/default.nix new file mode 100644 index 00000000..9c7e207b --- /dev/null +++ b/focus/m2/gen1/default.nix @@ -0,0 +1,27 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/nvidia/prime.nix + ../../../common/pc/laptop + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/ssd + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.blacklistedKernelModules = [ "i2c_nvidia_gpu" ]; + + hardware.nvidia.modesetting.enable = lib.mkDefault true; + hardware.opengl = { + enable = lib.mkDefault true; + driSupport = lib.mkDefault true; + driSupport32Bit = lib.mkDefault true; + }; + + hardware.nvidia.prime = { + intelBusId = lib.mkDefault "PCI:0:2:0"; + nvidiaBusId = lib.mkDefault "PCI:1:0:0"; + }; +} From c256df331235ce369fdd49c00989fdaa95942934 Mon Sep 17 00:00:00 2001 From: Alexandre Acebedo Date: Wed, 10 May 2023 20:03:02 +0200 Subject: [PATCH 0465/1476] cpu/amd/pstate: change the pstate mode to active --- common/cpu/amd/pstate.nix | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/common/cpu/amd/pstate.nix b/common/cpu/amd/pstate.nix index ab07a91f..6a84027a 100644 --- a/common/cpu/amd/pstate.nix +++ b/common/cpu/amd/pstate.nix @@ -1,6 +1,6 @@ -{ lib, config, ... }: +{ lib, config, ... }: let - kver = config.boot.kernelPackages.kernel.version; + kver = config.boot.kernelPackages.kernel.version; in { # Enables the amd cpu scaling https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html @@ -8,15 +8,25 @@ in imports = [ ./. ]; boot = lib.mkMerge [ - (lib.mkIf ( - (lib.versionAtLeast kver "5.17") - && (lib.versionOlder kver "6.1") - ) { - kernelParams = [ "initcall_blacklist=acpi_cpufreq_init" ]; - kernelModules = [ "amd-pstate" ]; - }) - (lib.mkIf (lib.versionAtLeast kver "6.1") { - kernelParams = [ "amd_pstate=passive" ]; + (lib.mkIf + ( + (lib.versionAtLeast kver "5.17") + && (lib.versionOlder kver "6.1") + ) + { + kernelParams = [ "initcall_blacklist=acpi_cpufreq_init" ]; + kernelModules = [ "amd-pstate" ]; + }) + (lib.mkIf + ( + (lib.versionAtLeast kver "6.1") + && (lib.versionOlder kver "6.3") + ) + { + kernelParams = [ "amd_pstate=passive" ]; + }) + (lib.mkIf (lib.versionAtLeast kver "6.3") { + kernelParams = [ "amd_pstate=active" ]; }) ]; } From 2c2d22409f4082ab8891fe118f7ec041e83175d4 Mon Sep 17 00:00:00 2001 From: Simon Guest Date: Wed, 3 May 2023 16:51:13 +1200 Subject: [PATCH 0466/1476] Add HP Elitebook 845g9 --- README.md | 1 + flake.nix | 1 + hp/elitebook/845/g9/default.nix | 25 +++++++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 hp/elitebook/845/g9/default.nix diff --git a/README.md b/README.md index eb9df532..ddc3c83d 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,7 @@ See code for all available configurations. | [GPD WIN 2](gpd/win-2) | `` | | [Google Pixelbook](google/pixelbook) | `` | | [HP Elitebook 2560p](hp/elitebook/2560p) | `` | +| [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | | [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | diff --git a/flake.nix b/flake.nix index c6348dc1..0992f3ab 100644 --- a/flake.nix +++ b/flake.nix @@ -65,6 +65,7 @@ gpd-pocket-3 = import ./gpd/pocket-3; gpd-win-2 = import ./gpd/win-2; hp-elitebook-2560p = import ./hp/elitebook/2560p; + hp-elitebook-845g9 = import ./hp/elitebook/845/g9; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; diff --git a/hp/elitebook/845/g9/default.nix b/hp/elitebook/845/g9/default.nix new file mode 100644 index 00000000..0bdcd67d --- /dev/null +++ b/hp/elitebook/845/g9/default.nix @@ -0,0 +1,25 @@ +{ config, pkgs, lib, ... }: + +{ + imports = + [ + ../../../../common/cpu/amd + ../../../../common/cpu/amd/pstate.nix + ../../../../common/gpu/amd + ../../../../common/pc/laptop + ../../../../common/pc/laptop/acpi_call.nix + ../../../../common/pc/laptop/ssd + ]; + + hardware.enableRedistributableFirmware = lib.mkDefault true; + boot.kernelModules = [ "synaptics_usb" ]; + boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest; + + # disable Scatter/Gather APU recently enabled by default, + # which results in white screen after display reconfiguration + boot.kernelParams = [ "amdgpu.sg_display=0" ]; + + services.xserver = { + videoDrivers = [ "amdgpu" ]; + }; +} From bbacfd60126930faee6801c44bcda186151a22d6 Mon Sep 17 00:00:00 2001 From: Simon Guest Date: Fri, 12 May 2023 10:17:26 +1200 Subject: [PATCH 0467/1476] PR review comment --- hp/elitebook/845/g9/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hp/elitebook/845/g9/default.nix b/hp/elitebook/845/g9/default.nix index 0bdcd67d..6c0cb49a 100644 --- a/hp/elitebook/845/g9/default.nix +++ b/hp/elitebook/845/g9/default.nix @@ -13,7 +13,7 @@ hardware.enableRedistributableFirmware = lib.mkDefault true; boot.kernelModules = [ "synaptics_usb" ]; - boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest; + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.3") (lib.mkDefault pkgs.linuxPackages_latest); # disable Scatter/Gather APU recently enabled by default, # which results in white screen after display reconfiguration From b3b91ca4871dcbbcb9dbe016c6203736480edd6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 15 May 2023 18:44:11 +0200 Subject: [PATCH 0468/1476] samsung/np900x3c: drop deprecated synaptics libinputs is now preferred. --- samsung/np900x3c/default.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/samsung/np900x3c/default.nix b/samsung/np900x3c/default.nix index ced3d701..1d850eb5 100644 --- a/samsung/np900x3c/default.nix +++ b/samsung/np900x3c/default.nix @@ -1,7 +1,2 @@ # TODO: use ../../common/pc/laptop - -{ lib, ... }: - -{ - services.xserver.synaptics.enable = lib.mkDefault true; -} +{} From 2ed58e3fa29abb411dd921f15f820c4be1456bc4 Mon Sep 17 00:00:00 2001 From: Ganga Ram Date: Wed, 17 May 2023 15:50:16 +0400 Subject: [PATCH 0469/1476] Removed extra overlay for kernel Signed-off-by: Ganga Ram --- microchip/common/modules.nix | 6 +----- microchip/common/overlay.nix | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 microchip/common/overlay.nix diff --git a/microchip/common/modules.nix b/microchip/common/modules.nix index 9876b19f..1678f817 100644 --- a/microchip/common/modules.nix +++ b/microchip/common/modules.nix @@ -1,10 +1,6 @@ { pkgs, lib, ... }: { - nixpkgs.overlays = [ - (import ./overlay.nix) - ]; - boot = { - kernelPackages = pkgs.linuxPackagesFor pkgs.linux-icicle-kit; + kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/linux-icicle-kit.nix { }); initrd.includeDefaultModules = lib.mkForce false; }; diff --git a/microchip/common/overlay.nix b/microchip/common/overlay.nix deleted file mode 100644 index 007756ca..00000000 --- a/microchip/common/overlay.nix +++ /dev/null @@ -1,3 +0,0 @@ -final: prev: { - linux-icicle-kit = final.callPackage ./bsp/linux-icicle-kit.nix { pkgs = final; boot = prev.uboot-icicle-kit; }; -} From d569ff4fcf611a0205c7b5ffd6cf652f430b4d72 Mon Sep 17 00:00:00 2001 From: Peter Ferenczy Date: Sun, 21 May 2023 21:53:56 +0300 Subject: [PATCH 0470/1476] Framework 12th gen: add keys workaround --- framework/12th-gen-intel/default.nix | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/framework/12th-gen-intel/default.nix b/framework/12th-gen-intel/default.nix index c912f315..79336f6e 100644 --- a/framework/12th-gen-intel/default.nix +++ b/framework/12th-gen-intel/default.nix @@ -17,9 +17,32 @@ "i915.enable_psr=1" ]; - # This enables the brightness keys to work + # This enables the brightness and airplane mode keys to work # https://community.frame.work/t/12th-gen-not-sending-xf86monbrightnessup-down/20605/11 boot.blacklistedKernelModules = [ "hid-sensor-hub" ]; + + # Further tweak to ensure the brightness and airplane mode keys work + # https://community.frame.work/t/responded-12th-gen-not-sending-xf86monbrightnessup-down/20605/67 + systemd.services.bind-keys-driver = { + description = "Bind brightness and airplane mode keys to their driver"; + wantedBy = [ "default.target" ]; + after = [ "network.target" ]; + serviceConfig = { + Type = "oneshot"; + User = "root"; + }; + script = '' + ls -lad /sys/bus/i2c/devices/i2c-*:* /sys/bus/i2c/drivers/i2c_hid_acpi/i2c-*:* + if [ -e /sys/bus/i2c/devices/i2c-FRMW0001:00 -a ! -e /sys/bus/i2c/drivers/i2c_hid_acpi/i2c-FRMW0001:00 ]; then + echo fixing + echo i2c-FRMW0001:00 > /sys/bus/i2c/drivers/i2c_hid_acpi/bind + ls -lad /sys/bus/i2c/devices/i2c-*:* /sys/bus/i2c/drivers/i2c_hid_acpi/i2c-*:* + echo done + else + echo no fix needed + fi + ''; + }; # Alder Lake CPUs benefit from kernel 5.18 for ThreadDirector # https://www.tomshardware.com/news/intel-thread-director-coming-to-linux-5-18 From ee1055d80ce5fcfe556e4c7185d9afcf922a7caf Mon Sep 17 00:00:00 2001 From: ghostbuster91 Date: Tue, 23 May 2023 07:29:46 +0200 Subject: [PATCH 0471/1476] [FocusGen1M2] Disable TPM interrupt due to upstream bug --- focus/m2/gen1/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/focus/m2/gen1/default.nix b/focus/m2/gen1/default.nix index 9c7e207b..74e4df39 100644 --- a/focus/m2/gen1/default.nix +++ b/focus/m2/gen1/default.nix @@ -11,6 +11,10 @@ boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.kernelModules = [ "kvm-intel" ]; + boot.kernelParams = [ + "tpm_tis.interrupts=0" # Upstream bug: https://bugzilla.kernel.org/show_bug.cgi?id=204121 + # without this, kacpid worker thread consumes 100% cpu on kernels 5.15.111 and up + ]; boot.blacklistedKernelModules = [ "i2c_nvidia_gpu" ]; hardware.nvidia.modesetting.enable = lib.mkDefault true; From e2864d99fddc26c2ab11f6937f493c6390b0ad12 Mon Sep 17 00:00:00 2001 From: Jakob Leifhelm Date: Tue, 23 May 2023 19:05:21 +0200 Subject: [PATCH 0472/1476] starfive visionfive2: replace 8GB memory patch with overlay --- starfive/visionfive/v2/README.md | 34 ++++++++++++++++--- starfive/visionfive/v2/fix-memory-size.patch | 13 ------- starfive/visionfive/v2/linux-6.3.nix | 1 - .../visionfive/v2/visionfive-2-v1.2a-8GB.dts | 11 ++++++ .../visionfive/v2/visionfive-2-v1.3b-8GB.dts | 11 ++++++ 5 files changed, 52 insertions(+), 18 deletions(-) delete mode 100644 starfive/visionfive/v2/fix-memory-size.patch create mode 100644 starfive/visionfive/v2/visionfive-2-v1.2a-8GB.dts create mode 100644 starfive/visionfive/v2/visionfive-2-v1.3b-8GB.dts diff --git a/starfive/visionfive/v2/README.md b/starfive/visionfive/v2/README.md index 51e811f4..64f4c848 100644 --- a/starfive/visionfive/v2/README.md +++ b/starfive/visionfive/v2/README.md @@ -31,10 +31,6 @@ Create and configure the `flake.nix` file: # networking.interfaces.end0.useDHCP = true; # networking.interfaces.end1.useDHCP = true; - # If you have the 2A variant uncomment the following line - # hardware.deviceTree.name = - # lib.mkDefault "starfive/jh7110-starfive-visionfive-2-v1.2a.dtb"; - # Additional configuration goes here sdImage.compressImage = false; @@ -57,3 +53,33 @@ Build the sd image. ``` sh nix build .# ``` + +## Additional configuration +Additional configuration may be needed depending on your specific hardware configuration. +### Board rev 1.2A +If you have the 1.2A board revision add the following to your config: +``` nix +hardware.deviceTree.name = + lib.mkDefault "starfive/jh7110-starfive-visionfive-2-v1.2a.dtb"; +``` + +### 8GB memory +If your board has 8GB of RAM add the following to your config: + +#### Board rev 1.3B +``` nix +hardware.deviceTree.overlays = [{ + name = "8GB-patch"; + dtsFile = + "${nixos-hardware}/starfive/visionfive/v2/visionfive-2-v1.3b-8GB.dts"; +}]; +``` + +#### Board rev 1.2A +``` nix +hardware.deviceTree.overlays = [{ + name = "8GB-patch"; + dtsFile = + "${nixos-hardware}/starfive/visionfive/v2/visionfive-2-v1.2a-8GB.dts"; +}]; +``` diff --git a/starfive/visionfive/v2/fix-memory-size.patch b/starfive/visionfive/v2/fix-memory-size.patch deleted file mode 100644 index a8bd5bc2..00000000 --- a/starfive/visionfive/v2/fix-memory-size.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi -index 752bb0b6fd00..93670da6cabd 100644 ---- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi -+++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi -@@ -30,7 +30,7 @@ cpus { - - memory@40000000 { - device_type = "memory"; -- reg = <0x0 0x40000000 0x1 0x0>; -+ reg = <0x0 0x40000000 0x2 0x0>; - }; - - thermal-zones { diff --git a/starfive/visionfive/v2/linux-6.3.nix b/starfive/visionfive/v2/linux-6.3.nix index 0a07584b..6d7ed86e 100644 --- a/starfive/visionfive/v2/linux-6.3.nix +++ b/starfive/visionfive/v2/linux-6.3.nix @@ -15,7 +15,6 @@ let inherit modDirVersion; kernelPatches = [ - { patch = ./fix-memory-size.patch; } { patch = fetchpatch { url = diff --git a/starfive/visionfive/v2/visionfive-2-v1.2a-8GB.dts b/starfive/visionfive/v2/visionfive-2-v1.2a-8GB.dts new file mode 100644 index 00000000..9478eaeb --- /dev/null +++ b/starfive/visionfive/v2/visionfive-2-v1.2a-8GB.dts @@ -0,0 +1,11 @@ +/dts-v1/; +/plugin/; +/ { + compatible = "starfive,visionfive-2-v1.2a", "starfive,jh7110"; + fragment@0 { + target-path = "/memory@40000000"; + __overlay__ { + reg = <0x0 0x40000000 0x2 0x0>; + }; + }; +}; diff --git a/starfive/visionfive/v2/visionfive-2-v1.3b-8GB.dts b/starfive/visionfive/v2/visionfive-2-v1.3b-8GB.dts new file mode 100644 index 00000000..f18a6a26 --- /dev/null +++ b/starfive/visionfive/v2/visionfive-2-v1.3b-8GB.dts @@ -0,0 +1,11 @@ +/dts-v1/; +/plugin/; +/ { + compatible = "starfive,visionfive-2-v1.3b", "starfive,jh7110"; + fragment@0 { + target-path = "/memory@40000000"; + __overlay__ { + reg = <0x0 0x40000000 0x2 0x0>; + }; + }; +}; From 61509d052c2c4444d66c5671ab5c3597e051eb1d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 May 2023 02:56:39 +0000 Subject: [PATCH 0473/1476] build(deps): bump cachix/install-nix-action from 20 to 21 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 20 to 21. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v20...v21) --- 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 080bae92..e286189d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v20 + - uses: cachix/install-nix-action@v21 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version From 468a7a108108908c7a35d6549f1e1f0236a9448a Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Wed, 31 May 2023 08:29:51 +0200 Subject: [PATCH 0474/1476] lenovo-thinkpad-x1-6th-gen: swap throttled with thermald --- lenovo/thinkpad/x1/6th-gen/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/thinkpad/x1/6th-gen/default.nix b/lenovo/thinkpad/x1/6th-gen/default.nix index 24fe6761..73be3906 100644 --- a/lenovo/thinkpad/x1/6th-gen/default.nix +++ b/lenovo/thinkpad/x1/6th-gen/default.nix @@ -17,5 +17,5 @@ # See also https://certification.ubuntu.com/catalog/component/input/5313/input%3ATPPS/2ElanTrackPoint/ hardware.trackpoint.device = "TPPS/2 Elan TrackPoint"; - services.throttled.enable = lib.mkDefault true; + services.thermald.enable = lib.mkDefault true; } From cacf82c2b13d9bebe9b37df508385207a35001fb Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 8 Jun 2023 10:53:58 +0800 Subject: [PATCH 0475/1476] starfive visionfive2: u-boot: update to SDK version v3.0.4 --- starfive/visionfive/v2/uboot.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/starfive/visionfive/v2/uboot.nix b/starfive/visionfive/v2/uboot.nix index be156b79..39066910 100644 --- a/starfive/visionfive/v2/uboot.nix +++ b/starfive/visionfive/v2/uboot.nix @@ -1,13 +1,13 @@ { fetchFromGitHub, buildUBoot }: -buildUBoot { - version = "2021.10"; +buildUBoot rec { + version = "3.0.4"; src = fetchFromGitHub { owner = "starfive-tech"; repo = "u-boot"; - rev = "ac0ac696256abf412826d74ee918dd417e207d7b"; - sha256 = "sha256-cyEMKkTIiET8hnWgD6poZSzfjmRAqUtyRQM0yvNY230="; + rev = "refs/tags/VF2_v${version}"; + hash = "sha256-Vd8vhSZE9fJ+Gp5IbLlqz7JAT9ChJ66krxb7gpLJ4P8="; }; defconfig = "starfive_visionfive2_defconfig"; From 54cc1a6c79dd2cdb7698816cb2d40e257f2939d3 Mon Sep 17 00:00:00 2001 From: Tomo <68489118+Tomodachi94@users.noreply.github.com> Date: Thu, 25 May 2023 17:38:31 -0700 Subject: [PATCH 0476/1476] hp.14-df0023: init --- README.md | 1 + flake.nix | 1 + hp/notebook/14-df0023/default.nix | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 hp/notebook/14-df0023/default.nix diff --git a/README.md b/README.md index ddc3c83d..6f9a75d6 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,7 @@ See code for all available configurations. | [Google Pixelbook](google/pixelbook) | `` | | [HP Elitebook 2560p](hp/elitebook/2560p) | `` | | [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | +| [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | | [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | diff --git a/flake.nix b/flake.nix index 0992f3ab..88c14dfa 100644 --- a/flake.nix +++ b/flake.nix @@ -66,6 +66,7 @@ gpd-win-2 = import ./gpd/win-2; hp-elitebook-2560p = import ./hp/elitebook/2560p; hp-elitebook-845g9 = import ./hp/elitebook/845/g9; + hp-notebook-14-df0023 = import ./hp/notebook/14-df0023; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; diff --git a/hp/notebook/14-df0023/default.nix b/hp/notebook/14-df0023/default.nix new file mode 100644 index 00000000..2edb7cdc --- /dev/null +++ b/hp/notebook/14-df0023/default.nix @@ -0,0 +1,16 @@ +{ config, lib, ... }: +with lib; +{ + imports = [ + ../../../common/cpu/intel + ../../../common/cpu/intel/sandy-bridge + ../../../common/pc + ../../../common/pc/laptop + ../../../common/pc/laptop/hdd + ../../../common/pc/hdd + ]; + + config = { + services.thermald.enable = mkDefault true; + }; +} From cc942923915d500c83822b72edef50b6c649ab35 Mon Sep 17 00:00:00 2001 From: Jakob Leifhelm Date: Thu, 8 Jun 2023 20:24:13 +0200 Subject: [PATCH 0477/1476] starfive visionfive2: Add firmware update script. --- starfive/visionfive/v2/README.md | 28 ++++++++++++++++++++++++++++ starfive/visionfive/v2/firmware.nix | 21 +++++++++++++++++++-- starfive/visionfive/v2/sd-image.nix | 5 +++-- 3 files changed, 50 insertions(+), 4 deletions(-) diff --git a/starfive/visionfive/v2/README.md b/starfive/visionfive/v2/README.md index 64f4c848..aa5d6ea3 100644 --- a/starfive/visionfive/v2/README.md +++ b/starfive/visionfive/v2/README.md @@ -83,3 +83,31 @@ hardware.deviceTree.overlays = [{ "${nixos-hardware}/starfive/visionfive/v2/visionfive-2-v1.2a-8GB.dts"; }]; ``` +# Updating the bootloader +## SD-Card +Install the firmware update script +``` nix +environment.systemPackages = [ + (pkgs.callPackage + "${nixos-hardware}/starfive/visionfive/v2/firmware.nix" + { }).updater-sd +]; +``` +Then run as root +``` sh +visionfive2-firmware-update-sd +``` +## SPI Flash +Install the firmware update script +``` nix +environment.systemPackages = [ + (pkgs.callPackage + "${nixos-hardware}/starfive/visionfive/v2/firmware.nix" + { }).updater-flash +]; +``` +Then run as root +``` sh +visionfive2-firmware-update-flash +``` + diff --git a/starfive/visionfive/v2/firmware.nix b/starfive/visionfive/v2/firmware.nix index 97592b3c..f2e68616 100644 --- a/starfive/visionfive/v2/firmware.nix +++ b/starfive/visionfive/v2/firmware.nix @@ -1,4 +1,5 @@ -{ callPackage, pkgsBuildHost, runCommand, writeText, stdenv, dtc }: +{ callPackage, pkgsBuildHost, runCommand, writeText, writeShellApplication +, stdenv, dtc, mtdutils, coreutils }: let uboot = callPackage ./uboot.nix { }; opensbi = callPackage ./opensbi.nix { @@ -36,7 +37,7 @@ let }; }; ''; -in { +in rec { inherit opensbi uboot; spl = stdenv.mkDerivation { name = "starfive-visionfive2-spl"; @@ -58,4 +59,20 @@ in { ${uboot}/mkimage -f ${its-file} -A riscv -O u-boot -T firmware $out/share/starfive-visionfive2/visionfive2_fw_payload.img ''; }; + updater-flash = writeShellApplication { + name = "visionfive2-firmware-update-flash"; + runtimeInputs = [ mtdutils ]; + text = '' + flashcp -v ${spl}/share/starfive-visionfive2/spl.bin /dev/mtd0 + flashcp -v ${uboot-fit-image}/share/starfive-visionfive2/visionfive2_fw_payload.img /dev/mtd1 + ''; + }; + updater-sd = writeShellApplication { + name = "visionfive2-firmware-update-sd"; + runtimeInputs = [ ]; + text = '' + dd if=${spl}/share/starfive-visionfive2/spl.bin of=/dev/mmcblk0p1 conv=fsync + dd if=${uboot-fit-image}/share/starfive-visionfive2/visionfive2_fw_payload.img of=/dev/mmcblk0p2 conv=fsync + ''; + }; } diff --git a/starfive/visionfive/v2/sd-image.nix b/starfive/visionfive/v2/sd-image.nix index 06af34c6..6ee39e36 100644 --- a/starfive/visionfive/v2/sd-image.nix +++ b/starfive/visionfive/v2/sd-image.nix @@ -1,7 +1,6 @@ { config, pkgs, lib, modulesPath, ... }: -let - firmware = pkgs.callPackage ./firmware.nix { }; +let firmware = pkgs.callPackage ./firmware.nix { }; in { imports = [ "${modulesPath}/profiles/base.nix" @@ -48,4 +47,6 @@ in { ${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d ./files/boot ''; }; + + environment.systemPackages = [ firmware.updater-flash ]; } From a2ca907b42e713fa3c5416fac4f2dd161cfa48d5 Mon Sep 17 00:00:00 2001 From: Burgess Chang Date: Sun, 11 Jun 2023 01:11:59 +0800 Subject: [PATCH 0478/1476] lenovo-thinkpad-x1-nano-gen1: init Signed-off-by: Burgess Chang --- README.md | 1 + flake.nix | 2 ++ lenovo/thinkpad/x1-nano/default.nix | 9 +++++++++ lenovo/thinkpad/x1-nano/gen1/default.nix | 3 +++ 4 files changed, 15 insertions(+) create mode 100644 lenovo/thinkpad/x1-nano/default.nix create mode 100644 lenovo/thinkpad/x1-nano/gen1/default.nix diff --git a/README.md b/README.md index 6f9a75d6..2bbfd45d 100644 --- a/README.md +++ b/README.md @@ -190,6 +190,7 @@ See code for all available configurations. | [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `` | | [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | | [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | +| [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | | [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | | [Lenovo ThinkPad X13](lenovo/thinkpad/x13) | `` | | [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | diff --git a/flake.nix b/flake.nix index 88c14dfa..43a2143c 100644 --- a/flake.nix +++ b/flake.nix @@ -127,6 +127,8 @@ lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme; lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2; lenovo-thinkpad-x1-extreme-gen4 = import ./lenovo/thinkpad/x1-extreme/gen4; + lenovo-thinkpad-x1-nano = import ./lenovo/thinkpad/x1-nano; + lenovo-thinkpad-x1-nano-gen1 = import ./lenovo/thinkpad/x1-nano/gen1; lenovo-thinkpad-x13 = import ./lenovo/thinkpad/x13; lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13/yoga; lenovo-thinkpad-x140e = import ./lenovo/thinkpad/x140e; diff --git a/lenovo/thinkpad/x1-nano/default.nix b/lenovo/thinkpad/x1-nano/default.nix new file mode 100644 index 00000000..68cd6656 --- /dev/null +++ b/lenovo/thinkpad/x1-nano/default.nix @@ -0,0 +1,9 @@ +{ ... }: { + # Reference to hardware: https://ubuntu.com/certified/202012-28574 + imports = [ + ../. + ../../../common/cpu/intel + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/ssd + ]; +} diff --git a/lenovo/thinkpad/x1-nano/gen1/default.nix b/lenovo/thinkpad/x1-nano/gen1/default.nix new file mode 100644 index 00000000..989e204f --- /dev/null +++ b/lenovo/thinkpad/x1-nano/gen1/default.nix @@ -0,0 +1,3 @@ +{ ... }: { + imports = [ ../. ]; +} From 2d54ea30cfea085b64db92e6bf8848b73c1fac78 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Tue, 13 Jun 2023 16:54:30 +0200 Subject: [PATCH 0479/1476] macbook-air-6: remove mba6x_bl kernel module This does not compile against 6.x Kernel. This is also no longer necessary for 6.x Kernel. One can use "acpi_video0" device instead of "mba6x_backlight" device. --- apple/macbook-air/6/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apple/macbook-air/6/default.nix b/apple/macbook-air/6/default.nix index 555d7041..c892026a 100644 --- a/apple/macbook-air/6/default.nix +++ b/apple/macbook-air/6/default.nix @@ -4,15 +4,11 @@ imports = [ ../. ]; boot = { - extraModulePackages = with config.boot.kernelPackages; [ mba6x_bl ]; - kernelModules = [ "mba6x_bl" ]; - # Divides power consumption by two. kernelParams = [ "acpi_osi=" ]; }; services.xserver.deviceSection = lib.mkDefault '' - Option "Backlight" "mba6x_backlight" Option "TearFree" "true" ''; } From ba74676d675a4196ca728691e15536a60c94a257 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jun 2023 02:56:32 +0000 Subject: [PATCH 0480/1476] build(deps): bump cachix/install-nix-action from 21 to 22 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 21 to 22. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v21...v22) --- 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 e286189d..bd918fb3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v21 + - uses: cachix/install-nix-action@v22 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version From ef7a2674a79909ae2ca08d1f46ab6d117dadd78c Mon Sep 17 00:00:00 2001 From: buttergrillcorn <126628446+buttergrillcorn@users.noreply.github.com> Date: Tue, 20 Jun 2023 15:49:07 +0100 Subject: [PATCH 0481/1476] Update default.nix --- microsoft/surface/common/ipts/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/surface/common/ipts/default.nix b/microsoft/surface/common/ipts/default.nix index 4faf49e4..4d19aa09 100644 --- a/microsoft/surface/common/ipts/default.nix +++ b/microsoft/surface/common/ipts/default.nix @@ -19,7 +19,7 @@ in { systemd.services.iptsd = { description = "IPTSD"; path = with pkgs; [ iptsd ]; - script = "iptsd"; + script = "iptsd $(iptsd-find-hidraw)"; wantedBy = [ "multi-user.target" ]; }; }) From 1d0b3cf27b8b57a6ccc758f111b863d87bab7851 Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Fri, 23 Jun 2023 07:38:13 -0400 Subject: [PATCH 0482/1476] treewide: avoid alias usage for intel-vaapi-driver based on nixos version --- common/gpu/intel/default.nix | 2 +- gpd/pocket-3/default.nix | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index 31db8b44..ed76057b 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -8,7 +8,7 @@ }; hardware.opengl.extraPackages = with pkgs; [ - vaapiIntel + (if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver) libvdpau-va-gl intel-media-driver ]; diff --git a/gpd/pocket-3/default.nix b/gpd/pocket-3/default.nix index 64417b9d..634e36b4 100644 --- a/gpd/pocket-3/default.nix +++ b/gpd/pocket-3/default.nix @@ -14,7 +14,10 @@ in # GPU is an Intel Iris Xe, on a “TigerLake” mobile CPU boot.initrd.kernelModules = [ "i915" ]; # Early loading so the passphrase prompt appears on external displays services.xserver.videoDrivers = [ "intel" ]; - hardware.opengl.extraPackages = with pkgs; [ intel-media-driver vaapiIntel ]; + hardware.opengl.extraPackages = with pkgs; [ + intel-media-driver + (if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver) + ]; boot.kernelParams = [ # S3 suspend is broken as of Sept. 2022 (screen does not come back properly), use S2 From 8e28b9ee431b265d1fc74b8b819ea0816344c4a1 Mon Sep 17 00:00:00 2001 From: kekrby Date: Thu, 25 Aug 2022 18:17:01 +0300 Subject: [PATCH 0483/1476] apple/t2: init Co-authored-by: networkException --- README.md | 1 + apple/t2/README.md | 9 +++ apple/t2/default.nix | 55 +++++++++++++++++++ .../t2/fix-keyboard-backlight-and-touchbar.sh | 28 ++++++++++ apple/t2/pkgs/linux-t2.nix | 46 ++++++++++++++++ flake.nix | 1 + 6 files changed, 140 insertions(+) create mode 100644 apple/t2/README.md create mode 100644 apple/t2/default.nix create mode 100755 apple/t2/fix-keyboard-backlight-and-touchbar.sh create mode 100644 apple/t2/pkgs/linux-t2.nix diff --git a/README.md b/README.md index 2bbfd45d..393686cf 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ See code for all available configurations. | [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | +| [Apple Macs with a T2 Chip](apple/t2) | `` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | diff --git a/apple/t2/README.md b/apple/t2/README.md new file mode 100644 index 00000000..7f3a842e --- /dev/null +++ b/apple/t2/README.md @@ -0,0 +1,9 @@ +## NixOS on T2 Macs + +This is the `nixos-hardware` module of the [T2 Linux Project](https://t2linux.org). + +Overall, most features (WiFi, bluetooth, audio, touchbar, ...) of Macs are supported, [see this page](https://wiki.t2linux.org/state/) for a detailed list of things that work and things that don't/partially work. + +Following [this guide](https://wiki.t2linux.org/distributions/nixos/installation/) is the recommended way to install, as it incudes the extra things you have to do on a T2 Mac. + +You can consult the [wiki](https://wiki.t2linux.org/) for information specific to T2 Macs. diff --git a/apple/t2/default.nix b/apple/t2/default.nix new file mode 100644 index 00000000..df62afc2 --- /dev/null +++ b/apple/t2/default.nix @@ -0,0 +1,55 @@ +{ pkgs, ... }: + +let + audioFiles = pkgs.fetchFromGitHub { + owner = "kekrby"; + repo = "t2-better-audio"; + rev = "e46839a28963e2f7d364020518b9dac98236bcae"; + hash = "sha256-x7K0qa++P1e1vuCGxnsFxL1d9+nwMtZUJ6Kd9e27TFs="; + }; + + overrideAudioFiles = package: pluginsPath: + package.overrideAttrs (new: old: { + preConfigurePhases = old.preConfigurePhases or [ ] ++ [ "postPatchPhase" ]; + + postPatchPhase = '' + cp -r ${audioFiles}/files/{profile-sets,paths} ${pluginsPath}/alsa/mixer/ + ''; + }); +in +{ + # For keyboard and touchbar + boot.kernelPackages = with pkgs; recurseIntoAttrs (linuxPackagesFor (callPackage ./pkgs/linux-t2.nix { })); + boot.initrd.kernelModules = [ "apple-bce" ]; + + # For audio + boot.kernelParams = [ "pcie_ports=compat" "intel_iommu=on" "iommu=pt" ]; + services.udev.extraRules = builtins.readFile (pkgs.substitute { + src = "${audioFiles}/files/91-audio-custom.rules"; + replacements = [ "--replace" "/usr/bin/sed" "${pkgs.gnused}/bin/sed" ]; + }); + + hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/"; + + services.pipewire = rec { + package = overrideAudioFiles pkgs.pipewire "spa/plugins/"; + + wireplumber.package = pkgs.wireplumber.override { + pipewire = package; + }; + }; + + # Make sure post-resume.service exists + powerManagement.enable = true; + + systemd.services.fix-keyboard-backlight-and-touchbar = { + path = [ pkgs.kmod ]; + serviceConfig.ExecStart = ''${pkgs.systemd}/bin/systemd-inhibit --what=sleep --why="fixing keyboard backlight and touchbar must finish before sleep" --mode=delay ${./fix-keyboard-backlight-and-touchbar.sh}''; + serviceConfig.Type = "oneshot"; + description = "reload touchbar driver and restart upower"; + # must run at boot (and not too early), and after suspend + wantedBy = [ "display-manager.service" "post-resume.target" ]; + # prevent running before suspend + after = [ "post-resume.target" ]; + }; +} diff --git a/apple/t2/fix-keyboard-backlight-and-touchbar.sh b/apple/t2/fix-keyboard-backlight-and-touchbar.sh new file mode 100755 index 00000000..c8c6a094 --- /dev/null +++ b/apple/t2/fix-keyboard-backlight-and-touchbar.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +set -eux + +unload () { + if modprobe -r "$1" 2>&1; + then echo ok + else echo fail + fi +} + +wait_unload() { + while sleep 1; do + output="$(unload "$1")" + case "$output" in + *is\ in\ use*) :;; + *ok*) return 0;; + *) echo "modprobe said: $output"; echo giving up; return 1; + esac + done +} + +wait_unload apple_touchbar +modprobe apple_touchbar + +# After suspend, the inode for the backlight device has changed. This service +# simply restarts upower to inform it of that change. +systemctl restart upower.service diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix new file mode 100644 index 00000000..fef3550c --- /dev/null +++ b/apple/t2/pkgs/linux-t2.nix @@ -0,0 +1,46 @@ +{ lib, buildLinux, fetchFromGitHub, fetchurl, ... } @ args: + +let + patchRepo = fetchFromGitHub { + owner = "t2linux"; + repo = "linux-t2-patches"; + rev = "c0db79a25bc37dbd0c27636914b3903016a2fc39"; + hash = "sha256-VILJAK7F0E/8Z3sOzsUpS9dmtpull2XVXQkakZ0UTIA="; + }; + + version = "6.4"; + majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); +in +buildLinux (args // { + inherit version; + + pname = "linux-t2"; + # Snippet from nixpkgs + modDirVersion = with lib; "${concatStringsSep "." (take 3 (splitVersion "${version}.0"))}"; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; + hash = "sha256-j6BYjwws7KRMrHeg45ukjJ8AprncaXYcAqXT76yNp/M="; + }; + + structuredExtraConfig = with lib.kernel; { + APPLE_BCE = module; + APPLE_GMUX = module; + BRCMFMAC = module; + BT_BCM = module; + BT_HCIBCM4377 = module; + BT_HCIUART_BCM = yes; + BT_HCIUART = module; + HID_APPLE_IBRIDGE = module; + HID_APPLE = module; + HID_APPLE_MAGIC_BACKLIGHT = module; + HID_APPLE_TOUCHBAR = module; + HID_SENSOR_ALS = module; + SND_PCM = module; + STAGING = yes; + }; + + kernelPatches = lib.attrsets.mapAttrsToList (file: type: { name = file; patch = "${patchRepo}/${file}"; }) + (lib.attrsets.filterAttrs (file: type: type == "regular" && lib.strings.hasSuffix ".patch" file) + (builtins.readDir patchRepo)); +} // (args.argsOverride or {})) diff --git a/flake.nix b/flake.nix index 43a2143c..79b59972 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,7 @@ apple-macbook-pro-11-5 = import ./apple/macbook-pro/11-5; apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1; + apple-t2 = import ./apple/t2; asus-battery = import ./asus/battery.nix; asus-fx504gd = import ./asus/fx504gd; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; From 289a5af77e624b29b9efd06de262b324c8018abe Mon Sep 17 00:00:00 2001 From: Space Banana Date: Wed, 28 Jun 2023 00:55:39 +0100 Subject: [PATCH 0484/1476] Additional blocked nvidia kernel modules --- common/gpu/nvidia/disable.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/gpu/nvidia/disable.nix b/common/gpu/nvidia/disable.nix index 83e7d093..cc509819 100644 --- a/common/gpu/nvidia/disable.nix +++ b/common/gpu/nvidia/disable.nix @@ -22,5 +22,5 @@ # Remove NVIDIA VGA/3D controller devices ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1" ''; - boot.blacklistedKernelModules = lib.mkDefault [ "nouveau" "nvidia" ]; -} \ No newline at end of file + boot.blacklistedKernelModules = lib.mkDefault [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ]; +} From ff35653b1493d6ae27acb04bf6851e095b23ffea Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 16 May 2023 19:42:48 +0800 Subject: [PATCH 0485/1476] starfive visionfive2: update kernel to 6.4.0 --- starfive/visionfive/v2/default.nix | 2 +- .../v2/{linux-6.3.nix => linux-6.4.nix} | 22 ++++----- starfive/visionfive/v2/verisilicon.patch | 46 +++++++++++++++++++ 3 files changed, 55 insertions(+), 15 deletions(-) rename starfive/visionfive/v2/{linux-6.3.nix => linux-6.4.nix} (50%) create mode 100644 starfive/visionfive/v2/verisilicon.patch diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index ee1ab3fa..964b0e54 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -4,7 +4,7 @@ supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; consoleLogLevel = lib.mkDefault 7; - kernelPackages = lib.mkDefault (pkgs.callPackage ./linux-6.3.nix { + kernelPackages = lib.mkDefault (pkgs.callPackage ./linux-6.4.nix { inherit (config.boot) kernelPatches; }); diff --git a/starfive/visionfive/v2/linux-6.3.nix b/starfive/visionfive/v2/linux-6.4.nix similarity index 50% rename from starfive/visionfive/v2/linux-6.3.nix rename to starfive/visionfive/v2/linux-6.4.nix index 6d7ed86e..d0b8e4eb 100644 --- a/starfive/visionfive/v2/linux-6.3.nix +++ b/starfive/visionfive/v2/linux-6.4.nix @@ -1,7 +1,7 @@ -{ lib, callPackage, linuxPackagesFor, kernelPatches, fetchpatch, ... }: +{ lib, callPackage, linuxPackagesFor, kernelPatches, ... }: let - modDirVersion = "6.3.0-rc4"; + modDirVersion = "6.4.0"; linuxPkg = { lib, fetchFromGitHub, buildLinux, ... }@args: buildLinux (args // { version = "${modDirVersion}-starfive-visionfive2"; @@ -9,23 +9,17 @@ let src = fetchFromGitHub { owner = "starfive-tech"; repo = "linux"; - rev = "a57bdb1d13f93c8fc1b3c668cc74d585bb20f3f8"; - sha256 = "sha256-jnQnJChIGCyJt+zwGfUTsMhrwmWek/ngIM6Pae6OXuI="; + rev = "e5a381c51d624ffd8784db908a58ae227d0608a4"; + sha256 = "sha256-gg3+2ITdnpo49UmySiAJnk47STW1I7kF7fsKGBVayRE="; }; inherit modDirVersion; - kernelPatches = [ - { - patch = fetchpatch { - url = - "https://github.com/torvalds/linux/commit/d83806c4c0cccc0d6d3c3581a11983a9c186a138.diff"; - hash = "sha256-xUnEJkzQRIIBF/0GIpS0Cd+h6OdSiJlyva5xwxtleE0="; - }; - } - ] ++ kernelPatches; + kernelPatches = [{ + name = "verisilicon"; + patch = ./verisilicon.patch; + }] ++ kernelPatches; structuredExtraConfig = with lib.kernel; { - PL330_DMA = no; PINCTRL_STARFIVE_JH7110_SYS = yes; SERIAL_8250_DW = yes; }; diff --git a/starfive/visionfive/v2/verisilicon.patch b/starfive/visionfive/v2/verisilicon.patch new file mode 100644 index 00000000..4ef8c1e0 --- /dev/null +++ b/starfive/visionfive/v2/verisilicon.patch @@ -0,0 +1,46 @@ +From f6df0d69978ceb373d14c9337c4cda74d604f46d Mon Sep 17 00:00:00 2001 +From: Nick Cao +Date: Sat, 1 Jul 2023 17:19:22 +0800 +Subject: [PATCH 1/2] drm/verisilicon: add missing null entry in vs_drm_dt_ids + +--- + drivers/gpu/drm/verisilicon/vs_drv.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpu/drm/verisilicon/vs_drv.c b/drivers/gpu/drm/verisilicon/vs_drv.c +index b740fe934035..1255a373f7a2 100644 +--- a/drivers/gpu/drm/verisilicon/vs_drv.c ++++ b/drivers/gpu/drm/verisilicon/vs_drv.c +@@ -258,6 +258,7 @@ static SIMPLE_DEV_PM_OPS(vs_drm_pm_ops, vs_drm_suspend, vs_drm_resume); + + static const struct of_device_id vs_drm_dt_ids[] = { + { .compatible = "verisilicon,display-subsystem", }, ++ {}, + }; + + MODULE_DEVICE_TABLE(of, vs_drm_dt_ids); +-- +2.41.0 + +From f7d2f6e8c6e566cdd441b7bd4710f7628af15dcb Mon Sep 17 00:00:00 2001 +From: Nick Cao +Date: Sat, 1 Jul 2023 17:49:05 +0800 +Subject: [PATCH 2/2] drm/verisilicon: import DMA_BUF namespace + +--- + drivers/gpu/drm/verisilicon/vs_drv.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpu/drm/verisilicon/vs_drv.c b/drivers/gpu/drm/verisilicon/vs_drv.c +index 1255a373f7a2..8627027047aa 100644 +--- a/drivers/gpu/drm/verisilicon/vs_drv.c ++++ b/drivers/gpu/drm/verisilicon/vs_drv.c +@@ -299,4 +299,5 @@ module_init(vs_drm_init); + module_exit(vs_drm_fini); + + MODULE_DESCRIPTION("VeriSilicon DRM Driver"); ++MODULE_IMPORT_NS(DMA_BUF); + MODULE_LICENSE("GPL"); +-- +2.41.0 + From e5ea58213358b9037a00d0b1c2bcc5e4b0d46151 Mon Sep 17 00:00:00 2001 From: Ganga Ram Date: Wed, 5 Jul 2023 11:56:44 +0400 Subject: [PATCH 0486/1476] Microchip uboot build failure with nixpkgs 23.05 Fix for https://github.com/NixOS/nixpkgs/issues/235179 Update Microchip uboot version to linux4microchip+fpga-2023.06 Signed-off-by: Ganga Ram --- ...iscv-Fix-build-against-binutils-2.38.patch | 51 +++++++++++++++++++ microchip/common/bsp/uboot.nix | 11 ++-- 2 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 microchip/common/bsp/patches/0002-Riscv-Fix-build-against-binutils-2.38.patch diff --git a/microchip/common/bsp/patches/0002-Riscv-Fix-build-against-binutils-2.38.patch b/microchip/common/bsp/patches/0002-Riscv-Fix-build-against-binutils-2.38.patch new file mode 100644 index 00000000..0dfd6652 --- /dev/null +++ b/microchip/common/bsp/patches/0002-Riscv-Fix-build-against-binutils-2.38.patch @@ -0,0 +1,51 @@ +From 8afd811876b1ce8d6da6d5c804452a2b15805f5a Mon Sep 17 00:00:00 2001 +From: Ganga Ram +Date: Wed, 5 Jul 2023 11:32:44 +0400 +Subject: [PATCH] From: Ganga Ram Date: Wed, 05 July 2023 + 06:15:22 +0400 Subject: [PATCH] Riscv-Fix-build-against-binutils-2.38 + +The following description is copied from the equivalent patch for the +Linux Kernel proposed by Aurelien Jarno: + +From version 2.38, binutils default to ISA spec version 20191213. This +means that the csr read/write (csrr*/csrw*) instructions and fence.i +instruction has separated from the `I` extension, become two standalone +extensions: Zicsr and Zifencei. As the kernel uses those instruction, +this causes the following build failure: + +arch/riscv/lib/cache.c:12: Error: unrecognized opcode `fence.i', extension `zifencei' required +arch/riscv/cpu/cpu.c:94: Error: unrecognized opcode `csrs sstatus,a5', extension `zicsr' required +arch/riscv/cpu/cpu.c:95: Error: unrecognized opcode `csrw 0x003,0', extension `zicsr' required + +More detail: https://patchwork.ozlabs.org/series/283391/mbox/ + +Signed-off-by: Ganga Ram +--- + arch/riscv/Makefile | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile +index 0b80eb8d86..53d1194ffb 100644 +--- a/arch/riscv/Makefile ++++ b/arch/riscv/Makefile +@@ -24,7 +24,16 @@ ifeq ($(CONFIG_CMODEL_MEDANY),y) + CMODEL = medany + endif + +-ARCH_FLAGS = -march=$(ARCH_BASE)$(ARCH_A)$(ARCH_C) -mabi=$(ABI) \ ++RISCV_MARCH = $(ARCH_BASE)$(ARCH_A)$(ARCH_C) ++ ++# Newer binutils versions default to ISA spec version 20191213 which moves some ++# instructions from the I extension to the Zicsr and Zifencei extensions. ++toolchain-need-zicsr-zifencei := $(call cc-option-yn, -mabi=$(ABI) -march=$(RISCV_MARCH)_zicsr_zifencei) ++ifeq ($(toolchain-need-zicsr-zifencei),y) ++ RISCV_MARCH := $(RISCV_MARCH)_zicsr_zifencei ++endif ++ ++ARCH_FLAGS = -march=$(RISCV_MARCH) -mabi=$(ABI) \ + -mcmodel=$(CMODEL) + + PLATFORM_CPPFLAGS += $(ARCH_FLAGS) +-- +2.39.2 + diff --git a/microchip/common/bsp/uboot.nix b/microchip/common/bsp/uboot.nix index 900547b0..5237c77f 100644 --- a/microchip/common/bsp/uboot.nix +++ b/microchip/common/bsp/uboot.nix @@ -8,20 +8,23 @@ with pkgs; let in buildUBoot rec { pname = "uboot"; - version = "linux4microchip+fpga-2023.02"; + version = "linux4microchip+fpga-2023.06"; src = fetchFromGitHub { owner = "polarfire-soc"; repo = "u-boot"; - rev = "b356a897b11ef19dcbe7870530f23f3a978c1714"; - sha256 = "sha256-ouNLnDBeEsaY/xr5tAVBUtLlj0eylWbKdlU+bQ2Ciq4="; + rev = "7e19f9dff788025403ac6a34d9acf8736eef32ff"; + sha256 = "sha256-1qmifjjNxPOUWRgZdQk6Ld5KGQk/PypSRK/ILPSsTLs"; }; extraMakeFlags = [ "OPENSBI=${opensbi}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin" ]; - patches = [ ./patches/0001-Boot-environment-for-Microchip-Iciclle-Kit.patch ]; + patches = [ + ./patches/0001-Boot-environment-for-Microchip-Iciclle-Kit.patch + ./patches/0002-Riscv-Fix-build-against-binutils-2.38.patch + ]; defconfig = "${targetBoard}_defconfig"; enableParallelBuilding = true; extraMeta.platforms = ["riscv64-linux"]; From 30f71ba6e0ce7c26d103bd383ca30c4c9d179a5a Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Fri, 7 Jul 2023 21:28:05 +0200 Subject: [PATCH 0487/1476] star64: init Mostly based on the visionfive 2 config. No GPU yet. --- README.md | 1 + flake.nix | 1 + pine64/star64/README.md | 120 ++++++++++++ pine64/star64/default.nix | 39 ++++ pine64/star64/firmware.nix | 78 ++++++++ pine64/star64/irq-desc-to-data.patch | 24 +++ pine64/star64/linux-5.15.nix | 238 +++++++++++++++++++++++ pine64/star64/opensbi.nix | 42 ++++ pine64/star64/pl330-name-collision.patch | 40 ++++ pine64/star64/sd-image-installer.nix | 11 ++ pine64/star64/sd-image.nix | 52 +++++ pine64/star64/spl-tool.nix | 18 ++ pine64/star64/star64-8GB.dts | 11 ++ pine64/star64/uboot.nix | 20 ++ 14 files changed, 695 insertions(+) create mode 100644 pine64/star64/README.md create mode 100644 pine64/star64/default.nix create mode 100644 pine64/star64/firmware.nix create mode 100644 pine64/star64/irq-desc-to-data.patch create mode 100644 pine64/star64/linux-5.15.nix create mode 100644 pine64/star64/opensbi.nix create mode 100644 pine64/star64/pl330-name-collision.patch create mode 100644 pine64/star64/sd-image-installer.nix create mode 100644 pine64/star64/sd-image.nix create mode 100644 pine64/star64/spl-tool.nix create mode 100644 pine64/star64/star64-8GB.dts create mode 100644 pine64/star64/uboot.nix diff --git a/README.md b/README.md index 1c884229..1c2edd4f 100644 --- a/README.md +++ b/README.md @@ -220,6 +220,7 @@ See code for all available configurations. | [Panasonic Let's Note CF-LX4 ](panasonic/letsnote/cf-lx4) | `` | | [PC Engines APU](pcengines/apu) | `` | | [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | +| [PINE64 STAR64](pine64/star64/) | `` | | [Purism Librem 13v3](purism/librem/13v3) | `` | | [Purism Librem 15v3](purism/librem/13v3) | `` | | [Raspberry Pi 2](raspberry-pi/2) | `` | diff --git a/flake.nix b/flake.nix index 897d5d71..9da2c3c7 100644 --- a/flake.nix +++ b/flake.nix @@ -159,6 +159,7 @@ onenetbook-4 = import ./onenetbook/4; pcengines-apu = import ./pcengines/apu; pine64-pinebook-pro = import ./pine64/pinebook-pro; + pine64-star64 = import ./pine64/star64; purism-librem-13v3 = import ./purism/librem/13v3; purism-librem-15v3 = import ./purism/librem/15v3; raspberry-pi-2 = import ./raspberry-pi/2; diff --git a/pine64/star64/README.md b/pine64/star64/README.md new file mode 100644 index 00000000..11f0618b --- /dev/null +++ b/pine64/star64/README.md @@ -0,0 +1,120 @@ +# Creating a SD-Image + +Create and configure the `flake.nix` file: + +``` nix +{ + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + inputs.nixos-hardware.url = "github:nixos/nixos-hardware"; + + + outputs = { self, nixpkgs, nixos-hardware, flake-utils, ... }: + let + supportedSystems = [ + "x86_64-linux" + "aarch64-linux" + "riscv64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + forAllSupportedSystems = nixpkgs.lib.genAttrs supportedSystems; + in { + packages = forAllSupportedSystems (system: rec { + default = sd-image; + sd-image = (import "${nixpkgs}/nixos" { + configuration = + { config, ... }: { + imports = [ + "${nixos-hardware}/pine64/star64/sd-image.nix" + # or, for a system like an installation media: + #"${nixos-hardware}/pine64/star64/sd-image-installer.nix" + ]; + + system.stateVersion = "23.05"; + networking.useDHCP = true; + services.openssh.enable = true; + + users.users.nixos = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + }; + security.sudo.wheelNeedsPassword = false; + # Set a password + users.users.nixos.initialPassword = "nixos"; + # OR add your public ssh key + #users.users.nixos.openssh.authorizedKeys.keys = [ "ssh-rsa ..." ]; + + sdImage.compressImage = false; + + # Set if cross compiling + #nixpkgs.crossSystem = { + # config = "riscv64-unknown-linux-gnu"; + # system = "riscv64-linux"; + #}; + + # Additional configuration goes here + }; + inherit system; + }).config.system.build.sdImage; + }); + }; +} +``` + +Build the sd image. + +``` sh +nix build .# +``` + +## Additional configuration + +### 8GB memory + +If your board has 8GB of RAM add the following to your config: + +``` nix +hardware.deviceTree.overlays = [{ + name = "8GB-patch"; + dtsFile = + "${nixos-hardware}/pine64/star64/star64-8GB.dts"; +}]; +``` + +# Updating the bootloader + +## SD-Card + +Install the firmware update script + +``` nix +environment.systemPackages = [ + (pkgs.callPackage + "${nixos-hardware}/pine64/star64/firmware.nix" + { }).updater-sd +]; +``` + +Then run as root + +``` sh +star64-firmware-update-sd +``` + +## SPI Flash + +Install the firmware update script + +``` nix +environment.systemPackages = [ + (pkgs.callPackage + "${nixos-hardware}/pine64/star64/firmware.nix" + { }).updater-flash +]; +``` + +Then run as root + +``` sh +star64-firmware-update-flash +``` diff --git a/pine64/star64/default.nix b/pine64/star64/default.nix new file mode 100644 index 00000000..e83a2f5b --- /dev/null +++ b/pine64/star64/default.nix @@ -0,0 +1,39 @@ +{ config, lib, pkgs, ... }: { + nixpkgs.overlays = [(self: super: { + makeModulesClosure = x: super.makeModulesClosure (x // { + allowMissing = true; + }); + })]; + + # Somehow ttyS0 doesn't get enabled by default + systemd.services."serial-getty@ttyS0".enable = lib.mkDefault true; + systemd.services."serial-getty@ttyS0".wantedBy = lib.mkDefault [ "getty.target" ]; + + boot = { + # Force no ZFS (from nixos/modules/profiles/base.nix) until updated to kernel 6.0 + # TODO still valid for star64? + supportedFilesystems = + lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; + consoleLogLevel = lib.mkDefault 7; + kernelPackages = lib.mkDefault (pkgs.callPackage ./linux-5.15.nix { + inherit (config.boot) kernelPatches; + }); + + kernelParams = + lib.mkDefault [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ]; + + initrd.availableKernelModules = [ "dw_mmc_starfive" ]; + + # Ethernet. The module gets forced m due to other modules even though + # it's marked y in defconfig. + kernelModules = [ "dwmac-starfive-plat" ]; + + loader = { + grub.enable = lib.mkDefault false; + generic-extlinux-compatible.enable = lib.mkDefault true; + }; + }; + + hardware.deviceTree.name = + lib.mkDefault "starfive/jh7110-pine64-star64.dtb"; +} diff --git a/pine64/star64/firmware.nix b/pine64/star64/firmware.nix new file mode 100644 index 00000000..b1b76c8b --- /dev/null +++ b/pine64/star64/firmware.nix @@ -0,0 +1,78 @@ +{ callPackage, pkgsBuildHost, runCommand, writeText, writeShellApplication +, stdenv, dtc, mtdutils, coreutils }: +let + uboot = callPackage ./uboot.nix { }; + opensbi = callPackage ./opensbi.nix { + withPayload = "${uboot}/u-boot.bin"; + withFDT = "${uboot}/pine64_star64.dtb"; + }; + spl-tool = pkgsBuildHost.callPackage ./spl-tool.nix { }; + its-file = writeText "star64-uboot-fit-image.its" '' + /dts-v1/; + + / { + description = "U-boot-spl FIT image for JH7110 Star64"; + #address-cells = <2>; + + images { + firmware { + description = "u-boot"; + data = /incbin/("${opensbi}/share/opensbi/lp64/generic/firmware/fw_payload.bin"); + type = "firmware"; + arch = "riscv"; + os = "u-boot"; + load = <0x0 0x40000000>; + entry = <0x0 0x40000000>; + compression = "none"; + }; + }; + + configurations { + default = "config-1"; + + config-1 { + description = "U-boot-spl FIT config for JH7110 Star64"; + firmware = "firmware"; + }; + }; + }; + ''; +in rec { + inherit opensbi uboot; + spl = stdenv.mkDerivation { + name = "pine64-star64-spl"; + depsBuildBuild = [ spl-tool ]; + phases = [ "installPhase" ]; + installPhase = '' + mkdir -p $out/share/pine64-star64/ + ln -s ${uboot}/u-boot-spl.bin . + spl_tool -c -f ./u-boot-spl.bin + cp u-boot-spl.bin.normal.out $out/share/pine64-star64/spl.bin + ''; + }; + uboot-fit-image = stdenv.mkDerivation { + name = "pine64-star64-uboot-fit-image"; + nativeBuildInputs = [ dtc ]; + phases = [ "installPhase" ]; + installPhase = '' + mkdir -p $out/share/pine64-star64/ + ${uboot}/mkimage -f ${its-file} -A riscv -O u-boot -T firmware $out/share/pine64-star64/star64_fw_payload.img + ''; + }; + updater-flash = writeShellApplication { + name = "star64-firmware-update-flash"; + runtimeInputs = [ mtdutils ]; + text = '' + flashcp -v ${spl}/share/pine64-star64/spl.bin /dev/mtd0 + flashcp -v ${uboot-fit-image}/share/pine64-star64/star64_fw_payload.img /dev/mtd1 + ''; + }; + updater-sd = writeShellApplication { + name = "star64-firmware-update-sd"; + runtimeInputs = [ ]; + text = '' + dd if=${spl}/share/pine64-star64/spl.bin of=/dev/mmcblk0p1 conv=fsync + dd if=${uboot-fit-image}/share/pine64-star64/star64_fw_payload.img of=/dev/mmcblk0p2 conv=fsync + ''; + }; +} diff --git a/pine64/star64/irq-desc-to-data.patch b/pine64/star64/irq-desc-to-data.patch new file mode 100644 index 00000000..63209ad3 --- /dev/null +++ b/pine64/star64/irq-desc-to-data.patch @@ -0,0 +1,24 @@ +diff --git a/drivers/rtc/rtc-starfive.c b/drivers/rtc/rtc-starfive.c +index 895960ff0..d567cf876 100644 +--- a/drivers/rtc/rtc-starfive.c ++++ b/drivers/rtc/rtc-starfive.c +@@ -575,7 +575,7 @@ static int sft_rtc_probe(struct platform_device *pdev) + struct device *dev = &pdev->dev; + struct sft_rtc *srtc; + struct rtc_time tm; +- struct irq_desc *desc; ++ struct irq_data *data; + int ret; + + srtc = devm_kzalloc(dev, sizeof(*srtc), GFP_KERNEL); +@@ -640,8 +640,8 @@ static int sft_rtc_probe(struct platform_device *pdev) + srtc->rtc_dev->ops = &starfive_rtc_ops; + device_init_wakeup(dev, true); + +- desc = irq_to_desc(srtc->rtc_irq); +- irq_desc_get_chip(desc)->flags = IRQCHIP_SKIP_SET_WAKE; ++ data = irq_get_irq_data(srtc->rtc_irq); ++ irq_data_get_irq_chip(data)->flags = IRQCHIP_SKIP_SET_WAKE; + + /* Always use 24-hour mode and keep the RTC values */ + sft_rtc_set_mode(srtc, RTC_HOUR_MODE_24H); diff --git a/pine64/star64/linux-5.15.nix b/pine64/star64/linux-5.15.nix new file mode 100644 index 00000000..eca5ad5b --- /dev/null +++ b/pine64/star64/linux-5.15.nix @@ -0,0 +1,238 @@ +{ lib, callPackage, linuxPackagesFor, kernelPatches, fetchpatch, ... }: + +let + modDirVersion = "5.15.115"; + linuxPkg = { lib, fetchFromGitHub, buildLinux, ... }@args: + buildLinux (args // { + version = "${modDirVersion}-fishwaldo-star64"; + + src = fetchFromGitHub { + owner = "Fishwaldo"; + repo = "Star64_linux"; + rev = "765947eacb2408a3a232cbe8093bf28a991f3c35"; # Star64_devel branch + hash = "sha256-2Gbk2BsC9LCcXfXfgzJiPdEap90Y0Fl6Fz9TvIIbmB8="; + }; + + inherit modDirVersion; + defconfig = "pine64_star64_defconfig"; + kernelPatches = [ + { patch = fetchpatch { + url = "https://github.com/torvalds/linux/commit/215bebc8c6ac438c382a6a56bd2764a2d4e1da72.diff"; + hash = "sha256-1ZqmVOkgcDBRkHvVRPH8I5G1STIS1R/l/63PzQQ0z0I="; + includes = ["security/keys/dh.c"]; + }; + } + { patch = fetchpatch { + url = "https://github.com/starfive-tech/linux/pull/108/commits/9ae8cb751c4d1fd2146b279a8e67887590e9d07a.diff"; + hash = "sha256-EY0lno+HkY5mradBUPII3qqu0xh+BVQRzveCQcaht0M="; + }; + } + { patch = ./pl330-name-collision.patch; } + { patch = ./irq-desc-to-data.patch; } + ] ++ kernelPatches; + + structuredExtraConfig = with lib.kernel; { + # A ton of stuff just does not build. We disable it all. + # Most of it is not important except drm. + # https://github.com/starfive-tech/linux/issues/79 + + # Removed files, re-added to the makefile by accident in + # https://github.com/Fishwaldo/Star64_linux/commit/cd96097d17a494974dfc5e9909476145ab4f09f5 + CRYPTO_RMD128 = no; + CRYPTO_RMD256 = no; + CRYPTO_RMD320 = no; + CRYPTO_TGR192 = no; + CRYPTO_SALSA20 = no; + + CRYPTO_SM4 = no; # modpost: undefined stuff + CRYPTO_DEV_CCREE = no; # reverse dep of CRYPTO_SM4 + NLS_CODEPAGE_949 = no; + VIDEO_OV5640 = no; # conflicts with starfive VIN_SENSOR_OV5640 + + DRM_IMG = no; + DRM_IMG_ROGUE = no; + DRM_VERISILICON = no; + + # brute force disable drm + CEC_CORE = no; + CEC_NOTIFIER = no; + DRM = no; + DRM_MIPI_DBI = no; + DRM_MIPI_DSI = no; + DRM_DP_AUX_BUS = no; + DRM_DP_AUX_CHARDEV = lib.mkForce no; + DRM_KMS_HELPER = no; + DRM_FBDEV_EMULATION = no; + DRM_LOAD_EDID_FIRMWARE = lib.mkForce no; + DRM_TTM = no; + DRM_VRAM_HELPER = no; + DRM_TTM_HELPER = no; + DRM_GEM_CMA_HELPER = no; + DRM_KMS_CMA_HELPER = no; + DRM_GEM_SHMEM_HELPER = no; + DRM_SCHED = no; + DRM_I2C_CH7006 = no; + DRM_I2C_SIL164 = no; + DRM_I2C_NXP_TDA998X = no; # https://github.com/starfive-tech/linux/pull/86 + DRM_I2C_NXP_TDA9950 = no; + DRM_KOMEDA = no; + DRM_RADEON = no; + DRM_AMDGPU = no; + DRM_AMDGPU_SI = lib.mkForce no; + DRM_AMDGPU_CIK = lib.mkForce no; + DRM_AMDGPU_USERPTR = lib.mkForce no; + DRM_AMD_DC = no; + DRM_AMD_DC_HDCP = lib.mkForce no; + DRM_AMD_DC_SI = lib.mkForce no; + DRM_NOUVEAU = no; + NOUVEAU_LEGACY_CTX_SUPPORT = no; + DRM_NOUVEAU_BACKLIGHT = no; + DRM_VGEM = no; + DRM_VKMS = no; + DRM_UDL = no; + DRM_AST = no; + DRM_MGAG200 = no; + DRM_RCAR_DW_HDMI = no; + DRM_QXL = no; + DRM_VIRTIO_GPU = no; + DRM_PANEL = no; + DRM_PANEL_ABT_Y030XX067A = no; + DRM_PANEL_ARM_VERSATILE = no; + DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 = no; + DRM_PANEL_BOE_HIMAX8279D = no; + DRM_PANEL_BOE_TV101WUM_NL6 = no; + DRM_PANEL_DSI_CM = no; + DRM_PANEL_LVDS = no; + DRM_PANEL_SIMPLE = no; + DRM_PANEL_ELIDA_KD35T133 = no; + DRM_PANEL_FEIXIN_K101_IM2BA02 = no; + DRM_PANEL_FEIYANG_FY07024DI26A30D = no; + DRM_PANEL_ILITEK_IL9322 = no; + DRM_PANEL_ILITEK_ILI9341 = no; + DRM_PANEL_ILITEK_ILI9881C = no; + DRM_PANEL_INNOLUX_EJ030NA = no; + DRM_PANEL_INNOLUX_P079ZCA = no; + DRM_PANEL_JDI_LT070ME05000 = no; + DRM_PANEL_KHADAS_TS050 = no; + DRM_PANEL_KINGDISPLAY_KD097D04 = no; + DRM_PANEL_LEADTEK_LTK050H3146W = no; + DRM_PANEL_LEADTEK_LTK500HD1829 = no; + DRM_PANEL_SAMSUNG_LD9040 = no; + DRM_PANEL_LG_LB035Q02 = no; + DRM_PANEL_LG_LG4573 = no; + DRM_PANEL_NEC_NL8048HL11 = no; + DRM_PANEL_NOVATEK_NT35510 = no; + DRM_PANEL_NOVATEK_NT36672A = no; + DRM_PANEL_NOVATEK_NT39016 = no; + DRM_PANEL_MANTIX_MLAF057WE51 = no; + DRM_PANEL_OLIMEX_LCD_OLINUXINO = no; + DRM_PANEL_ORISETECH_OTM8009A = no; + DRM_PANEL_OSD_OSD101T2587_53TS = no; + DRM_PANEL_PANASONIC_VVX10F034N00 = no; + DRM_PANEL_RASPBERRYPI_TOUCHSCREEN = no; + DRM_PANEL_RAYDIUM_RM67191 = no; + DRM_PANEL_RAYDIUM_RM68200 = no; + DRM_PANEL_RONBO_RB070D30 = no; + DRM_PANEL_SAMSUNG_ATNA33XC20 = no; + DRM_PANEL_SAMSUNG_DB7430 = no; + DRM_PANEL_SAMSUNG_S6D16D0 = no; + DRM_PANEL_SAMSUNG_S6E3HA2 = no; + DRM_PANEL_SAMSUNG_S6E63J0X03 = no; + DRM_PANEL_SAMSUNG_S6E63M0 = no; + DRM_PANEL_SAMSUNG_S6E63M0_SPI = no; + DRM_PANEL_SAMSUNG_S6E63M0_DSI = no; + DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 = no; + DRM_PANEL_SAMSUNG_S6E8AA0 = no; + DRM_PANEL_SAMSUNG_SOFEF00 = no; + DRM_PANEL_SEIKO_43WVF1G = no; + DRM_PANEL_SHARP_LQ101R1SX01 = no; + DRM_PANEL_SHARP_LS037V7DW01 = no; + DRM_PANEL_SHARP_LS043T1LE01 = no; + DRM_PANEL_SITRONIX_ST7701 = no; + DRM_PANEL_SITRONIX_ST7703 = no; + DRM_PANEL_SITRONIX_ST7789V = no; + DRM_PANEL_SONY_ACX565AKM = no; + DRM_PANEL_TDO_TL070WSH30 = no; + DRM_PANEL_TPO_TD028TTEC1 = no; + DRM_PANEL_TPO_TD043MTEA1 = no; + DRM_PANEL_TPO_TPG110 = no; + DRM_PANEL_TRULY_NT35597_WQXGA = no; + DRM_PANEL_VISIONOX_RM69299 = no; + DRM_PANEL_WIDECHIPS_WS2401 = no; + DRM_PANEL_XINPENG_XPP055C272 = no; + DRM_BRIDGE = no; + DRM_PANEL_BRIDGE = no; + DRM_CDNS_DSI = no; + DRM_CHIPONE_ICN6211 = no; + DRM_CHRONTEL_CH7033 = no; + DRM_DISPLAY_CONNECTOR = no; + DRM_LONTIUM_LT8912B = no; + DRM_LONTIUM_LT9611 = no; + DRM_LONTIUM_LT9611UXC = no; + DRM_ITE_IT66121 = no; + DRM_LVDS_CODEC = no; + DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW = no; + DRM_NWL_MIPI_DSI = no; + DRM_NXP_PTN3460 = no; + DRM_PARADE_PS8622 = no; + DRM_PARADE_PS8640 = no; + DRM_SIL_SII8620 = no; + DRM_SII902X = no; + DRM_SII9234 = no; + DRM_SIMPLE_BRIDGE = no; + DRM_THINE_THC63LVD1024 = no; + DRM_TOSHIBA_TC358762 = no; + DRM_TOSHIBA_TC358764 = no; + DRM_TOSHIBA_TC358767 = no; + DRM_TOSHIBA_TC358768 = no; + DRM_TOSHIBA_TC358775 = no; + DRM_TI_TFP410 = no; + DRM_TI_SN65DSI83 = no; + DRM_TI_SN65DSI86 = no; + DRM_TI_TPD12S015 = no; + DRM_ANALOGIX_ANX6345 = no; + DRM_ANALOGIX_ANX78XX = no; + DRM_ANALOGIX_DP = no; + DRM_ANALOGIX_ANX7625 = no; + DRM_I2C_ADV7511 = no; + DRM_I2C_ADV7511_CEC = no; + DRM_CDNS_MHDP8546 = no; + DRM_DW_HDMI = no; + DRM_DW_HDMI_AHB_AUDIO = no; + DRM_DW_HDMI_I2S_AUDIO = no; + DRM_DW_HDMI_CEC = no; + DRM_ETNAVIV = no; + DRM_ETNAVIV_THERMAL = no; + DRM_MXS = no; + DRM_MXSFB = no; + DRM_ARCPGU = no; + DRM_BOCHS = no; + DRM_CIRRUS_QEMU = no; + DRM_GM12U320 = no; + TINYDRM_HX8357D = no; + TINYDRM_ILI9225 = no; + TINYDRM_ILI9341 = no; + TINYDRM_ILI9486 = no; + TINYDRM_MI0283QT = no; + TINYDRM_REPAPER = no; + TINYDRM_ST7586 = no; + TINYDRM_ST7735R = no; + DRM_GUD = no; + DRM_LEGACY = no; + DRM_TDFX = no; + DRM_R128 = no; + DRM_MGA = no; + DRM_VIA = no; + DRM_SAVAGE = no; + VIDEOMODE_HELPERS = no; + SND_PCM_ELD = no; + SND_PCM_IEC958 = no; + SND_HDA_COMPONENT = no; + SND_SOC_HDMI_CODEC = no; + VIRTIO_DMA_SHARED_BUFFER = no; + }; + + extraMeta.branch = "Star64_devel"; + } // (args.argsOverride or { })); + +in lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg { })) diff --git a/pine64/star64/opensbi.nix b/pine64/star64/opensbi.nix new file mode 100644 index 00000000..96fdb8e4 --- /dev/null +++ b/pine64/star64/opensbi.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, fetchFromGitHub +, python3 +, withPlatform ? "generic" +, withPayload ? null +, withFDT ? null +}: + +stdenv.mkDerivation rec { + pname = "opensbi"; + version = "1.3-git-2868f26"; + + src = fetchFromGitHub { + owner = "riscv-software-src"; + repo = "opensbi"; + rev = "2868f26131308ff345382084681ea89c5b0159f1"; + hash = "sha256-E+nVFLSpH6lQ2nVmMlVRTr7qYRVY0ULW7gUvAyTr90I="; + }; + + postPatch = '' + patchShebangs ./scripts + ''; + + nativeBuildInputs = [ python3 ]; + + installFlags = [ + "I=$(out)" + ]; + + makeFlags = [ + "PLATFORM=${withPlatform}" + "FW_TEXT_START=0x40000000" + ] ++ lib.optionals (withPayload != null) [ + "FW_PAYLOAD_PATH=${withPayload}" + ] ++ lib.optionals (withFDT != null) [ + "FW_FDT_PATH=${withFDT}" + ]; + + dontStrip = true; + dontPatchELF = true; +} diff --git a/pine64/star64/pl330-name-collision.patch b/pine64/star64/pl330-name-collision.patch new file mode 100644 index 00000000..255f7bec --- /dev/null +++ b/pine64/star64/pl330-name-collision.patch @@ -0,0 +1,40 @@ +diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c +index 110de8a60058..0a01256ef9e4 100644 +--- a/drivers/dma/pl330.c ++++ b/drivers/dma/pl330.c +@@ -1050,7 +1050,7 @@ static bool _trigger(struct pl330_thread *thrd) + return true; + } + +-static bool _start(struct pl330_thread *thrd) ++static bool _dma_start(struct pl330_thread *thrd) + { + switch (_state(thrd)) { + case PL330_STATE_FAULT_COMPLETING: +@@ -1702,7 +1702,7 @@ static int pl330_update(struct pl330_dmac *pl330) + thrd->req_running = -1; + + /* Get going again ASAP */ +- _start(thrd); ++ _dma_start(thrd); + + /* For now, just make a list of callbacks to be done */ + list_add_tail(&descdone->rqd, &pl330->req_done); +@@ -2089,7 +2089,7 @@ static void pl330_tasklet(struct tasklet_struct *t) + } else { + /* Make sure the PL330 Channel thread is active */ + spin_lock(&pch->thread->dmac->lock); +- _start(pch->thread); ++ _dma_start(pch->thread); + spin_unlock(&pch->thread->dmac->lock); + } + +@@ -2107,7 +2107,7 @@ static void pl330_tasklet(struct tasklet_struct *t) + if (power_down) { + pch->active = true; + spin_lock(&pch->thread->dmac->lock); +- _start(pch->thread); ++ _dma_start(pch->thread); + spin_unlock(&pch->thread->dmac->lock); + power_down = false; + } diff --git a/pine64/star64/sd-image-installer.nix b/pine64/star64/sd-image-installer.nix new file mode 100644 index 00000000..ee9d3647 --- /dev/null +++ b/pine64/star64/sd-image-installer.nix @@ -0,0 +1,11 @@ +{ modulesPath, ... }: +{ + imports = [ + "${modulesPath}/profiles/installation-device.nix" + ./sd-image.nix + ]; + + # The installation media is also the installation target, + # so we don't want to provide the installation configuration.nix. + installer.cloneConfig = false; +} diff --git a/pine64/star64/sd-image.nix b/pine64/star64/sd-image.nix new file mode 100644 index 00000000..03d55084 --- /dev/null +++ b/pine64/star64/sd-image.nix @@ -0,0 +1,52 @@ +{ config, pkgs, lib, modulesPath, ... }: + +let firmware = pkgs.callPackage ./firmware.nix { }; +in { + imports = [ + "${modulesPath}/profiles/base.nix" + "${modulesPath}/installer/sd-card/sd-image.nix" + ./default.nix + ]; + + sdImage = { + imageName = + "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}-pine64-star64.img"; + + # Overridden by postBuildCommands + populateFirmwareCommands = ""; + + firmwarePartitionOffset = 4; + firmwareSize = 4; + + postBuildCommands = '' + # preserve root partition + eval $(partx $img -o START,SECTORS --nr 2 --pairs) + + # increase image size for gpt backup header + truncate -s '+2M' $img + + sfdisk $img <; + }; + }; +}; diff --git a/pine64/star64/uboot.nix b/pine64/star64/uboot.nix new file mode 100644 index 00000000..ea41df10 --- /dev/null +++ b/pine64/star64/uboot.nix @@ -0,0 +1,20 @@ +{ fetchFromGitHub, buildUBoot }: + +buildUBoot rec { + version = "3.0.4"; + + src = fetchFromGitHub { + owner = "Fishwaldo"; + repo = "u-boot"; + rev = "172b47f62039605d6806fa96bd403c21cda28996"; # Star64 branch + hash = "sha256-UBPTLbSjDdL6NPUrAdsWcL28QSyiY/5oA+iqxl9dEGY="; + }; + + defconfig = "pine64_star64_defconfig"; + filesToInstall = [ + "u-boot.bin" + "arch/riscv/dts/pine64_star64.dtb" + "spl/u-boot-spl.bin" + "tools/mkimage" + ]; +} From 4259025da1308836a5c978ee8015f47b7185334b Mon Sep 17 00:00:00 2001 From: networkException Date: Sat, 8 Jul 2023 15:21:17 +0200 Subject: [PATCH 0488/1476] apple/t2: update to kernel 6.4.2 --- apple/t2/pkgs/linux-t2.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index fef3550c..712f0223 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -8,7 +8,7 @@ let hash = "sha256-VILJAK7F0E/8Z3sOzsUpS9dmtpull2XVXQkakZ0UTIA="; }; - version = "6.4"; + version = "6.4.2"; majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); in buildLinux (args // { @@ -20,7 +20,7 @@ buildLinux (args // { src = fetchurl { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-j6BYjwws7KRMrHeg45ukjJ8AprncaXYcAqXT76yNp/M="; + hash = "sha256-oyarIkF2xbF8c8nMrYXzLkm25Odkhh1XWVcnt+8QBiw="; }; structuredExtraConfig = with lib.kernel; { From 7f46848ea6f8755264be8cd37376bb068c185142 Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Sun, 9 Jul 2023 23:39:48 +0200 Subject: [PATCH 0489/1476] lenovo legion 7 slim 15ach6: remove brightness service --- lenovo/legion/15ach6/default.nix | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/lenovo/legion/15ach6/default.nix b/lenovo/legion/15ach6/default.nix index fac30f00..4844f79f 100644 --- a/lenovo/legion/15ach6/default.nix +++ b/lenovo/legion/15ach6/default.nix @@ -20,28 +20,4 @@ in { # √(3840² + 2160²) px / 15.60 in ≃ 282 dpi services.xserver.dpi = 282; - - # https://wiki.archlinux.org/title/backlight#Backlight_is_always_at_full_brightness_after_a_reboot_with_amdgpu_driver - systemd.services.fix-brightness = { - before = [ - "systemd-backlight@backlight:${ - if lib.versionOlder kernelPackages.kernel.version "5.18" then "amdgpu_bl0" else "nvidia_wmi_ec_backlight" - }.service" - ]; - description = "Convert 16-bit brightness values to 8-bit before systemd-backlight applies it"; - script = '' - BRIGHTNESS_FILE="/var/lib/systemd/backlight/${ - if lib.versionOlder kernelPackages.kernel.version "5.18" then - "pci-0000:05:00.0:backlight:amdgpu_bl0" - else - "platform-PNP0C14:00:backlight:nvidia_wmi_ec_backlight" - }" - BRIGHTNESS=$(cat "$BRIGHTNESS_FILE") - BRIGHTNESS=$(($BRIGHTNESS*255/65535)) - BRIGHTNESS=''${BRIGHTNESS/.*} # truncating to int, just in case - echo $BRIGHTNESS > "$BRIGHTNESS_FILE" - ''; - serviceConfig.Type = "oneshot"; - wantedBy = [ "multi-user.target" ]; - }; } From bb7ba40a67bfc8f4bbc23aad6e12d8df0e1df53f Mon Sep 17 00:00:00 2001 From: Ganga Ram <131853076+codehub8@users.noreply.github.com> Date: Mon, 10 Jul 2023 10:12:50 +0400 Subject: [PATCH 0490/1476] Update microchip/common/bsp/uboot.nix Added branch name, for better trackability. Co-authored-by: Sandro --- microchip/common/bsp/uboot.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/microchip/common/bsp/uboot.nix b/microchip/common/bsp/uboot.nix index 5237c77f..8bbe2a4e 100644 --- a/microchip/common/bsp/uboot.nix +++ b/microchip/common/bsp/uboot.nix @@ -13,6 +13,7 @@ buildUBoot rec { src = fetchFromGitHub { owner = "polarfire-soc"; repo = "u-boot"; + # from mpfs-uboot-2022.01 branch rev = "7e19f9dff788025403ac6a34d9acf8736eef32ff"; sha256 = "sha256-1qmifjjNxPOUWRgZdQk6Ld5KGQk/PypSRK/ILPSsTLs"; }; From 39eac9bf9a5553ba0815f5824309fa00f9573820 Mon Sep 17 00:00:00 2001 From: SnIcK Date: Tue, 11 Jul 2023 02:20:24 -0500 Subject: [PATCH 0491/1476] added 16IRX8H Lenovo Legion 7i Pro (2023) (#660) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * added 16IRX8H Lenovo Legion 7i Pro (2023) Co-authored-by: Jörg Thalheim --- README.md | 1 + flake.nix | 1 + lenovo/legion/16irx8h/default.nix | 35 +++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 lenovo/legion/16irx8h/default.nix diff --git a/README.md b/README.md index 71911b33..1a72c795 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,7 @@ See code for all available configurations. | [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | | [Lenovo Legion 5 Pro 16ach6h (Hybrid)](lenovo/legion/16ach6h/hybrid)| `` | | [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia)| `` | +| [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | | [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | diff --git a/flake.nix b/flake.nix index 505c0a73..ea302bb8 100644 --- a/flake.nix +++ b/flake.nix @@ -77,6 +77,7 @@ lenovo-legion-16ach6h-hybrid = import ./lenovo/legion/16ach6h/hybrid; lenovo-legion-16ach6h-nvidia = import ./lenovo/legion/16ach6h/nvidia; lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; + lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h; lenovo-legion-y530-15ich = import ./lenovo/legion/15ich; lenovo-thinkpad = import ./lenovo/thinkpad; lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; diff --git a/lenovo/legion/16irx8h/default.nix b/lenovo/legion/16irx8h/default.nix new file mode 100644 index 00000000..7249c1dd --- /dev/null +++ b/lenovo/legion/16irx8h/default.nix @@ -0,0 +1,35 @@ +{ + lib, + config, + pkgs, + ... +}: { + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/nvidia/prime.nix + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ../../../common/hidpi.nix + ]; + + boot.initrd.kernelModules = ["nvidia"]; + boot.extraModulePackages = [config.boot.kernelPackages.lenovo-legion-module config.boot.kernelPackages.nvidia_x11]; + + hardware = { + nvidia = { + modesetting.enable = lib.mkDefault true; + powerManagement.enable = lib.mkDefault true; + # + prime = { + intelBusId = "PCI:00:02:0"; + nvidiaBusId = "PCI:01:00:0"; + }; + }; + }; + + # Cooling management + services.thermald.enable = lib.mkDefault true; + + # √(2560² + 1600²) px / 16 in ≃ 189 dpi + services.xserver.dpi = 189; +} From bc2ab72beca298aa6074eaee0a612d3dd08d5073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 14 Jul 2023 09:42:08 +0200 Subject: [PATCH 0492/1476] framework: switch to power-profiles-daemon --- framework/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/default.nix b/framework/default.nix index bbb38e5d..1cb5c95a 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -24,6 +24,9 @@ options snd-hda-intel model=dell-headset-multi ''; + # Less invasive than tlp and should work for frameworks + services.power-profiles-daemon.enable = lib.mkDefault true; + # For fingerprint support services.fprintd.enable = lib.mkDefault true; From d4ea64f2063820120c05f6ba93ee02e6d4671d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 14 Jul 2023 09:42:36 +0200 Subject: [PATCH 0493/1476] Revert "framework: switch to power-profiles-daemon" This reverts commit bc2ab72beca298aa6074eaee0a612d3dd08d5073. This was accidentially pushed to master instead to a PR. --- framework/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/framework/default.nix b/framework/default.nix index 1cb5c95a..bbb38e5d 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -24,9 +24,6 @@ options snd-hda-intel model=dell-headset-multi ''; - # Less invasive than tlp and should work for frameworks - services.power-profiles-daemon.enable = lib.mkDefault true; - # For fingerprint support services.fprintd.enable = lib.mkDefault true; From 70325e398b4cf1410ed024d9dea486f61446878b Mon Sep 17 00:00:00 2001 From: CodeChomper Date: Tue, 18 Jul 2023 19:23:58 -0700 Subject: [PATCH 0494/1476] Added Asus Zephyrus GA502 --- README.md | 1 + asus/zephyrus/ga502/default.nix | 21 +++++++++++++++++++++ flake.nix | 1 + 3 files changed, 23 insertions(+) create mode 100644 asus/zephyrus/ga502/default.nix diff --git a/README.md b/README.md index 1a72c795..ffff350b 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ See code for all available configurations. | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | +| [Asus ROG Zephyrus G15 GA502](asus/zephyrus/ga502) | `` | | [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | diff --git a/asus/zephyrus/ga502/default.nix b/asus/zephyrus/ga502/default.nix new file mode 100644 index 00000000..0e98b256 --- /dev/null +++ b/asus/zephyrus/ga502/default.nix @@ -0,0 +1,21 @@ +{ ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/gpu/nvidia/prime.nix + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:6:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + + # fixes mic mute button + services.udev.extraHwdb = '' + evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* + KEYBOARD_KEY_ff31007c=f20 + ''; +} diff --git a/flake.nix b/flake.nix index ea302bb8..92930722 100644 --- a/flake.nix +++ b/flake.nix @@ -19,6 +19,7 @@ asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; + asus-zephyrus-ga502 = import ./asus/zephyrus/ga502; asus-zephyrus-ga503 = import ./asus/zephyrus/ga503; beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; dell-e7240 = import ./dell/e7240; From 20f2efe651b7bf812cc26ae8bb4c3daf5927cd96 Mon Sep 17 00:00:00 2001 From: Alexandre Acebedo Date: Sun, 16 Jul 2023 20:49:56 +0200 Subject: [PATCH 0495/1476] ga402: remove useless kernel flags --- asus/zephyrus/ga402/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asus/zephyrus/ga402/default.nix b/asus/zephyrus/ga402/default.nix index c0c1ee9c..7c11090e 100644 --- a/asus/zephyrus/ga402/default.nix +++ b/asus/zephyrus/ga402/default.nix @@ -20,6 +20,6 @@ }; boot = { - kernelParams = [ "pcie_aspm.policy=powersupersave" "acpi.prefer_microsoft_dsm_guid=1" ]; + kernelParams = [ "pcie_aspm.policy=powersupersave" ]; }; } From ba9650b14e83b365fb9e731f7d7c803f22d2aecf Mon Sep 17 00:00:00 2001 From: Matt Layher Date: Tue, 18 Jul 2023 08:46:08 -0400 Subject: [PATCH 0496/1476] deciso/dec: init, tested with DEC2750 Signed-off-by: Matt Layher --- README.md | 1 + deciso/dec/default.nix | 3 +++ flake.nix | 1 + 3 files changed, 5 insertions(+) create mode 100644 deciso/dec/default.nix diff --git a/README.md b/README.md index ffff350b..52b55213 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,7 @@ See code for all available configurations. | [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | +| [Deciso DEC series](deciso/dec) | `` | | [Dell G3 3779](dell/g3/3779) | `` | | [Dell Inspiron 5509](dell/inspiron/5509) | `` | | [Dell Inspiron 5515](dell/inspiron/5515) | `` | diff --git a/deciso/dec/default.nix b/deciso/dec/default.nix new file mode 100644 index 00000000..f59f35a2 --- /dev/null +++ b/deciso/dec/default.nix @@ -0,0 +1,3 @@ +{ + boot.kernelParams = [ "console=ttyS0,115200n8" ]; +} diff --git a/flake.nix b/flake.nix index 92930722..3d5bcfca 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,7 @@ asus-zephyrus-ga502 = import ./asus/zephyrus/ga502; asus-zephyrus-ga503 = import ./asus/zephyrus/ga503; beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; + deciso-dec = import ./deciso/dec; dell-e7240 = import ./dell/e7240; dell-g3-3779 = import ./dell/g3/3779; dell-inspiron-5509 = import ./dell/inspiron/5509; From 67b0b87fd8e77a0b0bb6b37b09e5b70fa7cea713 Mon Sep 17 00:00:00 2001 From: dadada Date: Sat, 29 Jul 2023 18:36:29 +0200 Subject: [PATCH 0497/1476] p14s, t14s: remove linux-firmware version check nixpkgs is currently using the `unstable-` version See https://github.com/NixOS/nixpkgs/commit/beb6196e9ed1f59fa9c8884b2b9e2d0eafb67bbc --- lenovo/thinkpad/p14s/amd/gen2/default.nix | 4 ---- lenovo/thinkpad/t14s/amd/gen1/default.nix | 4 ---- 2 files changed, 8 deletions(-) diff --git a/lenovo/thinkpad/p14s/amd/gen2/default.nix b/lenovo/thinkpad/p14s/amd/gen2/default.nix index 4fefc37d..bc7a3136 100644 --- a/lenovo/thinkpad/p14s/amd/gen2/default.nix +++ b/lenovo/thinkpad/p14s/amd/gen2/default.nix @@ -10,10 +10,6 @@ # acpi_backlight=none allows the backlight save/load systemd service to work on older kernel versions boot.kernelParams = [ "amdgpu.backlight=0" ] ++ lib.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.1.6") "acpi_backlight=none"; - - # Wifi support - hardware.firmware = lib.mkIf (lib.versionOlder pkgs.linux-firmware.version "20230210") [ pkgs.rtw89-firmware ]; - # For mainline support of rtw89 wireless networking boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; } diff --git a/lenovo/thinkpad/t14s/amd/gen1/default.nix b/lenovo/thinkpad/t14s/amd/gen1/default.nix index f6bb75af..470a9179 100644 --- a/lenovo/thinkpad/t14s/amd/gen1/default.nix +++ b/lenovo/thinkpad/t14s/amd/gen1/default.nix @@ -1,12 +1,8 @@ - { lib, pkgs, ... }: - { imports = [ ../. ]; - # Wifi support - hardware.firmware = lib.mkIf (lib.versionOlder pkgs.linux-firmware.version "20230210") [ pkgs.rtw89-firmware ]; # For mainline support of rtw89 wireless networking boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; From 96e5a0a0e8568c998135ea05575a9ed2c87f5492 Mon Sep 17 00:00:00 2001 From: dadada Date: Sat, 29 Jul 2023 18:38:30 +0200 Subject: [PATCH 0498/1476] t14s: reformat --- lenovo/thinkpad/t14s/amd/gen1/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/thinkpad/t14s/amd/gen1/default.nix b/lenovo/thinkpad/t14s/amd/gen1/default.nix index 470a9179..b7183f06 100644 --- a/lenovo/thinkpad/t14s/amd/gen1/default.nix +++ b/lenovo/thinkpad/t14s/amd/gen1/default.nix @@ -8,5 +8,5 @@ boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; # Enable energy savings during sleep - boot.kernelParams = ["mem_sleep_default=deep"]; + boot.kernelParams = [ "mem_sleep_default=deep" ]; } From 9910c6985687cf1c365bc10c95c5bacdaed81e3f Mon Sep 17 00:00:00 2001 From: Dom Rodriguez Date: Tue, 1 Aug 2023 21:04:17 +0100 Subject: [PATCH 0499/1476] GPD-P3: Remove S2 sleep kernel param, use S3 instead It seems S3 works on NixOS without this option now. I have tested this on NixOS 22.11/23.05, without issues. Removing this option ensures better battery life whilst the UMPC is in sleep mode, and reduces the chances of overheating whilst in transit. --- gpd/pocket-3/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/gpd/pocket-3/default.nix b/gpd/pocket-3/default.nix index 634e36b4..52d09136 100644 --- a/gpd/pocket-3/default.nix +++ b/gpd/pocket-3/default.nix @@ -20,9 +20,6 @@ in ]; boot.kernelParams = [ - # S3 suspend is broken as of Sept. 2022 (screen does not come back properly), use S2 - "mem_sleep_default=s2idle" - # The GPD Pocket3 uses a tablet OLED display, that is mounted rotated 90° counter-clockwise "fbcon=rotate:1" "video=DSI-1:panel_orientation=right_side_up" ]; From af694376e2f20e6ab40bf814cad24590bed0aa9d Mon Sep 17 00:00:00 2001 From: Dom Rodriguez Date: Tue, 1 Aug 2023 20:53:37 +0100 Subject: [PATCH 0500/1476] p14s: Add common/{cpu,gpu}/amd to imports This is my first upstream contribution (intend to contribute configs for my NUC, GPD, and ClockworkPi uConsole/DevTerm). Essentially, this change resolves #492, by adding the `common/{cpu,gpu}/amd` Nix fragments to the `imports` list for the Thinkpad P14s. --- lenovo/thinkpad/p14s/amd/gen2/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lenovo/thinkpad/p14s/amd/gen2/default.nix b/lenovo/thinkpad/p14s/amd/gen2/default.nix index bc7a3136..89632e2e 100644 --- a/lenovo/thinkpad/p14s/amd/gen2/default.nix +++ b/lenovo/thinkpad/p14s/amd/gen2/default.nix @@ -2,6 +2,8 @@ { imports = [ ../../../../../common/pc/laptop/acpi_call.nix + ../../../../../common/cpu/amd + ../../../../../common/gpu/amd ]; # For suspending to RAM, set Config -> Power -> Sleep State to "Linux" in EFI. From 353829048c3a7c3a99346fe6686672330b1109b1 Mon Sep 17 00:00:00 2001 From: Christoph Charles <23055925+christophcharles@users.noreply.github.com> Date: Sun, 30 Jul 2023 09:13:16 +0200 Subject: [PATCH 0501/1476] microsoft-surface: update default kernel to 6.1.18 --- 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 9bf2a954..3f54c9cb 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.0.17"; + microsoft-surface.kernelVersion = mkDefault "6.1.18"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; From 24f9162b26f0debd163f6d94752aa2acb9db395a Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Tue, 25 Jul 2023 15:02:00 +0800 Subject: [PATCH 0502/1476] framework: Clarify 13th Gen Intel Core support Signed-off-by: Daniel Schaefer --- README.md | 3 ++- framework/12th-gen-intel/README.md | 4 ++-- framework/13th-gen-intel/README.md | 15 +++++++++++++++ framework/13th-gen-intel/default.nix | 7 +++++++ framework/README.md | 2 +- 5 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 framework/13th-gen-intel/README.md create mode 100644 framework/13th-gen-intel/default.nix diff --git a/README.md b/README.md index 52b55213..44b9fa3a 100644 --- a/README.md +++ b/README.md @@ -124,8 +124,9 @@ See code for all available configurations. | [Dell XPS 17 9700, nvidia](dell/xps/17-9700/nvidia) | `` | | [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | | [Dell XPS E7240](dell/e7240) | `` | -| [Framework](framework) | `` | +| [Framework 11th Gen Intel Core](framework) | `` | | [Framework 12th Gen Intel Core](framework/12th-gen-intel) | `` | +| [Framework 13th Gen Intel Core](framework/12th-gen-intel) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [Focus M2 Gen 1](focus/m2/gen1) | `` | | [GPD MicroPC](gpd/micropc) | `` | diff --git a/framework/12th-gen-intel/README.md b/framework/12th-gen-intel/README.md index e8d10e04..104566fb 100644 --- a/framework/12th-gen-intel/README.md +++ b/framework/12th-gen-intel/README.md @@ -1,4 +1,4 @@ -# [Framework Laptop](https://frame.work/) +# [Framework Laptop 13](https://frame.work/) ## Updating Firmware @@ -14,4 +14,4 @@ Then run $ sudo fwupdmgr update ``` -[Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.TGL.BIOS.firmware) +- [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.ADL.BIOS.firmware) diff --git a/framework/13th-gen-intel/README.md b/framework/13th-gen-intel/README.md new file mode 100644 index 00000000..fc333d24 --- /dev/null +++ b/framework/13th-gen-intel/README.md @@ -0,0 +1,15 @@ +# [Framework Laptop 13](https://frame.work/) + +## Updating Firmware + +First put enable `fwupd` + +```nix +services.fwupd.enable = true; +``` + +Then run + +```sh + $ sudo fwupdmgr update +``` diff --git a/framework/13th-gen-intel/default.nix b/framework/13th-gen-intel/default.nix new file mode 100644 index 00000000..56a2697a --- /dev/null +++ b/framework/13th-gen-intel/default.nix @@ -0,0 +1,7 @@ +{ lib, pkgs, ... }: { + imports = [ + # Same config as 12th Gen. The chipsets and mainboard are similar enough + # that no separate configuration is needed. + ../12th-gen-intel + ]; +} diff --git a/framework/README.md b/framework/README.md index e8d10e04..5d54aed2 100644 --- a/framework/README.md +++ b/framework/README.md @@ -1,4 +1,4 @@ -# [Framework Laptop](https://frame.work/) +# [Framework Laptop 13](https://frame.work/) ## Updating Firmware From 6dcf1381ec3a77901bbd8b014b8a0e29157f9688 Mon Sep 17 00:00:00 2001 From: Matthieu Dubuget Date: Thu, 3 Aug 2023 21:50:38 +0200 Subject: [PATCH 0503/1476] Adding Dell XPS 13 9333 --- README.md | 1 + dell/xps/13-9333/README.wiki | 9 +++++++++ dell/xps/13-9333/default.nix | 15 +++++++++++++++ flake.nix | 1 + 4 files changed, 26 insertions(+) create mode 100644 dell/xps/13-9333/README.wiki create mode 100644 dell/xps/13-9333/default.nix diff --git a/README.md b/README.md index 44b9fa3a..093e950b 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,7 @@ See code for all available configurations. | [Dell XPS 13 7390](dell/xps/13-7390) | `` | | [Dell XPS 13 9300](dell/xps/13-9300) | `` | | [Dell XPS 13 9310](dell/xps/13-9310) | `` | +| [Dell XPS 13 9333](dell/xps/13-9333) | `` | | [Dell XPS 13 9343](dell/xps/13-9343) | `` | | [Dell XPS 13 9350](dell/xps/13-9350) | `` | | [Dell XPS 13 9360](dell/xps/13-9360) | `` | diff --git a/dell/xps/13-9333/README.wiki b/dell/xps/13-9333/README.wiki new file mode 100644 index 00000000..97092c11 --- /dev/null +++ b/dell/xps/13-9333/README.wiki @@ -0,0 +1,9 @@ += Dell XPS 13 9300 = + +== SSD == + +In the default.nix file, I imported +../../../common/pc/ssd because my laptop has currently an SSD, but +I'm not sure if it was the case when I bought it or if I installed it later. + +The main updates allow the touchpad to work. diff --git a/dell/xps/13-9333/default.nix b/dell/xps/13-9333/default.nix new file mode 100644 index 00000000..d50da801 --- /dev/null +++ b/dell/xps/13-9333/default.nix @@ -0,0 +1,15 @@ +{ lib, pkgs, ... }: { + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + # Required to allow the touchpad to work + boot.kernelParams = [ "i8042.nopnp=1" ]; + boot.blacklistedKernelModules = [ "i2c_hid" "i2c_hid_acpi" ]; + boot.kernelModules = [ "synaptics_i2c"]; + + # Allows for updating firmware via `fwupdmgr`. + services.fwupd.enable = true; +} diff --git a/flake.nix b/flake.nix index 3d5bcfca..7fa6e294 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,7 @@ 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; + dell-xps-13-9333 = import ./dell/xps/13-9333; dell-xps-13-9343 = import ./dell/xps/13-9343; dell-xps-13-9350 = import ./dell/xps/13-9350; dell-xps-13-9360 = import ./dell/xps/13-9360; From b4f1105b9c894b255388629cb9b15c908f414e58 Mon Sep 17 00:00:00 2001 From: Matthieu Dubuget Date: Fri, 4 Aug 2023 17:31:28 +0200 Subject: [PATCH 0504/1476] Update default.nix: removing the fwupd line --- dell/xps/13-9333/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/dell/xps/13-9333/default.nix b/dell/xps/13-9333/default.nix index d50da801..3aa0bf6b 100644 --- a/dell/xps/13-9333/default.nix +++ b/dell/xps/13-9333/default.nix @@ -9,7 +9,4 @@ boot.kernelParams = [ "i8042.nopnp=1" ]; boot.blacklistedKernelModules = [ "i2c_hid" "i2c_hid_acpi" ]; boot.kernelModules = [ "synaptics_i2c"]; - - # Allows for updating firmware via `fwupdmgr`. - services.fwupd.enable = true; } From 258b9faff07cb7676002c63793e6f7da2c522a96 Mon Sep 17 00:00:00 2001 From: networkException Date: Fri, 4 Aug 2023 01:58:10 +0200 Subject: [PATCH 0505/1476] apple/t2: update to kernel 6.4.8 --- apple/t2/pkgs/linux-t2.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index 712f0223..45e75a2c 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -4,11 +4,11 @@ let patchRepo = fetchFromGitHub { owner = "t2linux"; repo = "linux-t2-patches"; - rev = "c0db79a25bc37dbd0c27636914b3903016a2fc39"; - hash = "sha256-VILJAK7F0E/8Z3sOzsUpS9dmtpull2XVXQkakZ0UTIA="; + rev = "c908e506346681139a844d41c40b295cfad17ea8"; + hash = "sha256-zCpZP/QrnP4xB2bJ0yZv88N4BgE4K+5KOCzm/pBbnJw="; }; - version = "6.4.2"; + version = "6.4.8"; majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); in buildLinux (args // { @@ -20,7 +20,7 @@ buildLinux (args // { src = fetchurl { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-oyarIkF2xbF8c8nMrYXzLkm25Odkhh1XWVcnt+8QBiw="; + hash = "sha256-xZ804Z6E2zAga5NzBBq/iT+digh2XRY1hlcKUjjEWLY="; }; structuredExtraConfig = with lib.kernel; { From e8159d4e3d271f60f89e349d820726856ce09f11 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Wed, 26 Jul 2023 14:44:47 +0800 Subject: [PATCH 0506/1476] starfive visionfive2: update kernel to 6.5.0-rc1 --- starfive/visionfive/v2/default.nix | 2 +- starfive/visionfive/v2/{linux-6.4.nix => linux-6.5.nix} | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename starfive/visionfive/v2/{linux-6.4.nix => linux-6.5.nix} (82%) diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index 964b0e54..e4ba8937 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -4,7 +4,7 @@ supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; consoleLogLevel = lib.mkDefault 7; - kernelPackages = lib.mkDefault (pkgs.callPackage ./linux-6.4.nix { + kernelPackages = lib.mkDefault (pkgs.callPackage ./linux-6.5.nix { inherit (config.boot) kernelPatches; }); diff --git a/starfive/visionfive/v2/linux-6.4.nix b/starfive/visionfive/v2/linux-6.5.nix similarity index 82% rename from starfive/visionfive/v2/linux-6.4.nix rename to starfive/visionfive/v2/linux-6.5.nix index d0b8e4eb..c68144e3 100644 --- a/starfive/visionfive/v2/linux-6.4.nix +++ b/starfive/visionfive/v2/linux-6.5.nix @@ -1,7 +1,7 @@ { lib, callPackage, linuxPackagesFor, kernelPatches, ... }: let - modDirVersion = "6.4.0"; + modDirVersion = "6.5.0-rc1"; linuxPkg = { lib, fetchFromGitHub, buildLinux, ... }@args: buildLinux (args // { version = "${modDirVersion}-starfive-visionfive2"; @@ -9,8 +9,8 @@ let src = fetchFromGitHub { owner = "starfive-tech"; repo = "linux"; - rev = "e5a381c51d624ffd8784db908a58ae227d0608a4"; - sha256 = "sha256-gg3+2ITdnpo49UmySiAJnk47STW1I7kF7fsKGBVayRE="; + rev = "64a6c57ec372c44d0f25416c9614657e274fccff"; + hash = "sha256-ZOCCj/VyUZa36+q6sUnE+qA0FcNCFnQjIUils0hBb28="; }; inherit modDirVersion; From 87e3122b67587492a617764f88c71991893fcf8a Mon Sep 17 00:00:00 2001 From: Jakob Leifhelm Date: Thu, 8 Jun 2023 20:33:14 +0200 Subject: [PATCH 0507/1476] starfive visionfive2: Increase mtd0 to fit spl --- starfive/visionfive/v2/default.nix | 5 +++++ starfive/visionfive/v2/qspi-patch.dts | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 starfive/visionfive/v2/qspi-patch.dts diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index e4ba8937..1a3c66c5 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -21,4 +21,9 @@ hardware.deviceTree.name = lib.mkDefault "starfive/jh7110-starfive-visionfive-2-v1.3b.dtb"; + + hardware.deviceTree.overlays = [{ + name = "qspi-patch"; + dtsFile = ./qspi-patch.dts; + }]; } diff --git a/starfive/visionfive/v2/qspi-patch.dts b/starfive/visionfive/v2/qspi-patch.dts new file mode 100644 index 00000000..6e12c98a --- /dev/null +++ b/starfive/visionfive/v2/qspi-patch.dts @@ -0,0 +1,17 @@ +/dts-v1/; +/plugin/; +/ { + compatible = "starfive,jh7110"; + fragment@0 { + target = <&qspi>; + __overlay__ { + nor_flash: flash@0 { + partitions { + spl@0 { + reg = <0x0 0x40000>; + }; + }; + }; + }; + }; +}; From ae712596242bd537d491528ba5a863595952689b Mon Sep 17 00:00:00 2001 From: bagelwaffle Date: Thu, 3 Aug 2023 21:49:22 -0700 Subject: [PATCH 0508/1476] inspiron 14 5420: initial --- README.md | 1 + dell/inspiron/14-5420/README.md | 10 ++++++++++ dell/inspiron/14-5420/default.nix | 25 +++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 dell/inspiron/14-5420/README.md create mode 100644 dell/inspiron/14-5420/default.nix diff --git a/README.md b/README.md index 093e950b..ae25b821 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,7 @@ See code for all available configurations. | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Deciso DEC series](deciso/dec) | `` | | [Dell G3 3779](dell/g3/3779) | `` | +| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | | [Dell Inspiron 5509](dell/inspiron/5509) | `` | | [Dell Inspiron 5515](dell/inspiron/5515) | `` | | [Dell Inspiron 7405](dell/inspiron/7405) | `` | diff --git a/dell/inspiron/14-5420/README.md b/dell/inspiron/14-5420/README.md new file mode 100644 index 00000000..7327f26e --- /dev/null +++ b/dell/inspiron/14-5420/README.md @@ -0,0 +1,10 @@ +# Dell Inspiron 14 5420 + +### Hardware +- CPU: Intel® Core™ i7-1260P Processor +- GPU: Intel® Iris® Xe Graphics + +### Other Info +`fwupd` is used to receive firmware updates from vendors. This device is in its [supported devices list](https://fwupd.org/lvfs/devices/) + +`thermald` and `tlp` are used to achieve better battery life and better thermal behaviour diff --git a/dell/inspiron/14-5420/default.nix b/dell/inspiron/14-5420/default.nix new file mode 100644 index 00000000..7f82c2e3 --- /dev/null +++ b/dell/inspiron/14-5420/default.nix @@ -0,0 +1,25 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + hardware = { + enableRedistributableFirmware = lib.mkDefault true; + }; + + services = { + fwupd = { + enable = lib.mkDefault true; + }; + thermald = { + enable = lib.mkDefault true; + }; + tlp = { + enable = lib.mkDefault true; + }; + }; +} From a75e04b2599136dc41606f7aab7ab41c2de718f9 Mon Sep 17 00:00:00 2001 From: bagelwaffle Date: Thu, 3 Aug 2023 22:31:29 -0700 Subject: [PATCH 0509/1476] inspiron 14 5420: remove TLP --- dell/inspiron/14-5420/README.md | 5 ++++- dell/inspiron/14-5420/default.nix | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dell/inspiron/14-5420/README.md b/dell/inspiron/14-5420/README.md index 7327f26e..dc3c22b6 100644 --- a/dell/inspiron/14-5420/README.md +++ b/dell/inspiron/14-5420/README.md @@ -7,4 +7,7 @@ ### Other Info `fwupd` is used to receive firmware updates from vendors. This device is in its [supported devices list](https://fwupd.org/lvfs/devices/) -`thermald` and `tlp` are used to achieve better battery life and better thermal behaviour +`thermald` is used to achieve better thermal behaviour + +##### TLP +TLP is a battery power optimizer for laptops. You may enable it with `services.tlp.enable = true;`, however, please note that it may conflict with GNOME's power management. Enabling TLP may require additional configurations. diff --git a/dell/inspiron/14-5420/default.nix b/dell/inspiron/14-5420/default.nix index 7f82c2e3..658f0b3b 100644 --- a/dell/inspiron/14-5420/default.nix +++ b/dell/inspiron/14-5420/default.nix @@ -18,8 +18,5 @@ thermald = { enable = lib.mkDefault true; }; - tlp = { - enable = lib.mkDefault true; - }; }; } From a5a696f281b5ecc8a56396491df00f6f0b9786db Mon Sep 17 00:00:00 2001 From: Baffle Date: Fri, 4 Aug 2023 13:19:38 -0700 Subject: [PATCH 0510/1476] inspiron 14 5420: add to flake.nix --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 7fa6e294..193e93fd 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,7 @@ deciso-dec = import ./deciso/dec; dell-e7240 = import ./dell/e7240; dell-g3-3779 = import ./dell/g3/3779; + dell-inspiron-14-5420 = import ./dell/inspiron/14-5420; dell-inspiron-5509 = import ./dell/inspiron/5509; dell-inspiron-5515 = import ./dell/inspiron/5515; dell-inspiron-7405 = import ./dell/inspiron/7405; From 5426a95071d0b9782b3209b3995cde1f5689616e Mon Sep 17 00:00:00 2001 From: Baffle Date: Fri, 4 Aug 2023 15:10:02 -0700 Subject: [PATCH 0511/1476] inspiron 14 5420: more tlp info in README --- dell/inspiron/14-5420/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dell/inspiron/14-5420/README.md b/dell/inspiron/14-5420/README.md index dc3c22b6..a7c5c06b 100644 --- a/dell/inspiron/14-5420/README.md +++ b/dell/inspiron/14-5420/README.md @@ -10,4 +10,4 @@ `thermald` is used to achieve better thermal behaviour ##### TLP -TLP is a battery power optimizer for laptops. You may enable it with `services.tlp.enable = true;`, however, please note that it may conflict with GNOME's power management. Enabling TLP may require additional configurations. +TLP is a battery power optimizer for laptops. It is enabled by default, however, since it conflicts with power-profiles-daemon which is GNOME's power management system, TLP will not be installed with if power-profiles-daemon or a recent version of GNOME is present. From 1b3c128388ff214c6b91b4564903a9bce4cbbfa3 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 8 Aug 2023 12:06:25 -0600 Subject: [PATCH 0512/1476] common/nvidia disable: Remove `lib.mkDefault` --- common/gpu/nvidia/disable.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/gpu/nvidia/disable.nix b/common/gpu/nvidia/disable.nix index cc509819..6ea07adc 100644 --- a/common/gpu/nvidia/disable.nix +++ b/common/gpu/nvidia/disable.nix @@ -1,15 +1,15 @@ -{ lib, ... }: +{ ... }: { # This runs only intel/amdgpu igpus and nvidia dgpus do not drain power. ##### disable nvidia, very nice battery life. - boot.extraModprobeConfig = lib.mkDefault '' + boot.extraModprobeConfig = '' blacklist nouveau options nouveau modeset=0 ''; - services.udev.extraRules = lib.mkDefault '' + services.udev.extraRules = '' # Remove NVIDIA USB xHCI Host Controller devices, if present ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1" @@ -22,5 +22,5 @@ # Remove NVIDIA VGA/3D controller devices ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1" ''; - boot.blacklistedKernelModules = lib.mkDefault [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ]; + boot.blacklistedKernelModules = [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ]; } From 8ff521acd2c8132c62141c2990deb7406e32b335 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 8 Aug 2023 12:04:08 -0600 Subject: [PATCH 0513/1476] XPS 9560: Remove `lib.mkDefault` on mergable options --- dell/xps/15-9560/default.nix | 6 +++--- dell/xps/15-9560/xps-common.nix | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index e7ec6c29..0ee38d9a 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -15,9 +15,9 @@ ##### bumblebee working, needs reboot to take affect and to use it run: optirun "" - services.xserver.videoDrivers = lib.mkDefault [ "intel" "nvidia" ]; - boot.blacklistedKernelModules = lib.mkDefault [ "nouveau" "bbswitch" ]; - boot.extraModulePackages = lib.mkDefault [ pkgs.linuxPackages.nvidia_x11 ]; + 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"; diff --git a/dell/xps/15-9560/xps-common.nix b/dell/xps/15-9560/xps-common.nix index a8361cef..b0efe452 100644 --- a/dell/xps/15-9560/xps-common.nix +++ b/dell/xps/15-9560/xps-common.nix @@ -1,7 +1,7 @@ { lib, ... }: { - boot.kernelParams = lib.mkDefault [ "acpi_rev_override" ]; + boot.kernelParams = [ "acpi_rev_override" ]; # This will save you money and possibly your life! services.thermald.enable = lib.mkDefault true; From 161c91c01ab55a199b78c5014eedd0cedcd7a482 Mon Sep 17 00:00:00 2001 From: Alexander Shpilkin Date: Thu, 10 Aug 2023 20:01:02 +0300 Subject: [PATCH 0514/1476] framework: fix references to 13th gen in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ae25b821..2df98f63 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ See code for all available configurations. | [Dell XPS E7240](dell/e7240) | `` | | [Framework 11th Gen Intel Core](framework) | `` | | [Framework 12th Gen Intel Core](framework/12th-gen-intel) | `` | -| [Framework 13th Gen Intel Core](framework/12th-gen-intel) | `` | +| [Framework 13th Gen Intel Core](framework/13th-gen-intel) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [Focus M2 Gen 1](focus/m2/gen1) | `` | | [GPD MicroPC](gpd/micropc) | `` | From f61352cf8066ddd3dfe9058e62184bae7382672d Mon Sep 17 00:00:00 2001 From: Alexander Shpilkin Date: Thu, 10 Aug 2023 20:01:19 +0300 Subject: [PATCH 0515/1476] framework: add 13th gen to flake.nix --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 193e93fd..ba3cd8cd 100644 --- a/flake.nix +++ b/flake.nix @@ -62,6 +62,7 @@ dell-xps-17-9710-intel = import ./dell/xps/17-9710/intel; framework = import ./framework; framework-12th-gen-intel = import ./framework/12th-gen-intel; + framework-13th-gen-intel = import ./framework/13th-gen-intel; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; focus-m2-gen1 = import ./focus/m2/gen1; google-pixelbook = import ./google/pixelbook; From ca062b3e6c324b1a00098d67360a6e13b0fed805 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Wed, 9 Aug 2023 12:55:30 +0200 Subject: [PATCH 0516/1476] star64: remove unused flake input from README --- pine64/star64/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pine64/star64/README.md b/pine64/star64/README.md index 11f0618b..08b6d364 100644 --- a/pine64/star64/README.md +++ b/pine64/star64/README.md @@ -8,7 +8,7 @@ Create and configure the `flake.nix` file: inputs.nixos-hardware.url = "github:nixos/nixos-hardware"; - outputs = { self, nixpkgs, nixos-hardware, flake-utils, ... }: + outputs = { self, nixpkgs, nixos-hardware, ... }: let supportedSystems = [ "x86_64-linux" From 33052d5cad540300eade03d72e74dc8389e34afb Mon Sep 17 00:00:00 2001 From: networkException Date: Tue, 8 Aug 2023 21:18:46 +0200 Subject: [PATCH 0517/1476] apple/t2: update to kernel 6.4.9 --- apple/t2/pkgs/linux-t2.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index 45e75a2c..56844156 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -8,7 +8,7 @@ let hash = "sha256-zCpZP/QrnP4xB2bJ0yZv88N4BgE4K+5KOCzm/pBbnJw="; }; - version = "6.4.8"; + version = "6.4.9"; majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); in buildLinux (args // { @@ -20,7 +20,7 @@ buildLinux (args // { src = fetchurl { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-xZ804Z6E2zAga5NzBBq/iT+digh2XRY1hlcKUjjEWLY="; + hash = "sha256-uLiimFK5mfM3xOk+/2yR+3/S1JpmFMvL62+hcbpVzJ8="; }; structuredExtraConfig = with lib.kernel; { From 430a56dd16fe583a812b2df44dca002acab2f4f6 Mon Sep 17 00:00:00 2001 From: Yureka Date: Wed, 9 Aug 2023 10:40:27 +0200 Subject: [PATCH 0518/1476] raspberry-pi/4: fix modesetting on 6.1 kernels --- raspberry-pi/4/modesetting.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/raspberry-pi/4/modesetting.nix b/raspberry-pi/4/modesetting.nix index b74e686f..3e4a5393 100644 --- a/raspberry-pi/4/modesetting.nix +++ b/raspberry-pi/4/modesetting.nix @@ -27,6 +27,13 @@ in }; config = lib.mkIf cfg.enable { + # fixes a crash: https://github.com/raspberrypi/linux/issues/5568 + # can be removed for >= nixos 23.11: https://github.com/NixOS/nixpkgs/pull/247826 + boot.kernelParams = [ "kunit.enable=0" ]; + + # doesn't work for the CM module, so we exclude e.g. bcm2711-rpi-cm4.dts + hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb"; + # Configure for modesetting in the device tree hardware.deviceTree = { overlays = [ From d5bd79a48b48a8a4d3daea9bfc71aff6d79ffc80 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 17 Aug 2023 15:09:55 +0800 Subject: [PATCH 0519/1476] starfive visionfive2: drop outdated kernel patches --- starfive/visionfive/v2/linux-6.5.nix | 10 ++---- starfive/visionfive/v2/verisilicon.patch | 46 ------------------------ 2 files changed, 3 insertions(+), 53 deletions(-) delete mode 100644 starfive/visionfive/v2/verisilicon.patch diff --git a/starfive/visionfive/v2/linux-6.5.nix b/starfive/visionfive/v2/linux-6.5.nix index c68144e3..33a9caab 100644 --- a/starfive/visionfive/v2/linux-6.5.nix +++ b/starfive/visionfive/v2/linux-6.5.nix @@ -9,15 +9,11 @@ let src = fetchFromGitHub { owner = "starfive-tech"; repo = "linux"; - rev = "64a6c57ec372c44d0f25416c9614657e274fccff"; - hash = "sha256-ZOCCj/VyUZa36+q6sUnE+qA0FcNCFnQjIUils0hBb28="; + rev = "67e8df01b875afd312a7d2ab77f56a62f39dd6d9"; + hash = "sha256-H+INnZTrfeCLmxPYbQEu3658/e5/Wz/Y5Ann2+lU6WQ="; }; - inherit modDirVersion; - kernelPatches = [{ - name = "verisilicon"; - patch = ./verisilicon.patch; - }] ++ kernelPatches; + inherit modDirVersion kernelPatches; structuredExtraConfig = with lib.kernel; { PINCTRL_STARFIVE_JH7110_SYS = yes; diff --git a/starfive/visionfive/v2/verisilicon.patch b/starfive/visionfive/v2/verisilicon.patch deleted file mode 100644 index 4ef8c1e0..00000000 --- a/starfive/visionfive/v2/verisilicon.patch +++ /dev/null @@ -1,46 +0,0 @@ -From f6df0d69978ceb373d14c9337c4cda74d604f46d Mon Sep 17 00:00:00 2001 -From: Nick Cao -Date: Sat, 1 Jul 2023 17:19:22 +0800 -Subject: [PATCH 1/2] drm/verisilicon: add missing null entry in vs_drm_dt_ids - ---- - drivers/gpu/drm/verisilicon/vs_drv.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/gpu/drm/verisilicon/vs_drv.c b/drivers/gpu/drm/verisilicon/vs_drv.c -index b740fe934035..1255a373f7a2 100644 ---- a/drivers/gpu/drm/verisilicon/vs_drv.c -+++ b/drivers/gpu/drm/verisilicon/vs_drv.c -@@ -258,6 +258,7 @@ static SIMPLE_DEV_PM_OPS(vs_drm_pm_ops, vs_drm_suspend, vs_drm_resume); - - static const struct of_device_id vs_drm_dt_ids[] = { - { .compatible = "verisilicon,display-subsystem", }, -+ {}, - }; - - MODULE_DEVICE_TABLE(of, vs_drm_dt_ids); --- -2.41.0 - -From f7d2f6e8c6e566cdd441b7bd4710f7628af15dcb Mon Sep 17 00:00:00 2001 -From: Nick Cao -Date: Sat, 1 Jul 2023 17:49:05 +0800 -Subject: [PATCH 2/2] drm/verisilicon: import DMA_BUF namespace - ---- - drivers/gpu/drm/verisilicon/vs_drv.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/gpu/drm/verisilicon/vs_drv.c b/drivers/gpu/drm/verisilicon/vs_drv.c -index 1255a373f7a2..8627027047aa 100644 ---- a/drivers/gpu/drm/verisilicon/vs_drv.c -+++ b/drivers/gpu/drm/verisilicon/vs_drv.c -@@ -299,4 +299,5 @@ module_init(vs_drm_init); - module_exit(vs_drm_fini); - - MODULE_DESCRIPTION("VeriSilicon DRM Driver"); -+MODULE_IMPORT_NS(DMA_BUF); - MODULE_LICENSE("GPL"); --- -2.41.0 - From 7f1836531b126cfcf584e7d7d71bf8758bb58969 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 17 Aug 2023 14:53:58 +0800 Subject: [PATCH 0520/1476] starfive visionfive2: use stable opensbi release --- starfive/visionfive/v2/opensbi.nix | 48 +++++++----------------------- 1 file changed, 10 insertions(+), 38 deletions(-) diff --git a/starfive/visionfive/v2/opensbi.nix b/starfive/visionfive/v2/opensbi.nix index 6a7e84fe..5b46fec6 100644 --- a/starfive/visionfive/v2/opensbi.nix +++ b/starfive/visionfive/v2/opensbi.nix @@ -1,42 +1,14 @@ -{ lib -, stdenv -, fetchFromGitHub -, python3 -, withPlatform ? "generic" -, withPayload ? null -, withFDT ? null -}: +{ opensbi, withPayload, withFDT }: -stdenv.mkDerivation rec { - pname = "opensbi"; - version = "1.3-git-2868f26"; - - src = fetchFromGitHub { - owner = "riscv-software-src"; - repo = "opensbi"; - rev = "2868f26131308ff345382084681ea89c5b0159f1"; - sha256 = "sha256-E+nVFLSpH6lQ2nVmMlVRTr7qYRVY0ULW7gUvAyTr90I="; - }; - - postPatch = '' - patchShebangs ./scripts - ''; - - nativeBuildInputs = [ python3 ]; - - installFlags = [ - "I=$(out)" - ]; - - makeFlags = [ - "PLATFORM=${withPlatform}" +(opensbi.override { + inherit withPayload withFDT; +}).overrideAttrs (attrs: { + makeFlags = attrs.makeFlags ++ [ + # opensbi generic platform default FW_TEXT_START is 0x80000000 + # For JH7110, need to specify the FW_TEXT_START to 0x40000000 + # Otherwise, the fw_payload.bin downloading via jtag will not run. + # https://github.com/starfive-tech/VisionFive2/blob/7733673d27052dc5a48f1cb1d060279dfa3f0241/Makefile#L274 "FW_TEXT_START=0x40000000" - ] ++ lib.optionals (withPayload != null) [ - "FW_PAYLOAD_PATH=${withPayload}" - ] ++ lib.optionals (withFDT != null) [ - "FW_FDT_PATH=${withFDT}" ]; +}) - dontStrip = true; - dontPatchELF = true; -} From 4cc314ad675726df2d7884648ff64ddeb18cd216 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 9 Aug 2023 12:38:17 -0600 Subject: [PATCH 0521/1476] Dell XPS 9560: Add information and tweak config --- dell/xps/15-9560/README.wiki | 25 ++++++++++++++++++++++++- dell/xps/15-9560/default.nix | 1 + dell/xps/15-9560/intel/default.nix | 1 + dell/xps/15-9560/nvidia/default.nix | 6 +++--- dell/xps/15-9560/xps-common.nix | 1 + 5 files changed, 30 insertions(+), 4 deletions(-) diff --git a/dell/xps/15-9560/README.wiki b/dell/xps/15-9560/README.wiki index faf4ced8..df422bdd 100644 --- a/dell/xps/15-9560/README.wiki +++ b/dell/xps/15-9560/README.wiki @@ -14,6 +14,8 @@ Not much tweaking of NixOS itself was needed. But we currently cannot automate the firmware setup, so this must be done by hand. +== Installation == + === Before installation === These settings are needed both for booting the final install, and installer itself. Therefore, they must be done first. @@ -31,11 +33,23 @@ These settings are needed both for booting the final install, and installer itse * ''Disable C-States.'' This is a processor idling thing. It seems to cause random crashes (Blank screen, no normal panic debug dump). Unfortunately, without it, the computer cannot be suspended. On the other hand, it doesn't seem to affect acpi's estimation of battery life when the computer is running with minimal load, but I haven't tested battery life in practice. I list it as optional as there's a tradeoff, and the crashes are rare enough one can probably get through installation just fine. + * This does not seem to be a problem on recent firmware/kernel versions. + * ''Update BIOS.'' According to Reddit, this helps with battery life. * ''Update Intel's Thunderbolt firmware.'' Without this, the Thunderbolt port will only work as power source, and not transfer data. -=== Troubleshooting === +== Optional Functionality == + +* ''Fan control'' This laptop supports Dell's own [libsmbios](https://github.com/dell/libsmbios) to set fan modes, as well as other bios settings. Simply add the `libsmbios` package to your environment. + +* ''TPM 2.0 LUKS Decryption'' If using the experimental systemd initrd, the TPM can easily be used to decrypt the root partition at boot. Simply use `systemd-cryptenroll` with desired options. + +* ''Firmware Upgrades'' `services.fwupd` and your desired front-end can be used to update almost all of the firmware on this system. Something curious is the BIOS offered through fwupd/lvfs is much newer than the one available on Dell's website. + +* ''Secure Boot'' This works. There is more than one way to enable it. Tested with [lanzaboote](https://github.com/nix-community/lanzaboote) v0.3.0 + +== Troubleshooting == ==== rcu_sched freezing problems ==== @@ -52,3 +66,12 @@ boot.kernelParams = [ "acpi_rev_override=1" "pcie_aspm=off" "nouveau.modeset=0" ``` Some more detail about the problem can be found here: https://bbs.archlinux.org/viewtopic.php?id=223056 + +=== TPM 2.0 Intermittent === + +* The TPM was very unreliable, sometimes not showing up to the system. Updating to the latest TPM firmware fixed the problem. I could not seem to do this through `fwupd` so used the latest exe from the Dell website. Loading the exe through a command prompt on a Windows installer was adequate. + +== Broken Functionality == + +* ''Fingerprint Reader'': Can be enabled with `services.fprintd.enable`, and can read your fingerprint. Fingerprint authentication is extremely reliable to the point it is not worth using. + diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index 0ee38d9a..0affd383 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -3,6 +3,7 @@ { imports = [ ../../../common/cpu/intel + ../../../common/cpu/intel/kaby-lake ../../../common/pc/laptop ./xps-common.nix ]; diff --git a/dell/xps/15-9560/intel/default.nix b/dell/xps/15-9560/intel/default.nix index c4d51ea6..22de3bc8 100644 --- a/dell/xps/15-9560/intel/default.nix +++ b/dell/xps/15-9560/intel/default.nix @@ -1,6 +1,7 @@ { imports = [ ../../../../common/cpu/intel + ../../../../common/cpu/intel/kaby-lake ../../../../common/pc/laptop ../../../../common/gpu/nvidia/disable.nix ../xps-common.nix diff --git a/dell/xps/15-9560/nvidia/default.nix b/dell/xps/15-9560/nvidia/default.nix index 229a6efb..e58fa581 100644 --- a/dell/xps/15-9560/nvidia/default.nix +++ b/dell/xps/15-9560/nvidia/default.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ ... }: { imports = [ @@ -14,9 +14,9 @@ ##### disable intel, run nvidia only and as default hardware.nvidia.prime = { # Bus ID of the Intel GPU. - intelBusId = lib.mkDefault "PCI:0:2:0"; + intelBusId = "PCI:0:2:0"; # Bus ID of the NVIDIA GPU. - nvidiaBusId = lib.mkDefault "PCI:1:0:0"; + nvidiaBusId = "PCI:1:0:0"; }; } diff --git a/dell/xps/15-9560/xps-common.nix b/dell/xps/15-9560/xps-common.nix index b0efe452..87e3817e 100644 --- a/dell/xps/15-9560/xps-common.nix +++ b/dell/xps/15-9560/xps-common.nix @@ -1,6 +1,7 @@ { lib, ... }: { + # Solution to rcu_sched freezing boot.kernelParams = [ "acpi_rev_override" ]; # This will save you money and possibly your life! From 2455827f552d9ac86a939e47c4c59187e30b2036 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 9 Aug 2023 12:41:35 -0600 Subject: [PATCH 0522/1476] Dell XPS 9560: Fix README links --- dell/xps/15-9560/README.wiki | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dell/xps/15-9560/README.wiki b/dell/xps/15-9560/README.wiki index df422bdd..152afa95 100644 --- a/dell/xps/15-9560/README.wiki +++ b/dell/xps/15-9560/README.wiki @@ -41,13 +41,13 @@ These settings are needed both for booting the final install, and installer itse == Optional Functionality == -* ''Fan control'' This laptop supports Dell's own [libsmbios](https://github.com/dell/libsmbios) to set fan modes, as well as other bios settings. Simply add the `libsmbios` package to your environment. +* ''Fan control'' This laptop supports Dell's own libsmbios: https://github.com/dell/libsmbios to set fan modes, as well as other bios settings. Simply add the `libsmbios` package to your environment. * ''TPM 2.0 LUKS Decryption'' If using the experimental systemd initrd, the TPM can easily be used to decrypt the root partition at boot. Simply use `systemd-cryptenroll` with desired options. * ''Firmware Upgrades'' `services.fwupd` and your desired front-end can be used to update almost all of the firmware on this system. Something curious is the BIOS offered through fwupd/lvfs is much newer than the one available on Dell's website. -* ''Secure Boot'' This works. There is more than one way to enable it. Tested with [lanzaboote](https://github.com/nix-community/lanzaboote) v0.3.0 +* ''Secure Boot'' This works. There is more than one way to enable it. Tested with https://github.com/nix-community/lanzaboote v0.3.0 == Troubleshooting == From 79a189283ebaf2a6d384002aeab3a45588c151cc Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 9 Aug 2023 12:42:43 -0600 Subject: [PATCH 0523/1476] Dell XPS 9560: Fix README headers --- dell/xps/15-9560/README.wiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dell/xps/15-9560/README.wiki b/dell/xps/15-9560/README.wiki index 152afa95..733b274a 100644 --- a/dell/xps/15-9560/README.wiki +++ b/dell/xps/15-9560/README.wiki @@ -67,7 +67,7 @@ boot.kernelParams = [ "acpi_rev_override=1" "pcie_aspm=off" "nouveau.modeset=0" Some more detail about the problem can be found here: https://bbs.archlinux.org/viewtopic.php?id=223056 -=== TPM 2.0 Intermittent === +==== TPM 2.0 Intermittent ==== * The TPM was very unreliable, sometimes not showing up to the system. Updating to the latest TPM firmware fixed the problem. I could not seem to do this through `fwupd` so used the latest exe from the Dell website. Loading the exe through a command prompt on a Windows installer was adequate. From 817e297fc3352fadc15f2c5306909aa9192d7d97 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 9 Aug 2023 12:45:15 -0600 Subject: [PATCH 0524/1476] Dell XPS 9560: More formatting in README --- dell/xps/15-9560/README.wiki | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dell/xps/15-9560/README.wiki b/dell/xps/15-9560/README.wiki index 733b274a..dfaf5d31 100644 --- a/dell/xps/15-9560/README.wiki +++ b/dell/xps/15-9560/README.wiki @@ -31,9 +31,7 @@ These settings are needed both for booting the final install, and installer itse === Optional === -* ''Disable C-States.'' This is a processor idling thing. It seems to cause random crashes (Blank screen, no normal panic debug dump). Unfortunately, without it, the computer cannot be suspended. On the other hand, it doesn't seem to affect acpi's estimation of battery life when the computer is running with minimal load, but I haven't tested battery life in practice. I list it as optional as there's a tradeoff, and the crashes are rare enough one can probably get through installation just fine. - - * This does not seem to be a problem on recent firmware/kernel versions. +* ''Disable C-States.'' This is a processor idling thing. It seems to cause random crashes (Blank screen, no normal panic debug dump). Unfortunately, without it, the computer cannot be suspended. On the other hand, it doesn't seem to affect acpi's estimation of battery life when the computer is running with minimal load, but I haven't tested battery life in practice. I list it as optional as there's a tradeoff, and the crashes are rare enough one can probably get through installation just fine. This does not seem to be a problem on recent firmware/kernel versions. * ''Update BIOS.'' According to Reddit, this helps with battery life. From ba8a6e0612d2c973d0029945d2bff94d37bb060e Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Thu, 31 Aug 2023 12:53:25 +0200 Subject: [PATCH 0525/1476] star64: linux: 5.15.115 -> 5.15.128 --- pine64/star64/linux-5.15.nix | 7 ++--- pine64/star64/pl330-name-collision.patch | 40 ------------------------ 2 files changed, 3 insertions(+), 44 deletions(-) delete mode 100644 pine64/star64/pl330-name-collision.patch diff --git a/pine64/star64/linux-5.15.nix b/pine64/star64/linux-5.15.nix index eca5ad5b..be44f533 100644 --- a/pine64/star64/linux-5.15.nix +++ b/pine64/star64/linux-5.15.nix @@ -1,7 +1,7 @@ { lib, callPackage, linuxPackagesFor, kernelPatches, fetchpatch, ... }: let - modDirVersion = "5.15.115"; + modDirVersion = "5.15.128"; linuxPkg = { lib, fetchFromGitHub, buildLinux, ... }@args: buildLinux (args // { version = "${modDirVersion}-fishwaldo-star64"; @@ -9,8 +9,8 @@ let src = fetchFromGitHub { owner = "Fishwaldo"; repo = "Star64_linux"; - rev = "765947eacb2408a3a232cbe8093bf28a991f3c35"; # Star64_devel branch - hash = "sha256-2Gbk2BsC9LCcXfXfgzJiPdEap90Y0Fl6Fz9TvIIbmB8="; + rev = "e9ae40dd4b7eb2d5083e318ce65f81e8f01d8118"; # Star64_devel branch + hash = "sha256-jzF5NO/JAQxnaiQ79m6nws95jl17NBctWEa1MP4rimo="; }; inherit modDirVersion; @@ -27,7 +27,6 @@ let hash = "sha256-EY0lno+HkY5mradBUPII3qqu0xh+BVQRzveCQcaht0M="; }; } - { patch = ./pl330-name-collision.patch; } { patch = ./irq-desc-to-data.patch; } ] ++ kernelPatches; diff --git a/pine64/star64/pl330-name-collision.patch b/pine64/star64/pl330-name-collision.patch deleted file mode 100644 index 255f7bec..00000000 --- a/pine64/star64/pl330-name-collision.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c -index 110de8a60058..0a01256ef9e4 100644 ---- a/drivers/dma/pl330.c -+++ b/drivers/dma/pl330.c -@@ -1050,7 +1050,7 @@ static bool _trigger(struct pl330_thread *thrd) - return true; - } - --static bool _start(struct pl330_thread *thrd) -+static bool _dma_start(struct pl330_thread *thrd) - { - switch (_state(thrd)) { - case PL330_STATE_FAULT_COMPLETING: -@@ -1702,7 +1702,7 @@ static int pl330_update(struct pl330_dmac *pl330) - thrd->req_running = -1; - - /* Get going again ASAP */ -- _start(thrd); -+ _dma_start(thrd); - - /* For now, just make a list of callbacks to be done */ - list_add_tail(&descdone->rqd, &pl330->req_done); -@@ -2089,7 +2089,7 @@ static void pl330_tasklet(struct tasklet_struct *t) - } else { - /* Make sure the PL330 Channel thread is active */ - spin_lock(&pch->thread->dmac->lock); -- _start(pch->thread); -+ _dma_start(pch->thread); - spin_unlock(&pch->thread->dmac->lock); - } - -@@ -2107,7 +2107,7 @@ static void pl330_tasklet(struct tasklet_struct *t) - if (power_down) { - pch->active = true; - spin_lock(&pch->thread->dmac->lock); -- _start(pch->thread); -+ _dma_start(pch->thread); - spin_unlock(&pch->thread->dmac->lock); - power_down = false; - } From 6f081cd52a2e0c68ab371b439e964355efb3002c Mon Sep 17 00:00:00 2001 From: networkException Date: Fri, 1 Sep 2023 19:18:27 +0200 Subject: [PATCH 0526/1476] apple/t2: update to kernel 6.5 --- apple/t2/pkgs/linux-t2.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index 56844156..b9f01099 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -4,11 +4,11 @@ let patchRepo = fetchFromGitHub { owner = "t2linux"; repo = "linux-t2-patches"; - rev = "c908e506346681139a844d41c40b295cfad17ea8"; - hash = "sha256-zCpZP/QrnP4xB2bJ0yZv88N4BgE4K+5KOCzm/pBbnJw="; + rev = "46dd873d1d9d12b26916790045008a91a95d0c11"; + hash = "sha256-YGUGuzsAJFtZYjIW9d2XU4eGKNvMKCaWXqgqJn5TdeY="; }; - version = "6.4.9"; + version = "6.5"; majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); in buildLinux (args // { @@ -20,7 +20,7 @@ buildLinux (args // { src = fetchurl { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-uLiimFK5mfM3xOk+/2yR+3/S1JpmFMvL62+hcbpVzJ8="; + hash = "sha256-eldLvCCALqdrUsp/rwcmf3IEXoYbGJFcUnKpjCer+IQ="; }; structuredExtraConfig = with lib.kernel; { From 19cf623e481f1a29d01101f6468f58aa96e36e08 Mon Sep 17 00:00:00 2001 From: Yannick Mayeur Date: Thu, 31 Aug 2023 14:25:59 +0200 Subject: [PATCH 0527/1476] feat: add common config for intel elhart-lake and jasper-lake The option added is based on this ticket: https://gitlab.freedesktop.org/drm/intel/-/issues/8080 Other relevant documentation: https://jellyfin.org/docs/general/administration/hardware-acceleration/intel/#known-issues-and-limitations --- common/cpu/intel/elkhart-lake/default.nix | 7 +++++++ common/cpu/intel/jasper-lake/default.nix | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 common/cpu/intel/elkhart-lake/default.nix create mode 100644 common/cpu/intel/jasper-lake/default.nix diff --git a/common/cpu/intel/elkhart-lake/default.nix b/common/cpu/intel/elkhart-lake/default.nix new file mode 100644 index 00000000..f5dd5ad6 --- /dev/null +++ b/common/cpu/intel/elkhart-lake/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ ../. ]; + + boot.kernelParams = [ + "i915.enable_guc=2" + ]; +} diff --git a/common/cpu/intel/jasper-lake/default.nix b/common/cpu/intel/jasper-lake/default.nix new file mode 100644 index 00000000..f5dd5ad6 --- /dev/null +++ b/common/cpu/intel/jasper-lake/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ ../. ]; + + boot.kernelParams = [ + "i915.enable_guc=2" + ]; +} From 1ed1234ad682e90fda13d837ba68268399f207e3 Mon Sep 17 00:00:00 2001 From: Yannick Mayeur Date: Thu, 31 Aug 2023 14:28:21 +0200 Subject: [PATCH 0528/1476] feat: add initial support for odroid-h3 hardware This should work for both odroid-h3 and h3+ as they both have a jasper lake CPU (N5105 and N6005). --- README.md | 1 + flake.nix | 1 + hardkernel/odroid-h3/default.nix | 7 +++++++ 3 files changed, 9 insertions(+) create mode 100644 hardkernel/odroid-h3/default.nix diff --git a/README.md b/README.md index 2df98f63..da8b1ddf 100644 --- a/README.md +++ b/README.md @@ -222,6 +222,7 @@ See code for all available configurations. | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | | [Morefine M600](morefine/m600) | `` | | [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | +| [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | | [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | | [Panasonic Let's Note CF-LX4 ](panasonic/letsnote/cf-lx4) | `` | diff --git a/flake.nix b/flake.nix index ba3cd8cd..0a876cc7 100644 --- a/flake.nix +++ b/flake.nix @@ -162,6 +162,7 @@ msi-gl62 = import ./msi/gl62; nxp-imx8qm-mek = import ./nxp/imx8qm-mek; hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; + hardkernel-odroid-h3 = import ./hardkernel/odroid-h3; omen-en00015p = import ./omen/en00015p; onenetbook-4 = import ./onenetbook/4; pcengines-apu = import ./pcengines/apu; diff --git a/hardkernel/odroid-h3/default.nix b/hardkernel/odroid-h3/default.nix new file mode 100644 index 00000000..435ef894 --- /dev/null +++ b/hardkernel/odroid-h3/default.nix @@ -0,0 +1,7 @@ +{ config, lib, ... }: + +{ + imports = [ + ../../common/cpu/intel/jasper-lake + ]; +} From 416249d1ba7f4312836fe7216a95cb06c288312a Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Tue, 29 Aug 2023 02:28:09 +0200 Subject: [PATCH 0529/1476] surface: add kernel 6.4.12 --- microsoft/surface/common/default.nix | 2 +- microsoft/surface/common/kernel/default.nix | 1 + .../common/kernel/linux-6.4.12/default.nix | 38 +++++ .../common/kernel/linux-6.4.12/patches.nix | 138 ++++++++++++++++++ microsoft/surface/common/repos.nix | 4 +- 5 files changed, 180 insertions(+), 3 deletions(-) create mode 100644 microsoft/surface/common/kernel/linux-6.4.12/default.nix create mode 100644 microsoft/surface/common/kernel/linux-6.4.12/patches.nix diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 3f54c9cb..37db0c8c 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.1.18"; + microsoft-surface.kernelVersion = mkDefault "6.4.12"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index ffb4d2b8..934dfdf7 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -8,6 +8,7 @@ in { ./linux-5.19.17 ./linux-6.0.17 ./linux-6.1.18 + ./linux-6.4.12 ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.4.12/default.nix b/microsoft/surface/common/kernel/linux-6.4.12/default.nix new file mode 100644 index 00000000..e99c5d40 --- /dev/null +++ b/microsoft/surface/common/kernel/linux-6.4.12/default.nix @@ -0,0 +1,38 @@ +{ 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.4.12"; + extraMeta.branch = "6.4"; + patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; + kernelPatches = pkgs.callPackage ./patches.nix { + inherit (lib) kernel; + inherit version patchDir; + }; + + kernelPackages = linuxPackage { + inherit version extraMeta kernelPatches; + src = fetchurl { + url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; + sha256 = "0x56b4hslm730ghvggz41fjkbzlnxp6k8857dn7iy27yavlipafc"; + }; + }; + + +in { + options.microsoft-surface.kernelVersion = mkOption { + type = types.enum [ "6.4.12" ]; + }; + + config = mkIf (cfg.kernelVersion == "6.4.12") { + boot = { + inherit kernelPackages; + }; + }; +} diff --git a/microsoft/surface/common/kernel/linux-6.4.12/patches.nix b/microsoft/surface/common/kernel/linux-6.4.12/patches.nix new file mode 100644 index 00000000..433ed153 --- /dev/null +++ b/microsoft/surface/common/kernel/linux-6.4.12/patches.nix @@ -0,0 +1,138 @@ +{ 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; + COMMON_LEDS_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-over-hid"; + patch = patchDir + "/0006-surface-sam-over-hid.patch"; + } + { + name = "ms-surface/0007-surface-button"; + patch = patchDir + "/0007-surface-button.patch"; + } + { + name = "ms-surface/0008-surface-typecover"; + patch = patchDir + "/0008-surface-typecover.patch"; + } + { + name = "ms-surface/0009-surface-shutdown"; + patch = patchDir + "/0009-surface-shutdown.patch"; + } + { + name = "ms-surface/0010-surface-gpe"; + patch = patchDir + "/0010-surface-gpe.patch"; + } + { + name = "ms-surface/0011-cameras"; + patch = patchDir + "/0011-cameras.patch"; + } + { + name = "ms-surface/0012-amd-gpio"; + patch = patchDir + "/0012-amd-gpio.patch"; + } + { + name = "ms-surface/0013-rtc"; + patch = patchDir + "/0013-rtc.patch"; + } +] diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 982fefd8..9e7bbbf3 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "efe7ddadd4aad3d1a6531334fe086931ec8640a1"; - sha256 = "sha256-WgJHLY4vU4lsZ6M0hOng8TMVRALxQeSwQM4QX6DzrbI="; + rev = "32c55fe01ce62bf763181d06f0493c29e178cc62"; + hash = "sha256-oWZeHoLR3jSkMFfc36ikEwyFuXWzwXK/dC4sE98R0oc="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From 7ed4fdbdb5aec0fefa5f8951a88ebe3e4d9b540a Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Tue, 29 Aug 2023 08:20:30 +0000 Subject: [PATCH 0530/1476] Add fgaz to star64 codeowners --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/CODEOWNERS b/CODEOWNERS index 1bbf05e4..83c7e64a 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -4,5 +4,6 @@ dell/xps/13-9380 @kalbasit lenovo/thinkpad/x230 @makefu @yegortimoshenko lenovo/thinkpad/x250 @Mic92 pcengines/apu @yegortimoshenko +pine64/star64 @fgaz purism/librem/13v3 @yegortimoshenko system76/darp6 @khumba From 50dc4ef9288a6b6ba1536fabe899090a91390945 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 19 Aug 2023 13:43:22 +0200 Subject: [PATCH 0531/1476] friendlyarm/nanopi-r5s: init config --- README.md | 1 + flake.nix | 1 + friendlyarm/nanopi-r5s/default.nix | 78 ++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 friendlyarm/nanopi-r5s/default.nix diff --git a/README.md b/README.md index da8b1ddf..48018e5b 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,7 @@ See code for all available configurations. | [Framework 12th Gen Intel Core](framework/12th-gen-intel) | `` | | [Framework 13th Gen Intel Core](framework/13th-gen-intel) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | +| [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | | [Focus M2 Gen 1](focus/m2/gen1) | `` | | [GPD MicroPC](gpd/micropc) | `` | | [GPD P2 Max](gpd/p2-max) | `` | diff --git a/flake.nix b/flake.nix index 0a876cc7..639bf033 100644 --- a/flake.nix +++ b/flake.nix @@ -64,6 +64,7 @@ framework-12th-gen-intel = import ./framework/12th-gen-intel; framework-13th-gen-intel = import ./framework/13th-gen-intel; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; + friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; focus-m2-gen1 = import ./focus/m2/gen1; google-pixelbook = import ./google/pixelbook; gpd-micropc = import ./gpd/micropc; diff --git a/friendlyarm/nanopi-r5s/default.nix b/friendlyarm/nanopi-r5s/default.nix new file mode 100644 index 00000000..019b5b86 --- /dev/null +++ b/friendlyarm/nanopi-r5s/default.nix @@ -0,0 +1,78 @@ +{ lib +, pkgs +, ... +}: + +{ + boot.loader = { + grub.enable = lib.mkDefault false; + # Enables the generation of /boot/extlinux/extlinux.conf. + generic-extlinux-compatible = { + enable = lib.mkDefault true; + useGenerationDeviceTree = true; + }; + }; + + # This file needs to be at the top of /boot + hardware.deviceTree.name = lib.mkDefault "../../rk3568-nanopi-r5s.dtb"; + + boot.kernelParams = [ + "console=tty1" + "console=ttyS2,1500000" + "earlycon=uart8250,mmio32,0xfe660000" + ]; + boot.kernelPatches = [ + { + name = "rockchip-config.patch"; + patch = null; + extraConfig = '' + PCIE_ROCKCHIP_EP y + PCIE_ROCKCHIP_DW_HOST y + ROCKCHIP_VOP2 y + ''; + } + { + name = "status-leds.patch"; + patch = null; + extraConfig = '' + LED_TRIGGER_PHY y + USB_LED_TRIG y + LEDS_BRIGHTNESS_HW_CHANGED y + LEDS_TRIGGER_MTD y + ''; + } + ]; + + boot.initrd.availableKernelModules = [ + ## Rockchip + ## Storage + "sdhci_of_dwcmshc" + "dw_mmc_rockchip" + + "analogix_dp" + "io-domain" + "rockchip_saradc" + "rockchip_thermal" + "rockchipdrm" + "rockchip-rga" + "pcie_rockchip_host" + "phy-rockchip-pcie" + "phy_rockchip_snps_pcie3" + "phy_rockchip_naneng_combphy" + "phy_rockchip_inno_usb2" + "dwmac_rk" + "dw_wdt" + "dw_hdmi" + "dw_hdmi_cec" + "dw_hdmi_i2s_audio" + "dw_mipi_dsi" + ]; + + # Most Rockchip CPUs (especially with hybrid cores) work best with "schedutil" + powerManagement.cpuFreqGovernor = "schedutil"; + + # Let's blacklist the Rockchips RTC module so that the + # battery-powered HYM8563 (rtc_hym8563 kernel module) will be used + # by default + boot.blacklistedKernelModules = [ "rtc_rk808" ]; +} From 9070d2340c16508e81e68e037a775618bb28b8d4 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Tue, 14 Feb 2023 02:23:27 +0400 Subject: [PATCH 0532/1476] Add config for Librem 5 --- README.md | 1 + flake.nix | 1 + purism/librem/5r4/README.md | 133 +++++++++++++++++++++ purism/librem/5r4/default.nix | 53 ++++++++ purism/librem/5r4/initrd.nix | 64 ++++++++++ purism/librem/5r4/kernel/6.1.10.nix | 14 +++ purism/librem/5r4/kernel/default.nix | 4 + purism/librem/5r4/librem5-base/default.nix | 43 +++++++ purism/librem/5r4/lockdown-fix.nix | 26 ++++ purism/librem/5r4/u-boot/build.nix | 1 + purism/librem/5r4/u-boot/default.nix | 70 +++++++++++ purism/librem/5r4/wifi.nix | 14 +++ 12 files changed, 424 insertions(+) create mode 100644 purism/librem/5r4/README.md create mode 100644 purism/librem/5r4/default.nix create mode 100644 purism/librem/5r4/initrd.nix create mode 100644 purism/librem/5r4/kernel/6.1.10.nix create mode 100644 purism/librem/5r4/kernel/default.nix create mode 100644 purism/librem/5r4/librem5-base/default.nix create mode 100644 purism/librem/5r4/lockdown-fix.nix create mode 100644 purism/librem/5r4/u-boot/build.nix create mode 100644 purism/librem/5r4/u-boot/default.nix create mode 100644 purism/librem/5r4/wifi.nix diff --git a/README.md b/README.md index 48018e5b..b6a16ddf 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,7 @@ See code for all available configurations. | [PINE64 STAR64](pine64/star64/) | `` | | [Purism Librem 13v3](purism/librem/13v3) | `` | | [Purism Librem 15v3](purism/librem/13v3) | `` | +| [Purism Librem 5r4](purism/librem/5r4) | `` | | [Raspberry Pi 2](raspberry-pi/2) | `` | | [Raspberry Pi 4](raspberry-pi/4) | `` | | [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | diff --git a/flake.nix b/flake.nix index 639bf033..cea62599 100644 --- a/flake.nix +++ b/flake.nix @@ -171,6 +171,7 @@ pine64-star64 = import ./pine64/star64; purism-librem-13v3 = import ./purism/librem/13v3; purism-librem-15v3 = import ./purism/librem/15v3; + purism-librem-5r4 = import ./purism/librem/5r4; raspberry-pi-2 = import ./raspberry-pi/2; raspberry-pi-4 = import ./raspberry-pi/4; kobol-helios4 = import ./kobol/helios4; diff --git a/purism/librem/5r4/README.md b/purism/librem/5r4/README.md new file mode 100644 index 00000000..f140ecb3 --- /dev/null +++ b/purism/librem/5r4/README.md @@ -0,0 +1,133 @@ +# Purism Librem 5 revision 4 + +Purism's [Librem 5] is a privacy-oriented Linux-friendly smartphone. + +[Librem 5]: https://puri.sm/products/librem-5/ + +## Installation procedure + +> *Note* +> +> TODO: build a uuu-compatible installer. + +Until there's a native installer, the easiest way to install NixOS on Librem 5 seems to be using [Jumpdrive]. + +[Jumpdrive]: https://github.com/dreemurrs-embedded/Jumpdrive + +### Jumpdrive + +Jumpdrive is a tiny Linux distribution which presents device's internal storage as USB mass storage when you connect it to a PC. +It also provides a shell session over telnet. + +Follow the instructions in the repo to boot into Jumpdrive. +Note that `uuu` is part of `nxpmicro-mfgtools` package in nixpkgs. + +Now, plug the device into your PC. A new block device representing Librem 5's internal MMC should appear in `/dev`. +Note down this device path. + +### U-Boot + +> **Note** +> +> While upstream u-boot does support Librem 5, it can only boot using `boot.scr`, for which NixOS has no native support. +> +> There's work on extlinux support in Librem 5's U-Boot here: https://source.puri.sm/a-wai/uboot-imx/-/tree/allow-compressed-kernel +> +> This U-Boot version is packaged in the [`u-boot`] directory. + + +[`u-boot`]: ./u-boot + +Provided you have a way to build Nix derivations for `aarch64-linux` (like a remote builder, [binfmt emulation], or you're building it on the phone itself), just run `nix-build u-boot/build.nix`. + +[binfmt emulation]: https://search.nixos.org/options?channel=22.11&show=boot.binfmt.emulatedSystems&from=0&size=50&sort=relevance&type=packages&query=binfmt + +> **Warning** +> +> Even though I've tested this myself, I can't guarantee that this will not render your device unbootable. +> Proceed with caution. +> +> If it does not work, your best bet is to follow the advice here, which will flash U-Boot build by upstream: https://forums.puri.sm/t/can-someone-with-serial-console-access-try-nixos-kernel-on-librem-5/19121/27 + +To flash the device, run + +```console +$ sudo u-boot-install-librem5 +``` + +At this point, if you have an OS installed on your Librem 5, it's best to reboot into it to check that the U-Boot was flashed correctly. +If that's the case, reboot back into Jumpdrive. + +### Partitioning + +Now, from your host system, partition the MMC. + +> **Warning** +> +> Doing this wipes all data off the phone + +I went with 1 bootable `ext2` partition for `/boot`, and one `ext4` partition for `/`. +It ended up looking like this (your device names will be different): + +```console +$ sudo fdisk -l /dev/mmcblk0 +Disk /dev/mmcblk0: 29.12 GiB, 31268536320 bytes, 61071360 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: dos +Disk identifier: 0xcec26c32 + +Device Boot Start End Sectors Size Id Type +/dev/mmcblk0p1 * 4096 499711 495616 242M 83 Linux +/dev/mmcblk0p2 499712 61071359 60571648 28.9G 83 Linux +``` + +Note 2MiB of free space before the first partition. +This is where U-Boot lives. + +Mount the partitions on your host system, e.g. to `/mnt` and `/mnt/boot`. +Remember that `/mnt` is the second partition, and `/mnt/boot` is the first. + +### Installation + +Now, write your NixOS config. +Use `/dev/mmcblk0p1` as `fileSystems."/boot"` and `/dev/mmcblk0p2` as `fileSystems."/"`. +Don't forget to import the [module from this directory](./default.nix). +If you plan to use the device as a smartphone, you have a choice of two "desktop" (?) environments packaged in nixpkgs: [phosh] and [Plasma Mobile]. + +[phosh]: https://search.nixos.org/options?channel=22.11&show=services.xserver.desktopManager.phosh.enable&from=0&size=50&sort=relevance&type=packages&query=phosh +[Plasma Mobile]: https://search.nixos.org/options?channel=22.11&show=services.xserver.desktopManager.plasma5.mobile.enable&from=0&size=50&sort=relevance&type=packages + +Build the configuration (`nix build .#nixosConfigurations..config.system.build.toplevel` if you're using flakes). + +Running `nixos-install --system ./result --root /mnt` will copy the system to the MMC. +Unless you're running on an aarch64 system, it will fail to activate or install the bootloader, however. +You must do this manually. +Get a shell on Jumpdrive, mount partitions there, and activate the system: + +```console +$ nc 172.16.42.1 23 +# mkdir /mnt +# mount /dev/mmcblk0p2 /mnt +# mkdir -p /mnt/boot +# mount /dev/mmcblk0p1 /mnt/boot +# chroot /mnt /nix/var/nix/profiles/system/activate +# chroot /mnt /nix/var/nix/profiles/system/bin/switch-to-configuration boot +``` + +Provided the last command succeeds, you now should have a bootable device. + +Unmount: + +```console +# sync +# umount /mnt/boot +# umount -l /mnt +# echo u > /proc/sysrq-trigger +# echo s > /proc/sysrq-trigger +``` + +And shut the phone down by holding the power key. + +Start it up and you should be booting straight into your NixOS installation. \ No newline at end of file diff --git a/purism/librem/5r4/default.nix b/purism/librem/5r4/default.nix new file mode 100644 index 00000000..f9674397 --- /dev/null +++ b/purism/librem/5r4/default.nix @@ -0,0 +1,53 @@ +{ config, pkgs, lib, ... }: +let cfg = config.hardware.librem5; +in { + options = { + hardware.librem5 = { + wifiCard = lib.mkOption { + type = lib.types.enum [ "redpine" "sparklan" "none" ]; + description = lib.mdDoc '' + Which wi-fi card is installed in your phone. + + Phones shipped before Januarly 2023 have redpine, newer phones have sparklan. + ''; + default = "redpine"; + }; + customInitrdModules = lib.mkEnableOption (lib.mdDoc "use of custom kernel modules in the initrd."); + installUdevPackages = lib.mkEnableOption (lib.mdDoc "installation of udev packages from librem5-base."); + lockdownFix = lib.mkEnableOption (lib.mdDoc "fix for orientation and proximity sensors not working after lockdown."); + }; + }; + + imports = [ ./initrd.nix ./wifi.nix ./lockdown-fix.nix ]; + + config = { + hardware.librem5 = { + customInitrdModules = lib.mkDefault true; + installUdevPackages = lib.mkDefault true; + lockdownFix = lib.mkDefault true; + }; + + nixpkgs.overlays = [ + (import ./kernel) + (final: prev: { + ubootLibrem5 = final.callPackage ./u-boot { }; + + librem5-base = final.callPackage ./librem5-base { }; + }) + ]; + + boot = { + kernelParams = [ "rootwait" ]; + + loader = { + generic-extlinux-compatible.enable = lib.mkDefault true; + grub.enable = false; + }; + + kernelPackages = lib.mkDefault pkgs.linuxPackages_librem5; + }; + + services.udev.packages = lib.mkIf cfg.installUdevPackages [ pkgs.librem5-base ]; + + }; +} diff --git a/purism/librem/5r4/initrd.nix b/purism/librem/5r4/initrd.nix new file mode 100644 index 00000000..7ffe6099 --- /dev/null +++ b/purism/librem/5r4/initrd.nix @@ -0,0 +1,64 @@ +{ config, pkgs, lib, ... }: +lib.mkIf config.hardware.librem5.customInitrdModules { + boot.initrd = { + kernelModules = [ + "bq25890_charger" + "dwc3" + "imx_dcss" + "imx_sdma" + "mtdblock" + "ofpart" + "phy_fsl_imx8mq_usb" + "snvs_pwrkey" + "spi_nor" + "tps6598x" + "xhci_hcd" + "usbcore" + "usb_storage" + "uas" + "xhci_plat_hcd" + ]; + # Not all default modules (e.g. SATA ones) are present in Librem 5 kernel fork + includeDefaultModules = false; + availableKernelModules = [ + "ahci" + + "sd_mod" + "sr_mod" + + "mmc_block" + + "uhci_hcd" + "ehci_hcd" + "ehci_pci" + "ohci_hcd" + "ohci_pci" + "xhci_pci" + "usbhid" + "hid_generic" + "hid_lenovo" + "hid_apple" + "hid_roccat" + "hid_logitech_hidpp" + "hid_logitech_dj" + "hid_microsoft" + "hid_cherry" + + "bq25890_charger" + "dwc3" + "imx_dcss" + "imx_sdma" + "mtdblock" + "ofpart" + "phy_fsl_imx8mq_usb" + "snvs_pwrkey" + "spi_nor" + "tps6598x" + "xhci_hcd" + "usbcore" + "usb_storage" + "uas" + "xhci_plat_hcd" + ]; + }; +} diff --git a/purism/librem/5r4/kernel/6.1.10.nix b/purism/librem/5r4/kernel/6.1.10.nix new file mode 100644 index 00000000..b68e0d01 --- /dev/null +++ b/purism/librem/5r4/kernel/6.1.10.nix @@ -0,0 +1,14 @@ +{ buildLinux, fetchFromGitLab, ... }@args: +buildLinux (args // rec { + defconfig = "librem5_defconfig"; + version = "6.1.10-librem5"; + modDirVersion = version; + src = fetchFromGitLab { + domain = "source.puri.sm"; + owner = "Librem5"; + repo = "linux"; + rev = "pureos/6.1.10pureos1"; + hash = "sha256-Cc16vMUcJ/a2k3zMynqZ99t1LyTSs7EXKdNGF6OTS1s="; + }; + kernelPatches = [ ]; +} // args.argsOverride or { }) diff --git a/purism/librem/5r4/kernel/default.nix b/purism/librem/5r4/kernel/default.nix new file mode 100644 index 00000000..be57b355 --- /dev/null +++ b/purism/librem/5r4/kernel/default.nix @@ -0,0 +1,4 @@ +final: prev: { + linuxPackages_librem5_6_1_10 = final.linuxPackagesFor (final.callPackage ./6.1.10.nix { }); + linuxPackages_librem5 = final.linuxPackages_librem5_6_1_10; +} diff --git a/purism/librem/5r4/librem5-base/default.nix b/purism/librem/5r4/librem5-base/default.nix new file mode 100644 index 00000000..a1724dc1 --- /dev/null +++ b/purism/librem/5r4/librem5-base/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchFromGitLab, shellcheck, kmod, lib }: +stdenv.mkDerivation { + pname = "librem5-udev-rules"; + version = "unstable"; + src = fetchFromGitLab { + domain = "source.puri.sm"; + owner = "Librem5"; + repo = "librem5-base"; + rev = "f5b51beb144f76ef3bc483b74e19867bd6364d32"; + hash = "sha256-5k7e4o9ak0zik+XqRV6PPwkTDf3yH3NxtLkhTyCQj7U="; + }; + + buildPhase = ":"; + + checkInputs = [ shellcheck ]; + doCheck = true; + checkPhase = "make"; + + installPhase = '' + mkdir -p "$out/bin" "$out/lib/udev/rules.d" + cp -v default/lockdown-support/lockdown-support.sh "$out/bin" + chmod +x "$out/bin/lockdown-support.sh" + cp -v default/gpsd/99-gnss.rules "$out/lib/udev/rules.d" + + pushd debian + for rule in librem5-base-defaults.*.udev; do + cp -v "$rule" "$out/lib/udev/rules.d/''${rule#*.}.rules" + done + popd + ''; + + postFixup = '' + sed -i \ + -e "s@/usr/sbin/lockdown-support.sh@$out/bin/lockdown-support.sh@g" \ + -e "s@/usr/sbin/modprobe@${kmod}/bin/modprobe@g" \ + -e "s@/usr/sbin/rmmod@${kmod}/bin/rmmod@g" \ + "$out"/lib/udev/rules.d/*.udev.rules + ''; + + # https://source.puri.sm/Librem5/librem5-base/-/issues/68 + # President@Purism promised it's under a free license: https://matrix.to/#/%23community-librem-5%3Atalk.puri.sm/%24hNCtZr7Escmr56uz1eEiaHpakteEXig7b5G8t2W6tWs?via=balsoft.ru&via=matrix.org&via=shareknot.de&via=zorix.us + meta.license = lib.licenses.free; +} diff --git a/purism/librem/5r4/lockdown-fix.nix b/purism/librem/5r4/lockdown-fix.nix new file mode 100644 index 00000000..00e5041e --- /dev/null +++ b/purism/librem/5r4/lockdown-fix.nix @@ -0,0 +1,26 @@ +{ config, pkgs, lib, ... }: +lib.mkIf config.hardware.librem5.lockdownFix { + # We blacklist the drivers so they don't load during early boot when the sensors are disconnected, + boot.blacklistedKernelModules = [ + "st_lsm6dsx_spi" + "st_lsm6dsx_i2c" + "st_lsm6dsx" + ]; + + # and load them when the phone is fully booted; + systemd.services.librem5-lockdown-support = { + description = "Set up drivers for the orientation and proximity sensors on Librem 5"; + serviceConfig.Type = "oneshot"; + serviceConfig.ExecStart = "${pkgs.librem5-base}/bin/lockdown-support.sh"; + wantedBy = [ "default.target" ]; + path = [ pkgs.kmod ]; + }; + + # udev rules from librem5-base handle going into "lockdown mode" and back. + assertions = [{ + assertion = with config.hardware.librem5; + lockdownFix -> installUdevPackages; + message = + "'hardware.librem5.lockdownFix' requires 'hardware.librem5.installUdevPackages', but it is not enabled."; + }]; +} diff --git a/purism/librem/5r4/u-boot/build.nix b/purism/librem/5r4/u-boot/build.nix new file mode 100644 index 00000000..91b79d96 --- /dev/null +++ b/purism/librem/5r4/u-boot/build.nix @@ -0,0 +1 @@ +with import { system = "aarch64-linux"; }; callPackage ./. { } diff --git a/purism/librem/5r4/u-boot/default.nix b/purism/librem/5r4/u-boot/default.nix new file mode 100644 index 00000000..e8508aec --- /dev/null +++ b/purism/librem/5r4/u-boot/default.nix @@ -0,0 +1,70 @@ +{ stdenv, buildUBoot, fetchurl, fetchFromGitLab, lib, flex, bison }: +let + firmware-imx = stdenv.mkDerivation (fa: { + pname = "firmware-imx"; + version = "8.12"; + src = fetchurl { + url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/${fa.pname}-${fa.version}.bin"; + sha256 = "1vr2wgjac718hp48arhdvxd7gib93zhdrbrla8w3xigc6szlfrvb"; + }; + unpackPhase = '' + cp $src firmware + chmod +x firmware + ./firmware --auto-accept + ''; + installPhase = '' + mkdir -p $out + cd ${fa.pname}-${fa.version}/firmware + cp ddr/synopsys/lpddr4_pmu_train_?d_?mem.bin hdmi/cadence/signed_*_imx8m.bin $out + ''; + meta.license = lib.licenses.unfree; + }); + + arm-trusted-firmware-imx8mq = stdenv.mkDerivation (fa: { + pname = "arm-trusted-firmware-bl31"; + version = "unstable-2020-07-08"; + src = fetchFromGitLab { + domain = "source.puri.sm"; + owner = "Librem5"; + repo = "arm-trusted-firmware"; + rev = "1fd3ff86cd4a05cd3e5637bf5a6902ac58fcafb9"; + hash = "sha256-fzpUxq+Hz7pijv5Mvzz+bUkaH79YSaugVUnViF7NB3A="; + }; + enableParallelBuilding = true; + hardeningDisable = [ "all" ]; + NIX_LDFLAGS = "--no-warn-rwx-segments"; + buildFlags = [ "PLAT=imx8mq" "bl31" ]; + installPhase = '' + mkdir -p $out + cp build/imx8mq/release/bl31.bin $out + ''; + dontStrip = true; + }); + + ubootLibrem5 = buildUBoot { + version = "2022.10-librem5.1"; + defconfig = "librem5_defconfig"; + src = fetchFromGitLab { + domain = "source.puri.sm"; + owner = "a-wai"; + repo = "uboot-imx"; + rev = "3a836701279ed1f51063dc5da6f59adc4809093e"; + hash = "sha256-69auZ8GzyhSBxzi4jc6IyyQ6JBrTYXaOk6dZ+joUgF4="; + }; + BL31 = "${arm-trusted-firmware-imx8mq}/bl31.bin"; + preConfigure = '' + cp $BL31 . + cp ${firmware-imx}/* . + ''; + preInstall = '' + cp flash.bin u-boot.imx + ''; + filesToInstall = [ "u-boot.imx" ]; + postInstall = '' + mkdir $out/bin + sed 's|TARGET="/usr/lib/u-boot/librem5.*"|TARGET="${placeholder "out"}"|' \ + $src/debian/bin/u-boot-install-librem5 > $out/bin/u-boot-install-librem5 + ''; + }; +in +ubootLibrem5 diff --git a/purism/librem/5r4/wifi.nix b/purism/librem/5r4/wifi.nix new file mode 100644 index 00000000..f469a4f4 --- /dev/null +++ b/purism/librem/5r4/wifi.nix @@ -0,0 +1,14 @@ +{ config, pkgs, lib, ... }: +lib.mkIf (config.hardware.librem5.wifiCard == "redpine") { + # Disable mainline rsi module + boot.blacklistedKernelModules = [ + "rsi_91x" + "rsi_sdio" + ]; + + # Load redpine in Wi-Fi station + BT dual mode + boot.extraModprobeConfig = '' + options redpine_91x dev_oper_mode=13 rsi_zone_enabled=1 antenna_diversity=1 + ''; + +} From 658064ce36d028777e8d6643b02822a93834ca11 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Wed, 29 Mar 2023 17:21:51 +0400 Subject: [PATCH 0533/1476] Apply suggestions from @louib --- purism/librem/5r4/default.nix | 2 +- purism/librem/5r4/librem5-base/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/purism/librem/5r4/default.nix b/purism/librem/5r4/default.nix index f9674397..a0a3aeca 100644 --- a/purism/librem/5r4/default.nix +++ b/purism/librem/5r4/default.nix @@ -8,7 +8,7 @@ in { description = lib.mdDoc '' Which wi-fi card is installed in your phone. - Phones shipped before Januarly 2023 have redpine, newer phones have sparklan. + Phones shipped before January 2023 have redpine, newer phones have sparklan. ''; default = "redpine"; }; diff --git a/purism/librem/5r4/librem5-base/default.nix b/purism/librem/5r4/librem5-base/default.nix index a1724dc1..0cc1547a 100644 --- a/purism/librem/5r4/librem5-base/default.nix +++ b/purism/librem/5r4/librem5-base/default.nix @@ -38,6 +38,6 @@ stdenv.mkDerivation { ''; # https://source.puri.sm/Librem5/librem5-base/-/issues/68 - # President@Purism promised it's under a free license: https://matrix.to/#/%23community-librem-5%3Atalk.puri.sm/%24hNCtZr7Escmr56uz1eEiaHpakteEXig7b5G8t2W6tWs?via=balsoft.ru&via=matrix.org&via=shareknot.de&via=zorix.us + # President@Purism promised it's under a free license: https://matrix.to/#/%23community-librem-5%3Atalk.puri.sm/%24hNCtZr7Escmr56uz1eEiaHpakteEXig7b5G8t2W6tWs meta.license = lib.licenses.free; } From 6a1fb21810cc075f33d55a134c84d1039db10291 Mon Sep 17 00:00:00 2001 From: Sophie Tauchert Date: Tue, 15 Aug 2023 23:36:16 +0200 Subject: [PATCH 0534/1476] purism librem5r4: update kernel to 6.4.5 --- purism/librem/5r4/kernel/6.1.10.nix | 14 -------------- purism/librem/5r4/kernel/6.4.5.nix | 25 +++++++++++++++++++++++++ purism/librem/5r4/kernel/default.nix | 4 ++-- 3 files changed, 27 insertions(+), 16 deletions(-) delete mode 100644 purism/librem/5r4/kernel/6.1.10.nix create mode 100644 purism/librem/5r4/kernel/6.4.5.nix diff --git a/purism/librem/5r4/kernel/6.1.10.nix b/purism/librem/5r4/kernel/6.1.10.nix deleted file mode 100644 index b68e0d01..00000000 --- a/purism/librem/5r4/kernel/6.1.10.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ buildLinux, fetchFromGitLab, ... }@args: -buildLinux (args // rec { - defconfig = "librem5_defconfig"; - version = "6.1.10-librem5"; - modDirVersion = version; - src = fetchFromGitLab { - domain = "source.puri.sm"; - owner = "Librem5"; - repo = "linux"; - rev = "pureos/6.1.10pureos1"; - hash = "sha256-Cc16vMUcJ/a2k3zMynqZ99t1LyTSs7EXKdNGF6OTS1s="; - }; - kernelPatches = [ ]; -} // args.argsOverride or { }) diff --git a/purism/librem/5r4/kernel/6.4.5.nix b/purism/librem/5r4/kernel/6.4.5.nix new file mode 100644 index 00000000..16a34975 --- /dev/null +++ b/purism/librem/5r4/kernel/6.4.5.nix @@ -0,0 +1,25 @@ +{ lib +, buildLinux +, fetchFromGitLab +, ... +} @ args: +buildLinux (args + // rec { + defconfig = "librem5_defconfig"; + version = "6.4.5-librem5"; + modDirVersion = version; + src = fetchFromGitLab { + domain = "source.puri.sm"; + owner = "Librem5"; + repo = "linux"; + rev = "pureos/6.4.5pureos1"; + hash = "sha256-xg/qZ3Lig8oAAa3I+yn4tKPbftBy9Y6fnk8IvB+rm4E="; + }; + kernelPatches = [ ]; + structuredExtraConfig = with lib.kernel; { + # buildLinux overrides this and defaults to 32, so go back to the value defined librem5_defconfig + # this is required for millipixels to take photos, otherwise the VIDIOC_REQ_BUFS ioctl returns ENOMEM + CMA_SIZE_MBYTES = lib.mkForce (freeform "320"); + }; +} + // args.argsOverride or { }) diff --git a/purism/librem/5r4/kernel/default.nix b/purism/librem/5r4/kernel/default.nix index be57b355..19b8f3cd 100644 --- a/purism/librem/5r4/kernel/default.nix +++ b/purism/librem/5r4/kernel/default.nix @@ -1,4 +1,4 @@ final: prev: { - linuxPackages_librem5_6_1_10 = final.linuxPackagesFor (final.callPackage ./6.1.10.nix { }); - linuxPackages_librem5 = final.linuxPackages_librem5_6_1_10; + linuxPackages_librem5_6_4_5 = final.linuxPackagesFor (final.callPackage ./6.4.5.nix { }); + linuxPackages_librem5 = final.linuxPackages_librem5_6_4_5; } From 3284d0605cce3e49e35a28924f4f6cfa9edd8a60 Mon Sep 17 00:00:00 2001 From: Sophie Tauchert Date: Wed, 16 Aug 2023 00:21:11 +0200 Subject: [PATCH 0535/1476] purism librem5r4: update uboot --- purism/librem/5r4/u-boot/default.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/purism/librem/5r4/u-boot/default.nix b/purism/librem/5r4/u-boot/default.nix index e8508aec..245b6ba2 100644 --- a/purism/librem/5r4/u-boot/default.nix +++ b/purism/librem/5r4/u-boot/default.nix @@ -1,11 +1,11 @@ -{ stdenv, buildUBoot, fetchurl, fetchFromGitLab, lib, flex, bison }: +{ stdenv, gcc11Stdenv, buildUBoot, fetchurl, fetchFromGitLab, lib, flex, bison }: let firmware-imx = stdenv.mkDerivation (fa: { pname = "firmware-imx"; - version = "8.12"; + version = "8.15"; src = fetchurl { url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/${fa.pname}-${fa.version}.bin"; - sha256 = "1vr2wgjac718hp48arhdvxd7gib93zhdrbrla8w3xigc6szlfrvb"; + hash = "sha256-k34ZZHa46VtLfyUBoUyDJtigZJ+KP5IotyNzdwoI3rM="; }; unpackPhase = '' cp $src firmware @@ -15,12 +15,12 @@ let installPhase = '' mkdir -p $out cd ${fa.pname}-${fa.version}/firmware - cp ddr/synopsys/lpddr4_pmu_train_?d_?mem.bin hdmi/cadence/signed_*_imx8m.bin $out + cp ddr/synopsys/lpddr4*.bin hdmi/cadence/signed_*_imx8m.bin $out ''; meta.license = lib.licenses.unfree; }); - arm-trusted-firmware-imx8mq = stdenv.mkDerivation (fa: { + arm-trusted-firmware-imx8mq = gcc11Stdenv.mkDerivation (fa: { pname = "arm-trusted-firmware-bl31"; version = "unstable-2020-07-08"; src = fetchFromGitLab { @@ -42,14 +42,14 @@ let }); ubootLibrem5 = buildUBoot { - version = "2022.10-librem5.1"; + version = "unstable-2022-12-15"; defconfig = "librem5_defconfig"; src = fetchFromGitLab { domain = "source.puri.sm"; - owner = "a-wai"; + owner = "Librem5"; repo = "uboot-imx"; - rev = "3a836701279ed1f51063dc5da6f59adc4809093e"; - hash = "sha256-69auZ8GzyhSBxzi4jc6IyyQ6JBrTYXaOk6dZ+joUgF4="; + rev = "956aa590c93977992743b41c45d3c7ee5a024915"; # this is the latest commit on the upstream/librem5 branch + hash = "sha256-MsIIlarN+WFFEzc0ptLAgS7BwJ6Cosy42xo0EwPn1AU="; }; BL31 = "${arm-trusted-firmware-imx8mq}/bl31.bin"; preConfigure = '' @@ -64,6 +64,7 @@ let mkdir $out/bin sed 's|TARGET="/usr/lib/u-boot/librem5.*"|TARGET="${placeholder "out"}"|' \ $src/debian/bin/u-boot-install-librem5 > $out/bin/u-boot-install-librem5 + chmod +x $out/bin/u-boot-install-librem5 ''; }; in From 793de77d9f83418b428e8ba70d1e42c6507d0d35 Mon Sep 17 00:00:00 2001 From: Sophie Tauchert Date: Wed, 16 Aug 2023 00:23:36 +0200 Subject: [PATCH 0536/1476] purism librem5r4: add configuration option for audio --- purism/librem/5r4/audio.nix | 18 ++++++++++++++++++ purism/librem/5r4/default.nix | 17 ++++++++++++++++- purism/librem/5r4/librem5-base/default.nix | 11 ++++++++--- 3 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 purism/librem/5r4/audio.nix diff --git a/purism/librem/5r4/audio.nix b/purism/librem/5r4/audio.nix new file mode 100644 index 00000000..e44e2f37 --- /dev/null +++ b/purism/librem/5r4/audio.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ... }: +{ + config = lib.mkIf config.hardware.librem5.audio { + assertions = [{ + assertion = config.hardware.pulseaudio.enable; + message = "Call audio on Librem5 requires pulse audio to be enabled through `hardware.pulseaudio.enable`."; + }]; + hardware.pulseaudio = { + enable = true; + # this is required to correctly configure the modem as PA source/sink + extraConfig = '' + .include ${pkgs.librem5-base}/etc/pulse/librem5.pa + ''; + }; + + services.dbus.packages = [ pkgs.callaudiod ]; + }; +} diff --git a/purism/librem/5r4/default.nix b/purism/librem/5r4/default.nix index a0a3aeca..e4f864ef 100644 --- a/purism/librem/5r4/default.nix +++ b/purism/librem/5r4/default.nix @@ -15,10 +15,25 @@ in { customInitrdModules = lib.mkEnableOption (lib.mdDoc "use of custom kernel modules in the initrd."); installUdevPackages = lib.mkEnableOption (lib.mdDoc "installation of udev packages from librem5-base."); lockdownFix = lib.mkEnableOption (lib.mdDoc "fix for orientation and proximity sensors not working after lockdown."); + audio = lib.mkOption { + description = lib.mdDoc '' + Whether to enable and configure PulseAudio for the Librem5 modem. + + This is required for audio during calls to work at all. + ''; + type = lib.types.bool; + default = true; + example = false; + }; }; }; - imports = [ ./initrd.nix ./wifi.nix ./lockdown-fix.nix ]; + imports = [ + ./audio.nix + ./initrd.nix + ./wifi.nix + ./lockdown-fix.nix + ]; config = { hardware.librem5 = { diff --git a/purism/librem/5r4/librem5-base/default.nix b/purism/librem/5r4/librem5-base/default.nix index 0cc1547a..da9a39e2 100644 --- a/purism/librem/5r4/librem5-base/default.nix +++ b/purism/librem/5r4/librem5-base/default.nix @@ -1,13 +1,13 @@ { stdenv, fetchFromGitLab, shellcheck, kmod, lib }: stdenv.mkDerivation { - pname = "librem5-udev-rules"; + pname = "librem5-base"; version = "unstable"; src = fetchFromGitLab { domain = "source.puri.sm"; owner = "Librem5"; repo = "librem5-base"; - rev = "f5b51beb144f76ef3bc483b74e19867bd6364d32"; - hash = "sha256-5k7e4o9ak0zik+XqRV6PPwkTDf3yH3NxtLkhTyCQj7U="; + rev = "96b0f920cde9157332b0c16ba1135ee60a3f3259"; + hash = "sha256-nR42dk3g0/IkVFygZ7K1SZ2KoQJeDzuMOumKdOOQS5k="; }; buildPhase = ":"; @@ -27,6 +27,11 @@ stdenv.mkDerivation { cp -v "$rule" "$out/lib/udev/rules.d/''${rule#*.}.rules" done popd + + mkdir -p "$out/etc/pulse" + cp -v "default/audio/pulse/librem5.pa" "$out/etc/pulse/librem5.pa" + substituteInPlace "$out/etc/pulse/librem5.pa" \ + --replace ".include /etc/pulse/default.pa" "" ''; postFixup = '' From edf8986157a59d9e8f80dfa21aafea8707a4326a Mon Sep 17 00:00:00 2001 From: Astrid Yu Date: Thu, 7 Sep 2023 11:24:17 -0700 Subject: [PATCH 0537/1476] surface: Remove 0015-intel-thread-director.patch --- microsoft/surface/common/kernel/linux-6.1.18/patches.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-6.1.18/patches.nix b/microsoft/surface/common/kernel/linux-6.1.18/patches.nix index 78c7cea2..e197649e 100644 --- a/microsoft/surface/common/kernel/linux-6.1.18/patches.nix +++ b/microsoft/surface/common/kernel/linux-6.1.18/patches.nix @@ -138,8 +138,4 @@ name = "ms-surface/0014-rtc"; patch = patchDir + "/0014-rtc.patch"; } - { - name = "ms-surface/0015-intel-thread-director"; - patch = patchDir + "/0015-intel-thread-director.patch"; - } ] From 9e28985b44dc1d636b78ad0df6d1e5eecfcb2ffb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 02:22:39 +0000 Subject: [PATCH 0538/1476] build(deps): bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout 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 bd918fb3..27566494 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ jobs: tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v22 with: nix_path: nixpkgs=channel:nixos-unstable From 88348cb5c1e6bdad2f9879663dd9c12ef281a3be Mon Sep 17 00:00:00 2001 From: "[object Object]" Date: Sun, 10 Sep 2023 11:39:16 -0700 Subject: [PATCH 0539/1476] framework laptop 11th gen: change `mem_sleep_default=deep` kernel parameter to `acpi_osi="!Windows 2020"` (fixes a regression in s2idle, making it more power efficient than deep sleep) --- framework/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/framework/default.nix b/framework/default.nix index bbb38e5d..cb8cb958 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -6,9 +6,8 @@ ]; boot.kernelParams = [ - # For Power consumption - # https://kvark.github.io/linux/framework/2021/10/17/framework-nixos.html - "mem_sleep_default=deep" + # Fixes a regression in s2idle, making it more power efficient than deep sleep + "acpi_osi=\"!Windows 2020\"" # For Power consumption # https://community.frame.work/t/linux-battery-life-tuning/6665/156 "nvme.noacpi=1" From 4cd9ced7fa0c10668a321546912adb8cbdc9369b Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Mon, 4 Sep 2023 16:07:13 +0200 Subject: [PATCH 0540/1476] surface: linux 6.4.12 -> 6.4.14 --- microsoft/surface/common/default.nix | 2 +- microsoft/surface/common/kernel/default.nix | 2 +- .../kernel/{linux-6.4.12 => linux-6.4.14}/default.nix | 8 ++++---- .../kernel/{linux-6.4.12 => linux-6.4.14}/patches.nix | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename microsoft/surface/common/kernel/{linux-6.4.12 => linux-6.4.14}/default.nix (80%) rename microsoft/surface/common/kernel/{linux-6.4.12 => linux-6.4.14}/patches.nix (100%) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 37db0c8c..eceba756 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.4.12"; + microsoft-surface.kernelVersion = mkDefault "6.4.14"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index 934dfdf7..c625815a 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -8,7 +8,7 @@ in { ./linux-5.19.17 ./linux-6.0.17 ./linux-6.1.18 - ./linux-6.4.12 + ./linux-6.4.14 ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.4.12/default.nix b/microsoft/surface/common/kernel/linux-6.4.14/default.nix similarity index 80% rename from microsoft/surface/common/kernel/linux-6.4.12/default.nix rename to microsoft/surface/common/kernel/linux-6.4.14/default.nix index e99c5d40..ae75c946 100644 --- a/microsoft/surface/common/kernel/linux-6.4.12/default.nix +++ b/microsoft/surface/common/kernel/linux-6.4.14/default.nix @@ -8,7 +8,7 @@ let cfg = config.microsoft-surface; - version = "6.4.12"; + version = "6.4.14"; extraMeta.branch = "6.4"; patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; kernelPatches = pkgs.callPackage ./patches.nix { @@ -20,17 +20,17 @@ let inherit version extraMeta kernelPatches; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "0x56b4hslm730ghvggz41fjkbzlnxp6k8857dn7iy27yavlipafc"; + sha256 = "1rjh0jrn5qvxwzmyg478n08vckkld8r52nkc102ppqvsfhiy7skm"; }; }; in { options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ "6.4.12" ]; + type = types.enum [ "6.4.14" ]; }; - config = mkIf (cfg.kernelVersion == "6.4.12") { + config = mkIf (cfg.kernelVersion == "6.4.14") { boot = { inherit kernelPackages; }; diff --git a/microsoft/surface/common/kernel/linux-6.4.12/patches.nix b/microsoft/surface/common/kernel/linux-6.4.14/patches.nix similarity index 100% rename from microsoft/surface/common/kernel/linux-6.4.12/patches.nix rename to microsoft/surface/common/kernel/linux-6.4.14/patches.nix From e507801ba79a13639c85c9ecc402b077e9fb33ed Mon Sep 17 00:00:00 2001 From: Sophie Tauchert Date: Mon, 4 Sep 2023 15:37:10 +0200 Subject: [PATCH 0541/1476] purism librem5r4 linux: 6.4.5-librem5 -> 6.4.14-librem5 --- purism/librem/5r4/kernel/{6.4.5.nix => 6.4.14.nix} | 6 +++--- purism/librem/5r4/kernel/default.nix | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) rename purism/librem/5r4/kernel/{6.4.5.nix => 6.4.14.nix} (82%) diff --git a/purism/librem/5r4/kernel/6.4.5.nix b/purism/librem/5r4/kernel/6.4.14.nix similarity index 82% rename from purism/librem/5r4/kernel/6.4.5.nix rename to purism/librem/5r4/kernel/6.4.14.nix index 16a34975..ce4513c0 100644 --- a/purism/librem/5r4/kernel/6.4.5.nix +++ b/purism/librem/5r4/kernel/6.4.14.nix @@ -6,14 +6,14 @@ buildLinux (args // rec { defconfig = "librem5_defconfig"; - version = "6.4.5-librem5"; + version = "6.4.14-librem5"; modDirVersion = version; src = fetchFromGitLab { domain = "source.puri.sm"; owner = "Librem5"; repo = "linux"; - rev = "pureos/6.4.5pureos1"; - hash = "sha256-xg/qZ3Lig8oAAa3I+yn4tKPbftBy9Y6fnk8IvB+rm4E="; + rev = "pureos/6.4.14pureos1"; + hash = "sha256-PzRG6czWLMahklceuaWGK1QJ+m9FAKDa/m1jp87h62k="; }; kernelPatches = [ ]; structuredExtraConfig = with lib.kernel; { diff --git a/purism/librem/5r4/kernel/default.nix b/purism/librem/5r4/kernel/default.nix index 19b8f3cd..c07265da 100644 --- a/purism/librem/5r4/kernel/default.nix +++ b/purism/librem/5r4/kernel/default.nix @@ -1,4 +1,4 @@ final: prev: { - linuxPackages_librem5_6_4_5 = final.linuxPackagesFor (final.callPackage ./6.4.5.nix { }); - linuxPackages_librem5 = final.linuxPackages_librem5_6_4_5; + linuxPackages_librem5_6_4_14 = final.linuxPackagesFor (final.callPackage ./6.4.14.nix { }); + linuxPackages_librem5 = final.linuxPackages_librem5_6_4_14; } From ab68d63b92b044263bbf1f1c927e80771f279a7b Mon Sep 17 00:00:00 2001 From: Sophie Tauchert Date: Sun, 10 Sep 2023 12:25:10 +0200 Subject: [PATCH 0542/1476] purism librem5r4: firmware-imx: 8.15 -> 8.20 --- purism/librem/5r4/u-boot/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/purism/librem/5r4/u-boot/default.nix b/purism/librem/5r4/u-boot/default.nix index 245b6ba2..78e60667 100644 --- a/purism/librem/5r4/u-boot/default.nix +++ b/purism/librem/5r4/u-boot/default.nix @@ -2,10 +2,10 @@ let firmware-imx = stdenv.mkDerivation (fa: { pname = "firmware-imx"; - version = "8.15"; + version = "8.20"; src = fetchurl { url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/${fa.pname}-${fa.version}.bin"; - hash = "sha256-k34ZZHa46VtLfyUBoUyDJtigZJ+KP5IotyNzdwoI3rM="; + hash = "sha256-9txqXI/ZuROhU2DTzNU9GI2wWgioWUxRjldiJHjHI4M="; }; unpackPhase = '' cp $src firmware From bec613e179dfa03cb43ca47802bb9d6775896d7c Mon Sep 17 00:00:00 2001 From: Sophie Tauchert Date: Sun, 10 Sep 2023 12:31:17 +0200 Subject: [PATCH 0543/1476] purism librem5r4: update README and install u-boot-install-librem5 as system package --- purism/librem/5r4/README.md | 43 +++++++++++++++++++++++------------ purism/librem/5r4/default.nix | 2 ++ 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/purism/librem/5r4/README.md b/purism/librem/5r4/README.md index f140ecb3..be385e75 100644 --- a/purism/librem/5r4/README.md +++ b/purism/librem/5r4/README.md @@ -31,7 +31,7 @@ Note down this device path. > > While upstream u-boot does support Librem 5, it can only boot using `boot.scr`, for which NixOS has no native support. > -> There's work on extlinux support in Librem 5's U-Boot here: https://source.puri.sm/a-wai/uboot-imx/-/tree/allow-compressed-kernel +> There's extlinux support in Librem 5's U-Boot here: https://source.puri.sm/Librem5/uboot-imx/ > > This U-Boot version is packaged in the [`u-boot`] directory. @@ -49,11 +49,11 @@ Provided you have a way to build Nix derivations for `aarch64-linux` (like a rem > > If it does not work, your best bet is to follow the advice here, which will flash U-Boot build by upstream: https://forums.puri.sm/t/can-someone-with-serial-console-access-try-nixos-kernel-on-librem-5/19121/27 -To flash the device, run +To flash u-boot to the device, use one of the following (assuming you've built u-boot to `./result`): -```console -$ sudo u-boot-install-librem5 -``` +- if you're running an existing OS on the Librem 5, run `# result/bin/u-boot-install-librem5 /dev/mmcblk0` on the device itself +- if you've mounted the Librem 5's internal MMC via Jumpdrive, run `# TARGET="$(pwd)/result" result/bin/u-boot-install-librem5 ` +- if you want to flash u-boot manually (not recommended!), use `dd if=/dev/zero of= bs=1024 count=1055 seek=2` and `dd if=result/uboot.imx conv=notrunc of= bs=1024 seek=33` At this point, if you have an OS installed on your Librem 5, it's best to reboot into it to check that the U-Boot was flashed correctly. If that's the case, reboot back into Jumpdrive. @@ -64,27 +64,32 @@ Now, from your host system, partition the MMC. > **Warning** > -> Doing this wipes all data off the phone +> Doing this wipes all data off the phone! + +> **Warning** +> +> Make sure to keep 2MiB of free space before the first partition as this is where u-boot lives. +> If you accidentally create a file system in that space, you have to flash u-boot again. -I went with 1 bootable `ext2` partition for `/boot`, and one `ext4` partition for `/`. It ended up looking like this (your device names will be different): ```console $ sudo fdisk -l /dev/mmcblk0 -Disk /dev/mmcblk0: 29.12 GiB, 31268536320 bytes, 61071360 sectors +Disk /dev/mmcblk0: 29,12 GiB, 31268536320 bytes, 61071360 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos -Disk identifier: 0xcec26c32 +Disk identifier: 0x15650736 Device Boot Start End Sectors Size Id Type -/dev/mmcblk0p1 * 4096 499711 495616 242M 83 Linux -/dev/mmcblk0p2 499712 61071359 60571648 28.9G 83 Linux +/dev/mmcblk0p1 * 4096 528383 524288 256M 83 Linux +/dev/mmcblk0p2 528384 61071359 60542976 28,9G 83 Linux ``` -Note 2MiB of free space before the first partition. -This is where U-Boot lives. +Now you can create filesystems on those partitions. + +I went with a bootable `ext2` partition for `/boot`, and one `f2fs` partition for `/`. You can use any filesystem supported by NixOS (like `ext4` or `zfs`) for `/`, but `f2fs` might improve your eMMC lifespan as it supports wear leveling. Note that `f2fs` does not have a journal, so filesystem corruption can happen if the battery runs out for example. Mount the partitions on your host system, e.g. to `/mnt` and `/mnt/boot`. Remember that `/mnt` is the second partition, and `/mnt/boot` is the first. @@ -103,7 +108,7 @@ Build the configuration (`nix build .#nixosConfigurations..config.syst Running `nixos-install --system ./result --root /mnt` will copy the system to the MMC. Unless you're running on an aarch64 system, it will fail to activate or install the bootloader, however. -You must do this manually. +You must do this manually. Remember to `sync` and `umount` the MMC on your host before proceeding. Get a shell on Jumpdrive, mount partitions there, and activate the system: ```console @@ -130,4 +135,12 @@ Unmount: And shut the phone down by holding the power key. -Start it up and you should be booting straight into your NixOS installation. \ No newline at end of file +Start it up and you should be booting straight into your NixOS installation. + +## Updating u-boot + +Once you're running NixOS with this module, you can run `# u-boot-install-librem5 /dev/mmcblk0` any time to reflash the most recent version of u-boot from the running NixOS. + +> **Warning** +> +> While I (@999eagle) will test u-boot updates on my own device before updating this repository, flashing u-boot may still render your device unbootable! diff --git a/purism/librem/5r4/default.nix b/purism/librem/5r4/default.nix index e4f864ef..83c7fb3b 100644 --- a/purism/librem/5r4/default.nix +++ b/purism/librem/5r4/default.nix @@ -64,5 +64,7 @@ in { services.udev.packages = lib.mkIf cfg.installUdevPackages [ pkgs.librem5-base ]; + environment.systemPackages = with pkgs; [ ubootLibrem5 ]; + }; } From 2d1a0da5e3fdb1585874273907f152c1ca5ba242 Mon Sep 17 00:00:00 2001 From: Oxters Wyzgowski Date: Mon, 11 Sep 2023 07:38:26 -0400 Subject: [PATCH 0544/1476] asus/zephyrus/ga401: fix keymapping Mapped fn+LeftArrow to be home key and fn+RightArrow to be end key. The Asus Zephyrus GA401 does not have any home end functionality originally. --- asus/zephyrus/ga401/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/asus/zephyrus/ga401/default.nix b/asus/zephyrus/ga401/default.nix index 4899dd79..edb3a5b6 100644 --- a/asus/zephyrus/ga401/default.nix +++ b/asus/zephyrus/ga401/default.nix @@ -26,10 +26,11 @@ services = { asusd.enable = lib.mkDefault true; - # fixes mic mute button udev.extraHwdb = '' evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* - KEYBOARD_KEY_ff31007c=f20 + KEYBOARD_KEY_ff31007c=f20 # fixes mic mute button + KEYBOARD_KEY_ff3100b2=home # Set fn+LeftArrow as Home + KEYBOARD_KEY_ff3100b3=end # Set fn+RightArrow as End ''; }; } From ca41b8a227dd235b1b308217f116c7e6e84ad779 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 11:37:01 +0000 Subject: [PATCH 0545/1476] build(deps): bump cachix/install-nix-action from 22 to 23 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 22 to 23. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v22...v23) --- 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 27566494..2c58edc7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v22 + - uses: cachix/install-nix-action@v23 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version From f8d3c754626e0ff3a0b8906fc0a22f9bda20c6a2 Mon Sep 17 00:00:00 2001 From: Andrii Panasiuk Date: Tue, 12 Sep 2023 17:21:37 +0300 Subject: [PATCH 0546/1476] Implement dt overlay for enabling built-in xhci controller --- raspberry-pi/4/xhci.nix | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 raspberry-pi/4/xhci.nix diff --git a/raspberry-pi/4/xhci.nix b/raspberry-pi/4/xhci.nix new file mode 100644 index 00000000..b5398f2e --- /dev/null +++ b/raspberry-pi/4/xhci.nix @@ -0,0 +1,40 @@ +{ + config, + lib, + ... +}: let + cfg = config.hardware.raspberry-pi."4".xhci; +in { + options.hardware = { + raspberry-pi."4".xhci = { + enable = lib.mkEnableOption '' + Enable builtin XHCI controller for USB with otg_mode=1 in config.txt + ''; + }; + }; + + config = lib.mkIf cfg.enable { + hardware.deviceTree = { + overlays = [ + { + name = "enable-xhci"; + dtsText = '' + /dts-v1/; + /plugin/; + + / { + compatible = "brcm,bcm2711"; + fragment@0 { + //target-path = "/scb/xhci@7e9c0000"; + target = <&xhci>; + __overlay__ { + status = "okay"; + }; + }; + }; + ''; + } + ]; + }; + }; +} From 12a6f30214cfe2c64df5389dbaf834e66384479b Mon Sep 17 00:00:00 2001 From: Andrii Panasiuk Date: Tue, 12 Sep 2023 17:29:55 +0300 Subject: [PATCH 0547/1476] Import module --- raspberry-pi/4/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index 7c442ff3..9f5fbb90 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -14,6 +14,7 @@ ./touch-ft5406.nix ./pwm0.nix ./pkgs-overlays.nix + ./xhci.nix ]; boot = { From 128c0442981bfdf31906864b1e1551ec4d529e9c Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 11 Sep 2023 19:28:18 -0400 Subject: [PATCH 0548/1476] starfive visionfive2: update kernel to 6.5.0 --- starfive/visionfive/v2/linux-6.5.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/starfive/visionfive/v2/linux-6.5.nix b/starfive/visionfive/v2/linux-6.5.nix index 33a9caab..a2793051 100644 --- a/starfive/visionfive/v2/linux-6.5.nix +++ b/starfive/visionfive/v2/linux-6.5.nix @@ -1,7 +1,7 @@ { lib, callPackage, linuxPackagesFor, kernelPatches, ... }: let - modDirVersion = "6.5.0-rc1"; + modDirVersion = "6.5.0"; linuxPkg = { lib, fetchFromGitHub, buildLinux, ... }@args: buildLinux (args // { version = "${modDirVersion}-starfive-visionfive2"; @@ -9,8 +9,8 @@ let src = fetchFromGitHub { owner = "starfive-tech"; repo = "linux"; - rev = "67e8df01b875afd312a7d2ab77f56a62f39dd6d9"; - hash = "sha256-H+INnZTrfeCLmxPYbQEu3658/e5/Wz/Y5Ann2+lU6WQ="; + rev = "0dfeb6ace464f0c455a9508815bb9f70760d6faf"; + hash = "sha256-ZDMvEhnJtbyCVNI/WbE80k7ZWOldF491mgx6K/iPgdE="; }; inherit modDirVersion kernelPatches; From bb215e68e51f28abc08fd824d5eed4d72af5defb Mon Sep 17 00:00:00 2001 From: Olof Sandell <83674246+osandell@users.noreply.github.com> Date: Mon, 7 Aug 2023 21:55:09 +0200 Subject: [PATCH 0549/1476] feat: add installer for apple-set-os-loader-installer --- apple/t2/README.md | 31 +++++++++++++++- apple/t2/apple-set-os-loader-installer.nix | 41 ++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 apple/t2/apple-set-os-loader-installer.nix diff --git a/apple/t2/README.md b/apple/t2/README.md index 7f3a842e..ba6d73ba 100644 --- a/apple/t2/README.md +++ b/apple/t2/README.md @@ -1,4 +1,4 @@ -## NixOS on T2 Macs +# NixOS on T2 Macs This is the `nixos-hardware` module of the [T2 Linux Project](https://t2linux.org). @@ -7,3 +7,32 @@ Overall, most features (WiFi, bluetooth, audio, touchbar, ...) of Macs are suppo Following [this guide](https://wiki.t2linux.org/distributions/nixos/installation/) is the recommended way to install, as it incudes the extra things you have to do on a T2 Mac. You can consult the [wiki](https://wiki.t2linux.org/) for information specific to T2 Macs. + +## Unlocking Internal iGPU + +The `apple-set-os-loader-installer.nix` module serves as an installer for the [`apple-set-os-loader`](https://github.com/Redecorating/apple_set_os-loader). This tool is designed to unlock the internal integrated GPU (iGPU) on certain MacBooks. See https://wiki.t2linux.org/guides/hybrid-graphics/ for more details. + +### What it Does: + +Upon activation, this module performs the following: + +- Renames the existing `BOOTX64.EFI` file to `bootx64_original.efi`. +- Installs the `apple-set-os-loader` hook in its place as `bootx64.efi`. +- Before the system boots the hook unlocks the iGPU and subsequently calls the original `bootx64_original.efi`. + +### How to Implement: + +1. **Integrate the apple-set-os-loader installer** into your `configuration.nix`: +``` +imports = [ + ... + "${builtins.fetchGit { url = "https://github.com/NixOS/nixos-hardware.git"; }}/apple/t2/apple-set-os-loader-installer.nix" +]; +``` + +2. **Rebuild your system**: +``` +sudo nixos-rebuild switch +``` + +> **Note**: Always ensure compatibility and make backups of your data before making any system changes. diff --git a/apple/t2/apple-set-os-loader-installer.nix b/apple/t2/apple-set-os-loader-installer.nix new file mode 100644 index 00000000..92463b4e --- /dev/null +++ b/apple/t2/apple-set-os-loader-installer.nix @@ -0,0 +1,41 @@ +{ config, pkgs, ... }: +let + apple-set-os-loader-installer = pkgs.stdenv.mkDerivation rec { + name = "apple-set-os-loader-installer-1.0"; + src = pkgs.fetchFromGitHub { + owner = "Redecorating"; + repo = "apple_set_os-loader"; + rev = "r33.9856dc4"; + sha256 = "hvwqfoF989PfDRrwU0BMi69nFjPeOmSaD6vR6jIRK2Y="; + }; + buildInputs = [ pkgs.gnu-efi ]; + buildPhase = '' + substituteInPlace Makefile --replace "/usr" '$(GNU_EFI)' + export GNU_EFI=${pkgs.gnu-efi} + make + ''; + installPhase = '' + install -D bootx64_silent.efi $out/bootx64.efi + ''; + }; +in +{ + system.activationScripts.hybrid-graphics = { + text = '' + if [[ -e /boot/efi/EFI/BOOT/bootx64_original.efi ]]; then + # We interpret this as apple-set-os-loader being already installed + exit 0 + elif [[ -e /boot/efi/EFI/BOOT/BOOTX64.EFI ]] then + mv /boot/efi/EFI/BOOT/BOOTX64.EFI /boot/efi/EFI/BOOT/bootx64_original.efi + cp ${apple-set-os-loader-installer}/bootx64.efi /boot/efi/EFI/BOOT/bootx64.efi + else + echo "Error: /boot/efi/EFI/BOOT/BOOTX64.EFI is missing" + fi + ''; + }; + environment.etc."modprobe.d/apple-gmux.conf".text = '' + # Enable the iGPU by default if present + options apple-gmux force_igd=y + ''; + environment.systemPackages = with pkgs; [ apple-set-os-loader-installer ]; +} From c8cd4f7ef455de718b9c74a24862cc457b8dcf5d Mon Sep 17 00:00:00 2001 From: Olof Sandell <83674246+osandell@users.noreply.github.com> Date: Wed, 9 Aug 2023 21:36:53 +0200 Subject: [PATCH 0550/1476] feat: integrate into t2 module --- apple/t2/README.md | 9 +- apple/t2/apple-set-os-loader-installer.nix | 41 --------- apple/t2/default.nix | 102 ++++++++++++++------- 3 files changed, 74 insertions(+), 78 deletions(-) delete mode 100644 apple/t2/apple-set-os-loader-installer.nix diff --git a/apple/t2/README.md b/apple/t2/README.md index ba6d73ba..e4a2004a 100644 --- a/apple/t2/README.md +++ b/apple/t2/README.md @@ -10,7 +10,7 @@ You can consult the [wiki](https://wiki.t2linux.org/) for information specific t ## Unlocking Internal iGPU -The `apple-set-os-loader-installer.nix` module serves as an installer for the [`apple-set-os-loader`](https://github.com/Redecorating/apple_set_os-loader). This tool is designed to unlock the internal integrated GPU (iGPU) on certain MacBooks. See https://wiki.t2linux.org/guides/hybrid-graphics/ for more details. +The `apple-set-os-loader-installer` module serves as an installer for the [`apple-set-os-loader`](https://github.com/Redecorating/apple_set_os-loader). This tool is designed to unlock the internal integrated GPU (iGPU) on certain MacBooks. See https://wiki.t2linux.org/guides/hybrid-graphics/ for more details. ### What it Does: @@ -22,12 +22,9 @@ Upon activation, this module performs the following: ### How to Implement: -1. **Integrate the apple-set-os-loader installer** into your `configuration.nix`: +1. Add this into your `configuration.nix`: ``` -imports = [ - ... - "${builtins.fetchGit { url = "https://github.com/NixOS/nixos-hardware.git"; }}/apple/t2/apple-set-os-loader-installer.nix" -]; +appleT2Config.enableAppleSetOsLoader = true; ``` 2. **Rebuild your system**: diff --git a/apple/t2/apple-set-os-loader-installer.nix b/apple/t2/apple-set-os-loader-installer.nix deleted file mode 100644 index 92463b4e..00000000 --- a/apple/t2/apple-set-os-loader-installer.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ config, pkgs, ... }: -let - apple-set-os-loader-installer = pkgs.stdenv.mkDerivation rec { - name = "apple-set-os-loader-installer-1.0"; - src = pkgs.fetchFromGitHub { - owner = "Redecorating"; - repo = "apple_set_os-loader"; - rev = "r33.9856dc4"; - sha256 = "hvwqfoF989PfDRrwU0BMi69nFjPeOmSaD6vR6jIRK2Y="; - }; - buildInputs = [ pkgs.gnu-efi ]; - buildPhase = '' - substituteInPlace Makefile --replace "/usr" '$(GNU_EFI)' - export GNU_EFI=${pkgs.gnu-efi} - make - ''; - installPhase = '' - install -D bootx64_silent.efi $out/bootx64.efi - ''; - }; -in -{ - system.activationScripts.hybrid-graphics = { - text = '' - if [[ -e /boot/efi/EFI/BOOT/bootx64_original.efi ]]; then - # We interpret this as apple-set-os-loader being already installed - exit 0 - elif [[ -e /boot/efi/EFI/BOOT/BOOTX64.EFI ]] then - mv /boot/efi/EFI/BOOT/BOOTX64.EFI /boot/efi/EFI/BOOT/bootx64_original.efi - cp ${apple-set-os-loader-installer}/bootx64.efi /boot/efi/EFI/BOOT/bootx64.efi - else - echo "Error: /boot/efi/EFI/BOOT/BOOTX64.EFI is missing" - fi - ''; - }; - environment.etc."modprobe.d/apple-gmux.conf".text = '' - # Enable the iGPU by default if present - options apple-gmux force_igd=y - ''; - environment.systemPackages = with pkgs; [ apple-set-os-loader-installer ]; -} diff --git a/apple/t2/default.nix b/apple/t2/default.nix index df62afc2..f271f15c 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ config, lib, pkgs, ... }: let audioFiles = pkgs.fetchFromGitHub { @@ -11,45 +11,85 @@ let overrideAudioFiles = package: pluginsPath: package.overrideAttrs (new: old: { preConfigurePhases = old.preConfigurePhases or [ ] ++ [ "postPatchPhase" ]; - postPatchPhase = '' cp -r ${audioFiles}/files/{profile-sets,paths} ${pluginsPath}/alsa/mixer/ ''; }); + + pipewirePackage = overrideAudioFiles pkgs.pipewire "spa/plugins/"; + + apple-set-os-loader-installer = pkgs.stdenv.mkDerivation rec { + name = "apple-set-os-loader-installer-1.0"; + src = pkgs.fetchFromGitHub { + owner = "Redecorating"; + repo = "apple_set_os-loader"; + rev = "r33.9856dc4"; + sha256 = "hvwqfoF989PfDRrwU0BMi69nFjPeOmSaD6vR6jIRK2Y="; + }; + buildInputs = [ pkgs.gnu-efi ]; + buildPhase = '' + substituteInPlace Makefile --replace "/usr" '$(GNU_EFI)' + export GNU_EFI=${pkgs.gnu-efi} + make + ''; + installPhase = '' + install -D bootx64_silent.efi $out/bootx64.efi + ''; + }; + + t2Cfg = config.appleT2Config; + in { - # For keyboard and touchbar - boot.kernelPackages = with pkgs; recurseIntoAttrs (linuxPackagesFor (callPackage ./pkgs/linux-t2.nix { })); - boot.initrd.kernelModules = [ "apple-bce" ]; - - # For audio - boot.kernelParams = [ "pcie_ports=compat" "intel_iommu=on" "iommu=pt" ]; - services.udev.extraRules = builtins.readFile (pkgs.substitute { - src = "${audioFiles}/files/91-audio-custom.rules"; - replacements = [ "--replace" "/usr/bin/sed" "${pkgs.gnused}/bin/sed" ]; - }); - - hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/"; - - services.pipewire = rec { - package = overrideAudioFiles pkgs.pipewire "spa/plugins/"; - - wireplumber.package = pkgs.wireplumber.override { - pipewire = package; + options = { + appleT2Config.enableAppleSetOsLoader = lib.mkOption { + default = false; + type = lib.types.bool; + description = "Whether to enable the appleSetOsLoader activation script."; }; }; - # Make sure post-resume.service exists - powerManagement.enable = true; + config = { + # For keyboard and touchbar + boot.kernelPackages = with pkgs; recurseIntoAttrs (linuxPackagesFor (callPackage ./pkgs/linux-t2.nix { })); + boot.initrd.kernelModules = [ "apple-bce" ]; - systemd.services.fix-keyboard-backlight-and-touchbar = { - path = [ pkgs.kmod ]; - serviceConfig.ExecStart = ''${pkgs.systemd}/bin/systemd-inhibit --what=sleep --why="fixing keyboard backlight and touchbar must finish before sleep" --mode=delay ${./fix-keyboard-backlight-and-touchbar.sh}''; - serviceConfig.Type = "oneshot"; - description = "reload touchbar driver and restart upower"; - # must run at boot (and not too early), and after suspend - wantedBy = [ "display-manager.service" "post-resume.target" ]; - # prevent running before suspend - after = [ "post-resume.target" ]; + # For audio + boot.kernelParams = [ "pcie_ports=compat" "intel_iommu=on" "iommu=pt" ]; + services.udev.extraRules = builtins.readFile (pkgs.substitute { + src = "${audioFiles}/files/91-audio-custom.rules"; + replacements = [ "--replace" "/usr/bin/sed" "${pkgs.gnused}/bin/sed" ]; + }); + + hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/"; + + services.pipewire.package = pipewirePackage; + services.pipewire.wireplumber.package = pkgs.wireplumber.override { + pipewire = pipewirePackage; + }; + + # Make sure post-resume.service exists + powerManagement.enable = true; + + systemd.services.fix-keyboard-backlight-and-touchbar = { + path = [ pkgs.kmod ]; + serviceConfig.ExecStart = ''${pkgs.systemd}/bin/systemd-inhibit --what=sleep --why="fixing keyboard backlight and touchbar must finish before sleep" --mode=delay ${./fix-keyboard-backlight-and-touchbar.sh}''; + serviceConfig.Type = "oneshot"; + description = "reload touchbar driver and restart upower"; + wantedBy = [ "display-manager.service" "post-resume.target" ]; + after = [ "post-resume.target" ]; + }; + + # Activation script to install apple-set-os-loader in order to unlock the iGPU + system.activationScripts.appleSetOsLoader = lib.optionalString t2Cfg.enableAppleSetOsLoader '' + if [[ -e /boot/efi/EFI/BOOT/bootx64_original.efi ]]; then + true # It's already installed, no action required + elif [[ -e /boot/efi/EFI/BOOT/BOOTX64.EFI ]]; then + mv /boot/efi/EFI/BOOT/BOOTX64.EFI /boot/efi/EFI/BOOT/bootx64_original.efi + cp ${apple-set-os-loader-installer}/bootx64.efi /boot/efi/EFI/BOOT/bootx64.efi + else + echo "Error: /boot/efi/EFI/BOOT/BOOTX64.EFI is missing" >&2 + fi + ''; }; } From 5dbebb7cfac62acb2a22ebbe91625c3a284bd6fa Mon Sep 17 00:00:00 2001 From: Olof Sandell <83674246+osandell@users.noreply.github.com> Date: Fri, 8 Sep 2023 23:42:32 +0200 Subject: [PATCH 0551/1476] feat: copy bootloader to temp location This is a precaution to make sure we have enough disk space before renaming original bootloader. --- apple/t2/default.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/apple/t2/default.nix b/apple/t2/default.nix index f271f15c..e386ce3f 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -80,15 +80,21 @@ in after = [ "post-resume.target" ]; }; - # Activation script to install apple-set-os-loader in order to unlock the iGPU + # Activation script to install apple-set-os-loader in order to unlock the iGPU system.activationScripts.appleSetOsLoader = lib.optionalString t2Cfg.enableAppleSetOsLoader '' - if [[ -e /boot/efi/EFI/BOOT/bootx64_original.efi ]]; then + if [[ -e /boot/efi/efi/boot/bootx64_original.efi ]]; then true # It's already installed, no action required - elif [[ -e /boot/efi/EFI/BOOT/BOOTX64.EFI ]]; then - mv /boot/efi/EFI/BOOT/BOOTX64.EFI /boot/efi/EFI/BOOT/bootx64_original.efi - cp ${apple-set-os-loader-installer}/bootx64.efi /boot/efi/EFI/BOOT/bootx64.efi + elif [[ -e /boot/efi/efi/boot/bootx64.efi ]]; then + # Copy the new bootloader to a temporary location + cp ${apple-set-os-loader-installer}/bootx64.efi /boot/efi/efi/boot/bootx64_temp.efi + + # Rename the original bootloader + mv /boot/efi/efi/boot/bootx64.efi /boot/efi/efi/boot/bootx64_original.efi + + # Move the new bootloader to the final destination + mv /boot/efi/efi/boot/bootx64_temp.efi /boot/efi/efi/boot/bootx64.efi else - echo "Error: /boot/efi/EFI/BOOT/BOOTX64.EFI is missing" >&2 + echo "Error: /boot/efi/efi/boot/bootx64.efi is missing" >&2 fi ''; }; From 5e6fa0d4ae6e8e3d2bdba3798911fc001d85f7cc Mon Sep 17 00:00:00 2001 From: Olof Sandell <83674246+osandell@users.noreply.github.com> Date: Sat, 9 Sep 2023 01:37:04 +0200 Subject: [PATCH 0552/1476] feature: enable the iGPU by default --- apple/t2/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apple/t2/default.nix b/apple/t2/default.nix index e386ce3f..739b1949 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -97,5 +97,10 @@ in echo "Error: /boot/efi/efi/boot/bootx64.efi is missing" >&2 fi ''; + + # Enable the iGPU by default if present + environment.etc."modprobe.d/apple-gmux.conf".text = lib.optionalString t2Cfg.enableAppleSetOsLoader '' + options apple-gmux force_igd=y + ''; }; } From c49c1210d664de999fe210e95c6e83cbfb8bbbc8 Mon Sep 17 00:00:00 2001 From: Olof Sandell <83674246+osandell@users.noreply.github.com> Date: Sat, 9 Sep 2023 01:57:41 +0200 Subject: [PATCH 0553/1476] docs: add info about the default enabling --- apple/t2/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/apple/t2/README.md b/apple/t2/README.md index e4a2004a..2ae733aa 100644 --- a/apple/t2/README.md +++ b/apple/t2/README.md @@ -19,6 +19,7 @@ Upon activation, this module performs the following: - Renames the existing `BOOTX64.EFI` file to `bootx64_original.efi`. - Installs the `apple-set-os-loader` hook in its place as `bootx64.efi`. - Before the system boots the hook unlocks the iGPU and subsequently calls the original `bootx64_original.efi`. +- Enables the iGPU by default. ### How to Implement: From e158702cb8e39dc484c594a8bd733ca623f3309c Mon Sep 17 00:00:00 2001 From: Olof Sandell <83674246+osandell@users.noreply.github.com> Date: Mon, 11 Sep 2023 22:45:11 +0200 Subject: [PATCH 0554/1476] refactor: use nixpkgs naming conventions --- apple/t2/README.md | 2 +- apple/t2/default.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apple/t2/README.md b/apple/t2/README.md index 2ae733aa..44423955 100644 --- a/apple/t2/README.md +++ b/apple/t2/README.md @@ -25,7 +25,7 @@ Upon activation, this module performs the following: 1. Add this into your `configuration.nix`: ``` -appleT2Config.enableAppleSetOsLoader = true; +hardware.apple-t2.enableAppleSetOsLoader = true; ``` 2. **Rebuild your system**: diff --git a/apple/t2/default.nix b/apple/t2/default.nix index 739b1949..359748a4 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -37,12 +37,12 @@ let ''; }; - t2Cfg = config.appleT2Config; + t2Cfg = config.hardware.apple-t2; in { options = { - appleT2Config.enableAppleSetOsLoader = lib.mkOption { + hardware.apple-t2.enableAppleSetOsLoader = lib.mkOption { default = false; type = lib.types.bool; description = "Whether to enable the appleSetOsLoader activation script."; From 3ccd87fcdae4732fe33773cefa4375c641a057e7 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 11 Sep 2023 19:33:22 -0400 Subject: [PATCH 0555/1476] starfive visionfive2: update u-boot to SDK version v3.6.1 --- starfive/visionfive/v2/uboot.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/starfive/visionfive/v2/uboot.nix b/starfive/visionfive/v2/uboot.nix index 39066910..9beb5b2c 100644 --- a/starfive/visionfive/v2/uboot.nix +++ b/starfive/visionfive/v2/uboot.nix @@ -1,13 +1,13 @@ { fetchFromGitHub, buildUBoot }: buildUBoot rec { - version = "3.0.4"; + version = "3.6.1"; src = fetchFromGitHub { owner = "starfive-tech"; repo = "u-boot"; rev = "refs/tags/VF2_v${version}"; - hash = "sha256-Vd8vhSZE9fJ+Gp5IbLlqz7JAT9ChJ66krxb7gpLJ4P8="; + hash = "sha256-735V8HMCGKj13cgQJv7FYrBIF3mYWOrmJhr+46nsVuY="; }; defconfig = "starfive_visionfive2_defconfig"; From 16b8c06fd3d20dc52f867d44a3bf1aa75d911c7f Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Thu, 14 Sep 2023 10:39:11 +0200 Subject: [PATCH 0556/1476] star64: add mmc firmware updater And make the sd one actually write to the sd --- pine64/star64/README.md | 18 ++++++++++++++++++ pine64/star64/firmware.nix | 12 ++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/pine64/star64/README.md b/pine64/star64/README.md index 08b6d364..f74da945 100644 --- a/pine64/star64/README.md +++ b/pine64/star64/README.md @@ -83,6 +83,24 @@ hardware.deviceTree.overlays = [{ # Updating the bootloader +## eMMC + +Install the firmware update script + +``` nix +environment.systemPackages = [ + (pkgs.callPackage + "${nixos-hardware}/pine64/star64/firmware.nix" + { }).updater-mmc +]; +``` + +Then run as root + +``` sh +star64-firmware-update-mmc +``` + ## SD-Card Install the firmware update script diff --git a/pine64/star64/firmware.nix b/pine64/star64/firmware.nix index b1b76c8b..c300de49 100644 --- a/pine64/star64/firmware.nix +++ b/pine64/star64/firmware.nix @@ -67,12 +67,20 @@ in rec { flashcp -v ${uboot-fit-image}/share/pine64-star64/star64_fw_payload.img /dev/mtd1 ''; }; - updater-sd = writeShellApplication { - name = "star64-firmware-update-sd"; + updater-mmc = writeShellApplication { + name = "star64-firmware-update-mmc"; runtimeInputs = [ ]; text = '' dd if=${spl}/share/pine64-star64/spl.bin of=/dev/mmcblk0p1 conv=fsync dd if=${uboot-fit-image}/share/pine64-star64/star64_fw_payload.img of=/dev/mmcblk0p2 conv=fsync ''; }; + updater-sd = writeShellApplication { + name = "star64-firmware-update-sd"; + runtimeInputs = [ ]; + text = '' + dd if=${spl}/share/pine64-star64/spl.bin of=/dev/mmcblk1p1 conv=fsync + dd if=${uboot-fit-image}/share/pine64-star64/star64_fw_payload.img of=/dev/mmcblk1p2 conv=fsync + ''; + }; } From 850b04d59cbc003158b5258932dab6e26ed0b388 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Thu, 14 Sep 2023 10:52:01 +0200 Subject: [PATCH 0557/1476] star64: use stable opensbi release Same as 7f1836531b126cfcf584e7d7d71bf8758bb58969 --- pine64/star64/opensbi.nix | 48 ++++++++------------------------------- 1 file changed, 10 insertions(+), 38 deletions(-) diff --git a/pine64/star64/opensbi.nix b/pine64/star64/opensbi.nix index 96fdb8e4..5b46fec6 100644 --- a/pine64/star64/opensbi.nix +++ b/pine64/star64/opensbi.nix @@ -1,42 +1,14 @@ -{ lib -, stdenv -, fetchFromGitHub -, python3 -, withPlatform ? "generic" -, withPayload ? null -, withFDT ? null -}: +{ opensbi, withPayload, withFDT }: -stdenv.mkDerivation rec { - pname = "opensbi"; - version = "1.3-git-2868f26"; - - src = fetchFromGitHub { - owner = "riscv-software-src"; - repo = "opensbi"; - rev = "2868f26131308ff345382084681ea89c5b0159f1"; - hash = "sha256-E+nVFLSpH6lQ2nVmMlVRTr7qYRVY0ULW7gUvAyTr90I="; - }; - - postPatch = '' - patchShebangs ./scripts - ''; - - nativeBuildInputs = [ python3 ]; - - installFlags = [ - "I=$(out)" - ]; - - makeFlags = [ - "PLATFORM=${withPlatform}" +(opensbi.override { + inherit withPayload withFDT; +}).overrideAttrs (attrs: { + makeFlags = attrs.makeFlags ++ [ + # opensbi generic platform default FW_TEXT_START is 0x80000000 + # For JH7110, need to specify the FW_TEXT_START to 0x40000000 + # Otherwise, the fw_payload.bin downloading via jtag will not run. + # https://github.com/starfive-tech/VisionFive2/blob/7733673d27052dc5a48f1cb1d060279dfa3f0241/Makefile#L274 "FW_TEXT_START=0x40000000" - ] ++ lib.optionals (withPayload != null) [ - "FW_PAYLOAD_PATH=${withPayload}" - ] ++ lib.optionals (withFDT != null) [ - "FW_FDT_PATH=${withFDT}" ]; +}) - dontStrip = true; - dontPatchELF = true; -} From 570256327eb6ca6f7bebe8d93af49459092a0c43 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Thu, 14 Sep 2023 17:12:29 +0200 Subject: [PATCH 0558/1476] star64: fix boot from eMMC --- pine64/star64/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pine64/star64/default.nix b/pine64/star64/default.nix index e83a2f5b..27313321 100644 --- a/pine64/star64/default.nix +++ b/pine64/star64/default.nix @@ -22,7 +22,12 @@ kernelParams = lib.mkDefault [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ]; - initrd.availableKernelModules = [ "dw_mmc_starfive" ]; + initrd.availableKernelModules = [ + "8250_dw" # serial port driver + "dw_mmc_starfive" # eMMC/SD + "i2c_designware_platform" # i2c (needed for GPIO -> eMMC RST) + "axp15060_regulator" # PMIC (needed for eMMC) + ]; # Ethernet. The module gets forced m due to other modules even though # it's marked y in defconfig. From b0f82bcf524924fa9672be7f81292731d7d8c133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 18 Sep 2023 10:56:21 +0200 Subject: [PATCH 0559/1476] replace bors with mergify bors no longer works for merge queues. --- .mergify.yml | 16 ++++++++++++++++ bors.toml | 2 -- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .mergify.yml delete mode 100644 bors.toml diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 00000000..fe7af7ff --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,16 @@ +queue_rules: + - name: default + merge_conditions: + - check-success=tests +defaults: + actions: + queue: + allow_merging_configuration_change: true + method: rebase +pull_request_rules: + - name: merge using the merge queue + conditions: + - base=master + - label~=merge-queue|dependencies + actions: + queue: {} diff --git a/bors.toml b/bors.toml deleted file mode 100644 index b750afae..00000000 --- a/bors.toml +++ /dev/null @@ -1,2 +0,0 @@ -cut_body_after = "" # don't include text from the PR body in the merge commit message -status = [ "tests" ] From 77d8ac78a61d499b9675268bf55481a8c48f0579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 18 Sep 2023 11:10:13 +0200 Subject: [PATCH 0560/1476] build-profile: also accept nvidia license There seems to be recursive dependencies between adding video drivers and checking if the unfree flag is set. --- tests/build-profile.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/build-profile.nix b/tests/build-profile.nix index b28d9521..96392a8d 100644 --- a/tests/build-profile.nix +++ b/tests/build-profile.nix @@ -14,6 +14,7 @@ let nixpkgs.config = { allowBroken = true; allowUnfree = true; + nvidia.acceptLicense = true; }; }; in (import { From 55fc5e69cb1f2d9a6981aff0d18176af45215199 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sun, 17 Sep 2023 14:19:30 +0200 Subject: [PATCH 0561/1476] surface: linux 6.4.14 -> 6.4.16 --- microsoft/surface/common/default.nix | 2 +- microsoft/surface/common/kernel/default.nix | 2 +- .../kernel/{linux-6.4.14 => linux-6.4.16}/default.nix | 8 ++++---- .../kernel/{linux-6.4.14 => linux-6.4.16}/patches.nix | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename microsoft/surface/common/kernel/{linux-6.4.14 => linux-6.4.16}/default.nix (80%) rename microsoft/surface/common/kernel/{linux-6.4.14 => linux-6.4.16}/patches.nix (100%) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index eceba756..69e0d693 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.4.14"; + microsoft-surface.kernelVersion = mkDefault "6.4.16"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index c625815a..5f3a9a53 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -8,7 +8,7 @@ in { ./linux-5.19.17 ./linux-6.0.17 ./linux-6.1.18 - ./linux-6.4.14 + ./linux-6.4.16 ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.4.14/default.nix b/microsoft/surface/common/kernel/linux-6.4.16/default.nix similarity index 80% rename from microsoft/surface/common/kernel/linux-6.4.14/default.nix rename to microsoft/surface/common/kernel/linux-6.4.16/default.nix index ae75c946..abdcf740 100644 --- a/microsoft/surface/common/kernel/linux-6.4.14/default.nix +++ b/microsoft/surface/common/kernel/linux-6.4.16/default.nix @@ -8,7 +8,7 @@ let cfg = config.microsoft-surface; - version = "6.4.14"; + version = "6.4.16"; extraMeta.branch = "6.4"; patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; kernelPatches = pkgs.callPackage ./patches.nix { @@ -20,17 +20,17 @@ let inherit version extraMeta kernelPatches; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "1rjh0jrn5qvxwzmyg478n08vckkld8r52nkc102ppqvsfhiy7skm"; + sha256 = "0zgj1z97jyx7wf12zrnlcp0mj4cl43ais9qsy6dh1jwylf2fq9ln"; }; }; in { options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ "6.4.14" ]; + type = types.enum [ "6.4.16" ]; }; - config = mkIf (cfg.kernelVersion == "6.4.14") { + config = mkIf (cfg.kernelVersion == "6.4.16") { boot = { inherit kernelPackages; }; diff --git a/microsoft/surface/common/kernel/linux-6.4.14/patches.nix b/microsoft/surface/common/kernel/linux-6.4.16/patches.nix similarity index 100% rename from microsoft/surface/common/kernel/linux-6.4.14/patches.nix rename to microsoft/surface/common/kernel/linux-6.4.16/patches.nix From 455453f48d9ce7e09c69d722081691550d3d79ed Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sun, 17 Sep 2023 16:30:06 +0200 Subject: [PATCH 0562/1476] surface: linux 6.1.18 -> 6.1.53 --- microsoft/surface/common/kernel/default.nix | 2 +- .../kernel/{linux-6.1.18 => linux-6.1.53}/default.nix | 8 ++++---- .../kernel/{linux-6.1.18 => linux-6.1.53}/patches.nix | 0 microsoft/surface/surface-go/default.nix | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename microsoft/surface/common/kernel/{linux-6.1.18 => linux-6.1.53}/default.nix (80%) rename microsoft/surface/common/kernel/{linux-6.1.18 => linux-6.1.53}/patches.nix (100%) diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index 5f3a9a53..e592e442 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -7,7 +7,7 @@ in { imports = [ ./linux-5.19.17 ./linux-6.0.17 - ./linux-6.1.18 + ./linux-6.1.53 ./linux-6.4.16 ]; diff --git a/microsoft/surface/common/kernel/linux-6.1.18/default.nix b/microsoft/surface/common/kernel/linux-6.1.53/default.nix similarity index 80% rename from microsoft/surface/common/kernel/linux-6.1.18/default.nix rename to microsoft/surface/common/kernel/linux-6.1.53/default.nix index cbf228d6..4df03fa9 100644 --- a/microsoft/surface/common/kernel/linux-6.1.18/default.nix +++ b/microsoft/surface/common/kernel/linux-6.1.53/default.nix @@ -8,7 +8,7 @@ let cfg = config.microsoft-surface; - version = "6.1.18"; + version = "6.1.53"; extraMeta.branch = "6.1"; patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; kernelPatches = pkgs.callPackage ./patches.nix { @@ -20,17 +20,17 @@ let inherit version extraMeta kernelPatches; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "sha256-hCrBXv8Ob7DBUP34P09qr2tMEjnc+MFOIidiDsCuFB4="; + sha256 = "0zpdg3fcc12iyjhfs5w7cw75700z4i8m9jcg38mlzlhh92hf0msz"; }; }; in { options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ "6.1.18" ]; + type = types.enum [ "6.1.53" ]; }; - config = mkIf (cfg.kernelVersion == "6.1.18") { + config = mkIf (cfg.kernelVersion == "6.1.53") { boot = { inherit kernelPackages; }; diff --git a/microsoft/surface/common/kernel/linux-6.1.18/patches.nix b/microsoft/surface/common/kernel/linux-6.1.53/patches.nix similarity index 100% rename from microsoft/surface/common/kernel/linux-6.1.18/patches.nix rename to microsoft/surface/common/kernel/linux-6.1.53/patches.nix diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix index b4f990e3..361a83c8 100644 --- a/microsoft/surface/surface-go/default.nix +++ b/microsoft/surface/surface-go/default.nix @@ -17,7 +17,7 @@ in { ../../../common/cpu/intel/kaby-lake ]; - microsoft-surface.kernelVersion = "6.1.18"; + microsoft-surface.kernelVersion = "6.1.53"; boot.kernelParams = [ "i915.enable_rc6=1" From 0cc0f9721256dfbbac57b0479d4f28ea1ec812e9 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sun, 17 Sep 2023 16:31:27 +0200 Subject: [PATCH 0563/1476] surface: cleanup, remove linux 5.19.17 and 6.0.17 --- microsoft/surface/common/kernel/default.nix | 2 - .../common/kernel/linux-5.19.17/default.nix | 37 ------ .../common/kernel/linux-5.19.17/patches.nix | 123 ------------------ .../common/kernel/linux-6.0.17/default.nix | 38 ------ .../common/kernel/linux-6.0.17/patches.nix | 122 ----------------- 5 files changed, 322 deletions(-) delete mode 100644 microsoft/surface/common/kernel/linux-5.19.17/default.nix delete mode 100644 microsoft/surface/common/kernel/linux-5.19.17/patches.nix delete mode 100644 microsoft/surface/common/kernel/linux-6.0.17/default.nix delete mode 100644 microsoft/surface/common/kernel/linux-6.0.17/patches.nix diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index e592e442..37ecaec3 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -5,8 +5,6 @@ let in { imports = [ - ./linux-5.19.17 - ./linux-6.0.17 ./linux-6.1.53 ./linux-6.4.16 ]; diff --git a/microsoft/surface/common/kernel/linux-5.19.17/default.nix b/microsoft/surface/common/kernel/linux-5.19.17/default.nix deleted file mode 100644 index 6cc1830b..00000000 --- a/microsoft/surface/common/kernel/linux-5.19.17/default.nix +++ /dev/null @@ -1,37 +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 = "5.19.17"; - extraMeta.branch = "5.19"; - patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; - kernelPatches = pkgs.callPackage ./patches.nix { - inherit (lib) kernel; - inherit version patchDir; - }; - - kernelPackages = linuxPackage { - inherit version extraMeta kernelPatches; - src = fetchurl { - url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "sha256-yTuzhKl60fCk8Y5ELOApEkJyL3gCPspliyI0RUHwlIk="; - }; - }; - -in { - options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ "5.19.17" ]; - }; - - config = mkIf (cfg.kernelVersion == "5.19.17") { - boot = { - inherit kernelPackages; - }; - }; -} diff --git a/microsoft/surface/common/kernel/linux-5.19.17/patches.nix b/microsoft/surface/common/kernel/linux-5.19.17/patches.nix deleted file mode 100644 index 86a71415..00000000 --- a/microsoft/surface/common/kernel/linux-5.19.17/patches.nix +++ /dev/null @@ -1,123 +0,0 @@ -{ kernel, - patchDir, - version, -}: - -[ - { - name = "microsoft-surface-patches-linux-${version}"; - patch = null; - structuredExtraConfig = with kernel; { - # - # Surface Aggregator Module - # - SURFACE_AGGREGATOR = module; - SURFACE_AGGREGATOR_ERROR_INJECTION = no; - SURFACE_AGGREGATOR_BUS = yes; - SURFACE_AGGREGATOR_CDEV = module; - SURFACE_AGGREGATOR_REGISTRY = 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 laptop 1 keyboard - # - SERIAL_DEV_BUS = yes; - SERIAL_DEV_CTRL_TTYPORT = yes; - - # - # Surface Hotplug - # - SURFACE_HOTPLUG = 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_IPU3_IMGU = module; - VIDEO_IPU3_CIO2 = module; - CIO2_BRIDGE = yes; - INTEL_SKL_INT3472 = module; - - # - # Cameras: Sensor drivers - # - VIDEO_OV5693 = 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_BUTTON = 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-surface-sam"; - patch = patchDir + "/0005-surface-sam.patch"; - } - { - name = "ms-surface/0006-surface-sam-over-hid"; - patch = patchDir + "/0006-surface-sam-over-hid.patch"; - } - { - name = "ms-surface/0007-surface-button"; - patch = patchDir + "/0007-surface-button.patch"; - } - { - name = "ms-surface/0008-surface-typecover"; - patch = patchDir + "/0008-surface-typecover.patch"; - } - { - name = "ms-surface/0009-surface-gpe"; - patch = patchDir + "/0009-surface-gpe.patch"; - } - { - name = "ms-surface/0010-cameras"; - patch = patchDir + "/0010-cameras.patch"; - } - { - name = "ms-surface/0011-amd-gpio"; - patch = patchDir + "/0011-amd-gpio.patch"; - } -] diff --git a/microsoft/surface/common/kernel/linux-6.0.17/default.nix b/microsoft/surface/common/kernel/linux-6.0.17/default.nix deleted file mode 100644 index 51960650..00000000 --- a/microsoft/surface/common/kernel/linux-6.0.17/default.nix +++ /dev/null @@ -1,38 +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.0.17"; - extraMeta.branch = "6.0"; - patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; - kernelPatches = pkgs.callPackage ./patches.nix { - inherit (lib) kernel; - inherit version patchDir; - }; - - kernelPackages = linuxPackage { - inherit version extraMeta kernelPatches; - src = fetchurl { - url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "sha256-p+6SCSpUWbtGq/C1RJpOV+i3klkaxOesBO0lQtLOHQg="; - }; - }; - - -in { - options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ "6.0.17" ]; - }; - - config = mkIf (cfg.kernelVersion == "6.0.17") { - boot = { - inherit kernelPackages; - }; - }; -} diff --git a/microsoft/surface/common/kernel/linux-6.0.17/patches.nix b/microsoft/surface/common/kernel/linux-6.0.17/patches.nix deleted file mode 100644 index f0ba2c9c..00000000 --- a/microsoft/surface/common/kernel/linux-6.0.17/patches.nix +++ /dev/null @@ -1,122 +0,0 @@ -{ kernel, - patchDir, - version, -}: - -[ - { - name = "microsoft-surface-patches-linux-${version}"; - patch = null; - structuredExtraConfig = with kernel; { - # - # 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; - - # - # 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-surface-sam"; - patch = patchDir + "/0005-surface-sam.patch"; - } - { - name = "ms-surface/0006-surface-sam-over-hid"; - patch = patchDir + "/0006-surface-sam-over-hid.patch"; - } - { - name = "ms-surface/0007-surface-button"; - patch = patchDir + "/0007-surface-button.patch"; - } - { - name = "ms-surface/0008-surface-typecover"; - patch = patchDir + "/0008-surface-typecover.patch"; - } - { - name = "ms-surface/0009-cameras"; - patch = patchDir + "/0009-cameras.patch"; - } - { - name = "ms-surface/0010-amd-gpio"; - patch = patchDir + "/0010-amd-gpio.patch"; - } - { - name = "ms-surface/0011-rtc"; - patch = patchDir + "/0011-rtc.patch"; - } -] From 504893e09108db7a0dfca0c3fab6f22476a8f4b3 Mon Sep 17 00:00:00 2001 From: Guanran928 <68757440+Guanran928@users.noreply.github.com> Date: Sun, 17 Sep 2023 13:06:35 -0600 Subject: [PATCH 0564/1476] chore: replace writeShellScriptBin in prime.nix with enableOffloadCmd introduced in this commit: https://github.com/NixOS/nixpkgs/commit/2a7130d13a032093f5394ef0961842d1e1928789 --- common/gpu/nvidia/prime.nix | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/common/gpu/nvidia/prime.nix b/common/gpu/nvidia/prime.nix index d2ba65b0..c5513897 100644 --- a/common/gpu/nvidia/prime.nix +++ b/common/gpu/nvidia/prime.nix @@ -1,22 +1,13 @@ { lib, pkgs, ... }: -# This creates a new 'nvidia-offload' program that runs the application passed to it on the GPU -# As per https://nixos.wiki/wiki/Nvidia -let - nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" '' - export __NV_PRIME_RENDER_OFFLOAD=1 - export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 - export __GLX_VENDOR_LIBRARY_NAME=nvidia - export __VK_LAYER_NV_optimus=NVIDIA_only - exec "$@" - ''; -in { +{ imports = [ ./. ]; - environment.systemPackages = [ nvidia-offload ]; - hardware.nvidia.prime = { - offload.enable = lib.mkOverride 990 true; + offload = { + enable = lib.mkOverride 990 true; + enableOffloadCmd = true; # Provides `nvidia-offload` command. + }; # Hardware should specify the bus ID for intel/nvidia devices }; } From d53069def4fb2d92da1ec062b583c088426dc61a Mon Sep 17 00:00:00 2001 From: Guanran928 <68757440+Guanran928@users.noreply.github.com> Date: Sun, 17 Sep 2023 13:52:47 -0600 Subject: [PATCH 0565/1476] fix: enable enableOffloadCmd in prime.nix only when offload is enabled --- common/gpu/nvidia/prime.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/gpu/nvidia/prime.nix b/common/gpu/nvidia/prime.nix index c5513897..371e9eb5 100644 --- a/common/gpu/nvidia/prime.nix +++ b/common/gpu/nvidia/prime.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, pkgs, config, ... }: { imports = [ ./. ]; @@ -6,7 +6,7 @@ hardware.nvidia.prime = { offload = { enable = lib.mkOverride 990 true; - enableOffloadCmd = true; # Provides `nvidia-offload` command. + enableOffloadCmd = lib.mkIf config.hardware.nvidia.prime.offload.enable true; # Provides `nvidia-offload` command. }; # Hardware should specify the bus ID for intel/nvidia devices }; From 161b027169b19d3a0ad6bd0a8948edf0c0fb0f64 Mon Sep 17 00:00:00 2001 From: Giorgio Gallo Date: Mon, 18 Sep 2023 12:33:00 +0200 Subject: [PATCH 0566/1476] Fix typo in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b6a16ddf..cdb3508e 100644 --- a/README.md +++ b/README.md @@ -215,7 +215,7 @@ See code for all available configurations. | [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | | [MSI GS60 2QE](msi/gs60) | `` | | [MSI GL62/CX62](msi/gl62) | `` | -| [Micrchip Icicle Kit](microchip/icicle-kit) | `` | +| [Microchip Icicle Kit](microchip/icicle-kit) | `` | | [Microsoft Surface Go](microsoft/surface/surface-go) | `` | | [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel)| ``| | [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd)| ``| From cf88c13ca636e7520bb6922cb31a800075657c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 19 Sep 2023 06:55:17 +0200 Subject: [PATCH 0567/1476] tests: set linux_latest as the default kernel --- tests/build-profile.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/build-profile.nix b/tests/build-profile.nix index 96392a8d..bdde5dfa 100644 --- a/tests/build-profile.nix +++ b/tests/build-profile.nix @@ -1,11 +1,15 @@ { profile }: let - shim = { config, ... }: { + shim = { config, lib, pkgs, ... }: { boot.loader.systemd-boot.enable = !config.boot.loader.generic-extlinux-compatible.enable && !config.boot.loader.raspberryPi.enable; # we forcefully disable grub here just for testing purposes, even though some profiles might still use grub in the end. boot.loader.grub.enable = false; + # so we can have assertions that require a certain minimum kernel version, + # We use a priority of 1200 here, which is higher than the default of 1000 + boot.kernelPackages = lib.mkOverride 1200 pkgs.linuxPackages_latest; + fileSystems."/" = { device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000"; fsType = "btrfs"; From f6bb34a52acbd78d34bea30bb1c8199d9b0d2bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 19 Sep 2023 07:29:42 +0200 Subject: [PATCH 0568/1476] only trigger ci on master branch and pull requests --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2c58edc7..37e2af70 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,6 +2,8 @@ name: "Test" on: pull_request: push: + branches: + - master jobs: tests: runs-on: ubuntu-latest From cb4dc98f776ddb6af165e6f06b2902efe31ca67a Mon Sep 17 00:00:00 2001 From: Alexandre Acebedo Date: Wed, 10 May 2023 20:06:27 +0200 Subject: [PATCH 0569/1476] asus-zephyrus-ga402: remove unused kernel parameter --- asus/zephyrus/ga402/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/asus/zephyrus/ga402/default.nix b/asus/zephyrus/ga402/default.nix index 7c11090e..2002fd09 100644 --- a/asus/zephyrus/ga402/default.nix +++ b/asus/zephyrus/ga402/default.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ lib, config, ... }: { imports = [ @@ -22,4 +22,11 @@ boot = { kernelParams = [ "pcie_aspm.policy=powersupersave" ]; }; + + assertions = [ + { + assertion = (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2"); + message = "The ga402 requires kernel version >=6.2 to ensure that fans are correctly managed. Please upgrade nixpkgs for this system."; + } + ]; } From 061785322d93f63b0fa4882ac92030008932a083 Mon Sep 17 00:00:00 2001 From: the-furry-hubofeverything <53921912+the-furry-hubofeverything@users.noreply.github.com> Date: Wed, 20 Sep 2023 03:32:40 -0700 Subject: [PATCH 0570/1476] Add Omen 15-en0010ca --- README.md | 1 + flake.nix | 1 + omen/15-en0010ca/README.md | 6 ++++++ omen/15-en0010ca/default.nix | 22 ++++++++++++++++++++++ 4 files changed, 30 insertions(+) create mode 100644 omen/15-en0010ca/README.md create mode 100644 omen/15-en0010ca/default.nix diff --git a/README.md b/README.md index cdb3508e..068b4b10 100644 --- a/README.md +++ b/README.md @@ -224,6 +224,7 @@ See code for all available configurations. | [Morefine M600](morefine/m600) | `` | | [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | | [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | +| [Omen 15-en0010ca](omen/15-en0010ca) | `` | | [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | | [Panasonic Let's Note CF-LX4 ](panasonic/letsnote/cf-lx4) | `` | diff --git a/flake.nix b/flake.nix index cea62599..c927104f 100644 --- a/flake.nix +++ b/flake.nix @@ -164,6 +164,7 @@ nxp-imx8qm-mek = import ./nxp/imx8qm-mek; hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; hardkernel-odroid-h3 = import ./hardkernel/odroid-h3; + omen-15-en0010ca = import ./omen/15-en0010ca; omen-en00015p = import ./omen/en00015p; onenetbook-4 = import ./onenetbook/4; pcengines-apu = import ./pcengines/apu; diff --git a/omen/15-en0010ca/README.md b/omen/15-en0010ca/README.md new file mode 100644 index 00000000..f5a10bac --- /dev/null +++ b/omen/15-en0010ca/README.md @@ -0,0 +1,6 @@ +# HP Omen 15-en0001ca + +## ACPI platform profiles +This config enables `hp-wmi`, which allows switch between cool, balanced, and performance modes on the platform EC, used by power management tools like `power-profile-daemon` and `tlp`. + +Note - this is not yet compiled on Nixpkgs provided Kernels as of September 2023. See [the relevant PR](https://github.com/NixOS/nixpkgs/pull/255846). \ No newline at end of file diff --git a/omen/15-en0010ca/default.nix b/omen/15-en0010ca/default.nix new file mode 100644 index 00000000..a69ca78c --- /dev/null +++ b/omen/15-en0010ca/default.nix @@ -0,0 +1,22 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../common/cpu/amd + ../../common/gpu/amd + ../../common/gpu/nvidia/prime.nix + ../../common/pc/laptop + ../../common/pc/ssd + ]; + + # Enables ACPI platform profiles + # TODO - enable module after PR merge + # boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + # kernelModules = [ "hp-wmi" ]; + # }; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:7:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} From 08add92f1745edd3418b1ea017f8732735a9d9b9 Mon Sep 17 00:00:00 2001 From: the-furry-hubofeverything <53921912+the-furry-hubofeverything@users.noreply.github.com> Date: Sat, 23 Sep 2023 14:55:33 -0700 Subject: [PATCH 0571/1476] Enabling hp-wmi driver after PR merge nixos/nixpkgs#255846 --- omen/15-en0010ca/README.md | 4 +--- omen/15-en0010ca/default.nix | 7 +++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/omen/15-en0010ca/README.md b/omen/15-en0010ca/README.md index f5a10bac..fae3e0d5 100644 --- a/omen/15-en0010ca/README.md +++ b/omen/15-en0010ca/README.md @@ -1,6 +1,4 @@ # HP Omen 15-en0001ca ## ACPI platform profiles -This config enables `hp-wmi`, which allows switch between cool, balanced, and performance modes on the platform EC, used by power management tools like `power-profile-daemon` and `tlp`. - -Note - this is not yet compiled on Nixpkgs provided Kernels as of September 2023. See [the relevant PR](https://github.com/NixOS/nixpkgs/pull/255846). \ No newline at end of file +This config enables `hp-wmi`, which allows switch between cool, balanced, and performance modes on the platform EC, used by power management tools like `power-profile-daemon` and `tlp`. \ No newline at end of file diff --git a/omen/15-en0010ca/default.nix b/omen/15-en0010ca/default.nix index a69ca78c..de1eee23 100644 --- a/omen/15-en0010ca/default.nix +++ b/omen/15-en0010ca/default.nix @@ -10,10 +10,9 @@ ]; # Enables ACPI platform profiles - # TODO - enable module after PR merge - # boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { - # kernelModules = [ "hp-wmi" ]; - # }; + boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + kernelModules = [ "hp-wmi" ]; + }; hardware.nvidia.prime = { amdgpuBusId = "PCI:7:0:0"; From 61283b30d11f27d5b76439d43f20d0c0c8ff5296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Tue, 19 Sep 2023 17:41:41 +0200 Subject: [PATCH 0572/1476] framework/*: add fw-ectool for led control, etc This adds a patched ectool, to interact with the Embedded Controller Can be used to interact with leds from userspace, etc. Not part of a nixos release yet, so package only gets added if it exists. --- framework/12th-gen-intel/default.nix | 5 +++++ framework/default.nix | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/framework/12th-gen-intel/default.nix b/framework/12th-gen-intel/default.nix index 79336f6e..b07d2d5c 100644 --- a/framework/12th-gen-intel/default.nix +++ b/framework/12th-gen-intel/default.nix @@ -73,4 +73,9 @@ # Fix font sizes in X # services.xserver.dpi = 200; + + # This adds a patched ectool, to interact with the Embedded Controller + # Can be used to interact with leds from userspace, etc. + # Not part of a nixos release yet, so package only gets added if it exists. + environment.systemPackages = lib.optional (pkgs ? "fw-ectool") pkgs.fw-ectool; } diff --git a/framework/default.nix b/framework/default.nix index cb8cb958..a1eff2cd 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -45,4 +45,9 @@ # Fix font sizes in X # services.xserver.dpi = 200; + + # This adds a patched ectool, to interact with the Embedded Controller + # Can be used to interact with leds from userspace, etc. + # Not part of a nixos release yet, so package only gets added if it exists. + environment.systemPackages = lib.optional (pkgs ? "fw-ectool") pkgs.fw-ectool; } From 89ec952fd2a481461a86ad581fde2e730e5a951d Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Wed, 27 Sep 2023 12:44:29 -0500 Subject: [PATCH 0573/1476] chore: Add @emiller88 to CODEOWNERS for framework --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/CODEOWNERS b/CODEOWNERS index 83c7e64a..b5ee02ea 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -7,3 +7,4 @@ pcengines/apu @yegortimoshenko pine64/star64 @fgaz purism/librem/13v3 @yegortimoshenko system76/darp6 @khumba +framework @emiller88 From adcfd6aa860d1d129055039696bc457af7d50d0e Mon Sep 17 00:00:00 2001 From: Michael Stanley Date: Wed, 27 Sep 2023 21:16:18 -0400 Subject: [PATCH 0574/1476] Thinkpad X1 11th Gen: init --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/x1/11th-gen/default.nix | 9 +++++++++ 3 files changed, 11 insertions(+) create mode 100644 lenovo/thinkpad/x1/11th-gen/default.nix diff --git a/README.md b/README.md index 068b4b10..f735581e 100644 --- a/README.md +++ b/README.md @@ -196,6 +196,7 @@ See code for all available configurations. | [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | | [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | | [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `` | +| [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `` | | [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | | [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | | [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | diff --git a/flake.nix b/flake.nix index c927104f..36394274 100644 --- a/flake.nix +++ b/flake.nix @@ -132,6 +132,7 @@ lenovo-thinkpad-x1-7th-gen = import ./lenovo/thinkpad/x1/7th-gen; lenovo-thinkpad-x1-9th-gen = import ./lenovo/thinkpad/x1/9th-gen; lenovo-thinkpad-x1-10th-gen = import ./lenovo/thinkpad/x1/10th-gen; + lenovo-thinkpad-x1-11th-gen = import ./lenovo/thinkpad/x1/11th-gen; lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme; lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2; lenovo-thinkpad-x1-extreme-gen4 = import ./lenovo/thinkpad/x1-extreme/gen4; diff --git a/lenovo/thinkpad/x1/11th-gen/default.nix b/lenovo/thinkpad/x1/11th-gen/default.nix new file mode 100644 index 00000000..86c2992b --- /dev/null +++ b/lenovo/thinkpad/x1/11th-gen/default.nix @@ -0,0 +1,9 @@ +{ + imports = [ + ../. + ../../../../common/pc/laptop/ssd + ]; + + # Use the right Intel graphics driver + boot.kernelParams = [ "i915.force_probe=a7a1" ]; +} From 0ab3ee718e964fb42dc57ace6170f19cb0b66532 Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Fri, 29 Sep 2023 22:22:16 +1000 Subject: [PATCH 0575/1476] CODEOWNERS: add tomfitzhenry to Pine64 Pinebook Pro Prior contributions: * https://github.com/NixOS/nixos-hardware/pull/444 * https://github.com/NixOS/nixos-hardware/pull/445 * https://github.com/NixOS/nixos-hardware/pull/446 Pending contributions: * https://github.com/NixOS/nixos-hardware/pull/743 --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/CODEOWNERS b/CODEOWNERS index b5ee02ea..92186ff6 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -4,6 +4,7 @@ dell/xps/13-9380 @kalbasit lenovo/thinkpad/x230 @makefu @yegortimoshenko lenovo/thinkpad/x250 @Mic92 pcengines/apu @yegortimoshenko +pine64/pinebook-pro @tomfitzhenry pine64/star64 @fgaz purism/librem/13v3 @yegortimoshenko system76/darp6 @khumba From 89c6109adceb6fabf2ccda62ddfc4aa4fa19f25b Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Fri, 29 Sep 2023 11:42:48 +0200 Subject: [PATCH 0576/1476] star64: linux: 5.15.128 -> 5.15.131 --- pine64/star64/linux-5.15.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pine64/star64/linux-5.15.nix b/pine64/star64/linux-5.15.nix index be44f533..c6b0178e 100644 --- a/pine64/star64/linux-5.15.nix +++ b/pine64/star64/linux-5.15.nix @@ -1,7 +1,7 @@ { lib, callPackage, linuxPackagesFor, kernelPatches, fetchpatch, ... }: let - modDirVersion = "5.15.128"; + modDirVersion = "5.15.131"; linuxPkg = { lib, fetchFromGitHub, buildLinux, ... }@args: buildLinux (args // { version = "${modDirVersion}-fishwaldo-star64"; @@ -9,8 +9,8 @@ let src = fetchFromGitHub { owner = "Fishwaldo"; repo = "Star64_linux"; - rev = "e9ae40dd4b7eb2d5083e318ce65f81e8f01d8118"; # Star64_devel branch - hash = "sha256-jzF5NO/JAQxnaiQ79m6nws95jl17NBctWEa1MP4rimo="; + rev = "1456c984f15e21e28fb8a9ce96d0ca10e61a71c4"; # Star64_devel branch + hash = "sha256-I5wzmxiY7PWpahYCqTOAmYEiJvpRPpUV7S21Kn9lLwg="; }; inherit modDirVersion; From 6d05cccc80feaf93d5f3d6837f8c2db582b29cf8 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Sat, 30 Sep 2023 17:37:38 +0200 Subject: [PATCH 0577/1476] star64: set governor to schedutil By default it's "performance" --- pine64/star64/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pine64/star64/default.nix b/pine64/star64/default.nix index 27313321..ce7134bd 100644 --- a/pine64/star64/default.nix +++ b/pine64/star64/default.nix @@ -41,4 +41,8 @@ hardware.deviceTree.name = lib.mkDefault "starfive/jh7110-pine64-star64.dtb"; + + # Only "performance" and "schedutil" are available, + # and "performance" takes precedence by default, which is a waste of power. + powerManagement.cpuFreqGovernor = lib.mkDefault "schedutil"; } From ca0cd502fb5f00d6da1a0283faa2f76b78878791 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Thu, 5 Oct 2023 15:53:10 +0200 Subject: [PATCH 0578/1476] surface: linux 6.1.53 -> 6.1.55 --- microsoft/surface/common/kernel/default.nix | 2 +- .../kernel/{linux-6.1.53 => linux-6.1.55}/default.nix | 8 ++++---- .../kernel/{linux-6.1.53 => linux-6.1.55}/patches.nix | 0 3 files changed, 5 insertions(+), 5 deletions(-) rename microsoft/surface/common/kernel/{linux-6.1.53 => linux-6.1.55}/default.nix (80%) rename microsoft/surface/common/kernel/{linux-6.1.53 => linux-6.1.55}/patches.nix (100%) diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index 37ecaec3..b1352515 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -5,8 +5,8 @@ let in { imports = [ - ./linux-6.1.53 ./linux-6.4.16 + ./linux-6.1.55 ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.1.53/default.nix b/microsoft/surface/common/kernel/linux-6.1.55/default.nix similarity index 80% rename from microsoft/surface/common/kernel/linux-6.1.53/default.nix rename to microsoft/surface/common/kernel/linux-6.1.55/default.nix index 4df03fa9..7119a3d4 100644 --- a/microsoft/surface/common/kernel/linux-6.1.53/default.nix +++ b/microsoft/surface/common/kernel/linux-6.1.55/default.nix @@ -8,7 +8,7 @@ let cfg = config.microsoft-surface; - version = "6.1.53"; + version = "6.1.55"; extraMeta.branch = "6.1"; patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; kernelPatches = pkgs.callPackage ./patches.nix { @@ -20,17 +20,17 @@ let inherit version extraMeta kernelPatches; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "0zpdg3fcc12iyjhfs5w7cw75700z4i8m9jcg38mlzlhh92hf0msz"; + sha256 = "1h0mzx52q9pvdv7rhnvb8g68i7bnlc9rf8gy9qn4alsxq4g28zm8"; }; }; in { options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ "6.1.53" ]; + type = types.enum [ "6.1.55" ]; }; - config = mkIf (cfg.kernelVersion == "6.1.53") { + config = mkIf (cfg.kernelVersion == "6.1.55") { boot = { inherit kernelPackages; }; diff --git a/microsoft/surface/common/kernel/linux-6.1.53/patches.nix b/microsoft/surface/common/kernel/linux-6.1.55/patches.nix similarity index 100% rename from microsoft/surface/common/kernel/linux-6.1.53/patches.nix rename to microsoft/surface/common/kernel/linux-6.1.55/patches.nix From 3b14571fc964e5343fb876ea3615f189b3a840cb Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Thu, 5 Oct 2023 15:53:56 +0200 Subject: [PATCH 0579/1476] surface: linux-surface 32c55fe0 -> b82e8acd --- microsoft/surface/common/repos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 9e7bbbf3..99b660fd 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "32c55fe01ce62bf763181d06f0493c29e178cc62"; - hash = "sha256-oWZeHoLR3jSkMFfc36ikEwyFuXWzwXK/dC4sE98R0oc="; + rev = "b82e8acd3c015190423b114770b0e9fcc206dd2d"; + hash = "sha256-parp1F5fFzKkiM6ILK+ZolMdSwU1kLOOMvksSwE/zKA="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From afc5a2949bb79c43d06b0e8ff4679f408be85106 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Thu, 5 Oct 2023 15:55:13 +0200 Subject: [PATCH 0580/1476] surface: linux 6.4.16 -> 6.5.5 --- microsoft/surface/common/default.nix | 2 +- microsoft/surface/common/kernel/default.nix | 2 +- .../{linux-6.4.16 => linux-6.5.5}/default.nix | 10 +++--- .../{linux-6.4.16 => linux-6.5.5}/patches.nix | 36 ++++++++++--------- 4 files changed, 27 insertions(+), 23 deletions(-) rename microsoft/surface/common/kernel/{linux-6.4.16 => linux-6.5.5}/default.nix (77%) rename microsoft/surface/common/kernel/{linux-6.4.16 => linux-6.5.5}/patches.nix (73%) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 69e0d693..29ae5dce 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.4.16"; + microsoft-surface.kernelVersion = mkDefault "6.5.5"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index b1352515..0799b46a 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -5,8 +5,8 @@ let in { imports = [ - ./linux-6.4.16 ./linux-6.1.55 + ./linux-6.5.5 ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.4.16/default.nix b/microsoft/surface/common/kernel/linux-6.5.5/default.nix similarity index 77% rename from microsoft/surface/common/kernel/linux-6.4.16/default.nix rename to microsoft/surface/common/kernel/linux-6.5.5/default.nix index abdcf740..485063a7 100644 --- a/microsoft/surface/common/kernel/linux-6.4.16/default.nix +++ b/microsoft/surface/common/kernel/linux-6.5.5/default.nix @@ -8,8 +8,8 @@ let cfg = config.microsoft-surface; - version = "6.4.16"; - extraMeta.branch = "6.4"; + version = "6.5.5"; + extraMeta.branch = "6.5"; patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; kernelPatches = pkgs.callPackage ./patches.nix { inherit (lib) kernel; @@ -20,17 +20,17 @@ let inherit version extraMeta kernelPatches; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "0zgj1z97jyx7wf12zrnlcp0mj4cl43ais9qsy6dh1jwylf2fq9ln"; + sha256 = "15gg8sb6cfgk1afwj7fl7mj4nkj14w43vzwvw0qsg3nzyxwh7wcc"; }; }; in { options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ "6.4.16" ]; + type = types.enum [ "6.5.5" ]; }; - config = mkIf (cfg.kernelVersion == "6.4.16") { + config = mkIf (cfg.kernelVersion == "6.5.5") { boot = { inherit kernelPackages; }; diff --git a/microsoft/surface/common/kernel/linux-6.4.16/patches.nix b/microsoft/surface/common/kernel/linux-6.5.5/patches.nix similarity index 73% rename from microsoft/surface/common/kernel/linux-6.4.16/patches.nix rename to microsoft/surface/common/kernel/linux-6.5.5/patches.nix index 433ed153..d7b92895 100644 --- a/microsoft/surface/common/kernel/linux-6.4.16/patches.nix +++ b/microsoft/surface/common/kernel/linux-6.5.5/patches.nix @@ -104,35 +104,39 @@ patch = patchDir + "/0005-ithc.patch"; } { - name = "ms-surface/0006-surface-sam-over-hid"; - patch = patchDir + "/0006-surface-sam-over-hid.patch"; + name = "ms-surface/0006-surface-sam"; + patch = patchDir + "/0006-surface-sam.patch"; } { - name = "ms-surface/0007-surface-button"; - patch = patchDir + "/0007-surface-button.patch"; + name = "ms-surface/0007-surface-sam-over-hid"; + patch = patchDir + "/0007-surface-sam-over-hid.patch"; } { - name = "ms-surface/0008-surface-typecover"; - patch = patchDir + "/0008-surface-typecover.patch"; + name = "ms-surface/0008-surface-button"; + patch = patchDir + "/0008-surface-button.patch"; } { - name = "ms-surface/0009-surface-shutdown"; - patch = patchDir + "/0009-surface-shutdown.patch"; + name = "ms-surface/0009-surface-typecover"; + patch = patchDir + "/0009-surface-typecover.patch"; } { - name = "ms-surface/0010-surface-gpe"; - patch = patchDir + "/0010-surface-gpe.patch"; + name = "ms-surface/0010-surface-shutdown"; + patch = patchDir + "/0010-surface-shutdown.patch"; } { - name = "ms-surface/0011-cameras"; - patch = patchDir + "/0011-cameras.patch"; + name = "ms-surface/0011-surface-gpe"; + patch = patchDir + "/0011-surface-gpe.patch"; } { - name = "ms-surface/0012-amd-gpio"; - patch = patchDir + "/0012-amd-gpio.patch"; + name = "ms-surface/0012-cameras"; + patch = patchDir + "/0012-cameras.patch"; } { - name = "ms-surface/0013-rtc"; - patch = patchDir + "/0013-rtc.patch"; + name = "ms-surface/0013-amd-gpio"; + patch = patchDir + "/0013-amd-gpio.patch"; + } + { + name = "ms-surface/0014-rtc"; + patch = patchDir + "/0014-rtc.patch"; } ] From de516d0deebf2f8c8d607867b2a3f679e216c0b7 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Thu, 5 Oct 2023 18:51:51 +0200 Subject: [PATCH 0581/1476] surface/surface-go: set kernel to 6.1.55 --- microsoft/surface/surface-go/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix index 361a83c8..31f48042 100644 --- a/microsoft/surface/surface-go/default.nix +++ b/microsoft/surface/surface-go/default.nix @@ -17,7 +17,7 @@ in { ../../../common/cpu/intel/kaby-lake ]; - microsoft-surface.kernelVersion = "6.1.53"; + microsoft-surface.kernelVersion = "6.1.55"; boot.kernelParams = [ "i915.enable_rc6=1" From a149e3d37e77543205f73017015fe22632907ff9 Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Fri, 6 Oct 2023 01:17:51 +0200 Subject: [PATCH 0582/1476] Lenovo IdeaPad Slim 5: init note this is to be distinguished from e.g. the slim 5i, which uses intel --- README.md | 1 + flake.nix | 1 + lenovo/ideapad/slim-5/default.nix | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 lenovo/ideapad/slim-5/default.nix diff --git a/README.md b/README.md index f735581e..52929744 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,7 @@ See code for all available configurations. | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | +| [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | | [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | | [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | | [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | diff --git a/flake.nix b/flake.nix index 36394274..974c3c8d 100644 --- a/flake.nix +++ b/flake.nix @@ -77,6 +77,7 @@ intel-nuc-8i7beh = import ./intel/nuc/8i7beh; lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; + lenovo-ideapad-slim-5 = import ./lenovo/ideapad/slim-5; lenovo-legion-15ach6 = import ./lenovo/legion/15ach6; lenovo-legion-15arh05h = import ./lenovo/legion/15arh05h; lenovo-legion-16ach6h = import ./lenovo/legion/16ach6h; diff --git a/lenovo/ideapad/slim-5/default.nix b/lenovo/ideapad/slim-5/default.nix new file mode 100644 index 00000000..a830c0bd --- /dev/null +++ b/lenovo/ideapad/slim-5/default.nix @@ -0,0 +1,11 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/gpu/amd + ../../../common/pc/laptop + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/ssd + ]; +} From 2eb2fc2889fdc28b233330e775f833d43a2425d5 Mon Sep 17 00:00:00 2001 From: Samuel Cobb Date: Mon, 2 Oct 2023 11:34:30 +0100 Subject: [PATCH 0583/1476] init: omen/15-en1007sa --- omen/15-en1007sa/default.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 omen/15-en1007sa/default.nix diff --git a/omen/15-en1007sa/default.nix b/omen/15-en1007sa/default.nix new file mode 100644 index 00000000..4a2d07ea --- /dev/null +++ b/omen/15-en1007sa/default.nix @@ -0,0 +1,20 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../common/cpu/amd + ../../common/gpu/nvidia/prime.nix + ../../common/pc/laptop + ../../common/pc/ssd + ]; + + # Enables ACPI platform profiles + boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + kernelModules = [ "hp-wmi" ]; + }; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:6:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} From d79fe3a25c2bf264ac37ef84fbf03a8d0641fca4 Mon Sep 17 00:00:00 2001 From: Samuel Cobb Date: Mon, 2 Oct 2023 11:46:16 +0100 Subject: [PATCH 0584/1476] add to flake --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 974c3c8d..1496ca1b 100644 --- a/flake.nix +++ b/flake.nix @@ -167,6 +167,7 @@ hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; hardkernel-odroid-h3 = import ./hardkernel/odroid-h3; omen-15-en0010ca = import ./omen/15-en0010ca; + omen-15-en1007sa = import ./omen/15-en1007sa; omen-en00015p = import ./omen/en00015p; onenetbook-4 = import ./onenetbook/4; pcengines-apu = import ./pcengines/apu; From b31be8f11493e0f79a840370fd17153cd60b9009 Mon Sep 17 00:00:00 2001 From: Samuel Cobb Date: Mon, 2 Oct 2023 12:31:21 +0100 Subject: [PATCH 0585/1476] edit readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 52929744..51228fed 100644 --- a/README.md +++ b/README.md @@ -227,6 +227,7 @@ See code for all available configurations. | [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | | [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | | [Omen 15-en0010ca](omen/15-en0010ca) | `` | +| [Omen 15-en1007sa](omen/15-en1007sa) | `` | | [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | | [Panasonic Let's Note CF-LX4 ](panasonic/letsnote/cf-lx4) | `` | From f4ef5df944429e2ce3308bdbe69da940fffc5942 Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Fri, 29 Sep 2023 22:10:49 +1000 Subject: [PATCH 0586/1476] pine64-rockpro64: init --- CODEOWNERS | 1 + README.md | 1 + flake.nix | 1 + pine64/rockpro64/README.md | 14 ++++++++++++++ pine64/rockpro64/default.nix | 9 +++++++++ 5 files changed, 26 insertions(+) create mode 100644 pine64/rockpro64/README.md create mode 100644 pine64/rockpro64/default.nix diff --git a/CODEOWNERS b/CODEOWNERS index 92186ff6..3e4ca924 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -5,6 +5,7 @@ lenovo/thinkpad/x230 @makefu @yegortimoshenko lenovo/thinkpad/x250 @Mic92 pcengines/apu @yegortimoshenko pine64/pinebook-pro @tomfitzhenry +pine64/rockpro64 @tomfitzhenry pine64/star64 @fgaz purism/librem/13v3 @yegortimoshenko system76/darp6 @khumba diff --git a/README.md b/README.md index 51228fed..17bf79e4 100644 --- a/README.md +++ b/README.md @@ -233,6 +233,7 @@ See code for all available configurations. | [Panasonic Let's Note CF-LX4 ](panasonic/letsnote/cf-lx4) | `` | | [PC Engines APU](pcengines/apu) | `` | | [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | +| [PINE64 RockPro64](pine64/rockpro64/) | `` | | [PINE64 STAR64](pine64/star64/) | `` | | [Purism Librem 13v3](purism/librem/13v3) | `` | | [Purism Librem 15v3](purism/librem/13v3) | `` | diff --git a/flake.nix b/flake.nix index 1496ca1b..31c1369d 100644 --- a/flake.nix +++ b/flake.nix @@ -172,6 +172,7 @@ onenetbook-4 = import ./onenetbook/4; pcengines-apu = import ./pcengines/apu; pine64-pinebook-pro = import ./pine64/pinebook-pro; + pine64-rockpro64 = import ./pine64/rockpro64; pine64-star64 = import ./pine64/star64; purism-librem-13v3 = import ./purism/librem/13v3; purism-librem-15v3 = import ./purism/librem/15v3; diff --git a/pine64/rockpro64/README.md b/pine64/rockpro64/README.md new file mode 100644 index 00000000..e4695a47 --- /dev/null +++ b/pine64/rockpro64/README.md @@ -0,0 +1,14 @@ +# Pine64 RockPro64 + +## _Tow-Boot_ + +We highly suggest installing _Tow-Boot_ to the SPI Flash. + +- https://github.com/Tow-Boot/Tow-Boot + +Having the firmware installed to SPI makes the device act basically like a +normal computer. No need for weird incantations to setup the platform boot +firmware. + +Alternatively, starting from the _Tow-Boot_ disk image on eMMC is easier to +deal with and understand than having to deal with _U-Boot_ manually. diff --git a/pine64/rockpro64/default.nix b/pine64/rockpro64/default.nix new file mode 100644 index 00000000..03f60014 --- /dev/null +++ b/pine64/rockpro64/default.nix @@ -0,0 +1,9 @@ +{ pkgs, lib, ... }: +{ + boot.initrd.kernelModules = [ + # PCIe/NVMe + "nvme" + "pcie_rockchip_host" + "phy_rockchip_pcie" + ]; +} From 93fcc5fb824833e2c8fb03768d8ffb915024dc6b Mon Sep 17 00:00:00 2001 From: Jacob Hrbek Date: Wed, 4 Oct 2023 23:30:04 +0200 Subject: [PATCH 0587/1476] OLIMEX Teres-I: Init Initial declaration of the device --- flake.nix | 1 + olimex/teres_i/default.nix | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 olimex/teres_i/default.nix diff --git a/flake.nix b/flake.nix index 31c1369d..da43104f 100644 --- a/flake.nix +++ b/flake.nix @@ -170,6 +170,7 @@ omen-15-en1007sa = import ./omen/15-en1007sa; omen-en00015p = import ./omen/en00015p; onenetbook-4 = import ./onenetbook/4; + olimex-teres_i = import ./olimex/teres_i; pcengines-apu = import ./pcengines/apu; pine64-pinebook-pro = import ./pine64/pinebook-pro; pine64-rockpro64 = import ./pine64/rockpro64; diff --git a/olimex/teres_i/default.nix b/olimex/teres_i/default.nix new file mode 100644 index 00000000..34bec53c --- /dev/null +++ b/olimex/teres_i/default.nix @@ -0,0 +1,30 @@ +{ config, lib, pkgs, ...}: + +{ + hardware.deviceTree = { + name = lib.mkDefault "allwinner/sun50i-a64-teres-i.dts"; + enable = lib.mkDefault true; + }; + + boot = { + consoleLogLevel = lib.mkDefault 7; + + kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; + kernelParams = lib.mkDefault ["console=ttyS0,115200n8"]; + extraModulePackages = lib.mkDefault []; + + initrd = { + availableKernelModules = lib.mkDefault ["usbhid"]; + kernelModules = lib.mkDefault []; + }; + + loader = { + grub.enable = lib.mkDefault false; + generic-extlinux-compatible.enable = lib.mkDefault true; + }; + }; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; + + powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; +} From 455496f1b4a2318924326ba1cbde9b485a3dac57 Mon Sep 17 00:00:00 2001 From: Kourosh Tafreshi Date: Thu, 28 Sep 2023 12:31:15 +0300 Subject: [PATCH 0588/1476] 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 00000000..ed8139be --- /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 00000000..f4b0eecd --- /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 00000000..257462a4 --- /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 da43104f..17b90b33 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; From bb2db418b616fea536b1be7f6ee72fb45c11afe0 Mon Sep 17 00:00:00 2001 From: Kourosh Tafreshi Date: Fri, 6 Oct 2023 14:34:33 +0300 Subject: [PATCH 0589/1476] chore: Add Dell XPS 15 9510 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 17bf79e4..d45c0ae3 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,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 9510, nvidia](dell/xps/15-9510/nvidia) | `` | +| [Dell XPS 15 9510](dell/xps/15-9510) | `` | | [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) | `` | From 6ea13c2df412306793311f8b8c58f5cd9127fb55 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 9 Oct 2023 12:51:44 -0400 Subject: [PATCH 0590/1476] starfive visionfive2: update u-boot to SDK version v3.7.5 --- starfive/visionfive/v2/uboot.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/starfive/visionfive/v2/uboot.nix b/starfive/visionfive/v2/uboot.nix index 9beb5b2c..be530b71 100644 --- a/starfive/visionfive/v2/uboot.nix +++ b/starfive/visionfive/v2/uboot.nix @@ -1,13 +1,13 @@ { fetchFromGitHub, buildUBoot }: buildUBoot rec { - version = "3.6.1"; + version = "3.7.5"; src = fetchFromGitHub { owner = "starfive-tech"; repo = "u-boot"; rev = "refs/tags/VF2_v${version}"; - hash = "sha256-735V8HMCGKj13cgQJv7FYrBIF3mYWOrmJhr+46nsVuY="; + hash = "sha256-/BCWN+lbMaOakfwwCDloutFEX8IYQyCIrkE1Yu6T8oI="; }; defconfig = "starfive_visionfive2_defconfig"; From c2bbfcfc3d12351919f8df7c7d6528f41751d0a3 Mon Sep 17 00:00:00 2001 From: Florian Date: Tue, 10 Oct 2023 23:58:03 +0200 Subject: [PATCH 0591/1476] fix compileDTS overlay for raspberry-pi (#754) * fix compileDTS overlay due to https://github.com/NixOS/nixpkgs/pull/251898 the compileDTS function has been moved to `device-tree` nixos-hardware has an own overlay for the raspberry-pi which needs the `compileDTS` function now, too. This commit adds it. Signed-off-by: Florian Brandes * apply review comments Co-authored-by: Majiir Paktu Signed-off-by: Florian Brandes --------- Signed-off-by: Florian Brandes Co-authored-by: Majiir Paktu --- raspberry-pi/4/pkgs-overlays.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/raspberry-pi/4/pkgs-overlays.nix b/raspberry-pi/4/pkgs-overlays.nix index cc639d46..8c3e29af 100644 --- a/raspberry-pi/4/pkgs-overlays.nix +++ b/raspberry-pi/4/pkgs-overlays.nix @@ -2,7 +2,9 @@ let cfg = config.hardware.raspberry-pi."4".apply-overlays-dtmerge; dt_ao_overlay = _final: prev: { - deviceTree.applyOverlays = prev.callPackage ./apply-overlays-dtmerge.nix { }; + deviceTree = prev.deviceTree // { + applyOverlays = _final.callPackage ./apply-overlays-dtmerge.nix { }; + }; }; in { options.hardware = { From c1ebe3b471bdb097c07579748713b51fd835098d Mon Sep 17 00:00:00 2001 From: Mic92 <96200+Mic92@users.noreply.github.com> Date: Wed, 11 Oct 2023 18:07:00 +0000 Subject: [PATCH 0592/1476] init: omen-16-n0005ne (#749) added omen 16-n0005ne profile * removed /common/pc/ssd * added /common/pc/ssd * removed /common/pc/laptop from omen 16 config * added /common/pc/laptop * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * chore: Add DELL XPS 9510 * chore: Add Dell XPS 15 9510 * starfive visionfive2: update u-boot to SDK version v3.7.5 * added omen 16-n0005ne profile * removed /common/pc/ssd * added /common/pc/ssd * removed /common/pc/laptop from omen 16 config * added /common/pc/laptop * Merge branch 'master' of github.com:GamingTesh/nixos-hardware * fixed error in flake.nix caused by git --- README.md | 1 + flake.nix | 1 + omen/16-n0005ne/README.md | 4 ++++ omen/16-n0005ne/default.nix | 15 +++++++++++++++ 4 files changed, 21 insertions(+) create mode 100644 omen/16-n0005ne/README.md create mode 100644 omen/16-n0005ne/default.nix diff --git a/README.md b/README.md index d45c0ae3..8d828172 100644 --- a/README.md +++ b/README.md @@ -229,6 +229,7 @@ See code for all available configurations. | [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | | [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | | [Omen 15-en0010ca](omen/15-en0010ca) | `` | +| [Omen 16-n0005ne](omen/16-n0005ne) | `` | | [Omen 15-en1007sa](omen/15-en1007sa) | `` | | [Omen en00015p](omen/en00015p) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | diff --git a/flake.nix b/flake.nix index 17b90b33..cc99ef3f 100644 --- a/flake.nix +++ b/flake.nix @@ -169,6 +169,7 @@ hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; hardkernel-odroid-h3 = import ./hardkernel/odroid-h3; omen-15-en0010ca = import ./omen/15-en0010ca; + omen-16-n0005ne = import ./omen/16-n0005ne; omen-15-en1007sa = import ./omen/15-en1007sa; omen-en00015p = import ./omen/en00015p; onenetbook-4 = import ./onenetbook/4; diff --git a/omen/16-n0005ne/README.md b/omen/16-n0005ne/README.md new file mode 100644 index 00000000..434fb4ec --- /dev/null +++ b/omen/16-n0005ne/README.md @@ -0,0 +1,4 @@ +# HP Omen 16-n0005ne + +## ACPI platform profiles +This config enables `hp-wmi`, which allows switch between cool, balanced, and performance modes on the platform EC, used by power management tools like `power-profile-daemon` and `tlp`. diff --git a/omen/16-n0005ne/default.nix b/omen/16-n0005ne/default.nix new file mode 100644 index 00000000..c83951a1 --- /dev/null +++ b/omen/16-n0005ne/default.nix @@ -0,0 +1,15 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../common/cpu/amd + ../../common/gpu/amd + ../../common/pc/laptop + ../../common/pc/ssd + ]; + + # Enables ACPI platform profiles + boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + kernelModules = [ "hp-wmi" ]; + }; +} From 0e1e24d2fd6aa44fe0b9065f3f7f24ee369ff6da Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Fri, 29 Sep 2023 04:11:18 +1000 Subject: [PATCH 0593/1476] pine64-pinebook-pro: remove "internal keyboard" libinput quirk This quirk has been upstreamed, and thus we longer need to keep it in nixos-hardware: https://gitlab.freedesktop.org/libinput/libinput/-/commit/c053d7b078b7ebc067c24fd43c728ec0dcd69bfd --- pine64/pinebook-pro/default.nix | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pine64/pinebook-pro/default.nix b/pine64/pinebook-pro/default.nix index ea77ad33..1aad5d1f 100644 --- a/pine64/pinebook-pro/default.nix +++ b/pine64/pinebook-pro/default.nix @@ -53,17 +53,6 @@ '' ]; - # https://github.com/elementary/os/blob/05a5a931806d4ed8bc90396e9e91b5ac6155d4d4/build-pinebookpro.sh#L253-L257 - # Mark the keyboard as internal, so that "disable when typing" works for the touchpad - environment.etc."libinput/local-overrides.quirks".text = '' - [Pinebook Pro Keyboard] - MatchUdevType=keyboard - MatchBus=usb - MatchVendor=0x258A - MatchProduct=0x001E - AttrKeyboardIntegration=internal - ''; - hardware.enableRedistributableFirmware = true; hardware.firmware = [ (pkgs.callPackage ./firmware/ap6256-firmware { }) From a6eecb4d851240d7bc6622449cad371171a69eb3 Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Fri, 29 Sep 2023 04:13:27 +1000 Subject: [PATCH 0594/1476] pine64-pinebook-pro: remove udev quirk for "keyboard mouse" It's not clear what this is for, and other distros ( https://gitlab.com/postmarketOS/pmaports/-/commit/e9029c91536edbe3fd4109b90cfa92eddfd890b0 ) are now relying solely on upstream udev. --- pine64/pinebook-pro/default.nix | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pine64/pinebook-pro/default.nix b/pine64/pinebook-pro/default.nix index 1aad5d1f..5cc224c7 100644 --- a/pine64/pinebook-pro/default.nix +++ b/pine64/pinebook-pro/default.nix @@ -42,17 +42,6 @@ "rtc_rk808" ]; - services.udev.extraHwdb = lib.mkMerge [ - # https://github.com/elementary/os/blob/05a5a931806d4ed8bc90396e9e91b5ac6155d4d4/build-pinebookpro.sh#L253-L257 - # Disable the "keyboard mouse" in libinput. This is reported by the keyboard firmware - # and is probably a placeholder for a TrackPoint style mouse that doesn't exist - '' - evdev:input:b0003v258Ap001Ee0110-e0,1,2,4,k110,111,112,r0,1,am4,lsfw - ID_INPUT=0 - ID_INPUT_MOUSE=0 - '' - ]; - hardware.enableRedistributableFirmware = true; hardware.firmware = [ (pkgs.callPackage ./firmware/ap6256-firmware { }) From 922926aa1f58db7897c4cea756978d418b281545 Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Fri, 29 Sep 2023 04:49:22 +1000 Subject: [PATCH 0595/1476] pine64-pinebook-pro: add initrd modules for boot-from-NVMe --- pine64/pinebook-pro/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pine64/pinebook-pro/default.nix b/pine64/pinebook-pro/default.nix index 5cc224c7..848a5864 100644 --- a/pine64/pinebook-pro/default.nix +++ b/pine64/pinebook-pro/default.nix @@ -36,6 +36,11 @@ "tcpm" "typec" + # PCIe/NVMe + "nvme" + "pcie_rockchip_host" + "phy_rockchip_pcie" + # Misc. modules "cw2015_battery" "gpio_charger" From d6b554a85caac840430a822aae963c811e9c7e26 Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Fri, 29 Sep 2023 05:23:02 +1000 Subject: [PATCH 0596/1476] pine64-pinebook-pro: remove superfluous ap6256-firmware package I have been running for >1 year with the upstream linux-firmware package (i.e. just hardware.enableRedistributableFirmware = true) https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/WHENCE#n2767 --- pine64/pinebook-pro/default.nix | 3 -- .../firmware/ap6256-firmware/default.nix | 39 ------------------- 2 files changed, 42 deletions(-) delete mode 100644 pine64/pinebook-pro/firmware/ap6256-firmware/default.nix diff --git a/pine64/pinebook-pro/default.nix b/pine64/pinebook-pro/default.nix index 848a5864..37c1c841 100644 --- a/pine64/pinebook-pro/default.nix +++ b/pine64/pinebook-pro/default.nix @@ -48,9 +48,6 @@ ]; hardware.enableRedistributableFirmware = true; - hardware.firmware = [ - (pkgs.callPackage ./firmware/ap6256-firmware { }) - ]; # The default powersave makes the wireless connection unusable. networking.networkmanager.wifi.powersave = lib.mkDefault false; diff --git a/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix b/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix deleted file mode 100644 index caddfb26..00000000 --- a/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ lib -, fetchFromGitHub -, runCommand -}: - -let - src = fetchFromGitHub { - owner = "nix-community"; - repo = "rkwifibt"; - rev = "3524d73251fe4d16f0f873e583aa63b12a90ac26"; - sha256 = "0ac7z3m5mnmk1qhf9pq9s3y6ky8jmd3ggn8m29797z1ng40q3cka"; - }; -in -runCommand "pinebookpro-ap6256-firmware" -{ - meta = with lib; { - license = licenses.unfreeRedistributable; - }; -} '' - (PS4=" $ "; set -x - cp ${src}/"firmware/broadcom/all/bt/BCM4345C5.hcd" "BCM4345C5.hcd" - cp ${src}/"firmware/broadcom/all/wifi/fw_bcm43456c5_ag.bin" "fw_bcm43456c5_ag.bin" - cp ${src}/"clm_blob/broadcom/AP6256/brcmfmac43456-sdio.clm_blob" "brcmfmac43456-sdio.clm_blob" - cp ${src}/"firmware/broadcom/all/wifi/nvram_ap6256.txt" "nvram_ap6256.txt" - mkdir -p $out/lib/firmware/brcm - # Bluetooth firmware - install -Dm644 "BCM4345C5.hcd" -t "$out/lib/firmware/" - install -Dm644 "BCM4345C5.hcd" "$out/lib/firmware/brcm/BCM.hcd" - install -Dm644 "BCM4345C5.hcd" -t "$out/lib/firmware/brcm/" - # Wifi firmware - install -Dm644 "nvram_ap6256.txt" -t "$out/lib/firmware/" - install -Dm644 "fw_bcm43456c5_ag.bin" "$out/lib/firmware/brcm/brcmfmac43456-sdio.bin" - install -Dm644 "brcmfmac43456-sdio.clm_blob" "$out/lib/firmware/brcm/brcmfmac43456-sdio.clm_blob" - install -Dm644 "nvram_ap6256.txt" "$out/lib/firmware/brcm/brcmfmac43456-sdio.radxa,rockpi4b.txt" - install -Dm644 "nvram_ap6256.txt" "$out/lib/firmware/brcm/brcmfmac43456-sdio.radxa,rockpi4c.txt" - install -Dm644 "nvram_ap6256.txt" "$out/lib/firmware/brcm/brcmfmac43456-sdio.pine64,pinebook-pro.txt" - install -Dm644 "nvram_ap6256.txt" "$out/lib/firmware/brcm/brcmfmac43456-sdio.pine64,rockpro64-v2.1.txt" - ) -'' From 3d4a18fac8850697714bfc2307211268beb63715 Mon Sep 17 00:00:00 2001 From: Ganga Ram Date: Tue, 10 Oct 2023 21:33:28 +0400 Subject: [PATCH 0597/1476] Microchip Icicle Kit BSP update - Kernel upadated to 6.1.43 - Uboot updated to 2023.07.02 Signed-off-by: Ganga Ram --- microchip/common/bsp/linux-icicle-kit.nix | 6 +-- ...nvironment-for-Microchip-Iciclle-Kit.patch | 27 +++++----- ...iscv-Fix-build-against-binutils-2.38.patch | 51 ------------------- microchip/common/bsp/uboot.nix | 7 ++- 4 files changed, 20 insertions(+), 71 deletions(-) delete mode 100644 microchip/common/bsp/patches/0002-Riscv-Fix-build-against-binutils-2.38.patch diff --git a/microchip/common/bsp/linux-icicle-kit.nix b/microchip/common/bsp/linux-icicle-kit.nix index 627e7407..2bf19517 100644 --- a/microchip/common/bsp/linux-icicle-kit.nix +++ b/microchip/common/bsp/linux-icicle-kit.nix @@ -3,7 +3,7 @@ with pkgs; buildLinux (args // rec { - version = "5.15.92-linux4microchip+fpga-2023.02"; + version = "6.1.43-linux4microchip+fpga-2023.09"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = version; @@ -63,7 +63,7 @@ buildLinux (args // rec { src = fetchFromGitHub { owner = "linux4microchip"; repo = "linux"; - rev = "360a547daec2a69169be49d3da9cca8b1ecb325f"; - sha256 = "sha256-ri2d91bHmcFkV2PjwRNho1XQixKttJKoG/qiOdeB01M="; + rev = "25e35c7c54ad853d03c14a02b189b408cb5b5eb3"; + sha256 = "sha256-wj7lz247MkhxmhSHUcNeWmcZK+DL+5PAnLwTmALD97M="; }; } // (args.argsOverride or { })) diff --git a/microchip/common/bsp/patches/0001-Boot-environment-for-Microchip-Iciclle-Kit.patch b/microchip/common/bsp/patches/0001-Boot-environment-for-Microchip-Iciclle-Kit.patch index 164505e0..98703846 100644 --- a/microchip/common/bsp/patches/0001-Boot-environment-for-Microchip-Iciclle-Kit.patch +++ b/microchip/common/bsp/patches/0001-Boot-environment-for-Microchip-Iciclle-Kit.patch @@ -1,26 +1,27 @@ -From 2085960b5dfc7058d572cfb90fa349efe9bacdf2 Mon Sep 17 00:00:00 2001 -From: Ganga Ram -Date: Mon, 24 Apr 2023 10:15:22 +0400 +From 313309c07e904ba48386568c361f4a3265829a81 Mon Sep 17 00:00:00 2001 +From: Ganga Ram +Date: Tue, 10 Oct 2023 17:07:49 +0400 Subject: [PATCH] Boot environment for Microchip Iciclle Kit -Signed-off-by: Ganga Ram +Signed-off-by: Ganga Ram --- include/configs/microchip_mpfs_icicle.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/configs/microchip_mpfs_icicle.h b/include/configs/microchip_mpfs_icicle.h -index 9ef5425c9f..c8a1f7c9df 100644 +index 0b9eb59bc4..59b4465f1e 100644 --- a/include/configs/microchip_mpfs_icicle.h +++ b/include/configs/microchip_mpfs_icicle.h -@@ -71,6 +71,9 @@ - #define CONFIG_EXTRA_ENV_SETTINGS \ - "bootm_size=0x10000000\0" \ - "scriptaddr=0x8e000000\0" \ +@@ -125,6 +125,9 @@ + #define CFG_EXTRA_ENV_SETTINGS \ + "bootm_size=0x10000000\0" \ + "scriptaddr=0x8e000000\0" \ + "kernel_addr_r=0x8e000000\0" \ + "ramdisk_addr_r=0x90000000\0" \ + "fdt_addr_r=0x92000000\0" \ - BOOTENV_DESIGN_OVERLAYS \ - BOOTENV \ - --- + BOOTENV_DESIGN_OVERLAYS \ + BOOTENV \ + +-- 2.39.2 + diff --git a/microchip/common/bsp/patches/0002-Riscv-Fix-build-against-binutils-2.38.patch b/microchip/common/bsp/patches/0002-Riscv-Fix-build-against-binutils-2.38.patch deleted file mode 100644 index 0dfd6652..00000000 --- a/microchip/common/bsp/patches/0002-Riscv-Fix-build-against-binutils-2.38.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 8afd811876b1ce8d6da6d5c804452a2b15805f5a Mon Sep 17 00:00:00 2001 -From: Ganga Ram -Date: Wed, 5 Jul 2023 11:32:44 +0400 -Subject: [PATCH] From: Ganga Ram Date: Wed, 05 July 2023 - 06:15:22 +0400 Subject: [PATCH] Riscv-Fix-build-against-binutils-2.38 - -The following description is copied from the equivalent patch for the -Linux Kernel proposed by Aurelien Jarno: - -From version 2.38, binutils default to ISA spec version 20191213. This -means that the csr read/write (csrr*/csrw*) instructions and fence.i -instruction has separated from the `I` extension, become two standalone -extensions: Zicsr and Zifencei. As the kernel uses those instruction, -this causes the following build failure: - -arch/riscv/lib/cache.c:12: Error: unrecognized opcode `fence.i', extension `zifencei' required -arch/riscv/cpu/cpu.c:94: Error: unrecognized opcode `csrs sstatus,a5', extension `zicsr' required -arch/riscv/cpu/cpu.c:95: Error: unrecognized opcode `csrw 0x003,0', extension `zicsr' required - -More detail: https://patchwork.ozlabs.org/series/283391/mbox/ - -Signed-off-by: Ganga Ram ---- - arch/riscv/Makefile | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile -index 0b80eb8d86..53d1194ffb 100644 ---- a/arch/riscv/Makefile -+++ b/arch/riscv/Makefile -@@ -24,7 +24,16 @@ ifeq ($(CONFIG_CMODEL_MEDANY),y) - CMODEL = medany - endif - --ARCH_FLAGS = -march=$(ARCH_BASE)$(ARCH_A)$(ARCH_C) -mabi=$(ABI) \ -+RISCV_MARCH = $(ARCH_BASE)$(ARCH_A)$(ARCH_C) -+ -+# Newer binutils versions default to ISA spec version 20191213 which moves some -+# instructions from the I extension to the Zicsr and Zifencei extensions. -+toolchain-need-zicsr-zifencei := $(call cc-option-yn, -mabi=$(ABI) -march=$(RISCV_MARCH)_zicsr_zifencei) -+ifeq ($(toolchain-need-zicsr-zifencei),y) -+ RISCV_MARCH := $(RISCV_MARCH)_zicsr_zifencei -+endif -+ -+ARCH_FLAGS = -march=$(RISCV_MARCH) -mabi=$(ABI) \ - -mcmodel=$(CMODEL) - - PLATFORM_CPPFLAGS += $(ARCH_FLAGS) --- -2.39.2 - diff --git a/microchip/common/bsp/uboot.nix b/microchip/common/bsp/uboot.nix index 8bbe2a4e..2db04d56 100644 --- a/microchip/common/bsp/uboot.nix +++ b/microchip/common/bsp/uboot.nix @@ -8,14 +8,14 @@ with pkgs; let in buildUBoot rec { pname = "uboot"; - version = "linux4microchip+fpga-2023.06"; + version = "linux4microchip+fpga-2023.09"; src = fetchFromGitHub { owner = "polarfire-soc"; repo = "u-boot"; # from mpfs-uboot-2022.01 branch - rev = "7e19f9dff788025403ac6a34d9acf8736eef32ff"; - sha256 = "sha256-1qmifjjNxPOUWRgZdQk6Ld5KGQk/PypSRK/ILPSsTLs"; + rev = "8f5e331e3f09cdf469d528905f5d6a7139016634"; + sha256 = "sha256-UElnkRgzcvTjAo5X9N8c1fCTrTxdpAGkntcpQlqgDy8="; }; extraMakeFlags = [ @@ -24,7 +24,6 @@ buildUBoot rec { patches = [ ./patches/0001-Boot-environment-for-Microchip-Iciclle-Kit.patch - ./patches/0002-Riscv-Fix-build-against-binutils-2.38.patch ]; defconfig = "${targetBoard}_defconfig"; enableParallelBuilding = true; From fb6af288f6cf0f00d3af60cf9d5110433b954565 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Tue, 10 Oct 2023 16:23:31 -0400 Subject: [PATCH 0598/1476] fix(common/gpu/amd): use new rocmPackages --- common/gpu/amd/default.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix index 62cd77fc..1347e824 100644 --- a/common/gpu/amd/default.nix +++ b/common/gpu/amd/default.nix @@ -1,16 +1,16 @@ { config, lib, pkgs, ... }: { - options.hardware.amdgpu.loadInInitrd = lib.mkEnableOption (lib.mdDoc + options.hardware.amdgpu.loadInInitrd = lib.mkEnableOption (lib.mdDoc "loading `amdgpu` kernelModule at stage 1. (Add `amdgpu` to `boot.initrd.kernelModules`)" ) // { default = true; }; - options.hardware.amdgpu.amdvlk = lib.mkEnableOption (lib.mdDoc + options.hardware.amdgpu.amdvlk = lib.mkEnableOption (lib.mdDoc "use amdvlk drivers instead mesa radv drivers" ); - options.hardware.amdgpu.opencl = lib.mkEnableOption (lib.mdDoc - "rocm opencl runtime (Install rocm-opencl-icd and rocm-opencl-runtime)" + options.hardware.amdgpu.opencl = lib.mkEnableOption (lib.mdDoc + "rocm opencl runtime (Install rocmPackages.clr and rocmPackages.clr.icd)" ) // { default = true; }; @@ -37,10 +37,10 @@ ]; }) (lib.mkIf config.hardware.amdgpu.opencl { - hardware.opengl.extraPackages = with pkgs; [ - rocm-opencl-icd - rocm-opencl-runtime - ]; + hardware.opengl.extraPackages = + if pkgs ? rocmPackages.clr + then with pkgs.rocmPackages; [ clr clr.icd ] + else with pkgs; [ rocm-opencl-icd rocm-opencl-runtime ]; }) ]; -} +} From 6e1fd3d5c267b10f44b59e437422f11cc8a3790c Mon Sep 17 00:00:00 2001 From: Samuel Cobb <68509699+sjcobb2022@users.noreply.github.com> Date: Thu, 19 Oct 2023 20:54:11 +0100 Subject: [PATCH 0599/1476] Add amd pstate to all omen laptops (#763) --- omen/15-en0010ca/default.nix | 5 +++-- omen/15-en1007sa/default.nix | 1 + omen/16-n0005ne/default.nix | 1 + omen/en00015p/default.nix | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/omen/15-en0010ca/default.nix b/omen/15-en0010ca/default.nix index de1eee23..ff94913f 100644 --- a/omen/15-en0010ca/default.nix +++ b/omen/15-en0010ca/default.nix @@ -3,6 +3,7 @@ { imports = [ ../../common/cpu/amd + ../../common/cpu/amd/pstate.nix ../../common/gpu/amd ../../common/gpu/nvidia/prime.nix ../../common/pc/laptop @@ -10,8 +11,8 @@ ]; # Enables ACPI platform profiles - boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { - kernelModules = [ "hp-wmi" ]; + boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + kernelModules = [ "hp-wmi" ]; }; hardware.nvidia.prime = { diff --git a/omen/15-en1007sa/default.nix b/omen/15-en1007sa/default.nix index 4a2d07ea..3929c66f 100644 --- a/omen/15-en1007sa/default.nix +++ b/omen/15-en1007sa/default.nix @@ -3,6 +3,7 @@ { imports = [ ../../common/cpu/amd + ../../common/cpu/amd/pstate.nix ../../common/gpu/nvidia/prime.nix ../../common/pc/laptop ../../common/pc/ssd diff --git a/omen/16-n0005ne/default.nix b/omen/16-n0005ne/default.nix index c83951a1..e8bfea83 100644 --- a/omen/16-n0005ne/default.nix +++ b/omen/16-n0005ne/default.nix @@ -3,6 +3,7 @@ { imports = [ ../../common/cpu/amd + ../../common/cpu/amd/pstate.nix ../../common/gpu/amd ../../common/pc/laptop ../../common/pc/ssd diff --git a/omen/en00015p/default.nix b/omen/en00015p/default.nix index 78e1c3d2..77f943ff 100644 --- a/omen/en00015p/default.nix +++ b/omen/en00015p/default.nix @@ -3,6 +3,7 @@ { imports = [ ../../common/cpu/amd + ../../common/cpu/amd/pstate.nix ../../common/gpu/nvidia/prime.nix ../../common/pc/laptop ../../common/pc/ssd From e40b26d814e9c8490d6f1be42c8d9c2864097212 Mon Sep 17 00:00:00 2001 From: Jonatan Steuernagel Date: Thu, 19 Oct 2023 08:47:52 +0200 Subject: [PATCH 0600/1476] ROG Ally: Add basic config as default.nix --- README.md | 1 + asus/ally/rc71l/README.md | 10 ++++++++++ asus/ally/rc71l/default.nix | 15 +++++++++++++++ flake.nix | 1 + 4 files changed, 27 insertions(+) create mode 100644 asus/ally/rc71l/README.md create mode 100644 asus/ally/rc71l/default.nix diff --git a/README.md b/README.md index 8d828172..26d7a0cf 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ See code for all available configurations. | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | | [Apple Macs with a T2 Chip](apple/t2) | `` | +| [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | diff --git a/asus/ally/rc71l/README.md b/asus/ally/rc71l/README.md new file mode 100644 index 00000000..e63987c5 --- /dev/null +++ b/asus/ally/rc71l/README.md @@ -0,0 +1,10 @@ +# [ROG Ally (2023)](https://rog.asus.com/gaming-handhelds/rog-ally/rog-ally-2023/) + +## BIOS + +The ROG Ally has a troublesome history with different BIOS versions creating different issues. +At the time of writing, the current BIOS version 330 allows for working audio without further kernel patches. + +## Further resources + +- The steam module from https://github.com/Jovian-Experiments/Jovian-NixOS can be used to boot into the Steam Deck UI \ No newline at end of file diff --git a/asus/ally/rc71l/default.nix b/asus/ally/rc71l/default.nix new file mode 100644 index 00000000..9cc83fed --- /dev/null +++ b/asus/ally/rc71l/default.nix @@ -0,0 +1,15 @@ +{ pkgs, lib, ... }: +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ../../battery.nix + ]; + + # 6.5 adds many fixes and improvements for the Ally + # This includes for example performance, audio and bluetooth + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.5") (lib.mkDefault pkgs.linuxPackages_latest); +} diff --git a/flake.nix b/flake.nix index cc99ef3f..512095f2 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,7 @@ apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1; apple-t2 = import ./apple/t2; asus-battery = import ./asus/battery.nix; + asus-ally-rc71l = import ./asus/ally/rc71l; asus-fx504gd = import ./asus/fx504gd; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; From 82804ab7108754ee961f868facaafa88341cf881 Mon Sep 17 00:00:00 2001 From: Sophie Tauchert Date: Tue, 3 Oct 2023 21:50:59 +0200 Subject: [PATCH 0601/1476] purism/librem5r4: linuxPackages_librem5: 6.4.14-librem5 -> 6.5.4-librem5 --- purism/librem/5r4/kernel/{6.4.14.nix => 6.5.4.nix} | 6 +++--- purism/librem/5r4/kernel/default.nix | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) rename purism/librem/5r4/kernel/{6.4.14.nix => 6.5.4.nix} (82%) diff --git a/purism/librem/5r4/kernel/6.4.14.nix b/purism/librem/5r4/kernel/6.5.4.nix similarity index 82% rename from purism/librem/5r4/kernel/6.4.14.nix rename to purism/librem/5r4/kernel/6.5.4.nix index ce4513c0..96322371 100644 --- a/purism/librem/5r4/kernel/6.4.14.nix +++ b/purism/librem/5r4/kernel/6.5.4.nix @@ -6,14 +6,14 @@ buildLinux (args // rec { defconfig = "librem5_defconfig"; - version = "6.4.14-librem5"; + version = "6.5.4-librem5"; modDirVersion = version; src = fetchFromGitLab { domain = "source.puri.sm"; owner = "Librem5"; repo = "linux"; - rev = "pureos/6.4.14pureos1"; - hash = "sha256-PzRG6czWLMahklceuaWGK1QJ+m9FAKDa/m1jp87h62k="; + rev = "pureos/6.5.4pureos1"; + hash = "sha256-wPosmPiQiaODfxlxNA/PGqOIBKlEcO+pOPvdZn7R9T0="; }; kernelPatches = [ ]; structuredExtraConfig = with lib.kernel; { diff --git a/purism/librem/5r4/kernel/default.nix b/purism/librem/5r4/kernel/default.nix index c07265da..3f79ab43 100644 --- a/purism/librem/5r4/kernel/default.nix +++ b/purism/librem/5r4/kernel/default.nix @@ -1,4 +1,4 @@ final: prev: { - linuxPackages_librem5_6_4_14 = final.linuxPackagesFor (final.callPackage ./6.4.14.nix { }); - linuxPackages_librem5 = final.linuxPackages_librem5_6_4_14; + linuxPackages_librem5_6_5_4 = final.linuxPackagesFor (final.callPackage ./6.5.4.nix { }); + linuxPackages_librem5 = final.linuxPackages_librem5_6_5_4; } From 32264b21bb23fbc00672b3ed6fcfaa5489d03991 Mon Sep 17 00:00:00 2001 From: Sophie Tauchert Date: Sat, 14 Oct 2023 00:45:07 +0200 Subject: [PATCH 0602/1476] purism/librem5r4: linuxPackages_librem5: 6.5.4-librem5 -> 6.5.6-librem5 --- purism/librem/5r4/kernel/default.nix | 3 +-- purism/librem/5r4/kernel/{6.5.4.nix => kernel.nix} | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) rename purism/librem/5r4/kernel/{6.5.4.nix => kernel.nix} (83%) diff --git a/purism/librem/5r4/kernel/default.nix b/purism/librem/5r4/kernel/default.nix index 3f79ab43..7b1b0852 100644 --- a/purism/librem/5r4/kernel/default.nix +++ b/purism/librem/5r4/kernel/default.nix @@ -1,4 +1,3 @@ final: prev: { - linuxPackages_librem5_6_5_4 = final.linuxPackagesFor (final.callPackage ./6.5.4.nix { }); - linuxPackages_librem5 = final.linuxPackages_librem5_6_5_4; + linuxPackages_librem5 = final.linuxPackagesFor (final.callPackage ./kernel.nix { }); } diff --git a/purism/librem/5r4/kernel/6.5.4.nix b/purism/librem/5r4/kernel/kernel.nix similarity index 83% rename from purism/librem/5r4/kernel/6.5.4.nix rename to purism/librem/5r4/kernel/kernel.nix index 96322371..73c73234 100644 --- a/purism/librem/5r4/kernel/6.5.4.nix +++ b/purism/librem/5r4/kernel/kernel.nix @@ -6,14 +6,14 @@ buildLinux (args // rec { defconfig = "librem5_defconfig"; - version = "6.5.4-librem5"; + version = "6.5.6-librem5"; modDirVersion = version; src = fetchFromGitLab { domain = "source.puri.sm"; owner = "Librem5"; repo = "linux"; - rev = "pureos/6.5.4pureos1"; - hash = "sha256-wPosmPiQiaODfxlxNA/PGqOIBKlEcO+pOPvdZn7R9T0="; + rev = "pureos/6.5.6pureos1"; + hash = "sha256-hOv0oy31mbC+43sI1n1oqKl7TtT/Ivj6UhiW4maumCg="; }; kernelPatches = [ ]; structuredExtraConfig = with lib.kernel; { From 72d53d51704295f1645d20384cd13aecc182f624 Mon Sep 17 00:00:00 2001 From: Jakob Leifhelm Date: Mon, 16 Oct 2023 09:18:47 +0200 Subject: [PATCH 0603/1476] starfive visionfive2: combine 8gb dtb overlays --- .../v2/{visionfive-2-v1.2a-8GB.dts => 8gb-patch.dts} | 2 +- starfive/visionfive/v2/README.md | 12 +----------- starfive/visionfive/v2/visionfive-2-v1.3b-8GB.dts | 11 ----------- 3 files changed, 2 insertions(+), 23 deletions(-) rename starfive/visionfive/v2/{visionfive-2-v1.2a-8GB.dts => 8gb-patch.dts} (68%) delete mode 100644 starfive/visionfive/v2/visionfive-2-v1.3b-8GB.dts diff --git a/starfive/visionfive/v2/visionfive-2-v1.2a-8GB.dts b/starfive/visionfive/v2/8gb-patch.dts similarity index 68% rename from starfive/visionfive/v2/visionfive-2-v1.2a-8GB.dts rename to starfive/visionfive/v2/8gb-patch.dts index 9478eaeb..342dcba0 100644 --- a/starfive/visionfive/v2/visionfive-2-v1.2a-8GB.dts +++ b/starfive/visionfive/v2/8gb-patch.dts @@ -1,7 +1,7 @@ /dts-v1/; /plugin/; / { - compatible = "starfive,visionfive-2-v1.2a", "starfive,jh7110"; + compatible = "starfive,jh7110"; fragment@0 { target-path = "/memory@40000000"; __overlay__ { diff --git a/starfive/visionfive/v2/README.md b/starfive/visionfive/v2/README.md index aa5d6ea3..6ec26121 100644 --- a/starfive/visionfive/v2/README.md +++ b/starfive/visionfive/v2/README.md @@ -66,23 +66,13 @@ hardware.deviceTree.name = ### 8GB memory If your board has 8GB of RAM add the following to your config: -#### Board rev 1.3B ``` nix hardware.deviceTree.overlays = [{ name = "8GB-patch"; - dtsFile = - "${nixos-hardware}/starfive/visionfive/v2/visionfive-2-v1.3b-8GB.dts"; + dtsFile = "${nixos-hardware}/starfive/visionfive/v2/8gb-patch.dts"; }]; ``` -#### Board rev 1.2A -``` nix -hardware.deviceTree.overlays = [{ - name = "8GB-patch"; - dtsFile = - "${nixos-hardware}/starfive/visionfive/v2/visionfive-2-v1.2a-8GB.dts"; -}]; -``` # Updating the bootloader ## SD-Card Install the firmware update script diff --git a/starfive/visionfive/v2/visionfive-2-v1.3b-8GB.dts b/starfive/visionfive/v2/visionfive-2-v1.3b-8GB.dts deleted file mode 100644 index f18a6a26..00000000 --- a/starfive/visionfive/v2/visionfive-2-v1.3b-8GB.dts +++ /dev/null @@ -1,11 +0,0 @@ -/dts-v1/; -/plugin/; -/ { - compatible = "starfive,visionfive-2-v1.3b", "starfive,jh7110"; - fragment@0 { - target-path = "/memory@40000000"; - __overlay__ { - reg = <0x0 0x40000000 0x2 0x0>; - }; - }; -}; From e07351b303d56802a79e8ecb00f9c738ce10dfae Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Mon, 9 Oct 2023 12:46:38 +0200 Subject: [PATCH 0604/1476] docs(tuxedo/pulse/15/gen2): add code owner --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/CODEOWNERS b/CODEOWNERS index 3e4ca924..69fa7821 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -10,3 +10,4 @@ pine64/star64 @fgaz purism/librem/13v3 @yegortimoshenko system76/darp6 @khumba framework @emiller88 +tuxedo/pulse/15/gen2 @trueNAHO From cf64d8064c7c1fe7b57fa64c8e0909b78f2d6897 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Mon, 9 Oct 2023 13:01:41 +0200 Subject: [PATCH 0605/1476] docs(tuxedo/pulse/15/gen2): reference official webpage --- tuxedo/pulse/15/gen2/README.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tuxedo/pulse/15/gen2/README.md diff --git a/tuxedo/pulse/15/gen2/README.md b/tuxedo/pulse/15/gen2/README.md new file mode 100644 index 00000000..7230b604 --- /dev/null +++ b/tuxedo/pulse/15/gen2/README.md @@ -0,0 +1,7 @@ +# TUXEDO Pulse 15 - Gen2 + +## About + +[NixOS hardware configuration](https://github.com/NixOS/nixos-hardware) for +[TUXEDO Pulse 15 - +Gen2](https://www.tuxedocomputers.com/en/TUXEDO-Pulse-15-Gen2.tuxedo). From 6856dab060354653f370bc9f1530b263c76f1043 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Mon, 9 Oct 2023 12:49:27 +0200 Subject: [PATCH 0606/1476] docs(tuxedo/pulse/15/gen2): include in README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 26d7a0cf..0de491a1 100644 --- a/README.md +++ b/README.md @@ -255,3 +255,4 @@ See code for all available configurations. | [System76 Darter Pro 6](system76/darp6) | `` | | [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | | [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | +| [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | From f9acbf645e73ad2eaa5d164caa17c6dc1b5b2865 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Mon, 9 Oct 2023 12:53:23 +0200 Subject: [PATCH 0607/1476] feat(tuxedo/pulse/15/gen2): add flake output --- flake.nix | 1 + tuxedo/pulse/15/gen2/default.nix | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 tuxedo/pulse/15/gen2/default.nix diff --git a/flake.nix b/flake.nix index 512095f2..03fc0efa 100644 --- a/flake.nix +++ b/flake.nix @@ -197,6 +197,7 @@ system76-darp6 = import ./system76/darp6; toshiba-swanky = import ./toshiba/swanky; tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; + tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; common-cpu-amd = import ./common/cpu/amd; common-cpu-amd-pstate = import ./common/cpu/amd/pstate.nix; diff --git a/tuxedo/pulse/15/gen2/default.nix b/tuxedo/pulse/15/gen2/default.nix new file mode 100644 index 00000000..2c63c085 --- /dev/null +++ b/tuxedo/pulse/15/gen2/default.nix @@ -0,0 +1,2 @@ +{ +} From b93eed7525342ff65c4e510a223264419dc3d304 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Mon, 9 Oct 2023 13:13:41 +0200 Subject: [PATCH 0608/1476] feat(tuxedo/pulse/15/gen2): import common functionality --- tuxedo/pulse/15/gen2/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tuxedo/pulse/15/gen2/default.nix b/tuxedo/pulse/15/gen2/default.nix index 2c63c085..8398a243 100644 --- a/tuxedo/pulse/15/gen2/default.nix +++ b/tuxedo/pulse/15/gen2/default.nix @@ -1,2 +1,7 @@ { + imports = [ + ../../../../common/cpu/amd + ../../../../common/gpu/amd + ../../../../common/pc/laptop/ssd + ]; } From 256f598a1b48455fd8b844d6e29cda08b9674c5b Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Mon, 9 Oct 2023 15:42:46 +0200 Subject: [PATCH 0609/1476] fix(tuxedo/pulse/15/gen2): properly suspend the system --- tuxedo/pulse/15/gen2/default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tuxedo/pulse/15/gen2/default.nix b/tuxedo/pulse/15/gen2/default.nix index 8398a243..506be8aa 100644 --- a/tuxedo/pulse/15/gen2/default.nix +++ b/tuxedo/pulse/15/gen2/default.nix @@ -1,7 +1,20 @@ { + lib, + pkgs, + ... +}: { imports = [ ../../../../common/cpu/amd ../../../../common/gpu/amd ../../../../common/pc/laptop/ssd ]; + + services.udev.extraRules = lib.concatStringsSep "\n" ( + ["# Properly suspend the system."] + ++ ( + map + (device: "SUBSYSTEM==\"pci\", ACTION==\"add\", ATTR{vendor}==\"0x144d\", ATTR{device}==\"${device}\", RUN+=\"${pkgs.bash}/bin/sh -c '${pkgs.coreutils}/bin/echo 0 | ${pkgs.coreutils}/bin/tee /sys/bus/pci/devices/$kernel/d3cold_allowed'\"") + ["0xa80a" "0xa808"] + ) + ); } From dd18dc771432c64ea42592aeba5ea0e078126ddb Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Mon, 9 Oct 2023 16:39:59 +0200 Subject: [PATCH 0610/1476] fix(tuxedo/pulse/15/gen2): prevent 'Secure display: Generic Failure' warning --- tuxedo/pulse/15/gen2/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tuxedo/pulse/15/gen2/default.nix b/tuxedo/pulse/15/gen2/default.nix index 506be8aa..e92ae94b 100644 --- a/tuxedo/pulse/15/gen2/default.nix +++ b/tuxedo/pulse/15/gen2/default.nix @@ -9,6 +9,8 @@ ../../../../common/pc/laptop/ssd ]; + hardware.amdgpu.loadInInitrd = lib.mkDefault false; + services.udev.extraRules = lib.concatStringsSep "\n" ( ["# Properly suspend the system."] ++ ( From ae8f623d5bdf2e70eaab1abc9050caec1cb7f211 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Mon, 9 Oct 2023 19:06:50 +0200 Subject: [PATCH 0611/1476] refactor(tuxedo/pulse/15/gen2): use 'builtins' instead of 'lib' --- tuxedo/pulse/15/gen2/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuxedo/pulse/15/gen2/default.nix b/tuxedo/pulse/15/gen2/default.nix index e92ae94b..30457d56 100644 --- a/tuxedo/pulse/15/gen2/default.nix +++ b/tuxedo/pulse/15/gen2/default.nix @@ -11,7 +11,7 @@ hardware.amdgpu.loadInInitrd = lib.mkDefault false; - services.udev.extraRules = lib.concatStringsSep "\n" ( + services.udev.extraRules = builtins.concatStringsSep "\n" ( ["# Properly suspend the system."] ++ ( map From 0de78480a2999d6da4aea501335fcc7e096d35f9 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Tue, 10 Oct 2023 17:53:37 +0200 Subject: [PATCH 0612/1476] refactor(tuxedo/pulse/15/gen2): simplify device expression MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- tuxedo/pulse/15/gen2/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuxedo/pulse/15/gen2/default.nix b/tuxedo/pulse/15/gen2/default.nix index 30457d56..cff6964c 100644 --- a/tuxedo/pulse/15/gen2/default.nix +++ b/tuxedo/pulse/15/gen2/default.nix @@ -15,7 +15,7 @@ ["# Properly suspend the system."] ++ ( map - (device: "SUBSYSTEM==\"pci\", ACTION==\"add\", ATTR{vendor}==\"0x144d\", ATTR{device}==\"${device}\", RUN+=\"${pkgs.bash}/bin/sh -c '${pkgs.coreutils}/bin/echo 0 | ${pkgs.coreutils}/bin/tee /sys/bus/pci/devices/$kernel/d3cold_allowed'\"") + (device: ''SUBSYSTEM=="pci", ACTION=="add", ATTR{vendor}=="0x144d", ATTR{device}=="${device}", RUN+="${pkgs.runtimeShell} -c 'echo 0 > /sys/bus/pci/devices/$kernel/d3cold_allowed'"'') ["0xa80a" "0xa808"] ) ); From ccf6368108fd52c7c9436df62c82ed0fbe0b844d Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Tue, 10 Oct 2023 18:10:02 +0200 Subject: [PATCH 0613/1476] refactor(tuxedo/pulse/15/gen2): revert device expression simplification This reverts commit 6eeede605f8d181b105c40f3837c57714d65d061. --- tuxedo/pulse/15/gen2/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuxedo/pulse/15/gen2/default.nix b/tuxedo/pulse/15/gen2/default.nix index cff6964c..30457d56 100644 --- a/tuxedo/pulse/15/gen2/default.nix +++ b/tuxedo/pulse/15/gen2/default.nix @@ -15,7 +15,7 @@ ["# Properly suspend the system."] ++ ( map - (device: ''SUBSYSTEM=="pci", ACTION=="add", ATTR{vendor}=="0x144d", ATTR{device}=="${device}", RUN+="${pkgs.runtimeShell} -c 'echo 0 > /sys/bus/pci/devices/$kernel/d3cold_allowed'"'') + (device: "SUBSYSTEM==\"pci\", ACTION==\"add\", ATTR{vendor}==\"0x144d\", ATTR{device}==\"${device}\", RUN+=\"${pkgs.bash}/bin/sh -c '${pkgs.coreutils}/bin/echo 0 | ${pkgs.coreutils}/bin/tee /sys/bus/pci/devices/$kernel/d3cold_allowed'\"") ["0xa80a" "0xa808"] ) ); From cdf849625bd019a433d8665ebcf9895c8bd1aceb Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Wed, 11 Oct 2023 23:39:04 +0200 Subject: [PATCH 0614/1476] refactor(tuxedo/pulse/15/gen2): simplify device expression This reverts commit 7b569a25fe2d8868c597322eb5b64a8aa4ab7ed6. --- tuxedo/pulse/15/gen2/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuxedo/pulse/15/gen2/default.nix b/tuxedo/pulse/15/gen2/default.nix index 30457d56..cff6964c 100644 --- a/tuxedo/pulse/15/gen2/default.nix +++ b/tuxedo/pulse/15/gen2/default.nix @@ -15,7 +15,7 @@ ["# Properly suspend the system."] ++ ( map - (device: "SUBSYSTEM==\"pci\", ACTION==\"add\", ATTR{vendor}==\"0x144d\", ATTR{device}==\"${device}\", RUN+=\"${pkgs.bash}/bin/sh -c '${pkgs.coreutils}/bin/echo 0 | ${pkgs.coreutils}/bin/tee /sys/bus/pci/devices/$kernel/d3cold_allowed'\"") + (device: ''SUBSYSTEM=="pci", ACTION=="add", ATTR{vendor}=="0x144d", ATTR{device}=="${device}", RUN+="${pkgs.runtimeShell} -c 'echo 0 > /sys/bus/pci/devices/$kernel/d3cold_allowed'"'') ["0xa80a" "0xa808"] ) ); From 80d98a7d55c6e27954a166cb583a41325e9512d7 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Mon, 16 Oct 2023 15:54:31 +0200 Subject: [PATCH 0615/1476] feat(tuxedo/pulse/15/gen2): use default 'hardware.amdgpu.loadInInitrd' --- tuxedo/pulse/15/gen2/default.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tuxedo/pulse/15/gen2/default.nix b/tuxedo/pulse/15/gen2/default.nix index cff6964c..39ed0064 100644 --- a/tuxedo/pulse/15/gen2/default.nix +++ b/tuxedo/pulse/15/gen2/default.nix @@ -1,16 +1,10 @@ -{ - lib, - pkgs, - ... -}: { +{pkgs, ...}: { imports = [ ../../../../common/cpu/amd ../../../../common/gpu/amd ../../../../common/pc/laptop/ssd ]; - hardware.amdgpu.loadInInitrd = lib.mkDefault false; - services.udev.extraRules = builtins.concatStringsSep "\n" ( ["# Properly suspend the system."] ++ ( From f40197be9ad0142b8612c4e47366945667ae4ef4 Mon Sep 17 00:00:00 2001 From: Samtinel Date: Tue, 31 Oct 2023 13:36:53 +0000 Subject: [PATCH 0616/1476] pine64-rockpro64: add fancontrol MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rk3399's operating temps are -20 to 80°C. It has sensors for CPU and GPU. The MINSTART/-STOP values are a result of empirical testing. --- pine64/rockpro64/default.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pine64/rockpro64/default.nix b/pine64/rockpro64/default.nix index 03f60014..a4d31369 100644 --- a/pine64/rockpro64/default.nix +++ b/pine64/rockpro64/default.nix @@ -6,4 +6,25 @@ "pcie_rockchip_host" "phy_rockchip_pcie" ]; + # control the fan on the rockpro64 (like the one in the NAS case) + hardware.fancontrol = { + enable = lib.mkDefault true; + config = lib.mkDefault '' + INTERVAL=3 + DEVPATH=hwmon0=devices/virtual/thermal/thermal_zone0 hwmon1=devices/virtual/thermal/thermal_zone1 hwmon3=devices/platform/pwm-fan + DEVNAME=hwmon0=cpu_thermal hwmon1=gpu_thermal hwmon3=pwmfan + # There can only be one sensor mapped to one pwm: + # https://github.com/lm-sensors/lm-sensors/issues/228 + # Therefore you'll have to decide if you want to check CPU or GPU + # temps. If you want to use GPU instead, replace hwmon0 with + # hwmon1 below. + FCTEMPS=hwmon3/pwm1=hwmon0/temp1_input + MINTEMP=hwmon3/pwm1=40 + MAXTEMP=hwmon3/pwm1=80 + MINSTART=hwmon3/pwm1=35 + MINSTOP=hwmon3/pwm1=30 + MINPWM=hwmon3/pwm1=0 + MAXPWM=hwmon3/pwm1=255 + ''; + }; } From 71e0de7199f4117140ee6e9c699a0f160e9301d6 Mon Sep 17 00:00:00 2001 From: srestegosaurio Date: Wed, 1 Nov 2023 03:30:47 +0100 Subject: [PATCH 0617/1476] feat(asus/rog-strix/g513im): added profile --- README.md | 1 + asus/rog-strix/g513im/default.nix | 16 ++++++++++++++++ flake.nix | 1 + 3 files changed, 18 insertions(+) create mode 100644 asus/rog-strix/g513im/default.nix diff --git a/README.md b/README.md index 0de491a1..75e416c5 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ See code for all available configurations. | [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | | [Apple Macs with a T2 Chip](apple/t2) | `` | | [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | +| [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | diff --git a/asus/rog-strix/g513im/default.nix b/asus/rog-strix/g513im/default.nix new file mode 100644 index 00000000..04c3559d --- /dev/null +++ b/asus/rog-strix/g513im/default.nix @@ -0,0 +1,16 @@ +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/nvidia + ../../../common/gpu/nvidia/prime.nix + ../../../common/pc/laptop + ../../../common/pc/ssd + ../../battery.nix + ]; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:05:00:0"; + nvidiaBusId = "PCI:01:00:0"; + }; +} diff --git a/flake.nix b/flake.nix index 03fc0efa..47d8cf21 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,7 @@ asus-battery = import ./asus/battery.nix; asus-ally-rc71l = import ./asus/ally/rc71l; asus-fx504gd = import ./asus/fx504gd; + asus-rog-strix-g513im = import ./asus/rog-strix/g513im; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; From 11d50c5d52472ed40d3cb109daad03c836d2b328 Mon Sep 17 00:00:00 2001 From: Alexander Sieg Date: Wed, 25 Oct 2023 14:51:48 +0200 Subject: [PATCH 0618/1476] raspberrypi."4": add DigiAMP+ overlay --- raspberry-pi/4/default.nix | 1 + raspberry-pi/4/digi-amp-plus.nix | 93 ++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 raspberry-pi/4/digi-amp-plus.nix diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index 9f5fbb90..5645d477 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -15,6 +15,7 @@ ./pwm0.nix ./pkgs-overlays.nix ./xhci.nix + ./digi-amp-plus.nix ]; boot = { diff --git a/raspberry-pi/4/digi-amp-plus.nix b/raspberry-pi/4/digi-amp-plus.nix new file mode 100644 index 00000000..e9df06d6 --- /dev/null +++ b/raspberry-pi/4/digi-amp-plus.nix @@ -0,0 +1,93 @@ +{ config, lib, ... }: + +let + cfg = config.hardware.raspberry-pi."4".digi-amp-plus; +in +{ + options.hardware = { + raspberry-pi."4".digi-amp-plus = { + enable = lib.mkEnableOption '' + support for the IQaudIO DigiAMP+ Hat. + ''; + + unmuteAmp = lib.mkOption { + type = lib.types.bool; + default = false; + description = lib.mdDoc '' + "one-shot" unmute when kernel module first loads. + ''; + }; + + autoMuteAmp = lib.mkOption { + type = lib.types.bool; + default = true; + description = lib.mdDoc '' + Unmute the amp when an ALSA device is opened by a client. Mute, with a five-second delay when the ALSA device is closed. + (Reopening the device within the five-second close window will cancel mute.) + ''; + }; + }; + }; + + config = lib.mkIf cfg.enable { + hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true; + + hardware.deviceTree = { + overlays = [ + # Adapted from to: https://github.com/raspberrypi/linux/blob/3ed6d34d53e94ecbebc64c8fa3d1b6d3c41db8fb/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts + # changes: + # - modified top-level "compatible" field from bcm2835 to bcm2711 + # - s/i2s_clk_producer/i2s/ (name on bcm2711 platform) + { + name = "iqaudio-digiampplus-overlay"; + dtsText = '' + /dts-v1/; + /plugin/; + + / { + compatible = "brcm,bcm2711"; + + fragment@0 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + + fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + pcm5122@4c { + #sound-dai-cells = <0>; + compatible = "ti,pcm5122"; + reg = <0x4c>; + AVDD-supply = <&vdd_3v3_reg>; + DVDD-supply = <&vdd_3v3_reg>; + CPVDD-supply = <&vdd_3v3_reg>; + status = "okay"; + }; + }; + }; + + fragment@2 { + target = <&sound>; + iqaudio_dac: __overlay__ { + compatible = "iqaudio,iqaudio-dac"; + i2s-controller = <&i2s>; + mute-gpios = <&gpio 22 0>; + status = "okay"; + ${lib.optionalString cfg.unmuteAmp "iqaudio-dac,unmute-amp;"} + ${lib.optionalString cfg.autoMuteAmp "iqaudio-dac,auto-mute-amp;"} + }; + }; + }; + ''; + } + ]; + }; + }; +} From 097764c8930ad8b0632f6eb9d96eb9c9b65a62f5 Mon Sep 17 00:00:00 2001 From: bhetman <583552+bhetman@users.noreply.github.com> Date: Tue, 31 Oct 2023 00:05:10 -0400 Subject: [PATCH 0619/1476] Add HP Elitebook 845 g7 configuration --- README.md | 1 + flake.nix | 1 + hp/elitebook/845/g7/default.nix | 25 +++++++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 hp/elitebook/845/g7/default.nix diff --git a/README.md b/README.md index 0de491a1..c3743266 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,7 @@ See code for all available configurations. | [GPD WIN 2](gpd/win-2) | `` | | [Google Pixelbook](google/pixelbook) | `` | | [HP Elitebook 2560p](hp/elitebook/2560p) | `` | +| [HP Elitebook 845g7](hp/elitebook/845/g7) | `` | | [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | | [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | | [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | diff --git a/flake.nix b/flake.nix index 03fc0efa..dba8f28f 100644 --- a/flake.nix +++ b/flake.nix @@ -75,6 +75,7 @@ gpd-pocket-3 = import ./gpd/pocket-3; gpd-win-2 = import ./gpd/win-2; hp-elitebook-2560p = import ./hp/elitebook/2560p; + hp-elitebook-845g7 = import ./hp/elitebook/845/g7; hp-elitebook-845g9 = import ./hp/elitebook/845/g9; hp-notebook-14-df0023 = import ./hp/notebook/14-df0023; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; diff --git a/hp/elitebook/845/g7/default.nix b/hp/elitebook/845/g7/default.nix new file mode 100644 index 00000000..6c0cb49a --- /dev/null +++ b/hp/elitebook/845/g7/default.nix @@ -0,0 +1,25 @@ +{ config, pkgs, lib, ... }: + +{ + imports = + [ + ../../../../common/cpu/amd + ../../../../common/cpu/amd/pstate.nix + ../../../../common/gpu/amd + ../../../../common/pc/laptop + ../../../../common/pc/laptop/acpi_call.nix + ../../../../common/pc/laptop/ssd + ]; + + hardware.enableRedistributableFirmware = lib.mkDefault true; + boot.kernelModules = [ "synaptics_usb" ]; + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.3") (lib.mkDefault pkgs.linuxPackages_latest); + + # disable Scatter/Gather APU recently enabled by default, + # which results in white screen after display reconfiguration + boot.kernelParams = [ "amdgpu.sg_display=0" ]; + + services.xserver = { + videoDrivers = [ "amdgpu" ]; + }; +} From ce6068070b5fbbbdfdacfc38dff88b5ec6af87ec Mon Sep 17 00:00:00 2001 From: Kourosh Tafreshi Date: Wed, 1 Nov 2023 19:55:14 +0200 Subject: [PATCH 0620/1476] chore: Tunning WiFi --- dell/xps/15-9510/default.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dell/xps/15-9510/default.nix b/dell/xps/15-9510/default.nix index f4b0eecd..066039c6 100644 --- a/dell/xps/15-9510/default.nix +++ b/dell/xps/15-9510/default.nix @@ -1,5 +1,4 @@ -{ lib, ... }: -{ +{ lib, ... }: { imports = [ ../../../common/cpu/intel ../../../common/pc/laptop @@ -8,11 +7,10 @@ # 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 + # Tuning based on iwlwifi reference(https://wiki.archlinux.org/title/Network_configuration/Wireless#iwlwifi) boot.extraModprobeConfig = '' - options iwlwifi power_save=1 disable_11ax=1 + options iwlwifi 11n_disable=8 ''; } From 87f8403371fa74d9ad21ed677403cc235f37b96c Mon Sep 17 00:00:00 2001 From: Kourosh Tafreshi Date: Wed, 1 Nov 2023 19:55:37 +0200 Subject: [PATCH 0621/1476] chore: Add OPENGL settings --- dell/xps/15-9510/nvidia/default.nix | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/dell/xps/15-9510/nvidia/default.nix b/dell/xps/15-9510/nvidia/default.nix index 257462a4..95df520a 100644 --- a/dell/xps/15-9510/nvidia/default.nix +++ b/dell/xps/15-9510/nvidia/default.nix @@ -1,15 +1,19 @@ -{ lib, ... }: -{ - imports = [ - ../default.nix - ../../../../common/gpu/nvidia/prime.nix - ]; +{ lib,pkgs, ... }: { + imports = [ ../../../../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"; + 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"; + }; + }; + opengl = { + enable = lib.mkDefault true; + driSupport32Bit = lib.mkDefault true; + extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ]; + }; }; } From 0c53ac44db615b86642aa0965e23e850b1042b0c Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Sat, 4 Nov 2023 19:34:50 +0100 Subject: [PATCH 0622/1476] star64: linux: force disable DRM_FBDEV_EMULATION It was enabled in this nixpkgs commit: https://github.com/NixOS/nixpkgs/commit/e00c606455cef66797d48b3a145e913b509a4077 --- pine64/star64/linux-5.15.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pine64/star64/linux-5.15.nix b/pine64/star64/linux-5.15.nix index c6b0178e..f26afa27 100644 --- a/pine64/star64/linux-5.15.nix +++ b/pine64/star64/linux-5.15.nix @@ -61,7 +61,7 @@ let DRM_DP_AUX_BUS = no; DRM_DP_AUX_CHARDEV = lib.mkForce no; DRM_KMS_HELPER = no; - DRM_FBDEV_EMULATION = no; + DRM_FBDEV_EMULATION = lib.mkForce no; DRM_LOAD_EDID_FIRMWARE = lib.mkForce no; DRM_TTM = no; DRM_VRAM_HELPER = no; From 9f40c1088f5630dc8b93f22165325fff86935c71 Mon Sep 17 00:00:00 2001 From: Leah Amelia Chen Date: Fri, 10 Nov 2023 08:56:29 +0100 Subject: [PATCH 0623/1476] feat(asus/zephyrus): add GU603H (2021 Zephyrus M16) --- README.md | 1 + asus/zephyrus/gu603h/default.nix | 15 +++++++++++++++ flake.nix | 1 + 3 files changed, 17 insertions(+) create mode 100644 asus/zephyrus/gu603h/default.nix diff --git a/README.md b/README.md index bd850486..30cd5862 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,7 @@ See code for all available configurations. | [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | | [Asus ROG Zephyrus G15 GA502](asus/zephyrus/ga502) | `` | | [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | +| [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Deciso DEC series](deciso/dec) | `` | diff --git a/asus/zephyrus/gu603h/default.nix b/asus/zephyrus/gu603h/default.nix new file mode 100644 index 00000000..b647377b --- /dev/null +++ b/asus/zephyrus/gu603h/default.nix @@ -0,0 +1,15 @@ +{ ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/nvidia/prime.nix + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + hardware.nvidia.prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} diff --git a/flake.nix b/flake.nix index c34bfce3..ed755375 100644 --- a/flake.nix +++ b/flake.nix @@ -23,6 +23,7 @@ asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; asus-zephyrus-ga502 = import ./asus/zephyrus/ga502; asus-zephyrus-ga503 = import ./asus/zephyrus/ga503; + asus-zephyrus-gu603h = import ./asus/zephyrus/gu603h; beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; deciso-dec = import ./deciso/dec; dell-e7240 = import ./dell/e7240; From edc1a8ecbc40459f15c6a75e6993f941aa06674f Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Wed, 25 Oct 2023 01:35:25 -0400 Subject: [PATCH 0624/1476] FW13 7040: Add configuration as default.nix --- README.md | 1 + flake.nix | 1 + framework/7040-amd/README.md | 17 ++++++++++++ framework/7040-amd/default.nix | 49 ++++++++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 framework/7040-amd/README.md create mode 100644 framework/7040-amd/default.nix diff --git a/README.md b/README.md index 30cd5862..a9493ea5 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,7 @@ See code for all available configurations. | [Framework 11th Gen Intel Core](framework) | `` | | [Framework 12th Gen Intel Core](framework/12th-gen-intel) | `` | | [Framework 13th Gen Intel Core](framework/13th-gen-intel) | `` | +| [Framework AMD Ryzen 7040 Series](framework/7040-amd) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | | [Focus M2 Gen 1](focus/m2/gen1) | `` | diff --git a/flake.nix b/flake.nix index ed755375..f5ba9cb9 100644 --- a/flake.nix +++ b/flake.nix @@ -68,6 +68,7 @@ framework = import ./framework; framework-12th-gen-intel = import ./framework/12th-gen-intel; framework-13th-gen-intel = import ./framework/13th-gen-intel; + framework-7040-amd = import ./framework/7040-amd; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; focus-m2-gen1 = import ./focus/m2/gen1; diff --git a/framework/7040-amd/README.md b/framework/7040-amd/README.md new file mode 100644 index 00000000..09fc14f3 --- /dev/null +++ b/framework/7040-amd/README.md @@ -0,0 +1,17 @@ +# [Framework Laptop 13](https://frame.work/) + +## Updating Firmware + +First put enable `fwupd` + +```nix +services.fwupd.enable = true; +``` + +Then run + +```sh + $ sudo fwupdmgr update +``` + +- [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.Ryzen7040.BIOS.firmware) diff --git a/framework/7040-amd/default.nix b/framework/7040-amd/default.nix new file mode 100644 index 00000000..ee976b44 --- /dev/null +++ b/framework/7040-amd/default.nix @@ -0,0 +1,49 @@ +{ lib, pkgs, ... }: { + imports = [ + ../../common/cpu/amd + ../../common/cpu/amd/pstate.nix + ../../common/gpu/amd + ../../common/pc/laptop + ../../common/pc/laptop/ssd + ]; + + boot.kernelParams = [ + # Fixes a regression in s2idle, making it more power efficient than deep sleep + "acpi_osi=\"!Windows 2020\"" + ]; + + # Newer kernel is better for amdgpu driver updates + # Requires at least 5.16 for working wi-fi and bluetooth (RZ616, kmod mt7922): + # https://wireless.wiki.kernel.org/en/users/drivers/mediatek + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") (lib.mkDefault pkgs.linuxPackages_latest); + + # AMD has better battery life with PPD over TLP: + # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 + services.power-profiles-daemon.enable = lib.mkDefault true; + + # Fix TRRS headphones missing a mic + # https://community.frame.work/t/headset-microphone-on-linux/12387/3 + boot.extraModprobeConfig = '' + options snd-hda-intel model=dell-headset-multi + ''; + + # For fingerprint support + services.fprintd.enable = lib.mkDefault true; + + # Custom udev rules + services.udev.extraRules = '' + # Fix headphone noise when on powersave + # https://community.frame.work/t/headphone-jack-intermittent-noise/5246/55 + SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0xa0e0", ATTR{power/control}="on" + # Ethernet expansion card support + ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" + ''; + + # Mis-detected by nixos-generate-config + # https://github.com/NixOS/nixpkgs/issues/171093 + # https://wiki.archlinux.org/title/Framework_Laptop#Changing_the_brightness_of_the_monitor_does_not_work + hardware.acpilight.enable = lib.mkDefault true; + + # Needed for desktop environments to detect/manage display brightness + hardware.sensor.iio.enable = lib.mkDefault true; +} From 24596674bb4edd16d28f82e23c445794144db7e2 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Wed, 25 Oct 2023 13:46:21 -0400 Subject: [PATCH 0625/1476] Remove unnecessary configuration for FW13 7040; use linux_latest above 6.1 --- framework/7040-amd/default.nix | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/framework/7040-amd/default.nix b/framework/7040-amd/default.nix index ee976b44..7b413139 100644 --- a/framework/7040-amd/default.nix +++ b/framework/7040-amd/default.nix @@ -7,15 +7,10 @@ ../../common/pc/laptop/ssd ]; - boot.kernelParams = [ - # Fixes a regression in s2idle, making it more power efficient than deep sleep - "acpi_osi=\"!Windows 2020\"" - ]; - # Newer kernel is better for amdgpu driver updates # Requires at least 5.16 for working wi-fi and bluetooth (RZ616, kmod mt7922): # https://wireless.wiki.kernel.org/en/users/drivers/mediatek - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.1") (lib.mkDefault pkgs.linuxPackages_latest); # AMD has better battery life with PPD over TLP: # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 @@ -32,18 +27,10 @@ # Custom udev rules services.udev.extraRules = '' - # Fix headphone noise when on powersave - # https://community.frame.work/t/headphone-jack-intermittent-noise/5246/55 - SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0xa0e0", ATTR{power/control}="on" # Ethernet expansion card support ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" ''; - # Mis-detected by nixos-generate-config - # https://github.com/NixOS/nixpkgs/issues/171093 - # https://wiki.archlinux.org/title/Framework_Laptop#Changing_the_brightness_of_the_monitor_does_not_work - hardware.acpilight.enable = lib.mkDefault true; - # Needed for desktop environments to detect/manage display brightness hardware.sensor.iio.enable = lib.mkDefault true; } From 376cecdbb2cf2806881af4b3cb325c7a472ab605 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Wed, 25 Oct 2023 14:00:00 -0400 Subject: [PATCH 0626/1476] Do not suggest sudo for running fwupdmgr --- framework/7040-amd/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/7040-amd/README.md b/framework/7040-amd/README.md index 09fc14f3..63608d14 100644 --- a/framework/7040-amd/README.md +++ b/framework/7040-amd/README.md @@ -11,7 +11,7 @@ services.fwupd.enable = true; Then run ```sh - $ sudo fwupdmgr update + $ fwupdmgr update ``` - [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.Ryzen7040.BIOS.firmware) From 55b4caf931477fdfd70b86bae2ca000de18eab88 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Wed, 1 Nov 2023 16:23:29 -0400 Subject: [PATCH 0627/1476] Add 13-inch directory to framework and move new module --- README.md | 2 +- flake.nix | 2 +- framework/{ => 13-inch}/7040-amd/README.md | 0 framework/{ => 13-inch}/7040-amd/default.nix | 10 +++++----- 4 files changed, 7 insertions(+), 7 deletions(-) rename framework/{ => 13-inch}/7040-amd/README.md (100%) rename framework/{ => 13-inch}/7040-amd/default.nix (87%) diff --git a/README.md b/README.md index a9493ea5..a9871968 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ See code for all available configurations. | [Framework 11th Gen Intel Core](framework) | `` | | [Framework 12th Gen Intel Core](framework/12th-gen-intel) | `` | | [Framework 13th Gen Intel Core](framework/13th-gen-intel) | `` | -| [Framework AMD Ryzen 7040 Series](framework/7040-amd) | `` | +| [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | | [Focus M2 Gen 1](focus/m2/gen1) | `` | diff --git a/flake.nix b/flake.nix index f5ba9cb9..eb40bb46 100644 --- a/flake.nix +++ b/flake.nix @@ -68,7 +68,7 @@ framework = import ./framework; framework-12th-gen-intel = import ./framework/12th-gen-intel; framework-13th-gen-intel = import ./framework/13th-gen-intel; - framework-7040-amd = import ./framework/7040-amd; + framework-13-7040-amd = import ./framework/13-inch/7040-amd; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; focus-m2-gen1 = import ./focus/m2/gen1; diff --git a/framework/7040-amd/README.md b/framework/13-inch/7040-amd/README.md similarity index 100% rename from framework/7040-amd/README.md rename to framework/13-inch/7040-amd/README.md diff --git a/framework/7040-amd/default.nix b/framework/13-inch/7040-amd/default.nix similarity index 87% rename from framework/7040-amd/default.nix rename to framework/13-inch/7040-amd/default.nix index 7b413139..71a89cde 100644 --- a/framework/7040-amd/default.nix +++ b/framework/13-inch/7040-amd/default.nix @@ -1,10 +1,10 @@ { lib, pkgs, ... }: { imports = [ - ../../common/cpu/amd - ../../common/cpu/amd/pstate.nix - ../../common/gpu/amd - ../../common/pc/laptop - ../../common/pc/laptop/ssd + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd ]; # Newer kernel is better for amdgpu driver updates From b689465d0c5d88e158e7d76094fca08cc0223aad Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Fri, 10 Nov 2023 16:12:16 -0500 Subject: [PATCH 0628/1476] Add note to mark change as temporary --- framework/13-inch/7040-amd/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/13-inch/7040-amd/default.nix b/framework/13-inch/7040-amd/default.nix index 71a89cde..128ace8a 100644 --- a/framework/13-inch/7040-amd/default.nix +++ b/framework/13-inch/7040-amd/default.nix @@ -18,6 +18,8 @@ # Fix TRRS headphones missing a mic # https://community.frame.work/t/headset-microphone-on-linux/12387/3 + # + # Temporary until a kernel patch is merged to fix this boot.extraModprobeConfig = '' options snd-hda-intel model=dell-headset-multi ''; From da7e364c3dd71cda04828ddad511f0f60c905fa5 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Fri, 10 Nov 2023 15:26:56 -0500 Subject: [PATCH 0629/1476] Reorganize current framework modules into 13-inch directory --- README.md | 6 +-- flake.nix | 5 +- framework/13-inch/11th-gen-intel/README.md | 17 ++++++ framework/13-inch/11th-gen-intel/default.nix | 10 ++++ .../{ => 13-inch}/12th-gen-intel/README.md | 2 +- .../{ => 13-inch}/12th-gen-intel/default.nix | 38 +------------ .../{ => 13-inch}/13th-gen-intel/README.md | 2 +- .../{ => 13-inch}/13th-gen-intel/default.nix | 2 +- framework/13-inch/7040-amd/default.nix | 23 +------- framework/13-inch/default.nix | 32 +++++++++++ framework/13-inch/intel.nix | 30 +++++++++++ framework/README.md | 2 +- framework/default.nix | 54 ++----------------- 13 files changed, 106 insertions(+), 117 deletions(-) create mode 100644 framework/13-inch/11th-gen-intel/README.md create mode 100644 framework/13-inch/11th-gen-intel/default.nix rename framework/{ => 13-inch}/12th-gen-intel/README.md (91%) rename framework/{ => 13-inch}/12th-gen-intel/default.nix (53%) rename framework/{ => 13-inch}/13th-gen-intel/README.md (86%) rename framework/{ => 13-inch}/13th-gen-intel/default.nix (88%) create mode 100644 framework/13-inch/default.nix create mode 100644 framework/13-inch/intel.nix diff --git a/README.md b/README.md index a9871968..70ba0609 100644 --- a/README.md +++ b/README.md @@ -131,9 +131,9 @@ See code for all available configurations. | [Dell XPS 17 9700, nvidia](dell/xps/17-9700/nvidia) | `` | | [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | | [Dell XPS E7240](dell/e7240) | `` | -| [Framework 11th Gen Intel Core](framework) | `` | -| [Framework 12th Gen Intel Core](framework/12th-gen-intel) | `` | -| [Framework 13th Gen Intel Core](framework/13th-gen-intel) | `` | +| [Framework 11th Gen Intel Core](framework/13-inch/11th-gen-intel) | ``| +| [Framework 12th Gen Intel Core](framework/13-inch/12th-gen-intel) | ``| +| [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | ``| | [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | diff --git a/flake.nix b/flake.nix index eb40bb46..051974e2 100644 --- a/flake.nix +++ b/flake.nix @@ -66,8 +66,9 @@ dell-xps-17-9700-nvidia = import ./dell/xps/17-9700/nvidia; dell-xps-17-9710-intel = import ./dell/xps/17-9710/intel; framework = import ./framework; - framework-12th-gen-intel = import ./framework/12th-gen-intel; - framework-13th-gen-intel = import ./framework/13th-gen-intel; + framework-11th-gen-intel = import ./framework/13-inch/11th-gen-intel; + framework-12th-gen-intel = import ./framework/13-inch/12th-gen-intel; + framework-13th-gen-intel = import ./framework/13-inch/13th-gen-intel; framework-13-7040-amd = import ./framework/13-inch/7040-amd; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; diff --git a/framework/13-inch/11th-gen-intel/README.md b/framework/13-inch/11th-gen-intel/README.md new file mode 100644 index 00000000..b1cc561e --- /dev/null +++ b/framework/13-inch/11th-gen-intel/README.md @@ -0,0 +1,17 @@ +# [Framework Laptop 13](https://frame.work/) + +## Updating Firmware + +First put enable `fwupd` + +```nix +services.fwupd.enable = true; +``` + +Then run + +```sh + $ fwupdmgr update +``` + +[Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.TGL.BIOS.firmware) diff --git a/framework/13-inch/11th-gen-intel/default.nix b/framework/13-inch/11th-gen-intel/default.nix new file mode 100644 index 00000000..22e14fd8 --- /dev/null +++ b/framework/13-inch/11th-gen-intel/default.nix @@ -0,0 +1,10 @@ +{ lib, pkgs, ...}: { + imports = [ + ../. + ../intel.nix + ]; + + # Requires at least 5.16 for working wi-fi and bluetooth. + # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") (lib.mkDefault pkgs.linuxPackages_latest); +} diff --git a/framework/12th-gen-intel/README.md b/framework/13-inch/12th-gen-intel/README.md similarity index 91% rename from framework/12th-gen-intel/README.md rename to framework/13-inch/12th-gen-intel/README.md index 104566fb..ca6122eb 100644 --- a/framework/12th-gen-intel/README.md +++ b/framework/13-inch/12th-gen-intel/README.md @@ -11,7 +11,7 @@ services.fwupd.enable = true; Then run ```sh - $ sudo fwupdmgr update + $ fwupdmgr update ``` - [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.ADL.BIOS.firmware) diff --git a/framework/12th-gen-intel/default.nix b/framework/13-inch/12th-gen-intel/default.nix similarity index 53% rename from framework/12th-gen-intel/default.nix rename to framework/13-inch/12th-gen-intel/default.nix index b07d2d5c..345daf23 100644 --- a/framework/12th-gen-intel/default.nix +++ b/framework/13-inch/12th-gen-intel/default.nix @@ -1,17 +1,13 @@ { lib, pkgs, ... }: { imports = [ - ../../common/cpu/intel - ../../common/pc/laptop - ../../common/pc/laptop/ssd + ../. + ../intel.nix ]; boot.kernelParams = [ # For Power consumption # https://kvark.github.io/linux/framework/2021/10/17/framework-nixos.html "mem_sleep_default=deep" - # For Power consumption - # https://community.frame.work/t/linux-battery-life-tuning/6665/156 - "nvme.noacpi=1" # Workaround iGPU hangs # https://discourse.nixos.org/t/intel-12th-gen-igpu-freezes/21768/4 "i915.enable_psr=1" @@ -48,34 +44,4 @@ # https://www.tomshardware.com/news/intel-thread-director-coming-to-linux-5-18 boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.18") (lib.mkDefault pkgs.linuxPackages_latest); - # Fix TRRS headphones missing a mic - # https://community.frame.work/t/headset-microphone-on-linux/12387/3 - boot.extraModprobeConfig = '' - options snd-hda-intel model=dell-headset-multi - ''; - - # For fingerprint support - services.fprintd.enable = lib.mkDefault true; - - # Custom udev rules - services.udev.extraRules = '' - # Fix headphone noise when on powersave - # https://community.frame.work/t/headphone-jack-intermittent-noise/5246/55 - SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0xa0e0", ATTR{power/control}="on" - # Ethernet expansion card support - ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" - ''; - - # Mis-detected by nixos-generate-config - # https://github.com/NixOS/nixpkgs/issues/171093 - # https://wiki.archlinux.org/title/Framework_Laptop#Changing_the_brightness_of_the_monitor_does_not_work - hardware.acpilight.enable = lib.mkDefault true; - - # Fix font sizes in X - # services.xserver.dpi = 200; - - # This adds a patched ectool, to interact with the Embedded Controller - # Can be used to interact with leds from userspace, etc. - # Not part of a nixos release yet, so package only gets added if it exists. - environment.systemPackages = lib.optional (pkgs ? "fw-ectool") pkgs.fw-ectool; } diff --git a/framework/13th-gen-intel/README.md b/framework/13-inch/13th-gen-intel/README.md similarity index 86% rename from framework/13th-gen-intel/README.md rename to framework/13-inch/13th-gen-intel/README.md index fc333d24..8f3b7a42 100644 --- a/framework/13th-gen-intel/README.md +++ b/framework/13-inch/13th-gen-intel/README.md @@ -11,5 +11,5 @@ services.fwupd.enable = true; Then run ```sh - $ sudo fwupdmgr update + $ fwupdmgr update ``` diff --git a/framework/13th-gen-intel/default.nix b/framework/13-inch/13th-gen-intel/default.nix similarity index 88% rename from framework/13th-gen-intel/default.nix rename to framework/13-inch/13th-gen-intel/default.nix index 56a2697a..6912ebba 100644 --- a/framework/13th-gen-intel/default.nix +++ b/framework/13-inch/13th-gen-intel/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: { +{ imports = [ # Same config as 12th Gen. The chipsets and mainboard are similar enough # that no separate configuration is needed. diff --git a/framework/13-inch/7040-amd/default.nix b/framework/13-inch/7040-amd/default.nix index 128ace8a..d6f8b6ee 100644 --- a/framework/13-inch/7040-amd/default.nix +++ b/framework/13-inch/7040-amd/default.nix @@ -1,10 +1,9 @@ { lib, pkgs, ... }: { imports = [ + ../. ../../../common/cpu/amd ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd - ../../../common/pc/laptop - ../../../common/pc/laptop/ssd ]; # Newer kernel is better for amdgpu driver updates @@ -15,24 +14,4 @@ # AMD has better battery life with PPD over TLP: # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 services.power-profiles-daemon.enable = lib.mkDefault true; - - # Fix TRRS headphones missing a mic - # https://community.frame.work/t/headset-microphone-on-linux/12387/3 - # - # Temporary until a kernel patch is merged to fix this - boot.extraModprobeConfig = '' - options snd-hda-intel model=dell-headset-multi - ''; - - # For fingerprint support - services.fprintd.enable = lib.mkDefault true; - - # Custom udev rules - services.udev.extraRules = '' - # Ethernet expansion card support - ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" - ''; - - # Needed for desktop environments to detect/manage display brightness - hardware.sensor.iio.enable = lib.mkDefault true; } diff --git a/framework/13-inch/default.nix b/framework/13-inch/default.nix new file mode 100644 index 00000000..6d44b9ca --- /dev/null +++ b/framework/13-inch/default.nix @@ -0,0 +1,32 @@ +{ lib, pkgs, ... }: { + imports = [ + ../common/pc/laptop + ../common/pc/laptop/ssd + ]; + + # Fix TRRS headphones missing a mic + # https://community.frame.work/t/headset-microphone-on-linux/12387/3 + boot.extraModprobeConfig = '' + options snd-hda-intel model=dell-headset-multi + ''; + + # For fingerprint support + services.fprintd.enable = lib.mkDefault true; + + # Custom udev rules + services.udev.extraRules = '' + # Ethernet expansion card support + ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" + ''; + + # Fix font sizes in X + # services.xserver.dpi = 200; + + # Needed for desktop environments to detect/manage display brightness + hardware.sensor.iio.enable = lib.mkDefault true; + + # This adds a patched ectool, to interact with the Embedded Controller + # Can be used to interact with leds from userspace, etc. + # Not part of a nixos release yet, so package only gets added if it exists. + environment.systemPackages = lib.optional (pkgs ? "fw-ectool") pkgs.fw-ectool; +} diff --git a/framework/13-inch/intel.nix b/framework/13-inch/intel.nix new file mode 100644 index 00000000..a0f3e084 --- /dev/null +++ b/framework/13-inch/intel.nix @@ -0,0 +1,30 @@ +{ lib, pkgs, ... }: { + imports = [ + ../../common/cpu/intel + ]; + + boot.kernelParams = [ + # Fixes a regression in s2idle, making it more power efficient than deep sleep + "acpi_osi=\"!Windows 2020\"" + # For Power consumption + # https://community.frame.work/t/linux-battery-life-tuning/6665/156 + "nvme.noacpi=1" + ]; + + # Requires at least 5.16 for working wi-fi and bluetooth. + # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") (lib.mkDefault pkgs.linuxPackages_latest); + + # Custom udev rules + services.udev.extraRules = '' + # Fix headphone noise when on powersave + # https://community.frame.work/t/headphone-jack-intermittent-noise/5246/55 + SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0xa0e0", ATTR{power/control}="on" + ''; + + # Mis-detected by nixos-generate-config + # https://github.com/NixOS/nixpkgs/issues/171093 + # https://wiki.archlinux.org/title/Framework_Laptop#Changing_the_brightness_of_the_monitor_does_not_work + hardware.acpilight.enable = lib.mkDefault true; + +} diff --git a/framework/README.md b/framework/README.md index 5d54aed2..b1cc561e 100644 --- a/framework/README.md +++ b/framework/README.md @@ -11,7 +11,7 @@ services.fwupd.enable = true; Then run ```sh - $ sudo fwupdmgr update + $ fwupdmgr update ``` [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.TGL.BIOS.firmware) diff --git a/framework/default.nix b/framework/default.nix index a1eff2cd..b693c13e 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -1,53 +1,7 @@ -{ lib, pkgs, ... }: { +{ + # Per original module layout, default framework export was the 11th gen Intel + # of the Framework 13 Laptop imports = [ - ../common/cpu/intel - ../common/pc/laptop - ../common/pc/laptop/ssd + ./13-inch/11th-gen-intel ]; - - boot.kernelParams = [ - # Fixes a regression in s2idle, making it more power efficient than deep sleep - "acpi_osi=\"!Windows 2020\"" - # For Power consumption - # https://community.frame.work/t/linux-battery-life-tuning/6665/156 - "nvme.noacpi=1" - ]; - - # Requires at least 5.16 for working wi-fi and bluetooth. - # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") (lib.mkDefault pkgs.linuxPackages_latest); - - # Fix TRRS headphones missing a mic - # https://community.frame.work/t/headset-microphone-on-linux/12387/3 - boot.extraModprobeConfig = '' - options snd-hda-intel model=dell-headset-multi - ''; - - # For fingerprint support - services.fprintd.enable = lib.mkDefault true; - - # Custom udev rules - services.udev.extraRules = '' - # Fix headphone noise when on powersave - # https://community.frame.work/t/headphone-jack-intermittent-noise/5246/55 - SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0xa0e0", ATTR{power/control}="on" - # Ethernet expansion card support - ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" - ''; - - # Mis-detected by nixos-generate-config - # https://github.com/NixOS/nixpkgs/issues/171093 - # https://wiki.archlinux.org/title/Framework_Laptop#Changing_the_brightness_of_the_monitor_does_not_work - hardware.acpilight.enable = lib.mkDefault true; - - # Needed for desktop environments to detect/manage display brightness - hardware.sensor.iio.enable = lib.mkDefault true; - - # Fix font sizes in X - # services.xserver.dpi = 200; - - # This adds a patched ectool, to interact with the Embedded Controller - # Can be used to interact with leds from userspace, etc. - # Not part of a nixos release yet, so package only gets added if it exists. - environment.systemPackages = lib.optional (pkgs ? "fw-ectool") pkgs.fw-ectool; } From 5f6b875273c1725eda9c2163c1e729a1a0b92168 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Fri, 10 Nov 2023 15:29:39 -0500 Subject: [PATCH 0630/1476] Fix common module imports for fw13 common module --- framework/13-inch/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/13-inch/default.nix b/framework/13-inch/default.nix index 6d44b9ca..111bdf75 100644 --- a/framework/13-inch/default.nix +++ b/framework/13-inch/default.nix @@ -1,7 +1,7 @@ { lib, pkgs, ... }: { imports = [ - ../common/pc/laptop - ../common/pc/laptop/ssd + ../../common/pc/laptop + ../../common/pc/laptop/ssd ]; # Fix TRRS headphones missing a mic From de0c9310d397fa9f954d364ef738f5b11935c7b3 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Fri, 10 Nov 2023 16:10:31 -0500 Subject: [PATCH 0631/1476] Move common modules into folder --- framework/13-inch/11th-gen-intel/default.nix | 4 ++-- framework/13-inch/12th-gen-intel/default.nix | 4 ++-- framework/13-inch/7040-amd/default.nix | 10 ++-------- framework/13-inch/common/amd.nix | 11 +++++++++++ framework/13-inch/{ => common}/default.nix | 9 +++------ framework/13-inch/{ => common}/intel.nix | 5 +++++ 6 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 framework/13-inch/common/amd.nix rename framework/13-inch/{ => common}/default.nix (70%) rename framework/13-inch/{ => common}/intel.nix (79%) diff --git a/framework/13-inch/11th-gen-intel/default.nix b/framework/13-inch/11th-gen-intel/default.nix index 22e14fd8..a29966f5 100644 --- a/framework/13-inch/11th-gen-intel/default.nix +++ b/framework/13-inch/11th-gen-intel/default.nix @@ -1,7 +1,7 @@ { lib, pkgs, ...}: { imports = [ - ../. - ../intel.nix + ../common + ../common/intel.nix ]; # Requires at least 5.16 for working wi-fi and bluetooth. diff --git a/framework/13-inch/12th-gen-intel/default.nix b/framework/13-inch/12th-gen-intel/default.nix index 345daf23..315c6882 100644 --- a/framework/13-inch/12th-gen-intel/default.nix +++ b/framework/13-inch/12th-gen-intel/default.nix @@ -1,7 +1,7 @@ { lib, pkgs, ... }: { imports = [ - ../. - ../intel.nix + ../common + ../common/intel.nix ]; boot.kernelParams = [ diff --git a/framework/13-inch/7040-amd/default.nix b/framework/13-inch/7040-amd/default.nix index d6f8b6ee..991221ae 100644 --- a/framework/13-inch/7040-amd/default.nix +++ b/framework/13-inch/7040-amd/default.nix @@ -1,17 +1,11 @@ { lib, pkgs, ... }: { imports = [ - ../. - ../../../common/cpu/amd - ../../../common/cpu/amd/pstate.nix - ../../../common/gpu/amd + ../common + ../common/amd.nix ]; # Newer kernel is better for amdgpu driver updates # Requires at least 5.16 for working wi-fi and bluetooth (RZ616, kmod mt7922): # 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); - - # AMD has better battery life with PPD over TLP: - # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 - services.power-profiles-daemon.enable = lib.mkDefault true; } diff --git a/framework/13-inch/common/amd.nix b/framework/13-inch/common/amd.nix new file mode 100644 index 00000000..249f6f39 --- /dev/null +++ b/framework/13-inch/common/amd.nix @@ -0,0 +1,11 @@ +{ lib, ... }: { + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ]; + + # AMD has better battery life with PPD over TLP: + # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 + services.power-profiles-daemon.enable = lib.mkDefault true; +} diff --git a/framework/13-inch/default.nix b/framework/13-inch/common/default.nix similarity index 70% rename from framework/13-inch/default.nix rename to framework/13-inch/common/default.nix index 111bdf75..784256cb 100644 --- a/framework/13-inch/default.nix +++ b/framework/13-inch/common/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: { +{ lib, ... }: { imports = [ ../../common/pc/laptop ../../common/pc/laptop/ssd @@ -6,6 +6,8 @@ # 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 = '' options snd-hda-intel model=dell-headset-multi ''; @@ -24,9 +26,4 @@ # Needed for desktop environments to detect/manage display brightness hardware.sensor.iio.enable = lib.mkDefault true; - - # This adds a patched ectool, to interact with the Embedded Controller - # Can be used to interact with leds from userspace, etc. - # Not part of a nixos release yet, so package only gets added if it exists. - environment.systemPackages = lib.optional (pkgs ? "fw-ectool") pkgs.fw-ectool; } diff --git a/framework/13-inch/intel.nix b/framework/13-inch/common/intel.nix similarity index 79% rename from framework/13-inch/intel.nix rename to framework/13-inch/common/intel.nix index a0f3e084..1ea20b3f 100644 --- a/framework/13-inch/intel.nix +++ b/framework/13-inch/common/intel.nix @@ -27,4 +27,9 @@ # https://wiki.archlinux.org/title/Framework_Laptop#Changing_the_brightness_of_the_monitor_does_not_work hardware.acpilight.enable = lib.mkDefault true; + # This adds a patched ectool, to interact with the Embedded Controller + # Can be used to interact with leds from userspace, etc. + # Not part of a nixos release yet, so package only gets added if it exists. + environment.systemPackages = lib.optional (pkgs ? "fw-ectool") pkgs.fw-ectool; + } From 87d3381c789dca7d87c99ebf009307c8ac8666e1 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Fri, 10 Nov 2023 16:10:54 -0500 Subject: [PATCH 0632/1476] Add assertion for default framework import --- framework/OLD-BEHAVIOUR-DEPRECATION.md | 34 ++++++++++++++++++++++++++ framework/default.nix | 9 ++++--- 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 framework/OLD-BEHAVIOUR-DEPRECATION.md diff --git a/framework/OLD-BEHAVIOUR-DEPRECATION.md b/framework/OLD-BEHAVIOUR-DEPRECATION.md new file mode 100644 index 00000000..4f8f4a11 --- /dev/null +++ b/framework/OLD-BEHAVIOUR-DEPRECATION.md @@ -0,0 +1,34 @@ +# Changes to the framework top-level + +## Overview + +When the framework profile was created, there weren't other models of laptop available by the +company. Now there are multiple generations of the Framework 13, and the Framework 16 shipping by +the end of 2023. + +## How to update + +By preference, there will already be a specialised module for your model's configuration. + +If not and you have a 13-inch model, the common module under `framework/13-inch/common/default.nix` +can be imported directly, and the options provided can be used in your own system's configuration. + +Alternatively, you can create a new specialisation for your model under `framework` configured for +that model. + +## Changes + +### 13-inch profile + +All of the existing modules have been reconfigured to be under the `framework/13-inch` folder. + +The 12th and 13th gen Intel Framework 13's had their own specialisation modules separately available +already. To mirror those modules, the 11th gen Intel Framework 13 configuration has been moved to +`framework/13-inch/11th-gen-intel/default.nix`. + +### "Common" modules + +Tools / services that are shared among several models are now extracted to their own module under +`13-inch/common/` and imported by `13-inch/common/default.nix`. There were several tweaks for +11th gen/12th gen that were duplicated and are now a part of common modules. + diff --git a/framework/default.nix b/framework/default.nix index b693c13e..b8c6c128 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -1,7 +1,8 @@ { - # Per original module layout, default framework export was the 11th gen Intel - # of the Framework 13 Laptop - imports = [ - ./13-inch/11th-gen-intel + assertions = [ + { + assertion = false; + message = "Importing framework/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/framework/OLD-BEHAVIOUR-DEPRECATED.md for more details."; + } ]; } From a14a7746f971f1c1e34b659c8cbbca4aa1717275 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Sat, 11 Nov 2023 16:25:20 -0500 Subject: [PATCH 0633/1476] Fix module paths for common framework modules --- framework/13-inch/common/default.nix | 4 ++-- framework/13-inch/common/intel.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/13-inch/common/default.nix b/framework/13-inch/common/default.nix index 784256cb..e19b3f5f 100644 --- a/framework/13-inch/common/default.nix +++ b/framework/13-inch/common/default.nix @@ -1,7 +1,7 @@ { lib, ... }: { imports = [ - ../../common/pc/laptop - ../../common/pc/laptop/ssd + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd ]; # Fix TRRS headphones missing a mic diff --git a/framework/13-inch/common/intel.nix b/framework/13-inch/common/intel.nix index 1ea20b3f..d5c68efa 100644 --- a/framework/13-inch/common/intel.nix +++ b/framework/13-inch/common/intel.nix @@ -1,6 +1,6 @@ { lib, pkgs, ... }: { imports = [ - ../../common/cpu/intel + ../../../common/cpu/intel ]; boot.kernelParams = [ From ec3609cc5977c39362fb8460470f31d39ebe891b Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Sat, 11 Nov 2023 16:32:26 -0500 Subject: [PATCH 0634/1476] Explicitly speak of 11th gen Intel Framework new profile --- framework/OLD-BEHAVIOUR-DEPRECATION.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/OLD-BEHAVIOUR-DEPRECATION.md b/framework/OLD-BEHAVIOUR-DEPRECATION.md index 4f8f4a11..5dbadb63 100644 --- a/framework/OLD-BEHAVIOUR-DEPRECATION.md +++ b/framework/OLD-BEHAVIOUR-DEPRECATION.md @@ -8,7 +8,9 @@ the end of 2023. ## How to update -By preference, there will already be a specialised module for your model's configuration. +By preference, there will already be a specialised module for your model's configuration. If you +have an 11th gen Intel Framework 13 and were importing the `framework` profile, you would need to +update to use the `framework-11th-gen-intel` profile instead. If not and you have a 13-inch model, the common module under `framework/13-inch/common/default.nix` can be imported directly, and the options provided can be used in your own system's configuration. From 502d05fcf628c76ccdbecbd645f2808529e55b5d Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Sat, 11 Nov 2023 17:19:50 -0500 Subject: [PATCH 0635/1476] framework: Add notice to README.md --- framework/README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/framework/README.md b/framework/README.md index b1cc561e..2dd58aa6 100644 --- a/framework/README.md +++ b/framework/README.md @@ -1,4 +1,9 @@ -# [Framework Laptop 13](https://frame.work/) +# NOTE: Structure changes from 2023-11-11 + +Please read the [Deprecated Behaviour README](./OLD-BEHAVIOUR-DEPRECATION.md) to understand how some structural changes to +the code might affect you! + +# [Framework Laptops](https://frame.work/) ## Updating Firmware @@ -14,4 +19,17 @@ Then run $ fwupdmgr update ``` -[Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.TGL.BIOS.firmware) +## Common Modules + +For the Framework 13 laptops, there are common configuration modules available under the `13-inch/common/` directory, +including some modules specific to AMD- or Intel-based laptops. By preference, there will already be a specialised +module for your model's configuration. Otherwise, it can be added alongside the existing modules. + +## Support Tools + +### fw-ectool + +There is a `fw-ectool` package available in nixpkgs-unstable that provides some system configuration options via the EC. +This ectool only works with the Intel-based Framework laptops at present, as the Framework EC for AMD-based mainboards +is based on the Zephyr port of the ChromeOS EC, which involves a slightly changed communication interface. + From a6426241a5e003a6ff22ac24a896e43332d4a6cc Mon Sep 17 00:00:00 2001 From: Tom Vincent Date: Mon, 13 Nov 2023 22:32:05 +0000 Subject: [PATCH 0636/1476] feat(framework): add suspend udev hint --- framework/13-inch/7040-amd/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/framework/13-inch/7040-amd/default.nix b/framework/13-inch/7040-amd/default.nix index 128ace8a..2d98f17b 100644 --- a/framework/13-inch/7040-amd/default.nix +++ b/framework/13-inch/7040-amd/default.nix @@ -31,6 +31,10 @@ services.udev.extraRules = '' # Ethernet expansion card support ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" + + # 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" ''; # Needed for desktop environments to detect/manage display brightness From c0fa269fe95b48af852ff93263ef5a5f57721086 Mon Sep 17 00:00:00 2001 From: Tom Vincent Date: Mon, 13 Nov 2023 22:40:45 +0000 Subject: [PATCH 0637/1476] Update README.md --- framework/13-inch/7040-amd/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/framework/13-inch/7040-amd/README.md b/framework/13-inch/7040-amd/README.md index 63608d14..8ad0dbbd 100644 --- a/framework/13-inch/7040-amd/README.md +++ b/framework/13-inch/7040-amd/README.md @@ -15,3 +15,17 @@ Then run ``` - [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.Ryzen7040.BIOS.firmware) + +## 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. + +```nix +services.udev.extraRules = '' +# 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" +''; +``` + +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). From 9eb41407ab93fd7f2876defdf459945f24f1b54c Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sat, 14 Oct 2023 12:29:57 +0200 Subject: [PATCH 0638/1476] surface: linux 6.5.5 -> 6.5.7 --- microsoft/surface/common/default.nix | 2 +- microsoft/surface/common/kernel/default.nix | 2 +- .../kernel/{linux-6.5.5 => linux-6.5.7}/default.nix | 8 ++++---- .../kernel/{linux-6.5.5 => linux-6.5.7}/patches.nix | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename microsoft/surface/common/kernel/{linux-6.5.5 => linux-6.5.7}/default.nix (80%) rename microsoft/surface/common/kernel/{linux-6.5.5 => linux-6.5.7}/patches.nix (100%) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 29ae5dce..2aec8db3 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.5.5"; + microsoft-surface.kernelVersion = mkDefault "6.5.7"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index 0799b46a..95dce720 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -6,7 +6,7 @@ let in { imports = [ ./linux-6.1.55 - ./linux-6.5.5 + ./linux-6.5.7 ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.5.5/default.nix b/microsoft/surface/common/kernel/linux-6.5.7/default.nix similarity index 80% rename from microsoft/surface/common/kernel/linux-6.5.5/default.nix rename to microsoft/surface/common/kernel/linux-6.5.7/default.nix index 485063a7..fe6825bf 100644 --- a/microsoft/surface/common/kernel/linux-6.5.5/default.nix +++ b/microsoft/surface/common/kernel/linux-6.5.7/default.nix @@ -8,7 +8,7 @@ let cfg = config.microsoft-surface; - version = "6.5.5"; + version = "6.5.7"; extraMeta.branch = "6.5"; patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; kernelPatches = pkgs.callPackage ./patches.nix { @@ -20,17 +20,17 @@ let inherit version extraMeta kernelPatches; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "15gg8sb6cfgk1afwj7fl7mj4nkj14w43vzwvw0qsg3nzyxwh7wcc"; + sha256 = "135v3y2vgc83dca4xi7q52wqi4dkfal74k1y73jwzj85h12fl28d"; }; }; in { options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ "6.5.5" ]; + type = types.enum [ "6.5.7" ]; }; - config = mkIf (cfg.kernelVersion == "6.5.5") { + config = mkIf (cfg.kernelVersion == "6.5.7") { boot = { inherit kernelPackages; }; diff --git a/microsoft/surface/common/kernel/linux-6.5.5/patches.nix b/microsoft/surface/common/kernel/linux-6.5.7/patches.nix similarity index 100% rename from microsoft/surface/common/kernel/linux-6.5.5/patches.nix rename to microsoft/surface/common/kernel/linux-6.5.7/patches.nix From 27ac7d57bcfe6609281c1a31a1577470bcfd5db9 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sat, 14 Oct 2023 12:30:33 +0200 Subject: [PATCH 0639/1476] surface: linux 6.1.55 -> 6.1.57 --- microsoft/surface/common/kernel/default.nix | 2 +- .../kernel/{linux-6.1.55 => linux-6.1.57}/default.nix | 8 ++++---- .../kernel/{linux-6.1.55 => linux-6.1.57}/patches.nix | 0 microsoft/surface/surface-go/default.nix | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename microsoft/surface/common/kernel/{linux-6.1.55 => linux-6.1.57}/default.nix (80%) rename microsoft/surface/common/kernel/{linux-6.1.55 => linux-6.1.57}/patches.nix (100%) diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index 95dce720..93ac0e7f 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -5,7 +5,7 @@ let in { imports = [ - ./linux-6.1.55 + ./linux-6.1.57 ./linux-6.5.7 ]; diff --git a/microsoft/surface/common/kernel/linux-6.1.55/default.nix b/microsoft/surface/common/kernel/linux-6.1.57/default.nix similarity index 80% rename from microsoft/surface/common/kernel/linux-6.1.55/default.nix rename to microsoft/surface/common/kernel/linux-6.1.57/default.nix index 7119a3d4..76c21dea 100644 --- a/microsoft/surface/common/kernel/linux-6.1.55/default.nix +++ b/microsoft/surface/common/kernel/linux-6.1.57/default.nix @@ -8,7 +8,7 @@ let cfg = config.microsoft-surface; - version = "6.1.55"; + version = "6.1.57"; extraMeta.branch = "6.1"; patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; kernelPatches = pkgs.callPackage ./patches.nix { @@ -20,17 +20,17 @@ let inherit version extraMeta kernelPatches; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "1h0mzx52q9pvdv7rhnvb8g68i7bnlc9rf8gy9qn4alsxq4g28zm8"; + sha256 = "1ccidrxswblxw9yaa45y6ds16pc7647f6fz36xxxhljivhyzxszr"; }; }; in { options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ "6.1.55" ]; + type = types.enum [ "6.1.57" ]; }; - config = mkIf (cfg.kernelVersion == "6.1.55") { + config = mkIf (cfg.kernelVersion == "6.1.57") { boot = { inherit kernelPackages; }; diff --git a/microsoft/surface/common/kernel/linux-6.1.55/patches.nix b/microsoft/surface/common/kernel/linux-6.1.57/patches.nix similarity index 100% rename from microsoft/surface/common/kernel/linux-6.1.55/patches.nix rename to microsoft/surface/common/kernel/linux-6.1.57/patches.nix diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix index 31f48042..efd70750 100644 --- a/microsoft/surface/surface-go/default.nix +++ b/microsoft/surface/surface-go/default.nix @@ -17,7 +17,7 @@ in { ../../../common/cpu/intel/kaby-lake ]; - microsoft-surface.kernelVersion = "6.1.55"; + microsoft-surface.kernelVersion = "6.1.57"; boot.kernelParams = [ "i915.enable_rc6=1" From 8bb2d5ca134832da48fe515a60a039d192f071a5 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sun, 12 Nov 2023 11:23:14 +0100 Subject: [PATCH 0640/1476] surface: linux 6.1.57 -> 6.1.62 --- microsoft/surface/common/kernel/default.nix | 2 +- .../kernel/{linux-6.1.57 => linux-6.1.x}/default.nix | 8 ++++---- .../kernel/{linux-6.1.57 => linux-6.1.x}/patches.nix | 0 microsoft/surface/surface-go/default.nix | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename microsoft/surface/common/kernel/{linux-6.1.57 => linux-6.1.x}/default.nix (80%) rename microsoft/surface/common/kernel/{linux-6.1.57 => linux-6.1.x}/patches.nix (100%) diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index 93ac0e7f..a209460c 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -5,8 +5,8 @@ let in { imports = [ - ./linux-6.1.57 ./linux-6.5.7 + ./linux-6.1.x ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.1.57/default.nix b/microsoft/surface/common/kernel/linux-6.1.x/default.nix similarity index 80% rename from microsoft/surface/common/kernel/linux-6.1.57/default.nix rename to microsoft/surface/common/kernel/linux-6.1.x/default.nix index 76c21dea..05ec4cf2 100644 --- a/microsoft/surface/common/kernel/linux-6.1.57/default.nix +++ b/microsoft/surface/common/kernel/linux-6.1.x/default.nix @@ -8,7 +8,7 @@ let cfg = config.microsoft-surface; - version = "6.1.57"; + version = "6.1.62"; extraMeta.branch = "6.1"; patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; kernelPatches = pkgs.callPackage ./patches.nix { @@ -20,17 +20,17 @@ let inherit version extraMeta kernelPatches; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "1ccidrxswblxw9yaa45y6ds16pc7647f6fz36xxxhljivhyzxszr"; + sha256 = "sha256-uf1hb6zWvs/O74i5vnGNDxZiXKs/6B0ROEgCpwkehew="; }; }; in { options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ "6.1.57" ]; + type = types.enum [ version ]; }; - config = mkIf (cfg.kernelVersion == "6.1.57") { + config = mkIf (cfg.kernelVersion == version ) { boot = { inherit kernelPackages; }; diff --git a/microsoft/surface/common/kernel/linux-6.1.57/patches.nix b/microsoft/surface/common/kernel/linux-6.1.x/patches.nix similarity index 100% rename from microsoft/surface/common/kernel/linux-6.1.57/patches.nix rename to microsoft/surface/common/kernel/linux-6.1.x/patches.nix diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix index efd70750..a1073ddd 100644 --- a/microsoft/surface/surface-go/default.nix +++ b/microsoft/surface/surface-go/default.nix @@ -17,7 +17,7 @@ in { ../../../common/cpu/intel/kaby-lake ]; - microsoft-surface.kernelVersion = "6.1.57"; + microsoft-surface.kernelVersion = "6.1.62"; boot.kernelParams = [ "i915.enable_rc6=1" From df9bb8a436607da124e8cfa0fd19e70e9d9e0b7b Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sun, 12 Nov 2023 11:23:50 +0100 Subject: [PATCH 0641/1476] surface: linux 6.5.7 -> 6.5.11 --- microsoft/surface/common/default.nix | 2 +- microsoft/surface/common/kernel/default.nix | 2 +- .../kernel/{linux-6.5.7 => linux-6.5.x}/default.nix | 8 ++++---- .../kernel/{linux-6.5.7 => linux-6.5.x}/patches.nix | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename microsoft/surface/common/kernel/{linux-6.5.7 => linux-6.5.x}/default.nix (80%) rename microsoft/surface/common/kernel/{linux-6.5.7 => linux-6.5.x}/patches.nix (100%) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 2aec8db3..b6b00eec 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.5.7"; + microsoft-surface.kernelVersion = mkDefault "6.5.11"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index a209460c..a0637a35 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -5,8 +5,8 @@ let in { imports = [ - ./linux-6.5.7 ./linux-6.1.x + ./linux-6.5.x ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.5.7/default.nix b/microsoft/surface/common/kernel/linux-6.5.x/default.nix similarity index 80% rename from microsoft/surface/common/kernel/linux-6.5.7/default.nix rename to microsoft/surface/common/kernel/linux-6.5.x/default.nix index fe6825bf..b26b466a 100644 --- a/microsoft/surface/common/kernel/linux-6.5.7/default.nix +++ b/microsoft/surface/common/kernel/linux-6.5.x/default.nix @@ -8,7 +8,7 @@ let cfg = config.microsoft-surface; - version = "6.5.7"; + version = "6.5.11"; extraMeta.branch = "6.5"; patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; kernelPatches = pkgs.callPackage ./patches.nix { @@ -20,17 +20,17 @@ let inherit version extraMeta kernelPatches; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "135v3y2vgc83dca4xi7q52wqi4dkfal74k1y73jwzj85h12fl28d"; + sha256 = "sha256-LuJK+SgrgJI7LaVrcKrX3y6O5OPwdkUuBbpmviBZtRk="; }; }; in { options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ "6.5.7" ]; + type = types.enum [ version ]; }; - config = mkIf (cfg.kernelVersion == "6.5.7") { + config = mkIf (cfg.kernelVersion == version) { boot = { inherit kernelPackages; }; diff --git a/microsoft/surface/common/kernel/linux-6.5.7/patches.nix b/microsoft/surface/common/kernel/linux-6.5.x/patches.nix similarity index 100% rename from microsoft/surface/common/kernel/linux-6.5.7/patches.nix rename to microsoft/surface/common/kernel/linux-6.5.x/patches.nix From 9d09a7452ccf99f2ddfca1a349758312cc5d569c Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 14 Nov 2023 20:47:59 +0100 Subject: [PATCH 0642/1476] raspberry-pi/4: format --- raspberry-pi/4/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index 5645d477..1c55265c 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -5,17 +5,17 @@ ./audio.nix ./backlight.nix ./cpu-revision.nix + ./digi-amp-plus.nix ./dwc2.nix ./i2c.nix ./modesetting.nix + ./pkgs-overlays.nix ./poe-hat.nix ./poe-plus-hat.nix + ./pwm0.nix ./tc358743.nix ./touch-ft5406.nix - ./pwm0.nix - ./pkgs-overlays.nix ./xhci.nix - ./digi-amp-plus.nix ]; boot = { @@ -24,7 +24,7 @@ "usbhid" "usb_storage" "vc4" - "pcie_brcmstb" # required for the pcie bus to work + "pcie_brcmstb" # required for the pcie bus to work "reset-raspberrypi" # required for vl805 firmware to load ]; From a742fe3a04105756d6a700ef1e885b326b7e57cd Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 14 Nov 2023 20:48:59 +0100 Subject: [PATCH 0643/1476] raspberry-pi/4: add led disable overlay --- raspberry-pi/4/default.nix | 1 + raspberry-pi/4/leds.nix | 116 +++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 raspberry-pi/4/leds.nix diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index 1c55265c..41d065af 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -8,6 +8,7 @@ ./digi-amp-plus.nix ./dwc2.nix ./i2c.nix + ./leds.nix ./modesetting.nix ./pkgs-overlays.nix ./poe-hat.nix diff --git a/raspberry-pi/4/leds.nix b/raspberry-pi/4/leds.nix new file mode 100644 index 00000000..1f2404dd --- /dev/null +++ b/raspberry-pi/4/leds.nix @@ -0,0 +1,116 @@ +{ config, lib, ... }: + +let + cfg = config.hardware.raspberry-pi."4".leds; +in +{ + options.hardware = { + raspberry-pi."4".leds = { + disable-eth = lib.mkEnableOption '' + disable ethernet LEDs. + ''; + disable-act = lib.mkEnableOption '' + disable activity LED. + ''; + disable-pwr = lib.mkEnableOption '' + disable power LED. + ''; + }; + }; + + # Adapted from: https://gist.github.com/SFrijters/206d2c09656affb04284f076c75a1969 + config = lib.mkMerge [ + (lib.mkIf cfg.disable-eth { + hardware.deviceTree = { + overlays = [ + # https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README + # eth_led0 Set mode of LED0 - amber on Pi3B+ (default "1"), + # green on Pi4 (default "0"). + # The legal values are: + # + # Pi4 + # + # 0=Speed/Activity 1=Speed + # 2=Flash activity 3=FDX + # 4=Off 5=On + # 6=Alt 7=Speed/Flash + # 8=Link 9=Activity + # + # Debugging: + # $ hexdump /proc/device-tree/scb/ethernet@7d580000/mdio@e14/ethernet-phy@1/led-modes + { + name = "disable-eth-leds"; + filter = "*rpi-4-b*"; + dtsText = '' + /dts-v1/; + /plugin/; + /{ + compatible = "raspberrypi,4-model-b"; + fragment@0 { + target = <&phy1>; + __overlay__ { + led-modes = <0x04 0x04>; + }; + }; + }; + ''; + } + ]; + }; + }) + (lib.mkIf cfg.disable-act { + hardware.deviceTree = { + overlays = [ + # Debugging: + # $ hexdump /proc/device-tree/leds/led-act/gpios + # $ cat /proc/device-tree/leds/led-act/linux,default-trigger + { + name = "disable-act-led"; + filter = "*rpi-4-b*"; + dtsText = '' + /dts-v1/; + /plugin/; + /{ + compatible = "raspberrypi,4-model-b"; + fragment@0 { + target = <&act_led>; + __overlay__ { + gpios = <&gpio 42 0>; /* first two values copied from bcm2711-rpi-4-b.dts */ + linux,default-trigger = "none"; + }; + }; + }; + ''; + } + ]; + }; + }) + (lib.mkIf cfg.disable-pwr { + hardware.deviceTree = { + overlays = [ + # Debugging: + # $ hexdump /proc/device-tree/leds/led-pwr/gpios + # $ cat /proc/device-tree/leds/led-pwr/linux,default-trigger + { + name = "disable-pwr-led"; + filter = "*rpi-4-b*"; + dtsText = '' + /dts-v1/; + /plugin/; + /{ + compatible = "raspberrypi,4-model-b"; + fragment@0 { + target = <&pwr_led>; + __overlay__ { + gpios = <&expgpio 2 0>; /* first two values copied from bcm2711-rpi-4-b.dts */ + linux,default-trigger = "default-on"; + }; + }; + }; + ''; + } + ]; + }; + }) + ]; +} From 5689f3ebf899f644a1aabe8774d4f37eb2f6c2f9 Mon Sep 17 00:00:00 2001 From: Naufal Fikri Date: Tue, 14 Nov 2023 22:34:58 +1100 Subject: [PATCH 0644/1476] Fixed broken links in deprecation assertions for framework and surface modules. --- framework/default.nix | 2 +- microsoft/surface/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/default.nix b/framework/default.nix index b8c6c128..b00c4813 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -2,7 +2,7 @@ assertions = [ { assertion = false; - message = "Importing framework/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/framework/OLD-BEHAVIOUR-DEPRECATED.md for more details."; + message = "Importing framework/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/framework/OLD-BEHAVIOUR-DEPRECATION.md for more details."; } ]; } diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 1943157a..25b33a08 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -4,7 +4,7 @@ assertions = [ { assertion = false; - message = "Importing microsoft/surface/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/microsoft/surface/OLD-BEHAVIOUR-DEPRECATED.md for more details."; + message = "Importing microsoft/surface/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md for more details."; } ]; } From f2d7c0b23c507e0823508948f3b002c9c6d5a586 Mon Sep 17 00:00:00 2001 From: Jack Kelly Date: Thu, 16 Nov 2023 10:19:02 +1000 Subject: [PATCH 0645/1476] framework AMD 7040: Add config option for wake-on-AC fix --- framework/13-inch/7040-amd/default.nix | 42 +++++++++++++++++++------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/framework/13-inch/7040-amd/default.nix b/framework/13-inch/7040-amd/default.nix index 3d4277da..9f31c6be 100644 --- a/framework/13-inch/7040-amd/default.nix +++ b/framework/13-inch/7040-amd/default.nix @@ -1,18 +1,38 @@ -{ lib, pkgs, ... }: { +{ config, lib, pkgs, ... }: + +let + cfg = config.hardware.framework.amd-7040; +in +{ imports = [ ../common ../common/amd.nix ]; - # Newer kernel is better for amdgpu driver updates - # Requires at least 5.16 for working wi-fi and bluetooth (RZ616, kmod mt7922): - # 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); + options = { + hardware.framework.amd-7040.preventWakeOnAC = lib.mkOption { + type = lib.types.bool; + default = false; + description = '' + Stop the system waking from suspend when the AC is plugged + in. The catch: it also disables waking from the keyboard. - # Custom udev rules - services.udev.extraRules = '' - # 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" - ''; + See: + https://community.frame.work/t/tracking-framework-amd-ryzen-7040-series-lid-wakeup-behavior-feedback/39128/45 + ''; + }; + }; + + config = { + # Newer kernel is better for amdgpu driver updates + # Requires at least 5.16 for working wi-fi and bluetooth (RZ616, kmod mt7922): + # 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 '' + # 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 eb903ed873af4063bf400ac988b03465fef51129 Mon Sep 17 00:00:00 2001 From: Tom Vincent Date: Thu, 16 Nov 2023 10:54:41 +0000 Subject: [PATCH 0646/1476] Update README.md --- framework/13-inch/7040-amd/README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/framework/13-inch/7040-amd/README.md b/framework/13-inch/7040-amd/README.md index 8ad0dbbd..be3293e7 100644 --- a/framework/13-inch/7040-amd/README.md +++ b/framework/13-inch/7040-amd/README.md @@ -21,11 +21,9 @@ Then run 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. ```nix -services.udev.extraRules = '' -# 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" -''; +{ + hardware.framework.amd-7040.preventWakeOnAC = true; +} ``` 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). From e27bf85b46cb6325d6052144d63a26935f8b1cfb Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Wed, 15 Nov 2023 13:26:23 -0500 Subject: [PATCH 0647/1476] starfive visionfive2: update u-boot to SDK version v3.8.2 --- starfive/visionfive/v2/uboot.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/starfive/visionfive/v2/uboot.nix b/starfive/visionfive/v2/uboot.nix index be530b71..9666175e 100644 --- a/starfive/visionfive/v2/uboot.nix +++ b/starfive/visionfive/v2/uboot.nix @@ -1,13 +1,13 @@ { fetchFromGitHub, buildUBoot }: buildUBoot rec { - version = "3.7.5"; + version = "3.8.2"; src = fetchFromGitHub { owner = "starfive-tech"; repo = "u-boot"; rev = "refs/tags/VF2_v${version}"; - hash = "sha256-/BCWN+lbMaOakfwwCDloutFEX8IYQyCIrkE1Yu6T8oI="; + hash = "sha256-M/ndil++spcJCYnpYLb+fuxqCi4H3BunXdHbl529ovM="; }; defconfig = "starfive_visionfive2_defconfig"; From 1721da31f9b30cbf4460c4ec5068b3b6174a4694 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Wed, 15 Nov 2023 13:22:54 -0500 Subject: [PATCH 0648/1476] starfive visionfive2: update kernel to 6.6.0 --- starfive/visionfive/v2/default.nix | 2 +- starfive/visionfive/v2/{linux-6.5.nix => linux-6.6.nix} | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename starfive/visionfive/v2/{linux-6.5.nix => linux-6.6.nix} (80%) diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index 1a3c66c5..62cfe630 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -4,7 +4,7 @@ supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; consoleLogLevel = lib.mkDefault 7; - kernelPackages = lib.mkDefault (pkgs.callPackage ./linux-6.5.nix { + kernelPackages = lib.mkDefault (pkgs.callPackage ./linux-6.6.nix { inherit (config.boot) kernelPatches; }); diff --git a/starfive/visionfive/v2/linux-6.5.nix b/starfive/visionfive/v2/linux-6.6.nix similarity index 80% rename from starfive/visionfive/v2/linux-6.5.nix rename to starfive/visionfive/v2/linux-6.6.nix index a2793051..8e7b4459 100644 --- a/starfive/visionfive/v2/linux-6.5.nix +++ b/starfive/visionfive/v2/linux-6.6.nix @@ -1,7 +1,7 @@ { lib, callPackage, linuxPackagesFor, kernelPatches, ... }: let - modDirVersion = "6.5.0"; + modDirVersion = "6.6.0"; linuxPkg = { lib, fetchFromGitHub, buildLinux, ... }@args: buildLinux (args // { version = "${modDirVersion}-starfive-visionfive2"; @@ -9,8 +9,8 @@ let src = fetchFromGitHub { owner = "starfive-tech"; repo = "linux"; - rev = "0dfeb6ace464f0c455a9508815bb9f70760d6faf"; - hash = "sha256-ZDMvEhnJtbyCVNI/WbE80k7ZWOldF491mgx6K/iPgdE="; + rev = "7ccbe4604c1498e880cc63c7e8b45e3c55914d6d"; + hash = "sha256-iO7tnnWYfveVbyvVZKL0dDLwONijt1n0RUD1kTkOQew="; }; inherit modDirVersion kernelPatches; From 89e68213709d78509994178dc3e56643cc2af629 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sat, 18 Nov 2023 15:44:43 +0100 Subject: [PATCH 0649/1476] add and use mkDisableOption --- raspberry-pi/4/leds.nix | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/raspberry-pi/4/leds.nix b/raspberry-pi/4/leds.nix index 1f2404dd..95a6d058 100644 --- a/raspberry-pi/4/leds.nix +++ b/raspberry-pi/4/leds.nix @@ -2,25 +2,25 @@ let cfg = config.hardware.raspberry-pi."4".leds; + mkDisableOption = name: lib.mkOption { + default = false; + example = true; + description = "Whether to disable ${name}."; + type = lib.types.bool; + }; in { options.hardware = { raspberry-pi."4".leds = { - disable-eth = lib.mkEnableOption '' - disable ethernet LEDs. - ''; - disable-act = lib.mkEnableOption '' - disable activity LED. - ''; - disable-pwr = lib.mkEnableOption '' - disable power LED. - ''; + eth.disable = mkDisableOption ''ethernet LEDs.''; + act.disable = mkDisableOption ''activity LED.''; + pwr.disable = mkDisableOption ''power LED.''; }; }; # Adapted from: https://gist.github.com/SFrijters/206d2c09656affb04284f076c75a1969 config = lib.mkMerge [ - (lib.mkIf cfg.disable-eth { + (lib.mkIf cfg.eth.disable { hardware.deviceTree = { overlays = [ # https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README @@ -58,7 +58,7 @@ in ]; }; }) - (lib.mkIf cfg.disable-act { + (lib.mkIf cfg.act.disable { hardware.deviceTree = { overlays = [ # Debugging: @@ -85,7 +85,7 @@ in ]; }; }) - (lib.mkIf cfg.disable-pwr { + (lib.mkIf cfg.pwr.disable { hardware.deviceTree = { overlays = [ # Debugging: From 82cf9ae3f663471552610e6ece2eeb3b43908a13 Mon Sep 17 00:00:00 2001 From: Cabia Rangris Date: Tue, 21 Nov 2023 03:36:33 +0400 Subject: [PATCH 0650/1476] framework/13-inch/12th-gen-intel: ec crash fix --- framework/13-inch/12th-gen-intel/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/framework/13-inch/12th-gen-intel/default.nix b/framework/13-inch/12th-gen-intel/default.nix index 315c6882..b16dc1d3 100644 --- a/framework/13-inch/12th-gen-intel/default.nix +++ b/framework/13-inch/12th-gen-intel/default.nix @@ -13,9 +13,14 @@ "i915.enable_psr=1" ]; - # This enables the brightness and airplane mode keys to work - # https://community.frame.work/t/12th-gen-not-sending-xf86monbrightnessup-down/20605/11 - boot.blacklistedKernelModules = [ "hid-sensor-hub" ]; + boot.blacklistedKernelModules = [ + # This enables the brightness and airplane mode keys to work + # https://community.frame.work/t/12th-gen-not-sending-xf86monbrightnessup-down/20605/11 + "hid-sensor-hub" + # This fixes controller crashes during sleep + # https://community.frame.work/t/tracking-fn-key-stops-working-on-popos-after-a-while/21208/32 + "cros_ec_lpcs" + ]; # Further tweak to ensure the brightness and airplane mode keys work # https://community.frame.work/t/responded-12th-gen-not-sending-xf86monbrightnessup-down/20605/67 From fc126177f68500a53155a2b3a6bd2d711f5495d2 Mon Sep 17 00:00:00 2001 From: Kourosh Tafreshi Date: Mon, 20 Nov 2023 16:24:27 +0200 Subject: [PATCH 0651/1476] chore: Activate nvidia powermanagement --- dell/xps/15-9510/nvidia/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dell/xps/15-9510/nvidia/default.nix b/dell/xps/15-9510/nvidia/default.nix index 95df520a..c8cd44be 100644 --- a/dell/xps/15-9510/nvidia/default.nix +++ b/dell/xps/15-9510/nvidia/default.nix @@ -1,4 +1,4 @@ -{ lib,pkgs, ... }: { +{ lib, pkgs, ... }: { imports = [ ../../../../common/gpu/nvidia/prime.nix ]; hardware = { @@ -9,6 +9,13 @@ # Bus ID of the NVIDIA GPU. nvidiaBusId = lib.mkDefault "PCI:1:0:0"; }; + powerManagement = { + # Enable NVIDIA power management. + enable = lib.mkDefault true; + + # Enable dynamic power management. + finegrained = lib.mkDefault true; + }; }; opengl = { enable = lib.mkDefault true; From c3abafb01cd7045dba522af29b625bd1e170c2fb Mon Sep 17 00:00:00 2001 From: Kourosh Tafreshi Date: Mon, 20 Nov 2023 16:35:37 +0200 Subject: [PATCH 0652/1476] chore: Add switcheroo service for Dual GPU --- dell/xps/15-9510/nvidia/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dell/xps/15-9510/nvidia/default.nix b/dell/xps/15-9510/nvidia/default.nix index c8cd44be..723c5748 100644 --- a/dell/xps/15-9510/nvidia/default.nix +++ b/dell/xps/15-9510/nvidia/default.nix @@ -1,6 +1,9 @@ { lib, pkgs, ... }: { imports = [ ../../../../common/gpu/nvidia/prime.nix ]; + #D-Bus service to check the availability of dual-GPU + services.switcherooControl.enable = lib.mkDefault true; + hardware = { nvidia = { prime = { From 8605f354e2409ce5f7a9ad3589427e3d11937674 Mon Sep 17 00:00:00 2001 From: mexisme Date: Sun, 26 Nov 2023 12:42:11 +1300 Subject: [PATCH 0653/1476] Use a new linuxPackage function --- .../common/kernel/linux-6.1.x/default.nix | 8 +-- .../common/kernel/linux-6.1.x/patches.nix | 33 +++++++------ .../common/kernel/linux-6.5.x/default.nix | 8 +-- .../common/kernel/linux-6.5.x/patches.nix | 33 +++++++------ .../surface/common/kernel/linux-package.nix | 49 ++++++++++++++++--- 5 files changed, 84 insertions(+), 47 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-6.1.x/default.nix b/microsoft/surface/common/kernel/linux-6.1.x/default.nix index 05ec4cf2..45105ccb 100644 --- a/microsoft/surface/common/kernel/linux-6.1.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.1.x/default.nix @@ -4,19 +4,19 @@ let inherit (lib) mkIf mkOption types; inherit (pkgs) fetchurl; - inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage repos; + inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage1 repos; cfg = config.microsoft-surface; version = "6.1.62"; extraMeta.branch = "6.1"; - patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; + patchSrc = repos.linux-surface + "/patches/${extraMeta.branch}"; kernelPatches = pkgs.callPackage ./patches.nix { inherit (lib) kernel; - inherit version patchDir; + inherit version patchSrc; }; - kernelPackages = linuxPackage { + kernelPackages = linuxPackage1 { inherit version extraMeta kernelPatches; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; diff --git a/microsoft/surface/common/kernel/linux-6.1.x/patches.nix b/microsoft/surface/common/kernel/linux-6.1.x/patches.nix index e197649e..5af71be9 100644 --- a/microsoft/surface/common/kernel/linux-6.1.x/patches.nix +++ b/microsoft/surface/common/kernel/linux-6.1.x/patches.nix @@ -1,5 +1,6 @@ -{ kernel, - patchDir, +{ lib, + kernel ? lib.kernel, + patchSrc, version, }: @@ -84,58 +85,58 @@ } { name = "ms-surface/0001-surface3-oemb"; - patch = patchDir + "/0001-surface3-oemb.patch"; + patch = patchSrc + "/0001-surface3-oemb.patch"; } { name = "ms-surface/0002-mwifiex"; - patch = patchDir + "/0002-mwifiex.patch"; + patch = patchSrc + "/0002-mwifiex.patch"; } { name = "ms-surface/0003-ath10k"; - patch = patchDir + "/0003-ath10k.patch"; + patch = patchSrc + "/0003-ath10k.patch"; } { name = "ms-surface/0004-ipts"; - patch = patchDir + "/0004-ipts.patch"; + patch = patchSrc + "/0004-ipts.patch"; } { name = "ms-surface/0005-ithc"; - patch = patchDir + "/0005-ithc.patch"; + patch = patchSrc + "/0005-ithc.patch"; } { name = "ms-surface/0006-surface-sam"; - patch = patchDir + "/0006-surface-sam.patch"; + patch = patchSrc + "/0006-surface-sam.patch"; } { name = "ms-surface/0007-surface-sam-over-hid"; - patch = patchDir + "/0007-surface-sam-over-hid.patch"; + patch = patchSrc + "/0007-surface-sam-over-hid.patch"; } { name = "ms-surface/0008-surface-button"; - patch = patchDir + "/0008-surface-button.patch"; + patch = patchSrc + "/0008-surface-button.patch"; } { name = "ms-surface/0009-surface-typecover"; - patch = patchDir + "/0009-surface-typecover.patch"; + patch = patchSrc + "/0009-surface-typecover.patch"; } { name = "ms-surface/0010-surface-shutdown"; - patch = patchDir + "/0010-surface-shutdown.patch"; + patch = patchSrc + "/0010-surface-shutdown.patch"; } { name = "ms-surface/0011-surface-gpe"; - patch = patchDir + "/0011-surface-gpe.patch"; + patch = patchSrc + "/0011-surface-gpe.patch"; } { name = "ms-surface/0012-cameras"; - patch = patchDir + "/0012-cameras.patch"; + patch = patchSrc + "/0012-cameras.patch"; } { name = "ms-surface/0013-amd-gpio"; - patch = patchDir + "/0013-amd-gpio.patch"; + patch = patchSrc + "/0013-amd-gpio.patch"; } { name = "ms-surface/0014-rtc"; - patch = patchDir + "/0014-rtc.patch"; + patch = patchSrc + "/0014-rtc.patch"; } ] diff --git a/microsoft/surface/common/kernel/linux-6.5.x/default.nix b/microsoft/surface/common/kernel/linux-6.5.x/default.nix index b26b466a..0d90108f 100644 --- a/microsoft/surface/common/kernel/linux-6.5.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.5.x/default.nix @@ -4,19 +4,19 @@ let inherit (lib) mkIf mkOption types; inherit (pkgs) fetchurl; - inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage repos; + inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage1 repos; cfg = config.microsoft-surface; version = "6.5.11"; extraMeta.branch = "6.5"; - patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; + patchSrc = repos.linux-surface + "/patches/${extraMeta.branch}"; kernelPatches = pkgs.callPackage ./patches.nix { inherit (lib) kernel; - inherit version patchDir; + inherit version patchSrc; }; - kernelPackages = linuxPackage { + kernelPackages = linuxPackage1 { inherit version extraMeta kernelPatches; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; diff --git a/microsoft/surface/common/kernel/linux-6.5.x/patches.nix b/microsoft/surface/common/kernel/linux-6.5.x/patches.nix index d7b92895..148f8b2d 100644 --- a/microsoft/surface/common/kernel/linux-6.5.x/patches.nix +++ b/microsoft/surface/common/kernel/linux-6.5.x/patches.nix @@ -1,5 +1,6 @@ -{ kernel, - patchDir, +{ lib, + kernel ? lib.kernel, + patchSrc, version, }: @@ -85,58 +86,58 @@ } { name = "ms-surface/0001-surface3-oemb"; - patch = patchDir + "/0001-surface3-oemb.patch"; + patch = patchSrc + "/0001-surface3-oemb.patch"; } { name = "ms-surface/0002-mwifiex"; - patch = patchDir + "/0002-mwifiex.patch"; + patch = patchSrc + "/0002-mwifiex.patch"; } { name = "ms-surface/0003-ath10k"; - patch = patchDir + "/0003-ath10k.patch"; + patch = patchSrc + "/0003-ath10k.patch"; } { name = "ms-surface/0004-ipts"; - patch = patchDir + "/0004-ipts.patch"; + patch = patchSrc + "/0004-ipts.patch"; } { name = "ms-surface/0005-ithc"; - patch = patchDir + "/0005-ithc.patch"; + patch = patchSrc + "/0005-ithc.patch"; } { name = "ms-surface/0006-surface-sam"; - patch = patchDir + "/0006-surface-sam.patch"; + patch = patchSrc + "/0006-surface-sam.patch"; } { name = "ms-surface/0007-surface-sam-over-hid"; - patch = patchDir + "/0007-surface-sam-over-hid.patch"; + patch = patchSrc + "/0007-surface-sam-over-hid.patch"; } { name = "ms-surface/0008-surface-button"; - patch = patchDir + "/0008-surface-button.patch"; + patch = patchSrc + "/0008-surface-button.patch"; } { name = "ms-surface/0009-surface-typecover"; - patch = patchDir + "/0009-surface-typecover.patch"; + patch = patchSrc + "/0009-surface-typecover.patch"; } { name = "ms-surface/0010-surface-shutdown"; - patch = patchDir + "/0010-surface-shutdown.patch"; + patch = patchSrc + "/0010-surface-shutdown.patch"; } { name = "ms-surface/0011-surface-gpe"; - patch = patchDir + "/0011-surface-gpe.patch"; + patch = patchSrc + "/0011-surface-gpe.patch"; } { name = "ms-surface/0012-cameras"; - patch = patchDir + "/0012-cameras.patch"; + patch = patchSrc + "/0012-cameras.patch"; } { name = "ms-surface/0013-amd-gpio"; - patch = patchDir + "/0013-amd-gpio.patch"; + patch = patchSrc + "/0013-amd-gpio.patch"; } { name = "ms-surface/0014-rtc"; - patch = patchDir + "/0014-rtc.patch"; + patch = patchSrc + "/0014-rtc.patch"; } ] diff --git a/microsoft/surface/common/kernel/linux-package.nix b/microsoft/surface/common/kernel/linux-package.nix index c115df10..b4082a46 100644 --- a/microsoft/surface/common/kernel/linux-package.nix +++ b/microsoft/surface/common/kernel/linux-package.nix @@ -1,16 +1,17 @@ -{ lib, +{ pkgs, + lib, + fetchurl, buildLinux, - callPackage, linuxPackagesFor, }: let - inherit (lib) recurseIntoAttrs; + inherit (lib) recurseIntoAttrs versions; + repos = pkgs.callPackage ../repos.nix {}; -in { - repos = callPackage ../repos.nix {}; - - linuxPackage = + # Version 1 of the linuxPackage function: + # (DEPRECATED) + linuxPackage1 = { version, modDirVersion ? version, ... @@ -19,4 +20,38 @@ in { buildLinux' = buildLinux (args // { inherit modDirVersion; }); linuxPackagesFor' = linuxPackagesFor buildLinux'; in recurseIntoAttrs linuxPackagesFor'; + + # Version 1 of the linuxPackage funtion, with hopefully simplified arguments: + linuxPackage2 = + { url ? "mirror://kernel/linux/kernel/v${versions.major version}.x/linux-${version}.tar.xz", + sha256 ? null, + src ? (fetchurl { inherit url sha256; }), + version, + modDirVersion ? (versions.pad 3 version), + kernelPatches ? [], + ... + } @ args: let + inherit (builtins) removeAttrs; + + args' = { + inherit src version modDirVersion kernelPatches; + } // removeAttrs args [ "url" "sha256" ]; + linuxPackage = buildLinux args'; + linuxPackages' = recurseIntoAttrs (linuxPackagesFor linuxPackage); + in linuxPackages'; + + surfacePatches = + { patchSrc ? (repos.linux-surface + "/patches/${versions.major version}"), + version, + patchFn, + }: pkgs.callPackage patchFn { + inherit (lib) kernel; + inherit version patchSrc; + }; + +in { + inherit linuxPackage1 linuxPackage2 repos surfacePatches; + + # Default version: + linuxPackage = linuxPackage2; } From 0516b822878bb28639bc1c9176f4889e7fbd83bb Mon Sep 17 00:00:00 2001 From: mexisme Date: Sun, 26 Nov 2023 12:43:48 +1300 Subject: [PATCH 0654/1476] Add kernel 6.6 --- microsoft/surface/common/kernel/default.nix | 1 + .../common/kernel/linux-6.6.x/default.nix | 30 ++++ .../common/kernel/linux-6.6.x/patches.nix | 142 ++++++++++++++++++ 3 files changed, 173 insertions(+) create mode 100644 microsoft/surface/common/kernel/linux-6.6.x/default.nix create mode 100644 microsoft/surface/common/kernel/linux-6.6.x/patches.nix diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index a0637a35..481755dd 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -7,6 +7,7 @@ in { imports = [ ./linux-6.1.x ./linux-6.5.x + ./linux-6.6.x ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.6.x/default.nix b/microsoft/surface/common/kernel/linux-6.6.x/default.nix new file mode 100644 index 00000000..e0a34499 --- /dev/null +++ b/microsoft/surface/common/kernel/linux-6.6.x/default.nix @@ -0,0 +1,30 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkOption types; + + inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage2 surfacePatches; + + cfg = config.microsoft-surface; + + version = "6.6.2"; + kernelPatches = surfacePatches { + inherit version; + patchFn = ./patches.nix; + }; + kernelPackages = linuxPackage2 { + inherit version kernelPatches; + sha256 = "sha256-c9T2rY3WrCpB7VLCkoiYt8PyUZ7V29sRkgIJo2mZt34="; + }; + +in { + options.microsoft-surface.kernelVersion = mkOption { + type = types.enum [ version ]; + }; + + config = mkIf (cfg.kernelVersion == version) { + boot = { + inherit kernelPackages; + }; + }; +} diff --git a/microsoft/surface/common/kernel/linux-6.6.x/patches.nix b/microsoft/surface/common/kernel/linux-6.6.x/patches.nix new file mode 100644 index 00000000..9c0dce2a --- /dev/null +++ b/microsoft/surface/common/kernel/linux-6.6.x/patches.nix @@ -0,0 +1,142 @@ +{ lib, + kernel ? lib.kernel, + patchSrc, + version, +}: + +[ + { + name = "microsoft-surface-patches-linux-${version}"; + patch = null; + structuredExtraConfig = with kernel; { + ## + ## Surface Aggregator Module + ## + CONFIG_SURFACE_AGGREGATOR = module; + # CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION is not set + CONFIG_SURFACE_AGGREGATOR_BUS = yes; + CONFIG_SURFACE_AGGREGATOR_CDEV = module; + CONFIG_SURFACE_AGGREGATOR_HUB = module; + CONFIG_SURFACE_AGGREGATOR_REGISTRY = module; + CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH = module; + + CONFIG_SURFACE_ACPI_NOTIFY = module; + CONFIG_SURFACE_DTX = module; + CONFIG_SURFACE_PLATFORM_PROFILE = module; + + CONFIG_SURFACE_HID = module; + CONFIG_SURFACE_KBD = module; + + CONFIG_BATTERY_SURFACE = module; + CONFIG_CHARGER_SURFACE = module; + + ## + ## Surface Hotplug + ## + CONFIG_SURFACE_HOTPLUG = module; + + ## + ## IPTS and ITHC touchscreen + ## + ## This only enables the user interface for IPTS/ITHC data. + ## For the touchscreen to work, you need to install iptsd. + ## + CONFIG_HID_IPTS = module; + CONFIG_HID_ITHC = module; + + ## + ## Cameras: IPU3 + ## + CONFIG_VIDEO_DW9719 = module; + CONFIG_VIDEO_IPU3_IMGU = module; + CONFIG_VIDEO_IPU3_CIO2 = module; + CONFIG_IPU_BRIDGE = module; + CONFIG_INTEL_SKL_INT3472 = module; + CONFIG_REGULATOR_TPS68470 = module; + CONFIG_COMMON_CLK_TPS68470 = module; + CONFIG_LEDS_TPS68470 = module; + + ## + ## Cameras: Sensor drivers + ## + CONFIG_VIDEO_OV5693 = module; + CONFIG_VIDEO_OV7251 = module; + CONFIG_VIDEO_OV8865 = module; + + ## + ## Surface 3: atomisp causes problems (see issue #1095). Disable it for now. + ## + # CONFIG_INTEL_ATOMISP is not set + + ## + ## ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 + ## + CONFIG_APDS9960 = module; + + ## + ## Other Drivers + ## + CONFIG_INPUT_SOC_BUTTON_ARRAY = module; + CONFIG_SURFACE_3_POWER_OPREGION = module; + CONFIG_SURFACE_PRO3_BUTTON = module; + CONFIG_SURFACE_GPE = module; + CONFIG_SURFACE_BOOK1_DGPU_SWITCH = module; + }; + } + { + name = "ms-surface/0001-surface3-oemb"; + patch = patchSrc + "/0001-surface3-oemb.patch"; + } + { + name = "ms-surface/0002-mwifiex"; + patch = patchSrc + "/0002-mwifiex.patch"; + } + { + name = "ms-surface/0003-ath10k"; + patch = patchSrc + "/0003-ath10k.patch"; + } + { + name = "ms-surface/0004-ipts"; + patch = patchSrc + "/0004-ipts.patch"; + } + { + name = "ms-surface/0005-ithc"; + patch = patchSrc + "/0005-ithc.patch"; + } + { + name = "ms-surface/0006-surface-sam"; + patch = patchSrc + "/0006-surface-sam.patch"; + } + { + name = "ms-surface/0007-surface-sam-over-hid"; + patch = patchSrc + "/0007-surface-sam-over-hid.patch"; + } + { + name = "ms-surface/0008-surface-button"; + patch = patchSrc + "/0008-surface-button.patch"; + } + { + name = "ms-surface/0009-surface-typecover"; + patch = patchSrc + "/0009-surface-typecover.patch"; + } + { + name = "ms-surface/0010-surface-shutdown"; + patch = patchSrc + "/0010-surface-shutdown.patch"; + } + { + name = "ms-surface/0011-surface-gpe"; + patch = patchSrc + "/0011-surface-gpe.patch"; + } + { + name = "ms-surface/0012-cameras"; + patch = patchSrc + "/0012-cameras.patch"; + } + { + name = "ms-surface/0013-amd-gpio"; + patch = patchSrc + "/0013-amd-gpio.patch"; + } + { + name = "ms-surface/0014-rtc"; + patch = patchSrc + "/0014-rtc.patch"; + } +] From 0e169f3d58c8b8f088aff60cb8a8cdfb49254caa Mon Sep 17 00:00:00 2001 From: mexisme Date: Sun, 26 Nov 2023 12:44:19 +1300 Subject: [PATCH 0655/1476] Use kernel 6.6.2 by default --- microsoft/surface/common/default.nix | 2 +- microsoft/surface/surface-go/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index b6b00eec..d4ac2fd2 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.5.11"; + microsoft-surface.kernelVersion = mkDefault "6.6.2"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix index a1073ddd..ede626fd 100644 --- a/microsoft/surface/surface-go/default.nix +++ b/microsoft/surface/surface-go/default.nix @@ -17,7 +17,7 @@ in { ../../../common/cpu/intel/kaby-lake ]; - microsoft-surface.kernelVersion = "6.1.62"; + microsoft-surface.kernelVersion = "6.6.2"; boot.kernelParams = [ "i915.enable_rc6=1" From 7dcae71f6107a92991c5c37e7f090684cc3b10c2 Mon Sep 17 00:00:00 2001 From: mexisme Date: Sun, 26 Nov 2023 13:01:52 +1300 Subject: [PATCH 0656/1476] Fix typos --- microsoft/surface/common/kernel/linux-package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-package.nix b/microsoft/surface/common/kernel/linux-package.nix index b4082a46..8d92553b 100644 --- a/microsoft/surface/common/kernel/linux-package.nix +++ b/microsoft/surface/common/kernel/linux-package.nix @@ -21,7 +21,7 @@ let linuxPackagesFor' = linuxPackagesFor buildLinux'; in recurseIntoAttrs linuxPackagesFor'; - # Version 1 of the linuxPackage funtion, with hopefully simplified arguments: + # Version 1 of the linuxPackage function, with hopefully simplified arguments: linuxPackage2 = { url ? "mirror://kernel/linux/kernel/v${versions.major version}.x/linux-${version}.tar.xz", sha256 ? null, @@ -41,7 +41,7 @@ let in linuxPackages'; surfacePatches = - { patchSrc ? (repos.linux-surface + "/patches/${versions.major version}"), + { patchSrc ? (repos.linux-surface + "/patches/${versions.majorMinor version}"), version, patchFn, }: pkgs.callPackage patchFn { From 62b6776b46ef2ae54e529f3b511e9be0736c3837 Mon Sep 17 00:00:00 2001 From: mexisme Date: Sun, 26 Nov 2023 20:09:24 +1300 Subject: [PATCH 0657/1476] Fix rev and sha256 for the current linux-surface patches --- microsoft/surface/common/repos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 99b660fd..9c2793c7 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "b82e8acd3c015190423b114770b0e9fcc206dd2d"; - hash = "sha256-parp1F5fFzKkiM6ILK+ZolMdSwU1kLOOMvksSwE/zKA="; + rev = "a6eafcad32dc789ae92f42636b11e9aae6e7c879"; #b82e8acd3c015190423b114770b0e9fcc206dd2d"; + hash = "sha256-GfxRzxFxDZoSZyEOzxr/Hz0IonbuwzkGaisKl3VYvlI="; #sha256-parp1F5fFzKkiM6ILK+ZolMdSwU1kLOOMvksSwE/zKA="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From b006ec52fce23b1d57f6ab4a42d7400732e9a0a2 Mon Sep 17 00:00:00 2001 From: Ivor Wanders Date: Thu, 23 Nov 2023 18:12:14 -0500 Subject: [PATCH 0658/1476] Bump linux-surface to a6eafcad32dc789ae92f42636b11e9aae6e7c879. --- microsoft/surface/common/repos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 99b660fd..b1076d0f 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "b82e8acd3c015190423b114770b0e9fcc206dd2d"; - hash = "sha256-parp1F5fFzKkiM6ILK+ZolMdSwU1kLOOMvksSwE/zKA="; + rev = "a6eafcad32dc789ae92f42636b11e9aae6e7c879"; + hash = "sha256-GfxRzxFxDZoSZyEOzxr/Hz0IonbuwzkGaisKl3VYvlI="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From 4461209624a1fef22411c70b62b114c92218c172 Mon Sep 17 00:00:00 2001 From: Reed Riley Date: Thu, 16 Nov 2023 07:07:14 -0800 Subject: [PATCH 0659/1476] FW13 7040: workaround for SuspendThenHibernate bug --- framework/13-inch/common/amd.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/13-inch/common/amd.nix b/framework/13-inch/common/amd.nix index 249f6f39..f5341b63 100644 --- a/framework/13-inch/common/amd.nix +++ b/framework/13-inch/common/amd.nix @@ -1,10 +1,13 @@ -{ lib, ... }: { +{ lib, config, ... }: { imports = [ ../../../common/cpu/amd ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd ]; + # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ + boot.kernelParams = lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") ["rtc_cmos.use_acpi_alarm=1"] ; + # AMD has better battery life with PPD over TLP: # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 services.power-profiles-daemon.enable = lib.mkDefault true; From b236a7817a95b42a4392327ee77f3262755e11e1 Mon Sep 17 00:00:00 2001 From: Ivor Wanders Date: Sun, 26 Nov 2023 15:44:14 -0500 Subject: [PATCH 0660/1476] Write iptsd configuration file. --- microsoft/surface/common/ipts/default.nix | 27 +++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/ipts/default.nix b/microsoft/surface/common/ipts/default.nix index 4d19aa09..ea13c9f3 100644 --- a/microsoft/surface/common/ipts/default.nix +++ b/microsoft/surface/common/ipts/default.nix @@ -1,18 +1,39 @@ { config, lib, pkgs, ... }: let - inherit (lib) mkDefault mkEnableOption mkIf mkMerge; + inherit (lib) mkDefault mkEnableOption mkIf mkMerge mkOption types; cfg = config.microsoft-surface.ipts; -in { + iptsConfFile = pkgs.writeTextFile { + name = "iptsd.conf"; + text = lib.generators.toINI { } cfg.config; + }; + +in +{ options.microsoft-surface.ipts = { enable = mkEnableOption "Enable IPTSd for Microsoft Surface"; + + config = mkOption { + type = types.attrs; + default = { }; + description = '' + Values to wrote to iptsd.conf, first key is section, second key is property. + See the example config; https://github.com/linux-surface/iptsd/blob/v1.4.0/etc/iptsd.conf + ''; + example = '' + DFT = { + ButtonMinMag = 1000; + }; + ''; + }; }; config = mkMerge [ { microsoft-surface.ipts.enable = mkDefault false; + } (mkIf cfg.enable { @@ -22,6 +43,8 @@ in { script = "iptsd $(iptsd-find-hidraw)"; wantedBy = [ "multi-user.target" ]; }; + + environment.etc."iptsd/iptsd.conf".source = "${iptsConfFile}"; }) ]; } From 6c114d0ccf990b90c22590561e12a898276c617a Mon Sep 17 00:00:00 2001 From: Ivor Wanders Date: Sun, 26 Nov 2023 16:24:31 -0500 Subject: [PATCH 0661/1476] Change linux-surface rev to tag. --- microsoft/surface/common/repos.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index b1076d0f..15dc30da 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,7 +4,7 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "a6eafcad32dc789ae92f42636b11e9aae6e7c879"; + rev = "arch-6.6.1-1"; hash = "sha256-GfxRzxFxDZoSZyEOzxr/Hz0IonbuwzkGaisKl3VYvlI="; }; From 8772491ed75f150f02552c60694e1beff9f46013 Mon Sep 17 00:00:00 2001 From: Ivor Wanders Date: Sun, 26 Nov 2023 16:27:13 -0500 Subject: [PATCH 0662/1476] Minimize whitespace changes. --- microsoft/surface/common/ipts/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/microsoft/surface/common/ipts/default.nix b/microsoft/surface/common/ipts/default.nix index ea13c9f3..8e1f4756 100644 --- a/microsoft/surface/common/ipts/default.nix +++ b/microsoft/surface/common/ipts/default.nix @@ -33,7 +33,6 @@ in config = mkMerge [ { microsoft-surface.ipts.enable = mkDefault false; - } (mkIf cfg.enable { @@ -43,7 +42,6 @@ in script = "iptsd $(iptsd-find-hidraw)"; wantedBy = [ "multi-user.target" ]; }; - environment.etc."iptsd/iptsd.conf".source = "${iptsConfFile}"; }) ]; From eb4e5743609d36c673a979850af2d90d5e3e26fa Mon Sep 17 00:00:00 2001 From: Archit Gupta Date: Sat, 2 Dec 2023 17:38:39 -0800 Subject: [PATCH 0663/1476] framework intel: Disable cros-usbpd-charger --- framework/13-inch/common/intel.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/13-inch/common/intel.nix b/framework/13-inch/common/intel.nix index d5c68efa..fb5c4cee 100644 --- a/framework/13-inch/common/intel.nix +++ b/framework/13-inch/common/intel.nix @@ -15,6 +15,9 @@ # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") (lib.mkDefault pkgs.linuxPackages_latest); + # Module is not used for Framework EC but causes boot time error log. + boot.blacklistedKernelModules = [ "cros-usbpd-charger" ]; + # Custom udev rules services.udev.extraRules = '' # Fix headphone noise when on powersave From a89745edd5f657e2e5be5ed1bea86725ca78d92e Mon Sep 17 00:00:00 2001 From: Astrid Yu Date: Sat, 2 Dec 2023 17:50:43 -0800 Subject: [PATCH 0664/1476] surface: Allow specifying major versions for kernel --- .../surface/common/kernel/linux-6.1.x/default.nix | 11 ++++++----- .../surface/common/kernel/linux-6.5.x/default.nix | 9 +++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-6.1.x/default.nix b/microsoft/surface/common/kernel/linux-6.1.x/default.nix index 05ec4cf2..dbb61d7e 100644 --- a/microsoft/surface/common/kernel/linux-6.1.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.1.x/default.nix @@ -9,15 +9,16 @@ let cfg = config.microsoft-surface; version = "6.1.62"; - extraMeta.branch = "6.1"; - patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; + majorVersion = "6.1"; + patchDir = repos.linux-surface + "/patches/${majorVersion}"; kernelPatches = pkgs.callPackage ./patches.nix { inherit (lib) kernel; inherit version patchDir; }; kernelPackages = linuxPackage { - inherit version extraMeta kernelPatches; + inherit version kernelPatches; + extraMeta.branch = majorVersion; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; sha256 = "sha256-uf1hb6zWvs/O74i5vnGNDxZiXKs/6B0ROEgCpwkehew="; @@ -27,10 +28,10 @@ let in { options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ version ]; + type = types.enum [ version majorVersion ]; }; - config = mkIf (cfg.kernelVersion == version ) { + config = mkIf (cfg.kernelVersion == version || cfg.kernelVersion == majorVersion) { boot = { inherit kernelPackages; }; diff --git a/microsoft/surface/common/kernel/linux-6.5.x/default.nix b/microsoft/surface/common/kernel/linux-6.5.x/default.nix index b26b466a..ba3c2a09 100644 --- a/microsoft/surface/common/kernel/linux-6.5.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.5.x/default.nix @@ -9,15 +9,16 @@ let cfg = config.microsoft-surface; version = "6.5.11"; - extraMeta.branch = "6.5"; - patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; + majorVersion = "6.5"; + patchDir = repos.linux-surface + "/patches/${majorVersion}"; kernelPatches = pkgs.callPackage ./patches.nix { inherit (lib) kernel; inherit version patchDir; }; kernelPackages = linuxPackage { - inherit version extraMeta kernelPatches; + inherit version kernelPatches; + extraMeta.branch = majorVersion; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; sha256 = "sha256-LuJK+SgrgJI7LaVrcKrX3y6O5OPwdkUuBbpmviBZtRk="; @@ -30,7 +31,7 @@ in { type = types.enum [ version ]; }; - config = mkIf (cfg.kernelVersion == version) { + config = mkIf (cfg.kernelVersion == version || cfg.kernelVersion == majorVersion) { boot = { inherit kernelPackages; }; From fa194fc484fd7270ab324bb985593f71102e84d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 02:11:42 +0000 Subject: [PATCH 0665/1476] build(deps): bump cachix/install-nix-action from 23 to 24 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 23 to 24. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v23...v24) --- 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 37e2af70..782cde3e 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@v23 + - uses: cachix/install-nix-action@v24 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version From c78145fc512a703af114aec176658dee872e4e90 Mon Sep 17 00:00:00 2001 From: waltz <79410846+Wa1t5@users.noreply.github.com> Date: Mon, 4 Dec 2023 16:04:01 -0300 Subject: [PATCH 0666/1476] lenovo: add config for ideapad s145-15api --- lenovo/ideapad/s145-15api/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lenovo/ideapad/s145-15api/default.nix diff --git a/lenovo/ideapad/s145-15api/default.nix b/lenovo/ideapad/s145-15api/default.nix new file mode 100644 index 00000000..08b11c76 --- /dev/null +++ b/lenovo/ideapad/s145-15api/default.nix @@ -0,0 +1,18 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/gpu/amd + ../../../common/gpu/amd/southern-islands + ]; + + # Blacklist ideapad-laptop because it keeps resetting rfkill devices + boot.blacklistedKernelModules = [ "ideapad-laptop" ]; + + # For some reason we have to specify manually which model we want snd-hda-intel to use + # without it external microphone won't work + boot.extraModprobeConfig = '' + options snd-hda-intel model=alc255-acer,dell-headset-multi + ''; +} From b32113560acaadb92251efcd6bef67419797839b Mon Sep 17 00:00:00 2001 From: waltz <79410846+Wa1t5@users.noreply.github.com> Date: Mon, 4 Dec 2023 16:10:05 -0300 Subject: [PATCH 0667/1476] lenovo: reference ideapad s145-15api on flake.nix --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 051974e2..c431bf90 100644 --- a/flake.nix +++ b/flake.nix @@ -86,6 +86,7 @@ lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-ideapad-slim-5 = import ./lenovo/ideapad/slim-5; + lenovo-ideapad-s145-15api = import ./lenovo/ideapad/s145-15api; lenovo-legion-15ach6 = import ./lenovo/legion/15ach6; lenovo-legion-15arh05h = import ./lenovo/legion/15arh05h; lenovo-legion-16ach6h = import ./lenovo/legion/16ach6h; From 030edbb68e69f2b97231479f98a9597024650df2 Mon Sep 17 00:00:00 2001 From: waltz <79410846+Wa1t5@users.noreply.github.com> Date: Mon, 4 Dec 2023 16:13:45 -0300 Subject: [PATCH 0668/1476] lenovo: add ideapad s145-15api to readme.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 70ba0609..5b05c367 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,7 @@ See code for all available configurations. | [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | +| [Lenovo IdeaPad S145 15api](lenovo/ideapad/s145-15api) | `` | | [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | | [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | | [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | From fef05bf9c8e818f4ca1425ef4c18e6680becd072 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Mon, 11 Dec 2023 03:48:13 +0100 Subject: [PATCH 0669/1476] surface: linux 6.5.11 -> 6.6.6 - linux-surface: arch-6.6.1-1 -> arch-6.6.4-1 - update config for 6.6 --- microsoft/surface/common/default.nix | 2 +- microsoft/surface/common/kernel/default.nix | 2 +- .../common/kernel/{linux-6.5.x => linux-6.6.x}/default.nix | 6 +++--- .../common/kernel/{linux-6.5.x => linux-6.6.x}/patches.nix | 2 +- microsoft/surface/common/repos.nix | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) rename microsoft/surface/common/kernel/{linux-6.5.x => linux-6.6.x}/default.nix (87%) rename microsoft/surface/common/kernel/{linux-6.5.x => linux-6.6.x}/patches.nix (99%) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index b6b00eec..3f4d86ae 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.5.11"; + microsoft-surface.kernelVersion = mkDefault "6.6.6"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index a0637a35..992ec9bc 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -6,7 +6,7 @@ let in { imports = [ ./linux-6.1.x - ./linux-6.5.x + ./linux-6.6.x ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.5.x/default.nix b/microsoft/surface/common/kernel/linux-6.6.x/default.nix similarity index 87% rename from microsoft/surface/common/kernel/linux-6.5.x/default.nix rename to microsoft/surface/common/kernel/linux-6.6.x/default.nix index ba3c2a09..6573522c 100644 --- a/microsoft/surface/common/kernel/linux-6.5.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.6.x/default.nix @@ -8,8 +8,8 @@ let cfg = config.microsoft-surface; - version = "6.5.11"; - majorVersion = "6.5"; + version = "6.6.6"; + majorVersion = "6.6"; patchDir = repos.linux-surface + "/patches/${majorVersion}"; kernelPatches = pkgs.callPackage ./patches.nix { inherit (lib) kernel; @@ -21,7 +21,7 @@ let extraMeta.branch = majorVersion; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "sha256-LuJK+SgrgJI7LaVrcKrX3y6O5OPwdkUuBbpmviBZtRk="; + sha256 = "sha256-6/cKkXk0sTFp4b5blcO2wv6lvBTm3BRPHvuKABayJMg="; }; }; diff --git a/microsoft/surface/common/kernel/linux-6.5.x/patches.nix b/microsoft/surface/common/kernel/linux-6.6.x/patches.nix similarity index 99% rename from microsoft/surface/common/kernel/linux-6.5.x/patches.nix rename to microsoft/surface/common/kernel/linux-6.6.x/patches.nix index d7b92895..40264adb 100644 --- a/microsoft/surface/common/kernel/linux-6.5.x/patches.nix +++ b/microsoft/surface/common/kernel/linux-6.6.x/patches.nix @@ -55,7 +55,7 @@ VIDEO_DW9719 = module; VIDEO_IPU3_IMGU = module; VIDEO_IPU3_CIO2 = module; - CIO2_BRIDGE = yes; + IPU_BRIDGE = module; INTEL_SKL_INT3472 = module; REGULATOR_TPS68470 = module; COMMON_CLK_TPS68470 = module; diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 15dc30da..cfaf9e0b 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "arch-6.6.1-1"; - hash = "sha256-GfxRzxFxDZoSZyEOzxr/Hz0IonbuwzkGaisKl3VYvlI="; + rev = "arch-6.6.4-1"; + hash = "sha256-uVNXwclBH72XeAgPWQr0I7lkhP+uGVlkT5N2xcBzbW4="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From 7763c6fd1f299cb9361ff2abf755ed9619ef01d6 Mon Sep 17 00:00:00 2001 From: Alojzy Leszcz Date: Wed, 13 Dec 2023 08:40:08 +0100 Subject: [PATCH 0670/1476] Lenovo Legion 16achg6 support (#796) --- README.md | 2 ++ flake.nix | 2 ++ lenovo/legion/16achg6/README.md | 21 +++++++++++++++++++ lenovo/legion/16achg6/hybrid/default.nix | 26 ++++++++++++++++++++++++ lenovo/legion/16achg6/nvidia/default.nix | 13 ++++++++++++ 5 files changed, 64 insertions(+) create mode 100644 lenovo/legion/16achg6/README.md create mode 100644 lenovo/legion/16achg6/hybrid/default.nix create mode 100644 lenovo/legion/16achg6/nvidia/default.nix diff --git a/README.md b/README.md index 5b05c367..ffb11116 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,8 @@ See code for all available configurations. | [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | | [Lenovo Legion 5 Pro 16ach6h (Hybrid)](lenovo/legion/16ach6h/hybrid)| `` | | [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia)| `` | +| [Lenovo Legion 7 16achg6 (Hybrid)](lenovo/legion/16achg6/hybrid) | `` | +| [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `` | | [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | | [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | diff --git a/flake.nix b/flake.nix index c431bf90..6cd67a42 100644 --- a/flake.nix +++ b/flake.nix @@ -92,6 +92,8 @@ lenovo-legion-16ach6h = import ./lenovo/legion/16ach6h; lenovo-legion-16ach6h-hybrid = import ./lenovo/legion/16ach6h/hybrid; lenovo-legion-16ach6h-nvidia = import ./lenovo/legion/16ach6h/nvidia; + lenovo-legion-16achg6-hybrid = import ./lenovo/legion/16achg6/hybrid; + lenovo-legion-16achg6-nvidia = import ./lenovo/legion/16achg6/nvidia; lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h; lenovo-legion-y530-15ich = import ./lenovo/legion/15ich; diff --git a/lenovo/legion/16achg6/README.md b/lenovo/legion/16achg6/README.md new file mode 100644 index 00000000..8cb43c96 --- /dev/null +++ b/lenovo/legion/16achg6/README.md @@ -0,0 +1,21 @@ +I personally use my laptop with an external display attached. In `hybrid` config it works nice only with Wayland, while X11 can't detect the external monitor. Everything works as expected in `nvidia` mode, but battery life is reduced then. + +## Setup at the time of testing +``` +$ nix-info -m + - system: `"x86_64-linux"` + - host os: `Linux 6.1.62, NixOS, 23.05 (Stoat), 23.05.20231116.9fb1225` + - multi-user?: `yes` + - sandbox: `yes` + - version: `nix-env (Nix) 2.13.6` + - channels(beko): `"home-manager-23.05.tar.gz"` + - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos` + ``` + ``` + $ lspci +... +01:00.0 VGA compatible controller: NVIDIA Corporation GA104M [GeForce RTX 3070 Mobile / Max-Q] (rev a1) +... +05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (rev c5) +... +``` \ No newline at end of file diff --git a/lenovo/legion/16achg6/hybrid/default.nix b/lenovo/legion/16achg6/hybrid/default.nix new file mode 100644 index 00000000..da27a834 --- /dev/null +++ b/lenovo/legion/16achg6/hybrid/default.nix @@ -0,0 +1,26 @@ +{ lib, config, ... }: + +{ + imports = [ + ../../../../common/cpu/amd + ../../../../common/cpu/amd/pstate.nix + ../../../../common/gpu/amd + ../../../../common/gpu/nvidia/prime.nix + ../../../../common/pc/laptop + ../../../../common/pc/laptop/ssd + ]; + + services.xserver.videoDrivers = [ "nvidia" "amdgpu" ]; + + hardware = { + nvidia = { + modesetting.enable = lib.mkDefault true; + powerManagement.enable = lib.mkDefault true; + + prime = { + amdgpuBusId = "PCI:5:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + }; +} \ No newline at end of file diff --git a/lenovo/legion/16achg6/nvidia/default.nix b/lenovo/legion/16achg6/nvidia/default.nix new file mode 100644 index 00000000..af0f2d66 --- /dev/null +++ b/lenovo/legion/16achg6/nvidia/default.nix @@ -0,0 +1,13 @@ +{ ... }: + +{ + imports = [ ../hybrid ]; + services.xserver.videoDrivers = [ "nvidia" ]; + hardware = { + nvidia.prime.offload.enable = false; + amdgpu = { + amdvlk = false; + opencl = false; + }; + }; +} \ No newline at end of file From e4ded1ec8e9c152910c2b077443e1d87cd81ad4a Mon Sep 17 00:00:00 2001 From: Cryolitia Date: Mon, 25 Dec 2023 09:04:38 +0800 Subject: [PATCH 0671/1476] gpd-win-max-2-2023: init --- README.md | 1 + flake.nix | 1 + gpd/win-max-2/2023/default.nix | 18 +++++++++ gpd/win-max-2/default.nix | 67 ++++++++++++++++++++++++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 gpd/win-max-2/2023/default.nix create mode 100644 gpd/win-max-2/default.nix diff --git a/README.md b/README.md index ffb11116..37a7577c 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,7 @@ See code for all available configurations. | [GPD P2 Max](gpd/p2-max) | `` | | [GPD Pocket 3](gpd/pocket-3) | `` | | [GPD WIN 2](gpd/win-2) | `` | +| [GPD WIN Max 2 2023](gpd/win-max-2/2023) | `` | | [Google Pixelbook](google/pixelbook) | `` | | [HP Elitebook 2560p](hp/elitebook/2560p) | `` | | [HP Elitebook 845g7](hp/elitebook/845/g7) | `` | diff --git a/flake.nix b/flake.nix index 6cd67a42..3b632328 100644 --- a/flake.nix +++ b/flake.nix @@ -78,6 +78,7 @@ gpd-p2-max = import ./gpd/p2-max; gpd-pocket-3 = import ./gpd/pocket-3; gpd-win-2 = import ./gpd/win-2; + gpd-win-max-2-2023 = import ./gpd/win-max-2/2023; hp-elitebook-2560p = import ./hp/elitebook/2560p; hp-elitebook-845g7 = import ./hp/elitebook/845/g7; hp-elitebook-845g9 = import ./hp/elitebook/845/g9; diff --git a/gpd/win-max-2/2023/default.nix b/gpd/win-max-2/2023/default.nix new file mode 100644 index 00000000..68940044 --- /dev/null +++ b/gpd/win-max-2/2023/default.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ...}: +with lib; +let + cfg = config.hardware.gpd.ppt; +in +{ + imports = [ + ./.. + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ]; + + # fix suspend problem: https://www.reddit.com/r/gpdwin/comments/16veksm/win_max_2_2023_linux_experience_suspend_problems/ + services.udev.extraRules = '' + ACTION=="add" SUBSYSTEM=="pci" ATTR{vendor}=="0x1022" ATTR{device}=="0x14ee" ATTR{power/wakeup}="disabled" + ''; +} diff --git a/gpd/win-max-2/default.nix b/gpd/win-max-2/default.nix new file mode 100644 index 00000000..ae821a36 --- /dev/null +++ b/gpd/win-max-2/default.nix @@ -0,0 +1,67 @@ +{ config, lib, pkgs, ... }: +with lib; +let + cfg = config.hardware.gpd.ppt; +in +{ + imports = [ + ../../common/pc/laptop + ../../common/pc/ssd + ../../common/hidpi.nix + ]; + + # Linux default PPT is 24-22-22, BIOS default PPT is 35-32-28. It can be controlled by ryzenadj. + + # NOTICE: Whenever you can limit PPT to 15W by pressing Fn + Shift to enter quiet mode. + + options.hardware.gpd.ppt = { + enable = mkEnableOption (mdDoc "Enable PPT control for device by ryzenadj.") // { + # Default increase PPT to the BIOS default when power adapter plugin to increase performance. + default = true; + }; + + adapter = { + fast-limit = mkOption { + description = "Fast PTT Limit(milliwatt) when power adapter plugin."; + default = 35000; + type = types.ints.unsigned; + }; + slow-limit = mkOption { + description = "Slow PTT Limit(milliwatt) when power adapter plugin."; + default = 32000; + type = types.ints.unsigned; + }; + stapm-limit = mkOption { + description = "Stapm PTT Limit(milliwatt) when power adapter plugin."; + default = 28000; + type = types.ints.unsigned; + }; + }; + + battery = { + fast-limit = mkOption { + description = "Fast PTT Limit(milliwatt) when using battery."; + default = 24000; + type = types.ints.unsigned; + }; + slow-limit = mkOption { + description = "Slow PTT Limit(milliwatt) when using battery."; + default = 22000; + type = types.ints.unsigned; + }; + stapm-limit = mkOption { + description = "Stapm PTT Limit(milliwatt) when using battery."; + default = 22000; + type = types.ints.unsigned; + }; + }; + }; + + config = mkIf cfg.enable { + environment.systemPackages = [ pkgs.ryzenadj ]; + services.udev.extraRules = '' + SUBSYSTEM=="power_supply", KERNEL=="ADP1", ATTR{online}=="1", RUN+="${pkgs.ryzenadj}/bin/ryzenadj --stapm-limit ${toString cfg.adapter.stapm-limit} --fast-limit ${toString cfg.adapter.fast-limit} --slow-limit ${toString cfg.adapter.slow-limit}" + SUBSYSTEM=="power_supply", KERNEL=="ADP1", ATTR{online}=="0", RUN+="${pkgs.ryzenadj}/bin/ryzenadj --stapm-limit ${toString cfg.battery.stapm-limit} --fast-limit ${toString cfg.battery.fast-limit} --slow-limit ${toString cfg.battery.slow-limit}" + ''; + }; +} From 51c532cc50e7960629c6e09ff7277441a01c236b Mon Sep 17 00:00:00 2001 From: Alojzy Leszcz Date: Mon, 25 Dec 2023 20:59:25 +0100 Subject: [PATCH 0672/1476] Lenovo Legion 16achg6: Fix gpu configuration to work with both x11/wayland (#802) Co-authored-by: Alojzy Leszcz --- lenovo/legion/16achg6/README.md | 4 +++- lenovo/legion/16achg6/hybrid/default.nix | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lenovo/legion/16achg6/README.md b/lenovo/legion/16achg6/README.md index 8cb43c96..16f86beb 100644 --- a/lenovo/legion/16achg6/README.md +++ b/lenovo/legion/16achg6/README.md @@ -1,4 +1,6 @@ -I personally use my laptop with an external display attached. In `hybrid` config it works nice only with Wayland, while X11 can't detect the external monitor. Everything works as expected in `nvidia` mode, but battery life is reduced then. +I personally use my laptop with an external display attached and haven't observed any issues so far. + +From my experience, it's better to use gdm, as sddm seems to have a problem detecting the external monitor (more details available [here](https://github.com/sddm/sddm/issues/1558)). Of course it's not a blocker, as it is still possible to log in using sddm. I personally find it annoying that my main display remains idle. ## Setup at the time of testing ``` diff --git a/lenovo/legion/16achg6/hybrid/default.nix b/lenovo/legion/16achg6/hybrid/default.nix index da27a834..fce43f6e 100644 --- a/lenovo/legion/16achg6/hybrid/default.nix +++ b/lenovo/legion/16achg6/hybrid/default.nix @@ -10,12 +10,14 @@ ../../../../common/pc/laptop/ssd ]; - services.xserver.videoDrivers = [ "nvidia" "amdgpu" ]; + services.xserver.videoDrivers = [ "nvidia" ]; + boot.initrd.kernelModules = [ "amdgpu" ]; hardware = { nvidia = { modesetting.enable = lib.mkDefault true; powerManagement.enable = lib.mkDefault true; + open = lib.mkDefault false; prime = { amdgpuBusId = "PCI:5:0:0"; From 249a94e715a3d6cc0217b37b0172dea1edd4afd2 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Tue, 19 Dec 2023 04:08:41 +0100 Subject: [PATCH 0673/1476] surface: linux 6.6.6 -> 6.6.8 - linux-surface: arch-6.6.4-1 -> arch-6.6.6-1 --- microsoft/surface/common/default.nix | 2 +- microsoft/surface/common/kernel/linux-6.6.x/default.nix | 4 ++-- microsoft/surface/common/repos.nix | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 3f4d86ae..485c0e2a 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.6"; + microsoft-surface.kernelVersion = mkDefault "6.6.8"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; 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 6573522c..645c4cf2 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.6"; + version = "6.6.8"; 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-6/cKkXk0sTFp4b5blcO2wv6lvBTm3BRPHvuKABayJMg="; + sha256 = "sha256-UDbENOEeSzbY2j9ImFH3+CnPeF+n94h0aFN6nqRXJBY="; }; }; diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index cfaf9e0b..69e3122b 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "arch-6.6.4-1"; - hash = "sha256-uVNXwclBH72XeAgPWQr0I7lkhP+uGVlkT5N2xcBzbW4="; + rev = "arch-6.6.6-1"; + hash = "sha256-0pP/A0XllR/iheIBEBwEApaXpyFYzsnGZ+wdm4w5Jjg="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From b7747f0f60bbdc50f840a49ab77d480d1d018cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 25 Dec 2023 21:14:17 +0100 Subject: [PATCH 0674/1476] remove unused variables with deadnix --- apple/macbook-air/6/default.nix | 2 +- common/gpu/nvidia/prime.nix | 2 +- dell/precision/3541/intel/default.nix | 2 -- dell/xps/13-9333/default.nix | 2 +- friendlyarm/nanopi-r5s/default.nix | 1 - gpd/win-2/default.nix | 2 +- gpd/win-max-2/2023/default.nix | 5 +---- hardkernel/odroid-h3/default.nix | 2 -- hp/elitebook/845/g7/default.nix | 2 +- hp/elitebook/845/g9/default.nix | 2 +- lenovo/ideapad/s145-15api/default.nix | 2 -- lenovo/ideapad/slim-5/default.nix | 2 -- lenovo/legion/15ach6/default.nix | 4 +--- lenovo/legion/16achg6/hybrid/default.nix | 2 +- lenovo/legion/16irx8h/default.nix | 1 - lenovo/thinkpad/t440p/default.nix | 2 -- microchip/icicle-kit/default.nix | 2 -- morefine/m600/default.nix | 2 +- olimex/teres_i/default.nix | 2 +- onenetbook/4/default.nix | 2 +- pine64/rockpro64/default.nix | 2 +- pine64/star64/firmware.nix | 2 +- pine64/star64/sd-image.nix | 2 +- purism/librem/5r4/initrd.nix | 2 +- purism/librem/5r4/u-boot/default.nix | 2 +- purism/librem/5r4/wifi.nix | 2 +- starfive/visionfive/v2/firmware.nix | 2 +- starfive/visionfive/v2/sd-image.nix | 2 +- 28 files changed, 20 insertions(+), 39 deletions(-) diff --git a/apple/macbook-air/6/default.nix b/apple/macbook-air/6/default.nix index c892026a..182511f3 100644 --- a/apple/macbook-air/6/default.nix +++ b/apple/macbook-air/6/default.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ lib, ... }: { imports = [ ../. ]; diff --git a/common/gpu/nvidia/prime.nix b/common/gpu/nvidia/prime.nix index 371e9eb5..e54f942c 100644 --- a/common/gpu/nvidia/prime.nix +++ b/common/gpu/nvidia/prime.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, config, ... }: +{ lib, config, ... }: { imports = [ ./. ]; diff --git a/dell/precision/3541/intel/default.nix b/dell/precision/3541/intel/default.nix index 78a839d4..a650e575 100644 --- a/dell/precision/3541/intel/default.nix +++ b/dell/precision/3541/intel/default.nix @@ -1,5 +1,3 @@ -{ lib, pkgs, ... }: - { imports = [ ../../../../common/cpu/intel diff --git a/dell/xps/13-9333/default.nix b/dell/xps/13-9333/default.nix index 3aa0bf6b..a17c094d 100644 --- a/dell/xps/13-9333/default.nix +++ b/dell/xps/13-9333/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: { +{ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop diff --git a/friendlyarm/nanopi-r5s/default.nix b/friendlyarm/nanopi-r5s/default.nix index 019b5b86..b7ecb916 100644 --- a/friendlyarm/nanopi-r5s/default.nix +++ b/friendlyarm/nanopi-r5s/default.nix @@ -1,5 +1,4 @@ { lib -, pkgs , ... }: diff --git a/gpd/win-2/default.nix b/gpd/win-2/default.nix index 522b62f3..aaaba374 100644 --- a/gpd/win-2/default.nix +++ b/gpd/win-2/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ...}: +{ config, lib, ...}: { imports = [ ../../common/cpu/intel diff --git a/gpd/win-max-2/2023/default.nix b/gpd/win-max-2/2023/default.nix index 68940044..1f1745ff 100644 --- a/gpd/win-max-2/2023/default.nix +++ b/gpd/win-max-2/2023/default.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, ...}: +{ config, lib, ...}: with lib; -let - cfg = config.hardware.gpd.ppt; -in { imports = [ ./.. diff --git a/hardkernel/odroid-h3/default.nix b/hardkernel/odroid-h3/default.nix index 435ef894..e52d3a02 100644 --- a/hardkernel/odroid-h3/default.nix +++ b/hardkernel/odroid-h3/default.nix @@ -1,5 +1,3 @@ -{ config, lib, ... }: - { imports = [ ../../common/cpu/intel/jasper-lake diff --git a/hp/elitebook/845/g7/default.nix b/hp/elitebook/845/g7/default.nix index 6c0cb49a..60afe6a7 100644 --- a/hp/elitebook/845/g7/default.nix +++ b/hp/elitebook/845/g7/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ pkgs, lib, ... }: { imports = diff --git a/hp/elitebook/845/g9/default.nix b/hp/elitebook/845/g9/default.nix index 6c0cb49a..60afe6a7 100644 --- a/hp/elitebook/845/g9/default.nix +++ b/hp/elitebook/845/g9/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ pkgs, lib, ... }: { imports = diff --git a/lenovo/ideapad/s145-15api/default.nix b/lenovo/ideapad/s145-15api/default.nix index 08b11c76..802e0be1 100644 --- a/lenovo/ideapad/s145-15api/default.nix +++ b/lenovo/ideapad/s145-15api/default.nix @@ -1,5 +1,3 @@ -{ lib, ... }: - { imports = [ ../../../common/cpu/amd diff --git a/lenovo/ideapad/slim-5/default.nix b/lenovo/ideapad/slim-5/default.nix index a830c0bd..c71052df 100644 --- a/lenovo/ideapad/slim-5/default.nix +++ b/lenovo/ideapad/slim-5/default.nix @@ -1,5 +1,3 @@ -{ lib, ... }: - { imports = [ ../../../common/cpu/amd diff --git a/lenovo/legion/15ach6/default.nix b/lenovo/legion/15ach6/default.nix index 4844f79f..a3c00fd7 100644 --- a/lenovo/legion/15ach6/default.nix +++ b/lenovo/legion/15ach6/default.nix @@ -1,7 +1,5 @@ { lib, config, ... }: -let - inherit (config.boot) kernelPackages; -in { +{ imports = [ ../../../common/cpu/amd ../../../common/gpu/amd diff --git a/lenovo/legion/16achg6/hybrid/default.nix b/lenovo/legion/16achg6/hybrid/default.nix index fce43f6e..fa69491b 100644 --- a/lenovo/legion/16achg6/hybrid/default.nix +++ b/lenovo/legion/16achg6/hybrid/default.nix @@ -1,4 +1,4 @@ -{ lib, config, ... }: +{ lib, ... }: { imports = [ diff --git a/lenovo/legion/16irx8h/default.nix b/lenovo/legion/16irx8h/default.nix index 7249c1dd..cfbcb8aa 100644 --- a/lenovo/legion/16irx8h/default.nix +++ b/lenovo/legion/16irx8h/default.nix @@ -1,7 +1,6 @@ { lib, config, - pkgs, ... }: { imports = [ diff --git a/lenovo/thinkpad/t440p/default.nix b/lenovo/thinkpad/t440p/default.nix index 144b7d06..241fc09e 100644 --- a/lenovo/thinkpad/t440p/default.nix +++ b/lenovo/thinkpad/t440p/default.nix @@ -1,5 +1,3 @@ -{ lib, ... }: - { imports = [ ../. diff --git a/microchip/icicle-kit/default.nix b/microchip/icicle-kit/default.nix index 19fb228a..db578167 100644 --- a/microchip/icicle-kit/default.nix +++ b/microchip/icicle-kit/default.nix @@ -1,5 +1,3 @@ -{ pkgs, lib, ... }: - { nixpkgs.overlays = [ (import ./overlay.nix) diff --git a/morefine/m600/default.nix b/morefine/m600/default.nix index db4ed247..48790760 100644 --- a/morefine/m600/default.nix +++ b/morefine/m600/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ...}: { +{ lib, ...}: { imports = [ ../../common/cpu/amd ../../common/cpu/amd/pstate.nix diff --git a/olimex/teres_i/default.nix b/olimex/teres_i/default.nix index 34bec53c..f72cb1d4 100644 --- a/olimex/teres_i/default.nix +++ b/olimex/teres_i/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ...}: +{ lib, pkgs, ...}: { hardware.deviceTree = { diff --git a/onenetbook/4/default.nix b/onenetbook/4/default.nix index 9ac16b50..6b108b4c 100644 --- a/onenetbook/4/default.nix +++ b/onenetbook/4/default.nix @@ -1,4 +1,4 @@ -{ pkgs, config, lib, ... }: +{ config, ... }: { imports = [ diff --git a/pine64/rockpro64/default.nix b/pine64/rockpro64/default.nix index a4d31369..9ac08e83 100644 --- a/pine64/rockpro64/default.nix +++ b/pine64/rockpro64/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ lib, ... }: { boot.initrd.kernelModules = [ # PCIe/NVMe diff --git a/pine64/star64/firmware.nix b/pine64/star64/firmware.nix index c300de49..e0173a6c 100644 --- a/pine64/star64/firmware.nix +++ b/pine64/star64/firmware.nix @@ -1,4 +1,4 @@ -{ callPackage, pkgsBuildHost, runCommand, writeText, writeShellApplication +{ callPackage, pkgsBuildHost, writeText, writeShellApplication , stdenv, dtc, mtdutils, coreutils }: let uboot = callPackage ./uboot.nix { }; diff --git a/pine64/star64/sd-image.nix b/pine64/star64/sd-image.nix index 03d55084..07d00ae8 100644 --- a/pine64/star64/sd-image.nix +++ b/pine64/star64/sd-image.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, modulesPath, ... }: +{ config, pkgs, modulesPath, ... }: let firmware = pkgs.callPackage ./firmware.nix { }; in { diff --git a/purism/librem/5r4/initrd.nix b/purism/librem/5r4/initrd.nix index 7ffe6099..e82d5cff 100644 --- a/purism/librem/5r4/initrd.nix +++ b/purism/librem/5r4/initrd.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, lib, ... }: lib.mkIf config.hardware.librem5.customInitrdModules { boot.initrd = { kernelModules = [ diff --git a/purism/librem/5r4/u-boot/default.nix b/purism/librem/5r4/u-boot/default.nix index 78e60667..26c217c5 100644 --- a/purism/librem/5r4/u-boot/default.nix +++ b/purism/librem/5r4/u-boot/default.nix @@ -1,4 +1,4 @@ -{ stdenv, gcc11Stdenv, buildUBoot, fetchurl, fetchFromGitLab, lib, flex, bison }: +{ stdenv, gcc11Stdenv, buildUBoot, fetchurl, fetchFromGitLab, lib, bison }: let firmware-imx = stdenv.mkDerivation (fa: { pname = "firmware-imx"; diff --git a/purism/librem/5r4/wifi.nix b/purism/librem/5r4/wifi.nix index f469a4f4..5313aeee 100644 --- a/purism/librem/5r4/wifi.nix +++ b/purism/librem/5r4/wifi.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, lib, ... }: lib.mkIf (config.hardware.librem5.wifiCard == "redpine") { # Disable mainline rsi module boot.blacklistedKernelModules = [ diff --git a/starfive/visionfive/v2/firmware.nix b/starfive/visionfive/v2/firmware.nix index f2e68616..03c77076 100644 --- a/starfive/visionfive/v2/firmware.nix +++ b/starfive/visionfive/v2/firmware.nix @@ -1,4 +1,4 @@ -{ callPackage, pkgsBuildHost, runCommand, writeText, writeShellApplication +{ callPackage, pkgsBuildHost, writeText, writeShellApplication , stdenv, dtc, mtdutils, coreutils }: let uboot = callPackage ./uboot.nix { }; diff --git a/starfive/visionfive/v2/sd-image.nix b/starfive/visionfive/v2/sd-image.nix index 6ee39e36..79bb6f35 100644 --- a/starfive/visionfive/v2/sd-image.nix +++ b/starfive/visionfive/v2/sd-image.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, modulesPath, ... }: +{ config, pkgs, modulesPath, ... }: let firmware = pkgs.callPackage ./firmware.nix { }; in { From 3e3571c832d41227ac27867784f609099e2a1e16 Mon Sep 17 00:00:00 2001 From: MayNiklas Date: Wed, 20 Dec 2023 16:30:36 +0100 Subject: [PATCH 0675/1476] add lenovo/thinkpad/x13/yoga/3th-gen --- README.md | 391 ++++++++++--------- flake.nix | 1 + lenovo/thinkpad/x13/yoga/3th-gen/default.nix | 8 + 3 files changed, 205 insertions(+), 195 deletions(-) create mode 100644 lenovo/thinkpad/x13/yoga/3th-gen/default.nix diff --git a/README.md b/README.md index 37a7577c..80602f13 100644 --- a/README.md +++ b/README.md @@ -69,198 +69,199 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md). See code for all available configurations. -| Model | Path | -| ------------------------------------------------------------------- | -------------------------------------------------- | -| [Acer Aspire 4810T](acer/aspire/4810t) | `` | -| [Airis N990](airis/n990) | `` | -| [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | -| [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | -| [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | -| [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | -| [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | -| [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | -| [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | -| [Apple Macs with a T2 Chip](apple/t2) | `` | -| [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | -| [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | -| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | -| [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | -| [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | -| [Asus ROG Zephyrus G15 GA502](asus/zephyrus/ga502) | `` | -| [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | -| [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | -| [Asus TUF FX504GD](asus/fx504gd) | `` | -| [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | -| [Deciso DEC series](deciso/dec) | `` | -| [Dell G3 3779](dell/g3/3779) | `` | -| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | -| [Dell Inspiron 5509](dell/inspiron/5509) | `` | -| [Dell Inspiron 5515](dell/inspiron/5515) | `` | -| [Dell Inspiron 7405](dell/inspiron/7405) | `` | -| [Dell Latitude 3340](dell/latitude/3340) | `` | -| [Dell Latitude 3480](dell/latitude/3480) | `` | -| [Dell Latitude 5520](dell/latitude/5520) | `` | -| [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) | `` | -| [Dell XPS 13 9310](dell/xps/13-9310) | `` | -| [Dell XPS 13 9333](dell/xps/13-9333) | `` | -| [Dell XPS 13 9343](dell/xps/13-9343) | `` | -| [Dell XPS 13 9350](dell/xps/13-9350) | `` | -| [Dell XPS 13 9360](dell/xps/13-9360) | `` | -| [Dell XPS 13 9370](dell/xps/13-9370) | `` | -| [Dell XPS 13 9380](dell/xps/13-9380) | `` | -| [Dell XPS 15 7590, nvidia](dell/xps/15-7590/nvidia) | `` | -| [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 9510, nvidia](dell/xps/15-9510/nvidia) | `` | -| [Dell XPS 15 9510](dell/xps/15-9510) | `` | -| [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) | `` | -| [Dell XPS 15 9560, nvidia only](dell/xps/15-9560/nvidia) | `` | -| [Dell XPS 15 9560](dell/xps/15-9560) | `` | -| [Dell XPS 17 9700, intel](dell/xps/17-9700/intel) | `` | -| [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | -| [Dell XPS E7240](dell/e7240) | `` | -| [Framework 11th Gen Intel Core](framework/13-inch/11th-gen-intel) | ``| -| [Framework 12th Gen Intel Core](framework/13-inch/12th-gen-intel) | ``| -| [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | ``| -| [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | -| [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | -| [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | -| [Focus M2 Gen 1](focus/m2/gen1) | `` | -| [GPD MicroPC](gpd/micropc) | `` | -| [GPD P2 Max](gpd/p2-max) | `` | -| [GPD Pocket 3](gpd/pocket-3) | `` | -| [GPD WIN 2](gpd/win-2) | `` | -| [GPD WIN Max 2 2023](gpd/win-max-2/2023) | `` | -| [Google Pixelbook](google/pixelbook) | `` | -| [HP Elitebook 2560p](hp/elitebook/2560p) | `` | -| [HP Elitebook 845g7](hp/elitebook/845/g7) | `` | -| [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | -| [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | -| [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | -| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | -| [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | -| [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | -| [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | -| [Lenovo IdeaPad S145 15api](lenovo/ideapad/s145-15api) | `` | -| [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | -| [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | -| [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | -| [Lenovo Legion 5 Pro 16ach6h (Hybrid)](lenovo/legion/16ach6h/hybrid)| `` | -| [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia)| `` | -| [Lenovo Legion 7 16achg6 (Hybrid)](lenovo/legion/16achg6/hybrid) | `` | -| [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `` | -| [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | -| [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | -| [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | -| [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | -| [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | -| [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | -| [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13/yoga) | `` | -| [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | -| [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | -| [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | -| [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | -| [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | -| [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | -| [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | -| [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | -| [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `` | -| [Lenovo ThinkPad P52](lenovo/thinkpad/p52) | `` | -| [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | -| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | -| [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | -| [Lenovo ThinkPad T14 AMD Gen 3](lenovo/thinkpad/t14/amd/gen3) | `` | -| [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | -| [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | -| [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | -| [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `` | -| [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `` | -| [Lenovo ThinkPad T430](lenovo/thinkpad/t430) | `` | -| [Lenovo ThinkPad T440p](lenovo/thinkpad/t440p) | `` | -| [Lenovo ThinkPad T440s](lenovo/thinkpad/t440s) | `` | -| [Lenovo ThinkPad T450s](lenovo/thinkpad/t450s) | `` | -| [Lenovo ThinkPad T460](lenovo/thinkpad/t460) | `` | -| [Lenovo ThinkPad T460p](lenovo/thinkpad/t460p) | `` | -| [Lenovo ThinkPad T460s](lenovo/thinkpad/t460s) | `` | -| [Lenovo ThinkPad T470s](lenovo/thinkpad/t470s) | `` | -| [Lenovo ThinkPad T480](lenovo/thinkpad/t480) | `` | -| [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `` | -| [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | -| [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | -| [Lenovo ThinkPad T520](lenovo/thinkpad/t520) | `` | -| [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | -| [Lenovo ThinkPad T590](lenovo/thinkpad/t590) | `` | -| [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | -| [Lenovo ThinkPad X1 Yoga Gen 7](lenovo/thinkpad/x1/yoga/7th-gen/) | `` | -| [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | -| [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | -| [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | -| [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `` | -| [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `` | -| [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | -| [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | -| [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | -| [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | -| [Lenovo ThinkPad X13](lenovo/thinkpad/x13) | `` | -| [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | -| [Lenovo ThinkPad X200s](lenovo/thinkpad/x200s) | `` | -| [Lenovo ThinkPad X220](lenovo/thinkpad/x220) | `` | -| [Lenovo ThinkPad X230](lenovo/thinkpad/x230) | `` | -| [Lenovo ThinkPad X250](lenovo/thinkpad/x250) | `` | -| [Lenovo ThinkPad X260](lenovo/thinkpad/x260) | `` | -| [Lenovo ThinkPad X270](lenovo/thinkpad/x270) | `` | -| [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | -| [Lenovo ThinkPad X390](lenovo/thinkpad/x390) | `` | -| [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | -| [Lenovo ThinkPad Z13](lenovo/thinkpad/z/z13) | `` | -| [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | -| [MSI GS60 2QE](msi/gs60) | `` | -| [MSI GL62/CX62](msi/gl62) | `` | -| [Microchip Icicle Kit](microchip/icicle-kit) | `` | -| [Microsoft Surface Go](microsoft/surface/surface-go) | `` | -| [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel)| ``| -| [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd)| ``| -| [Microsoft Surface Range (Common Modules)](microsoft/surface/common)| `` | -| [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | -| [Morefine M600](morefine/m600) | `` | -| [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | -| [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | -| [Omen 15-en0010ca](omen/15-en0010ca) | `` | -| [Omen 16-n0005ne](omen/16-n0005ne) | `` | -| [Omen 15-en1007sa](omen/15-en1007sa) | `` | -| [Omen en00015p](omen/en00015p) | `` | -| [One-Netbook OneNetbook 4](onenetbook/4) | `` | -| [Panasonic Let's Note CF-LX4 ](panasonic/letsnote/cf-lx4) | `` | -| [PC Engines APU](pcengines/apu) | `` | -| [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | -| [PINE64 RockPro64](pine64/rockpro64/) | `` | -| [PINE64 STAR64](pine64/star64/) | `` | -| [Purism Librem 13v3](purism/librem/13v3) | `` | -| [Purism Librem 15v3](purism/librem/13v3) | `` | -| [Purism Librem 5r4](purism/librem/5r4) | `` | -| [Raspberry Pi 2](raspberry-pi/2) | `` | -| [Raspberry Pi 4](raspberry-pi/4) | `` | -| [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | -| [StarFive VisionFive v1](starfive/visionfive/v1) | `` | -| [StarFive VisionFive 2](starfive/visionfive/v2) | `` | -| [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | -| [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | -| [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | -| [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | -| [System76 (generic)](system76) | `` | -| [System76 Darter Pro 6](system76/darp6) | `` | -| [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | -| [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | -| [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | +| Model | Path | +| ---------------------------------------------------------------------- | ------------------------------------------------------- | +| [Acer Aspire 4810T](acer/aspire/4810t) | `` | +| [Airis N990](airis/n990) | `` | +| [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | +| [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | +| [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | +| [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | +| [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | +| [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | +| [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | +| [Apple Macs with a T2 Chip](apple/t2) | `` | +| [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | +| [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | +| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | +| [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | +| [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | +| [Asus ROG Zephyrus G15 GA502](asus/zephyrus/ga502) | `` | +| [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | +| [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | +| [Asus TUF FX504GD](asus/fx504gd) | `` | +| [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | +| [Deciso DEC series](deciso/dec) | `` | +| [Dell G3 3779](dell/g3/3779) | `` | +| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | +| [Dell Inspiron 5509](dell/inspiron/5509) | `` | +| [Dell Inspiron 5515](dell/inspiron/5515) | `` | +| [Dell Inspiron 7405](dell/inspiron/7405) | `` | +| [Dell Latitude 3340](dell/latitude/3340) | `` | +| [Dell Latitude 3480](dell/latitude/3480) | `` | +| [Dell Latitude 5520](dell/latitude/5520) | `` | +| [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) | `` | +| [Dell XPS 13 9310](dell/xps/13-9310) | `` | +| [Dell XPS 13 9333](dell/xps/13-9333) | `` | +| [Dell XPS 13 9343](dell/xps/13-9343) | `` | +| [Dell XPS 13 9350](dell/xps/13-9350) | `` | +| [Dell XPS 13 9360](dell/xps/13-9360) | `` | +| [Dell XPS 13 9370](dell/xps/13-9370) | `` | +| [Dell XPS 13 9380](dell/xps/13-9380) | `` | +| [Dell XPS 15 7590, nvidia](dell/xps/15-7590/nvidia) | `` | +| [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 9510, nvidia](dell/xps/15-9510/nvidia) | `` | +| [Dell XPS 15 9510](dell/xps/15-9510) | `` | +| [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) | `` | +| [Dell XPS 15 9560, nvidia only](dell/xps/15-9560/nvidia) | `` | +| [Dell XPS 15 9560](dell/xps/15-9560) | `` | +| [Dell XPS 17 9700, intel](dell/xps/17-9700/intel) | `` | +| [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | +| [Dell XPS E7240](dell/e7240) | `` | +| [Framework 11th Gen Intel Core](framework/13-inch/11th-gen-intel) | `` | +| [Framework 12th Gen Intel Core](framework/13-inch/12th-gen-intel) | `` | +| [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `` | +| [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | +| [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | +| [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | +| [Focus M2 Gen 1](focus/m2/gen1) | `` | +| [GPD MicroPC](gpd/micropc) | `` | +| [GPD P2 Max](gpd/p2-max) | `` | +| [GPD Pocket 3](gpd/pocket-3) | `` | +| [GPD WIN 2](gpd/win-2) | `` | +| [GPD WIN Max 2 2023](gpd/win-max-2/2023) | `` | +| [Google Pixelbook](google/pixelbook) | `` | +| [HP Elitebook 2560p](hp/elitebook/2560p) | `` | +| [HP Elitebook 845g7](hp/elitebook/845/g7) | `` | +| [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | +| [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | +| [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | +| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | +| [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | +| [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | +| [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | +| [Lenovo IdeaPad S145 15api](lenovo/ideapad/s145-15api) | `` | +| [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | +| [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | +| [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | +| [Lenovo Legion 5 Pro 16ach6h (Hybrid)](lenovo/legion/16ach6h/hybrid) | `` | +| [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia) | `` | +| [Lenovo Legion 7 16achg6 (Hybrid)](lenovo/legion/16achg6/hybrid) | `` | +| [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `` | +| [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | +| [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | +| [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | +| [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | +| [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | +| [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | +| [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13/yoga) | `` | +| [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | +| [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | +| [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | +| [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | +| [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | +| [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | +| [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | +| [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | +| [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `` | +| [Lenovo ThinkPad P52](lenovo/thinkpad/p52) | `` | +| [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | +| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | +| [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | +| [Lenovo ThinkPad T14 AMD Gen 3](lenovo/thinkpad/t14/amd/gen3) | `` | +| [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | +| [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | +| [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | +| [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `` | +| [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `` | +| [Lenovo ThinkPad T430](lenovo/thinkpad/t430) | `` | +| [Lenovo ThinkPad T440p](lenovo/thinkpad/t440p) | `` | +| [Lenovo ThinkPad T440s](lenovo/thinkpad/t440s) | `` | +| [Lenovo ThinkPad T450s](lenovo/thinkpad/t450s) | `` | +| [Lenovo ThinkPad T460](lenovo/thinkpad/t460) | `` | +| [Lenovo ThinkPad T460p](lenovo/thinkpad/t460p) | `` | +| [Lenovo ThinkPad T460s](lenovo/thinkpad/t460s) | `` | +| [Lenovo ThinkPad T470s](lenovo/thinkpad/t470s) | `` | +| [Lenovo ThinkPad T480](lenovo/thinkpad/t480) | `` | +| [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `` | +| [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | +| [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | +| [Lenovo ThinkPad T520](lenovo/thinkpad/t520) | `` | +| [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | +| [Lenovo ThinkPad T590](lenovo/thinkpad/t590) | `` | +| [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | +| [Lenovo ThinkPad X1 Yoga Gen 7](lenovo/thinkpad/x1/yoga/7th-gen/) | `` | +| [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | +| [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | +| [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | +| [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `` | +| [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `` | +| [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | +| [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | +| [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | +| [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | +| [Lenovo ThinkPad X13 Yoga (3th Gen)](lenovo/thinkpad/x13/yoga/3th-gen) | `` | +| [Lenovo ThinkPad X13](lenovo/thinkpad/x13) | `` | +| [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | +| [Lenovo ThinkPad X200s](lenovo/thinkpad/x200s) | `` | +| [Lenovo ThinkPad X220](lenovo/thinkpad/x220) | `` | +| [Lenovo ThinkPad X230](lenovo/thinkpad/x230) | `` | +| [Lenovo ThinkPad X250](lenovo/thinkpad/x250) | `` | +| [Lenovo ThinkPad X260](lenovo/thinkpad/x260) | `` | +| [Lenovo ThinkPad X270](lenovo/thinkpad/x270) | `` | +| [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | +| [Lenovo ThinkPad X390](lenovo/thinkpad/x390) | `` | +| [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | +| [Lenovo ThinkPad Z13](lenovo/thinkpad/z/z13) | `` | +| [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | +| [MSI GS60 2QE](msi/gs60) | `` | +| [MSI GL62/CX62](msi/gl62) | `` | +| [Microchip Icicle Kit](microchip/icicle-kit) | `` | +| [Microsoft Surface Go](microsoft/surface/surface-go) | `` | +| [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel) | `` | +| [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd) | `` | +| [Microsoft Surface Range (Common Modules)](microsoft/surface/common) | `` | +| [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | +| [Morefine M600](morefine/m600) | `` | +| [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | +| [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | +| [Omen 15-en0010ca](omen/15-en0010ca) | `` | +| [Omen 16-n0005ne](omen/16-n0005ne) | `` | +| [Omen 15-en1007sa](omen/15-en1007sa) | `` | +| [Omen en00015p](omen/en00015p) | `` | +| [One-Netbook OneNetbook 4](onenetbook/4) | `` | +| [Panasonic Let's Note CF-LX4](panasonic/letsnote/cf-lx4) | `` | +| [PC Engines APU](pcengines/apu) | `` | +| [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | +| [PINE64 RockPro64](pine64/rockpro64/) | `` | +| [PINE64 STAR64](pine64/star64/) | `` | +| [Purism Librem 13v3](purism/librem/13v3) | `` | +| [Purism Librem 15v3](purism/librem/13v3) | `` | +| [Purism Librem 5r4](purism/librem/5r4) | `` | +| [Raspberry Pi 2](raspberry-pi/2) | `` | +| [Raspberry Pi 4](raspberry-pi/4) | `` | +| [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | +| [StarFive VisionFive v1](starfive/visionfive/v1) | `` | +| [StarFive VisionFive 2](starfive/visionfive/v2) | `` | +| [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | +| [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | +| [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | +| [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | +| [System76 (generic)](system76) | `` | +| [System76 Darter Pro 6](system76/darp6) | `` | +| [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | +| [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | +| [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | diff --git a/flake.nix b/flake.nix index 3b632328..18988af3 100644 --- a/flake.nix +++ b/flake.nix @@ -153,6 +153,7 @@ lenovo-thinkpad-x1-nano-gen1 = import ./lenovo/thinkpad/x1-nano/gen1; lenovo-thinkpad-x13 = import ./lenovo/thinkpad/x13; lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13/yoga; + lenovo-thinkpad-x13-yoga-3th-gen = import ./lenovo/thinkpad/x13/yoga/3th-gen; lenovo-thinkpad-x140e = import ./lenovo/thinkpad/x140e; lenovo-thinkpad-x200s = import ./lenovo/thinkpad/x200s; lenovo-thinkpad-x220 = import ./lenovo/thinkpad/x220; diff --git a/lenovo/thinkpad/x13/yoga/3th-gen/default.nix b/lenovo/thinkpad/x13/yoga/3th-gen/default.nix new file mode 100644 index 00000000..1b02f61f --- /dev/null +++ b/lenovo/thinkpad/x13/yoga/3th-gen/default.nix @@ -0,0 +1,8 @@ +{ lib, ... }: { + imports = [ + ../. + ]; + + # without throttled, our CPU (i5-1235u) did not boost beyond 1300MHz + services.throttled.enable = lib.mkDefault true; +} From 453896efd821ef562793681568ac64caed3a3c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 25 Dec 2023 21:21:26 +0100 Subject: [PATCH 0676/1476] tests/run.py: reformat with ruff --- tests/run.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/run.py b/tests/run.py index 8cc92f97..af025158 100755 --- a/tests/run.py +++ b/tests/run.py @@ -40,7 +40,8 @@ def build_profile( cmd = [ "nix", "build", - "--extra-experimental-features", "nix-command", + "--extra-experimental-features", + "nix-command", "-f", "build-profile.nix", "-I", @@ -59,7 +60,11 @@ def build_profile( if verbose: print(f"$ {' '.join(cmd)}") res = subprocess.run( - cmd, cwd=TEST_ROOT, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, + cmd, + cwd=TEST_ROOT, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + text=True, ) return (profile, res) @@ -74,7 +79,9 @@ def parse_args() -> argparse.Namespace: "If set to 1 it disable multi processing (suitable for debugging)", ) parser.add_argument( - "--verbose", action="store_true", help="Print evaluation commands executed", + "--verbose", + action="store_true", + help="Print evaluation commands executed", ) parser.add_argument("profiles", nargs="*") return parser.parse_args() From e91914c6cc8bfb3fb2a9bf6a95a0c62299672d4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 25 Dec 2023 21:27:11 +0100 Subject: [PATCH 0677/1476] apply ruff lints --- tests/run.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/tests/run.py b/tests/run.py index af025158..3971e7ae 100755 --- a/tests/run.py +++ b/tests/run.py @@ -8,7 +8,6 @@ import subprocess import sys from functools import partial from pathlib import Path -from typing import List, Tuple TEST_ROOT = Path(__file__).resolve().parent ROOT = TEST_ROOT.parent @@ -18,9 +17,9 @@ RED = "\033[91m" RESET = "\033[0m" -def parse_readme() -> List[str]: +def parse_readme() -> list[str]: profiles = set() - with open(ROOT.joinpath("README.md")) as f: + with ROOT.joinpath("README.md").open() as f: for line in f: results = re.findall(r"]+>", line) profiles.update(results) @@ -29,7 +28,7 @@ def parse_readme() -> List[str]: def build_profile( profile: str, verbose: bool -) -> Tuple[str, subprocess.CompletedProcess]: +) -> tuple[str, subprocess.CompletedProcess]: # Hard-code this for now until we have enough other architectures to care about this. system = "x86_64-linux" if "raspberry-pi/2" in profile: @@ -62,9 +61,9 @@ def build_profile( res = subprocess.run( cmd, cwd=TEST_ROOT, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + capture_output=True, text=True, + check=False, ) return (profile, res) @@ -89,14 +88,11 @@ def parse_args() -> argparse.Namespace: def main() -> None: args = parse_args() - if len(args.profiles) == 0: - profiles = parse_readme() - else: - profiles = args.profiles + profiles = parse_readme() if len(args.profiles) == 0 else args.profiles failed_profiles = [] - def eval_finished(args: Tuple[str, subprocess.CompletedProcess]) -> None: + def eval_finished(args: tuple[str, subprocess.CompletedProcess]) -> None: profile, res = args if res.returncode == 0: print(f"{GREEN}OK {profile}{RESET}") From 05fc10e09377a5e28c54b723da8691daaf44b0b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 25 Dec 2023 21:27:43 +0100 Subject: [PATCH 0678/1476] add pyproject.toml for ruff lints --- tests/pyproject.toml | 64 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 tests/pyproject.toml diff --git a/tests/pyproject.toml b/tests/pyproject.toml new file mode 100644 index 00000000..ede24cb1 --- /dev/null +++ b/tests/pyproject.toml @@ -0,0 +1,64 @@ +[tool.ruff] +line-length = 88 +target-version = "py311" + +select = ["ALL"] +ignore = [ + # pydocstyle + "D", + # todo comments + "TD", + # fixmes + "FIX", + + # Unused function argument + "ARG001", + + # Shebang should contain `python` + "EXE003", + # Shebang should be at the beginning of the file + "EXE005", + + # Missing type annotation for `self` in method + "ANN101", + # Dynamically typed expressions (typing.Any) + "ANN401", + # Trailing comma missing + "COM812", + # Unnecessary `dict` call (rewrite as a literal) + "C408", + # Boolean-typed positional argument in function definition + "FBT001", + # Logging statement uses f-string + "G004", + # disabled on ruff's recommendation as causes problems with the formatter + "ISC001", + # Use of `assert` detected + "S101", + # `subprocess` call: check for execution of untrusted input + "S603", + # Starting a process with a partial executable path + "S607", + # Boolean default positional argument in function definition + "FBT002", + + # Too many statements + "PLR0915", + # Too many arguments in function definition + "PLR0913", + "PLR0912", # Too many branches + # $X is too complex + "C901", + + "E501", # line too long + "T201", # `print` found + "PLR2004", # Magic value used in comparison +] + +[tool.mypy] +python_version = "3.11" +warn_redundant_casts = true +disallow_untyped_calls = true +disallow_untyped_defs = true +no_implicit_optional = true +pretty = true From 65753f5d1144e3bf468a6bfe464011b12c840792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 25 Dec 2023 22:45:38 +0100 Subject: [PATCH 0679/1476] speed up ci using nix-eval-jobs --- tests/build-profile.nix | 21 +++--- tests/run.py | 152 +++++++++++++++++++++++----------------- 2 files changed, 95 insertions(+), 78 deletions(-) diff --git a/tests/build-profile.nix b/tests/build-profile.nix index bdde5dfa..e4e1cdb2 100644 --- a/tests/build-profile.nix +++ b/tests/build-profile.nix @@ -1,7 +1,9 @@ -{ profile }: +{ profile, pkgs }: -let - shim = { config, lib, pkgs, ... }: { +(pkgs.nixos [ + profile + ({ config, lib, ... }: { + nixpkgs.pkgs = pkgs; boot.loader.systemd-boot.enable = !config.boot.loader.generic-extlinux-compatible.enable && !config.boot.loader.raspberryPi.enable; # we forcefully disable grub here just for testing purposes, even though some profiles might still use grub in the end. boot.loader.grub.enable = false; @@ -14,13 +16,6 @@ let device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000"; fsType = "btrfs"; }; - - nixpkgs.config = { - allowBroken = true; - allowUnfree = true; - nvidia.acceptLicense = true; - }; - }; -in (import { - configuration.imports = [ profile shim ]; -}).system + system.stateVersion = lib.version; + }) +]).config.system.build.toplevel diff --git a/tests/run.py b/tests/run.py index 3971e7ae..8ad60256 100755 --- a/tests/run.py +++ b/tests/run.py @@ -1,13 +1,16 @@ #!/usr/bin/env nix-shell -#!nix-shell --quiet -p nix -p python3 -i python +#!nix-shell --quiet -p nix-eval-jobs -p nix -p python3 -i python import argparse +import json import multiprocessing import re import subprocess import sys -from functools import partial +import textwrap from pathlib import Path +from tempfile import TemporaryDirectory +from typing import IO TEST_ROOT = Path(__file__).resolve().parent ROOT = TEST_ROOT.parent @@ -16,58 +19,18 @@ GREEN = "\033[92m" RED = "\033[91m" RESET = "\033[0m" +re_nixos_hardware = re.compile(r"]+)>") + def parse_readme() -> list[str]: profiles = set() with ROOT.joinpath("README.md").open() as f: for line in f: - results = re.findall(r"]+>", line) - profiles.update(results) + if (m := re_nixos_hardware.search(line)) is not None: + profiles.add(m.group(1).strip()) return list(profiles) -def build_profile( - profile: str, verbose: bool -) -> tuple[str, subprocess.CompletedProcess]: - # Hard-code this for now until we have enough other architectures to care about this. - system = "x86_64-linux" - if "raspberry-pi/2" in profile: - system = "armv7l-linux" - if "raspberry-pi/4" in profile: - system = "aarch64-linux" - - cmd = [ - "nix", - "build", - "--extra-experimental-features", - "nix-command", - "-f", - "build-profile.nix", - "-I", - f"nixos-hardware={ROOT}", - "--show-trace", - "--system", - system, - "--arg", - "profile", - profile, - ] - - # uses import from derivation - if profile != "": - cmd += ["--dry-run"] - if verbose: - print(f"$ {' '.join(cmd)}") - res = subprocess.run( - cmd, - cwd=TEST_ROOT, - capture_output=True, - text=True, - check=False, - ) - return (profile, res) - - def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser(description="Run hardware tests") parser.add_argument( @@ -86,31 +49,90 @@ def parse_args() -> argparse.Namespace: return parser.parse_args() +def write_eval_test(f: IO[str], profiles: list[str]) -> None: + build_profile = TEST_ROOT.joinpath("build-profile.nix") + f.write( + textwrap.dedent( + f""" + let + purePkgs = system: import {{ + config = {{ + allowBroken = true; + allowUnfree = true; + nvidia.acceptLicense = true; + }}; + overlays = []; + inherit system; + }}; + pkgs.x86_64-linux = purePkgs "x86_64-linux"; + pkgs.aarch64-linux = purePkgs "aarch64-linux"; + buildProfile = import {build_profile}; + in + """ + ) + ) + f.write("{\n") + for profile in profiles: + # does import-from-derivation + if profile == "toshiba/swanky": + continue + # uses custom nixpkgs config + if profile == "raspberry-pi/2": + continue + + system = "x86_64-linux" + if "raspberry-pi/4" == profile: + system = "aarch64-linux" + + f.write( + f' "{profile}" = buildProfile {{ profile = import {ROOT}/{profile}; pkgs = pkgs.{system}; }};\n' + ) + f.write("}\n") + + +def run_eval_test(eval_test: Path, gcroot_dir: Path, jobs: int) -> list[str]: + failed_profiles = [] + cmd = [ + "nix-eval-jobs", + "--gc-roots-dir", + gcroot_dir, + "--max-memory-size", + "2048", + "--workers", + str(jobs), + str(eval_test), + ] + proc = subprocess.Popen( + cmd, + stdout=subprocess.PIPE, + text=True, + ) + with proc as p: + assert p.stdout is not None + for line in p.stdout: + data = json.loads(line) + attr = data.get("attr") + if "error" in data: + failed_profiles.append(attr) + print(f"{RED}FAIL {attr}:{RESET}", file=sys.stderr) + print(f"{RED}{data['error']}{RESET}", file=sys.stderr) + else: + print(f"{GREEN}OK {attr}{RESET}") + return failed_profiles + + def main() -> None: args = parse_args() profiles = parse_readme() if len(args.profiles) == 0 else args.profiles failed_profiles = [] + with TemporaryDirectory() as tmpdir: + eval_test = Path(tmpdir) / "eval-test.nix" + gcroot_dir = Path(tmpdir) / "gcroot" + with eval_test.open("w") as f: + write_eval_test(f, profiles) + failed_profiles = run_eval_test(eval_test, gcroot_dir, args.jobs) - def eval_finished(args: tuple[str, subprocess.CompletedProcess]) -> None: - profile, res = args - if res.returncode == 0: - print(f"{GREEN}OK {profile}{RESET}") - else: - print(f"{RED}FAIL {profile}:{RESET}", file=sys.stderr) - if res.stdout != "": - print(f"{RED}{res.stdout.rstrip()}{RESET}", file=sys.stderr) - print(f"{RED}{res.stderr.rstrip()}{RESET}", file=sys.stderr) - failed_profiles.append(profile) - - build = partial(build_profile, verbose=args.verbose) - if len(profiles) == 0 or args.jobs == 1: - for profile in profiles: - eval_finished(build(profile)) - else: - pool = multiprocessing.Pool(processes=args.jobs) - for r in pool.imap(build, profiles): - eval_finished(r) if len(failed_profiles) > 0: print(f"\n{RED}The following {len(failed_profiles)} test(s) failed:{RESET}") for profile in failed_profiles: From a15b6e525f5737a47b4ce28445c836996fb2ea8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 25 Dec 2023 22:57:09 +0100 Subject: [PATCH 0680/1476] apple-t2: avoid import-from-derivation --- apple/t2/default.nix | 15 +++++++++------ apple/t2/pkgs/linux-t2.nix | 23 +++++++++++++++-------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/apple/t2/default.nix b/apple/t2/default.nix index 359748a4..33658d65 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -8,6 +8,12 @@ let hash = "sha256-x7K0qa++P1e1vuCGxnsFxL1d9+nwMtZUJ6Kd9e27TFs="; }; + audioFilesUdevRules = pkgs.runCommand "audio-files-udev-rules" {} '' + mkdir -p $out/lib/udev/rules.d + cp ${audioFiles}/files/*.rules $out/lib/udev/rules.d + substituteInPlace $out/lib/udev/rules.d/*.rules --replace "/usr/bin/sed" "${pkgs.gnused}/bin/sed" + ''; + overrideAudioFiles = package: pluginsPath: package.overrideAttrs (new: old: { preConfigurePhases = old.preConfigurePhases or [ ] ++ [ "postPatchPhase" ]; @@ -18,7 +24,7 @@ let pipewirePackage = overrideAudioFiles pkgs.pipewire "spa/plugins/"; - apple-set-os-loader-installer = pkgs.stdenv.mkDerivation rec { + apple-set-os-loader-installer = pkgs.stdenv.mkDerivation { name = "apple-set-os-loader-installer-1.0"; src = pkgs.fetchFromGitHub { owner = "Redecorating"; @@ -51,15 +57,12 @@ in config = { # For keyboard and touchbar - boot.kernelPackages = with pkgs; recurseIntoAttrs (linuxPackagesFor (callPackage ./pkgs/linux-t2.nix { })); + boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./pkgs/linux-t2.nix { }); boot.initrd.kernelModules = [ "apple-bce" ]; # For audio boot.kernelParams = [ "pcie_ports=compat" "intel_iommu=on" "iommu=pt" ]; - services.udev.extraRules = builtins.readFile (pkgs.substitute { - src = "${audioFiles}/files/91-audio-custom.rules"; - replacements = [ "--replace" "/usr/bin/sed" "${pkgs.gnused}/bin/sed" ]; - }); + services.udev.packages = [ audioFilesUdevRules ]; hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/"; diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index b9f01099..40371fe9 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -1,4 +1,5 @@ -{ lib, buildLinux, fetchFromGitHub, fetchurl, ... } @ args: +{ lib, buildLinux, fetchFromGitHub, fetchzip, runCommand +, ... } @ args: let patchRepo = fetchFromGitHub { @@ -18,10 +19,18 @@ buildLinux (args // { # Snippet from nixpkgs modDirVersion = with lib; "${concatStringsSep "." (take 3 (splitVersion "${version}.0"))}"; - src = fetchurl { - url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-eldLvCCALqdrUsp/rwcmf3IEXoYbGJFcUnKpjCer+IQ="; - }; + src = runCommand "patched-source" {} '' + cp -r ${fetchzip { + url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; + hash = "sha256-qJmVSju69WcvDIbgrbtMyCi+OXUNTzNX2G+/0zwsPR4="; + }} $out + chmod -R u+w $out + cd $out + while read -r patch; do + echo "Applying patch $patch"; + patch -p1 < $patch; + done < <(find ${patchRepo} -type f -name "*.patch" | sort) + ''; structuredExtraConfig = with lib.kernel; { APPLE_BCE = module; @@ -40,7 +49,5 @@ buildLinux (args // { STAGING = yes; }; - kernelPatches = lib.attrsets.mapAttrsToList (file: type: { name = file; patch = "${patchRepo}/${file}"; }) - (lib.attrsets.filterAttrs (file: type: type == "regular" && lib.strings.hasSuffix ".patch" file) - (builtins.readDir patchRepo)); + kernelPatches = []; } // (args.argsOverride or {})) From 8ae5b3ff81d4c1e57f76e3237efeb0438f9d4f71 Mon Sep 17 00:00:00 2001 From: Sophie Tauchert Date: Wed, 27 Dec 2023 15:58:20 +0100 Subject: [PATCH 0681/1476] purism librem5r4: linuxPackages_librem5: 6.5.6-librem5 -> 6.6.6-librem5 --- purism/librem/5r4/kernel/kernel.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/purism/librem/5r4/kernel/kernel.nix b/purism/librem/5r4/kernel/kernel.nix index 73c73234..28f59588 100644 --- a/purism/librem/5r4/kernel/kernel.nix +++ b/purism/librem/5r4/kernel/kernel.nix @@ -6,14 +6,14 @@ buildLinux (args // rec { defconfig = "librem5_defconfig"; - version = "6.5.6-librem5"; + version = "6.6.6-librem5"; modDirVersion = version; src = fetchFromGitLab { domain = "source.puri.sm"; owner = "Librem5"; repo = "linux"; - rev = "pureos/6.5.6pureos1"; - hash = "sha256-hOv0oy31mbC+43sI1n1oqKl7TtT/Ivj6UhiW4maumCg="; + rev = "pureos/6.6.6pureos1"; + hash = "sha256-LJfY45yNYgFYLCGxb+WRMYBUHnY4HCI2rkflPeaeFe0="; }; kernelPatches = [ ]; structuredExtraConfig = with lib.kernel; { From 1bace8cedd4fa4ea9efb5ea17a06b9d92af86206 Mon Sep 17 00:00:00 2001 From: Dominic Egginton Date: Wed, 27 Dec 2023 14:16:44 +0000 Subject: [PATCH 0682/1476] feat: add dell latitude 7390 module --- README.md | 1 + dell/latitude/7390/default.nix | 8 ++++++++ flake.nix | 1 + 3 files changed, 10 insertions(+) create mode 100644 dell/latitude/7390/default.nix diff --git a/README.md b/README.md index 80602f13..3aa5334d 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,7 @@ See code for all available configurations. | [Dell Latitude 3340](dell/latitude/3340) | `` | | [Dell Latitude 3480](dell/latitude/3480) | `` | | [Dell Latitude 5520](dell/latitude/5520) | `` | +| [Dell Latitude 7390](dell/latitude/7390) | `` | | [Dell Latitude 7430](dell/latitude/7430) | `` | | [Dell Latitude 7490](dell/latitude/7490) | `` | | [Dell Poweredge R7515](dell/poweredge/r7515) | `` | diff --git a/dell/latitude/7390/default.nix b/dell/latitude/7390/default.nix new file mode 100644 index 00000000..6ce667dc --- /dev/null +++ b/dell/latitude/7390/default.nix @@ -0,0 +1,8 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ]; +} diff --git a/flake.nix b/flake.nix index 18988af3..b91b2492 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,7 @@ dell-latitude-3340 = import ./dell/latitude/3340; dell-latitude-3480 = import ./dell/latitude/3480; dell-latitude-5520 = import ./dell/latitude/5520; + dell-latitude-7390 = import ./dell/latitude/7390; dell-latitude-7430 = import ./dell/latitude/7430; dell-latitude-7490 = import ./dell/latitude/7490; dell-poweredge-r7515 = import ./dell/poweredge/r7515; From 9c3a41257898f632792a6f948d43a6123ae9a5f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 29 Dec 2023 14:07:10 +0100 Subject: [PATCH 0683/1476] framework/13-inch/13th: document on how to get the fingerprint sensor to work --- framework/13-inch/13th-gen-intel/README.md | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/framework/13-inch/13th-gen-intel/README.md b/framework/13-inch/13th-gen-intel/README.md index 8f3b7a42..89e26944 100644 --- a/framework/13-inch/13th-gen-intel/README.md +++ b/framework/13-inch/13th-gen-intel/README.md @@ -13,3 +13,43 @@ Then run ```sh $ fwupdmgr update ``` + +## 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 72fea2077cbd6febb1fa83b697d1ae4950bfc75d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kl=C3=A4hn?= <39526136+Septias@users.noreply.github.com> Date: Fri, 29 Dec 2023 19:58:24 +0100 Subject: [PATCH 0684/1476] Update config for xps-13-9010 Add configuration for finger print --- dell/xps/13-9310/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dell/xps/13-9310/default.nix b/dell/xps/13-9310/default.nix index 8f8fabba..495cff12 100644 --- a/dell/xps/13-9310/default.nix +++ b/dell/xps/13-9310/default.nix @@ -16,6 +16,12 @@ # Without this we get errors in dmesg on boot and hangs when shutting down. boot.blacklistedKernelModules = [ "psmouse" ]; + # enable finger print sensor. + # this has to be configured with `sudo fprintd-enroll septias` + services.fprintd.enable = true; + services.fprintd.tod.enable = true; + services.fprintd.tod.driver = pkgs.libfprint-2-tod1-goodix; + # Allows for updating firmware via `fwupdmgr`. services.fwupd.enable = true; } From 22ae59fec26591ef72ce4ccb5538c42c5f090fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kl=C3=A4hn?= <39526136+Septias@users.noreply.github.com> Date: Fri, 29 Dec 2023 19:59:57 +0100 Subject: [PATCH 0685/1476] Update dell/xps/13-9310/default.nix --- dell/xps/13-9310/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dell/xps/13-9310/default.nix b/dell/xps/13-9310/default.nix index 495cff12..d5fcdc62 100644 --- a/dell/xps/13-9310/default.nix +++ b/dell/xps/13-9310/default.nix @@ -17,7 +17,7 @@ boot.blacklistedKernelModules = [ "psmouse" ]; # enable finger print sensor. - # this has to be configured with `sudo fprintd-enroll septias` + # this has to be configured with `sudo fprintd-enroll `. services.fprintd.enable = true; services.fprintd.tod.enable = true; services.fprintd.tod.driver = pkgs.libfprint-2-tod1-goodix; From 062e4810d8bee4954d32cf78145602e5b66c8704 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sun, 31 Dec 2023 11:59:33 -0500 Subject: [PATCH 0686/1476] starfive visionfive2: update u-boot to SDK version v5.10.3 --- starfive/visionfive/v2/uboot.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/starfive/visionfive/v2/uboot.nix b/starfive/visionfive/v2/uboot.nix index 9666175e..a149f8b7 100644 --- a/starfive/visionfive/v2/uboot.nix +++ b/starfive/visionfive/v2/uboot.nix @@ -1,13 +1,13 @@ { fetchFromGitHub, buildUBoot }: buildUBoot rec { - version = "3.8.2"; + version = "5.10.3"; src = fetchFromGitHub { owner = "starfive-tech"; repo = "u-boot"; - rev = "refs/tags/VF2_v${version}"; - hash = "sha256-M/ndil++spcJCYnpYLb+fuxqCi4H3BunXdHbl529ovM="; + rev = "refs/tags/JH7110_VF2_6.1_v${version}"; + hash = "sha256-4E/AxPCFCluwJBEf6xGuxAi1hPZK5ZxEs5WlBVVfvYE="; }; defconfig = "starfive_visionfive2_defconfig"; From 316bc98323fe3a7e7f72dbbbe68dce0cce3d4984 Mon Sep 17 00:00:00 2001 From: Lena Fuhrimann <6780471+cloudlena@users.noreply.github.com> Date: Sat, 30 Dec 2023 11:49:17 +0100 Subject: [PATCH 0687/1476] Add TUXEDO InfinityBook Pro 14 - Gen7 config --- README.md | 1 + flake.nix | 1 + tuxedo/infinitybook/pro14/gen7/README.md | 1 + tuxedo/infinitybook/pro14/gen7/default.nix | 12 ++++++++++++ 4 files changed, 15 insertions(+) create mode 100644 tuxedo/infinitybook/pro14/gen7/README.md create mode 100644 tuxedo/infinitybook/pro14/gen7/default.nix diff --git a/README.md b/README.md index 3aa5334d..d8aae451 100644 --- a/README.md +++ b/README.md @@ -265,4 +265,5 @@ See code for all available configurations. | [System76 Darter Pro 6](system76/darp6) | `` | | [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | | [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | +| [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | | [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | diff --git a/flake.nix b/flake.nix index b91b2492..f29c9a73 100644 --- a/flake.nix +++ b/flake.nix @@ -208,6 +208,7 @@ system76-darp6 = import ./system76/darp6; toshiba-swanky = import ./toshiba/swanky; tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; + tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7; tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; common-cpu-amd = import ./common/cpu/amd; diff --git a/tuxedo/infinitybook/pro14/gen7/README.md b/tuxedo/infinitybook/pro14/gen7/README.md new file mode 100644 index 00000000..674bbd46 --- /dev/null +++ b/tuxedo/infinitybook/pro14/gen7/README.md @@ -0,0 +1 @@ +# [TUXEDO InfinityBook Pro 14 - Gen7](https://www.tuxedocomputers.com/de/TUXEDO-InfinityBook-Pro-14-Gen7.tuxedo) diff --git a/tuxedo/infinitybook/pro14/gen7/default.nix b/tuxedo/infinitybook/pro14/gen7/default.nix new file mode 100644 index 00000000..9971b7bc --- /dev/null +++ b/tuxedo/infinitybook/pro14/gen7/default.nix @@ -0,0 +1,12 @@ +{ lib, ... }: + +{ + imports = [ + ../../../../common/cpu/intel + ../../../../common/pc/laptop + ../../../../common/pc/ssd + ]; + + # Cooling management + services.thermald.enable = lib.mkDefault true; +} From f752581d6723a10da7dfe843e917a3b5e4d8115a Mon Sep 17 00:00:00 2001 From: Keanu Kerr Date: Mon, 1 Jan 2024 13:19:05 +0100 Subject: [PATCH 0688/1476] Added file for HP EliteBook 845 G8 and updated flake and README --- README.md | 1 + flake.nix | 1 + hp/elitebook/845/g8/default.nix | 25 +++++++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 hp/elitebook/845/g8/default.nix diff --git a/README.md b/README.md index d8aae451..b8e45bbe 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,7 @@ See code for all available configurations. | [Google Pixelbook](google/pixelbook) | `` | | [HP Elitebook 2560p](hp/elitebook/2560p) | `` | | [HP Elitebook 845g7](hp/elitebook/845/g7) | `` | +| [HP Elitebook 845g8](hp/elitebook/845/g8) | `` | | [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | | [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | | [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | diff --git a/flake.nix b/flake.nix index f29c9a73..4d44aa22 100644 --- a/flake.nix +++ b/flake.nix @@ -82,6 +82,7 @@ gpd-win-max-2-2023 = import ./gpd/win-max-2/2023; hp-elitebook-2560p = import ./hp/elitebook/2560p; hp-elitebook-845g7 = import ./hp/elitebook/845/g7; + hp-elitebook-845g8 = import ./hp/elitebook/845/g8; hp-elitebook-845g9 = import ./hp/elitebook/845/g9; hp-notebook-14-df0023 = import ./hp/notebook/14-df0023; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; diff --git a/hp/elitebook/845/g8/default.nix b/hp/elitebook/845/g8/default.nix new file mode 100644 index 00000000..60afe6a7 --- /dev/null +++ b/hp/elitebook/845/g8/default.nix @@ -0,0 +1,25 @@ +{ pkgs, lib, ... }: + +{ + imports = + [ + ../../../../common/cpu/amd + ../../../../common/cpu/amd/pstate.nix + ../../../../common/gpu/amd + ../../../../common/pc/laptop + ../../../../common/pc/laptop/acpi_call.nix + ../../../../common/pc/laptop/ssd + ]; + + hardware.enableRedistributableFirmware = lib.mkDefault true; + boot.kernelModules = [ "synaptics_usb" ]; + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.3") (lib.mkDefault pkgs.linuxPackages_latest); + + # disable Scatter/Gather APU recently enabled by default, + # which results in white screen after display reconfiguration + boot.kernelParams = [ "amdgpu.sg_display=0" ]; + + services.xserver = { + videoDrivers = [ "amdgpu" ]; + }; +} From c2f991b91ec4d0da53d04317914eacad354ad0a6 Mon Sep 17 00:00:00 2001 From: Will Lucas Date: Thu, 28 Dec 2023 10:41:41 -0600 Subject: [PATCH 0689/1476] Added support for Lenovo Legion Slim 5 (16APH8) Added PPD after researching the Framework laptops with AMD 7000 series --- common/cpu/amd/raphael/igpu.nix | 4 ++-- flake.nix | 1 + lenovo/legion/16aph8/README.md | 38 ++++++++++++++++++++++++++++++++ lenovo/legion/16aph8/default.nix | 36 ++++++++++++++++++++++++++++++ 4 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 lenovo/legion/16aph8/README.md create mode 100644 lenovo/legion/16aph8/default.nix diff --git a/common/cpu/amd/raphael/igpu.nix b/common/cpu/amd/raphael/igpu.nix index 82514c27..6faffd0e 100644 --- a/common/cpu/amd/raphael/igpu.nix +++ b/common/cpu/amd/raphael/igpu.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, pkgs, ... }: { # Sets the kernel version to the latest kernel to make the usage of the iGPU possible if your kernel version is too old @@ -10,7 +10,7 @@ boot = lib.mkMerge [ (lib.mkIf (lib.versionOlder pkgs.linux.version "6.1") { kernelPackages = pkgs.linuxPackages_latest; - kernelParams = ["amdgpu.sg_display=0"]; + kernelParams = ["amdgpu.sg_display=0"]; }) (lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.2") { diff --git a/flake.nix b/flake.nix index 4d44aa22..c3db4040 100644 --- a/flake.nix +++ b/flake.nix @@ -97,6 +97,7 @@ lenovo-legion-16ach6h-nvidia = import ./lenovo/legion/16ach6h/nvidia; lenovo-legion-16achg6-hybrid = import ./lenovo/legion/16achg6/hybrid; lenovo-legion-16achg6-nvidia = import ./lenovo/legion/16achg6/nvidia; + lenovo-legion-16aph8 = import ./lenovo/legion/16aph8; lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h; lenovo-legion-y530-15ich = import ./lenovo/legion/15ich; diff --git a/lenovo/legion/16aph8/README.md b/lenovo/legion/16aph8/README.md new file mode 100644 index 00000000..c9bbe7c2 --- /dev/null +++ b/lenovo/legion/16aph8/README.md @@ -0,0 +1,38 @@ +I was unable to get the hybrid settings working well with lightdm or sddm, but Optimus Sync +mode seems to work the best for me. + +I am running the Linux 6.6 LTS kernel with KDE + SDDM, and it seems to be working well. + +## hardware-configuration.nix + +I have the following customizations added for my nvidia drivers. + +``` +hardware.nvidia = { + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; +}; +``` + +## Setup at the time of testing + +### nix-info +``` +$ nix-info -m + - system: `"x86_64-linux"` + - host os: `Linux 6.1.68, NixOS, 23.11 (Tapir), 23.11.20231220.d65bcea` + - multi-user?: `yes` + - sandbox: `yes` + - version: `nix-env (Nix) 2.18.1` + - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos` +``` + +### lspci +``` +$ lspci +... +01:00.0 VGA compatible controller: NVIDIA Corporation AD107M [GeForce RTX 4060 Max-Q / Mobile] (rev a1) +... +05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 (rev c2) +... +``` diff --git a/lenovo/legion/16aph8/default.nix b/lenovo/legion/16aph8/default.nix new file mode 100644 index 00000000..b693ccae --- /dev/null +++ b/lenovo/legion/16aph8/default.nix @@ -0,0 +1,36 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ../../../common/gpu/nvidia + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + # Use latest LTS kernel for more Raphael fixes + boot = lib.mkMerge [ + (lib.mkIf (lib.versionOlder pkgs.linux.version "6.6") { + kernelPackages = pkgs.linuxPackages_6_6; + kernelParams = ["amdgpu.sg_display=0"]; + }) + ]; + + hardware.nvidia = { + modesetting.enable = lib.mkDefault true; + powerManagement.enable = lib.mkDefault false; + powerManagement.finegrained = lib.mkDefault false; + open = lib.mkDefault false; + prime = { + sync.enable = lib.mkDefault true; + amdgpuBusId = "PCI:5:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + + # AMD has better battery life with PPD over TLP: + # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 + services.power-profiles-daemon.enable = lib.mkDefault true; +} From 158afdeaf85065c481d888d70c4f2975cce61b2b Mon Sep 17 00:00:00 2001 From: Will Lucas Date: Mon, 1 Jan 2024 22:49:05 -0600 Subject: [PATCH 0690/1476] Corrected nix-info from an earlier build --- lenovo/legion/16aph8/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/legion/16aph8/README.md b/lenovo/legion/16aph8/README.md index c9bbe7c2..a18718d4 100644 --- a/lenovo/legion/16aph8/README.md +++ b/lenovo/legion/16aph8/README.md @@ -20,7 +20,7 @@ hardware.nvidia = { ``` $ nix-info -m - system: `"x86_64-linux"` - - host os: `Linux 6.1.68, NixOS, 23.11 (Tapir), 23.11.20231220.d65bcea` + - host os: `Linux 6.6.8, NixOS, 23.11 (Tapir), 23.11.20231231.32f6357` - multi-user?: `yes` - sandbox: `yes` - version: `nix-env (Nix) 2.18.1` From d10b79582330966723efc10df3bc4167cf22fdfe Mon Sep 17 00:00:00 2001 From: Will Lucas Date: Mon, 1 Jan 2024 22:58:40 -0600 Subject: [PATCH 0691/1476] Disable modesetting --- lenovo/legion/16aph8/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/legion/16aph8/default.nix b/lenovo/legion/16aph8/default.nix index b693ccae..68159dbf 100644 --- a/lenovo/legion/16aph8/default.nix +++ b/lenovo/legion/16aph8/default.nix @@ -19,7 +19,7 @@ ]; hardware.nvidia = { - modesetting.enable = lib.mkDefault true; + modesetting.enable = lib.mkDefault false; powerManagement.enable = lib.mkDefault false; powerManagement.finegrained = lib.mkDefault false; open = lib.mkDefault false; From 0f29eb0b0f2edaae76e1f83f50b9593e57b9ebeb Mon Sep 17 00:00:00 2001 From: Will Lucas Date: Mon, 1 Jan 2024 23:03:33 -0600 Subject: [PATCH 0692/1476] Force to only "nvidia" for xserver.videoDrivers to avoid blank screen issues --- lenovo/legion/16aph8/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lenovo/legion/16aph8/default.nix b/lenovo/legion/16aph8/default.nix index 68159dbf..56101547 100644 --- a/lenovo/legion/16aph8/default.nix +++ b/lenovo/legion/16aph8/default.nix @@ -18,8 +18,10 @@ }) ]; + services.xserver.videoDrivers = [ "nvidia" ]; + hardware.nvidia = { - modesetting.enable = lib.mkDefault false; + modesetting.enable = lib.mkDefault true; powerManagement.enable = lib.mkDefault false; powerManagement.finegrained = lib.mkDefault false; open = lib.mkDefault false; From a5028e96cc8cabb78ab58edc251e122e9ac7c7b2 Mon Sep 17 00:00:00 2001 From: Will Lucas Date: Mon, 1 Jan 2024 23:06:07 -0600 Subject: [PATCH 0693/1476] Small cleanup --- lenovo/legion/16aph8/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lenovo/legion/16aph8/default.nix b/lenovo/legion/16aph8/default.nix index 56101547..4f82d687 100644 --- a/lenovo/legion/16aph8/default.nix +++ b/lenovo/legion/16aph8/default.nix @@ -18,8 +18,6 @@ }) ]; - services.xserver.videoDrivers = [ "nvidia" ]; - hardware.nvidia = { modesetting.enable = lib.mkDefault true; powerManagement.enable = lib.mkDefault false; @@ -32,6 +30,9 @@ }; }; + # Avoid issues with modesetting causing blank screen + services.xserver.videoDrivers = [ "nvidia" ]; + # AMD has better battery life with PPD over TLP: # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 services.power-profiles-daemon.enable = lib.mkDefault true; From 5bf829d72ccdc05be3343afd81bd922d5748ef4e Mon Sep 17 00:00:00 2001 From: mevatron Date: Tue, 2 Jan 2024 09:19:49 -0600 Subject: [PATCH 0694/1476] Update lenovo/legion/16aph8/default.nix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks for the tip! Co-authored-by: Jörg Thalheim --- lenovo/legion/16aph8/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/legion/16aph8/default.nix b/lenovo/legion/16aph8/default.nix index 4f82d687..4718cd3d 100644 --- a/lenovo/legion/16aph8/default.nix +++ b/lenovo/legion/16aph8/default.nix @@ -13,7 +13,7 @@ # Use latest LTS kernel for more Raphael fixes boot = lib.mkMerge [ (lib.mkIf (lib.versionOlder pkgs.linux.version "6.6") { - kernelPackages = pkgs.linuxPackages_6_6; + kernelPackages = pkgs.linuxPackages_latest; kernelParams = ["amdgpu.sg_display=0"]; }) ]; From db4589c6aa99135e320429e203e1b45de2f98d3e Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sun, 31 Dec 2023 22:43:10 -0500 Subject: [PATCH 0695/1476] starfive visionfive2: adjust opensbi build params to match u-boot doc --- starfive/visionfive/v2/opensbi.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/starfive/visionfive/v2/opensbi.nix b/starfive/visionfive/v2/opensbi.nix index 5b46fec6..f5512347 100644 --- a/starfive/visionfive/v2/opensbi.nix +++ b/starfive/visionfive/v2/opensbi.nix @@ -1,14 +1,13 @@ -{ opensbi, withPayload, withFDT }: +{ opensbi }: -(opensbi.override { - inherit withPayload withFDT; -}).overrideAttrs (attrs: { +opensbi.overrideAttrs (attrs: { makeFlags = attrs.makeFlags ++ [ # opensbi generic platform default FW_TEXT_START is 0x80000000 # For JH7110, need to specify the FW_TEXT_START to 0x40000000 # Otherwise, the fw_payload.bin downloading via jtag will not run. # https://github.com/starfive-tech/VisionFive2/blob/7733673d27052dc5a48f1cb1d060279dfa3f0241/Makefile#L274 + # Also matches u-boot documentation: https://docs.u-boot.org/en/latest/board/starfive/visionfive2.html "FW_TEXT_START=0x40000000" + "FW_OPTIONS=0" ]; }) - From 637fba094214ce2e3ea71c1c2e73d1a2ba95bfd1 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sun, 31 Dec 2023 22:43:55 -0500 Subject: [PATCH 0696/1476] starfive visionfive2: use upstream u-boot v2024.01-rc5 --- starfive/visionfive/v2/uboot.nix | 34 +++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/starfive/visionfive/v2/uboot.nix b/starfive/visionfive/v2/uboot.nix index a149f8b7..c9fde3d3 100644 --- a/starfive/visionfive/v2/uboot.nix +++ b/starfive/visionfive/v2/uboot.nix @@ -1,20 +1,36 @@ -{ fetchFromGitHub, buildUBoot }: +{ lib +, fetchFromGitHub +, buildUBoot +, buildPackages +, opensbi +}: buildUBoot rec { - version = "5.10.3"; + version = "2024.01-rc5"; src = fetchFromGitHub { - owner = "starfive-tech"; + owner = "u-boot"; repo = "u-boot"; - rev = "refs/tags/JH7110_VF2_6.1_v${version}"; - hash = "sha256-4E/AxPCFCluwJBEf6xGuxAi1hPZK5ZxEs5WlBVVfvYE="; + rev = "refs/tags/v${version}"; + hash = "sha256-QlwgvnSaXh39z9AM7HNF731lRiUkPbN3oQyioQNTYFA="; }; + # workaround for https://github.com/NixOS/nixpkgs/pull/146634 + # uboot: only apply raspberry pi patches to raspberry pi builds + patches = [ ]; + + extraMakeFlags = [ + # workaround for https://github.com/NixOS/nixpkgs/pull/277997 + # buildUBoot: specify absolute path of dtc, fix building u-boot 2023.10+ + "DTC=${lib.getExe buildPackages.dtc}" + + "OPENSBI=${opensbi}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin" + ]; + defconfig = "starfive_visionfive2_defconfig"; + filesToInstall = [ - "u-boot.bin" - "arch/riscv/dts/starfive_visionfive2.dtb" - "spl/u-boot-spl.bin" - "tools/mkimage" + "spl/u-boot-spl.bin.normal.out" + "u-boot.itb" ]; } From dd78777e1275a646a214e66f9b9157d304250030 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sun, 31 Dec 2023 22:50:15 -0500 Subject: [PATCH 0697/1476] starfive visionfive2: rework firmware build/update scripts --- starfive/visionfive/v2/firmware.nix | 76 +++++------------------------ starfive/visionfive/v2/sd-image.nix | 4 +- 2 files changed, 14 insertions(+), 66 deletions(-) diff --git a/starfive/visionfive/v2/firmware.nix b/starfive/visionfive/v2/firmware.nix index 03c77076..710576d0 100644 --- a/starfive/visionfive/v2/firmware.nix +++ b/starfive/visionfive/v2/firmware.nix @@ -1,78 +1,26 @@ -{ callPackage, pkgsBuildHost, writeText, writeShellApplication -, stdenv, dtc, mtdutils, coreutils }: -let - uboot = callPackage ./uboot.nix { }; - opensbi = callPackage ./opensbi.nix { - withPayload = "${uboot}/u-boot.bin"; - withFDT = "${uboot}/starfive_visionfive2.dtb"; - }; - spl-tool = pkgsBuildHost.callPackage ./spl-tool.nix { }; - its-file = writeText "visionfive2-uboot-fit-image.its" '' - /dts-v1/; +{ callPackage +, writeShellApplication +, stdenv +, mtdutils +}: - / { - description = "U-boot-spl FIT image for JH7110 VisionFive2"; - #address-cells = <2>; - - images { - firmware { - description = "u-boot"; - data = /incbin/("${opensbi}/share/opensbi/lp64/generic/firmware/fw_payload.bin"); - type = "firmware"; - arch = "riscv"; - os = "u-boot"; - load = <0x0 0x40000000>; - entry = <0x0 0x40000000>; - compression = "none"; - }; - }; - - configurations { - default = "config-1"; - - config-1 { - description = "U-boot-spl FIT config for JH7110 VisionFive2"; - firmware = "firmware"; - }; - }; - }; - ''; -in rec { - inherit opensbi uboot; - spl = stdenv.mkDerivation { - name = "starfive-visionfive2-spl"; - depsBuildBuild = [ spl-tool ]; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/share/starfive-visionfive2/ - ln -s ${uboot}/u-boot-spl.bin . - spl_tool -c -f ./u-boot-spl.bin - cp u-boot-spl.bin.normal.out $out/share/starfive-visionfive2/spl.bin - ''; - }; - uboot-fit-image = stdenv.mkDerivation { - name = "starfive-visionfive2-uboot-fit-image"; - nativeBuildInputs = [ dtc ]; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/share/starfive-visionfive2/ - ${uboot}/mkimage -f ${its-file} -A riscv -O u-boot -T firmware $out/share/starfive-visionfive2/visionfive2_fw_payload.img - ''; - }; +rec { + opensbi = callPackage ./opensbi.nix { }; + uboot = callPackage ./uboot.nix { inherit opensbi; }; updater-flash = writeShellApplication { name = "visionfive2-firmware-update-flash"; runtimeInputs = [ mtdutils ]; text = '' - flashcp -v ${spl}/share/starfive-visionfive2/spl.bin /dev/mtd0 - flashcp -v ${uboot-fit-image}/share/starfive-visionfive2/visionfive2_fw_payload.img /dev/mtd1 + flashcp -v ${uboot}/u-boot-spl.bin.normal.out /dev/mtd0 + flashcp -v ${uboot}/u-boot.itb /dev/mtd1 ''; }; updater-sd = writeShellApplication { name = "visionfive2-firmware-update-sd"; runtimeInputs = [ ]; text = '' - dd if=${spl}/share/starfive-visionfive2/spl.bin of=/dev/mmcblk0p1 conv=fsync - dd if=${uboot-fit-image}/share/starfive-visionfive2/visionfive2_fw_payload.img of=/dev/mmcblk0p2 conv=fsync + dd if=${uboot}/u-boot-spl.bin.normal.out of=/dev/mmcblk0p1 conv=fsync + dd if=${uboot}/u-boot.itb of=/dev/mmcblk0p2 conv=fsync ''; }; } diff --git a/starfive/visionfive/v2/sd-image.nix b/starfive/visionfive/v2/sd-image.nix index 79bb6f35..7c30f9c3 100644 --- a/starfive/visionfive/v2/sd-image.nix +++ b/starfive/visionfive/v2/sd-image.nix @@ -36,10 +36,10 @@ in { EOF eval $(partx $img -o START,SECTORS --nr 1 --pairs) - dd conv=notrunc if=${firmware.spl}/share/starfive-visionfive2/spl.bin of=$img seek=$START count=$SECTORS + dd conv=notrunc if=${firmware.uboot}/u-boot-spl.bin.normal.out of=$img seek=$START count=$SECTORS eval $(partx $img -o START,SECTORS --nr 2 --pairs) - dd conv=notrunc if=${firmware.uboot-fit-image}/share/starfive-visionfive2/visionfive2_fw_payload.img of=$img seek=$START count=$SECTORS + dd conv=notrunc if=${firmware.uboot}/u-boot.itb of=$img seek=$START count=$SECTORS ''; populateRootCommands = '' From 8e34f33464d77bea2d5cf7dc1066647b1ad2b324 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 1 Jan 2024 13:15:08 -0500 Subject: [PATCH 0698/1476] starfive visionfive2: write u-boot.itb to mtd2 --- starfive/visionfive/v2/firmware.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starfive/visionfive/v2/firmware.nix b/starfive/visionfive/v2/firmware.nix index 710576d0..eabeb6c4 100644 --- a/starfive/visionfive/v2/firmware.nix +++ b/starfive/visionfive/v2/firmware.nix @@ -12,7 +12,7 @@ rec { runtimeInputs = [ mtdutils ]; text = '' flashcp -v ${uboot}/u-boot-spl.bin.normal.out /dev/mtd0 - flashcp -v ${uboot}/u-boot.itb /dev/mtd1 + flashcp -v ${uboot}/u-boot.itb /dev/mtd2 ''; }; updater-sd = writeShellApplication { 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 0699/1476] 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 be3293e7..54bf5d73 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 0700/1476] 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 645c4cf2..1bd03451 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 0701/1476] 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 e19b3f5f..9f4a04a2 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 0702/1476] 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 9f4a04a2..c79061af 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 0703/1476] 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 2bf19517..6ac1eb14 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 1678f817..c6a75198 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 0704/1476] 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 1bd03451..eaa796dd 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 0705/1476] 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 485c0e2a..7499a19b 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 0706/1476] 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 992ec9bc..55f22dab 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 dbb61d7e..00000000 --- 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 e197649e..00000000 --- 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 a1073ddd..fdd13f6c 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 0707/1476] 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 54bf5d73..bb46c3cb 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 9f31c6be..81ff7076 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 0708/1476] 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 0affd383..49e36b16 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 0709/1476] 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 64b8af6f..c16f3421 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 1aa0c4bc..1f1c4561 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 0710/1476] 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 782cde3e..2f01e7ff 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 From bee2202bec57e521e3bd8acd526884b9767d7fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Wed, 10 Jan 2024 16:55:44 +0000 Subject: [PATCH 0711/1476] Add support for Yoga Slim 7 Gen8 --- README.md | 1 + flake.nix | 1 + lenovo/yoga/7/slim/gen8/default.nix | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 lenovo/yoga/7/slim/gen8/default.nix diff --git a/README.md b/README.md index b8e45bbe..4d6a9530 100644 --- a/README.md +++ b/README.md @@ -229,6 +229,7 @@ See code for all available configurations. | [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | | [Lenovo ThinkPad Z13](lenovo/thinkpad/z/z13) | `` | | [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | +| [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `` | | [MSI GS60 2QE](msi/gs60) | `` | | [MSI GL62/CX62](msi/gl62) | `` | | [Microchip Icicle Kit](microchip/icicle-kit) | `` | diff --git a/flake.nix b/flake.nix index c3db4040..5517f4c3 100644 --- a/flake.nix +++ b/flake.nix @@ -169,6 +169,7 @@ lenovo-thinkpad-z = import ./lenovo/thinkpad/z; lenovo-thinkpad-z13 = import ./lenovo/thinkpad/z/z13; lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; + lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; microchip-icicle-kit = import ./microchip/icicle-kit; microsoft-surface-go = import ./microsoft/surface/surface-go; diff --git a/lenovo/yoga/7/slim/gen8/default.nix b/lenovo/yoga/7/slim/gen8/default.nix new file mode 100644 index 00000000..5f87802d --- /dev/null +++ b/lenovo/yoga/7/slim/gen8/default.nix @@ -0,0 +1,20 @@ +{ pkgs, lib, ... }: { + boot.initrd.kernelModules = [ "amdgpu" ]; + boot.kernelModules = [ "kvm-amd" ]; + + # https://gitlab.freedesktop.org/drm/amd/-/issues/2812#note_2190544 + boot.kernelParams = ["mem_sleep_default=deep" "rtc_cmos.use_acpi_alarm=1"]; + + # suspend needs kernel 6.7 or later + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.7") pkgs.linuxPackages_latest; + + # https://gitlab.freedesktop.org/drm/amd/-/issues/2812#note_2190544 + hardware.enableRedistributableFirmware = true; + hardware.cpu.amd.updateMicrocode = true; + boot.initrd.prepend = lib.mkOrder 0 [ "${pkgs.fetchurl { + url = "https://gitlab.freedesktop.org/drm/amd/uploads/9fe228c7aa403b78c61fb1e29b3b35e3/slim7-ssdt"; + sha256 = "sha256-Ef4QTxdjt33OJEPLAPEChvvSIXx3Wd/10RGvLfG5JUs="; + name = "slim7-ssdt"; + }}" ]; +} + From 6b5d311cb66a153bffbdf96d5e9b79f1c3656a2e Mon Sep 17 00:00:00 2001 From: damianoognissanti <97738787+damianoognissanti@users.noreply.github.com> Date: Tue, 16 Jan 2024 18:28:45 +0100 Subject: [PATCH 0712/1476] Fix patches.nix As discussed here: https://github.com/NixOS/nixos-hardware/issues/523 1) `structuredExtraConfig` is called `extraStructuredConfig` when using `kernelPatches` 2) STREAMING_MEDIA should be STAGING_MEDIA --- microsoft/surface/common/kernel/linux-6.6.x/patches.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-6.6.x/patches.nix b/microsoft/surface/common/kernel/linux-6.6.x/patches.nix index 40264adb..4d3b947a 100644 --- a/microsoft/surface/common/kernel/linux-6.6.x/patches.nix +++ b/microsoft/surface/common/kernel/linux-6.6.x/patches.nix @@ -7,8 +7,8 @@ { name = "microsoft-surface-patches-linux-${version}"; patch = null; - structuredExtraConfig = with kernel; { - STREAMING_MEDIA = yes; + extraStructuredConfig = with kernel; { + STAGING_MEDIA = yes; # # Surface Aggregator Module From e57f8c264a4b6c2c8fef65dcd1adc13237004901 Mon Sep 17 00:00:00 2001 From: damianoognissanti <97738787+damianoognissanti@users.noreply.github.com> Date: Tue, 16 Jan 2024 18:41:29 +0100 Subject: [PATCH 0713/1476] Update default.nix Needed to make kernel build if options from patch are missing. --- microsoft/surface/common/kernel/linux-6.6.x/default.nix | 1 + 1 file changed, 1 insertion(+) 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 eaa796dd..abbc0d28 100644 --- a/microsoft/surface/common/kernel/linux-6.6.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.6.x/default.nix @@ -23,6 +23,7 @@ let url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; sha256 = "sha256-nuYn5MEJrsf8o+2liY6B0gGvLH6y99nX2UwfDhIFVGw="; }; + ignoreConfigErrors=true; }; From ff16da3a6b77941830b1971ef7107a2e7d4da714 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sun, 21 Jan 2024 15:00:14 -0500 Subject: [PATCH 0714/1476] starfive visionfive2: update u-boot to 2024.01 --- starfive/visionfive/v2/uboot.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/starfive/visionfive/v2/uboot.nix b/starfive/visionfive/v2/uboot.nix index c9fde3d3..9c0eb7a1 100644 --- a/starfive/visionfive/v2/uboot.nix +++ b/starfive/visionfive/v2/uboot.nix @@ -6,13 +6,13 @@ }: buildUBoot rec { - version = "2024.01-rc5"; + version = "2024.01"; src = fetchFromGitHub { owner = "u-boot"; repo = "u-boot"; rev = "refs/tags/v${version}"; - hash = "sha256-QlwgvnSaXh39z9AM7HNF731lRiUkPbN3oQyioQNTYFA="; + hash = "sha256-0Da7Czy9cpQ+D5EICc3/QSZhAdCBsmeMvBgykYhAQFw="; }; # workaround for https://github.com/NixOS/nixpkgs/pull/146634 From abff72bb97ac85cdd192f32aecbed914ead928db Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Wed, 24 Jan 2024 09:25:36 +0100 Subject: [PATCH 0715/1476] surface: linux 6.6.10 -> 6.6.13 --- 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 eaa796dd..ae5fd791 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.10"; + version = "6.6.13"; 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-nuYn5MEJrsf8o+2liY6B0gGvLH6y99nX2UwfDhIFVGw="; + sha256 = "sha256-iLiefdQerU46seQRyLuNWSV1rPgVzx3zwNxX4uiCwLw="; }; }; From 7def5339687ab801e11c8e1395b533ba270e3748 Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 31 Jan 2024 12:00:03 +1300 Subject: [PATCH 0716/1476] Drop the deprecated "linuxPackage1" function, rename "linuxPackage2" to "linuxPackage" --- .../common/kernel/linux-6.6.x/default.nix | 4 ++-- .../surface/common/kernel/linux-package.nix | 20 ++----------------- 2 files changed, 4 insertions(+), 20 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 0aa02221..66631388 100644 --- a/microsoft/surface/common/kernel/linux-6.6.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.6.x/default.nix @@ -3,7 +3,7 @@ let inherit (lib) mkIf mkOption types; - inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage2 surfacePatches; + inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches; cfg = config.microsoft-surface; @@ -12,7 +12,7 @@ let inherit version; patchFn = ./patches.nix; }; - kernelPackages = linuxPackage2 { + kernelPackages = linuxPackage { inherit version kernelPatches; sha256 = "sha256-iLiefdQerU46seQRyLuNWSV1rPgVzx3zwNxX4uiCwLw="; ignoreConfigErrors=true; diff --git a/microsoft/surface/common/kernel/linux-package.nix b/microsoft/surface/common/kernel/linux-package.nix index 8d92553b..2672e363 100644 --- a/microsoft/surface/common/kernel/linux-package.nix +++ b/microsoft/surface/common/kernel/linux-package.nix @@ -9,20 +9,7 @@ let inherit (lib) recurseIntoAttrs versions; repos = pkgs.callPackage ../repos.nix {}; - # Version 1 of the linuxPackage function: - # (DEPRECATED) - linuxPackage1 = - { version, - modDirVersion ? version, - ... - } @ args: - let - buildLinux' = buildLinux (args // { inherit modDirVersion; }); - linuxPackagesFor' = linuxPackagesFor buildLinux'; - in recurseIntoAttrs linuxPackagesFor'; - - # Version 1 of the linuxPackage function, with hopefully simplified arguments: - linuxPackage2 = + linuxPackage = { url ? "mirror://kernel/linux/kernel/v${versions.major version}.x/linux-${version}.tar.xz", sha256 ? null, src ? (fetchurl { inherit url sha256; }), @@ -50,8 +37,5 @@ let }; in { - inherit linuxPackage1 linuxPackage2 repos surfacePatches; - - # Default version: - linuxPackage = linuxPackage2; + inherit linuxPackage repos surfacePatches; } From 606b6a270e7b9aed4164b088ce8d6c0c9458c7d9 Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 31 Jan 2024 12:04:04 +1300 Subject: [PATCH 0717/1476] Drop the kernel version override for Surface Go hardware --- microsoft/surface/surface-go/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix index 0b3169ab..fdd13f6c 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.6.10"; - boot.kernelParams = [ "i915.enable_rc6=1" "i915.modeset=1" From c5214dc06a29ce79fbd22e256037e4852ad8a29f Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 31 Jan 2024 21:31:15 +1300 Subject: [PATCH 0718/1476] Add some functions to allow for a major.minor kernel version to be able to auto-allow the major.minor.patch to be auto-selected --- .../surface/common/kernel/linux-package.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-package.nix b/microsoft/surface/common/kernel/linux-package.nix index 2672e363..5cb64b1a 100644 --- a/microsoft/surface/common/kernel/linux-package.nix +++ b/microsoft/surface/common/kernel/linux-package.nix @@ -6,7 +6,9 @@ }: let - inherit (lib) recurseIntoAttrs versions; + inherit (builtins) elem; + inherit (lib) recurseIntoAttrs types versions; + repos = pkgs.callPackage ../repos.nix {}; linuxPackage = @@ -36,6 +38,18 @@ let inherit version patchSrc; }; + versionsOf = version: + # Provides a list of versions that can be used as an enum option for this full version: + [ version (versions.majorMinor version) ]; + + versionsOfOption = version: + # Provide an enum option for versions of this kernel: + types.enum (versionsOf version); + + isVersionOf = kernelVersion: version: + # Test if the provided version is considered one of the list of versions from above: + elem version (versionsOf version); + in { - inherit linuxPackage repos surfacePatches; + inherit linuxPackage repos surfacePatches versionsOf isVersionOf versionsOfOption; } From 85a2b5542eed00c5d3362394cc1aca575b963e3a Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 31 Jan 2024 21:32:59 +1300 Subject: [PATCH 0719/1476] Restore the "majorVersion" functionality --- microsoft/surface/common/kernel/linux-6.6.x/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 66631388..c06ac8c2 100644 --- a/microsoft/surface/common/kernel/linux-6.6.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.6.x/default.nix @@ -1,9 +1,9 @@ { config, lib, pkgs, ... }: let - inherit (lib) mkIf mkOption types; + inherit (lib) mkIf mkOption; - inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches; + inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches isVersionOf versionsOfOption; cfg = config.microsoft-surface; @@ -20,10 +20,10 @@ let in { options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ version ]; + type = versionsOfOption version; }; - config = mkIf (cfg.kernelVersion == version) { + config = mkIf (isVersionOf cfg.kernelVersion version) { boot = { inherit kernelPackages; }; From 88712a124b9a15e8b487d9bec9847ba0aa876d2c Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 31 Jan 2024 21:36:14 +1300 Subject: [PATCH 0720/1476] Pick a better name than "versionsOfOption" --- microsoft/surface/common/kernel/linux-6.6.x/default.nix | 4 ++-- microsoft/surface/common/kernel/linux-package.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 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 c06ac8c2..82b0f0c2 100644 --- a/microsoft/surface/common/kernel/linux-6.6.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.6.x/default.nix @@ -3,7 +3,7 @@ let inherit (lib) mkIf mkOption; - inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches isVersionOf versionsOfOption; + inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches isVersionOf versionsOfEnum; cfg = config.microsoft-surface; @@ -20,7 +20,7 @@ let in { options.microsoft-surface.kernelVersion = mkOption { - type = versionsOfOption version; + type = versionsOfEnum version; }; config = mkIf (isVersionOf cfg.kernelVersion version) { diff --git a/microsoft/surface/common/kernel/linux-package.nix b/microsoft/surface/common/kernel/linux-package.nix index 5cb64b1a..45b47349 100644 --- a/microsoft/surface/common/kernel/linux-package.nix +++ b/microsoft/surface/common/kernel/linux-package.nix @@ -42,7 +42,7 @@ let # Provides a list of versions that can be used as an enum option for this full version: [ version (versions.majorMinor version) ]; - versionsOfOption = version: + versionsOfEnum = version: # Provide an enum option for versions of this kernel: types.enum (versionsOf version); @@ -51,5 +51,5 @@ let elem version (versionsOf version); in { - inherit linuxPackage repos surfacePatches versionsOf isVersionOf versionsOfOption; + inherit linuxPackage repos surfacePatches versionsOf isVersionOf versionsOfEnum; } From 42d7e506777436d5e98ca02bd4a5f2da451cf485 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 29 Jan 2024 11:20:48 -0500 Subject: [PATCH 0721/1476] starfive visionfive2: update kernel to 6.6.0 --- starfive/visionfive/v2/linux-6.6.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/starfive/visionfive/v2/linux-6.6.nix b/starfive/visionfive/v2/linux-6.6.nix index 8e7b4459..5999dd64 100644 --- a/starfive/visionfive/v2/linux-6.6.nix +++ b/starfive/visionfive/v2/linux-6.6.nix @@ -9,8 +9,8 @@ let src = fetchFromGitHub { owner = "starfive-tech"; repo = "linux"; - rev = "7ccbe4604c1498e880cc63c7e8b45e3c55914d6d"; - hash = "sha256-iO7tnnWYfveVbyvVZKL0dDLwONijt1n0RUD1kTkOQew="; + rev = "13eb70da2a73187c8c7aece13d23d68928aa8210"; + hash = "sha256-bwB7Pc+Z+MWXPfWYdgtRGuhqjiNHLDGNCY62e4lBGvE="; }; inherit modDirVersion kernelPatches; From 80223acd7f2cfe4ea103bc7e0d671f8a23b35990 Mon Sep 17 00:00:00 2001 From: ChaosAttractor Date: Tue, 30 Jan 2024 04:54:38 +0800 Subject: [PATCH 0722/1476] ga401: enable nvidia.dynamicBoost --- asus/zephyrus/ga401/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/asus/zephyrus/ga401/default.nix b/asus/zephyrus/ga401/default.nix index edb3a5b6..f79128d7 100644 --- a/asus/zephyrus/ga401/default.nix +++ b/asus/zephyrus/ga401/default.nix @@ -16,6 +16,8 @@ modesetting.enable = lib.mkDefault true; # Enable DRM kernel mode setting powerManagement.enable = lib.mkDefault true; + + dynamicBoost.enable = true; prime = { amdgpuBusId = "PCI:4:0:0"; From 83ce5906a5b9a798ef2e653ddc12491c1b9e9929 Mon Sep 17 00:00:00 2001 From: ChaosAttractor Date: Tue, 30 Jan 2024 04:55:36 +0800 Subject: [PATCH 0723/1476] ga401: disable hardware.nvidia.powerManagement.enable --- asus/zephyrus/ga401/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/asus/zephyrus/ga401/default.nix b/asus/zephyrus/ga401/default.nix index f79128d7..726f58e5 100644 --- a/asus/zephyrus/ga401/default.nix +++ b/asus/zephyrus/ga401/default.nix @@ -11,11 +11,9 @@ ]; hardware.nvidia = { - # PCI-Express Runtime D3 Power Management is enabled by default on this laptop - # But it can fix screen tearing & suspend/resume screen corruption in sync mode - modesetting.enable = lib.mkDefault true; # Enable DRM kernel mode setting - powerManagement.enable = lib.mkDefault true; + # This will also cause "PCI-Express Runtime D3 Power Management" to be enabled by default + modesetting.enable = lib.mkDefault true; dynamicBoost.enable = true; From 3b54f86b535735d22f2f18ec90a8c0c9ba508f6e Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Sun, 28 Jan 2024 12:00:00 +0000 Subject: [PATCH 0724/1476] dell inspiron 5515: add early kms since the update to 23.11, the screen would remain black frequently on boot. Pressing alt+sysrq+k would make the display manager start. Empirically, setting early kms up has solved the issue. --- dell/inspiron/5515/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dell/inspiron/5515/default.nix b/dell/inspiron/5515/default.nix index 5e1fa648..c2e8e310 100644 --- a/dell/inspiron/5515/default.nix +++ b/dell/inspiron/5515/default.nix @@ -29,5 +29,9 @@ # https://bbs.archlinux.org/viewtopic.php?id=266108 says linux >= 5.12 required boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") pkgs.linuxPackages_latest; + # sometimes boots to a black screen, and pressing alt+sysrq+k makes the + # display manager start + # fixed by early kernel modesetting + boot.initrd.kernelModules = [ "amdgpu" ]; } From 58b17dc23452c1827a38660c44db16ea6f599f2c Mon Sep 17 00:00:00 2001 From: 4JX <79868816+4JX@users.noreply.github.com> Date: Fri, 19 Jan 2024 19:37:12 +0100 Subject: [PATCH 0725/1476] 16ach6h: Do not duplicate nvidia config --- lenovo/legion/16ach6h/default.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lenovo/legion/16ach6h/default.nix b/lenovo/legion/16ach6h/default.nix index 523d9d03..fcd57468 100644 --- a/lenovo/legion/16ach6h/default.nix +++ b/lenovo/legion/16ach6h/default.nix @@ -6,13 +6,6 @@ specialisation.ddg.configuration = { # This specialisation is for the case where "DDG" (Dual-Direct GFX, A hardware feature that can enable in bios) is enabled, since the amd igpu is blocked at hardware level and the built-in display is directly connected to the dgpu, we no longer need the amdgpu and prime configuration. system.nixos.tags = [ "Dual-Direct-GFX-Mode" ]; - services.xserver.videoDrivers = [ "nvidia" ]; # This will override services.xserver.videoDrivers = lib.mkDefault [ "amdgpu" "nvidia" ]; - hardware = { - nvidia.prime.offload.enable = false; - amdgpu = { - amdvlk = false; - opencl = false; - }; - }; + imports = [ ./nvidia ]; }; -} \ No newline at end of file +} From 07e43b0530503b6034eb82f47bb9ae4af34f9f93 Mon Sep 17 00:00:00 2001 From: 4JX <79868816+4JX@users.noreply.github.com> Date: Fri, 19 Jan 2024 19:45:19 +0100 Subject: [PATCH 0726/1476] 16ach6h: Fix X11 setup Fixes #628 --- lenovo/legion/16ach6h/hybrid/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lenovo/legion/16ach6h/hybrid/default.nix b/lenovo/legion/16ach6h/hybrid/default.nix index ab94e1c5..6381e6aa 100644 --- a/lenovo/legion/16ach6h/hybrid/default.nix +++ b/lenovo/legion/16ach6h/hybrid/default.nix @@ -11,6 +11,15 @@ ../edid ]; + # Still needs to load at some point if we want X11 to work + boot.kernelModules = [ "amdgpu" ]; + + # modesetting just doesn't work (on X11?), so get rid of it by only explicitly declaring nvidia + # Needed due to https://github.com/NixOS/nixos-hardware/commit/630a8e3e4eea61d35524699f2f59dbc64886357d + # See also https://github.com/NixOS/nixos-hardware/issues/628 + # options.services.xserver.drivers will have a amdgpu entry from using the prime stuff in nixpkgs + services.xserver.videoDrivers = [ "nvidia" ]; + hardware = { amdgpu.loadInInitrd = lib.mkDefault false; @@ -24,4 +33,4 @@ }; }; }; -} \ No newline at end of file +} From ed01236ece433b5fe96ebd7fe104f18f790aa066 Mon Sep 17 00:00:00 2001 From: 4JX <79868816+4JX@users.noreply.github.com> Date: Fri, 19 Jan 2024 19:46:38 +0100 Subject: [PATCH 0727/1476] 16ach6h: Comment out failing edid line Fixes #795 --- lenovo/legion/16ach6h/edid/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lenovo/legion/16ach6h/edid/default.nix b/lenovo/legion/16ach6h/edid/default.nix index ec77c244..81c44d59 100644 --- a/lenovo/legion/16ach6h/edid/default.nix +++ b/lenovo/legion/16ach6h/edid/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ...}: +{ pkgs, ... }: let # This file was obtained from the display while "DDG" mode was enabled. @@ -11,5 +11,7 @@ in hardware.firmware = [ chip_edid ]; boot.kernelParams = [ "drm.edid_firmware=edid/16ach6h.bin" ]; - boot.initrd.extraFiles."lib/firmware/edid/16ach6h.bin".source = pkgs.runCommandLocal "chip_edid" { } "cp ${./16ach6h.bin} $out"; -} \ No newline at end of file + # This fails at the moment, https://github.com/NixOS/nixos-hardware/issues/795 + # Extra refresh rates seem to work regardless + # boot.initrd.extraFiles."lib/firmware/edid/16ach6h.bin".source = pkgs.runCommandLocal "chip_edid" { } "cp ${./16ach6h.bin} $out"; +} From cc65e27670abccced5997d4a93c4c930aef6fd0b Mon Sep 17 00:00:00 2001 From: 4JX <79868816+4JX@users.noreply.github.com> Date: Sun, 28 Jan 2024 01:25:14 +0100 Subject: [PATCH 0728/1476] Better default for amdgpuBusId --- lenovo/legion/16ach6h/README.md | 6 ++++++ lenovo/legion/16ach6h/hybrid/default.nix | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lenovo/legion/16ach6h/README.md b/lenovo/legion/16ach6h/README.md index f8c1190e..19f6c247 100644 --- a/lenovo/legion/16ach6h/README.md +++ b/lenovo/legion/16ach6h/README.md @@ -3,6 +3,12 @@ Due to the introduction of DDG feature, you may toggle DDG frequently, so for th **But It will slow down NixOS evaluation by factor 2 and increase memory usage.** So if you don't need specialization feature, you can just use hybrid only configuration or nvidia only (DDG only) configuration +## Using multiple drives with this configuration + +When using more than one drive, the value of `hardware.nvidia.prime.amdgpuBusId` will change from the default of `PCI:5:0:0`. + +Make sure you override this default in your personal configuration. For two drives, it should be `PCI:6:0:0`. + ## Setup at the time of testing ``` $ nix-info -m diff --git a/lenovo/legion/16ach6h/hybrid/default.nix b/lenovo/legion/16ach6h/hybrid/default.nix index 6381e6aa..51e10dc0 100644 --- a/lenovo/legion/16ach6h/hybrid/default.nix +++ b/lenovo/legion/16ach6h/hybrid/default.nix @@ -28,7 +28,7 @@ powerManagement.enable = lib.mkDefault true; prime = { - amdgpuBusId = "PCI:6:0:0"; + amdgpuBusId = lib.mkDefault "PCI:5:0:0"; nvidiaBusId = "PCI:1:0:0"; }; }; From fc8d1ebb82b470e7c315d18f06804f26802afec8 Mon Sep 17 00:00:00 2001 From: Samuel Cobb Date: Sat, 3 Feb 2024 13:37:34 +0000 Subject: [PATCH 0729/1476] Rename Omen model --- README.md | 2 +- flake.nix | 2 +- omen/{en00015p => 15-en0002np}/default.nix | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename omen/{en00015p => 15-en0002np}/default.nix (100%) diff --git a/README.md b/README.md index 4d6a9530..9a0018a7 100644 --- a/README.md +++ b/README.md @@ -244,7 +244,7 @@ See code for all available configurations. | [Omen 15-en0010ca](omen/15-en0010ca) | `` | | [Omen 16-n0005ne](omen/16-n0005ne) | `` | | [Omen 15-en1007sa](omen/15-en1007sa) | `` | -| [Omen en00015p](omen/en00015p) | `` | +| [Omen 15-en0002np](omen/15-en0002np) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | | [Panasonic Let's Note CF-LX4](panasonic/letsnote/cf-lx4) | `` | | [PC Engines APU](pcengines/apu) | `` | diff --git a/flake.nix b/flake.nix index 5517f4c3..fdf1ae47 100644 --- a/flake.nix +++ b/flake.nix @@ -186,7 +186,7 @@ omen-15-en0010ca = import ./omen/15-en0010ca; omen-16-n0005ne = import ./omen/16-n0005ne; omen-15-en1007sa = import ./omen/15-en1007sa; - omen-en00015p = import ./omen/en00015p; + omen-15-en0002np = import ./omen/15-en0002np; onenetbook-4 = import ./onenetbook/4; olimex-teres_i = import ./olimex/teres_i; pcengines-apu = import ./pcengines/apu; diff --git a/omen/en00015p/default.nix b/omen/15-en0002np/default.nix similarity index 100% rename from omen/en00015p/default.nix rename to omen/15-en0002np/default.nix From b5c4fb6b89e3a3d261110ea79a59122574099b68 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 26 Jun 2023 09:11:52 +1200 Subject: [PATCH 0730/1476] Add a config for Asus Zephyrus GA402X* (2023) series - Disable power-saving for the keyboard on the Asus Zephyrus GA402X series (2023) - Add more-aggressive roaming rules for Asus Mediatek cards when using IWD - Add note about potentially needing more-aggressive roaming rules for Asus Mediatek cards when using WPA-Supplicant - Make enabling the higher scanning optional - Split-up the AMD-GPU and Nvidia configs - Add switch for AMD-GPU recovery mode - Add switch for AMD-GPU sg_display (Scatter/Gather) mode - Add switch for AMD-GPU PSR support --- asus/zephyrus/ga402x/amdgpu/default.nix | 58 +++++++++++++++++++ asus/zephyrus/ga402x/default.nix | 15 +++++ asus/zephyrus/ga402x/nvidia/default.nix | 55 ++++++++++++++++++ asus/zephyrus/ga402x/shared.nix | 76 +++++++++++++++++++++++++ 4 files changed, 204 insertions(+) create mode 100644 asus/zephyrus/ga402x/amdgpu/default.nix create mode 100644 asus/zephyrus/ga402x/default.nix create mode 100644 asus/zephyrus/ga402x/nvidia/default.nix create mode 100644 asus/zephyrus/ga402x/shared.nix diff --git a/asus/zephyrus/ga402x/amdgpu/default.nix b/asus/zephyrus/ga402x/amdgpu/default.nix new file mode 100644 index 00000000..17103c56 --- /dev/null +++ b/asus/zephyrus/ga402x/amdgpu/default.nix @@ -0,0 +1,58 @@ +{ config, + lib, + pkgs, + ... +}: + +let + inherit (lib) mkDefault mkEnableOption mkIf mkMerge; + cfg = config.hardware.asus.zephyrus.ga402x; + +in { + imports = [ + ../shared.nix + ]; + + options.hardware.asus.zephyrus.ga402x.amdgpu = { + recovery.enable = (mkEnableOption "Enable amdgpu.gpu_recovery kernel boot param") // { default = false; }; + sg_display.enable = (mkEnableOption "Enable amdgpu.gpu_recovery kernel boot param") // { default = true; }; + psr.enable = (mkEnableOption "Enable amdgpu.dcdebugmask=0x10 kernel boot param") // { default = true; }; + }; + + config = mkMerge [ + { + # AMD RX680 + services.xserver.videoDrivers = mkDefault [ "amdgpu" ]; + + hardware = { + amdgpu.loadInInitrd = true; + opengl.extraPackages = with pkgs; [ + vaapiVdpau + libvdpau-va-gl + ]; + }; + } + + (mkIf cfg.amdgpu.recovery.enable { + # Hopefully fixes for where the kernel sometimes hangs when suspending or hibernating + # (Though, I'm very suspicious of the Mediatek Wifi...) + boot.kernelParams = [ + "amdgpu.gpu_recovery=1" + ]; + }) + + (mkIf (!cfg.amdgpu.sg_display.enable) { + # Can help solve flickering/glitching display issues since Scatter/Gather code was reenabled + boot.kernelParams = [ + "amdgpu.sg_display=0" + ]; + }) + + (mkIf (!cfg.amdgpu.psr.enable) { + # Can help solve flickering/glitching display issues since Scatter/Gather code was reenabled + boot.kernelParams = [ + "amdgpu.dcdebugmask=0x10" + ]; + }) + ]; +} diff --git a/asus/zephyrus/ga402x/default.nix b/asus/zephyrus/ga402x/default.nix new file mode 100644 index 00000000..7e49eb66 --- /dev/null +++ b/asus/zephyrus/ga402x/default.nix @@ -0,0 +1,15 @@ +## When using from a Flake, you can access these via imports of the attr key, e.g: +# +# imports = [ +# nixos-hardware.nixosModules.asus-zephyrus-ga402x.amdgpu +# ]; +# +## or: +# imports = [ +# nixos-hardware.nixosModules.asus-zephyrus-ga402x.nvidia +# ]; + +{ + amdgpu = import ./amdgpu; + nvidia = import ./nvidia; +} diff --git a/asus/zephyrus/ga402x/nvidia/default.nix b/asus/zephyrus/ga402x/nvidia/default.nix new file mode 100644 index 00000000..7a1a8c32 --- /dev/null +++ b/asus/zephyrus/ga402x/nvidia/default.nix @@ -0,0 +1,55 @@ +{ lib, + pkgs, + ... +}: + +let + inherit (lib) mkDefault; + +in { + imports = [ + ../shared.nix + ## "prime.nix" loads this, aleady: + # ../../../common/gpu/nvidia + ../../../../common/gpu/nvidia/prime.nix + ]; + + # NVIDIA GeForce RTX 4060 Mobile + + boot = { + blacklistedKernelModules = [ "nouveau" ]; + }; + + # Also in nvidia/default.nix + services.xserver.videoDrivers = mkDefault [ "nvidia" ]; + + hardware = { + ## Enable the Nvidia card, as well as Prime and Offload: + amdgpu.loadInInitrd = true; + opengl.extraPackages = with pkgs; [ + # Also in nvidia/default.nix + vaapiVdpau + libvdpau-va-gl + ]; + + nvidia = { + modesetting.enable = true; + nvidiaSettings = true; + + prime = { + offload = { + enable = true; + enableOffloadCmd = true; + }; + amdgpuBusId = "PCI:101:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + + powerManagement = { + # This is unreliable on the 4060; works a few times, then hangs: + # enable = true; + # finegrained = true + }; + }; + }; +} diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix new file mode 100644 index 00000000..5049d6ed --- /dev/null +++ b/asus/zephyrus/ga402x/shared.nix @@ -0,0 +1,76 @@ +{ config, + pkgs, + lib, + ... +}: + +let + inherit (lib) mkDefault mkIf mkMerge version versionOlder; +in { + + imports = [ + ../../../common/cpu/amd + # Better power-savings from AMD PState: + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ../../../common/pc/laptop + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/ssd + ]; + + config = mkMerge [ + { + # Configure basic system settings: + boot = { + kernelModules = [ "kvm-amd" ]; + kernelParams = [ + "mem_sleep_default=deep" + "pcie_aspm.policy=powersupersave" + ]; + }; + + services = { + asusd = { + enable = mkDefault true; + enableUserService = mkDefault true; + }; + + supergfxd.enable = true; + + udev = { + extraHwdb = '' + # Fixes mic mute button + evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* + KEYBOARD_KEY_ff31007c=f20 + ''; + extraRules = '' + # Disable auto-suspend for the ASUS N-KEY Device, i.e. USB Keyboard + # Otherwise, it will tend to take 1-2 key-presses to wake-up after suspending + ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1" + ''; + }; + }; + } + + (mkIf (versionOlder version "23.11") { + # See https://asus-linux.org/wiki/nixos/ for info about some problems + # detecting the dGPU: + systemd.services.supergfxd.path = [ pkgs.pciutils ]; + }) + + (mkIf (config.networking.wireless.iwd.enable && config.networking.wireless.scanOnLowSignal) { + # Meditek doesn't seem to be quite sensitive enough on the default roaming settings: + # https://wiki.archlinux.org/title/Wpa_supplicant#Roaming + # https://wiki.archlinux.org/title/Iwd#iwd_keeps_roaming + # + # But NixOS doesn't have the tweaks for IWD, yet. + networking.wireless.iwd.settings = { + General = { + RoamThreshold = -75; + RoamThreshold5G = -80; + RoamRetryInterval = 20; + }; + }; + }) + ]; +} From 06e919ac0791475a4192068fdd7f8ebdd4f0f712 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 26 Jun 2023 09:40:53 +1200 Subject: [PATCH 0731/1476] Update README.md and flake.nix --- README.md | 2 ++ flake.nix | 1 + 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 9a0018a7..cfe805f0 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,8 @@ See code for all available configurations. | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | +| [Asus ROG Zephyrus G14 GA402X* (2023)](asus/zephyrus/ga402x/amdgpu) | `` | +| [Asus ROG Zephyrus G14 GA402X* (2023)](asus/zephyrus/ga402x/nvidia) | `` | | [Asus ROG Zephyrus G15 GA502](asus/zephyrus/ga502) | `` | | [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | | [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | diff --git a/flake.nix b/flake.nix index fdf1ae47..7dfa3f08 100644 --- a/flake.nix +++ b/flake.nix @@ -21,6 +21,7 @@ asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; + asus-zephyrus-ga402x = import ./asus/zephyrus/ga402x; asus-zephyrus-ga502 = import ./asus/zephyrus/ga502; asus-zephyrus-ga503 = import ./asus/zephyrus/ga503; asus-zephyrus-gu603h = import ./asus/zephyrus/gu603h; From 5a8ed531f99b52cf5413c724d8f982350d79416e Mon Sep 17 00:00:00 2001 From: mexisme Date: Sat, 31 Dec 2022 10:10:54 +1300 Subject: [PATCH 0732/1476] Initial config. for Lenovo Yoga Slim 7 Pro-X (14ARH7) - Add entry to README.md and flake.nix --- README.md | 2 + flake.nix | 1 + lenovo/yoga/7/14ARH7/default.nix | 82 ++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 lenovo/yoga/7/14ARH7/default.nix diff --git a/README.md b/README.md index cfe805f0..a78fc6bf 100644 --- a/README.md +++ b/README.md @@ -231,6 +231,8 @@ See code for all available configurations. | [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | | [Lenovo ThinkPad Z13](lenovo/thinkpad/z/z13) | `` | | [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | +| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/amdgpu) | `` | +| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `` | | [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `` | | [MSI GS60 2QE](msi/gs60) | `` | | [MSI GL62/CX62](msi/gl62) | `` | diff --git a/flake.nix b/flake.nix index 7dfa3f08..57c7446a 100644 --- a/flake.nix +++ b/flake.nix @@ -170,6 +170,7 @@ lenovo-thinkpad-z = import ./lenovo/thinkpad/z; lenovo-thinkpad-z13 = import ./lenovo/thinkpad/z/z13; lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; + lenovo-yoga-7-14ARH7 = import ./lenovo/yoga/7/14ARH7; lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; microchip-icicle-kit = import ./microchip/icicle-kit; diff --git a/lenovo/yoga/7/14ARH7/default.nix b/lenovo/yoga/7/14ARH7/default.nix new file mode 100644 index 00000000..a1b21e79 --- /dev/null +++ b/lenovo/yoga/7/14ARH7/default.nix @@ -0,0 +1,82 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkDefault mkMerge; + +in { + imports = [ + ../../../../common/cpu/amd + # Better power-savings from AMD PState: + ../../../../common/cpu/amd/pstate.nix + ../../../../common/gpu/amd + ## "prime.nix" loads this, aleady: + # ../../../../common/gpu/nvidia + ../../../../common/gpu/nvidia/prime.nix + ../../../../common/pc/laptop + ../../../../common/pc/laptop/acpi_call.nix + ../../../../common/pc/ssd + ]; + + config = mkMerge [ + { + # Configure basic system settings: + boot = { + kernelModules = [ "kvm-amd" ]; + kernelParams = [ + "mem_sleep_default=deep" + "pcie_aspm.policy=powersupersave" + + ## Supposed to help fix for suspend issues: SSD not correctly working, and Keyboard not responding: + ## Not needed for the 6.1+ kernels? + # "iommu=pt" + + ## Fixes for s2idle: + ## https://www.phoronix.com/news/More-s2idle-Rembrandt-Linux + # "acpi.prefer_microsoft_guid=1" + ## Appears to have been renamed? + "acpi.prefer_microsoft_dsm_guid=1" + ]; + + blacklistedKernelModules = [ "nouveau" ]; + }; + } + + { + ## Graphics settings + + ## AMD RX680 + # services.xserver.videoDrivers = mkDefault [ "amdgpu" ]; + + # NVIDIA GeForce RTX 3050 Mobile (Ampere) + services.xserver.videoDrivers = mkDefault [ "nvidia" ]; + + hardware = { + ## Enable the Nvidia card, as well as Prime and Offload: + amdgpu.loadInInitrd = true; + opengl.extraPackages = with pkgs; [ + vaapiVdpau + libvdpau-va-gl + ]; + + nvidia = { + modesetting.enable = true; + nvidiaSettings = true; + + prime = { + offload = { + enable = true; + enableOffloadCmd = true; + }; + amdgpuBusId = "PCI:4:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + + powerManagement = { + enable = true; + # finegrained = true + }; + }; + }; + } + ]; +} From 6e5cc385fc8cf5ca6495d70243074ccdea9f64c7 Mon Sep 17 00:00:00 2001 From: mexisme Date: Fri, 18 Aug 2023 22:33:16 +1200 Subject: [PATCH 0733/1476] Extract AMD-GPU from Nvidia, to make it easier to choose either --- lenovo/yoga/7/14ARH7/amdgpu/default.nix | 23 ++++++ lenovo/yoga/7/14ARH7/default.nix | 93 ++++--------------------- lenovo/yoga/7/14ARH7/nvidia/default.nix | 47 +++++++++++++ lenovo/yoga/7/14ARH7/shared.nix | 32 +++++++++ 4 files changed, 115 insertions(+), 80 deletions(-) create mode 100644 lenovo/yoga/7/14ARH7/amdgpu/default.nix create mode 100644 lenovo/yoga/7/14ARH7/nvidia/default.nix create mode 100644 lenovo/yoga/7/14ARH7/shared.nix diff --git a/lenovo/yoga/7/14ARH7/amdgpu/default.nix b/lenovo/yoga/7/14ARH7/amdgpu/default.nix new file mode 100644 index 00000000..4d16de0a --- /dev/null +++ b/lenovo/yoga/7/14ARH7/amdgpu/default.nix @@ -0,0 +1,23 @@ +# Including this file will enable the AMD-GPU driver + +{ lib, pkgs, ... }: + +let + inherit (lib) mkDefault; + +in { + imports = [ + ../shared.nix + ]; + + # AMD RX680 + services.xserver.videoDrivers = mkDefault [ "amdgpu" ]; + + hardware = { + amdgpu.loadInInitrd = true; + opengl.extraPackages = with pkgs; [ + vaapiVdpau + libvdpau-va-gl + ]; + }; +} diff --git a/lenovo/yoga/7/14ARH7/default.nix b/lenovo/yoga/7/14ARH7/default.nix index a1b21e79..851033c7 100644 --- a/lenovo/yoga/7/14ARH7/default.nix +++ b/lenovo/yoga/7/14ARH7/default.nix @@ -1,82 +1,15 @@ -{ config, lib, pkgs, ... }: +# When using from a Flake, you can access these via imports of the attr key, e.g: +# +# imports = [ +# nixos-hardware.nixosModules.lenovo-yoga-7-14ARH7.amdgpu +# ]; +# +## or: +# imports = [ +# nixos-hardware.nixosModules.lenovo-yoga-7-14ARH7.nvidia +# ]; -let - inherit (lib) mkDefault mkMerge; - -in { - imports = [ - ../../../../common/cpu/amd - # Better power-savings from AMD PState: - ../../../../common/cpu/amd/pstate.nix - ../../../../common/gpu/amd - ## "prime.nix" loads this, aleady: - # ../../../../common/gpu/nvidia - ../../../../common/gpu/nvidia/prime.nix - ../../../../common/pc/laptop - ../../../../common/pc/laptop/acpi_call.nix - ../../../../common/pc/ssd - ]; - - config = mkMerge [ - { - # Configure basic system settings: - boot = { - kernelModules = [ "kvm-amd" ]; - kernelParams = [ - "mem_sleep_default=deep" - "pcie_aspm.policy=powersupersave" - - ## Supposed to help fix for suspend issues: SSD not correctly working, and Keyboard not responding: - ## Not needed for the 6.1+ kernels? - # "iommu=pt" - - ## Fixes for s2idle: - ## https://www.phoronix.com/news/More-s2idle-Rembrandt-Linux - # "acpi.prefer_microsoft_guid=1" - ## Appears to have been renamed? - "acpi.prefer_microsoft_dsm_guid=1" - ]; - - blacklistedKernelModules = [ "nouveau" ]; - }; - } - - { - ## Graphics settings - - ## AMD RX680 - # services.xserver.videoDrivers = mkDefault [ "amdgpu" ]; - - # NVIDIA GeForce RTX 3050 Mobile (Ampere) - services.xserver.videoDrivers = mkDefault [ "nvidia" ]; - - hardware = { - ## Enable the Nvidia card, as well as Prime and Offload: - amdgpu.loadInInitrd = true; - opengl.extraPackages = with pkgs; [ - vaapiVdpau - libvdpau-va-gl - ]; - - nvidia = { - modesetting.enable = true; - nvidiaSettings = true; - - prime = { - offload = { - enable = true; - enableOffloadCmd = true; - }; - amdgpuBusId = "PCI:4:0:0"; - nvidiaBusId = "PCI:1:0:0"; - }; - - powerManagement = { - enable = true; - # finegrained = true - }; - }; - }; - } - ]; +{ + amdgpu = import ./amdgpu; + nvidia = import ./nvidia; } diff --git a/lenovo/yoga/7/14ARH7/nvidia/default.nix b/lenovo/yoga/7/14ARH7/nvidia/default.nix new file mode 100644 index 00000000..fb4553ec --- /dev/null +++ b/lenovo/yoga/7/14ARH7/nvidia/default.nix @@ -0,0 +1,47 @@ +# Including this file will enable the NVidia driver, and PRIME offload + +{ lib, pkgs, ... }: + +let + inherit (lib) mkDefault; + +in { + imports = [ + ../shared.nix + ## "prime.nix" loads this, aleady: + # ../../../../common/gpu/nvidia + ../../../../../common/gpu/nvidia/prime.nix + ]; + + # NVIDIA GeForce RTX 3050 Mobile (Ampere) + services.xserver.videoDrivers = mkDefault [ "nvidia" ]; + + hardware = { + ## Enable the Nvidia card, as well as Prime and Offload: + amdgpu.loadInInitrd = true; + opengl.extraPackages = with pkgs; [ + vaapiVdpau + libvdpau-va-gl + ]; + + nvidia = { + modesetting.enable = true; + nvidiaSettings = true; + + prime = { + offload = { + enable = true; + enableOffloadCmd = true; + }; + amdgpuBusId = "PCI:4:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + + powerManagement = { + enable = true; + # Doesn't seem to be reliable, yet? + # finegrained = true + }; + }; + }; +} diff --git a/lenovo/yoga/7/14ARH7/shared.nix b/lenovo/yoga/7/14ARH7/shared.nix new file mode 100644 index 00000000..3bef4473 --- /dev/null +++ b/lenovo/yoga/7/14ARH7/shared.nix @@ -0,0 +1,32 @@ +{ ... }: + +{ + imports = [ + ../../../../common/cpu/amd + # Better power-savings from AMD PState: + ../../../../common/cpu/amd/pstate.nix + ../../../../common/gpu/amd + ../../../../common/pc/laptop + ../../../../common/pc/laptop/acpi_call.nix + ../../../../common/pc/ssd + ]; + + # Configure basic system settings: + boot = { + kernelModules = [ "kvm-amd" ]; + kernelParams = [ + "mem_sleep_default=deep" + "pcie_aspm.policy=powersupersave" + + ## Supposed to help fix for suspend issues: SSD not correctly working, and Keyboard not responding: + ## Not needed for the 6.1+ kernels? + # "iommu=pt" + + ## Fixes for s2idle: + ## https://www.phoronix.com/news/More-s2idle-Rembrandt-Linux + "acpi.prefer_microsoft_dsm_guid=1" + ]; + + blacklistedKernelModules = [ "nouveau" ]; + }; +} From 8be74baad009dde11fd70b0d0e9d390331c2adbe Mon Sep 17 00:00:00 2001 From: queer-bird <45827800+queer-bird@users.noreply.github.com> Date: Mon, 12 Feb 2024 11:59:10 -0800 Subject: [PATCH 0734/1476] Fix audio interference in headphone jack on Thinkpad x1 Nano Gen 1 --- lenovo/thinkpad/x1-nano/gen1/default.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lenovo/thinkpad/x1-nano/gen1/default.nix b/lenovo/thinkpad/x1-nano/gen1/default.nix index 989e204f..1cc17b1e 100644 --- a/lenovo/thinkpad/x1-nano/gen1/default.nix +++ b/lenovo/thinkpad/x1-nano/gen1/default.nix @@ -1,3 +1,17 @@ -{ ... }: { +{ pkgs, ... }: imports = [ ../. ]; + + environment.systemPackages = with pkgs; [ + alsa-utils + ]; + + systemd.services.x1-fix = { + description = "Use alsa-utils to fix sound interference on Thinkpad x1 Nano"; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.alsa-tools}/bin/hda-verb /dev/snd/hwC0D0 0x1d SET_PIN_WIDGET_CONTROL 0x0"; + Restart = "on-failure"; + }; + wantedBy = [ "default.target" ]; + }; } From 7220f26a7c09c8b9c18a3703e4724d7c9ab32fea Mon Sep 17 00:00:00 2001 From: queer-bird <45827800+queer-bird@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:25:16 -0800 Subject: [PATCH 0735/1476] Missed a curly bracket --- lenovo/thinkpad/x1-nano/gen1/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lenovo/thinkpad/x1-nano/gen1/default.nix b/lenovo/thinkpad/x1-nano/gen1/default.nix index 1cc17b1e..22c4019f 100644 --- a/lenovo/thinkpad/x1-nano/gen1/default.nix +++ b/lenovo/thinkpad/x1-nano/gen1/default.nix @@ -1,4 +1,6 @@ { pkgs, ... }: + +{ imports = [ ../. ]; environment.systemPackages = with pkgs; [ From 61d602f428c28208a91d3c1ff00e60576fc40e3f Mon Sep 17 00:00:00 2001 From: Cryolitia Date: Sun, 11 Feb 2024 14:18:24 +0800 Subject: [PATCH 0736/1476] gpd-win-max-2-2023: remove udev rule disabling PCI wakeup fixed in linux kernel mainline and backported https://github.com/torvalds/linux/commit/805c74eac8cb306dc69b87b6b066ab4da77ceaf1 --- gpd/win-max-2/2023/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/gpd/win-max-2/2023/default.nix b/gpd/win-max-2/2023/default.nix index 1f1745ff..538b9475 100644 --- a/gpd/win-max-2/2023/default.nix +++ b/gpd/win-max-2/2023/default.nix @@ -7,9 +7,4 @@ with lib; ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd ]; - - # fix suspend problem: https://www.reddit.com/r/gpdwin/comments/16veksm/win_max_2_2023_linux_experience_suspend_problems/ - services.udev.extraRules = '' - ACTION=="add" SUBSYSTEM=="pci" ATTR{vendor}=="0x1022" ATTR{device}=="0x14ee" ATTR{power/wakeup}="disabled" - ''; } From d1117dcf09907ffc92b49a2db2bc5bad2bb95076 Mon Sep 17 00:00:00 2001 From: Cryolitia Date: Sun, 11 Feb 2024 14:26:34 +0800 Subject: [PATCH 0737/1476] gpd-win-man-2-2023: init README --- gpd/win-max-2/2023/README.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 gpd/win-max-2/2023/README.md diff --git a/gpd/win-max-2/2023/README.md b/gpd/win-max-2/2023/README.md new file mode 100644 index 00000000..2e9ee281 --- /dev/null +++ b/gpd/win-max-2/2023/README.md @@ -0,0 +1,7 @@ +# GPD Win Max 2 2023 + +## Gyro + +The IMU (Bosch BMI260) is incorrectly identified in the BIOS. It's named BMI0160:00 in ACPI table. + +The IMU is on `/dev/i2c-2`, address `0x69`. It's `CHIP_ID` in reg `0x00` is `0x27`, which could determine that it is actually BMI0260: https://chromium.googlesource.com/chromiumos/platform/ec/+/master/driver/accelgyro_bmi260.h#28 From c1db24a14b17b49d0d57096831ed6b469ea2ab4a Mon Sep 17 00:00:00 2001 From: Cryolitia Date: Sun, 11 Feb 2024 14:46:44 +0800 Subject: [PATCH 0738/1476] gpd-win-max-2-2023: init BMI260 driver --- gpd/win-max-2/2023/bmi260/default.nix | 33 +++++++++++++++++++++ gpd/win-max-2/2023/bmi260/package.nix | 42 +++++++++++++++++++++++++++ gpd/win-max-2/2023/default.nix | 6 ++++ 3 files changed, 81 insertions(+) create mode 100644 gpd/win-max-2/2023/bmi260/default.nix create mode 100644 gpd/win-max-2/2023/bmi260/package.nix diff --git a/gpd/win-max-2/2023/bmi260/default.nix b/gpd/win-max-2/2023/bmi260/default.nix new file mode 100644 index 00000000..bbce72e2 --- /dev/null +++ b/gpd/win-max-2/2023/bmi260/default.nix @@ -0,0 +1,33 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + bmi260 = config.boot.kernelPackages.callPackage ./package.nix { }; + +in +{ + + meta.maintainers = [ maintainers.Cryolitia ]; + + ###### interface + + options = { + + hardware.sensor.iio.bmi260.enable = mkOption { + default = false; + type = types.bool; + description = mdDoc '' + Enable Bosch BMI260 IMU kernel module driver. + ''; + }; + }; + + ###### implementation + + config = mkIf config.hardware.sensor.iio.bmi260.enable { + boot.extraModulePackages = [ bmi260 ]; + boot.kernelModules = [ "bmi260_core" "bmi260_i2c" ]; + }; +} diff --git a/gpd/win-max-2/2023/bmi260/package.nix b/gpd/win-max-2/2023/bmi260/package.nix new file mode 100644 index 00000000..b19bb071 --- /dev/null +++ b/gpd/win-max-2/2023/bmi260/package.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchurl +, kernel +}: + +stdenv.mkDerivation (finalAttr: { + pname = "bmi260"; + version = "0.0.2"; + + src = fetchFromGitHub { + owner = "hhd-dev"; + repo = finalAttr.pname; + rev = "v${finalAttr.version}"; + hash = "sha256-J0npD75QqOGY1QUoznBjQ+jX28gq5u6b0JZOseclwE8="; + }; + + hardeningDisable = [ "pic" ]; + + nativeBuildInputs = kernel.moduleBuildDependencies; + + makeFlags = [ + "KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + ]; + + installPhase = '' + runHook preInstall + + install *.ko -Dm444 -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/bmi260 + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/hhd-dev/bmi260"; + description = "A kernel module driver for the Bosch BMI260 IMU"; + license = with licenses; [ bsd3 gpl2Only ]; + maintainers = with maintainers; [ Cryolitia ]; + platforms = platforms.linux; + }; +}) diff --git a/gpd/win-max-2/2023/default.nix b/gpd/win-max-2/2023/default.nix index 538b9475..d0ad63ca 100644 --- a/gpd/win-max-2/2023/default.nix +++ b/gpd/win-max-2/2023/default.nix @@ -6,5 +6,11 @@ with lib; ../../../common/cpu/amd ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd + ./bmi260 ]; + + hardware.sensor.iio.bmi260.enable = lib.mkDefault true; + + #see README + boot.blacklistedKernelModules = mkIf config.hardware.sensor.iio.bmi260.enable [ "bmi160_spi" "bmi160_i2c" "bmi160_core" ]; } From 2b68ccd7475362b8c8d6a1805b403033ba6273a8 Mon Sep 17 00:00:00 2001 From: Cryolitia Date: Sun, 11 Feb 2024 14:48:43 +0800 Subject: [PATCH 0739/1476] gpd-win-max-2-2023: enable iio subsystem --- gpd/win-max-2/2023/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/gpd/win-max-2/2023/default.nix b/gpd/win-max-2/2023/default.nix index d0ad63ca..b20f2ca3 100644 --- a/gpd/win-max-2/2023/default.nix +++ b/gpd/win-max-2/2023/default.nix @@ -13,4 +13,5 @@ with lib; #see README boot.blacklistedKernelModules = mkIf config.hardware.sensor.iio.bmi260.enable [ "bmi160_spi" "bmi160_i2c" "bmi160_core" ]; + hardware.sensor.iio.enable = mkIf config.hardware.sensor.iio.bmi260.enable true; } From f1b2f71c86a5b1941d20608db0b1e88a07d31303 Mon Sep 17 00:00:00 2001 From: Ganga Ram Date: Tue, 13 Feb 2024 17:05:03 +0400 Subject: [PATCH 0740/1476] Update repository path for nxp/imx Signed-off-by: Ganga Ram --- nxp/common/bsp/imx-atf.nix | 2 +- nxp/common/bsp/imx-mkimage.nix | 11 ++++++++--- nxp/common/bsp/imx-optee-os.nix | 2 +- nxp/common/bsp/imx-uboot.nix | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/nxp/common/bsp/imx-atf.nix b/nxp/common/bsp/imx-atf.nix index ec2c751d..efd8c43f 100644 --- a/nxp/common/bsp/imx-atf.nix +++ b/nxp/common/bsp/imx-atf.nix @@ -7,7 +7,7 @@ { armTrustedFirmwareiMX8 = buildArmTrustedFirmware rec { src = fetchgit { - url = "https://source.codeaurora.org/external/imx/imx-atf"; + url = "https://github.com/nxp-imx/imx-atf.git"; # tag: "lf_v2.6" rev = "c6a19b1a351308cc73443283f6aa56b2eff791b8"; sha256 = "sha256-C046MrZBDFuzBdnjuPC2fAGtXzZjTWRrO8nYTf1rjeg="; diff --git a/nxp/common/bsp/imx-mkimage.nix b/nxp/common/bsp/imx-mkimage.nix index 94877cec..a928b92c 100644 --- a/nxp/common/bsp/imx-mkimage.nix +++ b/nxp/common/bsp/imx-mkimage.nix @@ -4,15 +4,20 @@ with pkgs; pkgs.stdenv.mkDerivation rec { pname = "imx-mkimage"; version = "lf-5.15.32-2.0.0"; - src = fetchgit { - url = "https://source.codeaurora.org/external/imx/imx-mkimage.git"; + url = "https://github.com/nxp-imx/imx-mkimage.git"; rev = version; - sha256 = "sha256-31pib5DTDPVfiAAoOSzK8HWUlnuiNnfXQIsxbjneMCc="; + sha256 = "sha256-vJuWK2GOAtps798QY1I6xIcixgenJmntrh24s9KtsKU="; leaveDotGit = true; }; + postPatch = '' + substituteInPlace Makefile \ + --replace 'CC = gcc' 'CC = clang' + ''; + nativeBuildInputs = [ + clang git ]; diff --git a/nxp/common/bsp/imx-optee-os.nix b/nxp/common/bsp/imx-optee-os.nix index 2ec0e3bd..eeef5a85 100644 --- a/nxp/common/bsp/imx-optee-os.nix +++ b/nxp/common/bsp/imx-optee-os.nix @@ -35,7 +35,7 @@ pkgs.stdenv.mkDerivation rec { ]; src = fetchGit { - url = "https://source.codeaurora.org/external/imx/imx-optee-os.git"; + url = "https://github.com/nxp-imx/imx-optee-os.git"; ref = "lf-5.15.32_2.0.0"; }; diff --git a/nxp/common/bsp/imx-uboot.nix b/nxp/common/bsp/imx-uboot.nix index a92a6e48..25cca39e 100644 --- a/nxp/common/bsp/imx-uboot.nix +++ b/nxp/common/bsp/imx-uboot.nix @@ -32,7 +32,7 @@ in { ubootImx8 = buildUBoot { version = "2022.04"; src = fetchgit { - url = "https://source.codeaurora.org/external/imx/uboot-imx.git"; + url = "https://github.com/nxp-imx/uboot-imx.git"; # tag: "lf_v2022.04" rev = "1c881f4da83cc05bee50f352fa183263d7e2622b"; sha256 = "sha256-0TS6VH6wq6PwZUq6ekbuLaisZ9LrE0/haU9nseGdiE0="; From a377fb23dc22097a120f10a281074ef0f678901b Mon Sep 17 00:00:00 2001 From: Luflosi Date: Thu, 15 Feb 2024 21:12:20 +0100 Subject: [PATCH 0741/1476] cpu/amd/igpu: change condition to check actually used kernel version Change condition to check actually used kernel version instead of which kernel version is the default. Without this change, if a user changes the kernel version to a newer version, the kernel parameter will not actually be added. --- common/cpu/amd/raphael/igpu.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/cpu/amd/raphael/igpu.nix b/common/cpu/amd/raphael/igpu.nix index 6faffd0e..b0940772 100644 --- a/common/cpu/amd/raphael/igpu.nix +++ b/common/cpu/amd/raphael/igpu.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, pkgs, config, ... }: { # Sets the kernel version to the latest kernel to make the usage of the iGPU possible if your kernel version is too old @@ -10,10 +10,9 @@ boot = lib.mkMerge [ (lib.mkIf (lib.versionOlder pkgs.linux.version "6.1") { kernelPackages = pkgs.linuxPackages_latest; - kernelParams = ["amdgpu.sg_display=0"]; }) - (lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.2") { + (lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2") { kernelParams = ["amdgpu.sg_display=0"]; }) ]; From 106d3fec43bcea19cb2e061ca02531d54b542ce3 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Thu, 15 Feb 2024 20:48:18 +0100 Subject: [PATCH 0742/1476] framework AMD 7040: work around white screen / flickering issue on newer kernels Fixes #817. Updating the kernel if it is too old is already done by `common/cpu/amd/raphael/igpu.nix`, so I removed the redundant code. --- framework/13-inch/7040-amd/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/framework/13-inch/7040-amd/default.nix b/framework/13-inch/7040-amd/default.nix index 81ff7076..73aad22e 100644 --- a/framework/13-inch/7040-amd/default.nix +++ b/framework/13-inch/7040-amd/default.nix @@ -7,6 +7,7 @@ in imports = [ ../common ../common/amd.nix + ../../../common/cpu/amd/raphael/igpu.nix ]; options = { @@ -24,11 +25,6 @@ in }; config = { - # Newer kernel is better for amdgpu driver updates - # Requires at least 5.16 for working wi-fi and bluetooth (RZ616, kmod mt7922): - # 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); - # 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) '' From 3610be0dca3a3f46224af37eca0a655688d080be Mon Sep 17 00:00:00 2001 From: V7 Date: Tue, 20 Feb 2024 17:48:11 +0530 Subject: [PATCH 0743/1476] Import Intel GPU module --- dell/inspiron/5509/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/dell/inspiron/5509/default.nix b/dell/inspiron/5509/default.nix index 9e49b622..96355a2c 100644 --- a/dell/inspiron/5509/default.nix +++ b/dell/inspiron/5509/default.nix @@ -2,6 +2,7 @@ { imports = [ ../../../common/cpu/intel + ../../../common/gpu/intel ../../../common/pc/laptop ../../../common/pc/ssd ]; From 27cca741bf6c532ea9ba394be806b04cbcbaefa1 Mon Sep 17 00:00:00 2001 From: Ashwin Belbase <13994951-ashwin.teslatech@users.noreply.gitlab.com> Date: Tue, 20 Feb 2024 17:18:17 +0545 Subject: [PATCH 0744/1476] Add files for Asus TUF A15 (FA507RM) --- asus/fa507rm/default.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 asus/fa507rm/default.nix diff --git a/asus/fa507rm/default.nix b/asus/fa507rm/default.nix new file mode 100644 index 00000000..f244e4ec --- /dev/null +++ b/asus/fa507rm/default.nix @@ -0,0 +1,15 @@ +{ ... }: + +{ + imports = [ + ../../common/cpu/amd + ../../common/gpu/nvidia/prime.nix + ../../common/pc/laptop + ../../common/pc/ssd + ]; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:5:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + } From 3f7d0bca003eac1a1a7f4659bbab9c8f8c2a0958 Mon Sep 17 00:00:00 2001 From: Ashwin Belbase <13994951-ashwin.teslatech@users.noreply.gitlab.com> Date: Tue, 20 Feb 2024 17:18:34 +0545 Subject: [PATCH 0745/1476] Add links to FA507RM --- README.md | 1 + flake.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index a78fc6bf..a892b143 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ See code for all available configurations. | [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | | [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | +| [Asus TUF FA507RM](asus/fa507rm) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Deciso DEC series](deciso/dec) | `` | | [Dell G3 3779](dell/g3/3779) | `` | diff --git a/flake.nix b/flake.nix index 57c7446a..cb4d194f 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,7 @@ asus-battery = import ./asus/battery.nix; asus-ally-rc71l = import ./asus/ally/rc71l; asus-fx504gd = import ./asus/fx504gd; + asus-fa507rm = import ./asus/fa507rm; asus-rog-strix-g513im = import ./asus/rog-strix/g513im; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; From 55b794ba77cad6f7314027786911ebebbe6a4eca Mon Sep 17 00:00:00 2001 From: Ganga Ram Date: Tue, 27 Feb 2024 16:17:03 +0400 Subject: [PATCH 0746/1476] microchip icicle-kit README update Signed-off-by: Ganga Ram --- microchip/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microchip/README.md b/microchip/README.md index 261c799b..4e97ec62 100644 --- a/microchip/README.md +++ b/microchip/README.md @@ -9,7 +9,7 @@ Currently this overlay is used for generating bootable NixOS SD images. Code snippet example that enables icicle-kit configuration: ``` { nixos-hardware, }: { - system = "aarch64-linux"; + system = "riscv64-linux"; modules = [ nixos-hardware.nixosModules.icicle-kit ]; From 5c2a5c00a017d067118d91bf54d7b7b96747ce8b Mon Sep 17 00:00:00 2001 From: Ganga Ram Date: Sat, 24 Feb 2024 07:35:26 +0400 Subject: [PATCH 0747/1476] nxp imx8mp-evk platform support Signed-off-by: Ganga Ram --- flake.nix | 1 + nxp/imx8mp-evk/bsp/imx8mp-atf.nix | 34 +++++++++++ nxp/imx8mp-evk/bsp/imx8mp-boot.nix | 80 ++++++++++++++++++++++++++ nxp/imx8mp-evk/bsp/imx8mp-firmware.nix | 19 ++++++ nxp/imx8mp-evk/bsp/imx8mp-linux.nix | 50 ++++++++++++++++ nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix | 66 +++++++++++++++++++++ nxp/imx8mp-evk/bsp/imx8mp-uboot.nix | 41 +++++++++++++ nxp/imx8mp-evk/default.nix | 18 ++++++ nxp/imx8mp-evk/modules.nix | 16 ++++++ nxp/imx8mp-evk/overlay.nix | 3 + 10 files changed, 328 insertions(+) create mode 100644 nxp/imx8mp-evk/bsp/imx8mp-atf.nix create mode 100644 nxp/imx8mp-evk/bsp/imx8mp-boot.nix create mode 100644 nxp/imx8mp-evk/bsp/imx8mp-firmware.nix create mode 100644 nxp/imx8mp-evk/bsp/imx8mp-linux.nix create mode 100644 nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix create mode 100644 nxp/imx8mp-evk/bsp/imx8mp-uboot.nix create mode 100644 nxp/imx8mp-evk/default.nix create mode 100644 nxp/imx8mp-evk/modules.nix create mode 100644 nxp/imx8mp-evk/overlay.nix diff --git a/flake.nix b/flake.nix index cb4d194f..8a7682fb 100644 --- a/flake.nix +++ b/flake.nix @@ -183,6 +183,7 @@ morefine-m600 = import ./morefine/m600; msi-gs60 = import ./msi/gs60; msi-gl62 = import ./msi/gl62; + nxp-imx8mp-evk = import ./nxp/imx8mp-evk; nxp-imx8qm-mek = import ./nxp/imx8qm-mek; hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; hardkernel-odroid-h3 = import ./hardkernel/odroid-h3; diff --git a/nxp/imx8mp-evk/bsp/imx8mp-atf.nix b/nxp/imx8mp-evk/bsp/imx8mp-atf.nix new file mode 100644 index 00000000..55454c4a --- /dev/null +++ b/nxp/imx8mp-evk/bsp/imx8mp-atf.nix @@ -0,0 +1,34 @@ +{ + lib, + pkgs, + buildArmTrustedFirmware, + fetchgit, + enable-tee, +}: +with pkgs; let + opteedflag = + if enable-tee + then "SPD=opteed" + else ""; + target-board = "imx8mp"; +in + buildArmTrustedFirmware rec { + pname = "imx8mp-atf"; + platform = target-board; + enableParallelBuilding = true; + extraMeta.platforms = ["aarch64-linux"]; + + src = fetchgit { + url = "https://github.com/nxp-imx/imx-atf.git"; + #lf6.1.55_2.2.0 + rev = "08e9d4eef2262c0dd072b4325e8919e06d349e02"; + sha256 = "sha256-96EddJXlFEkP/LIGVgNBvUP4IDI3BbDE/c9Yub22gnc="; + }; + + extraMakeFlags = lib.concatLists [ + (lib.optional (lib.versionAtLeast pkgs.binutils.version "2.39") "LDFLAGS=--no-warn-rwx-segments") + ["PLAT=${platform}" "bl31" "${opteedflag}"] + ]; + + filesToInstall = ["build/${target-board}/release/bl31.bin"]; + } diff --git a/nxp/imx8mp-evk/bsp/imx8mp-boot.nix b/nxp/imx8mp-evk/bsp/imx8mp-boot.nix new file mode 100644 index 00000000..48f97bac --- /dev/null +++ b/nxp/imx8mp-evk/bsp/imx8mp-boot.nix @@ -0,0 +1,80 @@ +{ + pkgs, + enable-tee ? false, +}: +with pkgs; let + fw-ver = "202006"; + cp-tee = + if enable-tee + then "install -m 0644 ${optee-os}/tee.bin ./iMX8M/tee.bin" + else ""; + + imx8mp-atf = pkgs.callPackage ./imx8mp-atf.nix { + inherit (pkgs) buildArmTrustedFirmware; + inherit enable-tee; + }; + imx8mp-firmware = pkgs.callPackage ./imx8mp-firmware.nix {}; + imx8mp-uboot = pkgs.callPackage ./imx8mp-uboot.nix {}; + imx8mp-optee-os = pkgs.callPackage ./imx8mp-optee-os.nix {}; +in { + imx8m-boot = pkgs.stdenv.mkDerivation rec { + name = "imx8mp-mkimage"; + version = "lf-6.1.55-2.2.0"; + src = pkgs.fetchgit { + url = "https://github.com/nxp-imx/imx-mkimage.git"; + rev = "c4365450fb115d87f245df2864fee1604d97c06a"; + sha256 = "sha256-xycEaWKVM63BlDyBKNN0OefyK6iX/fQOTvv4fRVM55U="; + leaveDotGit = true; + }; + + postPatch = '' + substituteInPlace Makefile \ + --replace 'CC = gcc' 'CC = clang' + patchShebangs scripts + ''; + + nativeBuildInputs = [ + clang + git + dtc + ]; + + buildInputs = [ + git + glibc.static + zlib + zlib.static + ]; + + buildPhase = '' + runHook preBuild + + make bin + make SOC=iMX8MP mkimage_imx8 + + cp -v ${pkgs.ubootTools}/bin/mkimage ./iMX8M/mkimage_uboot + + install -m 0644 ${imx8mp-uboot}/u-boot-spl.bin ./iMX8M/u-boot-spl.bin + install -m 0644 ${imx8mp-uboot}/u-boot-nodtb.bin ./iMX8M/u-boot-nodtb.bin + install -m 0644 ${imx8mp-uboot}/imx8mp-evk.dtb ./iMX8M/imx8mp-evk.dtb + install -m 0644 ${imx8mp-firmware}/firmware/ddr/synopsys/lpddr4_pmu_train_1d_dmem_${fw-ver}.bin ./iMX8M/lpddr4_pmu_train_1d_dmem_${fw-ver}.bin + install -m 0644 ${imx8mp-firmware}/firmware/ddr/synopsys/lpddr4_pmu_train_1d_imem_${fw-ver}.bin ./iMX8M/lpddr4_pmu_train_1d_imem_${fw-ver}.bin + install -m 0644 ${imx8mp-firmware}/firmware/ddr/synopsys/lpddr4_pmu_train_2d_dmem_${fw-ver}.bin ./iMX8M/lpddr4_pmu_train_2d_dmem_${fw-ver}.bin + install -m 0644 ${imx8mp-firmware}/firmware/ddr/synopsys/lpddr4_pmu_train_2d_imem_${fw-ver}.bin ./iMX8M/lpddr4_pmu_train_2d_imem_${fw-ver}.bin + install -m 0644 ${imx8mp-firmware}/firmware/hdmi/cadence/signed_hdmi_imx8m.bin ./iMX8M/signed_hdmi_imx8m.bin + install -m 0644 ${imx8mp-atf}/bl31.bin ./iMX8M/bl31.bin + ${cp-tee} + + make SOC=iMX8MP flash_evk + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/image + install -m 0644 ./iMX8M/flash.bin $out/image + runHook postInstall + ''; + }; +} diff --git a/nxp/imx8mp-evk/bsp/imx8mp-firmware.nix b/nxp/imx8mp-evk/bsp/imx8mp-firmware.nix new file mode 100644 index 00000000..5dba9c70 --- /dev/null +++ b/nxp/imx8mp-evk/bsp/imx8mp-firmware.nix @@ -0,0 +1,19 @@ +{pkgs, ...}: +with pkgs; + stdenv.mkDerivation rec { + pname = "imx8mp-firmware"; + version = "8.22"; + + src = pkgs.fetchurl { + url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-${version}.bin"; + sha256 = "sha256-lMi86sVuxQPCMuYU931rvY4Xx9qnHU5lHqj9UDTDA1A="; + }; + + dontUnpack = true; + dontStrip = true; + + installPhase = '' + ${pkgs.bash}/bin/bash $src --auto-accept --force + mv firmware-imx-${version} $out + ''; + } diff --git a/nxp/imx8mp-evk/bsp/imx8mp-linux.nix b/nxp/imx8mp-evk/bsp/imx8mp-linux.nix new file mode 100644 index 00000000..c7b75402 --- /dev/null +++ b/nxp/imx8mp-evk/bsp/imx8mp-linux.nix @@ -0,0 +1,50 @@ +{pkgs, ...} @ args: +with pkgs; + buildLinux (args + // rec { + version = "6.1.55"; + name = "imx8mp-linux"; + + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = version; + + defconfig = "imx_v8_defconfig"; + + kernelPatches = [ + ]; + + autoModules = false; + + extraConfig = '' + CRYPTO_TLS m + TLS 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 + ''; + + src = fetchFromGitHub { + owner = "nxp-imx"; + repo = "linux-imx"; + # tag: lf-6.1.55-2.2.0 + rev = "770c5fe2c1d1529fae21b7043911cd50c6cf087e"; + sha256 = "sha256-tIWt75RUrjB6KmUuAYBVyAC1dmVGSUAgqV5ROJh3xU0="; + }; + } + // (args.argsOverride or {})) diff --git a/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix b/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix new file mode 100644 index 00000000..448dcb9f --- /dev/null +++ b/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix @@ -0,0 +1,66 @@ +{pkgs}: let + python3 = pkgs.buildPackages.python3; + toolchain = pkgs.gcc9Stdenv.cc; + binutils = pkgs.gcc9Stdenv.cc.bintools.bintools_bin; + cpp = pkgs.gcc; +in + pkgs.stdenv.mkDerivation rec { + pname = "imx8mp-optee-os"; + version = "lf-6.1.55-2.2.0"; + + nativeBuildInputs = [ + python3 + ]; + + enableParallelBuilding = true; + + propagatedBuildInputs = with python3.pkgs; [ + pycryptodomex + pyelftools + cryptography + ]; + + src = pkgs.fetchgit { + url = "https://github.com/nxp-imx/imx-optee-os.git"; + rev = "a303fc80f7c4bd713315687a1fa1d6ed136e78ee"; + sha256 = "sha256-OpyG812DX0c06bRZPKWB2cNu6gtZCOvewDhsKgrGB+s="; + }; + + postPatch = '' + substituteInPlace scripts/arm32_sysreg.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace scripts/gen_tee_bin.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace scripts/pem_to_pub_c.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ + --replace '/bin/bash' '${pkgs.bash}/bin/bash' + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp + ''; + + makeFlags = [ + "PLATFORM=imx" + "PLATFORM_FLAVOR=mx8qmmek" + "CFG_ARM64_core=y" + "CFG_TEE_TA_LOG_LEVEL=0" + "CFG_TEE_CORE_LOG_LEVEL=0" + "CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}" + "CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}" + ]; + + installPhase = '' + mkdir -p $out + cp ./out/arm-plat-imx/core/tee-raw.bin $out/tee.bin + ''; + } diff --git a/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix b/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix new file mode 100644 index 00000000..d890c1e3 --- /dev/null +++ b/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix @@ -0,0 +1,41 @@ +{pkgs}: +with pkgs; let + inherit buildUBoot; +in + (buildUBoot { + pname = "imx8mp-uboot"; + version = "2023.04"; + + src = fetchgit { + url = "https://github.com/nxp-imx/uboot-imx.git"; + # tag: "lf-6.1.55-2.2.0" + rev = "49b102d98881fc28af6e0a8af5ea2186c1d90a5f"; + sha256 = "sha256-1j6X82DqezEizeWoSS600XKPNwrQ4yT0vZuUImKAVVA="; + }; + + extraConfig = '' + CONFIG_USE_BOOTCOMMAND=y + CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x45000000; setenv fdt_addr_r 0x44000000; run distro_bootcmd; " + CONFIG_CMD_BOOTEFI_SELFTEST=y + CONFIG_CMD_BOOTEFI=y + CONFIG_EFI_LOADER=y + CONFIG_BLK=y + CONFIG_PARTITIONS=y + CONFIG_DM_DEVICE_REMOVE=n + CONFIG_CMD_CACHE=y + ''; + + enableParallelBuilding = true; + defconfig = "imx8mp_evk_defconfig"; + extraMeta.platforms = ["aarch64-linux"]; + + filesToInstall = [ + "./u-boot-nodtb.bin" + "./spl/u-boot-spl.bin" + "./arch/arm/dts/imx8mp-evk.dtb" + ".config" + ]; + }) + .overrideAttrs (old: { + nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.perl]; + }) diff --git a/nxp/imx8mp-evk/default.nix b/nxp/imx8mp-evk/default.nix new file mode 100644 index 00000000..c4ba0505 --- /dev/null +++ b/nxp/imx8mp-evk/default.nix @@ -0,0 +1,18 @@ +{pkgs, ...}: { + nixpkgs.overlays = [ + (import ./overlay.nix) + ]; + + imports = [ + ./modules.nix + ]; + + boot.loader.grub.extraFiles = { + "imx8mp-evk.dtb" = "${pkgs.callPackage ./bsp/imx8mp-linux.nix {}}/dtbs/freescale/imx8mp-evk.dtb"; + }; + + hardware.deviceTree = { + filter = "imx8mp-*.dtb"; + name = "imx8mp-evk.dtb"; + }; +} diff --git a/nxp/imx8mp-evk/modules.nix b/nxp/imx8mp-evk/modules.nix new file mode 100644 index 00000000..d53f60d2 --- /dev/null +++ b/nxp/imx8mp-evk/modules.nix @@ -0,0 +1,16 @@ +{ + pkgs, + lib, + ... +}: { + nixpkgs.hostPlatform = "aarch64-linux"; + + boot = { + kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/imx8mp-linux.nix {}); + initrd.includeDefaultModules = lib.mkForce false; + }; + + disabledModules = ["profiles/all-hardware.nix"]; + + hardware.deviceTree.enable = true; +} diff --git a/nxp/imx8mp-evk/overlay.nix b/nxp/imx8mp-evk/overlay.nix new file mode 100644 index 00000000..7f5d0c71 --- /dev/null +++ b/nxp/imx8mp-evk/overlay.nix @@ -0,0 +1,3 @@ +final: prev: { + inherit (final.callPackage ./bsp/imx8mp-boot.nix {pkgs = final;}) imx8m-boot; +} From 53e2a96a9edb28bc5b6c0428cf1230b06b9aec8f Mon Sep 17 00:00:00 2001 From: Ganga Ram Date: Sat, 24 Feb 2024 08:01:59 +0400 Subject: [PATCH 0748/1476] nxp imx8m quad evaluation platform support Signed-off-by: Ganga Ram --- flake.nix | 1 + nxp/imx8mp-evk/bsp/imx8mp-boot.nix | 4 +- nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix | 2 +- nxp/imx8mq-evk/bsp/imx8mq-atf.nix | 34 +++++++++++ nxp/imx8mq-evk/bsp/imx8mq-boot.nix | 78 ++++++++++++++++++++++++++ nxp/imx8mq-evk/bsp/imx8mq-firmware.nix | 19 +++++++ nxp/imx8mq-evk/bsp/imx8mq-linux.nix | 50 +++++++++++++++++ nxp/imx8mq-evk/bsp/imx8mq-optee-os.nix | 66 ++++++++++++++++++++++ nxp/imx8mq-evk/bsp/imx8mq-uboot.nix | 41 ++++++++++++++ nxp/imx8mq-evk/default.nix | 18 ++++++ nxp/imx8mq-evk/modules.nix | 16 ++++++ nxp/imx8mq-evk/overlay.nix | 3 + 12 files changed, 329 insertions(+), 3 deletions(-) create mode 100644 nxp/imx8mq-evk/bsp/imx8mq-atf.nix create mode 100644 nxp/imx8mq-evk/bsp/imx8mq-boot.nix create mode 100644 nxp/imx8mq-evk/bsp/imx8mq-firmware.nix create mode 100644 nxp/imx8mq-evk/bsp/imx8mq-linux.nix create mode 100644 nxp/imx8mq-evk/bsp/imx8mq-optee-os.nix create mode 100644 nxp/imx8mq-evk/bsp/imx8mq-uboot.nix create mode 100644 nxp/imx8mq-evk/default.nix create mode 100644 nxp/imx8mq-evk/modules.nix create mode 100644 nxp/imx8mq-evk/overlay.nix diff --git a/flake.nix b/flake.nix index 8a7682fb..7eea41eb 100644 --- a/flake.nix +++ b/flake.nix @@ -184,6 +184,7 @@ msi-gs60 = import ./msi/gs60; msi-gl62 = import ./msi/gl62; nxp-imx8mp-evk = import ./nxp/imx8mp-evk; + nxp-imx8mq-evk = import ./nxp/imx8mq-evk; nxp-imx8qm-mek = import ./nxp/imx8qm-mek; hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; hardkernel-odroid-h3 = import ./hardkernel/odroid-h3; diff --git a/nxp/imx8mp-evk/bsp/imx8mp-boot.nix b/nxp/imx8mp-evk/bsp/imx8mp-boot.nix index 48f97bac..25e72ccb 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-boot.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-boot.nix @@ -1,12 +1,12 @@ { pkgs, - enable-tee ? false, + enable-tee ? true, }: with pkgs; let fw-ver = "202006"; cp-tee = if enable-tee - then "install -m 0644 ${optee-os}/tee.bin ./iMX8M/tee.bin" + then "install -m 0644 ${imx8mp-optee-os}/tee.bin ./iMX8M/tee.bin" else ""; imx8mp-atf = pkgs.callPackage ./imx8mp-atf.nix { diff --git a/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix b/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix index 448dcb9f..70789f11 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix @@ -51,7 +51,7 @@ in makeFlags = [ "PLATFORM=imx" - "PLATFORM_FLAVOR=mx8qmmek" + "PLATFORM_FLAVOR=mx8mpevk" "CFG_ARM64_core=y" "CFG_TEE_TA_LOG_LEVEL=0" "CFG_TEE_CORE_LOG_LEVEL=0" diff --git a/nxp/imx8mq-evk/bsp/imx8mq-atf.nix b/nxp/imx8mq-evk/bsp/imx8mq-atf.nix new file mode 100644 index 00000000..0d5028d6 --- /dev/null +++ b/nxp/imx8mq-evk/bsp/imx8mq-atf.nix @@ -0,0 +1,34 @@ +{ + lib, + pkgs, + buildArmTrustedFirmware, + fetchgit, + enable-tee, +}: +with pkgs; let + opteedflag = + if enable-tee + then "SPD=opteed" + else ""; + target-board = "imx8mq"; +in + buildArmTrustedFirmware rec { + pname = "imx8mq-atf"; + platform = target-board; + enableParallelBuilding = true; + extraMeta.platforms = ["aarch64-linux"]; + + src = fetchgit { + url = "https://github.com/nxp-imx/imx-atf.git"; + #lf6.1.55_2.2.0 + rev = "08e9d4eef2262c0dd072b4325e8919e06d349e02"; + sha256 = "sha256-96EddJXlFEkP/LIGVgNBvUP4IDI3BbDE/c9Yub22gnc="; + }; + + extraMakeFlags = lib.concatLists [ + (lib.optional (lib.versionAtLeast pkgs.binutils.version "2.39") "LDFLAGS=--no-warn-rwx-segments") + ["PLAT=${platform}" "bl31" "${opteedflag}"] + ]; + + filesToInstall = ["build/${target-board}/release/bl31.bin"]; + } diff --git a/nxp/imx8mq-evk/bsp/imx8mq-boot.nix b/nxp/imx8mq-evk/bsp/imx8mq-boot.nix new file mode 100644 index 00000000..72fcfc0a --- /dev/null +++ b/nxp/imx8mq-evk/bsp/imx8mq-boot.nix @@ -0,0 +1,78 @@ +{ + pkgs, + enable-tee ? false, +}: +with pkgs; let + cp-tee = + if enable-tee + then "install -m 0644 ${imx8mq-optee-os}/tee.bin ./iMX8M/tee.bin" + else ""; + + imx8mq-atf = pkgs.callPackage ./imx8mq-atf.nix { + inherit (pkgs) buildArmTrustedFirmware; + inherit enable-tee; + }; + imx8mq-firmware = pkgs.callPackage ./imx8mq-firmware.nix {}; + imx8mq-uboot = pkgs.callPackage ./imx8mq-uboot.nix {}; + imx8mq-optee-os = pkgs.callPackage ./imx8mq-optee-os.nix {}; +in { + imx8m-boot = pkgs.stdenv.mkDerivation rec { + name = "imx8mq-mkimage"; + version = "lf-6.1.55-2.2.0"; + src = pkgs.fetchgit { + url = "https://github.com/nxp-imx/imx-mkimage.git"; + rev = "c4365450fb115d87f245df2864fee1604d97c06a"; + sha256 = "sha256-xycEaWKVM63BlDyBKNN0OefyK6iX/fQOTvv4fRVM55U="; + leaveDotGit = true; + }; + + postPatch = '' + substituteInPlace Makefile \ + --replace 'CC = gcc' 'CC = clang' + patchShebangs scripts + ''; + + nativeBuildInputs = [ + clang + git + dtc + ]; + + buildInputs = [ + git + glibc.static + zlib + zlib.static + ]; + + buildPhase = '' + runHook preBuild + + make bin + make SOC=iMX8M mkimage_imx8 + cp -v ${pkgs.ubootTools}/bin/mkimage ./iMX8M/mkimage_uboot + + install -m 0644 ${imx8mq-uboot}/u-boot-spl.bin ./iMX8M/u-boot-spl.bin + install -m 0644 ${imx8mq-uboot}/u-boot-nodtb.bin ./iMX8M/u-boot-nodtb.bin + install -m 0644 ${imx8mq-uboot}/imx8mq-evk.dtb ./iMX8M/imx8mq-evk.dtb + install -m 0644 ${imx8mq-firmware}/firmware/ddr/synopsys/lpddr4_pmu_train_1d_dmem.bin ./iMX8M/lpddr4_pmu_train_1d_dmem.bin + install -m 0644 ${imx8mq-firmware}/firmware/ddr/synopsys/lpddr4_pmu_train_1d_imem.bin ./iMX8M/lpddr4_pmu_train_1d_imem.bin + install -m 0644 ${imx8mq-firmware}/firmware/ddr/synopsys/lpddr4_pmu_train_2d_dmem.bin ./iMX8M/lpddr4_pmu_train_2d_dmem.bin + install -m 0644 ${imx8mq-firmware}/firmware/ddr/synopsys/lpddr4_pmu_train_2d_imem.bin ./iMX8M/lpddr4_pmu_train_2d_imem.bin + install -m 0644 ${imx8mq-firmware}/firmware/hdmi/cadence/signed_hdmi_imx8m.bin ./iMX8M/signed_hdmi_imx8m.bin + install -m 0644 ${imx8mq-atf}/bl31.bin ./iMX8M/bl31.bin + ${cp-tee} + + make SOC=iMX8M flash_evk + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/image + install -m 0644 ./iMX8M/flash.bin $out/image + runHook postInstall + ''; + }; +} diff --git a/nxp/imx8mq-evk/bsp/imx8mq-firmware.nix b/nxp/imx8mq-evk/bsp/imx8mq-firmware.nix new file mode 100644 index 00000000..e576f87f --- /dev/null +++ b/nxp/imx8mq-evk/bsp/imx8mq-firmware.nix @@ -0,0 +1,19 @@ +{pkgs, ...}: +with pkgs; + stdenv.mkDerivation rec { + pname = "imx8mq-firmware"; + version = "8.22"; + + src = pkgs.fetchurl { + url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-${version}.bin"; + sha256 = "sha256-lMi86sVuxQPCMuYU931rvY4Xx9qnHU5lHqj9UDTDA1A="; + }; + + dontUnpack = true; + dontStrip = true; + + installPhase = '' + ${pkgs.bash}/bin/bash $src --auto-accept --force + mv firmware-imx-${version} $out + ''; + } diff --git a/nxp/imx8mq-evk/bsp/imx8mq-linux.nix b/nxp/imx8mq-evk/bsp/imx8mq-linux.nix new file mode 100644 index 00000000..247061d8 --- /dev/null +++ b/nxp/imx8mq-evk/bsp/imx8mq-linux.nix @@ -0,0 +1,50 @@ +{pkgs, ...} @ args: +with pkgs; + buildLinux (args + // rec { + version = "6.1.55"; + name = "imx8mq-linux"; + + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = version; + + defconfig = "imx_v8_defconfig"; + + kernelPatches = [ + ]; + + autoModules = false; + + extraConfig = '' + CRYPTO_TLS m + TLS 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 + ''; + + src = fetchFromGitHub { + owner = "nxp-imx"; + repo = "linux-imx"; + # tag: lf-6.1.55-2.2.0 + rev = "770c5fe2c1d1529fae21b7043911cd50c6cf087e"; + sha256 = "sha256-tIWt75RUrjB6KmUuAYBVyAC1dmVGSUAgqV5ROJh3xU0="; + }; + } + // (args.argsOverride or {})) diff --git a/nxp/imx8mq-evk/bsp/imx8mq-optee-os.nix b/nxp/imx8mq-evk/bsp/imx8mq-optee-os.nix new file mode 100644 index 00000000..4fa6e3e5 --- /dev/null +++ b/nxp/imx8mq-evk/bsp/imx8mq-optee-os.nix @@ -0,0 +1,66 @@ +{pkgs}: let + python3 = pkgs.buildPackages.python3; + toolchain = pkgs.gcc9Stdenv.cc; + binutils = pkgs.gcc9Stdenv.cc.bintools.bintools_bin; + cpp = pkgs.gcc; +in + pkgs.stdenv.mkDerivation rec { + pname = "imx8mq-optee-os"; + version = "lf-6.1.55-2.2.0"; + + nativeBuildInputs = [ + python3 + ]; + + enableParallelBuilding = true; + + propagatedBuildInputs = with python3.pkgs; [ + pycryptodomex + pyelftools + cryptography + ]; + + src = pkgs.fetchgit { + url = "https://github.com/nxp-imx/imx-optee-os.git"; + rev = "a303fc80f7c4bd713315687a1fa1d6ed136e78ee"; + sha256 = "sha256-OpyG812DX0c06bRZPKWB2cNu6gtZCOvewDhsKgrGB+s="; + }; + + postPatch = '' + substituteInPlace scripts/arm32_sysreg.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace scripts/gen_tee_bin.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace scripts/pem_to_pub_c.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ + --replace '/bin/bash' '${pkgs.bash}/bin/bash' + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp + ''; + + makeFlags = [ + "PLATFORM=imx" + "PLATFORM_FLAVOR=mx8mqevk" + "CFG_ARM64_core=y" + "CFG_TEE_TA_LOG_LEVEL=0" + "CFG_TEE_CORE_LOG_LEVEL=0" + "CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}" + "CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}" + ]; + + installPhase = '' + mkdir -p $out + cp ./out/arm-plat-imx/core/tee-raw.bin $out/tee.bin + ''; + } diff --git a/nxp/imx8mq-evk/bsp/imx8mq-uboot.nix b/nxp/imx8mq-evk/bsp/imx8mq-uboot.nix new file mode 100644 index 00000000..0b2b05b3 --- /dev/null +++ b/nxp/imx8mq-evk/bsp/imx8mq-uboot.nix @@ -0,0 +1,41 @@ +{pkgs}: +with pkgs; let + inherit buildUBoot; +in + (buildUBoot { + pname = "imx8mq-uboot"; + version = "2023.04"; + + src = fetchgit { + url = "https://github.com/nxp-imx/uboot-imx.git"; + # tag: "lf-6.1.55-2.2.0" + rev = "49b102d98881fc28af6e0a8af5ea2186c1d90a5f"; + sha256 = "sha256-1j6X82DqezEizeWoSS600XKPNwrQ4yT0vZuUImKAVVA="; + }; + + extraConfig = '' + CONFIG_USE_BOOTCOMMAND=y + CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x45000000; setenv fdt_addr_r 0x44000000; run distro_bootcmd; " + CONFIG_CMD_BOOTEFI_SELFTEST=y + CONFIG_CMD_BOOTEFI=y + CONFIG_EFI_LOADER=y + CONFIG_BLK=y + CONFIG_PARTITIONS=y + CONFIG_DM_DEVICE_REMOVE=n + CONFIG_CMD_CACHE=y + ''; + + enableParallelBuilding = true; + defconfig = "imx8mq_evk_defconfig"; + extraMeta.platforms = ["aarch64-linux"]; + + filesToInstall = [ + "./u-boot-nodtb.bin" + "./spl/u-boot-spl.bin" + "./arch/arm/dts/imx8mq-evk.dtb" + ".config" + ]; + }) + .overrideAttrs (old: { + nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.perl]; + }) diff --git a/nxp/imx8mq-evk/default.nix b/nxp/imx8mq-evk/default.nix new file mode 100644 index 00000000..ca35c269 --- /dev/null +++ b/nxp/imx8mq-evk/default.nix @@ -0,0 +1,18 @@ +{pkgs, ...}: { + nixpkgs.overlays = [ + (import ./overlay.nix) + ]; + + imports = [ + ./modules.nix + ]; + + boot.loader.grub.extraFiles = { + "imx8mq-evk.dtb" = "${pkgs.callPackage ./bsp/imx8mq-linux.nix {}}/dtbs/freescale/imx8mq-evk.dtb"; + }; + + hardware.deviceTree = { + filter = "imx8mq-*.dtb"; + name = "imx8mq-evk.dtb"; + }; +} diff --git a/nxp/imx8mq-evk/modules.nix b/nxp/imx8mq-evk/modules.nix new file mode 100644 index 00000000..4408bebc --- /dev/null +++ b/nxp/imx8mq-evk/modules.nix @@ -0,0 +1,16 @@ +{ + pkgs, + lib, + ... +}: { + nixpkgs.hostPlatform = "aarch64-linux"; + + boot = { + kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/imx8mq-linux.nix {}); + initrd.includeDefaultModules = lib.mkForce false; + }; + + disabledModules = ["profiles/all-hardware.nix"]; + + hardware.deviceTree.enable = true; +} diff --git a/nxp/imx8mq-evk/overlay.nix b/nxp/imx8mq-evk/overlay.nix new file mode 100644 index 00000000..31af2bdc --- /dev/null +++ b/nxp/imx8mq-evk/overlay.nix @@ -0,0 +1,3 @@ +final: prev: { + inherit (final.callPackage ./bsp/imx8mq-boot.nix {pkgs = final;}) imx8m-boot; +} From f12e5fd7ec032da50b16417a907db84c90e109c8 Mon Sep 17 00:00:00 2001 From: Ganga Ram Date: Mon, 26 Feb 2024 15:27:43 +0400 Subject: [PATCH 0749/1476] nxp imx8mp-evk/imx8mq-evk documentation Signed-off-by: Ganga Ram --- README.md | 2 ++ nxp/README.md | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/README.md b/README.md index a892b143..06cdf2b7 100644 --- a/README.md +++ b/README.md @@ -244,6 +244,8 @@ See code for all available configurations. | [Microsoft Surface Range (Common Modules)](microsoft/surface/common) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | | [Morefine M600](morefine/m600) | `` | +| [NXP iMX8 MPlus Evaluation Kit](nxp/imx8mp-evk) | `` | +| [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | | [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | | [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | | [Omen 15-en0010ca](omen/15-en0010ca) | `` | diff --git a/nxp/README.md b/nxp/README.md index 463bb7ed..f8ccefa0 100644 --- a/nxp/README.md +++ b/nxp/README.md @@ -5,6 +5,8 @@ - [i.MX8QuadXPlus Multisensory Enablement Kit](https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-8quadxplus-multisensory-enablement-kit-mek:MCIMX8QXP-CPU) (**imx8qxp-mek**) - device-specific U-Boot and Linux kernel. ## 2. How to use + +### 2.1 For imx8qm-mek Currently this NXP overlay is used for generating EFI-bootable NixOS images. I recommend to use [Tow-Boot](https://tow-boot.org/) as a bootloader, but U-Boot from this overlay can also be used. U-Boot was tested separately from NixOS. @@ -18,3 +20,20 @@ Code snippet example that enables imx8qm configuration: ]; } ``` + +### 2.2 For imx8mq-evk/imx8mp-evk +This NXP overlay is used for generating sdimage. +Current configuration uses uboot as a bootloader. It provides an options to use optee-os which is currently disabled. It can be enabled using `enable-tee` boolean argument avalable in `imx8m-boot.nix`, which is `false` by default. + +Code snippet example that enables 'imx8mp-evk/emx8mq-evk' configuration: + +``` +{ nixos-hardware, }: { + system = "aarch64-linux"; + modules = [ + nixos-hardware.nixosModules.imx8mp-evk #For imx8mp-evk + #nixos-hardware.nixosModules.imx8mq-evk #For imx8mq-evk + ]; +} +``` + From 01467901ec51dd92774040f2b3dff4f21f4e1c45 Mon Sep 17 00:00:00 2001 From: Vinetos Date: Tue, 20 Feb 2024 10:47:48 +0100 Subject: [PATCH 0750/1476] dell-xps-15-9570: init --- README.md | 5 ++++- dell/xps/15-9570/README.wiki | 30 +++++++++++++++++++++++++++++ dell/xps/15-9570/default.nix | 12 ++++++++++++ dell/xps/15-9570/intel/default.nix | 8 ++++++++ dell/xps/15-9570/nvidia/default.nix | 22 +++++++++++++++++++++ dell/xps/15-9570/xps-common.nix | 10 ++++++++++ flake.nix | 2 ++ 7 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 dell/xps/15-9570/README.wiki create mode 100644 dell/xps/15-9570/default.nix create mode 100644 dell/xps/15-9570/intel/default.nix create mode 100644 dell/xps/15-9570/nvidia/default.nix create mode 100644 dell/xps/15-9570/xps-common.nix diff --git a/README.md b/README.md index 06cdf2b7..8aa1e648 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md). See code for all available configurations. | Model | Path | -| ---------------------------------------------------------------------- | ------------------------------------------------------- | +|------------------------------------------------------------------------|---------------------------------------------------------| | [Acer Aspire 4810T](acer/aspire/4810t) | `` | | [Airis N990](airis/n990) | `` | | [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | @@ -131,6 +131,9 @@ See code for all available configurations. | [Dell XPS 15 9560, intel only](dell/xps/15-9560/intel) | `` | | [Dell XPS 15 9560, nvidia only](dell/xps/15-9560/nvidia) | `` | | [Dell XPS 15 9560](dell/xps/15-9560) | `` | +| [Dell XPS 15 9570, intel only](dell/xps/15-9570/intel) | `` | +| [Dell XPS 15 9570, nvidia](dell/xps/15-9570/nvidia) | `` | +| [Dell XPS 15 9570](dell/xps/15-9570) | `` | | [Dell XPS 17 9700, intel](dell/xps/17-9700/intel) | `` | | [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | diff --git a/dell/xps/15-9570/README.wiki b/dell/xps/15-9570/README.wiki new file mode 100644 index 00000000..a8209817 --- /dev/null +++ b/dell/xps/15-9570/README.wiki @@ -0,0 +1,30 @@ += Dell XPS 15 9570 = + +== Tested Hardware == + +* CPU: Intel(R) Core(TM) i7-8750H CPU @ 4.10GHz +* RAM: 32 GB +* HDD: 512 GiB SSD +* Screen: 15.6" FHD(1920x1080) non-touchscreen +* Graphics: NVIDIA Corporation GTX1050 Ti Mobile 4GB GDDR5, with Intel Graphics too. +* Input: trackpad, bluetooth mouse and keyboard + + +== Firmware Configuration == + +Not much tweaking of NixOS itself was needed. But we currently cannot automate the firmware setup, so this must be done by hand. + +== Installation == + +=== Before installation === + +These settings are needed both for booting the final install, and installer itself. Therefore, they must be done first. + +* ''Disable Secure Boot (but keep UEFI Boot).'' Thankfully doing so is as easy as changing any other simple setting. + +* ''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.) + + +=== After installation === + +* ''Add systemd-boot to UEFI boot list.'' The (uneditable anyways) settings mapping drive UUIDs to HD* work fine. diff --git a/dell/xps/15-9570/default.nix b/dell/xps/15-9570/default.nix new file mode 100644 index 00000000..200dc093 --- /dev/null +++ b/dell/xps/15-9570/default.nix @@ -0,0 +1,12 @@ +{ lib, ... }: +{ + imports = [ + ../../../common/cpu/intel + ../../../common/cpu/intel/kaby-lake + ../../../common/pc/laptop + ./xps-common.nix + ]; + + # Includes the Wi-Fi and Bluetooth firmware + hardware.enableRedistributableFirmware = lib.mkDefault true; +} diff --git a/dell/xps/15-9570/intel/default.nix b/dell/xps/15-9570/intel/default.nix new file mode 100644 index 00000000..c4d51ea6 --- /dev/null +++ b/dell/xps/15-9570/intel/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ../../../../common/cpu/intel + ../../../../common/pc/laptop + ../../../../common/gpu/nvidia/disable.nix + ../xps-common.nix + ]; +} diff --git a/dell/xps/15-9570/nvidia/default.nix b/dell/xps/15-9570/nvidia/default.nix new file mode 100644 index 00000000..e58fa581 --- /dev/null +++ b/dell/xps/15-9570/nvidia/default.nix @@ -0,0 +1,22 @@ +{ ... }: + +{ + imports = [ + ../../../../common/cpu/intel + ../../../../common/gpu/nvidia/prime.nix + ../../../../common/pc/laptop + ../xps-common.nix + ]; + + + # This runs only nvidia, great for games or heavy use of render applications + + ##### disable intel, run nvidia only and as default + hardware.nvidia.prime = { + # Bus ID of the Intel GPU. + intelBusId = "PCI:0:2:0"; + + # Bus ID of the NVIDIA GPU. + nvidiaBusId = "PCI:1:0:0"; + }; +} diff --git a/dell/xps/15-9570/xps-common.nix b/dell/xps/15-9570/xps-common.nix new file mode 100644 index 00000000..39151e96 --- /dev/null +++ b/dell/xps/15-9570/xps-common.nix @@ -0,0 +1,10 @@ +{ lib, ... }: + +{ + # Solution to rcu_sched freezing + boot.kernelParams = [ "acpi_rev_override" ]; + boot.kernelModules = [ "kvm-intel" ]; + + # This will save you money and possibly your life! + services.thermald.enable = lib.mkDefault true; +} diff --git a/flake.nix b/flake.nix index 7eea41eb..a83a0080 100644 --- a/flake.nix +++ b/flake.nix @@ -65,6 +65,8 @@ dell-xps-15-9560 = import ./dell/xps/15-9560; dell-xps-15-9560-intel = import ./dell/xps/15-9560/intel; dell-xps-15-9560-nvidia = import ./dell/xps/15-9560/nvidia; + dell-xps-15-9570-intel = import ./dell/xps/15-9570/intel; + dell-xps-15-9570-nvidia = import ./dell/xps/15-9570/nvidia; dell-xps-17-9700-intel = import ./dell/xps/17-9700/intel; dell-xps-17-9700-nvidia = import ./dell/xps/17-9700/nvidia; dell-xps-17-9710-intel = import ./dell/xps/17-9710/intel; From ce93797a42b8300c3e8bcb550d7659935289eeaf Mon Sep 17 00:00:00 2001 From: Bit Borealis Date: Thu, 25 Jan 2024 07:48:14 +0000 Subject: [PATCH 0751/1476] add w520 ( copy of t520 ) --- flake.nix | 1 + lenovo/thinkpad/w520/default.nix | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 lenovo/thinkpad/w520/default.nix diff --git a/flake.nix b/flake.nix index a83a0080..6085821c 100644 --- a/flake.nix +++ b/flake.nix @@ -143,6 +143,7 @@ lenovo-thinkpad-t490 = import ./lenovo/thinkpad/t490; lenovo-thinkpad-t495 = import ./lenovo/thinkpad/t495; lenovo-thinkpad-t520 = import ./lenovo/thinkpad/t520; + lenovo-thinkpad-w520 = import ./lenovo/thinkpad/w520; lenovo-thinkpad-t550 = import ./lenovo/thinkpad/t550; lenovo-thinkpad-t590 = import ./lenovo/thinkpad/t590; lenovo-thinkpad-x1 = import ./lenovo/thinkpad/x1; diff --git a/lenovo/thinkpad/w520/default.nix b/lenovo/thinkpad/w520/default.nix new file mode 100644 index 00000000..a3c7db40 --- /dev/null +++ b/lenovo/thinkpad/w520/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ../. + ../tp-smapi.nix + ../../../common/cpu/intel/sandy-bridge + ../../../common/pc/laptop/acpi_call.nix + ]; +} From 33a97b5814d36ddd65ad678ad07ce43b1a67f159 Mon Sep 17 00:00:00 2001 From: Bit Date: Wed, 28 Feb 2024 17:47:55 +0000 Subject: [PATCH 0752/1476] add w520 to readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8aa1e648..6dd7eee8 100644 --- a/README.md +++ b/README.md @@ -210,6 +210,7 @@ See code for all available configurations. | [Lenovo ThinkPad T520](lenovo/thinkpad/t520) | `` | | [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | | [Lenovo ThinkPad T590](lenovo/thinkpad/t590) | `` | +| [Lenovo ThinkPad W520](lenovo/thinkpad/w520) | `` | | [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | | [Lenovo ThinkPad X1 Yoga Gen 7](lenovo/thinkpad/x1/yoga/7th-gen/) | `` | | [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | From 59e37017b9ed31dee303dbbd4531c594df95cfbc Mon Sep 17 00:00:00 2001 From: koalp Date: Tue, 27 Feb 2024 23:12:24 +0100 Subject: [PATCH 0753/1476] Add msi B550 a pro motherboard --- README.md | 1 + flake.nix | 1 + msi/b550-a-pro/default.nix | 9 +++++++++ 3 files changed, 11 insertions(+) create mode 100644 msi/b550-a-pro/default.nix diff --git a/README.md b/README.md index 6dd7eee8..641552d1 100644 --- a/README.md +++ b/README.md @@ -239,6 +239,7 @@ See code for all available configurations. | [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/amdgpu) | `` | | [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `` | | [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `` | +| [MSI B550-A PRO](msi/b550-a-pro) | `` | | [MSI GS60 2QE](msi/gs60) | `` | | [MSI GL62/CX62](msi/gl62) | `` | | [Microchip Icicle Kit](microchip/icicle-kit) | `` | diff --git a/flake.nix b/flake.nix index 6085821c..5943da2f 100644 --- a/flake.nix +++ b/flake.nix @@ -184,6 +184,7 @@ microsoft-surface-common = import ./microsoft/surface/common; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; morefine-m600 = import ./morefine/m600; + msi-b550-a-pro = import ./msi/b550-a-pro; msi-gs60 = import ./msi/gs60; msi-gl62 = import ./msi/gl62; nxp-imx8mp-evk = import ./nxp/imx8mp-evk; diff --git a/msi/b550-a-pro/default.nix b/msi/b550-a-pro/default.nix new file mode 100644 index 00000000..e1070b0e --- /dev/null +++ b/msi/b550-a-pro/default.nix @@ -0,0 +1,9 @@ +{ + imports = [ + ../../common/cpu/amd + ../../common/pc/ssd + ../../common/pc + ]; + + boot.kernelModules = ["nct6683"]; +} From 19e5d3c9d984d35edfd6ed1700c67d25b5030ed0 Mon Sep 17 00:00:00 2001 From: James Alseth Date: Sun, 3 Mar 2024 10:27:47 -0800 Subject: [PATCH 0754/1476] Add Thinkpad X13 Gen1 AMD variant --- README.md | 7 ++++--- flake.nix | 3 ++- lenovo/thinkpad/x13/OLD-BEHAVIOUR-DEPRECATED.md | 12 ++++++++++++ lenovo/thinkpad/x13/amd/default.nix | 6 ++++++ lenovo/thinkpad/x13/common.nix | 10 ++++++++++ lenovo/thinkpad/x13/default.nix | 16 ++++++---------- lenovo/thinkpad/x13/intel/default.nix | 7 +++++++ lenovo/thinkpad/x13/yoga/default.nix | 2 +- 8 files changed, 48 insertions(+), 15 deletions(-) create mode 100644 lenovo/thinkpad/x13/OLD-BEHAVIOUR-DEPRECATED.md create mode 100644 lenovo/thinkpad/x13/amd/default.nix create mode 100644 lenovo/thinkpad/x13/common.nix create mode 100644 lenovo/thinkpad/x13/intel/default.nix diff --git a/README.md b/README.md index 641552d1..49754f07 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,8 @@ See code for all available configurations. | [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | | [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | | [Lenovo ThinkPad X13 Yoga (3th Gen)](lenovo/thinkpad/x13/yoga/3th-gen) | `` | -| [Lenovo ThinkPad X13](lenovo/thinkpad/x13) | `` | +| [Lenovo ThinkPad X13 (Intel)](lenovo/thinkpad/x13/intel) | `` | +| [Lenovo ThinkPad X13 (AMD)](lenovo/thinkpad/x13/amd) | `` | | [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | | [Lenovo ThinkPad X200s](lenovo/thinkpad/x200s) | `` | | [Lenovo ThinkPad X220](lenovo/thinkpad/x220) | `` | @@ -249,8 +250,8 @@ See code for all available configurations. | [Microsoft Surface Range (Common Modules)](microsoft/surface/common) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | | [Morefine M600](morefine/m600) | `` | -| [NXP iMX8 MPlus Evaluation Kit](nxp/imx8mp-evk) | `` | -| [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | +| [NXP iMX8 MPlus Evaluation Kit](nxp/imx8mp-evk) | `` | +| [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | | [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | | [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | | [Omen 15-en0010ca](omen/15-en0010ca) | `` | diff --git a/flake.nix b/flake.nix index 5943da2f..8488f187 100644 --- a/flake.nix +++ b/flake.nix @@ -159,7 +159,8 @@ lenovo-thinkpad-x1-extreme-gen4 = import ./lenovo/thinkpad/x1-extreme/gen4; lenovo-thinkpad-x1-nano = import ./lenovo/thinkpad/x1-nano; lenovo-thinkpad-x1-nano-gen1 = import ./lenovo/thinkpad/x1-nano/gen1; - lenovo-thinkpad-x13 = import ./lenovo/thinkpad/x13; + lenovo-thinkpad-x13 = import ./lenovo/thinkpad/x13/intel; + lenovo-thinkpad-x13-amd = import ./lenovo/thinkpad/x13/amd; lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13/yoga; lenovo-thinkpad-x13-yoga-3th-gen = import ./lenovo/thinkpad/x13/yoga/3th-gen; lenovo-thinkpad-x140e = import ./lenovo/thinkpad/x140e; diff --git a/lenovo/thinkpad/x13/OLD-BEHAVIOUR-DEPRECATED.md b/lenovo/thinkpad/x13/OLD-BEHAVIOUR-DEPRECATED.md new file mode 100644 index 00000000..a7703471 --- /dev/null +++ b/lenovo/thinkpad/x13/OLD-BEHAVIOUR-DEPRECATED.md @@ -0,0 +1,12 @@ +# Thinkpad X13 Deprecations + +## Overview + +The X13 has multiple variants. Originally, the configs only supported Intel +hardware. + +## How to update + +If you previously imported the module under `lenovo/thinkpad/x13`, you can now +import `lenovo/thinkpad/x13/intel` instead. Users with the AMD variant should +import `lenovo/thinkpad/x13/amd`. diff --git a/lenovo/thinkpad/x13/amd/default.nix b/lenovo/thinkpad/x13/amd/default.nix new file mode 100644 index 00000000..61ca7b75 --- /dev/null +++ b/lenovo/thinkpad/x13/amd/default.nix @@ -0,0 +1,6 @@ +{ ... }: { + imports = [ + ../common.nix + ../../../../common/cpu/amd + ]; +} diff --git a/lenovo/thinkpad/x13/common.nix b/lenovo/thinkpad/x13/common.nix new file mode 100644 index 00000000..e6f79fc0 --- /dev/null +++ b/lenovo/thinkpad/x13/common.nix @@ -0,0 +1,10 @@ +{ ... }: { + imports = [ + ../. + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/ssd + ]; + + # Somehow psmouse does not load automatically on boot for me + boot.initrd.kernelModules = [ "psmouse" ]; +} diff --git a/lenovo/thinkpad/x13/default.nix b/lenovo/thinkpad/x13/default.nix index 911dc5b0..5e5c9923 100644 --- a/lenovo/thinkpad/x13/default.nix +++ b/lenovo/thinkpad/x13/default.nix @@ -1,12 +1,8 @@ -{ ... }: { - # Reference to hardware: https://certification.ubuntu.com/hardware/202004-27844 - imports = [ - ../. - ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix - ../../../common/pc/laptop/ssd +{ + assertions = [ + { + assertion = false; + message = "Importing the x13/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/lenovo/thinkpad/x13/OLD-BEHAVIOUR-DEPRECATED.md for more details."; + } ]; - - # Somehow psmouse does not load automatically on boot for me - boot.initrd.kernelModules = [ "psmouse" ]; } diff --git a/lenovo/thinkpad/x13/intel/default.nix b/lenovo/thinkpad/x13/intel/default.nix new file mode 100644 index 00000000..ed4771fd --- /dev/null +++ b/lenovo/thinkpad/x13/intel/default.nix @@ -0,0 +1,7 @@ +{ ... }: { + # Reference to hardware: https://certification.ubuntu.com/hardware/202004-27844 + imports = [ + ../common.nix + ../../../../common/cpu/intel + ]; +} diff --git a/lenovo/thinkpad/x13/yoga/default.nix b/lenovo/thinkpad/x13/yoga/default.nix index dfabfd41..5a454d6f 100644 --- a/lenovo/thinkpad/x13/yoga/default.nix +++ b/lenovo/thinkpad/x13/yoga/default.nix @@ -1,6 +1,6 @@ { config, lib, ... }: { imports = [ - ../. + ../intel ../../yoga.nix ]; From ad2fd7b978d5e462048729a6c635c45d3d33c9ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 02:08:06 +0000 Subject: [PATCH 0755/1476] build(deps): bump cachix/install-nix-action from 25 to 26 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 25 to 26. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v25...v26) --- 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 2f01e7ff..d57791a8 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@v25 + - uses: cachix/install-nix-action@v26 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version From 74967732a5a09230fe19458922b6d6dfcae17738 Mon Sep 17 00:00:00 2001 From: Fay Ash <56054933+yaoshiu@users.noreply.github.com> Date: Sat, 16 Mar 2024 00:48:04 +0800 Subject: [PATCH 0756/1476] fix: comment out the edid module for legion-16ach6h It seems to break extra monitor modes --- lenovo/legion/16ach6h/hybrid/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lenovo/legion/16ach6h/hybrid/default.nix b/lenovo/legion/16ach6h/hybrid/default.nix index 51e10dc0..f1b4c9e5 100644 --- a/lenovo/legion/16ach6h/hybrid/default.nix +++ b/lenovo/legion/16ach6h/hybrid/default.nix @@ -8,7 +8,8 @@ ../../../../common/gpu/nvidia/prime.nix ../../../../common/pc/laptop ../../../../common/pc/laptop/ssd - ../edid + # This seems to break extra monitor modes + # ../edid ]; # Still needs to load at some point if we want X11 to work From b081de56dfc51d2b5b648d6ae2b106deeeb49d00 Mon Sep 17 00:00:00 2001 From: piousdeer <31318219+piousdeer@users.noreply.github.com> Date: Mon, 18 Mar 2024 22:10:15 +0700 Subject: [PATCH 0757/1476] 16ach6h: re-enable edid for internal display only --- lenovo/legion/16ach6h/edid/default.nix | 4 +++- lenovo/legion/16ach6h/hybrid/default.nix | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lenovo/legion/16ach6h/edid/default.nix b/lenovo/legion/16ach6h/edid/default.nix index 81c44d59..5e7d50fb 100644 --- a/lenovo/legion/16ach6h/edid/default.nix +++ b/lenovo/legion/16ach6h/edid/default.nix @@ -10,7 +10,9 @@ in { hardware.firmware = [ chip_edid ]; - boot.kernelParams = [ "drm.edid_firmware=edid/16ach6h.bin" ]; + # For some reason, the internal display is sometimes eDP-1, and sometimes it's eDP-2 + boot.kernelParams = [ "drm.edid_firmware=eDP-1:edid/16ach6h.bin,eDP-2:edid/16ach6h.bin" ]; + # This fails at the moment, https://github.com/NixOS/nixos-hardware/issues/795 # Extra refresh rates seem to work regardless # boot.initrd.extraFiles."lib/firmware/edid/16ach6h.bin".source = pkgs.runCommandLocal "chip_edid" { } "cp ${./16ach6h.bin} $out"; diff --git a/lenovo/legion/16ach6h/hybrid/default.nix b/lenovo/legion/16ach6h/hybrid/default.nix index f1b4c9e5..51e10dc0 100644 --- a/lenovo/legion/16ach6h/hybrid/default.nix +++ b/lenovo/legion/16ach6h/hybrid/default.nix @@ -8,8 +8,7 @@ ../../../../common/gpu/nvidia/prime.nix ../../../../common/pc/laptop ../../../../common/pc/laptop/ssd - # This seems to break extra monitor modes - # ../edid + ../edid ]; # Still needs to load at some point if we want X11 to work From 1568f005e12aee4bfe815750cac888ef6cb81a4d Mon Sep 17 00:00:00 2001 From: kevinlmadison Date: Mon, 18 Mar 2024 10:42:44 -0400 Subject: [PATCH 0758/1476] add support for MSI B350 TOMAHAWK Motherboard --- msi/b350-tomahawk/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 msi/b350-tomahawk/default.nix diff --git a/msi/b350-tomahawk/default.nix b/msi/b350-tomahawk/default.nix new file mode 100644 index 00000000..664c1029 --- /dev/null +++ b/msi/b350-tomahawk/default.nix @@ -0,0 +1,9 @@ +{ + imports = [ + ../../common/cpu/amd + ../../common/pc/ssd + ../../common/pc + ]; + + boot.kernelModules = ["nct6775"]; +} From 5bf55b853241737b047af62a90ed2e9cf41bb892 Mon Sep 17 00:00:00 2001 From: kevinlmadison Date: Mon, 18 Mar 2024 10:58:36 -0400 Subject: [PATCH 0759/1476] Add msi-b350-tomahawk module to flake --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 5943da2f..c644c844 100644 --- a/flake.nix +++ b/flake.nix @@ -184,6 +184,7 @@ microsoft-surface-common = import ./microsoft/surface/common; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; morefine-m600 = import ./morefine/m600; + msi-b350-tomahawk = import ./msi/b350-tomahawk; msi-b550-a-pro = import ./msi/b550-a-pro; msi-gs60 = import ./msi/gs60; msi-gl62 = import ./msi/gl62; From 1e679b9a9970780cd5d4dfe755a74a8f96d33388 Mon Sep 17 00:00:00 2001 From: kevinlmadison Date: Mon, 18 Mar 2024 11:27:51 -0400 Subject: [PATCH 0760/1476] Update readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 641552d1..e3c84abf 100644 --- a/README.md +++ b/README.md @@ -240,6 +240,7 @@ See code for all available configurations. | [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `` | | [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `` | | [MSI B550-A PRO](msi/b550-a-pro) | `` | +| [MSI B350 TOMAHAWK](msi/b350-tomahawk) | `` | | [MSI GS60 2QE](msi/gs60) | `` | | [MSI GL62/CX62](msi/gl62) | `` | | [Microchip Icicle Kit](microchip/icicle-kit) | `` | From 474549f84151ceaed1c4ef0465192c7b0952f161 Mon Sep 17 00:00:00 2001 From: Nire Bryce Date: Mon, 25 Mar 2024 07:40:22 +0000 Subject: [PATCH 0761/1476] gigabyte b550: suspend fix (#884) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes b550 suspend bug by setting up systemd services that disable GPP0 and GPP8 in /proc/acpi/wakeup Co-authored-by: Jörg Thalheim --- README.md | 1 + gigabyte/b550/README.md | 47 ++++++++++++++++++++++++++++++ gigabyte/b550/b550-fix-suspend.nix | 35 ++++++++++++++++++++++ gigabyte/b550/default.nix | 5 ++++ 4 files changed, 88 insertions(+) create mode 100644 gigabyte/b550/README.md create mode 100644 gigabyte/b550/b550-fix-suspend.nix create mode 100644 gigabyte/b550/default.nix diff --git a/README.md b/README.md index e3c84abf..60ba9323 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,7 @@ See code for all available configurations. | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | | [Focus M2 Gen 1](focus/m2/gen1) | `` | +| [Gigabyte B550](gigabyte/b550) | `` | [GPD MicroPC](gpd/micropc) | `` | | [GPD P2 Max](gpd/p2-max) | `` | | [GPD Pocket 3](gpd/pocket-3) | `` | diff --git a/gigabyte/b550/README.md b/gigabyte/b550/README.md new file mode 100644 index 00000000..e8ccf531 --- /dev/null +++ b/gigabyte/b550/README.md @@ -0,0 +1,47 @@ +# B550 suspend bug + +Gigabyte B550-family motherboards have a hard to diagnose (At least, from the system log events) suspend bug. + +As of the F18 bios for the b550m-d3sh (My machine), released in 2024-02-27, this is still unfixed by the manufacurer and has been for over 4 years. + +Symptoms: +- Suspend PC +- It goes into suspend, then seems to boot and hang. Sometimes it suspends successfully, but waking it from suspend puts it in the "zombie" state. +- By playing chicken with volatile storage and flicking the power switch on the back of power supply, you can sometimes get it to wake from suspend as the card un-powers before volatile storage does. + +Fix: disable GPP0 and GPP8 (And, for some cards, potentially PTXH, I can't test) in /proc/acpi/wakeup + - To do this permanently, a systemd service is provided + + +## This affects at least: +- Gigabyte b550m-d3sh (my machine) +- Gigabyte B550i AORUS Pro Ax https://www.reddit.com/r/gigabyte/comments/p5ewjn/b550i_pro_ax_f13_bios_sleep_issue_on_linux/ +- Gigabyte B550 Vision D https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/hb32elw/ +- Gigabyte B550 Aorus Pro https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/ijsx8ia/ +- Gigabyte B550 Aorus Pro AC https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/j6cbnwq/ +- Gigabyte B550 Aorus Pro v2 https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/imx7sz0/ + - B550 Aorus Pro may need GPP0 and PTXH instead of GPP8, I don't have hardware to test +- Gigabyte B550 Aurus Elite v2 https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/k2psbgu/ +- Gigabyte B550m pro https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/huocd81/ +- Gigabyte B550m Aorus Elite https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/hzngaa7/ +- Gigabyte B550 Gaming X v2 https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/hvojl44/ +- Gigabyte B550 Aorus Master v1.0 https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/j1alpxk/ + +### Anecdotes of other boards: +- Gigabyte A520M https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/i57jpjw/ + + + +## Shoutouts: +- thanks to [/u/dustythermals's reddit comment](https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/hb32elw/) for the systemd service blueprint +- thanks to help from [@ToxicFrog](https://github.com/ToxicFrog) for advice on making it not toggle when `nixos-rebuild switch` is ran +- thanks to [/u/Demotay's reddit comment](https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/ksbm0mb/) for how to make it check and only fire if these are enabled +- Huge thanks to /u/theHugePotato who found the [root cause](https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/h9plj88/) and put it where everyone could find + +## Breadcrumbs: +https://www.reddit.com/r/gigabyte/comments/p5ewjn/b550i_pro_ax_f13_bios_sleep_issue_on_linux/ + +https://www.reddit.com/r/archlinux/comments/11urtla/systemctl_suspend_hibernate_and_hybridsleep_all/ + +https://forum.manjaro.org/t/system-do-not-wake-up-after-suspend/76681/2 + diff --git a/gigabyte/b550/b550-fix-suspend.nix b/gigabyte/b550/b550-fix-suspend.nix new file mode 100644 index 00000000..0e922a85 --- /dev/null +++ b/gigabyte/b550/b550-fix-suspend.nix @@ -0,0 +1,35 @@ +{ pkgs, lib, ... } : + +{ + systemd.services.bugfixSuspend-GPP0 = { + enable = lib.mkDefault true; + description = "Fix crash on wakeup from suspend/hibernate (b550 bugfix)"; + unitConfig = { + Type = "oneshot"; + }; + serviceConfig = { + User = "root"; # root may not be necessary + # check for gppN, disable if enabled + # lifted from https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/ksbm0mb/ /u/Demotay + ExecStart = "-${pkgs.bash}/bin/bash -c 'if grep 'GPP0' /proc/acpi/wakeup | grep -q 'enabled'; then echo 'GPP0' > /proc/acpi/wakeup; fi'"; + RemainAfterExit = "yes"; # required to not toggle when `nixos-rebuild switch` is ran + + }; + wantedBy = ["multi-user.target"]; + }; + + systemd.services.bugfixSuspend-GPP8 = { + enable = lib.mkDefault true; + description = "Fix crash on wakeup from suspend/hibernate (b550 bugfix)"; + unitConfig = { + Type = "oneshot"; + }; + serviceConfig = { + User = "root"; + ExecStart = "-${pkgs.bash}/bin/bash -c 'if grep 'GPP8' /proc/acpi/wakeup | grep -q 'enabled'; then echo 'GPP8' > /proc/acpi/wakeup; fi''"; + RemainAfterExit = "yes"; + }; + wantedBy = ["multi-user.target"]; + }; + +} diff --git a/gigabyte/b550/default.nix b/gigabyte/b550/default.nix new file mode 100644 index 00000000..6935d991 --- /dev/null +++ b/gigabyte/b550/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./b550-fix-suspend.nix + ]; +} From 823a82200c5367f14c56649315c27749153b88e8 Mon Sep 17 00:00:00 2001 From: Matei Dibu Date: Mon, 25 Mar 2024 12:24:34 +0200 Subject: [PATCH 0762/1476] common/cpu/intel/comet-lake: init --- common/cpu/intel/comet-lake/default.nix | 7 +++++++ flake.nix | 1 + 2 files changed, 8 insertions(+) create mode 100644 common/cpu/intel/comet-lake/default.nix diff --git a/common/cpu/intel/comet-lake/default.nix b/common/cpu/intel/comet-lake/default.nix new file mode 100644 index 00000000..f5dd5ad6 --- /dev/null +++ b/common/cpu/intel/comet-lake/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ ../. ]; + + boot.kernelParams = [ + "i915.enable_guc=2" + ]; +} diff --git a/flake.nix b/flake.nix index a28d7170..fa7fe0b2 100644 --- a/flake.nix +++ b/flake.nix @@ -229,6 +229,7 @@ common-cpu-amd-pstate = import ./common/cpu/amd/pstate.nix; common-cpu-amd-raphael-igpu = import ./common/cpu/amd/raphael/igpu.nix; common-cpu-intel = import ./common/cpu/intel; + common-cpu-intel-comet-lake = import ./common/cpu/intel/comet-lake; common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix; common-cpu-intel-kaby-lake = import ./common/cpu/intel/kaby-lake; common-cpu-intel-sandy-bridge = import ./common/cpu/intel/sandy-bridge; From adcd458b558915b80f628db7f88450f5f51ebf17 Mon Sep 17 00:00:00 2001 From: Matei Dibu Date: Mon, 25 Mar 2024 12:30:23 +0200 Subject: [PATCH 0763/1476] protectli/vp4670: init --- README.md | 1 + flake.nix | 1 + protectli/vp4670/default.nix | 9 +++++++++ 3 files changed, 11 insertions(+) create mode 100644 protectli/vp4670/default.nix diff --git a/README.md b/README.md index f4e22b74..9efe12ec 100644 --- a/README.md +++ b/README.md @@ -266,6 +266,7 @@ See code for all available configurations. | [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | | [PINE64 RockPro64](pine64/rockpro64/) | `` | | [PINE64 STAR64](pine64/star64/) | `` | +| [Protectli VP4670](protectli/vp4670/) | `` | | [Purism Librem 13v3](purism/librem/13v3) | `` | | [Purism Librem 15v3](purism/librem/13v3) | `` | | [Purism Librem 5r4](purism/librem/5r4) | `` | diff --git a/flake.nix b/flake.nix index fa7fe0b2..c3a9718d 100644 --- a/flake.nix +++ b/flake.nix @@ -204,6 +204,7 @@ pine64-pinebook-pro = import ./pine64/pinebook-pro; pine64-rockpro64 = import ./pine64/rockpro64; pine64-star64 = import ./pine64/star64; + protectli-vp4670 = import ./protectli/vp4670; purism-librem-13v3 = import ./purism/librem/13v3; purism-librem-15v3 = import ./purism/librem/15v3; purism-librem-5r4 = import ./purism/librem/5r4; diff --git a/protectli/vp4670/default.nix b/protectli/vp4670/default.nix new file mode 100644 index 00000000..c3fa0366 --- /dev/null +++ b/protectli/vp4670/default.nix @@ -0,0 +1,9 @@ +{ + imports = [ + ../../common/cpu/intel/comet-lake + ]; + + boot.initrd.kernelModules = [ + "sdhci_pci" # 16G eMMC on board + ]; +} From cac934beb389a967dcb95a98da8f2186cbbe179a Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Fri, 5 Apr 2024 15:30:34 +0200 Subject: [PATCH 0764/1476] fix(pine64/star64): resolve conflicting definition for Linux 5.15 Signed-off-by: Raito Bezarius --- pine64/star64/linux-5.15.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pine64/star64/linux-5.15.nix b/pine64/star64/linux-5.15.nix index f26afa27..020af357 100644 --- a/pine64/star64/linux-5.15.nix +++ b/pine64/star64/linux-5.15.nix @@ -55,7 +55,7 @@ let # brute force disable drm CEC_CORE = no; CEC_NOTIFIER = no; - DRM = no; + DRM = lib.mkForce no; DRM_MIPI_DBI = no; DRM_MIPI_DSI = no; DRM_DP_AUX_BUS = no; From f4a07223a336f966eb6546b42eadfd288c4c5e2e Mon Sep 17 00:00:00 2001 From: Steven Keuchel Date: Sun, 31 Mar 2024 01:45:46 +0100 Subject: [PATCH 0765/1476] milkv/pioneer: init --- flake.nix | 1 + milkv/pioneer/README.md | 50 ++++++++++++++++++++ milkv/pioneer/default.nix | 28 +++++++++++ milkv/pioneer/fip.nix | 7 +++ milkv/pioneer/firmware.nix | 46 ++++++++++++++++++ milkv/pioneer/linux.nix | 44 +++++++++++++++++ milkv/pioneer/linuxboot-initrd.nix | 54 +++++++++++++++++++++ milkv/pioneer/linuxboot-kernel.nix | 15 ++++++ milkv/pioneer/opensbi.nix | 22 +++++++++ milkv/pioneer/sd-image-installer.nix | 12 +++++ milkv/pioneer/sd-image.nix | 57 +++++++++++++++++++++++ milkv/pioneer/zsbl-increase-timeout.patch | 15 ++++++ milkv/pioneer/zsbl.nix | 51 ++++++++++++++++++++ 13 files changed, 402 insertions(+) create mode 100644 milkv/pioneer/README.md create mode 100644 milkv/pioneer/default.nix create mode 100644 milkv/pioneer/fip.nix create mode 100644 milkv/pioneer/firmware.nix create mode 100644 milkv/pioneer/linux.nix create mode 100644 milkv/pioneer/linuxboot-initrd.nix create mode 100644 milkv/pioneer/linuxboot-kernel.nix create mode 100644 milkv/pioneer/opensbi.nix create mode 100644 milkv/pioneer/sd-image-installer.nix create mode 100644 milkv/pioneer/sd-image.nix create mode 100644 milkv/pioneer/zsbl-increase-timeout.patch create mode 100644 milkv/pioneer/zsbl.nix diff --git a/flake.nix b/flake.nix index c3a9718d..01d0b657 100644 --- a/flake.nix +++ b/flake.nix @@ -184,6 +184,7 @@ microsoft-surface-laptop-amd = import ./microsoft/surface/surface-laptop-amd; microsoft-surface-common = import ./microsoft/surface/common; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; + milkv-pioneer = import ./milkv/pioneer; morefine-m600 = import ./morefine/m600; msi-b350-tomahawk = import ./msi/b350-tomahawk; msi-b550-a-pro = import ./msi/b550-a-pro; diff --git a/milkv/pioneer/README.md b/milkv/pioneer/README.md new file mode 100644 index 00000000..625c9994 --- /dev/null +++ b/milkv/pioneer/README.md @@ -0,0 +1,50 @@ +# Creating an installation SD card image + +Create and customize a `flake.nix` file: + +```nix +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixos-hardware.url = "github:nixos/nixos-hardware"; + }; + + outputs = { nixpkgs, nixos-hardware, ... }: + let + supportedSystems = [ + "x86_64-linux" + "aarch64-linux" + "riscv64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + forAllSupportedSystems = nixpkgs.lib.genAttrs supportedSystems; + in + { + packages = forAllSupportedSystems (system: rec { + default = sd-image; + sd-image = (import "${nixpkgs}/nixos" { + configuration = { + imports = [ + "${nixos-hardware}/milkv/pioneer/sd-image-installer.nix" + ]; + + nixpkgs.buildPlatform.system = system; + nixpkgs.hostPlatform.system = "riscv64-linux"; + + system.stateVersion = "24.05"; + }; + inherit system; + }).config.system.build.sdImage; + }); + }; +} +``` + +Then build the image by running `nix build .#` in the same folder. + +# Known issues + +LinuxBoot will not output the boot menu on the serial console, only on the graphical console. +Unfortuately, it might also pick up boot options from other devices, e.g. an nvme or sata drive. +It might end up booting by default from those instead of booting from the SD card. diff --git a/milkv/pioneer/default.nix b/milkv/pioneer/default.nix new file mode 100644 index 00000000..aaf685a7 --- /dev/null +++ b/milkv/pioneer/default.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: + +{ + boot = { + consoleLogLevel = lib.mkDefault 7; + initrd = { + availableKernelModules = [ + "amdgpu" + "radeon" + "mmc_block" + "sdhci_sophgo" + ]; + }; + kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./linux.nix { + inherit (config.boot) kernelPatches; + }); + kernelParams = lib.mkDefault [ + "earlycon" + "console=ttyS0,115200" + "console=tty1" + ]; + }; + + hardware.deviceTree = { + enable = true; + name = lib.mkDefault "sophgo/mango-milkv-pioneer.dtb"; + }; +} diff --git a/milkv/pioneer/fip.nix b/milkv/pioneer/fip.nix new file mode 100644 index 00000000..d4fb2a64 --- /dev/null +++ b/milkv/pioneer/fip.nix @@ -0,0 +1,7 @@ +{ fetchurl, ... }: + +# Download the vendor's Firmware Image Package +fetchurl { + url = "https://github.com/sophgo/bootloader-riscv/raw/3f750677e0249ff549ad3fe20bbc800998503539/firmware/fip.bin"; + hash = "sha256-rav00Ok6+FU77lI0piQPHCaz7Tw1RSbyUal4PyeSccg="; +} diff --git a/milkv/pioneer/firmware.nix b/milkv/pioneer/firmware.nix new file mode 100644 index 00000000..fb49962b --- /dev/null +++ b/milkv/pioneer/firmware.nix @@ -0,0 +1,46 @@ +{ stdenv +, writeText +, opensbi +, fip +, zsbl +, linuxboot-kernel +, linuxboot-initrd +, dtbs ? "${linuxboot-kernel}/dtbs" +, ... +}: + +let + # Configure a conf.init for linuxboot. If this is not found on the sdcard, + # zsbl will load it from spi flash even when booting from sd. That conf.ini + # might be configured differently and thus not properly boot from sd. + conf-ini = writeText "conf.ini" '' + [sophgo-config] + + [devicetree] + name = mango-milkv-pioneer.dtb + + [kernel] + name = riscv64_Image + + [firmware] + name = fw_dynamic.bin + + [ramfs] + name = initrd.img + + [eof] + ''; +in + +stdenv.mkDerivation { + name = "milkv-pioneer-firmware"; + buildCommand = '' + install -D ${conf-ini} $out/riscv64/conf.ini + install -D ${fip} $out/fip.bin + install -D ${zsbl} $out/zsbl.bin + install -D ${opensbi}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin $out/riscv64/ + install -D ${linuxboot-initrd}/initrd.img $out/riscv64/ + install -D ${dtbs}/sophgo/mango-milkv-pioneer.dtb $out/riscv64/ + install -D ${linuxboot-kernel}/Image $out/riscv64/riscv64_Image + ''; +} diff --git a/milkv/pioneer/linux.nix b/milkv/pioneer/linux.nix new file mode 100644 index 00000000..b2396c75 --- /dev/null +++ b/milkv/pioneer/linux.nix @@ -0,0 +1,44 @@ +{ buildLinux, fetchFromGitHub, kernelPatches, lib, ... } @ args: + +let + modDirVersion = "6.6.20"; +in +buildLinux (args // { + inherit kernelPatches modDirVersion; + version = "${modDirVersion}-milkv-pioneer"; + src = fetchFromGitHub { + owner = "sophgo"; + repo = "linux-riscv"; + rev = "caa949e3690fe8a4656313b2b56f52666fa880db"; + hash = "sha256-qJpR3KMgvP4tfPfBfQ/MiEWg/uuuxHYuACK8taKKK3E="; + }; + + defconfig = "sophgo_mango_normal_defconfig"; + structuredExtraConfig = let inherit (lib.kernel) freeform module yes; in { + # LinuxBoot will override the console bootparams which will result + # in the distro kernel to be booted with e.g. console=tty1 only. + # https://github.com/sophgo/bootloader-riscv/issues/71 + # Force output on serial console through the config. This is also + # needed to get the forced serial-getty to be started. + # We also list tty1 again because according to + # https://docs.kernel.org/admin-guide/serial-console.html and + # https://0pointer.de/blog/projects/serial-console.html + # this will be the main console. + CMDLINE = freeform "console=ttyS0,115200 console=tty1"; + CMDLINE_EXTEND = yes; + + # Enable these explicitly because they are not enabled by the defconfig. + # The all-hardware profile expects these to be built. + VIRTIO_MENU = yes; + VIRTIO_PCI = module; + + # There is an i2c mcu driver (drivers/soc/sophgo/umcu) which is always + # compiled into the kernel. Hence some of the i2c support also needs to + # be compiled in instead of being compiled as a module. + I2C = yes; + I2C_CHARDEV = yes; + I2C_DESIGNWARE_PLATFORM = yes; + }; + + extraMeta.branch = "sg2042-dev-6.6"; +} // (args.argsOverride or { })) diff --git a/milkv/pioneer/linuxboot-initrd.nix b/milkv/pioneer/linuxboot-initrd.nix new file mode 100644 index 00000000..ee0ef7bb --- /dev/null +++ b/milkv/pioneer/linuxboot-initrd.nix @@ -0,0 +1,54 @@ +{ buildGoModule +, fetchFromGitHub +, fetchpatch +, linux-firmware +, ... +}: + +# Based on +# https://github.com/sophgo/bootloader-riscv/blob/e0839852d571df106db622611f4786ae17e8df0f/scripts/envsetup.sh#L809-L819 + +buildGoModule rec { + pname = "u-root"; + version = "0.14.0"; + src = fetchFromGitHub { + owner = "u-root"; + repo = "u-root"; + rev = "v${version}"; + hash = "sha256-8zA3pHf45MdUcq/MA/mf0KCTxB1viHieU/oigYwIPgo="; + }; + vendorHash = null; + patches = [ + ( + fetchpatch { + url = "https://github.com/sophgo/bootloader-riscv/commit/322c3305763872a9b88a1c85d79bca63b8fbe7a6.patch"; + hash = "sha256-l5r3DbcMqRYD5FhRBqtEIEscZAdDvjmQJE4BIAtWYWE="; + stripLen = 1; + } + ) + ]; + + # We only build the u-root binary in the build phase and the initrd in the + # postBuild hook. + subPackages = [ "." ]; + postBuild = '' + GOROOT="$(go env GOROOT)" $GOPATH/bin/u-root \ + -build bb \ + -uinitcmd=boot \ + -files "${linux-firmware}/lib/firmware/amdgpu/:lib/firmware/amdgpu/" \ + -files "${linux-firmware}/lib/firmware/radeon/:lib/firmware/radeon/" \ + -o initramfs.cpio \ + core boot + + # The vendor does not compress the initrd. We do since we include more + # firmware files. CRC32 is required by the kernel's decompressor. + xz --check=crc32 initramfs.cpio + ''; + + installPhase = '' + install -D initramfs.cpio.xz $out/initrd.img + ''; + + # Tests time out after 10min for native riscv64 builds on the pioneer. + doCheck = false; +} diff --git a/milkv/pioneer/linuxboot-kernel.nix b/milkv/pioneer/linuxboot-kernel.nix new file mode 100644 index 00000000..5f8fd815 --- /dev/null +++ b/milkv/pioneer/linuxboot-kernel.nix @@ -0,0 +1,15 @@ +{ fetchFromGitHub, lib, linuxManualConfig, stdenv, ... }: + +linuxManualConfig rec { + inherit lib stdenv; + modDirVersion = "6.6.20"; + version = "${modDirVersion}-milkv-pioneer"; + src = fetchFromGitHub { + owner = "sophgo"; + repo = "linux-riscv"; + rev = "caa949e3690fe8a4656313b2b56f52666fa880db"; + hash = "sha256-qJpR3KMgvP4tfPfBfQ/MiEWg/uuuxHYuACK8taKKK3E="; + }; + configfile = "${src}/arch/riscv/configs/sophgo_mango_normal_defconfig"; + extraMeta.branch = "sg2042-dev-6.6"; +} diff --git a/milkv/pioneer/opensbi.nix b/milkv/pioneer/opensbi.nix new file mode 100644 index 00000000..5d77a7bd --- /dev/null +++ b/milkv/pioneer/opensbi.nix @@ -0,0 +1,22 @@ +{ fetchFromGitHub, opensbi, ... }: + +opensbi.overrideAttrs (attrs: { + # Based on the vendor's sg2042-master branch. + version = "1.4-git-a6e158f7"; + src = fetchFromGitHub { + owner = "sophgo"; + repo = "opensbi"; + rev = "a6e158f71aab17155e2bf25a325ce4f0be51d9dd"; + hash = "sha256-5ggrEx1e53pB2+m0TBjDzDJXf2wjsQ2edu01FqqGt/Y="; + }; + + makeFlags = + # Based on the vendor options + # https://github.com/sophgo/bootloader-riscv/blob/01dc52ce10e7cf489c93e4f24b6bfe1bf6e55919/scripts/envsetup.sh#L299 + attrs.makeFlags ++ [ + "PLATFORM=generic" + "FW_PIC=y" + "BUILD_INFO=y" + "DEBUG=1" + ]; +}) diff --git a/milkv/pioneer/sd-image-installer.nix b/milkv/pioneer/sd-image-installer.nix new file mode 100644 index 00000000..1b900b04 --- /dev/null +++ b/milkv/pioneer/sd-image-installer.nix @@ -0,0 +1,12 @@ +{ modulesPath, ... }: + +{ + imports = [ + "${modulesPath}/profiles/installation-device.nix" + ./sd-image.nix + ]; + + # the installation media is also the installation target, + # so we don't want to provide the installation configuration.nix. + installer.cloneConfig = false; +} diff --git a/milkv/pioneer/sd-image.nix b/milkv/pioneer/sd-image.nix new file mode 100644 index 00000000..eaa378c4 --- /dev/null +++ b/milkv/pioneer/sd-image.nix @@ -0,0 +1,57 @@ +{ config, lib, modulesPath, pkgs, ... }: + +let + inherit (pkgs) callPackage; + + fip = callPackage ./fip.nix { }; + zsbl = callPackage ./zsbl.nix { }; + opensbi = callPackage ./opensbi.nix { }; + linuxboot-kernel = callPackage ./linuxboot-kernel.nix { }; + linuxboot-initrd = callPackage ./linuxboot-initrd.nix { }; + dtbs = config.hardware.deviceTree.package; + firmware = callPackage ./firmware.nix { + inherit fip zsbl opensbi linuxboot-kernel linuxboot-initrd dtbs; + }; +in +{ + imports = [ + "${modulesPath}/profiles/base.nix" + "${modulesPath}/installer/sd-card/sd-image.nix" + ./default.nix + ]; + + boot.loader = { + grub.enable = lib.mkDefault false; + generic-extlinux-compatible.enable = lib.mkDefault true; + }; + + hardware.enableRedistributableFirmware = true; + + # For some reason the serial getty is not started automatically + # even though console=ttyS0,115200 is passed to the kernel. + # https://docs.kernel.org/admin-guide/serial-console.html + # https://github.com/NixOS/nixpkgs/issues/84105 + systemd.services."serial-getty@ttyS0" = { + enable = true; + wantedBy = [ "getty.target" ]; + serviceConfig.Restart = "always"; + }; + + sdImage = { + imageName = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}-milkv-pioneer.img"; + + populateFirmwareCommands = '' + mkdir -p firmware/ + cp -a ${firmware}/* firmware/ + touch firmware/BOOT + ''; + + firmwarePartitionOffset = 1; + firmwareSize = 128; + + populateRootCommands = '' + mkdir -p ./files/boot + ${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d ./files/boot + ''; + }; +} diff --git a/milkv/pioneer/zsbl-increase-timeout.patch b/milkv/pioneer/zsbl-increase-timeout.patch new file mode 100644 index 00000000..b1853f93 --- /dev/null +++ b/milkv/pioneer/zsbl-increase-timeout.patch @@ -0,0 +1,15 @@ +--- a/drivers/sd/sd.c ++++ b/drivers/sd/sd.c +@@ -560,11 +560,11 @@ static int bm_sd_read(int lba, uintptr_t buf, size_t size) + } else { + udelay(1); + timeout++; + } + +- if (timeout >= 10000) { ++ if (timeout >= 100000) { + printf("sdhci read data timeout\n"); + goto timeout; + } + } + diff --git a/milkv/pioneer/zsbl.nix b/milkv/pioneer/zsbl.nix new file mode 100644 index 00000000..a275d301 --- /dev/null +++ b/milkv/pioneer/zsbl.nix @@ -0,0 +1,51 @@ +{ buildPackages +, bison +, fetchFromGitHub +, flex +, lib +, stdenv + +, ... +}: +stdenv.mkDerivation rec { + pname = "zsbl-sg2042"; + version = "git-cc806273"; + src = fetchFromGitHub { + owner = "sophgo"; + repo = "zsbl"; + rev = "cc806273e0f679bef2f6b017c68adede1594ad31"; + hash = "sha256-zOlBM7mwz8FUM/BlzOxJmpI8LI/KcFOGXegvgiilbaM="; + }; + + patches = [ + # Depending on the sdcard, reading larger initrds (say >= 25MB) + # can hit the timeout. + ./zsbl-increase-timeout.patch + ]; + + nativeBuildInputs = [ + bison + flex + ]; + depsBuildBuild = [ + buildPackages.stdenv.cc + ]; + hardeningDisable = [ + "fortify" + "stackprotector" + ]; + + makeFlags = [ + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" + ]; + configurePhase = "make sg2042_defconfig"; + installPhase = "install -D zsbl.bin $out"; + enableParallelBuilding = true; + dontStrip = true; + + meta = { + homepage = "https://github.com/sophgo/zsbl"; + description = "Sophgo RISC-V Zero Stage Boot Loader"; + license = lib.licenses.gpl2; + }; +} From e1cbffcf3a8b243fd6be880854fcd0169cd4165e Mon Sep 17 00:00:00 2001 From: deirn Date: Thu, 28 Mar 2024 00:20:41 +0700 Subject: [PATCH 0766/1476] ga401: use mkDefault for dynamicBoost --- asus/zephyrus/ga401/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asus/zephyrus/ga401/default.nix b/asus/zephyrus/ga401/default.nix index 726f58e5..ef24a4ca 100644 --- a/asus/zephyrus/ga401/default.nix +++ b/asus/zephyrus/ga401/default.nix @@ -15,7 +15,7 @@ # This will also cause "PCI-Express Runtime D3 Power Management" to be enabled by default modesetting.enable = lib.mkDefault true; - dynamicBoost.enable = true; + dynamicBoost.enable = lib.mkDefault true; prime = { amdgpuBusId = "PCI:4:0:0"; From a3746a14c1240b57b2d08b99c796a1775ebffdf5 Mon Sep 17 00:00:00 2001 From: Benedikt Ritter Date: Tue, 26 Mar 2024 22:45:41 +0100 Subject: [PATCH 0767/1476] feat: add dell latitude 7280 module --- README.md | 1 + dell/latitude/7280/default.nix | 9 +++++++++ flake.nix | 1 + 3 files changed, 11 insertions(+) create mode 100644 dell/latitude/7280/default.nix diff --git a/README.md b/README.md index 9efe12ec..f2d4ba6f 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,7 @@ See code for all available configurations. | [Dell Latitude 3340](dell/latitude/3340) | `` | | [Dell Latitude 3480](dell/latitude/3480) | `` | | [Dell Latitude 5520](dell/latitude/5520) | `` | +| [Dell Latitude 7280](dell/latitude/7280) | `` | | [Dell Latitude 7390](dell/latitude/7390) | `` | | [Dell Latitude 7430](dell/latitude/7430) | `` | | [Dell Latitude 7490](dell/latitude/7490) | `` | diff --git a/dell/latitude/7280/default.nix b/dell/latitude/7280/default.nix new file mode 100644 index 00000000..3b57a289 --- /dev/null +++ b/dell/latitude/7280/default.nix @@ -0,0 +1,9 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; +} diff --git a/flake.nix b/flake.nix index c3a9718d..0182671a 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,7 @@ dell-latitude-3340 = import ./dell/latitude/3340; dell-latitude-3480 = import ./dell/latitude/3480; dell-latitude-5520 = import ./dell/latitude/5520; + dell-latitude-7280 = import ./dell/latitude/7280; dell-latitude-7390 = import ./dell/latitude/7390; dell-latitude-7430 = import ./dell/latitude/7430; dell-latitude-7490 = import ./dell/latitude/7490; From a7825c5b9a9c69dddd1904789ebbe413c5b6bf15 Mon Sep 17 00:00:00 2001 From: yuannan Date: Sun, 10 Mar 2024 19:42:41 +0000 Subject: [PATCH 0768/1476] 15ach6h --- lenovo/legion/15ach6h/README.md | 30 +++++++++++++++++++ lenovo/legion/15ach6h/default.nix | 11 +++++++ lenovo/legion/15ach6h/edid/16ach6h.bin | Bin 0 -> 384 bytes lenovo/legion/15ach6h/edid/default.nix | 17 +++++++++++ lenovo/legion/15ach6h/hybrid/default.nix | 36 +++++++++++++++++++++++ lenovo/legion/15ach6h/nvidia/default.nix | 26 ++++++++++++++++ 6 files changed, 120 insertions(+) create mode 100644 lenovo/legion/15ach6h/README.md create mode 100644 lenovo/legion/15ach6h/default.nix create mode 100644 lenovo/legion/15ach6h/edid/16ach6h.bin create mode 100644 lenovo/legion/15ach6h/edid/default.nix create mode 100644 lenovo/legion/15ach6h/hybrid/default.nix create mode 100644 lenovo/legion/15ach6h/nvidia/default.nix diff --git a/lenovo/legion/15ach6h/README.md b/lenovo/legion/15ach6h/README.md new file mode 100644 index 00000000..19f6c247 --- /dev/null +++ b/lenovo/legion/15ach6h/README.md @@ -0,0 +1,30 @@ +## Introduction +Due to the introduction of DDG feature, you may toggle DDG frequently, so for the default settings of this laptop, we use "specialization" feature of Nix so that you can easily select the required graphics card driver in the startup menu. +**But It will slow down NixOS evaluation by factor 2 and increase memory usage.** +So if you don't need specialization feature, you can just use hybrid only configuration or nvidia only (DDG only) configuration + +## Using multiple drives with this configuration + +When using more than one drive, the value of `hardware.nvidia.prime.amdgpuBusId` will change from the default of `PCI:5:0:0`. + +Make sure you override this default in your personal configuration. For two drives, it should be `PCI:6:0:0`. + +## Setup at the time of testing +``` +$ nix-info -m + - system: `"x86_64-linux"` + - host os: `Linux 6.0.9, NixOS, 22.11 (Raccoon), 22.11beta19.c9538a9b707` + - multi-user?: `yes` + - sandbox: `yes` + - version: `nix-env (Nix) 2.11.0` + - channels(root): `"nixos-22.11"` + - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos` + ``` + ``` + $ lspci +... +01:00.0 VGA compatible controller: NVIDIA Corporation GA104M [GeForce RTX 3070 Mobile / Max-Q] (rev a1) +... +06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne (rev c5) +... +``` \ No newline at end of file diff --git a/lenovo/legion/15ach6h/default.nix b/lenovo/legion/15ach6h/default.nix new file mode 100644 index 00000000..fcd57468 --- /dev/null +++ b/lenovo/legion/15ach6h/default.nix @@ -0,0 +1,11 @@ +{ ... }: + +{ + imports = [ ./hybrid ]; + + specialisation.ddg.configuration = { + # This specialisation is for the case where "DDG" (Dual-Direct GFX, A hardware feature that can enable in bios) is enabled, since the amd igpu is blocked at hardware level and the built-in display is directly connected to the dgpu, we no longer need the amdgpu and prime configuration. + system.nixos.tags = [ "Dual-Direct-GFX-Mode" ]; + imports = [ ./nvidia ]; + }; +} diff --git a/lenovo/legion/15ach6h/edid/16ach6h.bin b/lenovo/legion/15ach6h/edid/16ach6h.bin new file mode 100644 index 0000000000000000000000000000000000000000..87256135d9cf7597594d013d06d1814148d2f91e GIT binary patch literal 384 zcmZSh4+ac;`3zzVARx!cvQ6OBq Date: Sun, 10 Mar 2024 19:50:23 +0000 Subject: [PATCH 0769/1476] removed edid --- lenovo/legion/15ach6h/edid/16ach6h.bin | Bin 384 -> 0 bytes lenovo/legion/15ach6h/edid/default.nix | 17 ----------------- lenovo/legion/15ach6h/hybrid/default.nix | 1 - 3 files changed, 18 deletions(-) delete mode 100644 lenovo/legion/15ach6h/edid/16ach6h.bin delete mode 100644 lenovo/legion/15ach6h/edid/default.nix diff --git a/lenovo/legion/15ach6h/edid/16ach6h.bin b/lenovo/legion/15ach6h/edid/16ach6h.bin deleted file mode 100644 index 87256135d9cf7597594d013d06d1814148d2f91e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 384 zcmZSh4+ac;`3zzVARx!cvQ6OBq Date: Fri, 29 Mar 2024 03:27:09 +0100 Subject: [PATCH 0770/1476] surface: linux 6.6.13 -> 6.6.25 --- 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 82b0f0c2..7d59f627 100644 --- a/microsoft/surface/common/kernel/linux-6.6.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.6.x/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.6.13"; + version = "6.6.25"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "sha256-iLiefdQerU46seQRyLuNWSV1rPgVzx3zwNxX4uiCwLw="; + sha256 = "0i0zvqlj02rm6wpbidji0rn9559vrpfc1b8gbfjk70lhhyz11llr"; ignoreConfigErrors=true; }; From 218ab789fdabbed9a755539b1520a9c628e153ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 7 Apr 2024 17:42:03 +0000 Subject: [PATCH 0771/1476] milkv/pioneer: fix u-root cross-compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörg Thalheim --- milkv/pioneer/linuxboot-initrd.nix | 77 +++++++++++++++++++----------- 1 file changed, 48 insertions(+), 29 deletions(-) diff --git a/milkv/pioneer/linuxboot-initrd.nix b/milkv/pioneer/linuxboot-initrd.nix index ee0ef7bb..507fc0e3 100644 --- a/milkv/pioneer/linuxboot-initrd.nix +++ b/milkv/pioneer/linuxboot-initrd.nix @@ -1,54 +1,73 @@ -{ buildGoModule +{ buildPackages , fetchFromGitHub , fetchpatch , linux-firmware +, buildGoModule , ... }: # Based on # https://github.com/sophgo/bootloader-riscv/blob/e0839852d571df106db622611f4786ae17e8df0f/scripts/envsetup.sh#L809-L819 - -buildGoModule rec { - pname = "u-root"; - version = "0.14.0"; - src = fetchFromGitHub { - owner = "u-root"; - repo = "u-root"; - rev = "v${version}"; - hash = "sha256-8zA3pHf45MdUcq/MA/mf0KCTxB1viHieU/oigYwIPgo="; - }; - vendorHash = null; - patches = [ - ( - fetchpatch { +let + u-root = buildPackages.buildGoModule rec { + pname = "u-root"; + version = "0.14.0"; + src = fetchFromGitHub { + owner = "u-root"; + repo = "u-root"; + rev = "v${version}"; + hash = "sha256-8zA3pHf45MdUcq/MA/mf0KCTxB1viHieU/oigYwIPgo="; + }; + vendorHash = null; + patches = [ + (fetchpatch { url = "https://github.com/sophgo/bootloader-riscv/commit/322c3305763872a9b88a1c85d79bca63b8fbe7a6.patch"; hash = "sha256-l5r3DbcMqRYD5FhRBqtEIEscZAdDvjmQJE4BIAtWYWE="; stripLen = 1; - } - ) - ]; + }) + ]; - # We only build the u-root binary in the build phase and the initrd in the - # postBuild hook. - subPackages = [ "." ]; - postBuild = '' - GOROOT="$(go env GOROOT)" $GOPATH/bin/u-root \ + postInstall = '' + cp -r . $out/src + ''; + + # We only build the u-root binary in the build phase and the initrd in the + # postBuild hook. + subPackages = [ "." ]; + + # Tests time out after 10min for native riscv64 builds on the pioneer. + doCheck = false; + }; +in +buildGoModule { + name = "linuxboot-initrd"; + src = null; + vendorHash = null; + dontUnpack = true; + nativeBuildInputs = [ u-root ]; + + buildPhase = '' + runHook preBuild + pushd ${u-root}/src + mkdir -p $out + GOROOT="$(go env GOROOT)" u-root \ -build bb \ -uinitcmd=boot \ -files "${linux-firmware}/lib/firmware/amdgpu/:lib/firmware/amdgpu/" \ -files "${linux-firmware}/lib/firmware/radeon/:lib/firmware/radeon/" \ - -o initramfs.cpio \ + -o $out/initramfs.cpio \ core boot + popd # The vendor does not compress the initrd. We do since we include more # firmware files. CRC32 is required by the kernel's decompressor. - xz --check=crc32 initramfs.cpio + xz --check=crc32 $out/initramfs.cpio + runHook postBuild ''; installPhase = '' - install -D initramfs.cpio.xz $out/initrd.img + runHook preInstall + mv $out/initramfs.cpio.xz $out/initrd.img + runHook postInstall ''; - - # Tests time out after 10min for native riscv64 builds on the pioneer. - doCheck = false; } From 805adee81c82efbe50cac7398c4de05769488ed9 Mon Sep 17 00:00:00 2001 From: Andre <10094408+8bitbuddhist@users.noreply.github.com> Date: Wed, 10 Apr 2024 04:52:19 -0400 Subject: [PATCH 0772/1476] Add Lenovo legion 16ARHA7 (#906) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- README.md | 3 +- flake.nix | 1 + lenovo/legion/16arha7/README.md | 15 ++++++++ .../audio/lenovo-16ARHA7_speaker-fix.nix | 38 +++++++++++++++++++ .../audio/lenovo_16ARHA7_sound_fix.patch | 33 ++++++++++++++++ lenovo/legion/16arha7/default.nix | 21 ++++++++++ 6 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 lenovo/legion/16arha7/README.md create mode 100644 lenovo/legion/16arha7/audio/lenovo-16ARHA7_speaker-fix.nix create mode 100644 lenovo/legion/16arha7/audio/lenovo_16ARHA7_sound_fix.patch create mode 100644 lenovo/legion/16arha7/default.nix diff --git a/README.md b/README.md index f2d4ba6f..69eb1264 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ See code for all available configurations. | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | | [Focus M2 Gen 1](focus/m2/gen1) | `` | -| [Gigabyte B550](gigabyte/b550) | `` +| [Gigabyte B550](gigabyte/b550) | `` | | [GPD MicroPC](gpd/micropc) | `` | | [GPD P2 Max](gpd/p2-max) | `` | | [GPD Pocket 3](gpd/pocket-3) | `` | @@ -172,6 +172,7 @@ See code for all available configurations. | [Lenovo Legion 7 16achg6 (Hybrid)](lenovo/legion/16achg6/hybrid) | `` | | [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `` | | [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | +| [Lenovo Legion Slim 7 Gen 7 (AMD)](lenovo/legion/16arha7/) | `` | | [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | diff --git a/flake.nix b/flake.nix index 04acb5a3..1c39afe7 100644 --- a/flake.nix +++ b/flake.nix @@ -103,6 +103,7 @@ lenovo-legion-16achg6-hybrid = import ./lenovo/legion/16achg6/hybrid; lenovo-legion-16achg6-nvidia = import ./lenovo/legion/16achg6/nvidia; lenovo-legion-16aph8 = import ./lenovo/legion/16aph8; + lenovo-legion-16arha7 = import ./lenovo/legion/16arha7; lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h; lenovo-legion-y530-15ich = import ./lenovo/legion/15ich; diff --git a/lenovo/legion/16arha7/README.md b/lenovo/legion/16arha7/README.md new file mode 100644 index 00000000..9c8193a3 --- /dev/null +++ b/lenovo/legion/16arha7/README.md @@ -0,0 +1,15 @@ +## Introduction + +This configuration includes a fix to get audio playing over the speakers, however, the volume is low. If you know of a workaround or fix, please contribute it to the repo!! + +## Setup at the time of testing +``` +$ nix-info -m + - system: `"x86_64-linux"` + - host os: `Linux 6.8.2-zen2, NixOS, 24.05 (Uakari), 24.05.20240403.fd281bd` + - multi-user?: `yes` + - sandbox: `yes` + - version: `nix-env (Nix) 2.18.2` + - channels(root): `""` + - nixpkgs: `/home/aires/.nix-defexpr/channels/nixpkgs` + ``` diff --git a/lenovo/legion/16arha7/audio/lenovo-16ARHA7_speaker-fix.nix b/lenovo/legion/16arha7/audio/lenovo-16ARHA7_speaker-fix.nix new file mode 100644 index 00000000..3e163b6b --- /dev/null +++ b/lenovo/legion/16arha7/audio/lenovo-16ARHA7_speaker-fix.nix @@ -0,0 +1,38 @@ +# Patch sourced from https://github.com/christian-bendiksen/kernel-6.8.0-63.16ARHA7.fc40 +{ pkgs, lib, kernel ? pkgs.linuxPackages_latest.kernel }: + +pkgs.stdenv.mkDerivation { + pname = "lenovo-16ARHA7-speaker-fix-module"; + inherit (kernel) src version postPatch nativeBuildInputs; + + kernel_dev = kernel.dev; + kernelVersion = kernel.modDirVersion; + + modulePath = "sound/pci/hda/"; + + buildPhase = '' + BUILT_KERNEL=$kernel_dev/lib/modules/$kernelVersion/build + + cp $BUILT_KERNEL/Module.symvers . + cp $BUILT_KERNEL/.config . + cp $kernel_dev/vmlinux . + + make "-j$NIX_BUILD_CORES" modules_prepare + make "-j$NIX_BUILD_CORES" M=$modulePath modules + ''; + + installPhase = '' + make \ + INSTALL_MOD_PATH="$out" \ + XZ="xz -T$NIX_BUILD_CORES" \ + M="$modulePath" \ + modules_install + ''; + + patches = [ ./lenovo_16ARHA7_sound_fix.patch ]; + + meta = { + description = "Patch to get the speakers working for Lenovo Legion Slim 7 Gen 7 AMD (16ARHA7)"; + license = lib.licenses.gpl3; + }; +} \ No newline at end of file diff --git a/lenovo/legion/16arha7/audio/lenovo_16ARHA7_sound_fix.patch b/lenovo/legion/16arha7/audio/lenovo_16ARHA7_sound_fix.patch new file mode 100644 index 00000000..72565332 --- /dev/null +++ b/lenovo/legion/16arha7/audio/lenovo_16ARHA7_sound_fix.patch @@ -0,0 +1,33 @@ +diff -rupN linux-6.8-9791-ge5eb28f6d1af/sound/pci/hda/cs35l41_hda_property.c linux-6.8-9791-ge5eb28f6d1af-patched/sound/pci/hda/cs35l41_hda_property.c +--- linux-6.8-9791-ge5eb28f6d1af/sound/pci/hda/cs35l41_hda_property.c 2024-03-15 02:03:09.000000000 +0100 ++++ linux-6.8-9791-ge5eb28f6d1af-patched/sound/pci/hda/cs35l41_hda_property.c 2024-03-17 12:23:48.183404375 +0100 +@@ -115,6 +115,8 @@ static const struct cs35l41_config cs35l + { "17AA38B5", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 0, 0, 0 }, + { "17AA38B6", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 0, 0, 0 }, + { "17AA38B7", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 0, 0, 0 }, ++ { "17AA3877", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 0, 0, 0 }, ++ { "17AA3878", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 0, 0, 0 }, + {} + }; + +@@ -503,6 +505,8 @@ static const struct cs35l41_prop_model c + { "CSC3551", "17AA38B5", generic_dsd_config }, + { "CSC3551", "17AA38B6", generic_dsd_config }, + { "CSC3551", "17AA38B7", generic_dsd_config }, ++ { "CSC3551", "17AA3877", generic_dsd_config }, ++ { "CSC3551", "17AA3878", generic_dsd_config }, + {} + }; + +diff -rupN linux-6.8-9791-ge5eb28f6d1af/sound/pci/hda/patch_realtek.c linux-6.8-9791-ge5eb28f6d1af-patched/sound/pci/hda/patch_realtek.c +--- linux-6.8-9791-ge5eb28f6d1af/sound/pci/hda/patch_realtek.c 2024-03-15 02:03:09.000000000 +0100 ++++ linux-6.8-9791-ge5eb28f6d1af-patched/sound/pci/hda/patch_realtek.c 2024-03-17 12:18:22.241570472 +0100 +@@ -10263,6 +10263,8 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x17aa, 0x38b5, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2), + SND_PCI_QUIRK(0x17aa, 0x38b6, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2), + SND_PCI_QUIRK(0x17aa, 0x38b7, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2), ++ SND_PCI_QUIRK(0x17aa, 0x3877, "Legion S7 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2), ++ SND_PCI_QUIRK(0x17aa, 0x3878, "Legion S7 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2), + SND_PCI_QUIRK(0x17aa, 0x38ba, "Yoga S780-14.5 Air AMD quad YC", ALC287_FIXUP_TAS2781_I2C), + SND_PCI_QUIRK(0x17aa, 0x38bb, "Yoga S780-14.5 Air AMD quad AAC", ALC287_FIXUP_TAS2781_I2C), + SND_PCI_QUIRK(0x17aa, 0x38be, "Yoga S980-14.5 proX YC Dual", ALC287_FIXUP_TAS2781_I2C), diff --git a/lenovo/legion/16arha7/default.nix b/lenovo/legion/16arha7/default.nix new file mode 100644 index 00000000..30015e3b --- /dev/null +++ b/lenovo/legion/16arha7/default.nix @@ -0,0 +1,21 @@ +{ config, pkgs, ... }: + +let + lenovo-speaker-fix = pkgs.callPackage ./audio/lenovo-16ARHA7_speaker-fix.nix { + # Make sure the module targets the same kernel as your system is using. + inherit (config.boot.kernelPackages) kernel; + }; +in +{ + imports = [ + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + boot.extraModulePackages = [ lenovo-speaker-fix ]; + + # √(2560² + 1600²) px / 16 in ≃ 189 dpi + services.xserver.dpi = 189; +} From 79a20e2ac0dddeaf6a482a547181361f061f7955 Mon Sep 17 00:00:00 2001 From: K900 Date: Wed, 10 Apr 2024 17:05:24 +0300 Subject: [PATCH 0773/1476] common/pc: remove libinput.enable Has been default in nixpkgs for a long time now. --- common/pc/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/pc/default.nix b/common/pc/default.nix index 8864de1c..e56304bd 100644 --- a/common/pc/default.nix +++ b/common/pc/default.nix @@ -4,6 +4,4 @@ boot.blacklistedKernelModules = lib.optionals (!config.hardware.enableRedistributableFirmware) [ "ath3k" ]; - - services.xserver.libinput.enable = lib.mkDefault true; } From e1c4bac14beb8c409d0534382cf967171706b9d9 Mon Sep 17 00:00:00 2001 From: Mic92 <96200+Mic92@users.noreply.github.com> Date: Wed, 10 Apr 2024 14:40:48 +0000 Subject: [PATCH 0774/1476] Lenovo ThinkPad Z13 Gen 2 (#844) lenovo-thinkpad-z: remove HiDPI * lenovo-thinkpad-z: move z13 to gen1/z13, leave generic settings * lenovo-thinkpad-z-gen2: add z13 * Update lenovo/thinkpad/z/gen2/default.nix * Update lenovo/thinkpad/z/gen2/default.nix --- README.md | 3 +- flake.nix | 3 +- lenovo/thinkpad/z/default.nix | 5 +-- lenovo/thinkpad/z/gen1/default.nix | 8 +++++ lenovo/thinkpad/z/gen1/z13/default.nix | 5 +++ lenovo/thinkpad/z/gen2/default.nix | 44 ++++++++++++++++++++++++++ lenovo/thinkpad/z/gen2/z13/default.nix | 19 +++++++++++ lenovo/thinkpad/z/z13/default.nix | 5 --- lenovo/thinkpad/z13/default.nix | 10 ++++++ 9 files changed, 91 insertions(+), 11 deletions(-) create mode 100644 lenovo/thinkpad/z/gen1/default.nix create mode 100644 lenovo/thinkpad/z/gen1/z13/default.nix create mode 100644 lenovo/thinkpad/z/gen2/default.nix create mode 100644 lenovo/thinkpad/z/gen2/z13/default.nix delete mode 100644 lenovo/thinkpad/z/z13/default.nix create mode 100644 lenovo/thinkpad/z13/default.nix diff --git a/README.md b/README.md index 69eb1264..ed7464d9 100644 --- a/README.md +++ b/README.md @@ -238,7 +238,8 @@ See code for all available configurations. | [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | | [Lenovo ThinkPad X390](lenovo/thinkpad/x390) | `` | | [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | -| [Lenovo ThinkPad Z13](lenovo/thinkpad/z/z13) | `` | +| [Lenovo ThinkPad Z13 Gen 1](lenovo/thinkpad/z/gen1/z13) | `` | +| [Lenovo ThinkPad Z13 Gen 2](lenovo/thinkpad/z/gen2/z13) | `` | | [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | | [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/amdgpu) | `` | | [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `` | diff --git a/flake.nix b/flake.nix index 1c39afe7..31b92ef1 100644 --- a/flake.nix +++ b/flake.nix @@ -175,7 +175,8 @@ lenovo-thinkpad-x280 = import ./lenovo/thinkpad/x280; lenovo-thinkpad-x390 = import ./lenovo/thinkpad/x390; lenovo-thinkpad-z = import ./lenovo/thinkpad/z; - lenovo-thinkpad-z13 = import ./lenovo/thinkpad/z/z13; + lenovo-thinkpad-z13-gen1 = import ./lenovo/thinkpad/z/gen1/z13; + lenovo-thinkpad-z13-gen2 = import ./lenovo/thinkpad/z/gen2/z13; lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; lenovo-yoga-7-14ARH7 = import ./lenovo/yoga/7/14ARH7; lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8; diff --git a/lenovo/thinkpad/z/default.nix b/lenovo/thinkpad/z/default.nix index d37af1f8..020a1592 100644 --- a/lenovo/thinkpad/z/default.nix +++ b/lenovo/thinkpad/z/default.nix @@ -7,17 +7,14 @@ ../../../common/pc/laptop ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd - ../../../common/hidpi.nix # can be dropped after nixos 23.05 ]; - # kernel versions prior to 5.18 won't boot - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.18") (lib.mkDefault pkgs.linuxPackages_latest); hardware.enableRedistributableFirmware = lib.mkDefault true; hardware.trackpoint.device = lib.mkDefault "TPPS/2 Elan TrackPoint"; services.fprintd.enable = lib.mkDefault true; - # kernel versions below 6.0 don't contain ACPI suspend2idle drivers for the Z13s AMD hardware + # kernel versions below 6.0 don’t contain ACPI suspend2idle drivers for the Z-series’ AMD hardware # my Z13 froze after waking up from suspend/ hibernate services.logind.lidSwitch = lib.mkIf (lib.versionOlder pkgs.linux.version "6.00") (lib.mkDefault "lock"); } diff --git a/lenovo/thinkpad/z/gen1/default.nix b/lenovo/thinkpad/z/gen1/default.nix new file mode 100644 index 00000000..b51da6e8 --- /dev/null +++ b/lenovo/thinkpad/z/gen1/default.nix @@ -0,0 +1,8 @@ +{ lib, pkgs, ... }: { + imports = [ + ../../../../lenovo/thinkpad/z + ]; + + # Kernel 5.18 is required for the Ryzen 6000 series + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.18") (lib.mkDefault pkgs.linuxPackages_latest); +} diff --git a/lenovo/thinkpad/z/gen1/z13/default.nix b/lenovo/thinkpad/z/gen1/z13/default.nix new file mode 100644 index 00000000..18193c0b --- /dev/null +++ b/lenovo/thinkpad/z/gen1/z13/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../../../../../lenovo/thinkpad/z/gen1 + ]; +} diff --git a/lenovo/thinkpad/z/gen2/default.nix b/lenovo/thinkpad/z/gen2/default.nix new file mode 100644 index 00000000..cb7e05c2 --- /dev/null +++ b/lenovo/thinkpad/z/gen2/default.nix @@ -0,0 +1,44 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../../../lenovo/thinkpad/z + ]; + + # Kernel 6.4 is required for the Ryzen 7040 series + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.4") (lib.mkDefault pkgs.linuxPackages_latest); + + systemd.services = { + # Modified from Arch Wiki + "touchpad-fix" = { + enable = lib.mkDefault true; + description = "I2C HID devices can fail to initialize so try to reload"; + unitConfig = { + Type = "oneshot"; + }; + serviceConfig = { + User = "root"; + }; + wantedBy = [ "multi-user.target" ]; + after = [ "multi-user.target" ]; + script = '' + count=0 + while true; do + ${lib.getExe pkgs.libinput} list-devices | ${lib.getExe pkgs.gnugrep} --quiet SNSL && break + count=$((count + 1)) + + if test $count -ge 5; then + echo "Touchpad not read after $count attempts" + break + fi + + echo "Touchpad not ready; attempt $count to reload" + ${pkgs.kmod}/bin/rmmod i2c_hid_acpi + ${pkgs.kmod}/bin/modprobe i2c_hid_acpi + + sleep $((2 + (count * 3))) + done + ''; + }; + }; +} diff --git a/lenovo/thinkpad/z/gen2/z13/default.nix b/lenovo/thinkpad/z/gen2/z13/default.nix new file mode 100644 index 00000000..5eb6ef09 --- /dev/null +++ b/lenovo/thinkpad/z/gen2/z13/default.nix @@ -0,0 +1,19 @@ +{ pkgs, lib, ...}: + +{ + imports = [ + ../../../../../lenovo/thinkpad/z/gen2 + ]; + + sound.extraConfig = '' + pcm.!default { + type plug + slave.pcm "hw:1,0" + } + + ctl.!default { + type hw + card 1 + } + ''; +} diff --git a/lenovo/thinkpad/z/z13/default.nix b/lenovo/thinkpad/z/z13/default.nix deleted file mode 100644 index cf1a5b48..00000000 --- a/lenovo/thinkpad/z/z13/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - imports = [ - ../../../../lenovo/thinkpad/z - ]; -} diff --git a/lenovo/thinkpad/z13/default.nix b/lenovo/thinkpad/z13/default.nix new file mode 100644 index 00000000..4eb91c9f --- /dev/null +++ b/lenovo/thinkpad/z13/default.nix @@ -0,0 +1,10 @@ +{ + assertions = [ + { + assertion = true; + message = '' + Lenovo Z-series received a second generation so the hardware configuration has been split by generation. For the Z13 Gen 1 config, change from `lenovo-thinkpad-z13` to `lenovo-thinkpad-z13-gen1`. + ''; + } + ]; +} From f58b25254be441cd2a9b4b444ed83f1e51244f1f Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Thu, 11 Apr 2024 10:05:30 +0200 Subject: [PATCH 0775/1476] macmini4: init --- README.md | 1 + apple/macmini/4/default.nix | 28 ++++++++++++++++++++++++++++ apple/macmini/default.nix | 6 ++++++ flake.nix | 1 + 4 files changed, 36 insertions(+) create mode 100644 apple/macmini/4/default.nix create mode 100644 apple/macmini/default.nix diff --git a/README.md b/README.md index ed7464d9..1bfe7609 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ See code for all available configurations. | [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | +| [Apple MacMini (2010, Intel, Nvidia)](apple/macmini/4) | `` | | [Apple Macs with a T2 Chip](apple/t2) | `` | | [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | | [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | diff --git a/apple/macmini/4/default.nix b/apple/macmini/4/default.nix new file mode 100644 index 00000000..fd3062d5 --- /dev/null +++ b/apple/macmini/4/default.nix @@ -0,0 +1,28 @@ +{ + lib, + ... +}: +let + inherit (lib) mkDefault; +in +{ + imports = [ + ../. + ]; + + services.xserver.videoDrivers = mkDefault [ "nvidiaLegacy340" ]; + + hardware.opengl = { + enable = mkDefault true; + driSupport = mkDefault true; + driSupport32Bit = mkDefault true; + }; + + hardware.nvidia = { + modesetting.enable = mkDefault true; + powerManagement.enable = mkDefault false; + powerManagement.finegrained = mkDefault false; + open = mkDefault false; + nvidiaSettings = mkDefault true; + }; +} diff --git a/apple/macmini/default.nix b/apple/macmini/default.nix new file mode 100644 index 00000000..84bbb18b --- /dev/null +++ b/apple/macmini/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../. + ../../common/cpu/intel + ]; +} diff --git a/flake.nix b/flake.nix index 31b92ef1..046d9be8 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,7 @@ apple-macbook-pro-11-5 = import ./apple/macbook-pro/11-5; apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1; + apple-macmini-4-1 = import ./apple/macmini/4; apple-t2 = import ./apple/t2; asus-battery = import ./asus/battery.nix; asus-ally-rc71l = import ./asus/ally/rc71l; From 53f978f270d660103fe96ac9d8d84655f82f8b2e Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Wed, 17 Apr 2024 19:34:02 +0200 Subject: [PATCH 0776/1476] link offical wiki page instead of unoffical --- friendlyarm/nanopc-t4/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/friendlyarm/nanopc-t4/README.md b/friendlyarm/nanopc-t4/README.md index 30ccf046..23d0462b 100644 --- a/friendlyarm/nanopc-t4/README.md +++ b/friendlyarm/nanopc-t4/README.md @@ -4,7 +4,7 @@ This document on how I configure [NixOS](https://nixos.org/) on [NanoPC-T4](http # Installation -To install NixOS on you can follow the [official instructions](https://nixos.wiki/wiki/NixOS_on_ARM/NanoPC-T4) and use the [pre-built images](https://github.com/tmountain/arch-nanopct4/tree/main/images/) from @tmountain. You can also build the U-Boot image yourself from `nixpkgs` based on changes added in [#111034](https://github.com/NixOS/nixpkgs/pull/111034). +To install NixOS on you can follow the [official instructions](https://wiki.nixos.org/wiki/NixOS_on_ARM/NanoPC-T4) and use the [pre-built images](https://github.com/tmountain/arch-nanopct4/tree/main/images/) from @tmountain. You can also build the U-Boot image yourself from `nixpkgs` based on changes added in [#111034](https://github.com/NixOS/nixpkgs/pull/111034). ## NixOS on NVMe with ZFS @@ -62,7 +62,7 @@ A reader using `CP2102` chip did not work but `FT232RL` works fine: You can use `minicom` or `picocom` to connect: ``` -sudo minicom -b 1500000 -D /dev/ttyUSB0 +sudo minicom -b 1500000 -D /dev/ttyUSB0 sudo picocom -b 1500000 /dev/ttyUSB0 ``` But you'll need to disable flow control with `Ctrl-A x`. From 699723a72878912a7f8ae4b18d57eea68836c0fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tracteur=20Blind=C3=A9?= Date: Sat, 13 Apr 2024 08:58:07 -0700 Subject: [PATCH 0777/1476] surface: linux-surface to 6.8.1 --- microsoft/surface/common/kernel/default.nix | 2 +- .../common/kernel/{linux-6.6.x => linux-6.8.x}/default.nix | 4 ++-- .../common/kernel/{linux-6.6.x => linux-6.8.x}/patches.nix | 0 microsoft/surface/common/repos.nix | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) rename microsoft/surface/common/kernel/{linux-6.6.x => linux-6.8.x}/default.nix (87%) rename microsoft/surface/common/kernel/{linux-6.6.x => linux-6.8.x}/patches.nix (100%) diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index 55f22dab..0c0159a0 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -5,7 +5,7 @@ let in { imports = [ - ./linux-6.6.x + ./linux-6.8.x ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.6.x/default.nix b/microsoft/surface/common/kernel/linux-6.8.x/default.nix similarity index 87% rename from microsoft/surface/common/kernel/linux-6.6.x/default.nix rename to microsoft/surface/common/kernel/linux-6.8.x/default.nix index 7d59f627..c6db5c10 100644 --- a/microsoft/surface/common/kernel/linux-6.6.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.8.x/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.6.25"; + version = "6.8.1"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "0i0zvqlj02rm6wpbidji0rn9559vrpfc1b8gbfjk70lhhyz11llr"; + sha256 = "sha256-jQyJNuMUCg+99RGtep8hEhWY82VnQ4mPR7uQUtN8/2g="; ignoreConfigErrors=true; }; diff --git a/microsoft/surface/common/kernel/linux-6.6.x/patches.nix b/microsoft/surface/common/kernel/linux-6.8.x/patches.nix similarity index 100% rename from microsoft/surface/common/kernel/linux-6.6.x/patches.nix rename to microsoft/surface/common/kernel/linux-6.8.x/patches.nix diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 69e3122b..7314da81 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "arch-6.6.6-1"; - hash = "sha256-0pP/A0XllR/iheIBEBwEApaXpyFYzsnGZ+wdm4w5Jjg="; + rev = "arch-6.8.1-1"; + hash = "sha256-CI5kuER2rZ30sJciJpSuziWVI/KlX1ls8+PjoraemXo="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From 6f976e53752e5b9ab08f9a3b1b0b9c67815c9754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tracteur=20Blind=C3=A9?= Date: Wed, 17 Apr 2024 17:41:51 -0700 Subject: [PATCH 0778/1476] surface: linux-surface to 6.8.6 --- microsoft/surface/common/kernel/linux-6.8.x/default.nix | 4 ++-- microsoft/surface/common/repos.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-6.8.x/default.nix b/microsoft/surface/common/kernel/linux-6.8.x/default.nix index c6db5c10..cc3b663d 100644 --- a/microsoft/surface/common/kernel/linux-6.8.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.8.x/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.8.1"; + version = "6.8.6"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "sha256-jQyJNuMUCg+99RGtep8hEhWY82VnQ4mPR7uQUtN8/2g="; + sha256 = "sha256-nnIyMtYDq0Xr8EPDRxTEjyd6sZXCmry4Ry8qTDpaGZU="; ignoreConfigErrors=true; }; diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 7314da81..321e7290 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "arch-6.8.1-1"; - hash = "sha256-CI5kuER2rZ30sJciJpSuziWVI/KlX1ls8+PjoraemXo="; + rev = "arch-6.8.6-1"; + hash = "sha256-kLnHcYFeQ7/8lbSL4p9D2aC4V/Ib1tU225UOkRcNnH4="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From 6f1e7c42376cbc14c6a3d46e8471e58d36b8c5c7 Mon Sep 17 00:00:00 2001 From: Jacob Osborne Date: Mon, 15 Apr 2024 15:34:04 -0400 Subject: [PATCH 0779/1476] added framework 16 --- README.md | 1 + flake.nix | 1 + framework/16-inch/cpu/7040-amd/README.md | 18 +++++++++++++ framework/16-inch/cpu/7040-amd/default.nix | 10 ++++++++ framework/16-inch/cpu/common/amd.nix | 14 ++++++++++ framework/16-inch/cpu/common/default.nix | 30 ++++++++++++++++++++++ 6 files changed, 74 insertions(+) create mode 100644 framework/16-inch/cpu/7040-amd/README.md create mode 100644 framework/16-inch/cpu/7040-amd/default.nix create mode 100644 framework/16-inch/cpu/common/amd.nix create mode 100644 framework/16-inch/cpu/common/default.nix diff --git a/README.md b/README.md index 1bfe7609..35b5af67 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,7 @@ See code for all available configurations. | [Framework 12th Gen Intel Core](framework/13-inch/12th-gen-intel) | `` | | [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `` | | [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | +| [Framework 16 AMD Ryzen 7040 Series](framework/16-inch/cpu/7040-amd) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | | [Focus M2 Gen 1](focus/m2/gen1) | `` | diff --git a/flake.nix b/flake.nix index 046d9be8..05aae274 100644 --- a/flake.nix +++ b/flake.nix @@ -77,6 +77,7 @@ framework-12th-gen-intel = import ./framework/13-inch/12th-gen-intel; framework-13th-gen-intel = import ./framework/13-inch/13th-gen-intel; framework-13-7040-amd = import ./framework/13-inch/7040-amd; + framework-16-7040-amd = import ./framework/16-inch/cpu/7040-amd; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; focus-m2-gen1 = import ./focus/m2/gen1; diff --git a/framework/16-inch/cpu/7040-amd/README.md b/framework/16-inch/cpu/7040-amd/README.md new file mode 100644 index 00000000..fb9f2c38 --- /dev/null +++ b/framework/16-inch/cpu/7040-amd/README.md @@ -0,0 +1,18 @@ +# [Framework Laptop 16](https://frame.work/) + +## Updating Firmware + +First enable the `fwupd` service + +```nix +services.fwupd.enable = true; +``` + +Then run + +```sh + $ fwupdmgr update +``` + +- [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.Ryzen7040.BIOS.firmware) + diff --git a/framework/16-inch/cpu/7040-amd/default.nix b/framework/16-inch/cpu/7040-amd/default.nix new file mode 100644 index 00000000..2059a49c --- /dev/null +++ b/framework/16-inch/cpu/7040-amd/default.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../common + ../common/amd.nix + ../../../../common/cpu/amd/raphael/igpu.nix + ]; + +} diff --git a/framework/16-inch/cpu/common/amd.nix b/framework/16-inch/cpu/common/amd.nix new file mode 100644 index 00000000..f75720da --- /dev/null +++ b/framework/16-inch/cpu/common/amd.nix @@ -0,0 +1,14 @@ +{ lib, config, ... }: { + imports = [ + ../../../../common/cpu/amd + ../../../../common/cpu/amd/pstate.nix + ../../../../common/gpu/amd + ]; + + # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ + boot.kernelParams = lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") ["rtc_cmos.use_acpi_alarm=1"] ; + + # AMD has better battery life with PPD over TLP: + # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 + services.power-profiles-daemon.enable = lib.mkDefault true; +} diff --git a/framework/16-inch/cpu/common/default.nix b/framework/16-inch/cpu/common/default.nix new file mode 100644 index 00000000..4105bc84 --- /dev/null +++ b/framework/16-inch/cpu/common/default.nix @@ -0,0 +1,30 @@ +{ lib, pkgs, ... }: { + imports = [ + ../../../../common/pc/laptop + ../../../../common/pc/laptop/ssd + ]; + + # Fix TRRS headphones missing a mic + # https://community.frame.work/t/headset-microphone-on-linux/12387/3 + boot.extraModprobeConfig = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6.8") '' + options snd-hda-intel model=dell-headset-multi + ''; + + # For fingerprint support + services.fprintd.enable = lib.mkDefault true; + + # Custom udev rules + services.udev.extraRules = '' + # Ethernet expansion card support + ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" + ''; + + # Fix font sizes in X + # services.xserver.dpi = 200; + + # Needed for desktop environments to detect/manage display brightness + hardware.sensor.iio.enable = lib.mkDefault true; + + # Enable keyboard customization + hardware.keyboard.qmk.enable = lib.mkDefault true; +} From 3638bc8fab3de21e116909423f289feb4950a0c8 Mon Sep 17 00:00:00 2001 From: Jacob Osborne Date: Thu, 18 Apr 2024 14:42:35 -0400 Subject: [PATCH 0780/1476] Redirected users to the fwupd wiki page --- framework/16-inch/cpu/7040-amd/README.md | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/framework/16-inch/cpu/7040-amd/README.md b/framework/16-inch/cpu/7040-amd/README.md index fb9f2c38..0ce3dbe8 100644 --- a/framework/16-inch/cpu/7040-amd/README.md +++ b/framework/16-inch/cpu/7040-amd/README.md @@ -1,18 +1,4 @@ # [Framework Laptop 16](https://frame.work/) ## Updating Firmware - -First enable the `fwupd` service - -```nix -services.fwupd.enable = true; -``` - -Then run - -```sh - $ fwupdmgr update -``` - -- [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.Ryzen7040.BIOS.firmware) - +The Framework Laptop 16 uses LVFS, so it can be updated via fwupd; see https://wiki.nixos.org/wiki/Fwupd for details From 5d48925b815fd202781bfae8fb6f45c07112fdb2 Mon Sep 17 00:00:00 2001 From: Jacob Osborne Date: Thu, 18 Apr 2024 15:16:54 -0400 Subject: [PATCH 0781/1476] Removed commented dpi settings --- framework/16-inch/cpu/common/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/framework/16-inch/cpu/common/default.nix b/framework/16-inch/cpu/common/default.nix index 4105bc84..34a769b9 100644 --- a/framework/16-inch/cpu/common/default.nix +++ b/framework/16-inch/cpu/common/default.nix @@ -19,9 +19,6 @@ ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" ''; - # Fix font sizes in X - # services.xserver.dpi = 200; - # Needed for desktop environments to detect/manage display brightness hardware.sensor.iio.enable = lib.mkDefault true; From c056352c4c63f8b9707ebf4f8a8fcc1d5b7950a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 23 Apr 2024 11:19:54 +0200 Subject: [PATCH 0782/1476] fix mergify configuration --- .mergify.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index fe7af7ff..45ffb1e9 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -5,8 +5,7 @@ queue_rules: defaults: actions: queue: - allow_merging_configuration_change: true - method: rebase + merge_method: rebase pull_request_rules: - name: merge using the merge queue conditions: From 797f8d8082c7cc3259cba7275c699d4991b09ecc Mon Sep 17 00:00:00 2001 From: Benedikt Ritter Date: Tue, 16 Apr 2024 20:54:43 +0200 Subject: [PATCH 0783/1476] TUXEDO Pulse 14 Gen3: init Add relevant modules for TUXEDO Pulse 14 Gen3. The device is equipped with an AMD Ryzen 7 7840HS with integrated AMD Radeon M780 iGPU. --- README.md | 1 + flake.nix | 1 + tuxedo/pulse/14/gen3/README.md | 7 +++++++ tuxedo/pulse/14/gen3/default.nix | 9 +++++++++ 4 files changed, 18 insertions(+) create mode 100644 tuxedo/pulse/14/gen3/README.md create mode 100644 tuxedo/pulse/14/gen3/default.nix diff --git a/README.md b/README.md index 35b5af67..207f4ca0 100644 --- a/README.md +++ b/README.md @@ -289,4 +289,5 @@ See code for all available configurations. | [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | | [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | | [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | +| [TUXEDO Pulse 14 - Gen3](tuxedo/pulse/14/gen3) | `` | | [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | diff --git a/flake.nix b/flake.nix index 05aae274..cabdabce 100644 --- a/flake.nix +++ b/flake.nix @@ -230,6 +230,7 @@ toshiba-swanky = import ./toshiba/swanky; tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7; + tuxedo-pulse-14-gen3 = import ./tuxedo/pulse/14/gen3; tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; common-cpu-amd = import ./common/cpu/amd; diff --git a/tuxedo/pulse/14/gen3/README.md b/tuxedo/pulse/14/gen3/README.md new file mode 100644 index 00000000..a44b5b30 --- /dev/null +++ b/tuxedo/pulse/14/gen3/README.md @@ -0,0 +1,7 @@ +# TUXEDO Pulse 14 - Gen3 + +## About + +[NixOS hardware configuration](https://github.com/NixOS/nixos-hardware) for +[TUXEDO Pulse 14 - +Gen3](https://www.tuxedocomputers.com/en/TUXEDO-Pulse-14-Gen3). diff --git a/tuxedo/pulse/14/gen3/default.nix b/tuxedo/pulse/14/gen3/default.nix new file mode 100644 index 00000000..f43fbb00 --- /dev/null +++ b/tuxedo/pulse/14/gen3/default.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + imports = [ + ../../../../common/cpu/amd + ../../../../common/cpu/amd/pstate.nix + ../../../../common/cpu/amd/raphael/igpu.nix + ../../../../common/pc/laptop + ../../../../common/pc/laptop/ssd + ]; +} From 0335d1a093dc3e2c577e2243a192775db23485ba Mon Sep 17 00:00:00 2001 From: Sebastian Sellmeier Date: Sun, 7 Apr 2024 21:28:11 +0200 Subject: [PATCH 0784/1476] common/gpu/intel: Make initrd - i915 an option --- common/gpu/intel/default.nix | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index ed76057b..b8ab823c 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -1,15 +1,26 @@ { config, lib, pkgs, ... }: { - boot.initrd.kernelModules = [ "i915" ]; - - environment.variables = { - VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); + options.hardware.intelgpu.loadInInitrd = lib.mkEnableOption (lib.mdDoc + "loading `i195` kernelModule at stage 1. (Add `i915` to `boot.initrd.kernelModules`)" + ) // { + default = true; }; - hardware.opengl.extraPackages = with pkgs; [ - (if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver) - libvdpau-va-gl - intel-media-driver + config = lib.mkMerge [ + (lib.mkIf config.hardware.intelgpu.loadInInitrd { + boot.initrd.kernelModules = [ "i915" ]; + }) + { + environment.variables = { + VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); + }; + + hardware.opengl.extraPackages = with pkgs; [ + (if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver) + libvdpau-va-gl + intel-media-driver + ]; + } ]; } From f8e89e4e847d25f32c68adccf61e3ad42967847b Mon Sep 17 00:00:00 2001 From: Sebastian Sellmeier Date: Sun, 7 Apr 2024 21:31:18 +0200 Subject: [PATCH 0785/1476] framework: Add framework-laptop-kmod as default for NixOS >= 24.05 --- framework/13-inch/common/default.nix | 1 + framework/kmod.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 framework/kmod.nix diff --git a/framework/13-inch/common/default.nix b/framework/13-inch/common/default.nix index c79061af..b7b961de 100644 --- a/framework/13-inch/common/default.nix +++ b/framework/13-inch/common/default.nix @@ -2,6 +2,7 @@ imports = [ ../../../common/pc/laptop ../../../common/pc/laptop/ssd + ../../kmod.nix ]; # Fix TRRS headphones missing a mic diff --git a/framework/kmod.nix b/framework/kmod.nix new file mode 100644 index 00000000..81ce37a0 --- /dev/null +++ b/framework/kmod.nix @@ -0,0 +1,17 @@ +{ config, lib, ... }: +{ + options.hardware.framework.enableKmod = lib.mkEnableOption (lib.mdDoc + "Enable the community created Framework kernel module that allows interacting with the embedded controller from sysfs." + ) // { + # Enable by default if on new enough version of NixOS + default = (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05"); + }; + + config = lib.mkIf config.hardware.framework.enableKmod { + boot.extraModulePackages = with config.boot.kernelPackages; [ + framework-laptop-kmod + ]; + # https://github.com/DHowett/framework-laptop-kmod?tab=readme-ov-file#usage + boot.kernelModules = [ "cros_ec" "cros_ec_lpcs" ]; + }; +} From 8cde8633d4f93659856695189fa3ead28b7a839b Mon Sep 17 00:00:00 2001 From: Sebastian Sellmeier Date: Mon, 8 Apr 2024 09:53:42 +0200 Subject: [PATCH 0786/1476] framework/12th-gen-intel: Refactor module https://github.com/NixOS/nixos-hardware/pull/897 https://github.com/NixOS/nixos-hardware/pull/846 https://github.com/NixOS/nixos-hardware/issues/894 --- framework/13-inch/12th-gen-intel/default.nix | 100 ++++++++++--------- framework/13-inch/common/intel.nix | 12 ++- 2 files changed, 62 insertions(+), 50 deletions(-) diff --git a/framework/13-inch/12th-gen-intel/default.nix b/framework/13-inch/12th-gen-intel/default.nix index b16dc1d3..e2fdcfdd 100644 --- a/framework/13-inch/12th-gen-intel/default.nix +++ b/framework/13-inch/12th-gen-intel/default.nix @@ -1,52 +1,62 @@ -{ lib, pkgs, ... }: { +{ config, lib, pkgs, ... }: +{ imports = [ ../common ../common/intel.nix ]; - boot.kernelParams = [ - # For Power consumption - # https://kvark.github.io/linux/framework/2021/10/17/framework-nixos.html - "mem_sleep_default=deep" - # Workaround iGPU hangs - # https://discourse.nixos.org/t/intel-12th-gen-igpu-freezes/21768/4 - "i915.enable_psr=1" + config = lib.mkMerge [ + { + hardware.intelgpu.loadInInitrd = lib.versionOlder config.boot.kernelPackages.kernel.version "6.2"; + } + # https://community.frame.work/t/tracking-hard-freezing-on-fedora-36-with-the-new-12th-gen-system/20675/391 + (lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.2") { + boot.kernelParams = [ + # Workaround iGPU hangs + # https://discourse.nixos.org/t/intel-12th-gen-igpu-freezes/21768/4 + "i915.enable_psr=1" + ]; + }) + (lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") { + boot.blacklistedKernelModules = [ + # This enables the brightness and airplane mode keys to work + # https://community.frame.work/t/12th-gen-not-sending-xf86monbrightnessup-down/20605/11 + "hid-sensor-hub" + # This fixes controller crashes during sleep + # https://community.frame.work/t/tracking-fn-key-stops-working-on-popos-after-a-while/21208/32 + (lib.mkIf (config.hardware.framework.enableKmod == false) "cros_ec_lpcs") + ]; + + boot.kernelParams = [ + # For Power consumption + # https://kvark.github.io/linux/framework/2021/10/17/framework-nixos.html + # Update 04/2024: Combined with acpi_osi from framework-intel it increases the idle power-usage in my test (SebTM) + # (see: https://github.com/NixOS/nixos-hardware/pull/903#issuecomment-2068146658) + "mem_sleep_default=deep" + ]; + + # Further tweak to ensure the brightness and airplane mode keys work + # https://community.frame.work/t/responded-12th-gen-not-sending-xf86monbrightnessup-down/20605/67 + systemd.services.bind-keys-driver = { + description = "Bind brightness and airplane mode keys to their driver"; + wantedBy = [ "default.target" ]; + after = [ "network.target" ]; + serviceConfig = { + Type = "oneshot"; + User = "root"; + }; + script = '' + ls -lad /sys/bus/i2c/devices/i2c-*:* /sys/bus/i2c/drivers/i2c_hid_acpi/i2c-*:* + if [ -e /sys/bus/i2c/devices/i2c-FRMW0001:00 -a ! -e /sys/bus/i2c/drivers/i2c_hid_acpi/i2c-FRMW0001:00 ]; then + echo fixing + echo i2c-FRMW0001:00 > /sys/bus/i2c/drivers/i2c_hid_acpi/bind + ls -lad /sys/bus/i2c/devices/i2c-*:* /sys/bus/i2c/drivers/i2c_hid_acpi/i2c-*:* + echo done + else + echo no fix needed + fi + ''; + }; + }) ]; - - boot.blacklistedKernelModules = [ - # This enables the brightness and airplane mode keys to work - # https://community.frame.work/t/12th-gen-not-sending-xf86monbrightnessup-down/20605/11 - "hid-sensor-hub" - # This fixes controller crashes during sleep - # https://community.frame.work/t/tracking-fn-key-stops-working-on-popos-after-a-while/21208/32 - "cros_ec_lpcs" - ]; - - # Further tweak to ensure the brightness and airplane mode keys work - # https://community.frame.work/t/responded-12th-gen-not-sending-xf86monbrightnessup-down/20605/67 - systemd.services.bind-keys-driver = { - description = "Bind brightness and airplane mode keys to their driver"; - wantedBy = [ "default.target" ]; - after = [ "network.target" ]; - serviceConfig = { - Type = "oneshot"; - User = "root"; - }; - script = '' - ls -lad /sys/bus/i2c/devices/i2c-*:* /sys/bus/i2c/drivers/i2c_hid_acpi/i2c-*:* - if [ -e /sys/bus/i2c/devices/i2c-FRMW0001:00 -a ! -e /sys/bus/i2c/drivers/i2c_hid_acpi/i2c-FRMW0001:00 ]; then - echo fixing - echo i2c-FRMW0001:00 > /sys/bus/i2c/drivers/i2c_hid_acpi/bind - ls -lad /sys/bus/i2c/devices/i2c-*:* /sys/bus/i2c/drivers/i2c_hid_acpi/i2c-*:* - echo done - else - echo no fix needed - fi - ''; - }; - - # Alder Lake CPUs benefit from kernel 5.18 for ThreadDirector - # https://www.tomshardware.com/news/intel-thread-director-coming-to-linux-5-18 - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.18") (lib.mkDefault pkgs.linuxPackages_latest); - } diff --git a/framework/13-inch/common/intel.nix b/framework/13-inch/common/intel.nix index fb5c4cee..96bbec97 100644 --- a/framework/13-inch/common/intel.nix +++ b/framework/13-inch/common/intel.nix @@ -1,15 +1,17 @@ -{ lib, pkgs, ... }: { +{ config, lib, pkgs, ... }: { imports = [ ../../../common/cpu/intel ]; - boot.kernelParams = [ - # Fixes a regression in s2idle, making it more power efficient than deep sleep - "acpi_osi=\"!Windows 2020\"" + boot.kernelParams = [ # For Power consumption # https://community.frame.work/t/linux-battery-life-tuning/6665/156 "nvme.noacpi=1" - ]; + ] + # Fixes a regression in s2idle, making it more power efficient than deep sleep + # Update 04/2024: It appears that s2idle-regression got fixed in newer kernel-versions (SebTM) + # (see: https://github.com/NixOS/nixos-hardware/pull/903#discussion_r1556096657) + ++ lib.lists.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") "acpi_osi=\"!Windows 2020\""; # Requires at least 5.16 for working wi-fi and bluetooth. # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 From 74b75a9598e800f94e7ba71f2d5e042c4979189e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 27 Apr 2024 08:18:59 +0200 Subject: [PATCH 0787/1476] hp elitebook: fix eval --- hp/elitebook/2560p/network.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hp/elitebook/2560p/network.nix b/hp/elitebook/2560p/network.nix index 2fa94e96..4cdcd64c 100644 --- a/hp/elitebook/2560p/network.nix +++ b/hp/elitebook/2560p/network.nix @@ -3,10 +3,9 @@ with lib; { config = { # Wifi can't connect if rand mac address is used - networking.networkmanager.extraConfig = concatStringsSep "\n" [ - "[device]" - "match-device=driver:iwlwifi" - "wifi.scan-rand-mac-address=no" - ]; + networking.networkmanager.settings.device = { + match-device = "driver:iwlwifi"; + wifi.scan-rand-mac-address = "no"; + }; }; } From 17ad09c30ce18c97c1d93bc500867ac0af6a930c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20W=C3=A5gberg?= Date: Fri, 12 Apr 2024 21:53:47 +0200 Subject: [PATCH 0788/1476] apple/t2: update to kernel 6.7.7 --- apple/t2/default.nix | 9 ------ .../t2/fix-keyboard-backlight-and-touchbar.sh | 28 ------------------- apple/t2/pkgs/linux-t2.nix | 13 +++++---- 3 files changed, 7 insertions(+), 43 deletions(-) delete mode 100755 apple/t2/fix-keyboard-backlight-and-touchbar.sh diff --git a/apple/t2/default.nix b/apple/t2/default.nix index 33658d65..cbdba9dc 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -74,15 +74,6 @@ in # Make sure post-resume.service exists powerManagement.enable = true; - systemd.services.fix-keyboard-backlight-and-touchbar = { - path = [ pkgs.kmod ]; - serviceConfig.ExecStart = ''${pkgs.systemd}/bin/systemd-inhibit --what=sleep --why="fixing keyboard backlight and touchbar must finish before sleep" --mode=delay ${./fix-keyboard-backlight-and-touchbar.sh}''; - serviceConfig.Type = "oneshot"; - description = "reload touchbar driver and restart upower"; - wantedBy = [ "display-manager.service" "post-resume.target" ]; - after = [ "post-resume.target" ]; - }; - # Activation script to install apple-set-os-loader in order to unlock the iGPU system.activationScripts.appleSetOsLoader = lib.optionalString t2Cfg.enableAppleSetOsLoader '' if [[ -e /boot/efi/efi/boot/bootx64_original.efi ]]; then diff --git a/apple/t2/fix-keyboard-backlight-and-touchbar.sh b/apple/t2/fix-keyboard-backlight-and-touchbar.sh deleted file mode 100755 index c8c6a094..00000000 --- a/apple/t2/fix-keyboard-backlight-and-touchbar.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -set -eux - -unload () { - if modprobe -r "$1" 2>&1; - then echo ok - else echo fail - fi -} - -wait_unload() { - while sleep 1; do - output="$(unload "$1")" - case "$output" in - *is\ in\ use*) :;; - *ok*) return 0;; - *) echo "modprobe said: $output"; echo giving up; return 1; - esac - done -} - -wait_unload apple_touchbar -modprobe apple_touchbar - -# After suspend, the inode for the backlight device has changed. This service -# simply restarts upower to inform it of that change. -systemctl restart upower.service diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index 40371fe9..1838fb96 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -5,11 +5,11 @@ let patchRepo = fetchFromGitHub { owner = "t2linux"; repo = "linux-t2-patches"; - rev = "46dd873d1d9d12b26916790045008a91a95d0c11"; - hash = "sha256-YGUGuzsAJFtZYjIW9d2XU4eGKNvMKCaWXqgqJn5TdeY="; + rev = "7cd298e227e95bac9a704ffc8f5ff5e89a1bf4d7"; + hash = "sha256-Oi3CwQl0IwdVc9w+pbmJjBnyqwLFhbqFwxs5o0mqtbE="; }; - version = "6.5"; + version = "6.7.7"; majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); in buildLinux (args // { @@ -22,7 +22,7 @@ buildLinux (args // { src = runCommand "patched-source" {} '' cp -r ${fetchzip { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-qJmVSju69WcvDIbgrbtMyCi+OXUNTzNX2G+/0zwsPR4="; + hash = "sha256-j+Ufl6C1Mqjthk18GPt2e7j+i7viauOgNnVy9dJSgaM="; }} $out chmod -R u+w $out cd $out @@ -40,10 +40,11 @@ buildLinux (args // { BT_HCIBCM4377 = module; BT_HCIUART_BCM = yes; BT_HCIUART = module; - HID_APPLE_IBRIDGE = module; + HID_APPLETB_BL = module; + HID_APPLETB_KBD = module; HID_APPLE = module; + DRM_APPLETBDRM = module; HID_APPLE_MAGIC_BACKLIGHT = module; - HID_APPLE_TOUCHBAR = module; HID_SENSOR_ALS = module; SND_PCM = module; STAGING = yes; From 7e3a3f3170676043024055615da19b58614c4a70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20W=C3=A5gberg?= Date: Fri, 12 Apr 2024 23:01:44 +0200 Subject: [PATCH 0789/1476] apple/t2: add tiny-dfr service --- apple/t2/default.nix | 21 +++++++++++++++- apple/t2/pkgs/tiny-dfr.nix | 51 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 apple/t2/pkgs/tiny-dfr.nix diff --git a/apple/t2/default.nix b/apple/t2/default.nix index cbdba9dc..abe9cacc 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -24,6 +24,8 @@ let pipewirePackage = overrideAudioFiles pkgs.pipewire "spa/plugins/"; + tiny-dfrPackage = pkgs.callPackage ./pkgs/tiny-dfr.nix { }; + apple-set-os-loader-installer = pkgs.stdenv.mkDerivation { name = "apple-set-os-loader-installer-1.0"; src = pkgs.fetchFromGitHub { @@ -60,9 +62,10 @@ in boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./pkgs/linux-t2.nix { }); boot.initrd.kernelModules = [ "apple-bce" ]; + services.udev.packages = [ audioFilesUdevRules tiny-dfrPackage ]; + # For audio boot.kernelParams = [ "pcie_ports=compat" "intel_iommu=on" "iommu=pt" ]; - services.udev.packages = [ audioFilesUdevRules ]; hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/"; @@ -71,6 +74,22 @@ in pipewire = pipewirePackage; }; + # For tiny-dfr + systemd.services.tiny-dfr = { + enable = true; + description = "Tiny Apple silicon touch bar daemon"; + after = [ "systemd-user-sessions.service" "getty@tty1.service" "plymouth-quit.service" "systemd-logind.service" ]; + bindsTo = [ "dev-tiny_dfr_display.device" "dev-tiny_dfr_backlight.device" ]; + startLimitIntervalSec = 30; + startLimitBurst = 2; + script = "${tiny-dfrPackage}/bin/tiny-dfr"; + restartTriggers = [ tiny-dfrPackage ]; + }; + + environment.etc."tiny-dfr/config.toml" = { + source = "${tiny-dfrPackage}/share/tiny-dfr/config.toml"; + }; + # Make sure post-resume.service exists powerManagement.enable = true; diff --git a/apple/t2/pkgs/tiny-dfr.nix b/apple/t2/pkgs/tiny-dfr.nix new file mode 100644 index 00000000..ce4be0fe --- /dev/null +++ b/apple/t2/pkgs/tiny-dfr.nix @@ -0,0 +1,51 @@ +{ pkgs, fetchFromGitHub, rustPlatform, ... }: + +let + repo = fetchFromGitHub { + owner = "kekrby"; + repo = "tiny-dfr"; + rev = "8a5d413cb1dbe2a25b77a9e7f3cb5b9c88ef3ffb"; + hash = "sha256-l4D7aePz/CYpkRorrvsgIYrvSzoZl59OGcFGJqqJftk="; + }; + +in +rustPlatform.buildRustPackage rec { + pname = "tiny-dfr"; + version = repo.rev; + + src = repo; + + cargoLock.lockFile = "${src}/Cargo.lock"; + + nativeBuildInputs = with pkgs; [ + pkg-config + ]; + + buildInputs = with pkgs; [ + udev + glib + pango + cairo + gdk-pixbuf + libxml2 + libinput + ]; + + postPatch = '' + substituteInPlace src/main.rs --replace "/usr/share/tiny-dfr/" "$out/share/tiny-dfr/" + ''; + + postInstall = '' + mkdir -p $out/etc $out/share + + cp -r etc/udev $out/etc/ + cp -r share/tiny-dfr $out/share/ + ''; + + meta = with pkgs.lib; { + description = "The most basic dynamic function row daemon possible"; + homepage = "https://github.com/kekrby/tiny-dfr"; + license = with licenses; [ asl20 bsd3 cc0 isc lgpl21Plus mit mpl20 unicode-dfs-2016 asl20 asl20-llvm mit unlicense ]; + maintainers = []; + }; +} From 1bcf716420ac6152edcd1277c743292da6b87529 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 26 Apr 2024 21:25:26 -0400 Subject: [PATCH 0790/1476] starfive visionfive2: use nixpkgs default u-boot version --- starfive/visionfive/v2/uboot.nix | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/starfive/visionfive/v2/uboot.nix b/starfive/visionfive/v2/uboot.nix index 9c0eb7a1..ef92cce3 100644 --- a/starfive/visionfive/v2/uboot.nix +++ b/starfive/visionfive/v2/uboot.nix @@ -1,29 +1,9 @@ -{ lib -, fetchFromGitHub -, buildUBoot -, buildPackages +{ buildUBoot , opensbi }: -buildUBoot rec { - version = "2024.01"; - - src = fetchFromGitHub { - owner = "u-boot"; - repo = "u-boot"; - rev = "refs/tags/v${version}"; - hash = "sha256-0Da7Czy9cpQ+D5EICc3/QSZhAdCBsmeMvBgykYhAQFw="; - }; - - # workaround for https://github.com/NixOS/nixpkgs/pull/146634 - # uboot: only apply raspberry pi patches to raspberry pi builds - patches = [ ]; - +buildUBoot { extraMakeFlags = [ - # workaround for https://github.com/NixOS/nixpkgs/pull/277997 - # buildUBoot: specify absolute path of dtc, fix building u-boot 2023.10+ - "DTC=${lib.getExe buildPackages.dtc}" - "OPENSBI=${opensbi}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin" ]; From 9821d2c5438edbb567190377bcec4b640ad100c6 Mon Sep 17 00:00:00 2001 From: Matei Dibu Date: Wed, 24 Apr 2024 16:33:39 +0300 Subject: [PATCH 0791/1476] asus/pro-ws-x570-ace: init --- README.md | 1 + asus/pro-ws-x570-ace/README.wiki | 29 +++++++++++++++++++++++++++++ asus/pro-ws-x570-ace/default.nix | 19 +++++++++++++++++++ flake.nix | 1 + 4 files changed, 50 insertions(+) create mode 100644 asus/pro-ws-x570-ace/README.wiki create mode 100644 asus/pro-ws-x570-ace/default.nix diff --git a/README.md b/README.md index 207f4ca0..4f00d867 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ See code for all available configurations. | [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | | [Apple MacMini (2010, Intel, Nvidia)](apple/macmini/4) | `` | | [Apple Macs with a T2 Chip](apple/t2) | `` | +| [Asus Pro WS X570-ACE](asus/pro-ws-x570-ace) | `` | | [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | | [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | diff --git a/asus/pro-ws-x570-ace/README.wiki b/asus/pro-ws-x570-ace/README.wiki new file mode 100644 index 00000000..33ecf522 --- /dev/null +++ b/asus/pro-ws-x570-ace/README.wiki @@ -0,0 +1,29 @@ += ASUS Pro WS X570-ACE = + +== Firmware issues == + +=== BIOS === + +BIOS version 4805 (and possibly older) has broken X2APIC mode, which in turn breaks amd-pstate support. +Other possible config values for APIC are Compatibility, Auto and XAPIC; best results were observed with XAPIC. + +This is the error in dmesg when X2APIC is enabled: + + +amd_pstate: the _CPC object is not present in SBIOS or ACPI disabled + + +=== IPMI === + +The IPMI is half-baked and for the most part unusable in a pure Linux environment, see https://forum.level1techs.com/t/remote-management-on-the-asus-pro-ws-x570-ace-under-linux + +== Firmware features == + +=== IOMMU === + +The groups are great, it's a good board for VFIO. + +=== ECC Memory === + +As stated on the product page, it works; explicitly enabling in BIOS might be required. +Tested with M391A2K43BB1-CTD. diff --git a/asus/pro-ws-x570-ace/default.nix b/asus/pro-ws-x570-ace/default.nix new file mode 100644 index 00000000..0fcde58a --- /dev/null +++ b/asus/pro-ws-x570-ace/default.nix @@ -0,0 +1,19 @@ +{ + imports = [ + ../../common/pc + ../../common/pc/ssd + ../../common/cpu/amd/pstate.nix + ]; + + boot.kernelModules = [ + # Nuvoton NCT6798D - temperature, voltage and RPM + "nct6775" + + # a single "temp1" sensor, always at "+31.9°C" + # commented because it's not useful, but left here for reference + # Bus `SMBus PIIX4 adapter port 1 at 0b20' + # Busdriver `i2c_piix4', I2C address 0x4f + # Chip `ds75' + # "lm75" + ]; +} diff --git a/flake.nix b/flake.nix index cabdabce..d68cdc01 100644 --- a/flake.nix +++ b/flake.nix @@ -19,6 +19,7 @@ asus-ally-rc71l = import ./asus/ally/rc71l; asus-fx504gd = import ./asus/fx504gd; asus-fa507rm = import ./asus/fa507rm; + asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace; asus-rog-strix-g513im = import ./asus/rog-strix/g513im; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; From 53db5e1070d07e750030bf65f1b9963df8f0c678 Mon Sep 17 00:00:00 2001 From: Matei Dibu Date: Thu, 25 Apr 2024 11:58:18 +0300 Subject: [PATCH 0792/1476] protectli/vp4670: add Super I/O kernel module --- protectli/vp4670/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/protectli/vp4670/default.nix b/protectli/vp4670/default.nix index c3fa0366..fdaac857 100644 --- a/protectli/vp4670/default.nix +++ b/protectli/vp4670/default.nix @@ -6,4 +6,8 @@ boot.initrd.kernelModules = [ "sdhci_pci" # 16G eMMC on board ]; + + boot.kernelModules = [ + "it87" # ITE IT8786E Super IO Sensors + ]; } From cdbb5bb040bacbd314e6cd79e4f0b163e0ae0300 Mon Sep 17 00:00:00 2001 From: Milo Oien-Rochat <13294739+nikolarobottesla@users.noreply.github.com> Date: Tue, 30 Apr 2024 03:09:35 -0500 Subject: [PATCH 0793/1476] HP Elitebook 830 G6 (#904) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- README.md | 1 + flake.nix | 1 + hp/elitebook/830/g6/README.md | 8 ++++++++ hp/elitebook/830/g6/default.nix | 26 ++++++++++++++++++++++++++ 4 files changed, 36 insertions(+) create mode 100644 hp/elitebook/830/g6/README.md create mode 100644 hp/elitebook/830/g6/default.nix diff --git a/README.md b/README.md index 4f00d867..be88d615 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,7 @@ See code for all available configurations. | [GPD WIN Max 2 2023](gpd/win-max-2/2023) | `` | | [Google Pixelbook](google/pixelbook) | `` | | [HP Elitebook 2560p](hp/elitebook/2560p) | `` | +| [HP Elitebook 830g6](hp/elitebook/830/g6) | `` | | [HP Elitebook 845g7](hp/elitebook/845/g7) | `` | | [HP Elitebook 845g8](hp/elitebook/845/g8) | `` | | [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | diff --git a/flake.nix b/flake.nix index d68cdc01..0a245a34 100644 --- a/flake.nix +++ b/flake.nix @@ -89,6 +89,7 @@ gpd-win-2 = import ./gpd/win-2; gpd-win-max-2-2023 = import ./gpd/win-max-2/2023; hp-elitebook-2560p = import ./hp/elitebook/2560p; + hp-elitebook-830g6 = import ./hp/elitebook/830/g6; hp-elitebook-845g7 = import ./hp/elitebook/845/g7; hp-elitebook-845g8 = import ./hp/elitebook/845/g8; hp-elitebook-845g9 = import ./hp/elitebook/845/g9; diff --git a/hp/elitebook/830/g6/README.md b/hp/elitebook/830/g6/README.md new file mode 100644 index 00000000..eb9e4e85 --- /dev/null +++ b/hp/elitebook/830/g6/README.md @@ -0,0 +1,8 @@ +# HP Elitebook 830 G6 + +## solved problems +* KDE Plasma 5 (haven't tested others), ~20% of the time freezes at login screen on resume - setting hardare.enableAllFirmware seems to fix + +## Unsolved Problems + +* sometimes fails to sleep (seems to be an application causing it, so probably not a driver/kernel problem) diff --git a/hp/elitebook/830/g6/default.nix b/hp/elitebook/830/g6/default.nix new file mode 100644 index 00000000..b61b2637 --- /dev/null +++ b/hp/elitebook/830/g6/default.nix @@ -0,0 +1,26 @@ +{ pkgs, lib, ... }: +{ + imports = [ + ../../../../common/cpu/intel + ../../../../common/pc/laptop + ../../../../common/pc/laptop/acpi_call.nix + ../../../../common/pc/laptop/ssd + ]; + + # Needed for wifi + hardware.enableRedistributableFirmware = lib.mkDefault true; + + # Cooling management + services.thermald.enable = lib.mkDefault true; + + # Allows for updating firmware via `fwupdmgr`. + services.fwupd.enable = lib.mkDefault true; + + # Enables ACPI platform profiles + boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + kernelModules = [ "hp-wmi" ]; + }; + + # reduces warnings/errors in boot log, seems to eliminate the ocassional boot hangs described in readme + hardware.enableAllFirmware = lib.mkDefault true; +} From 0cbc36e2455c780b34f6329e4e71640b341eb658 Mon Sep 17 00:00:00 2001 From: Emre Cebi Date: Mon, 18 Mar 2024 21:50:42 +0100 Subject: [PATCH 0794/1476] ASUS TUF FA507NV added. --- README.md | 1 + asus/fa507nv/README.md | 2 ++ asus/fa507nv/default.nix | 21 +++++++++++++++++++++ common/gpu/nvidia/prime-sync.nix | 10 ++++++++++ flake.nix | 2 ++ 5 files changed, 36 insertions(+) create mode 100644 asus/fa507nv/README.md create mode 100644 asus/fa507nv/default.nix create mode 100644 common/gpu/nvidia/prime-sync.nix diff --git a/README.md b/README.md index be88d615..1e1ba982 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,7 @@ See code for all available configurations. | [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | | [Asus TUF FA507RM](asus/fa507rm) | `` | +| [Asus TUF FA507NV](asus/fa507nv) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Deciso DEC series](deciso/dec) | `` | | [Dell G3 3779](dell/g3/3779) | `` | diff --git a/asus/fa507nv/README.md b/asus/fa507nv/README.md new file mode 100644 index 00000000..2ff39bf7 --- /dev/null +++ b/asus/fa507nv/README.md @@ -0,0 +1,2 @@ +# ASUS TUF A15 FA507NV +As Nvidia offload is not available for AMD CPU, nvidia prime is using sync. Additionally the kernel is set to latest as the keyboard and wireless drivers does not work in the default LTS kernel. \ No newline at end of file diff --git a/asus/fa507nv/default.nix b/asus/fa507nv/default.nix new file mode 100644 index 00000000..ca534c7a --- /dev/null +++ b/asus/fa507nv/default.nix @@ -0,0 +1,21 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../common/cpu/amd + ../../common/cpu/amd/raphael/igpu.nix + ../../common/cpu/amd/pstate.nix + ../../common/gpu/nvidia + ../../common/gpu/nvidia/prime-sync.nix + ../../common/hidpi.nix + ../../common/pc/laptop + ../../common/pc/ssd + ]; + + boot.kernelPackages = pkgs.linuxPackages_latest; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:54:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + } diff --git a/common/gpu/nvidia/prime-sync.nix b/common/gpu/nvidia/prime-sync.nix new file mode 100644 index 00000000..245fae30 --- /dev/null +++ b/common/gpu/nvidia/prime-sync.nix @@ -0,0 +1,10 @@ +{ lib, config, ... }: + +{ + imports = [ ./. ]; + + hardware.nvidia.prime = { + # For people who want to use sync insted of offload. Esipecially for AMD CPU users + sync.enable = lib.mkOverride 990 true; + }; +} diff --git a/flake.nix b/flake.nix index 0a245a34..123f9f2e 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,7 @@ asus-battery = import ./asus/battery.nix; asus-ally-rc71l = import ./asus/ally/rc71l; asus-fx504gd = import ./asus/fx504gd; + asus-fa507nv = import ./asus/fa507nv; asus-fa507rm = import ./asus/fa507rm; asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace; asus-rog-strix-g513im = import ./asus/rog-strix/g513im; @@ -249,6 +250,7 @@ common-gpu-intel = import ./common/gpu/intel; common-gpu-intel-disable = import ./common/gpu/intel/disable.nix; common-gpu-nvidia = import ./common/gpu/nvidia/prime.nix; + common-gpu-nvidia-sync = import ./common/gpu/nvidia/prime-sync.nix; common-gpu-nvidia-nonprime = import ./common/gpu/nvidia; common-gpu-nvidia-disable = import ./common/gpu/nvidia/disable.nix; common-hidpi = import ./common/hidpi.nix; From 5c0b7f47f4aabd0b6aedfbecec4ea9a31cb5a156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 24 Mar 2024 11:01:23 +0100 Subject: [PATCH 0795/1476] common-gpu-nvidia-sync: fix typos --- common/gpu/nvidia/prime-sync.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/gpu/nvidia/prime-sync.nix b/common/gpu/nvidia/prime-sync.nix index 245fae30..897d7165 100644 --- a/common/gpu/nvidia/prime-sync.nix +++ b/common/gpu/nvidia/prime-sync.nix @@ -4,7 +4,7 @@ imports = [ ./. ]; hardware.nvidia.prime = { - # For people who want to use sync insted of offload. Esipecially for AMD CPU users + # For people who want to use sync instead of offload. Especially for AMD CPU users sync.enable = lib.mkOverride 990 true; }; } From 627652ae642e24ed5119ddc08115c42845609929 Mon Sep 17 00:00:00 2001 From: Emre Cebi Date: Tue, 23 Apr 2024 17:48:27 +0200 Subject: [PATCH 0796/1476] Updated read me --- asus/fa507nv/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asus/fa507nv/README.md b/asus/fa507nv/README.md index 2ff39bf7..70c9f460 100644 --- a/asus/fa507nv/README.md +++ b/asus/fa507nv/README.md @@ -1,2 +1,2 @@ # ASUS TUF A15 FA507NV -As Nvidia offload is not available for AMD CPU, nvidia prime is using sync. Additionally the kernel is set to latest as the keyboard and wireless drivers does not work in the default LTS kernel. \ No newline at end of file +As Nvidia offload is not available for AMD CPU, nvidia prime is using sync. Additionally the kernel is set to the latest stable release(using boot.kernelPackages = pkgs.linuxPackages_latest) as the keyboard and wireless drivers does not work in the default NixOS kernel which is the LTS kernel. \ No newline at end of file From fc738b1ff669bcb355165489453c685f853d9ae0 Mon Sep 17 00:00:00 2001 From: Emre Cebi Date: Tue, 23 Apr 2024 18:00:10 +0200 Subject: [PATCH 0797/1476] kernel mkDefault added for kernel --- asus/fa507nv/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asus/fa507nv/default.nix b/asus/fa507nv/default.nix index ca534c7a..b4c8d1b8 100644 --- a/asus/fa507nv/default.nix +++ b/asus/fa507nv/default.nix @@ -12,7 +12,7 @@ ../../common/pc/ssd ]; - boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; hardware.nvidia.prime = { amdgpuBusId = "PCI:54:0:0"; From 68d680c1b7c0e67a9b2144d6776583ee83664ef4 Mon Sep 17 00:00:00 2001 From: Emre Cebi Date: Tue, 30 Apr 2024 09:59:34 +0200 Subject: [PATCH 0798/1476] Changed the kernel parameter --- asus/fa507nv/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asus/fa507nv/default.nix b/asus/fa507nv/default.nix index b4c8d1b8..9531451c 100644 --- a/asus/fa507nv/default.nix +++ b/asus/fa507nv/default.nix @@ -12,7 +12,7 @@ ../../common/pc/ssd ]; - boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6") pkgs.linuxPackages_latest; hardware.nvidia.prime = { amdgpuBusId = "PCI:54:0:0"; From 3f017311191fe6d501ca2496a835d012f656ee9c Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Fri, 3 May 2024 10:20:34 +0200 Subject: [PATCH 0799/1476] lenovo/thinkpad/l480: init --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/l480/default.nix | 12 ++++++++++++ 3 files changed, 14 insertions(+) create mode 100644 lenovo/thinkpad/l480/default.nix diff --git a/README.md b/README.md index 1e1ba982..5ac2a824 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,7 @@ See code for all available configurations. | [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | | [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | | [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | +| [Lenovo ThinkPad L480](lenovo/thinkpad/l480) | `` | | [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | | [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | | [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | diff --git a/flake.nix b/flake.nix index 123f9f2e..8ac61b3f 100644 --- a/flake.nix +++ b/flake.nix @@ -121,6 +121,7 @@ lenovo-thinkpad-l13-yoga = import ./lenovo/thinkpad/l13/yoga; lenovo-thinkpad-l14-amd = import ./lenovo/thinkpad/l14/amd; lenovo-thinkpad-l14-intel = import ./lenovo/thinkpad/l14/intel; + lenovo-thinkpad-l480 = import ./lenovo/thinkpad/l480; lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1; lenovo-thinkpad-p1-gen3 = import ./lenovo/thinkpad/p1/3th-gen; lenovo-thinkpad-p14s-amd-gen2 = import ./lenovo/thinkpad/p14s/amd/gen2; diff --git a/lenovo/thinkpad/l480/default.nix b/lenovo/thinkpad/l480/default.nix new file mode 100644 index 00000000..d000320d --- /dev/null +++ b/lenovo/thinkpad/l480/default.nix @@ -0,0 +1,12 @@ +{ lib, ... }: +{ + imports = [ + ../. + ../../../common/cpu/intel/kaby-lake + ../../../common/pc/laptop/ssd + ]; + + # available cpufreq governors: performance powersave + # The powersave mode locks the cpu to 700Mhz which is not really usable + powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; +} From d623635bb7d9262c0422af8f74599c6b3cf60180 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sat, 4 May 2024 02:16:46 +0200 Subject: [PATCH 0800/1476] surface: linux 6.8.6 -> 6.8.9 --- microsoft/surface/common/kernel/linux-6.8.x/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-6.8.x/default.nix b/microsoft/surface/common/kernel/linux-6.8.x/default.nix index cc3b663d..e016d77d 100644 --- a/microsoft/surface/common/kernel/linux-6.8.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.8.x/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.8.6"; + version = "6.8.9"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "sha256-nnIyMtYDq0Xr8EPDRxTEjyd6sZXCmry4Ry8qTDpaGZU="; + sha256 = "sha256-+QXxI46nqOhTFLrPKDMC6AlwBgENJfzqcm0N4OpbybY="; ignoreConfigErrors=true; }; From 753176b57b3fcddb140c1c012868e62c025120bd Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 3 May 2024 09:28:12 -0400 Subject: [PATCH 0801/1476] Add fingerprint support for Lenovo Legion 16ARHA7 --- lenovo/legion/16arha7/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lenovo/legion/16arha7/default.nix b/lenovo/legion/16arha7/default.nix index 30015e3b..da8174b9 100644 --- a/lenovo/legion/16arha7/default.nix +++ b/lenovo/legion/16arha7/default.nix @@ -18,4 +18,14 @@ in # √(2560² + 1600²) px / 16 in ≃ 189 dpi services.xserver.dpi = 189; + + # Enable fingerprint reader + services.fprintd = { + enable = true; + package = pkgs.fprintd-tod; + tod = { + enable = true; + driver = pkgs.libfprint-2-tod1-elan; + }; + }; } From c4fa85b9df1b719cc09fa1338f4a6aa61dc7384c Mon Sep 17 00:00:00 2001 From: leo60228 Date: Thu, 25 Apr 2024 21:57:25 -0400 Subject: [PATCH 0802/1476] raspberry-pi/5: init --- README.md | 1 + raspberry-pi/5/default.nix | 15 +++++++++++++++ raspberry-pi/5/overlay.nix | 6 ++++++ tests/run.py | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 raspberry-pi/5/default.nix create mode 100644 raspberry-pi/5/overlay.nix diff --git a/README.md b/README.md index 5ac2a824..6698010c 100644 --- a/README.md +++ b/README.md @@ -281,6 +281,7 @@ See code for all available configurations. | [Purism Librem 5r4](purism/librem/5r4) | `` | | [Raspberry Pi 2](raspberry-pi/2) | `` | | [Raspberry Pi 4](raspberry-pi/4) | `` | +| [Raspberry Pi 5](raspberry-pi/5) | `` | | [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | | [StarFive VisionFive v1](starfive/visionfive/v1) | `` | | [StarFive VisionFive 2](starfive/visionfive/v2) | `` | diff --git a/raspberry-pi/5/default.nix b/raspberry-pi/5/default.nix new file mode 100644 index 00000000..8aea9444 --- /dev/null +++ b/raspberry-pi/5/default.nix @@ -0,0 +1,15 @@ +{ lib, pkgs, ... }: + +{ + nixpkgs.overlays = [ + (import ./overlay.nix) + ]; + + boot = { + kernelPackages = lib.mkDefault (pkgs.linuxPackagesFor pkgs.linux_rpi5); + initrd.availableKernelModules = [ + "usbhid" + "usb_storage" + ]; + }; +} diff --git a/raspberry-pi/5/overlay.nix b/raspberry-pi/5/overlay.nix new file mode 100644 index 00000000..8fd1a894 --- /dev/null +++ b/raspberry-pi/5/overlay.nix @@ -0,0 +1,6 @@ +final: _prev: { + linux_rpi5 = final.linux_rpi4.override { + rpiVersion = 5; + argsOverride.defconfig = "bcm2712_defconfig"; + }; +} diff --git a/tests/run.py b/tests/run.py index 8ad60256..07a86c02 100755 --- a/tests/run.py +++ b/tests/run.py @@ -81,7 +81,7 @@ def write_eval_test(f: IO[str], profiles: list[str]) -> None: continue system = "x86_64-linux" - if "raspberry-pi/4" == profile: + if "raspberry-pi/4" == profile or "raspberry-pi/5" == profile: system = "aarch64-linux" f.write( From 67b979143d80efef4ab2bff6f247c28f75f975e6 Mon Sep 17 00:00:00 2001 From: leo60228 Date: Tue, 30 Apr 2024 13:24:45 -0400 Subject: [PATCH 0803/1476] raspberry-pi/5: add xserver configuration --- raspberry-pi/5/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/raspberry-pi/5/default.nix b/raspberry-pi/5/default.nix index 8aea9444..d4018d13 100644 --- a/raspberry-pi/5/default.nix +++ b/raspberry-pi/5/default.nix @@ -12,4 +12,15 @@ "usb_storage" ]; }; + + # Needed for Xorg to start (https://github.com/raspberrypi-ui/gldriver-test/blob/master/usr/lib/systemd/scripts/rp1_test.sh) + # This won't work for displays connected to the RP1 (DPI/composite/MIPI DSI), since I don't have one to test. + services.xserver.extraConfig = '' + Section "OutputClass" + Identifier "vc4" + MatchDriver "vc4" + Driver "modesetting" + Option "PrimaryGPU" "true" + EndSection + ''; } From 7a7f2ea0f2822e59b2910fb2577c78bb6627913e Mon Sep 17 00:00:00 2001 From: leo60228 Date: Tue, 30 Apr 2024 17:46:48 -0400 Subject: [PATCH 0804/1476] raspberry-pi/5: add nvme module Co-authored-by: Sergey Kazenyuk --- raspberry-pi/5/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/raspberry-pi/5/default.nix b/raspberry-pi/5/default.nix index d4018d13..038b1469 100644 --- a/raspberry-pi/5/default.nix +++ b/raspberry-pi/5/default.nix @@ -8,6 +8,7 @@ boot = { kernelPackages = lib.mkDefault (pkgs.linuxPackagesFor pkgs.linux_rpi5); initrd.availableKernelModules = [ + "nvme" "usbhid" "usb_storage" ]; From 11d92d24440b390d7d7998a383e4f64daf1fa1c3 Mon Sep 17 00:00:00 2001 From: leo60228 Date: Wed, 1 May 2024 15:37:43 -0400 Subject: [PATCH 0805/1476] raspberry-pi/5: add to flake.nix --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 8ac61b3f..416d4c6c 100644 --- a/flake.nix +++ b/flake.nix @@ -220,6 +220,7 @@ purism-librem-5r4 = import ./purism/librem/5r4; raspberry-pi-2 = import ./raspberry-pi/2; raspberry-pi-4 = import ./raspberry-pi/4; + raspberry-pi-5 = import ./raspberry-pi/5; kobol-helios4 = import ./kobol/helios4; samsung-np900x3c = import ./samsung/np900x3c; starfive-visionfive-v1 = import ./starfive/visionfive/v1; From 1d11c108000d498af656dfa3ede9ce25839c9948 Mon Sep 17 00:00:00 2001 From: leo60228 Date: Wed, 1 May 2024 15:40:27 -0400 Subject: [PATCH 0806/1476] raspberry-pi/5: add kernel version assertion --- raspberry-pi/5/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/raspberry-pi/5/default.nix b/raspberry-pi/5/default.nix index 038b1469..1fbd7579 100644 --- a/raspberry-pi/5/default.nix +++ b/raspberry-pi/5/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, pkgs, config, ... }: { nixpkgs.overlays = [ @@ -24,4 +24,11 @@ Option "PrimaryGPU" "true" EndSection ''; + + assertions = [ + { + assertion = (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1.54"); + message = "The Raspberry Pi 5 requires a newer kernel version (>=6.1.54). Please upgrade nixpkgs for this system."; + } + ]; } From 8a4adfe48b68b50ef62e9a299898093436269b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 5 May 2024 06:59:23 +0200 Subject: [PATCH 0807/1476] raspberry-pi/5: don't use overlay --- raspberry-pi/5/default.nix | 13 +++++++------ raspberry-pi/5/overlay.nix | 6 ------ 2 files changed, 7 insertions(+), 12 deletions(-) delete mode 100644 raspberry-pi/5/overlay.nix diff --git a/raspberry-pi/5/default.nix b/raspberry-pi/5/default.nix index 1fbd7579..aba0178f 100644 --- a/raspberry-pi/5/default.nix +++ b/raspberry-pi/5/default.nix @@ -1,12 +1,13 @@ { lib, pkgs, config, ... }: - +let + linux_rpi5 = pkgs.linux_rpi4.override { + rpiVersion = 5; + argsOverride.defconfig = "bcm2712_defconfig"; + }; +in { - nixpkgs.overlays = [ - (import ./overlay.nix) - ]; - boot = { - kernelPackages = lib.mkDefault (pkgs.linuxPackagesFor pkgs.linux_rpi5); + kernelPackages = lib.mkDefault (pkgs.linuxPackagesFor linux_rpi5); initrd.availableKernelModules = [ "nvme" "usbhid" diff --git a/raspberry-pi/5/overlay.nix b/raspberry-pi/5/overlay.nix deleted file mode 100644 index 8fd1a894..00000000 --- a/raspberry-pi/5/overlay.nix +++ /dev/null @@ -1,6 +0,0 @@ -final: _prev: { - linux_rpi5 = final.linux_rpi4.override { - rpiVersion = 5; - argsOverride.defconfig = "bcm2712_defconfig"; - }; -} From 88eb241bbd87e21bbf6c8be7319fe997550b90f8 Mon Sep 17 00:00:00 2001 From: pinage404 Date: Sun, 28 Apr 2024 17:54:40 +0200 Subject: [PATCH 0808/1476] framework/16-inch: moved out of the CPU folder as it doesn't only define configuration for the CPU --- README.md | 2 +- flake.nix | 2 +- framework/16-inch/{cpu => }/7040-amd/README.md | 0 framework/16-inch/{cpu => }/7040-amd/default.nix | 2 +- framework/16-inch/{cpu => }/common/amd.nix | 6 +++--- framework/16-inch/{cpu => }/common/default.nix | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) rename framework/16-inch/{cpu => }/7040-amd/README.md (100%) rename framework/16-inch/{cpu => }/7040-amd/default.nix (64%) rename framework/16-inch/{cpu => }/common/amd.nix (82%) rename framework/16-inch/{cpu => }/common/default.nix (91%) diff --git a/README.md b/README.md index 6698010c..10d82bb6 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ See code for all available configurations. | [Framework 12th Gen Intel Core](framework/13-inch/12th-gen-intel) | `` | | [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `` | | [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | -| [Framework 16 AMD Ryzen 7040 Series](framework/16-inch/cpu/7040-amd) | `` | +| [Framework 16 AMD Ryzen 7040 Series](framework/16-inch/7040-amd) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | | [Focus M2 Gen 1](focus/m2/gen1) | `` | diff --git a/flake.nix b/flake.nix index 416d4c6c..2b777351 100644 --- a/flake.nix +++ b/flake.nix @@ -79,7 +79,7 @@ framework-12th-gen-intel = import ./framework/13-inch/12th-gen-intel; framework-13th-gen-intel = import ./framework/13-inch/13th-gen-intel; framework-13-7040-amd = import ./framework/13-inch/7040-amd; - framework-16-7040-amd = import ./framework/16-inch/cpu/7040-amd; + framework-16-7040-amd = import ./framework/16-inch/7040-amd; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; focus-m2-gen1 = import ./focus/m2/gen1; diff --git a/framework/16-inch/cpu/7040-amd/README.md b/framework/16-inch/7040-amd/README.md similarity index 100% rename from framework/16-inch/cpu/7040-amd/README.md rename to framework/16-inch/7040-amd/README.md diff --git a/framework/16-inch/cpu/7040-amd/default.nix b/framework/16-inch/7040-amd/default.nix similarity index 64% rename from framework/16-inch/cpu/7040-amd/default.nix rename to framework/16-inch/7040-amd/default.nix index 2059a49c..6c02455a 100644 --- a/framework/16-inch/cpu/7040-amd/default.nix +++ b/framework/16-inch/7040-amd/default.nix @@ -4,7 +4,7 @@ imports = [ ../common ../common/amd.nix - ../../../../common/cpu/amd/raphael/igpu.nix + ../../../common/cpu/amd/raphael/igpu.nix ]; } diff --git a/framework/16-inch/cpu/common/amd.nix b/framework/16-inch/common/amd.nix similarity index 82% rename from framework/16-inch/cpu/common/amd.nix rename to framework/16-inch/common/amd.nix index f75720da..f5341b63 100644 --- a/framework/16-inch/cpu/common/amd.nix +++ b/framework/16-inch/common/amd.nix @@ -1,8 +1,8 @@ { lib, config, ... }: { imports = [ - ../../../../common/cpu/amd - ../../../../common/cpu/amd/pstate.nix - ../../../../common/gpu/amd + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd ]; # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ diff --git a/framework/16-inch/cpu/common/default.nix b/framework/16-inch/common/default.nix similarity index 91% rename from framework/16-inch/cpu/common/default.nix rename to framework/16-inch/common/default.nix index 34a769b9..2b535229 100644 --- a/framework/16-inch/cpu/common/default.nix +++ b/framework/16-inch/common/default.nix @@ -1,7 +1,7 @@ { lib, pkgs, ... }: { imports = [ - ../../../../common/pc/laptop - ../../../../common/pc/laptop/ssd + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd ]; # Fix TRRS headphones missing a mic From e148ccbecbd2fe4dc4768fba67f6db828466ad06 Mon Sep 17 00:00:00 2001 From: pinage404 Date: Sun, 28 Apr 2024 17:30:41 +0200 Subject: [PATCH 0809/1476] framework: install framework-tool --- framework/13-inch/common/default.nix | 1 + framework/16-inch/common/default.nix | 1 + framework/framework-tool.nix | 3 +++ 3 files changed, 5 insertions(+) create mode 100644 framework/framework-tool.nix diff --git a/framework/13-inch/common/default.nix b/framework/13-inch/common/default.nix index b7b961de..904c2d74 100644 --- a/framework/13-inch/common/default.nix +++ b/framework/13-inch/common/default.nix @@ -3,6 +3,7 @@ ../../../common/pc/laptop ../../../common/pc/laptop/ssd ../../kmod.nix + ../../framework-tool.nix ]; # Fix TRRS headphones missing a mic diff --git a/framework/16-inch/common/default.nix b/framework/16-inch/common/default.nix index 2b535229..9dc402c4 100644 --- a/framework/16-inch/common/default.nix +++ b/framework/16-inch/common/default.nix @@ -2,6 +2,7 @@ imports = [ ../../../common/pc/laptop ../../../common/pc/laptop/ssd + ../../framework-tool.nix ]; # Fix TRRS headphones missing a mic diff --git a/framework/framework-tool.nix b/framework/framework-tool.nix new file mode 100644 index 00000000..4effcca8 --- /dev/null +++ b/framework/framework-tool.nix @@ -0,0 +1,3 @@ +{ pkgs, ... }: { + environment.systemPackages = [ pkgs.framework-tool ]; +} From 1a770577450681a835733a0f50a87a71ff5e4ee0 Mon Sep 17 00:00:00 2001 From: katsu-chan <44003480+katsu-chan@users.noreply.github.com> Date: Sun, 28 Apr 2024 20:57:14 +0300 Subject: [PATCH 0810/1476] added thinkpad a470 --- lenovo/thinkpad/a475/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lenovo/thinkpad/a475/default.nix diff --git a/lenovo/thinkpad/a475/default.nix b/lenovo/thinkpad/a475/default.nix new file mode 100644 index 00000000..4f044538 --- /dev/null +++ b/lenovo/thinkpad/a475/default.nix @@ -0,0 +1,16 @@ +{ ... }: +{ + imports = [ + ../../../common/gpu/amd + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/ssd + ../../../common/pc/laptop/hdd + #../../../common/hidpi.nix #hidpi + ../. + ]; + + boot.kernelParams = [ "i8042.nomux=1" "i8042.reset" ]; # Fix trackpoint and touchpad working only after reboot +} + From 00e73a4509f9112f33188a24e56d9cc61523fd3b Mon Sep 17 00:00:00 2001 From: Eve Katsumuki <44003480+katsu-chan@users.noreply.github.com> Date: Wed, 1 May 2024 05:08:51 +0300 Subject: [PATCH 0811/1476] Update README.md for ThinkPad A475 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 10d82bb6..fe92f582 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,7 @@ See code for all available configurations. | [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | | [Lenovo Legion Slim 7 Gen 7 (AMD)](lenovo/legion/16arha7/) | `` | | [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | +| [Lenovo ThinkPad A475](lenovo/thinkpad/a475) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | | [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | From d1659c9eb8af718118fb4bbe2c86797c8b8623eb Mon Sep 17 00:00:00 2001 From: Eve Katsumuki <44003480+katsu-chan@users.noreply.github.com> Date: Wed, 1 May 2024 05:10:35 +0300 Subject: [PATCH 0812/1476] Update flake.nix for ThinkPad A475 --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 2b777351..69e0a314 100644 --- a/flake.nix +++ b/flake.nix @@ -113,6 +113,7 @@ lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h; lenovo-legion-y530-15ich = import ./lenovo/legion/15ich; lenovo-thinkpad = import ./lenovo/thinkpad; + lenovo-thinkpad-a475 = import ./lenovo/thinkpad/a475; lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel; lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; From 6cb18a664904afae03501ee613797f502030ee37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 5 May 2024 07:13:06 +0200 Subject: [PATCH 0813/1476] purism/librem/5r4: make it usuable without an overlay In larger installations nixpkgs.overlays adds significant overhead because it's harder to share nixpkgs between different NixOS machines i.e. using nixpkgs.pkgs --- purism/librem/5r4/audio.nix | 2 +- purism/librem/5r4/default.nix | 25 ++++++++++------------- purism/librem/5r4/{kernel => }/kernel.nix | 0 purism/librem/5r4/kernel/default.nix | 3 --- purism/librem/5r4/lockdown-fix.nix | 2 +- 5 files changed, 13 insertions(+), 19 deletions(-) rename purism/librem/5r4/{kernel => }/kernel.nix (100%) delete mode 100644 purism/librem/5r4/kernel/default.nix diff --git a/purism/librem/5r4/audio.nix b/purism/librem/5r4/audio.nix index e44e2f37..80c1c879 100644 --- a/purism/librem/5r4/audio.nix +++ b/purism/librem/5r4/audio.nix @@ -9,7 +9,7 @@ enable = true; # this is required to correctly configure the modem as PA source/sink extraConfig = '' - .include ${pkgs.librem5-base}/etc/pulse/librem5.pa + .include ${config.hardware.librem5.package}/etc/pulse/librem5.pa ''; }; diff --git a/purism/librem/5r4/default.nix b/purism/librem/5r4/default.nix index 83c7fb3b..76854a6f 100644 --- a/purism/librem/5r4/default.nix +++ b/purism/librem/5r4/default.nix @@ -1,8 +1,15 @@ { config, pkgs, lib, ... }: -let cfg = config.hardware.librem5; +let + cfg = config.hardware.librem5; + linuxPackages_librem5 = pkgs.linuxPackagesFor (pkgs.callPackage ./kernel.nix { }); + ubootLibrem5 = pkgs.callPackage ./u-boot { }; in { options = { hardware.librem5 = { + package = lib.mkOption { + type = lib.types.package; + default = pkgs.callPackage ./librem5-base { }; + }; wifiCard = lib.mkOption { type = lib.types.enum [ "redpine" "sparklan" "none" ]; description = lib.mdDoc '' @@ -42,15 +49,6 @@ in { lockdownFix = lib.mkDefault true; }; - nixpkgs.overlays = [ - (import ./kernel) - (final: prev: { - ubootLibrem5 = final.callPackage ./u-boot { }; - - librem5-base = final.callPackage ./librem5-base { }; - }) - ]; - boot = { kernelParams = [ "rootwait" ]; @@ -59,12 +57,11 @@ in { grub.enable = false; }; - kernelPackages = lib.mkDefault pkgs.linuxPackages_librem5; + kernelPackages = lib.mkDefault linuxPackages_librem5; }; - services.udev.packages = lib.mkIf cfg.installUdevPackages [ pkgs.librem5-base ]; - - environment.systemPackages = with pkgs; [ ubootLibrem5 ]; + services.udev.packages = lib.mkIf cfg.installUdevPackages [ config.hardware.librem5.package ]; + environment.systemPackages = [ ubootLibrem5 ]; }; } diff --git a/purism/librem/5r4/kernel/kernel.nix b/purism/librem/5r4/kernel.nix similarity index 100% rename from purism/librem/5r4/kernel/kernel.nix rename to purism/librem/5r4/kernel.nix diff --git a/purism/librem/5r4/kernel/default.nix b/purism/librem/5r4/kernel/default.nix deleted file mode 100644 index 7b1b0852..00000000 --- a/purism/librem/5r4/kernel/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -final: prev: { - linuxPackages_librem5 = final.linuxPackagesFor (final.callPackage ./kernel.nix { }); -} diff --git a/purism/librem/5r4/lockdown-fix.nix b/purism/librem/5r4/lockdown-fix.nix index 00e5041e..121ded30 100644 --- a/purism/librem/5r4/lockdown-fix.nix +++ b/purism/librem/5r4/lockdown-fix.nix @@ -11,7 +11,7 @@ lib.mkIf config.hardware.librem5.lockdownFix { systemd.services.librem5-lockdown-support = { description = "Set up drivers for the orientation and proximity sensors on Librem 5"; serviceConfig.Type = "oneshot"; - serviceConfig.ExecStart = "${pkgs.librem5-base}/bin/lockdown-support.sh"; + serviceConfig.ExecStart = "${config.hardware.librem5.package}/bin/lockdown-support.sh"; wantedBy = [ "default.target" ]; path = [ pkgs.kmod ]; }; From a4e2b7909fc1bdf30c30ef21d388fde0b5cdde4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 6 May 2024 08:41:04 +0200 Subject: [PATCH 0814/1476] helios4: remove need for overlay Note that the linux kernel can and should be accessed through config.kernelPackages.kernel. --- kobol/helios4/default.nix | 43 +++++++++++++++++++++++++++++++-------- kobol/helios4/overlay.nix | 32 ----------------------------- 2 files changed, 35 insertions(+), 40 deletions(-) diff --git a/kobol/helios4/default.nix b/kobol/helios4/default.nix index b40c6833..532a7577 100644 --- a/kobol/helios4/default.nix +++ b/kobol/helios4/default.nix @@ -1,17 +1,44 @@ { pkgs, ... }: - +let + linux_5_15_helios4 = pkgs.linux_5_15.override { + kernelPatches = [ + # A patch to get both PWM fans working + # the patch has been successfully applied to 5.15 and 5.19 + { + patch = pkgs.fetchpatch { + url = "https://raw.githubusercontent.com/armbian/build/bd3466eef2106ea13e85e821f5d852ff97465e6c/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch"; + sha256 = "sha256-eQqMp0+MZd30zkl8DE89oB7czvyqCkfwF2k0EZ69jr0="; + }; + } + # support for Wake-On-Lan + { + patch = pkgs.fetchpatch { + url = "https://raw.githubusercontent.com/armbian/build/bd3466eef2106ea13e85e821f5d852ff97465e6c/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-add_wake_on_gpio_support.patch"; + sha256 = "sha256-OrvnVCU55P0U78jdoxGRJvl29i+Rvq8AdEGSCCpxa2I="; + }; + } + { + patch = pkgs.fetchpatch { + url = "https://raw.githubusercontent.com/armbian/build/bd3466eef2106ea13e85e821f5d852ff97465e6c/patch/kernel/archive/mvebu-5.15/94-helios4-dts-add-wake-on-lan-support.patch"; + sha256 = "sha256-ai4161bTC22023eaVVWsvbk6fQKjkv0P4DQ4DA1Zgow="; + }; + } + ]; + defconfig = "mvebu_v7_defconfig"; + # Make the kernel build a bit faster by disabling GPU modules, which we don't need anyways + structuredExtraConfig = with pkgs.lib.kernel; { + DRM = no; + }; + }; +in { - imports = [ - ./modules/fancontrol.nix - ]; + imports = [ ./modules/fancontrol.nix ]; - nixpkgs.overlays = [ - (import ./overlay.nix) - ]; + nixpkgs.overlays = [ (import ./overlay.nix) ]; nixpkgs.hostPlatform = "armv7l-linux"; boot.initrd.availableKernelModules = [ "ahci_mvebu" ]; - boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_5_15_helios4; + boot.kernelPackages = pkgs.linuxPackagesFor linux_5_15_helios4; } diff --git a/kobol/helios4/overlay.nix b/kobol/helios4/overlay.nix index 41aa9d98..32262c56 100644 --- a/kobol/helios4/overlay.nix +++ b/kobol/helios4/overlay.nix @@ -1,36 +1,4 @@ final: _prev: { - linux_5_15_helios4 = final.linux_5_15.override { - kernelPatches = [ - # A patch to get both PWM fans working - # the patch has been successfully applied to 5.15 and 5.19 - { - patch = final.fetchpatch { - url = "https://raw.githubusercontent.com/armbian/build/bd3466eef2106ea13e85e821f5d852ff97465e6c/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch"; - sha256 = "sha256-eQqMp0+MZd30zkl8DE89oB7czvyqCkfwF2k0EZ69jr0="; - }; - } - # support for Wake-On-Lan - { - patch = final.fetchpatch { - url = "https://raw.githubusercontent.com/armbian/build/bd3466eef2106ea13e85e821f5d852ff97465e6c/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-add_wake_on_gpio_support.patch"; - sha256 = "sha256-OrvnVCU55P0U78jdoxGRJvl29i+Rvq8AdEGSCCpxa2I="; - }; - } - { - patch = final.fetchpatch { - url = "https://raw.githubusercontent.com/armbian/build/bd3466eef2106ea13e85e821f5d852ff97465e6c/patch/kernel/archive/mvebu-5.15/94-helios4-dts-add-wake-on-lan-support.patch"; - sha256 = "sha256-ai4161bTC22023eaVVWsvbk6fQKjkv0P4DQ4DA1Zgow="; - }; - } - - ]; - defconfig = "mvebu_v7_defconfig"; - # Make the kernel build a bit faster by disabling GPU modules, which we don't need anyways - structuredExtraConfig = with final.lib.kernel; { - DRM = no; - }; - }; - ubootHelios4 = final.buildUBoot rec { defconfig = "helios4_defconfig"; filesToInstall = [ "u-boot-spl.kwb" ]; From 9fe6b53cf0bb777cc22b922a10035311d0e1a23b Mon Sep 17 00:00:00 2001 From: Mingye Wang Date: Sat, 11 May 2024 14:29:46 +0800 Subject: [PATCH 0815/1476] cpu/amd/zenpower: new The zenpower module provides much more detailed data than k10temp on Zen CPUs. Use it. --- common/cpu/amd/zenpower.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/cpu/amd/zenpower.nix diff --git a/common/cpu/amd/zenpower.nix b/common/cpu/amd/zenpower.nix new file mode 100644 index 00000000..c6337668 --- /dev/null +++ b/common/cpu/amd/zenpower.nix @@ -0,0 +1,10 @@ +{ lib, config, ... }: +{ + # Enables the zenpower sensor in lieu of the k10temp sensor on Zen CPUs https://git.exozy.me/a/zenpower3 + # On Zen CPUs zenpower produces much more data entries + + imports = [ ./. ]; + boot.blacklistedKernelModules = [ "k10temp" ]; + boot.extraModulePackages = [ config.boot.kernelPackages.zenpower ]; + boot.kernelModules = [ "zenpower" ]; +} From 557645a9dacee8524ec5e43b7f381b5299818495 Mon Sep 17 00:00:00 2001 From: Mingye Wang Date: Sat, 11 May 2024 14:30:59 +0800 Subject: [PATCH 0816/1476] fixup! zenpower flake --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 69e0a314..e523ebc4 100644 --- a/flake.nix +++ b/flake.nix @@ -241,6 +241,7 @@ common-cpu-amd = import ./common/cpu/amd; common-cpu-amd-pstate = import ./common/cpu/amd/pstate.nix; + common-cpu-amd-zenpower = import ./common/cpu/amd/zenpower.nix; common-cpu-amd-raphael-igpu = import ./common/cpu/amd/raphael/igpu.nix; common-cpu-intel = import ./common/cpu/intel; common-cpu-intel-comet-lake = import ./common/cpu/intel/comet-lake; From 772de835d56f2f83277c57fcf1afb5a280c08589 Mon Sep 17 00:00:00 2001 From: Ganga Ram Date: Thu, 16 May 2024 14:32:17 +0400 Subject: [PATCH 0817/1476] Remove buildUBoot function from U-Boot build The buildUBoot function is intended for internal use and is dedicated for Raspberry Pi platforms. With latest nixpkgs it is causing build failure in older uboot(prior to v2023.07) due to a Raspberry Pi patch. Now this function is not used for the U-Boot build. More Information: https://github.com/NixOS/nixpkgs/pull/311614 https://github.com/NixOS/nixpkgs/pull/146634 Signed-off-by: Ganga Ram --- nxp/imx8mp-evk/bsp/imx8mp-uboot.nix | 93 ++++++++++++++++++++++------- nxp/imx8mq-evk/bsp/imx8mq-uboot.nix | 93 ++++++++++++++++++++++------- 2 files changed, 142 insertions(+), 44 deletions(-) diff --git a/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix b/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix index d890c1e3..c542af22 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix @@ -1,19 +1,57 @@ -{pkgs}: -with pkgs; let - inherit buildUBoot; -in - (buildUBoot { - pname = "imx8mp-uboot"; - version = "2023.04"; - - src = fetchgit { +{ stdenv +, lib +, bison +, dtc +, fetchgit +, flex +, gnutls +, libuuid +, ncurses +, openssl +, which +, perl +, buildPackages +}: +let + ubsrc = fetchgit { url = "https://github.com/nxp-imx/uboot-imx.git"; # tag: "lf-6.1.55-2.2.0" rev = "49b102d98881fc28af6e0a8af5ea2186c1d90a5f"; sha256 = "sha256-1j6X82DqezEizeWoSS600XKPNwrQ4yT0vZuUImKAVVA="; }; +in + (stdenv.mkDerivation { + pname = "imx8mp-uboot"; + version = "2023.04"; + src = ubsrc; - extraConfig = '' + postPatch = '' + patchShebangs tools + patchShebangs scripts + ''; + + nativeBuildInputs = [ + bison + flex + openssl + which + ncurses + libuuid + gnutls + openssl + perl + ]; + + depsBuildBuild = [ buildPackages.stdenv.cc ]; + hardeningDisable = [ "all" ]; + enableParallelBuilding = true; + + makeFlags = [ + "DTC=${lib.getExe buildPackages.dtc}" + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" + ]; + + extraConfig = '' CONFIG_USE_BOOTCOMMAND=y CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x45000000; setenv fdt_addr_r 0x44000000; run distro_bootcmd; " CONFIG_CMD_BOOTEFI_SELFTEST=y @@ -25,17 +63,28 @@ in CONFIG_CMD_CACHE=y ''; - enableParallelBuilding = true; - defconfig = "imx8mp_evk_defconfig"; - extraMeta.platforms = ["aarch64-linux"]; + passAsFile = [ "extraConfig" ]; - filesToInstall = [ - "./u-boot-nodtb.bin" - "./spl/u-boot-spl.bin" - "./arch/arm/dts/imx8mp-evk.dtb" - ".config" - ]; - }) - .overrideAttrs (old: { - nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.perl]; + configurePhase = '' + runHook preConfigure + + make imx8mp_evk_defconfig + cat $extraConfigPath >> .config + + runHook postConfigure + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp ./u-boot-nodtb.bin $out + cp ./spl/u-boot-spl.bin $out + cp ./arch/arm/dts/imx8mp-evk.dtb $out + cp .config $out + + runHook postInstall + ''; + + dontStrip = true; }) diff --git a/nxp/imx8mq-evk/bsp/imx8mq-uboot.nix b/nxp/imx8mq-evk/bsp/imx8mq-uboot.nix index 0b2b05b3..fbbf92a1 100644 --- a/nxp/imx8mq-evk/bsp/imx8mq-uboot.nix +++ b/nxp/imx8mq-evk/bsp/imx8mq-uboot.nix @@ -1,19 +1,57 @@ -{pkgs}: -with pkgs; let - inherit buildUBoot; -in - (buildUBoot { - pname = "imx8mq-uboot"; - version = "2023.04"; - - src = fetchgit { +{ stdenv +, lib +, bison +, dtc +, fetchgit +, flex +, gnutls +, libuuid +, ncurses +, openssl +, which +, perl +, buildPackages +}: +let + ubsrc = fetchgit { url = "https://github.com/nxp-imx/uboot-imx.git"; # tag: "lf-6.1.55-2.2.0" rev = "49b102d98881fc28af6e0a8af5ea2186c1d90a5f"; sha256 = "sha256-1j6X82DqezEizeWoSS600XKPNwrQ4yT0vZuUImKAVVA="; }; +in + (stdenv.mkDerivation { + pname = "imx8mq-uboot"; + version = "2023.04"; + src = ubsrc; - extraConfig = '' + postPatch = '' + patchShebangs tools + patchShebangs scripts + ''; + + nativeBuildInputs = [ + bison + flex + openssl + which + ncurses + libuuid + gnutls + openssl + perl + ]; + + depsBuildBuild = [ buildPackages.stdenv.cc ]; + hardeningDisable = [ "all" ]; + enableParallelBuilding = true; + + makeFlags = [ + "DTC=${lib.getExe buildPackages.dtc}" + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" + ]; + + extraConfig = '' CONFIG_USE_BOOTCOMMAND=y CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x45000000; setenv fdt_addr_r 0x44000000; run distro_bootcmd; " CONFIG_CMD_BOOTEFI_SELFTEST=y @@ -25,17 +63,28 @@ in CONFIG_CMD_CACHE=y ''; - enableParallelBuilding = true; - defconfig = "imx8mq_evk_defconfig"; - extraMeta.platforms = ["aarch64-linux"]; + passAsFile = [ "extraConfig" ]; - filesToInstall = [ - "./u-boot-nodtb.bin" - "./spl/u-boot-spl.bin" - "./arch/arm/dts/imx8mq-evk.dtb" - ".config" - ]; - }) - .overrideAttrs (old: { - nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.perl]; + configurePhase = '' + runHook preConfigure + + make imx8mq_evk_defconfig + cat $extraConfigPath >> .config + + runHook postConfigure + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp ./u-boot-nodtb.bin $out + cp ./spl/u-boot-spl.bin $out + cp ./arch/arm/dts/imx8mq-evk.dtb $out + cp .config $out + + runHook postInstall + ''; + + dontStrip = true; }) From 9f7302060cdf9fa7e306bf00815b7188346c9d13 Mon Sep 17 00:00:00 2001 From: Emre Cebi Date: Thu, 16 May 2024 14:51:39 +0200 Subject: [PATCH 0818/1476] Made modifications related to AMD CPU and nvidia GPU changes --- asus/fa507nv/default.nix | 58 ++++++++++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/asus/fa507nv/default.nix b/asus/fa507nv/default.nix index 9531451c..256e31fb 100644 --- a/asus/fa507nv/default.nix +++ b/asus/fa507nv/default.nix @@ -1,21 +1,45 @@ -{ lib, pkgs, ... }: - { - imports = [ - ../../common/cpu/amd - ../../common/cpu/amd/raphael/igpu.nix - ../../common/cpu/amd/pstate.nix - ../../common/gpu/nvidia - ../../common/gpu/nvidia/prime-sync.nix - ../../common/hidpi.nix - ../../common/pc/laptop - ../../common/pc/ssd - ]; + lib, + pkgs, + config, + ... +}: { + imports = [ + ../../common/cpu/amd + ../../common/cpu/amd/raphael/igpu.nix + ../../common/cpu/amd/pstate.nix + ../../common/gpu/nvidia + ../../common/gpu/nvidia/prime.nix + ../../common/hidpi.nix + ../../common/pc/laptop + ../../common/pc/ssd + ../battery.nix + ]; - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6") pkgs.linuxPackages_latest; + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6") pkgs.linuxPackages_latest; - hardware.nvidia.prime = { - amdgpuBusId = "PCI:54:0:0"; - nvidiaBusId = "PCI:1:0:0"; + # The bottom 2 parts are taken from the framework 16-inch laptops configurations. + # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ + boot.kernelParams = lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") ["rtc_cmos.use_acpi_alarm=1"]; + + # AMD has better battery life with PPD over TLP: + # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 + services.power-profiles-daemon.enable = lib.mkDefault true; + + # Adds the missing asus functionality to Linux. + # https://asus-linux.org/manual/asusctl-manual/ + services = { + asusd = { + enable = lib.mkDefault true; + enableUserService = lib.mkDefault true; }; - } + }; + + hardware.nvidia.prime = { + modesetting.enable = lib.mkDefault true; + open = lib.mkDefault false; + nvidiaSettings = lib.mkDefault true; + amdgpuBusId = "PCI:54:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} From d68be3e5e21d829ebce080d96747508fc27ea4e3 Mon Sep 17 00:00:00 2001 From: Emre Cebi Date: Thu, 16 May 2024 17:26:59 +0200 Subject: [PATCH 0819/1476] Fixed error --- asus/fa507nv/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/asus/fa507nv/default.nix b/asus/fa507nv/default.nix index 256e31fb..3a304012 100644 --- a/asus/fa507nv/default.nix +++ b/asus/fa507nv/default.nix @@ -35,11 +35,13 @@ }; }; - hardware.nvidia.prime = { + hardware.nvidia = { modesetting.enable = lib.mkDefault true; open = lib.mkDefault false; nvidiaSettings = lib.mkDefault true; - amdgpuBusId = "PCI:54:0:0"; - nvidiaBusId = "PCI:1:0:0"; + prime = { + amdgpuBusId = "PCI:54:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; }; } From ff1be1e3cdf884df0935ab28745ab13c3c26d828 Mon Sep 17 00:00:00 2001 From: Timo <2300709+toXel@users.noreply.github.com> Date: Wed, 15 May 2024 18:17:36 +0200 Subject: [PATCH 0820/1476] Add missing default xps-15-9570 module to flake.nix --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 69e0a314..df34fb04 100644 --- a/flake.nix +++ b/flake.nix @@ -69,6 +69,7 @@ dell-xps-15-9560 = import ./dell/xps/15-9560; dell-xps-15-9560-intel = import ./dell/xps/15-9560/intel; dell-xps-15-9560-nvidia = import ./dell/xps/15-9560/nvidia; + dell-xps-15-9570 = import ./dell/xps/15-9570; dell-xps-15-9570-intel = import ./dell/xps/15-9570/intel; dell-xps-15-9570-nvidia = import ./dell/xps/15-9570/nvidia; dell-xps-17-9700-intel = import ./dell/xps/17-9700/intel; From b55712de78725c8fcde422ee0a0fe682046e73c3 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Sat, 18 May 2024 11:15:15 +0800 Subject: [PATCH 0821/1476] apple/t2: update to kernel 6.9 --- apple/t2/pkgs/linux-t2.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index 1838fb96..becf96c1 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -5,11 +5,11 @@ let patchRepo = fetchFromGitHub { owner = "t2linux"; repo = "linux-t2-patches"; - rev = "7cd298e227e95bac9a704ffc8f5ff5e89a1bf4d7"; - hash = "sha256-Oi3CwQl0IwdVc9w+pbmJjBnyqwLFhbqFwxs5o0mqtbE="; + rev = "8b0e51ea87f170c559c9e2f437f85367838c2fad"; + hash = "sha256-4YFaLW4WTKdFysIJHnshEaqoiKBFegnZiw4Kv88LjIA="; }; - version = "6.7.7"; + version = "6.9"; majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); in buildLinux (args // { @@ -22,7 +22,7 @@ buildLinux (args // { src = runCommand "patched-source" {} '' cp -r ${fetchzip { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-j+Ufl6C1Mqjthk18GPt2e7j+i7viauOgNnVy9dJSgaM="; + hash = "sha256-RIxLyvF5kw/to8MjAUq2iQ4X0bGk7FY+ovE3zd0eKxM="; }} $out chmod -R u+w $out cd $out From 6e7667c75d01801f1206f5338c4d5b978f92c027 Mon Sep 17 00:00:00 2001 From: Robin Wils Date: Sun, 19 May 2024 19:19:36 +0200 Subject: [PATCH 0822/1476] Add hardware config for lenovo t5 26amr5 (#938) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- README.md | 1 + flake.nix | 1 + lenovo/legion/t526amr5/README.md | 0 lenovo/legion/t526amr5/default.nix | 12 ++++++++++++ 4 files changed, 14 insertions(+) create mode 100644 lenovo/legion/t526amr5/README.md create mode 100644 lenovo/legion/t526amr5/default.nix diff --git a/README.md b/README.md index fe92f582..6c8bfb2d 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,7 @@ See code for all available configurations. | [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `` | | [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | | [Lenovo Legion Slim 7 Gen 7 (AMD)](lenovo/legion/16arha7/) | `` | +| [Lenovo Legion T5 AMR5](lenovo/legion/t526amr5) | `` | | [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | | [Lenovo ThinkPad A475](lenovo/thinkpad/a475) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | diff --git a/flake.nix b/flake.nix index 61f8b1ea..09aefdc4 100644 --- a/flake.nix +++ b/flake.nix @@ -112,6 +112,7 @@ lenovo-legion-16arha7 = import ./lenovo/legion/16arha7; lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h; + lenovo-legion-t526amr5 = import ./lenovo/legion/t526amr5; lenovo-legion-y530-15ich = import ./lenovo/legion/15ich; lenovo-thinkpad = import ./lenovo/thinkpad; lenovo-thinkpad-a475 = import ./lenovo/thinkpad/a475; diff --git a/lenovo/legion/t526amr5/README.md b/lenovo/legion/t526amr5/README.md new file mode 100644 index 00000000..e69de29b diff --git a/lenovo/legion/t526amr5/default.nix b/lenovo/legion/t526amr5/default.nix new file mode 100644 index 00000000..ba1d623c --- /dev/null +++ b/lenovo/legion/t526amr5/default.nix @@ -0,0 +1,12 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/gpu/nvidia + ../../../common/pc/ssd + ]; + + # TPM2 module + security.tpm2.enable = true; +} From 0a944f8c6840f63a7c289580d427e0c1cd3ec3af Mon Sep 17 00:00:00 2001 From: fidgetingbits Date: Mon, 13 May 2024 08:53:53 +0800 Subject: [PATCH 0823/1476] 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 6c8bfb2d..ae31ca10 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 00000000..b5c0946c --- /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 00000000..c20ea891 --- /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 09aefdc4..a025df1f 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; From 2a964239f6b6473a6ff28892109ebf39a6151b1c Mon Sep 17 00:00:00 2001 From: Matz Momme Klint Date: Sun, 12 May 2024 15:49:32 +0200 Subject: [PATCH 0824/1476] omen/14-fb0798ng: init --- README.md | 1 + flake.nix | 1 + omen/14-fb0798ng/README.md | 4 ++++ omen/14-fb0798ng/default.nix | 23 +++++++++++++++++++++++ 4 files changed, 29 insertions(+) create mode 100644 omen/14-fb0798ng/README.md create mode 100644 omen/14-fb0798ng/default.nix diff --git a/README.md b/README.md index ae31ca10..b9191de0 100644 --- a/README.md +++ b/README.md @@ -268,6 +268,7 @@ See code for all available configurations. | [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | | [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | | [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | +| [Omen 15-en0010ca](omen/14-fb0798ng) | `` | | [Omen 15-en0010ca](omen/15-en0010ca) | `` | | [Omen 16-n0005ne](omen/16-n0005ne) | `` | | [Omen 15-en1007sa](omen/15-en1007sa) | `` | diff --git a/flake.nix b/flake.nix index a025df1f..f23b1c55 100644 --- a/flake.nix +++ b/flake.nix @@ -208,6 +208,7 @@ nxp-imx8qm-mek = import ./nxp/imx8qm-mek; hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; hardkernel-odroid-h3 = import ./hardkernel/odroid-h3; + omen-14-fb0798ng = import ./omen/14-fb0798ng; omen-15-en0010ca = import ./omen/15-en0010ca; omen-16-n0005ne = import ./omen/16-n0005ne; omen-15-en1007sa = import ./omen/15-en1007sa; diff --git a/omen/14-fb0798ng/README.md b/omen/14-fb0798ng/README.md new file mode 100644 index 00000000..910c571e --- /dev/null +++ b/omen/14-fb0798ng/README.md @@ -0,0 +1,4 @@ +# HP Omen 14-fb0798ng + +## ACPI platform profiles +This config enables `hp-wmi`, which allows switch between cool, balanced, and performance modes on the platform EC, used by power management tools like `power-profile-daemon` and `tlp`. diff --git a/omen/14-fb0798ng/default.nix b/omen/14-fb0798ng/default.nix new file mode 100644 index 00000000..20ce9a33 --- /dev/null +++ b/omen/14-fb0798ng/default.nix @@ -0,0 +1,23 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../common/cpu/intel + ../../common/gpu/nvidia/prime.nix + ../../common/pc/laptop + ../../common/pc/ssd + ]; + + # Enables ACPI platform profiles + boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + kernelModules = [ "hp-wmi" ]; + }; + + # Enables Wifi and Bluetooth + hardware.enableRedistributableFirmware = true; + + hardware.nvidia.prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} From 050f52eb558f041ec6cf0623a377d6036eb1dc4b Mon Sep 17 00:00:00 2001 From: Tad Fisher Date: Fri, 13 Oct 2023 19:01:16 -0700 Subject: [PATCH 0825/1476] lenovo/thinkpad/p14s: align with Thinkpad T14 configs --- lenovo/thinkpad/p14s/amd/default.nix | 12 ++++++++++++ lenovo/thinkpad/p14s/amd/gen2/default.nix | 4 +--- lenovo/thinkpad/p14s/default.nix | 22 ++++++++++++++++++++++ 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 lenovo/thinkpad/p14s/amd/default.nix create mode 100644 lenovo/thinkpad/p14s/default.nix diff --git a/lenovo/thinkpad/p14s/amd/default.nix b/lenovo/thinkpad/p14s/amd/default.nix new file mode 100644 index 00000000..cbef7c0b --- /dev/null +++ b/lenovo/thinkpad/p14s/amd/default.nix @@ -0,0 +1,12 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../../common/cpu/amd + ../../../../common/gpu/amd + ]; + + # For support of newer AMD GPUs, backlight and internal microphone + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.8") pkgs.linuxPackages_latest; +} diff --git a/lenovo/thinkpad/p14s/amd/gen2/default.nix b/lenovo/thinkpad/p14s/amd/gen2/default.nix index 89632e2e..664f83d3 100644 --- a/lenovo/thinkpad/p14s/amd/gen2/default.nix +++ b/lenovo/thinkpad/p14s/amd/gen2/default.nix @@ -1,9 +1,7 @@ { lib, pkgs, config, ... }: { imports = [ - ../../../../../common/pc/laptop/acpi_call.nix - ../../../../../common/cpu/amd - ../../../../../common/gpu/amd + ../. ]; # For suspending to RAM, set Config -> Power -> Sleep State to "Linux" in EFI. diff --git a/lenovo/thinkpad/p14s/default.nix b/lenovo/thinkpad/p14s/default.nix new file mode 100644 index 00000000..401eba92 --- /dev/null +++ b/lenovo/thinkpad/p14s/default.nix @@ -0,0 +1,22 @@ +{ lib, pkgs, ... }: + +{ + # P14s is a rebadged T14 with slight internal differences. + # This may change for future models, so we duplicate the T14 hierarchy here. + + imports = [ + ../. + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/ssd + ]; + + # Force use of the amdgpu driver for backlight control on kernel versions where the + # native backlight driver is not already preferred. This is preferred over the + # "vendor" setting, in this case the thinkpad_acpi driver. + # See https://hansdegoede.livejournal.com/27130.html + # See https://lore.kernel.org/linux-acpi/20221105145258.12700-1-hdegoede@redhat.com/ + boot.kernelParams = lib.mkIf (lib.versionOlder pkgs.linux.version "6.2") [ "acpi_backlight=native" ]; + + # see https://github.com/NixOS/nixpkgs/issues/69289 + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest; +} From d526edb79b6581ce65ea36783c9552f53251ed0d Mon Sep 17 00:00:00 2001 From: Tad Fisher Date: Fri, 13 Oct 2023 19:02:48 -0700 Subject: [PATCH 0826/1476] lenovo/thinkpad/p14s/amd/gen1: init --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/p14s/amd/gen1/default.nix | 5 +++++ 3 files changed, 7 insertions(+) create mode 100644 lenovo/thinkpad/p14s/amd/gen1/default.nix diff --git a/README.md b/README.md index b9191de0..2e8b175b 100644 --- a/README.md +++ b/README.md @@ -192,6 +192,7 @@ See code for all available configurations. | [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | | [Lenovo ThinkPad L480](lenovo/thinkpad/l480) | `` | | [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | +| [Lenovo ThinkPad P14s AMD Gen 1](lenovo/thinkpad/p14s/amd/gen1) | `` | | [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | | [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | | [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | diff --git a/flake.nix b/flake.nix index f23b1c55..a2cf2cec 100644 --- a/flake.nix +++ b/flake.nix @@ -128,6 +128,7 @@ lenovo-thinkpad-l480 = import ./lenovo/thinkpad/l480; lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1; lenovo-thinkpad-p1-gen3 = import ./lenovo/thinkpad/p1/3th-gen; + lenovo-thinkpad-p14s-amd-gen1 = import ./lenovo/thinkpad/p14s/amd/gen1; lenovo-thinkpad-p14s-amd-gen2 = import ./lenovo/thinkpad/p14s/amd/gen2; lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1; lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50; diff --git a/lenovo/thinkpad/p14s/amd/gen1/default.nix b/lenovo/thinkpad/p14s/amd/gen1/default.nix new file mode 100644 index 00000000..665d3d41 --- /dev/null +++ b/lenovo/thinkpad/p14s/amd/gen1/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../. + ]; +} From 79cb5c5df64becdf420d02f6a34f8e405723382a Mon Sep 17 00:00:00 2001 From: Tad Fisher Date: Fri, 13 Oct 2023 19:03:46 -0700 Subject: [PATCH 0827/1476] lenovo/thinkpad/p14s/amd/gen3: init --- README.md | 3 ++- flake.nix | 1 + lenovo/thinkpad/p14s/amd/gen3/default.nix | 12 ++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 lenovo/thinkpad/p14s/amd/gen3/default.nix diff --git a/README.md b/README.md index 2e8b175b..9bc94b4e 100644 --- a/README.md +++ b/README.md @@ -192,8 +192,9 @@ See code for all available configurations. | [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | | [Lenovo ThinkPad L480](lenovo/thinkpad/l480) | `` | | [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | -| [Lenovo ThinkPad P14s AMD Gen 1](lenovo/thinkpad/p14s/amd/gen1) | `` | +| [Lenovo ThinkPad P14s AMD Gen 1](lenovo/thinkpad/p14s/amd/gen1) | `` | | [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | +| [Lenovo ThinkPad P14s AMD Gen 3](lenovo/thinkpad/p14s/amd/gen3) | `` | | [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | | [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | | [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | diff --git a/flake.nix b/flake.nix index a2cf2cec..82889475 100644 --- a/flake.nix +++ b/flake.nix @@ -130,6 +130,7 @@ lenovo-thinkpad-p1-gen3 = import ./lenovo/thinkpad/p1/3th-gen; lenovo-thinkpad-p14s-amd-gen1 = import ./lenovo/thinkpad/p14s/amd/gen1; lenovo-thinkpad-p14s-amd-gen2 = import ./lenovo/thinkpad/p14s/amd/gen2; + lenovo-thinkpad-p14s-amd-gen3 = import ./lenovo/thinkpad/p14s/amd/gen3; lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1; lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50; lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51; diff --git a/lenovo/thinkpad/p14s/amd/gen3/default.nix b/lenovo/thinkpad/p14s/amd/gen3/default.nix new file mode 100644 index 00000000..f70dde41 --- /dev/null +++ b/lenovo/thinkpad/p14s/amd/gen3/default.nix @@ -0,0 +1,12 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../../../common/cpu/amd/pstate.nix + ]; + + # For the Qualcomm NFA-725A (Device 1103) wireless network controller + # See https://bugzilla.redhat.com/show_bug.cgi?id=2047878 + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; +} From 0d3eafc0142cf51f99c3aea671163d9b737d3f95 Mon Sep 17 00:00:00 2001 From: Tad Fisher Date: Fri, 13 Oct 2023 19:04:14 -0700 Subject: [PATCH 0828/1476] lenovo/thinkpad/p14s/amd/gen4: init --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/p14s/amd/gen4/default.nix | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 lenovo/thinkpad/p14s/amd/gen4/default.nix diff --git a/README.md b/README.md index 9bc94b4e..fc1e63ea 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,7 @@ See code for all available configurations. | [Lenovo ThinkPad P14s AMD Gen 1](lenovo/thinkpad/p14s/amd/gen1) | `` | | [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | | [Lenovo ThinkPad P14s AMD Gen 3](lenovo/thinkpad/p14s/amd/gen3) | `` | +| [Lenovo ThinkPad P14s AMD Gen 4](lenovo/thinkpad/p14s/amd/gen4) | `` | | [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | | [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | | [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | diff --git a/flake.nix b/flake.nix index 82889475..b248faba 100644 --- a/flake.nix +++ b/flake.nix @@ -131,6 +131,7 @@ lenovo-thinkpad-p14s-amd-gen1 = import ./lenovo/thinkpad/p14s/amd/gen1; lenovo-thinkpad-p14s-amd-gen2 = import ./lenovo/thinkpad/p14s/amd/gen2; lenovo-thinkpad-p14s-amd-gen3 = import ./lenovo/thinkpad/p14s/amd/gen3; + lenovo-thinkpad-p14s-amd-gen4 = import ./lenovo/thinkpad/p14s/amd/gen4; lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1; lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50; lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51; diff --git a/lenovo/thinkpad/p14s/amd/gen4/default.nix b/lenovo/thinkpad/p14s/amd/gen4/default.nix new file mode 100644 index 00000000..cc6244e7 --- /dev/null +++ b/lenovo/thinkpad/p14s/amd/gen4/default.nix @@ -0,0 +1,11 @@ +{ lib, pkgs, config, ... }: +{ + imports = [ + ../. + ../../../../../common/cpu/amd/pstate.nix + ]; + + # For the Qualcomm NFA765 [17cb:1103] wireless network controller + # See https://bugzilla.redhat.com/show_bug.cgi?id=2047878 + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; +} From 2659a52d7a87ff244de51ea9367ee28211a1cc64 Mon Sep 17 00:00:00 2001 From: Tad Fisher Date: Fri, 13 Oct 2023 19:04:48 -0700 Subject: [PATCH 0829/1476] lenovo/thinkpad/t14/amd/gen4: init --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/t14/amd/gen4/default.nix | 12 ++++++++++++ 3 files changed, 14 insertions(+) create mode 100644 lenovo/thinkpad/t14/amd/gen4/default.nix diff --git a/README.md b/README.md index fc1e63ea..03d35a0a 100644 --- a/README.md +++ b/README.md @@ -205,6 +205,7 @@ See code for all available configurations. | [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | | [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | | [Lenovo ThinkPad T14 AMD Gen 3](lenovo/thinkpad/t14/amd/gen3) | `` | +| [Lenovo ThinkPad T14 AMD Gen 4](lenovo/thinkpad/t14/amd/gen4) | `` | | [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | | [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | | [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | diff --git a/flake.nix b/flake.nix index b248faba..b4d63439 100644 --- a/flake.nix +++ b/flake.nix @@ -141,6 +141,7 @@ lenovo-thinkpad-t14-amd-gen1 = import ./lenovo/thinkpad/t14/amd/gen1; lenovo-thinkpad-t14-amd-gen2 = import ./lenovo/thinkpad/t14/amd/gen2; lenovo-thinkpad-t14-amd-gen3 = import ./lenovo/thinkpad/t14/amd/gen3; + lenovo-thinkpad-t14-amd-gen4 = import ./lenovo/thinkpad/t14/amd/gen4; lenovo-thinkpad-t14s = import ./lenovo/thinkpad/t14s; lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1; lenovo-thinkpad-t410 = import ./lenovo/thinkpad/t410; diff --git a/lenovo/thinkpad/t14/amd/gen4/default.nix b/lenovo/thinkpad/t14/amd/gen4/default.nix new file mode 100644 index 00000000..e61a3a0d --- /dev/null +++ b/lenovo/thinkpad/t14/amd/gen4/default.nix @@ -0,0 +1,12 @@ +{ lib, pkgs, config, ... }: + +{ + imports = [ + ../. + ../../../../../common/cpu/amd/pstate.nix + ]; + + # For the Qualcomm NFA765 [17cb:1103] wireless network controller + # See https://bugzilla.redhat.com/show_bug.cgi?id=2047878 + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; +} From 55f8e366f032d46693014fb3c5813065a6262b8a Mon Sep 17 00:00:00 2001 From: Tad Fisher Date: Fri, 13 Oct 2023 19:14:05 -0700 Subject: [PATCH 0830/1476] lenovo/thinkpad/p14s/amd/gen2: enable amd_pstate --- lenovo/thinkpad/p14s/amd/gen2/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/p14s/amd/gen2/default.nix b/lenovo/thinkpad/p14s/amd/gen2/default.nix index 664f83d3..7c496f6e 100644 --- a/lenovo/thinkpad/p14s/amd/gen2/default.nix +++ b/lenovo/thinkpad/p14s/amd/gen2/default.nix @@ -2,6 +2,7 @@ { imports = [ ../. + ../../../../../common/cpu/amd/pstate.nix ]; # For suspending to RAM, set Config -> Power -> Sleep State to "Linux" in EFI. From 81f14570232388b80e62874b2a8153ee53362891 Mon Sep 17 00:00:00 2001 From: Tad Fisher Date: Fri, 13 Oct 2023 19:15:57 -0700 Subject: [PATCH 0831/1476] lenovo/thinkpad/t14/amd/gen2: enable amd_pstate --- lenovo/thinkpad/t14/amd/gen2/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/t14/amd/gen2/default.nix b/lenovo/thinkpad/t14/amd/gen2/default.nix index 795b9a81..0e745728 100644 --- a/lenovo/thinkpad/t14/amd/gen2/default.nix +++ b/lenovo/thinkpad/t14/amd/gen2/default.nix @@ -3,6 +3,7 @@ { imports = [ ../. + ../../../../../common/cpu/amd/pstate.nix ]; # For support of MEDIATEK Corp. Device 7961 wireless network controller, see https://lwn.net/Articles/843303/ From e85c7a78d2657f852a931db3e782c4fab8196fb7 Mon Sep 17 00:00:00 2001 From: Tad Fisher Date: Fri, 13 Oct 2023 19:05:00 -0700 Subject: [PATCH 0832/1476] lenovo/thinkpad/t14/amd/gen3: enable amd_pstate --- lenovo/thinkpad/t14/amd/gen3/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/t14/amd/gen3/default.nix b/lenovo/thinkpad/t14/amd/gen3/default.nix index 617a3a43..f70dde41 100644 --- a/lenovo/thinkpad/t14/amd/gen3/default.nix +++ b/lenovo/thinkpad/t14/amd/gen3/default.nix @@ -3,6 +3,7 @@ { imports = [ ../. + ../../../../../common/cpu/amd/pstate.nix ]; # For the Qualcomm NFA-725A (Device 1103) wireless network controller From f0cf56878046c42ec2096a2ade89203e7348917b Mon Sep 17 00:00:00 2001 From: "Quinn X. J." Date: Tue, 14 May 2024 22:47:54 +1000 Subject: [PATCH 0833/1476] common/gpu/intel: add extraPackages32 --- common/gpu/intel/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index b8ab823c..73591cf8 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -21,6 +21,12 @@ libvdpau-va-gl intel-media-driver ]; + + hardware.opengl.extraPackages32 = with pkgs.driversi686Linux; [ + (if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver) + libvdpau-va-gl + intel-media-driver + ]; } ]; } From d9e0b26202fd500cf3e79f73653cce7f7d541191 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 02:38:05 +0000 Subject: [PATCH 0834/1476] build(deps): bump cachix/install-nix-action from 26 to 27 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 26 to 27. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v26...V27) --- 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 d57791a8..54a9c486 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@v26 + - uses: cachix/install-nix-action@V27 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version From cedb27beb1840e2856b0769025392ba82925bb5c Mon Sep 17 00:00:00 2001 From: Mic92 <96200+Mic92@users.noreply.github.com> Date: Sun, 26 May 2024 08:04:14 +0000 Subject: [PATCH 0835/1476] Added config for Huawei Matebook X Pro (2020) (#957) Created a config file for Huawei Matebook X Pro (2020). This file should work on all versions other than MACHC-WAH9L as that one does not include the Nvidia MX250 dGPU. --- README.md | 1 + flake.nix | 1 + huawei/machc-wa/README.md | 3 +++ huawei/machc-wa/default.nix | 28 ++++++++++++++++++++++++++++ 4 files changed, 33 insertions(+) create mode 100644 huawei/machc-wa/README.md create mode 100644 huawei/machc-wa/default.nix diff --git a/README.md b/README.md index 03d35a0a..d3ca5c82 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ See code for all available configurations. | [HP Elitebook 845g8](hp/elitebook/845/g8) | `` | | [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | | [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | +| [Huawei Matebook X Pro (2020)](huawei/machc-wa) | `` | | [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | diff --git a/flake.nix b/flake.nix index b4d63439..58621d7b 100644 --- a/flake.nix +++ b/flake.nix @@ -96,6 +96,7 @@ hp-elitebook-845g7 = import ./hp/elitebook/845/g7; hp-elitebook-845g8 = import ./hp/elitebook/845/g8; hp-elitebook-845g9 = import ./hp/elitebook/845/g9; + huawei-machc-wa = import ./huawei/machc-wa; hp-notebook-14-df0023 = import ./hp/notebook/14-df0023; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; diff --git a/huawei/machc-wa/README.md b/huawei/machc-wa/README.md new file mode 100644 index 00000000..27a1ccf0 --- /dev/null +++ b/huawei/machc-wa/README.md @@ -0,0 +1,3 @@ +# Huawei Matebook X Pro (2020) + +This is a very standard device that needs little configuration. The module mainly imports the common modules for its CPU, GPU, SSD etc. and enables ppd for power management. Nvidia prime offload is also enabled. This configuration should work with all Matebook X Pro models from 2020 (MACHC-WA*) other than MACHC-WAH9L as it does not contain the Nvidia GPU. \ No newline at end of file diff --git a/huawei/machc-wa/default.nix b/huawei/machc-wa/default.nix new file mode 100644 index 00000000..e2bc0a8a --- /dev/null +++ b/huawei/machc-wa/default.nix @@ -0,0 +1,28 @@ +{ + lib, + pkgs, + config, + ... +}: { + imports = [ + ../../common/cpu/intel + ../../common/cpu/intel/comet-lake + ../../common/gpu/nvidia + ../../common/gpu/nvidia/prime.nix + ../../common/hidpi.nix + ../../common/pc/laptop + ../../common/pc/ssd + ]; + + hardware.nvidia = { + modesetting.enable = lib.mkDefault true; + open = lib.mkDefault false; + nvidiaSettings = lib.mkDefault true; + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + + services.power-profiles-daemon.enable = lib.mkDefault true; +} From 33026a05f412560c0979f14b20fa397d6e08ea31 Mon Sep 17 00:00:00 2001 From: "Bradon Kanyid (rattboi)" Date: Fri, 24 May 2024 04:54:53 +0000 Subject: [PATCH 0836/1476] framework: Add framework-laptop-kmod for 16" model as well in https://github.com/NixOS/nixos-hardware/pull/903 , the framework-laptop-kmod was added, and automatically setup for 13" models. The 16" model will also be able to take advantage of the kmod, once the 6.10 kernel patches are in place. Kernel Patchset: https://lore.kernel.org/chrome-platform/20231005160701.19987-1-dustin@howett.net/ --- framework/16-inch/common/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/16-inch/common/default.nix b/framework/16-inch/common/default.nix index 9dc402c4..547f98f4 100644 --- a/framework/16-inch/common/default.nix +++ b/framework/16-inch/common/default.nix @@ -2,6 +2,7 @@ imports = [ ../../../common/pc/laptop ../../../common/pc/laptop/ssd + ../../kmod.nix ../../framework-tool.nix ]; From 816528f00e287f7eadc57a0be382442516b89070 Mon Sep 17 00:00:00 2001 From: Andre Date: Thu, 23 May 2024 20:40:09 -0400 Subject: [PATCH 0837/1476] Add kernel version check for Lenovo 16ARHA7 speaker fix --- lenovo/legion/16arha7/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lenovo/legion/16arha7/default.nix b/lenovo/legion/16arha7/default.nix index da8174b9..36b10ee7 100644 --- a/lenovo/legion/16arha7/default.nix +++ b/lenovo/legion/16arha7/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: let lenovo-speaker-fix = pkgs.callPackage ./audio/lenovo-16ARHA7_speaker-fix.nix { @@ -14,7 +14,8 @@ in ../../../common/pc/laptop/ssd ]; - boot.extraModulePackages = [ lenovo-speaker-fix ]; + # Kernel 6.9 includes the speaker fix, so only install this on systems with older kernels. + boot.extraModulePackages = lib.mkIf (!(lib.versionOlder config.boot.kernelPackages.kernel.version "6.9")) [ lenovo-speaker-fix ]; # √(2560² + 1600²) px / 16 in ≃ 189 dpi services.xserver.dpi = 189; From 888d915fe8aae23214a38833ccafb04a87d9177d Mon Sep 17 00:00:00 2001 From: Andre Date: Thu, 23 May 2024 23:46:30 -0400 Subject: [PATCH 0838/1476] Update readme for 16arha7 --- lenovo/legion/16arha7/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/legion/16arha7/README.md b/lenovo/legion/16arha7/README.md index 9c8193a3..7e806883 100644 --- a/lenovo/legion/16arha7/README.md +++ b/lenovo/legion/16arha7/README.md @@ -1,6 +1,6 @@ ## Introduction -This configuration includes a fix to get audio playing over the speakers, however, the volume is low. If you know of a workaround or fix, please contribute it to the repo!! +This configuration includes a fix to get the speakers working on kernels earlier than 6.9.0. Kernels after 6.9.0 already have this patch built-in. ## Setup at the time of testing ``` From d946893c3b99dab02f97dbde49d3c62223d4ef68 Mon Sep 17 00:00:00 2001 From: Andy3153 Date: Mon, 20 May 2024 00:55:37 +0300 Subject: [PATCH 0839/1476] add config for ASUS TUF FX506HM --- README.md | 1 + asus/fx506hm/README.md | 28 ++++++++++++++++++++++++++++ asus/fx506hm/default.nix | 24 ++++++++++++++++++++++++ flake.nix | 1 + 4 files changed, 54 insertions(+) create mode 100644 asus/fx506hm/README.md create mode 100644 asus/fx506hm/default.nix diff --git a/README.md b/README.md index d3ca5c82..23ebd3b5 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,7 @@ See code for all available configurations. | [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | | [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | +| [Asus TUF FX506HM](asus/fx506hm) | `` | | [Asus TUF FA507RM](asus/fa507rm) | `` | | [Asus TUF FA507NV](asus/fa507nv) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | diff --git a/asus/fx506hm/README.md b/asus/fx506hm/README.md new file mode 100644 index 00000000..d20ee889 --- /dev/null +++ b/asus/fx506hm/README.md @@ -0,0 +1,28 @@ + +# [ASUS TUF Gaming F15 FX506HM (2021)](https://www.asus.com/laptops/for-gaming/tuf-gaming/2021-asus-tuf-gaming-f15/) + +This imports common modules for the Intel CPU and iGPU, Nvidia and PRIME render offloading, basic laptop configs, basic SSD configs and configs for ASUS batteries. + +On top of that, it sets the right PCI bus IDs for the iGPU and dGPU to make PRIME work well and enables modesetting. + +## Useful other things to consider in your configuration +### Battery charging limit +Due to the common module for ASUS batteries, you can make your battery only charge up to a certain percentage to improve its life. You can place something similar to the following in your configuration to enable it: + +```nix +hardware.asus.battery = +{ + chargeUpto = 85; # Maximum level of charge for your battery, as a percentage. + enableChargeUptoScript = true; # Whether to add charge-upto to environment.systemPackages. `charge-upto 85` temporarily sets the charge limit to 85%. +}; +``` + +### OpenRGB +You can use OpenRGB to control the RGB keyboard on this laptop. There's also plugins for it to get some extra RGB lighting modes if you wish. You can place the following in your configuration to enable it: + +```nix +boot.kernelModules = [ "i2c-dev" ]; +hardware.i2c.enable = true; +services.udev.packages = [ pkgs.openrgb ]; +services.hardware.openrgb.enable = true; +``` diff --git a/asus/fx506hm/default.nix b/asus/fx506hm/default.nix new file mode 100644 index 00000000..90b32cf4 --- /dev/null +++ b/asus/fx506hm/default.nix @@ -0,0 +1,24 @@ +{ lib, ... }: + +{ + imports = + [ + ../../common/cpu/intel + ../../common/gpu/nvidia + ../../common/gpu/nvidia/prime.nix + ../../common/pc/laptop + ../../common/pc/ssd + ../battery.nix + ] + + hardware.nvidia = + { + modesetting.enable = lib.mkDefault true; + + prime = + { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; +} diff --git a/flake.nix b/flake.nix index 58621d7b..243485b2 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,7 @@ asus-battery = import ./asus/battery.nix; asus-ally-rc71l = import ./asus/ally/rc71l; asus-fx504gd = import ./asus/fx504gd; + asus-fx506hm = import ./asus/fx506hm; asus-fa507nv = import ./asus/fa507nv; asus-fa507rm = import ./asus/fa507rm; asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace; From 449b3abafabff9057de95d2f92fd2eaac4da024d Mon Sep 17 00:00:00 2001 From: Andy3153 Date: Mon, 20 May 2024 13:15:58 +0300 Subject: [PATCH 0840/1476] fix error --- asus/fx506hm/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asus/fx506hm/default.nix b/asus/fx506hm/default.nix index 90b32cf4..115882be 100644 --- a/asus/fx506hm/default.nix +++ b/asus/fx506hm/default.nix @@ -9,7 +9,7 @@ ../../common/pc/laptop ../../common/pc/ssd ../battery.nix - ] + ]; hardware.nvidia = { From 7caa5b2a35c4ae70328f853b3fe24870cb35a8a6 Mon Sep 17 00:00:00 2001 From: Andre Date: Sun, 12 May 2024 11:47:49 -0400 Subject: [PATCH 0841/1476] Add Surface Pro 9 with Intel PSR disabled --- flake.nix | 1 + microsoft/surface-pro/9/default.nix | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 microsoft/surface-pro/9/default.nix diff --git a/flake.nix b/flake.nix index 243485b2..8ea11c71 100644 --- a/flake.nix +++ b/flake.nix @@ -203,6 +203,7 @@ microsoft-surface-laptop-amd = import ./microsoft/surface/surface-laptop-amd; microsoft-surface-common = import ./microsoft/surface/common; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; + microsoft-surface-pro-9 = import ./microsoft/surface-pro/9; milkv-pioneer = import ./milkv/pioneer; morefine-m600 = import ./morefine/m600; msi-b350-tomahawk = import ./msi/b350-tomahawk; diff --git a/microsoft/surface-pro/9/default.nix b/microsoft/surface-pro/9/default.nix new file mode 100644 index 00000000..60b82ad3 --- /dev/null +++ b/microsoft/surface-pro/9/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ ../../surface/surface-pro-intel ]; + + boot.kernelParams = [ "i915.enable_psr=0" ]; # Disable Intel Panel Self Refresh +} \ No newline at end of file From 1af5ef15469a55bef1a9136324437e4ddede2c5c Mon Sep 17 00:00:00 2001 From: Andre Date: Sun, 12 May 2024 12:00:44 -0400 Subject: [PATCH 0842/1476] Add Readme for Surface Pro 9 --- microsoft/surface-pro/9/README.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 microsoft/surface-pro/9/README.md diff --git a/microsoft/surface-pro/9/README.md b/microsoft/surface-pro/9/README.md new file mode 100644 index 00000000..5ec8e80a --- /dev/null +++ b/microsoft/surface-pro/9/README.md @@ -0,0 +1,7 @@ +# Microsoft Surface Pro 9 + +## Note on Intel Panel Self Refresh (PSR) + +Intel GPUs support a feature called [Panel Self Refresh (PSR)](https://www.intel.com/content/www/us/en/support/articles/000057194/graphics.html), where the display refreshes independently of the OS. Out of the box, this can cause lots of display lag, stuttering, and enormous refresh rate drops. + +This configuration disables PSR by adding `i915.enable_psr=0` to the kernel boot parameters, at the cost of some battery life. If you want to turn PSR back on, add `i915.enable_psr=1` to your `boot.kernelParams`. From d789d9a2de2cea67655d38b7a37a30bdb1838e8b Mon Sep 17 00:00:00 2001 From: Andre Date: Mon, 20 May 2024 10:10:00 -0400 Subject: [PATCH 0843/1476] Add Surface Pro 9 to Readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 23ebd3b5..4b851420 100644 --- a/README.md +++ b/README.md @@ -269,6 +269,7 @@ See code for all available configurations. | [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd) | `` | | [Microsoft Surface Range (Common Modules)](microsoft/surface/common) | `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | +| [Microsoft Surface Pro 9](microsoft/surface-pro/9) | `` | | [Morefine M600](morefine/m600) | `` | | [NXP iMX8 MPlus Evaluation Kit](nxp/imx8mp-evk) | `` | | [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | From 2e7d6c568063c83355fe066b8a8917ee758de1b8 Mon Sep 17 00:00:00 2001 From: fidgetingbits Date: Mon, 20 May 2024 10:06:05 +0800 Subject: [PATCH 0844/1476] asus/zenbook/ux371: init --- README.md | 1 + asus/zenbook/ux371/README.md | 47 ++++++++++++++ asus/zenbook/ux371/default.nix | 24 +++++++ common/cpu/intel/cpu-only.nix | 4 +- common/cpu/intel/tiger-lake/default.nix | 12 ++++ common/gpu/intel/default.nix | 84 +++++++++++++++++-------- flake.nix | 1 + 7 files changed, 144 insertions(+), 29 deletions(-) create mode 100644 asus/zenbook/ux371/README.md create mode 100644 asus/zenbook/ux371/default.nix create mode 100644 common/cpu/intel/tiger-lake/default.nix diff --git a/README.md b/README.md index 4b851420..56fdd7ad 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,7 @@ See code for all available configurations. | [Asus TUF FX506HM](asus/fx506hm) | `` | | [Asus TUF FA507RM](asus/fa507rm) | `` | | [Asus TUF FA507NV](asus/fa507nv) | `` | +| [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Deciso DEC series](deciso/dec) | `` | | [Dell G3 3779](dell/g3/3779) | `` | diff --git a/asus/zenbook/ux371/README.md b/asus/zenbook/ux371/README.md new file mode 100644 index 00000000..6effc44c --- /dev/null +++ b/asus/zenbook/ux371/README.md @@ -0,0 +1,47 @@ +# Asus Zenbook Flip S13 + +This is tested on an [UX371](https://www.asus.com/laptops/for-home/zenbook/zenbook-flip-s-ux371-11th-gen-intel/). + +## Tested Hardware + +```bash +lspci -nn +0000:00:00.0 Host bridge [0600]: Intel Corporation 11th Gen Core Processor Host Bridge/DRAM Registers [8086:9a14] (rev 01) +0000:00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] [8086:9a49] (rev 01) +0000:00:04.0 Signal processing controller [1180]: Intel Corporation TigerLake-LP Dynamic Tuning Processor Participant [8086:9a03] (rev 01) +0000:00:07.0 PCI bridge [0604]: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #0 [8086:9a23] (rev 01) +0000:00:07.1 PCI bridge [0604]: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #1 [8086:9a25] (rev 01) +0000:00:08.0 System peripheral [0880]: Intel Corporation GNA Scoring Accelerator module [8086:9a11] (rev 01) +0000:00:0a.0 Signal processing controller [1180]: Intel Corporation Tigerlake Telemetry Aggregator Driver [8086:9a0d] (rev 01) +0000:00:0d.0 USB controller [0c03]: Intel Corporation Tiger Lake-LP Thunderbolt 4 USB Controller [8086:9a13] (rev 01) +0000:00:0d.2 USB controller [0c03]: Intel Corporation Tiger Lake-LP Thunderbolt 4 NHI #0 [8086:9a1b] (rev 01) +0000:00:0e.0 RAID bus controller [0104]: Intel Corporation Volume Management Device NVMe RAID Controller [8086:9a0b] +0000:00:12.0 Serial controller [0700]: Intel Corporation Tiger Lake-LP Integrated Sensor Hub [8086:a0fc] (rev 20) +0000:00:14.0 USB controller [0c03]: Intel Corporation Tiger Lake-LP USB 3.2 Gen 2x1 xHCI Host Controller [8086:a0ed] (rev 20) +0000:00:14.2 RAM memory [0500]: Intel Corporation Tiger Lake-LP Shared SRAM [8086:a0ef] (rev 20) +0000:00:14.3 Network controller [0280]: Intel Corporation Wi-Fi 6 AX201 [8086:a0f0] (rev 20) +0000:00:15.0 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #0 [8086:a0e8] (rev 20) +0000:00:15.1 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #1 [8086:a0e9] (rev 20) +0000:00:16.0 Communication controller [0780]: Intel Corporation Tiger Lake-LP Management Engine Interface [8086:a0e0] (rev 20) +0000:00:1d.0 System peripheral [0880]: Intel Corporation RST VMD Managed Controller [8086:09ab] +0000:00:1f.0 ISA bridge [0601]: Intel Corporation Tiger Lake-LP LPC Controller [8086:a082] (rev 20) +0000:00:1f.3 Multimedia audio controller [0401]: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller [8086:a0c8] (rev 20) +0000:00:1f.4 SMBus [0c05]: Intel Corporation Tiger Lake-LP SMBus Controller [8086:a0a3] (rev 20) +0000:00:1f.5 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP SPI Controller [8086:a0a4] (rev 20) +10000:e0:1d.0 PCI bridge [0604]: Intel Corporation Tiger Lake-LP PCI Express Root Port #9 [8086:a0b0] (rev 20) +10000:e1:00.0 Non-Volatile memory controller [0108]: Sandisk Corp WD Black SN750 / PC SN730 / Red SN700 NVMe SSD [15b7:5006] +``` + +## Updating Firmware + +First enable `fwupd` in your config + +```nix +services.fwupd.enable = true; +``` + +Then run + +```bash + $ fwupdmgr update +``` diff --git a/asus/zenbook/ux371/default.nix b/asus/zenbook/ux371/default.nix new file mode 100644 index 00000000..8601e2b2 --- /dev/null +++ b/asus/zenbook/ux371/default.nix @@ -0,0 +1,24 @@ +{ + config, + lib, + pkgs, + inputs, + ... +}: +{ + imports = [ + ../../../common/cpu/intel/tiger-lake + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ../../battery.nix + ]; + + boot.kernelParams = lib.mkIf (config.hardware.intelgpu.driver == "xe") [ + "i915.force_probe=!9a49" + "xe.force_probe=9a49" + ]; + + hardware.enableRedistributableFirmware = lib.mkDefault true; + services.thermald.enable = lib.mkDefault true; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; +} diff --git a/common/cpu/intel/cpu-only.nix b/common/cpu/intel/cpu-only.nix index c30f0c57..e42e90bd 100644 --- a/common/cpu/intel/cpu-only.nix +++ b/common/cpu/intel/cpu-only.nix @@ -1,6 +1,4 @@ { config, lib, ... }: - { - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/common/cpu/intel/tiger-lake/default.nix b/common/cpu/intel/tiger-lake/default.nix new file mode 100644 index 00000000..86afdccc --- /dev/null +++ b/common/cpu/intel/tiger-lake/default.nix @@ -0,0 +1,12 @@ +{ config, lib, ... }: +{ + imports = [ ../. ]; + config = lib.mkMerge [ + (lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8") { + hardware.intelgpu.driver = "xe"; + }) + (lib.mkIf (config.hardware.intelgpu.driver == "i915") { + boot.kernelParams = [ "i915.enable_guc=3" ]; + }) + ]; +} diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index 73591cf8..91c8765f 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -1,32 +1,64 @@ -{ config, lib, pkgs, ... }: - { - options.hardware.intelgpu.loadInInitrd = lib.mkEnableOption (lib.mdDoc - "loading `i195` kernelModule at stage 1. (Add `i915` to `boot.initrd.kernelModules`)" - ) // { - default = true; + config, + lib, + pkgs, + ... +}: +{ + options.hardware.intelgpu.driver = lib.mkOption { + description = "Intel GPU driver to use"; + type = lib.types.enum [ + "i915" + "xe" + ]; + default = "i915"; }; - config = lib.mkMerge [ - (lib.mkIf config.hardware.intelgpu.loadInInitrd { - boot.initrd.kernelModules = [ "i915" ]; - }) - { - environment.variables = { - VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); - }; + options.hardware.intelgpu.loadInInitrd = + lib.mkEnableOption ( + lib.mdDoc "Load the Intel GPU kernel module at stage 1 boot. (Added to `boot.initrd.kernelModules`)" + ) + // { + default = true; + }; - hardware.opengl.extraPackages = with pkgs; [ - (if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver) - libvdpau-va-gl - intel-media-driver - ]; + config = { + boot.initrd.kernelModules = [ config.hardware.intelgpu.driver ]; - hardware.opengl.extraPackages32 = with pkgs.driversi686Linux; [ - (if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver) - libvdpau-va-gl - intel-media-driver - ]; - } - ]; + environment.variables = { + VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); + }; + + hardware.opengl.extraPackages = with pkgs; [ + ( + if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then + vaapiIntel + else + intel-vaapi-driver + ) + libvdpau-va-gl + intel-media-driver + ]; + + hardware.opengl.extraPackages32 = with pkgs.driversi686Linux; [ + ( + if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then + vaapiIntel + else + intel-vaapi-driver + ) + libvdpau-va-gl + intel-media-driver + ]; + + assertions = [ + { + assertion = ( + config.hardware.intelgpu.driver != "xe" + || lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8" + ); + message = "Intel Xe GPU driver is not supported on kernels earlier than 6.8. Update or use the i915 driver."; + } + ]; + }; } diff --git a/flake.nix b/flake.nix index 8ea11c71..9bcef079 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,7 @@ asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace; asus-rog-strix-g513im = import ./asus/rog-strix/g513im; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; + asus-zenbook-ux371 = import ./asus/zenbook/ux371; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; asus-zephyrus-ga402x = import ./asus/zephyrus/ga402x; From 6d24140f51333fc5021dea0ae5faef1bd19020be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stian=20S=C3=B8rby?= <51554341+ssouthcity@users.noreply.github.com> Date: Thu, 23 May 2024 22:30:44 +0200 Subject: [PATCH 0845/1476] added lenovo legion 15ach6h to flake.nix --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 9bcef079..89c1fcb5 100644 --- a/flake.nix +++ b/flake.nix @@ -106,6 +106,7 @@ lenovo-ideapad-slim-5 = import ./lenovo/ideapad/slim-5; lenovo-ideapad-s145-15api = import ./lenovo/ideapad/s145-15api; lenovo-legion-15ach6 = import ./lenovo/legion/15ach6; + lenovo-legion-15ach6h = import ./lenovo/legion/15ach6h; lenovo-legion-15arh05h = import ./lenovo/legion/15arh05h; lenovo-legion-16ach6h = import ./lenovo/legion/16ach6h; lenovo-legion-16ach6h-hybrid = import ./lenovo/legion/16ach6h/hybrid; From 9a20e17a73b052d6be912adcee220cb483477094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stian=20S=C3=B8rby?= <51554341+ssouthcity@users.noreply.github.com> Date: Sun, 26 May 2024 21:53:22 +0200 Subject: [PATCH 0846/1476] added lenovo legion 15ach6h to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 56fdd7ad..df6e6bbd 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,7 @@ See code for all available configurations. | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | | [Lenovo IdeaPad S145 15api](lenovo/ideapad/s145-15api) | `` | +| [Lenovo Legion 5 15ach6h](lenovo/legion/15ach6h) | `` | | [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | | [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | | [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | From 413452614f52f3f5e7038f8456b6c0082a5594dc Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sat, 25 May 2024 09:31:04 -0400 Subject: [PATCH 0847/1476] starfive visionfive2: use mainline kernel --- starfive/visionfive/v2/default.nix | 7 +------ starfive/visionfive/v2/linux-6.6.nix | 26 -------------------------- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 starfive/visionfive/v2/linux-6.6.nix diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index 62cfe630..afbef79b 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -1,12 +1,7 @@ { config, lib, pkgs, ... }: { boot = { - # Force no ZFS (from nixos/modules/profiles/base.nix) until updated to kernel 6.0 - supportedFilesystems = - lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; consoleLogLevel = lib.mkDefault 7; - kernelPackages = lib.mkDefault (pkgs.callPackage ./linux-6.6.nix { - inherit (config.boot) kernelPatches; - }); + kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; kernelParams = lib.mkDefault [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ]; diff --git a/starfive/visionfive/v2/linux-6.6.nix b/starfive/visionfive/v2/linux-6.6.nix deleted file mode 100644 index 5999dd64..00000000 --- a/starfive/visionfive/v2/linux-6.6.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ lib, callPackage, linuxPackagesFor, kernelPatches, ... }: - -let - modDirVersion = "6.6.0"; - linuxPkg = { lib, fetchFromGitHub, buildLinux, ... }@args: - buildLinux (args // { - version = "${modDirVersion}-starfive-visionfive2"; - - src = fetchFromGitHub { - owner = "starfive-tech"; - repo = "linux"; - rev = "13eb70da2a73187c8c7aece13d23d68928aa8210"; - hash = "sha256-bwB7Pc+Z+MWXPfWYdgtRGuhqjiNHLDGNCY62e4lBGvE="; - }; - - inherit modDirVersion kernelPatches; - - structuredExtraConfig = with lib.kernel; { - PINCTRL_STARFIVE_JH7110_SYS = yes; - SERIAL_8250_DW = yes; - }; - - extraMeta.branch = "JH7110_VisionFive2_upstream"; - } // (args.argsOverride or { })); - -in lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg { })) From 03e1d2d5842a730713ab1fdbf0f25d3735019b8c Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 27 May 2024 16:37:46 -0400 Subject: [PATCH 0848/1476] starfive visionfive2: enable required drivers --- starfive/visionfive/v2/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index afbef79b..0c5ba6ed 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -2,6 +2,15 @@ boot = { consoleLogLevel = lib.mkDefault 7; kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; + kernelPatches = [{ + name = "JH7110"; + patch = pkgs.fetchpatch { + # https://patchwork.kernel.org/project/linux-riscv/patch/20240506034627.66765-1-hal.feng@starfivetech.com/ + name = "v2-riscv-defconfig-Enable-StarFive-JH7110-drivers.patch"; + url = "https://patchwork.kernel.org/series/850668/mbox/"; + hash = "sha256-81Brj61TOUoyVBxrXQh2VU3gTh/1V3uo33ic3sJPk2w="; + }; + }]; kernelParams = lib.mkDefault [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ]; From a44ddc27b1180dfa1037201871d1c717e8f69372 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 27 May 2024 17:58:14 -0400 Subject: [PATCH 0849/1476] Revert "starfive visionfive2: Increase mtd0 to fit spl" This reverts commit 87e3122b67587492a617764f88c71991893fcf8a. --- starfive/visionfive/v2/default.nix | 5 ----- starfive/visionfive/v2/qspi-patch.dts | 17 ----------------- 2 files changed, 22 deletions(-) delete mode 100644 starfive/visionfive/v2/qspi-patch.dts diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index 0c5ba6ed..dceca67b 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -25,9 +25,4 @@ hardware.deviceTree.name = lib.mkDefault "starfive/jh7110-starfive-visionfive-2-v1.3b.dtb"; - - hardware.deviceTree.overlays = [{ - name = "qspi-patch"; - dtsFile = ./qspi-patch.dts; - }]; } diff --git a/starfive/visionfive/v2/qspi-patch.dts b/starfive/visionfive/v2/qspi-patch.dts deleted file mode 100644 index 6e12c98a..00000000 --- a/starfive/visionfive/v2/qspi-patch.dts +++ /dev/null @@ -1,17 +0,0 @@ -/dts-v1/; -/plugin/; -/ { - compatible = "starfive,jh7110"; - fragment@0 { - target = <&qspi>; - __overlay__ { - nor_flash: flash@0 { - partitions { - spl@0 { - reg = <0x0 0x40000>; - }; - }; - }; - }; - }; -}; From d664fb04deaa8e344ce86b485a7a8d685238a4c3 Mon Sep 17 00:00:00 2001 From: xtrm Date: Tue, 28 May 2024 03:52:21 +0200 Subject: [PATCH 0850/1476] add Lenovo IdeaPad 3 15alc6 Signed-off-by: xtrm --- README.md | 1 + flake.nix | 1 + lenovo/ideapad/15alc6/default.nix | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 lenovo/ideapad/15alc6/default.nix diff --git a/README.md b/README.md index df6e6bbd..140ea0ac 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,7 @@ See code for all available configurations. | [Huawei Matebook X Pro (2020)](huawei/machc-wa) | `` | | [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | +| [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `` | | [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | diff --git a/flake.nix b/flake.nix index 89c1fcb5..c500bba7 100644 --- a/flake.nix +++ b/flake.nix @@ -101,6 +101,7 @@ huawei-machc-wa = import ./huawei/machc-wa; hp-notebook-14-df0023 = import ./hp/notebook/14-df0023; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; + lenovo-ideapad-15alc6 = import ./lenovo/ideapad/15alc6; lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-ideapad-slim-5 = import ./lenovo/ideapad/slim-5; diff --git a/lenovo/ideapad/15alc6/default.nix b/lenovo/ideapad/15alc6/default.nix new file mode 100644 index 00000000..a830c0bd --- /dev/null +++ b/lenovo/ideapad/15alc6/default.nix @@ -0,0 +1,11 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/gpu/amd + ../../../common/pc/laptop + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/ssd + ]; +} From 806e9d4a933dd1e75592e88894d4bd2f296f5bbf Mon Sep 17 00:00:00 2001 From: xtrm Date: Tue, 28 May 2024 04:30:29 +0200 Subject: [PATCH 0851/1476] Fix typo for IdeaPad 3 15alc6 in README.md Signed-off-by: xtrm --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 140ea0ac..1f2b827f 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ See code for all available configurations. | [Huawei Matebook X Pro (2020)](huawei/machc-wa) | `` | | [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | -| [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `` | +| [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `` | | [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | From 1e3c2a85da63a4eb6dae4fa978064e47bcdbbe74 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 28 May 2024 18:18:08 -0400 Subject: [PATCH 0852/1476] Revert "starfive visionfive2: enable required drivers" This reverts commit 03e1d2d5842a730713ab1fdbf0f25d3735019b8c. --- starfive/visionfive/v2/default.nix | 9 --------- 1 file changed, 9 deletions(-) diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index dceca67b..c4a328f5 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -2,15 +2,6 @@ boot = { consoleLogLevel = lib.mkDefault 7; kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; - kernelPatches = [{ - name = "JH7110"; - patch = pkgs.fetchpatch { - # https://patchwork.kernel.org/project/linux-riscv/patch/20240506034627.66765-1-hal.feng@starfivetech.com/ - name = "v2-riscv-defconfig-Enable-StarFive-JH7110-drivers.patch"; - url = "https://patchwork.kernel.org/series/850668/mbox/"; - hash = "sha256-81Brj61TOUoyVBxrXQh2VU3gTh/1V3uo33ic3sJPk2w="; - }; - }]; kernelParams = lib.mkDefault [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ]; From 9e0603134617ec23ce67e1806e905ca07abc92d3 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 28 May 2024 18:18:08 -0400 Subject: [PATCH 0853/1476] Revert "starfive visionfive2: use mainline kernel" This reverts commit 413452614f52f3f5e7038f8456b6c0082a5594dc. --- starfive/visionfive/v2/default.nix | 7 ++++++- starfive/visionfive/v2/linux-6.6.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 starfive/visionfive/v2/linux-6.6.nix diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index c4a328f5..c1042e1d 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -1,7 +1,12 @@ { config, lib, pkgs, ... }: { boot = { + # Force no ZFS (from nixos/modules/profiles/base.nix) until updated to kernel 6.0 + supportedFilesystems = + lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; consoleLogLevel = lib.mkDefault 7; - kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; + kernelPackages = lib.mkDefault (pkgs.callPackage ./linux-6.6.nix { + inherit (config.boot) kernelPatches; + }); kernelParams = lib.mkDefault [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ]; diff --git a/starfive/visionfive/v2/linux-6.6.nix b/starfive/visionfive/v2/linux-6.6.nix new file mode 100644 index 00000000..5999dd64 --- /dev/null +++ b/starfive/visionfive/v2/linux-6.6.nix @@ -0,0 +1,26 @@ +{ lib, callPackage, linuxPackagesFor, kernelPatches, ... }: + +let + modDirVersion = "6.6.0"; + linuxPkg = { lib, fetchFromGitHub, buildLinux, ... }@args: + buildLinux (args // { + version = "${modDirVersion}-starfive-visionfive2"; + + src = fetchFromGitHub { + owner = "starfive-tech"; + repo = "linux"; + rev = "13eb70da2a73187c8c7aece13d23d68928aa8210"; + hash = "sha256-bwB7Pc+Z+MWXPfWYdgtRGuhqjiNHLDGNCY62e4lBGvE="; + }; + + inherit modDirVersion kernelPatches; + + structuredExtraConfig = with lib.kernel; { + PINCTRL_STARFIVE_JH7110_SYS = yes; + SERIAL_8250_DW = yes; + }; + + extraMeta.branch = "JH7110_VisionFive2_upstream"; + } // (args.argsOverride or { })); + +in lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg { })) From 69fe256333b66ba6814290a0e1fda7cdba61807d Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 30 May 2024 19:58:53 -0400 Subject: [PATCH 0854/1476] starfive visionfive2: let u-boot set device tree name u-boot is able to automatically set the correct device tree name on VisionFive 2 boards by reading their EEPROM since v2023.10. This allows our image to work with either revision of the boards. Reference: https://github.com/u-boot/u-boot/commit/16dbe3d9d45527f67d479535a22dc4054ae93e99 --- starfive/visionfive/v2/README.md | 6 ------ starfive/visionfive/v2/default.nix | 3 --- 2 files changed, 9 deletions(-) diff --git a/starfive/visionfive/v2/README.md b/starfive/visionfive/v2/README.md index 6ec26121..1ab7918a 100644 --- a/starfive/visionfive/v2/README.md +++ b/starfive/visionfive/v2/README.md @@ -56,12 +56,6 @@ nix build .# ## Additional configuration Additional configuration may be needed depending on your specific hardware configuration. -### Board rev 1.2A -If you have the 1.2A board revision add the following to your config: -``` nix -hardware.deviceTree.name = - lib.mkDefault "starfive/jh7110-starfive-visionfive-2-v1.2a.dtb"; -``` ### 8GB memory If your board has 8GB of RAM add the following to your config: diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index c1042e1d..973db412 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -18,7 +18,4 @@ generic-extlinux-compatible.enable = lib.mkDefault true; }; }; - - hardware.deviceTree.name = - lib.mkDefault "starfive/jh7110-starfive-visionfive-2-v1.3b.dtb"; } From 7b49d3967613d9aacac5b340ef158d493906ba79 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 30 May 2024 20:10:18 -0400 Subject: [PATCH 0855/1476] starfive visionfive2: drop dtb overlay for 8GB version u-boot is able to automatically set the correct memory size in fdt on VisionFive 2 boards by reading their EEPROM since v2023.10. This allows our image to work with either variant of the boards. Reference: https://github.com/u-boot/u-boot/commit/38d900b409199df02a1a26dfcb464d4d2b6e27d2 Reference: https://github.com/u-boot/u-boot/commit/43177705ab29ed1ccca970096de1ef3c6095e7e6 --- starfive/visionfive/v2/8gb-patch.dts | 11 ----------- starfive/visionfive/v2/README.md | 13 ------------- 2 files changed, 24 deletions(-) delete mode 100644 starfive/visionfive/v2/8gb-patch.dts diff --git a/starfive/visionfive/v2/8gb-patch.dts b/starfive/visionfive/v2/8gb-patch.dts deleted file mode 100644 index 342dcba0..00000000 --- a/starfive/visionfive/v2/8gb-patch.dts +++ /dev/null @@ -1,11 +0,0 @@ -/dts-v1/; -/plugin/; -/ { - compatible = "starfive,jh7110"; - fragment@0 { - target-path = "/memory@40000000"; - __overlay__ { - reg = <0x0 0x40000000 0x2 0x0>; - }; - }; -}; diff --git a/starfive/visionfive/v2/README.md b/starfive/visionfive/v2/README.md index 1ab7918a..6ceb59bb 100644 --- a/starfive/visionfive/v2/README.md +++ b/starfive/visionfive/v2/README.md @@ -54,19 +54,6 @@ Build the sd image. nix build .# ``` -## Additional configuration -Additional configuration may be needed depending on your specific hardware configuration. - -### 8GB memory -If your board has 8GB of RAM add the following to your config: - -``` nix -hardware.deviceTree.overlays = [{ - name = "8GB-patch"; - dtsFile = "${nixos-hardware}/starfive/visionfive/v2/8gb-patch.dts"; -}]; -``` - # Updating the bootloader ## SD-Card Install the firmware update script From 82b2e20fbffe6a5f0555701af136ad3e734a5faa Mon Sep 17 00:00:00 2001 From: V7 Date: Sat, 1 Jun 2024 17:43:46 +0530 Subject: [PATCH 0856/1476] Update Inspiron 5509 --- dell/inspiron/5509/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dell/inspiron/5509/default.nix b/dell/inspiron/5509/default.nix index 96355a2c..e77c9fd1 100644 --- a/dell/inspiron/5509/default.nix +++ b/dell/inspiron/5509/default.nix @@ -1,8 +1,7 @@ { lib, ... }: { imports = [ - ../../../common/cpu/intel - ../../../common/gpu/intel + ../../../common/cpu/intel/tiger-lake ../../../common/pc/laptop ../../../common/pc/ssd ]; @@ -14,8 +13,8 @@ services.thermald.enable = lib.mkDefault true; # Touchpad - services.xserver = { - libinput.touchpad.tapping = true; - libinput.touchpad.tappingDragLock = true; + services.libinput.touchpad = { + tapping = true; + tappingDragLock = true; }; } From d6c6cf6f5fead4057d8fb2d5f30aa8ac1727f177 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Sat, 1 Jun 2024 14:09:40 +0800 Subject: [PATCH 0857/1476] apple/t2: update to kernel 6.9.2 --- apple/t2/pkgs/linux-t2.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index becf96c1..e635356d 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -5,11 +5,11 @@ let patchRepo = fetchFromGitHub { owner = "t2linux"; repo = "linux-t2-patches"; - rev = "8b0e51ea87f170c559c9e2f437f85367838c2fad"; - hash = "sha256-4YFaLW4WTKdFysIJHnshEaqoiKBFegnZiw4Kv88LjIA="; + rev = "48429c87a9a7fa7ea6b328da46ef1ea8725c31da"; + hash = "sha256-KK5DjQPjBq7dRCLckagxigyHlRtantJ51bnHFCLfbxU="; }; - version = "6.9"; + version = "6.9.2"; majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); in buildLinux (args // { @@ -22,7 +22,7 @@ buildLinux (args // { src = runCommand "patched-source" {} '' cp -r ${fetchzip { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-RIxLyvF5kw/to8MjAUq2iQ4X0bGk7FY+ovE3zd0eKxM="; + hash = "sha256-8SyfBmjLSWsBPvboCMh4qBAjaQ7yPT+AvMd3FTeYzMM="; }} $out chmod -R u+w $out cd $out From 057a7996d012f342a38a26261ee529cebb1755ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 8 Jun 2024 08:12:26 +0200 Subject: [PATCH 0858/1476] hidpi: drop legacy options --- common/hidpi.nix | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/common/hidpi.nix b/common/hidpi.nix index 1b030859..85b167c7 100644 --- a/common/hidpi.nix +++ b/common/hidpi.nix @@ -1,12 +1,6 @@ { lib, pkgs, ... }: -let - # This option is removed from NixOS 23.05 and up - nixosVersion = lib.versions.majorMinor lib.version; - config = if lib.versionOlder nixosVersion "23.05" then { - hardware.video.hidpi.enable = lib.mkDefault true; - } else { - # Just set the console font, don't mess with the font settings - console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz"; - console.earlySetup = lib.mkDefault true; - }; -in config +{ + # Just set the console font, don't mess with the font settings + console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz"; + console.earlySetup = lib.mkDefault true; +} From 35f2177d6656b4db8797f4dbb0f9a70e34fbbc8f Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Sun, 9 Jun 2024 22:48:25 +0800 Subject: [PATCH 0859/1476] apple/t2: update to kernel 6.9.3 * also updates the patches kernel to include the apfs module --- apple/t2/pkgs/linux-t2.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index e635356d..beff7a37 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -5,11 +5,11 @@ let patchRepo = fetchFromGitHub { owner = "t2linux"; repo = "linux-t2-patches"; - rev = "48429c87a9a7fa7ea6b328da46ef1ea8725c31da"; - hash = "sha256-KK5DjQPjBq7dRCLckagxigyHlRtantJ51bnHFCLfbxU="; + rev = "33d5a01c41f140a416a7f840cc06e7f30dc58d8d"; + hash = "sha256-wx5jkOQ8l/4XRGLV9KFrxXuqunwcFA9RB1yhrtseP2A="; }; - version = "6.9.2"; + version = "6.9.3"; majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); in buildLinux (args // { @@ -22,7 +22,7 @@ buildLinux (args // { src = runCommand "patched-source" {} '' cp -r ${fetchzip { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-8SyfBmjLSWsBPvboCMh4qBAjaQ7yPT+AvMd3FTeYzMM="; + hash = "sha256-7262WHO2veIn+9cd4m9io1ov93LsfpgRKfmvBx0DCBA="; }} $out chmod -R u+w $out cd $out @@ -35,6 +35,7 @@ buildLinux (args // { structuredExtraConfig = with lib.kernel; { APPLE_BCE = module; APPLE_GMUX = module; + APFS_FS = module; BRCMFMAC = module; BT_BCM = module; BT_HCIBCM4377 = module; From 58b52b0dd191af70f538c707c66c682331cfdffc Mon Sep 17 00:00:00 2001 From: Arthur Rump Date: Sat, 13 Jan 2024 21:04:53 +0100 Subject: [PATCH 0860/1476] Add configuration for Lenovo IdeaPad 5 Pro 16ACH6 --- README.md | 1 + flake.nix | 1 + lenovo/ideapad/16ach6/README.md | 41 +++++++++++++++++++++++++++++++ lenovo/ideapad/16ach6/default.nix | 20 +++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 lenovo/ideapad/16ach6/README.md create mode 100644 lenovo/ideapad/16ach6/default.nix diff --git a/README.md b/README.md index 1f2b827f..dd551b44 100644 --- a/README.md +++ b/README.md @@ -171,6 +171,7 @@ See code for all available configurations. | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `` | | [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | +| [Lenovo IdeaPad 5 Pro 16ach6](lenovo/ideapad/16ach6) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | | [Lenovo IdeaPad S145 15api](lenovo/ideapad/s145-15api) | `` | diff --git a/flake.nix b/flake.nix index c500bba7..16d0fe76 100644 --- a/flake.nix +++ b/flake.nix @@ -103,6 +103,7 @@ intel-nuc-8i7beh = import ./intel/nuc/8i7beh; lenovo-ideapad-15alc6 = import ./lenovo/ideapad/15alc6; lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; + lenovo-ideapad-16ach6 = import ./lenovo/ideapad/16ach6; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-ideapad-slim-5 = import ./lenovo/ideapad/slim-5; lenovo-ideapad-s145-15api = import ./lenovo/ideapad/s145-15api; diff --git a/lenovo/ideapad/16ach6/README.md b/lenovo/ideapad/16ach6/README.md new file mode 100644 index 00000000..d3447ebd --- /dev/null +++ b/lenovo/ideapad/16ach6/README.md @@ -0,0 +1,41 @@ +# Lenovo IdeaPad 5 Pro 16ACH6 + +This laptop comes with an AMD CPU+GPU and dedicated NVIDIA graphics. Unlike the similarly named [Legion 5 Pro 16ACH6*H*](../../legion/16ach6h/), there is no direct dedicated graphics setting. + +The `nvidia.hardware.powerManagement.enable` option is not enabled in this configuration, since it seemed to cause issues when waking up from suspend, while also not providing much in terms of power saving. I've tested with `finegrained` both enabled and disabled, and it caused the screen to go dark a few moments after waking up from suspend. Most times this only happened once and the screen came back after a few moments, but on some occasions it kept occurring repeatedly. + +This device also has a "battery conservation mode", which charges the battery to only ~60%. This mode can be enabled using [TLP](https://linrunner.de/tlp/settings/bc-vendors.html#lenovo-non-thinkpad-series): + +```nix +services.power-profiles-daemon.enable = false; +services.tlp.enable = true; +services.tlp.settings = { + # Enable battery conservation mode + # Run `sudo tlp fullcharge` to enable a full charge until next reboot, + # and `sudo tlp setcharge` to reset to conservation mode. + START_CHARGE_THRESH_BAT0 = 0; + STOP_CHARGE_THRESH_BAT0 = 1; +}; +``` + +## Device information + +Details from `tlp-stat`: + +``` +System = LENOVO IdeaPad 5 Pro 16ACH6 82L5 +BIOS = GSCN35WW +EC Firmware = 1.35 +OS Release = NixOS 23.11 (Tapir) +Kernel = 6.6.10 #1-NixOS SMP PREEMPT_DYNAMIC Fri Jan 5 14:19:45 UTC 2024 x86_64 +Init system = systemd +Boot mode = UEFI +Suspend mode = [s2idle] +``` + +`lspci` output: + +``` +01:00.0 3D controller: NVIDIA Corporation GA107M [GeForce RTX 3050 Mobile] (rev a1) +05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (rev c4) +``` diff --git a/lenovo/ideapad/16ach6/default.nix b/lenovo/ideapad/16ach6/default.nix new file mode 100644 index 00000000..3f9beb1c --- /dev/null +++ b/lenovo/ideapad/16ach6/default.nix @@ -0,0 +1,20 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ../../../common/gpu/nvidia/prime.nix + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + hardware.nvidia = { + modesetting.enable = true; + prime = { + amdgpuBusId = "PCI:5:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; +} From 7e148208c45511054e2f7ae6212863ae2e0eb299 Mon Sep 17 00:00:00 2001 From: Sophie Tauchert Date: Wed, 5 Jun 2024 23:13:35 +0200 Subject: [PATCH 0861/1476] purism librem5r4: linuxPackages_librem5: 6.6.6-librem5 -> 6.6.29-librem5 --- purism/librem/5r4/kernel.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/purism/librem/5r4/kernel.nix b/purism/librem/5r4/kernel.nix index 28f59588..f348ff38 100644 --- a/purism/librem/5r4/kernel.nix +++ b/purism/librem/5r4/kernel.nix @@ -6,14 +6,14 @@ buildLinux (args // rec { defconfig = "librem5_defconfig"; - version = "6.6.6-librem5"; + version = "6.6.29-librem5"; modDirVersion = version; src = fetchFromGitLab { domain = "source.puri.sm"; owner = "Librem5"; repo = "linux"; - rev = "pureos/6.6.6pureos1"; - hash = "sha256-LJfY45yNYgFYLCGxb+WRMYBUHnY4HCI2rkflPeaeFe0="; + rev = "pureos/6.6.29pureos1"; + hash = "sha256-i8HSAJ1/Z2Ux2s3Srse+L0S1Zd/70ldpGBhIgEZ6nBw="; }; kernelPatches = [ ]; structuredExtraConfig = with lib.kernel; { From 624f88c6c0905829b02355839989c134143e6789 Mon Sep 17 00:00:00 2001 From: Sophie Tauchert Date: Thu, 6 Jun 2024 10:43:08 +0200 Subject: [PATCH 0862/1476] purism librem5r4: fix uboot build --- purism/librem/5r4/u-boot/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/purism/librem/5r4/u-boot/default.nix b/purism/librem/5r4/u-boot/default.nix index 26c217c5..a6b00a79 100644 --- a/purism/librem/5r4/u-boot/default.nix +++ b/purism/librem/5r4/u-boot/default.nix @@ -51,6 +51,7 @@ let rev = "956aa590c93977992743b41c45d3c7ee5a024915"; # this is the latest commit on the upstream/librem5 branch hash = "sha256-MsIIlarN+WFFEzc0ptLAgS7BwJ6Cosy42xo0EwPn1AU="; }; + patches = []; BL31 = "${arm-trusted-firmware-imx8mq}/bl31.bin"; preConfigure = '' cp $BL31 . From 3b5f843e923ac20ea32ce398cfb7f0b8967d75ea Mon Sep 17 00:00:00 2001 From: Glenn McDonald <2371316+glenn-m@users.noreply.github.com> Date: Tue, 11 Jun 2024 00:44:19 -0400 Subject: [PATCH 0863/1476] Add Chuwi MiniBook X --- README.md | 1 + chuwi/minibook-x/default.nix | 10 ++++++++++ flake.nix | 1 + 3 files changed, 12 insertions(+) create mode 100644 chuwi/minibook-x/default.nix diff --git a/README.md b/README.md index dd551b44..906ab7e4 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,7 @@ See code for all available configurations. | [Asus TUF FA507NV](asus/fa507nv) | `` | | [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | +| [Chuwi MiniBook X](chuwi/minibook-x) | `` | | [Deciso DEC series](deciso/dec) | `` | | [Dell G3 3779](dell/g3/3779) | `` | | [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | diff --git a/chuwi/minibook-x/default.nix b/chuwi/minibook-x/default.nix new file mode 100644 index 00000000..d35c86f0 --- /dev/null +++ b/chuwi/minibook-x/default.nix @@ -0,0 +1,10 @@ +{ ... }: { + imports = [ + ../../common/cpu/intel + ../../common/pc/laptop + ../../common/pc/laptop/ssd + ../../common/hidpi.nix + ]; + boot.kernelParams = + [ "fbcon=rotate:1" "video=DSI-1:panel_orientation=right_side_up" ]; +} diff --git a/flake.nix b/flake.nix index 16d0fe76..3f69744b 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,7 @@ asus-zephyrus-ga503 = import ./asus/zephyrus/ga503; asus-zephyrus-gu603h = import ./asus/zephyrus/gu603h; beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; + chuwi-minibook-x = import ./chuwi/minibook-x; deciso-dec = import ./deciso/dec; dell-e7240 = import ./dell/e7240; dell-g3-3779 = import ./dell/g3/3779; From 43e369c6d57ea78632147ed1cd2ffc8ac54d97c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 11 Jun 2024 11:06:17 +0200 Subject: [PATCH 0864/1476] chuwi/minibook-x: add comment why we specify kernelParams --- chuwi/minibook-x/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/chuwi/minibook-x/default.nix b/chuwi/minibook-x/default.nix index d35c86f0..39bc9ccc 100644 --- a/chuwi/minibook-x/default.nix +++ b/chuwi/minibook-x/default.nix @@ -5,6 +5,7 @@ ../../common/pc/laptop/ssd ../../common/hidpi.nix ]; + # Fixes the display being rotated 90 degrees. boot.kernelParams = [ "fbcon=rotate:1" "video=DSI-1:panel_orientation=right_side_up" ]; } From 7738cb40f6a42e2bb398f07964d1df53a683d27e Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Mon, 10 Jun 2024 22:23:59 +0200 Subject: [PATCH 0865/1476] surface: linux-surface arch-6.8.6-1 -> arch-6.9.3-1 --- microsoft/surface/common/repos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 321e7290..313f133b 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "arch-6.8.6-1"; - hash = "sha256-kLnHcYFeQ7/8lbSL4p9D2aC4V/Ib1tU225UOkRcNnH4="; + rev = "arch-6.9.3-1"; + hash = "sha256-HoG7MuWAtiTAX9CJeqCGrfkfoue7XLtSMF6zjx4z7i8="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From 5ca7d128e6d8e6bd8ac59aa8af0486915d40771e Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Mon, 10 Jun 2024 22:24:42 +0200 Subject: [PATCH 0866/1476] surface: linux 6.8.9 -> 6.9.3 --- microsoft/surface/common/kernel/default.nix | 2 +- .../{linux-6.8.x => linux-6.9.x}/default.nix | 4 +- .../{linux-6.8.x => linux-6.9.x}/patches.nix | 60 ++++++++++--------- 3 files changed, 35 insertions(+), 31 deletions(-) rename microsoft/surface/common/kernel/{linux-6.8.x => linux-6.9.x}/default.nix (87%) rename microsoft/surface/common/kernel/{linux-6.8.x => linux-6.9.x}/patches.nix (61%) diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index 0c0159a0..a8f598de 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -5,7 +5,7 @@ let in { imports = [ - ./linux-6.8.x + ./linux-6.9.x ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.8.x/default.nix b/microsoft/surface/common/kernel/linux-6.9.x/default.nix similarity index 87% rename from microsoft/surface/common/kernel/linux-6.8.x/default.nix rename to microsoft/surface/common/kernel/linux-6.9.x/default.nix index e016d77d..c0fd5c9b 100644 --- a/microsoft/surface/common/kernel/linux-6.8.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.9.x/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.8.9"; + version = "6.9.3"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "sha256-+QXxI46nqOhTFLrPKDMC6AlwBgENJfzqcm0N4OpbybY="; + sha256 = "1bnzxparybwh320019pr2msaapas41dhjmvg4gy791rn05jc88f3"; ignoreConfigErrors=true; }; diff --git a/microsoft/surface/common/kernel/linux-6.8.x/patches.nix b/microsoft/surface/common/kernel/linux-6.9.x/patches.nix similarity index 61% rename from microsoft/surface/common/kernel/linux-6.8.x/patches.nix rename to microsoft/surface/common/kernel/linux-6.9.x/patches.nix index 353764b9..9590b9eb 100644 --- a/microsoft/surface/common/kernel/linux-6.8.x/patches.nix +++ b/microsoft/surface/common/kernel/linux-6.9.x/patches.nix @@ -86,59 +86,63 @@ }; } { - name = "ms-surface/0001-surface3-oemb"; - patch = patchSrc + "/0001-surface3-oemb.patch"; + name = "ms-surface/0001-secureboot"; + patch = patchSrc + "/0001-secureboot.patch"; } { - name = "ms-surface/0002-mwifiex"; - patch = patchSrc + "/0002-mwifiex.patch"; + name = "ms-surface/0002-surface3-oemb"; + patch = patchSrc + "/0002-surface3-oemb.patch"; } { - name = "ms-surface/0003-ath10k"; - patch = patchSrc + "/0003-ath10k.patch"; + name = "ms-surface/0003-mwifiex"; + patch = patchSrc + "/0003-mwifiex.patch"; } { - name = "ms-surface/0004-ipts"; - patch = patchSrc + "/0004-ipts.patch"; + name = "ms-surface/0004-ath10k"; + patch = patchSrc + "/0004-ath10k.patch"; } { - name = "ms-surface/0005-ithc"; - patch = patchSrc + "/0005-ithc.patch"; + name = "ms-surface/0005-ipts"; + patch = patchSrc + "/0005-ipts.patch"; } { - name = "ms-surface/0006-surface-sam"; - patch = patchSrc + "/0006-surface-sam.patch"; + name = "ms-surface/0006-ithc"; + patch = patchSrc + "/0006-ithc.patch"; } { - name = "ms-surface/0007-surface-sam-over-hid"; - patch = patchSrc + "/0007-surface-sam-over-hid.patch"; + name = "ms-surface/0007-surface-sam"; + patch = patchSrc + "/0007-surface-sam.patch"; } { - name = "ms-surface/0008-surface-button"; - patch = patchSrc + "/0008-surface-button.patch"; + name = "ms-surface/0008-surface-sam-over-hid"; + patch = patchSrc + "/0008-surface-sam-over-hid.patch"; } { - name = "ms-surface/0009-surface-typecover"; - patch = patchSrc + "/0009-surface-typecover.patch"; + name = "ms-surface/0009-surface-button"; + patch = patchSrc + "/0009-surface-button.patch"; } { - name = "ms-surface/0010-surface-shutdown"; - patch = patchSrc + "/0010-surface-shutdown.patch"; + name = "ms-surface/0010-surface-typecover"; + patch = patchSrc + "/0010-surface-typecover.patch"; } { - name = "ms-surface/0011-surface-gpe"; - patch = patchSrc + "/0011-surface-gpe.patch"; + name = "ms-surface/0011-surface-shutdown"; + patch = patchSrc + "/0011-surface-shutdown.patch"; } { - name = "ms-surface/0012-cameras"; - patch = patchSrc + "/0012-cameras.patch"; + name = "ms-surface/0012-surface-gpe"; + patch = patchSrc + "/0012-surface-gpe.patch"; } { - name = "ms-surface/0013-amd-gpio"; - patch = patchSrc + "/0013-amd-gpio.patch"; + name = "ms-surface/0013-cameras"; + patch = patchSrc + "/0013-cameras.patch"; } { - name = "ms-surface/0014-rtc"; - patch = patchSrc + "/0014-rtc.patch"; + name = "ms-surface/0014-amd-gpio"; + patch = patchSrc + "/0014-amd-gpio.patch"; + } + { + name = "ms-surface/0015-rtc"; + patch = patchSrc + "/0015-rtc.patch"; } ] From f17f79c796381b93e13a6d83580be780da8f9697 Mon Sep 17 00:00:00 2001 From: Brieuc Dubois Date: Mon, 10 Jun 2024 15:40:56 +0200 Subject: [PATCH 0867/1476] rpi4: bluetooth fix --- raspberry-pi/4/bluetooth.nix | 44 ++++++++++++++++++++++++++++++++++++ raspberry-pi/4/default.nix | 1 + 2 files changed, 45 insertions(+) create mode 100644 raspberry-pi/4/bluetooth.nix diff --git a/raspberry-pi/4/bluetooth.nix b/raspberry-pi/4/bluetooth.nix new file mode 100644 index 00000000..78619bcd --- /dev/null +++ b/raspberry-pi/4/bluetooth.nix @@ -0,0 +1,44 @@ +{ config, lib, ... }: + +let + cfg = config.hardware.raspberry-pi."4".bluetooth; +in +{ + options.hardware = { + raspberry-pi."4".bluetooth = { + enable = lib.mkEnableOption '' + configuration for bluetooth + ''; + }; + }; + + config = lib.mkIf cfg.enable { + hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true; + # doesn't work for the CM module, so we exclude e.g. bcm2711-rpi-cm4.dts + hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb"; + + hardware.deviceTree = { + overlays = [ + { + name = "bluetooth-overlay"; + dtsText = '' + /dts-v1/; + /plugin/; + + / { + compatible = "brcm,bcm2711"; + + fragment@0 { + target = <&uart0_pins>; + __overlay__ { + brcm,pins = <30 31 32 33>; + brcm,pull = <2 0 0 2>; + }; + }; + }; + ''; + } + ]; + }; + }; +} diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index 41d065af..a2739d79 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -4,6 +4,7 @@ imports = [ ./audio.nix ./backlight.nix + ./bluetooth.nix ./cpu-revision.nix ./digi-amp-plus.nix ./dwc2.nix From 9e848e173ca83adf884815c66edc08652ef9ade8 Mon Sep 17 00:00:00 2001 From: Jan Heidbrink Date: Fri, 7 Jun 2024 18:30:13 +0200 Subject: [PATCH 0868/1476] add Dell Latitude 9430 --- README.md | 1 + dell/latitude/9430/default.nix | 19 +++++++++++++++++++ flake.nix | 1 + 3 files changed, 21 insertions(+) create mode 100644 dell/latitude/9430/default.nix diff --git a/README.md b/README.md index 906ab7e4..a71f5219 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,7 @@ See code for all available configurations. | [Dell Latitude 7390](dell/latitude/7390) | `` | | [Dell Latitude 7430](dell/latitude/7430) | `` | | [Dell Latitude 7490](dell/latitude/7490) | `` | +| [Dell Latitude 9430](dell/latitude/9430) | `` | | [Dell Poweredge R7515](dell/poweredge/r7515) | `` | | [Dell Precision 3541](dell/precision/3541) | `` | | [Dell Precision 5530](dell/precision/5530) | `` | diff --git a/dell/latitude/9430/default.nix b/dell/latitude/9430/default.nix new file mode 100644 index 00000000..f652e9ac --- /dev/null +++ b/dell/latitude/9430/default.nix @@ -0,0 +1,19 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + boot.kernelParams = [ + # See https://discourse.nixos.org/t/i915-driver-has-bug-for-iris-xe-graphics/25006/12 + # jheidbrink reports that without this setting there is a very high lag in Sway which makes it unusable + "i915.enable_psr=0" + ]; + + # Make the webcam work (needs Linux >= 6.6): + hardware.ipu6.enable = true; + hardware.ipu6.platform = "ipu6ep"; +} diff --git a/flake.nix b/flake.nix index 3f69744b..7ff195c2 100644 --- a/flake.nix +++ b/flake.nix @@ -47,6 +47,7 @@ dell-latitude-7390 = import ./dell/latitude/7390; dell-latitude-7430 = import ./dell/latitude/7430; dell-latitude-7490 = import ./dell/latitude/7490; + dell-latitude-9430 = import ./dell/latitude/9430; dell-poweredge-r7515 = import ./dell/poweredge/r7515; dell-precision-3541 = import ./dell/precision/3541; dell-precision-5530 = import ./dell/precision/5530; From 291c3ee610d94e39fa40f1051ebb14b56a57a5d9 Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 13 Jun 2024 09:51:03 +0300 Subject: [PATCH 0869/1476] treewide: drop hardware.amdgpu.amdvlk option This is now provided in nixpkgs (see https://github.com/NixOS/nixpkgs/pull/318175). --- common/gpu/amd/default.nix | 12 ------------ lenovo/legion/15ach6h/nvidia/default.nix | 15 +++------------ lenovo/legion/16ach6h/nvidia/default.nix | 15 +++------------ lenovo/legion/16achg6/nvidia/default.nix | 7 ++----- 4 files changed, 8 insertions(+), 41 deletions(-) diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix index 1347e824..26cd833e 100644 --- a/common/gpu/amd/default.nix +++ b/common/gpu/amd/default.nix @@ -6,9 +6,6 @@ ) // { default = true; }; - options.hardware.amdgpu.amdvlk = lib.mkEnableOption (lib.mdDoc - "use amdvlk drivers instead mesa radv drivers" - ); options.hardware.amdgpu.opencl = lib.mkEnableOption (lib.mdDoc "rocm opencl runtime (Install rocmPackages.clr and rocmPackages.clr.icd)" ) // { @@ -27,15 +24,6 @@ (lib.mkIf config.hardware.amdgpu.loadInInitrd { boot.initrd.kernelModules = [ "amdgpu" ]; }) - (lib.mkIf config.hardware.amdgpu.amdvlk { - hardware.opengl.extraPackages = with pkgs; [ - amdvlk - ]; - - hardware.opengl.extraPackages32 = with pkgs; [ - driversi686Linux.amdvlk - ]; - }) (lib.mkIf config.hardware.amdgpu.opencl { hardware.opengl.extraPackages = if pkgs ? rocmPackages.clr diff --git a/lenovo/legion/15ach6h/nvidia/default.nix b/lenovo/legion/15ach6h/nvidia/default.nix index 31de5c12..ad62415f 100644 --- a/lenovo/legion/15ach6h/nvidia/default.nix +++ b/lenovo/legion/15ach6h/nvidia/default.nix @@ -9,18 +9,9 @@ # because when writing the specialization of Dual-Direct GFX, I did not completely # remove all packages for amd igpu. I only removed amdgpu from # services.xserver.videoDrivers by overriding. This is because the specialization - # of nix cannot implement such an operation as canceling an import. In the end, if - # it is enabled in Dual-Direct GFX In the absence of amd igpu, the amdvlk package - # caused the proton to crash. In order to solve this problem, I add the option of - # whether to enable amdvlk to the configuration file of amd gpu, and open it by - # default, and turn it off in specialization, so as to delete amdvlk package and - # other packages for amd igpu in specialization. At the same time, I also added an - # option to amdgpu's opencl runtime. + # of nix cannot implement such an operation as canceling an import. hardware = { nvidia.prime.offload.enable = false; - amdgpu = { - amdvlk = false; - opencl = false; - }; + amdgpu.opencl = false; }; -} \ No newline at end of file +} diff --git a/lenovo/legion/16ach6h/nvidia/default.nix b/lenovo/legion/16ach6h/nvidia/default.nix index 31de5c12..ad62415f 100644 --- a/lenovo/legion/16ach6h/nvidia/default.nix +++ b/lenovo/legion/16ach6h/nvidia/default.nix @@ -9,18 +9,9 @@ # because when writing the specialization of Dual-Direct GFX, I did not completely # remove all packages for amd igpu. I only removed amdgpu from # services.xserver.videoDrivers by overriding. This is because the specialization - # of nix cannot implement such an operation as canceling an import. In the end, if - # it is enabled in Dual-Direct GFX In the absence of amd igpu, the amdvlk package - # caused the proton to crash. In order to solve this problem, I add the option of - # whether to enable amdvlk to the configuration file of amd gpu, and open it by - # default, and turn it off in specialization, so as to delete amdvlk package and - # other packages for amd igpu in specialization. At the same time, I also added an - # option to amdgpu's opencl runtime. + # of nix cannot implement such an operation as canceling an import. hardware = { nvidia.prime.offload.enable = false; - amdgpu = { - amdvlk = false; - opencl = false; - }; + amdgpu.opencl = false; }; -} \ No newline at end of file +} diff --git a/lenovo/legion/16achg6/nvidia/default.nix b/lenovo/legion/16achg6/nvidia/default.nix index af0f2d66..aa292cde 100644 --- a/lenovo/legion/16achg6/nvidia/default.nix +++ b/lenovo/legion/16achg6/nvidia/default.nix @@ -5,9 +5,6 @@ services.xserver.videoDrivers = [ "nvidia" ]; hardware = { nvidia.prime.offload.enable = false; - amdgpu = { - amdvlk = false; - opencl = false; - }; + amdgpu.opencl = false; }; -} \ No newline at end of file +} From d75003136c0fc94ee60e51806c2801ff572d06a6 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Wed, 12 Jun 2024 20:43:24 +0200 Subject: [PATCH 0870/1476] framework: Better firmware update instructions and troubleshooting --- framework/README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/framework/README.md b/framework/README.md index 2dd58aa6..4adaefb3 100644 --- a/framework/README.md +++ b/framework/README.md @@ -13,12 +13,38 @@ First put enable `fwupd` services.fwupd.enable = true; ``` +> [!Note] +> For Intel CPU's, even [stable BIOS versions](https://community.frame.work/t/responded-11th-gen-intel-core-bios-3-17-release/25137#update-april-11-2023-2) are currently marked as [test versions](https://fwupd.org/lvfs/devices/work.frame.Laptop.TGL.BIOS.firmware) in LVFS (the default remote fwupd uses to get firmware). +> +> If you want to use these versions, you'll have to [explicitly enable the lvfs-testing remote](https://community.frame.work/t/responded-11th-gen-intel-core-bios-3-17-release/25137#linuxlvfs-7): +> +> ```nix +> services.fwupd.extraRemotes = [ "lvfs-testing" ]; +> # Might be necessary once to make the update succeed +> services.fwupd.uefiCapsuleSettings.DisableCapsuleUpdateOnDisk = true; +> ``` + +> [!Caution] +> Before running the update, make sure you have a [NixOS live ISO](https://nixos.org/download/#nixos-iso) on a USB stick, because some firmware updates [make your system unbootable](https://community.frame.work/t/drive-not-bootable-after-bios-update/12887). + Then run ```sh $ fwupdmgr update ``` +If you cannot boot into your system after upgrading: +1. Boot into the live USB +2. Mount your system into `/mnt` +3. Run + ``` + sudo nixos-enter + ``` +4. Run + ``` + NIXOS_INSTALL_BOOTLOADER=1 /run/current-system/bin/switch-to-configuration boot + ``` + ## Common Modules For the Framework 13 laptops, there are common configuration modules available under the `13-inch/common/` directory, From 62d41cb488e1a83b94c84800043b13c135f9b959 Mon Sep 17 00:00:00 2001 From: xunuwu Date: Fri, 14 Jun 2024 08:30:32 +0200 Subject: [PATCH 0871/1476] add gigabyte-b550 to flake outputs --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 7ff195c2..b2039585 100644 --- a/flake.nix +++ b/flake.nix @@ -89,6 +89,7 @@ friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; focus-m2-gen1 = import ./focus/m2/gen1; + gigabyte-b550 = import ./gigabyte/b550; google-pixelbook = import ./google/pixelbook; gpd-micropc = import ./gpd/micropc; gpd-p2-max = import ./gpd/p2-max; From ae5c8dcc4d0182d07d75df2dc97112de822cb9d6 Mon Sep 17 00:00:00 2001 From: xunuwu Date: Fri, 14 Jun 2024 08:51:59 +0200 Subject: [PATCH 0872/1476] fix unbalanced quoting --- gigabyte/b550/b550-fix-suspend.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gigabyte/b550/b550-fix-suspend.nix b/gigabyte/b550/b550-fix-suspend.nix index 0e922a85..49868093 100644 --- a/gigabyte/b550/b550-fix-suspend.nix +++ b/gigabyte/b550/b550-fix-suspend.nix @@ -26,7 +26,7 @@ }; serviceConfig = { User = "root"; - ExecStart = "-${pkgs.bash}/bin/bash -c 'if grep 'GPP8' /proc/acpi/wakeup | grep -q 'enabled'; then echo 'GPP8' > /proc/acpi/wakeup; fi''"; + ExecStart = "-${pkgs.bash}/bin/bash -c 'if grep 'GPP8' /proc/acpi/wakeup | grep -q 'enabled'; then echo 'GPP8' > /proc/acpi/wakeup; fi'"; RemainAfterExit = "yes"; }; wantedBy = ["multi-user.target"]; From 0cd562157274df3783840bdcb0ce6d9c4cf4aa29 Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Sat, 15 Jun 2024 18:52:13 +0530 Subject: [PATCH 0873/1476] amd/cpu/raphael-igpu: enable scatter/gather for kernel 6.6+ Scatter/gather was introduced in 6.2 kernel and caused flickering and various issues when running iGPU on Ryzen 7000-series CPUs. This issue is not observed in kernel 6.6 or newer versions so we can enable it for kernel 6.6 and newer versions. --- common/cpu/amd/raphael/igpu.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/common/cpu/amd/raphael/igpu.nix b/common/cpu/amd/raphael/igpu.nix index b0940772..71b11526 100644 --- a/common/cpu/amd/raphael/igpu.nix +++ b/common/cpu/amd/raphael/igpu.nix @@ -1,9 +1,15 @@ -{ lib, pkgs, config, ... }: +{ + lib, + pkgs, + config, + ... +}: { # Sets the kernel version to the latest kernel to make the usage of the iGPU possible if your kernel version is too old # Disables scatter/gather which was introduced with kernel version 6.2 # It produces completely white or flashing screens when enabled while using the iGPU of Ryzen 7000-series CPUs (Raphael) + # This issue is not seen in kernel 6.6 or newer versions imports = [ ../. ]; @@ -12,8 +18,9 @@ kernelPackages = pkgs.linuxPackages_latest; }) - (lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2") { - kernelParams = ["amdgpu.sg_display=0"]; - }) + (lib.mkIf ( + (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2") + && (lib.versionOlder config.boot.kernelPackages.kernel.version "6.6") + ) { kernelParams = [ "amdgpu.sg_display=0" ]; }) ]; } From cde8f7e11f036160b0fd6a9e07dc4c8e4061cf06 Mon Sep 17 00:00:00 2001 From: Ayoub NASR Date: Sun, 16 Jun 2024 15:42:26 +0200 Subject: [PATCH 0874/1476] Lenovo 16ACH6H: use zenpower kernel module --- lenovo/legion/16ach6h/hybrid/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/legion/16ach6h/hybrid/default.nix b/lenovo/legion/16ach6h/hybrid/default.nix index 51e10dc0..a33a02a5 100644 --- a/lenovo/legion/16ach6h/hybrid/default.nix +++ b/lenovo/legion/16ach6h/hybrid/default.nix @@ -4,6 +4,7 @@ imports = [ ../../../../common/cpu/amd ../../../../common/cpu/amd/pstate.nix + ../../../../common/cpu/amd/zenpower.nix ../../../../common/gpu/amd ../../../../common/gpu/nvidia/prime.nix ../../../../common/pc/laptop From acb4f0e9bfa8ca2d6fca5e692307b5c994e7dbda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 19 Jun 2024 16:10:45 +0200 Subject: [PATCH 0875/1476] link to matrix room --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index a71f5219..21b32288 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,10 @@ you can easily pin to a particular revision if you desire more stability. See [CONTRIBUTING.md](./CONTRIBUTING.md). +## Get in touch + +For questions and discussions, come join us in the [nixos-anywhere matrix](https://matrix.to/#/#nixos-hardware:nixos.org) room. + ## List of Profiles See code for all available configurations. From 56e370b3425253395f7119b731b2c536bc2cda5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 20 Jun 2024 12:08:04 +0200 Subject: [PATCH 0876/1476] deprecate commons/hdd module We havent't had anything meaningful configuration in this module for a while. So let's deprecate it. --- common/pc/hdd/default.nix | 10 +++++++++- common/pc/laptop/hdd/default.nix | 2 -- hp/elitebook/2560p/default.nix | 1 - hp/notebook/14-df0023/default.nix | 1 - 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/common/pc/hdd/default.nix b/common/pc/hdd/default.nix index 0967ef42..dbf7e66c 100644 --- a/common/pc/hdd/default.nix +++ b/common/pc/hdd/default.nix @@ -1 +1,9 @@ -{} +{ + warnings = [ + '' + DEPRECATED: The module has been deprecated. + + This module has no effect and will be removed in a future release. + '' + ]; +} diff --git a/common/pc/laptop/hdd/default.nix b/common/pc/laptop/hdd/default.nix index 63f29d45..78f918da 100644 --- a/common/pc/laptop/hdd/default.nix +++ b/common/pc/laptop/hdd/default.nix @@ -1,8 +1,6 @@ { lib, ... }: { - imports = [ ../../hdd ]; - # Hard disk protection if the laptop falls: services.hdapsd.enable = lib.mkDefault true; } diff --git a/hp/elitebook/2560p/default.nix b/hp/elitebook/2560p/default.nix index 38e5d600..3802337d 100644 --- a/hp/elitebook/2560p/default.nix +++ b/hp/elitebook/2560p/default.nix @@ -7,7 +7,6 @@ with lib; ../../../common/pc ../../../common/pc/laptop ../../../common/pc/laptop/hdd - ../../../common/pc/hdd ./network.nix ]; diff --git a/hp/notebook/14-df0023/default.nix b/hp/notebook/14-df0023/default.nix index 2edb7cdc..ca6e30d4 100644 --- a/hp/notebook/14-df0023/default.nix +++ b/hp/notebook/14-df0023/default.nix @@ -7,7 +7,6 @@ with lib; ../../../common/pc ../../../common/pc/laptop ../../../common/pc/laptop/hdd - ../../../common/pc/hdd ]; config = { From 28684889c8d4632309cf21ca3f41d570498f11b0 Mon Sep 17 00:00:00 2001 From: Matteo Bongiovanni Date: Sun, 16 Jun 2024 16:45:50 +0200 Subject: [PATCH 0877/1476] System76 Gaze18 nvidia System76 Gaze18 flake System76 Gaze18 fix System76 Gaze18 fix --- flake.nix | 1 + system76/gaze18/default.nix | 40 +++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 system76/gaze18/default.nix diff --git a/flake.nix b/flake.nix index b2039585..a34fe9ea 100644 --- a/flake.nix +++ b/flake.nix @@ -250,6 +250,7 @@ supermicro-x10sll-f = import ./supermicro/x10sll-f; supermicro-x12scz-tln4f = import ./supermicro/x12scz-tln4f; system76 = import ./system76; + system76-gaze18 = import ./system76/gaze18; system76-darp6 = import ./system76/darp6; toshiba-swanky = import ./toshiba/swanky; tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; diff --git a/system76/gaze18/default.nix b/system76/gaze18/default.nix new file mode 100644 index 00000000..bdfe7359 --- /dev/null +++ b/system76/gaze18/default.nix @@ -0,0 +1,40 @@ +{ config, lib, pkgs, ... }: +{ + imports = [ + ../. + ]; + boot.initrd.kernelModules = [ "nvidia" ]; + + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + extraPackages = with pkgs; [ + vaapiVdpau + ]; + }; + + services.xserver.videoDrivers = ["nvidia"]; + + hardware.nvidia = { + + modesetting.enable = true; + + powerManagement.finegrained = true; + + nvidiaSettings = true; + + package = config.boot.kernelPackages.nvidiaPackages.stable; + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + offload = { + enable = true; + enableOffloadCmd = true; + }; + }; + }; +} + + + From f5a5916b354e63e450d07bc06ea642752a1ea9d5 Mon Sep 17 00:00:00 2001 From: Matteo Bongiovanni Date: Sun, 16 Jun 2024 17:50:10 +0200 Subject: [PATCH 0878/1476] System76 mkDefault --- system76/gaze18/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/system76/gaze18/default.nix b/system76/gaze18/default.nix index bdfe7359..5ce51235 100644 --- a/system76/gaze18/default.nix +++ b/system76/gaze18/default.nix @@ -6,9 +6,9 @@ boot.initrd.kernelModules = [ "nvidia" ]; hardware.opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; + enable = lib.mkDefault true; + driSupport = lib.mkDefault true; + driSupport32Bit = lib.mkDefault true; extraPackages = with pkgs; [ vaapiVdpau ]; @@ -18,11 +18,11 @@ hardware.nvidia = { - modesetting.enable = true; + modesetting.enable = lib.mkDefault true; - powerManagement.finegrained = true; + powerManagement.finegrained = lib.mkDefault true; - nvidiaSettings = true; + nvidiaSettings = lib.mkDefault true; package = config.boot.kernelPackages.nvidiaPackages.stable; prime = { @@ -30,7 +30,7 @@ nvidiaBusId = "PCI:1:0:0"; offload = { enable = true; - enableOffloadCmd = true; + enableOffloadCmd = lib.mkDefault true; }; }; }; From b34b29254745a89d20e15c37a3a836ca11a9526e Mon Sep 17 00:00:00 2001 From: Matteo Bongiovanni Date: Mon, 17 Jun 2024 15:55:12 +0200 Subject: [PATCH 0879/1476] System76 Gaze18 cleanup --- system76/gaze18/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/system76/gaze18/default.nix b/system76/gaze18/default.nix index 5ce51235..d3b00441 100644 --- a/system76/gaze18/default.nix +++ b/system76/gaze18/default.nix @@ -35,6 +35,3 @@ }; }; } - - - From 49705fd8397d80c08f59ce67f37e9d32b376d3e3 Mon Sep 17 00:00:00 2001 From: Matteo Bongiovanni Date: Tue, 18 Jun 2024 09:08:59 +0200 Subject: [PATCH 0880/1476] add system76 Gaze18 to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 21b32288..8b794dcc 100644 --- a/README.md +++ b/README.md @@ -312,6 +312,7 @@ See code for all available configurations. | [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | | [System76 (generic)](system76) | `` | | [System76 Darter Pro 6](system76/darp6) | `` | +| [System76 Gazelle Gaze18](system76/gaze18) | `` | | [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | | [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | | [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | From d23f980d75df52ab675cddd1fe3e8038eda79016 Mon Sep 17 00:00:00 2001 From: Matteo Bongiovanni Date: Tue, 18 Jun 2024 09:20:22 +0200 Subject: [PATCH 0881/1476] System76 Gaze18 cleanup --- system76/gaze18/default.nix | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/system76/gaze18/default.nix b/system76/gaze18/default.nix index d3b00441..813d2189 100644 --- a/system76/gaze18/default.nix +++ b/system76/gaze18/default.nix @@ -2,36 +2,23 @@ { imports = [ ../. + ../../common/gpu/nvidia/prime.nix ]; - boot.initrd.kernelModules = [ "nvidia" ]; - hardware.opengl = { enable = lib.mkDefault true; driSupport = lib.mkDefault true; driSupport32Bit = lib.mkDefault true; - extraPackages = with pkgs; [ - vaapiVdpau - ]; }; - services.xserver.videoDrivers = ["nvidia"]; - hardware.nvidia = { modesetting.enable = lib.mkDefault true; powerManagement.finegrained = lib.mkDefault true; - nvidiaSettings = lib.mkDefault true; - - package = config.boot.kernelPackages.nvidiaPackages.stable; prime = { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; - offload = { - enable = true; - enableOffloadCmd = lib.mkDefault true; - }; }; }; } From 972f0149f26f44bd884e3140070f4e973ca043bd Mon Sep 17 00:00:00 2001 From: Matteo Bongiovanni Date: Tue, 18 Jun 2024 16:53:21 +0200 Subject: [PATCH 0882/1476] System76 Gaze18 nvidia not loaded fix and remove modesetting System76 Gaze18 remove modesetting --- system76/gaze18/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system76/gaze18/default.nix b/system76/gaze18/default.nix index 813d2189..94e6b9ec 100644 --- a/system76/gaze18/default.nix +++ b/system76/gaze18/default.nix @@ -4,6 +4,9 @@ ../. ../../common/gpu/nvidia/prime.nix ]; + + boot.initrd.kernelModules = [ "nvidia" ]; + hardware.opengl = { enable = lib.mkDefault true; driSupport = lib.mkDefault true; @@ -12,7 +15,7 @@ hardware.nvidia = { - modesetting.enable = lib.mkDefault true; + # modesetting.enable = lib.mkDefault true; powerManagement.finegrained = lib.mkDefault true; From 4d6b7dfa61ccf39b90bb980d702de3130c940c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 20 Jun 2024 06:58:42 +0200 Subject: [PATCH 0883/1476] system76/gaze18: drop redundant driSupport --- system76/gaze18/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/system76/gaze18/default.nix b/system76/gaze18/default.nix index 94e6b9ec..3ad85a09 100644 --- a/system76/gaze18/default.nix +++ b/system76/gaze18/default.nix @@ -9,7 +9,6 @@ hardware.opengl = { enable = lib.mkDefault true; - driSupport = lib.mkDefault true; driSupport32Bit = lib.mkDefault true; }; From 0307a32b553f81056edd6455168c635aeda6743b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 20 Jun 2024 07:02:31 +0200 Subject: [PATCH 0884/1476] system76/gaze18: add comment about implication of adding driSupport32Bit --- system76/gaze18/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/system76/gaze18/default.nix b/system76/gaze18/default.nix index 3ad85a09..7b87f1ae 100644 --- a/system76/gaze18/default.nix +++ b/system76/gaze18/default.nix @@ -9,6 +9,7 @@ hardware.opengl = { enable = lib.mkDefault true; + # adds ~100MB of 32-bit mesa drivers. driSupport32Bit = lib.mkDefault true; }; From 144f53f534c553dadbf80388e930d0bb494f7b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 20 Jun 2024 15:51:13 +0200 Subject: [PATCH 0885/1476] common: remove deprecated modules --- common/gpu/intel.nix | 11 ----------- common/gpu/nvidia-disable.nix | 11 ----------- common/gpu/nvidia.nix | 12 ------------ 3 files changed, 34 deletions(-) delete mode 100644 common/gpu/intel.nix delete mode 100644 common/gpu/nvidia-disable.nix delete mode 100644 common/gpu/nvidia.nix diff --git a/common/gpu/intel.nix b/common/gpu/intel.nix deleted file mode 100644 index d4256f65..00000000 --- a/common/gpu/intel.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - imports = [ ./intel ]; - - warnings = [ - '' - DEPRECATED: The module has been deprecated. - - Switch to using instead. - '' - ]; -} diff --git a/common/gpu/nvidia-disable.nix b/common/gpu/nvidia-disable.nix deleted file mode 100644 index 3f28c4e6..00000000 --- a/common/gpu/nvidia-disable.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - imports = [ ./nvidia/disable.nix ]; - - warnings = [ - '' - DEPRECATED: The module has been deprecated. - - Switch to using instead. - '' - ]; -} diff --git a/common/gpu/nvidia.nix b/common/gpu/nvidia.nix deleted file mode 100644 index 9443b06a..00000000 --- a/common/gpu/nvidia.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - imports = [ ./nvidia/prime.nix ]; - - warnings = [ - '' - DEPRECATED: The module has been deprecated. - - Switch to using instead if you use prime offloading. - If you are using this without prime, consider switching to instead. - '' - ]; -} From 083823b7904e43a4fc1c7229781417e875359a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 20 Jun 2024 16:05:41 +0200 Subject: [PATCH 0886/1476] gpu/amd: drop hardware.amdgpu.opencl option This now conflicts with nixpkgs. --- common/gpu/amd/default.nix | 11 ----------- lenovo/legion/15ach6h/nvidia/default.nix | 6 ++++-- lenovo/legion/16ach6h/nvidia/default.nix | 6 ++++-- lenovo/legion/16achg6/nvidia/default.nix | 6 ++++-- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix index 26cd833e..6987d6ee 100644 --- a/common/gpu/amd/default.nix +++ b/common/gpu/amd/default.nix @@ -6,11 +6,6 @@ ) // { default = true; }; - options.hardware.amdgpu.opencl = lib.mkEnableOption (lib.mdDoc - "rocm opencl runtime (Install rocmPackages.clr and rocmPackages.clr.icd)" - ) // { - default = true; - }; config = lib.mkMerge [ { @@ -24,11 +19,5 @@ (lib.mkIf config.hardware.amdgpu.loadInInitrd { boot.initrd.kernelModules = [ "amdgpu" ]; }) - (lib.mkIf config.hardware.amdgpu.opencl { - hardware.opengl.extraPackages = - if pkgs ? rocmPackages.clr - then with pkgs.rocmPackages; [ clr clr.icd ] - else with pkgs; [ rocm-opencl-icd rocm-opencl-runtime ]; - }) ]; } diff --git a/lenovo/legion/15ach6h/nvidia/default.nix b/lenovo/legion/15ach6h/nvidia/default.nix index ad62415f..33f32652 100644 --- a/lenovo/legion/15ach6h/nvidia/default.nix +++ b/lenovo/legion/15ach6h/nvidia/default.nix @@ -1,4 +1,4 @@ -{ ... }: +{ lib, options, ... }: { imports = [ ../hybrid ]; @@ -12,6 +12,8 @@ # of nix cannot implement such an operation as canceling an import. hardware = { nvidia.prime.offload.enable = false; - amdgpu.opencl = false; + } // lib.optionalAttrs (options ? amdgpu.opencl.enable) { + # introduced in https://github.com/NixOS/nixpkgs/pull/319865 + amdgpu.opencl.enable = lib.mkDefault false; }; } diff --git a/lenovo/legion/16ach6h/nvidia/default.nix b/lenovo/legion/16ach6h/nvidia/default.nix index ad62415f..33f32652 100644 --- a/lenovo/legion/16ach6h/nvidia/default.nix +++ b/lenovo/legion/16ach6h/nvidia/default.nix @@ -1,4 +1,4 @@ -{ ... }: +{ lib, options, ... }: { imports = [ ../hybrid ]; @@ -12,6 +12,8 @@ # of nix cannot implement such an operation as canceling an import. hardware = { nvidia.prime.offload.enable = false; - amdgpu.opencl = false; + } // lib.optionalAttrs (options ? amdgpu.opencl.enable) { + # introduced in https://github.com/NixOS/nixpkgs/pull/319865 + amdgpu.opencl.enable = lib.mkDefault false; }; } diff --git a/lenovo/legion/16achg6/nvidia/default.nix b/lenovo/legion/16achg6/nvidia/default.nix index aa292cde..5c933fad 100644 --- a/lenovo/legion/16achg6/nvidia/default.nix +++ b/lenovo/legion/16achg6/nvidia/default.nix @@ -1,10 +1,12 @@ -{ ... }: +{ lib, options, ... }: { imports = [ ../hybrid ]; services.xserver.videoDrivers = [ "nvidia" ]; hardware = { nvidia.prime.offload.enable = false; - amdgpu.opencl = false; + } // lib.optionalAttrs (options ? amdgpu.opencl.enable) { + # introduced in https://github.com/NixOS/nixpkgs/pull/319865 + amdgpu.opencl.enable = lib.mkDefault false; }; } From 68ef79e804710488c4ba158ad14a529b12a65279 Mon Sep 17 00:00:00 2001 From: Zach Coyle Date: Thu, 20 Jun 2024 17:15:06 -0400 Subject: [PATCH 0887/1476] apple/t2: update to kernel 6.9.4 --- apple/t2/pkgs/linux-t2.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index beff7a37..ea8fbdc5 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -5,11 +5,11 @@ let patchRepo = fetchFromGitHub { owner = "t2linux"; repo = "linux-t2-patches"; - rev = "33d5a01c41f140a416a7f840cc06e7f30dc58d8d"; - hash = "sha256-wx5jkOQ8l/4XRGLV9KFrxXuqunwcFA9RB1yhrtseP2A="; + rev = "0ad2b3913f5484ba8e86b6965f5d88903464261d"; + hash = "sha256-mwT4cuIBrz3tz8+fAxVKmnRtkPRp3lWmNbocuXCsm44="; }; - version = "6.9.3"; + version = "6.9.4"; majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); in buildLinux (args // { @@ -22,7 +22,7 @@ buildLinux (args // { src = runCommand "patched-source" {} '' cp -r ${fetchzip { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-7262WHO2veIn+9cd4m9io1ov93LsfpgRKfmvBx0DCBA="; + hash = "sha256-8jC5DpPi6poig1gmJPIIZ2HMwQQt1kTK4PcvyYm+Hsg="; }} $out chmod -R u+w $out cd $out From 27487bcd12139b8b20442252e1fc3895d4394ce1 Mon Sep 17 00:00:00 2001 From: Flameopathic <64027365+Flameopathic@users.noreply.github.com> Date: Thu, 20 Jun 2024 20:45:41 -0400 Subject: [PATCH 0888/1476] change iptsd and system-control to nixpkgs versions - fixes iptsd bug --- microsoft/surface/common/default.nix | 2 - microsoft/surface/common/ipts/default.nix | 48 ------------------- .../common/surface-control/default.nix | 25 ---------- .../surface/surface-laptop-amd/default.nix | 6 +-- .../surface/surface-pro-intel/default.nix | 6 +-- 5 files changed, 6 insertions(+), 81 deletions(-) delete mode 100644 microsoft/surface/common/ipts/default.nix delete mode 100644 microsoft/surface/common/surface-control/default.nix diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 7499a19b..057142c4 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -6,8 +6,6 @@ let in { imports = [ ./kernel - ./ipts - ./surface-control ]; microsoft-surface.kernelVersion = mkDefault "6.6"; diff --git a/microsoft/surface/common/ipts/default.nix b/microsoft/surface/common/ipts/default.nix deleted file mode 100644 index 8e1f4756..00000000 --- a/microsoft/surface/common/ipts/default.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - inherit (lib) mkDefault mkEnableOption mkIf mkMerge mkOption types; - - cfg = config.microsoft-surface.ipts; - - iptsConfFile = pkgs.writeTextFile { - name = "iptsd.conf"; - text = lib.generators.toINI { } cfg.config; - }; - -in -{ - options.microsoft-surface.ipts = { - enable = mkEnableOption "Enable IPTSd for Microsoft Surface"; - - config = mkOption { - type = types.attrs; - default = { }; - description = '' - Values to wrote to iptsd.conf, first key is section, second key is property. - See the example config; https://github.com/linux-surface/iptsd/blob/v1.4.0/etc/iptsd.conf - ''; - example = '' - DFT = { - ButtonMinMag = 1000; - }; - ''; - }; - }; - - config = mkMerge [ - { - microsoft-surface.ipts.enable = mkDefault false; - } - - (mkIf cfg.enable { - systemd.services.iptsd = { - description = "IPTSD"; - path = with pkgs; [ iptsd ]; - script = "iptsd $(iptsd-find-hidraw)"; - wantedBy = [ "multi-user.target" ]; - }; - environment.etc."iptsd/iptsd.conf".source = "${iptsConfFile}"; - }) - ]; -} diff --git a/microsoft/surface/common/surface-control/default.nix b/microsoft/surface/common/surface-control/default.nix deleted file mode 100644 index 4927c24e..00000000 --- a/microsoft/surface/common/surface-control/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, lib, pkgs, ... }: - - -let - inherit (lib) mkDefault mkEnableOption mkIf mkMerge; - - cfg = config.microsoft-surface.surface-control; - -in { - options.microsoft-surface.surface-control = { - enable = mkEnableOption "Enable 'surface-control' for Microsoft Surface"; - }; - - config = mkMerge [ - { - microsoft-surface.surface-control.enable = mkDefault false; - } - - (mkIf cfg.enable { - environment.systemPackages = with pkgs; [ surface-control ]; - services.udev.packages = with pkgs; [ surface-control]; - users.groups.surface-control = { }; - }) - ]; -} diff --git a/microsoft/surface/surface-laptop-amd/default.nix b/microsoft/surface/surface-laptop-amd/default.nix index 4985911f..644b7d94 100644 --- a/microsoft/surface/surface-laptop-amd/default.nix +++ b/microsoft/surface/surface-laptop-amd/default.nix @@ -1,4 +1,4 @@ -{ ... }: +{ lib, pkgs, ... }: # This module is intended to support the Surface Laptop range, specifically those with AMD CPUs. # It's expected it will work equally well on many other Surface models, but they may need further @@ -15,6 +15,6 @@ ]; # Note: The IPTS module is not often required on devices with Surface Laptop 3 (AMD). - microsoft-surface.ipts.enable = true; - microsoft-surface.surface-control.enable = true; + services.iptsd.enable = lib.mkDefault true; + environment.systemPackages = [ pkgs.surface-control ]; } diff --git a/microsoft/surface/surface-pro-intel/default.nix b/microsoft/surface/surface-pro-intel/default.nix index 026843a3..a1ab89c5 100644 --- a/microsoft/surface/surface-pro-intel/default.nix +++ b/microsoft/surface/surface-pro-intel/default.nix @@ -1,4 +1,4 @@ -{ ... }: +{ lib, pkgs, ... }: # This module is intended to support the Surface Pro range, specifically those with Intel CPUs. # It's expected it will work equally well on many other Surface models, but they may need further @@ -13,6 +13,6 @@ ../../../common/cpu/intel ]; - microsoft-surface.ipts.enable = true; - microsoft-surface.surface-control.enable = true; + services.iptsd.enable = lib.mkDefault true; + environment.systemPackages = [ pkgs.surface-control ]; } From cc634b69c8312c4e88469d3c7e8fb5ecc72e7dc6 Mon Sep 17 00:00:00 2001 From: toastal Date: Fri, 21 Jun 2024 20:44:42 +0700 Subject: [PATCH 0889/1476] =?UTF-8?q?remove=20driSupport,=20opengl=20?= =?UTF-8?q?=E2=86=92=20graphics?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- acer/aspire/4810t/default.nix | 3 --- apple/macbook-pro/10-1/default.nix | 4 +++- apple/macmini/4/default.nix | 23 ++++++++++---------- asus/zephyrus/ga402x/amdgpu/default.nix | 2 +- asus/zephyrus/ga402x/nvidia/default.nix | 2 +- common/gpu/amd/default.nix | 6 ++--- common/gpu/intel/default.nix | 6 ++--- common/gpu/nvidia/default.nix | 2 +- dell/precision/7520/default.nix | 29 +++++++++++++------------ dell/xps/15-9510/nvidia/default.nix | 10 ++++----- focus/m2/gen1/default.nix | 5 ++--- gpd/pocket-3/default.nix | 2 +- lenovo/thinkpad/p1/3th-gen/nvidia.nix | 23 ++++++++++++-------- lenovo/thinkpad/p50/default.nix | 6 ----- lenovo/thinkpad/p51/default.nix | 11 +++++----- lenovo/thinkpad/p52/default.nix | 12 +++++----- lenovo/yoga/6/13ALC6/default.nix | 2 +- lenovo/yoga/7/14ARH7/amdgpu/default.nix | 2 +- lenovo/yoga/7/14ARH7/nvidia/default.nix | 2 +- system76/gaze18/default.nix | 5 ++--- 20 files changed, 77 insertions(+), 80 deletions(-) diff --git a/acer/aspire/4810t/default.nix b/acer/aspire/4810t/default.nix index d40b454b..c0f95dcd 100644 --- a/acer/aspire/4810t/default.nix +++ b/acer/aspire/4810t/default.nix @@ -19,9 +19,6 @@ ]; }; - # TODO: reverse compat - hardware.opengl.driSupport = false; - # TODO: reverse compat services.xserver = { defaultDepth = lib.mkDefault 24; diff --git a/apple/macbook-pro/10-1/default.nix b/apple/macbook-pro/10-1/default.nix index 37030966..f3f58c2b 100644 --- a/apple/macbook-pro/10-1/default.nix +++ b/apple/macbook-pro/10-1/default.nix @@ -1,3 +1,5 @@ +{ lib, ... }: + { imports = [ ../. @@ -5,7 +7,7 @@ ]; # TODO: reverse compat - hardware.opengl.driSupport32Bit = true; + hardware.graphics.enable32Bit = lib.mkDefault true; services.xserver = { # TODO: we should not enable unfree drivers diff --git a/apple/macmini/4/default.nix b/apple/macmini/4/default.nix index fd3062d5..86210c4e 100644 --- a/apple/macmini/4/default.nix +++ b/apple/macmini/4/default.nix @@ -12,17 +12,18 @@ in services.xserver.videoDrivers = mkDefault [ "nvidiaLegacy340" ]; - hardware.opengl = { - enable = mkDefault true; - driSupport = mkDefault true; - driSupport32Bit = mkDefault true; - }; + hardware = { + graphics = { + enable = mkDefault true; + enable32Bit = mkDefault true; + }; - hardware.nvidia = { - modesetting.enable = mkDefault true; - powerManagement.enable = mkDefault false; - powerManagement.finegrained = mkDefault false; - open = mkDefault false; - nvidiaSettings = mkDefault true; + nvidia = { + modesetting.enable = mkDefault true; + powerManagement.enable = mkDefault false; + powerManagement.finegrained = mkDefault false; + open = mkDefault false; + nvidiaSettings = mkDefault true; + }; }; } diff --git a/asus/zephyrus/ga402x/amdgpu/default.nix b/asus/zephyrus/ga402x/amdgpu/default.nix index 17103c56..80a508fd 100644 --- a/asus/zephyrus/ga402x/amdgpu/default.nix +++ b/asus/zephyrus/ga402x/amdgpu/default.nix @@ -26,7 +26,7 @@ in { hardware = { amdgpu.loadInInitrd = true; - opengl.extraPackages = with pkgs; [ + graphics.extraPackages = with pkgs; [ vaapiVdpau libvdpau-va-gl ]; diff --git a/asus/zephyrus/ga402x/nvidia/default.nix b/asus/zephyrus/ga402x/nvidia/default.nix index 7a1a8c32..73a2b9db 100644 --- a/asus/zephyrus/ga402x/nvidia/default.nix +++ b/asus/zephyrus/ga402x/nvidia/default.nix @@ -26,7 +26,7 @@ in { hardware = { ## Enable the Nvidia card, as well as Prime and Offload: amdgpu.loadInInitrd = true; - opengl.extraPackages = with pkgs; [ + graphics.extraPackages = with pkgs; [ # Also in nvidia/default.nix vaapiVdpau libvdpau-va-gl diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix index 6987d6ee..9228bc39 100644 --- a/common/gpu/amd/default.nix +++ b/common/gpu/amd/default.nix @@ -11,9 +11,9 @@ { services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ]; - hardware.opengl = { - driSupport = lib.mkDefault true; - driSupport32Bit = lib.mkDefault true; + hardware.graphics = { + enable = lib.mkDefault true; + enable32Bit = lib.mkDefault true; }; } (lib.mkIf config.hardware.amdgpu.loadInInitrd { diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index 91c8765f..90afad12 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -26,10 +26,10 @@ boot.initrd.kernelModules = [ config.hardware.intelgpu.driver ]; environment.variables = { - VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); + VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl"); }; - hardware.opengl.extraPackages = with pkgs; [ + hardware.graphics.extraPackages = with pkgs; [ ( if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel @@ -40,7 +40,7 @@ intel-media-driver ]; - hardware.opengl.extraPackages32 = with pkgs.driversi686Linux; [ + hardware.graphics.extraPackages32 = with pkgs.driversi686Linux; [ ( if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel diff --git a/common/gpu/nvidia/default.nix b/common/gpu/nvidia/default.nix index 47f2d347..43b4608a 100644 --- a/common/gpu/nvidia/default.nix +++ b/common/gpu/nvidia/default.nix @@ -2,7 +2,7 @@ { services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ]; - hardware.opengl.extraPackages = with pkgs; [ + hardware.graphics.extraPackages = with pkgs; [ vaapiVdpau ]; } diff --git a/dell/precision/7520/default.nix b/dell/precision/7520/default.nix index c20ea891..db5626fa 100644 --- a/dell/precision/7520/default.nix +++ b/dell/precision/7520/default.nix @@ -21,25 +21,26 @@ }; 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 = { + graphics = { + enable = lib.mkDefault true; + enable32Bit = lib.mkDefault true; + }; + 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"); + VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkOverride 990 "nvidia"); }; services.thermald.enable = lib.mkDefault true; diff --git a/dell/xps/15-9510/nvidia/default.nix b/dell/xps/15-9510/nvidia/default.nix index 723c5748..990aea70 100644 --- a/dell/xps/15-9510/nvidia/default.nix +++ b/dell/xps/15-9510/nvidia/default.nix @@ -5,6 +5,11 @@ services.switcherooControl.enable = lib.mkDefault true; hardware = { + graphics = { + enable = lib.mkDefault true; + enable32Bit = lib.mkDefault true; + extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ]; + }; nvidia = { prime = { # Bus ID of the Intel GPU. @@ -20,10 +25,5 @@ finegrained = lib.mkDefault true; }; }; - opengl = { - enable = lib.mkDefault true; - driSupport32Bit = lib.mkDefault true; - extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ]; - }; }; } diff --git a/focus/m2/gen1/default.nix b/focus/m2/gen1/default.nix index 74e4df39..27ee1f3e 100644 --- a/focus/m2/gen1/default.nix +++ b/focus/m2/gen1/default.nix @@ -18,10 +18,9 @@ boot.blacklistedKernelModules = [ "i2c_nvidia_gpu" ]; hardware.nvidia.modesetting.enable = lib.mkDefault true; - hardware.opengl = { + hardware.graphics = { enable = lib.mkDefault true; - driSupport = lib.mkDefault true; - driSupport32Bit = lib.mkDefault true; + enable32Bit = lib.mkDefault true; }; hardware.nvidia.prime = { diff --git a/gpd/pocket-3/default.nix b/gpd/pocket-3/default.nix index 52d09136..73d2bed0 100644 --- a/gpd/pocket-3/default.nix +++ b/gpd/pocket-3/default.nix @@ -14,7 +14,7 @@ in # GPU is an Intel Iris Xe, on a “TigerLake” mobile CPU boot.initrd.kernelModules = [ "i915" ]; # Early loading so the passphrase prompt appears on external displays services.xserver.videoDrivers = [ "intel" ]; - hardware.opengl.extraPackages = with pkgs; [ + hardware.graphics.extraPackages = with pkgs; [ intel-media-driver (if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver) ]; diff --git a/lenovo/thinkpad/p1/3th-gen/nvidia.nix b/lenovo/thinkpad/p1/3th-gen/nvidia.nix index 08081071..6f939e93 100644 --- a/lenovo/thinkpad/p1/3th-gen/nvidia.nix +++ b/lenovo/thinkpad/p1/3th-gen/nvidia.nix @@ -1,13 +1,18 @@ { lib, ... }: { - hardware.nvidia.modesetting.enable = true; - hardware.opengl.driSupport32Bit = true; - hardware.opengl.enable = true; - - 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"; + hardware = { + graphics = { + enable = lib.mkDefault true; + enable32Bit = lib.mkDefault true; + }; + nvidia = { + modesetting.enable = lib.mkDefault true; + 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/lenovo/thinkpad/p50/default.nix b/lenovo/thinkpad/p50/default.nix index 3e77eb58..ef2cbd56 100644 --- a/lenovo/thinkpad/p50/default.nix +++ b/lenovo/thinkpad/p50/default.nix @@ -13,12 +13,6 @@ nvidiaBusId = lib.mkDefault "PCI:1:0:0"; }; }; - - # is this too much? It's convenient for Steam. - opengl = { - driSupport = lib.mkDefault true; - driSupport32Bit = lib.mkDefault true; - }; }; # required to make wireless work diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix index 4c9be3c4..ca864554 100644 --- a/lenovo/thinkpad/p51/default.nix +++ b/lenovo/thinkpad/p51/default.nix @@ -8,18 +8,17 @@ ]; hardware = { + graphics = { + enable = lib.mkDefault true; + enable32Bit = lib.mkDefault true; + }; + nvidia = { prime = { intelBusId = lib.mkDefault "PCI:0:2:0"; nvidiaBusId = lib.mkDefault "PCI:1:0:0"; }; }; - - # is this too much? It's convenient for Steam. - opengl = { - driSupport = lib.mkDefault true; - driSupport32Bit = lib.mkDefault true; - }; }; # required to make wireless work diff --git a/lenovo/thinkpad/p52/default.nix b/lenovo/thinkpad/p52/default.nix index 31c9294a..e7689236 100644 --- a/lenovo/thinkpad/p52/default.nix +++ b/lenovo/thinkpad/p52/default.nix @@ -7,18 +7,18 @@ ]; hardware = { + # is this too much? It's convenient for Steam. + graphics = { + enable = lib.mkDefault true; + enable32Bit = lib.mkDefault true; + }; + nvidia = { prime = { intelBusId = lib.mkDefault "PCI:0:2:0"; nvidiaBusId = lib.mkDefault "PCI:1:0:0"; }; }; - - # is this too much? It's convenient for Steam. - opengl = { - driSupport = lib.mkDefault true; - driSupport32Bit = lib.mkDefault true; - }; }; # required to make wireless work diff --git a/lenovo/yoga/6/13ALC6/default.nix b/lenovo/yoga/6/13ALC6/default.nix index bd2e80ca..1177bc7f 100644 --- a/lenovo/yoga/6/13ALC6/default.nix +++ b/lenovo/yoga/6/13ALC6/default.nix @@ -7,7 +7,7 @@ ]; boot.initrd.kernelModules = [ "ideapad_laptop" ]; - hardware.opengl.extraPackages = with pkgs; [ + hardware.graphics.extraPackages = with pkgs; [ vaapiVdpau libvdpau-va-gl ]; diff --git a/lenovo/yoga/7/14ARH7/amdgpu/default.nix b/lenovo/yoga/7/14ARH7/amdgpu/default.nix index 4d16de0a..66309118 100644 --- a/lenovo/yoga/7/14ARH7/amdgpu/default.nix +++ b/lenovo/yoga/7/14ARH7/amdgpu/default.nix @@ -15,7 +15,7 @@ in { hardware = { amdgpu.loadInInitrd = true; - opengl.extraPackages = with pkgs; [ + graphics.extraPackages = with pkgs; [ vaapiVdpau libvdpau-va-gl ]; diff --git a/lenovo/yoga/7/14ARH7/nvidia/default.nix b/lenovo/yoga/7/14ARH7/nvidia/default.nix index fb4553ec..6c97a074 100644 --- a/lenovo/yoga/7/14ARH7/nvidia/default.nix +++ b/lenovo/yoga/7/14ARH7/nvidia/default.nix @@ -19,7 +19,7 @@ in { hardware = { ## Enable the Nvidia card, as well as Prime and Offload: amdgpu.loadInInitrd = true; - opengl.extraPackages = with pkgs; [ + graphics.extraPackages = with pkgs; [ vaapiVdpau libvdpau-va-gl ]; diff --git a/system76/gaze18/default.nix b/system76/gaze18/default.nix index 7b87f1ae..0485e16c 100644 --- a/system76/gaze18/default.nix +++ b/system76/gaze18/default.nix @@ -7,10 +7,9 @@ boot.initrd.kernelModules = [ "nvidia" ]; - hardware.opengl = { + hardware.graphics = { enable = lib.mkDefault true; - # adds ~100MB of 32-bit mesa drivers. - driSupport32Bit = lib.mkDefault true; + enable32Bit = lib.mkDefault true; }; hardware.nvidia = { From 584a5e551885382c1cf9b09a990fbcd2ccbc992f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 21 Jun 2024 23:26:44 +0200 Subject: [PATCH 0890/1476] fix 24.05 evaluation --- .github/workflows/test.yml | 5 +++- apple/macbook-pro/10-1/default.nix | 1 + apple/macmini/4/default.nix | 1 + asus/zephyrus/ga402x/amdgpu/default.nix | 1 + common/gpu/24.05-compat.nix | 37 +++++++++++++++++++++++++ common/gpu/amd/default.nix | 1 + common/gpu/intel/default.nix | 1 + common/gpu/nvidia/default.nix | 1 + dell/precision/7520/default.nix | 2 -- gpd/pocket-3/default.nix | 1 + lenovo/thinkpad/p1/3th-gen/nvidia.nix | 3 ++ lenovo/thinkpad/p51/default.nix | 1 + lenovo/thinkpad/p52/default.nix | 1 + lenovo/yoga/6/13ALC6/default.nix | 1 + lenovo/yoga/7/14ARH7/amdgpu/default.nix | 1 + tests/run.py | 2 +- 16 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 common/gpu/24.05-compat.nix diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54a9c486..7c67a213 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,11 +7,14 @@ on: jobs: tests: runs-on: ubuntu-latest + strategy: + matrix: + channel: [ nixos-unstable, nixos-24.05 ] steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@V27 with: - nix_path: nixpkgs=channel:nixos-unstable + nix_path: nixpkgs=channel:${{ matrix.channel }} - name: Show nixpkgs version run: nix-instantiate --eval -E '(import {}).lib.version' - run: ./tests/run.py diff --git a/apple/macbook-pro/10-1/default.nix b/apple/macbook-pro/10-1/default.nix index f3f58c2b..2a2c624d 100644 --- a/apple/macbook-pro/10-1/default.nix +++ b/apple/macbook-pro/10-1/default.nix @@ -4,6 +4,7 @@ imports = [ ../. ../../../common/pc/laptop/ssd + ../../../common/gpu/24.05-compat.nix ]; # TODO: reverse compat diff --git a/apple/macmini/4/default.nix b/apple/macmini/4/default.nix index 86210c4e..fd6d9c9a 100644 --- a/apple/macmini/4/default.nix +++ b/apple/macmini/4/default.nix @@ -8,6 +8,7 @@ in { imports = [ ../. + ../../../common/gpu/24.05-compat.nix ]; services.xserver.videoDrivers = mkDefault [ "nvidiaLegacy340" ]; diff --git a/asus/zephyrus/ga402x/amdgpu/default.nix b/asus/zephyrus/ga402x/amdgpu/default.nix index 80a508fd..b1791d78 100644 --- a/asus/zephyrus/ga402x/amdgpu/default.nix +++ b/asus/zephyrus/ga402x/amdgpu/default.nix @@ -11,6 +11,7 @@ let in { imports = [ ../shared.nix + ../../../../common/gpu/24.05-compat.nix ]; options.hardware.asus.zephyrus.ga402x.amdgpu = { diff --git a/common/gpu/24.05-compat.nix b/common/gpu/24.05-compat.nix new file mode 100644 index 00000000..ca53247d --- /dev/null +++ b/common/gpu/24.05-compat.nix @@ -0,0 +1,37 @@ +{ + config, + lib, + ... +}: +{ + # Backward-compat for 24.05, can be removed after we drop 24.05 support + options = { + hardware.graphics = lib.optionalAttrs (lib.versionOlder lib.version "24.11pre") { + enable = lib.mkOption { + type = lib.types.bool; + default = false; + }; + enable32Bit = lib.mkOption { + type = lib.types.bool; + default = false; + }; + extraPackages = lib.mkOption { + type = lib.types.listOf lib.types.package; + default = []; + }; + extraPackages32 = lib.mkOption { + type = lib.types.listOf lib.types.package; + default = []; + }; + }; + }; + + config = { + hardware.opengl = lib.optionalAttrs (lib.versionOlder lib.version "24.11pre") { + enable = config.hardware.graphics.enable; + driSupport32Bit = config.hardware.graphics.enable32Bit; + extraPackages = config.hardware.graphics.extraPackages; + extraPackages32 = config.hardware.graphics.extraPackages32; + }; + }; +} diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix index 9228bc39..f4bd7f17 100644 --- a/common/gpu/amd/default.nix +++ b/common/gpu/amd/default.nix @@ -7,6 +7,7 @@ default = true; }; + imports = [ ../24.05-compat.nix ]; config = lib.mkMerge [ { services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ]; diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index 90afad12..b5c0dcdc 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -5,6 +5,7 @@ ... }: { + imports = [ ../24.05-compat.nix ]; options.hardware.intelgpu.driver = lib.mkOption { description = "Intel GPU driver to use"; type = lib.types.enum [ diff --git a/common/gpu/nvidia/default.nix b/common/gpu/nvidia/default.nix index 43b4608a..6141aaf3 100644 --- a/common/gpu/nvidia/default.nix +++ b/common/gpu/nvidia/default.nix @@ -1,6 +1,7 @@ { lib, pkgs, ... }: { + imports = [ ../24.05-compat.nix ]; services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ]; hardware.graphics.extraPackages = with pkgs; [ vaapiVdpau diff --git a/dell/precision/7520/default.nix b/dell/precision/7520/default.nix index db5626fa..59fa95e6 100644 --- a/dell/precision/7520/default.nix +++ b/dell/precision/7520/default.nix @@ -1,8 +1,6 @@ { config, lib, - pkgs, - inputs, ... }: { imports = [ diff --git a/gpd/pocket-3/default.nix b/gpd/pocket-3/default.nix index 73d2bed0..1ed95ebb 100644 --- a/gpd/pocket-3/default.nix +++ b/gpd/pocket-3/default.nix @@ -6,6 +6,7 @@ in ../../common/pc/laptop ../../common/pc/laptop/ssd ../../common/hidpi.nix + ../../common/gpu/24.05-compat.nix ]; # Necessary kernel modules diff --git a/lenovo/thinkpad/p1/3th-gen/nvidia.nix b/lenovo/thinkpad/p1/3th-gen/nvidia.nix index 6f939e93..ae191675 100644 --- a/lenovo/thinkpad/p1/3th-gen/nvidia.nix +++ b/lenovo/thinkpad/p1/3th-gen/nvidia.nix @@ -1,5 +1,8 @@ { lib, ... }: { + imports = [ + ../../../../common/gpu/24.05-compat.nix + ]; hardware = { graphics = { enable = lib.mkDefault true; diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix index ca864554..91289701 100644 --- a/lenovo/thinkpad/p51/default.nix +++ b/lenovo/thinkpad/p51/default.nix @@ -1,5 +1,6 @@ { config, lib, ... }: { imports = [ + ../../../common/gpu/24.05-compat.nix ../../../common/gpu/nvidia/prime.nix ../../../common/cpu/intel ../../../common/cpu/intel/kaby-lake diff --git a/lenovo/thinkpad/p52/default.nix b/lenovo/thinkpad/p52/default.nix index e7689236..2f6676a5 100644 --- a/lenovo/thinkpad/p52/default.nix +++ b/lenovo/thinkpad/p52/default.nix @@ -1,5 +1,6 @@ { lib, config, ... }: { imports = [ + ../../../common/gpu/24.05-compat.nix ../../../common/gpu/nvidia/prime.nix ../../../common/cpu/intel ../../../common/pc/laptop/acpi_call.nix diff --git a/lenovo/yoga/6/13ALC6/default.nix b/lenovo/yoga/6/13ALC6/default.nix index 1177bc7f..78784c78 100644 --- a/lenovo/yoga/6/13ALC6/default.nix +++ b/lenovo/yoga/6/13ALC6/default.nix @@ -4,6 +4,7 @@ imports = [ ../../../thinkpad/yoga.nix ../../../../common/gpu/amd/default.nix + ../../../../common/gpu/24.05-compat.nix ]; boot.initrd.kernelModules = [ "ideapad_laptop" ]; diff --git a/lenovo/yoga/7/14ARH7/amdgpu/default.nix b/lenovo/yoga/7/14ARH7/amdgpu/default.nix index 66309118..454a9143 100644 --- a/lenovo/yoga/7/14ARH7/amdgpu/default.nix +++ b/lenovo/yoga/7/14ARH7/amdgpu/default.nix @@ -8,6 +8,7 @@ let in { imports = [ ../shared.nix + ../../../../../common/gpu/24.05-compat.nix ]; # AMD RX680 diff --git a/tests/run.py b/tests/run.py index 07a86c02..ec8d8ce2 100755 --- a/tests/run.py +++ b/tests/run.py @@ -81,7 +81,7 @@ def write_eval_test(f: IO[str], profiles: list[str]) -> None: continue system = "x86_64-linux" - if "raspberry-pi/4" == profile or "raspberry-pi/5" == profile: + if profile in ("raspberry-pi/4", "raspberry-pi/5"): system = "aarch64-linux" f.write( From 4e59e4c9e9fed47dc0517041eac0deb16711d9b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 22 Jun 2024 08:42:43 +0200 Subject: [PATCH 0891/1476] common/gpu/24.05-compat: don't create conflicts with user configuration fixes https://github.com/NixOS/nixos-hardware/issues/1000 --- common/gpu/24.05-compat.nix | 36 ++++++------------------------------ 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/common/gpu/24.05-compat.nix b/common/gpu/24.05-compat.nix index ca53247d..3e3495f1 100644 --- a/common/gpu/24.05-compat.nix +++ b/common/gpu/24.05-compat.nix @@ -1,37 +1,13 @@ { - config, lib, ... }: { # Backward-compat for 24.05, can be removed after we drop 24.05 support - options = { - hardware.graphics = lib.optionalAttrs (lib.versionOlder lib.version "24.11pre") { - enable = lib.mkOption { - type = lib.types.bool; - default = false; - }; - enable32Bit = lib.mkOption { - type = lib.types.bool; - default = false; - }; - extraPackages = lib.mkOption { - type = lib.types.listOf lib.types.package; - default = []; - }; - extraPackages32 = lib.mkOption { - type = lib.types.listOf lib.types.package; - default = []; - }; - }; - }; - - config = { - hardware.opengl = lib.optionalAttrs (lib.versionOlder lib.version "24.11pre") { - enable = config.hardware.graphics.enable; - driSupport32Bit = config.hardware.graphics.enable32Bit; - extraPackages = config.hardware.graphics.extraPackages; - extraPackages32 = config.hardware.graphics.extraPackages32; - }; - }; + imports = lib.optionals (lib.versionOlder lib.version "24.11pre") [ + (lib.mkAliasOptionModule [ "hardware" "graphics" "enable" ] [ "hardware" "opengl" "enable" ]) + (lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages" ] [ "hardware" "opengl" "extraPackages" ]) + (lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages32" ] [ "hardware" "opengl" "extraPackages32" ]) + (lib.mkAliasOptionModule [ "hardware" "graphics" "enable32Bit" ] [ "hardware" "opengl" "driSupport32Bit" ]) + ]; } From 7d87afd10b176dee02376c476cb916eb33e23d8b Mon Sep 17 00:00:00 2001 From: Flameopathic Date: Sat, 22 Jun 2024 13:51:28 -0400 Subject: [PATCH 0892/1476] feat: spi thermal conf --- .../surface/surface-pro-intel/default.nix | 7 ++++- .../surface-pro-intel/thermal-conf.xml | 27 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 microsoft/surface/surface-pro-intel/thermal-conf.xml diff --git a/microsoft/surface/surface-pro-intel/default.nix b/microsoft/surface/surface-pro-intel/default.nix index 026843a3..2cfa95da 100644 --- a/microsoft/surface/surface-pro-intel/default.nix +++ b/microsoft/surface/surface-pro-intel/default.nix @@ -1,4 +1,4 @@ -{ ... }: +{ lib, ... }: # This module is intended to support the Surface Pro range, specifically those with Intel CPUs. # It's expected it will work equally well on many other Surface models, but they may need further @@ -15,4 +15,9 @@ microsoft-surface.ipts.enable = true; microsoft-surface.surface-control.enable = true; + + services.thermald = lib.mkDefault { + enable = true; + configFile = ./thermal-conf.xml; + }; } diff --git a/microsoft/surface/surface-pro-intel/thermal-conf.xml b/microsoft/surface/surface-pro-intel/thermal-conf.xml new file mode 100644 index 00000000..459ef818 --- /dev/null +++ b/microsoft/surface/surface-pro-intel/thermal-conf.xml @@ -0,0 +1,27 @@ + + + + Surface Pro Intel Thermal Workaround + * + QUIET + + + cpu + + + x86_pkg_temp + 65000 + passive + SEQUENTIAL + + 1 + rapl_controller + 100 + 10 + + + + + + + From 0cf592f520a4cbb6e8b4e84e38988bee5e939cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 23 Jun 2024 13:59:30 +0200 Subject: [PATCH 0893/1476] add new tests to mergify configuration --- .github/workflows/test.yml | 1 + .mergify.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7c67a213..9d1999e3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,6 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: + # when updating channels, also update .mergify.yml channel: [ nixos-unstable, nixos-24.05 ] steps: - uses: actions/checkout@v4 diff --git a/.mergify.yml b/.mergify.yml index 45ffb1e9..dc3bf775 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,7 +1,8 @@ queue_rules: - name: default merge_conditions: - - check-success=tests + - check-success=tests (nixos-24.05) + - check-success=tests (nixos-unstable) defaults: actions: queue: From c3e48cbd88414f583ff08804eb57b0da4c194f9e Mon Sep 17 00:00:00 2001 From: "Paepcke, Michael" Date: Sun, 23 Jun 2024 11:28:59 +0200 Subject: [PATCH 0894/1476] update macbookpro14,1 to 24.01 (2024) --- apple/macbook-pro/14-1/README.md | 35 +++++---- apple/macbook-pro/14-1/default.nix | 112 +++++++++++++++++++---------- 2 files changed, 97 insertions(+), 50 deletions(-) diff --git a/apple/macbook-pro/14-1/README.md b/apple/macbook-pro/14-1/README.md index a8941d14..0a0e2df6 100644 --- a/apple/macbook-pro/14-1/README.md +++ b/apple/macbook-pro/14-1/README.md @@ -1,17 +1,26 @@ -# MacBook Pro 14,1 +# MacBook Pro 14,1, NixOS 24.01 (2024) ## Audio - -Audio is a lost cause. Bribe an Apple or Cirrus engineer for the datasheet. ;) - -## Thunderbolt - -The thunderbolt module will oops upon system resume, and subsequently refuse to work until next reboot. - -## Suspend/Resume - -The d3cold state needs to be disabled on the NVME controller for it to wake up. + [ ] Still broken, use usb/hdmi instead, nixos pkg needed: https://github.com/davidjo/snd_hda_macbookpro ## Bluetooth -The Bluetooth UART (/dev/ttyS0) is created and then deleted by udev in early boot. -Hack around it by reloading the 8250_dw module, causing it to be re-created. + [ ] Still broken, even (hacky) workaround does not work any more with latest driver updates + +## Touchpad + [x] Working, including 'disable while typing' usable quirk + +## Thunderbolt + [x] Working + +## NVME + [x] Working, older NVME / Controller may need workaround for resume + +## Suspend/Resume + [ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes). + +## Wifi + [x] Working (2,4Ghz & 5Ghz supported), WEP3 currently broken b/c old brcm fw + +## Resources +- https://github.com/Dunedan/mbp-2016-linux?tab=readme-ov-file +- https://gist.github.com/roadrunner2/1289542a748d9a104e7baec6a92f9cd7 diff --git a/apple/macbook-pro/14-1/default.nix b/apple/macbook-pro/14-1/default.nix index 6b1fd74c..54a6e84d 100644 --- a/apple/macbook-pro/14-1/default.nix +++ b/apple/macbook-pro/14-1/default.nix @@ -1,51 +1,89 @@ -{ config, lib, pkgs, ... }: - { + config, + lib, + pkgs, + ... +}: { imports = [ - ../. + ../../../common/cpu/intel/kaby-lake + ../../../common/gpu/intel + ../../../common/hidpi.nix + ../../../common/pc/laptop ../../../common/pc/laptop/ssd + ../../../common/pc/laptop/acpi_call.nix ]; - ## - # Make the keyboard work in stage1 + # Make the keyboard work in stage1, enable iommu # https://www.kernelconfig.io/config_keyboard_applespi - ## - boot.initrd.kernelModules = [ "applespi" "spi_pxa2xx_platform" "intel_lpss_pci" "applesmc" ]; - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest; - - ## - # Disable d3cold on the NVME controller so the machine can actually - # wake up. - # https://github.com/Dunedan/mbp-2016-linux - ## - systemd.services.disable-nvme-d3cold = { - description = "Disables d3cold on the NVME controller"; - before = [ "suspend.target" ]; - path = [ pkgs.bash pkgs.coreutils ]; - - serviceConfig.Type = "oneshot"; - serviceConfig.ExecStart = "${./disable-nvme-d3cold.sh}"; - serviceConfig.TimeoutSec = 0; - - wantedBy = [ "multi-user.target" "suspend.target" ]; + boot = { + initrd.kernelModules = ["applespi" "spi_pxa2xx_platform" "intel_lpss_pci" "applesmc" ]; + kernelParams = [ "intel_iommu=on" ]; + kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest; }; - ## + # Touchpad quirks to make "disable-while-typing" actually work + services.libinput.enable = true; + environment.etc."libinput/local-overrides.quirks".text = '' + [MacBook(Pro) SPI Touchpads] + MatchName=*Apple SPI Touchpad* + ModelAppleTouchpad=1 + AttrTouchSizeRange=200:150 + AttrPalmSizeThreshold=1100 + + [MacBook(Pro) SPI Keyboards] + MatchName=*Apple SPI Keyboard* + AttrKeyboardIntegration=internal + + [MacBookPro Touchbar] + MatchBus=usb + MatchVendor=0x05AC + MatchProduct=0x8600 + AttrKeyboardIntegration=internal + ''; + + # Wifi, CPU Microcode FW updates + networking.enableB43Firmware = lib.mkDefault true; + hardware = { + enableRedistributableFirmware = lib.mkDefault true; + cpu.intel.updateMicrocode = lib.mkDefault true; + }; + + # Bluetooth, only needed if kernel lacks support - custom kernel build + # boot.kernelPatches = [ + # { + # name = "bcrm-config"; + # patch = null; + # extraConfig = '' + # BT_HCIUART_BCM y ''; + # } + # ]; + + ## [Workaround seems not to work anymore! Any Ideas?] # For some reason /dev/ttyS0 is created, and then removed by udev. We need this # for bluetooth, and the only way to get it again is to reload 8502_dw. Luckily, # nothing else uses it. + ## + # systemd.services.btattach-bcm2e7c = lib.mkIf config.hardware.bluetooth.enable { + # before = [ "bluetooth.target" ]; + # after = [ "sys-devices-platform-serial8250-tty-ttyS1.device" ]; + # path = [ pkgs.bash pkgs.kmod pkgs.bluez ]; + # serviceConfig.Type = "simple"; + # serviceConfig.ExecStart = "${./btfix.sh}"; + # wantedBy = [ "multi-user.target" ]; + # }; + + ## [Enable only if needed!] + # Disable d3cold on older NVME controller, only if needed + # https://github.com/Dunedan/mbp-2016-linux ## - systemd.services.btattach-bcm2e7c = lib.mkIf config.hardware.bluetooth.enable { - before = [ "bluetooth.target" ]; - - # Hacky, as it's a different device, but this always comes after ttyS0 - after = [ "sys-devices-platform-serial8250-tty-ttyS1.device" ]; - path = [ pkgs.bash pkgs.kmod pkgs.bluez ]; - - serviceConfig.Type = "simple"; - serviceConfig.ExecStart = "${./btfix.sh}"; - - wantedBy = [ "multi-user.target" ]; - }; + #systemd.services.disable-nvme-d3cold = { + # description = "Disables d3cold on the NVME controller"; + # before = [ "suspend.target" ]; + # path = [ pkgs.bash pkgs.coreutils ]; + # serviceConfig.Type = "oneshot"; + # serviceConfig.ExecStart = "${./disable-nvme-d3cold.sh}"; + # serviceConfig.TimeoutSec = 0; + # wantedBy = [ "multi-user.target" "suspend.target" ]; + #}; } From caabc425565bbd5c8640630b0bf6974961a49242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20N=C3=BCtzi?= Date: Mon, 24 Jun 2024 17:53:36 +0200 Subject: [PATCH 0895/1476] feat: Update CODEOWNERS for Tuxedo Pulse Laptops --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/CODEOWNERS b/CODEOWNERS index 69fa7821..4525d6b0 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -11,3 +11,4 @@ purism/librem/13v3 @yegortimoshenko system76/darp6 @khumba framework @emiller88 tuxedo/pulse/15/gen2 @trueNAHO +tuxedo/pulse/14/gen3 @gabyx @britter @trueNAHO From 1a59c3d5ac53ed9266eba2bd65b09e6bfcc9ad7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20N=C3=BCtzi?= Date: Mon, 24 Jun 2024 08:31:05 +0200 Subject: [PATCH 0896/1476] fix: Improve doc for Tuxedo Pulse Gen3 power issues --- tuxedo/pulse/14/gen3/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tuxedo/pulse/14/gen3/README.md b/tuxedo/pulse/14/gen3/README.md index a44b5b30..959ab83d 100644 --- a/tuxedo/pulse/14/gen3/README.md +++ b/tuxedo/pulse/14/gen3/README.md @@ -5,3 +5,22 @@ [NixOS hardware configuration](https://github.com/NixOS/nixos-hardware) for [TUXEDO Pulse 14 - Gen3](https://www.tuxedocomputers.com/en/TUXEDO-Pulse-14-Gen3). + +## Troubleshooting + +### Shutdown and Power Issues + +With the Linux Kernel version `6.6.33` (NixOS 24.05) there are shutdown issues resulting in the battery not turning off +completely. Apparently a newer Kernel (tested with `6.8.12`) fixes this (the exact version where this problem is fixed is unknown). + +You can use + +```nix + boot.kernelPackages = + if (config.boot.zfs.enabled) + then pkgs.zfs.latestCompatibleLinuxPackages + else pkgs.linuxPackages_latest; +``` + +to use the latest Kernel, where `pkgs` should probably +be the `nixos-unstable` channel (`github:nixos/nixpkgs/nixos-unstable`). From aab67495e34365045f9dfbe58725cc6fa03607b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20N=C3=BCtzi?= Date: Tue, 25 Jun 2024 22:08:33 +0200 Subject: [PATCH 0897/1476] fix: Add an upgrade --- tuxedo/pulse/14/gen3/README.md | 13 +------------ tuxedo/pulse/14/gen3/default.nix | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/tuxedo/pulse/14/gen3/README.md b/tuxedo/pulse/14/gen3/README.md index 959ab83d..e419ae4f 100644 --- a/tuxedo/pulse/14/gen3/README.md +++ b/tuxedo/pulse/14/gen3/README.md @@ -12,15 +12,4 @@ Gen3](https://www.tuxedocomputers.com/en/TUXEDO-Pulse-14-Gen3). With the Linux Kernel version `6.6.33` (NixOS 24.05) there are shutdown issues resulting in the battery not turning off completely. Apparently a newer Kernel (tested with `6.8.12`) fixes this (the exact version where this problem is fixed is unknown). - -You can use - -```nix - boot.kernelPackages = - if (config.boot.zfs.enabled) - then pkgs.zfs.latestCompatibleLinuxPackages - else pkgs.linuxPackages_latest; -``` - -to use the latest Kernel, where `pkgs` should probably -be the `nixos-unstable` channel (`github:nixos/nixpkgs/nixos-unstable`). +This `default.nix` will upgrade to the `pkgs.linuxPackages_latest` if the kernel is older than `6.8.12`. diff --git a/tuxedo/pulse/14/gen3/default.nix b/tuxedo/pulse/14/gen3/default.nix index f43fbb00..fb4aa24c 100644 --- a/tuxedo/pulse/14/gen3/default.nix +++ b/tuxedo/pulse/14/gen3/default.nix @@ -1,4 +1,9 @@ -{pkgs, ...}: { +{ + lib, + pkgs, + config, + ... +}: { imports = [ ../../../../common/cpu/amd ../../../../common/cpu/amd/pstate.nix @@ -6,4 +11,14 @@ ../../../../common/pc/laptop ../../../../common/pc/laptop/ssd ]; + + # Fixing a power-issue with older kernels. + # When powered off, the battery does not turn off completely. + # Kernel 6.8.12 fixes this, + # the exact version is still unknown which fixed this. + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.8.12") ( + if (config.boot.zfs.enabled) + then pkgs.zfs.latestCompatibleLinuxPackages + else pkgs.linuxPackages_latest + ); } From f140ca626b8d10a584c1db3c3f9df9e7c57b843d Mon Sep 17 00:00:00 2001 From: pinage404 Date: Tue, 25 Jun 2024 00:47:39 +0200 Subject: [PATCH 0898/1476] Dell Optiplex 3050: init --- README.md | 1 + dell/optiplex/3050/default.nix | 7 +++++++ flake.nix | 1 + 3 files changed, 9 insertions(+) create mode 100644 dell/optiplex/3050/default.nix diff --git a/README.md b/README.md index 8b794dcc..c0f6dc5d 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ See code for all available configurations. | [Dell Latitude 7430](dell/latitude/7430) | `` | | [Dell Latitude 7490](dell/latitude/7490) | `` | | [Dell Latitude 9430](dell/latitude/9430) | `` | +| [Dell Optiplex 3050](dell/optiplex/3050) | `` | | [Dell Poweredge R7515](dell/poweredge/r7515) | `` | | [Dell Precision 3541](dell/precision/3541) | `` | | [Dell Precision 5530](dell/precision/5530) | `` | diff --git a/dell/optiplex/3050/default.nix b/dell/optiplex/3050/default.nix new file mode 100644 index 00000000..888030e7 --- /dev/null +++ b/dell/optiplex/3050/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc + ../../../common/pc/ssd + ]; +} diff --git a/flake.nix b/flake.nix index a34fe9ea..159e2d1d 100644 --- a/flake.nix +++ b/flake.nix @@ -48,6 +48,7 @@ dell-latitude-7430 = import ./dell/latitude/7430; dell-latitude-7490 = import ./dell/latitude/7490; dell-latitude-9430 = import ./dell/latitude/9430; + dell-optiplex-3050 = import ./dell/optiplex/3050; dell-poweredge-r7515 = import ./dell/poweredge/r7515; dell-precision-3541 = import ./dell/precision/3541; dell-precision-5530 = import ./dell/precision/5530; From ae13b3761c4994579b7d334e9d425096f411647c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 26 Jun 2024 08:30:58 +0200 Subject: [PATCH 0899/1476] lenovo/yoga/6/13ALC6: drop video acceleration driver Those are not useful for AMD. According to https://wiki.nixos.org/wiki/Accelerated_Video_Playback all we need is enabling opengl drivers. --- lenovo/yoga/6/13ALC6/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lenovo/yoga/6/13ALC6/default.nix b/lenovo/yoga/6/13ALC6/default.nix index 78784c78..39f82335 100644 --- a/lenovo/yoga/6/13ALC6/default.nix +++ b/lenovo/yoga/6/13ALC6/default.nix @@ -4,14 +4,9 @@ imports = [ ../../../thinkpad/yoga.nix ../../../../common/gpu/amd/default.nix - ../../../../common/gpu/24.05-compat.nix ]; boot.initrd.kernelModules = [ "ideapad_laptop" ]; - hardware.graphics.extraPackages = with pkgs; [ - vaapiVdpau - libvdpau-va-gl - ]; # latest kernel needed to make wifi work boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; From 4677bf5e89551d05f7983f2691590b0f7ab1a63a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 26 Jun 2024 08:47:50 +0200 Subject: [PATCH 0900/1476] gpu/intel: remove outdated libvdpau-va-gl driver the existing drivers should provide video accelerations since broadwell. This driver also caused a crash in the past in VLC: https://github.com/NixOS/nixpkgs/issues/283083 --- common/gpu/intel/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index b5c0dcdc..be5a8c89 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -37,7 +37,6 @@ else intel-vaapi-driver ) - libvdpau-va-gl intel-media-driver ]; @@ -48,7 +47,6 @@ else intel-vaapi-driver ) - libvdpau-va-gl intel-media-driver ]; From 5fe1583567b2ec9f4f7f7547bed809b08bfebd89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 26 Jun 2024 08:54:34 +0200 Subject: [PATCH 0901/1476] gpu/amd: remove unused pkgs --- common/gpu/amd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix index f4bd7f17..ca103fc3 100644 --- a/common/gpu/amd/default.nix +++ b/common/gpu/amd/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: { options.hardware.amdgpu.loadInInitrd = lib.mkEnableOption (lib.mdDoc From a5abf3379dc986f6952cc8c6999ddc1bf9d0ee13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 26 Jun 2024 08:55:30 +0200 Subject: [PATCH 0902/1476] zephyrus/ga402x: switch to amd gpu module --- asus/zephyrus/ga402x/amdgpu/default.nix | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/asus/zephyrus/ga402x/amdgpu/default.nix b/asus/zephyrus/ga402x/amdgpu/default.nix index b1791d78..2610db89 100644 --- a/asus/zephyrus/ga402x/amdgpu/default.nix +++ b/asus/zephyrus/ga402x/amdgpu/default.nix @@ -1,17 +1,15 @@ { config, lib, - pkgs, ... }: let - inherit (lib) mkDefault mkEnableOption mkIf mkMerge; + inherit (lib) mkEnableOption mkIf mkMerge; cfg = config.hardware.asus.zephyrus.ga402x; in { imports = [ ../shared.nix - ../../../../common/gpu/24.05-compat.nix ]; options.hardware.asus.zephyrus.ga402x.amdgpu = { @@ -21,19 +19,6 @@ in { }; config = mkMerge [ - { - # AMD RX680 - services.xserver.videoDrivers = mkDefault [ "amdgpu" ]; - - hardware = { - amdgpu.loadInInitrd = true; - graphics.extraPackages = with pkgs; [ - vaapiVdpau - libvdpau-va-gl - ]; - }; - } - (mkIf cfg.amdgpu.recovery.enable { # Hopefully fixes for where the kernel sometimes hangs when suspending or hibernating # (Though, I'm very suspicious of the Mediatek Wifi...) From b7d8d5c78812a0a82fdfc817208e530d476d2313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 26 Jun 2024 09:29:56 +0200 Subject: [PATCH 0903/1476] lenovo/yoga/7/14ARH7: remove redundant vdpau packages amd doesn't need them and nvidia already includes them --- lenovo/yoga/7/14ARH7/amdgpu/default.nix | 26 +++---------------------- lenovo/yoga/7/14ARH7/nvidia/default.nix | 4 ---- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/lenovo/yoga/7/14ARH7/amdgpu/default.nix b/lenovo/yoga/7/14ARH7/amdgpu/default.nix index 454a9143..a23307a4 100644 --- a/lenovo/yoga/7/14ARH7/amdgpu/default.nix +++ b/lenovo/yoga/7/14ARH7/amdgpu/default.nix @@ -1,24 +1,4 @@ -# Including this file will enable the AMD-GPU driver - -{ lib, pkgs, ... }: - -let - inherit (lib) mkDefault; - -in { - imports = [ - ../shared.nix - ../../../../../common/gpu/24.05-compat.nix - ]; - - # AMD RX680 - services.xserver.videoDrivers = mkDefault [ "amdgpu" ]; - - hardware = { - amdgpu.loadInInitrd = true; - graphics.extraPackages = with pkgs; [ - vaapiVdpau - libvdpau-va-gl - ]; - }; +# Including this file will enable the AMD-GPU driver (in shared.nix) +{ + imports = [ ../shared.nix ]; } diff --git a/lenovo/yoga/7/14ARH7/nvidia/default.nix b/lenovo/yoga/7/14ARH7/nvidia/default.nix index 6c97a074..9707745c 100644 --- a/lenovo/yoga/7/14ARH7/nvidia/default.nix +++ b/lenovo/yoga/7/14ARH7/nvidia/default.nix @@ -19,10 +19,6 @@ in { hardware = { ## Enable the Nvidia card, as well as Prime and Offload: amdgpu.loadInInitrd = true; - graphics.extraPackages = with pkgs; [ - vaapiVdpau - libvdpau-va-gl - ]; nvidia = { modesetting.enable = true; From 901bc809b5d3e73a609a167385df23311d81b39c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 26 Jun 2024 09:34:50 +0200 Subject: [PATCH 0904/1476] asus/zephyrus/ga402x: drop redundand vdpau drivers --- asus/zephyrus/ga402x/nvidia/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/asus/zephyrus/ga402x/nvidia/default.nix b/asus/zephyrus/ga402x/nvidia/default.nix index 73a2b9db..99dfa9b3 100644 --- a/asus/zephyrus/ga402x/nvidia/default.nix +++ b/asus/zephyrus/ga402x/nvidia/default.nix @@ -12,6 +12,7 @@ in { ## "prime.nix" loads this, aleady: # ../../../common/gpu/nvidia ../../../../common/gpu/nvidia/prime.nix + ]; # NVIDIA GeForce RTX 4060 Mobile @@ -26,11 +27,6 @@ in { hardware = { ## Enable the Nvidia card, as well as Prime and Offload: amdgpu.loadInInitrd = true; - graphics.extraPackages = with pkgs; [ - # Also in nvidia/default.nix - vaapiVdpau - libvdpau-va-gl - ]; nvidia = { modesetting.enable = true; From 14aadcba1a26c8c142453839f888afd0db8b2041 Mon Sep 17 00:00:00 2001 From: x123 Date: Thu, 27 Jun 2024 12:05:59 +0200 Subject: [PATCH 0905/1476] common/gpu/nvidia: vaapiVdpau -> libva-vdpau-driver --- common/gpu/nvidia/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/gpu/nvidia/default.nix b/common/gpu/nvidia/default.nix index 6141aaf3..01542ee7 100644 --- a/common/gpu/nvidia/default.nix +++ b/common/gpu/nvidia/default.nix @@ -3,7 +3,11 @@ { imports = [ ../24.05-compat.nix ]; services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ]; - hardware.graphics.extraPackages = with pkgs; [ - vaapiVdpau + hardware.graphics.extraPackages = [ + ( + if pkgs ? libva-vdpau-driver + then pkgs.libva-vdpau-driver + else pkgs.vaapiVdpau + ) ]; } From 3980e7816c99d9e4da7a7b762e5b294055b73b2f Mon Sep 17 00:00:00 2001 From: me00001 <37930867+me00001@users.noreply.github.com> Date: Fri, 28 Jun 2024 08:30:54 +0300 Subject: [PATCH 0906/1476] enable bluetooth support for Yoga 6 13ALC6. (#1013) Co-authored-by: Sandro --- lenovo/yoga/6/13ALC6/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lenovo/yoga/6/13ALC6/default.nix b/lenovo/yoga/6/13ALC6/default.nix index 39f82335..0acf508d 100644 --- a/lenovo/yoga/6/13ALC6/default.nix +++ b/lenovo/yoga/6/13ALC6/default.nix @@ -13,4 +13,6 @@ # energy savings boot.kernelParams = ["mem_sleep_default=deep" "pcie_aspm.policy=powersupersave"]; + + hardware.bluetooth.enable = true; } From d3ef6d0c7c0525d9d306d47245ae761904a6211f Mon Sep 17 00:00:00 2001 From: "Paepcke, Michael" Date: Fri, 28 Jun 2024 20:05:46 +0200 Subject: [PATCH 0907/1476] apple-macbookpro-14-1: update info, simplify and fix config --- apple/macbook-pro/14-1/README.md | 8 +++---- apple/macbook-pro/14-1/btfix.sh | 38 ------------------------------ apple/macbook-pro/14-1/default.nix | 30 +++-------------------- 3 files changed, 7 insertions(+), 69 deletions(-) delete mode 100755 apple/macbook-pro/14-1/btfix.sh diff --git a/apple/macbook-pro/14-1/README.md b/apple/macbook-pro/14-1/README.md index 0a0e2df6..d456ff29 100644 --- a/apple/macbook-pro/14-1/README.md +++ b/apple/macbook-pro/14-1/README.md @@ -1,10 +1,10 @@ -# MacBook Pro 14,1, NixOS 24.01 (2024) +# MacBook Pro 14,1, NixOS 24.05 (2024) ## Audio - [ ] Still broken, use usb/hdmi instead, nixos pkg needed: https://github.com/davidjo/snd_hda_macbookpro + [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 ## Bluetooth - [ ] Still broken, even (hacky) workaround does not work any more with latest driver updates + [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322964 ## Touchpad [x] Working, including 'disable while typing' usable quirk @@ -19,7 +19,7 @@ [ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes). ## Wifi - [x] Working (2,4Ghz & 5Ghz supported), WEP3 currently broken b/c old brcm fw + [x] Working (2,4Ghz & 5Ghz supported), WEP3 broken -> brcm fw blob (2015) ## Resources - https://github.com/Dunedan/mbp-2016-linux?tab=readme-ov-file diff --git a/apple/macbook-pro/14-1/btfix.sh b/apple/macbook-pro/14-1/btfix.sh deleted file mode 100755 index f555bba8..00000000 --- a/apple/macbook-pro/14-1/btfix.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -## -# For some reason /dev/ttyS0 is created, and then removed by udev. We need this -# for bluetooth, and the only way to get it again is to reload 8502_dw. Do so. -## - - -## -# /sys/devices/pci0000:00/0000:00:1e.0/driver -> intel-lpss -# /sys/bus/pci/devices/0000:00:1e.0 -# /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:8a/BCM2E7C:00 -## - -# udevadm info --query=all --path=/sys/bus/serial/devices/serial0-0 -# P: /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial0/serial0-0 -# M: serial0-0 -# R: 0 -# U: serial -# E: DEVPATH=/devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial0/serial0-0 -# E: SUBSYSTEM=serial -# E: MODALIAS=acpi:BCM2E7C:APPLE-UART-BLTH: -# E: USEC_INITIALIZED=12406199 -# E: PATH=/nix/store/56jhf2k9q31gwvhjxmm2akkkhi4a8nz1-udev-path/bin:/nix/store/56jhf2k9q31gwvhjxmm2akkkhi4a8nz1-udev-path/sbin -# E: ID_VENDOR_FROM_DATABASE=Broadcom - - -if [[ ! -e "/sys/devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/tty/ttyS0" ]]; then - if [[ -e /sys/module/8250_dw ]]; then - rmmod 8250_dw - fi - - modprobe 8250_dw -fi - -exec btattach --protocol=h4 --bredr=/dev/ttyS0 --speed=3000000 diff --git a/apple/macbook-pro/14-1/default.nix b/apple/macbook-pro/14-1/default.nix index 54a6e84d..e2dcb72c 100644 --- a/apple/macbook-pro/14-1/default.nix +++ b/apple/macbook-pro/14-1/default.nix @@ -5,10 +5,10 @@ ... }: { imports = [ + ../. ../../../common/cpu/intel/kaby-lake ../../../common/gpu/intel ../../../common/hidpi.nix - ../../../common/pc/laptop ../../../common/pc/laptop/ssd ../../../common/pc/laptop/acpi_call.nix ]; @@ -49,34 +49,10 @@ cpu.intel.updateMicrocode = lib.mkDefault true; }; - # Bluetooth, only needed if kernel lacks support - custom kernel build - # boot.kernelPatches = [ - # { - # name = "bcrm-config"; - # patch = null; - # extraConfig = '' - # BT_HCIUART_BCM y ''; - # } - # ]; - - ## [Workaround seems not to work anymore! Any Ideas?] - # For some reason /dev/ttyS0 is created, and then removed by udev. We need this - # for bluetooth, and the only way to get it again is to reload 8502_dw. Luckily, - # nothing else uses it. - ## - # systemd.services.btattach-bcm2e7c = lib.mkIf config.hardware.bluetooth.enable { - # before = [ "bluetooth.target" ]; - # after = [ "sys-devices-platform-serial8250-tty-ttyS1.device" ]; - # path = [ pkgs.bash pkgs.kmod pkgs.bluez ]; - # serviceConfig.Type = "simple"; - # serviceConfig.ExecStart = "${./btfix.sh}"; - # wantedBy = [ "multi-user.target" ]; - # }; - - ## [Enable only if needed!] + # [Enable only if needed!] # Disable d3cold on older NVME controller, only if needed # https://github.com/Dunedan/mbp-2016-linux - ## + # #systemd.services.disable-nvme-d3cold = { # description = "Disables d3cold on the NVME controller"; # before = [ "suspend.target" ]; From 40e296b2b3f6dc674191013c7583a67778228166 Mon Sep 17 00:00:00 2001 From: "Paepcke, Michael" Date: Fri, 28 Jun 2024 22:38:31 +0200 Subject: [PATCH 0908/1476] apple-imac-18-2: add imac, add imac-18-2 --- apple/imac/18-2/README.md | 26 ++++++++++++++++++++++++++ apple/imac/18-2/default.nix | 30 ++++++++++++++++++++++++++++++ apple/imac/default.nix | 8 ++++++++ 3 files changed, 64 insertions(+) create mode 100644 apple/imac/18-2/README.md create mode 100644 apple/imac/18-2/default.nix create mode 100644 apple/imac/default.nix diff --git a/apple/imac/18-2/README.md b/apple/imac/18-2/README.md new file mode 100644 index 00000000..6fdbb963 --- /dev/null +++ b/apple/imac/18-2/README.md @@ -0,0 +1,26 @@ +# iMac 18,2, NixOS 24.05 (2024) + +## Audio + [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 + +## Bluetooth + [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322964 + +## Thunderbolt + [x] ok + +## SATA + [x] ok + +## NVME + [x] ok, older NVME / Controller may need workaround for resume + +## Suspend/Resumer + [ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes). + +## Wifi + [x] Working (2,4Ghz & 5Ghz supported), WEP3 broken -> brcm fw blob (2015) + +## Resources (Intel iMac/MacBook share similar custom hardware) +- https://github.com/Dunedan/mbp-2016-linux?tab=readme-ov-file +- https://gist.github.com/roadrunner2/1289542a748d9a104e7baec6a92f9cd7 diff --git a/apple/imac/18-2/default.nix b/apple/imac/18-2/default.nix new file mode 100644 index 00000000..fbbfebaa --- /dev/null +++ b/apple/imac/18-2/default.nix @@ -0,0 +1,30 @@ +{ + config, + lib, + pkgs, + ... +}: { + imports = [ + ../. + ../../../common/cpu/intel/kaby-lake + ../../../common/gpu/intel + ../../../common/gpu/amd + ../../../common/hidpi.nix + ../../../common/pc/laptop/ssd + ../../../common/pc/laptop/acpi_call.nix + ]; + + # apple smc (TODO: check spi) + boot = { + initrd.kernelModules = ["applespi" "spi_pxa2xx_platform" "intel_lpss_pci" "applesmc" ]; + kernelParams = [ "intel_iommu=on" ]; + kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest; + }; + + # Wifi, CPU Microcode FW updates + networking.enableB43Firmware = lib.mkDefault true; + hardware = { + enableRedistributableFirmware = lib.mkDefault true; + cpu.intel.updateMicrocode = lib.mkDefault true; + }; +} diff --git a/apple/imac/default.nix b/apple/imac/default.nix new file mode 100644 index 00000000..ea15175d --- /dev/null +++ b/apple/imac/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ../. + ../../common/cpu/intel + ../../common/pc/laptop + ../../common/pc/laptop/ssd + ]; +} From d33e3e71477521f50af926a3570527e9f2e37879 Mon Sep 17 00:00:00 2001 From: "Paepcke, Michael" Date: Fri, 28 Jun 2024 22:49:56 +0200 Subject: [PATCH 0909/1476] apple-imac-18-2: add flake support --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 159e2d1d..e8472e47 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,7 @@ apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1; apple-macmini-4-1 = import ./apple/macmini/4; + apple-imac-18-2 = import ./apple/imac/18-2; apple-t2 = import ./apple/t2; asus-battery = import ./asus/battery.nix; asus-ally-rc71l = import ./asus/ally/rc71l; From 231274268ff2250d4730e274b808f66ef91b6381 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 26 Jun 2024 16:51:35 -0600 Subject: [PATCH 0910/1476] gpu/amd: Remove `loadInInitrd` option Option is now in nixpkgs under `hardware.amdgpu.initrd.enable` as of NixOS/nixpkgs@6a0b6a6b74a71be7c37b9d8bc4472cf087aff709 --- asus/zephyrus/ga402x/nvidia/default.nix | 2 +- common/gpu/amd/default.nix | 29 ++++++++---------------- lenovo/legion/15ach6h/hybrid/default.nix | 2 +- lenovo/legion/16ach6h/hybrid/default.nix | 2 +- lenovo/yoga/7/14ARH7/nvidia/default.nix | 2 +- 5 files changed, 14 insertions(+), 23 deletions(-) diff --git a/asus/zephyrus/ga402x/nvidia/default.nix b/asus/zephyrus/ga402x/nvidia/default.nix index 99dfa9b3..6f759fdc 100644 --- a/asus/zephyrus/ga402x/nvidia/default.nix +++ b/asus/zephyrus/ga402x/nvidia/default.nix @@ -26,7 +26,7 @@ in { hardware = { ## Enable the Nvidia card, as well as Prime and Offload: - amdgpu.loadInInitrd = true; + amdgpu.initrd.enable = lib.mkDefault true; nvidia = { modesetting.enable = true; diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix index ca103fc3..53730044 100644 --- a/common/gpu/amd/default.nix +++ b/common/gpu/amd/default.nix @@ -1,24 +1,15 @@ -{ config, lib, ... }: +{ lib, ... }: { - options.hardware.amdgpu.loadInInitrd = lib.mkEnableOption (lib.mdDoc - "loading `amdgpu` kernelModule at stage 1. (Add `amdgpu` to `boot.initrd.kernelModules`)" - ) // { - default = true; - }; - imports = [ ../24.05-compat.nix ]; - config = lib.mkMerge [ - { - services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ]; + config = { + services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ]; - hardware.graphics = { - enable = lib.mkDefault true; - enable32Bit = lib.mkDefault true; - }; - } - (lib.mkIf config.hardware.amdgpu.loadInInitrd { - boot.initrd.kernelModules = [ "amdgpu" ]; - }) - ]; + hardware.graphics = { + enable = lib.mkDefault true; + enable32Bit = lib.mkDefault true; + }; + + hardware.amdgpu.initrd.enable = lib.mkDefault true; + }; } diff --git a/lenovo/legion/15ach6h/hybrid/default.nix b/lenovo/legion/15ach6h/hybrid/default.nix index b9070fb9..2f12f7ea 100644 --- a/lenovo/legion/15ach6h/hybrid/default.nix +++ b/lenovo/legion/15ach6h/hybrid/default.nix @@ -20,7 +20,7 @@ services.xserver.videoDrivers = [ "nvidia" ]; hardware = { - amdgpu.loadInInitrd = lib.mkDefault false; + amdgpu.initrd.enable = false; nvidia = { modesetting.enable = lib.mkDefault true; diff --git a/lenovo/legion/16ach6h/hybrid/default.nix b/lenovo/legion/16ach6h/hybrid/default.nix index a33a02a5..f07b8378 100644 --- a/lenovo/legion/16ach6h/hybrid/default.nix +++ b/lenovo/legion/16ach6h/hybrid/default.nix @@ -22,7 +22,7 @@ services.xserver.videoDrivers = [ "nvidia" ]; hardware = { - amdgpu.loadInInitrd = lib.mkDefault false; + amdgpu.initrd.enable = false; nvidia = { modesetting.enable = lib.mkDefault true; diff --git a/lenovo/yoga/7/14ARH7/nvidia/default.nix b/lenovo/yoga/7/14ARH7/nvidia/default.nix index 9707745c..0ca5afd7 100644 --- a/lenovo/yoga/7/14ARH7/nvidia/default.nix +++ b/lenovo/yoga/7/14ARH7/nvidia/default.nix @@ -18,7 +18,7 @@ in { hardware = { ## Enable the Nvidia card, as well as Prime and Offload: - amdgpu.loadInInitrd = true; + amdgpu.initrd.enable = true; nvidia = { modesetting.enable = true; From d11eeae7664006a07b0b9e8dbd6ea500c8b3dbdb Mon Sep 17 00:00:00 2001 From: pinage404 Date: Tue, 25 Jun 2024 01:07:34 +0200 Subject: [PATCH 0911/1476] Raspberry Pi 3: init --- README.md | 1 + flake.nix | 1 + raspberry-pi/3/default.nix | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 raspberry-pi/3/default.nix diff --git a/README.md b/README.md index c0f6dc5d..8fe19ddf 100644 --- a/README.md +++ b/README.md @@ -302,6 +302,7 @@ See code for all available configurations. | [Purism Librem 15v3](purism/librem/13v3) | `` | | [Purism Librem 5r4](purism/librem/5r4) | `` | | [Raspberry Pi 2](raspberry-pi/2) | `` | +| [Raspberry Pi 3](raspberry-pi/3) | `` | | [Raspberry Pi 4](raspberry-pi/4) | `` | | [Raspberry Pi 5](raspberry-pi/5) | `` | | [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | diff --git a/flake.nix b/flake.nix index 159e2d1d..63c03f86 100644 --- a/flake.nix +++ b/flake.nix @@ -239,6 +239,7 @@ purism-librem-15v3 = import ./purism/librem/15v3; purism-librem-5r4 = import ./purism/librem/5r4; raspberry-pi-2 = import ./raspberry-pi/2; + raspberry-pi-3 = import ./raspberry-pi/3; raspberry-pi-4 = import ./raspberry-pi/4; raspberry-pi-5 = import ./raspberry-pi/5; kobol-helios4 = import ./kobol/helios4; diff --git a/raspberry-pi/3/default.nix b/raspberry-pi/3/default.nix new file mode 100644 index 00000000..d4eba128 --- /dev/null +++ b/raspberry-pi/3/default.nix @@ -0,0 +1,38 @@ +{ lib +, pkgs +, ... +}: + +{ + boot.kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi3; + + # fix the following error : + # modprobe: FATAL: Module ahci not found in directory + # https://github.com/NixOS/nixpkgs/issues/154163#issuecomment-1350599022 + nixpkgs.overlays = [ + (_final: super: { + makeModulesClosure = x: + super.makeModulesClosure (x // { allowMissing = true; }); + }) + ]; + + # https://github.com/NixOS/nixpkgs/blob/b72bde7c4a1f9c9bf1a161f0c267186ce3c6483c/nixos/modules/installer/sd-card/sd-image-aarch64.nix#L12 + # Use the extlinux boot loader. (NixOS wants to enable GRUB by default) + boot.loader.grub.enable = lib.mkDefault false; + # Enables the generation of /boot/extlinux/extlinux.conf + boot.loader.generic-extlinux-compatible.enable = lib.mkDefault true; + + # The serial ports listed here are: + # - ttyS0: for Tegra (Jetson TX1) + # - ttyAMA0: for QEMU's -machine virt + # https://github.com/NixOS/nixpkgs/blob/b72bde7c4a1f9c9bf1a161f0c267186ce3c6483c/nixos/modules/installer/sd-card/sd-image-aarch64.nix#L19 + boot.kernelParams = [ + "console=ttyS0,115200n8" + "console=ttyAMA0,115200n8" + "console=tty0" + ]; + + environment.systemPackages = with pkgs; [ + libraspberrypi + ]; +} From 8d5e6d9278a2214cf1ec7cb04a4016b1184edc73 Mon Sep 17 00:00:00 2001 From: pinage404 Date: Wed, 26 Jun 2024 23:58:14 +0200 Subject: [PATCH 0912/1476] Raspberry Pi 3: try to fix tests --- tests/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run.py b/tests/run.py index ec8d8ce2..6668b4e6 100755 --- a/tests/run.py +++ b/tests/run.py @@ -81,7 +81,7 @@ def write_eval_test(f: IO[str], profiles: list[str]) -> None: continue system = "x86_64-linux" - if profile in ("raspberry-pi/4", "raspberry-pi/5"): + if profile in ("raspberry-pi/3", "raspberry-pi/4", "raspberry-pi/5"): system = "aarch64-linux" f.write( From 43ea86cc8c77dcb5f622766050f1c3315088c419 Mon Sep 17 00:00:00 2001 From: pinage404 Date: Fri, 28 Jun 2024 12:16:18 +0000 Subject: [PATCH 0913/1476] remove probably not necessary library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- raspberry-pi/3/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/raspberry-pi/3/default.nix b/raspberry-pi/3/default.nix index d4eba128..9d54c3c3 100644 --- a/raspberry-pi/3/default.nix +++ b/raspberry-pi/3/default.nix @@ -32,7 +32,4 @@ "console=tty0" ]; - environment.systemPackages = with pkgs; [ - libraspberrypi - ]; } From a59f00f5ac65b19382617ba00f360f8bc07ed3ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 29 Jun 2024 09:47:27 +0200 Subject: [PATCH 0914/1476] raspberry-pi/3: remove ttyAMA0 from console list --- raspberry-pi/3/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/raspberry-pi/3/default.nix b/raspberry-pi/3/default.nix index 9d54c3c3..57da74a3 100644 --- a/raspberry-pi/3/default.nix +++ b/raspberry-pi/3/default.nix @@ -22,13 +22,12 @@ # Enables the generation of /boot/extlinux/extlinux.conf boot.loader.generic-extlinux-compatible.enable = lib.mkDefault true; + # The last console argument in the list that linux can find at boot will receive kernel logs. # The serial ports listed here are: - # - ttyS0: for Tegra (Jetson TX1) - # - ttyAMA0: for QEMU's -machine virt - # https://github.com/NixOS/nixpkgs/blob/b72bde7c4a1f9c9bf1a161f0c267186ce3c6483c/nixos/modules/installer/sd-card/sd-image-aarch64.nix#L19 + # - ttyS0: serial + # - tty0: hdmi boot.kernelParams = [ "console=ttyS0,115200n8" - "console=ttyAMA0,115200n8" "console=tty0" ]; From d403b7f6ae7e513f1c7384b1dca80074a991a7cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 30 Jun 2024 09:29:16 +0200 Subject: [PATCH 0915/1476] apple/imac/18-2/README.md: use markdown checkboxes --- apple/imac/18-2/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apple/imac/18-2/README.md b/apple/imac/18-2/README.md index 6fdbb963..6548ec8e 100644 --- a/apple/imac/18-2/README.md +++ b/apple/imac/18-2/README.md @@ -1,25 +1,25 @@ # iMac 18,2, NixOS 24.05 (2024) ## Audio - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 +- [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 ## Bluetooth - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322964 +- [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322964 ## Thunderbolt - [x] ok +- [x] ok ## SATA - [x] ok +- [x] ok ## NVME - [x] ok, older NVME / Controller may need workaround for resume +- [x] ok, older NVME / Controller may need workaround for resume ## Suspend/Resumer - [ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes). +- [ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes). ## Wifi - [x] Working (2,4Ghz & 5Ghz supported), WEP3 broken -> brcm fw blob (2015) +- [x] Working (2,4Ghz & 5Ghz supported), WEP3 broken -> brcm fw blob (2015) ## Resources (Intel iMac/MacBook share similar custom hardware) - https://github.com/Dunedan/mbp-2016-linux?tab=readme-ov-file From c6b440dcd63fdb65dbde486d41bf63ef228335b6 Mon Sep 17 00:00:00 2001 From: Michael Paepcke Date: Sun, 30 Jun 2024 08:14:43 +0000 Subject: [PATCH 0916/1476] apple/macbook-pro/14-1/README.md: use markdown checkboxes --- apple/macbook-pro/14-1/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apple/macbook-pro/14-1/README.md b/apple/macbook-pro/14-1/README.md index d456ff29..2809d900 100644 --- a/apple/macbook-pro/14-1/README.md +++ b/apple/macbook-pro/14-1/README.md @@ -1,25 +1,25 @@ # MacBook Pro 14,1, NixOS 24.05 (2024) ## Audio - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 + - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 ## Bluetooth - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322964 + - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322964 ## Touchpad - [x] Working, including 'disable while typing' usable quirk + - [x] Working, including 'disable while typing' usable quirk ## Thunderbolt - [x] Working + - [x] Working ## NVME - [x] Working, older NVME / Controller may need workaround for resume + - [x] Working, older NVME / Controller may need workaround for resume ## Suspend/Resume - [ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes). + - [ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes). ## Wifi - [x] Working (2,4Ghz & 5Ghz supported), WEP3 broken -> brcm fw blob (2015) + - [x] Working (2,4Ghz & 5Ghz supported), WEP3 broken -> brcm fw blob (2015) ## Resources - https://github.com/Dunedan/mbp-2016-linux?tab=readme-ov-file From 6e253f12b1009053eff5344be5e835f604bb64cd Mon Sep 17 00:00:00 2001 From: xenia Date: Tue, 2 Jul 2024 00:00:01 -0400 Subject: [PATCH 0917/1476] pine64/pinebook-pro: remove obsolete issue docs this issue has been fixed upstream since kernel 5.14, and per #882 this commit removes it entirely from the readme --- pine64/pinebook-pro/README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pine64/pinebook-pro/README.md b/pine64/pinebook-pro/README.md index b6c08118..c7916346 100644 --- a/pine64/pinebook-pro/README.md +++ b/pine64/pinebook-pro/README.md @@ -32,14 +32,6 @@ https://github.com/NixOS/nixos-hardware/blob/6d1bd5bc2e8b9992a3f57e416ba50fbed55 HDMI over Type-C works only for the custom kernel and the audio dosen't work (it's an upstream problem). -#### `rockchipdrm` and `efifb` - -This can be worked around by booting with the `efifb=off` kernel command-line. - -This is already handled for you by this configuration. If using the generic -UEFI AArch64 iso, you will need to add the option yourself to the command-line -using GRUB. - #### _EFI_ and poweroff When booted using EFI, the system will not power off. It will stay seemingly From f75ab8b22cf73522330cd23c8312ead6fbca8093 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Sat, 6 Jul 2024 12:23:26 +0800 Subject: [PATCH 0918/1476] apple/t2: factor out kernel definition for improved readability --- apple/t2/pkgs/linux-t2.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index ea8fbdc5..e6fa95a6 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -2,6 +2,9 @@ , ... } @ args: let + version = "6.9.4"; + majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); + patchRepo = fetchFromGitHub { owner = "t2linux"; repo = "linux-t2-patches"; @@ -9,8 +12,10 @@ let hash = "sha256-mwT4cuIBrz3tz8+fAxVKmnRtkPRp3lWmNbocuXCsm44="; }; - version = "6.9.4"; - majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); + kernel = fetchzip { + url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; + hash = "sha256-8jC5DpPi6poig1gmJPIIZ2HMwQQt1kTK4PcvyYm+Hsg="; + }; in buildLinux (args // { inherit version; @@ -20,10 +25,7 @@ buildLinux (args // { modDirVersion = with lib; "${concatStringsSep "." (take 3 (splitVersion "${version}.0"))}"; src = runCommand "patched-source" {} '' - cp -r ${fetchzip { - url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-8jC5DpPi6poig1gmJPIIZ2HMwQQt1kTK4PcvyYm+Hsg="; - }} $out + cp -r ${kernel} $out chmod -R u+w $out cd $out while read -r patch; do From c1cdb2f8282818808fd6e0726620c7cd54c8a260 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Sat, 6 Jul 2024 12:23:48 +0800 Subject: [PATCH 0919/1476] apple/t2: update patches repo ref --- apple/t2/pkgs/linux-t2.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index e6fa95a6..4da2150a 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -8,8 +8,8 @@ let patchRepo = fetchFromGitHub { owner = "t2linux"; repo = "linux-t2-patches"; - rev = "0ad2b3913f5484ba8e86b6965f5d88903464261d"; - hash = "sha256-mwT4cuIBrz3tz8+fAxVKmnRtkPRp3lWmNbocuXCsm44="; + rev = "47b4069221c0ee3b6db56ab1ea90ae89e2de26f3"; + hash = "sha256-1B5DbLdyKdswy2ERmWVyjojdazTDbMsS+Vz/mrTdoFY="; }; kernel = fetchzip { @@ -47,7 +47,6 @@ buildLinux (args // { HID_APPLETB_KBD = module; HID_APPLE = module; DRM_APPLETBDRM = module; - HID_APPLE_MAGIC_BACKLIGHT = module; HID_SENSOR_ALS = module; SND_PCM = module; STAGING = yes; From da0aa7b533d49e6319c603e07b46a5690082f65f Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Sun, 7 Jul 2024 00:14:34 +0800 Subject: [PATCH 0920/1476] apple/t2: bump kernel to 6.9.8 --- apple/t2/pkgs/linux-t2.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index 4da2150a..26918908 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -2,7 +2,7 @@ , ... } @ args: let - version = "6.9.4"; + version = "6.9.8"; majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); patchRepo = fetchFromGitHub { @@ -14,7 +14,7 @@ let kernel = fetchzip { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-8jC5DpPi6poig1gmJPIIZ2HMwQQt1kTK4PcvyYm+Hsg="; + hash = "sha256-o67tasZu4qGQ7obw+BCgNfaLqDcT3SPqsa3kTzWjmfg="; }; in buildLinux (args // { From 00f9c4bb0628983bc017d7644f67d49ae66bdbfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20K=C3=BCndig?= <8600029+tobias-kuendig@users.noreply.github.com> Date: Wed, 3 Jul 2024 09:24:27 +0200 Subject: [PATCH 0921/1476] Fix Lenovo Thinkpad T14s not powering off --- lenovo/thinkpad/t14s/amd/gen4/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lenovo/thinkpad/t14s/amd/gen4/default.nix diff --git a/lenovo/thinkpad/t14s/amd/gen4/default.nix b/lenovo/thinkpad/t14s/amd/gen4/default.nix new file mode 100644 index 00000000..d13eb4fa --- /dev/null +++ b/lenovo/thinkpad/t14s/amd/gen4/default.nix @@ -0,0 +1,9 @@ +{ lib, pkgs, ... }: +{ + imports = [ + ../. + ]; + + # Fix laptop not properly powering off during shutdown. + boot.kernelParams = [ "apm=power_off" ]; +} From 72d3c007024ce47d838bb38693c8773812f54bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20K=C3=BCndig?= <8600029+tobias-kuendig@users.noreply.github.com> Date: Mon, 8 Jul 2024 08:08:53 +0200 Subject: [PATCH 0922/1476] Added new model to flake.nix and README --- README.md | 1 + flake.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 8fe19ddf..de376d43 100644 --- a/README.md +++ b/README.md @@ -221,6 +221,7 @@ See code for all available configurations. | [Lenovo ThinkPad T14 AMD Gen 4](lenovo/thinkpad/t14/amd/gen4) | `` | | [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | | [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | +| [Lenovo ThinkPad T14s AMD Gen 4](lenovo/thinkpad/t14s/amd/gen4) | `` | | [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | | [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `` | | [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `` | diff --git a/flake.nix b/flake.nix index 63c03f86..112e00e1 100644 --- a/flake.nix +++ b/flake.nix @@ -154,6 +154,7 @@ lenovo-thinkpad-t14-amd-gen4 = import ./lenovo/thinkpad/t14/amd/gen4; lenovo-thinkpad-t14s = import ./lenovo/thinkpad/t14s; lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1; + lenovo-thinkpad-t14s-amd-gen4 = import ./lenovo/thinkpad/t14s/amd/gen4; lenovo-thinkpad-t410 = import ./lenovo/thinkpad/t410; lenovo-thinkpad-t420 = import ./lenovo/thinkpad/t420; lenovo-thinkpad-t430 = import ./lenovo/thinkpad/t430; From ba8294c0a1fc318ed4869bb63fd122c63881fff0 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Fri, 28 Jun 2024 18:23:23 -0600 Subject: [PATCH 0923/1476] common: Move Intel generation-specific config from cpu to gpu These modules only included gpu configuration, so belong in that location. --- apple/macbook-air/4/default.nix | 2 +- apple/macbook-pro/14-1/default.nix | 2 +- asus/zenbook/ux371/default.nix | 2 +- common/{cpu => gpu}/intel/comet-lake/default.nix | 0 common/{cpu => gpu}/intel/elkhart-lake/default.nix | 0 common/{cpu => gpu}/intel/jasper-lake/default.nix | 0 common/{cpu => gpu}/intel/kaby-lake/default.nix | 0 common/{cpu => gpu}/intel/sandy-bridge/default.nix | 0 common/{cpu => gpu}/intel/tiger-lake/default.nix | 0 dell/inspiron/5509/default.nix | 2 +- dell/precision/7520/default.nix | 2 +- dell/xps/13-9360/default.nix | 2 +- dell/xps/13-9370/default.nix | 2 +- dell/xps/15-9560/default.nix | 2 +- dell/xps/15-9560/intel/default.nix | 2 +- dell/xps/15-9570/default.nix | 2 +- flake.nix | 6 +++--- google/pixelbook/default.nix | 2 +- gpd/p2-max/default.nix | 2 +- hardkernel/odroid-h3/default.nix | 2 +- hp/elitebook/2560p/default.nix | 2 +- hp/notebook/14-df0023/default.nix | 2 +- huawei/machc-wa/default.nix | 2 +- lenovo/thinkpad/e470/default.nix | 2 +- lenovo/thinkpad/l480/default.nix | 2 +- lenovo/thinkpad/p51/default.nix | 2 +- lenovo/thinkpad/t420/default.nix | 2 +- lenovo/thinkpad/t520/default.nix | 2 +- lenovo/thinkpad/w520/default.nix | 2 +- lenovo/thinkpad/x220/default.nix | 2 +- microsoft/surface/surface-go/default.nix | 2 +- protectli/vp4670/default.nix | 2 +- 32 files changed, 28 insertions(+), 28 deletions(-) rename common/{cpu => gpu}/intel/comet-lake/default.nix (100%) rename common/{cpu => gpu}/intel/elkhart-lake/default.nix (100%) rename common/{cpu => gpu}/intel/jasper-lake/default.nix (100%) rename common/{cpu => gpu}/intel/kaby-lake/default.nix (100%) rename common/{cpu => gpu}/intel/sandy-bridge/default.nix (100%) rename common/{cpu => gpu}/intel/tiger-lake/default.nix (100%) diff --git a/apple/macbook-air/4/default.nix b/apple/macbook-air/4/default.nix index 181a0997..850ad8de 100644 --- a/apple/macbook-air/4/default.nix +++ b/apple/macbook-air/4/default.nix @@ -3,7 +3,7 @@ { imports = [ ../. - ../../../common/cpu/intel/sandy-bridge + ../../../common/gpu/intel/sandy-bridge ]; boot.kernelParams = [ diff --git a/apple/macbook-pro/14-1/default.nix b/apple/macbook-pro/14-1/default.nix index 54a6e84d..c2b61f9e 100644 --- a/apple/macbook-pro/14-1/default.nix +++ b/apple/macbook-pro/14-1/default.nix @@ -5,7 +5,7 @@ ... }: { imports = [ - ../../../common/cpu/intel/kaby-lake + ../../../common/gpu/intel/kaby-lake ../../../common/gpu/intel ../../../common/hidpi.nix ../../../common/pc/laptop diff --git a/asus/zenbook/ux371/default.nix b/asus/zenbook/ux371/default.nix index 8601e2b2..4fcfb28d 100644 --- a/asus/zenbook/ux371/default.nix +++ b/asus/zenbook/ux371/default.nix @@ -7,7 +7,7 @@ }: { imports = [ - ../../../common/cpu/intel/tiger-lake + ../../../common/gpu/intel/tiger-lake ../../../common/pc/laptop ../../../common/pc/laptop/ssd ../../battery.nix diff --git a/common/cpu/intel/comet-lake/default.nix b/common/gpu/intel/comet-lake/default.nix similarity index 100% rename from common/cpu/intel/comet-lake/default.nix rename to common/gpu/intel/comet-lake/default.nix diff --git a/common/cpu/intel/elkhart-lake/default.nix b/common/gpu/intel/elkhart-lake/default.nix similarity index 100% rename from common/cpu/intel/elkhart-lake/default.nix rename to common/gpu/intel/elkhart-lake/default.nix diff --git a/common/cpu/intel/jasper-lake/default.nix b/common/gpu/intel/jasper-lake/default.nix similarity index 100% rename from common/cpu/intel/jasper-lake/default.nix rename to common/gpu/intel/jasper-lake/default.nix diff --git a/common/cpu/intel/kaby-lake/default.nix b/common/gpu/intel/kaby-lake/default.nix similarity index 100% rename from common/cpu/intel/kaby-lake/default.nix rename to common/gpu/intel/kaby-lake/default.nix diff --git a/common/cpu/intel/sandy-bridge/default.nix b/common/gpu/intel/sandy-bridge/default.nix similarity index 100% rename from common/cpu/intel/sandy-bridge/default.nix rename to common/gpu/intel/sandy-bridge/default.nix diff --git a/common/cpu/intel/tiger-lake/default.nix b/common/gpu/intel/tiger-lake/default.nix similarity index 100% rename from common/cpu/intel/tiger-lake/default.nix rename to common/gpu/intel/tiger-lake/default.nix diff --git a/dell/inspiron/5509/default.nix b/dell/inspiron/5509/default.nix index e77c9fd1..b199e92b 100644 --- a/dell/inspiron/5509/default.nix +++ b/dell/inspiron/5509/default.nix @@ -1,7 +1,7 @@ { lib, ... }: { imports = [ - ../../../common/cpu/intel/tiger-lake + ../../../common/gpu/intel/tiger-lake ../../../common/pc/laptop ../../../common/pc/ssd ]; diff --git a/dell/precision/7520/default.nix b/dell/precision/7520/default.nix index 59fa95e6..09f85927 100644 --- a/dell/precision/7520/default.nix +++ b/dell/precision/7520/default.nix @@ -4,7 +4,7 @@ ... }: { imports = [ - ../../../common/cpu/intel/kaby-lake + ../../../common/gpu/intel/kaby-lake ../../../common/pc/laptop ../../../common/pc/laptop/ssd ../../../common/gpu/nvidia diff --git a/dell/xps/13-9360/default.nix b/dell/xps/13-9360/default.nix index f1ea3787..5c73b8bb 100644 --- a/dell/xps/13-9360/default.nix +++ b/dell/xps/13-9360/default.nix @@ -1,6 +1,6 @@ { imports = [ - ../../../common/cpu/intel/kaby-lake + ../../../common/gpu/intel/kaby-lake ../../../common/pc/laptop ]; diff --git a/dell/xps/13-9370/default.nix b/dell/xps/13-9370/default.nix index 10362b3b..62dddc55 100644 --- a/dell/xps/13-9370/default.nix +++ b/dell/xps/13-9370/default.nix @@ -2,7 +2,7 @@ { imports = [ - ../../../common/cpu/intel/kaby-lake + ../../../common/gpu/intel/kaby-lake ../../../common/pc/laptop ../../../common/pc/laptop/acpi_call.nix ]; diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index 49e36b16..aee5665f 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -1,7 +1,7 @@ { imports = [ ../../../common/cpu/intel - ../../../common/cpu/intel/kaby-lake + ../../../common/gpu/intel/kaby-lake ../../../common/pc/laptop ./xps-common.nix diff --git a/dell/xps/15-9560/intel/default.nix b/dell/xps/15-9560/intel/default.nix index 22de3bc8..a77cb82d 100644 --- a/dell/xps/15-9560/intel/default.nix +++ b/dell/xps/15-9560/intel/default.nix @@ -1,7 +1,7 @@ { imports = [ ../../../../common/cpu/intel - ../../../../common/cpu/intel/kaby-lake + ../../../../common/gpu/intel/kaby-lake ../../../../common/pc/laptop ../../../../common/gpu/nvidia/disable.nix ../xps-common.nix diff --git a/dell/xps/15-9570/default.nix b/dell/xps/15-9570/default.nix index 200dc093..9ef1a898 100644 --- a/dell/xps/15-9570/default.nix +++ b/dell/xps/15-9570/default.nix @@ -2,7 +2,7 @@ { imports = [ ../../../common/cpu/intel - ../../../common/cpu/intel/kaby-lake + ../../../common/gpu/intel/kaby-lake ../../../common/pc/laptop ./xps-common.nix ]; diff --git a/flake.nix b/flake.nix index 112e00e1..6072c4fe 100644 --- a/flake.nix +++ b/flake.nix @@ -266,10 +266,10 @@ common-cpu-amd-zenpower = import ./common/cpu/amd/zenpower.nix; common-cpu-amd-raphael-igpu = import ./common/cpu/amd/raphael/igpu.nix; common-cpu-intel = import ./common/cpu/intel; - common-cpu-intel-comet-lake = import ./common/cpu/intel/comet-lake; + common-gpu-intel-comet-lake = import ./common/gpu/intel/comet-lake; common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix; - common-cpu-intel-kaby-lake = import ./common/cpu/intel/kaby-lake; - common-cpu-intel-sandy-bridge = import ./common/cpu/intel/sandy-bridge; + common-gpu-intel-kaby-lake = import ./common/gpu/intel/kaby-lake; + common-gpu-intel-sandy-bridge = import ./common/gpu/intel/sandy-bridge; common-gpu-amd = import ./common/gpu/amd; common-gpu-amd-sea-islands = import ./common/gpu/amd/sea-islands; common-gpu-amd-southern-islands = import ./common/gpu/amd/southern-islands; diff --git a/google/pixelbook/default.nix b/google/pixelbook/default.nix index 1ea4c7af..0de52ed3 100644 --- a/google/pixelbook/default.nix +++ b/google/pixelbook/default.nix @@ -4,6 +4,6 @@ imports = [ ../../common/pc/laptop ../../common/pc/laptop/ssd - ../../common/cpu/intel/kaby-lake + ../../common/gpu/intel/kaby-lake ]; } diff --git a/gpd/p2-max/default.nix b/gpd/p2-max/default.nix index f3118644..2c02e178 100644 --- a/gpd/p2-max/default.nix +++ b/gpd/p2-max/default.nix @@ -3,7 +3,7 @@ ../../common/pc/laptop ../../common/pc/laptop/ssd ../../common/cpu/intel - ../../common/cpu/intel/kaby-lake + ../../common/gpu/intel/kaby-lake ../../common/hidpi.nix ]; } diff --git a/hardkernel/odroid-h3/default.nix b/hardkernel/odroid-h3/default.nix index e52d3a02..52d58195 100644 --- a/hardkernel/odroid-h3/default.nix +++ b/hardkernel/odroid-h3/default.nix @@ -1,5 +1,5 @@ { imports = [ - ../../common/cpu/intel/jasper-lake + ../../common/gpu/intel/jasper-lake ]; } diff --git a/hp/elitebook/2560p/default.nix b/hp/elitebook/2560p/default.nix index 3802337d..ddcc6c34 100644 --- a/hp/elitebook/2560p/default.nix +++ b/hp/elitebook/2560p/default.nix @@ -3,7 +3,7 @@ with lib; { imports = [ ../../../common/cpu/intel - ../../../common/cpu/intel/sandy-bridge + ../../../common/gpu/intel/sandy-bridge ../../../common/pc ../../../common/pc/laptop ../../../common/pc/laptop/hdd diff --git a/hp/notebook/14-df0023/default.nix b/hp/notebook/14-df0023/default.nix index ca6e30d4..b3cbfaeb 100644 --- a/hp/notebook/14-df0023/default.nix +++ b/hp/notebook/14-df0023/default.nix @@ -3,7 +3,7 @@ with lib; { imports = [ ../../../common/cpu/intel - ../../../common/cpu/intel/sandy-bridge + ../../../common/gpu/intel/sandy-bridge ../../../common/pc ../../../common/pc/laptop ../../../common/pc/laptop/hdd diff --git a/huawei/machc-wa/default.nix b/huawei/machc-wa/default.nix index e2bc0a8a..d92a6a17 100644 --- a/huawei/machc-wa/default.nix +++ b/huawei/machc-wa/default.nix @@ -6,7 +6,7 @@ }: { imports = [ ../../common/cpu/intel - ../../common/cpu/intel/comet-lake + ../../common/gpu/intel/comet-lake ../../common/gpu/nvidia ../../common/gpu/nvidia/prime.nix ../../common/hidpi.nix diff --git a/lenovo/thinkpad/e470/default.nix b/lenovo/thinkpad/e470/default.nix index 32007321..55aa595a 100644 --- a/lenovo/thinkpad/e470/default.nix +++ b/lenovo/thinkpad/e470/default.nix @@ -3,7 +3,7 @@ { imports = [ ../. - ../../../common/cpu/intel/kaby-lake + ../../../common/gpu/intel/kaby-lake ../../../common/gpu/nvidia/prime.nix ]; diff --git a/lenovo/thinkpad/l480/default.nix b/lenovo/thinkpad/l480/default.nix index d000320d..2211c062 100644 --- a/lenovo/thinkpad/l480/default.nix +++ b/lenovo/thinkpad/l480/default.nix @@ -2,7 +2,7 @@ { imports = [ ../. - ../../../common/cpu/intel/kaby-lake + ../../../common/gpu/intel/kaby-lake ../../../common/pc/laptop/ssd ]; diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix index 91289701..6bd162db 100644 --- a/lenovo/thinkpad/p51/default.nix +++ b/lenovo/thinkpad/p51/default.nix @@ -3,7 +3,7 @@ ../../../common/gpu/24.05-compat.nix ../../../common/gpu/nvidia/prime.nix ../../../common/cpu/intel - ../../../common/cpu/intel/kaby-lake + ../../../common/gpu/intel/kaby-lake ../../../common/pc/laptop/acpi_call.nix ../. ]; diff --git a/lenovo/thinkpad/t420/default.nix b/lenovo/thinkpad/t420/default.nix index a3c7db40..09f5d3fd 100644 --- a/lenovo/thinkpad/t420/default.nix +++ b/lenovo/thinkpad/t420/default.nix @@ -2,7 +2,7 @@ imports = [ ../. ../tp-smapi.nix - ../../../common/cpu/intel/sandy-bridge + ../../../common/gpu/intel/sandy-bridge ../../../common/pc/laptop/acpi_call.nix ]; } diff --git a/lenovo/thinkpad/t520/default.nix b/lenovo/thinkpad/t520/default.nix index a3c7db40..09f5d3fd 100644 --- a/lenovo/thinkpad/t520/default.nix +++ b/lenovo/thinkpad/t520/default.nix @@ -2,7 +2,7 @@ imports = [ ../. ../tp-smapi.nix - ../../../common/cpu/intel/sandy-bridge + ../../../common/gpu/intel/sandy-bridge ../../../common/pc/laptop/acpi_call.nix ]; } diff --git a/lenovo/thinkpad/w520/default.nix b/lenovo/thinkpad/w520/default.nix index a3c7db40..09f5d3fd 100644 --- a/lenovo/thinkpad/w520/default.nix +++ b/lenovo/thinkpad/w520/default.nix @@ -2,7 +2,7 @@ imports = [ ../. ../tp-smapi.nix - ../../../common/cpu/intel/sandy-bridge + ../../../common/gpu/intel/sandy-bridge ../../../common/pc/laptop/acpi_call.nix ]; } diff --git a/lenovo/thinkpad/x220/default.nix b/lenovo/thinkpad/x220/default.nix index ec8b45c9..c63333b2 100644 --- a/lenovo/thinkpad/x220/default.nix +++ b/lenovo/thinkpad/x220/default.nix @@ -1,7 +1,7 @@ { imports = [ ../. - ../../../common/cpu/intel/sandy-bridge + ../../../common/gpu/intel/sandy-bridge ../../../common/pc/laptop/hdd # TODO: reverse compat ../tp-smapi.nix ]; diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix index fdd13f6c..017cd718 100644 --- a/microsoft/surface/surface-go/default.nix +++ b/microsoft/surface/surface-go/default.nix @@ -14,7 +14,7 @@ in { ../../../common/pc/ssd # The Intel CPU module auto-includes Intel's GPU: ../../../common/cpu/intel - ../../../common/cpu/intel/kaby-lake + ../../../common/gpu/intel/kaby-lake ]; boot.kernelParams = [ diff --git a/protectli/vp4670/default.nix b/protectli/vp4670/default.nix index fdaac857..14dcf4ce 100644 --- a/protectli/vp4670/default.nix +++ b/protectli/vp4670/default.nix @@ -1,6 +1,6 @@ { imports = [ - ../../common/cpu/intel/comet-lake + ../../common/gpu/intel/comet-lake ]; boot.initrd.kernelModules = [ From a111ce6b537df12a39874aa9672caa87f8677eda Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Mon, 1 Jul 2024 15:40:59 -0600 Subject: [PATCH 0924/1476] flake: Deprecate Intel generation-specific outputs See #992 for more information. --- flake.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 6072c4fe..6c1a3008 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,9 @@ description = "nixos-hardware"; outputs = _: { - nixosModules = { + nixosModules = let + deprecated = issue: name: value: builtins.trace "warning: ${name} flake output is deprecated and will be removed. See https://github.com/NixOS/nixos-hardware/issues/${issue} for more information" value; + in { acer-aspire-4810t = import ./acer/aspire/4810t; airis-n990 = import ./airis/n990; apple-macbook-air-3 = import ./apple/macbook-air/3; @@ -266,10 +268,10 @@ common-cpu-amd-zenpower = import ./common/cpu/amd/zenpower.nix; common-cpu-amd-raphael-igpu = import ./common/cpu/amd/raphael/igpu.nix; common-cpu-intel = import ./common/cpu/intel; - common-gpu-intel-comet-lake = import ./common/gpu/intel/comet-lake; + common-gpu-intel-comet-lake = deprecated "992" "common-gpu-intel-comet-lake" (import ./common/gpu/intel/comet-lake); common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix; - common-gpu-intel-kaby-lake = import ./common/gpu/intel/kaby-lake; - common-gpu-intel-sandy-bridge = import ./common/gpu/intel/sandy-bridge; + common-gpu-intel-kaby-lake = deprecated "992" "common-gpu-intel-kaby-lake" (import ./common/gpu/intel/kaby-lake); + common-gpu-intel-sandy-bridge = deprecated "992" "common-gpu-intel-sandy-bridge" (import ./common/gpu/intel/sandy-bridge); common-gpu-amd = import ./common/gpu/amd; common-gpu-amd-sea-islands = import ./common/gpu/amd/sea-islands; common-gpu-amd-southern-islands = import ./common/gpu/amd/southern-islands; From c5925d86de15f5939c5f0de2945fdc736b28d4b1 Mon Sep 17 00:00:00 2001 From: seth Date: Thu, 11 Jul 2024 15:24:30 -0400 Subject: [PATCH 0925/1476] common-gpu-nvidia: drop libva-vdpau-driver libva-vdpau-driver has not seen a new release in over a decade and is a common cause for bugs in some applications. NixOS has also been using the now preferred nvidia-vaapi-driver since https://github.com/NixOS/nixpkgs/pull/162660, so there isn't much reason to keep this --- common/gpu/nvidia/default.nix | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/common/gpu/nvidia/default.nix b/common/gpu/nvidia/default.nix index 01542ee7..281e33f7 100644 --- a/common/gpu/nvidia/default.nix +++ b/common/gpu/nvidia/default.nix @@ -1,13 +1,6 @@ -{ lib, pkgs, ... }: +{ lib, ... }: { imports = [ ../24.05-compat.nix ]; services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ]; - hardware.graphics.extraPackages = [ - ( - if pkgs ? libva-vdpau-driver - then pkgs.libva-vdpau-driver - else pkgs.vaapiVdpau - ) - ]; } From 6b745e2331ba42e2f744434dcef1fe31ef9a4ced Mon Sep 17 00:00:00 2001 From: seth Date: Thu, 11 Jul 2024 15:43:10 -0400 Subject: [PATCH 0926/1476] common-gpu-nvidia: enable modesetting by default This is commonly required for many applications. As of https://github.com/NixOS/nixpkgs/pull/324921 this will also enable `nvidia-drm.fbdev=1`, fixing issues such as https://github.com/NixOS/nixpkgs/issues/302059 --- common/gpu/nvidia/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/gpu/nvidia/default.nix b/common/gpu/nvidia/default.nix index 281e33f7..de1494e1 100644 --- a/common/gpu/nvidia/default.nix +++ b/common/gpu/nvidia/default.nix @@ -3,4 +3,6 @@ { imports = [ ../24.05-compat.nix ]; services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ]; + # TODO: this will be a default after https://github.com/NixOS/nixpkgs/pull/326369 + hardware.nvidia.modesetting.enable = true; } From c5013aa7ce2c7ec90acee5d965d950c8348db751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 12 Jul 2024 00:32:24 +0200 Subject: [PATCH 0927/1476] common/gpu/nvidia: use lib.mkDefault for hardware.nvidia.modesetting --- common/gpu/nvidia/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/gpu/nvidia/default.nix b/common/gpu/nvidia/default.nix index de1494e1..df28c06a 100644 --- a/common/gpu/nvidia/default.nix +++ b/common/gpu/nvidia/default.nix @@ -4,5 +4,5 @@ imports = [ ../24.05-compat.nix ]; services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ]; # TODO: this will be a default after https://github.com/NixOS/nixpkgs/pull/326369 - hardware.nvidia.modesetting.enable = true; + hardware.nvidia.modesetting.enable = lib.mkDefault true; } From 6187754bdda54b330bfa46f383840221d2c5d9e4 Mon Sep 17 00:00:00 2001 From: Michael Paepcke Date: Mon, 15 Jul 2024 19:35:23 +0000 Subject: [PATCH 0928/1476] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- apple/macbook-pro/14-1/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple/macbook-pro/14-1/README.md b/apple/macbook-pro/14-1/README.md index 2809d900..216bb1d2 100644 --- a/apple/macbook-pro/14-1/README.md +++ b/apple/macbook-pro/14-1/README.md @@ -4,7 +4,7 @@ - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 ## Bluetooth - - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322964 + - [ ] broken lands https://github.com/NixOS/nixpkgs/pull/322964 in master ## Touchpad - [x] Working, including 'disable while typing' usable quirk From ea9f6719b17ab3a13271ed1d1306b174b19f510b Mon Sep 17 00:00:00 2001 From: Michael Paepcke Date: Mon, 15 Jul 2024 19:35:33 +0000 Subject: [PATCH 0929/1476] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- apple/macbook-pro/14-1/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple/macbook-pro/14-1/README.md b/apple/macbook-pro/14-1/README.md index 216bb1d2..ce74d7cd 100644 --- a/apple/macbook-pro/14-1/README.md +++ b/apple/macbook-pro/14-1/README.md @@ -1,7 +1,7 @@ # MacBook Pro 14,1, NixOS 24.05 (2024) ## Audio - - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 + - [ ] broken until https://github.com/NixOS/nixpkgs/pull/322968 lands in master ## Bluetooth - [ ] broken lands https://github.com/NixOS/nixpkgs/pull/322964 in master From 37d3f20674ad0d7ecc0367345ede6c550d1be819 Mon Sep 17 00:00:00 2001 From: Michael Paepcke Date: Mon, 15 Jul 2024 19:35:43 +0000 Subject: [PATCH 0930/1476] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- apple/imac/18-2/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apple/imac/18-2/README.md b/apple/imac/18-2/README.md index 6548ec8e..7ed259bc 100644 --- a/apple/imac/18-2/README.md +++ b/apple/imac/18-2/README.md @@ -1,10 +1,10 @@ # iMac 18,2, NixOS 24.05 (2024) ## Audio -- [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 +- [ ] broken until https://github.com/NixOS/nixpkgs/pull/322968 lands in master ## Bluetooth -- [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322964 +- [ ] broken until https://github.com/NixOS/nixpkgs/pull/322964 lands in master ## Thunderbolt - [x] ok From 9a187879f47ba2cad0f737913d99ebc893125ee6 Mon Sep 17 00:00:00 2001 From: toastal Date: Thu, 18 Jul 2024 17:03:33 +0000 Subject: [PATCH 0931/1476] lenovo-thinkpad-z13-gen2: move to asound.conf `sound.*` was removed upstream in Nixpkgs --- lenovo/thinkpad/z/gen2/z13/asound.conf | 9 +++++++++ lenovo/thinkpad/z/gen2/z13/default.nix | 12 +----------- 2 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 lenovo/thinkpad/z/gen2/z13/asound.conf diff --git a/lenovo/thinkpad/z/gen2/z13/asound.conf b/lenovo/thinkpad/z/gen2/z13/asound.conf new file mode 100644 index 00000000..e977df76 --- /dev/null +++ b/lenovo/thinkpad/z/gen2/z13/asound.conf @@ -0,0 +1,9 @@ +pcm.!default { + type plug + slave.pcm "hw:1,0" +} + +ctl.!default { + type hw + card 1 +} diff --git a/lenovo/thinkpad/z/gen2/z13/default.nix b/lenovo/thinkpad/z/gen2/z13/default.nix index 5eb6ef09..636d2e0c 100644 --- a/lenovo/thinkpad/z/gen2/z13/default.nix +++ b/lenovo/thinkpad/z/gen2/z13/default.nix @@ -5,15 +5,5 @@ ../../../../../lenovo/thinkpad/z/gen2 ]; - sound.extraConfig = '' - pcm.!default { - type plug - slave.pcm "hw:1,0" - } - - ctl.!default { - type hw - card 1 - } - ''; + environment.etc."asound.conf".source = ./asound.conf; } From 9a816e3d1c0649a7c88370c8eb80071f5891a4d8 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 12 Jul 2024 20:26:26 +0200 Subject: [PATCH 0932/1476] asus-rog-strix-g713ie: init update README for asus rog-strix g713ie --- README.md | 1 + asus/rog-strix/g713ie/default.nix | 16 ++++++++++++++++ flake.nix | 1 + 3 files changed, 18 insertions(+) create mode 100644 asus/rog-strix/g713ie/default.nix diff --git a/README.md b/README.md index de376d43..3a9c33cd 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ See code for all available configurations. | [Asus Pro WS X570-ACE](asus/pro-ws-x570-ace) | `` | | [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | | [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | +| [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | diff --git a/asus/rog-strix/g713ie/default.nix b/asus/rog-strix/g713ie/default.nix new file mode 100644 index 00000000..e36585c3 --- /dev/null +++ b/asus/rog-strix/g713ie/default.nix @@ -0,0 +1,16 @@ +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/nvidia + ../../../common/gpu/nvidia/prime.nix + ../../../common/pc/laptop + ../../../common/pc/ssd + ../../battery.nix + ]; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:5:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} diff --git a/flake.nix b/flake.nix index 6c1a3008..23007f91 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,7 @@ asus-fa507rm = import ./asus/fa507rm; asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace; asus-rog-strix-g513im = import ./asus/rog-strix/g513im; + asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-zenbook-ux371 = import ./asus/zenbook/ux371; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; From 108f27f71e67f43c74d2c2737749556fd6380341 Mon Sep 17 00:00:00 2001 From: jjtt <3908945+jjtt@users.noreply.github.com> Date: Thu, 18 Jul 2024 21:58:17 +0300 Subject: [PATCH 0933/1476] Remove BTRFS related setting The note about BTRFS has been removed from the linked Arch wiki page in January 2021 with a comment: > Removing note about problems with Btrfs and ALPM, since issues have been fixed in the kernel (4.15 -> https://www.spinics.net/lists/linux-btrfs/msg101833.html)) See: https://wiki.archlinux.org/index.php?title=TLP&oldid=650059 --- lenovo/thinkpad/x260/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lenovo/thinkpad/x260/default.nix b/lenovo/thinkpad/x260/default.nix index c11ef98f..409986dd 100644 --- a/lenovo/thinkpad/x260/default.nix +++ b/lenovo/thinkpad/x260/default.nix @@ -9,9 +9,4 @@ # https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X260#Thinkpad_X260 "i915.enable_psr=0" ]; - - # https://wiki.archlinux.org/index.php/TLP#Btrfs - services.tlp.settings = { - SATA_LINKPWR_ON_BAT = "med_power_with_dipm"; - }; } From 3501b9c0962d0644041cd4e9243f817c1d7418ba Mon Sep 17 00:00:00 2001 From: Niklas Gollenstede Date: Thu, 18 Jul 2024 00:14:16 +0200 Subject: [PATCH 0934/1476] flake.nix: export paths instead of imported files --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 23007f91..a6ea7272 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ outputs = _: { nixosModules = let deprecated = issue: name: value: builtins.trace "warning: ${name} flake output is deprecated and will be removed. See https://github.com/NixOS/nixos-hardware/issues/${issue} for more information" value; + import = path: path; # let the module system know what we are exporting in { acer-aspire-4810t = import ./acer/aspire/4810t; airis-n990 = import ./airis/n990; From d8bfbbf614881a110059f14bc2a5d28c5df115e5 Mon Sep 17 00:00:00 2001 From: Dom Rodriguez Date: Thu, 18 Jul 2024 15:58:55 +0100 Subject: [PATCH 0935/1476] fix: Add more aliases to 24.05-compat We're using these options too, which breaks builds without this commit. Fixes: #1045 Signed-off-by: Dom Rodriguez --- common/gpu/24.05-compat.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/gpu/24.05-compat.nix b/common/gpu/24.05-compat.nix index 3e3495f1..17508882 100644 --- a/common/gpu/24.05-compat.nix +++ b/common/gpu/24.05-compat.nix @@ -9,5 +9,7 @@ (lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages" ] [ "hardware" "opengl" "extraPackages" ]) (lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages32" ] [ "hardware" "opengl" "extraPackages32" ]) (lib.mkAliasOptionModule [ "hardware" "graphics" "enable32Bit" ] [ "hardware" "opengl" "driSupport32Bit" ]) + (lib.mkAliasOptionModule [ "hardware" "graphics" "package" ] [ "hardware" "opengl" "package" ]) + (lib.mkAliasOptionModule [ "hardware" "graphics" "package32" ] [ "hardware" "opengl" "package32" ]) ]; } From 71b92eab15920df202dd6256c2e2a58cc6e48641 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Thu, 18 Jul 2024 11:01:12 -0300 Subject: [PATCH 0936/1476] asus-rog-strix-x570: init Spec: https://rog.asus.com/motherboards/rog-strix/rog-strix-x570-e-gaming-model/spec/ --- README.md | 1 + asus/rog-strix/x570e/default.nix | 14 ++++++++++++++ flake.nix | 1 + 3 files changed, 16 insertions(+) create mode 100644 asus/rog-strix/x570e/default.nix diff --git a/README.md b/README.md index 3a9c33cd..12f3bec1 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,7 @@ See code for all available configurations. | [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | | [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | +| [Asus ROG Strix X570-E GAMING](asus/rog-strix/x570e) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | | [Asus ROG Zephyrus G14 GA402X* (2023)](asus/zephyrus/ga402x/amdgpu) | `` | diff --git a/asus/rog-strix/x570e/default.nix b/asus/rog-strix/x570e/default.nix new file mode 100644 index 00000000..d8ee657b --- /dev/null +++ b/asus/rog-strix/x570e/default.nix @@ -0,0 +1,14 @@ +# Motherboard: ROG STRIX X570-E GAMING +{ ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/cpu/amd/zenpower.nix + ../../../common/pc/ssd + ]; + + # Bluetooth driver for Intel AX200 802.11ax + boot.kernelModules = [ "btintel" ]; +} diff --git a/flake.nix b/flake.nix index a6ea7272..545253a9 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,7 @@ asus-rog-strix-g513im = import ./asus/rog-strix/g513im; asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; + asus-rog-strix-x570e = import ./asus/rog-strix/x570e; asus-zenbook-ux371 = import ./asus/zenbook/ux371; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; From 89a33c8e93a64d4f65ca3a2c7bc9da24216aa0b9 Mon Sep 17 00:00:00 2001 From: Nico Elbers Date: Mon, 1 Jul 2024 23:22:53 +0200 Subject: [PATCH 0937/1476] omen 16-n0280nd: init --- flake.nix | 1 + omen/16-n0280nd/README.md | 5 +++++ omen/16-n0280nd/default.nix | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 omen/16-n0280nd/README.md create mode 100644 omen/16-n0280nd/default.nix diff --git a/flake.nix b/flake.nix index 545253a9..5eddd5a3 100644 --- a/flake.nix +++ b/flake.nix @@ -232,6 +232,7 @@ omen-14-fb0798ng = import ./omen/14-fb0798ng; omen-15-en0010ca = import ./omen/15-en0010ca; omen-16-n0005ne = import ./omen/16-n0005ne; + omen-16-n0280nd = import ./omen/16-n0280nd; omen-15-en1007sa = import ./omen/15-en1007sa; omen-15-en0002np = import ./omen/15-en0002np; onenetbook-4 = import ./onenetbook/4; diff --git a/omen/16-n0280nd/README.md b/omen/16-n0280nd/README.md new file mode 100644 index 00000000..1fa601c5 --- /dev/null +++ b/omen/16-n0280nd/README.md @@ -0,0 +1,5 @@ +# HP Omen 16-n0280nd + +## ACPI platform profiles + +This config enables `hp-wmi`, which allows switch between cool, balanced, and performance modes on the platform EC, used by power management tools like `power-profile-daemon` and `tlp`. diff --git a/omen/16-n0280nd/default.nix b/omen/16-n0280nd/default.nix new file mode 100644 index 00000000..3929c66f --- /dev/null +++ b/omen/16-n0280nd/default.nix @@ -0,0 +1,21 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../common/cpu/amd + ../../common/cpu/amd/pstate.nix + ../../common/gpu/nvidia/prime.nix + ../../common/pc/laptop + ../../common/pc/ssd + ]; + + # Enables ACPI platform profiles + boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + kernelModules = [ "hp-wmi" ]; + }; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:6:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} From ece5b120143233d5d19a5e6034ae8bc879c21e7a Mon Sep 17 00:00:00 2001 From: Nico Elbers Date: Tue, 9 Jul 2024 20:43:37 +0200 Subject: [PATCH 0938/1476] update README for omen 16-n0280nd --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 12f3bec1..727a1192 100644 --- a/README.md +++ b/README.md @@ -292,6 +292,7 @@ See code for all available configurations. | [Omen 15-en0010ca](omen/14-fb0798ng) | `` | | [Omen 15-en0010ca](omen/15-en0010ca) | `` | | [Omen 16-n0005ne](omen/16-n0005ne) | `` | +| [Omen 16-n0280nd](/omen/16-n0280nd) | `` | | [Omen 15-en1007sa](omen/15-en1007sa) | `` | | [Omen 15-en0002np](omen/15-en0002np) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | From 19e9c2fb7a9877f2864922276cd6ca62b07fa37a Mon Sep 17 00:00:00 2001 From: liamwb Date: Tue, 9 Jul 2024 14:02:17 +1000 Subject: [PATCH 0939/1476] naively pasted code from our forum discussion --- dell/xps/15-9560/default.nix | 42 ++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index aee5665f..18be8fd4 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -4,36 +4,30 @@ ../../../common/gpu/intel/kaby-lake ../../../common/pc/laptop ./xps-common.nix - - # FIXME: remove this when bumblebee works again - ../../../common/gpu/nvidia/disable.nix ]; +# enable opengpl and gpu drivers + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + }; - /* Bumblebee seems to fail to evaluate: - (stack trace truncated; use '--show-trace' to show the full trace) + services.xserver.videoDrivers = ["nvidia"]; - error: assertion '(useSettings -> (! libsOnly))' failed + hardware.nvidia.modesetting.enable = true; - at /home/joerg/git/nixpkgs/pkgs/os-specific/linux/nvidia-x11/generic.nix:61:1: + hardware.nvidia.prime = { + offload = { + enable = true; + enableOffloadCmd = true; # provides the nvidia-offload command + }; - 60| - 61| assert useSettings -> !libsOnly; - | ^ - 62| assert !libsOnly -> kernel != null; +# integrated + intelBusId = "PCI:0:2:0"; - # 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 - # or - # xps-9560/nvidia +# dedicated + nvidiaBusId = "PCI:1:0:0"; + }; - - ##### 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 42577dbb0f75c1288a26864e40da32a0d67de853 Mon Sep 17 00:00:00 2001 From: liamwb Date: Tue, 9 Jul 2024 14:13:07 +1000 Subject: [PATCH 0940/1476] removed parts that are included in other modules --- dell/xps/15-9560/default.nix | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index 18be8fd4..d776fa5b 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -4,30 +4,22 @@ ../../../common/gpu/intel/kaby-lake ../../../common/pc/laptop ./xps-common.nix + ../../../common/gpu/nvidia ]; -# enable opengpl and gpu drivers hardware.opengl = { enable = true; driSupport = true; driSupport32Bit = true; }; - services.xserver.videoDrivers = ["nvidia"]; - hardware.nvidia.modesetting.enable = true; hardware.nvidia.prime = { - offload = { - enable = true; - enableOffloadCmd = true; # provides the nvidia-offload command - }; - -# integrated + # integrated intelBusId = "PCI:0:2:0"; -# dedicated + # dedicated nvidiaBusId = "PCI:1:0:0"; }; - } From 6a4ecebce56727d0ae538b1277725cb03181124e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 9 Jul 2024 10:43:32 +0200 Subject: [PATCH 0941/1476] dell/xps/15-9560: use graphics option --- dell/xps/15-9560/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index d776fa5b..6ad58f72 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -7,7 +7,7 @@ ../../../common/gpu/nvidia ]; - hardware.opengl = { + hardware.graphics = { enable = true; driSupport = true; driSupport32Bit = true; From 05672b50f70e47df282e974e07534d38df4f8fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 9 Jul 2024 10:48:01 +0200 Subject: [PATCH 0942/1476] dell/xps/15-9560: fix graphics options --- dell/xps/15-9560/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index 6ad58f72..510feabd 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -7,11 +7,7 @@ ../../../common/gpu/nvidia ]; - hardware.graphics = { - enable = true; - driSupport = true; - driSupport32Bit = true; - }; + hardware.graphics.enable = true; hardware.nvidia.modesetting.enable = true; From ab165a8a6cd12781d76fe9cbccb9e975d0fb634f Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 2 Jul 2024 11:48:10 -0600 Subject: [PATCH 0943/1476] codeowners: Add Lyndeno for XPS-9560 This is my daily driver and I foresee this to be the case for a long while. Contributions directly to this model: - #691 - #696 Contributions indirectly affecting this model: - #692 --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/CODEOWNERS b/CODEOWNERS index 4525d6b0..b197a5b2 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,6 +1,7 @@ beagleboard/pocketbeagle @yegortimoshenko dell/xps/13-9370 @moredread dell/xps/13-9380 @kalbasit +dell/xps/15-9560 @Lyndeno lenovo/thinkpad/x230 @makefu @yegortimoshenko lenovo/thinkpad/x250 @Mic92 pcengines/apu @yegortimoshenko From 405b654893aba16c8014de6a17e84439d3fb8e46 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 23 Jul 2024 22:11:15 +1200 Subject: [PATCH 0944/1476] Add Lenovo Thinkpad T14 Gen5 - Which is basically the same as Gen4 ... --- flake.nix | 1 + lenovo/thinkpad/t14/amd/gen5/default.nix | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 lenovo/thinkpad/t14/amd/gen5/default.nix diff --git a/flake.nix b/flake.nix index 5eddd5a3..e2ec5ed2 100644 --- a/flake.nix +++ b/flake.nix @@ -157,6 +157,7 @@ lenovo-thinkpad-t14-amd-gen2 = import ./lenovo/thinkpad/t14/amd/gen2; lenovo-thinkpad-t14-amd-gen3 = import ./lenovo/thinkpad/t14/amd/gen3; lenovo-thinkpad-t14-amd-gen4 = import ./lenovo/thinkpad/t14/amd/gen4; + lenovo-thinkpad-t14-amd-gen5 = import ./lenovo/thinkpad/t14/amd/gen5; lenovo-thinkpad-t14s = import ./lenovo/thinkpad/t14s; lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1; lenovo-thinkpad-t14s-amd-gen4 = import ./lenovo/thinkpad/t14s/amd/gen4; diff --git a/lenovo/thinkpad/t14/amd/gen5/default.nix b/lenovo/thinkpad/t14/amd/gen5/default.nix new file mode 100644 index 00000000..e61a3a0d --- /dev/null +++ b/lenovo/thinkpad/t14/amd/gen5/default.nix @@ -0,0 +1,12 @@ +{ lib, pkgs, config, ... }: + +{ + imports = [ + ../. + ../../../../../common/cpu/amd/pstate.nix + ]; + + # For the Qualcomm NFA765 [17cb:1103] wireless network controller + # See https://bugzilla.redhat.com/show_bug.cgi?id=2047878 + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; +} From b501c5fbf657b4bbe2a61a66fc1483ad0ec40d7b Mon Sep 17 00:00:00 2001 From: Arne Cuperus Date: Wed, 24 Jul 2024 18:01:51 +0200 Subject: [PATCH 0945/1476] Add configuration for Lenovo IdeaPad Gaming 3 15ach6 --- README.md | 1 + flake.nix | 1 + lenovo/ideapad/15ach6/README.md | 25 +++++++++++++++++++++++++ lenovo/ideapad/15ach6/default.nix | 20 ++++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 lenovo/ideapad/15ach6/README.md create mode 100644 lenovo/ideapad/15ach6/default.nix diff --git a/README.md b/README.md index 727a1192..ea97ab62 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,7 @@ See code for all available configurations. | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `` | | [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | +| [Lenovo IdeaPad Gaming 3 15ach6](lenovo/ideapad/15ach6) | `` | | [Lenovo IdeaPad 5 Pro 16ach6](lenovo/ideapad/16ach6) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | diff --git a/flake.nix b/flake.nix index e2ec5ed2..7bbbe121 100644 --- a/flake.nix +++ b/flake.nix @@ -112,6 +112,7 @@ intel-nuc-8i7beh = import ./intel/nuc/8i7beh; lenovo-ideapad-15alc6 = import ./lenovo/ideapad/15alc6; lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; + lenovo-ideapad-15ach6 = import ./lenovo/ideapad/15ach6; lenovo-ideapad-16ach6 = import ./lenovo/ideapad/16ach6; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-ideapad-slim-5 = import ./lenovo/ideapad/slim-5; diff --git a/lenovo/ideapad/15ach6/README.md b/lenovo/ideapad/15ach6/README.md new file mode 100644 index 00000000..e4299080 --- /dev/null +++ b/lenovo/ideapad/15ach6/README.md @@ -0,0 +1,25 @@ +# Lenovo IdeaPad Gaming 3 15ACH6 + +This device supports "battery conservation mode", which charges the battery to only ~60%. This mode can be enabled using [TLP](https://linrunner.de/tlp/settings/bc-vendors.html#lenovo-non-thinkpad-series): + +## Device information + +Details from `tlp-stat`: + +``` +System = LENOVO IdeaPad Gaming 3 15ACH6 82K2 +BIOS = H3CN31WW(V2.01) +EC Firmware = 1.31 +OS Release = NixOS 24.11 (Vicuna) +Kernel = 6.6.37 #1-NixOS SMP PREEMPT_DYNAMIC Fri Jul 5 07:34:07 UTC 2024 x86_64 +Init system = systemd +Boot mode = UEFI +Suspend mode = s2idle [deep] +``` + +`lspci` output: + +``` +01:00.0 3D controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1) +06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (rev c6) +``` diff --git a/lenovo/ideapad/15ach6/default.nix b/lenovo/ideapad/15ach6/default.nix new file mode 100644 index 00000000..c771f1bd --- /dev/null +++ b/lenovo/ideapad/15ach6/default.nix @@ -0,0 +1,20 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ../../../common/gpu/nvidia/prime.nix + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + hardware.nvidia = { + modesetting.enable = true; + prime = { + amdgpuBusId = "PCI:6:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; +} From a7432ebaefc9a400dcda399d48b949230378d784 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Sun, 21 Jul 2024 15:06:36 +0200 Subject: [PATCH 0946/1476] framework/16-inch: Mark keyboard as internal for libinput This addition tells libinput that the built-in keyboard is indeed internal, allowing the "Disable-While-Typing" setting to take effect. The method is explained at https://linuxtouchpad.org/libinput/2022/05/07/disable-while-typing.html. --- framework/16-inch/common/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/framework/16-inch/common/default.nix b/framework/16-inch/common/default.nix index 547f98f4..07e51622 100644 --- a/framework/16-inch/common/default.nix +++ b/framework/16-inch/common/default.nix @@ -26,4 +26,14 @@ # Enable keyboard customization hardware.keyboard.qmk.enable = lib.mkDefault true; + + # Allow `services.libinput.touchpad.disableWhileTyping` to work correctly. + # Set unconditionally because libinput can also be configured dynamically via + # gsettings. + environment.etc."libinput/local-overrides.quirks".text = '' + [Serial Keyboards] + MatchUdevType=keyboard + MatchName=Framework Laptop 16 Keyboard Module - ANSI Keyboard + AttrKeyboardIntegration=internal + ''; } From 39ac67a5feba7ac99165e39a6def08da39de5da5 Mon Sep 17 00:00:00 2001 From: Majiir Paktu Date: Wed, 24 Jul 2024 21:47:52 -0400 Subject: [PATCH 0947/1476] surface: fix isVersionOf check --- microsoft/surface/common/kernel/linux-package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/surface/common/kernel/linux-package.nix b/microsoft/surface/common/kernel/linux-package.nix index 45b47349..b179fcb7 100644 --- a/microsoft/surface/common/kernel/linux-package.nix +++ b/microsoft/surface/common/kernel/linux-package.nix @@ -48,7 +48,7 @@ let isVersionOf = kernelVersion: version: # Test if the provided version is considered one of the list of versions from above: - elem version (versionsOf version); + elem kernelVersion (versionsOf version); in { inherit linuxPackage repos surfacePatches versionsOf isVersionOf versionsOfEnum; From 226e517854aec947b139e28e9edb6394fe256d32 Mon Sep 17 00:00:00 2001 From: Majiir Paktu Date: Wed, 24 Jul 2024 22:37:46 -0400 Subject: [PATCH 0948/1476] surface: fix default kernel version --- 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 057142c4..daf93047 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -8,7 +8,7 @@ in { ./kernel ]; - microsoft-surface.kernelVersion = mkDefault "6.6"; + microsoft-surface.kernelVersion = mkDefault "6.9"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; From 5bd0371d3ff4c121b03450de8cfd643547b11fe1 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 23 Jul 2024 14:31:45 +1200 Subject: [PATCH 0949/1476] Create lenovo-yoga-7-14ARH7-amdgpu and lenovo-yoga-7-14ARH7-nvidia entries - Previous attr-set style providing "amdgpu" and "nvidia" is broken by PR #1046 - Add deprecation assertion for lenovo-yoga-7-14ARH7 --- flake.nix | 2 ++ lenovo/yoga/7/14ARH7/ATTR-SET-DEPRECATION.md | 16 ++++++++++++++++ lenovo/yoga/7/14ARH7/default.nix | 19 +++++++------------ 3 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 lenovo/yoga/7/14ARH7/ATTR-SET-DEPRECATION.md diff --git a/flake.nix b/flake.nix index caa4a716..64d49138 100644 --- a/flake.nix +++ b/flake.nix @@ -212,6 +212,8 @@ lenovo-thinkpad-z13-gen2 = import ./lenovo/thinkpad/z/gen2/z13; lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; lenovo-yoga-7-14ARH7 = import ./lenovo/yoga/7/14ARH7; + lenovo-yoga-7-14ARH7-amdgpu = import ./lenovo/yoga/7/14ARH7/amdgpu; + lenovo-yoga-7-14ARH7-nvidia = import ./lenovo/yoga/7/14ARH7/nvidia; lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; microchip-icicle-kit = import ./microchip/icicle-kit; diff --git a/lenovo/yoga/7/14ARH7/ATTR-SET-DEPRECATION.md b/lenovo/yoga/7/14ARH7/ATTR-SET-DEPRECATION.md new file mode 100644 index 00000000..9ef52392 --- /dev/null +++ b/lenovo/yoga/7/14ARH7/ATTR-SET-DEPRECATION.md @@ -0,0 +1,16 @@ +# Deprecation of //lenovo/yoga/7/14ARH7/default.nix + +Background: +The `lenovo-yoga-7-14ARH7` provides an attr-set with `amdgpu` and `nvidia` entries, to allow users +to choose whether to enable only the AMD-GPU driver, or also enable the NVidia driver with (by +default) Prime enabled. + +However, this attr-set style seems to be broken by [PR #1046](https://github.com/NixOS/nixos-hardware/pull/1046), +which exports modules as paths, instead. +That change seems to cause an error of "value is a path while a set was expected". + +[PR #1053](https://github.com/NixOS/nixos-hardware/pull/1053): +- Replaced `lenovo-yoga-7-14ARH7.amdgpu` with a `lenovo-yoga-7-14ARH7-amdgpu` entry. +- Replaced `lenovo-yoga-7-14ARH7.nvidia` with a `lenovo-yoga-7-14ARH7-nvidia` entry. +- Made `lenovo-yoga-7-14ARH7` throw a deprecation error. +- [FIXES: #1052](https://github.com/NixOS/nixos-hardware/issues/1052) diff --git a/lenovo/yoga/7/14ARH7/default.nix b/lenovo/yoga/7/14ARH7/default.nix index 851033c7..36605a14 100644 --- a/lenovo/yoga/7/14ARH7/default.nix +++ b/lenovo/yoga/7/14ARH7/default.nix @@ -1,15 +1,10 @@ -# When using from a Flake, you can access these via imports of the attr key, e.g: -# -# imports = [ -# nixos-hardware.nixosModules.lenovo-yoga-7-14ARH7.amdgpu -# ]; -# -## or: -# imports = [ -# nixos-hardware.nixosModules.lenovo-yoga-7-14ARH7.nvidia -# ]; +{ ... }: { - amdgpu = import ./amdgpu; - nvidia = import ./nvidia; + assertions = [ + { + assertion = false; + message = "Importing lenovo/yoga/7/14ARH7/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/lenovo/yoga/7/14ARH7/ATTR-SET-DEPRECATION.md for more details"; + } + ]; } From 13d6cbde4dc271aa35747c5cee4926280c330a26 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 22 Jul 2024 00:10:45 +1200 Subject: [PATCH 0950/1476] Create asus-zephyrus-ga402x-amdgpu and asus-zephyrus-ga402x-nvidia entries - Previous attr-set style providing "amdgpu" and "nvidia" is broken by PR #1046 - Add deprecation assertion for asus-zephyrus-ga402x --- asus/zephyrus/ga402x/default.nix | 19 +++++++------------ flake.nix | 2 ++ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/asus/zephyrus/ga402x/default.nix b/asus/zephyrus/ga402x/default.nix index 7e49eb66..a77e24d7 100644 --- a/asus/zephyrus/ga402x/default.nix +++ b/asus/zephyrus/ga402x/default.nix @@ -1,15 +1,10 @@ -## When using from a Flake, you can access these via imports of the attr key, e.g: -# -# imports = [ -# nixos-hardware.nixosModules.asus-zephyrus-ga402x.amdgpu -# ]; -# -## or: -# imports = [ -# nixos-hardware.nixosModules.asus-zephyrus-ga402x.nvidia -# ]; +{ ... }: { - amdgpu = import ./amdgpu; - nvidia = import ./nvidia; + assertions = [ + { + assertion = false; + message = "Importing asus/zephyrus/ga402x/ (default.nix) directly is deprecated! #TODO: More details"; + } + ]; } diff --git a/flake.nix b/flake.nix index 64d49138..3754e48c 100644 --- a/flake.nix +++ b/flake.nix @@ -34,6 +34,8 @@ asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; asus-zephyrus-ga402x = import ./asus/zephyrus/ga402x; + asus-zephyrus-ga402x-amdgpu = import ./asus/zephyrus/ga402x/amdgpu; + asus-zephyrus-ga402x-nvidia = import ./asus/zephyrus/ga402x/nvidia; asus-zephyrus-ga502 = import ./asus/zephyrus/ga502; asus-zephyrus-ga503 = import ./asus/zephyrus/ga503; asus-zephyrus-gu603h = import ./asus/zephyrus/gu603h; From 60d3bae3845050d36328fbfc9a0e95b82a25f2f1 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 22 Jul 2024 00:40:46 +1200 Subject: [PATCH 0951/1476] Add deprecation explanation --- asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md | 16 ++++++++++++++++ asus/zephyrus/ga402x/default.nix | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md diff --git a/asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md b/asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md new file mode 100644 index 00000000..21d3d1e3 --- /dev/null +++ b/asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md @@ -0,0 +1,16 @@ +# Deprecation of //asus/zephyrus/ga402x/default.nix + +Background: +The `asus-zephyrus-ga402x` provides an attr-set with `amdgpu` and `nvidia` entries, to allow users +to choose whether to enable only the AMD-GPU driver, or also enable the NVidia driver with (by +default) Prime enabled. + +However, this attr-set style seems to be broken by [PR #1046](https://github.com/NixOS/nixos-hardware/pull/1046), +which exports modules as paths, instead. +That change seems to cause an error of "value is a path while a set was expected". + +[PR #1053](https://github.com/NixOS/nixos-hardware/pull/1053): +- Replaced `asus-zephyrus-ga402x.amdgpu` with a `asus-zephyrus-ga402x-amdgpu` entry. +- Replaced `asus-zephyrus-ga402x.nvidia` with a `asus-zephyrus-ga402x-nvidia` entry. +- Made `asus-zephyrus-ga402x` throw a deprecation error. +- [FIXES: #1052](https://github.com/NixOS/nixos-hardware/issues/1052) diff --git a/asus/zephyrus/ga402x/default.nix b/asus/zephyrus/ga402x/default.nix index a77e24d7..e4e681ea 100644 --- a/asus/zephyrus/ga402x/default.nix +++ b/asus/zephyrus/ga402x/default.nix @@ -4,7 +4,7 @@ assertions = [ { assertion = false; - message = "Importing asus/zephyrus/ga402x/ (default.nix) directly is deprecated! #TODO: More details"; + message = "Importing asus/zephyrus/ga402x/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md for more details"; } ]; } From d3c993c851ad40bbab7e08d566138ff72cd8744f Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Wed, 24 Jul 2024 00:02:24 +0800 Subject: [PATCH 0952/1476] Lenovo ThinkPad X1 (12th Gen): init --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/x1/12th-gen/default.nix | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100644 lenovo/thinkpad/x1/12th-gen/default.nix diff --git a/README.md b/README.md index ea97ab62..5c1a6ab9 100644 --- a/README.md +++ b/README.md @@ -251,6 +251,7 @@ See code for all available configurations. | [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | | [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `` | | [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `` | +| [Lenovo ThinkPad X1 (12th Gen)](lenovo/thinkpad/x1/12th-gen) | `` | | [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | | [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | | [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | diff --git a/flake.nix b/flake.nix index 3754e48c..0be72458 100644 --- a/flake.nix +++ b/flake.nix @@ -191,6 +191,7 @@ lenovo-thinkpad-x1-9th-gen = import ./lenovo/thinkpad/x1/9th-gen; lenovo-thinkpad-x1-10th-gen = import ./lenovo/thinkpad/x1/10th-gen; lenovo-thinkpad-x1-11th-gen = import ./lenovo/thinkpad/x1/11th-gen; + lenovo-thinkpad-x1-12th-gen = import ./lenovo/thinkpad/x1/12th-gen; lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme; lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2; lenovo-thinkpad-x1-extreme-gen4 = import ./lenovo/thinkpad/x1-extreme/gen4; diff --git a/lenovo/thinkpad/x1/12th-gen/default.nix b/lenovo/thinkpad/x1/12th-gen/default.nix new file mode 100644 index 00000000..7d17c714 --- /dev/null +++ b/lenovo/thinkpad/x1/12th-gen/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ../. + ../../../../common/pc/laptop/ssd + ]; + + hardware.trackpoint.device = "TPPS/2 Synaptics TrackPoint"; +} From 109174381137e88eae61a3537e07e9ef58ba6a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tracteur=20Blind=C3=A9?= Date: Wed, 24 Jul 2024 14:48:45 -0700 Subject: [PATCH 0953/1476] surface: linux-surface arch-6.9.3-1 to arch-6.9.9-1 --- microsoft/surface/common/repos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 313f133b..8e60ee96 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "arch-6.9.3-1"; - hash = "sha256-HoG7MuWAtiTAX9CJeqCGrfkfoue7XLtSMF6zjx4z7i8="; + rev = "arch-6.9.9-1"; + hash = "sha256-L7o2tqtO5wkTSWaL44SgNeorPdoNjSpM1GDdI7khnSo="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From 0b4d40f95a68ef0a6785f6b938ac8c1383321dbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tracteur=20Blind=C3=A9?= Date: Wed, 24 Jul 2024 14:49:05 -0700 Subject: [PATCH 0954/1476] surface: linux 6.9.3 -> 6.9.9 --- microsoft/surface/common/kernel/linux-6.9.x/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-6.9.x/default.nix b/microsoft/surface/common/kernel/linux-6.9.x/default.nix index c0fd5c9b..164d59e5 100644 --- a/microsoft/surface/common/kernel/linux-6.9.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.9.x/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.9.3"; + version = "6.9.9"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "1bnzxparybwh320019pr2msaapas41dhjmvg4gy791rn05jc88f3"; + sha256 = "1f8y88rif3z5lp1bq00g66fd0xs1227qlqkxd2zs6fdjgr45pq1b"; ignoreConfigErrors=true; }; From b7b55739f75fd5eaca6b1867d11919896d9b404b Mon Sep 17 00:00:00 2001 From: Eric Thomas Date: Fri, 26 Jul 2024 20:53:48 -0230 Subject: [PATCH 0955/1476] fix link text for Omen 14-fb0798ng --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c1a6ab9..1992563a 100644 --- a/README.md +++ b/README.md @@ -291,7 +291,7 @@ See code for all available configurations. | [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | | [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | | [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | -| [Omen 15-en0010ca](omen/14-fb0798ng) | `` | +| [Omen 14-fb0798ng](omen/14-fb0798ng) | `` | | [Omen 15-en0010ca](omen/15-en0010ca) | `` | | [Omen 16-n0005ne](omen/16-n0005ne) | `` | | [Omen 16-n0280nd](/omen/16-n0280nd) | `` | From eab049fe178c11395d65a858ba1b56461ba9652d Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sun, 28 Jul 2024 17:26:18 +0200 Subject: [PATCH 0956/1476] surface: linux 6.9.9 -> 6.9.12 --- microsoft/surface/common/kernel/linux-6.9.x/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-6.9.x/default.nix b/microsoft/surface/common/kernel/linux-6.9.x/default.nix index 164d59e5..40060258 100644 --- a/microsoft/surface/common/kernel/linux-6.9.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.9.x/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.9.9"; + version = "6.9.12"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "1f8y88rif3z5lp1bq00g66fd0xs1227qlqkxd2zs6fdjgr45pq1b"; + sha256 = "08ngskni7d9wi93vlwcmbdg7sb2jl1drhhzn62k9nsrg1r7crrss"; ignoreConfigErrors=true; }; From 14c333162ba53c02853add87a0000cbd7aa230c2 Mon Sep 17 00:00:00 2001 From: Ali Rizvi Date: Mon, 29 Jul 2024 17:37:28 -0400 Subject: [PATCH 0957/1476] treewide: remove uses of lib.mdDoc --- common/gpu/intel/default.nix | 5 ++--- framework/kmod.nix | 4 ++-- gpd/win-max-2/2023/bmi260/default.nix | 2 +- gpd/win-max-2/default.nix | 2 +- purism/librem/5r4/default.nix | 10 +++++----- raspberry-pi/4/digi-amp-plus.nix | 4 ++-- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index be5a8c89..54f4eec7 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -16,9 +16,8 @@ }; options.hardware.intelgpu.loadInInitrd = - lib.mkEnableOption ( - lib.mdDoc "Load the Intel GPU kernel module at stage 1 boot. (Added to `boot.initrd.kernelModules`)" - ) + lib.mkEnableOption + "Load the Intel GPU kernel module at stage 1 boot. (Added to `boot.initrd.kernelModules`)" // { default = true; }; diff --git a/framework/kmod.nix b/framework/kmod.nix index 81ce37a0..a6c30eb3 100644 --- a/framework/kmod.nix +++ b/framework/kmod.nix @@ -1,8 +1,8 @@ { config, lib, ... }: { - options.hardware.framework.enableKmod = lib.mkEnableOption (lib.mdDoc + options.hardware.framework.enableKmod = lib.mkEnableOption "Enable the community created Framework kernel module that allows interacting with the embedded controller from sysfs." - ) // { + // { # Enable by default if on new enough version of NixOS default = (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05"); }; diff --git a/gpd/win-max-2/2023/bmi260/default.nix b/gpd/win-max-2/2023/bmi260/default.nix index bbce72e2..099367a8 100644 --- a/gpd/win-max-2/2023/bmi260/default.nix +++ b/gpd/win-max-2/2023/bmi260/default.nix @@ -18,7 +18,7 @@ in hardware.sensor.iio.bmi260.enable = mkOption { default = false; type = types.bool; - description = mdDoc '' + description = '' Enable Bosch BMI260 IMU kernel module driver. ''; }; diff --git a/gpd/win-max-2/default.nix b/gpd/win-max-2/default.nix index ae821a36..d7ff52d6 100644 --- a/gpd/win-max-2/default.nix +++ b/gpd/win-max-2/default.nix @@ -15,7 +15,7 @@ in # NOTICE: Whenever you can limit PPT to 15W by pressing Fn + Shift to enter quiet mode. options.hardware.gpd.ppt = { - enable = mkEnableOption (mdDoc "Enable PPT control for device by ryzenadj.") // { + enable = mkEnableOption "Enable PPT control for device by ryzenadj." // { # Default increase PPT to the BIOS default when power adapter plugin to increase performance. default = true; }; diff --git a/purism/librem/5r4/default.nix b/purism/librem/5r4/default.nix index 76854a6f..339b43b3 100644 --- a/purism/librem/5r4/default.nix +++ b/purism/librem/5r4/default.nix @@ -12,18 +12,18 @@ in { }; wifiCard = lib.mkOption { type = lib.types.enum [ "redpine" "sparklan" "none" ]; - description = lib.mdDoc '' + description = '' Which wi-fi card is installed in your phone. Phones shipped before January 2023 have redpine, newer phones have sparklan. ''; default = "redpine"; }; - customInitrdModules = lib.mkEnableOption (lib.mdDoc "use of custom kernel modules in the initrd."); - installUdevPackages = lib.mkEnableOption (lib.mdDoc "installation of udev packages from librem5-base."); - lockdownFix = lib.mkEnableOption (lib.mdDoc "fix for orientation and proximity sensors not working after lockdown."); + customInitrdModules = lib.mkEnableOption "use of custom kernel modules in the initrd."; + installUdevPackages = lib.mkEnableOption "installation of udev packages from librem5-base."; + lockdownFix = lib.mkEnableOption "fix for orientation and proximity sensors not working after lockdown."; audio = lib.mkOption { - description = lib.mdDoc '' + description = '' Whether to enable and configure PulseAudio for the Librem5 modem. This is required for audio during calls to work at all. diff --git a/raspberry-pi/4/digi-amp-plus.nix b/raspberry-pi/4/digi-amp-plus.nix index e9df06d6..3c19f3a8 100644 --- a/raspberry-pi/4/digi-amp-plus.nix +++ b/raspberry-pi/4/digi-amp-plus.nix @@ -13,7 +13,7 @@ in unmuteAmp = lib.mkOption { type = lib.types.bool; default = false; - description = lib.mdDoc '' + description = '' "one-shot" unmute when kernel module first loads. ''; }; @@ -21,7 +21,7 @@ in autoMuteAmp = lib.mkOption { type = lib.types.bool; default = true; - description = lib.mdDoc '' + description = '' Unmute the amp when an ALSA device is opened by a client. Mute, with a five-second delay when the ALSA device is closed. (Reopening the device within the five-second close window will cancel mute.) ''; From e6d16f1b6b4a3ab6f717f62965a8c1d23e6a502e Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Thu, 8 Aug 2024 20:15:48 +0200 Subject: [PATCH 0958/1476] surface: linux-surface arch-6.9.9-1 -> arch-6.10.3-1 --- microsoft/surface/common/repos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 8e60ee96..513f788a 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "arch-6.9.9-1"; - hash = "sha256-L7o2tqtO5wkTSWaL44SgNeorPdoNjSpM1GDdI7khnSo="; + rev = "arch-6.10.3-1"; + hash = "sha256-T7voXofI5W+YodHB2DtNSKKc4iUlN3NS0onP4TKFvQM="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From 107bb46eef1f05e86fc485ee8af9b637e5157988 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Thu, 8 Aug 2024 20:16:17 +0200 Subject: [PATCH 0959/1476] surface: linux 6.9.12 -> 6.10.3 --- microsoft/surface/common/default.nix | 2 +- microsoft/surface/common/kernel/default.nix | 2 +- .../common/kernel/{linux-6.9.x => linux-6.10.x}/default.nix | 4 ++-- .../common/kernel/{linux-6.9.x => linux-6.10.x}/patches.nix | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename microsoft/surface/common/kernel/{linux-6.9.x => linux-6.10.x}/default.nix (87%) rename microsoft/surface/common/kernel/{linux-6.9.x => linux-6.10.x}/patches.nix (100%) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index daf93047..f4dbfe91 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -8,7 +8,7 @@ in { ./kernel ]; - microsoft-surface.kernelVersion = mkDefault "6.9"; + microsoft-surface.kernelVersion = mkDefault "6.10"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index a8f598de..84edc895 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -5,7 +5,7 @@ let in { imports = [ - ./linux-6.9.x + ./linux-6.10.x ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.9.x/default.nix b/microsoft/surface/common/kernel/linux-6.10.x/default.nix similarity index 87% rename from microsoft/surface/common/kernel/linux-6.9.x/default.nix rename to microsoft/surface/common/kernel/linux-6.10.x/default.nix index 40060258..5d6f7a64 100644 --- a/microsoft/surface/common/kernel/linux-6.9.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.10.x/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.9.12"; + version = "6.10.3"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "08ngskni7d9wi93vlwcmbdg7sb2jl1drhhzn62k9nsrg1r7crrss"; + sha256 = "1666dypfg193l5460maadki4hc291hr7k9fw74nq21fxczyj4pzs"; ignoreConfigErrors=true; }; diff --git a/microsoft/surface/common/kernel/linux-6.9.x/patches.nix b/microsoft/surface/common/kernel/linux-6.10.x/patches.nix similarity index 100% rename from microsoft/surface/common/kernel/linux-6.9.x/patches.nix rename to microsoft/surface/common/kernel/linux-6.10.x/patches.nix From f568ffb601d39e3aedae86b056b4cb8e9cb590a8 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Fri, 2 Aug 2024 15:56:38 +0800 Subject: [PATCH 0960/1476] apple/t2: bump kernel to 6.10.3 --- apple/t2/pkgs/linux-t2.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index 26918908..585c145c 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -2,19 +2,19 @@ , ... } @ args: let - version = "6.9.8"; + version = "6.10.3"; majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); patchRepo = fetchFromGitHub { owner = "t2linux"; repo = "linux-t2-patches"; - rev = "47b4069221c0ee3b6db56ab1ea90ae89e2de26f3"; - hash = "sha256-1B5DbLdyKdswy2ERmWVyjojdazTDbMsS+Vz/mrTdoFY="; + rev = "29d6f013088303623cd9f2c6f5951eb3455830a6"; + hash = "sha256-V0dakKRPC6Hj1I+SCiZXOCwtS0mZCCAsWnGtJnFlzxU="; }; kernel = fetchzip { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-o67tasZu4qGQ7obw+BCgNfaLqDcT3SPqsa3kTzWjmfg="; + hash = "sha256-+tWXv9j5bUJN7kzFZxuL+wB1fBCyXbtyms3Q5/dTtK4="; }; in buildLinux (args // { From 6ed5521636c7b40b800a014f26f0eaaa210c2e30 Mon Sep 17 00:00:00 2001 From: kurogeek Date: Mon, 5 Aug 2024 15:11:30 +0700 Subject: [PATCH 0961/1476] thinkpad-t14-gen1: add a kernel param for touchpad to work properly --- lenovo/thinkpad/t14/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lenovo/thinkpad/t14/default.nix b/lenovo/thinkpad/t14/default.nix index 3466e95d..b6fd228b 100644 --- a/lenovo/thinkpad/t14/default.nix +++ b/lenovo/thinkpad/t14/default.nix @@ -14,7 +14,11 @@ # Force use of the thinkpad_acpi driver for backlight control. # This allows the backlight save/load systemd service to work. - boot.kernelParams = [ "acpi_backlight=native" ]; + boot.kernelParams = [ + "acpi_backlight=native" + # Needed for touchpad to work properly (click doesn't register by pushing down the touchpad). + "psmouse.synaptics_intertouch=0" + ]; # see https://github.com/NixOS/nixpkgs/issues/69289 boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest; From 72b83c838d756b6d019017cfafd645b314f85097 Mon Sep 17 00:00:00 2001 From: Andy3153 Date: Wed, 31 Jul 2024 20:12:38 +0300 Subject: [PATCH 0962/1476] asus-fx506hm: use nvidia-open by default Uses Nvidia open source kernel modules if driver version is higher than 555 Motivation: 1. Nvidia themselves will be using the open source kernel modules by default for drivers above version 555 and for boards that support it (like the one in this laptop) 2. this fixes kernel panics I've been having for months --- asus/fx506hm/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/asus/fx506hm/default.nix b/asus/fx506hm/default.nix index 115882be..a50ffdf4 100644 --- a/asus/fx506hm/default.nix +++ b/asus/fx506hm/default.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ config, lib, ... }: { imports = @@ -14,6 +14,7 @@ hardware.nvidia = { modesetting.enable = lib.mkDefault true; + open = lib.mkIf (lib.versionAtLeast config.hardware.nvidia.package.version "555") true; prime = { From dfe45103b691b66a9f5b22cbec99d32ee31e0a52 Mon Sep 17 00:00:00 2001 From: Andre Date: Tue, 30 Jul 2024 20:08:35 -0400 Subject: [PATCH 0963/1476] lenovo/legion/16arha7: fix kernel check for speaker patch --- lenovo/legion/16arha7/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lenovo/legion/16arha7/default.nix b/lenovo/legion/16arha7/default.nix index 36b10ee7..8c258d58 100644 --- a/lenovo/legion/16arha7/default.nix +++ b/lenovo/legion/16arha7/default.nix @@ -14,8 +14,8 @@ in ../../../common/pc/laptop/ssd ]; - # Kernel 6.9 includes the speaker fix, so only install this on systems with older kernels. - boot.extraModulePackages = lib.mkIf (!(lib.versionOlder config.boot.kernelPackages.kernel.version "6.9")) [ lenovo-speaker-fix ]; + # Kernel 6.10 includes the speaker fix, so only install this on systems with older kernels. + boot.extraModulePackages = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.10") [ lenovo-speaker-fix ]; # √(2560² + 1600²) px / 16 in ≃ 189 dpi services.xserver.dpi = 189; From ddebede97439b73e1ba746c0ce68b999bcbb49c0 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 30 Jul 2024 16:54:07 +1200 Subject: [PATCH 0964/1476] On ASUS Zephyrus GA402X, make enabling auto-suspend on the keyboard optional - On kernels before 6.9.x, default to disabling auto-suspend - On more-recent kernels, default to enabling auto-suspend --- asus/zephyrus/ga402x/shared.nix | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix index 5049d6ed..d4ca3fa0 100644 --- a/asus/zephyrus/ga402x/shared.nix +++ b/asus/zephyrus/ga402x/shared.nix @@ -5,7 +5,11 @@ }: let - inherit (lib) mkDefault mkIf mkMerge version versionOlder; + inherit (lib) mkDefault mkEnableOption mkIf mkMerge version versionAtLeast versionOlder; + + cfg = config.hardware.asus.zephyrus.ga402x; + defaultAutosuspendEnable = if (versionAtLeast version "6.9") then true else false; + in { imports = [ @@ -18,6 +22,16 @@ in { ../../../common/pc/ssd ]; + options.hardware.asus.zephyrus.ga402x = { + # Kernels earlier than 6.9 (possibly even earlier) tend to take 1-2 key-presses + # to wake-up the internal keyboard after suspending (the ASUS N-KEY USB Device). + # + # Therefore, this option disables suspend for the keyboard by default, but + # enables it for kernel 6.9.x onwards. + keyboard.autosuspend.enable = (mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Zephyrus GA402X" + ) // { default = defaultAutosuspendEnable; }; + }; + config = mkMerge [ { # Configure basic system settings: @@ -43,15 +57,20 @@ in { evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* KEYBOARD_KEY_ff31007c=f20 ''; - extraRules = '' - # Disable auto-suspend for the ASUS N-KEY Device, i.e. USB Keyboard - # Otherwise, it will tend to take 1-2 key-presses to wake-up after suspending - ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1" - ''; }; }; } + (mkIf (! cfg.keyboard.autosuspend.enable) { + services.udev = { + extraRules = '' + # Disable auto-suspend for the ASUS N-KEY Device, i.e. USB Keyboard + # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after suspending + ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1" + ''; + }; + }) + (mkIf (versionOlder version "23.11") { # See https://asus-linux.org/wiki/nixos/ for info about some problems # detecting the dGPU: From d1966ef874040b83d654ab9c896430f3017a9ec1 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 30 Jul 2024 18:34:02 +1200 Subject: [PATCH 0965/1476] Clarify doc-comments --- asus/zephyrus/ga402x/shared.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix index d4ca3fa0..2d543ffa 100644 --- a/asus/zephyrus/ga402x/shared.nix +++ b/asus/zephyrus/ga402x/shared.nix @@ -24,10 +24,11 @@ in { options.hardware.asus.zephyrus.ga402x = { # Kernels earlier than 6.9 (possibly even earlier) tend to take 1-2 key-presses - # to wake-up the internal keyboard after suspending (the ASUS N-KEY USB Device). - # - # Therefore, this option disables suspend for the keyboard by default, but + # to wake-up the internal keyboard after the device is suspended. + # Therefore, this option disables auto-suspend for the keyboard by default, but # enables it for kernel 6.9.x onwards. + # + # Note: the device name is "ASUS N-KEY Device". keyboard.autosuspend.enable = (mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Zephyrus GA402X" ) // { default = defaultAutosuspendEnable; }; }; @@ -65,7 +66,7 @@ in { services.udev = { extraRules = '' # Disable auto-suspend for the ASUS N-KEY Device, i.e. USB Keyboard - # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after suspending + # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after the device suspends ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1" ''; }; From 6f38f8576c0dd1cc76f158e56793323f9c7df773 Mon Sep 17 00:00:00 2001 From: mexisme Date: Fri, 9 Aug 2024 23:03:22 +1200 Subject: [PATCH 0966/1476] Test the kernel version, rather than the NixOS release version Co-authored-by: Peder Bergebakken Sundt --- asus/zephyrus/ga402x/shared.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix index 2d543ffa..78f5d583 100644 --- a/asus/zephyrus/ga402x/shared.nix +++ b/asus/zephyrus/ga402x/shared.nix @@ -8,7 +8,7 @@ let inherit (lib) mkDefault mkEnableOption mkIf mkMerge version versionAtLeast versionOlder; cfg = config.hardware.asus.zephyrus.ga402x; - defaultAutosuspendEnable = if (versionAtLeast version "6.9") then true else false; + defaultAutosuspendEnable = versionAtLeast config.boot.kernelPackages.kernel.version "6.9"; in { From 569b23fd8271ec562652295bf67e7378cca6570e Mon Sep 17 00:00:00 2001 From: mexisme Date: Fri, 9 Aug 2024 23:59:14 +1200 Subject: [PATCH 0967/1476] Simplify the diff, by moving the (mkIf ...) for the keyboard.autosuspend.enable option to within the associated services.udev.extraRules attr-set --- asus/zephyrus/ga402x/shared.nix | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix index 78f5d583..a45c2414 100644 --- a/asus/zephyrus/ga402x/shared.nix +++ b/asus/zephyrus/ga402x/shared.nix @@ -29,7 +29,8 @@ in { # enables it for kernel 6.9.x onwards. # # Note: the device name is "ASUS N-KEY Device". - keyboard.autosuspend.enable = (mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Zephyrus GA402X" + keyboard.autosuspend.enable = ( + mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Zephyrus GA402X" ) // { default = defaultAutosuspendEnable; }; }; @@ -58,19 +59,14 @@ in { evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* KEYBOARD_KEY_ff31007c=f20 ''; - }; - }; - } - - (mkIf (! cfg.keyboard.autosuspend.enable) { - services.udev = { - extraRules = '' + extraRules = mkIf (! cfg.keyboard.autosuspend.enable) '' # Disable auto-suspend for the ASUS N-KEY Device, i.e. USB Keyboard # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after the device suspends ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1" ''; + }; }; - }) + } (mkIf (versionOlder version "23.11") { # See https://asus-linux.org/wiki/nixos/ for info about some problems From c54cf53e022b0b3c1d3b8207aa0f9b194c24f0cf Mon Sep 17 00:00:00 2001 From: mexisme Date: Sat, 10 Aug 2024 00:08:54 +1200 Subject: [PATCH 0968/1476] Tidy-up idents --- asus/zephyrus/ga402x/shared.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix index a45c2414..91739baa 100644 --- a/asus/zephyrus/ga402x/shared.nix +++ b/asus/zephyrus/ga402x/shared.nix @@ -59,11 +59,11 @@ in { evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* KEYBOARD_KEY_ff31007c=f20 ''; - extraRules = mkIf (! cfg.keyboard.autosuspend.enable) '' - # Disable auto-suspend for the ASUS N-KEY Device, i.e. USB Keyboard - # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after the device suspends - ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1" - ''; + extraRules = mkIf (! cfg.keyboard.autosuspend.enable) '' + # Disable auto-suspend for the ASUS N-KEY Device, i.e. USB Keyboard + # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after the device suspends + ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1" + ''; }; }; } From 04a366f28cd492eda94d07fcf67b3cc99f4ef6cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 19 Aug 2024 09:56:10 +0200 Subject: [PATCH 0969/1476] fix ci and make it reproducible --- .github/workflows/test.yml | 10 +--- tests/build-profile.nix | 2 +- tests/flake.lock | 81 +++++++++++++++++++++++++++++++ tests/flake.nix | 97 ++++++++++++++++++++++++++++++++++++++ tests/run.py | 85 +++++++++------------------------ 5 files changed, 201 insertions(+), 74 deletions(-) create mode 100644 tests/flake.lock create mode 100644 tests/flake.nix diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9d1999e3..f27ceed4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,15 +7,7 @@ on: jobs: tests: runs-on: ubuntu-latest - strategy: - matrix: - # when updating channels, also update .mergify.yml - channel: [ nixos-unstable, nixos-24.05 ] steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@V27 - with: - nix_path: nixpkgs=channel:${{ matrix.channel }} - - name: Show nixpkgs version - run: nix-instantiate --eval -E '(import {}).lib.version' - - run: ./tests/run.py + - run: nix run ./tests#run . diff --git a/tests/build-profile.nix b/tests/build-profile.nix index e4e1cdb2..aa3714ab 100644 --- a/tests/build-profile.nix +++ b/tests/build-profile.nix @@ -1,4 +1,4 @@ -{ profile, pkgs }: +{ pkgs, profile }: (pkgs.nixos [ profile diff --git a/tests/flake.lock b/tests/flake.lock new file mode 100644 index 00000000..4fdd2f91 --- /dev/null +++ b/tests/flake.lock @@ -0,0 +1,81 @@ +{ + "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixos-unstable-small" + ] + }, + "locked": { + "lastModified": 1722555600, + "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "nixos-hardware": { + "locked": { + "lastModified": 1723310128, + "narHash": "sha256-IiH8jG6PpR4h9TxSGMYh+2/gQiJW9MwehFvheSb5rPc=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "c54cf53e022b0b3c1d3b8207aa0f9b194c24f0cf", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixos-hardware", + "type": "github" + } + }, + "nixos-stable": { + "locked": { + "lastModified": 1723938990, + "narHash": "sha256-9tUadhnZQbWIiYVXH8ncfGXGvkNq3Hag4RCBEMUk7MI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c42fcfbdfeae23e68fc520f9182dde9f38ad1890", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixos-unstable-small": { + "locked": { + "lastModified": 1723999580, + "narHash": "sha256-mVAwJQkqcVS+BU9i2YqDz61YQt/q0KRPz8vetezs7ZE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7bae0943064987c775f857b698522ff2db2df292", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "nixos-hardware": "nixos-hardware", + "nixos-stable": "nixos-stable", + "nixos-unstable-small": "nixos-unstable-small" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/tests/flake.nix b/tests/flake.nix new file mode 100644 index 00000000..a00f0f24 --- /dev/null +++ b/tests/flake.nix @@ -0,0 +1,97 @@ +{ + description = "Test flake for nixos-hardware"; + + inputs = { + nixos-unstable-small.url = "github:NixOS/nixpkgs/nixos-unstable-small"; + nixos-stable.url = "github:NixOS/nixpkgs/nixos-24.05"; + # override in the test + nixos-hardware.url = "github:NixOS/nixos-hardware"; + flake-parts.url = "github:hercules-ci/flake-parts"; + flake-parts.inputs.nixpkgs-lib.follows = "nixos-unstable-small"; + }; + + outputs = + inputs@{ flake-parts, ... }: + flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ + "aarch64-linux" + "x86_64-linux" + "riscv64-linux" + ]; + perSystem = + { + system, + lib, + pkgs, + inputs', + ... + }: + let + blackList = [ + # does import-from-derivation + "toshiba-swanky" + # uses custom nixpkgs config + "raspberry-pi-2" + + # deprecated profiles + "framework" + "asus-zephyrus-ga402x" + "lenovo-yoga-7-14ARH7" + ]; + + # There are more, but for those we need to force it. + # In future we should probably already define it in our module. + aarch64Systems = [ + "raspberry-pi-3" + "raspberry-pi-4" + "raspberry-pi-5" + ]; + + matchArch = + moduleName: + if builtins.elem moduleName aarch64Systems then + pkgs.hostPlatform.system == "aarch64-linux" + else + # TODO also add riscv64 + pkgs.hostPlatform.system == "x86_64-linux"; + + modules = lib.filterAttrs ( + name: _: !(builtins.elem name blackList || lib.hasPrefix "common-" name) && matchArch name + ) inputs.nixos-hardware.nixosModules; + buildProfile = import ./build-profile.nix; + + unfreeNixpkgs = + importPath: + import inputs.nixos-unstable-small { + config = { + allowBroken = true; + allowUnfree = true; + nvidia.acceptLicense = true; + }; + overlays = [ ]; + inherit system; + }; + nixpkgsUnstable = unfreeNixpkgs inputs'.nixos-unstable-small; + nixpkgsStable = unfreeNixpkgs inputs.nixos-stable; + + checksForNixpkgs = + channel: nixpkgs: + lib.mapAttrs' ( + name: module: + lib.nameValuePair "${channel}-${name}" (buildProfile { + pkgs = nixpkgs; + profile = module; + }) + ) modules; + in + { + _module.args.pkgs = nixpkgsUnstable; + checks = checksForNixpkgs "nixos-unstable" nixpkgsUnstable // checksForNixpkgs "nixos-stable" nixpkgsStable; + packages.run = pkgs.writeShellScriptBin "run.py" '' + #!${pkgs.bash}/bin/bash + export PATH=${lib.makeBinPath [ pkgs.nix-eval-jobs pkgs.nix-eval-jobs.nix ]} + exec ${pkgs.python3.interpreter} ${./.}/run.py --nixos-hardware "$@" + ''; + }; + }; +} diff --git a/tests/run.py b/tests/run.py index 6668b4e6..7e03532f 100755 --- a/tests/run.py +++ b/tests/run.py @@ -1,16 +1,14 @@ -#!/usr/bin/env nix-shell -#!nix-shell --quiet -p nix-eval-jobs -p nix -p python3 -i python +#!/usr/bin/env python3 import argparse import json import multiprocessing import re +import shlex import subprocess import sys -import textwrap from pathlib import Path from tempfile import TemporaryDirectory -from typing import IO TEST_ROOT = Path(__file__).resolve().parent ROOT = TEST_ROOT.parent @@ -22,15 +20,6 @@ RESET = "\033[0m" re_nixos_hardware = re.compile(r"]+)>") -def parse_readme() -> list[str]: - profiles = set() - with ROOT.joinpath("README.md").open() as f: - for line in f: - if (m := re_nixos_hardware.search(line)) is not None: - profiles.add(m.group(1).strip()) - return list(profiles) - - def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser(description="Run hardware tests") parser.add_argument( @@ -45,68 +34,39 @@ def parse_args() -> argparse.Namespace: action="store_true", help="Print evaluation commands executed", ) - parser.add_argument("profiles", nargs="*") + parser.add_argument( + "--nixos-hardware", + help="Print evaluation commands executed", + ) return parser.parse_args() -def write_eval_test(f: IO[str], profiles: list[str]) -> None: - build_profile = TEST_ROOT.joinpath("build-profile.nix") - f.write( - textwrap.dedent( - f""" - let - purePkgs = system: import {{ - config = {{ - allowBroken = true; - allowUnfree = true; - nvidia.acceptLicense = true; - }}; - overlays = []; - inherit system; - }}; - pkgs.x86_64-linux = purePkgs "x86_64-linux"; - pkgs.aarch64-linux = purePkgs "aarch64-linux"; - buildProfile = import {build_profile}; - in - """ - ) - ) - f.write("{\n") - for profile in profiles: - # does import-from-derivation - if profile == "toshiba/swanky": - continue - # uses custom nixpkgs config - if profile == "raspberry-pi/2": - continue - - system = "x86_64-linux" - if profile in ("raspberry-pi/3", "raspberry-pi/4", "raspberry-pi/5"): - system = "aarch64-linux" - - f.write( - f' "{profile}" = buildProfile {{ profile = import {ROOT}/{profile}; pkgs = pkgs.{system}; }};\n' - ) - f.write("}\n") - - -def run_eval_test(eval_test: Path, gcroot_dir: Path, jobs: int) -> list[str]: +def run_eval_test(nixos_hardware: str, gcroot_dir: Path, jobs: int) -> list[str]: failed_profiles = [] cmd = [ "nix-eval-jobs", + "--extra-experimental-features", + "flakes", + "--override-input", + "nixos-hardware", + nixos_hardware, "--gc-roots-dir", - gcroot_dir, + str(gcroot_dir), "--max-memory-size", "2048", "--workers", str(jobs), - str(eval_test), + "--flake", + str(TEST_ROOT) + "#checks", + "--force-recurse", ] + print(" ".join(map(shlex.quote,cmd))) proc = subprocess.Popen( cmd, stdout=subprocess.PIPE, text=True, ) + with proc as p: assert p.stdout is not None for line in p.stdout: @@ -123,20 +83,17 @@ def run_eval_test(eval_test: Path, gcroot_dir: Path, jobs: int) -> list[str]: def main() -> None: args = parse_args() - profiles = parse_readme() if len(args.profiles) == 0 else args.profiles failed_profiles = [] + with TemporaryDirectory() as tmpdir: - eval_test = Path(tmpdir) / "eval-test.nix" gcroot_dir = Path(tmpdir) / "gcroot" - with eval_test.open("w") as f: - write_eval_test(f, profiles) - failed_profiles = run_eval_test(eval_test, gcroot_dir, args.jobs) + failed_profiles = run_eval_test(args.nixos_hardware, gcroot_dir, args.jobs) if len(failed_profiles) > 0: print(f"\n{RED}The following {len(failed_profiles)} test(s) failed:{RESET}") for profile in failed_profiles: - print(f"{sys.argv[0]} '{profile}'") + print(f" '{profile}'") sys.exit(1) From 15c8c47fe2a5f6c72f8327ed6a43c99e4a924d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 19 Aug 2024 10:12:00 +0200 Subject: [PATCH 0970/1476] kobol/helios4: fix eval --- kobol/helios4/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kobol/helios4/default.nix b/kobol/helios4/default.nix index 532a7577..5b4207fe 100644 --- a/kobol/helios4/default.nix +++ b/kobol/helios4/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: let linux_5_15_helios4 = pkgs.linux_5_15.override { kernelPatches = [ @@ -26,8 +26,8 @@ let ]; defconfig = "mvebu_v7_defconfig"; # Make the kernel build a bit faster by disabling GPU modules, which we don't need anyways - structuredExtraConfig = with pkgs.lib.kernel; { - DRM = no; + structuredExtraConfig = { + DRM = lib.mkForce pkgs.lib.kernel.no; }; }; in From a3efd46620a6b9f60a82b66f22c1c363223d60d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 19 Aug 2024 09:57:39 +0200 Subject: [PATCH 0971/1476] apple/imac/18-2: fix gpu import path --- apple/imac/18-2/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apple/imac/18-2/default.nix b/apple/imac/18-2/default.nix index fbbfebaa..f44a8fc0 100644 --- a/apple/imac/18-2/default.nix +++ b/apple/imac/18-2/default.nix @@ -6,7 +6,7 @@ }: { imports = [ ../. - ../../../common/cpu/intel/kaby-lake + ../../../common/gpu/intel/kaby-lake ../../../common/gpu/intel ../../../common/gpu/amd ../../../common/hidpi.nix @@ -14,16 +14,16 @@ ../../../common/pc/laptop/acpi_call.nix ]; - # apple smc (TODO: check spi) + # apple smc (TODO: check spi) boot = { initrd.kernelModules = ["applespi" "spi_pxa2xx_platform" "intel_lpss_pci" "applesmc" ]; kernelParams = [ "intel_iommu=on" ]; kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest; }; - # Wifi, CPU Microcode FW updates + # Wifi, CPU Microcode FW updates networking.enableB43Firmware = lib.mkDefault true; - hardware = { + hardware = { enableRedistributableFirmware = lib.mkDefault true; cpu.intel.updateMicrocode = lib.mkDefault true; }; From 70e7e3fa140d55efc43e78379ae09d8872d8dc7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 19 Aug 2024 09:56:10 +0200 Subject: [PATCH 0972/1476] update mergify --- .mergify.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index dc3bf775..45ffb1e9 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,8 +1,7 @@ queue_rules: - name: default merge_conditions: - - check-success=tests (nixos-24.05) - - check-success=tests (nixos-unstable) + - check-success=tests defaults: actions: queue: From b887ec296a95682e689a36065ae64c24d999d843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20N=C3=BCtzi?= Date: Sat, 17 Aug 2024 13:05:28 +0200 Subject: [PATCH 0973/1476] fix: update fix to a closer version which fixes this --- tuxedo/pulse/14/gen3/README.md | 4 ++-- tuxedo/pulse/14/gen3/default.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tuxedo/pulse/14/gen3/README.md b/tuxedo/pulse/14/gen3/README.md index e419ae4f..dbbd7831 100644 --- a/tuxedo/pulse/14/gen3/README.md +++ b/tuxedo/pulse/14/gen3/README.md @@ -11,5 +11,5 @@ Gen3](https://www.tuxedocomputers.com/en/TUXEDO-Pulse-14-Gen3). ### Shutdown and Power Issues With the Linux Kernel version `6.6.33` (NixOS 24.05) there are shutdown issues resulting in the battery not turning off -completely. Apparently a newer Kernel (tested with `6.8.12`) fixes this (the exact version where this problem is fixed is unknown). -This `default.nix` will upgrade to the `pkgs.linuxPackages_latest` if the kernel is older than `6.8.12`. +completely. Apparently a newer Kernel (tested with `6.6.35`) fixes this (the exact version where this problem is fixed is unknown). +This `default.nix` will upgrade to the `pkgs.linuxPackages_latest` if the kernel is older than `6.6.35`. diff --git a/tuxedo/pulse/14/gen3/default.nix b/tuxedo/pulse/14/gen3/default.nix index fb4aa24c..34cca9ab 100644 --- a/tuxedo/pulse/14/gen3/default.nix +++ b/tuxedo/pulse/14/gen3/default.nix @@ -14,9 +14,9 @@ # Fixing a power-issue with older kernels. # When powered off, the battery does not turn off completely. - # Kernel 6.8.12 fixes this, + # Kernel 6.6.35 apparently does not have this issue, # the exact version is still unknown which fixed this. - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.8.12") ( + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6.35") ( if (config.boot.zfs.enabled) then pkgs.zfs.latestCompatibleLinuxPackages else pkgs.linuxPackages_latest From 15c3e00913f854e9a1e7d2df522fc5c00495e04c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 19 Aug 2024 13:10:42 +0200 Subject: [PATCH 0974/1476] mergify: merge in batches of 5 --- .mergify.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index 45ffb1e9..af16ff54 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -2,10 +2,8 @@ queue_rules: - name: default merge_conditions: - check-success=tests -defaults: - actions: - queue: - merge_method: rebase + batch_size: 5 + merge_method: rebase pull_request_rules: - name: merge using the merge queue conditions: From feefc78fbc4b205485eda0c1d9202c8f9288778a Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Thu, 15 Aug 2024 21:16:45 +0200 Subject: [PATCH 0975/1476] surface: linux 6.10.3 -> 6.10.5 --- microsoft/surface/common/kernel/linux-6.10.x/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-6.10.x/default.nix b/microsoft/surface/common/kernel/linux-6.10.x/default.nix index 5d6f7a64..484e1621 100644 --- a/microsoft/surface/common/kernel/linux-6.10.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.10.x/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.10.3"; + version = "6.10.5"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "1666dypfg193l5460maadki4hc291hr7k9fw74nq21fxczyj4pzs"; + sha256 = "02yckkh6sxvcrwzbqgmw4jhqhxmbvz87xn9wm6bwwka3w2r9x41h"; ignoreConfigErrors=true; }; From b09c46430ffcf18d575acf5c339b38ac4e1db5d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Skyler=20M=C3=A4ntysaari?= Date: Thu, 15 Aug 2024 11:22:38 +0300 Subject: [PATCH 0976/1476] Add Dell Latitude 5490 --- dell/latitude/5490/README.md | 35 ++++++++++++++++++++++++++++++++++ dell/latitude/5490/default.nix | 21 ++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 dell/latitude/5490/README.md create mode 100644 dell/latitude/5490/default.nix diff --git a/dell/latitude/5490/README.md b/dell/latitude/5490/README.md new file mode 100644 index 00000000..2d8f7124 --- /dev/null +++ b/dell/latitude/5490/README.md @@ -0,0 +1,35 @@ +# Dell Latitude 5490 + +CPU: Intel(R) Core(TM) i5-8350U @ 1.70GHz +GPU: Intel UHD Graphics 620 + +Ports: +- HDMI, VGA +- 1 x USB-C +- MicroSD-card reader +- Combo Audio jack +- 3 x USB-A +- SIM-card slot + + +```shellsession +$ lspci -nn +00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:5914] (rev 08) +00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 620 [8086:5917] (rev 07) +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 08) +00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:9d2f] (rev 21) +00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Thermal subsystem [8086:9d31] (rev 21) +00:15.0 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 [8086:9d60] (rev 21) +00:15.1 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 [8086:9d61] (rev 21) +00:16.0 Communication controller [0780]: Intel Corporation Sunrise Point-LP CSME HECI #1 [8086:9d3a] (rev 21) +00:17.0 RAID bus controller [0104]: Intel Corporation 82801 Mobile SATA Controller [RAID mode] [8086:282a] (rev 21) +00:1c.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 [8086:9d10] (rev f1) +00:1c.2 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #3 [8086:9d12] (rev f1) +00:1f.0 ISA bridge [0601]: Intel Corporation Sunrise Point LPC/eSPI Controller [8086:9d4e] (rev 21) +00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-LP PMC [8086:9d21] (rev 21) +00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21) +00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-LP SMBus [8086:9d23] (rev 21) +00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (4) I219-LM [8086:15d7] (rev 21) +01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader [10ec:525a] (rev 01) +02:00.0 Network controller [0280]: Intel Corporation Wireless 8265 / 8275 [8086:24fd] (rev 78) +``` diff --git a/dell/latitude/5490/default.nix b/dell/latitude/5490/default.nix new file mode 100644 index 00000000..6cda5680 --- /dev/null +++ b/dell/latitude/5490/default.nix @@ -0,0 +1,21 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + # Important Firmware + hardware.enableRedistributableFirmware = lib.mkDefault true; + + boot = { + # Kernel Panic on suspend fix, taken from ArchLinux wiki. + kernelParams = "acpi_enforce_resources=lax i915.enable_dc=0"; + # Audio Mute LED + extraModprobeConfig = '' + options snd-hda-intel model=mute-led-gpio + ''; + }; +} From 83dfb513067529148cec3ce406b0583484d2056d Mon Sep 17 00:00:00 2001 From: jaredmontoya <49511278+jaredmontoya@users.noreply.github.com> Date: Sat, 24 Aug 2024 00:59:43 +0200 Subject: [PATCH 0977/1476] fix: intelgpu.loadInInitrd now does something --- common/gpu/intel/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index 54f4eec7..bc732cc2 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -16,14 +16,15 @@ }; options.hardware.intelgpu.loadInInitrd = - lib.mkEnableOption - "Load the Intel GPU kernel module at stage 1 boot. (Added to `boot.initrd.kernelModules`)" + lib.mkEnableOption "Load the Intel GPU kernel module at stage 1 boot. (Added to `boot.initrd.kernelModules`)" // { default = true; }; config = { - boot.initrd.kernelModules = [ config.hardware.intelgpu.driver ]; + boot.initrd.kernelModules = lib.optionals config.hardware.intelgpu.loadInInitrd [ + config.hardware.intelgpu.driver + ]; environment.variables = { VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl"); From 59bcb4c4e19bf4edfa95a14a58776a67d0171ce0 Mon Sep 17 00:00:00 2001 From: Olli Helenius Date: Sun, 4 Aug 2024 12:04:22 +0300 Subject: [PATCH 0978/1476] lenovo/p14s/intel: init with gen3 --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/p14s/intel/default.nix | 8 ++++++++ lenovo/thinkpad/p14s/intel/gen3/default.nix | 17 +++++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 lenovo/thinkpad/p14s/intel/default.nix create mode 100644 lenovo/thinkpad/p14s/intel/gen3/default.nix diff --git a/README.md b/README.md index 1992563a..9df72d7a 100644 --- a/README.md +++ b/README.md @@ -212,6 +212,7 @@ See code for all available configurations. | [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | | [Lenovo ThinkPad P14s AMD Gen 3](lenovo/thinkpad/p14s/amd/gen3) | `` | | [Lenovo ThinkPad P14s AMD Gen 4](lenovo/thinkpad/p14s/amd/gen4) | `` | +| [Lenovo ThinkPad P14s Intel Gen 3](lenovo/thinkpad/p14s/intel/gen3) | `` | | [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | | [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | | [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | diff --git a/flake.nix b/flake.nix index 0be72458..7ff974a4 100644 --- a/flake.nix +++ b/flake.nix @@ -151,6 +151,7 @@ lenovo-thinkpad-p14s-amd-gen2 = import ./lenovo/thinkpad/p14s/amd/gen2; lenovo-thinkpad-p14s-amd-gen3 = import ./lenovo/thinkpad/p14s/amd/gen3; lenovo-thinkpad-p14s-amd-gen4 = import ./lenovo/thinkpad/p14s/amd/gen4; + lenovo-thinkpad-p14s-intel-gen3 = import ./lenovo/thinkpad/p14s/intel/gen3; lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1; lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50; lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51; diff --git a/lenovo/thinkpad/p14s/intel/default.nix b/lenovo/thinkpad/p14s/intel/default.nix new file mode 100644 index 00000000..f6eae321 --- /dev/null +++ b/lenovo/thinkpad/p14s/intel/default.nix @@ -0,0 +1,8 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../../common/cpu/intel + ]; +} diff --git a/lenovo/thinkpad/p14s/intel/gen3/default.nix b/lenovo/thinkpad/p14s/intel/gen3/default.nix new file mode 100644 index 00000000..4c736113 --- /dev/null +++ b/lenovo/thinkpad/p14s/intel/gen3/default.nix @@ -0,0 +1,17 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../../../common/gpu/nvidia/prime.nix + ]; + + hardware = { + intelgpu.driver = "xe"; + + nvidia.prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:3:0:0"; + }; + }; +} From d3600fc29620a5fba432f3180ca9c7a84e3f8889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20=C8=98erb=C4=83nescu?= Date: Fri, 23 Aug 2024 18:17:51 +0200 Subject: [PATCH 0979/1476] xps13-9380: enable fwupd --- dell/xps/13-9380/README.wiki | 8 +------- dell/xps/13-9380/default.nix | 3 +++ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/dell/xps/13-9380/README.wiki b/dell/xps/13-9380/README.wiki index c5ad61e3..763c37ca 100644 --- a/dell/xps/13-9380/README.wiki +++ b/dell/xps/13-9380/README.wiki @@ -3,13 +3,7 @@ == 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 firmware upgrades use fwupdmgr to perform updates. == Battery drain when sleeping == diff --git a/dell/xps/13-9380/default.nix b/dell/xps/13-9380/default.nix index 5d74103b..b710ce8a 100644 --- a/dell/xps/13-9380/default.nix +++ b/dell/xps/13-9380/default.nix @@ -11,6 +11,9 @@ # touchpad goes over i2c boot.blacklistedKernelModules = [ "psmouse" ]; + # Allows for updating firmware via `fwupdmgr`. + services.fwupd.enable = true; + # This will save you money and possibly your life! services.thermald.enable = true; } From 1c84c314db42dd40ed6cf9293b9451ec2e7ebee4 Mon Sep 17 00:00:00 2001 From: 4JX <79868816+4JX@users.noreply.github.com> Date: Mon, 5 Aug 2024 01:27:42 +0200 Subject: [PATCH 0980/1476] 16ach6h: Use the hardware.display module --- lenovo/legion/16ach6h/edid/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lenovo/legion/16ach6h/edid/default.nix b/lenovo/legion/16ach6h/edid/default.nix index 5e7d50fb..481d1f5c 100644 --- a/lenovo/legion/16ach6h/edid/default.nix +++ b/lenovo/legion/16ach6h/edid/default.nix @@ -8,10 +8,16 @@ let ''; in { - hardware.firmware = [ chip_edid ]; + hardware.display = { + edid.packages = [ chip_edid ]; + + outputs = { + # For some reason, the internal display is sometimes eDP-1, and sometimes it's eDP-2 + "eDP-1".edid = "16ach6h.bin"; + "eDP-2".edid = "16ach6h.bin"; + }; + }; - # For some reason, the internal display is sometimes eDP-1, and sometimes it's eDP-2 - boot.kernelParams = [ "drm.edid_firmware=eDP-1:edid/16ach6h.bin,eDP-2:edid/16ach6h.bin" ]; # This fails at the moment, https://github.com/NixOS/nixos-hardware/issues/795 # Extra refresh rates seem to work regardless From 9fc19be21f0807d6be092d70bf0b1de0c00ac895 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Sun, 25 Aug 2024 10:35:53 +0200 Subject: [PATCH 0981/1476] doc: add missing Apple iMac entry --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9df72d7a..32e67209 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ See code for all available configurations. |------------------------------------------------------------------------|---------------------------------------------------------| | [Acer Aspire 4810T](acer/aspire/4810t) | `` | | [Airis N990](airis/n990) | `` | +| [Apple iMac 18.2](apple/imac/18-2) | `` | | [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | | [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | | [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | From c4e1b82a91c7b1b4c74aa39c573ddbf31a49d3e9 Mon Sep 17 00:00:00 2001 From: Luna Date: Tue, 27 Aug 2024 18:54:26 -0700 Subject: [PATCH 0982/1476] gpu/intel: cleanup vdpau variable --- common/gpu/intel/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index bc732cc2..83af6f2d 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -26,10 +26,6 @@ config.hardware.intelgpu.driver ]; - environment.variables = { - VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl"); - }; - hardware.graphics.extraPackages = with pkgs; [ ( if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then From 95c3dfe6ef2e96ddc1ccdd7194e3cda02ca9a8ef Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Mon, 26 Aug 2024 13:09:14 +0200 Subject: [PATCH 0983/1476] Apple iMac 14,2: init --- README.md | 1 + apple/imac/14-2/README.md | 61 +++++++++++++++++++++++++++++++++++++ apple/imac/14-2/default.nix | 37 ++++++++++++++++++++++ flake.nix | 3 +- 4 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 apple/imac/14-2/README.md create mode 100644 apple/imac/14-2/default.nix diff --git a/README.md b/README.md index 32e67209..1f51b115 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ See code for all available configurations. |------------------------------------------------------------------------|---------------------------------------------------------| | [Acer Aspire 4810T](acer/aspire/4810t) | `` | | [Airis N990](airis/n990) | `` | +| [Apple iMac 14.2](apple/imac/14-2) | `` | | [Apple iMac 18.2](apple/imac/18-2) | `` | | [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | | [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | diff --git a/apple/imac/14-2/README.md b/apple/imac/14-2/README.md new file mode 100644 index 00000000..3512750d --- /dev/null +++ b/apple/imac/14-2/README.md @@ -0,0 +1,61 @@ +# iMac 14,2, NixOS (nixos-unstable, September 2024) + +## Audio +- [x] ok + +## Bluetooth +- [x] ok + +## Thunderbolt +- [x] ok + +## SATA +- [x] ok + +## NVME +- [x] ok + +## Suspend/Resumer +- [x] ok + +## Wifi +- [x] ok + +## Graphics +- [x] Latest unsupported Nvidia drivers available are 390.157, working with Kernel 6.10.6. + +## LSPCI + +``` +❯ lspci +00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06) +00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06) +00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05) +00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04) +00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05) +00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5) +00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5) +00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d5) +00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d5) +00:1f.0 ISA bridge: Intel Corporation Z87 Express LPC Controller (rev 05) +00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05) +00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05) +01:00.0 VGA compatible controller: NVIDIA Corporation GK104M [GeForce GTX 775M Mac Edition] (rev a1) +01:00.1 Audio device: NVIDIA Corporation GK104 HDMI Audio Controller (rev a1) +02:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983 +03:00.0 Network controller: Broadcom Inc. and subsidiaries BCM4360 802.11ac Dual Band Wireless Network Adapter (rev 03) +04:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM57766 Gigabit Ethernet PCIe (rev 01) +04:00.1 SD Host controller: Broadcom Inc. and subsidiaries BCM57765/57785 SDXC/MMC Card Reader (rev 01) +05:00.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03) +06:00.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03) +06:03.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03) +06:04.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03) +06:05.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03) +06:06.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03) +07:00.0 System peripheral: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03) +``` + +## Links + +- https://support.apple.com/en-us/111970 +- https://everymac.com/ultimate-mac-lookup/?search_keywords=iMac14,2 diff --git a/apple/imac/14-2/default.nix b/apple/imac/14-2/default.nix new file mode 100644 index 00000000..e85e1725 --- /dev/null +++ b/apple/imac/14-2/default.nix @@ -0,0 +1,37 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + imports = [ + ../. + ../../../common/gpu/intel + ../../../common/gpu/nvidia + ../../../common/hidpi.nix + ]; + + boot = { + initrd.kernelModules = [ + "applesmc" + "applespi" + "intel_lpss_pci" + "spi_pxa2xx_platform" + "kvm-intel" + ]; + blacklistedKernelModules = [ + "b43" + "ssb" + "brcmfmac" + "brcmsmac" + "bcma" + ]; + kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest; + extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + }; + + hardware = { + bluetooth.enable = lib.mkDefault true; + }; +} diff --git a/flake.nix b/flake.nix index 7ff974a4..619d4b90 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,8 @@ in { acer-aspire-4810t = import ./acer/aspire/4810t; airis-n990 = import ./airis/n990; + apple-imac-14-2 = import ./apple/imac/14-2; + apple-imac-18-2 = import ./apple/imac/18-2; apple-macbook-air-3 = import ./apple/macbook-air/3; apple-macbook-air-4 = import ./apple/macbook-air/4; apple-macbook-air-6 = import ./apple/macbook-air/6; @@ -17,7 +19,6 @@ apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1; apple-macmini-4-1 = import ./apple/macmini/4; - apple-imac-18-2 = import ./apple/imac/18-2; apple-t2 = import ./apple/t2; asus-battery = import ./asus/battery.nix; asus-ally-rc71l = import ./asus/ally/rc71l; From 24bc1f98d8db75306bceb82cdb345a1189bc2064 Mon Sep 17 00:00:00 2001 From: Jdogzz Date: Tue, 3 Sep 2024 08:29:13 -0700 Subject: [PATCH 0984/1476] lenovo: fix unstable wifi on Yoga laptops Add extra modprobe options to fix unstable wifi on Yoga laptops. --- lenovo/yoga/6/13ALC6/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lenovo/yoga/6/13ALC6/default.nix b/lenovo/yoga/6/13ALC6/default.nix index 0acf508d..a0cf015e 100644 --- a/lenovo/yoga/6/13ALC6/default.nix +++ b/lenovo/yoga/6/13ALC6/default.nix @@ -14,5 +14,10 @@ # energy savings boot.kernelParams = ["mem_sleep_default=deep" "pcie_aspm.policy=powersupersave"]; + # Fix for unstable wifi connection on Lenovo laptops + boot.extraModprobeConfig = '' + options rtw89_pci disable_clkreq=y disable_aspm_l1=y disable_aspm_l1ss=y + ''; + hardware.bluetooth.enable = true; } From 4ac71504155c4ac80d2f37bc0401c9b3aa75fadb Mon Sep 17 00:00:00 2001 From: Bradley Nelson Date: Sat, 31 Aug 2024 16:40:11 -0600 Subject: [PATCH 0985/1476] feat: Add configurations for nvidia microarchitectures with configs for the open source drivers --- common/gpu/nvidia/ada-lovelace/default.nix | 10 ++++++++++ common/gpu/nvidia/ampere/default.nix | 10 ++++++++++ common/gpu/nvidia/maxwell/default.nix | 7 +++++++ common/gpu/nvidia/pascal/default.nix | 7 +++++++ common/gpu/nvidia/turing/default.nix | 10 ++++++++++ flake.nix | 5 +++++ 6 files changed, 49 insertions(+) create mode 100644 common/gpu/nvidia/ada-lovelace/default.nix create mode 100644 common/gpu/nvidia/ampere/default.nix create mode 100644 common/gpu/nvidia/maxwell/default.nix create mode 100644 common/gpu/nvidia/pascal/default.nix create mode 100644 common/gpu/nvidia/turing/default.nix diff --git a/common/gpu/nvidia/ada-lovelace/default.nix b/common/gpu/nvidia/ada-lovelace/default.nix new file mode 100644 index 00000000..9a065769 --- /dev/null +++ b/common/gpu/nvidia/ada-lovelace/default.nix @@ -0,0 +1,10 @@ +{lib, config, ...}: +let + nividiaPackage = config.hardware.nvidia.package; +in +{ + imports = [ ../. ]; + + # enable the opensorce drivers if the package supports it + hardware.nvidia.open = lib.mkDefault (nividiaPackage ? open && nividiaPackage ? firmware); +} diff --git a/common/gpu/nvidia/ampere/default.nix b/common/gpu/nvidia/ampere/default.nix new file mode 100644 index 00000000..9a065769 --- /dev/null +++ b/common/gpu/nvidia/ampere/default.nix @@ -0,0 +1,10 @@ +{lib, config, ...}: +let + nividiaPackage = config.hardware.nvidia.package; +in +{ + imports = [ ../. ]; + + # enable the opensorce drivers if the package supports it + hardware.nvidia.open = lib.mkDefault (nividiaPackage ? open && nividiaPackage ? firmware); +} diff --git a/common/gpu/nvidia/maxwell/default.nix b/common/gpu/nvidia/maxwell/default.nix new file mode 100644 index 00000000..89565090 --- /dev/null +++ b/common/gpu/nvidia/maxwell/default.nix @@ -0,0 +1,7 @@ +{lib, ...}: +{ + imports = [ ../. ]; + + # The open source driver does not support Maxwell GPUs. + hardware.nvidia.open = false; +} diff --git a/common/gpu/nvidia/pascal/default.nix b/common/gpu/nvidia/pascal/default.nix new file mode 100644 index 00000000..ad3555dc --- /dev/null +++ b/common/gpu/nvidia/pascal/default.nix @@ -0,0 +1,7 @@ +{lib, ...}: +{ + imports = [ ../. ]; + + # The open source driver does not support Pascal GPUs. + hardware.nvidia.open = false; +} diff --git a/common/gpu/nvidia/turing/default.nix b/common/gpu/nvidia/turing/default.nix new file mode 100644 index 00000000..9a065769 --- /dev/null +++ b/common/gpu/nvidia/turing/default.nix @@ -0,0 +1,10 @@ +{lib, config, ...}: +let + nividiaPackage = config.hardware.nvidia.package; +in +{ + imports = [ ../. ]; + + # enable the opensorce drivers if the package supports it + hardware.nvidia.open = lib.mkDefault (nividiaPackage ? open && nividiaPackage ? firmware); +} diff --git a/flake.nix b/flake.nix index 619d4b90..9b8d6ec8 100644 --- a/flake.nix +++ b/flake.nix @@ -295,6 +295,11 @@ common-gpu-nvidia-sync = import ./common/gpu/nvidia/prime-sync.nix; common-gpu-nvidia-nonprime = import ./common/gpu/nvidia; common-gpu-nvidia-disable = import ./common/gpu/nvidia/disable.nix; + common-gpu-nvidia-ada-lovelace = import ./common/gpu/nvidia/ada-lovelace; + common-gpu-nvidia-ampere = import ./common/gpu/nvidia/ampere; + common-gpu-nvidia-turing = import ./common/gpu/nvidia/turing; + common-gpu-nvidia-pascal = import ./common/gpu/nvidia/pascal; + common-gpu-nvidia-maxwell = import ./common/gpu/nvidia/maxwell; common-hidpi = import ./common/hidpi.nix; common-pc = import ./common/pc; common-pc-hdd = import ./common/pc/hdd; From 5cbf79226baf922b3a4b64edc46b642ca0e10fb7 Mon Sep 17 00:00:00 2001 From: Bradley Nelson Date: Sat, 31 Aug 2024 16:43:01 -0600 Subject: [PATCH 0986/1476] feat: Add support for NVIDIA microarchitecture to xps 7590 and 9570 --- dell/xps/15-7590/nvidia/default.nix | 3 ++- dell/xps/15-9570/nvidia/default.nix | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dell/xps/15-7590/nvidia/default.nix b/dell/xps/15-7590/nvidia/default.nix index a4130e85..78da989d 100644 --- a/dell/xps/15-7590/nvidia/default.nix +++ b/dell/xps/15-7590/nvidia/default.nix @@ -3,13 +3,14 @@ imports = [ ../. ../../../../common/gpu/nvidia/prime.nix + ../../../../common/gpu/nvidia/turing ]; hardware.nvidia = { powerManagement = { # Enable NVIDIA power management. enable = lib.mkDefault true; - + # Enable dynamic power management. finegrained = lib.mkDefault true; }; diff --git a/dell/xps/15-9570/nvidia/default.nix b/dell/xps/15-9570/nvidia/default.nix index e58fa581..430e0e90 100644 --- a/dell/xps/15-9570/nvidia/default.nix +++ b/dell/xps/15-9570/nvidia/default.nix @@ -4,6 +4,7 @@ imports = [ ../../../../common/cpu/intel ../../../../common/gpu/nvidia/prime.nix + ../../../../common/gpu/nvidia/pascal ../../../../common/pc/laptop ../xps-common.nix ]; From 04567f4ebcc9d4f90a7f527713ec7a3cd51e9cab Mon Sep 17 00:00:00 2001 From: Bradley Nelson Date: Sat, 31 Aug 2024 19:52:44 -0600 Subject: [PATCH 0987/1476] fix: Update NVIDIA GPU configurations to use mkOverride --- common/gpu/nvidia/ada-lovelace/default.nix | 2 +- common/gpu/nvidia/ampere/default.nix | 2 +- common/gpu/nvidia/turing/default.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/gpu/nvidia/ada-lovelace/default.nix b/common/gpu/nvidia/ada-lovelace/default.nix index 9a065769..a9223136 100644 --- a/common/gpu/nvidia/ada-lovelace/default.nix +++ b/common/gpu/nvidia/ada-lovelace/default.nix @@ -6,5 +6,5 @@ in imports = [ ../. ]; # enable the opensorce drivers if the package supports it - hardware.nvidia.open = lib.mkDefault (nividiaPackage ? open && nividiaPackage ? firmware); + hardware.nvidia.open = lib.mkOverride 990 (nividiaPackage ? open && nividiaPackage ? firmware); } diff --git a/common/gpu/nvidia/ampere/default.nix b/common/gpu/nvidia/ampere/default.nix index 9a065769..a9223136 100644 --- a/common/gpu/nvidia/ampere/default.nix +++ b/common/gpu/nvidia/ampere/default.nix @@ -6,5 +6,5 @@ in imports = [ ../. ]; # enable the opensorce drivers if the package supports it - hardware.nvidia.open = lib.mkDefault (nividiaPackage ? open && nividiaPackage ? firmware); + hardware.nvidia.open = lib.mkOverride 990 (nividiaPackage ? open && nividiaPackage ? firmware); } diff --git a/common/gpu/nvidia/turing/default.nix b/common/gpu/nvidia/turing/default.nix index 9a065769..a9223136 100644 --- a/common/gpu/nvidia/turing/default.nix +++ b/common/gpu/nvidia/turing/default.nix @@ -6,5 +6,5 @@ in imports = [ ../. ]; # enable the opensorce drivers if the package supports it - hardware.nvidia.open = lib.mkDefault (nividiaPackage ? open && nividiaPackage ? firmware); + hardware.nvidia.open = lib.mkOverride 990 (nividiaPackage ? open && nividiaPackage ? firmware); } From ca005ac1e8392f1da8bb06f64b84dfee226f543a Mon Sep 17 00:00:00 2001 From: Bradley Nelson Date: Sun, 1 Sep 2024 12:09:28 -0600 Subject: [PATCH 0988/1476] fix: spelling errors --- common/gpu/nvidia/ada-lovelace/default.nix | 2 +- common/gpu/nvidia/ampere/default.nix | 2 +- common/gpu/nvidia/turing/default.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/gpu/nvidia/ada-lovelace/default.nix b/common/gpu/nvidia/ada-lovelace/default.nix index a9223136..67b1b123 100644 --- a/common/gpu/nvidia/ada-lovelace/default.nix +++ b/common/gpu/nvidia/ada-lovelace/default.nix @@ -5,6 +5,6 @@ in { imports = [ ../. ]; - # enable the opensorce drivers if the package supports it + # enable the open source drivers if the package supports it hardware.nvidia.open = lib.mkOverride 990 (nividiaPackage ? open && nividiaPackage ? firmware); } diff --git a/common/gpu/nvidia/ampere/default.nix b/common/gpu/nvidia/ampere/default.nix index a9223136..67b1b123 100644 --- a/common/gpu/nvidia/ampere/default.nix +++ b/common/gpu/nvidia/ampere/default.nix @@ -5,6 +5,6 @@ in { imports = [ ../. ]; - # enable the opensorce drivers if the package supports it + # enable the open source drivers if the package supports it hardware.nvidia.open = lib.mkOverride 990 (nividiaPackage ? open && nividiaPackage ? firmware); } diff --git a/common/gpu/nvidia/turing/default.nix b/common/gpu/nvidia/turing/default.nix index a9223136..67b1b123 100644 --- a/common/gpu/nvidia/turing/default.nix +++ b/common/gpu/nvidia/turing/default.nix @@ -5,6 +5,6 @@ in { imports = [ ../. ]; - # enable the opensorce drivers if the package supports it + # enable the open source drivers if the package supports it hardware.nvidia.open = lib.mkOverride 990 (nividiaPackage ? open && nividiaPackage ? firmware); } From 366ddc33ff1b93d95ef3809d12ce0fba74c8d316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 3 Sep 2024 19:11:54 +0200 Subject: [PATCH 0989/1476] flake.nix: don't expose nvidia modules we don't want to increase the api further. --- flake.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/flake.nix b/flake.nix index 9b8d6ec8..619d4b90 100644 --- a/flake.nix +++ b/flake.nix @@ -295,11 +295,6 @@ common-gpu-nvidia-sync = import ./common/gpu/nvidia/prime-sync.nix; common-gpu-nvidia-nonprime = import ./common/gpu/nvidia; common-gpu-nvidia-disable = import ./common/gpu/nvidia/disable.nix; - common-gpu-nvidia-ada-lovelace = import ./common/gpu/nvidia/ada-lovelace; - common-gpu-nvidia-ampere = import ./common/gpu/nvidia/ampere; - common-gpu-nvidia-turing = import ./common/gpu/nvidia/turing; - common-gpu-nvidia-pascal = import ./common/gpu/nvidia/pascal; - common-gpu-nvidia-maxwell = import ./common/gpu/nvidia/maxwell; common-hidpi = import ./common/hidpi.nix; common-pc = import ./common/pc; common-pc-hdd = import ./common/pc/hdd; From 6d6022faac1c3d2995c3ca47fac0b5a29b2380ed Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 12:15:39 -0600 Subject: [PATCH 0990/1476] tests: Update flake.lock --- tests/flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/flake.lock b/tests/flake.lock index 4fdd2f91..bde17ccd 100644 --- a/tests/flake.lock +++ b/tests/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "lastModified": 1725234343, + "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1723310128, - "narHash": "sha256-IiH8jG6PpR4h9TxSGMYh+2/gQiJW9MwehFvheSb5rPc=", + "lastModified": 1725384549, + "narHash": "sha256-A9TMja7Ly70BOGcbcqJ0EUusQSFEQaKbrHJxNXfSFYY=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "c54cf53e022b0b3c1d3b8207aa0f9b194c24f0cf", + "rev": "366ddc33ff1b93d95ef3809d12ce0fba74c8d316", "type": "github" }, "original": { @@ -37,11 +37,11 @@ }, "nixos-stable": { "locked": { - "lastModified": 1723938990, - "narHash": "sha256-9tUadhnZQbWIiYVXH8ncfGXGvkNq3Hag4RCBEMUk7MI=", + "lastModified": 1725001927, + "narHash": "sha256-eV+63gK0Mp7ygCR0Oy4yIYSNcum2VQwnZamHxYTNi+M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c42fcfbdfeae23e68fc520f9182dde9f38ad1890", + "rev": "6e99f2a27d600612004fbd2c3282d614bfee6421", "type": "github" }, "original": { @@ -53,11 +53,11 @@ }, "nixos-unstable-small": { "locked": { - "lastModified": 1723999580, - "narHash": "sha256-mVAwJQkqcVS+BU9i2YqDz61YQt/q0KRPz8vetezs7ZE=", + "lastModified": 1725361206, + "narHash": "sha256-/HTUg+kMaqBPGrcQBYboAMsQHIWIkuKRDldss/035Hc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7bae0943064987c775f857b698522ff2db2df292", + "rev": "2830c7c930311397d94c0b86a359c865c081c875", "type": "github" }, "original": { From b1ee64a4eae363724f064a1e1536dd27a80c9e9b Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 12:16:12 -0600 Subject: [PATCH 0991/1476] dell-g3-3779: Add nvidia architecture --- dell/g3/3779/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/dell/g3/3779/default.nix b/dell/g3/3779/default.nix index 83216ebf..c9afd482 100644 --- a/dell/g3/3779/default.nix +++ b/dell/g3/3779/default.nix @@ -4,6 +4,7 @@ imports = [ ../../../common/cpu/intel ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/pascal ../../../common/pc/laptop ../../../common/pc/laptop/ssd ]; From 32979d223a3747f4a2683774db0d6cdfe6d1bf1a Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 12:16:31 -0600 Subject: [PATCH 0992/1476] dell-xps-15-9500: Add nvidia architecture --- dell/xps/15-9500/nvidia/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/dell/xps/15-9500/nvidia/default.nix b/dell/xps/15-9500/nvidia/default.nix index 257462a4..56d05cd5 100644 --- a/dell/xps/15-9500/nvidia/default.nix +++ b/dell/xps/15-9500/nvidia/default.nix @@ -3,6 +3,7 @@ imports = [ ../default.nix ../../../../common/gpu/nvidia/prime.nix + ../../../../common/gpu/nvidia/turing ]; hardware.nvidia.prime = { From c75b52ace8305b2d64b16ec45335545a15062031 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 12:16:41 -0600 Subject: [PATCH 0993/1476] dell-xps-15-9510: Add nvidia architecture --- dell/xps/15-9510/nvidia/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dell/xps/15-9510/nvidia/default.nix b/dell/xps/15-9510/nvidia/default.nix index 990aea70..6ca0fd5a 100644 --- a/dell/xps/15-9510/nvidia/default.nix +++ b/dell/xps/15-9510/nvidia/default.nix @@ -1,5 +1,8 @@ { lib, pkgs, ... }: { - imports = [ ../../../../common/gpu/nvidia/prime.nix ]; + imports = [ + ../../../../common/gpu/nvidia/prime.nix + ../../../../common/gpu/nvidia/ampere + ]; #D-Bus service to check the availability of dual-GPU services.switcherooControl.enable = lib.mkDefault true; From 30584336012b279813bf842ad27acf77fef33ae9 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 12:16:52 -0600 Subject: [PATCH 0994/1476] dell-xps-15-9520: Add nvidia architecture --- dell/xps/15-9520/nvidia/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/dell/xps/15-9520/nvidia/default.nix b/dell/xps/15-9520/nvidia/default.nix index 257462a4..8db739db 100644 --- a/dell/xps/15-9520/nvidia/default.nix +++ b/dell/xps/15-9520/nvidia/default.nix @@ -3,6 +3,7 @@ imports = [ ../default.nix ../../../../common/gpu/nvidia/prime.nix + ../../../../common/gpu/nvidia/ampere ]; hardware.nvidia.prime = { From 9f9cf89d3370df3ffc307e77ca881b9a4dd76095 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 12:17:02 -0600 Subject: [PATCH 0995/1476] dell-xps-15-9550: Add nvidia architecture --- dell/xps/15-9550/nvidia/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/dell/xps/15-9550/nvidia/default.nix b/dell/xps/15-9550/nvidia/default.nix index 257462a4..520e6ad7 100644 --- a/dell/xps/15-9550/nvidia/default.nix +++ b/dell/xps/15-9550/nvidia/default.nix @@ -3,6 +3,7 @@ imports = [ ../default.nix ../../../../common/gpu/nvidia/prime.nix + ../../../../common/gpu/nvidia/maxwell ]; hardware.nvidia.prime = { From dec757bf4ebd310df00b19e54daa6ef1b241ec21 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 12:17:17 -0600 Subject: [PATCH 0996/1476] dell-xps-15-9560: Add nvidia architecture --- dell/xps/15-9560/default.nix | 1 + dell/xps/15-9560/nvidia/default.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index 510feabd..84c300a8 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -5,6 +5,7 @@ ../../../common/pc/laptop ./xps-common.nix ../../../common/gpu/nvidia + ../../../common/gpu/nvidia/pascal ]; hardware.graphics.enable = true; diff --git a/dell/xps/15-9560/nvidia/default.nix b/dell/xps/15-9560/nvidia/default.nix index e58fa581..8026a227 100644 --- a/dell/xps/15-9560/nvidia/default.nix +++ b/dell/xps/15-9560/nvidia/default.nix @@ -6,6 +6,7 @@ ../../../../common/gpu/nvidia/prime.nix ../../../../common/pc/laptop ../xps-common.nix + ../../../../common/gpu/nvidia/pascal ]; From 12acfdefc1d352a382f5e875fc9a6c48ab989e08 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 12:17:32 -0600 Subject: [PATCH 0997/1476] dell-xps-17-9700: Add nvidia architecture --- dell/xps/17-9700/nvidia/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/dell/xps/17-9700/nvidia/default.nix b/dell/xps/17-9700/nvidia/default.nix index 446a0b76..16f93668 100644 --- a/dell/xps/17-9700/nvidia/default.nix +++ b/dell/xps/17-9700/nvidia/default.nix @@ -5,6 +5,7 @@ ../../../../common/cpu/intel ../../../../common/pc/laptop ../../../../common/gpu/nvidia/prime.nix + ../../../../common/gpu/nvidia/turing ../common.nix ]; From b978e8c9038834197e7f0516dba325d037ee1cd8 Mon Sep 17 00:00:00 2001 From: Mic92 <96200+Mic92@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:18:57 +0000 Subject: [PATCH 0998/1476] Add GPD Win Mini 2024 to the configuration list. (#1099) Add GPD Win Mini 2024 to the configuration list. (#1099) lenovo: fix unstable wifi on Yoga laptops Add extra modprobe options to fix unstable wifi on Yoga laptops. * Merge branch 'NixOS:master' into master * Add basic GPD Mini configuration. * Merge branch 'NixOS:master' into master * flake: Restore flake.nix to original format Restore the flake.nix file to the original format from nixos-hardware master. --- README.md | 1 + flake.nix | 1 + gpd/win-mini/2024/README.md | 1 + gpd/win-mini/2024/default.nix | 12 ++++++++++++ gpd/win-mini/default.nix | 17 +++++++++++++++++ 5 files changed, 32 insertions(+) create mode 100644 gpd/win-mini/2024/README.md create mode 100644 gpd/win-mini/2024/default.nix create mode 100644 gpd/win-mini/default.nix diff --git a/README.md b/README.md index 1f51b115..21a48e5f 100644 --- a/README.md +++ b/README.md @@ -170,6 +170,7 @@ See code for all available configurations. | [GPD Pocket 3](gpd/pocket-3) | `` | | [GPD WIN 2](gpd/win-2) | `` | | [GPD WIN Max 2 2023](gpd/win-max-2/2023) | `` | +| [GPD WIN Mini 2024](gpd/win-mini/2024) | `` | | [Google Pixelbook](google/pixelbook) | `` | | [HP Elitebook 2560p](hp/elitebook/2560p) | `` | | [HP Elitebook 830g6](hp/elitebook/830/g6) | `` | diff --git a/flake.nix b/flake.nix index 619d4b90..b7102cd5 100644 --- a/flake.nix +++ b/flake.nix @@ -106,6 +106,7 @@ gpd-pocket-3 = import ./gpd/pocket-3; gpd-win-2 = import ./gpd/win-2; gpd-win-max-2-2023 = import ./gpd/win-max-2/2023; + gpd-win-mini-2024 = import ./gpd/win-mini/2024; hp-elitebook-2560p = import ./hp/elitebook/2560p; hp-elitebook-830g6 = import ./hp/elitebook/830/g6; hp-elitebook-845g7 = import ./hp/elitebook/845/g7; diff --git a/gpd/win-mini/2024/README.md b/gpd/win-mini/2024/README.md new file mode 100644 index 00000000..7e266f7b --- /dev/null +++ b/gpd/win-mini/2024/README.md @@ -0,0 +1 @@ +# GPD Win Mini 2024 diff --git a/gpd/win-mini/2024/default.nix b/gpd/win-mini/2024/default.nix new file mode 100644 index 00000000..fcd8a0a0 --- /dev/null +++ b/gpd/win-mini/2024/default.nix @@ -0,0 +1,12 @@ +{ config, lib, ... }: +with lib; +{ + imports = [ + ./.. + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ]; + + hardware.bluetooth.enable = true; +} diff --git a/gpd/win-mini/default.nix b/gpd/win-mini/default.nix new file mode 100644 index 00000000..6361d576 --- /dev/null +++ b/gpd/win-mini/default.nix @@ -0,0 +1,17 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; +let + cfg = config.hardware.gpd.ppt; +in +{ + imports = [ + ../../common/pc/laptop + ../../common/pc/ssd + ../../common/hidpi.nix + ]; +} From 59894d5e56ba7fd0fc5d34b4d2b397106fe3f060 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 15:09:38 -0600 Subject: [PATCH 0999/1476] asus-fa507rm: Add nvidia architecture --- asus/fa507rm/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/asus/fa507rm/default.nix b/asus/fa507rm/default.nix index f244e4ec..a07a6413 100644 --- a/asus/fa507rm/default.nix +++ b/asus/fa507rm/default.nix @@ -4,6 +4,7 @@ imports = [ ../../common/cpu/amd ../../common/gpu/nvidia/prime.nix + ../../common/gpu/nvidia/ampere ../../common/pc/laptop ../../common/pc/ssd ]; From 910e61b27da79ac4a0c56ef68336c85586cbf273 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 15:10:10 -0600 Subject: [PATCH 1000/1476] asus-rog-strix-g513im: Add nvidia architecture --- asus/rog-strix/g513im/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/asus/rog-strix/g513im/default.nix b/asus/rog-strix/g513im/default.nix index 04c3559d..654cdd14 100644 --- a/asus/rog-strix/g513im/default.nix +++ b/asus/rog-strix/g513im/default.nix @@ -4,6 +4,7 @@ ../../../common/cpu/amd/pstate.nix ../../../common/gpu/nvidia ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ampere ../../../common/pc/laptop ../../../common/pc/ssd ../../battery.nix From 9b17be344e79376e9c5a3a5593fcc640ef3130c4 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 15:10:23 -0600 Subject: [PATCH 1001/1476] asus-rog-strix-g713ie: Add nvidia architecture --- asus/rog-strix/g713ie/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/asus/rog-strix/g713ie/default.nix b/asus/rog-strix/g713ie/default.nix index e36585c3..f82ddb9b 100644 --- a/asus/rog-strix/g713ie/default.nix +++ b/asus/rog-strix/g713ie/default.nix @@ -4,6 +4,7 @@ ../../../common/cpu/amd/pstate.nix ../../../common/gpu/nvidia ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ampere ../../../common/pc/laptop ../../../common/pc/ssd ../../battery.nix From 537992d88433c9a0f7949d633ae958829f602ca1 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 15:10:37 -0600 Subject: [PATCH 1002/1476] asus-rog-strix-g733qs: Add nvidia architecture --- asus/rog-strix/g733qs/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/asus/rog-strix/g733qs/default.nix b/asus/rog-strix/g733qs/default.nix index 1515285f..b09142af 100644 --- a/asus/rog-strix/g733qs/default.nix +++ b/asus/rog-strix/g733qs/default.nix @@ -3,6 +3,7 @@ imports = [ ../../../common/cpu/amd/pstate.nix ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ampere ../../../common/pc/laptop ../../../common/pc/ssd ../../battery.nix From 45e5bcc7d5453058a6b0011ad807b28b26ebc4eb Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 15:11:05 -0600 Subject: [PATCH 1003/1476] asus-zephyrus-ga401: Add nvidia architecture --- asus/zephyrus/ga401/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/asus/zephyrus/ga401/default.nix b/asus/zephyrus/ga401/default.nix index ef24a4ca..9dad2c17 100644 --- a/asus/zephyrus/ga401/default.nix +++ b/asus/zephyrus/ga401/default.nix @@ -6,6 +6,7 @@ ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ampere ../../../common/pc/laptop ../../../common/pc/laptop/ssd ]; @@ -16,7 +17,7 @@ modesetting.enable = lib.mkDefault true; dynamicBoost.enable = lib.mkDefault true; - + prime = { amdgpuBusId = "PCI:4:0:0"; nvidiaBusId = "PCI:1:0:0"; From 5c04dd453beb0244a686d7c543e97aed71a20258 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 15:11:16 -0600 Subject: [PATCH 1004/1476] asus-zephyrus-ga402x: Add nvidia architecture --- asus/zephyrus/ga402x/nvidia/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/asus/zephyrus/ga402x/nvidia/default.nix b/asus/zephyrus/ga402x/nvidia/default.nix index 6f759fdc..05070785 100644 --- a/asus/zephyrus/ga402x/nvidia/default.nix +++ b/asus/zephyrus/ga402x/nvidia/default.nix @@ -12,6 +12,7 @@ in { ## "prime.nix" loads this, aleady: # ../../../common/gpu/nvidia ../../../../common/gpu/nvidia/prime.nix + ../../../../common/gpu/nvidia/ada-lovelace ]; From a38b5d1286083d25541f165fd42443d8bb7383c5 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 15:11:25 -0600 Subject: [PATCH 1005/1476] asus-zephyrus-ga502: Add nvidia architecture --- asus/zephyrus/ga502/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/asus/zephyrus/ga502/default.nix b/asus/zephyrus/ga502/default.nix index 0e98b256..6dd933b5 100644 --- a/asus/zephyrus/ga502/default.nix +++ b/asus/zephyrus/ga502/default.nix @@ -4,6 +4,7 @@ imports = [ ../../../common/cpu/amd ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/turing ../../../common/pc/laptop ../../../common/pc/ssd ]; From 249f33df8be84218d090626749fe567cff3c572b Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 15:11:32 -0600 Subject: [PATCH 1006/1476] asus-zephyrus-ga503: Add nvidia architecture --- asus/zephyrus/ga503/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/asus/zephyrus/ga503/default.nix b/asus/zephyrus/ga503/default.nix index 94e86847..21b73af2 100644 --- a/asus/zephyrus/ga503/default.nix +++ b/asus/zephyrus/ga503/default.nix @@ -4,6 +4,7 @@ imports = [ ../../../common/cpu/amd ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ampere ../../../common/pc/laptop ../../../common/pc/ssd ]; From aa3739f4ab414b2b0b212cf235d0682f14de3d4a Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 3 Sep 2024 15:11:55 -0600 Subject: [PATCH 1007/1476] asus-zephyrus-gu603h: Add nvidia architecture --- asus/zephyrus/gu603h/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/asus/zephyrus/gu603h/default.nix b/asus/zephyrus/gu603h/default.nix index b647377b..c5a57a8e 100644 --- a/asus/zephyrus/gu603h/default.nix +++ b/asus/zephyrus/gu603h/default.nix @@ -4,6 +4,7 @@ imports = [ ../../../common/cpu/intel ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ampere ../../../common/pc/laptop ../../../common/pc/ssd ]; From a5e2826fc2b75cb6f1ac012fa3dd80602817ef67 Mon Sep 17 00:00:00 2001 From: flakeuser Date: Tue, 3 Sep 2024 17:35:08 -0700 Subject: [PATCH 1008/1476] Set mkDefault for enabling bluetooth. --- gpd/win-mini/2024/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpd/win-mini/2024/default.nix b/gpd/win-mini/2024/default.nix index fcd8a0a0..c8eb1bfd 100644 --- a/gpd/win-mini/2024/default.nix +++ b/gpd/win-mini/2024/default.nix @@ -8,5 +8,5 @@ with lib; ../../../common/gpu/amd ]; - hardware.bluetooth.enable = true; + hardware.bluetooth.enable = lib.mkDefault true; } From 19fba44ecefcedab6cc3c299074732c0764a7a98 Mon Sep 17 00:00:00 2001 From: Ayoub Nasr Date: Tue, 3 Sep 2024 21:32:16 +0200 Subject: [PATCH 1009/1476] lenovo-legion-16ach6h: Add nvidia architecture Signed-off-by: Ayoub Nasr --- lenovo/legion/16ach6h/hybrid/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/legion/16ach6h/hybrid/default.nix b/lenovo/legion/16ach6h/hybrid/default.nix index f07b8378..101a6b35 100644 --- a/lenovo/legion/16ach6h/hybrid/default.nix +++ b/lenovo/legion/16ach6h/hybrid/default.nix @@ -7,6 +7,7 @@ ../../../../common/cpu/amd/zenpower.nix ../../../../common/gpu/amd ../../../../common/gpu/nvidia/prime.nix + ../../../../common/gpu/nvidia/ampere ../../../../common/pc/laptop ../../../../common/pc/laptop/ssd ../edid From 6776df50ee0b5ae8ce8d5f3f652b101934eeb2b7 Mon Sep 17 00:00:00 2001 From: Relief Melone Date: Wed, 4 Sep 2024 15:05:15 +0200 Subject: [PATCH 1010/1476] Adding Asus Zephyrus G16 GU605MY - added module to asus/zephyrus/gu605my - added entry to flake outputs - added entry in README table --- README.md | 1 + asus/zephyrus/gu605my/default.nix | 16 ++++++++++++++++ flake.nix | 1 + 3 files changed, 18 insertions(+) create mode 100644 asus/zephyrus/gu605my/default.nix diff --git a/README.md b/README.md index 21a48e5f..bf6290d6 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,7 @@ See code for all available configurations. | [Asus ROG Zephyrus G14 GA402X* (2023)](asus/zephyrus/ga402x/nvidia) | `` | | [Asus ROG Zephyrus G15 GA502](asus/zephyrus/ga502) | `` | | [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | +| [Asus ROG Zephyrus G16 GU605MY](asus/zephyrus/gu605my) | `` | | [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | | [Asus TUF FX506HM](asus/fx506hm) | `` | diff --git a/asus/zephyrus/gu605my/default.nix b/asus/zephyrus/gu605my/default.nix new file mode 100644 index 00000000..c5a57a8e --- /dev/null +++ b/asus/zephyrus/gu605my/default.nix @@ -0,0 +1,16 @@ +{ ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ampere + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + hardware.nvidia.prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} diff --git a/flake.nix b/flake.nix index b7102cd5..4d1ebf2c 100644 --- a/flake.nix +++ b/flake.nix @@ -40,6 +40,7 @@ asus-zephyrus-ga502 = import ./asus/zephyrus/ga502; asus-zephyrus-ga503 = import ./asus/zephyrus/ga503; asus-zephyrus-gu603h = import ./asus/zephyrus/gu603h; + asus-zephyrus-gu605my = import ./asus/zephyrus/gu605my; beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; chuwi-minibook-x = import ./chuwi/minibook-x; deciso-dec = import ./deciso/dec; From 3b6e461e6d4ef6c6f419172626b4296e143d58e9 Mon Sep 17 00:00:00 2001 From: DontEatOreo <57304299+DontEatOreo@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:07:12 +0300 Subject: [PATCH 1011/1476] lenovo-legion-15arh05h: add NVIDIA architecture --- lenovo/legion/15arh05h/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/legion/15arh05h/default.nix b/lenovo/legion/15arh05h/default.nix index 6ab02dc7..bfff924a 100644 --- a/lenovo/legion/15arh05h/default.nix +++ b/lenovo/legion/15arh05h/default.nix @@ -4,6 +4,7 @@ imports = [ ../../../common/cpu/amd ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/turing ../../../common/pc/laptop ../../../common/pc/laptop/ssd ]; From bf95efcbea8b5112df480e7f20b8fd8b9dee6bc5 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:15:55 -0600 Subject: [PATCH 1012/1476] lenovo-ideapad-15ach6: Add nvidia architecture --- lenovo/ideapad/15ach6/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/ideapad/15ach6/default.nix b/lenovo/ideapad/15ach6/default.nix index c771f1bd..e86fee90 100644 --- a/lenovo/ideapad/15ach6/default.nix +++ b/lenovo/ideapad/15ach6/default.nix @@ -6,6 +6,7 @@ ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/turing ../../../common/pc/laptop ../../../common/pc/laptop/ssd ]; From b890093a86aeec6f0d503d798fd5ebd7902196b2 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:16:07 -0600 Subject: [PATCH 1013/1476] lenovo-ideapad-15arh05: Add nvidia architecture --- lenovo/ideapad/15arh05/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/ideapad/15arh05/default.nix b/lenovo/ideapad/15arh05/default.nix index 46dfd24f..87229c52 100644 --- a/lenovo/ideapad/15arh05/default.nix +++ b/lenovo/ideapad/15arh05/default.nix @@ -4,6 +4,7 @@ imports = [ ../../../common/cpu/amd ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/turing ../../../common/pc/laptop ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd From d4c8e7fc42426ec04d1ea398f100a32b93c751bb Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:16:45 -0600 Subject: [PATCH 1014/1476] lenovo-ideapad-16ach6: Add nvidia architecture --- lenovo/ideapad/16ach6/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/ideapad/16ach6/default.nix b/lenovo/ideapad/16ach6/default.nix index 3f9beb1c..aeec3298 100644 --- a/lenovo/ideapad/16ach6/default.nix +++ b/lenovo/ideapad/16ach6/default.nix @@ -6,6 +6,7 @@ ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/turing ../../../common/pc/laptop ../../../common/pc/laptop/ssd ]; From feb83f6cd269fdee6b29dfe63716ebd37b9c807f Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:16:57 -0600 Subject: [PATCH 1015/1476] lenovo-legion-15ach6: Add nvidia architecture --- lenovo/legion/15ach6/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/legion/15ach6/default.nix b/lenovo/legion/15ach6/default.nix index a3c00fd7..0166a5fe 100644 --- a/lenovo/legion/15ach6/default.nix +++ b/lenovo/legion/15ach6/default.nix @@ -4,6 +4,7 @@ ../../../common/cpu/amd ../../../common/gpu/amd ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ampere ../../../common/hidpi.nix ../../../common/pc/laptop ../../../common/pc/laptop/ssd From ec5e8f29ff4ac4a20809cc662c8e75799958dadf Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:17:09 -0600 Subject: [PATCH 1016/1476] lenovo-legion-15ach6h: Add nvidia architecture --- lenovo/legion/15ach6h/hybrid/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/legion/15ach6h/hybrid/default.nix b/lenovo/legion/15ach6h/hybrid/default.nix index 2f12f7ea..044d088b 100644 --- a/lenovo/legion/15ach6h/hybrid/default.nix +++ b/lenovo/legion/15ach6h/hybrid/default.nix @@ -6,6 +6,7 @@ ../../../../common/cpu/amd/pstate.nix ../../../../common/gpu/amd ../../../../common/gpu/nvidia/prime.nix + ../../../../common/gpu/nvidia/ampere ../../../../common/pc/laptop ../../../../common/pc/laptop/ssd ]; From 06355153e53d0dd728986f6f0a048b58c0fdd391 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:20:04 -0600 Subject: [PATCH 1017/1476] lenovo-legion-15ich: Add nvidia architecture --- lenovo/legion/15ich/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/legion/15ich/default.nix b/lenovo/legion/15ich/default.nix index 9fa70b7b..8aaffff8 100644 --- a/lenovo/legion/15ich/default.nix +++ b/lenovo/legion/15ich/default.nix @@ -4,6 +4,7 @@ imports = [ ../../../common/cpu/intel ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/pascal ../../../common/pc/laptop ../../../common/pc/laptop/ssd ../../../common/pc/laptop/hdd From ab4beae1748358dfd7ba1ece826055e7d163d30f Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:20:18 -0600 Subject: [PATCH 1018/1476] lenovo-legion-16irx8h: Add nvidia architecture --- lenovo/legion/16irx8h/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/legion/16irx8h/default.nix b/lenovo/legion/16irx8h/default.nix index cfbcb8aa..6d9c772c 100644 --- a/lenovo/legion/16irx8h/default.nix +++ b/lenovo/legion/16irx8h/default.nix @@ -6,6 +6,7 @@ imports = [ ../../../common/cpu/intel ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ada-lovelace ../../../common/pc/laptop ../../../common/pc/laptop/ssd ../../../common/hidpi.nix From 3cb0b3a708280b30155835ba013e0b1defd52987 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:20:35 -0600 Subject: [PATCH 1019/1476] lenovo-legion-16ithg6: Add nvidia architecture --- lenovo/legion/16ithg6/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/legion/16ithg6/default.nix b/lenovo/legion/16ithg6/default.nix index e26461dd..9d6c292f 100644 --- a/lenovo/legion/16ithg6/default.nix +++ b/lenovo/legion/16ithg6/default.nix @@ -4,6 +4,7 @@ imports = [ ../../../common/cpu/intel ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ampere ../../../common/pc/laptop ../../../common/pc/laptop/ssd ../../../common/hidpi.nix From efc4789f6647e4da927b8b700bf9443259bda2f0 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:21:01 -0600 Subject: [PATCH 1020/1476] lenovo-legion-t526amr5: Use nvidia open --- lenovo/legion/t526amr5/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lenovo/legion/t526amr5/default.nix b/lenovo/legion/t526amr5/default.nix index ba1d623c..41314459 100644 --- a/lenovo/legion/t526amr5/default.nix +++ b/lenovo/legion/t526amr5/default.nix @@ -9,4 +9,7 @@ # TPM2 module security.tpm2.enable = true; + + # Device could have multiple architectures, but they all support open + hardware.nvidia.open = true; } From 80598d9043adbfb11658d2eda63b354cd7938b1f Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:21:16 -0600 Subject: [PATCH 1021/1476] lenovo-thinkpad-e470: Add nvidia architecture --- lenovo/thinkpad/e470/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/e470/default.nix b/lenovo/thinkpad/e470/default.nix index 55aa595a..e963e12b 100644 --- a/lenovo/thinkpad/e470/default.nix +++ b/lenovo/thinkpad/e470/default.nix @@ -5,6 +5,7 @@ ../. ../../../common/gpu/intel/kaby-lake ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/maxwell ]; hardware.nvidia.prime = { From 3ffa6a4dea790b88b0f8d6951748489f29a70e96 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:21:34 -0600 Subject: [PATCH 1022/1476] lenovo-thinkpad-p14s-intel-gen3: Add nvidia architecture --- lenovo/thinkpad/p14s/intel/gen3/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/p14s/intel/gen3/default.nix b/lenovo/thinkpad/p14s/intel/gen3/default.nix index 4c736113..427d56c0 100644 --- a/lenovo/thinkpad/p14s/intel/gen3/default.nix +++ b/lenovo/thinkpad/p14s/intel/gen3/default.nix @@ -4,6 +4,7 @@ imports = [ ../. ../../../../../common/gpu/nvidia/prime.nix + ../../../../../common/gpu/nvidia/turing ]; hardware = { From 595a4a84a11c7911fb9d025c108751c29034fd54 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:21:44 -0600 Subject: [PATCH 1023/1476] lenovo-thinkpad-p50: Add nvidia architecture --- lenovo/thinkpad/p50/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/p50/default.nix b/lenovo/thinkpad/p50/default.nix index ef2cbd56..625d7cb7 100644 --- a/lenovo/thinkpad/p50/default.nix +++ b/lenovo/thinkpad/p50/default.nix @@ -1,6 +1,7 @@ { lib, config, ... }: { imports = [ ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/maxwell ../../../common/cpu/intel ../../../common/pc/laptop/acpi_call.nix ../. From 2fc1e10076a377718bcfe8b24bc57da7fc211df1 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:21:52 -0600 Subject: [PATCH 1024/1476] lenovo-thinkpad-p51: Add nvidia architecture --- lenovo/thinkpad/p51/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix index 6bd162db..12de3ca3 100644 --- a/lenovo/thinkpad/p51/default.nix +++ b/lenovo/thinkpad/p51/default.nix @@ -2,6 +2,7 @@ imports = [ ../../../common/gpu/24.05-compat.nix ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/maxwell ../../../common/cpu/intel ../../../common/gpu/intel/kaby-lake ../../../common/pc/laptop/acpi_call.nix From ab6053dff37ea208df045a7c604cab3a37ae2976 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:22:00 -0600 Subject: [PATCH 1025/1476] lenovo-thinkpad-p52: Add nvidia architecture --- lenovo/thinkpad/p52/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/p52/default.nix b/lenovo/thinkpad/p52/default.nix index 2f6676a5..2ca38aee 100644 --- a/lenovo/thinkpad/p52/default.nix +++ b/lenovo/thinkpad/p52/default.nix @@ -2,6 +2,7 @@ imports = [ ../../../common/gpu/24.05-compat.nix ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/pascal ../../../common/cpu/intel ../../../common/pc/laptop/acpi_call.nix ../. From 5fdecbf814a0a9f75edd1a1bfbae5b8a50e507c0 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:22:06 -0600 Subject: [PATCH 1026/1476] lenovo-yoga-7-14ARH7: Add nvidia architecture --- lenovo/yoga/7/14ARH7/nvidia/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/yoga/7/14ARH7/nvidia/default.nix b/lenovo/yoga/7/14ARH7/nvidia/default.nix index 0ca5afd7..cf7aedc9 100644 --- a/lenovo/yoga/7/14ARH7/nvidia/default.nix +++ b/lenovo/yoga/7/14ARH7/nvidia/default.nix @@ -11,6 +11,7 @@ in { ## "prime.nix" loads this, aleady: # ../../../../common/gpu/nvidia ../../../../../common/gpu/nvidia/prime.nix + ../../../../../common/gpu/nvidia/ampere ]; # NVIDIA GeForce RTX 3050 Mobile (Ampere) From ace1cedf3ecfbac81b29522d71009878951a69eb Mon Sep 17 00:00:00 2001 From: Jdogzz Date: Wed, 4 Sep 2024 10:24:00 -0700 Subject: [PATCH 1027/1476] msigl65: add initial configuration (#1106) Co-authored-by: Mic92 <96200+Mic92@users.noreply.github.com> --- README.md | 3 ++- flake.nix | 1 + msi/gl65/10SDR-492/default.nix | 26 ++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 msi/gl65/10SDR-492/default.nix diff --git a/README.md b/README.md index bf6290d6..b7ede834 100644 --- a/README.md +++ b/README.md @@ -284,6 +284,7 @@ See code for all available configurations. | [MSI B350 TOMAHAWK](msi/b350-tomahawk) | `` | | [MSI GS60 2QE](msi/gs60) | `` | | [MSI GL62/CX62](msi/gl62) | `` | +| [MSI GL65 10SDR-492](msi/gl65/10SDR-492) | `` | | [Microchip Icicle Kit](microchip/icicle-kit) | `` | | [Microsoft Surface Go](microsoft/surface/surface-go) | `` | | [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel) | `` | @@ -325,7 +326,7 @@ See code for all available configurations. | [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | | [System76 (generic)](system76) | `` | | [System76 Darter Pro 6](system76/darp6) | `` | -| [System76 Gazelle Gaze18](system76/gaze18) | `` | +| [System76 Gazelle Gaze18](system76/gaze18) | `` | | [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | | [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | | [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | diff --git a/flake.nix b/flake.nix index 4d1ebf2c..0cf0687c 100644 --- a/flake.nix +++ b/flake.nix @@ -236,6 +236,7 @@ msi-b550-a-pro = import ./msi/b550-a-pro; msi-gs60 = import ./msi/gs60; msi-gl62 = import ./msi/gl62; + msi-gl65-10SDR-492 = import ./msi/gl65/10SDR-492; nxp-imx8mp-evk = import ./nxp/imx8mp-evk; nxp-imx8mq-evk = import ./nxp/imx8mq-evk; nxp-imx8qm-mek = import ./nxp/imx8qm-mek; diff --git a/msi/gl65/10SDR-492/default.nix b/msi/gl65/10SDR-492/default.nix new file mode 100644 index 00000000..3e825d4b --- /dev/null +++ b/msi/gl65/10SDR-492/default.nix @@ -0,0 +1,26 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/pc/laptop/ssd + ../../../common/cpu/intel + ../../../common/gpu/intel/comet-lake + ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/turing + ../../../common/pc/laptop + ]; + + hardware.bluetooth.enable = lib.mkDefault true; + + hardware.graphics.enable = lib.mkDefault true; + + 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"; + }; + }; +} From 7ea5daa492c082e27483854fae6aad600559702b Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:27:08 -0600 Subject: [PATCH 1028/1476] common-gpu-nvidia: Add kepler --- common/gpu/nvidia/kepler/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 common/gpu/nvidia/kepler/default.nix diff --git a/common/gpu/nvidia/kepler/default.nix b/common/gpu/nvidia/kepler/default.nix new file mode 100644 index 00000000..f8d89a1e --- /dev/null +++ b/common/gpu/nvidia/kepler/default.nix @@ -0,0 +1,7 @@ +{lib, ...}: +{ + imports = [ ../. ]; + + # The open source driver does not support Kepler GPUs. + hardware.nvidia.open = false; +} From 2aa46f02e2d1bcb9507ffc1385bb055d393c613a Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:37:51 -0600 Subject: [PATCH 1029/1476] apple-imac-14-2: Add nvidia architecture --- apple/imac/14-2/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/apple/imac/14-2/default.nix b/apple/imac/14-2/default.nix index e85e1725..c64f9671 100644 --- a/apple/imac/14-2/default.nix +++ b/apple/imac/14-2/default.nix @@ -9,6 +9,7 @@ ../. ../../../common/gpu/intel ../../../common/gpu/nvidia + ../../../common/gpu/nvidia/kepler ../../../common/hidpi.nix ]; From 561fe843e1254ed96d8ecc39f6216c80e5513b02 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:38:04 -0600 Subject: [PATCH 1030/1476] apple-macbook-pro-10-1: Add nvidia architecture --- apple/macbook-pro/10-1/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/apple/macbook-pro/10-1/default.nix b/apple/macbook-pro/10-1/default.nix index 2a2c624d..08302289 100644 --- a/apple/macbook-pro/10-1/default.nix +++ b/apple/macbook-pro/10-1/default.nix @@ -5,6 +5,7 @@ ../. ../../../common/pc/laptop/ssd ../../../common/gpu/24.05-compat.nix + ../../../common/gpu/nvidia/kepler ]; # TODO: reverse compat From ded3bdaa58d4419bd01259120bcc43765bc4385c Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:38:19 -0600 Subject: [PATCH 1031/1476] focus-m2-gen1: Add nvidia architecture --- focus/m2/gen1/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/focus/m2/gen1/default.nix b/focus/m2/gen1/default.nix index 27ee1f3e..b6a2c789 100644 --- a/focus/m2/gen1/default.nix +++ b/focus/m2/gen1/default.nix @@ -4,6 +4,7 @@ imports = [ ../../../common/cpu/intel ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/turing ../../../common/pc/laptop ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd From 4588e111d1d2982f49d174ca618821599722f3e8 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:38:36 -0600 Subject: [PATCH 1032/1476] msi-gl62: Add nvidia architecture --- msi/gl62/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/msi/gl62/default.nix b/msi/gl62/default.nix index 049ffcfb..977af651 100644 --- a/msi/gl62/default.nix +++ b/msi/gl62/default.nix @@ -5,6 +5,7 @@ ../../common/pc/laptop/ssd ../../common/cpu/intel ../../common/gpu/nvidia/prime.nix + ../../common/gpu/nvidia/pascal ../../common/pc/laptop ]; From a68390425cc9224ad32ee23781335ad9ea4b8f5f Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:38:55 -0600 Subject: [PATCH 1033/1476] omen-14-fb0798ng: Add nvidia architecture --- omen/14-fb0798ng/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/omen/14-fb0798ng/default.nix b/omen/14-fb0798ng/default.nix index 20ce9a33..b1382455 100644 --- a/omen/14-fb0798ng/default.nix +++ b/omen/14-fb0798ng/default.nix @@ -4,6 +4,7 @@ imports = [ ../../common/cpu/intel ../../common/gpu/nvidia/prime.nix + ../../common/gpu/nvidia/ada-lovelace ../../common/pc/laptop ../../common/pc/ssd ]; From 2a638da50f8598283ae5e1012d283104269a8dfc Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:39:05 -0600 Subject: [PATCH 1034/1476] omen-15-en0002np: Add nvidia architecture --- omen/15-en0002np/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/omen/15-en0002np/default.nix b/omen/15-en0002np/default.nix index 77f943ff..00606cc5 100644 --- a/omen/15-en0002np/default.nix +++ b/omen/15-en0002np/default.nix @@ -5,6 +5,7 @@ ../../common/cpu/amd ../../common/cpu/amd/pstate.nix ../../common/gpu/nvidia/prime.nix + ../../common/gpu/nvidia/turing ../../common/pc/laptop ../../common/pc/ssd ]; From b00ea30831b2e7ea8e5ee8d0a4efb2ac0a0c9dec Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:39:18 -0600 Subject: [PATCH 1035/1476] omen-15-en0010ca: Add nvidia architecture --- omen/15-en0010ca/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/omen/15-en0010ca/default.nix b/omen/15-en0010ca/default.nix index ff94913f..da3c85e8 100644 --- a/omen/15-en0010ca/default.nix +++ b/omen/15-en0010ca/default.nix @@ -6,6 +6,7 @@ ../../common/cpu/amd/pstate.nix ../../common/gpu/amd ../../common/gpu/nvidia/prime.nix + ../../common/gpu/nvidia/turing ../../common/pc/laptop ../../common/pc/ssd ]; From d6e07be2cd9e8fcbb47499475ed11cbe19645464 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:39:33 -0600 Subject: [PATCH 1036/1476] omen-15-en1007sa: Add nvidia architecture --- omen/15-en1007sa/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/omen/15-en1007sa/default.nix b/omen/15-en1007sa/default.nix index 3929c66f..704e4d8b 100644 --- a/omen/15-en1007sa/default.nix +++ b/omen/15-en1007sa/default.nix @@ -5,6 +5,7 @@ ../../common/cpu/amd ../../common/cpu/amd/pstate.nix ../../common/gpu/nvidia/prime.nix + ../../common/gpu/nvidia/ampere ../../common/pc/laptop ../../common/pc/ssd ]; From 75ac0969d8207867df3f541bf64133dd91e4a213 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:39:48 -0600 Subject: [PATCH 1037/1476] omen-16-n0280nd: Add nvidia architecture --- omen/16-n0280nd/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/omen/16-n0280nd/default.nix b/omen/16-n0280nd/default.nix index 3929c66f..704e4d8b 100644 --- a/omen/16-n0280nd/default.nix +++ b/omen/16-n0280nd/default.nix @@ -5,6 +5,7 @@ ../../common/cpu/amd ../../common/cpu/amd/pstate.nix ../../common/gpu/nvidia/prime.nix + ../../common/gpu/nvidia/ampere ../../common/pc/laptop ../../common/pc/ssd ]; From c50dd00a787ad747c65153a24a3dbd1e638f7e26 Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Wed, 4 Sep 2024 11:40:04 -0600 Subject: [PATCH 1038/1476] system76-gaze18: Add nvidia architecture --- system76/gaze18/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/system76/gaze18/default.nix b/system76/gaze18/default.nix index 0485e16c..dd4302b8 100644 --- a/system76/gaze18/default.nix +++ b/system76/gaze18/default.nix @@ -3,6 +3,7 @@ imports = [ ../. ../../common/gpu/nvidia/prime.nix + ../../common/gpu/nvidia/ampere ]; boot.initrd.kernelModules = [ "nvidia" ]; From 1b3a5471263d91705dc6ab8bc2597013befe0561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rayan=20Nakib=20=28=D8=B1=D9=8A=D8=A7=D9=86=20=D9=86=D9=82?= =?UTF-8?q?=D9=8A=D8=A8=29?= Date: Sat, 7 Sep 2024 09:00:51 +0100 Subject: [PATCH 1039/1476] Treewide: Add new profile for Apple MacBook Pro 8,1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- README.md | 1 + apple/macbook-pro/8-1/default.nix | 11 +++++++++++ flake.nix | 1 + 3 files changed, 13 insertions(+) create mode 100644 apple/macbook-pro/8-1/default.nix diff --git a/README.md b/README.md index b7ede834..ab147aca 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ See code for all available configurations. | [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | | [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | | [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | +| [Apple MacBook Pro 8,1](apple/macbook-pro/8-1) | `` | | [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | | [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | diff --git a/apple/macbook-pro/8-1/default.nix b/apple/macbook-pro/8-1/default.nix new file mode 100644 index 00000000..b849c69a --- /dev/null +++ b/apple/macbook-pro/8-1/default.nix @@ -0,0 +1,11 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../common/gpu/intel/sandy-bridge + ../../../common/pc/laptop/ssd + ]; + + networking.enableB43Firmware = lib.mkDefault true; +} diff --git a/flake.nix b/flake.nix index 0cf0687c..bde633bb 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,7 @@ apple-macbook-air-4 = import ./apple/macbook-air/4; apple-macbook-air-6 = import ./apple/macbook-air/6; apple-macbook-pro = import ./apple/macbook-pro; + apple-macbook-pro-8-1 = import ./apple/macbook-pro/8-1; apple-macbook-pro-10-1 = import ./apple/macbook-pro/10-1; apple-macbook-pro-11-5 = import ./apple/macbook-pro/11-5; apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; From 502e0aed3102124d7034a2ed2ed245e35c9b9a4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rayan=20Nakib=20=28=D8=B1=D9=8A=D8=A7=D9=86=20=D9=86=D9=82?= =?UTF-8?q?=D9=8A=D8=A8=29?= Date: Sat, 7 Sep 2024 09:09:11 +0100 Subject: [PATCH 1040/1476] apple-macbook-pro-8-1: add README.md explaning to users how they can enable installtion of free packages needed for b43-firmware to work --- apple/macbook-pro/8-1/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 apple/macbook-pro/8-1/README.md diff --git a/apple/macbook-pro/8-1/README.md b/apple/macbook-pro/8-1/README.md new file mode 100644 index 00000000..723df2e8 --- /dev/null +++ b/apple/macbook-pro/8-1/README.md @@ -0,0 +1,24 @@ +# MacBook Pro 8,1 + +## Enable unfree packages in your nix config for b43-firmware (wifi driver) to work + +### For b43-firmware only (Ideal) + +```nix +{lib, ...}: + +{ + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "b43-firmware" + ]; +} + +``` + +### For all packages + +```nix +{ + nixpkgs.config.allowUnfree = true; +} +``` From 04a1cda0c1725094a4db703cccbb956b7558f5a6 Mon Sep 17 00:00:00 2001 From: "M. Ian Graham" Date: Wed, 4 Sep 2024 13:42:54 +0100 Subject: [PATCH 1041/1476] starlabs: init, add starlite 5 tablet --- README.md | 1 + flake.nix | 1 + starlabs/README.md | 10 ++++++++++ starlabs/starlite/i5/README.md | 5 +++++ starlabs/starlite/i5/default.nix | 17 +++++++++++++++++ 5 files changed, 34 insertions(+) create mode 100644 starlabs/README.md create mode 100644 starlabs/starlite/i5/README.md create mode 100644 starlabs/starlite/i5/default.nix diff --git a/README.md b/README.md index ab147aca..1a264e2d 100644 --- a/README.md +++ b/README.md @@ -321,6 +321,7 @@ See code for all available configurations. | [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | | [StarFive VisionFive v1](starfive/visionfive/v1) | `` | | [StarFive VisionFive 2](starfive/visionfive/v2) | `` | +| [StarLabs StarLite 5 (I5)](starlabs/starlite/i5) | `` | | [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | | [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | | [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | diff --git a/flake.nix b/flake.nix index bde633bb..af9090c6 100644 --- a/flake.nix +++ b/flake.nix @@ -267,6 +267,7 @@ samsung-np900x3c = import ./samsung/np900x3c; starfive-visionfive-v1 = import ./starfive/visionfive/v1; starfive-visionfive-2 = import ./starfive/visionfive/v2; + starlabs-starlite-i5 = import ./starlabs/starlite/i5; supermicro = import ./supermicro; supermicro-a1sri-2758f = import ./supermicro/a1sri-2758f; supermicro-m11sdv-8c-ln4f = import ./supermicro/m11sdv-8c-ln4f; diff --git a/starlabs/README.md b/starlabs/README.md new file mode 100644 index 00000000..75a1dc7c --- /dev/null +++ b/starlabs/README.md @@ -0,0 +1,10 @@ +# [Star Labs](https://starlabs.systems) + +Star Labs machines are made for mainline Linux and most things just work! + +ID new hardware based on product_sku. For example, on the StarLite 5: + +```console +$ cat /sys/class/dmi/id/product_sku +I5 +``` diff --git a/starlabs/starlite/i5/README.md b/starlabs/starlite/i5/README.md new file mode 100644 index 00000000..6560015a --- /dev/null +++ b/starlabs/starlite/i5/README.md @@ -0,0 +1,5 @@ +# [Star Labs StarLite 5 Tablet (I5)](https://starlabs.systems) + +Star Labs machines are made for mainline Linux and most things just work! + +The StarLite 5 is their first tablet, and the only hardware configuration oddity is an accelerometer that needs enabling and adjusting to rotate the display correctly. See the vendor's note at [support.starlabs.systems](https://support.starlabs.systems/kb/guides/starlite-fixing-rotation-on-older-kernel). diff --git a/starlabs/starlite/i5/default.nix b/starlabs/starlite/i5/default.nix new file mode 100644 index 00000000..018a5766 --- /dev/null +++ b/starlabs/starlite/i5/default.nix @@ -0,0 +1,17 @@ +{ lib, pkgs, ... }: +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + # Turn on IIO for accelerometer screen rotation. + hardware.sensor.iio.enable = lib.mkDefault true; + + # Accelerometer is mounted to display with inverted Y axis. Adjust! + services.udev.extraHwdb = '' + sensor:modalias:acpi:KIOX000A*:dmi:*:* + ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1 + ''; +} From aac7c50858a21636ddfd39831ccc221cf9d59827 Mon Sep 17 00:00:00 2001 From: Dietrich Daroch Date: Wed, 21 Aug 2024 14:00:38 -0700 Subject: [PATCH 1042/1476] malibal/aon/s1: Add initial intel-only support. --- flake.nix | 1 + malibal/aon/s1/README.wiki | 79 ++++++++++++++++++++++++++++++++++++++ malibal/aon/s1/default.nix | 33 ++++++++++++++++ 3 files changed, 113 insertions(+) create mode 100644 malibal/aon/s1/README.wiki create mode 100644 malibal/aon/s1/default.nix diff --git a/flake.nix b/flake.nix index af9090c6..a9c6733a 100644 --- a/flake.nix +++ b/flake.nix @@ -224,6 +224,7 @@ lenovo-yoga-7-14ARH7-nvidia = import ./lenovo/yoga/7/14ARH7/nvidia; lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; + malibal-aon-s1-intel = import ./malibal/aon/s1; microchip-icicle-kit = import ./microchip/icicle-kit; microsoft-surface-go = import ./microsoft/surface/surface-go; microsoft-surface-pro-intel = import ./microsoft/surface/surface-pro-intel; diff --git a/malibal/aon/s1/README.wiki b/malibal/aon/s1/README.wiki new file mode 100644 index 00000000..c0173df7 --- /dev/null +++ b/malibal/aon/s1/README.wiki @@ -0,0 +1,79 @@ += Malibal Aon S1 = + +== Tested Hardware == + +* CPU: Intel(R) Core(TM) i7-13700H CPU @ 2.4GHz +* RAM: 32 GB +* HDD: 2 TiB SSD +* Screen: 14" WQXGA+ (2880x1800) +* Graphics: Intel Raptor Lake-P [Iris Xe Graphics]. nVidia graphics disabled preemptively. +* Display: Wayland. +* Input: trackpad + +== Firmware Configuration == + +No tweaking to get a useful system, but some is needed. +- Sleeping doesn't work properly and overheats the system. +- Fans spin even when the system is at almost no load and CPUs report 30°C-35°C + +== Installation == + +=== Before installation === + +I don't recall what I did very well, probably just disabled secure boot as +there's no nice and meaningful way of using it yet. + +=== After installation === + +=== Optional === + +* Run fwupd + +== Troubleshooting == + + +== Annoyances == + +=== It's easy to tap the power button === + +It's better to ignore short tapping the power button, + +```nix + services = { + logind = { + if options.hardware.ignorePowerButtonTap + extraConfig = '' + # Don’t shutdown when power button is short-pressed + HandlePowerKey=ignore + ''; + }; + }; +``` + +== Broken Functionality == + +=== Sleeping works, but overheats the machine === + +This drains battery faster than keeping the machine on and it might get you backpack really warm. + +Best workaround I found so far is to increase the time to take an action, and use shutdown as the action. +This is *not* a reasonable workaround for most. + + +```nix + services = { + logind = { + if options.hardware.ignorePowerButtonTap + extraConfig = '' + # Shutdown until sleep/hibernate works + IdleAction=poweroff + + # Ideal case (hibernation onto / isn't working for me, but probably works with a swap partition) + # When idle, sleep, but hibernate if it's been too long. + # IdleAction=hybrid-sleep + ''; + }; + }; +``` + +I'm hoping that suspend-then-hibernate will make this a non-issue in practice, but haven't spent time on it. diff --git a/malibal/aon/s1/default.nix b/malibal/aon/s1/default.nix new file mode 100644 index 00000000..b86577a4 --- /dev/null +++ b/malibal/aon/s1/default.nix @@ -0,0 +1,33 @@ +{ pkgs, lib, ... }: + +{ + imports = [ + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + + ../../../common/cpu/intel + + ../../../common/gpu/intel + ../../../common/gpu/nvidia/disable.nix + ]; + + boot = { + kernelParams = [ + "mem_sleep_default=deep" + "i915.fastboot=1" + ]; + kernelModules = [ + "coretemp" + ]; + }; + + powerManagement = { + powertop.enable = lib.mkDefault true; + }; + + services = { + fwupd = { + enable = lib.mkDefault true; + }; + }; +} From cfb3537b1562e45d9ddfb2b26896b6d12fe525ca Mon Sep 17 00:00:00 2001 From: Relief Melone Date: Fri, 6 Sep 2024 20:09:06 +0200 Subject: [PATCH 1043/1476] asus/zephyrus/gu605my: fixed architecture and added dynamic boost as enabled by default --- asus/zephyrus/gu605my/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/asus/zephyrus/gu605my/default.nix b/asus/zephyrus/gu605my/default.nix index c5a57a8e..25f1f3fa 100644 --- a/asus/zephyrus/gu605my/default.nix +++ b/asus/zephyrus/gu605my/default.nix @@ -1,16 +1,20 @@ -{ ... }: +{ lib, ... }: { imports = [ ../../../common/cpu/intel ../../../common/gpu/nvidia/prime.nix - ../../../common/gpu/nvidia/ampere + ../../../common/gpu/nvidia/ada-lovelace ../../../common/pc/laptop ../../../common/pc/ssd ]; - hardware.nvidia.prime = { - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:1:0:0"; + hardware.nvidia = { + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + + dynamicBoost.enable = lib.mkDefault true; }; } From 755813cba87f62a9da1492d9473efea2b17b9386 Mon Sep 17 00:00:00 2001 From: Relief Melone Date: Sat, 7 Sep 2024 00:55:54 +0200 Subject: [PATCH 1044/1476] asus/zephyrus/gu605my: enable asusd by default and fix mic mute button --- asus/zephyrus/gu605my/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/asus/zephyrus/gu605my/default.nix b/asus/zephyrus/gu605my/default.nix index 25f1f3fa..f9f1d9ac 100644 --- a/asus/zephyrus/gu605my/default.nix +++ b/asus/zephyrus/gu605my/default.nix @@ -17,4 +17,13 @@ dynamicBoost.enable = lib.mkDefault true; }; + + services = { + asusd.enable = lib.mkDefault true; + + udev.extraHwdb = '' + evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* + KEYBOARD_KEY_ff31007c=f20 # fixes mic mute button + ''; + }; } From 166dee4f88a7e3ba1b7a243edb1aca822f00680e Mon Sep 17 00:00:00 2001 From: flakeuser Date: Wed, 4 Sep 2024 15:35:11 -0700 Subject: [PATCH 1045/1476] formatting: use nixfmt to format flake.nix --- flake.nix | 624 +++++++++++++++++++++++++++--------------------------- 1 file changed, 317 insertions(+), 307 deletions(-) diff --git a/flake.nix b/flake.nix index a9c6733a..c146e968 100644 --- a/flake.nix +++ b/flake.nix @@ -2,313 +2,323 @@ description = "nixos-hardware"; outputs = _: { - nixosModules = let - deprecated = issue: name: value: builtins.trace "warning: ${name} flake output is deprecated and will be removed. See https://github.com/NixOS/nixos-hardware/issues/${issue} for more information" value; - import = path: path; # let the module system know what we are exporting - in { - acer-aspire-4810t = import ./acer/aspire/4810t; - airis-n990 = import ./airis/n990; - apple-imac-14-2 = import ./apple/imac/14-2; - apple-imac-18-2 = import ./apple/imac/18-2; - apple-macbook-air-3 = import ./apple/macbook-air/3; - apple-macbook-air-4 = import ./apple/macbook-air/4; - apple-macbook-air-6 = import ./apple/macbook-air/6; - apple-macbook-pro = import ./apple/macbook-pro; - apple-macbook-pro-8-1 = import ./apple/macbook-pro/8-1; - apple-macbook-pro-10-1 = import ./apple/macbook-pro/10-1; - apple-macbook-pro-11-5 = import ./apple/macbook-pro/11-5; - apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; - apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1; - apple-macmini-4-1 = import ./apple/macmini/4; - apple-t2 = import ./apple/t2; - asus-battery = import ./asus/battery.nix; - asus-ally-rc71l = import ./asus/ally/rc71l; - asus-fx504gd = import ./asus/fx504gd; - asus-fx506hm = import ./asus/fx506hm; - asus-fa507nv = import ./asus/fa507nv; - asus-fa507rm = import ./asus/fa507rm; - asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace; - asus-rog-strix-g513im = import ./asus/rog-strix/g513im; - asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie; - asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; - asus-rog-strix-x570e = import ./asus/rog-strix/x570e; - asus-zenbook-ux371 = import ./asus/zenbook/ux371; - asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; - asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; - asus-zephyrus-ga402x = import ./asus/zephyrus/ga402x; - asus-zephyrus-ga402x-amdgpu = import ./asus/zephyrus/ga402x/amdgpu; - asus-zephyrus-ga402x-nvidia = import ./asus/zephyrus/ga402x/nvidia; - asus-zephyrus-ga502 = import ./asus/zephyrus/ga502; - asus-zephyrus-ga503 = import ./asus/zephyrus/ga503; - asus-zephyrus-gu603h = import ./asus/zephyrus/gu603h; - asus-zephyrus-gu605my = import ./asus/zephyrus/gu605my; - beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; - chuwi-minibook-x = import ./chuwi/minibook-x; - deciso-dec = import ./deciso/dec; - dell-e7240 = import ./dell/e7240; - dell-g3-3779 = import ./dell/g3/3779; - dell-inspiron-14-5420 = import ./dell/inspiron/14-5420; - dell-inspiron-5509 = import ./dell/inspiron/5509; - dell-inspiron-5515 = import ./dell/inspiron/5515; - dell-inspiron-7405 = import ./dell/inspiron/7405; - dell-latitude-3340 = import ./dell/latitude/3340; - dell-latitude-3480 = import ./dell/latitude/3480; - dell-latitude-5520 = import ./dell/latitude/5520; - dell-latitude-7280 = import ./dell/latitude/7280; - dell-latitude-7390 = import ./dell/latitude/7390; - dell-latitude-7430 = import ./dell/latitude/7430; - dell-latitude-7490 = import ./dell/latitude/7490; - dell-latitude-9430 = import ./dell/latitude/9430; - dell-optiplex-3050 = import ./dell/optiplex/3050; - 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; - dell-xps-13-9333 = import ./dell/xps/13-9333; - dell-xps-13-9343 = import ./dell/xps/13-9343; - dell-xps-13-9350 = import ./dell/xps/13-9350; - dell-xps-13-9360 = import ./dell/xps/13-9360; - dell-xps-13-9370 = import ./dell/xps/13-9370; - dell-xps-13-9380 = import ./dell/xps/13-9380; - dell-xps-15-7590 = import ./dell/xps/15-7590; - 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; - dell-xps-15-9550-nvidia = import ./dell/xps/15-9550/nvidia; - dell-xps-15-9560 = import ./dell/xps/15-9560; - dell-xps-15-9560-intel = import ./dell/xps/15-9560/intel; - dell-xps-15-9560-nvidia = import ./dell/xps/15-9560/nvidia; - dell-xps-15-9570 = import ./dell/xps/15-9570; - dell-xps-15-9570-intel = import ./dell/xps/15-9570/intel; - dell-xps-15-9570-nvidia = import ./dell/xps/15-9570/nvidia; - dell-xps-17-9700-intel = import ./dell/xps/17-9700/intel; - dell-xps-17-9700-nvidia = import ./dell/xps/17-9700/nvidia; - dell-xps-17-9710-intel = import ./dell/xps/17-9710/intel; - framework = import ./framework; - framework-11th-gen-intel = import ./framework/13-inch/11th-gen-intel; - framework-12th-gen-intel = import ./framework/13-inch/12th-gen-intel; - framework-13th-gen-intel = import ./framework/13-inch/13th-gen-intel; - framework-13-7040-amd = import ./framework/13-inch/7040-amd; - framework-16-7040-amd = import ./framework/16-inch/7040-amd; - friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; - friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; - focus-m2-gen1 = import ./focus/m2/gen1; - gigabyte-b550 = import ./gigabyte/b550; - google-pixelbook = import ./google/pixelbook; - gpd-micropc = import ./gpd/micropc; - gpd-p2-max = import ./gpd/p2-max; - gpd-pocket-3 = import ./gpd/pocket-3; - gpd-win-2 = import ./gpd/win-2; - gpd-win-max-2-2023 = import ./gpd/win-max-2/2023; - gpd-win-mini-2024 = import ./gpd/win-mini/2024; - hp-elitebook-2560p = import ./hp/elitebook/2560p; - hp-elitebook-830g6 = import ./hp/elitebook/830/g6; - hp-elitebook-845g7 = import ./hp/elitebook/845/g7; - hp-elitebook-845g8 = import ./hp/elitebook/845/g8; - hp-elitebook-845g9 = import ./hp/elitebook/845/g9; - huawei-machc-wa = import ./huawei/machc-wa; - hp-notebook-14-df0023 = import ./hp/notebook/14-df0023; - intel-nuc-8i7beh = import ./intel/nuc/8i7beh; - lenovo-ideapad-15alc6 = import ./lenovo/ideapad/15alc6; - lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; - lenovo-ideapad-15ach6 = import ./lenovo/ideapad/15ach6; - lenovo-ideapad-16ach6 = import ./lenovo/ideapad/16ach6; - lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; - lenovo-ideapad-slim-5 = import ./lenovo/ideapad/slim-5; - lenovo-ideapad-s145-15api = import ./lenovo/ideapad/s145-15api; - lenovo-legion-15ach6 = import ./lenovo/legion/15ach6; - lenovo-legion-15ach6h = import ./lenovo/legion/15ach6h; - lenovo-legion-15arh05h = import ./lenovo/legion/15arh05h; - lenovo-legion-16ach6h = import ./lenovo/legion/16ach6h; - lenovo-legion-16ach6h-hybrid = import ./lenovo/legion/16ach6h/hybrid; - lenovo-legion-16ach6h-nvidia = import ./lenovo/legion/16ach6h/nvidia; - lenovo-legion-16achg6-hybrid = import ./lenovo/legion/16achg6/hybrid; - lenovo-legion-16achg6-nvidia = import ./lenovo/legion/16achg6/nvidia; - lenovo-legion-16aph8 = import ./lenovo/legion/16aph8; - lenovo-legion-16arha7 = import ./lenovo/legion/16arha7; - lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; - lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h; - lenovo-legion-t526amr5 = import ./lenovo/legion/t526amr5; - lenovo-legion-y530-15ich = import ./lenovo/legion/15ich; - lenovo-thinkpad = import ./lenovo/thinkpad; - lenovo-thinkpad-a475 = import ./lenovo/thinkpad/a475; - lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; - lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel; - lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; - lenovo-thinkpad-e495 = import ./lenovo/thinkpad/e495; - lenovo-thinkpad-l13 = import ./lenovo/thinkpad/l13; - lenovo-thinkpad-l13-yoga = import ./lenovo/thinkpad/l13/yoga; - lenovo-thinkpad-l14-amd = import ./lenovo/thinkpad/l14/amd; - lenovo-thinkpad-l14-intel = import ./lenovo/thinkpad/l14/intel; - lenovo-thinkpad-l480 = import ./lenovo/thinkpad/l480; - lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1; - lenovo-thinkpad-p1-gen3 = import ./lenovo/thinkpad/p1/3th-gen; - lenovo-thinkpad-p14s-amd-gen1 = import ./lenovo/thinkpad/p14s/amd/gen1; - lenovo-thinkpad-p14s-amd-gen2 = import ./lenovo/thinkpad/p14s/amd/gen2; - lenovo-thinkpad-p14s-amd-gen3 = import ./lenovo/thinkpad/p14s/amd/gen3; - lenovo-thinkpad-p14s-amd-gen4 = import ./lenovo/thinkpad/p14s/amd/gen4; - lenovo-thinkpad-p14s-intel-gen3 = import ./lenovo/thinkpad/p14s/intel/gen3; - lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1; - lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50; - lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51; - lenovo-thinkpad-p52 = import ./lenovo/thinkpad/p52; - lenovo-thinkpad-p53 = import ./lenovo/thinkpad/p53; - lenovo-thinkpad-t14 = import ./lenovo/thinkpad/t14; - lenovo-thinkpad-t14-amd-gen1 = import ./lenovo/thinkpad/t14/amd/gen1; - lenovo-thinkpad-t14-amd-gen2 = import ./lenovo/thinkpad/t14/amd/gen2; - lenovo-thinkpad-t14-amd-gen3 = import ./lenovo/thinkpad/t14/amd/gen3; - lenovo-thinkpad-t14-amd-gen4 = import ./lenovo/thinkpad/t14/amd/gen4; - lenovo-thinkpad-t14-amd-gen5 = import ./lenovo/thinkpad/t14/amd/gen5; - lenovo-thinkpad-t14s = import ./lenovo/thinkpad/t14s; - lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1; - lenovo-thinkpad-t14s-amd-gen4 = import ./lenovo/thinkpad/t14s/amd/gen4; - lenovo-thinkpad-t410 = import ./lenovo/thinkpad/t410; - lenovo-thinkpad-t420 = import ./lenovo/thinkpad/t420; - lenovo-thinkpad-t430 = import ./lenovo/thinkpad/t430; - lenovo-thinkpad-t440p = import ./lenovo/thinkpad/t440p; - lenovo-thinkpad-t440s = import ./lenovo/thinkpad/t440s; - lenovo-thinkpad-t450s = import ./lenovo/thinkpad/t450s; - lenovo-thinkpad-t460 = import ./lenovo/thinkpad/t460; - lenovo-thinkpad-t460p = import ./lenovo/thinkpad/t460p; - lenovo-thinkpad-t460s = import ./lenovo/thinkpad/t460s; - lenovo-thinkpad-t470s = import ./lenovo/thinkpad/t470s; - lenovo-thinkpad-t480 = import ./lenovo/thinkpad/t480; - lenovo-thinkpad-t480s = import ./lenovo/thinkpad/t480s; - lenovo-thinkpad-t490 = import ./lenovo/thinkpad/t490; - lenovo-thinkpad-t495 = import ./lenovo/thinkpad/t495; - lenovo-thinkpad-t520 = import ./lenovo/thinkpad/t520; - lenovo-thinkpad-w520 = import ./lenovo/thinkpad/w520; - lenovo-thinkpad-t550 = import ./lenovo/thinkpad/t550; - lenovo-thinkpad-t590 = import ./lenovo/thinkpad/t590; - lenovo-thinkpad-x1 = import ./lenovo/thinkpad/x1; - lenovo-thinkpad-x1-yoga = import ./lenovo/thinkpad/x1/yoga; - lenovo-thinkpad-x1-yoga-7th-gen = import ./lenovo/thinkpad/x1/yoga/7th-gen; - lenovo-thinkpad-x1-6th-gen = import ./lenovo/thinkpad/x1/6th-gen; - lenovo-thinkpad-x1-7th-gen = import ./lenovo/thinkpad/x1/7th-gen; - lenovo-thinkpad-x1-9th-gen = import ./lenovo/thinkpad/x1/9th-gen; - lenovo-thinkpad-x1-10th-gen = import ./lenovo/thinkpad/x1/10th-gen; - lenovo-thinkpad-x1-11th-gen = import ./lenovo/thinkpad/x1/11th-gen; - lenovo-thinkpad-x1-12th-gen = import ./lenovo/thinkpad/x1/12th-gen; - lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme; - lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2; - lenovo-thinkpad-x1-extreme-gen4 = import ./lenovo/thinkpad/x1-extreme/gen4; - lenovo-thinkpad-x1-nano = import ./lenovo/thinkpad/x1-nano; - lenovo-thinkpad-x1-nano-gen1 = import ./lenovo/thinkpad/x1-nano/gen1; - lenovo-thinkpad-x13 = import ./lenovo/thinkpad/x13/intel; - lenovo-thinkpad-x13-amd = import ./lenovo/thinkpad/x13/amd; - lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13/yoga; - lenovo-thinkpad-x13-yoga-3th-gen = import ./lenovo/thinkpad/x13/yoga/3th-gen; - lenovo-thinkpad-x140e = import ./lenovo/thinkpad/x140e; - lenovo-thinkpad-x200s = import ./lenovo/thinkpad/x200s; - lenovo-thinkpad-x220 = import ./lenovo/thinkpad/x220; - lenovo-thinkpad-x230 = import ./lenovo/thinkpad/x230; - lenovo-thinkpad-x250 = import ./lenovo/thinkpad/x250; - lenovo-thinkpad-x260 = import ./lenovo/thinkpad/x260; - lenovo-thinkpad-x270 = import ./lenovo/thinkpad/x270; - lenovo-thinkpad-x280 = import ./lenovo/thinkpad/x280; - lenovo-thinkpad-x390 = import ./lenovo/thinkpad/x390; - lenovo-thinkpad-z = import ./lenovo/thinkpad/z; - lenovo-thinkpad-z13-gen1 = import ./lenovo/thinkpad/z/gen1/z13; - lenovo-thinkpad-z13-gen2 = import ./lenovo/thinkpad/z/gen2/z13; - lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; - lenovo-yoga-7-14ARH7 = import ./lenovo/yoga/7/14ARH7; - lenovo-yoga-7-14ARH7-amdgpu = import ./lenovo/yoga/7/14ARH7/amdgpu; - lenovo-yoga-7-14ARH7-nvidia = import ./lenovo/yoga/7/14ARH7/nvidia; - lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8; - letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; - malibal-aon-s1-intel = import ./malibal/aon/s1; - microchip-icicle-kit = import ./microchip/icicle-kit; - microsoft-surface-go = import ./microsoft/surface/surface-go; - microsoft-surface-pro-intel = import ./microsoft/surface/surface-pro-intel; - microsoft-surface-laptop-amd = import ./microsoft/surface/surface-laptop-amd; - microsoft-surface-common = import ./microsoft/surface/common; - microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; - microsoft-surface-pro-9 = import ./microsoft/surface-pro/9; - milkv-pioneer = import ./milkv/pioneer; - morefine-m600 = import ./morefine/m600; - msi-b350-tomahawk = import ./msi/b350-tomahawk; - msi-b550-a-pro = import ./msi/b550-a-pro; - msi-gs60 = import ./msi/gs60; - msi-gl62 = import ./msi/gl62; - msi-gl65-10SDR-492 = import ./msi/gl65/10SDR-492; - nxp-imx8mp-evk = import ./nxp/imx8mp-evk; - nxp-imx8mq-evk = import ./nxp/imx8mq-evk; - nxp-imx8qm-mek = import ./nxp/imx8qm-mek; - hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; - hardkernel-odroid-h3 = import ./hardkernel/odroid-h3; - omen-14-fb0798ng = import ./omen/14-fb0798ng; - omen-15-en0010ca = import ./omen/15-en0010ca; - omen-16-n0005ne = import ./omen/16-n0005ne; - omen-16-n0280nd = import ./omen/16-n0280nd; - omen-15-en1007sa = import ./omen/15-en1007sa; - omen-15-en0002np = import ./omen/15-en0002np; - onenetbook-4 = import ./onenetbook/4; - olimex-teres_i = import ./olimex/teres_i; - pcengines-apu = import ./pcengines/apu; - pine64-pinebook-pro = import ./pine64/pinebook-pro; - pine64-rockpro64 = import ./pine64/rockpro64; - pine64-star64 = import ./pine64/star64; - protectli-vp4670 = import ./protectli/vp4670; - purism-librem-13v3 = import ./purism/librem/13v3; - purism-librem-15v3 = import ./purism/librem/15v3; - purism-librem-5r4 = import ./purism/librem/5r4; - raspberry-pi-2 = import ./raspberry-pi/2; - raspberry-pi-3 = import ./raspberry-pi/3; - raspberry-pi-4 = import ./raspberry-pi/4; - raspberry-pi-5 = import ./raspberry-pi/5; - kobol-helios4 = import ./kobol/helios4; - samsung-np900x3c = import ./samsung/np900x3c; - starfive-visionfive-v1 = import ./starfive/visionfive/v1; - starfive-visionfive-2 = import ./starfive/visionfive/v2; - starlabs-starlite-i5 = import ./starlabs/starlite/i5; - supermicro = import ./supermicro; - supermicro-a1sri-2758f = import ./supermicro/a1sri-2758f; - supermicro-m11sdv-8c-ln4f = import ./supermicro/m11sdv-8c-ln4f; - supermicro-x10sll-f = import ./supermicro/x10sll-f; - supermicro-x12scz-tln4f = import ./supermicro/x12scz-tln4f; - system76 = import ./system76; - system76-gaze18 = import ./system76/gaze18; - system76-darp6 = import ./system76/darp6; - toshiba-swanky = import ./toshiba/swanky; - tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; - tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7; - tuxedo-pulse-14-gen3 = import ./tuxedo/pulse/14/gen3; - tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; + nixosModules = + let + deprecated = + issue: name: value: + builtins.trace "warning: ${name} flake output is deprecated and will be removed. See https://github.com/NixOS/nixos-hardware/issues/${issue} for more information" value; + import = path: path; # let the module system know what we are exporting + in + { + acer-aspire-4810t = import ./acer/aspire/4810t; + airis-n990 = import ./airis/n990; + apple-imac-14-2 = import ./apple/imac/14-2; + apple-imac-18-2 = import ./apple/imac/18-2; + apple-macbook-air-3 = import ./apple/macbook-air/3; + apple-macbook-air-4 = import ./apple/macbook-air/4; + apple-macbook-air-6 = import ./apple/macbook-air/6; + apple-macbook-pro = import ./apple/macbook-pro; + apple-macbook-pro-8-1 = import ./apple/macbook-pro/8-1; + apple-macbook-pro-10-1 = import ./apple/macbook-pro/10-1; + apple-macbook-pro-11-5 = import ./apple/macbook-pro/11-5; + apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; + apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1; + apple-macmini-4-1 = import ./apple/macmini/4; + apple-t2 = import ./apple/t2; + asus-battery = import ./asus/battery.nix; + asus-ally-rc71l = import ./asus/ally/rc71l; + asus-fx504gd = import ./asus/fx504gd; + asus-fx506hm = import ./asus/fx506hm; + asus-fa507nv = import ./asus/fa507nv; + asus-fa507rm = import ./asus/fa507rm; + asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace; + asus-rog-strix-g513im = import ./asus/rog-strix/g513im; + asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie; + asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; + asus-rog-strix-x570e = import ./asus/rog-strix/x570e; + asus-zenbook-ux371 = import ./asus/zenbook/ux371; + asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; + asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; + asus-zephyrus-ga402x = import ./asus/zephyrus/ga402x; + asus-zephyrus-ga402x-amdgpu = import ./asus/zephyrus/ga402x/amdgpu; + asus-zephyrus-ga402x-nvidia = import ./asus/zephyrus/ga402x/nvidia; + asus-zephyrus-ga502 = import ./asus/zephyrus/ga502; + asus-zephyrus-ga503 = import ./asus/zephyrus/ga503; + asus-zephyrus-gu603h = import ./asus/zephyrus/gu603h; + asus-zephyrus-gu605my = import ./asus/zephyrus/gu605my; + beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; + chuwi-minibook-x = import ./chuwi/minibook-x; + deciso-dec = import ./deciso/dec; + dell-e7240 = import ./dell/e7240; + dell-g3-3779 = import ./dell/g3/3779; + dell-inspiron-14-5420 = import ./dell/inspiron/14-5420; + dell-inspiron-5509 = import ./dell/inspiron/5509; + dell-inspiron-5515 = import ./dell/inspiron/5515; + dell-inspiron-7405 = import ./dell/inspiron/7405; + dell-latitude-3340 = import ./dell/latitude/3340; + dell-latitude-3480 = import ./dell/latitude/3480; + dell-latitude-5520 = import ./dell/latitude/5520; + dell-latitude-7280 = import ./dell/latitude/7280; + dell-latitude-7390 = import ./dell/latitude/7390; + dell-latitude-7430 = import ./dell/latitude/7430; + dell-latitude-7490 = import ./dell/latitude/7490; + dell-latitude-9430 = import ./dell/latitude/9430; + dell-optiplex-3050 = import ./dell/optiplex/3050; + 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; + dell-xps-13-9333 = import ./dell/xps/13-9333; + dell-xps-13-9343 = import ./dell/xps/13-9343; + dell-xps-13-9350 = import ./dell/xps/13-9350; + dell-xps-13-9360 = import ./dell/xps/13-9360; + dell-xps-13-9370 = import ./dell/xps/13-9370; + dell-xps-13-9380 = import ./dell/xps/13-9380; + dell-xps-15-7590 = import ./dell/xps/15-7590; + 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; + dell-xps-15-9550-nvidia = import ./dell/xps/15-9550/nvidia; + dell-xps-15-9560 = import ./dell/xps/15-9560; + dell-xps-15-9560-intel = import ./dell/xps/15-9560/intel; + dell-xps-15-9560-nvidia = import ./dell/xps/15-9560/nvidia; + dell-xps-15-9570 = import ./dell/xps/15-9570; + dell-xps-15-9570-intel = import ./dell/xps/15-9570/intel; + dell-xps-15-9570-nvidia = import ./dell/xps/15-9570/nvidia; + dell-xps-17-9700-intel = import ./dell/xps/17-9700/intel; + dell-xps-17-9700-nvidia = import ./dell/xps/17-9700/nvidia; + dell-xps-17-9710-intel = import ./dell/xps/17-9710/intel; + framework = import ./framework; + framework-11th-gen-intel = import ./framework/13-inch/11th-gen-intel; + framework-12th-gen-intel = import ./framework/13-inch/12th-gen-intel; + framework-13th-gen-intel = import ./framework/13-inch/13th-gen-intel; + framework-13-7040-amd = import ./framework/13-inch/7040-amd; + framework-16-7040-amd = import ./framework/16-inch/7040-amd; + friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; + friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; + focus-m2-gen1 = import ./focus/m2/gen1; + gigabyte-b550 = import ./gigabyte/b550; + google-pixelbook = import ./google/pixelbook; + gpd-micropc = import ./gpd/micropc; + gpd-p2-max = import ./gpd/p2-max; + gpd-pocket-3 = import ./gpd/pocket-3; + gpd-win-2 = import ./gpd/win-2; + gpd-win-max-2-2023 = import ./gpd/win-max-2/2023; + gpd-win-mini-2024 = import ./gpd/win-mini/2024; + hp-elitebook-2560p = import ./hp/elitebook/2560p; + hp-elitebook-830g6 = import ./hp/elitebook/830/g6; + hp-elitebook-845g7 = import ./hp/elitebook/845/g7; + hp-elitebook-845g8 = import ./hp/elitebook/845/g8; + hp-elitebook-845g9 = import ./hp/elitebook/845/g9; + huawei-machc-wa = import ./huawei/machc-wa; + hp-notebook-14-df0023 = import ./hp/notebook/14-df0023; + intel-nuc-8i7beh = import ./intel/nuc/8i7beh; + lenovo-ideapad-15alc6 = import ./lenovo/ideapad/15alc6; + lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; + lenovo-ideapad-15ach6 = import ./lenovo/ideapad/15ach6; + lenovo-ideapad-16ach6 = import ./lenovo/ideapad/16ach6; + lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; + lenovo-ideapad-slim-5 = import ./lenovo/ideapad/slim-5; + lenovo-ideapad-s145-15api = import ./lenovo/ideapad/s145-15api; + lenovo-legion-15ach6 = import ./lenovo/legion/15ach6; + lenovo-legion-15ach6h = import ./lenovo/legion/15ach6h; + lenovo-legion-15arh05h = import ./lenovo/legion/15arh05h; + lenovo-legion-16ach6h = import ./lenovo/legion/16ach6h; + lenovo-legion-16ach6h-hybrid = import ./lenovo/legion/16ach6h/hybrid; + lenovo-legion-16ach6h-nvidia = import ./lenovo/legion/16ach6h/nvidia; + lenovo-legion-16achg6-hybrid = import ./lenovo/legion/16achg6/hybrid; + lenovo-legion-16achg6-nvidia = import ./lenovo/legion/16achg6/nvidia; + lenovo-legion-16aph8 = import ./lenovo/legion/16aph8; + lenovo-legion-16arha7 = import ./lenovo/legion/16arha7; + lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; + lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h; + lenovo-legion-t526amr5 = import ./lenovo/legion/t526amr5; + lenovo-legion-y530-15ich = import ./lenovo/legion/15ich; + lenovo-thinkpad = import ./lenovo/thinkpad; + lenovo-thinkpad-a475 = import ./lenovo/thinkpad/a475; + lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; + lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel; + lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; + lenovo-thinkpad-e495 = import ./lenovo/thinkpad/e495; + lenovo-thinkpad-l13 = import ./lenovo/thinkpad/l13; + lenovo-thinkpad-l13-yoga = import ./lenovo/thinkpad/l13/yoga; + lenovo-thinkpad-l14-amd = import ./lenovo/thinkpad/l14/amd; + lenovo-thinkpad-l14-intel = import ./lenovo/thinkpad/l14/intel; + lenovo-thinkpad-l480 = import ./lenovo/thinkpad/l480; + lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1; + lenovo-thinkpad-p1-gen3 = import ./lenovo/thinkpad/p1/3th-gen; + lenovo-thinkpad-p14s-amd-gen1 = import ./lenovo/thinkpad/p14s/amd/gen1; + lenovo-thinkpad-p14s-amd-gen2 = import ./lenovo/thinkpad/p14s/amd/gen2; + lenovo-thinkpad-p14s-amd-gen3 = import ./lenovo/thinkpad/p14s/amd/gen3; + lenovo-thinkpad-p14s-amd-gen4 = import ./lenovo/thinkpad/p14s/amd/gen4; + lenovo-thinkpad-p14s-intel-gen3 = import ./lenovo/thinkpad/p14s/intel/gen3; + lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1; + lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50; + lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51; + lenovo-thinkpad-p52 = import ./lenovo/thinkpad/p52; + lenovo-thinkpad-p53 = import ./lenovo/thinkpad/p53; + lenovo-thinkpad-t14 = import ./lenovo/thinkpad/t14; + lenovo-thinkpad-t14-amd-gen1 = import ./lenovo/thinkpad/t14/amd/gen1; + lenovo-thinkpad-t14-amd-gen2 = import ./lenovo/thinkpad/t14/amd/gen2; + lenovo-thinkpad-t14-amd-gen3 = import ./lenovo/thinkpad/t14/amd/gen3; + lenovo-thinkpad-t14-amd-gen4 = import ./lenovo/thinkpad/t14/amd/gen4; + lenovo-thinkpad-t14-amd-gen5 = import ./lenovo/thinkpad/t14/amd/gen5; + lenovo-thinkpad-t14s = import ./lenovo/thinkpad/t14s; + lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1; + lenovo-thinkpad-t14s-amd-gen4 = import ./lenovo/thinkpad/t14s/amd/gen4; + lenovo-thinkpad-t410 = import ./lenovo/thinkpad/t410; + lenovo-thinkpad-t420 = import ./lenovo/thinkpad/t420; + lenovo-thinkpad-t430 = import ./lenovo/thinkpad/t430; + lenovo-thinkpad-t440p = import ./lenovo/thinkpad/t440p; + lenovo-thinkpad-t440s = import ./lenovo/thinkpad/t440s; + lenovo-thinkpad-t450s = import ./lenovo/thinkpad/t450s; + lenovo-thinkpad-t460 = import ./lenovo/thinkpad/t460; + lenovo-thinkpad-t460p = import ./lenovo/thinkpad/t460p; + lenovo-thinkpad-t460s = import ./lenovo/thinkpad/t460s; + lenovo-thinkpad-t470s = import ./lenovo/thinkpad/t470s; + lenovo-thinkpad-t480 = import ./lenovo/thinkpad/t480; + lenovo-thinkpad-t480s = import ./lenovo/thinkpad/t480s; + lenovo-thinkpad-t490 = import ./lenovo/thinkpad/t490; + lenovo-thinkpad-t495 = import ./lenovo/thinkpad/t495; + lenovo-thinkpad-t520 = import ./lenovo/thinkpad/t520; + lenovo-thinkpad-w520 = import ./lenovo/thinkpad/w520; + lenovo-thinkpad-t550 = import ./lenovo/thinkpad/t550; + lenovo-thinkpad-t590 = import ./lenovo/thinkpad/t590; + lenovo-thinkpad-x1 = import ./lenovo/thinkpad/x1; + lenovo-thinkpad-x1-yoga = import ./lenovo/thinkpad/x1/yoga; + lenovo-thinkpad-x1-yoga-7th-gen = import ./lenovo/thinkpad/x1/yoga/7th-gen; + lenovo-thinkpad-x1-6th-gen = import ./lenovo/thinkpad/x1/6th-gen; + lenovo-thinkpad-x1-7th-gen = import ./lenovo/thinkpad/x1/7th-gen; + lenovo-thinkpad-x1-9th-gen = import ./lenovo/thinkpad/x1/9th-gen; + lenovo-thinkpad-x1-10th-gen = import ./lenovo/thinkpad/x1/10th-gen; + lenovo-thinkpad-x1-11th-gen = import ./lenovo/thinkpad/x1/11th-gen; + lenovo-thinkpad-x1-12th-gen = import ./lenovo/thinkpad/x1/12th-gen; + lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme; + lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2; + lenovo-thinkpad-x1-extreme-gen4 = import ./lenovo/thinkpad/x1-extreme/gen4; + lenovo-thinkpad-x1-nano = import ./lenovo/thinkpad/x1-nano; + lenovo-thinkpad-x1-nano-gen1 = import ./lenovo/thinkpad/x1-nano/gen1; + lenovo-thinkpad-x13 = import ./lenovo/thinkpad/x13/intel; + lenovo-thinkpad-x13-amd = import ./lenovo/thinkpad/x13/amd; + lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13/yoga; + lenovo-thinkpad-x13-yoga-3th-gen = import ./lenovo/thinkpad/x13/yoga/3th-gen; + lenovo-thinkpad-x140e = import ./lenovo/thinkpad/x140e; + lenovo-thinkpad-x200s = import ./lenovo/thinkpad/x200s; + lenovo-thinkpad-x220 = import ./lenovo/thinkpad/x220; + lenovo-thinkpad-x230 = import ./lenovo/thinkpad/x230; + lenovo-thinkpad-x250 = import ./lenovo/thinkpad/x250; + lenovo-thinkpad-x260 = import ./lenovo/thinkpad/x260; + lenovo-thinkpad-x270 = import ./lenovo/thinkpad/x270; + lenovo-thinkpad-x280 = import ./lenovo/thinkpad/x280; + lenovo-thinkpad-x390 = import ./lenovo/thinkpad/x390; + lenovo-thinkpad-z = import ./lenovo/thinkpad/z; + lenovo-thinkpad-z13-gen1 = import ./lenovo/thinkpad/z/gen1/z13; + lenovo-thinkpad-z13-gen2 = import ./lenovo/thinkpad/z/gen2/z13; + lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; + lenovo-yoga-7-14ARH7 = import ./lenovo/yoga/7/14ARH7; + lenovo-yoga-7-14ARH7-amdgpu = import ./lenovo/yoga/7/14ARH7/amdgpu; + lenovo-yoga-7-14ARH7-nvidia = import ./lenovo/yoga/7/14ARH7/nvidia; + lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8; + letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; + malibal-aon-s1-intel = import ./malibal/aon/s1; + microchip-icicle-kit = import ./microchip/icicle-kit; + microsoft-surface-go = import ./microsoft/surface/surface-go; + microsoft-surface-pro-intel = import ./microsoft/surface/surface-pro-intel; + microsoft-surface-laptop-amd = import ./microsoft/surface/surface-laptop-amd; + microsoft-surface-common = import ./microsoft/surface/common; + microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; + microsoft-surface-pro-9 = import ./microsoft/surface-pro/9; + milkv-pioneer = import ./milkv/pioneer; + morefine-m600 = import ./morefine/m600; + msi-b350-tomahawk = import ./msi/b350-tomahawk; + msi-b550-a-pro = import ./msi/b550-a-pro; + msi-gs60 = import ./msi/gs60; + msi-gl62 = import ./msi/gl62; + msi-gl65-10SDR-492 = import ./msi/gl65/10SDR-492; + nxp-imx8mp-evk = import ./nxp/imx8mp-evk; + nxp-imx8mq-evk = import ./nxp/imx8mq-evk; + nxp-imx8qm-mek = import ./nxp/imx8qm-mek; + hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; + hardkernel-odroid-h3 = import ./hardkernel/odroid-h3; + omen-14-fb0798ng = import ./omen/14-fb0798ng; + omen-15-en0010ca = import ./omen/15-en0010ca; + omen-16-n0005ne = import ./omen/16-n0005ne; + omen-16-n0280nd = import ./omen/16-n0280nd; + omen-15-en1007sa = import ./omen/15-en1007sa; + omen-15-en0002np = import ./omen/15-en0002np; + onenetbook-4 = import ./onenetbook/4; + olimex-teres_i = import ./olimex/teres_i; + pcengines-apu = import ./pcengines/apu; + pine64-pinebook-pro = import ./pine64/pinebook-pro; + pine64-rockpro64 = import ./pine64/rockpro64; + pine64-star64 = import ./pine64/star64; + protectli-vp4670 = import ./protectli/vp4670; + purism-librem-13v3 = import ./purism/librem/13v3; + purism-librem-15v3 = import ./purism/librem/15v3; + purism-librem-5r4 = import ./purism/librem/5r4; + raspberry-pi-2 = import ./raspberry-pi/2; + raspberry-pi-3 = import ./raspberry-pi/3; + raspberry-pi-4 = import ./raspberry-pi/4; + raspberry-pi-5 = import ./raspberry-pi/5; + kobol-helios4 = import ./kobol/helios4; + samsung-np900x3c = import ./samsung/np900x3c; + starfive-visionfive-v1 = import ./starfive/visionfive/v1; + starfive-visionfive-2 = import ./starfive/visionfive/v2; + starlabs-starlite-i5 = import ./starlabs/starlite/i5; + supermicro = import ./supermicro; + supermicro-a1sri-2758f = import ./supermicro/a1sri-2758f; + supermicro-m11sdv-8c-ln4f = import ./supermicro/m11sdv-8c-ln4f; + supermicro-x10sll-f = import ./supermicro/x10sll-f; + supermicro-x12scz-tln4f = import ./supermicro/x12scz-tln4f; + system76 = import ./system76; + system76-gaze18 = import ./system76/gaze18; + system76-darp6 = import ./system76/darp6; + toshiba-swanky = import ./toshiba/swanky; + tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; + tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7; + tuxedo-pulse-14-gen3 = import ./tuxedo/pulse/14/gen3; + tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; - common-cpu-amd = import ./common/cpu/amd; - common-cpu-amd-pstate = import ./common/cpu/amd/pstate.nix; - common-cpu-amd-zenpower = import ./common/cpu/amd/zenpower.nix; - common-cpu-amd-raphael-igpu = import ./common/cpu/amd/raphael/igpu.nix; - common-cpu-intel = import ./common/cpu/intel; - common-gpu-intel-comet-lake = deprecated "992" "common-gpu-intel-comet-lake" (import ./common/gpu/intel/comet-lake); - common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix; - common-gpu-intel-kaby-lake = deprecated "992" "common-gpu-intel-kaby-lake" (import ./common/gpu/intel/kaby-lake); - common-gpu-intel-sandy-bridge = deprecated "992" "common-gpu-intel-sandy-bridge" (import ./common/gpu/intel/sandy-bridge); - common-gpu-amd = import ./common/gpu/amd; - common-gpu-amd-sea-islands = import ./common/gpu/amd/sea-islands; - common-gpu-amd-southern-islands = import ./common/gpu/amd/southern-islands; - common-gpu-intel = import ./common/gpu/intel; - common-gpu-intel-disable = import ./common/gpu/intel/disable.nix; - common-gpu-nvidia = import ./common/gpu/nvidia/prime.nix; - common-gpu-nvidia-sync = import ./common/gpu/nvidia/prime-sync.nix; - common-gpu-nvidia-nonprime = import ./common/gpu/nvidia; - common-gpu-nvidia-disable = import ./common/gpu/nvidia/disable.nix; - common-hidpi = import ./common/hidpi.nix; - common-pc = import ./common/pc; - common-pc-hdd = import ./common/pc/hdd; - common-pc-laptop = import ./common/pc/laptop; - common-pc-laptop-acpi_call = import ./common/pc/laptop/acpi_call.nix; - common-pc-laptop-hdd = import ./common/pc/laptop/hdd; - common-pc-laptop-ssd = import ./common/pc/ssd; - common-pc-ssd = import ./common/pc/ssd; - }; + common-cpu-amd = import ./common/cpu/amd; + common-cpu-amd-pstate = import ./common/cpu/amd/pstate.nix; + common-cpu-amd-zenpower = import ./common/cpu/amd/zenpower.nix; + common-cpu-amd-raphael-igpu = import ./common/cpu/amd/raphael/igpu.nix; + common-cpu-intel = import ./common/cpu/intel; + common-gpu-intel-comet-lake = + deprecated "992" "common-gpu-intel-comet-lake" + (import ./common/gpu/intel/comet-lake); + common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix; + common-gpu-intel-kaby-lake = + deprecated "992" "common-gpu-intel-kaby-lake" + (import ./common/gpu/intel/kaby-lake); + common-gpu-intel-sandy-bridge = + deprecated "992" "common-gpu-intel-sandy-bridge" + (import ./common/gpu/intel/sandy-bridge); + common-gpu-amd = import ./common/gpu/amd; + common-gpu-amd-sea-islands = import ./common/gpu/amd/sea-islands; + common-gpu-amd-southern-islands = import ./common/gpu/amd/southern-islands; + common-gpu-intel = import ./common/gpu/intel; + common-gpu-intel-disable = import ./common/gpu/intel/disable.nix; + common-gpu-nvidia = import ./common/gpu/nvidia/prime.nix; + common-gpu-nvidia-sync = import ./common/gpu/nvidia/prime-sync.nix; + common-gpu-nvidia-nonprime = import ./common/gpu/nvidia; + common-gpu-nvidia-disable = import ./common/gpu/nvidia/disable.nix; + common-hidpi = import ./common/hidpi.nix; + common-pc = import ./common/pc; + common-pc-hdd = import ./common/pc/hdd; + common-pc-laptop = import ./common/pc/laptop; + common-pc-laptop-acpi_call = import ./common/pc/laptop/acpi_call.nix; + common-pc-laptop-hdd = import ./common/pc/laptop/hdd; + common-pc-laptop-ssd = import ./common/pc/ssd; + common-pc-ssd = import ./common/pc/ssd; + }; }; } From 23a4ea7a0d1c5cb52f6f3ace8ce5b85da9e3b9e6 Mon Sep 17 00:00:00 2001 From: flakeuser Date: Mon, 9 Sep 2024 05:49:52 -0700 Subject: [PATCH 1046/1476] lenovo-yoga-6-13ALC6: add mkDefault for bluetooth --- lenovo/yoga/6/13ALC6/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lenovo/yoga/6/13ALC6/default.nix b/lenovo/yoga/6/13ALC6/default.nix index a0cf015e..655e9de9 100644 --- a/lenovo/yoga/6/13ALC6/default.nix +++ b/lenovo/yoga/6/13ALC6/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, pkgs, ... }: { imports = [ @@ -9,15 +9,18 @@ boot.initrd.kernelModules = [ "ideapad_laptop" ]; # latest kernel needed to make wifi work - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; # energy savings - boot.kernelParams = ["mem_sleep_default=deep" "pcie_aspm.policy=powersupersave"]; + boot.kernelParams = [ + "mem_sleep_default=deep" + "pcie_aspm.policy=powersupersave" + ]; # Fix for unstable wifi connection on Lenovo laptops boot.extraModprobeConfig = '' options rtw89_pci disable_clkreq=y disable_aspm_l1=y disable_aspm_l1ss=y ''; - hardware.bluetooth.enable = true; + hardware.bluetooth.enable = lib.mkDefault true; } From 06c46e390287088e07eef9db3ff7ba20ef9cbdae Mon Sep 17 00:00:00 2001 From: Matei Dibu Date: Thu, 12 Sep 2024 19:20:09 +0300 Subject: [PATCH 1047/1476] dell-precision-5560: init --- dell/precision/5560/default.nix | 40 +++++++++++++++++++++++++++++++++ flake.nix | 1 + 2 files changed, 41 insertions(+) create mode 100644 dell/precision/5560/default.nix diff --git a/dell/precision/5560/default.nix b/dell/precision/5560/default.nix new file mode 100644 index 00000000..6c7ebadd --- /dev/null +++ b/dell/precision/5560/default.nix @@ -0,0 +1,40 @@ +{ + config, + lib, + ... +}: { + imports = [ + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ../../../common/cpu/intel + ../../../common/gpu/intel/tiger-lake + ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/turing + ]; + + hardware.enableRedistributableFirmware = lib.mkDefault true; + + boot = { + blacklistedKernelModules = ["nouveau"]; + kernelModules = ["kvm-intel"]; + kernelParams = ["i915.modeset=1"]; + }; + + hardware = { + graphics = { + enable = lib.mkDefault true; + enable32Bit = lib.mkDefault true; + }; + nvidia = { + package = config.boot.kernelPackages.nvidiaPackages.beta; + modesetting.enable = lib.mkDefault true; + open = lib.mkDefault false; + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + }; + + powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; +} diff --git a/flake.nix b/flake.nix index c146e968..21e9a428 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,7 @@ dell-poweredge-r7515 = import ./dell/poweredge/r7515; dell-precision-3541 = import ./dell/precision/3541; dell-precision-5530 = import ./dell/precision/5530; + dell-precision-5560 = import ./dell/precision/5560; 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; From 4ee6bd22af1bd75bb403e2f0e1af0161eb69cccc Mon Sep 17 00:00:00 2001 From: quatquatt <78693624+quatquatt@users.noreply.github.com> Date: Sat, 14 Sep 2024 19:14:19 -0400 Subject: [PATCH 1048/1476] framework: fix outdated documentation on fw-ectool --- framework/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/framework/README.md b/framework/README.md index 4adaefb3..5cba48c5 100644 --- a/framework/README.md +++ b/framework/README.md @@ -55,7 +55,6 @@ module for your model's configuration. Otherwise, it can be added alongside the ### fw-ectool -There is a `fw-ectool` package available in nixpkgs-unstable that provides some system configuration options via the EC. +There is a `fw-ectool` package available in nixpkgs that provides some system configuration options via the EC. This ectool only works with the Intel-based Framework laptops at present, as the Framework EC for AMD-based mainboards is based on the Zephyr port of the ChromeOS EC, which involves a slightly changed communication interface. - From 32f4fb0b11fcf3395317ca97a627aa39395d9bff Mon Sep 17 00:00:00 2001 From: Ali Rizvi Date: Sun, 15 Sep 2024 13:22:44 -0400 Subject: [PATCH 1049/1476] apple-t2: remove ifd and cleanup drv --- apple/t2/default.nix | 2 +- apple/t2/pkgs/tiny-dfr.nix | 51 - apple/t2/pkgs/tiny-dfr/Cargo.lock | 1933 ++++++++++++++++++++++++++++ apple/t2/pkgs/tiny-dfr/default.nix | 62 + 4 files changed, 1996 insertions(+), 52 deletions(-) delete mode 100644 apple/t2/pkgs/tiny-dfr.nix create mode 100644 apple/t2/pkgs/tiny-dfr/Cargo.lock create mode 100644 apple/t2/pkgs/tiny-dfr/default.nix diff --git a/apple/t2/default.nix b/apple/t2/default.nix index abe9cacc..4515ce72 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -24,7 +24,7 @@ let pipewirePackage = overrideAudioFiles pkgs.pipewire "spa/plugins/"; - tiny-dfrPackage = pkgs.callPackage ./pkgs/tiny-dfr.nix { }; + tiny-dfrPackage = pkgs.callPackage ./pkgs/tiny-dfr { }; apple-set-os-loader-installer = pkgs.stdenv.mkDerivation { name = "apple-set-os-loader-installer-1.0"; diff --git a/apple/t2/pkgs/tiny-dfr.nix b/apple/t2/pkgs/tiny-dfr.nix deleted file mode 100644 index ce4be0fe..00000000 --- a/apple/t2/pkgs/tiny-dfr.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ pkgs, fetchFromGitHub, rustPlatform, ... }: - -let - repo = fetchFromGitHub { - owner = "kekrby"; - repo = "tiny-dfr"; - rev = "8a5d413cb1dbe2a25b77a9e7f3cb5b9c88ef3ffb"; - hash = "sha256-l4D7aePz/CYpkRorrvsgIYrvSzoZl59OGcFGJqqJftk="; - }; - -in -rustPlatform.buildRustPackage rec { - pname = "tiny-dfr"; - version = repo.rev; - - src = repo; - - cargoLock.lockFile = "${src}/Cargo.lock"; - - nativeBuildInputs = with pkgs; [ - pkg-config - ]; - - buildInputs = with pkgs; [ - udev - glib - pango - cairo - gdk-pixbuf - libxml2 - libinput - ]; - - postPatch = '' - substituteInPlace src/main.rs --replace "/usr/share/tiny-dfr/" "$out/share/tiny-dfr/" - ''; - - postInstall = '' - mkdir -p $out/etc $out/share - - cp -r etc/udev $out/etc/ - cp -r share/tiny-dfr $out/share/ - ''; - - meta = with pkgs.lib; { - description = "The most basic dynamic function row daemon possible"; - homepage = "https://github.com/kekrby/tiny-dfr"; - license = with licenses; [ asl20 bsd3 cc0 isc lgpl21Plus mit mpl20 unicode-dfs-2016 asl20 asl20-llvm mit unlicense ]; - maintainers = []; - }; -} diff --git a/apple/t2/pkgs/tiny-dfr/Cargo.lock b/apple/t2/pkgs/tiny-dfr/Cargo.lock new file mode 100644 index 00000000..44393d85 --- /dev/null +++ b/apple/t2/pkgs/tiny-dfr/Cargo.lock @@ -0,0 +1,1933 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" +dependencies = [ + "memchr", +] + +[[package]] +name = "anyhow" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" + +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + +[[package]] +name = "bytemuck" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.32", +] + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "cairo-rs" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d859b656775a6b1dd078d3e5924884e6ea88aa649a7fdde03d5b2ec56ffcc10b" +dependencies = [ + "bitflags 2.4.0", + "cairo-sys-rs", + "freetype-rs", + "glib", + "libc", + "once_cell", + "thiserror", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd4d115132e01c0165e3bf5f56aedee8980b0b96ede4eb000b693c05a8adb8ff" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] + +[[package]] +name = "cfg-expr" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" +dependencies = [ + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "crossbeam-channel" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset 0.9.0", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "cssparser" +version = "0.29.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93d03419cb5950ccfd3daf3ff1c7a36ace64609a1a8746d493df1ca0afde0fa" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "matches", + "phf 0.10.1", + "proc-macro2", + "quote", + "smallvec", + "syn 1.0.109", +] + +[[package]] +name = "cssparser-macros" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" +dependencies = [ + "quote", + "syn 2.0.32", +] + +[[package]] +name = "data-url" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b319d1b62ffbd002e057f36bebd1f42b9f97927c9577461d855f3513c4289f" + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 1.0.109", +] + +[[package]] +name = "drm" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb1b703ffbc7ebd216eba7900008049a56ace55580ecb2ee7fa801e8d8be87" +dependencies = [ + "bitflags 2.4.0", + "bytemuck", + "drm-ffi", + "drm-fourcc", + "nix 0.27.1", +] + +[[package]] +name = "drm-ffi" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba7d1c19c4b6270e89d59fb27dc6d02a317c658a8a54e54781e1db9b5947595d" +dependencies = [ + "drm-sys", + "nix 0.27.1", +] + +[[package]] +name = "drm-fourcc" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aafbcdb8afc29c1a7ee5fbe53b5d62f4565b35a042a662ca9fecd0b54dae6f4" + +[[package]] +name = "drm-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a4f1c0468062a56cd5705f1e3b5409eb286d5596a2028ec8e947595d7e715ae" + +[[package]] +name = "dtoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" + +[[package]] +name = "dtoa-short" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbaceec3c6e4211c79e7b1800fb9680527106beb2f9c51904a3210c03a448c74" +dependencies = [ + "dtoa", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "encoding_rs" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +dependencies = [ + "num-traits", +] + +[[package]] +name = "form_urlencoded" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "freetype-rs" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59c337e64822dd56a3a83ed75a662a470736bdb3a9fabfb588dff276b94a4e0" +dependencies = [ + "bitflags 1.3.2", + "freetype-sys", + "libc", +] + +[[package]] +name = "freetype-sys" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643148ca6cbad6bec384b52fbe1968547d578c4efe83109e035c43a71734ff88" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "futf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" +dependencies = [ + "mac", + "new_debug_unreachable", +] + +[[package]] +name = "futures-channel" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" + +[[package]] +name = "futures-executor" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" + +[[package]] +name = "futures-macro" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.32", +] + +[[package]] +name = "futures-task" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" + +[[package]] +name = "futures-util" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +dependencies = [ + "futures-core", + "futures-macro", + "futures-task", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbc9c2ed73a81d556b65d08879ba4ee58808a6b1927ce915262185d6d547c6f3" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "glib", + "libc", + "once_cell", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "gio" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7884cba6b1c5db1607d970cadf44b14a43913d42bc68766eea6a5e2fe0891524" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib", + "libc", + "once_cell", + "pin-project-lite", + "smallvec", + "thiserror", +] + +[[package]] +name = "gio-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi", +] + +[[package]] +name = "glib" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "331156127e8166dd815cf8d2db3a5beb492610c716c03ee6db4f2d07092af0a7" +dependencies = [ + "bitflags 2.4.0", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "memchr", + "once_cell", + "smallvec", + "thiserror", +] + +[[package]] +name = "glib-macros" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "179643c50bf28d20d2f6eacd2531a88f2f5d9747dd0b86b8af1e8bb5dd0de3c0" +dependencies = [ + "heck", + "proc-macro-crate", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.32", +] + +[[package]] +name = "glib-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +dependencies = [ + "libc", + "system-deps", +] + +[[package]] +name = "gobject-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "input" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e74cd82cedcd66db78742a8337bdc48f188c4d2c12742cbc5cd85113f0b059" +dependencies = [ + "bitflags 1.3.2", + "input-sys", + "io-lifetimes", + "libc", + "log", + "udev", +] + +[[package]] +name = "input-linux" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f403224ea808abe6182696e3a36d9875c0e942ba7c99239f9ef545b96e35606" +dependencies = [ + "input-linux-sys", + "nix 0.26.4", + "serde", +] + +[[package]] +name = "input-linux-sys" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a687a25a4973027df9153753a5589f97fe1e958f694a34eea5606ae65299ab8" +dependencies = [ + "libc", + "nix 0.26.4", +] + +[[package]] +name = "input-sys" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f6c2a17e8aba7217660e32863af87b0febad811d4b8620ef76b386603fddc2" +dependencies = [ + "libc", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "language-tags" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" + +[[package]] +name = "librsvg" +version = "2.56.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7e30ebdab4ce0c632d361b54989020c2e15060f77728ca99b8e3daa4cc94f3c" +dependencies = [ + "byteorder", + "cairo-rs", + "cast", + "cssparser", + "data-url", + "encoding_rs", + "float-cmp", + "gdk-pixbuf", + "gio", + "glib", + "itertools", + "language-tags", + "libc", + "locale_config", + "markup5ever", + "nalgebra", + "num-traits", + "once_cell", + "pango", + "pangocairo", + "rayon", + "rctree", + "regex", + "rgb", + "selectors", + "string_cache", + "system-deps", + "tinyvec", + "url", + "xml5ever", +] + +[[package]] +name = "libudev-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "locale_config" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d2c35b16f4483f6c26f0e4e9550717a2f6575bcd6f12a53ff0c490a94a6934" +dependencies = [ + "lazy_static", + "objc", + "objc-foundation", + "regex", + "winapi", +] + +[[package]] +name = "lock_api" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "mac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" + +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + +[[package]] +name = "markup5ever" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016" +dependencies = [ + "log", + "phf 0.10.1", + "phf_codegen 0.10.0", + "string_cache", + "string_cache_codegen", + "tendril", +] + +[[package]] +name = "matches" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + +[[package]] +name = "matrixmultiply" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" +dependencies = [ + "autocfg", + "rawpointer", +] + +[[package]] +name = "memchr" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "nalgebra" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" +dependencies = [ + "approx", + "matrixmultiply", + "nalgebra-macros", + "num-complex", + "num-rational", + "num-traits", + "simba", + "typenum", +] + +[[package]] +name = "nalgebra-macros" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" + +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.7.1", + "pin-utils", +] + +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.4.0", + "cfg-if", + "libc", +] + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + +[[package]] +name = "num-complex" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + +[[package]] +name = "objc-foundation" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" +dependencies = [ + "block", + "objc", + "objc_id", +] + +[[package]] +name = "objc_id" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" +dependencies = [ + "objc", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "pango" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06a9e54b831d033206160096b825f2070cf5fda7e35167b1c01e9e774f9202d1" +dependencies = [ + "gio", + "glib", + "libc", + "once_cell", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "pangocairo" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57036589a9cfcacf83f9e606d15813fc6bf03f0e9e69aa2b5e3bb85af86b38a5" +dependencies = [ + "cairo-rs", + "glib", + "libc", + "pango", + "pangocairo-sys", +] + +[[package]] +name = "pangocairo-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc3c8ff676a37e7a72ec1d5fc029f91c407278083d2752784ff9f5188c108833" +dependencies = [ + "cairo-sys-rs", + "glib-sys", + "libc", + "pango-sys", + "system-deps", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "percent-encoding" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" + +[[package]] +name = "phf" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" +dependencies = [ + "phf_shared 0.8.0", +] + +[[package]] +name = "phf" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" +dependencies = [ + "phf_macros", + "phf_shared 0.10.0", + "proc-macro-hack", +] + +[[package]] +name = "phf_codegen" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" +dependencies = [ + "phf_generator 0.8.0", + "phf_shared 0.8.0", +] + +[[package]] +name = "phf_codegen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd" +dependencies = [ + "phf_generator 0.10.0", + "phf_shared 0.10.0", +] + +[[package]] +name = "phf_generator" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" +dependencies = [ + "phf_shared 0.8.0", + "rand 0.7.3", +] + +[[package]] +name = "phf_generator" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +dependencies = [ + "phf_shared 0.10.0", + "rand 0.8.5", +] + +[[package]] +name = "phf_macros" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" +dependencies = [ + "phf_generator 0.10.0", + "phf_shared 0.10.0", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "phf_shared" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" +dependencies = [ + "siphasher", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "privdrop" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bc12de3935536ed9b69488faea4450a298dac44179b54f71806e63f55034bf9" +dependencies = [ + "libc", + "nix 0.26.4", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-hack" +version = "0.5.20+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" + +[[package]] +name = "proc-macro2" +version = "1.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", + "rand_pcg", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.10", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_pcg" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "rayon" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + +[[package]] +name = "rctree" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f" + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "regex" +version = "1.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" + +[[package]] +name = "rgb" +version = "0.8.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20ec2d3e3fc7a92ced357df9cebd5a10b6fb2aa1ee797bf7e9ce2f17dffc8f59" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "safe_arch" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "selectors" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c37578180969d00692904465fb7f6b3d50b9a2b952b87c23d0e2e5cb5013416" +dependencies = [ + "bitflags 1.3.2", + "cssparser", + "derive_more", + "fxhash", + "log", + "phf 0.8.0", + "phf_codegen 0.8.0", + "precomputed-hash", + "servo_arc", + "smallvec", +] + +[[package]] +name = "semver" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" + +[[package]] +name = "serde" +version = "1.0.188" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.188" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.32", +] + +[[package]] +name = "serde_spanned" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" +dependencies = [ + "serde", +] + +[[package]] +name = "servo_arc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52aa42f8fdf0fed91e5ce7f23d8138441002fa31dca008acf47e6fd4721f741" +dependencies = [ + "nodrop", + "stable_deref_trait", +] + +[[package]] +name = "simba" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" +dependencies = [ + "approx", + "num-complex", + "num-traits", + "paste", + "wide", +] + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "string_cache" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot", + "phf_shared 0.10.0", + "precomputed-hash", + "serde", +] + +[[package]] +name = "string_cache_codegen" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" +dependencies = [ + "phf_generator 0.10.0", + "phf_shared 0.10.0", + "proc-macro2", + "quote", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "system-deps" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30c2de8a4d8f4b823d634affc9cd2a74ec98c53a756f317e529a48046cbf71f3" +dependencies = [ + "cfg-expr", + "heck", + "pkg-config", + "toml 0.7.8", + "version-compare", +] + +[[package]] +name = "target-lexicon" +version = "0.12.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" + +[[package]] +name = "tendril" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" +dependencies = [ + "futf", + "mac", + "utf-8", +] + +[[package]] +name = "thiserror" +version = "1.0.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.32", +] + +[[package]] +name = "tiny-dfr" +version = "0.2.0" +dependencies = [ + "anyhow", + "cairo-rs", + "drm", + "freetype-rs", + "input", + "input-linux", + "input-linux-sys", + "libc", + "librsvg", + "nix 0.27.1", + "pkg-config", + "privdrop", + "rand 0.8.5", + "serde", + "toml 0.8.8", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + +[[package]] +name = "toml" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.21.0", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "udev" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebdbbd670373442a12fe9ef7aeb53aec4147a5a27a00bbc3ab639f08f48191a" +dependencies = [ + "libc", + "libudev-sys", + "pkg-config", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" + +[[package]] +name = "unicode-ident" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "url" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "version-compare" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wide" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa469ffa65ef7e0ba0f164183697b89b854253fd31aeb92358b7b6155177d62f" +dependencies = [ + "bytemuck", + "safe_arch", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "winnow" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +dependencies = [ + "memchr", +] + +[[package]] +name = "xml5ever" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4034e1d05af98b51ad7214527730626f019682d797ba38b51689212118d8e650" +dependencies = [ + "log", + "mac", + "markup5ever", +] diff --git a/apple/t2/pkgs/tiny-dfr/default.nix b/apple/t2/pkgs/tiny-dfr/default.nix new file mode 100644 index 00000000..7ae2ce7e --- /dev/null +++ b/apple/t2/pkgs/tiny-dfr/default.nix @@ -0,0 +1,62 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + + pkg-config, + cairo, + gdk-pixbuf, + glib, + libinput, + libxml2, + pango, + udev, +}: +let + src = fetchFromGitHub { + owner = "kekrby"; + repo = "tiny-dfr"; + rev = "8a5d413cb1dbe2a25b77a9e7f3cb5b9c88ef3ffb"; + hash = "sha256-l4D7aePz/CYpkRorrvsgIYrvSzoZl59OGcFGJqqJftk="; + }; +in rustPlatform.buildRustPackage { + pname = "tiny-dfr"; + version = src.rev; + + inherit src; + + cargoLock.lockFile = ./Cargo.lock; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + udev + glib + pango + cairo + gdk-pixbuf + libxml2 + libinput + ]; + + postPatch = '' + substituteInPlace src/main.rs \ + --replace-fail "/usr/share/tiny-dfr/" "$out/share/tiny-dfr/" + ''; + + postInstall = '' + mkdir -p $out/etc $out/share + + cp -r etc/udev $out/etc/ + cp -r share/tiny-dfr $out/share/ + ''; + + meta = with lib; { + description = "The most basic dynamic function row daemon possible"; + homepage = "https://github.com/kekrby/tiny-dfr"; + license = with licenses; [ asl20 bsd3 cc0 isc lgpl21Plus mit mpl20 unicode-dfs-2016 asl20 asl20-llvm mit unlicense ]; + maintainers = []; + }; +} From b9ab7e57c5d1d456cdeef252d345f3bca9c55851 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 02:25:14 +0000 Subject: [PATCH 1050/1476] build(deps): bump cachix/install-nix-action from V27 to 28 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from V27 to 28. This release includes the previously tagged commit. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/V27...V28) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production ... 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 f27ceed4..e519e46b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,5 +9,5 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@V27 + - uses: cachix/install-nix-action@V28 - run: nix run ./tests#run . From 1c8c4f2c79468be23fcd7f87f8cee519e564cba2 Mon Sep 17 00:00:00 2001 From: Zach Coyle Date: Wed, 18 Sep 2024 21:55:11 -0400 Subject: [PATCH 1051/1476] apple/t2: bump kernel to 6.11 --- apple/t2/pkgs/linux-t2.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index 585c145c..4cf37d4a 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -2,19 +2,19 @@ , ... } @ args: let - version = "6.10.3"; + version = "6.11"; majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); patchRepo = fetchFromGitHub { owner = "t2linux"; repo = "linux-t2-patches"; - rev = "29d6f013088303623cd9f2c6f5951eb3455830a6"; - hash = "sha256-V0dakKRPC6Hj1I+SCiZXOCwtS0mZCCAsWnGtJnFlzxU="; + rev = "54b4f914930d92cf0b94601b402ec93f54a76390"; + hash = "sha256-mpGWcx+zE5kb5USE4CPGrrleZRNGxVUGxc9eQY5IIfY="; }; kernel = fetchzip { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-+tWXv9j5bUJN7kzFZxuL+wB1fBCyXbtyms3Q5/dTtK4="; + hash = "sha256-QIbHTLWI5CaStQmuoJ1k7odQUDRLsWNGY10ek0eKo8M="; }; in buildLinux (args // { From 10d5e0ecc32984c1bf1a9a46586be3451c42fd94 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Wed, 18 Sep 2024 20:58:24 -0300 Subject: [PATCH 1052/1476] asus-rog-strix-x570: add nct6775 kernel module for temperature and fan sensor --- asus/rog-strix/x570e/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/asus/rog-strix/x570e/default.nix b/asus/rog-strix/x570e/default.nix index d8ee657b..0cd3655b 100644 --- a/asus/rog-strix/x570e/default.nix +++ b/asus/rog-strix/x570e/default.nix @@ -9,6 +9,8 @@ ../../../common/pc/ssd ]; - # Bluetooth driver for Intel AX200 802.11ax - boot.kernelModules = [ "btintel" ]; + boot.kernelModules = [ + "btintel" # Bluetooth driver for Intel AX200 802.11ax + "nct6775" # Temperature and Fan Sensor for Nuvoton NCT6798D-R + ]; } From d64ae0165303096700cb101f8d7e35eb9ba3aa4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 21 Sep 2024 09:47:28 +0200 Subject: [PATCH 1053/1476] test/run: format file and remove unused variable --- tests/run.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/run.py b/tests/run.py index 7e03532f..efe76b52 100755 --- a/tests/run.py +++ b/tests/run.py @@ -3,7 +3,6 @@ import argparse import json import multiprocessing -import re import shlex import subprocess import sys @@ -17,9 +16,6 @@ GREEN = "\033[92m" RED = "\033[91m" RESET = "\033[0m" -re_nixos_hardware = re.compile(r"]+)>") - - def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser(description="Run hardware tests") parser.add_argument( @@ -60,7 +56,7 @@ def run_eval_test(nixos_hardware: str, gcroot_dir: Path, jobs: int) -> list[str] str(TEST_ROOT) + "#checks", "--force-recurse", ] - print(" ".join(map(shlex.quote,cmd))) + print(" ".join(map(shlex.quote, cmd))) proc = subprocess.Popen( cmd, stdout=subprocess.PIPE, From 1e27e79ab2697ec1b7b84edccd32d5f4e79946e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 21 Sep 2024 09:47:35 +0200 Subject: [PATCH 1054/1476] CONTRIBUTING.md: Update testing instructions fixes https://github.com/NixOS/nixos-hardware/issues/1135 --- CONTRIBUTING.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5745bf0b..22e78dd4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,15 +42,7 @@ Link the profile in the table in README.md and in flake.nix. ## 3. Testing -Run ./tests/run.py to test building. The test script script will parse all the -profiles from the README.md. - -You can also just specify a single profile like this: - -``` - ./tests/run.py '' -``` - +Run `nix run ./tests#run .` to evaluate all hardware profiles. Because profiles can only be tested with the appropriate hardware, quality assurance is up to *you*. From b493dfd4a8cf9552932179e56ff3b5819a9b8381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 21 Sep 2024 09:50:24 +0200 Subject: [PATCH 1055/1476] update flakes --- tests/flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/flake.lock b/tests/flake.lock index bde17ccd..3e595504 100644 --- a/tests/flake.lock +++ b/tests/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1725234343, - "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=", + "lastModified": 1726153070, + "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6", + "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1725384549, - "narHash": "sha256-A9TMja7Ly70BOGcbcqJ0EUusQSFEQaKbrHJxNXfSFYY=", + "lastModified": 1726724509, + "narHash": "sha256-sVeAM1tgVi52S1e29fFBTPUAFSzgQwgLon3CrztXGm8=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "366ddc33ff1b93d95ef3809d12ce0fba74c8d316", + "rev": "10d5e0ecc32984c1bf1a9a46586be3451c42fd94", "type": "github" }, "original": { @@ -37,11 +37,11 @@ }, "nixos-stable": { "locked": { - "lastModified": 1725001927, - "narHash": "sha256-eV+63gK0Mp7ygCR0Oy4yIYSNcum2VQwnZamHxYTNi+M=", + "lastModified": 1726688310, + "narHash": "sha256-Xc9lEtentPCEtxc/F1e6jIZsd4MPDYv4Kugl9WtXlz0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6e99f2a27d600612004fbd2c3282d614bfee6421", + "rev": "dbebdd67a6006bb145d98c8debf9140ac7e651d0", "type": "github" }, "original": { @@ -53,11 +53,11 @@ }, "nixos-unstable-small": { "locked": { - "lastModified": 1725361206, - "narHash": "sha256-/HTUg+kMaqBPGrcQBYboAMsQHIWIkuKRDldss/035Hc=", + "lastModified": 1726885390, + "narHash": "sha256-NPoqPAA2z9o/Syyx4M4v3/e6ROkK21enXx4+29Q45uc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2830c7c930311397d94c0b86a359c865c081c875", + "rev": "f7bfe794a79c69c01f2dce20fb7b287ae98a96eb", "type": "github" }, "original": { From cbcd0302c724608acbdbc6d1350c75014bcec272 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sat, 1 Jun 2024 22:39:18 +0200 Subject: [PATCH 1056/1476] starfive visionfive2: use mainline kernel Co-authored-by: NickCao --- starfive/visionfive/v2/default.nix | 35 ++++++++++++++++++++-------- starfive/visionfive/v2/linux-6.6.nix | 26 --------------------- 2 files changed, 25 insertions(+), 36 deletions(-) delete mode 100644 starfive/visionfive/v2/linux-6.6.nix diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index 973db412..3807b6b5 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -1,21 +1,36 @@ -{ config, lib, pkgs, ... }: { +{ + config, + lib, + pkgs, + ... +}: +{ boot = { - # Force no ZFS (from nixos/modules/profiles/base.nix) until updated to kernel 6.0 - supportedFilesystems = - lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; consoleLogLevel = lib.mkDefault 7; - kernelPackages = lib.mkDefault (pkgs.callPackage ./linux-6.6.nix { - inherit (config.boot) kernelPatches; - }); - - kernelParams = - lib.mkDefault [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ]; + # Switch to default as soon they reach >= 6.11 + kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; initrd.availableKernelModules = [ "dw_mmc_starfive" ]; + # Support booting SD-image from NVME SSD + initrd.kernelModules = [ + "clk-starfive-jh7110-aon" + "clk-starfive-jh7110-stg" + "phy-jh7110-pcie" + "pcie-starfive" + "nvme" + ]; + loader = { grub.enable = lib.mkDefault false; generic-extlinux-compatible.enable = lib.mkDefault true; }; }; + + assertions = [ + { + assertion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.11"; + message = "The VisionFive 2 requires at least mainline kernel version 6.11 for minimum hardware support."; + } + ]; } diff --git a/starfive/visionfive/v2/linux-6.6.nix b/starfive/visionfive/v2/linux-6.6.nix deleted file mode 100644 index 5999dd64..00000000 --- a/starfive/visionfive/v2/linux-6.6.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ lib, callPackage, linuxPackagesFor, kernelPatches, ... }: - -let - modDirVersion = "6.6.0"; - linuxPkg = { lib, fetchFromGitHub, buildLinux, ... }@args: - buildLinux (args // { - version = "${modDirVersion}-starfive-visionfive2"; - - src = fetchFromGitHub { - owner = "starfive-tech"; - repo = "linux"; - rev = "13eb70da2a73187c8c7aece13d23d68928aa8210"; - hash = "sha256-bwB7Pc+Z+MWXPfWYdgtRGuhqjiNHLDGNCY62e4lBGvE="; - }; - - inherit modDirVersion kernelPatches; - - structuredExtraConfig = with lib.kernel; { - PINCTRL_STARFIVE_JH7110_SYS = yes; - SERIAL_8250_DW = yes; - }; - - extraMeta.branch = "JH7110_VisionFive2_upstream"; - } // (args.argsOverride or { })); - -in lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg { })) From 230536ce884a14aab03518da71d417f57461805b Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sat, 21 Sep 2024 10:54:01 +0000 Subject: [PATCH 1057/1476] update tests flake lock --- tests/flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/flake.lock b/tests/flake.lock index 3e595504..ac0ed664 100644 --- a/tests/flake.lock +++ b/tests/flake.lock @@ -22,11 +22,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1726724509, - "narHash": "sha256-sVeAM1tgVi52S1e29fFBTPUAFSzgQwgLon3CrztXGm8=", + "lastModified": 1726905744, + "narHash": "sha256-xyNtG5C+xvfsnOVEamFe9zCCnuNwk93K/TlFC/4DmCI=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "10d5e0ecc32984c1bf1a9a46586be3451c42fd94", + "rev": "b493dfd4a8cf9552932179e56ff3b5819a9b8381", "type": "github" }, "original": { @@ -37,11 +37,11 @@ }, "nixos-stable": { "locked": { - "lastModified": 1726688310, - "narHash": "sha256-Xc9lEtentPCEtxc/F1e6jIZsd4MPDYv4Kugl9WtXlz0=", + "lastModified": 1726838390, + "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "dbebdd67a6006bb145d98c8debf9140ac7e651d0", + "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", "type": "github" }, "original": { From c97623b428306711dc07dc68fd98b9f0b882ba3c Mon Sep 17 00:00:00 2001 From: Matei Dibu Date: Mon, 23 Sep 2024 12:48:34 +0300 Subject: [PATCH 1058/1476] dell-precision-5560: cleanup --- dell/precision/5560/default.nix | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/dell/precision/5560/default.nix b/dell/precision/5560/default.nix index 6c7ebadd..e8293808 100644 --- a/dell/precision/5560/default.nix +++ b/dell/precision/5560/default.nix @@ -1,40 +1,25 @@ +{ lib, ... }: { - config, - lib, - ... -}: { imports = [ ../../../common/pc/laptop ../../../common/pc/laptop/ssd ../../../common/cpu/intel ../../../common/gpu/intel/tiger-lake - ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/turing ]; hardware.enableRedistributableFirmware = lib.mkDefault true; boot = { - blacklistedKernelModules = ["nouveau"]; - kernelModules = ["kvm-intel"]; - kernelParams = ["i915.modeset=1"]; + blacklistedKernelModules = [ "nouveau" ]; + kernelModules = [ "kvm-intel" ]; + kernelParams = [ "i915.modeset=1" ]; }; - hardware = { - graphics = { - enable = lib.mkDefault true; - enable32Bit = lib.mkDefault true; - }; - nvidia = { - package = config.boot.kernelPackages.nvidiaPackages.beta; - modesetting.enable = lib.mkDefault true; - open = lib.mkDefault false; - prime = { - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:1:0:0"; - }; - }; - }; + services.xserver.videoDrivers = [ "nvidia" ]; - powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; + hardware.nvidia.prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; } From a4e69fc9ba6728f7ea9c8b7cb9c72b3744885880 Mon Sep 17 00:00:00 2001 From: Matei Dibu Date: Mon, 23 Sep 2024 12:48:45 +0300 Subject: [PATCH 1059/1476] dell-precision-5560: add README --- dell/precision/5560/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 dell/precision/5560/README.md diff --git a/dell/precision/5560/README.md b/dell/precision/5560/README.md new file mode 100644 index 00000000..8518cbd6 --- /dev/null +++ b/dell/precision/5560/README.md @@ -0,0 +1,20 @@ +## Dell Precision 5560 + +- Intel i7-11800H +- 00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-H GT1 [UHD Graphics] [8086:9a60] (rev 01) +- 01:00.0 3D controller [0302]: NVIDIA Corporation TU117GLM [T1200 Laptop GPU] [10de:1fbc] (rev a1) + +If you want to use the new Intel Xe driver, add this to your config: +```nix +boot.extraModprobeConfig = '' + options xe force_probe=9a60 + options i915 force_probe=!9a60 +''; +``` + +And you should decide what you want to do with the NVIDIA GPU, either sync or offload. + +Fwupd works, you can update the BIOS and DBX. +```nix +services.fwupd.enable = true; +``` From b169e35bee1f6f2184b3de4984b828e59d27fee6 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:27:48 -0300 Subject: [PATCH 1060/1476] asus-rog-strix-x570: add troubleshooting notice for bluetooth device missing --- asus/rog-strix/x570e/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/asus/rog-strix/x570e/default.nix b/asus/rog-strix/x570e/default.nix index 0cd3655b..cc2a5ae2 100644 --- a/asus/rog-strix/x570e/default.nix +++ b/asus/rog-strix/x570e/default.nix @@ -14,3 +14,13 @@ "nct6775" # Temperature and Fan Sensor for Nuvoton NCT6798D-R ]; } + +# Troubleshooting: Bluetooth device missing +# There is a known electrical design problem in ROG Strix X570-E Gaming motherboard: +# https://www.reddit.com/r/ASUS/comments/romkqq/bluetooth_and_wifi_stopped_working_rog_strix/ +# Whenever Bluetooth device fails to list (sudo dmesg | grep Bluetooth; hciconfig). +# Consider: +# 1. Turning off computer. +# 2. Unplugging computer's power supply. +# 3. Holding down power button for 15s. +# 4. Bluetooth device should list then. From 8d839c167229210efb80697fdbb59a440afb980a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 24 Sep 2024 19:14:35 +0200 Subject: [PATCH 1061/1476] only incrase font size for older kernel --- common/hidpi.nix | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/common/hidpi.nix b/common/hidpi.nix index 85b167c7..ecf70a40 100644 --- a/common/hidpi.nix +++ b/common/hidpi.nix @@ -1,6 +1,18 @@ -{ lib, pkgs, ... }: +{ + lib, + pkgs, + config, + ... +}: +let + # Starting with kernel 6.8, the console font is set in the kernel automatically to a 16x32 font: + # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dfd19a5004eff03755967086aa04254c3d91b8ec + oldKernel = lib.versionOlder config.boot.kernelPackages.kernel.version "6.8"; +in { # Just set the console font, don't mess with the font settings - console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz"; - console.earlySetup = lib.mkDefault true; + console.font = lib.mkIf oldKernel ( + lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz" + ); + console.earlySetup = lib.mkIf oldKernel (lib.mkDefault true); } From f4d60b3777bef2b3f11d5c87c78d5c4b510145cb Mon Sep 17 00:00:00 2001 From: "Patrick D. Lloyd" Date: Thu, 26 Sep 2024 15:28:09 -0700 Subject: [PATCH 1062/1476] Remove fonts.fontconfig.dpi in Lenovo Thinkpad X1 6th Gen QHD --- lenovo/thinkpad/x1/6th-gen/QHD/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/lenovo/thinkpad/x1/6th-gen/QHD/default.nix b/lenovo/thinkpad/x1/6th-gen/QHD/default.nix index 84d7f715..db03d2c7 100644 --- a/lenovo/thinkpad/x1/6th-gen/QHD/default.nix +++ b/lenovo/thinkpad/x1/6th-gen/QHD/default.nix @@ -6,7 +6,6 @@ # Fix font sizes in X services.xserver.dpi = 210; - fonts.fontconfig.dpi = 210; # Enable readable font on console. The example configuration that # follows is taliored towards western languages. To see how to From d830ad47cc992b4a46b342bbc79694cbd0e980b2 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 14 Sep 2024 18:30:24 -0600 Subject: [PATCH 1063/1476] feat: add galp5-1650 --- README.md | 3 ++- flake.nix | 1 + system76/galp5-1650/default.nix | 27 +++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 system76/galp5-1650/default.nix diff --git a/README.md b/README.md index 1a264e2d..bfeb291a 100644 --- a/README.md +++ b/README.md @@ -328,7 +328,8 @@ See code for all available configurations. | [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | | [System76 (generic)](system76) | `` | | [System76 Darter Pro 6](system76/darp6) | `` | -| [System76 Gazelle Gaze18](system76/gaze18) | `` | +| [System76 Gazelle 18](system76/gaze18) | `` | +| [System76 Galago Pro 5](system76/galp5-1650) | `` | | [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | | [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | | [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | diff --git a/flake.nix b/flake.nix index c146e968..48e14078 100644 --- a/flake.nix +++ b/flake.nix @@ -280,6 +280,7 @@ supermicro-x12scz-tln4f = import ./supermicro/x12scz-tln4f; system76 = import ./system76; system76-gaze18 = import ./system76/gaze18; + system76-galp5-1650 = import ./system76/galp5-1650; system76-darp6 = import ./system76/darp6; toshiba-swanky = import ./toshiba/swanky; tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; diff --git a/system76/galp5-1650/default.nix b/system76/galp5-1650/default.nix new file mode 100644 index 00000000..c2fcf231 --- /dev/null +++ b/system76/galp5-1650/default.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: +{ + imports = [ + ../. + ../../common/gpu/nvidia/prime.nix + ../../common/gpu/nvidia/ampere + ]; + + boot.initrd.kernelModules = [ "nvidia" ]; + + hardware.graphics = { + enable = lib.mkDefault true; + enable32Bit = lib.mkDefault true; + }; + + hardware.nvidia = { + + # modesetting.enable = lib.mkDefault true; + + powerManagement.finegrained = lib.mkDefault true; + + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:23:0:0"; + }; + }; +} From 2061ba2611eb29efb24ffe4d730fc29ad20503a2 Mon Sep 17 00:00:00 2001 From: Matei Dibu Date: Fri, 27 Sep 2024 18:45:07 +0300 Subject: [PATCH 1064/1476] dell-precision-5560: remove redundant config --- dell/precision/5560/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dell/precision/5560/default.nix b/dell/precision/5560/default.nix index e8293808..6b6e3a0b 100644 --- a/dell/precision/5560/default.nix +++ b/dell/precision/5560/default.nix @@ -11,13 +11,9 @@ hardware.enableRedistributableFirmware = lib.mkDefault true; boot = { - blacklistedKernelModules = [ "nouveau" ]; - kernelModules = [ "kvm-intel" ]; kernelParams = [ "i915.modeset=1" ]; }; - services.xserver.videoDrivers = [ "nvidia" ]; - hardware.nvidia.prime = { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; From 1c62abd2dd79652fedebebe196ed194a4573f573 Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 25 Sep 2024 22:53:18 +1200 Subject: [PATCH 1065/1476] Disable USB wakeup on the 8295 ITE Device on Asus Zephyrus GA402X laptop --- asus/zephyrus/ga402x/shared.nix | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix index 91739baa..45c79a32 100644 --- a/asus/zephyrus/ga402x/shared.nix +++ b/asus/zephyrus/ga402x/shared.nix @@ -32,6 +32,12 @@ in { keyboard.autosuspend.enable = ( mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Zephyrus GA402X" ) // { default = defaultAutosuspendEnable; }; + # The ASUS 8295 ITE device will cause an immediate wake-up when trying to suspend the laptop. + # After the first successful hibernate, it will work as expected, however. + # NOTE: I'm not actually sure what this device, as neither the touchpad nor the M1-M4 keys cause a wake-up. + ite-device.wakeup.enable = ( + mkEnableOption "Enable power wakeup on the internal USB keyboard-like device (8295 ITE Device) on Zephyrus GA402X" + ) // { default = false; }; }; config = mkMerge [ @@ -59,15 +65,27 @@ in { evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* KEYBOARD_KEY_ff31007c=f20 ''; - extraRules = mkIf (! cfg.keyboard.autosuspend.enable) '' - # Disable auto-suspend for the ASUS N-KEY Device, i.e. USB Keyboard - # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after the device suspends - ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1" - ''; }; }; } + (mkIf (! cfg.keyboard.autosuspend.enable) { + services.udev.extraRules = '' + # Disable power auto-suspend for the ASUS N-KEY device, i.e. USB Keyboard. + # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after the device suspends. + ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1" + ''; + }) + + (mkIf (! cfg.ite-device.wakeup.enable) { + services.udev.extraRules = '' + # Disable power wakeup for the 8295 ITE device. + # Otherwise on certain kernel-versions, it will tend to cause the laptop to immediately wake-up when suspending. + # ACTION=="add|change", SUBSYSTEM=="usb", DRIVER="usb", TEST="power/wakeup", ATTR{idVendor}=="0b05", ATTR{idProduct}=="193b", ATTR{power/wakeup}="disabled" + ACTION=="add|change", SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="193b", ATTR{power/wakeup}="disabled" + ''; + }) + (mkIf (versionOlder version "23.11") { # See https://asus-linux.org/wiki/nixos/ for info about some problems # detecting the dGPU: From c1f051bf032273b9f0e707c8826eb25122d279fa Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 25 Sep 2024 16:35:02 +1200 Subject: [PATCH 1066/1476] Add 'mkDefault' to several settings for Asus Zephyrus GA402X --- asus/zephyrus/ga402x/nvidia/default.nix | 8 ++++---- asus/zephyrus/ga402x/shared.nix | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/asus/zephyrus/ga402x/nvidia/default.nix b/asus/zephyrus/ga402x/nvidia/default.nix index 05070785..7c5b1d7f 100644 --- a/asus/zephyrus/ga402x/nvidia/default.nix +++ b/asus/zephyrus/ga402x/nvidia/default.nix @@ -27,16 +27,16 @@ in { hardware = { ## Enable the Nvidia card, as well as Prime and Offload: - amdgpu.initrd.enable = lib.mkDefault true; + amdgpu.initrd.enable = mkDefault true; nvidia = { modesetting.enable = true; - nvidiaSettings = true; + nvidiaSettings = mkDefault true; prime = { offload = { - enable = true; - enableOffloadCmd = true; + enable = mkDefault true; + enableOffloadCmd = mkDefault true; }; amdgpuBusId = "PCI:101:0:0"; nvidiaBusId = "PCI:1:0:0"; diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix index 45c79a32..2eacda62 100644 --- a/asus/zephyrus/ga402x/shared.nix +++ b/asus/zephyrus/ga402x/shared.nix @@ -57,7 +57,7 @@ in { enableUserService = mkDefault true; }; - supergfxd.enable = true; + supergfxd.enable = mkDefault true; udev = { extraHwdb = '' From 8e8c6cbad12ef805268b4e380a7298fbc275898d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rayan=20Nakib=20=28=D8=B1=D9=8A=D8=A7=D9=86=20=D9=86=D9=82?= =?UTF-8?q?=D9=8A=D8=A8=29?= Date: Sun, 29 Sep 2024 07:29:37 +0100 Subject: [PATCH 1067/1476] Add new profile for HP Laptop 14s dq2024nf --- README.md | 1 + flake.nix | 1 + hp/laptop/14s-dq2024nf/default.nix | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 hp/laptop/14s-dq2024nf/default.nix diff --git a/README.md b/README.md index bfeb291a..ab28e315 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,7 @@ See code for all available configurations. | [HP Elitebook 845g8](hp/elitebook/845/g8) | `` | | [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | | [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | +| [HP Laptop 14s-dq2024nf](hp/laptop/14s-dq2024nf) | `` | | [Huawei Matebook X Pro (2020)](huawei/machc-wa) | `` | | [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | diff --git a/flake.nix b/flake.nix index ea375a52..a239fcdf 100644 --- a/flake.nix +++ b/flake.nix @@ -119,6 +119,7 @@ hp-elitebook-845g7 = import ./hp/elitebook/845/g7; hp-elitebook-845g8 = import ./hp/elitebook/845/g8; hp-elitebook-845g9 = import ./hp/elitebook/845/g9; + hp-laptop-14s-dq2024nf = import ./hp/laptop/14s-dq2024nf; huawei-machc-wa = import ./huawei/machc-wa; hp-notebook-14-df0023 = import ./hp/notebook/14-df0023; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; diff --git a/hp/laptop/14s-dq2024nf/default.nix b/hp/laptop/14s-dq2024nf/default.nix new file mode 100644 index 00000000..08a48b35 --- /dev/null +++ b/hp/laptop/14s-dq2024nf/default.nix @@ -0,0 +1,11 @@ +{ config, lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/intel/tiger-lake + ../../../common/pc + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; +} From e88d37154f74e2bc2545514612dd20a16bb3e2f0 Mon Sep 17 00:00:00 2001 From: Adam Dinwoodie Date: Sat, 28 Sep 2024 19:38:03 +0100 Subject: [PATCH 1068/1476] Framework 16: use upstream libinput keyboard detection Use the upstream libinput keyboard detection quirks configuration to ensure Framework 16 laptop keyboards are detected and treated as internal keyboards. Notably, this means that non-ANSI Framework keyboards are correctly detected and treated as being internal keyboards rather than external ones. Also add a comment noting that this configuration is part of more recent upstream libinput releases, and that it can be removed once we no longer need to support older versions of libinput. That probably means once NixOS 24.05 is out of support. --- framework/16-inch/common/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/framework/16-inch/common/default.nix b/framework/16-inch/common/default.nix index 07e51622..7cef21ae 100644 --- a/framework/16-inch/common/default.nix +++ b/framework/16-inch/common/default.nix @@ -30,10 +30,16 @@ # Allow `services.libinput.touchpad.disableWhileTyping` to work correctly. # Set unconditionally because libinput can also be configured dynamically via # gsettings. + # + # This is extracted from the quirks file that is in the upstream libinput + # source. Once we can assume everyone is on at least libinput 1.26.0, this + # local override file can be removed. + # https://gitlab.freedesktop.org/libinput/libinput/-/commit/566857bd98131009699c9ab6efc7af37afd43fd0 environment.etc."libinput/local-overrides.quirks".text = '' - [Serial Keyboards] + [Framework Laptop 16 Keyboard Module] + MatchName=Framework Laptop 16 Keyboard Module* MatchUdevType=keyboard - MatchName=Framework Laptop 16 Keyboard Module - ANSI Keyboard + MatchDMIModalias=dmi:*svnFramework:pnLaptop16* AttrKeyboardIntegration=internal ''; } From 25e16f6c661d71d0cc2e2818c59a0c254fde9f2a Mon Sep 17 00:00:00 2001 From: Adam Dinwoodie Date: Sat, 28 Sep 2024 20:18:13 +0100 Subject: [PATCH 1069/1476] Framework 16: udev rules for keyboard config Add a udev rule to allow the keyboard modules to be reconfigured. --- framework/16-inch/common/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/framework/16-inch/common/default.nix b/framework/16-inch/common/default.nix index 7cef21ae..190956f5 100644 --- a/framework/16-inch/common/default.nix +++ b/framework/16-inch/common/default.nix @@ -19,6 +19,12 @@ services.udev.extraRules = '' # Ethernet expansion card support ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20" + + # Allow access to the keyboard modules for programming, for example by + # visiting https://keyboard.frame.work with a WebHID-compatible browser. + # + # https://community.frame.work/t/responded-help-configuring-fw16-keyboard-with-via/47176/5 + KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0012", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl" ''; # Needed for desktop environments to detect/manage display brightness From 9fe0e21c9936c1078427bc95f2f6a6d6d281ff75 Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Sat, 28 Sep 2024 16:36:13 +0000 Subject: [PATCH 1070/1476] thinkpad/x1-extreme/gen3: add module --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/x1-extreme/gen3/default.nix | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 lenovo/thinkpad/x1-extreme/gen3/default.nix diff --git a/README.md b/README.md index ab28e315..c578f1a9 100644 --- a/README.md +++ b/README.md @@ -260,6 +260,7 @@ See code for all available configurations. | [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `` | | [Lenovo ThinkPad X1 (12th Gen)](lenovo/thinkpad/x1/12th-gen) | `` | | [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | +| [Lenovo ThinkPad X1 Extreme Gen 3](lenovo/thinkpad/x1-extreme/gen3) | `` | | [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | | [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | | [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | diff --git a/flake.nix b/flake.nix index a239fcdf..c53ce611 100644 --- a/flake.nix +++ b/flake.nix @@ -205,6 +205,7 @@ lenovo-thinkpad-x1-12th-gen = import ./lenovo/thinkpad/x1/12th-gen; lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme; lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2; + lenovo-thinkpad-x1-extreme-gen3 = import ./lenovo/thinkpad/x1-extreme/gen3; lenovo-thinkpad-x1-extreme-gen4 = import ./lenovo/thinkpad/x1-extreme/gen4; lenovo-thinkpad-x1-nano = import ./lenovo/thinkpad/x1-nano; lenovo-thinkpad-x1-nano-gen1 = import ./lenovo/thinkpad/x1-nano/gen1; diff --git a/lenovo/thinkpad/x1-extreme/gen3/default.nix b/lenovo/thinkpad/x1-extreme/gen3/default.nix new file mode 100644 index 00000000..49eaf2e3 --- /dev/null +++ b/lenovo/thinkpad/x1-extreme/gen3/default.nix @@ -0,0 +1,19 @@ +{ lib, ... }: + +{ + imports = [ + ../. + ]; + + # New ThinkPads have a different TrackPoint manufacturer/name. + hardware.trackpoint.device = "TPPS/2 Elan TrackPoint"; + + # Fix clickpad (clicking by depressing the touchpad). + boot.kernelParams = [ "psmouse.synaptics_intertouch=0" ]; + + # Set the right DPI. xdpyinfo says the screen is 677x423 mm but + # it actually is 344×215 mm. + services.xserver.monitorSection = lib.mkDefault '' + DisplaySize 344 215 + ''; +} From 1bc47d8abfb98fda9e90d357d14abded85163b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 29 Sep 2024 14:21:08 +0200 Subject: [PATCH 1071/1476] asus/zenbook/ux371: enable xe driver explicitly --- asus/zenbook/ux371/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/asus/zenbook/ux371/default.nix b/asus/zenbook/ux371/default.nix index 4fcfb28d..2ea56294 100644 --- a/asus/zenbook/ux371/default.nix +++ b/asus/zenbook/ux371/default.nix @@ -1,8 +1,6 @@ { config, lib, - pkgs, - inputs, ... }: { @@ -13,6 +11,9 @@ ../../battery.nix ]; + # while tiger-lake in general not supported by xe, some chipsets like this one are. + hardware.intelgpu.driver = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8") "xe"; + boot.kernelParams = lib.mkIf (config.hardware.intelgpu.driver == "xe") [ "i915.force_probe=!9a49" "xe.force_probe=9a49" From f5c239fa9acb27f0a5326ba2949c00fada89ca9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 29 Sep 2024 14:12:53 +0200 Subject: [PATCH 1072/1476] asus/zephyrus/ga402x/shared.nix: no need to override default of mkEnableOption --- asus/zephyrus/ga402x/shared.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix index 2eacda62..b641aedf 100644 --- a/asus/zephyrus/ga402x/shared.nix +++ b/asus/zephyrus/ga402x/shared.nix @@ -35,9 +35,7 @@ in { # The ASUS 8295 ITE device will cause an immediate wake-up when trying to suspend the laptop. # After the first successful hibernate, it will work as expected, however. # NOTE: I'm not actually sure what this device, as neither the touchpad nor the M1-M4 keys cause a wake-up. - ite-device.wakeup.enable = ( - mkEnableOption "Enable power wakeup on the internal USB keyboard-like device (8295 ITE Device) on Zephyrus GA402X" - ) // { default = false; }; + ite-device.wakeup.enable = mkEnableOption "Enable power wakeup on the internal USB keyboard-like device (8295 ITE Device) on Zephyrus GA402X"; }; config = mkMerge [ From 7200fdc70facade9676f8548de37ab23f71a4687 Mon Sep 17 00:00:00 2001 From: Gavin John Date: Sun, 29 Sep 2024 16:33:55 -0700 Subject: [PATCH 1073/1476] comon/gpu/intel: Add VAAPI support for older iGPUs --- common/gpu/intel/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index 83af6f2d..43e5ffa5 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -31,7 +31,7 @@ if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else - intel-vaapi-driver + intel-vaapi-driver.override { enableHybridCodec = true; } ) intel-media-driver ]; @@ -41,7 +41,7 @@ if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else - intel-vaapi-driver + intel-vaapi-driver.override { enableHybridCodec = true; } ) intel-media-driver ]; From a53ca667df44b1e02659f73f720bb20fc4b202bd Mon Sep 17 00:00:00 2001 From: Gavin John Date: Sun, 29 Sep 2024 16:34:23 -0700 Subject: [PATCH 1074/1476] lenovo/thinkpad/t480s: add hardware acceleration support --- lenovo/thinkpad/t480s/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/t480s/default.nix b/lenovo/thinkpad/t480s/default.nix index bfca9122..f544ad3f 100644 --- a/lenovo/thinkpad/t480s/default.nix +++ b/lenovo/thinkpad/t480s/default.nix @@ -3,6 +3,7 @@ { imports = [ ../../../common/cpu/intel + ../../../common/gpu/intel ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/ssd ../. From 11c43c830e533dad1be527ecce379fcf994fbbb5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 02:49:04 +0000 Subject: [PATCH 1075/1476] build(deps): bump cachix/install-nix-action from V28 to 29 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from V28 to 29. This release includes the previously tagged commit. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/V28...v29) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production ... 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 e519e46b..160d704d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,5 +9,5 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@V28 + - uses: cachix/install-nix-action@v29 - run: nix run ./tests#run . From b7ca02c7565fbf6d27ff20dd6dbd49c5b82eef28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Sun, 29 Sep 2024 15:43:01 +0200 Subject: [PATCH 1076/1476] add dell xps 9315 --- README.md | 1 + dell/xps/13-9315/README.wiki | 18 ++++++++++++++++++ dell/xps/13-9315/default.nix | 30 ++++++++++++++++++++++++++++++ flake.nix | 1 + 4 files changed, 50 insertions(+) create mode 100644 dell/xps/13-9315/README.wiki create mode 100644 dell/xps/13-9315/default.nix diff --git a/README.md b/README.md index c578f1a9..c58fab64 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,7 @@ See code for all available configurations. | [Dell XPS 13 7390](dell/xps/13-7390) | `` | | [Dell XPS 13 9300](dell/xps/13-9300) | `` | | [Dell XPS 13 9310](dell/xps/13-9310) | `` | +| [Dell XPS 13 9315](dell/xps/13-9315) | `` | | [Dell XPS 13 9333](dell/xps/13-9333) | `` | | [Dell XPS 13 9343](dell/xps/13-9343) | `` | | [Dell XPS 13 9350](dell/xps/13-9350) | `` | diff --git a/dell/xps/13-9315/README.wiki b/dell/xps/13-9315/README.wiki new file mode 100644 index 00000000..a2cbb51f --- /dev/null +++ b/dell/xps/13-9315/README.wiki @@ -0,0 +1,18 @@ += Dell XPS 13 9315 = + +See also + +== 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. + +== Additional resources == + +* Arch linux wiki: [https://wiki.archlinux.org/title/Dell_XPS_13_(9315) Dell XPS 13 9315] diff --git a/dell/xps/13-9315/default.nix b/dell/xps/13-9315/default.nix new file mode 100644 index 00000000..03e16533 --- /dev/null +++ b/dell/xps/13-9315/default.nix @@ -0,0 +1,30 @@ +{ + lib, + pkgs, + ... +}: { + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + # enable firmwares with a license allowing redistribution + # this includes the Wi-Fi and Bluetooth firmwares + hardware.enableRedistributableFirmware = true; + + # touchpad uses I²C, so PS/2 is unnecessary + boot.blacklistedKernelModules = ["psmouse"]; + + # enable finger print sensor + # configure with `sudo fprintd-enroll ` + services.fprintd.enable = true; + services.fprintd.tod.enable = true; + services.fprintd.tod.driver = pkgs.libfprint-2-tod1-goodix; + + # enable updating firmware via `fwupdmgr` + services.fwupd.enable = true; + + # enable cooling management, see NixOS/nixos-hardware#127 + services.thermald.enable = lib.mkDefault true; +} diff --git a/flake.nix b/flake.nix index c53ce611..9c6a5c03 100644 --- a/flake.nix +++ b/flake.nix @@ -72,6 +72,7 @@ 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; + dell-xps-13-9315 = import ./dell/xps/13-9315; dell-xps-13-9333 = import ./dell/xps/13-9333; dell-xps-13-9343 = import ./dell/xps/13-9343; dell-xps-13-9350 = import ./dell/xps/13-9350; From ecfcd787f373f43307d764762e139a7cdeb9c22b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 02:33:16 +0000 Subject: [PATCH 1077/1476] build(deps): bump cachix/install-nix-action from 29 to 30 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 29 to 30. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v29...v30) --- 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 160d704d..3e96b10d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,5 +9,5 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v29 + - uses: cachix/install-nix-action@v30 - run: nix run ./tests#run . From 664b784722aee2fb139bfe6542406f16c0c4c457 Mon Sep 17 00:00:00 2001 From: Johannes Fleck Date: Thu, 10 Oct 2024 09:42:41 +0200 Subject: [PATCH 1078/1476] add tuxedo aura 15 gen1 --- README.md | 1 + flake.nix | 1 + tuxedo/aura/15/gen1/default.nix | 13 +++++++++++++ 3 files changed, 15 insertions(+) create mode 100644 tuxedo/aura/15/gen1/default.nix diff --git a/README.md b/README.md index c58fab64..1d746bb0 100644 --- a/README.md +++ b/README.md @@ -338,3 +338,4 @@ See code for all available configurations. | [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | | [TUXEDO Pulse 14 - Gen3](tuxedo/pulse/14/gen3) | `` | | [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | +| [TUXEDO Aura 15 - Gen1](tuxedo/aura/15/gen1) | `` | diff --git a/flake.nix b/flake.nix index 9c6a5c03..bff5a288 100644 --- a/flake.nix +++ b/flake.nix @@ -291,6 +291,7 @@ tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7; tuxedo-pulse-14-gen3 = import ./tuxedo/pulse/14/gen3; tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; + tuxedo-aura-15-gen1 = import ./tuxedo/aura/15/gen1; common-cpu-amd = import ./common/cpu/amd; common-cpu-amd-pstate = import ./common/cpu/amd/pstate.nix; diff --git a/tuxedo/aura/15/gen1/default.nix b/tuxedo/aura/15/gen1/default.nix new file mode 100644 index 00000000..9ab1ca63 --- /dev/null +++ b/tuxedo/aura/15/gen1/default.nix @@ -0,0 +1,13 @@ +{lib, ...}: { + imports = [ + ../../../../common/cpu/amd + ../../../../common/pc/laptop + ../../../../common/pc/ssd + ]; + + # Cooling management + services.thermald.enable = lib.mkDefault true; + + # keyboard backlight lives in /sys/class/leds/rgb:kbd_backlight + hardware.tuxedo-keyboard.enable = lib.mkDefault true; +} From ca0662edb06f07d7b57c1b92037a112b4fc2c82f Mon Sep 17 00:00:00 2001 From: Johannes Fleck Date: Thu, 10 Oct 2024 09:52:14 +0200 Subject: [PATCH 1079/1476] fix ordering fix ordering --- README.md | 2 +- flake.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1d746bb0..3c115ae3 100644 --- a/README.md +++ b/README.md @@ -335,7 +335,7 @@ See code for all available configurations. | [System76 Galago Pro 5](system76/galp5-1650) | `` | | [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | | [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | +| [TUXEDO Aura 15 - Gen1](tuxedo/aura/15/gen1) | `` | | [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | | [TUXEDO Pulse 14 - Gen3](tuxedo/pulse/14/gen3) | `` | | [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | -| [TUXEDO Aura 15 - Gen1](tuxedo/aura/15/gen1) | `` | diff --git a/flake.nix b/flake.nix index bff5a288..53bab7a8 100644 --- a/flake.nix +++ b/flake.nix @@ -287,11 +287,11 @@ system76-galp5-1650 = import ./system76/galp5-1650; system76-darp6 = import ./system76/darp6; toshiba-swanky = import ./toshiba/swanky; + tuxedo-aura-15-gen1 = import ./tuxedo/aura/15/gen1; tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7; tuxedo-pulse-14-gen3 = import ./tuxedo/pulse/14/gen3; tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; - tuxedo-aura-15-gen1 = import ./tuxedo/aura/15/gen1; common-cpu-amd = import ./common/cpu/amd; common-cpu-amd-pstate = import ./common/cpu/amd/pstate.nix; From 6f71da566f481d1593d447c31556759732299d13 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Thu, 10 Oct 2024 17:30:57 -0700 Subject: [PATCH 1080/1476] apple/t2: add tiny-dfr option --- apple/t2/default.nix | 113 ++++++++++++++++++++++++------------------- 1 file changed, 62 insertions(+), 51 deletions(-) diff --git a/apple/t2/default.nix b/apple/t2/default.nix index 4515ce72..7d69c1b4 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -49,71 +49,82 @@ let in { - options = { - hardware.apple-t2.enableAppleSetOsLoader = lib.mkOption { + options.hardware.apple-t2 = { + enableAppleSetOsLoader = lib.mkOption { default = false; type = lib.types.bool; description = "Whether to enable the appleSetOsLoader activation script."; }; + + enableTinyDfr = lib.mkOption { + default = true; + type = lib.types.bool; + description = "Whether to enable the tiny-dfr touchbar service."; + }; }; - config = { - # For keyboard and touchbar - boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./pkgs/linux-t2.nix { }); - boot.initrd.kernelModules = [ "apple-bce" ]; + config = lib.mkMerge [ + { + # For keyboard and touchbar + boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./pkgs/linux-t2.nix { }); + boot.initrd.kernelModules = [ "apple-bce" ]; - services.udev.packages = [ audioFilesUdevRules tiny-dfrPackage ]; + services.udev.packages = [ audioFilesUdevRules ]; - # For audio - boot.kernelParams = [ "pcie_ports=compat" "intel_iommu=on" "iommu=pt" ]; + # For audio + boot.kernelParams = [ "pcie_ports=compat" "intel_iommu=on" "iommu=pt" ]; - hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/"; + hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/"; - services.pipewire.package = pipewirePackage; - services.pipewire.wireplumber.package = pkgs.wireplumber.override { - pipewire = pipewirePackage; - }; + services.pipewire.package = pipewirePackage; + services.pipewire.wireplumber.package = pkgs.wireplumber.override { + pipewire = pipewirePackage; + }; - # For tiny-dfr - systemd.services.tiny-dfr = { - enable = true; - description = "Tiny Apple silicon touch bar daemon"; - after = [ "systemd-user-sessions.service" "getty@tty1.service" "plymouth-quit.service" "systemd-logind.service" ]; - bindsTo = [ "dev-tiny_dfr_display.device" "dev-tiny_dfr_backlight.device" ]; - startLimitIntervalSec = 30; - startLimitBurst = 2; - script = "${tiny-dfrPackage}/bin/tiny-dfr"; - restartTriggers = [ tiny-dfrPackage ]; - }; + # Make sure post-resume.service exists + powerManagement.enable = true; + } + (lib.mkIf t2Cfg.enableAppleSetOsLoader { + # Activation script to install apple-set-os-loader in order to unlock the iGPU + system.activationScripts.appleSetOsLoader = '' + if [[ -e /boot/efi/efi/boot/bootx64_original.efi ]]; then + true # It's already installed, no action required + elif [[ -e /boot/efi/efi/boot/bootx64.efi ]]; then + # Copy the new bootloader to a temporary location + cp ${apple-set-os-loader-installer}/bootx64.efi /boot/efi/efi/boot/bootx64_temp.efi - environment.etc."tiny-dfr/config.toml" = { - source = "${tiny-dfrPackage}/share/tiny-dfr/config.toml"; - }; + # Rename the original bootloader + mv /boot/efi/efi/boot/bootx64.efi /boot/efi/efi/boot/bootx64_original.efi - # Make sure post-resume.service exists - powerManagement.enable = true; + # Move the new bootloader to the final destination + mv /boot/efi/efi/boot/bootx64_temp.efi /boot/efi/efi/boot/bootx64.efi + else + echo "Error: /boot/efi/efi/boot/bootx64.efi is missing" >&2 + fi + ''; - # Activation script to install apple-set-os-loader in order to unlock the iGPU - system.activationScripts.appleSetOsLoader = lib.optionalString t2Cfg.enableAppleSetOsLoader '' - if [[ -e /boot/efi/efi/boot/bootx64_original.efi ]]; then - true # It's already installed, no action required - elif [[ -e /boot/efi/efi/boot/bootx64.efi ]]; then - # Copy the new bootloader to a temporary location - cp ${apple-set-os-loader-installer}/bootx64.efi /boot/efi/efi/boot/bootx64_temp.efi + # Enable the iGPU by default if present + environment.etc."modprobe.d/apple-gmux.conf".text = '' + options apple-gmux force_igd=y + ''; + }) + (lib.mkIf t2Cfg.enableTinyDfr { + services.udev.packages = [ tiny-dfrPackage ]; - # Rename the original bootloader - mv /boot/efi/efi/boot/bootx64.efi /boot/efi/efi/boot/bootx64_original.efi + systemd.services.tiny-dfr = { + enable = true; + description = "Tiny Apple silicon touch bar daemon"; + after = [ "systemd-user-sessions.service" "getty@tty1.service" "plymouth-quit.service" "systemd-logind.service" ]; + bindsTo = [ "dev-tiny_dfr_display.device" "dev-tiny_dfr_backlight.device" ]; + startLimitIntervalSec = 30; + startLimitBurst = 2; + script = "${tiny-dfrPackage}/bin/tiny-dfr"; + restartTriggers = [ tiny-dfrPackage ]; + }; - # Move the new bootloader to the final destination - mv /boot/efi/efi/boot/bootx64_temp.efi /boot/efi/efi/boot/bootx64.efi - else - echo "Error: /boot/efi/efi/boot/bootx64.efi is missing" >&2 - fi - ''; - - # Enable the iGPU by default if present - environment.etc."modprobe.d/apple-gmux.conf".text = lib.optionalString t2Cfg.enableAppleSetOsLoader '' - options apple-gmux force_igd=y - ''; - }; + environment.etc."tiny-dfr/config.toml" = { + source = "${tiny-dfrPackage}/share/tiny-dfr/config.toml"; + }; + }) + ]; } From a8dd1b21995964b115b1e3ec639dd6ce24ab9806 Mon Sep 17 00:00:00 2001 From: Glauber Santana Date: Sat, 12 Oct 2024 07:39:41 -0300 Subject: [PATCH 1081/1476] add dell inspiron 7460 (#1177) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- README.md | 1 + dell/inspiron/7460/README.md | 43 ++++++++++++++++++++++++++++++++++ dell/inspiron/7460/default.nix | 21 +++++++++++++++++ flake.nix | 1 + 4 files changed, 66 insertions(+) create mode 100644 dell/inspiron/7460/README.md create mode 100644 dell/inspiron/7460/default.nix diff --git a/README.md b/README.md index 3c115ae3..2a1c20c0 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,7 @@ See code for all available configurations. | [Dell Inspiron 5509](dell/inspiron/5509) | `` | | [Dell Inspiron 5515](dell/inspiron/5515) | `` | | [Dell Inspiron 7405](dell/inspiron/7405) | `` | +| [Dell Inspiron 7460](dell/inspiron/7460) | `` | | [Dell Latitude 3340](dell/latitude/3340) | `` | | [Dell Latitude 3480](dell/latitude/3480) | `` | | [Dell Latitude 5520](dell/latitude/5520) | `` | diff --git a/dell/inspiron/7460/README.md b/dell/inspiron/7460/README.md new file mode 100644 index 00000000..38eaddc5 --- /dev/null +++ b/dell/inspiron/7460/README.md @@ -0,0 +1,43 @@ +## Dell Inspiron 7460 + +### Tested Hardware + +```shellsession +$ lspci -nn +00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:5904] (rev 02) +00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 620 [8086:5916] (rev 02) +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 02) +00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:9d2f] (rev 21) +00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Thermal subsystem [8086:9d31] (rev 21) +00:15.0 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 [8086:9d60] (rev 21) +00:15.1 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 [8086:9d61] (rev 21) +00:16.0 Communication controller [0780]: Intel Corporation Sunrise Point-LP CSME HECI #1 [8086:9d3a] (rev 21) +00:17.0 SATA controller [0106]: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21) +00:1c.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 [8086:9d10] (rev f1) +00:1c.4 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 [8086:9d14] (rev f1) +00:1c.5 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #6 [8086:9d15] (rev f1) +00:1f.0 ISA bridge [0601]: Intel Corporation Sunrise Point-LP LPC Controller [8086:9d58] (rev 21) +00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-LP PMC [8086:9d21] (rev 21) +00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21) +00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-LP SMBus [8086:9d23] (rev 21) +01:00.0 3D controller [0302]: NVIDIA Corporation GM108M [GeForce 940MX] [10de:134d] (rev a2) +02:00.0 Network controller [0280]: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter [168c:003e] (rev 32) +03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15) +``` + +### Extra Configuration + +#### Bluetooth + +To enable bluetooth support, set `hardware.bluetooth.enable = true;`. + +### Firmware Upgrades + +Note that this device is supported by [fwupd](https://fwupd.org). +To perform firmware upgrades just activate the service: + +``` +services.fwupd.enable = true; +``` + +Then use `fwupdmgr` to perform updates \ No newline at end of file diff --git a/dell/inspiron/7460/default.nix b/dell/inspiron/7460/default.nix new file mode 100644 index 00000000..5a268970 --- /dev/null +++ b/dell/inspiron/7460/default.nix @@ -0,0 +1,21 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ../../../common/gpu/intel/kaby-lake + ../../../common/gpu/nvidia/maxwell + ../../../common/gpu/nvidia/prime.nix + ]; + + hardware.nvidia.prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + + services = { + thermald.enable = lib.mkDefault true; + fwupd.enable = lib.mkDefault true; + }; +} diff --git a/flake.nix b/flake.nix index 53bab7a8..47075b03 100644 --- a/flake.nix +++ b/flake.nix @@ -55,6 +55,7 @@ dell-inspiron-5509 = import ./dell/inspiron/5509; dell-inspiron-5515 = import ./dell/inspiron/5515; dell-inspiron-7405 = import ./dell/inspiron/7405; + dell-inspiron-7460 = import ./dell/inspiron/7460; dell-latitude-3340 = import ./dell/latitude/3340; dell-latitude-3480 = import ./dell/latitude/3480; dell-latitude-5520 = import ./dell/latitude/5520; From 963cf21d30fb28a79fdba2d87d8bd744f78bea54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rayan=20Nakib=20=28=D8=B1=D9=8A=D8=A7=D9=86=20=D9=86=D9=82?= =?UTF-8?q?=D9=8A=D8=A8=29?= Date: Sat, 19 Oct 2024 09:16:44 +0100 Subject: [PATCH 1082/1476] enable thermald, the temperature management daemon. --- hp/laptop/14s-dq2024nf/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hp/laptop/14s-dq2024nf/default.nix b/hp/laptop/14s-dq2024nf/default.nix index 08a48b35..03181188 100644 --- a/hp/laptop/14s-dq2024nf/default.nix +++ b/hp/laptop/14s-dq2024nf/default.nix @@ -8,4 +8,8 @@ ../../../common/pc/laptop ../../../common/pc/laptop/ssd ]; + + config = { + services.thermald.enable = lib.mkDefault true; + }; } From 3e40c4491684447706165de0c73cd323cffa051b Mon Sep 17 00:00:00 2001 From: mexisme Date: Thu, 17 Oct 2024 18:11:04 +1300 Subject: [PATCH 1083/1476] microsoft/surface/go: Add comment about obsolete kvalo/ath10k-firmware repo --- microsoft/surface/common/repos.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 513f788a..244d9702 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -16,6 +16,7 @@ inherit rev sha256; }; + # This repo has been obsoleted: ath10k-firmware = fetchFromGitHub { owner = "kvalo"; repo = "ath10k-firmware"; From efb12d7f4648986c17bb6674a4136d20eac01bbf Mon Sep 17 00:00:00 2001 From: mexisme Date: Sat, 19 Oct 2024 14:47:36 +1300 Subject: [PATCH 1084/1476] Remove archived repo --- microsoft/surface/TODO.org | 2 ++ microsoft/surface/common/repos.nix | 8 -------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/microsoft/surface/TODO.org b/microsoft/surface/TODO.org index f5526c30..3882ef89 100644 --- a/microsoft/surface/TODO.org +++ b/microsoft/surface/TODO.org @@ -11,6 +11,8 @@ - State "DONE" from "DOING" [2021-03-06 Sat 20:55] :END: * Firmware +** DONE Remove archived kvalo/ath10k-firmware repo +- The QCA6174 firmware appears to be in the standard Linux firmware repo, now ** DONE Remove old firmware binaries - Looks like the ath10k files aren't needed, any more ** DONE Create derivative for `ipts` firmware diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 244d9702..cb7ddba2 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -16,14 +16,6 @@ inherit rev sha256; }; - # This repo has been obsoleted: - ath10k-firmware = fetchFromGitHub { - owner = "kvalo"; - repo = "ath10k-firmware"; - rev = "c987e38cbdb90dcb4e477d5dd21de66c77996435"; - sha256 = "16a67baxlga8vb43zbby2s7kpp4488vczg3manmr9g3wxnhhb9n3"; - }; - surface-go-ath10k-firmware_backup = fetchFromGitHub { owner = "mexisme"; repo = "linux-surface_ath10k-firmware"; From 98a46074e8c13ad845dd19469a9f2f9f26c86c5c Mon Sep 17 00:00:00 2001 From: mexisme Date: Sat, 19 Oct 2024 14:48:33 +1300 Subject: [PATCH 1085/1476] Deprecation warning for QCA6174 firmware --- microsoft/surface/README.md | 22 +++++++++---------- .../surface-go/firmware/ath10k/default.nix | 9 ++++++++ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/microsoft/surface/README.md b/microsoft/surface/README.md index 197a5461..a461f318 100644 --- a/microsoft/surface/README.md +++ b/microsoft/surface/README.md @@ -91,11 +91,17 @@ See: https://github.com/linux-surface/linux-surface/blob/master/README.md ## Wifi Firmware for Surface Go -On the Surface Go, the standard firmware from the official Linux Firmware repo has issues with the -`ath10k` QCA6174 Wifi device. -You will see messages like "Can't ping firmware". +On the Surface Go, the standard firmware from the official Linux Firmware repo used to have issues +with the `ath10k` QCA6174 Wifi device. -The most effective fix to-date is to remove the `board-2.bin` file or replace it with a copy of the +This was fixed in Nov 2021: +- https://github.com/linux-surface/linux-surface/issues/542#issuecomment-976995453 + +### Background: + +With the older firmware, you would see messages like "Can't ping firmware". + +The most effective fix was to remove the `board-2.bin` file or replace it with a copy of the `board.bin` file. The derivative in `surface-go/firmware/ath10k/` can configure this, with the @@ -107,14 +113,6 @@ This is the only way (currently) to force the driver to use the new firmware. For more details, see: https://github.com/linux-surface/linux-surface/wiki/Surface-Go#wifi-firmware -_*NOTE:*_ There's some work to patch the kernel to make it easier to override which firmware file -to use for QCA6174, which would obviate this more-destructuve approach: -- https://github.com/linux-surface/kernel/commit/22ef83836c4aa89e9eb98de9b47ed24b6c2a1d45 - -_*NOTE:*_ There was an attempt to get this firmware incorporated into the aggregate `board-2.bin`, -but (as of this writing) the request appears to have been ignored: -- https://github.com/linux-surface/linux-surface/issues/41 - References: - https://github.com/jakeday/linux-surface/issues/441 - https://www.reddit.com/r/SurfaceLinux/comments/e8quqg/surface_go_official_wifi_fix/ diff --git a/microsoft/surface/surface-go/firmware/ath10k/default.nix b/microsoft/surface/surface-go/firmware/ath10k/default.nix index f861f8eb..a7ad6a9a 100644 --- a/microsoft/surface/surface-go/firmware/ath10k/default.nix +++ b/microsoft/surface/surface-go/firmware/ath10k/default.nix @@ -13,6 +13,15 @@ in { }; config = mkIf cfg.replace { + warnings = [''A working version of the ath10k QCA6174 firmware has been added to the kernel.org linux-firmware + repo, making this fix obsolete. + See: + - https://github.com/linux-surface/linux-surface/issues/542#issuecomment-976995453 + - https://github.com/linux-surface/linux-surface/wiki/Surface-Go#wi-fi-firmware + + NOTE: This module option will probably be removed in the near future. + '']; + hardware.enableAllFirmware = true; hardware.firmware = [ (pkgs.callPackage ./ath10k-replace.nix {}) From a825917eadfd78fe66728890c72fee00edcc8c28 Mon Sep 17 00:00:00 2001 From: mexisme Date: Sat, 19 Oct 2024 14:50:45 +1300 Subject: [PATCH 1086/1476] README tidy-up --- microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md b/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md index 516dc181..a4c629e9 100644 --- a/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md +++ b/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md @@ -45,5 +45,5 @@ Most "common" modules now have an `enable` option, which is `false` by default. This hasn't been finalised, partly as I now only have access to a Surface Go 1, these days, so I'm maybe not the best custodian of this code any longer. -However, hopefully the (imminent) `surface-go/` module is a reasonable exmample, and we should be +However, hopefully the `surface-go/` module is a reasonable exmample, and we should be able to gather more examples for more model specialisations over time. From 2d125b6c56bf301393a46474f52b8f958711908e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkka=20Heinil=C3=A4?= Date: Thu, 10 Oct 2024 14:58:44 +0300 Subject: [PATCH 1087/1476] Add basic dell precision 5490 --- dell/precision/5490/README.md | 15 +++++++++++++++ dell/precision/5490/default.nix | 14 ++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 dell/precision/5490/README.md create mode 100644 dell/precision/5490/default.nix diff --git a/dell/precision/5490/README.md b/dell/precision/5490/README.md new file mode 100644 index 00000000..380a8436 --- /dev/null +++ b/dell/precision/5490/README.md @@ -0,0 +1,15 @@ +# Dell Precision 5490 + +The internal monitor needs Linux Kernel >= 6.7 so enabling hybrid graphics does not work out of the box in 24.05. Setting + +``` +boot.kernelParams = [ "i915.force_probe=7d55" ]; +``` + +helped but introduced some screen tearing. + +Setting +``` +boot.kernelPackages = pkgs.linuxPackages_latest; +``` +in nixos-stable worked with no problems. diff --git a/dell/precision/5490/default.nix b/dell/precision/5490/default.nix new file mode 100644 index 00000000..0e0c5b49 --- /dev/null +++ b/dell/precision/5490/default.nix @@ -0,0 +1,14 @@ +{ lib, ... }: +{ + imports = [ + ../../../common/gpu/nvidia + ]; + + # or even better: boot.kernelParams = pkgs.linuxPackages_latest; + boot.kernelParams = [ "i915.force_probe=7d55" ]; + + hardware.nvidia.prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} From b2f6701f91a06e7e641eed8602ec5cd67cc8d4da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkka=20Heinil=C3=A4?= Date: Thu, 10 Oct 2024 15:28:45 +0300 Subject: [PATCH 1088/1476] dell-precision-5490: fix tests and update README --- README.md | 1 + dell/precision/5490/default.nix | 1 + flake.nix | 1 + 3 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 2a1c20c0..8fde5d66 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,7 @@ See code for all available configurations. | [Dell Optiplex 3050](dell/optiplex/3050) | `` | | [Dell Poweredge R7515](dell/poweredge/r7515) | `` | | [Dell Precision 3541](dell/precision/3541) | `` | +| [Dell Precision 5490](dell/precision/5490) | `` | | [Dell Precision 5530](dell/precision/5530) | `` | | [Dell Precision 7520](dell/precision/7520) | `` | | [Dell XPS 13 7390](dell/xps/13-7390) | `` | diff --git a/dell/precision/5490/default.nix b/dell/precision/5490/default.nix index 0e0c5b49..4881de13 100644 --- a/dell/precision/5490/default.nix +++ b/dell/precision/5490/default.nix @@ -7,6 +7,7 @@ # or even better: boot.kernelParams = pkgs.linuxPackages_latest; boot.kernelParams = [ "i915.force_probe=7d55" ]; + hardware.nvidia.open = true; hardware.nvidia.prime = { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; diff --git a/flake.nix b/flake.nix index 47075b03..600dc968 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,7 @@ dell-optiplex-3050 = import ./dell/optiplex/3050; dell-poweredge-r7515 = import ./dell/poweredge/r7515; dell-precision-3541 = import ./dell/precision/3541; + dell-precision-5490 = import ./dell/precision/5490; dell-precision-5530 = import ./dell/precision/5530; dell-precision-5560 = import ./dell/precision/5560; dell-precision-7520 = import ./dell/precision/7520; From 99918dfbd7a86e18071ddc72e81a2f3ffe5bcea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkka=20Heinil=C3=A4?= Date: Mon, 14 Oct 2024 11:53:49 +0300 Subject: [PATCH 1089/1476] dell-precision-5490: make force_probe conditional --- dell/precision/5490/README.md | 8 ++++---- dell/precision/5490/default.nix | 8 +++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/dell/precision/5490/README.md b/dell/precision/5490/README.md index 380a8436..29088e55 100644 --- a/dell/precision/5490/README.md +++ b/dell/precision/5490/README.md @@ -1,15 +1,15 @@ # Dell Precision 5490 -The internal monitor needs Linux Kernel >= 6.7 so enabling hybrid graphics does not work out of the box in 24.05. Setting +Linux kernel versions prior to 6.7 may not function correctly with the internal monitor, as official support was introduced in version 6.7 (https://www.phoronix.com/news/Linux-6.7-Intel-Meteor-Lake-Gfx). You can enable experimental support by adding the following parameter: ``` boot.kernelParams = [ "i915.force_probe=7d55" ]; ``` -helped but introduced some screen tearing. +However, this may lead to some screen tearing. -Setting +If possible, you might benefit from a newer kernel, for example: ``` boot.kernelPackages = pkgs.linuxPackages_latest; ``` -in nixos-stable worked with no problems. +as it seems to work without any issues. diff --git a/dell/precision/5490/default.nix b/dell/precision/5490/default.nix index 4881de13..b2cbabe4 100644 --- a/dell/precision/5490/default.nix +++ b/dell/precision/5490/default.nix @@ -1,13 +1,11 @@ -{ lib, ... }: +{ config, lib, ... }: { imports = [ - ../../../common/gpu/nvidia + ../../../common/gpu/nvidia/ada-lovelace ]; - # or even better: boot.kernelParams = pkgs.linuxPackages_latest; - boot.kernelParams = [ "i915.force_probe=7d55" ]; + boot.kernelParams = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.7") [ "i915.force_probe=7d55" ]; - hardware.nvidia.open = true; hardware.nvidia.prime = { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; From f682fedae05303287c07c859423203c578db4213 Mon Sep 17 00:00:00 2001 From: Cryolitia PukNgae Date: Sun, 13 Oct 2024 08:10:23 +0800 Subject: [PATCH 1090/1476] gpd-win-max-2-2023/bmi260: 0.0.2 -> 1.0.0 --- gpd/win-max-2/2023/bmi260/default.nix | 7 +++++-- gpd/win-max-2/2023/bmi260/package.nix | 25 +++++++++++++------------ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/gpd/win-max-2/2023/bmi260/default.nix b/gpd/win-max-2/2023/bmi260/default.nix index 099367a8..33205e74 100644 --- a/gpd/win-max-2/2023/bmi260/default.nix +++ b/gpd/win-max-2/2023/bmi260/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: with lib; @@ -28,6 +28,9 @@ in config = mkIf config.hardware.sensor.iio.bmi260.enable { boot.extraModulePackages = [ bmi260 ]; - boot.kernelModules = [ "bmi260_core" "bmi260_i2c" ]; + boot.kernelModules = [ + "bmi260_core" + "bmi260_i2c" + ]; }; } diff --git a/gpd/win-max-2/2023/bmi260/package.nix b/gpd/win-max-2/2023/bmi260/package.nix index b19bb071..a1e2db4f 100644 --- a/gpd/win-max-2/2023/bmi260/package.nix +++ b/gpd/win-max-2/2023/bmi260/package.nix @@ -1,28 +1,26 @@ -{ lib -, stdenv -, fetchFromGitHub -, fetchurl -, kernel +{ + lib, + stdenv, + fetchFromGitHub, + kernel, }: stdenv.mkDerivation (finalAttr: { pname = "bmi260"; - version = "0.0.2"; + version = "1.0.0"; src = fetchFromGitHub { owner = "hhd-dev"; repo = finalAttr.pname; rev = "v${finalAttr.version}"; - hash = "sha256-J0npD75QqOGY1QUoznBjQ+jX28gq5u6b0JZOseclwE8="; + hash = "sha256-EFous0pPpCuVoCsFz6/4NryQRSH9Jw9Qng+RY1hiX1c="; }; hardeningDisable = [ "pic" ]; nativeBuildInputs = kernel.moduleBuildDependencies; - makeFlags = [ - "KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" - ]; + makeFlags = [ "KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; installPhase = '' runHook preInstall @@ -34,8 +32,11 @@ stdenv.mkDerivation (finalAttr: { meta = with lib; { homepage = "https://github.com/hhd-dev/bmi260"; - description = "A kernel module driver for the Bosch BMI260 IMU"; - license = with licenses; [ bsd3 gpl2Only ]; + description = "A kernel driver for the Bosch BMI260 IMU"; + license = with licenses; [ + bsd3 + gpl2Only + ]; maintainers = with maintainers; [ Cryolitia ]; platforms = platforms.linux; }; From 38279034170b1e2929b2be33bdaedbf14a57bfeb Mon Sep 17 00:00:00 2001 From: Daniel Green Date: Wed, 11 Sep 2024 23:23:44 +0100 Subject: [PATCH 1091/1476] Add Asus Zenbook ux535 --- README.md | 1 + asus/zenbook/ux535/README.md | 105 +++++++++++++++++++++++++++++++++ asus/zenbook/ux535/default.nix | 31 ++++++++++ flake.nix | 1 + 4 files changed, 138 insertions(+) create mode 100644 asus/zenbook/ux535/README.md create mode 100644 asus/zenbook/ux535/default.nix diff --git a/README.md b/README.md index 8fde5d66..3c92298e 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ See code for all available configurations. | [Asus TUF FA507RM](asus/fa507rm) | `` | | [Asus TUF FA507NV](asus/fa507nv) | `` | | [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `` | +| [Asus Zenbook Pro 15 UX535](asus/zenbook/ux535/) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Chuwi MiniBook X](chuwi/minibook-x) | `` | | [Deciso DEC series](deciso/dec) | `` | diff --git a/asus/zenbook/ux535/README.md b/asus/zenbook/ux535/README.md new file mode 100644 index 00000000..ca24e939 --- /dev/null +++ b/asus/zenbook/ux535/README.md @@ -0,0 +1,105 @@ +# Asus Zenbook Pro UX535 + +Tested on a slightly modified device - the Intel Optane combination SSD was replaced with a higher capacity Sabrent Drive. From Using the Optane Drive without Optane Mode in Windows, I hypothesise that the drive should work assuming the BIOS Settings are Correct - I believe there was a RAID mode I turned off? In Windows, the Optane blocks appeared as a separate drive, I'd suggest maybe use this as Swap? + +## ScreenPad: + +Configuration for the ScreenPad is unable to be provided here at this time, due to reliance on Additional Modules not included in Nixpkgs. If you want to install the [ScreenPad Kernel Module](https://github.com/Plippo/asus-wmi-screenpad), I recommend using the packaging of it for nix created by [MatthewCash](https://github.com/MatthewCash/asus-wmi-screenpad-module). It can be installed as below: + +```nix +# flake.nix +{ + inputs = { + + nixpkgs = { + url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + + screenpad-driver={ + url = "github:MatthewCash/asus-wmi-screenpad-module"; + inputs.nixpkgs.follows="nixpkgs"; + }; + + }; + outputs = inputs@{nixpkgs, screenpad-driver, ...}:{ + + # Replace hostname with your hostname + nixosConfigurations.hostname=inputs.nixpkgs.lib.nixosSystem{ + modules = [ + ./configuration.nix + { + boot.extraModulePackages = let + screenpad-driver-package = (kernelPackage: + let + asus-wmi-screenpad = screenpad-driver.defaultPackage.${system}.override{kernel=kernelPackage;}; + in [ + asus-wmi-screenpad + ] + ); + in (screenpad-driver-package ${yourKernelPackages}.kernel); # Replace ${yourKernelPackages} with the value of your config.boot.kernelPackages, for me, this would be pkgs.kernelPackages_latest + boot.kernelModules = [ + "asus-wmi-screenpad" + ]; + } + ]; + }; + + }; +} + +``` + +I also recommend writing some kind of script to be able to turn the screenpad On and Off with the correct positioning. If you're using KDE Plasma, feel free to use [mine](https://github.com/Green-D-683/Asus-ScreenPad-Linux). You may also want a script to be able to turn on the main display, as it has an irritating habit of turning itself off, making the screenpad the primary display whenever you plug in a new monitor configuration. + +## Battery charging limit: + +Due to the common module for ASUS batteries, you can make your battery only charge up to a certain percentage to improve its life. You can place something similar to the following in your configuration to enable it. + +```nix +hardware.asus.battery = +{ + chargeUpto = 90; # Maximum level of charge for your battery, as a percentage. + enableChargeUptoScript = true; # Whether to add charge-upto to environment.systemPackages. `charge-upto 100` temporarily sets the charge limit to 100%, useful if you're going to need the extra battery on a longer journey. +}; +``` + +## Thunderbolt: + +I don't own any Thunderbolt devices to be able to test transfer speeds or PCIe Tunnelling, but I've tested both USB Monitors and Display-Out though the Thunderbolt 3 port and both seem to work well. + +## Hardware Lists: + +```bash +$ lspci -nn +00:00.0 Host bridge [0600]: Intel Corporation 10th Gen Core Processor Host Bridge/DRAM Registers [8086:9b44] (rev 02) +00:01.0 PCI bridge [0604]: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 02) +00:02.0 VGA compatible controller [0300]: Intel Corporation CometLake-H GT2 [UHD Graphics] [8086:9bc4] (rev 05) +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 02) +00:08.0 System peripheral [0880]: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model [8086:1911] +00:12.0 Signal processing controller [1180]: Intel Corporation Comet Lake PCH Thermal Controller [8086:06f9] +00:14.0 USB controller [0c03]: Intel Corporation Comet Lake USB 3.1 xHCI Host Controller [8086:06ed] +00:14.2 RAM memory [0500]: Intel Corporation Comet Lake PCH Shared SRAM [8086:06ef] +00:14.3 Network controller [0280]: Intel Corporation Comet Lake PCH CNVi WiFi [8086:06f0] +00:15.0 Serial bus controller [0c80]: Intel Corporation Comet Lake PCH Serial IO I2C Controller #0 [8086:06e8] +00:15.1 Serial bus controller [0c80]: Intel Corporation Comet Lake PCH Serial IO I2C Controller #1 [8086:06e9] +00:15.2 Serial bus controller [0c80]: Intel Corporation Comet Lake PCH Serial IO I2C Controller #2 [8086:06ea] +00:16.0 Communication controller [0780]: Intel Corporation Comet Lake HECI Controller [8086:06e0] +00:17.0 SATA controller [0106]: Intel Corporation Device [8086:06d3] +00:1b.0 PCI bridge [0604]: Intel Corporation Comet Lake PCI Express Root Port #21 [8086:06ac] (rev f0) +00:1d.0 PCI bridge [0604]: Intel Corporation Comet Lake PCI Express Root Port #9 [8086:06b0] (rev f0) +00:1d.5 PCI bridge [0604]: Intel Corporation Device [8086:06b5] (rev f0) +00:1f.0 ISA bridge [0601]: Intel Corporation Comet Lake LPC Controller [8086:068d] +00:1f.3 Audio device [0403]: Intel Corporation Comet Lake PCH cAVS [8086:06c8] +00:1f.4 SMBus [0c05]: Intel Corporation Comet Lake PCH SMBus Controller [8086:06a3] +00:1f.5 Serial bus controller [0c80]: Intel Corporation Comet Lake PCH SPI Controller [8086:06a4] +01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117M [GeForce GTX 1650 Ti Mobile] [10de:1f95] (rev a1) +01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:10fa] (rev a1) +02:00.0 PCI bridge [0604]: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 2C 2018] [8086:15e7] (rev 06) +03:00.0 PCI bridge [0604]: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 2C 2018] [8086:15e7] (rev 06) +03:01.0 PCI bridge [0604]: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 2C 2018] [8086:15e7] (rev 06) +03:02.0 PCI bridge [0604]: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 2C 2018] [8086:15e7] (rev 06) +04:00.0 System peripheral [0880]: Intel Corporation JHL7540 Thunderbolt 3 NHI [Titan Ridge 2C 2018] [8086:15e8] (rev 06) +6c:00.0 USB controller [0c03]: Intel Corporation JHL7540 Thunderbolt 3 USB Controller [Titan Ridge 2C 2018] [8086:15e9] (rev 06) +6d:00.0 Non-Volatile memory controller [0108]: Phison Electronics Corporation E18 PCIe4 NVMe Controller [1987:5018] (rev 01) +6e:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader [10ec:522a] (rev 01) +``` diff --git a/asus/zenbook/ux535/default.nix b/asus/zenbook/ux535/default.nix new file mode 100644 index 00000000..a6df788d --- /dev/null +++ b/asus/zenbook/ux535/default.nix @@ -0,0 +1,31 @@ +{ + lib, + ... +}: +{ + imports = [ + ../../../common/gpu/nvidia/turing + ../../../common/gpu/nvidia/prime.nix + ../../../common/cpu/intel + ../../../common/gpu/intel/comet-lake + ../../../common/pc/laptop/ssd + ../../../common/hidpi.nix # 4K screen is HiDPI + ../../battery.nix + ]; + + config = { + hardware.nvidia = { + prime = { + intelBusId = "PCI:0:2:0"; # Intel UHD Graphics Comet Lake + nvidiaBusId = "PCI:1:0:0"; # Nvidia GTX 1650 Ti Max-Q + + reverseSync.enable = lib.mkDefault true; # Turning this on meant the Thunderbolt port was able to be used for video + }; + dynamicBoost.enable = false; # Doesn't work on this GPU - causes error rebuilding + }; + + powerManagement.powertop.enable = lib.mkDefault false; # This caused issues with USB ports losing power while the device was on + + services.hardware.bolt.enable = lib.mkDefault true; # Thunderbolt + }; +} diff --git a/flake.nix b/flake.nix index 600dc968..c404a9fc 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,7 @@ asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-rog-strix-x570e = import ./asus/rog-strix/x570e; asus-zenbook-ux371 = import ./asus/zenbook/ux371; + asus-zenbook-ux535 = import ./asus/zenbook/ux535; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; asus-zephyrus-ga402x = import ./asus/zephyrus/ga402x; From 0ccdd2705669d68bcafd15f45a70ea3c6df57b60 Mon Sep 17 00:00:00 2001 From: Gavin John Date: Fri, 18 Oct 2024 12:38:51 -0700 Subject: [PATCH 1092/1476] common/gpu/intel: reformat --- common/gpu/intel/comet-lake/default.nix | 4 +- common/gpu/intel/default.nix | 96 ++++++++++++----------- common/gpu/intel/elkhart-lake/default.nix | 4 +- common/gpu/intel/jasper-lake/default.nix | 4 +- common/gpu/intel/sandy-bridge/default.nix | 4 +- 5 files changed, 54 insertions(+), 58 deletions(-) diff --git a/common/gpu/intel/comet-lake/default.nix b/common/gpu/intel/comet-lake/default.nix index f5dd5ad6..c4526f48 100644 --- a/common/gpu/intel/comet-lake/default.nix +++ b/common/gpu/intel/comet-lake/default.nix @@ -1,7 +1,5 @@ { imports = [ ../. ]; - boot.kernelParams = [ - "i915.enable_guc=2" - ]; + boot.kernelParams = [ "i915.enable_guc=2" ]; } diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index 43e5ffa5..3a5c8d5c 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -6,54 +6,58 @@ }: { imports = [ ../24.05-compat.nix ]; - options.hardware.intelgpu.driver = lib.mkOption { - description = "Intel GPU driver to use"; - type = lib.types.enum [ - "i915" - "xe" - ]; - default = "i915"; - }; - options.hardware.intelgpu.loadInInitrd = - lib.mkEnableOption "Load the Intel GPU kernel module at stage 1 boot. (Added to `boot.initrd.kernelModules`)" - // { - default = true; + options.hardware.intelgpu = { + driver = lib.mkOption { + description = "Intel GPU driver to use"; + type = lib.types.enum [ + "i915" + "xe" + ]; + default = "i915"; }; - config = { - boot.initrd.kernelModules = lib.optionals config.hardware.intelgpu.loadInInitrd [ - config.hardware.intelgpu.driver - ]; - - hardware.graphics.extraPackages = with pkgs; [ - ( - if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then - vaapiIntel - else - intel-vaapi-driver.override { enableHybridCodec = true; } - ) - intel-media-driver - ]; - - hardware.graphics.extraPackages32 = with pkgs.driversi686Linux; [ - ( - if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then - vaapiIntel - else - intel-vaapi-driver.override { enableHybridCodec = true; } - ) - intel-media-driver - ]; - - assertions = [ - { - assertion = ( - config.hardware.intelgpu.driver != "xe" - || lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8" - ); - message = "Intel Xe GPU driver is not supported on kernels earlier than 6.8. Update or use the i915 driver."; - } - ]; + loadInInitrd = + lib.mkEnableOption "Load the Intel GPU kernel module at stage 1 boot. (Added to `boot.initrd.kernelModules`)" + // { + default = true; + }; }; + + config = + let + cfg = config.hardware.intelgpu; + in + { + boot.initrd.kernelModules = lib.optionals cfg.loadInInitrd [ cfg.driver ]; + + hardware.graphics.extraPackages = with pkgs; [ + ( + if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then + vaapiIntel + else + intel-vaapi-driver.override { enableHybridCodec = true; } + ) + intel-media-driver + ]; + + hardware.graphics.extraPackages32 = with pkgs.driversi686Linux; [ + ( + if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then + vaapiIntel + else + intel-vaapi-driver.override { enableHybridCodec = true; } + ) + intel-media-driver + ]; + + assertions = [ + { + assertion = ( + cfg.driver != "xe" || lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8" + ); + message = "Intel Xe GPU driver is not supported on kernels earlier than 6.8. Update or use the i915 driver."; + } + ]; + }; } diff --git a/common/gpu/intel/elkhart-lake/default.nix b/common/gpu/intel/elkhart-lake/default.nix index f5dd5ad6..c4526f48 100644 --- a/common/gpu/intel/elkhart-lake/default.nix +++ b/common/gpu/intel/elkhart-lake/default.nix @@ -1,7 +1,5 @@ { imports = [ ../. ]; - boot.kernelParams = [ - "i915.enable_guc=2" - ]; + boot.kernelParams = [ "i915.enable_guc=2" ]; } diff --git a/common/gpu/intel/jasper-lake/default.nix b/common/gpu/intel/jasper-lake/default.nix index f5dd5ad6..c4526f48 100644 --- a/common/gpu/intel/jasper-lake/default.nix +++ b/common/gpu/intel/jasper-lake/default.nix @@ -1,7 +1,5 @@ { imports = [ ../. ]; - boot.kernelParams = [ - "i915.enable_guc=2" - ]; + boot.kernelParams = [ "i915.enable_guc=2" ]; } diff --git a/common/gpu/intel/sandy-bridge/default.nix b/common/gpu/intel/sandy-bridge/default.nix index 682815ce..47d6b9a8 100644 --- a/common/gpu/intel/sandy-bridge/default.nix +++ b/common/gpu/intel/sandy-bridge/default.nix @@ -3,7 +3,5 @@ # Enables RC6, RC6p and RC6pp. # Last two are only available on Sandy Bridge CPUs (circa 2011). - boot.kernelParams = [ - "i915.enable_rc6=7" - ]; + boot.kernelParams = [ "i915.enable_rc6=7" ]; } From 184091915d8b88c9c44b63cc7dfadfa3ed1044c1 Mon Sep 17 00:00:00 2001 From: Gavin John Date: Fri, 18 Oct 2024 14:16:04 -0700 Subject: [PATCH 1093/1476] common/gpu/intel: add vaapi configuration options --- common/gpu/intel/default.nix | 59 +++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index 3a5c8d5c..28c6e93e 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -22,34 +22,57 @@ // { default = true; }; + + vaapiDriver = lib.mkOption { + description = "Intel VAAPI driver to use (use null to use both)"; + type = lib.types.nullOr ( + lib.types.enum [ + "intel-vaapi-driver" + "intel-media-driver" + ] + ); + default = null; # Use both drivers when we don't know which one to use + }; + + enableHybridCodec = lib.mkEnableOption "hybrid codec support for Intel GPUs"; }; config = let cfg = config.hardware.intelgpu; + + useIntelVaapiDriver = cfg.vaapiDriver == "intel-vaapi-driver" || cfg.vaapiDriver == null; + intel-vaapi-driver = (pkgs.intel-vaapi-driver or pkgs.vaapiIntel).override { + enableHybridCodec = cfg.enableHybridCodec; + }; + intel-vaapi-driver-32 = (pkgs.driversi686Linux.intel-vaapi-driver or pkgs.driversi686Linux.vaapiIntel).override { + enableHybridCodec = cfg.enableHybridCodec; + }; + + useIntelOcl = useIntelVaapiDriver && (config.hardware.enableAllFirmware or config.nixpkgs.config.allowUnfree or false); + intel-ocl = pkgs.intel-ocl; + + useIntelMediaDriver = cfg.vaapiDriver == "intel-media-driver" || cfg.vaapiDriver == null; + intel-media-driver = pkgs.intel-media-driver; + intel-media-driver-32 = pkgs.driversi686Linux.intel-media-driver; + intel-compute-runtime = pkgs.intel-compute-runtime; + vpl-gpu-rt = pkgs.vpl-gpu-rt or pkgs.onevpl-intel-gpu; in { boot.initrd.kernelModules = lib.optionals cfg.loadInInitrd [ cfg.driver ]; - hardware.graphics.extraPackages = with pkgs; [ - ( - if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then - vaapiIntel - else - intel-vaapi-driver.override { enableHybridCodec = true; } - ) - intel-media-driver - ]; + hardware.graphics.extraPackages = + lib.optionals useIntelVaapiDriver [ intel-vaapi-driver ] + ++ lib.optionals useIntelOcl [ intel-ocl ] + ++ lib.optionals useIntelMediaDriver [ + intel-media-driver + intel-compute-runtime + vpl-gpu-rt + ]; - hardware.graphics.extraPackages32 = with pkgs.driversi686Linux; [ - ( - if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then - vaapiIntel - else - intel-vaapi-driver.override { enableHybridCodec = true; } - ) - intel-media-driver - ]; + hardware.graphics.extraPackages32 = + lib.optionals useIntelVaapiDriver [ intel-vaapi-driver-32 ] + ++ lib.optionals useIntelMediaDriver [ intel-media-driver-32 ]; assertions = [ { From 86a33c3e32822c62127c70766d56731dadfbed5c Mon Sep 17 00:00:00 2001 From: Gavin John Date: Fri, 18 Oct 2024 14:25:48 -0700 Subject: [PATCH 1094/1476] common/gpu/intel: update modules to use new options --- common/gpu/intel/bay-trail/default.nix | 10 ++++++++++ common/gpu/intel/braswell/default.nix | 10 ++++++++++ common/gpu/intel/broadwell/default.nix | 10 ++++++++++ common/gpu/intel/comet-lake/default.nix | 2 ++ common/gpu/intel/elkhart-lake/default.nix | 2 ++ common/gpu/intel/haswell/default.nix | 10 ++++++++++ common/gpu/intel/jasper-lake/default.nix | 2 ++ common/gpu/intel/kaby-lake/default.nix | 2 ++ common/gpu/intel/sandy-bridge/default.nix | 2 ++ common/gpu/intel/tiger-lake/default.nix | 1 + 10 files changed, 51 insertions(+) create mode 100644 common/gpu/intel/bay-trail/default.nix create mode 100644 common/gpu/intel/braswell/default.nix create mode 100644 common/gpu/intel/broadwell/default.nix create mode 100644 common/gpu/intel/haswell/default.nix diff --git a/common/gpu/intel/bay-trail/default.nix b/common/gpu/intel/bay-trail/default.nix new file mode 100644 index 00000000..0b19cb78 --- /dev/null +++ b/common/gpu/intel/bay-trail/default.nix @@ -0,0 +1,10 @@ +{ lib, pkgs, ... }: + +{ + imports = [ ../. ]; + + hardware.intelgpu = { + vaapiDriver = "intel-vaapi-driver"; + enableHybridCodec = true; + }; +} diff --git a/common/gpu/intel/braswell/default.nix b/common/gpu/intel/braswell/default.nix new file mode 100644 index 00000000..0b19cb78 --- /dev/null +++ b/common/gpu/intel/braswell/default.nix @@ -0,0 +1,10 @@ +{ lib, pkgs, ... }: + +{ + imports = [ ../. ]; + + hardware.intelgpu = { + vaapiDriver = "intel-vaapi-driver"; + enableHybridCodec = true; + }; +} diff --git a/common/gpu/intel/broadwell/default.nix b/common/gpu/intel/broadwell/default.nix new file mode 100644 index 00000000..0b19cb78 --- /dev/null +++ b/common/gpu/intel/broadwell/default.nix @@ -0,0 +1,10 @@ +{ lib, pkgs, ... }: + +{ + imports = [ ../. ]; + + hardware.intelgpu = { + vaapiDriver = "intel-vaapi-driver"; + enableHybridCodec = true; + }; +} diff --git a/common/gpu/intel/comet-lake/default.nix b/common/gpu/intel/comet-lake/default.nix index c4526f48..43ed1c46 100644 --- a/common/gpu/intel/comet-lake/default.nix +++ b/common/gpu/intel/comet-lake/default.nix @@ -2,4 +2,6 @@ imports = [ ../. ]; boot.kernelParams = [ "i915.enable_guc=2" ]; + + hardware.intelgpu.vaapiDriver = "intel-media-driver"; } diff --git a/common/gpu/intel/elkhart-lake/default.nix b/common/gpu/intel/elkhart-lake/default.nix index c4526f48..43ed1c46 100644 --- a/common/gpu/intel/elkhart-lake/default.nix +++ b/common/gpu/intel/elkhart-lake/default.nix @@ -2,4 +2,6 @@ imports = [ ../. ]; boot.kernelParams = [ "i915.enable_guc=2" ]; + + hardware.intelgpu.vaapiDriver = "intel-media-driver"; } diff --git a/common/gpu/intel/haswell/default.nix b/common/gpu/intel/haswell/default.nix new file mode 100644 index 00000000..0b19cb78 --- /dev/null +++ b/common/gpu/intel/haswell/default.nix @@ -0,0 +1,10 @@ +{ lib, pkgs, ... }: + +{ + imports = [ ../. ]; + + hardware.intelgpu = { + vaapiDriver = "intel-vaapi-driver"; + enableHybridCodec = true; + }; +} diff --git a/common/gpu/intel/jasper-lake/default.nix b/common/gpu/intel/jasper-lake/default.nix index c4526f48..43ed1c46 100644 --- a/common/gpu/intel/jasper-lake/default.nix +++ b/common/gpu/intel/jasper-lake/default.nix @@ -2,4 +2,6 @@ imports = [ ../. ]; boot.kernelParams = [ "i915.enable_guc=2" ]; + + hardware.intelgpu.vaapiDriver = "intel-media-driver"; } diff --git a/common/gpu/intel/kaby-lake/default.nix b/common/gpu/intel/kaby-lake/default.nix index e6a2d1ce..dab57600 100644 --- a/common/gpu/intel/kaby-lake/default.nix +++ b/common/gpu/intel/kaby-lake/default.nix @@ -5,4 +5,6 @@ "i915.enable_fbc=1" "i915.enable_psr=2" ]; + + hardware.intelgpu.vaapiDriver = "intel-media-driver"; } diff --git a/common/gpu/intel/sandy-bridge/default.nix b/common/gpu/intel/sandy-bridge/default.nix index 47d6b9a8..51a6ba36 100644 --- a/common/gpu/intel/sandy-bridge/default.nix +++ b/common/gpu/intel/sandy-bridge/default.nix @@ -4,4 +4,6 @@ # Enables RC6, RC6p and RC6pp. # Last two are only available on Sandy Bridge CPUs (circa 2011). boot.kernelParams = [ "i915.enable_rc6=7" ]; + + hardware.intelgpu.vaapiDriver = "intel-vaapi-driver"; } diff --git a/common/gpu/intel/tiger-lake/default.nix b/common/gpu/intel/tiger-lake/default.nix index 86afdccc..f641ad39 100644 --- a/common/gpu/intel/tiger-lake/default.nix +++ b/common/gpu/intel/tiger-lake/default.nix @@ -8,5 +8,6 @@ (lib.mkIf (config.hardware.intelgpu.driver == "i915") { boot.kernelParams = [ "i915.enable_guc=3" ]; }) + { hardware.intelgpu.vaapiDriver = "intel-media-driver"; } ]; } From be33295d69d8864d58df99e5c5602ebff5bf5dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 20 Oct 2024 09:30:47 +0200 Subject: [PATCH 1095/1476] gpu/intel/tiger-lake: simplify conditionals --- common/gpu/intel/tiger-lake/default.nix | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/common/gpu/intel/tiger-lake/default.nix b/common/gpu/intel/tiger-lake/default.nix index f641ad39..3621a4a1 100644 --- a/common/gpu/intel/tiger-lake/default.nix +++ b/common/gpu/intel/tiger-lake/default.nix @@ -1,13 +1,9 @@ { config, lib, ... }: { imports = [ ../. ]; - config = lib.mkMerge [ - (lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8") { - hardware.intelgpu.driver = "xe"; - }) - (lib.mkIf (config.hardware.intelgpu.driver == "i915") { - boot.kernelParams = [ "i915.enable_guc=3" ]; - }) - { hardware.intelgpu.vaapiDriver = "intel-media-driver"; } - ]; + config = { + hardware.intelgpu.driver = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8") "xe"; + boot.kernelParams = lib.mkIf (config.hardware.intelgpu.driver == "i915") [ "i915.enable_guc=3" ]; + hardware.intelgpu.vaapiDriver = "intel-media-driver"; + }; } From 8f38d8a4754cf673c2609c4ed399630db87e678b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draic=20=C3=93=20Mhuiris?= Date: Sun, 20 Oct 2024 11:14:04 +0200 Subject: [PATCH 1096/1476] dell/xps/15-9520: use alder-lake gpu profile --- common/gpu/intel/alder-lake/default.nix | 5 +++++ dell/xps/15-9550/default.nix | 1 + 2 files changed, 6 insertions(+) create mode 100644 common/gpu/intel/alder-lake/default.nix diff --git a/common/gpu/intel/alder-lake/default.nix b/common/gpu/intel/alder-lake/default.nix new file mode 100644 index 00000000..eb5abe99 --- /dev/null +++ b/common/gpu/intel/alder-lake/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ ../. ]; + + hardware.intelgpu.vaapiDriver = "intel-media-driver"; +} diff --git a/dell/xps/15-9550/default.nix b/dell/xps/15-9550/default.nix index 2150a981..1661e8cc 100644 --- a/dell/xps/15-9550/default.nix +++ b/dell/xps/15-9550/default.nix @@ -3,6 +3,7 @@ { imports = [ ../../../common/cpu/intel + ../../../common/gpu/intel/alder-lake ../../../common/pc/laptop # To just use Intel integrated graphics with Intel's open source driver # ../../../common/gpu/nvidia/disable.nix From 3854ace106bd53c1780bc05bcb0e63bade2cd2e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 20 Oct 2024 21:39:15 +0200 Subject: [PATCH 1097/1476] Revert "dell/xps/15-9520: use alder-lake gpu profile" This reverts commit 8f38d8a4754cf673c2609c4ed399630db87e678b. This was added to the wrong laptop model. --- dell/xps/15-9550/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/dell/xps/15-9550/default.nix b/dell/xps/15-9550/default.nix index 1661e8cc..2150a981 100644 --- a/dell/xps/15-9550/default.nix +++ b/dell/xps/15-9550/default.nix @@ -3,7 +3,6 @@ { imports = [ ../../../common/cpu/intel - ../../../common/gpu/intel/alder-lake ../../../common/pc/laptop # To just use Intel integrated graphics with Intel's open source driver # ../../../common/gpu/nvidia/disable.nix From 9da64c8fd97274d6cd2fda6bc161abc229aeb6c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 20 Oct 2024 21:40:44 +0200 Subject: [PATCH 1098/1476] dell/xps/15-9520: add alder-lake gpu profile --- dell/xps/15-9520/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dell/xps/15-9520/default.nix b/dell/xps/15-9520/default.nix index f4b0eecd..19205454 100644 --- a/dell/xps/15-9520/default.nix +++ b/dell/xps/15-9520/default.nix @@ -2,13 +2,14 @@ { imports = [ ../../../common/cpu/intel + ../../../common/gpu/intel/alder-lake ../../../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 From 9fcf30fccf8435f6390efec4a4d38e69c2268a36 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Sat, 19 Oct 2024 21:15:31 +0200 Subject: [PATCH 1099/1476] Make starfive-visionfive-2 merge with sd-image module --- starfive/visionfive/v2/sd-image.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starfive/visionfive/v2/sd-image.nix b/starfive/visionfive/v2/sd-image.nix index 7c30f9c3..d66bd2c7 100644 --- a/starfive/visionfive/v2/sd-image.nix +++ b/starfive/visionfive/v2/sd-image.nix @@ -5,7 +5,7 @@ in { imports = [ "${modulesPath}/profiles/base.nix" "${modulesPath}/installer/sd-card/sd-image.nix" - ./default.nix + ./. ]; sdImage = { From c058019ce1b72c7d450f5e2b3f0921bd205e9f79 Mon Sep 17 00:00:00 2001 From: Gavin John Date: Fri, 18 Oct 2024 14:29:59 -0700 Subject: [PATCH 1100/1476] common/cpu/intel: add architecture-specific modules --- common/cpu/intel/bay-trail/cpu-only.nix | 5 +++++ common/cpu/intel/bay-trail/default.nix | 6 ++++++ common/cpu/intel/braswell/cpu-only.nix | 5 +++++ common/cpu/intel/braswell/default.nix | 6 ++++++ common/cpu/intel/broadwell/cpu-only.nix | 5 +++++ common/cpu/intel/broadwell/default.nix | 6 ++++++ common/cpu/intel/comet-lake/cpu-only.nix | 5 +++++ common/cpu/intel/comet-lake/default.nix | 6 ++++++ common/cpu/intel/elkhart-lake/cpu-only.nix | 5 +++++ common/cpu/intel/elkhart-lake/default.nix | 6 ++++++ common/cpu/intel/haswell/cpu-only.nix | 5 +++++ common/cpu/intel/haswell/default.nix | 6 ++++++ common/cpu/intel/jasper-lake/cpu-only.nix | 5 +++++ common/cpu/intel/jasper-lake/default.nix | 6 ++++++ common/cpu/intel/kaby-lake/cpu-only.nix | 5 +++++ common/cpu/intel/kaby-lake/default.nix | 6 ++++++ common/cpu/intel/sandy-bridge/cpu-only.nix | 5 +++++ common/cpu/intel/sandy-bridge/default.nix | 6 ++++++ common/cpu/intel/tiger-lake/cpu-only.nix | 5 +++++ common/cpu/intel/tiger-lake/default.nix | 6 ++++++ 20 files changed, 110 insertions(+) create mode 100644 common/cpu/intel/bay-trail/cpu-only.nix create mode 100644 common/cpu/intel/bay-trail/default.nix create mode 100644 common/cpu/intel/braswell/cpu-only.nix create mode 100644 common/cpu/intel/braswell/default.nix create mode 100644 common/cpu/intel/broadwell/cpu-only.nix create mode 100644 common/cpu/intel/broadwell/default.nix create mode 100644 common/cpu/intel/comet-lake/cpu-only.nix create mode 100644 common/cpu/intel/comet-lake/default.nix create mode 100644 common/cpu/intel/elkhart-lake/cpu-only.nix create mode 100644 common/cpu/intel/elkhart-lake/default.nix create mode 100644 common/cpu/intel/haswell/cpu-only.nix create mode 100644 common/cpu/intel/haswell/default.nix create mode 100644 common/cpu/intel/jasper-lake/cpu-only.nix create mode 100644 common/cpu/intel/jasper-lake/default.nix create mode 100644 common/cpu/intel/kaby-lake/cpu-only.nix create mode 100644 common/cpu/intel/kaby-lake/default.nix create mode 100644 common/cpu/intel/sandy-bridge/cpu-only.nix create mode 100644 common/cpu/intel/sandy-bridge/default.nix create mode 100644 common/cpu/intel/tiger-lake/cpu-only.nix create mode 100644 common/cpu/intel/tiger-lake/default.nix diff --git a/common/cpu/intel/bay-trail/cpu-only.nix b/common/cpu/intel/bay-trail/cpu-only.nix new file mode 100644 index 00000000..82892615 --- /dev/null +++ b/common/cpu/intel/bay-trail/cpu-only.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../cpu-only.nix + ]; +} diff --git a/common/cpu/intel/bay-trail/default.nix b/common/cpu/intel/bay-trail/default.nix new file mode 100644 index 00000000..08418554 --- /dev/null +++ b/common/cpu/intel/bay-trail/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./cpu-only.nix + ../../../gpu/intel/bay-trail + ]; +} diff --git a/common/cpu/intel/braswell/cpu-only.nix b/common/cpu/intel/braswell/cpu-only.nix new file mode 100644 index 00000000..82892615 --- /dev/null +++ b/common/cpu/intel/braswell/cpu-only.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../cpu-only.nix + ]; +} diff --git a/common/cpu/intel/braswell/default.nix b/common/cpu/intel/braswell/default.nix new file mode 100644 index 00000000..f295a57d --- /dev/null +++ b/common/cpu/intel/braswell/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../cpu-only.nix + ../../../gpu/intel/braswell + ]; +} diff --git a/common/cpu/intel/broadwell/cpu-only.nix b/common/cpu/intel/broadwell/cpu-only.nix new file mode 100644 index 00000000..82892615 --- /dev/null +++ b/common/cpu/intel/broadwell/cpu-only.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../cpu-only.nix + ]; +} diff --git a/common/cpu/intel/broadwell/default.nix b/common/cpu/intel/broadwell/default.nix new file mode 100644 index 00000000..2716ddcf --- /dev/null +++ b/common/cpu/intel/broadwell/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../cpu-only.nix + ../../../gpu/intel/broadwell + ]; +} diff --git a/common/cpu/intel/comet-lake/cpu-only.nix b/common/cpu/intel/comet-lake/cpu-only.nix new file mode 100644 index 00000000..82892615 --- /dev/null +++ b/common/cpu/intel/comet-lake/cpu-only.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../cpu-only.nix + ]; +} diff --git a/common/cpu/intel/comet-lake/default.nix b/common/cpu/intel/comet-lake/default.nix new file mode 100644 index 00000000..325fb1b2 --- /dev/null +++ b/common/cpu/intel/comet-lake/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../cpu-only.nix + ../../../gpu/intel/comet-lake + ]; +} diff --git a/common/cpu/intel/elkhart-lake/cpu-only.nix b/common/cpu/intel/elkhart-lake/cpu-only.nix new file mode 100644 index 00000000..82892615 --- /dev/null +++ b/common/cpu/intel/elkhart-lake/cpu-only.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../cpu-only.nix + ]; +} diff --git a/common/cpu/intel/elkhart-lake/default.nix b/common/cpu/intel/elkhart-lake/default.nix new file mode 100644 index 00000000..352e009a --- /dev/null +++ b/common/cpu/intel/elkhart-lake/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../cpu-only.nix + ../../../gpu/intel/elkhart-lake + ]; +} diff --git a/common/cpu/intel/haswell/cpu-only.nix b/common/cpu/intel/haswell/cpu-only.nix new file mode 100644 index 00000000..82892615 --- /dev/null +++ b/common/cpu/intel/haswell/cpu-only.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../cpu-only.nix + ]; +} diff --git a/common/cpu/intel/haswell/default.nix b/common/cpu/intel/haswell/default.nix new file mode 100644 index 00000000..14cb62e6 --- /dev/null +++ b/common/cpu/intel/haswell/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../cpu-only.nix + ../../../gpu/intel/haswell + ]; +} diff --git a/common/cpu/intel/jasper-lake/cpu-only.nix b/common/cpu/intel/jasper-lake/cpu-only.nix new file mode 100644 index 00000000..82892615 --- /dev/null +++ b/common/cpu/intel/jasper-lake/cpu-only.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../cpu-only.nix + ]; +} diff --git a/common/cpu/intel/jasper-lake/default.nix b/common/cpu/intel/jasper-lake/default.nix new file mode 100644 index 00000000..53c26c52 --- /dev/null +++ b/common/cpu/intel/jasper-lake/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../cpu-only.nix + ../../../gpu/intel/jasper-lake + ]; +} diff --git a/common/cpu/intel/kaby-lake/cpu-only.nix b/common/cpu/intel/kaby-lake/cpu-only.nix new file mode 100644 index 00000000..82892615 --- /dev/null +++ b/common/cpu/intel/kaby-lake/cpu-only.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../cpu-only.nix + ]; +} diff --git a/common/cpu/intel/kaby-lake/default.nix b/common/cpu/intel/kaby-lake/default.nix new file mode 100644 index 00000000..eec1e1b3 --- /dev/null +++ b/common/cpu/intel/kaby-lake/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../cpu-only.nix + ../../../gpu/intel/kaby-lake + ]; +} diff --git a/common/cpu/intel/sandy-bridge/cpu-only.nix b/common/cpu/intel/sandy-bridge/cpu-only.nix new file mode 100644 index 00000000..82892615 --- /dev/null +++ b/common/cpu/intel/sandy-bridge/cpu-only.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../cpu-only.nix + ]; +} diff --git a/common/cpu/intel/sandy-bridge/default.nix b/common/cpu/intel/sandy-bridge/default.nix new file mode 100644 index 00000000..cb7d777d --- /dev/null +++ b/common/cpu/intel/sandy-bridge/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../cpu-only.nix + ../../../gpu/intel/sandy-bridge + ]; +} diff --git a/common/cpu/intel/tiger-lake/cpu-only.nix b/common/cpu/intel/tiger-lake/cpu-only.nix new file mode 100644 index 00000000..82892615 --- /dev/null +++ b/common/cpu/intel/tiger-lake/cpu-only.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../cpu-only.nix + ]; +} diff --git a/common/cpu/intel/tiger-lake/default.nix b/common/cpu/intel/tiger-lake/default.nix new file mode 100644 index 00000000..270b07a1 --- /dev/null +++ b/common/cpu/intel/tiger-lake/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../cpu-only.nix + ../../../gpu/intel/tiger-lake + ]; +} From 7495e877539919988c9ebe4ae0f47343982da0e5 Mon Sep 17 00:00:00 2001 From: Gavin John Date: Thu, 10 Oct 2024 10:04:47 -0700 Subject: [PATCH 1101/1476] treewide: Switch from gpu/intel to cpu/intel where applicable --- apple/imac/14-2/default.nix | 2 +- apple/imac/18-2/default.nix | 3 +-- apple/macbook-air/3/default.nix | 4 +--- apple/macbook-air/4/default.nix | 2 +- apple/macbook-pro/14-1/default.nix | 3 +-- apple/macbook-pro/8-1/default.nix | 2 +- asus/zenbook/ux371/default.nix | 2 +- dell/inspiron/5509/default.nix | 2 +- dell/precision/5560/default.nix | 3 +-- dell/precision/7520/default.nix | 2 +- dell/xps/13-9300/default.nix | 1 - dell/xps/13-9360/default.nix | 2 +- dell/xps/13-9370/default.nix | 2 +- dell/xps/15-9560/default.nix | 3 +-- dell/xps/15-9560/intel/default.nix | 3 +-- dell/xps/15-9570/default.nix | 3 +-- google/pixelbook/default.nix | 2 +- gpd/p2-max/default.nix | 3 +-- hardkernel/odroid-h3/default.nix | 2 +- hp/elitebook/2560p/default.nix | 3 +-- hp/laptop/14s-dq2024nf/default.nix | 3 +-- hp/notebook/14-df0023/default.nix | 3 +-- huawei/machc-wa/default.nix | 3 +-- lenovo/thinkpad/e470/default.nix | 2 +- lenovo/thinkpad/l480/default.nix | 2 +- lenovo/thinkpad/p51/default.nix | 3 +-- lenovo/thinkpad/t420/default.nix | 2 +- lenovo/thinkpad/t480s/default.nix | 1 - lenovo/thinkpad/t520/default.nix | 2 +- lenovo/thinkpad/w520/default.nix | 2 +- lenovo/thinkpad/x220/default.nix | 2 +- malibal/aon/s1/default.nix | 1 - microsoft/surface/surface-go/default.nix | 3 +-- msi/gl65/10SDR-492/default.nix | 3 +-- protectli/vp4670/default.nix | 2 +- 35 files changed, 32 insertions(+), 51 deletions(-) diff --git a/apple/imac/14-2/default.nix b/apple/imac/14-2/default.nix index c64f9671..c20acfd7 100644 --- a/apple/imac/14-2/default.nix +++ b/apple/imac/14-2/default.nix @@ -7,7 +7,7 @@ { imports = [ ../. - ../../../common/gpu/intel + ../../../common/cpu/intel ../../../common/gpu/nvidia ../../../common/gpu/nvidia/kepler ../../../common/hidpi.nix diff --git a/apple/imac/18-2/default.nix b/apple/imac/18-2/default.nix index f44a8fc0..07608239 100644 --- a/apple/imac/18-2/default.nix +++ b/apple/imac/18-2/default.nix @@ -6,8 +6,7 @@ }: { imports = [ ../. - ../../../common/gpu/intel/kaby-lake - ../../../common/gpu/intel + ../../../common/cpu/intel/kaby-lake ../../../common/gpu/amd ../../../common/hidpi.nix ../../../common/pc/laptop/ssd diff --git a/apple/macbook-air/3/default.nix b/apple/macbook-air/3/default.nix index 03221edc..9589e762 100644 --- a/apple/macbook-air/3/default.nix +++ b/apple/macbook-air/3/default.nix @@ -3,13 +3,11 @@ { imports = [ ../../. + ../../../common/cpu/intel ../../../common/pc/laptop ../../../common/pc/ssd ]; # Built-in iSight is recognized by the generic uvcvideo kernel module hardware.facetimehd.enable = false; - - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/apple/macbook-air/4/default.nix b/apple/macbook-air/4/default.nix index 850ad8de..181a0997 100644 --- a/apple/macbook-air/4/default.nix +++ b/apple/macbook-air/4/default.nix @@ -3,7 +3,7 @@ { imports = [ ../. - ../../../common/gpu/intel/sandy-bridge + ../../../common/cpu/intel/sandy-bridge ]; boot.kernelParams = [ diff --git a/apple/macbook-pro/14-1/default.nix b/apple/macbook-pro/14-1/default.nix index 02c8542f..e2fb2abe 100644 --- a/apple/macbook-pro/14-1/default.nix +++ b/apple/macbook-pro/14-1/default.nix @@ -6,8 +6,7 @@ }: { imports = [ ../. - ../../../common/gpu/intel/kaby-lake - ../../../common/gpu/intel + ../../../common/cpu/intel/kaby-lake ../../../common/hidpi.nix ../../../common/pc/laptop/ssd ../../../common/pc/laptop/acpi_call.nix diff --git a/apple/macbook-pro/8-1/default.nix b/apple/macbook-pro/8-1/default.nix index b849c69a..bc77ea6a 100644 --- a/apple/macbook-pro/8-1/default.nix +++ b/apple/macbook-pro/8-1/default.nix @@ -3,7 +3,7 @@ { imports = [ ../. - ../../../common/gpu/intel/sandy-bridge + ../../../common/cpu/intel/sandy-bridge ../../../common/pc/laptop/ssd ]; diff --git a/asus/zenbook/ux371/default.nix b/asus/zenbook/ux371/default.nix index 2ea56294..8e387c0c 100644 --- a/asus/zenbook/ux371/default.nix +++ b/asus/zenbook/ux371/default.nix @@ -5,7 +5,7 @@ }: { imports = [ - ../../../common/gpu/intel/tiger-lake + ../../../common/cpu/intel/tiger-lake ../../../common/pc/laptop ../../../common/pc/laptop/ssd ../../battery.nix diff --git a/dell/inspiron/5509/default.nix b/dell/inspiron/5509/default.nix index b199e92b..e77c9fd1 100644 --- a/dell/inspiron/5509/default.nix +++ b/dell/inspiron/5509/default.nix @@ -1,7 +1,7 @@ { lib, ... }: { imports = [ - ../../../common/gpu/intel/tiger-lake + ../../../common/cpu/intel/tiger-lake ../../../common/pc/laptop ../../../common/pc/ssd ]; diff --git a/dell/precision/5560/default.nix b/dell/precision/5560/default.nix index 6b6e3a0b..f2e3d90a 100644 --- a/dell/precision/5560/default.nix +++ b/dell/precision/5560/default.nix @@ -3,8 +3,7 @@ imports = [ ../../../common/pc/laptop ../../../common/pc/laptop/ssd - ../../../common/cpu/intel - ../../../common/gpu/intel/tiger-lake + ../../../common/cpu/intel/tiger-lake ../../../common/gpu/nvidia/turing ]; diff --git a/dell/precision/7520/default.nix b/dell/precision/7520/default.nix index 09f85927..59fa95e6 100644 --- a/dell/precision/7520/default.nix +++ b/dell/precision/7520/default.nix @@ -4,7 +4,7 @@ ... }: { imports = [ - ../../../common/gpu/intel/kaby-lake + ../../../common/cpu/intel/kaby-lake ../../../common/pc/laptop ../../../common/pc/laptop/ssd ../../../common/gpu/nvidia diff --git a/dell/xps/13-9300/default.nix b/dell/xps/13-9300/default.nix index 101165ee..3ddd0ccf 100644 --- a/dell/xps/13-9300/default.nix +++ b/dell/xps/13-9300/default.nix @@ -6,7 +6,6 @@ let in { imports = [ ../../../common/cpu/intel - ../../../common/gpu/intel ../../../common/pc/laptop ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/ssd diff --git a/dell/xps/13-9360/default.nix b/dell/xps/13-9360/default.nix index 5c73b8bb..f1ea3787 100644 --- a/dell/xps/13-9360/default.nix +++ b/dell/xps/13-9360/default.nix @@ -1,6 +1,6 @@ { imports = [ - ../../../common/gpu/intel/kaby-lake + ../../../common/cpu/intel/kaby-lake ../../../common/pc/laptop ]; diff --git a/dell/xps/13-9370/default.nix b/dell/xps/13-9370/default.nix index 62dddc55..10362b3b 100644 --- a/dell/xps/13-9370/default.nix +++ b/dell/xps/13-9370/default.nix @@ -2,7 +2,7 @@ { imports = [ - ../../../common/gpu/intel/kaby-lake + ../../../common/cpu/intel/kaby-lake ../../../common/pc/laptop ../../../common/pc/laptop/acpi_call.nix ]; diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index 84c300a8..bae517d8 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -1,7 +1,6 @@ { imports = [ - ../../../common/cpu/intel - ../../../common/gpu/intel/kaby-lake + ../../../common/cpu/intel/kaby-lake ../../../common/pc/laptop ./xps-common.nix ../../../common/gpu/nvidia diff --git a/dell/xps/15-9560/intel/default.nix b/dell/xps/15-9560/intel/default.nix index a77cb82d..6d095f5d 100644 --- a/dell/xps/15-9560/intel/default.nix +++ b/dell/xps/15-9560/intel/default.nix @@ -1,7 +1,6 @@ { imports = [ - ../../../../common/cpu/intel - ../../../../common/gpu/intel/kaby-lake + ../../../../common/cpu/intel/kaby-lake ../../../../common/pc/laptop ../../../../common/gpu/nvidia/disable.nix ../xps-common.nix diff --git a/dell/xps/15-9570/default.nix b/dell/xps/15-9570/default.nix index 9ef1a898..91fd0244 100644 --- a/dell/xps/15-9570/default.nix +++ b/dell/xps/15-9570/default.nix @@ -1,8 +1,7 @@ { lib, ... }: { imports = [ - ../../../common/cpu/intel - ../../../common/gpu/intel/kaby-lake + ../../../common/cpu/intel/kaby-lake ../../../common/pc/laptop ./xps-common.nix ]; diff --git a/google/pixelbook/default.nix b/google/pixelbook/default.nix index 0de52ed3..1ea4c7af 100644 --- a/google/pixelbook/default.nix +++ b/google/pixelbook/default.nix @@ -4,6 +4,6 @@ imports = [ ../../common/pc/laptop ../../common/pc/laptop/ssd - ../../common/gpu/intel/kaby-lake + ../../common/cpu/intel/kaby-lake ]; } diff --git a/gpd/p2-max/default.nix b/gpd/p2-max/default.nix index 2c02e178..e8f183e2 100644 --- a/gpd/p2-max/default.nix +++ b/gpd/p2-max/default.nix @@ -2,8 +2,7 @@ imports = [ ../../common/pc/laptop ../../common/pc/laptop/ssd - ../../common/cpu/intel - ../../common/gpu/intel/kaby-lake + ../../common/cpu/intel/kaby-lake ../../common/hidpi.nix ]; } diff --git a/hardkernel/odroid-h3/default.nix b/hardkernel/odroid-h3/default.nix index 52d58195..e52d3a02 100644 --- a/hardkernel/odroid-h3/default.nix +++ b/hardkernel/odroid-h3/default.nix @@ -1,5 +1,5 @@ { imports = [ - ../../common/gpu/intel/jasper-lake + ../../common/cpu/intel/jasper-lake ]; } diff --git a/hp/elitebook/2560p/default.nix b/hp/elitebook/2560p/default.nix index ddcc6c34..9eb33043 100644 --- a/hp/elitebook/2560p/default.nix +++ b/hp/elitebook/2560p/default.nix @@ -2,8 +2,7 @@ with lib; { imports = [ - ../../../common/cpu/intel - ../../../common/gpu/intel/sandy-bridge + ../../../common/cpu/intel/sandy-bridge ../../../common/pc ../../../common/pc/laptop ../../../common/pc/laptop/hdd diff --git a/hp/laptop/14s-dq2024nf/default.nix b/hp/laptop/14s-dq2024nf/default.nix index 03181188..acad2f55 100644 --- a/hp/laptop/14s-dq2024nf/default.nix +++ b/hp/laptop/14s-dq2024nf/default.nix @@ -2,8 +2,7 @@ { imports = [ - ../../../common/cpu/intel - ../../../common/gpu/intel/tiger-lake + ../../../common/cpu/intel/tiger-lake ../../../common/pc ../../../common/pc/laptop ../../../common/pc/laptop/ssd diff --git a/hp/notebook/14-df0023/default.nix b/hp/notebook/14-df0023/default.nix index b3cbfaeb..edff7ea4 100644 --- a/hp/notebook/14-df0023/default.nix +++ b/hp/notebook/14-df0023/default.nix @@ -2,8 +2,7 @@ with lib; { imports = [ - ../../../common/cpu/intel - ../../../common/gpu/intel/sandy-bridge + ../../../common/cpu/intel/sandy-bridge ../../../common/pc ../../../common/pc/laptop ../../../common/pc/laptop/hdd diff --git a/huawei/machc-wa/default.nix b/huawei/machc-wa/default.nix index d92a6a17..9e3259d8 100644 --- a/huawei/machc-wa/default.nix +++ b/huawei/machc-wa/default.nix @@ -5,8 +5,7 @@ ... }: { imports = [ - ../../common/cpu/intel - ../../common/gpu/intel/comet-lake + ../../common/cpu/intel/comet-lake ../../common/gpu/nvidia ../../common/gpu/nvidia/prime.nix ../../common/hidpi.nix diff --git a/lenovo/thinkpad/e470/default.nix b/lenovo/thinkpad/e470/default.nix index e963e12b..6f18b536 100644 --- a/lenovo/thinkpad/e470/default.nix +++ b/lenovo/thinkpad/e470/default.nix @@ -3,7 +3,7 @@ { imports = [ ../. - ../../../common/gpu/intel/kaby-lake + ../../../common/cpu/intel/kaby-lake ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/maxwell ]; diff --git a/lenovo/thinkpad/l480/default.nix b/lenovo/thinkpad/l480/default.nix index 2211c062..d000320d 100644 --- a/lenovo/thinkpad/l480/default.nix +++ b/lenovo/thinkpad/l480/default.nix @@ -2,7 +2,7 @@ { imports = [ ../. - ../../../common/gpu/intel/kaby-lake + ../../../common/cpu/intel/kaby-lake ../../../common/pc/laptop/ssd ]; diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix index 12de3ca3..43c9b8dc 100644 --- a/lenovo/thinkpad/p51/default.nix +++ b/lenovo/thinkpad/p51/default.nix @@ -3,8 +3,7 @@ ../../../common/gpu/24.05-compat.nix ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/maxwell - ../../../common/cpu/intel - ../../../common/gpu/intel/kaby-lake + ../../../common/cpu/intel/kaby-lake ../../../common/pc/laptop/acpi_call.nix ../. ]; diff --git a/lenovo/thinkpad/t420/default.nix b/lenovo/thinkpad/t420/default.nix index 09f5d3fd..a3c7db40 100644 --- a/lenovo/thinkpad/t420/default.nix +++ b/lenovo/thinkpad/t420/default.nix @@ -2,7 +2,7 @@ imports = [ ../. ../tp-smapi.nix - ../../../common/gpu/intel/sandy-bridge + ../../../common/cpu/intel/sandy-bridge ../../../common/pc/laptop/acpi_call.nix ]; } diff --git a/lenovo/thinkpad/t480s/default.nix b/lenovo/thinkpad/t480s/default.nix index f544ad3f..bfca9122 100644 --- a/lenovo/thinkpad/t480s/default.nix +++ b/lenovo/thinkpad/t480s/default.nix @@ -3,7 +3,6 @@ { imports = [ ../../../common/cpu/intel - ../../../common/gpu/intel ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/ssd ../. diff --git a/lenovo/thinkpad/t520/default.nix b/lenovo/thinkpad/t520/default.nix index 09f5d3fd..a3c7db40 100644 --- a/lenovo/thinkpad/t520/default.nix +++ b/lenovo/thinkpad/t520/default.nix @@ -2,7 +2,7 @@ imports = [ ../. ../tp-smapi.nix - ../../../common/gpu/intel/sandy-bridge + ../../../common/cpu/intel/sandy-bridge ../../../common/pc/laptop/acpi_call.nix ]; } diff --git a/lenovo/thinkpad/w520/default.nix b/lenovo/thinkpad/w520/default.nix index 09f5d3fd..a3c7db40 100644 --- a/lenovo/thinkpad/w520/default.nix +++ b/lenovo/thinkpad/w520/default.nix @@ -2,7 +2,7 @@ imports = [ ../. ../tp-smapi.nix - ../../../common/gpu/intel/sandy-bridge + ../../../common/cpu/intel/sandy-bridge ../../../common/pc/laptop/acpi_call.nix ]; } diff --git a/lenovo/thinkpad/x220/default.nix b/lenovo/thinkpad/x220/default.nix index c63333b2..ec8b45c9 100644 --- a/lenovo/thinkpad/x220/default.nix +++ b/lenovo/thinkpad/x220/default.nix @@ -1,7 +1,7 @@ { imports = [ ../. - ../../../common/gpu/intel/sandy-bridge + ../../../common/cpu/intel/sandy-bridge ../../../common/pc/laptop/hdd # TODO: reverse compat ../tp-smapi.nix ]; diff --git a/malibal/aon/s1/default.nix b/malibal/aon/s1/default.nix index b86577a4..86995beb 100644 --- a/malibal/aon/s1/default.nix +++ b/malibal/aon/s1/default.nix @@ -7,7 +7,6 @@ ../../../common/cpu/intel - ../../../common/gpu/intel ../../../common/gpu/nvidia/disable.nix ]; diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix index 017cd718..a86f741d 100644 --- a/microsoft/surface/surface-go/default.nix +++ b/microsoft/surface/surface-go/default.nix @@ -13,8 +13,7 @@ in { ../../../common/pc ../../../common/pc/ssd # The Intel CPU module auto-includes Intel's GPU: - ../../../common/cpu/intel - ../../../common/gpu/intel/kaby-lake + ../../../common/cpu/intel/kaby-lake ]; boot.kernelParams = [ diff --git a/msi/gl65/10SDR-492/default.nix b/msi/gl65/10SDR-492/default.nix index 3e825d4b..75289d4b 100644 --- a/msi/gl65/10SDR-492/default.nix +++ b/msi/gl65/10SDR-492/default.nix @@ -3,8 +3,7 @@ { imports = [ ../../../common/pc/laptop/ssd - ../../../common/cpu/intel - ../../../common/gpu/intel/comet-lake + ../../../common/cpu/intel/comet-lake ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/turing ../../../common/pc/laptop diff --git a/protectli/vp4670/default.nix b/protectli/vp4670/default.nix index 14dcf4ce..fdaac857 100644 --- a/protectli/vp4670/default.nix +++ b/protectli/vp4670/default.nix @@ -1,6 +1,6 @@ { imports = [ - ../../common/gpu/intel/comet-lake + ../../common/cpu/intel/comet-lake ]; boot.initrd.kernelModules = [ From 8140e8252a069447ec8aec8d509c7b6eabd46004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Mon, 21 Oct 2024 11:35:11 +0100 Subject: [PATCH 1102/1476] lenovo-thinkpad-x1-6th-gen: use cpu architecture-specific module --- lenovo/thinkpad/x1/6th-gen/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/x1/6th-gen/default.nix b/lenovo/thinkpad/x1/6th-gen/default.nix index 73be3906..83754415 100644 --- a/lenovo/thinkpad/x1/6th-gen/default.nix +++ b/lenovo/thinkpad/x1/6th-gen/default.nix @@ -9,6 +9,7 @@ { imports = [ ../. + ../../../../common/cpu/intel/kaby-lake ../../../../common/pc/laptop/acpi_call.nix ../../../../common/pc/laptop/ssd ]; From 6791578c4bd024dbbe7401a3946462f3bb83e950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Mon, 21 Oct 2024 11:36:51 +0100 Subject: [PATCH 1103/1476] common-cpu-intel-alder-lake: init --- common/cpu/intel/alder-lake/cpu-only.nix | 5 +++++ common/cpu/intel/alder-lake/default.nix | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 common/cpu/intel/alder-lake/cpu-only.nix create mode 100644 common/cpu/intel/alder-lake/default.nix diff --git a/common/cpu/intel/alder-lake/cpu-only.nix b/common/cpu/intel/alder-lake/cpu-only.nix new file mode 100644 index 00000000..82892615 --- /dev/null +++ b/common/cpu/intel/alder-lake/cpu-only.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../cpu-only.nix + ]; +} diff --git a/common/cpu/intel/alder-lake/default.nix b/common/cpu/intel/alder-lake/default.nix new file mode 100644 index 00000000..a5f7b34c --- /dev/null +++ b/common/cpu/intel/alder-lake/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./cpu-only.nix + ../../../gpu/intel/alder-lake + ]; +} From 796768cbc486e24f9154b3aed04a4c789fdbb51c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Mon, 21 Oct 2024 11:37:50 +0100 Subject: [PATCH 1104/1476] flake: add common-cpu-intel-alder-lake --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index c404a9fc..c6d3be64 100644 --- a/flake.nix +++ b/flake.nix @@ -301,6 +301,7 @@ common-cpu-amd-zenpower = import ./common/cpu/amd/zenpower.nix; common-cpu-amd-raphael-igpu = import ./common/cpu/amd/raphael/igpu.nix; common-cpu-intel = import ./common/cpu/intel; + common-cpu-intel-alder-lake = import ./common/cpu/intel/alder-lake; common-gpu-intel-comet-lake = deprecated "992" "common-gpu-intel-comet-lake" (import ./common/gpu/intel/comet-lake); From 77ec51c21c8bc6974f93ae39c102d9d1c6b7859f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Mon, 21 Oct 2024 12:04:09 +0100 Subject: [PATCH 1105/1476] common-gpu-intel-kaby-lake: enable HuC firmware loading --- common/gpu/intel/kaby-lake/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/common/gpu/intel/kaby-lake/default.nix b/common/gpu/intel/kaby-lake/default.nix index dab57600..a8386691 100644 --- a/common/gpu/intel/kaby-lake/default.nix +++ b/common/gpu/intel/kaby-lake/default.nix @@ -2,6 +2,7 @@ imports = [ ../. ]; boot.kernelParams = [ + "i915.enable_guc=2" "i915.enable_fbc=1" "i915.enable_psr=2" ]; From cc2d3c0e060f981905d52337340ee6ec8b8eb037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 21 Oct 2024 13:09:08 +0200 Subject: [PATCH 1106/1476] flake.nix: don't expose alder-lake module --- flake.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/flake.nix b/flake.nix index c6d3be64..c404a9fc 100644 --- a/flake.nix +++ b/flake.nix @@ -301,7 +301,6 @@ common-cpu-amd-zenpower = import ./common/cpu/amd/zenpower.nix; common-cpu-amd-raphael-igpu = import ./common/cpu/amd/raphael/igpu.nix; common-cpu-intel = import ./common/cpu/intel; - common-cpu-intel-alder-lake = import ./common/cpu/intel/alder-lake; common-gpu-intel-comet-lake = deprecated "992" "common-gpu-intel-comet-lake" (import ./common/gpu/intel/comet-lake); From 6e486f2812e9abae4d05cf58d698e21cb7deb2dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 28 Sep 2024 17:55:50 +0200 Subject: [PATCH 1107/1476] common/gpu/intel/lunar-lake: enable xe driver Starting with lunarlake this driver no longer needs to force probe: https://github.com/torvalds/linux/blob/ad46e8f95e931e113cb98253daf6d443ac244cde/drivers/gpu/drm/xe/xe_pci.c#L339 Co-authored-by: Gavin John --- common/cpu/intel/lunar-lake/cpu-only.nix | 5 +++++ common/cpu/intel/lunar-lake/default.nix | 6 ++++++ common/gpu/intel/lunar-lake/default.nix | 8 ++++++++ 3 files changed, 19 insertions(+) create mode 100644 common/cpu/intel/lunar-lake/cpu-only.nix create mode 100644 common/cpu/intel/lunar-lake/default.nix create mode 100644 common/gpu/intel/lunar-lake/default.nix diff --git a/common/cpu/intel/lunar-lake/cpu-only.nix b/common/cpu/intel/lunar-lake/cpu-only.nix new file mode 100644 index 00000000..82892615 --- /dev/null +++ b/common/cpu/intel/lunar-lake/cpu-only.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../cpu-only.nix + ]; +} diff --git a/common/cpu/intel/lunar-lake/default.nix b/common/cpu/intel/lunar-lake/default.nix new file mode 100644 index 00000000..0f92ca51 --- /dev/null +++ b/common/cpu/intel/lunar-lake/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./cpu-only.nix + ../../../gpu/intel/lunar-lake + ]; +} diff --git a/common/gpu/intel/lunar-lake/default.nix b/common/gpu/intel/lunar-lake/default.nix new file mode 100644 index 00000000..b232719e --- /dev/null +++ b/common/gpu/intel/lunar-lake/default.nix @@ -0,0 +1,8 @@ +{ config, lib, ... }: +{ + imports = [ ../. ]; + hardware.intelgpu = { + driver = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8") "xe"; + vaapiDriver = "intel-media-driver"; + }; +} From 8c3e99bfa5c47c4e809fc6fbbd6913886e29a4a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 21 Oct 2024 11:02:33 +0200 Subject: [PATCH 1108/1476] cpu/intel: make sure we import the local cpu-only profiles --- common/cpu/intel/braswell/default.nix | 2 +- common/cpu/intel/broadwell/default.nix | 2 +- common/cpu/intel/comet-lake/default.nix | 2 +- common/cpu/intel/elkhart-lake/default.nix | 2 +- common/cpu/intel/haswell/default.nix | 2 +- common/cpu/intel/jasper-lake/default.nix | 2 +- common/cpu/intel/kaby-lake/default.nix | 2 +- common/cpu/intel/sandy-bridge/default.nix | 2 +- common/cpu/intel/tiger-lake/default.nix | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/cpu/intel/braswell/default.nix b/common/cpu/intel/braswell/default.nix index f295a57d..567f5792 100644 --- a/common/cpu/intel/braswell/default.nix +++ b/common/cpu/intel/braswell/default.nix @@ -1,6 +1,6 @@ { imports = [ - ../cpu-only.nix + ./cpu-only.nix ../../../gpu/intel/braswell ]; } diff --git a/common/cpu/intel/broadwell/default.nix b/common/cpu/intel/broadwell/default.nix index 2716ddcf..415cc6f7 100644 --- a/common/cpu/intel/broadwell/default.nix +++ b/common/cpu/intel/broadwell/default.nix @@ -1,6 +1,6 @@ { imports = [ - ../cpu-only.nix + ./cpu-only.nix ../../../gpu/intel/broadwell ]; } diff --git a/common/cpu/intel/comet-lake/default.nix b/common/cpu/intel/comet-lake/default.nix index 325fb1b2..3c688f50 100644 --- a/common/cpu/intel/comet-lake/default.nix +++ b/common/cpu/intel/comet-lake/default.nix @@ -1,6 +1,6 @@ { imports = [ - ../cpu-only.nix + ./cpu-only.nix ../../../gpu/intel/comet-lake ]; } diff --git a/common/cpu/intel/elkhart-lake/default.nix b/common/cpu/intel/elkhart-lake/default.nix index 352e009a..e4a42af2 100644 --- a/common/cpu/intel/elkhart-lake/default.nix +++ b/common/cpu/intel/elkhart-lake/default.nix @@ -1,6 +1,6 @@ { imports = [ - ../cpu-only.nix + ./cpu-only.nix ../../../gpu/intel/elkhart-lake ]; } diff --git a/common/cpu/intel/haswell/default.nix b/common/cpu/intel/haswell/default.nix index 14cb62e6..c8b3b8ee 100644 --- a/common/cpu/intel/haswell/default.nix +++ b/common/cpu/intel/haswell/default.nix @@ -1,6 +1,6 @@ { imports = [ - ../cpu-only.nix + ./cpu-only.nix ../../../gpu/intel/haswell ]; } diff --git a/common/cpu/intel/jasper-lake/default.nix b/common/cpu/intel/jasper-lake/default.nix index 53c26c52..27e93a49 100644 --- a/common/cpu/intel/jasper-lake/default.nix +++ b/common/cpu/intel/jasper-lake/default.nix @@ -1,6 +1,6 @@ { imports = [ - ../cpu-only.nix + ./cpu-only.nix ../../../gpu/intel/jasper-lake ]; } diff --git a/common/cpu/intel/kaby-lake/default.nix b/common/cpu/intel/kaby-lake/default.nix index eec1e1b3..f6cc8cc8 100644 --- a/common/cpu/intel/kaby-lake/default.nix +++ b/common/cpu/intel/kaby-lake/default.nix @@ -1,6 +1,6 @@ { imports = [ - ../cpu-only.nix + ./cpu-only.nix ../../../gpu/intel/kaby-lake ]; } diff --git a/common/cpu/intel/sandy-bridge/default.nix b/common/cpu/intel/sandy-bridge/default.nix index cb7d777d..9aeff58c 100644 --- a/common/cpu/intel/sandy-bridge/default.nix +++ b/common/cpu/intel/sandy-bridge/default.nix @@ -1,6 +1,6 @@ { imports = [ - ../cpu-only.nix + ./cpu-only.nix ../../../gpu/intel/sandy-bridge ]; } diff --git a/common/cpu/intel/tiger-lake/default.nix b/common/cpu/intel/tiger-lake/default.nix index 270b07a1..10ad86e2 100644 --- a/common/cpu/intel/tiger-lake/default.nix +++ b/common/cpu/intel/tiger-lake/default.nix @@ -1,6 +1,6 @@ { imports = [ - ../cpu-only.nix + ./cpu-only.nix ../../../gpu/intel/tiger-lake ]; } From be900587c3aaa67d81658c4bfb1e1055aa36a31f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 21 Oct 2024 10:52:20 +0200 Subject: [PATCH 1109/1476] update test flakes --- tests/flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/flake.lock b/tests/flake.lock index ac0ed664..aadb052a 100644 --- a/tests/flake.lock +++ b/tests/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1726153070, - "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1726905744, - "narHash": "sha256-xyNtG5C+xvfsnOVEamFe9zCCnuNwk93K/TlFC/4DmCI=", + "lastModified": 1729455275, + "narHash": "sha256-THqzn/7um3oMHUEGXyq+1CJQE7EogwR3HjLMNOlhFBE=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "b493dfd4a8cf9552932179e56ff3b5819a9b8381", + "rev": "9fcf30fccf8435f6390efec4a4d38e69c2268a36", "type": "github" }, "original": { @@ -37,11 +37,11 @@ }, "nixos-stable": { "locked": { - "lastModified": 1726838390, - "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "lastModified": 1729307008, + "narHash": "sha256-QUvb6epgKi9pCu9CttRQW4y5NqJ+snKr1FZpG/x3Wtc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", + "rev": "a9b86fc2290b69375c5542b622088eb6eca2a7c3", "type": "github" }, "original": { @@ -53,11 +53,11 @@ }, "nixos-unstable-small": { "locked": { - "lastModified": 1726885390, - "narHash": "sha256-NPoqPAA2z9o/Syyx4M4v3/e6ROkK21enXx4+29Q45uc=", + "lastModified": 1729493358, + "narHash": "sha256-Ti+Y9nWt5Fcs3JlarxLPgIOVlbqQo7jobz/qOwOaziM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f7bfe794a79c69c01f2dce20fb7b287ae98a96eb", + "rev": "a5e6a9e979367ee14f65d9c38119c30272f8455f", "type": "github" }, "original": { From 64d900abe40057393148bc0283d35c2254dd4f57 Mon Sep 17 00:00:00 2001 From: Sergey Yelin Date: Wed, 23 Oct 2024 16:42:09 +0300 Subject: [PATCH 1110/1476] Unload brcmfmac_wcc (if loaded) before brcmfmac (#1200) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Module brcmfmac cannot be unloaded with rmmod when brcmfmac_wcc is loaded. This leads brcmfmac to crash on wake up. Co-authored-by: Jörg Thalheim --- apple/macbook-pro/12-1/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apple/macbook-pro/12-1/default.nix b/apple/macbook-pro/12-1/default.nix index 631cd751..7497b2ff 100644 --- a/apple/macbook-pro/12-1/default.nix +++ b/apple/macbook-pro/12-1/default.nix @@ -16,7 +16,10 @@ # https://bugzilla.kernel.org/show_bug.cgi?id=101681#c116. # Also brcmfmac could randomly crash on resume from sleep. powerUpCommands = lib.mkBefore "${pkgs.kmod}/bin/modprobe brcmfmac"; - powerDownCommands = lib.mkBefore "${pkgs.kmod}/bin/rmmod brcmfmac"; + powerDownCommands = lib.mkBefore '' + ${pkgs.kmod}/bin/rmmod -f -v brcmfmac_wcc 2>/dev/null || true + ${pkgs.kmod}/bin/rmmod brcmfmac + ''; }; # USB subsystem wakes up MBP right after suspend unless we disable it. From e8a2f6d5513fe7b7d15701b2d05404ffdc3b6dda Mon Sep 17 00:00:00 2001 From: Gavin John Date: Wed, 23 Oct 2024 15:16:32 -0700 Subject: [PATCH 1111/1476] common/gpu/intel: Disable intel-ocl due to web.archive.org outage --- common/gpu/intel/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index 28c6e93e..6c7dfe03 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -49,7 +49,8 @@ enableHybridCodec = cfg.enableHybridCodec; }; - useIntelOcl = useIntelVaapiDriver && (config.hardware.enableAllFirmware or config.nixpkgs.config.allowUnfree or false); + # useIntelOcl = useIntelVaapiDriver && (config.hardware.enableAllFirmware or config.nixpkgs.config.allowUnfree or false); + useIntelOcl = false; # web.archive.org currently isn't serving the source; for the time being, we'll disable this intel-ocl = pkgs.intel-ocl; useIntelMediaDriver = cfg.vaapiDriver == "intel-media-driver" || cfg.vaapiDriver == null; From 097c476b076300e0f44e2a804ad472ca3da395d4 Mon Sep 17 00:00:00 2001 From: Andre Date: Thu, 24 Oct 2024 16:46:14 -0400 Subject: [PATCH 1112/1476] microsoft/surface: Update to kernel 6.11.4 --- microsoft/surface/common/default.nix | 2 +- microsoft/surface/common/kernel/default.nix | 1 + .../common/kernel/linux-6.11.x/default.nix | 31 ++++ .../common/kernel/linux-6.11.x/patches.nix | 157 ++++++++++++++++++ microsoft/surface/common/repos.nix | 4 +- 5 files changed, 192 insertions(+), 3 deletions(-) create mode 100644 microsoft/surface/common/kernel/linux-6.11.x/default.nix create mode 100644 microsoft/surface/common/kernel/linux-6.11.x/patches.nix diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index f4dbfe91..5656d978 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -8,7 +8,7 @@ in { ./kernel ]; - microsoft-surface.kernelVersion = mkDefault "6.10"; + microsoft-surface.kernelVersion = mkDefault "6.11"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index 84edc895..441b6246 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -6,6 +6,7 @@ let in { imports = [ ./linux-6.10.x + ./linux-6.11.x ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.11.x/default.nix b/microsoft/surface/common/kernel/linux-6.11.x/default.nix new file mode 100644 index 00000000..fa317516 --- /dev/null +++ b/microsoft/surface/common/kernel/linux-6.11.x/default.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkOption; + + inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches isVersionOf versionsOfEnum; + + cfg = config.microsoft-surface; + + version = "6.11.4"; + kernelPatches = surfacePatches { + inherit version; + patchFn = ./patches.nix; + }; + kernelPackages = linuxPackage { + inherit version kernelPatches; + sha256 = "0mcg1rrw9b0lwj88jkaw6ic2mks8xh8i92v90sbr2x35ljhb0m5x"; + ignoreConfigErrors=true; + }; + +in { + options.microsoft-surface.kernelVersion = mkOption { + type = versionsOfEnum version; + }; + + config = mkIf (isVersionOf cfg.kernelVersion version) { + boot = { + inherit kernelPackages; + }; + }; +} diff --git a/microsoft/surface/common/kernel/linux-6.11.x/patches.nix b/microsoft/surface/common/kernel/linux-6.11.x/patches.nix new file mode 100644 index 00000000..92916c9d --- /dev/null +++ b/microsoft/surface/common/kernel/linux-6.11.x/patches.nix @@ -0,0 +1,157 @@ +{ lib, + kernel ? lib.kernel, + patchSrc, + version, +}: + +[ + { + name = "microsoft-surface-patches-linux-${version}"; + patch = null; + extraStructuredConfig = with kernel; { + STAGING_MEDIA = yes; + +## +## Surface Aggregator Module +## +CONFIG_SURFACE_AGGREGATOR= module; +# CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION is not set +CONFIG_SURFACE_AGGREGATOR_BUS= yes; +CONFIG_SURFACE_AGGREGATOR_CDEV= module; +CONFIG_SURFACE_AGGREGATOR_HUB= module; +CONFIG_SURFACE_AGGREGATOR_REGISTRY= module; +CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH= module; + +CONFIG_SURFACE_ACPI_NOTIFY= module; +CONFIG_SURFACE_DTX= module; +CONFIG_SURFACE_PLATFORM_PROFILE= module; + +CONFIG_SURFACE_HID= module; +CONFIG_SURFACE_KBD= module; + +CONFIG_BATTERY_SURFACE= module; +CONFIG_CHARGER_SURFACE= module; + +CONFIG_SENSORS_SURFACE_TEMP= module; +CONFIG_SENSORS_SURFACE_FAN= module; + +## +## Surface Hotplug +## +CONFIG_SURFACE_HOTPLUG= module; + +## +## IPTS and ITHC touchscreen +## +## This only enables the user interface for IPTS/ITHC data. +## For the touchscreen to work, you need to install iptsd. +## +CONFIG_HID_IPTS= module; +CONFIG_HID_ITHC= module; + +## +## Cameras: IPU3 +## +CONFIG_VIDEO_DW9719= module; +CONFIG_VIDEO_IPU3_IMGU= module; +CONFIG_VIDEO_IPU3_CIO2= module; +CONFIG_IPU_BRIDGE= module; +CONFIG_INTEL_SKL_INT3472= module; +CONFIG_REGULATOR_TPS68470= module; +CONFIG_COMMON_CLK_TPS68470= module; +CONFIG_LEDS_TPS68470= module; + +## +## Cameras: Sensor drivers +## +CONFIG_VIDEO_OV5693= module; +CONFIG_VIDEO_OV7251= module; +CONFIG_VIDEO_OV8865= module; + +## +## Surface 3: atomisp causes problems (see issue #1095). Disable it for now. +## +# CONFIG_INTEL_ATOMISP is not set + +## +## ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 +## +CONFIG_APDS9960= module; + +## +## Build-in UFS support (required for some Surface Go devices) +## +CONFIG_SCSI_UFSHCD= module; +CONFIG_SCSI_UFSHCD_PCI= module; + +## +## Other Drivers +## +CONFIG_INPUT_SOC_BUTTON_ARRAY= module; +CONFIG_SURFACE_3_POWER_OPREGION= module; +CONFIG_SURFACE_PRO3_BUTTON= module; +CONFIG_SURFACE_GPE= module; +CONFIG_SURFACE_BOOK1_DGPU_SWITCH= module; + }; + } + { + name = "ms-surface/0001-secureboot"; + patch = patchSrc + "/0001-secureboot.patch"; + } + { + name = "ms-surface/0002-surface3-oemb"; + patch = patchSrc + "/0002-surface3-oemb.patch"; + } + { + name = "ms-surface/0003-mwifiex"; + patch = patchSrc + "/0003-mwifiex.patch"; + } + { + name = "ms-surface/0004-ath10k"; + patch = patchSrc + "/0004-ath10k.patch"; + } + { + name = "ms-surface/0005-ipts"; + patch = patchSrc + "/0005-ipts.patch"; + } + { + name = "ms-surface/0006-ithc"; + patch = patchSrc + "/0006-ithc.patch"; + } + { + name = "ms-surface/0007-surface-sam"; + patch = patchSrc + "/0007-surface-sam.patch"; + } + { + name = "ms-surface/0008-surface-sam-over-hid"; + patch = patchSrc + "/0008-surface-sam-over-hid.patch"; + } + { + name = "ms-surface/0009-surface-button"; + patch = patchSrc + "/0009-surface-button.patch"; + } + { + name = "ms-surface/0010-surface-typecover"; + patch = patchSrc + "/0010-surface-typecover.patch"; + } + { + name = "ms-surface/0011-surface-shutdown"; + patch = patchSrc + "/0011-surface-shutdown.patch"; + } + { + name = "ms-surface/0012-surface-gpe"; + patch = patchSrc + "/0012-surface-gpe.patch"; + } + { + name = "ms-surface/0013-cameras"; + patch = patchSrc + "/0013-cameras.patch"; + } + { + name = "ms-surface/0014-amd-gpio"; + patch = patchSrc + "/0014-amd-gpio.patch"; + } + { + name = "ms-surface/0015-rtc"; + patch = patchSrc + "/0015-rtc.patch"; + } +] diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index cb7ddba2..8ca07014 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "arch-6.10.3-1"; - hash = "sha256-T7voXofI5W+YodHB2DtNSKKc4iUlN3NS0onP4TKFvQM="; + rev = "arch-6.11.4-1"; + hash = "sha256-5rKfAIkGoD5Y4nMobr7wGvzZqN2yFElXqHdcQS2VL14="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From 59b6e11bea99805b02ab38c8f9d8ba21fee58874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 26 Oct 2024 23:26:01 +0200 Subject: [PATCH 1113/1476] Set missing lib.literalExpression this allows generating a options.json without setting any module option --- asus/zephyrus/ga402x/shared.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix index b641aedf..02adb174 100644 --- a/asus/zephyrus/ga402x/shared.nix +++ b/asus/zephyrus/ga402x/shared.nix @@ -8,8 +8,6 @@ let inherit (lib) mkDefault mkEnableOption mkIf mkMerge version versionAtLeast versionOlder; cfg = config.hardware.asus.zephyrus.ga402x; - defaultAutosuspendEnable = versionAtLeast config.boot.kernelPackages.kernel.version "6.9"; - in { imports = [ @@ -31,7 +29,10 @@ in { # Note: the device name is "ASUS N-KEY Device". keyboard.autosuspend.enable = ( mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Zephyrus GA402X" - ) // { default = defaultAutosuspendEnable; }; + ) // { + default = versionAtLeast config.boot.kernelPackages.kernel.version "6.9"; + defaultText = lib.literalExpression "lib.versionAtLeast config.boot.kernelPackages.kernel.version \"6.9\""; + }; # The ASUS 8295 ITE device will cause an immediate wake-up when trying to suspend the laptop. # After the first successful hibernate, it will work as expected, however. # NOTE: I'm not actually sure what this device, as neither the touchpad nor the M1-M4 keys cause a wake-up. From e9077856732b7b2607120de06932aeb0c9b34f80 Mon Sep 17 00:00:00 2001 From: Armin Date: Sun, 27 Oct 2024 03:45:47 +0100 Subject: [PATCH 1114/1476] lenovo/z/gen2/z13: Add modem fcc unlock --- lenovo/thinkpad/z/gen2/z13/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lenovo/thinkpad/z/gen2/z13/default.nix b/lenovo/thinkpad/z/gen2/z13/default.nix index 636d2e0c..990ad6f1 100644 --- a/lenovo/thinkpad/z/gen2/z13/default.nix +++ b/lenovo/thinkpad/z/gen2/z13/default.nix @@ -6,4 +6,11 @@ ]; environment.etc."asound.conf".source = ./asound.conf; + + networking.networkmanager.fccUnlockScripts = [ + { + id = "2c7c:030a"; + path = "${pkgs.modemmanager}/share/ModemManager/fcc-unlock.available.d/2c7c:030a"; + } + ]; } From b486ff2d754c0c396f391f6b83cb048066de8332 Mon Sep 17 00:00:00 2001 From: Andre Date: Sun, 27 Oct 2024 11:32:18 -0400 Subject: [PATCH 1115/1476] Revert "common/gpu/intel: Disable intel-ocl due to web.archive.org outage" This reverts commit e8a2f6d5513fe7b7d15701b2d05404ffdc3b6dda. --- common/gpu/intel/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index 6c7dfe03..28c6e93e 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -49,8 +49,7 @@ enableHybridCodec = cfg.enableHybridCodec; }; - # useIntelOcl = useIntelVaapiDriver && (config.hardware.enableAllFirmware or config.nixpkgs.config.allowUnfree or false); - useIntelOcl = false; # web.archive.org currently isn't serving the source; for the time being, we'll disable this + useIntelOcl = useIntelVaapiDriver && (config.hardware.enableAllFirmware or config.nixpkgs.config.allowUnfree or false); intel-ocl = pkgs.intel-ocl; useIntelMediaDriver = cfg.vaapiDriver == "intel-media-driver" || cfg.vaapiDriver == null; From 4048e9ce2d8b054a7325e573371ede8995d397a1 Mon Sep 17 00:00:00 2001 From: onurmercury <141233985+onurmercury@users.noreply.github.com> Date: Thu, 31 Oct 2024 11:55:20 +0300 Subject: [PATCH 1116/1476] Fix "nividia" typo --- common/gpu/nvidia/ada-lovelace/default.nix | 4 ++-- common/gpu/nvidia/ampere/default.nix | 4 ++-- common/gpu/nvidia/turing/default.nix | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/gpu/nvidia/ada-lovelace/default.nix b/common/gpu/nvidia/ada-lovelace/default.nix index 67b1b123..461ae914 100644 --- a/common/gpu/nvidia/ada-lovelace/default.nix +++ b/common/gpu/nvidia/ada-lovelace/default.nix @@ -1,10 +1,10 @@ {lib, config, ...}: let - nividiaPackage = config.hardware.nvidia.package; + nvidiaPackage = config.hardware.nvidia.package; in { imports = [ ../. ]; # enable the open source drivers if the package supports it - hardware.nvidia.open = lib.mkOverride 990 (nividiaPackage ? open && nividiaPackage ? firmware); + hardware.nvidia.open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware); } diff --git a/common/gpu/nvidia/ampere/default.nix b/common/gpu/nvidia/ampere/default.nix index 67b1b123..461ae914 100644 --- a/common/gpu/nvidia/ampere/default.nix +++ b/common/gpu/nvidia/ampere/default.nix @@ -1,10 +1,10 @@ {lib, config, ...}: let - nividiaPackage = config.hardware.nvidia.package; + nvidiaPackage = config.hardware.nvidia.package; in { imports = [ ../. ]; # enable the open source drivers if the package supports it - hardware.nvidia.open = lib.mkOverride 990 (nividiaPackage ? open && nividiaPackage ? firmware); + hardware.nvidia.open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware); } diff --git a/common/gpu/nvidia/turing/default.nix b/common/gpu/nvidia/turing/default.nix index 67b1b123..461ae914 100644 --- a/common/gpu/nvidia/turing/default.nix +++ b/common/gpu/nvidia/turing/default.nix @@ -1,10 +1,10 @@ {lib, config, ...}: let - nividiaPackage = config.hardware.nvidia.package; + nvidiaPackage = config.hardware.nvidia.package; in { imports = [ ../. ]; # enable the open source drivers if the package supports it - hardware.nvidia.open = lib.mkOverride 990 (nividiaPackage ? open && nividiaPackage ? firmware); + hardware.nvidia.open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware); } From 8cf35efba11b0ab1f4e50aac7a5fdeb42ea5b85c Mon Sep 17 00:00:00 2001 From: Bit Borealis Date: Mon, 23 Sep 2024 21:00:22 -0400 Subject: [PATCH 1117/1476] macbook air 7 --- README.md | 1 + apple/macbook-air/7/README.md | 5 +++++ apple/macbook-air/7/default.nix | 9 +++++++++ flake.nix | 1 + 4 files changed, 16 insertions(+) create mode 100644 apple/macbook-air/7/README.md create mode 100644 apple/macbook-air/7/default.nix diff --git a/README.md b/README.md index 3c92298e..5ff7bfbb 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ See code for all available configurations. | [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | | [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | | [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | +| [Apple MacBook Air 7,X](apple/macbook-air/7) | `` | | [Apple MacBook Pro 8,1](apple/macbook-pro/8-1) | `` | | [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | | [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | diff --git a/apple/macbook-air/7/README.md b/apple/macbook-air/7/README.md new file mode 100644 index 00000000..3a982621 --- /dev/null +++ b/apple/macbook-air/7/README.md @@ -0,0 +1,5 @@ +# MacBook Air 7,X + +### For wifi driver +broadcomt_sta was the best working driver I could find, however on the normal kernel, you need to `sudo modprobe -r wl` and `sudo modprobe wl`, however it was fully working on the zen kernel. + diff --git a/apple/macbook-air/7/default.nix b/apple/macbook-air/7/default.nix new file mode 100644 index 00000000..e251355d --- /dev/null +++ b/apple/macbook-air/7/default.nix @@ -0,0 +1,9 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ]; + + boot.extraModulePackages = lib.mkDefault [ config.boot.kernelPackages.broadcom_sta ]; +} diff --git a/flake.nix b/flake.nix index c404a9fc..b637ed99 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,7 @@ apple-macbook-air-3 = import ./apple/macbook-air/3; apple-macbook-air-4 = import ./apple/macbook-air/4; apple-macbook-air-6 = import ./apple/macbook-air/6; + apple-macbook-air-7 = import ./apple/macbook-air/7; apple-macbook-pro = import ./apple/macbook-pro; apple-macbook-pro-8-1 = import ./apple/macbook-pro/8-1; apple-macbook-pro-10-1 = import ./apple/macbook-pro/10-1; From da14839ac5f38ee6adbdb4e6db09b5eef6d6ccdc Mon Sep 17 00:00:00 2001 From: Tau Date: Sun, 27 Oct 2024 18:11:27 -0400 Subject: [PATCH 1118/1476] remove broadcom_sta since it was likely already added by nixos-generate-hardware --- apple/macbook-air/7/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/apple/macbook-air/7/default.nix b/apple/macbook-air/7/default.nix index e251355d..f6c82282 100644 --- a/apple/macbook-air/7/default.nix +++ b/apple/macbook-air/7/default.nix @@ -4,6 +4,4 @@ imports = [ ../. ]; - - boot.extraModulePackages = lib.mkDefault [ config.boot.kernelPackages.broadcom_sta ]; } From e4ad9ce38fa09e2f28ba15e830e17e367bf39a6c Mon Sep 17 00:00:00 2001 From: Adam Dinwoodie Date: Fri, 1 Nov 2024 17:51:53 +0000 Subject: [PATCH 1119/1476] Framework: add workaround for Bluetooth device issues Framework have published a workaround for a bug that affects the MediaTek Bluetooth and Wi-Fi cards used in their laptops on kernel version 6.11. Their workaround assumes a writable /etc/systemd directory, so reimplement the workaround for NixOS. For the Framework version of the workaround, see: https://github.com/FrameworkComputer/linux-docs/tree/eab0148ae8223eddaed8f0cd4cd73f9399ecdb65/hibernation/kernel-6-11-workarounds --- framework/13-inch/common/default.nix | 1 + framework/16-inch/common/default.nix | 1 + framework/bluetooth.nix | 37 ++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 framework/bluetooth.nix diff --git a/framework/13-inch/common/default.nix b/framework/13-inch/common/default.nix index 904c2d74..f9c78086 100644 --- a/framework/13-inch/common/default.nix +++ b/framework/13-inch/common/default.nix @@ -2,6 +2,7 @@ imports = [ ../../../common/pc/laptop ../../../common/pc/laptop/ssd + ../../bluetooth.nix ../../kmod.nix ../../framework-tool.nix ]; diff --git a/framework/16-inch/common/default.nix b/framework/16-inch/common/default.nix index 190956f5..5ec8a171 100644 --- a/framework/16-inch/common/default.nix +++ b/framework/16-inch/common/default.nix @@ -2,6 +2,7 @@ imports = [ ../../../common/pc/laptop ../../../common/pc/laptop/ssd + ../../bluetooth.nix ../../kmod.nix ../../framework-tool.nix ]; diff --git a/framework/bluetooth.nix b/framework/bluetooth.nix new file mode 100644 index 00000000..fdb7da3e --- /dev/null +++ b/framework/bluetooth.nix @@ -0,0 +1,37 @@ +# There is apparently a bug that affects Framework computers that causes black +# screen on resume from sleep or hibernate with kernel version 6.11. Framework +# have published a workaround; this applies that workaround. +# +# https://fosstodon.org/@frameworkcomputer/113406887743149089 +# https://github.com/FrameworkComputer/linux-docs/blob/main/hibernation/kernel-6-11-workarounds/suspend-hibernate-bluetooth-workaround.md#workaround-for-suspendhibernate-black-screen-on-resume-kernel-611 +{ + config, + lib, + pkgs, + ... +}: lib.mkIf ((config.boot.kernelPackages.kernelAtLeast "6.11") && (config.boot.kernelPackages.kernelOlder "6.12")) { + systemd.services = { + bluetooth-rfkill-suspend = { + description = "Soft block Bluetooth on suspend/hibernate"; + before = ["sleep.target"]; + unitConfig.StopWhenUnneeded = true; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.util-linux}/bin/rfkill block bluetooth"; + ExecStartPost = "${pkgs.coreutils}/bin/sleep 3"; + RemainAfterExit = true; + }; + wantedBy = ["suspend.target" "hibernate.target" "suspend-then-hibernate.target"]; + }; + + bluetooth-rfkill-resume = { + description = "Unblock Bluetooth on resume"; + after = ["suspend.target" "hibernate.target" "suspend-then-hibernate.target"]; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.util-linux}/bin/rfkill unblock bluetooth"; + }; + wantedBy = ["suspend.target" "hibernate.target" "suspend-then-hibernate.target"]; + }; + }; +} From be00f01542ad0a2b9962ec691c5709944847686c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 2 Nov 2024 04:39:36 +0100 Subject: [PATCH 1120/1476] framework/bluetooth.nix: add EOL remark --- framework/bluetooth.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/bluetooth.nix b/framework/bluetooth.nix index fdb7da3e..ba76081c 100644 --- a/framework/bluetooth.nix +++ b/framework/bluetooth.nix @@ -9,6 +9,7 @@ lib, pkgs, ... +# TODO: drop this if linux 6.11 goes EOL }: lib.mkIf ((config.boot.kernelPackages.kernelAtLeast "6.11") && (config.boot.kernelPackages.kernelOlder "6.12")) { systemd.services = { bluetooth-rfkill-suspend = { From d3986e78856a70d0b38d9e88dc39390556c2e962 Mon Sep 17 00:00:00 2001 From: eum3l <77971322+eum3l@users.noreply.github.com> Date: Wed, 30 Oct 2024 22:00:08 +0100 Subject: [PATCH 1121/1476] minisforum/v3: init Co-authored-by: Sandro --- README.md | 7 +++--- flake.nix | 1 + minisforum/v3/audio.nix | 47 +++++++++++++++++++++++++++++++++++++++ minisforum/v3/default.nix | 12 ++++++++++ minisforum/v3/dsdt.patch | 31 ++++++++++++++++++++++++++ minisforum/v3/power.nix | 19 ++++++++++++++++ minisforum/v3/sensors.nix | 44 ++++++++++++++++++++++++++++++++++++ minisforum/v3/src.nix | 8 +++++++ 8 files changed, 166 insertions(+), 3 deletions(-) create mode 100644 minisforum/v3/audio.nix create mode 100644 minisforum/v3/default.nix create mode 100644 minisforum/v3/dsdt.patch create mode 100644 minisforum/v3/power.nix create mode 100644 minisforum/v3/sensors.nix create mode 100644 minisforum/v3/src.nix diff --git a/README.md b/README.md index 5ff7bfbb..40baf199 100644 --- a/README.md +++ b/README.md @@ -301,6 +301,7 @@ See code for all available configurations. | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | | [Microsoft Surface Pro 9](microsoft/surface-pro/9) | `` | | [Morefine M600](morefine/m600) | `` | +| [Minisforum V3](minisforum/v3) | `` | | [NXP iMX8 MPlus Evaluation Kit](nxp/imx8mp-evk) | `` | | [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | | [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | @@ -328,15 +329,15 @@ See code for all available configurations. | [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | | [StarFive VisionFive v1](starfive/visionfive/v1) | `` | | [StarFive VisionFive 2](starfive/visionfive/v2) | `` | -| [StarLabs StarLite 5 (I5)](starlabs/starlite/i5) | `` | +| [StarLabs StarLite 5 (I5)](starlabs/starlite/i5) | `` | | [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | | [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | | [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | | [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | | [System76 (generic)](system76) | `` | | [System76 Darter Pro 6](system76/darp6) | `` | -| [System76 Gazelle 18](system76/gaze18) | `` | -| [System76 Galago Pro 5](system76/galp5-1650) | `` | +| [System76 Gazelle 18](system76/gaze18) | `` | +| [System76 Galago Pro 5](system76/galp5-1650) | `` | | [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | | [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | | [TUXEDO Aura 15 - Gen1](tuxedo/aura/15/gen1) | `` | diff --git a/flake.nix b/flake.nix index b637ed99..841a24c5 100644 --- a/flake.nix +++ b/flake.nix @@ -245,6 +245,7 @@ microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; microsoft-surface-pro-9 = import ./microsoft/surface-pro/9; milkv-pioneer = import ./milkv/pioneer; + minisforum-v3 = import ./minisforum/v3; morefine-m600 = import ./morefine/m600; msi-b350-tomahawk = import ./msi/b350-tomahawk; msi-b550-a-pro = import ./msi/b550-a-pro; diff --git a/minisforum/v3/audio.nix b/minisforum/v3/audio.nix new file mode 100644 index 00000000..029b87ce --- /dev/null +++ b/minisforum/v3/audio.nix @@ -0,0 +1,47 @@ +{ ... }: +{ + # Fix microphone. + # Based on https://github.com/mudkipme/awesome-minisforum-v3/issues/10#issuecomment-2317474057 (Volume control workaround doesn't work on Arch) + boot.extraModprobeConfig = '' + options snd-hda-intel model=alc256-asus-aio + ''; + + # Based on https://github.com/mudkipme/awesome-minisforum-v3/issues/9#issue-2407782714 (volume control fixes for arch) + services.pipewire.wireplumber.extraConfig."alsa-soft-mixer"."monitor.alsa.rules" = [ + { + # Enable soft-mixer. + # Fix global volume control. + actions.update-props."api.alsa.soft-mixer" = true; + matches = [ + { + "device.name" = "~alsa_card.*"; + } + ]; + } + { + # Disable soft-mixer for input devices. + actions.update-props."api.alsa.soft-mixer" = false; + matches = [ + { + "device.name" = "~alsa_card.*"; + "node.name" = "~alsa_input.*"; + } + ]; + } + { + # Disable audio session suspension. + # Fix bug with plugged in headphones. + # Based on https://github.com/mudkipme/awesome-minisforum-v3?tab=readme-ov-file#disable-audio-session-suspension (Disable audio session suspension) + actions.update-props."session.suspend-timeout-seconds" = "0"; + matches = [ + { + "node.name" = "~alsa_input.*"; + } + { + "node.name" = "~alsa_output.*"; + } + ]; + } + ]; + +} diff --git a/minisforum/v3/default.nix b/minisforum/v3/default.nix new file mode 100644 index 00000000..25961c75 --- /dev/null +++ b/minisforum/v3/default.nix @@ -0,0 +1,12 @@ +{ ... }: +{ + imports = [ + ./sensors.nix + ./audio.nix + ./power.nix + + ../../common/gpu/amd/default.nix + ../../common/cpu/amd/default.nix + ../../common/pc/laptop/default.nix + ]; +} diff --git a/minisforum/v3/dsdt.patch b/minisforum/v3/dsdt.patch new file mode 100644 index 00000000..ce799986 --- /dev/null +++ b/minisforum/v3/dsdt.patch @@ -0,0 +1,31 @@ +--- dsdt.dsl 2024-08-10 06:24:09.143777067 +0200 ++++ patched/dsdt.dsl 2024-08-10 04:58:50.191036154 +0200 +@@ -18,7 +18,7 @@ + * Compiler ID "INTL" + * Compiler Version 0x20220331 (539099953) + */ +-DefinitionBlock ("", "DSDT", 2, "ALASKA", "A M I ", 0x01072009) ++DefinitionBlock ("", "DSDT", 2, "ALASKA", "A M I ", 0x01072019) + { + External (_SB_.APTS, MethodObj) // 1 Arguments + External (_SB_.AWAK, MethodObj) // 1 Arguments +@@ -7341,7 +7341,7 @@ + + Device (CIND) + { +- Name (_HID, "ID9001") // _HID: Hardware ID ++ Name (_HID, "INT33D3") // _HID: Hardware ID + Name (_CID, "PNP0C60" /* Display Sensor Device */) // _CID: Compatible ID + Method (_STA, 0, Serialized) // _STA: Status + { +@@ -7364,8 +7364,8 @@ + { + Device (STS) + { +- Name (_HID, EisaId ("SMOCF05")) // _HID: Hardware ID +- Name (_CID, EisaId ("SMOCF05")) // _CID: Compatible ID ++ Name (_HID, EisaId ("SMO8B30")) // _HID: Hardware ID ++ Name (_CID, EisaId ("SMO8B30")) // _CID: Compatible ID + Name (_UID, Zero) // _UID: Unique ID + Method (_STA, 0, NotSerialized) // _STA: Status + { \ No newline at end of file diff --git a/minisforum/v3/power.nix b/minisforum/v3/power.nix new file mode 100644 index 00000000..83fd6764 --- /dev/null +++ b/minisforum/v3/power.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: +{ + + # From "Optimizing power draw (under Linux)": https://github.com/mudkipme/awesome-minisforum-v3/issues/5#issue-2391536450 + boot.kernelParams = [ "pcie_aspm.policy=powersupersave" ]; + systemd.services.enable-aspm = { + wantedBy = [ "default.target" ]; + serviceConfig = { + ExecStart = "${pkgs.bash}/bin/bash ${pkgs.callPackage ./src.nix { }}/aspm_v3.sh"; + Restart = "no"; + }; + + path = with pkgs; [ + bc + pciutils + ]; + }; + +} diff --git a/minisforum/v3/sensors.nix b/minisforum/v3/sensors.nix new file mode 100644 index 00000000..0f336e90 --- /dev/null +++ b/minisforum/v3/sensors.nix @@ -0,0 +1,44 @@ +{ pkgs, lib, ... }: +{ + + # Enable IIO for brightness and accelerometer sensors + hardware.sensor.iio.enable = lib.mkDefault true; + + services.fprintd.enable = lib.mkDefault true; + + # Override ACPI DSDT to fix the accelerometer. + # A driver already exists for a similar sensor. + # This overrides the IDs to make the existing driver work. + # From Accelerometer on Linux https://github.com/mudkipme/awesome-minisforum-v3/issues/2#issuecomment-2279282784 + boot.initrd.prepend = + let + minisforum-acpi-override = pkgs.stdenv.mkDerivation { + name = "minisforum-acpi-override"; + CPIO_PATH = "kernel/firmware/acpi"; + + src = pkgs.callPackage ./src.nix {}; + patches = [ ./dsdt.patch ]; + + nativeBuildInputs = with pkgs; [ + acpica-tools + cpio + ]; + + installPhase = '' + mkdir -p $CPIO_PATH + iasl -tc ./dsdt.dsl + cp ./dsdt.aml $CPIO_PATH + find kernel | cpio -H newc --create > acpi_override + cp acpi_override $out + ''; + }; + in + [ (toString minisforum-acpi-override) ]; + + # Fix inverted accelerometer rotation. + services.udev.extraHwdb = '' + sensor:modalias:acpi:SMO8B30*:dmi:*svnMicroComputer*:pnV3:* + ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, -1, 0; 0, 0, -1 + ''; + +} diff --git a/minisforum/v3/src.nix b/minisforum/v3/src.nix new file mode 100644 index 00000000..c43ec4d0 --- /dev/null +++ b/minisforum/v3/src.nix @@ -0,0 +1,8 @@ +# Outsource (MIT License) for aspm_v3.sh and dsdt.dsl +{ fetchFromGitHub, ... }: +fetchFromGitHub { + owner = "eum3l"; + repo = "minisforum-v3-nixos-hardware"; + rev = "7a94dbac701640cef91ec5b1873868a512718f09"; + hash = "sha256-V23Vuw/DV0l2c0m2hBnjZ2uey0KMeAdymnlLqXbFFUM="; +} From 8a906c9d3471439853aa05f6ec8ee1d3e6618c0d Mon Sep 17 00:00:00 2001 From: Vittorio Robecchi Date: Sat, 2 Nov 2024 09:10:53 +0100 Subject: [PATCH 1122/1476] Added Lenovo Ideadpad 16AHP9 --- lenovo/ideapad/16ahp9/README.md | 4 ++++ lenovo/ideapad/16ahp9/default.nix | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 lenovo/ideapad/16ahp9/README.md create mode 100644 lenovo/ideapad/16ahp9/default.nix diff --git a/lenovo/ideapad/16ahp9/README.md b/lenovo/ideapad/16ahp9/README.md new file mode 100644 index 00000000..5d32486d --- /dev/null +++ b/lenovo/ideapad/16ahp9/README.md @@ -0,0 +1,4 @@ +# Lenovo Ideapad 2-in-1 + +This device supports Conservation mode which charges the battery to 79/80%. See [TLP docs](https://linrunner.de/tlp/settings/bc-vendors.html#lenovo-non-thinkpad-series) and [auto-cpu freq](https://github.com/AdnanHodzic/auto-cpufreq?tab=readme-ov-file#battery-charging-thresholds) to enable it. See specs [here](https://psref.lenovo.com/syspool/Sys/PDF/IdeaPad/IdeaPad_5_2_in_1_16AHP9/IdeaPad_5_2_in_1_16AHP9_Spec.pdf). + diff --git a/lenovo/ideapad/16ahp9/default.nix b/lenovo/ideapad/16ahp9/default.nix new file mode 100644 index 00000000..f83290e2 --- /dev/null +++ b/lenovo/ideapad/16ahp9/default.nix @@ -0,0 +1,11 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; +} From bcf80dc17c840b79625bea50bd40ab4332b9295e Mon Sep 17 00:00:00 2001 From: Vittorio Robecchi Date: Sat, 2 Nov 2024 09:11:19 +0100 Subject: [PATCH 1123/1476] Added Lenovo Ideadpad Slim 5 16IAH8 --- lenovo/ideapad/16iah8/README.md | 10 ++++++++++ lenovo/ideapad/16iah8/default.nix | 9 +++++++++ 2 files changed, 19 insertions(+) create mode 100644 lenovo/ideapad/16iah8/README.md create mode 100644 lenovo/ideapad/16iah8/default.nix diff --git a/lenovo/ideapad/16iah8/README.md b/lenovo/ideapad/16iah8/README.md new file mode 100644 index 00000000..c4ae5df1 --- /dev/null +++ b/lenovo/ideapad/16iah8/README.md @@ -0,0 +1,10 @@ +# Lenovo Ideapad Slim 5 16IAH8 + +This device supports Conservation mode which charges the battery to 79/80%. See [TLP docs](https://linrunner.de/tlp/settings/bc-vendors.html#lenovo-non-thinkpad-series) and [auto-cpu freq](https://github.com/AdnanHodzic/auto-cpufreq?tab=readme-ov-file#battery-charging-thresholds) to enable it. + +`lspci`: +``` +00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P GT1 [UHD Graphics] (rev 0c) +``` +There is no dedicated graphics card. See specs [here](https://psref.lenovo.com/syspool/Sys/PDF/IdeaPad/IdeaPad_Slim_5_16IAH8/IdeaPad_Slim_5_16IAH8_Spec.pdf). + diff --git a/lenovo/ideapad/16iah8/default.nix b/lenovo/ideapad/16iah8/default.nix new file mode 100644 index 00000000..1f71aed2 --- /dev/null +++ b/lenovo/ideapad/16iah8/default.nix @@ -0,0 +1,9 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel/alder-lake + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; +} From f6e0cd5c47d150c4718199084e5764f968f1b560 Mon Sep 17 00:00:00 2001 From: Vittorio Robecchi Date: Sat, 2 Nov 2024 09:25:14 +0100 Subject: [PATCH 1124/1476] Updated README --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 40baf199..6be06e32 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ For questions and discussions, come join us in the [nixos-anywhere matrix](https See code for all available configurations. | Model | Path | -|------------------------------------------------------------------------|---------------------------------------------------------| +| ---------------------------------------------------------------------- | ------------------------------------------------------- | | [Acer Aspire 4810T](acer/aspire/4810t) | `` | | [Airis N990](airis/n990) | `` | | [Apple iMac 14.2](apple/imac/14-2) | `` | @@ -98,8 +98,8 @@ See code for all available configurations. | [Asus ROG Strix X570-E GAMING](asus/rog-strix/x570e) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | -| [Asus ROG Zephyrus G14 GA402X* (2023)](asus/zephyrus/ga402x/amdgpu) | `` | -| [Asus ROG Zephyrus G14 GA402X* (2023)](asus/zephyrus/ga402x/nvidia) | `` | +| [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/amdgpu) | `` | +| [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/nvidia) | `` | | [Asus ROG Zephyrus G15 GA502](asus/zephyrus/ga502) | `` | | [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | | [Asus ROG Zephyrus G16 GU605MY](asus/zephyrus/gu605my) | `` | @@ -195,6 +195,8 @@ See code for all available configurations. | [Lenovo IdeaPad 5 Pro 16ach6](lenovo/ideapad/16ach6) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | +| [Lenovo IdeaPad Slim 5 16iah8](lenovo/ideapad/16iah8) | `` | | [Lenovo Legion 5 15ach6h](lenovo/legion/15ach6h) | `` | | [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | From df8450fa268551003c0b29abc455cd9a5c494d9d Mon Sep 17 00:00:00 2001 From: Andre Date: Sat, 2 Nov 2024 10:40:15 -0400 Subject: [PATCH 1125/1476] microsoft/surface: Remove old kernel version --- microsoft/surface/common/kernel/default.nix | 3 +- .../common/kernel/linux-6.10.x/default.nix | 31 ---- .../common/kernel/linux-6.10.x/patches.nix | 148 ------------------ .../default.nix | 0 .../patches.nix | 0 5 files changed, 1 insertion(+), 181 deletions(-) delete mode 100644 microsoft/surface/common/kernel/linux-6.10.x/default.nix delete mode 100644 microsoft/surface/common/kernel/linux-6.10.x/patches.nix rename microsoft/surface/common/kernel/{linux-6.11.x => linux-surface}/default.nix (100%) rename microsoft/surface/common/kernel/{linux-6.11.x => linux-surface}/patches.nix (100%) diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index 441b6246..490ecd0d 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -5,8 +5,7 @@ let in { imports = [ - ./linux-6.10.x - ./linux-6.11.x + ./linux-surface ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.10.x/default.nix b/microsoft/surface/common/kernel/linux-6.10.x/default.nix deleted file mode 100644 index 484e1621..00000000 --- a/microsoft/surface/common/kernel/linux-6.10.x/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - inherit (lib) mkIf mkOption; - - inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches isVersionOf versionsOfEnum; - - cfg = config.microsoft-surface; - - version = "6.10.5"; - kernelPatches = surfacePatches { - inherit version; - patchFn = ./patches.nix; - }; - kernelPackages = linuxPackage { - inherit version kernelPatches; - sha256 = "02yckkh6sxvcrwzbqgmw4jhqhxmbvz87xn9wm6bwwka3w2r9x41h"; - ignoreConfigErrors=true; - }; - -in { - options.microsoft-surface.kernelVersion = mkOption { - type = versionsOfEnum version; - }; - - config = mkIf (isVersionOf cfg.kernelVersion version) { - boot = { - inherit kernelPackages; - }; - }; -} diff --git a/microsoft/surface/common/kernel/linux-6.10.x/patches.nix b/microsoft/surface/common/kernel/linux-6.10.x/patches.nix deleted file mode 100644 index 9590b9eb..00000000 --- a/microsoft/surface/common/kernel/linux-6.10.x/patches.nix +++ /dev/null @@ -1,148 +0,0 @@ -{ lib, - kernel ? lib.kernel, - patchSrc, - version, -}: - -[ - { - name = "microsoft-surface-patches-linux-${version}"; - patch = null; - extraStructuredConfig = with kernel; { - STAGING_MEDIA = yes; - - # - # Surface Aggregator Module - # - SURFACE_AGGREGATOR = module; - # SURFACE_AGGREGATOR_ERROR_INJECTION is not set - 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; - - ## - ## IPTS and ITHC touchscreen - ## - ## This only enables the user interface for IPTS/ITHC data. - ## For the touchscreen to work, you need to install iptsd. - ## - HID_IPTS = module; - HID_ITHC = module; - - ## - ## Cameras: IPU3 - ## - VIDEO_DW9719 = module; - VIDEO_IPU3_IMGU = module; - VIDEO_IPU3_CIO2 = module; - IPU_BRIDGE = module; - INTEL_SKL_INT3472 = module; - REGULATOR_TPS68470 = module; - COMMON_CLK_TPS68470 = module; - LEDS_TPS68470 = module; - - ## - ## Cameras: Sensor drivers - ## - VIDEO_OV5693 = module; - VIDEO_OV7251 = module; - VIDEO_OV8865 = module; - - ## - ## Surface 3: atomisp causes problems (see issue #1095). Disable it for now. - ## - # INTEL_ATOMISP is not set - - ## - ## 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-secureboot"; - patch = patchSrc + "/0001-secureboot.patch"; - } - { - name = "ms-surface/0002-surface3-oemb"; - patch = patchSrc + "/0002-surface3-oemb.patch"; - } - { - name = "ms-surface/0003-mwifiex"; - patch = patchSrc + "/0003-mwifiex.patch"; - } - { - name = "ms-surface/0004-ath10k"; - patch = patchSrc + "/0004-ath10k.patch"; - } - { - name = "ms-surface/0005-ipts"; - patch = patchSrc + "/0005-ipts.patch"; - } - { - name = "ms-surface/0006-ithc"; - patch = patchSrc + "/0006-ithc.patch"; - } - { - name = "ms-surface/0007-surface-sam"; - patch = patchSrc + "/0007-surface-sam.patch"; - } - { - name = "ms-surface/0008-surface-sam-over-hid"; - patch = patchSrc + "/0008-surface-sam-over-hid.patch"; - } - { - name = "ms-surface/0009-surface-button"; - patch = patchSrc + "/0009-surface-button.patch"; - } - { - name = "ms-surface/0010-surface-typecover"; - patch = patchSrc + "/0010-surface-typecover.patch"; - } - { - name = "ms-surface/0011-surface-shutdown"; - patch = patchSrc + "/0011-surface-shutdown.patch"; - } - { - name = "ms-surface/0012-surface-gpe"; - patch = patchSrc + "/0012-surface-gpe.patch"; - } - { - name = "ms-surface/0013-cameras"; - patch = patchSrc + "/0013-cameras.patch"; - } - { - name = "ms-surface/0014-amd-gpio"; - patch = patchSrc + "/0014-amd-gpio.patch"; - } - { - name = "ms-surface/0015-rtc"; - patch = patchSrc + "/0015-rtc.patch"; - } -] diff --git a/microsoft/surface/common/kernel/linux-6.11.x/default.nix b/microsoft/surface/common/kernel/linux-surface/default.nix similarity index 100% rename from microsoft/surface/common/kernel/linux-6.11.x/default.nix rename to microsoft/surface/common/kernel/linux-surface/default.nix diff --git a/microsoft/surface/common/kernel/linux-6.11.x/patches.nix b/microsoft/surface/common/kernel/linux-surface/patches.nix similarity index 100% rename from microsoft/surface/common/kernel/linux-6.11.x/patches.nix rename to microsoft/surface/common/kernel/linux-surface/patches.nix From 2e22e4ad70ea47ad9642e9232329d28a3342b928 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Sun, 3 Nov 2024 00:51:41 +0800 Subject: [PATCH 1126/1476] tests: fix unused importPath in unfreeNixpkgs function * originally importPath in the unfreeNixpkgs function was not used at all. this commit fixes the issue, allowing the function to work as intended. --- tests/flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/flake.nix b/tests/flake.nix index a00f0f24..2e65b843 100644 --- a/tests/flake.nix +++ b/tests/flake.nix @@ -62,7 +62,7 @@ unfreeNixpkgs = importPath: - import inputs.nixos-unstable-small { + import importPath { config = { allowBroken = true; allowUnfree = true; @@ -71,7 +71,7 @@ overlays = [ ]; inherit system; }; - nixpkgsUnstable = unfreeNixpkgs inputs'.nixos-unstable-small; + nixpkgsUnstable = unfreeNixpkgs inputs.nixos-unstable-small; nixpkgsStable = unfreeNixpkgs inputs.nixos-stable; checksForNixpkgs = From f372fa6cfa45eb24552a2c1bdba2de0f14cd5a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 6 Nov 2024 06:16:37 +0100 Subject: [PATCH 1127/1476] fix eval with 24.05 --- lenovo/legion/16ach6h/edid/default.nix | 30 +++++++++++++++----------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/lenovo/legion/16ach6h/edid/default.nix b/lenovo/legion/16ach6h/edid/default.nix index 481d1f5c..f536d90c 100644 --- a/lenovo/legion/16ach6h/edid/default.nix +++ b/lenovo/legion/16ach6h/edid/default.nix @@ -1,4 +1,9 @@ -{ pkgs, ... }: +{ + pkgs, + lib, + options, + ... +}: let # This file was obtained from the display while "DDG" mode was enabled. @@ -8,18 +13,19 @@ let ''; in { - hardware.display = { - edid.packages = [ chip_edid ]; + config = lib.optionalAttrs (options ? hardware.display) { + hardware.display = { + edid.packages = [ chip_edid ]; - outputs = { - # For some reason, the internal display is sometimes eDP-1, and sometimes it's eDP-2 - "eDP-1".edid = "16ach6h.bin"; - "eDP-2".edid = "16ach6h.bin"; + outputs = { + # For some reason, the internal display is sometimes eDP-1, and sometimes it's eDP-2 + "eDP-1".edid = "16ach6h.bin"; + "eDP-2".edid = "16ach6h.bin"; + }; }; + + # This fails at the moment, https://github.com/NixOS/nixos-hardware/issues/795 + # Extra refresh rates seem to work regardless + # boot.initrd.extraFiles."lib/firmware/edid/16ach6h.bin".source = pkgs.runCommandLocal "chip_edid" { } "cp ${./16ach6h.bin} $out"; }; - - - # This fails at the moment, https://github.com/NixOS/nixos-hardware/issues/795 - # Extra refresh rates seem to work regardless - # boot.initrd.extraFiles."lib/firmware/edid/16ach6h.bin".source = pkgs.runCommandLocal "chip_edid" { } "cp ${./16ach6h.bin} $out"; } From 7a9364e705e61d0c7fc25b3756457a6caf3b9db8 Mon Sep 17 00:00:00 2001 From: Johannes Arnold Date: Fri, 1 Nov 2024 23:02:58 +0100 Subject: [PATCH 1128/1476] apple: init MacBookPro11,1 --- README.md | 1 + apple/macbook-pro/11-1/README.md | 12 ++++++++++++ apple/macbook-pro/11-1/default.nix | 13 +++++++++++++ flake.nix | 1 + 4 files changed, 27 insertions(+) create mode 100644 apple/macbook-pro/11-1/README.md create mode 100644 apple/macbook-pro/11-1/default.nix diff --git a/README.md b/README.md index 6be06e32..65ef383e 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ See code for all available configurations. | [Apple MacBook Air 7,X](apple/macbook-air/7) | `` | | [Apple MacBook Pro 8,1](apple/macbook-pro/8-1) | `` | | [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | +| [Apple MacBook Pro 11,1](apple/macbook-pro/11-1) | `` | | [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | diff --git a/apple/macbook-pro/11-1/README.md b/apple/macbook-pro/11-1/README.md new file mode 100644 index 00000000..41acdb6b --- /dev/null +++ b/apple/macbook-pro/11-1/README.md @@ -0,0 +1,12 @@ +# Apple MacBook Pro 11,1 + +This configuration is tested on my 13" *MacBook Pro (Retina, 13-inch, Late 2013),* model number `A1502`. + +The 6.11.5 kernel appears to work well with only minor adjustments on this notebook. Note that my machine has a BCM4360 wireless card (PCI-ID `14e4:43a0`) which appears to only work with the nonfree `wl` driver. + +## Additional resources + +* Linux Wireless Documentation: [List of hardware](https://wireless.docs.kernel.org/en/latest/en/users/drivers/b43.html#list-of-hardware) +* Arch linux wiki: [MacBookPro11,x](https://wiki.archlinux.org/index.php/MacBookPro11,x) +* Kernel patches: [MacBookPro11,x](https://bugzilla.kernel.org/buglist.cgi?quicksearch=macbookpro11) + diff --git a/apple/macbook-pro/11-1/default.nix b/apple/macbook-pro/11-1/default.nix new file mode 100644 index 00000000..3f59f627 --- /dev/null +++ b/apple/macbook-pro/11-1/default.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +{ + imports = [ + ../. + ../../../common/pc/laptop/ssd + ../../../common/cpu/intel/haswell + ]; + + # broadcom-wl + hardware.enableRedistributableFirmware = lib.mkDefault true; + boot.extraModulePackages = with config.boot.kernelPackages; [ broadcom_sta ]; + boot.kernelModules = [ "wl" ]; +} diff --git a/flake.nix b/flake.nix index 841a24c5..8302950e 100644 --- a/flake.nix +++ b/flake.nix @@ -21,6 +21,7 @@ apple-macbook-pro = import ./apple/macbook-pro; apple-macbook-pro-8-1 = import ./apple/macbook-pro/8-1; apple-macbook-pro-10-1 = import ./apple/macbook-pro/10-1; + apple-macbook-pro-11-1 = import ./apple/macbook-pro/11-1; apple-macbook-pro-11-5 = import ./apple/macbook-pro/11-5; apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1; From 12ad8c1bf13ff15ffa6afe82c59b4af0b9226035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 2 Nov 2024 11:35:05 +0100 Subject: [PATCH 1129/1476] apple/macbook-pro/11-1: add comment why we include broadcom driver --- apple/macbook-pro/11-1/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/apple/macbook-pro/11-1/default.nix b/apple/macbook-pro/11-1/default.nix index 3f59f627..17525084 100644 --- a/apple/macbook-pro/11-1/default.nix +++ b/apple/macbook-pro/11-1/default.nix @@ -8,6 +8,7 @@ # broadcom-wl hardware.enableRedistributableFirmware = lib.mkDefault true; + # nixos-generate-config doesn't detect this automatically. boot.extraModulePackages = with config.boot.kernelPackages; [ broadcom_sta ]; boot.kernelModules = [ "wl" ]; } From 1881126e2d8c5d6af04b62d7be957be57b3507ce Mon Sep 17 00:00:00 2001 From: Felipe Micaroni Lalli Date: Sun, 15 Sep 2024 14:51:32 -0300 Subject: [PATCH 1130/1476] Adding the Legion Pro 7 16IRX9H model. Initially, I simply copied it from the 16IRX8H, but I am still having issues with WiFi and sound (to be resolved). Ref.: https://psref.lenovo.com/Product/Legion/Legion_Pro_7_16IRX9H --- README.md | 1 + lenovo/legion/16irx9h/default.nix | 35 +++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 lenovo/legion/16irx9h/default.nix diff --git a/README.md b/README.md index 65ef383e..cd519b26 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,7 @@ See code for all available configurations. | [Lenovo Legion 7 16achg6 (Hybrid)](lenovo/legion/16achg6/hybrid) | `` | | [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `` | | [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | +| [Lenovo Legion 7 Pro 16irx9h (Intel)](lenovo/legion/16irx9h) | `` | | [Lenovo Legion Slim 7 Gen 7 (AMD)](lenovo/legion/16arha7/) | `` | | [Lenovo Legion T5 AMR5](lenovo/legion/t526amr5) | `` | | [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | diff --git a/lenovo/legion/16irx9h/default.nix b/lenovo/legion/16irx9h/default.nix new file mode 100644 index 00000000..6d9c772c --- /dev/null +++ b/lenovo/legion/16irx9h/default.nix @@ -0,0 +1,35 @@ +{ + lib, + config, + ... +}: { + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ada-lovelace + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ../../../common/hidpi.nix + ]; + + boot.initrd.kernelModules = ["nvidia"]; + boot.extraModulePackages = [config.boot.kernelPackages.lenovo-legion-module config.boot.kernelPackages.nvidia_x11]; + + hardware = { + nvidia = { + modesetting.enable = lib.mkDefault true; + powerManagement.enable = lib.mkDefault true; + # + prime = { + intelBusId = "PCI:00:02:0"; + nvidiaBusId = "PCI:01:00:0"; + }; + }; + }; + + # Cooling management + services.thermald.enable = lib.mkDefault true; + + # √(2560² + 1600²) px / 16 in ≃ 189 dpi + services.xserver.dpi = 189; +} From 684d64c67de1ea348a94ec487a5bad7d437ed610 Mon Sep 17 00:00:00 2001 From: Felipe Mica Date: Mon, 4 Nov 2024 22:49:10 +0000 Subject: [PATCH 1131/1476] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Accepting suggestions. 16irx8h should be fixed as well. Co-authored-by: Jörg Thalheim --- lenovo/legion/16irx9h/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lenovo/legion/16irx9h/default.nix b/lenovo/legion/16irx9h/default.nix index 6d9c772c..e117302f 100644 --- a/lenovo/legion/16irx9h/default.nix +++ b/lenovo/legion/16irx9h/default.nix @@ -12,12 +12,10 @@ ../../../common/hidpi.nix ]; - boot.initrd.kernelModules = ["nvidia"]; - boot.extraModulePackages = [config.boot.kernelPackages.lenovo-legion-module config.boot.kernelPackages.nvidia_x11]; + boot.extraModulePackages = [config.boot.kernelPackages.lenovo-legion-module]; hardware = { nvidia = { - modesetting.enable = lib.mkDefault true; powerManagement.enable = lib.mkDefault true; # prime = { From 90642a0deae927fa911d49d4f7c5616257105141 Mon Sep 17 00:00:00 2001 From: Felipe Micaroni Lalli Date: Tue, 5 Nov 2024 23:36:11 -0300 Subject: [PATCH 1132/1476] Adding a sound speaker fix. Issue #1039 --- lenovo/legion/16irx9h/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lenovo/legion/16irx9h/default.nix b/lenovo/legion/16irx9h/default.nix index e117302f..f96bc51b 100644 --- a/lenovo/legion/16irx9h/default.nix +++ b/lenovo/legion/16irx9h/default.nix @@ -25,6 +25,13 @@ }; }; + # Sound speaker fix, see #1039 + boot.extraModprobeConfig = '' + options snd-hda-intel model=auto + ''; + + boot.blacklistedKernelModules = [ "snd_soc_avs" ]; + # Cooling management services.thermald.enable = lib.mkDefault true; From 36ed775c1e10ab120f0629676c61369881a109fc Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Wed, 6 Nov 2024 22:13:53 +0800 Subject: [PATCH 1133/1476] tests: update flake lock --- tests/flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/flake.lock b/tests/flake.lock index aadb052a..ceacb5e8 100644 --- a/tests/flake.lock +++ b/tests/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1727826117, - "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "lastModified": 1730504689, + "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "rev": "506278e768c2a08bec68eb62932193e341f55c90", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1729455275, - "narHash": "sha256-THqzn/7um3oMHUEGXyq+1CJQE7EogwR3HjLMNOlhFBE=", + "lastModified": 1730874081, + "narHash": "sha256-VK7LkfdcpUi8tqcgMIYY2jejDh4O3MNw9An0FcKveRQ=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "9fcf30fccf8435f6390efec4a4d38e69c2268a36", + "rev": "12ad8c1bf13ff15ffa6afe82c59b4af0b9226035", "type": "github" }, "original": { @@ -37,11 +37,11 @@ }, "nixos-stable": { "locked": { - "lastModified": 1729307008, - "narHash": "sha256-QUvb6epgKi9pCu9CttRQW4y5NqJ+snKr1FZpG/x3Wtc=", + "lastModified": 1730741070, + "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a9b86fc2290b69375c5542b622088eb6eca2a7c3", + "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3", "type": "github" }, "original": { @@ -53,11 +53,11 @@ }, "nixos-unstable-small": { "locked": { - "lastModified": 1729493358, - "narHash": "sha256-Ti+Y9nWt5Fcs3JlarxLPgIOVlbqQo7jobz/qOwOaziM=", + "lastModified": 1730858696, + "narHash": "sha256-us4xhqqW6OkjCihXYuFArhwx91cTzns8FEY8lE4v7JQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a5e6a9e979367ee14f65d9c38119c30272f8455f", + "rev": "8541b4db5adb9dd835ed5d0023dec229987b7391", "type": "github" }, "original": { From 912e5b8a0023898a2f025084e99fa31734a9c465 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Wed, 6 Nov 2024 22:16:57 +0800 Subject: [PATCH 1134/1476] tuxedo/aura/15-gen1: migrate renamed option --- tuxedo/aura/15/gen1/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tuxedo/aura/15/gen1/default.nix b/tuxedo/aura/15/gen1/default.nix index 9ab1ca63..6c4b5da0 100644 --- a/tuxedo/aura/15/gen1/default.nix +++ b/tuxedo/aura/15/gen1/default.nix @@ -1,4 +1,5 @@ -{lib, ...}: { +{ lib, ... }: +{ imports = [ ../../../../common/cpu/amd ../../../../common/pc/laptop @@ -9,5 +10,13 @@ services.thermald.enable = lib.mkDefault true; # keyboard backlight lives in /sys/class/leds/rgb:kbd_backlight - hardware.tuxedo-keyboard.enable = lib.mkDefault true; + hardware = + if lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.11" then + { + tuxedo-drivers.enable = lib.mkDefault true; + } + else + { + tuxedo-keyboard.enable = lib.mkDefault true; + }; } From e1cc1f6483393634aee94514186d21a4871e78d7 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Sat, 2 Nov 2024 21:54:08 +0800 Subject: [PATCH 1135/1476] apple/t2: deprecate enableTinyDfr option and conflict with `hardware.apple.touchBar` * Adds a deprecation warning to hardware.apple-t2.enableTinyDfr as it has been upstreamed to nixpkgs already. The package and option can be removed at the next release cycle to hopefully not break people's setup. * Adds an assertion to conflict hardware.apple-t2.enableTinyDfr with hardware.apple.touchBar. Having both enabled causes both tiny-dfr to fight for the same display device. --- apple/t2/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apple/t2/default.nix b/apple/t2/default.nix index 7d69c1b4..d9b20955 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -109,6 +109,16 @@ in ''; }) (lib.mkIf t2Cfg.enableTinyDfr { + warnings = [ + '' + hardware.apple-t2.enableTinyDfr is deprecated since the module has been upstreamed as hardware.apple.touchBar. + This option will be removed from the apple/t2 profile when NixOS 24.11 is released. + '' + ]; + assertions = lib.optionals (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.11") [{ + assertion = !config.hardware.apple.touchBar.enable; + message = "hardware.apple-t2.enableTinyDfr conflicts with hardware.apple.touchBar.enable. Please disable one of them."; + }]; services.udev.packages = [ tiny-dfrPackage ]; systemd.services.tiny-dfr = { From f3049523c09dbcffdebb281a3bbaec33fec60089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20T=C3=B3th=20=28Mike=29?= Date: Sun, 10 Nov 2024 18:13:24 +0100 Subject: [PATCH 1136/1476] framework: Fix kernel version comparison for preventWakeOnAC The comparison previously used the default kernel's version instead of the selected kernel's version. --- framework/13-inch/7040-amd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/13-inch/7040-amd/default.nix b/framework/13-inch/7040-amd/default.nix index 73aad22e..6841d68b 100644 --- a/framework/13-inch/7040-amd/default.nix +++ b/framework/13-inch/7040-amd/default.nix @@ -27,7 +27,7 @@ in config = { # 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) '' + services.udev.extraRules = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.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 863e3ca9988f34c370bd660a5efc3e20eb7ad38b Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Sun, 10 Nov 2024 15:32:21 +0800 Subject: [PATCH 1137/1476] apple/t2: bump kernel from 6.11 to 6.11.7 --- apple/t2/pkgs/linux-t2.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index 4cf37d4a..54d6e237 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -2,19 +2,19 @@ , ... } @ args: let - version = "6.11"; + version = "6.11.7"; majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); patchRepo = fetchFromGitHub { owner = "t2linux"; repo = "linux-t2-patches"; - rev = "54b4f914930d92cf0b94601b402ec93f54a76390"; - hash = "sha256-mpGWcx+zE5kb5USE4CPGrrleZRNGxVUGxc9eQY5IIfY="; + rev = "ec4545c603cf2ef315818eccce62d06ee18e5c60"; + hash = "sha256-Nm7WiLjotwk5NDrpKTgcKtyQTOUG7A88ZgtzD460qY0="; }; kernel = fetchzip { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-QIbHTLWI5CaStQmuoJ1k7odQUDRLsWNGY10ek0eKo8M="; + hash = "sha256-wHWd8xfEFOTy0FkFBtn30+6816XC4uhgn0G9b40n9Co="; }; in buildLinux (args // { From f6581f1c3b137086e42a08a906bdada63045f991 Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Sun, 10 Nov 2024 10:39:09 +0100 Subject: [PATCH 1138/1476] framework: workaround display issues on AMD GPUs --- framework/13-inch/common/amd.nix | 13 +++++++++++-- framework/16-inch/common/amd.nix | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/framework/13-inch/common/amd.nix b/framework/13-inch/common/amd.nix index f5341b63..20d9d235 100644 --- a/framework/13-inch/common/amd.nix +++ b/framework/13-inch/common/amd.nix @@ -5,8 +5,17 @@ ../../../common/gpu/amd ]; - # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ - boot.kernelParams = lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") ["rtc_cmos.use_acpi_alarm=1"] ; + boot.kernelParams = + [ + # There seems to be an issue with panel self-refresh (PSR) that + # causes hangs for users. + # + # https://community.frame.work/t/fedora-kde-becomes-suddenly-slow/58459 + # https://gitlab.freedesktop.org/drm/amd/-/issues/3647 + "amdgpu.dcdebugmask=0x10" + ] + # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ + ++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") ["rtc_cmos.use_acpi_alarm=1"]; # AMD has better battery life with PPD over TLP: # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 diff --git a/framework/16-inch/common/amd.nix b/framework/16-inch/common/amd.nix index f5341b63..20d9d235 100644 --- a/framework/16-inch/common/amd.nix +++ b/framework/16-inch/common/amd.nix @@ -5,8 +5,17 @@ ../../../common/gpu/amd ]; - # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ - boot.kernelParams = lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") ["rtc_cmos.use_acpi_alarm=1"] ; + boot.kernelParams = + [ + # There seems to be an issue with panel self-refresh (PSR) that + # causes hangs for users. + # + # https://community.frame.work/t/fedora-kde-becomes-suddenly-slow/58459 + # https://gitlab.freedesktop.org/drm/amd/-/issues/3647 + "amdgpu.dcdebugmask=0x10" + ] + # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ + ++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") ["rtc_cmos.use_acpi_alarm=1"]; # AMD has better battery life with PPD over TLP: # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 From ccc638b24f7c29db45838588b5e747fddb1239af Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Tue, 18 Jun 2024 09:40:37 +0800 Subject: [PATCH 1139/1476] framework: Add Intel Core Ultra Series 1 Signed-off-by: Daniel Schaefer --- README.md | 1 + .../13-inch/intel-core-ultra-series1/README.md | 15 +++++++++++++++ .../13-inch/intel-core-ultra-series1/default.nix | 12 ++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 framework/13-inch/intel-core-ultra-series1/README.md create mode 100644 framework/13-inch/intel-core-ultra-series1/default.nix diff --git a/README.md b/README.md index cd519b26..7f77e266 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,7 @@ See code for all available configurations. | [Framework 11th Gen Intel Core](framework/13-inch/11th-gen-intel) | `` | | [Framework 12th Gen Intel Core](framework/13-inch/12th-gen-intel) | `` | | [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `` | +| [Framework Intel Core Ultra Series 1](framework/13-inch/intel-core-ultra-series1) | `` | | [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | | [Framework 16 AMD Ryzen 7040 Series](framework/16-inch/7040-amd) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | diff --git a/framework/13-inch/intel-core-ultra-series1/README.md b/framework/13-inch/intel-core-ultra-series1/README.md new file mode 100644 index 00000000..8f3b7a42 --- /dev/null +++ b/framework/13-inch/intel-core-ultra-series1/README.md @@ -0,0 +1,15 @@ +# [Framework Laptop 13](https://frame.work/) + +## Updating Firmware + +First put enable `fwupd` + +```nix +services.fwupd.enable = true; +``` + +Then run + +```sh + $ fwupdmgr update +``` diff --git a/framework/13-inch/intel-core-ultra-series1/default.nix b/framework/13-inch/intel-core-ultra-series1/default.nix new file mode 100644 index 00000000..2de7cff0 --- /dev/null +++ b/framework/13-inch/intel-core-ultra-series1/default.nix @@ -0,0 +1,12 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../common + ../common/intel.nix + ]; + + # Need at least 6.9 to make suspend properly + # Specifically this patch: https://github.com/torvalds/linux/commit/073237281a508ac80ec025872ad7de50cfb5a28a + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.9") (lib.mkDefault pkgs.linuxPackages_latest); +} From dd93bef722ed86b56afda26902519ef69a52836d Mon Sep 17 00:00:00 2001 From: Hannes <55623006+umgefahren@users.noreply.github.com> Date: Sat, 21 Sep 2024 14:39:00 +0200 Subject: [PATCH 1140/1476] Reference intel core ultra in flake --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 8302950e..bec4b4df 100644 --- a/flake.nix +++ b/flake.nix @@ -107,6 +107,7 @@ framework-11th-gen-intel = import ./framework/13-inch/11th-gen-intel; framework-12th-gen-intel = import ./framework/13-inch/12th-gen-intel; framework-13th-gen-intel = import ./framework/13-inch/13th-gen-intel; + framework-intel-core-ultra-series1 = import ./framework/13-inch/intel-core-ultra-series1; framework-13-7040-amd = import ./framework/13-inch/7040-amd; framework-16-7040-amd = import ./framework/16-inch/7040-amd; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; From 0c657fd1342d7996874a19c6e5540fd6ab3cf876 Mon Sep 17 00:00:00 2001 From: adjoly Date: Fri, 15 Nov 2024 18:20:54 +0100 Subject: [PATCH 1141/1476] feat(Intel CoffeeLake): Added support --- common/cpu/intel/coffee-lake/cpu-only.nix | 5 +++++ common/cpu/intel/coffee-lake/default.nix | 6 ++++++ common/gpu/intel/coffee-lake/default.nix | 11 +++++++++++ 3 files changed, 22 insertions(+) create mode 100644 common/cpu/intel/coffee-lake/cpu-only.nix create mode 100644 common/cpu/intel/coffee-lake/default.nix create mode 100644 common/gpu/intel/coffee-lake/default.nix diff --git a/common/cpu/intel/coffee-lake/cpu-only.nix b/common/cpu/intel/coffee-lake/cpu-only.nix new file mode 100644 index 00000000..82892615 --- /dev/null +++ b/common/cpu/intel/coffee-lake/cpu-only.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../cpu-only.nix + ]; +} diff --git a/common/cpu/intel/coffee-lake/default.nix b/common/cpu/intel/coffee-lake/default.nix new file mode 100644 index 00000000..0d02b9c9 --- /dev/null +++ b/common/cpu/intel/coffee-lake/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./cpu-only.nix + ../../../gpu/intel/coffee-lake + ]; +} diff --git a/common/gpu/intel/coffee-lake/default.nix b/common/gpu/intel/coffee-lake/default.nix new file mode 100644 index 00000000..55e71d21 --- /dev/null +++ b/common/gpu/intel/coffee-lake/default.nix @@ -0,0 +1,11 @@ +{ ... }: + +{ + imports = [ ../. ]; + + boot.kernelParams = [ + "i915.enable_guc=2" + ]; + + hardware.intelgpu.vaapiDriver = "intel-media-driver"; +} From c2c275fbb2e656948ba6e1f67b8ddd430f158c5f Mon Sep 17 00:00:00 2001 From: Alexey Abel Date: Thu, 14 Nov 2024 19:49:16 +0100 Subject: [PATCH 1142/1476] Add information on Gigabyte B650M Aorus Elite AX --- gigabyte/b650/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 gigabyte/b650/README.md diff --git a/gigabyte/b650/README.md b/gigabyte/b650/README.md new file mode 100644 index 00000000..aeb23cd9 --- /dev/null +++ b/gigabyte/b650/README.md @@ -0,0 +1,13 @@ +# B650 suspend bug + +Just as the [B550 mainboard](../b550/README.md) series, the B650 series has a +bug where the PC will wakeup immediately after going into suspend. + +## Affects at least + +- Gigabyte B650M Aorus Elite AX (Rev. 1.3) (BIOS Version F32b) + - Can not be fixed by modifying enabled entries in /proc/acpi/wakeup. + Computer wakes up even if all enabled entries are disabled. Therefore, no + fix exist currently. + + From 672ac2ac86f7dff2f6f3406405bddecf960e0db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20T=C3=B3th=20=28Mike=29?= Date: Sat, 16 Nov 2024 14:12:12 +0100 Subject: [PATCH 1143/1476] framework: Add `hardware.framework.laptop13.audioEnhancement` option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- framework/13-inch/11th-gen-intel/default.nix | 2 + framework/13-inch/12th-gen-intel/default.nix | 12 +- framework/13-inch/7040-amd/default.nix | 2 + framework/13-inch/common/audio.nix | 382 +++++++++++++++++++ framework/13-inch/common/default.nix | 1 + 5 files changed, 394 insertions(+), 5 deletions(-) create mode 100644 framework/13-inch/common/audio.nix diff --git a/framework/13-inch/11th-gen-intel/default.nix b/framework/13-inch/11th-gen-intel/default.nix index a29966f5..2ea33969 100644 --- a/framework/13-inch/11th-gen-intel/default.nix +++ b/framework/13-inch/11th-gen-intel/default.nix @@ -7,4 +7,6 @@ # Requires at least 5.16 for working wi-fi and bluetooth. # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") (lib.mkDefault pkgs.linuxPackages_latest); + + hardware.framework.laptop13.audioEnhancement.rawDeviceName = lib.mkDefault "alsa_output.pci-0000_00_1f.3.analog-stereo"; } diff --git a/framework/13-inch/12th-gen-intel/default.nix b/framework/13-inch/12th-gen-intel/default.nix index e2fdcfdd..4cce4446 100644 --- a/framework/13-inch/12th-gen-intel/default.nix +++ b/framework/13-inch/12th-gen-intel/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: { imports = [ ../common @@ -8,17 +8,19 @@ config = lib.mkMerge [ { hardware.intelgpu.loadInInitrd = lib.versionOlder config.boot.kernelPackages.kernel.version "6.2"; + # same as 13th gen framework 13-inch + hardware.framework.laptop13.audioEnhancement.rawDeviceName = lib.mkDefault "alsa_output.pci-0000_00_1f.3.analog-stereo"; } # https://community.frame.work/t/tracking-hard-freezing-on-fedora-36-with-the-new-12th-gen-system/20675/391 (lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.2") { - boot.kernelParams = [ + boot.kernelParams = [ # Workaround iGPU hangs # https://discourse.nixos.org/t/intel-12th-gen-igpu-freezes/21768/4 - "i915.enable_psr=1" + "i915.enable_psr=1" ]; }) (lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") { - boot.blacklistedKernelModules = [ + boot.blacklistedKernelModules = [ # This enables the brightness and airplane mode keys to work # https://community.frame.work/t/12th-gen-not-sending-xf86monbrightnessup-down/20605/11 "hid-sensor-hub" @@ -27,7 +29,7 @@ (lib.mkIf (config.hardware.framework.enableKmod == false) "cros_ec_lpcs") ]; - boot.kernelParams = [ + boot.kernelParams = [ # For Power consumption # https://kvark.github.io/linux/framework/2021/10/17/framework-nixos.html # Update 04/2024: Combined with acpi_osi from framework-intel it increases the idle power-usage in my test (SebTM) diff --git a/framework/13-inch/7040-amd/default.nix b/framework/13-inch/7040-amd/default.nix index 6841d68b..9ec5e728 100644 --- a/framework/13-inch/7040-amd/default.nix +++ b/framework/13-inch/7040-amd/default.nix @@ -32,5 +32,7 @@ in # 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" ''; + + hardware.framework.laptop13.audioEnhancement.rawDeviceName = lib.mkDefault "alsa_output.pci-0000_c1_00.6.analog-stereo"; }; } diff --git a/framework/13-inch/common/audio.nix b/framework/13-inch/common/audio.nix new file mode 100644 index 00000000..b6aa6d65 --- /dev/null +++ b/framework/13-inch/common/audio.nix @@ -0,0 +1,382 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.hardware.framework.laptop13.audioEnhancement; +in +{ + options = { + hardware.framework.laptop13.audioEnhancement = { + enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = '' + Create a new audio device called "Framework Speakers", + which applies sound tuning before sending the audio out to the speakers. + This option requires PipeWire and WirePlumber. + + The filter chain includes the following: + - Pyschoacoustic bass enhancement + - Loudness compensation + - Equalizer + - Slight compression + + This option has been optimised for the Framework Laptop 13 AMD 7040 series, but should work on all models. + + Before applying, ensure the speakers are set to 100%, + because the volumes compound and the raw speaker device will be hidden by default. + + You might also need to re-select the default output device. + + In some cases, the added bass will vibrate the keyboard cable leading to a rattling sound, + a piece of foam can be used to mitigate this. + ''; + }; + + hideRawDevice = lib.mkOption { + type = lib.types.bool; + default = true; + description = '' + Hide the raw speaker device. + This option is enabled by default, because keeping the raw speaker device can lead to volume conflicts. + ''; + }; + + rawDeviceName = lib.mkOption { + type = lib.types.str; + example = "alsa_output.pci-0000_c1_00.6.analog-stereo"; + description = '' + The name of the raw speaker device. This will vary by device. + You can get this by running `pw-dump | grep -C 20 pci-0000`. + ''; + }; + }; + }; + + config = lib.mkIf cfg.enable (let + outputName = cfg.rawDeviceName; + prettyName = "Framework Speakers"; + + # These are pre-made decibel to linear value conversions, since Nix doesn't have pow(). + # Use the formula `10 ** (db / 20)` to calculate. + db = { + "-18.1" = 0.1244514611771385; + "-5.48" = 0.5321082592667942; + "-4.76" = 0.5780960474057181; + "8.1" = 2.5409727055493048; + "-36" = 1.5848931924611134e-2; + }; + + json = pkgs.formats.json { }; + + # The filter chain, heavily inspired by the asahi-audio project: https://github.com/AsahiLinux/asahi-audio + filter-chain = json.generate "filter-chain.json" { + "node.description" = prettyName; + "media.name" = prettyName; + "filter.graph" = { + nodes = [ + # Psychoacoustic bass extension, + # it creates harmonics of the missing bass to fool our ears into hearing it. + { + type = "lv2"; + plugin = "https://chadmed.au/bankstown"; + name = "bassex"; + control = { + bypass = 0; + amt = 1.2; + sat_second = 1.3; + sat_third = 2.5; + blend = 1.0; + ceil = 200.0; + floor = 20.0; + }; + } + # Loudness compensation, + # it ensures that the sound profile stays consistent across different volumes. + { + type = "lv2"; + plugin = "http://lsp-plug.in/plugins/lv2/loud_comp_stereo"; + name = "el"; + control = { + enabled = 1; + input = 1.0; + fft = 4; + }; + } + # 8-band equalizer, + # it tries to lessen frequencies where the laptop might resonate, + # and tries to make the frequency curve more pleasing; + # this is the "Lappy McTopface" profile (https://github.com/ceiphr/ee-framework-presets) + # further tuned for the Framework Laptop 13 AMD 7040 series + # and might need some tuning on other models. + { + type = "lv2"; + plugin = "http://lsp-plug.in/plugins/lv2/para_equalizer_x8_lr"; + name = "fw13eq"; + control = { + mode = 0; + react = 0.2; + zoom = db."-36"; + + fl_0 = 101.0; + fml_0 = 0; + ftl_0 = 5; + gl_0 = db."-18.1"; + huel_0 = 0.0; + ql_0 = 4.36; + sl_0 = 0; + wl_0 = 4.0; + + fl_1 = 451.0; + fml_1 = 0; + ftl_1 = 1; + gl_1 = db."-5.48"; + huel_1 = 3.125e-2; + ql_1 = 2.46; + sl_1 = 0; + wl_1 = 4.0; + + fl_2 = 918.0; + fml_2 = 0; + ftl_2 = 1; + gl_2 = db."-4.76"; + huel_2 = 6.25e-2; + ql_2 = 2.44; + sl_2 = 0; + wl_2 = 4.0; + + fl_3 = 9700.0; + fml_3 = 0; + ftl_3 = 1; + gl_3 = db."8.1"; + huel_3 = 9.375e-2; + ql_3 = 2.0; + sl_3 = 0; + wl_3 = 4.0; + + fr_0 = 101.0; + fmr_0 = 0; + ftr_0 = 5; + gr_0 = db."-18.1"; + huer_0 = 0.0; + qr_0 = 4.36; + sr_0 = 0; + wr_0 = 4.0; + + fr_1 = 451.0; + fmr_1 = 0; + ftr_1 = 1; + gr_1 = db."-5.48"; + huer_1 = 3.125e-2; + qr_1 = 2.46; + sr_1 = 0; + wr_1 = 4.0; + + fr_2 = 918.0; + fmr_2 = 0; + ftr_2 = 1; + gr_2 = db."-4.76"; + huer_2 = 6.25e-2; + qr_2 = 2.44; + sr_2 = 0; + wr_2 = 4.0; + + fr_3 = 9700.0; + fmr_3 = 0; + ftr_3 = 1; + gr_3 = db."8.1"; + huer_3 = 9.375e-2; + qr_3 = 2.0; + sr_3 = 0; + wr_3 = 4.0; + }; + } + # Compressors. The settings were taken from the asahi-audio project. + { + type = "lv2"; + plugin = "http://lsp-plug.in/plugins/lv2/mb_compressor_stereo"; + name = "woofer_bp"; + control = { + mode = 0; + ce_0 = 1; + sla_0 = 5.0; + cr_0 = 1.75; + al_0 = 0.725; + at_0 = 1.0; + rt_0 = 100; + kn_0 = 0.125; + cbe_1 = 1; + sf_1 = 200.0; + ce_1 = 0; + cbe_2 = 0; + ce_2 = 0; + cbe_3 = 0; + ce_3 = 0; + cbe_4 = 0; + ce_4 = 0; + cbe_5 = 0; + ce_5 = 0; + cbe_6 = 0; + ce_6 = 0; + }; + } + { + type = "lv2"; + plugin = "http://lsp-plug.in/plugins/lv2/compressor_stereo"; + name = "woofer_lim"; + control = { + sla = 5.0; + al = 1.0; + at = 1.0; + rt = 100.0; + cr = 15.0; + kn = 0.5; + }; + } + ]; + + # Now, we're chaining together the modules instantiated above. + links = [ + { + output = "bassex:out_l"; + input = "el:in_l"; + } + { + output = "bassex:out_r"; + input = "el:in_r"; + } + + { + output = "el:out_l"; + input = "fw13eq:in_l"; + } + { + output = "el:out_r"; + input = "fw13eq:in_r"; + } + { + output = "fw13eq:out_l"; + input = "woofer_bp:in_l"; + } + { + output = "fw13eq:out_r"; + input = "woofer_bp:in_r"; + } + { + output = "woofer_bp:out_l"; + input = "woofer_lim:in_l"; + } + { + output = "woofer_bp:out_r"; + input = "woofer_lim:in_r"; + } + ]; + + inputs = [ + "bassex:in_l" + "bassex:in_r" + ]; + outputs = [ + "woofer_lim:out_l" + "woofer_lim:out_r" + ]; + + # This makes pipewire's volume control actually control the loudness comp module + "capture.volumes" = [ + { + control = "el:volume"; + min = -47.5; + max = 0.0; + scale = "cubic"; + } + ]; + }; + "capture.props" = { + "node.name" = "audio_effect.laptop-convolver"; + "media.class" = "Audio/Sink"; + "audio.channels" = "2"; + "audio.position" = [ + "FL" + "FR" + ]; + "audio.allowed-rates" = [ + 44100 + 48000 + 88200 + 96000 + 176400 + 192000 + ]; + "device.api" = "dsp"; + "node.virtual" = "false"; + + # Lower seems to mean "more preferred", + # bluetooth devices seem to be ~1000, speakers seem to be ~2000 + # since this is between the two, bluetooth devices take over when they connect, + # and hand over to this instead of the speakers when they disconnect. + "priority.session" = 1500; + "priority.driver" = 1500; + "state.default-volume" = 0.343; + "device.icon-name" = "audio-card-analog-pci"; + }; + "playback.props" = { + "node.name" = "audio_effect.laptop-convolver"; + "target.object" = outputName; + "node.passive" = "true"; + "audio.channels" = "2"; + "audio.allowed-rates" = [ + 44100 + 48000 + 88200 + 96000 + 176400 + 192000 + ]; + "audio.position" = [ + "FL" + "FR" + ]; + "device.icon-name" = "audio-card-analog-pci"; + }; + }; + + configPackage = + (pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/99-laptop.conf" '' + monitor.alsa.rules = [ + { + matches = [{ node.name = "${outputName}" }] + actions = { + update-props = { + audio.allowed-rates = [44100, 48000, 88200, 96000, 176400, 192000] + } + } + } + ] + + node.software-dsp.rules = [ + { + matches = [{ node.name = "${outputName}" }] + actions = { + create-filter = { + filter-path = "${filter-chain}" + hide-parent = ${lib.boolToString cfg.hideRawDevice} + } + } + } + ] + + wireplumber.profiles = { + main = { node.software-dsp = "required" } + } + '') + // { + passthru.requiredLv2Packages = with pkgs; [ + lsp-plugins + bankstown-lv2 + ]; + }; + in { + services.pipewire.wireplumber.configPackages = [ configPackage ]; + + # Pipewire is needed for this. + services.pipewire.enable = lib.mkDefault true; + }); +} diff --git a/framework/13-inch/common/default.nix b/framework/13-inch/common/default.nix index f9c78086..5d228d03 100644 --- a/framework/13-inch/common/default.nix +++ b/framework/13-inch/common/default.nix @@ -5,6 +5,7 @@ ../../bluetooth.nix ../../kmod.nix ../../framework-tool.nix + ./audio.nix ]; # Fix TRRS headphones missing a mic From 10c399bbac631ca6f750619d46bfdbeeb152efe1 Mon Sep 17 00:00:00 2001 From: Joshua Park <123624726+joshprk@users.noreply.github.com> Date: Fri, 22 Nov 2024 19:54:23 -0500 Subject: [PATCH 1144/1476] Added Lenovo Ideapad 16AHP9 to Flake.nix --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index bec4b4df..28743e7e 100644 --- a/flake.nix +++ b/flake.nix @@ -134,6 +134,7 @@ lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; lenovo-ideapad-15ach6 = import ./lenovo/ideapad/15ach6; lenovo-ideapad-16ach6 = import ./lenovo/ideapad/16ach6; + lenovo-ideapad-16ahp9 = import ./lenovo/ideapad/16ahp9; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-ideapad-slim-5 = import ./lenovo/ideapad/slim-5; lenovo-ideapad-s145-15api = import ./lenovo/ideapad/s145-15api; From acdc2cd8153ddefab79d2bd31ed5690cdf2d6314 Mon Sep 17 00:00:00 2001 From: Joshua Park <123624726+joshprk@users.noreply.github.com> Date: Mon, 25 Nov 2024 22:31:14 -0500 Subject: [PATCH 1145/1476] Fix typo in Lenovo IdeaPad 16AHP9 URL --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f77e266..a0b04655 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ See code for all available configurations. | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | | [Lenovo IdeaPad Slim 5 16iah8](lenovo/ideapad/16iah8) | `` | | [Lenovo Legion 5 15ach6h](lenovo/legion/15ach6h) | `` | | [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | From 9318325957572aae826cc37d4378412b0d49d5dc Mon Sep 17 00:00:00 2001 From: Mic92 <96200+Mic92@users.noreply.github.com> Date: Mon, 18 Nov 2024 22:51:12 +0000 Subject: [PATCH 1146/1476] =?UTF-8?q?=E3=80=8C=E2=9C=A8=E3=80=8D=20feat(De?= =?UTF-8?q?ll=20Precision=205530):=20Added=20Nvidia=20support=20and=20some?= =?UTF-8?q?=20other=20feature=20(#1254)=20=E3=80=8C=E2=9C=A8=E3=80=8D=20fe?= =?UTF-8?q?at(Dell=20Precision=205530):=20Added=20Nvidia=20support=20and?= =?UTF-8?q?=20some=20other=20feature?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update dell/precision/5530/default.nix Co-authored-by: Jörg Thalheim --- dell/precision/5530/default.nix | 55 ++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/dell/precision/5530/default.nix b/dell/precision/5530/default.nix index 24071f0a..6f270c26 100644 --- a/dell/precision/5530/default.nix +++ b/dell/precision/5530/default.nix @@ -1,22 +1,47 @@ +{ lib, config, ... }: + { imports = [ - ../../../common/cpu/intel ../../../common/pc/laptop ../../../common/pc/laptop/ssd + ../../../common/gpu/nvidia/pascal + ../../../common/gpu/nvidia/prime.nix + ../../../common/cpu/intel/coffee-lake ]; - 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 = { + 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" + "nvidia_drm.modeset=1" + ]; + }; + + hardware = { + nvidia = { + open = lib.mkDefault false; + nvidiaSettings = lib.mkDefault true; + modesetting.enable = lib.mkDefault true; + package = lib.mkDefault config.boot.kernelPackages.nvidiaPackages.stable; + prime = { + intelBusId = lib.mkDefault "PCI:0:2:0"; + nvidiaBusId = lib.mkDefault "PCI:1:0:0"; + }; + }; + }; + # This will save you money and possibly your life! + services = { + fwupd.enable = lib.mkDefault true; + thermald.enable = lib.mkDefault true; + }; } From fe01780d356d70fd119a19277bff71d3e78dad00 Mon Sep 17 00:00:00 2001 From: Thomas Leon Highbaugh Date: Thu, 28 Nov 2024 05:19:15 +0000 Subject: [PATCH 1147/1476] Update flake.nix added missing reference --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 28743e7e..6eba0df2 100644 --- a/flake.nix +++ b/flake.nix @@ -150,6 +150,7 @@ lenovo-legion-16arha7 = import ./lenovo/legion/16arha7; lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h; + lenovo-legion-16irx9h = import ./lenovo/legion/16irx9h; lenovo-legion-t526amr5 = import ./lenovo/legion/t526amr5; lenovo-legion-y530-15ich = import ./lenovo/legion/15ich; lenovo-thinkpad = import ./lenovo/thinkpad; From 4c0d42b582bc05dad64c97c7c27d32306f4283b9 Mon Sep 17 00:00:00 2001 From: xenia Date: Thu, 4 Jul 2024 03:01:44 -0400 Subject: [PATCH 1148/1476] framework: refactor kmod for improved AMD support Changes several aspects of framework-laptop-kmod support: - default value has been changed to true when NixOS >= 24.05 and linux kernel >=6.10, and false otherwise - adds required patch for framework AMD enablement when kernel <6.10 - add README section describing usage --- framework/README.md | 11 +++++++++++ framework/kmod.nix | 43 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 45 insertions(+), 9 deletions(-) diff --git a/framework/README.md b/framework/README.md index 5cba48c5..5501e159 100644 --- a/framework/README.md +++ b/framework/README.md @@ -51,6 +51,17 @@ For the Framework 13 laptops, there are common configuration modules available u including some modules specific to AMD- or Intel-based laptops. By preference, there will already be a specialised module for your model's configuration. Otherwise, it can be added alongside the existing modules. +## OS integration + +`hardware.framework.enableKmod` enables the [community-created Framework kernel +module](https://github.com/DHowett/framework-laptop-kmod) which exposes EC functionality like battery charge limit, +privacy switches, and system LEDs as standard driver interfaces. This enables, for example, configuring the charge limit +using the KDE settings GUI. The option is enabled by default when NixOS `>= 24.05` and linux kernel version `>= 6.10`. + +On AMD Framework 13 and 16, before kernel 6.10, additional kernel patches are required for the kernel module to function +properly. Manually setting `hardware.framework.enableKmod = true` will apply the patches, requiring a kernel +recompilation. + ## Support Tools ### fw-ectool diff --git a/framework/kmod.nix b/framework/kmod.nix index a6c30eb3..3fc99659 100644 --- a/framework/kmod.nix +++ b/framework/kmod.nix @@ -1,17 +1,42 @@ -{ config, lib, ... }: -{ - options.hardware.framework.enableKmod = lib.mkEnableOption +{ config, lib, pkgs, ... }: +let + kernel_version_compatible = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.10"; +in { + options.hardware.framework.enableKmod = (lib.mkEnableOption "Enable the community created Framework kernel module that allows interacting with the embedded controller from sysfs." - // { - # Enable by default if on new enough version of NixOS - default = (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05"); + ) // { + # enable by default on NixOS >= 24.05 and kernel >= 6.10 + default = lib.and + (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05") + kernel_version_compatible; }; - config = lib.mkIf config.hardware.framework.enableKmod { - boot.extraModulePackages = with config.boot.kernelPackages; [ + + config.boot = lib.mkIf config.hardware.framework.enableKmod { + extraModulePackages = with config.boot.kernelPackages; [ framework-laptop-kmod ]; + # https://github.com/DHowett/framework-laptop-kmod?tab=readme-ov-file#usage - boot.kernelModules = [ "cros_ec" "cros_ec_lpcs" ]; + kernelModules = [ "cros_ec" "cros_ec_lpcs" ]; + + # add required patch if enabled on kernel <6.10 + kernelPatches = lib.mkIf (!kernel_version_compatible) [ + rec { + name = "platform/chrome: cros_ec_lpc: add support for AMD Framework Laptops"; + msgid = "20240403004713.130365-1-dustin@howett.net"; + version = "3"; + hash = "sha256-aQSyys8CMzlj9EdNhg8vtp76fg1qEwUVeJL0E+8w5HU="; + patch = pkgs.runCommandLocal "patch-${msgid}" { + nativeBuildInputs = with pkgs; [ b4 git cacert ]; + SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; + + outputHash = hash; + } '' + export HOME="$TMP" + PYTHONHASHSEED=0 ${pkgs.b4}/bin/b4 -n am -C -T -v ${version} -o- "${msgid}" > "$out" + ''; + } + ]; }; } From c6c90887f84c02ce9ebf33b95ca79ef45007bf88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 2 Dec 2024 12:29:38 +0100 Subject: [PATCH 1149/1476] drop acpi_call from nixos-hardware fixes https://github.com/NixOS/nixos-hardware/issues/1114 and tlp also no longer recommands it. --- apple/imac/18-2/default.nix | 1 - apple/macbook-pro/14-1/default.nix | 5 ++--- asus/zephyrus/ga402x/shared.nix | 1 - common/pc/laptop/acpi_call.nix | 10 ---------- dell/xps/13-9300/default.nix | 1 - dell/xps/13-9370/default.nix | 1 - dell/xps/13-9380/default.nix | 1 - flake.nix | 2 +- focus/m2/gen1/default.nix | 2 +- hp/elitebook/830/g6/default.nix | 1 - hp/elitebook/845/g7/default.nix | 1 - hp/elitebook/845/g8/default.nix | 1 - hp/elitebook/845/g9/default.nix | 1 - lenovo/ideapad/15alc6/default.nix | 1 - lenovo/ideapad/15arh05/default.nix | 1 - lenovo/ideapad/slim-5/default.nix | 1 - lenovo/thinkpad/a475/default.nix | 1 - lenovo/thinkpad/e14/default.nix | 1 - lenovo/thinkpad/l13/default.nix | 1 - lenovo/thinkpad/l14/default.nix | 1 - lenovo/thinkpad/p1/default.nix | 1 - lenovo/thinkpad/p14s/default.nix | 1 - lenovo/thinkpad/p50/default.nix | 1 - lenovo/thinkpad/p51/default.nix | 1 - lenovo/thinkpad/p52/default.nix | 1 - lenovo/thinkpad/p53/default.nix | 1 - lenovo/thinkpad/t14/default.nix | 1 - lenovo/thinkpad/t14s/default.nix | 1 - lenovo/thinkpad/t420/default.nix | 1 - lenovo/thinkpad/t430/default.nix | 1 - lenovo/thinkpad/t440s/default.nix | 1 - lenovo/thinkpad/t450s/default.nix | 1 - lenovo/thinkpad/t460/default.nix | 1 - lenovo/thinkpad/t460p/default.nix | 1 - lenovo/thinkpad/t460s/default.nix | 1 - lenovo/thinkpad/t470s/default.nix | 1 - lenovo/thinkpad/t480/default.nix | 1 - lenovo/thinkpad/t480s/default.nix | 1 - lenovo/thinkpad/t490/default.nix | 3 +-- lenovo/thinkpad/t495/default.nix | 1 - lenovo/thinkpad/t520/default.nix | 1 - lenovo/thinkpad/t550/default.nix | 1 - lenovo/thinkpad/t590/default.nix | 1 - lenovo/thinkpad/w520/default.nix | 1 - lenovo/thinkpad/x1-nano/default.nix | 1 - lenovo/thinkpad/x1/6th-gen/default.nix | 1 - lenovo/thinkpad/x1/7th-gen/default.nix | 1 - lenovo/thinkpad/x13/common.nix | 1 - lenovo/thinkpad/x230/default.nix | 1 - lenovo/thinkpad/x250/default.nix | 1 - lenovo/thinkpad/x260/default.nix | 1 - lenovo/thinkpad/x270/default.nix | 1 - lenovo/thinkpad/x280/default.nix | 1 - lenovo/thinkpad/x390/default.nix | 1 - lenovo/thinkpad/z/default.nix | 1 - lenovo/yoga/7/14ARH7/shared.nix | 1 - 56 files changed, 5 insertions(+), 68 deletions(-) delete mode 100644 common/pc/laptop/acpi_call.nix diff --git a/apple/imac/18-2/default.nix b/apple/imac/18-2/default.nix index 07608239..4770e10b 100644 --- a/apple/imac/18-2/default.nix +++ b/apple/imac/18-2/default.nix @@ -10,7 +10,6 @@ ../../../common/gpu/amd ../../../common/hidpi.nix ../../../common/pc/laptop/ssd - ../../../common/pc/laptop/acpi_call.nix ]; # apple smc (TODO: check spi) diff --git a/apple/macbook-pro/14-1/default.nix b/apple/macbook-pro/14-1/default.nix index e2fb2abe..cec9e262 100644 --- a/apple/macbook-pro/14-1/default.nix +++ b/apple/macbook-pro/14-1/default.nix @@ -9,7 +9,6 @@ ../../../common/cpu/intel/kaby-lake ../../../common/hidpi.nix ../../../common/pc/laptop/ssd - ../../../common/pc/laptop/acpi_call.nix ]; # Make the keyboard work in stage1, enable iommu @@ -41,9 +40,9 @@ AttrKeyboardIntegration=internal ''; - # Wifi, CPU Microcode FW updates + # Wifi, CPU Microcode FW updates networking.enableB43Firmware = lib.mkDefault true; - hardware = { + hardware = { enableRedistributableFirmware = lib.mkDefault true; cpu.intel.updateMicrocode = lib.mkDefault true; }; diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix index 02adb174..f1069037 100644 --- a/asus/zephyrus/ga402x/shared.nix +++ b/asus/zephyrus/ga402x/shared.nix @@ -16,7 +16,6 @@ in { ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd ../../../common/pc/laptop - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/ssd ]; diff --git a/common/pc/laptop/acpi_call.nix b/common/pc/laptop/acpi_call.nix deleted file mode 100644 index 76e4b276..00000000 --- a/common/pc/laptop/acpi_call.nix +++ /dev/null @@ -1,10 +0,0 @@ -# acpi_call makes tlp work for newer thinkpads - -{ config, lib, ... }: - -{ - boot = lib.mkIf config.services.tlp.enable { - kernelModules = [ "acpi_call" ]; - extraModulePackages = with config.boot.kernelPackages; [ acpi_call ]; - }; -} diff --git a/dell/xps/13-9300/default.nix b/dell/xps/13-9300/default.nix index 3ddd0ccf..53828cfa 100644 --- a/dell/xps/13-9300/default.nix +++ b/dell/xps/13-9300/default.nix @@ -7,7 +7,6 @@ in { imports = [ ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/ssd ../sleep-resume/i2c-designware ]; diff --git a/dell/xps/13-9370/default.nix b/dell/xps/13-9370/default.nix index 10362b3b..31ca7c10 100644 --- a/dell/xps/13-9370/default.nix +++ b/dell/xps/13-9370/default.nix @@ -4,7 +4,6 @@ imports = [ ../../../common/cpu/intel/kaby-lake ../../../common/pc/laptop - ../../../common/pc/laptop/acpi_call.nix ]; # Force S3 sleep mode. See README.wiki for details. diff --git a/dell/xps/13-9380/default.nix b/dell/xps/13-9380/default.nix index b710ce8a..df8b810c 100644 --- a/dell/xps/13-9380/default.nix +++ b/dell/xps/13-9380/default.nix @@ -2,7 +2,6 @@ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/acpi_call.nix ]; # Force S3 sleep mode. See README.wiki for details. diff --git a/flake.nix b/flake.nix index 6eba0df2..44bedb0a 100644 --- a/flake.nix +++ b/flake.nix @@ -330,7 +330,7 @@ common-pc = import ./common/pc; common-pc-hdd = import ./common/pc/hdd; common-pc-laptop = import ./common/pc/laptop; - common-pc-laptop-acpi_call = import ./common/pc/laptop/acpi_call.nix; + common-pc-laptop-acpi_call = throw "common-pc-laptop-acpi_call has been removed because it is obsolete: https://github.com/NixOS/nixos-hardware/issues/1114"; common-pc-laptop-hdd = import ./common/pc/laptop/hdd; common-pc-laptop-ssd = import ./common/pc/ssd; common-pc-ssd = import ./common/pc/ssd; diff --git a/focus/m2/gen1/default.nix b/focus/m2/gen1/default.nix index b6a2c789..0024102f 100644 --- a/focus/m2/gen1/default.nix +++ b/focus/m2/gen1/default.nix @@ -6,7 +6,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/turing ../../../common/pc/laptop - ../../../common/pc/laptop/acpi_call.nix +gc ../../../common/pc/laptop/ssd ]; diff --git a/hp/elitebook/830/g6/default.nix b/hp/elitebook/830/g6/default.nix index b61b2637..3b209b46 100644 --- a/hp/elitebook/830/g6/default.nix +++ b/hp/elitebook/830/g6/default.nix @@ -3,7 +3,6 @@ imports = [ ../../../../common/cpu/intel ../../../../common/pc/laptop - ../../../../common/pc/laptop/acpi_call.nix ../../../../common/pc/laptop/ssd ]; diff --git a/hp/elitebook/845/g7/default.nix b/hp/elitebook/845/g7/default.nix index 60afe6a7..823bf40c 100644 --- a/hp/elitebook/845/g7/default.nix +++ b/hp/elitebook/845/g7/default.nix @@ -7,7 +7,6 @@ ../../../../common/cpu/amd/pstate.nix ../../../../common/gpu/amd ../../../../common/pc/laptop - ../../../../common/pc/laptop/acpi_call.nix ../../../../common/pc/laptop/ssd ]; diff --git a/hp/elitebook/845/g8/default.nix b/hp/elitebook/845/g8/default.nix index 60afe6a7..823bf40c 100644 --- a/hp/elitebook/845/g8/default.nix +++ b/hp/elitebook/845/g8/default.nix @@ -7,7 +7,6 @@ ../../../../common/cpu/amd/pstate.nix ../../../../common/gpu/amd ../../../../common/pc/laptop - ../../../../common/pc/laptop/acpi_call.nix ../../../../common/pc/laptop/ssd ]; diff --git a/hp/elitebook/845/g9/default.nix b/hp/elitebook/845/g9/default.nix index 60afe6a7..823bf40c 100644 --- a/hp/elitebook/845/g9/default.nix +++ b/hp/elitebook/845/g9/default.nix @@ -7,7 +7,6 @@ ../../../../common/cpu/amd/pstate.nix ../../../../common/gpu/amd ../../../../common/pc/laptop - ../../../../common/pc/laptop/acpi_call.nix ../../../../common/pc/laptop/ssd ]; diff --git a/lenovo/ideapad/15alc6/default.nix b/lenovo/ideapad/15alc6/default.nix index a830c0bd..386f2720 100644 --- a/lenovo/ideapad/15alc6/default.nix +++ b/lenovo/ideapad/15alc6/default.nix @@ -5,7 +5,6 @@ ../../../common/cpu/amd ../../../common/gpu/amd ../../../common/pc/laptop - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ]; } diff --git a/lenovo/ideapad/15arh05/default.nix b/lenovo/ideapad/15arh05/default.nix index 87229c52..f021a2d6 100644 --- a/lenovo/ideapad/15arh05/default.nix +++ b/lenovo/ideapad/15arh05/default.nix @@ -6,7 +6,6 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/turing ../../../common/pc/laptop - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ]; diff --git a/lenovo/ideapad/slim-5/default.nix b/lenovo/ideapad/slim-5/default.nix index c71052df..02173bd4 100644 --- a/lenovo/ideapad/slim-5/default.nix +++ b/lenovo/ideapad/slim-5/default.nix @@ -3,7 +3,6 @@ ../../../common/cpu/amd ../../../common/gpu/amd ../../../common/pc/laptop - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ]; } diff --git a/lenovo/thinkpad/a475/default.nix b/lenovo/thinkpad/a475/default.nix index 4f044538..dc89dc12 100644 --- a/lenovo/thinkpad/a475/default.nix +++ b/lenovo/thinkpad/a475/default.nix @@ -4,7 +4,6 @@ ../../../common/gpu/amd ../../../common/cpu/amd ../../../common/cpu/amd/pstate.nix - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/ssd ../../../common/pc/laptop/hdd #../../../common/hidpi.nix #hidpi diff --git a/lenovo/thinkpad/e14/default.nix b/lenovo/thinkpad/e14/default.nix index a073b58d..c6948b35 100644 --- a/lenovo/thinkpad/e14/default.nix +++ b/lenovo/thinkpad/e14/default.nix @@ -4,7 +4,6 @@ imports = [ ../. ../../../common/pc/laptop/ssd - ../../../common/pc/laptop/acpi_call.nix ]; boot.kernelParams = [ diff --git a/lenovo/thinkpad/l13/default.nix b/lenovo/thinkpad/l13/default.nix index 449756ba..dcf9a572 100644 --- a/lenovo/thinkpad/l13/default.nix +++ b/lenovo/thinkpad/l13/default.nix @@ -2,7 +2,6 @@ { imports = [ ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ../. ]; diff --git a/lenovo/thinkpad/l14/default.nix b/lenovo/thinkpad/l14/default.nix index b3d031d4..a59ec14c 100644 --- a/lenovo/thinkpad/l14/default.nix +++ b/lenovo/thinkpad/l14/default.nix @@ -2,7 +2,6 @@ imports = [ ../. ../../../common/pc/laptop/ssd - ../../../common/pc/laptop/acpi_call.nix ]; boot.kernelParams = [ diff --git a/lenovo/thinkpad/p1/default.nix b/lenovo/thinkpad/p1/default.nix index 4c68bdb9..f26e01b5 100644 --- a/lenovo/thinkpad/p1/default.nix +++ b/lenovo/thinkpad/p1/default.nix @@ -4,7 +4,6 @@ # might need nvidia module but we don't know the PCI ids: # https://github.com/NixOS/nixos-hardware/pull/274#discussion_r650483740 #../../../common/gpu/nvidia/prime.nix - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ]; diff --git a/lenovo/thinkpad/p14s/default.nix b/lenovo/thinkpad/p14s/default.nix index 401eba92..edaeda86 100644 --- a/lenovo/thinkpad/p14s/default.nix +++ b/lenovo/thinkpad/p14s/default.nix @@ -6,7 +6,6 @@ imports = [ ../. - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ]; diff --git a/lenovo/thinkpad/p50/default.nix b/lenovo/thinkpad/p50/default.nix index 625d7cb7..62edb254 100644 --- a/lenovo/thinkpad/p50/default.nix +++ b/lenovo/thinkpad/p50/default.nix @@ -3,7 +3,6 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/maxwell ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../. ]; diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix index 43c9b8dc..38f5614d 100644 --- a/lenovo/thinkpad/p51/default.nix +++ b/lenovo/thinkpad/p51/default.nix @@ -4,7 +4,6 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/maxwell ../../../common/cpu/intel/kaby-lake - ../../../common/pc/laptop/acpi_call.nix ../. ]; diff --git a/lenovo/thinkpad/p52/default.nix b/lenovo/thinkpad/p52/default.nix index 2ca38aee..6c9ea67b 100644 --- a/lenovo/thinkpad/p52/default.nix +++ b/lenovo/thinkpad/p52/default.nix @@ -4,7 +4,6 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/pascal ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../. ]; diff --git a/lenovo/thinkpad/p53/default.nix b/lenovo/thinkpad/p53/default.nix index 84e60fab..04fcb4b7 100644 --- a/lenovo/thinkpad/p53/default.nix +++ b/lenovo/thinkpad/p53/default.nix @@ -2,7 +2,6 @@ { imports = [ ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../. ]; diff --git a/lenovo/thinkpad/t14/default.nix b/lenovo/thinkpad/t14/default.nix index b6fd228b..fb42f2b9 100644 --- a/lenovo/thinkpad/t14/default.nix +++ b/lenovo/thinkpad/t14/default.nix @@ -3,7 +3,6 @@ { imports = [ ../. - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ]; diff --git a/lenovo/thinkpad/t14s/default.nix b/lenovo/thinkpad/t14s/default.nix index 182071a7..0581b046 100644 --- a/lenovo/thinkpad/t14s/default.nix +++ b/lenovo/thinkpad/t14s/default.nix @@ -3,7 +3,6 @@ { imports = [ ../. - ../../../common/pc/laptop/acpi_call.nix ]; # For suspending to RAM to work, set Config -> Power -> Sleep State to "Linux" in EFI. diff --git a/lenovo/thinkpad/t420/default.nix b/lenovo/thinkpad/t420/default.nix index a3c7db40..3da15d0d 100644 --- a/lenovo/thinkpad/t420/default.nix +++ b/lenovo/thinkpad/t420/default.nix @@ -3,6 +3,5 @@ ../. ../tp-smapi.nix ../../../common/cpu/intel/sandy-bridge - ../../../common/pc/laptop/acpi_call.nix ]; } diff --git a/lenovo/thinkpad/t430/default.nix b/lenovo/thinkpad/t430/default.nix index 47f2d6b9..ddf56032 100644 --- a/lenovo/thinkpad/t430/default.nix +++ b/lenovo/thinkpad/t430/default.nix @@ -2,7 +2,6 @@ imports = [ ../. ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ]; boot = { diff --git a/lenovo/thinkpad/t440s/default.nix b/lenovo/thinkpad/t440s/default.nix index ccfa9e55..2f0688a7 100644 --- a/lenovo/thinkpad/t440s/default.nix +++ b/lenovo/thinkpad/t440s/default.nix @@ -2,7 +2,6 @@ imports = [ ../. ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ]; boot = { diff --git a/lenovo/thinkpad/t450s/default.nix b/lenovo/thinkpad/t450s/default.nix index 548f6881..6b0a2f05 100644 --- a/lenovo/thinkpad/t450s/default.nix +++ b/lenovo/thinkpad/t450s/default.nix @@ -1,7 +1,6 @@ { imports = [ ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../. ]; } diff --git a/lenovo/thinkpad/t460/default.nix b/lenovo/thinkpad/t460/default.nix index 548f6881..6b0a2f05 100644 --- a/lenovo/thinkpad/t460/default.nix +++ b/lenovo/thinkpad/t460/default.nix @@ -1,7 +1,6 @@ { imports = [ ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../. ]; } diff --git a/lenovo/thinkpad/t460p/default.nix b/lenovo/thinkpad/t460p/default.nix index 548f6881..6b0a2f05 100644 --- a/lenovo/thinkpad/t460p/default.nix +++ b/lenovo/thinkpad/t460p/default.nix @@ -1,7 +1,6 @@ { imports = [ ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../. ]; } diff --git a/lenovo/thinkpad/t460s/default.nix b/lenovo/thinkpad/t460s/default.nix index 548f6881..6b0a2f05 100644 --- a/lenovo/thinkpad/t460s/default.nix +++ b/lenovo/thinkpad/t460s/default.nix @@ -1,7 +1,6 @@ { imports = [ ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../. ]; } diff --git a/lenovo/thinkpad/t470s/default.nix b/lenovo/thinkpad/t470s/default.nix index 548f6881..6b0a2f05 100644 --- a/lenovo/thinkpad/t470s/default.nix +++ b/lenovo/thinkpad/t470s/default.nix @@ -1,7 +1,6 @@ { imports = [ ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../. ]; } diff --git a/lenovo/thinkpad/t480/default.nix b/lenovo/thinkpad/t480/default.nix index bfca9122..3e840d5a 100644 --- a/lenovo/thinkpad/t480/default.nix +++ b/lenovo/thinkpad/t480/default.nix @@ -3,7 +3,6 @@ { imports = [ ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/ssd ../. ]; diff --git a/lenovo/thinkpad/t480s/default.nix b/lenovo/thinkpad/t480s/default.nix index bfca9122..3e840d5a 100644 --- a/lenovo/thinkpad/t480s/default.nix +++ b/lenovo/thinkpad/t480s/default.nix @@ -3,7 +3,6 @@ { imports = [ ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/ssd ../. ]; diff --git a/lenovo/thinkpad/t490/default.nix b/lenovo/thinkpad/t490/default.nix index c20d2136..f524223d 100644 --- a/lenovo/thinkpad/t490/default.nix +++ b/lenovo/thinkpad/t490/default.nix @@ -2,7 +2,6 @@ { imports = [ ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../. ]; @@ -25,7 +24,7 @@ LABEL="pulseaudio_end" ''; - + throttled.enable = lib.mkDefault true; }; } diff --git a/lenovo/thinkpad/t495/default.nix b/lenovo/thinkpad/t495/default.nix index ef508134..9ab382f5 100644 --- a/lenovo/thinkpad/t495/default.nix +++ b/lenovo/thinkpad/t495/default.nix @@ -4,7 +4,6 @@ imports = [ ../. ../../../common/cpu/amd - ../../../common/pc/laptop/acpi_call.nix ]; # Force use of the thinkpad_acpi driver for backlight control. diff --git a/lenovo/thinkpad/t520/default.nix b/lenovo/thinkpad/t520/default.nix index a3c7db40..3da15d0d 100644 --- a/lenovo/thinkpad/t520/default.nix +++ b/lenovo/thinkpad/t520/default.nix @@ -3,6 +3,5 @@ ../. ../tp-smapi.nix ../../../common/cpu/intel/sandy-bridge - ../../../common/pc/laptop/acpi_call.nix ]; } diff --git a/lenovo/thinkpad/t550/default.nix b/lenovo/thinkpad/t550/default.nix index 548f6881..6b0a2f05 100644 --- a/lenovo/thinkpad/t550/default.nix +++ b/lenovo/thinkpad/t550/default.nix @@ -1,7 +1,6 @@ { imports = [ ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../. ]; } diff --git a/lenovo/thinkpad/t590/default.nix b/lenovo/thinkpad/t590/default.nix index 3beea72e..7dc21cd4 100644 --- a/lenovo/thinkpad/t590/default.nix +++ b/lenovo/thinkpad/t590/default.nix @@ -3,7 +3,6 @@ { imports = [ ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../. ]; diff --git a/lenovo/thinkpad/w520/default.nix b/lenovo/thinkpad/w520/default.nix index a3c7db40..3da15d0d 100644 --- a/lenovo/thinkpad/w520/default.nix +++ b/lenovo/thinkpad/w520/default.nix @@ -3,6 +3,5 @@ ../. ../tp-smapi.nix ../../../common/cpu/intel/sandy-bridge - ../../../common/pc/laptop/acpi_call.nix ]; } diff --git a/lenovo/thinkpad/x1-nano/default.nix b/lenovo/thinkpad/x1-nano/default.nix index 68cd6656..a842d437 100644 --- a/lenovo/thinkpad/x1-nano/default.nix +++ b/lenovo/thinkpad/x1-nano/default.nix @@ -3,7 +3,6 @@ imports = [ ../. ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ]; } diff --git a/lenovo/thinkpad/x1/6th-gen/default.nix b/lenovo/thinkpad/x1/6th-gen/default.nix index 83754415..264faa6c 100644 --- a/lenovo/thinkpad/x1/6th-gen/default.nix +++ b/lenovo/thinkpad/x1/6th-gen/default.nix @@ -10,7 +10,6 @@ imports = [ ../. ../../../../common/cpu/intel/kaby-lake - ../../../../common/pc/laptop/acpi_call.nix ../../../../common/pc/laptop/ssd ]; diff --git a/lenovo/thinkpad/x1/7th-gen/default.nix b/lenovo/thinkpad/x1/7th-gen/default.nix index 1547e053..6dd02b8e 100644 --- a/lenovo/thinkpad/x1/7th-gen/default.nix +++ b/lenovo/thinkpad/x1/7th-gen/default.nix @@ -2,7 +2,6 @@ { imports = [ ../. - ../../../../common/pc/laptop/acpi_call.nix ../../../../common/pc/laptop/ssd ]; diff --git a/lenovo/thinkpad/x13/common.nix b/lenovo/thinkpad/x13/common.nix index e6f79fc0..c45a7a67 100644 --- a/lenovo/thinkpad/x13/common.nix +++ b/lenovo/thinkpad/x13/common.nix @@ -1,7 +1,6 @@ { ... }: { imports = [ ../. - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ]; diff --git a/lenovo/thinkpad/x230/default.nix b/lenovo/thinkpad/x230/default.nix index 995bb449..1e579b33 100644 --- a/lenovo/thinkpad/x230/default.nix +++ b/lenovo/thinkpad/x230/default.nix @@ -5,7 +5,6 @@ ../. ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/acpi_call.nix ]; boot = { diff --git a/lenovo/thinkpad/x250/default.nix b/lenovo/thinkpad/x250/default.nix index 55ae2096..870d9a85 100644 --- a/lenovo/thinkpad/x250/default.nix +++ b/lenovo/thinkpad/x250/default.nix @@ -2,6 +2,5 @@ imports = [ ../. ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ]; } diff --git a/lenovo/thinkpad/x260/default.nix b/lenovo/thinkpad/x260/default.nix index 409986dd..ac1c5f93 100644 --- a/lenovo/thinkpad/x260/default.nix +++ b/lenovo/thinkpad/x260/default.nix @@ -2,7 +2,6 @@ imports = [ ../. ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ]; boot.kernelParams = [ diff --git a/lenovo/thinkpad/x270/default.nix b/lenovo/thinkpad/x270/default.nix index 726736f7..8e09d2a1 100644 --- a/lenovo/thinkpad/x270/default.nix +++ b/lenovo/thinkpad/x270/default.nix @@ -2,7 +2,6 @@ imports = [ ../. ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ]; diff --git a/lenovo/thinkpad/x280/default.nix b/lenovo/thinkpad/x280/default.nix index 880458e7..5b6121a0 100644 --- a/lenovo/thinkpad/x280/default.nix +++ b/lenovo/thinkpad/x280/default.nix @@ -4,7 +4,6 @@ imports = [ ../. ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd/default.nix ]; diff --git a/lenovo/thinkpad/x390/default.nix b/lenovo/thinkpad/x390/default.nix index 19a030c3..d06a4aea 100644 --- a/lenovo/thinkpad/x390/default.nix +++ b/lenovo/thinkpad/x390/default.nix @@ -4,7 +4,6 @@ imports = [ ../. ../../../common/cpu/intel - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd/default.nix ]; diff --git a/lenovo/thinkpad/z/default.nix b/lenovo/thinkpad/z/default.nix index 020a1592..5d8ba8ac 100644 --- a/lenovo/thinkpad/z/default.nix +++ b/lenovo/thinkpad/z/default.nix @@ -5,7 +5,6 @@ ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd ../../../common/pc/laptop - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ]; diff --git a/lenovo/yoga/7/14ARH7/shared.nix b/lenovo/yoga/7/14ARH7/shared.nix index 3bef4473..98ea301d 100644 --- a/lenovo/yoga/7/14ARH7/shared.nix +++ b/lenovo/yoga/7/14ARH7/shared.nix @@ -7,7 +7,6 @@ ../../../../common/cpu/amd/pstate.nix ../../../../common/gpu/amd ../../../../common/pc/laptop - ../../../../common/pc/laptop/acpi_call.nix ../../../../common/pc/ssd ]; From c6cddc7bb2bb8339bf9c19ab40ec9e2b48299e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 2 Dec 2024 12:36:43 +0100 Subject: [PATCH 1150/1476] fix eval --- focus/m2/gen1/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/focus/m2/gen1/default.nix b/focus/m2/gen1/default.nix index b6a2c789..f9242900 100644 --- a/focus/m2/gen1/default.nix +++ b/focus/m2/gen1/default.nix @@ -6,7 +6,6 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/turing ../../../common/pc/laptop - ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/laptop/ssd ]; From bad8e79410eed70b35d6fde6eaf060a81328b774 Mon Sep 17 00:00:00 2001 From: Konstanty Kowalewski Date: Mon, 2 Dec 2024 15:48:24 +0000 Subject: [PATCH 1151/1476] enable acpi.ec_no_wakeup in Thinkpad T14 AMD Gen 5 --- lenovo/thinkpad/t14/amd/gen5/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lenovo/thinkpad/t14/amd/gen5/default.nix b/lenovo/thinkpad/t14/amd/gen5/default.nix index e61a3a0d..917da63f 100644 --- a/lenovo/thinkpad/t14/amd/gen5/default.nix +++ b/lenovo/thinkpad/t14/amd/gen5/default.nix @@ -6,6 +6,10 @@ ../../../../../common/cpu/amd/pstate.nix ]; + # Embedded controller wake-ups drain battery in s2idle on this device + # See https://lore.kernel.org/all/ZnFYpWHJ5Ml724Nv@ohnotp/ + boot.kernelParams = [ "acpi.ec_no_wakeup=1" ]; + # For the Qualcomm NFA765 [17cb:1103] wireless network controller # See https://bugzilla.redhat.com/show_bug.cgi?id=2047878 boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; From 9988a79f27589fe1c99513df37a5aab5df95e6c8 Mon Sep 17 00:00:00 2001 From: Konstanty Kowalewski Date: Mon, 2 Dec 2024 15:53:43 +0000 Subject: [PATCH 1152/1476] add Thinkpad T14 AMD Gen 5 to readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a0b04655..c9af3e14 100644 --- a/README.md +++ b/README.md @@ -239,6 +239,7 @@ See code for all available configurations. | [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | | [Lenovo ThinkPad T14 AMD Gen 3](lenovo/thinkpad/t14/amd/gen3) | `` | | [Lenovo ThinkPad T14 AMD Gen 4](lenovo/thinkpad/t14/amd/gen4) | `` | +| [Lenovo ThinkPad T14 AMD Gen 5](lenovo/thinkpad/t14/amd/gen5) | `` | | [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | | [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | | [Lenovo ThinkPad T14s AMD Gen 4](lenovo/thinkpad/t14s/amd/gen4) | `` | From 2297628136baca35c0a49df29f2407034708b5eb Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Fri, 6 Dec 2024 12:38:20 +0800 Subject: [PATCH 1153/1476] apple/t2: remove tiny-dfr and related options --- apple/t2/default.nix | 42 +- apple/t2/pkgs/tiny-dfr/Cargo.lock | 1933 ---------------------------- apple/t2/pkgs/tiny-dfr/default.nix | 62 - 3 files changed, 6 insertions(+), 2031 deletions(-) delete mode 100644 apple/t2/pkgs/tiny-dfr/Cargo.lock delete mode 100644 apple/t2/pkgs/tiny-dfr/default.nix diff --git a/apple/t2/default.nix b/apple/t2/default.nix index d9b20955..c1f212cf 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -24,8 +24,6 @@ let pipewirePackage = overrideAudioFiles pkgs.pipewire "spa/plugins/"; - tiny-dfrPackage = pkgs.callPackage ./pkgs/tiny-dfr { }; - apple-set-os-loader-installer = pkgs.stdenv.mkDerivation { name = "apple-set-os-loader-installer-1.0"; src = pkgs.fetchFromGitHub { @@ -49,18 +47,18 @@ let in { + imports = [ + (lib.mkRemovedOptionModule ["hardware" "apple-t2" "enableTinyDfr"] '' + The hardware.apple-t2.enableTinyDfr option was deprecated and removed since upstream Nixpkgs now has an identical module. + Please migrate to hardware.apple.touchBar. + '') + ]; options.hardware.apple-t2 = { enableAppleSetOsLoader = lib.mkOption { default = false; type = lib.types.bool; description = "Whether to enable the appleSetOsLoader activation script."; }; - - enableTinyDfr = lib.mkOption { - default = true; - type = lib.types.bool; - description = "Whether to enable the tiny-dfr touchbar service."; - }; }; config = lib.mkMerge [ @@ -108,33 +106,5 @@ in options apple-gmux force_igd=y ''; }) - (lib.mkIf t2Cfg.enableTinyDfr { - warnings = [ - '' - hardware.apple-t2.enableTinyDfr is deprecated since the module has been upstreamed as hardware.apple.touchBar. - This option will be removed from the apple/t2 profile when NixOS 24.11 is released. - '' - ]; - assertions = lib.optionals (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.11") [{ - assertion = !config.hardware.apple.touchBar.enable; - message = "hardware.apple-t2.enableTinyDfr conflicts with hardware.apple.touchBar.enable. Please disable one of them."; - }]; - services.udev.packages = [ tiny-dfrPackage ]; - - systemd.services.tiny-dfr = { - enable = true; - description = "Tiny Apple silicon touch bar daemon"; - after = [ "systemd-user-sessions.service" "getty@tty1.service" "plymouth-quit.service" "systemd-logind.service" ]; - bindsTo = [ "dev-tiny_dfr_display.device" "dev-tiny_dfr_backlight.device" ]; - startLimitIntervalSec = 30; - startLimitBurst = 2; - script = "${tiny-dfrPackage}/bin/tiny-dfr"; - restartTriggers = [ tiny-dfrPackage ]; - }; - - environment.etc."tiny-dfr/config.toml" = { - source = "${tiny-dfrPackage}/share/tiny-dfr/config.toml"; - }; - }) ]; } diff --git a/apple/t2/pkgs/tiny-dfr/Cargo.lock b/apple/t2/pkgs/tiny-dfr/Cargo.lock deleted file mode 100644 index 44393d85..00000000 --- a/apple/t2/pkgs/tiny-dfr/Cargo.lock +++ /dev/null @@ -1,1933 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "aho-corasick" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" -dependencies = [ - "memchr", -] - -[[package]] -name = "anyhow" -version = "1.0.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" - -[[package]] -name = "approx" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" -dependencies = [ - "num-traits", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" - -[[package]] -name = "block" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" - -[[package]] -name = "bytemuck" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" -dependencies = [ - "bytemuck_derive", -] - -[[package]] -name = "bytemuck_derive" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.32", -] - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "cairo-rs" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d859b656775a6b1dd078d3e5924884e6ea88aa649a7fdde03d5b2ec56ffcc10b" -dependencies = [ - "bitflags 2.4.0", - "cairo-sys-rs", - "freetype-rs", - "glib", - "libc", - "once_cell", - "thiserror", -] - -[[package]] -name = "cairo-sys-rs" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd4d115132e01c0165e3bf5f56aedee8980b0b96ede4eb000b693c05a8adb8ff" -dependencies = [ - "glib-sys", - "libc", - "system-deps", -] - -[[package]] -name = "cast" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - -[[package]] -name = "cfg-expr" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" -dependencies = [ - "smallvec", - "target-lexicon", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" -dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "memoffset 0.9.0", - "scopeguard", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "cssparser" -version = "0.29.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93d03419cb5950ccfd3daf3ff1c7a36ace64609a1a8746d493df1ca0afde0fa" -dependencies = [ - "cssparser-macros", - "dtoa-short", - "itoa", - "matches", - "phf 0.10.1", - "proc-macro2", - "quote", - "smallvec", - "syn 1.0.109", -] - -[[package]] -name = "cssparser-macros" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" -dependencies = [ - "quote", - "syn 2.0.32", -] - -[[package]] -name = "data-url" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b319d1b62ffbd002e057f36bebd1f42b9f97927c9577461d855f3513c4289f" - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "syn 1.0.109", -] - -[[package]] -name = "drm" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb1b703ffbc7ebd216eba7900008049a56ace55580ecb2ee7fa801e8d8be87" -dependencies = [ - "bitflags 2.4.0", - "bytemuck", - "drm-ffi", - "drm-fourcc", - "nix 0.27.1", -] - -[[package]] -name = "drm-ffi" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba7d1c19c4b6270e89d59fb27dc6d02a317c658a8a54e54781e1db9b5947595d" -dependencies = [ - "drm-sys", - "nix 0.27.1", -] - -[[package]] -name = "drm-fourcc" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aafbcdb8afc29c1a7ee5fbe53b5d62f4565b35a042a662ca9fecd0b54dae6f4" - -[[package]] -name = "drm-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a4f1c0468062a56cd5705f1e3b5409eb286d5596a2028ec8e947595d7e715ae" - -[[package]] -name = "dtoa" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" - -[[package]] -name = "dtoa-short" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbaceec3c6e4211c79e7b1800fb9680527106beb2f9c51904a3210c03a448c74" -dependencies = [ - "dtoa", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "float-cmp" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" -dependencies = [ - "num-traits", -] - -[[package]] -name = "form_urlencoded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "freetype-rs" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59c337e64822dd56a3a83ed75a662a470736bdb3a9fabfb588dff276b94a4e0" -dependencies = [ - "bitflags 1.3.2", - "freetype-sys", - "libc", -] - -[[package]] -name = "freetype-sys" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643148ca6cbad6bec384b52fbe1968547d578c4efe83109e035c43a71734ff88" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "futf" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" -dependencies = [ - "mac", - "new_debug_unreachable", -] - -[[package]] -name = "futures-channel" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" - -[[package]] -name = "futures-executor" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" - -[[package]] -name = "futures-macro" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.32", -] - -[[package]] -name = "futures-task" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" - -[[package]] -name = "futures-util" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" -dependencies = [ - "futures-core", - "futures-macro", - "futures-task", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "gdk-pixbuf" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbc9c2ed73a81d556b65d08879ba4ee58808a6b1927ce915262185d6d547c6f3" -dependencies = [ - "gdk-pixbuf-sys", - "gio", - "glib", - "libc", - "once_cell", -] - -[[package]] -name = "gdk-pixbuf-sys" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" -dependencies = [ - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] - -[[package]] -name = "gio" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7884cba6b1c5db1607d970cadf44b14a43913d42bc68766eea6a5e2fe0891524" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "gio-sys", - "glib", - "libc", - "once_cell", - "pin-project-lite", - "smallvec", - "thiserror", -] - -[[package]] -name = "gio-sys" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", - "winapi", -] - -[[package]] -name = "glib" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "331156127e8166dd815cf8d2db3a5beb492610c716c03ee6db4f2d07092af0a7" -dependencies = [ - "bitflags 2.4.0", - "futures-channel", - "futures-core", - "futures-executor", - "futures-task", - "futures-util", - "gio-sys", - "glib-macros", - "glib-sys", - "gobject-sys", - "libc", - "memchr", - "once_cell", - "smallvec", - "thiserror", -] - -[[package]] -name = "glib-macros" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "179643c50bf28d20d2f6eacd2531a88f2f5d9747dd0b86b8af1e8bb5dd0de3c0" -dependencies = [ - "heck", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.32", -] - -[[package]] -name = "glib-sys" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" -dependencies = [ - "libc", - "system-deps", -] - -[[package]] -name = "gobject-sys" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" -dependencies = [ - "glib-sys", - "libc", - "system-deps", -] - -[[package]] -name = "hashbrown" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" - -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "input" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e74cd82cedcd66db78742a8337bdc48f188c4d2c12742cbc5cd85113f0b059" -dependencies = [ - "bitflags 1.3.2", - "input-sys", - "io-lifetimes", - "libc", - "log", - "udev", -] - -[[package]] -name = "input-linux" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f403224ea808abe6182696e3a36d9875c0e942ba7c99239f9ef545b96e35606" -dependencies = [ - "input-linux-sys", - "nix 0.26.4", - "serde", -] - -[[package]] -name = "input-linux-sys" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a687a25a4973027df9153753a5589f97fe1e958f694a34eea5606ae65299ab8" -dependencies = [ - "libc", - "nix 0.26.4", -] - -[[package]] -name = "input-sys" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f6c2a17e8aba7217660e32863af87b0febad811d4b8620ef76b386603fddc2" -dependencies = [ - "libc", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys", -] - -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" - -[[package]] -name = "language-tags" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.147" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" - -[[package]] -name = "librsvg" -version = "2.56.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7e30ebdab4ce0c632d361b54989020c2e15060f77728ca99b8e3daa4cc94f3c" -dependencies = [ - "byteorder", - "cairo-rs", - "cast", - "cssparser", - "data-url", - "encoding_rs", - "float-cmp", - "gdk-pixbuf", - "gio", - "glib", - "itertools", - "language-tags", - "libc", - "locale_config", - "markup5ever", - "nalgebra", - "num-traits", - "once_cell", - "pango", - "pangocairo", - "rayon", - "rctree", - "regex", - "rgb", - "selectors", - "string_cache", - "system-deps", - "tinyvec", - "url", - "xml5ever", -] - -[[package]] -name = "libudev-sys" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324" -dependencies = [ - "libc", - "pkg-config", -] - -[[package]] -name = "locale_config" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d2c35b16f4483f6c26f0e4e9550717a2f6575bcd6f12a53ff0c490a94a6934" -dependencies = [ - "lazy_static", - "objc", - "objc-foundation", - "regex", - "winapi", -] - -[[package]] -name = "lock_api" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "mac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" - -[[package]] -name = "malloc_buf" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -dependencies = [ - "libc", -] - -[[package]] -name = "markup5ever" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016" -dependencies = [ - "log", - "phf 0.10.1", - "phf_codegen 0.10.0", - "string_cache", - "string_cache_codegen", - "tendril", -] - -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - -[[package]] -name = "matrixmultiply" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" -dependencies = [ - "autocfg", - "rawpointer", -] - -[[package]] -name = "memchr" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" - -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "nalgebra" -version = "0.32.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" -dependencies = [ - "approx", - "matrixmultiply", - "nalgebra-macros", - "num-complex", - "num-rational", - "num-traits", - "simba", - "typenum", -] - -[[package]] -name = "nalgebra-macros" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" - -[[package]] -name = "nix" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.7.1", - "pin-utils", -] - -[[package]] -name = "nix" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" -dependencies = [ - "bitflags 2.4.0", - "cfg-if", - "libc", -] - -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - -[[package]] -name = "num-complex" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "objc" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" -dependencies = [ - "malloc_buf", -] - -[[package]] -name = "objc-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" -dependencies = [ - "block", - "objc", - "objc_id", -] - -[[package]] -name = "objc_id" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" -dependencies = [ - "objc", -] - -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "pango" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06a9e54b831d033206160096b825f2070cf5fda7e35167b1c01e9e774f9202d1" -dependencies = [ - "gio", - "glib", - "libc", - "once_cell", - "pango-sys", -] - -[[package]] -name = "pango-sys" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] -name = "pangocairo" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57036589a9cfcacf83f9e606d15813fc6bf03f0e9e69aa2b5e3bb85af86b38a5" -dependencies = [ - "cairo-rs", - "glib", - "libc", - "pango", - "pangocairo-sys", -] - -[[package]] -name = "pangocairo-sys" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc3c8ff676a37e7a72ec1d5fc029f91c407278083d2752784ff9f5188c108833" -dependencies = [ - "cairo-sys-rs", - "glib-sys", - "libc", - "pango-sys", - "system-deps", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "percent-encoding" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" - -[[package]] -name = "phf" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" -dependencies = [ - "phf_shared 0.8.0", -] - -[[package]] -name = "phf" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" -dependencies = [ - "phf_macros", - "phf_shared 0.10.0", - "proc-macro-hack", -] - -[[package]] -name = "phf_codegen" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" -dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", -] - -[[package]] -name = "phf_codegen" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd" -dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", -] - -[[package]] -name = "phf_generator" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" -dependencies = [ - "phf_shared 0.8.0", - "rand 0.7.3", -] - -[[package]] -name = "phf_generator" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" -dependencies = [ - "phf_shared 0.10.0", - "rand 0.8.5", -] - -[[package]] -name = "phf_macros" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" -dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", - "proc-macro-hack", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "phf_shared" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" -dependencies = [ - "siphasher", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - -[[package]] -name = "privdrop" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bc12de3935536ed9b69488faea4450a298dac44179b54f71806e63f55034bf9" -dependencies = [ - "libc", - "nix 0.26.4", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - -[[package]] -name = "proc-macro2" -version = "1.0.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", - "rand_pcg", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.10", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rawpointer" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" - -[[package]] -name = "rayon" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "num_cpus", -] - -[[package]] -name = "rctree" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f" - -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "regex" -version = "1.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - -[[package]] -name = "rgb" -version = "0.8.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20ec2d3e3fc7a92ced357df9cebd5a10b6fb2aa1ee797bf7e9ce2f17dffc8f59" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "safe_arch" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "selectors" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c37578180969d00692904465fb7f6b3d50b9a2b952b87c23d0e2e5cb5013416" -dependencies = [ - "bitflags 1.3.2", - "cssparser", - "derive_more", - "fxhash", - "log", - "phf 0.8.0", - "phf_codegen 0.8.0", - "precomputed-hash", - "servo_arc", - "smallvec", -] - -[[package]] -name = "semver" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" - -[[package]] -name = "serde" -version = "1.0.188" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.188" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.32", -] - -[[package]] -name = "serde_spanned" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" -dependencies = [ - "serde", -] - -[[package]] -name = "servo_arc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52aa42f8fdf0fed91e5ce7f23d8138441002fa31dca008acf47e6fd4721f741" -dependencies = [ - "nodrop", - "stable_deref_trait", -] - -[[package]] -name = "simba" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" -dependencies = [ - "approx", - "num-complex", - "num-traits", - "paste", - "wide", -] - -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "string_cache" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot", - "phf_shared 0.10.0", - "precomputed-hash", - "serde", -] - -[[package]] -name = "string_cache_codegen" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" -dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", - "proc-macro2", - "quote", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "system-deps" -version = "6.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30c2de8a4d8f4b823d634affc9cd2a74ec98c53a756f317e529a48046cbf71f3" -dependencies = [ - "cfg-expr", - "heck", - "pkg-config", - "toml 0.7.8", - "version-compare", -] - -[[package]] -name = "target-lexicon" -version = "0.12.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" - -[[package]] -name = "tendril" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" -dependencies = [ - "futf", - "mac", - "utf-8", -] - -[[package]] -name = "thiserror" -version = "1.0.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.32", -] - -[[package]] -name = "tiny-dfr" -version = "0.2.0" -dependencies = [ - "anyhow", - "cairo-rs", - "drm", - "freetype-rs", - "input", - "input-linux", - "input-linux-sys", - "libc", - "librsvg", - "nix 0.27.1", - "pkg-config", - "privdrop", - "rand 0.8.5", - "serde", - "toml 0.8.8", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "toml" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.19.15", -] - -[[package]] -name = "toml" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.21.0", -] - -[[package]] -name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "typenum" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" - -[[package]] -name = "udev" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebdbbd670373442a12fe9ef7aeb53aec4147a5a27a00bbc3ab639f08f48191a" -dependencies = [ - "libc", - "libudev-sys", - "pkg-config", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - -[[package]] -name = "unicode-ident" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "url" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "version-compare" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wide" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa469ffa65ef7e0ba0f164183697b89b854253fd31aeb92358b7b6155177d62f" -dependencies = [ - "bytemuck", - "safe_arch", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "winnow" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" -dependencies = [ - "memchr", -] - -[[package]] -name = "xml5ever" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4034e1d05af98b51ad7214527730626f019682d797ba38b51689212118d8e650" -dependencies = [ - "log", - "mac", - "markup5ever", -] diff --git a/apple/t2/pkgs/tiny-dfr/default.nix b/apple/t2/pkgs/tiny-dfr/default.nix deleted file mode 100644 index 7ae2ce7e..00000000 --- a/apple/t2/pkgs/tiny-dfr/default.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ - lib, - rustPlatform, - fetchFromGitHub, - - pkg-config, - cairo, - gdk-pixbuf, - glib, - libinput, - libxml2, - pango, - udev, -}: -let - src = fetchFromGitHub { - owner = "kekrby"; - repo = "tiny-dfr"; - rev = "8a5d413cb1dbe2a25b77a9e7f3cb5b9c88ef3ffb"; - hash = "sha256-l4D7aePz/CYpkRorrvsgIYrvSzoZl59OGcFGJqqJftk="; - }; -in rustPlatform.buildRustPackage { - pname = "tiny-dfr"; - version = src.rev; - - inherit src; - - cargoLock.lockFile = ./Cargo.lock; - - nativeBuildInputs = [ - pkg-config - ]; - - buildInputs = [ - udev - glib - pango - cairo - gdk-pixbuf - libxml2 - libinput - ]; - - postPatch = '' - substituteInPlace src/main.rs \ - --replace-fail "/usr/share/tiny-dfr/" "$out/share/tiny-dfr/" - ''; - - postInstall = '' - mkdir -p $out/etc $out/share - - cp -r etc/udev $out/etc/ - cp -r share/tiny-dfr $out/share/ - ''; - - meta = with lib; { - description = "The most basic dynamic function row daemon possible"; - homepage = "https://github.com/kekrby/tiny-dfr"; - license = with licenses; [ asl20 bsd3 cc0 isc lgpl21Plus mit mpl20 unicode-dfs-2016 asl20 asl20-llvm mit unlicense ]; - maintainers = []; - }; -} From e563803af3526852b6b1d77107a81908c66a9fcf Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Sat, 23 Nov 2024 18:17:34 +0800 Subject: [PATCH 1154/1476] apple/t2: bump kernel from 6.11.7 to 6.12.2 --- apple/t2/pkgs/linux-t2.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index 54d6e237..38154e2e 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -2,19 +2,19 @@ , ... } @ args: let - version = "6.11.7"; - majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); + version = "6.12.2"; + majorVersion = lib.elemAt (lib.take 1 (lib.splitVersion version)) 0; patchRepo = fetchFromGitHub { owner = "t2linux"; repo = "linux-t2-patches"; - rev = "ec4545c603cf2ef315818eccce62d06ee18e5c60"; - hash = "sha256-Nm7WiLjotwk5NDrpKTgcKtyQTOUG7A88ZgtzD460qY0="; + rev = "539eea1f9127f1623794ee8c7ccc37e8b00f60a3"; + hash = "sha256-pFeNOLTqnEupyEZDk+fX/5GFpobvN+L7Wv2K6V5Xx9g="; }; kernel = fetchzip { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-wHWd8xfEFOTy0FkFBtn30+6816XC4uhgn0G9b40n9Co="; + hash = "sha256-2xfXs++pJiNgFCdpfYsNy3HE6rCyztbOwAlMObLCgAI="; }; in buildLinux (args // { @@ -22,7 +22,7 @@ buildLinux (args // { pname = "linux-t2"; # Snippet from nixpkgs - modDirVersion = with lib; "${concatStringsSep "." (take 3 (splitVersion "${version}.0"))}"; + modDirVersion = "${lib.concatStringsSep "." (lib.take 3 (lib.splitVersion "${version}.0"))}"; src = runCommand "patched-source" {} '' cp -r ${kernel} $out From cf737e2eba82b603f54f71b10cb8fd09d22ce3f5 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Tue, 10 Dec 2024 08:51:20 +0800 Subject: [PATCH 1155/1476] apple/t2: kernel 6.12.2 -> 6.12.4 --- apple/t2/pkgs/linux-t2.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index 38154e2e..39f49505 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -2,7 +2,7 @@ , ... } @ args: let - version = "6.12.2"; + version = "6.12.4"; majorVersion = lib.elemAt (lib.take 1 (lib.splitVersion version)) 0; patchRepo = fetchFromGitHub { @@ -14,7 +14,7 @@ let kernel = fetchzip { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-2xfXs++pJiNgFCdpfYsNy3HE6rCyztbOwAlMObLCgAI="; + hash = "sha256-SiQzaqraT/5s6Mown8/DeOWU7VR3IG0ojvkqThO09+0="; }; in buildLinux (args // { From b12e314726a4226298fe82776b4baeaa7bcf3dcd Mon Sep 17 00:00:00 2001 From: matthiasdotsh Date: Sat, 14 Dec 2024 21:22:32 +0100 Subject: [PATCH 1156/1476] microsoft/surface: Update to kernel 6.12.4 --- microsoft/surface/common/default.nix | 2 +- .../common/kernel/linux-surface/default.nix | 4 +-- .../common/kernel/linux-surface/patches.nix | 36 +++++++++---------- microsoft/surface/common/repos.nix | 4 +-- 4 files changed, 21 insertions(+), 25 deletions(-) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 5656d978..d49f4e31 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -8,7 +8,7 @@ in { ./kernel ]; - microsoft-surface.kernelVersion = mkDefault "6.11"; + microsoft-surface.kernelVersion = mkDefault "6.12"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; diff --git a/microsoft/surface/common/kernel/linux-surface/default.nix b/microsoft/surface/common/kernel/linux-surface/default.nix index fa317516..eccc29a2 100644 --- a/microsoft/surface/common/kernel/linux-surface/default.nix +++ b/microsoft/surface/common/kernel/linux-surface/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.11.4"; + version = "6.12.4"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "0mcg1rrw9b0lwj88jkaw6ic2mks8xh8i92v90sbr2x35ljhb0m5x"; + sha256 = "sha256-bzX4IUM9hCG+cWeZB0fHxKDEUZWPuWiDRGMBrxPXEVI="; ignoreConfigErrors=true; }; diff --git a/microsoft/surface/common/kernel/linux-surface/patches.nix b/microsoft/surface/common/kernel/linux-surface/patches.nix index 92916c9d..93e3c2ef 100644 --- a/microsoft/surface/common/kernel/linux-surface/patches.nix +++ b/microsoft/surface/common/kernel/linux-surface/patches.nix @@ -119,39 +119,35 @@ CONFIG_SURFACE_BOOK1_DGPU_SWITCH= module; patch = patchSrc + "/0006-ithc.patch"; } { - name = "ms-surface/0007-surface-sam"; - patch = patchSrc + "/0007-surface-sam.patch"; + name = "ms-surface/0007-surface-sam-over-hid"; + patch = patchSrc + "/0007-surface-sam-over-hid.patch"; } { - name = "ms-surface/0008-surface-sam-over-hid"; - patch = patchSrc + "/0008-surface-sam-over-hid.patch"; + name = "ms-surface/0008-surface-button"; + patch = patchSrc + "/0008-surface-button.patch"; } { - name = "ms-surface/0009-surface-button"; - patch = patchSrc + "/0009-surface-button.patch"; + name = "ms-surface/0009-surface-typecover"; + patch = patchSrc + "/0009-surface-typecover.patch"; } { - name = "ms-surface/0010-surface-typecover"; - patch = patchSrc + "/0010-surface-typecover.patch"; + name = "ms-surface/0010-surface-shutdown"; + patch = patchSrc + "/0010-surface-shutdown.patch"; } { - name = "ms-surface/0011-surface-shutdown"; - patch = patchSrc + "/0011-surface-shutdown.patch"; + name = "ms-surface/0011-surface-gpe"; + patch = patchSrc + "/0011-surface-gpe.patch"; } { - name = "ms-surface/0012-surface-gpe"; - patch = patchSrc + "/0012-surface-gpe.patch"; + name = "ms-surface/0012-cameras"; + patch = patchSrc + "/0012-cameras.patch"; } { - name = "ms-surface/0013-cameras"; - patch = patchSrc + "/0013-cameras.patch"; + name = "ms-surface/0013-amd-gpio"; + patch = patchSrc + "/0013-amd-gpio.patch"; } { - name = "ms-surface/0014-amd-gpio"; - patch = patchSrc + "/0014-amd-gpio.patch"; - } - { - name = "ms-surface/0015-rtc"; - patch = patchSrc + "/0015-rtc.patch"; + name = "ms-surface/0014-rtc"; + patch = patchSrc + "/0014-rtc.patch"; } ] diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 8ca07014..872fcad9 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "arch-6.11.4-1"; - hash = "sha256-5rKfAIkGoD5Y4nMobr7wGvzZqN2yFElXqHdcQS2VL14="; + rev = "arch-6.12.4-1"; + hash = "sha256-RAcM28eheOJeHU8liC2lh0zpt/SqwOsHlpWuLmncXVc="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From 6828304671c6a1c4d104585887b6a7ad22208a58 Mon Sep 17 00:00:00 2001 From: Matei Dibu Date: Wed, 18 Dec 2024 12:37:13 +0200 Subject: [PATCH 1157/1476] dell-precision-5560: remove redundant i915.modeset=1 --- dell/precision/5560/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dell/precision/5560/default.nix b/dell/precision/5560/default.nix index f2e3d90a..ca41af88 100644 --- a/dell/precision/5560/default.nix +++ b/dell/precision/5560/default.nix @@ -9,10 +9,6 @@ hardware.enableRedistributableFirmware = lib.mkDefault true; - boot = { - kernelParams = [ "i915.modeset=1" ]; - }; - hardware.nvidia.prime = { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; From 73866b432618e6c542f45a9057eef6d5ac9a69cb Mon Sep 17 00:00:00 2001 From: Matei Dibu Date: Wed, 18 Dec 2024 12:37:41 +0200 Subject: [PATCH 1158/1476] dell-precision-5560: enable fwupd --- dell/precision/5560/README.md | 3 --- dell/precision/5560/default.nix | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dell/precision/5560/README.md b/dell/precision/5560/README.md index 8518cbd6..16c244a2 100644 --- a/dell/precision/5560/README.md +++ b/dell/precision/5560/README.md @@ -15,6 +15,3 @@ boot.extraModprobeConfig = '' And you should decide what you want to do with the NVIDIA GPU, either sync or offload. Fwupd works, you can update the BIOS and DBX. -```nix -services.fwupd.enable = true; -``` diff --git a/dell/precision/5560/default.nix b/dell/precision/5560/default.nix index ca41af88..a17ef775 100644 --- a/dell/precision/5560/default.nix +++ b/dell/precision/5560/default.nix @@ -9,6 +9,8 @@ hardware.enableRedistributableFirmware = lib.mkDefault true; + services.fwupd.enable = true; + hardware.nvidia.prime = { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; From 1db3c42d93e460f71f6cfd5ae20e669bc31b9a80 Mon Sep 17 00:00:00 2001 From: matthiasdotsh Date: Thu, 19 Dec 2024 22:07:18 +0100 Subject: [PATCH 1159/1476] surface: linux 6.12.4 -> 6.12.6 --- microsoft/surface/common/kernel/linux-surface/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-surface/default.nix b/microsoft/surface/common/kernel/linux-surface/default.nix index eccc29a2..f3cb0651 100644 --- a/microsoft/surface/common/kernel/linux-surface/default.nix +++ b/microsoft/surface/common/kernel/linux-surface/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.12.4"; + version = "6.12.6"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "sha256-bzX4IUM9hCG+cWeZB0fHxKDEUZWPuWiDRGMBrxPXEVI="; + sha256 = "sha256-1FCrIV3k4fi7heD0IWdg+jP9AktFJrFE9M4NkBKynJ4="; ignoreConfigErrors=true; }; From 5e6a54633451002608cec7cc999c5ccdecda2c33 Mon Sep 17 00:00:00 2001 From: javigomezo Date: Sat, 21 Dec 2024 12:23:01 +0100 Subject: [PATCH 1160/1476] raspberry-pi-4: add tv-hat overlay --- raspberry-pi/4/default.nix | 1 + raspberry-pi/4/tv-hat.nix | 109 +++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 raspberry-pi/4/tv-hat.nix diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index a2739d79..ca2c7a89 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -17,6 +17,7 @@ ./pwm0.nix ./tc358743.nix ./touch-ft5406.nix + ./tv-hat.nix ./xhci.nix ]; diff --git a/raspberry-pi/4/tv-hat.nix b/raspberry-pi/4/tv-hat.nix new file mode 100644 index 00000000..cf07453b --- /dev/null +++ b/raspberry-pi/4/tv-hat.nix @@ -0,0 +1,109 @@ +{ config, lib, ... }: + +let + cfg = config.hardware.raspberry-pi."4".tv-hat; +in { + options.hardware = { + raspberry-pi."4".tv-hat = { + enable = lib.mkEnableOption '' + support for the Raspberry Pi TV Hat. + ''; + }; + }; + config = lib.mkIf cfg.enable { + hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true; + hardware.deviceTree.overlays = [ + # https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/spi0-0cs-overlay.dts + # https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-tv-overlay.dts + { + name = "spi0-0cs.dtbo"; + dtsText = " + /dts-v1/; + /plugin/; + + /{ + compatible = \"brcm,bcm2711\"; + fragment@0 { + target-path = \"/soc/gpio@7e200000\"; + __overlay__ { + spi0_pins: spi0_pins { + brcm,pins = <0x09 0x0a 0x0b>; + brcm,function = <0x04>; + phandle = <0x0d>; + }; + + spi0_cs_pins: spi0_cs_pins { + brcm,pins = <0x08 0x07>; + brcm,function = <0x01>; + phandle = <0x0e>; + }; + }; + }; + fragment@1 { + target-path = \"/soc/spi@7e204000\"; + __overlay__ { + pinctrl-names = \"default\"; + pinctrl-0 = <&spi0_pins &spi0_cs_pins>; + cs-gpios = <&gpio 8 1>, <&gpio 7 1>; + status = \"okay\"; + + spidev0: spidev@0{ + compatible = \"lwn,bk4\"; + reg = <0>; /* CE0 */ + #address-cells = <1>; + #size-cells = <0>; + spi-max-frequency = <125000000>; + }; + + spidev1: spidev@1{ + compatible = \"lwn,bk4\"; + reg = <1>; /* CE1 */ + #address-cells = <1>; + #size-cells = <0>; + spi-max-frequency = <125000000>; + }; + }; + }; + };"; + } + { + name = "rpi-tv-overlay"; + dtsText = '' + // rpi-tv HAT + + /dts-v1/; + /plugin/; + + / { + compatible = "brcm,bcm2711"; + + fragment@0 { + target = <&spidev0>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@1 { + target = <&spi0>; + __overlay__ { + /* needed to avoid dtc warning */ + #address-cells = <1>; + #size-cells = <0>; + + status = "okay"; + + cxd2880@0 { + compatible = "sony,cxd2880"; + reg = <0>; /* CE0 */ + spi-max-frequency = <50000000>; + status = "okay"; + }; + }; + }; + }; + ''; + } + ]; + }; +} From f6abeb027b4b874ad5a6fa59c2cfdee71e373a56 Mon Sep 17 00:00:00 2001 From: javigomezo Date: Sat, 21 Dec 2024 12:51:24 +0100 Subject: [PATCH 1161/1476] raspberry-pi-4: fix devicetree filter --- raspberry-pi/4/tv-hat.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/raspberry-pi/4/tv-hat.nix b/raspberry-pi/4/tv-hat.nix index cf07453b..8c480f43 100644 --- a/raspberry-pi/4/tv-hat.nix +++ b/raspberry-pi/4/tv-hat.nix @@ -12,6 +12,7 @@ in { }; config = lib.mkIf cfg.enable { hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true; + hardware.deviceTree.filter = "*-rpi-4-*.dtb"; hardware.deviceTree.overlays = [ # https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/spi0-0cs-overlay.dts # https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-tv-overlay.dts From 7c674c6734f61157e321db595dbfcd8523e04e19 Mon Sep 17 00:00:00 2001 From: matthiasdotsh Date: Fri, 27 Dec 2024 16:49:30 +0100 Subject: [PATCH 1162/1476] surface: linux 6.12.6 -> 6.12.7 --- microsoft/surface/common/kernel/linux-surface/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-surface/default.nix b/microsoft/surface/common/kernel/linux-surface/default.nix index f3cb0651..20f0ea5e 100644 --- a/microsoft/surface/common/kernel/linux-surface/default.nix +++ b/microsoft/surface/common/kernel/linux-surface/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.12.6"; + version = "6.12.7"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "sha256-1FCrIV3k4fi7heD0IWdg+jP9AktFJrFE9M4NkBKynJ4="; + sha256 = "sha256-94X7ZIoOC2apQ7syKKS27WLJC5hc0ev2naXTjlidoM8="; ignoreConfigErrors=true; }; From a2861aa6964fe7f76f7ec16ecbef2085bcf220ec Mon Sep 17 00:00:00 2001 From: Anton Tetov Date: Mon, 6 Jan 2025 20:29:40 +0000 Subject: [PATCH 1163/1476] fix: remove intel from services.xserver.videoDrivers due to deprecation in 24.11 --- dell/latitude/3480/default.nix | 2 -- dell/latitude/7430/default.nix | 2 -- gpd/pocket-3/default.nix | 1 - 3 files changed, 5 deletions(-) diff --git a/dell/latitude/3480/default.nix b/dell/latitude/3480/default.nix index 7f6116a6..0b16e0aa 100644 --- a/dell/latitude/3480/default.nix +++ b/dell/latitude/3480/default.nix @@ -9,6 +9,4 @@ # touchpad goes over i2c boot.blacklistedKernelModules = [ "psmouse" ]; - - services.xserver.videoDrivers = lib.mkDefault [ "intel" ]; } diff --git a/dell/latitude/7430/default.nix b/dell/latitude/7430/default.nix index b69fd5c4..7d2f6f98 100644 --- a/dell/latitude/7430/default.nix +++ b/dell/latitude/7430/default.nix @@ -16,6 +16,4 @@ "i8042.dumbkbd=1" "i8042.nopnp=1" ]; - - services.xserver.videoDrivers = lib.mkDefault [ "intel" ]; } diff --git a/gpd/pocket-3/default.nix b/gpd/pocket-3/default.nix index 1ed95ebb..621f4454 100644 --- a/gpd/pocket-3/default.nix +++ b/gpd/pocket-3/default.nix @@ -14,7 +14,6 @@ in # GPU is an Intel Iris Xe, on a “TigerLake” mobile CPU boot.initrd.kernelModules = [ "i915" ]; # Early loading so the passphrase prompt appears on external displays - services.xserver.videoDrivers = [ "intel" ]; hardware.graphics.extraPackages = with pkgs; [ intel-media-driver (if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver) From 7eab0aa0b7eb293c8a41a4319cd9e2045b78c234 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Sat, 4 Jan 2025 08:14:21 -0800 Subject: [PATCH 1164/1476] starfive visionfive2: allow uboot and opensbi source overrides --- starfive/visionfive/v2/default.nix | 4 ++ starfive/visionfive/v2/firmware.nix | 70 +++++++++++++++++++---------- starfive/visionfive/v2/sd-image.nix | 10 ++--- starfive/visionfive/v2/spl-tool.nix | 4 +- 4 files changed, 57 insertions(+), 31 deletions(-) diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index 3807b6b5..a42c6069 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -5,6 +5,10 @@ ... }: { + imports = [ + ./firmware.nix + ]; + boot = { consoleLogLevel = lib.mkDefault 7; # Switch to default as soon they reach >= 6.11 diff --git a/starfive/visionfive/v2/firmware.nix b/starfive/visionfive/v2/firmware.nix index eabeb6c4..06299de4 100644 --- a/starfive/visionfive/v2/firmware.nix +++ b/starfive/visionfive/v2/firmware.nix @@ -1,26 +1,50 @@ -{ callPackage -, writeShellApplication -, stdenv -, mtdutils -}: - -rec { - opensbi = callPackage ./opensbi.nix { }; - uboot = callPackage ./uboot.nix { inherit opensbi; }; - updater-flash = writeShellApplication { - name = "visionfive2-firmware-update-flash"; - runtimeInputs = [ mtdutils ]; - text = '' - flashcp -v ${uboot}/u-boot-spl.bin.normal.out /dev/mtd0 - flashcp -v ${uboot}/u-boot.itb /dev/mtd2 - ''; +{ config, pkgs, lib, ... }: +let + cfg = config.hardware.visionfive2; +in +{ + options = { + hardware.visionfive2 = { + opensbi.src = lib.mkOption { + description = "VisionFive2 OpenSBI source"; + type = lib.types.nullOr lib.types.package; + default = null; + }; + uboot.src = lib.mkOption { + description = "VisionFive2 U-boot source"; + type = lib.types.nullOr lib.types.package; + default = null; + }; + }; }; - updater-sd = writeShellApplication { - name = "visionfive2-firmware-update-sd"; - runtimeInputs = [ ]; - text = '' - dd if=${uboot}/u-boot-spl.bin.normal.out of=/dev/mmcblk0p1 conv=fsync - dd if=${uboot}/u-boot.itb of=/dev/mmcblk0p2 conv=fsync - ''; + + config = { + system.build = { + opensbi = (pkgs.callPackage ./opensbi.nix {}).overrideAttrs (f: p: { + src = if cfg.opensbi.src != null then cfg.opensbi.src else p.src; + }); + + uboot = (pkgs.callPackage ./uboot.nix { inherit (config.system.build) opensbi; }).overrideAttrs (f: p: { + src = if cfg.uboot.src != null then cfg.uboot.src else p.src; + }); + + updater-flash = pkgs.writeShellApplication { + name = "visionfive2-firmware-update-flash"; + runtimeInputs = [ pkgs.mtdutils ]; + text = '' + flashcp -v ${config.system.build.uboot}/u-boot-spl.bin.normal.out /dev/mtd0 + flashcp -v ${config.system.build.uboot}/u-boot.itb /dev/mtd2 + ''; + }; + + updater-sd = pkgs.writeShellApplication { + name = "visionfive2-firmware-update-sd"; + runtimeInputs = [ ]; + text = '' + dd if=${config.system.build.uboot}/u-boot-spl.bin.normal.out of=/dev/mmcblk0p1 conv=fsync + dd if=${config.system.build.uboot}/u-boot.itb of=/dev/mmcblk0p2 conv=fsync + ''; + }; + }; }; } diff --git a/starfive/visionfive/v2/sd-image.nix b/starfive/visionfive/v2/sd-image.nix index d66bd2c7..a14b87b2 100644 --- a/starfive/visionfive/v2/sd-image.nix +++ b/starfive/visionfive/v2/sd-image.nix @@ -1,7 +1,5 @@ { config, pkgs, modulesPath, ... }: - -let firmware = pkgs.callPackage ./firmware.nix { }; -in { +{ imports = [ "${modulesPath}/profiles/base.nix" "${modulesPath}/installer/sd-card/sd-image.nix" @@ -36,10 +34,10 @@ in { EOF eval $(partx $img -o START,SECTORS --nr 1 --pairs) - dd conv=notrunc if=${firmware.uboot}/u-boot-spl.bin.normal.out of=$img seek=$START count=$SECTORS + dd conv=notrunc if=${config.system.build.uboot}/u-boot-spl.bin.normal.out of=$img seek=$START count=$SECTORS eval $(partx $img -o START,SECTORS --nr 2 --pairs) - dd conv=notrunc if=${firmware.uboot}/u-boot.itb of=$img seek=$START count=$SECTORS + dd conv=notrunc if=${config.system.build.uboot}/u-boot.itb of=$img seek=$START count=$SECTORS ''; populateRootCommands = '' @@ -48,5 +46,5 @@ in { ''; }; - environment.systemPackages = [ firmware.updater-flash ]; + environment.systemPackages = [ config.system.build.updater-flash ]; } diff --git a/starfive/visionfive/v2/spl-tool.nix b/starfive/visionfive/v2/spl-tool.nix index 39498454..cd0a77b0 100644 --- a/starfive/visionfive/v2/spl-tool.nix +++ b/starfive/visionfive/v2/spl-tool.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub }: -stdenv.mkDerivation rec{ +stdenv.mkDerivation (finalAttrs: { pname = "spi_tool"; version = "0x01010101"; src = fetchFromGitHub { @@ -15,4 +15,4 @@ stdenv.mkDerivation rec{ mkdir -p $out/bin cp spl_tool $out/bin ''; -} +}) From 3713545aca79365cba20d7873b6e51044890b4e8 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Sun, 5 Jan 2025 08:24:39 -0800 Subject: [PATCH 1165/1476] starfive visionfive2: allow uboot and opensbi patches overrides --- starfive/visionfive/v2/firmware.nix | 32 +++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/starfive/visionfive/v2/firmware.nix b/starfive/visionfive/v2/firmware.nix index 06299de4..b6291152 100644 --- a/starfive/visionfive/v2/firmware.nix +++ b/starfive/visionfive/v2/firmware.nix @@ -5,15 +5,29 @@ in { options = { hardware.visionfive2 = { - opensbi.src = lib.mkOption { - description = "VisionFive2 OpenSBI source"; - type = lib.types.nullOr lib.types.package; - default = null; + opensbi = { + src = lib.mkOption { + description = "VisionFive2 OpenSBI source"; + type = lib.types.nullOr lib.types.package; + default = null; + }; + patches = lib.mkOption { + description = "List of patches to apply to the VisionFive2 OpenSBI source"; + type = lib.types.nullOr (lib.types.listOf lib.types.package); + default = null; + }; }; - uboot.src = lib.mkOption { - description = "VisionFive2 U-boot source"; - type = lib.types.nullOr lib.types.package; - default = null; + uboot = { + src = lib.mkOption { + description = "VisionFive2 U-boot source"; + type = lib.types.nullOr lib.types.package; + default = null; + }; + patches = lib.mkOption { + description = "List of patches to apply to the VisionFive2 U-boot source"; + type = lib.types.nullOr (lib.types.listOf lib.types.package); + default = null; + }; }; }; }; @@ -22,10 +36,12 @@ in system.build = { opensbi = (pkgs.callPackage ./opensbi.nix {}).overrideAttrs (f: p: { src = if cfg.opensbi.src != null then cfg.opensbi.src else p.src; + patches = if cfg.opensbi.patches != null then cfg.opensbi.patches else (p.patches or []); }); uboot = (pkgs.callPackage ./uboot.nix { inherit (config.system.build) opensbi; }).overrideAttrs (f: p: { src = if cfg.uboot.src != null then cfg.uboot.src else p.src; + patches = if cfg.uboot.patches != null then cfg.uboot.patches else (p.patches or []); }); updater-flash = pkgs.writeShellApplication { From 76dcc45ea64eb6c21bb8411e9159d67ea8dd6dab Mon Sep 17 00:00:00 2001 From: matthiasdotsh Date: Thu, 2 Jan 2025 13:45:52 +0100 Subject: [PATCH 1166/1476] Bump linux-surface patches to arch-6.12.7-1 --- microsoft/surface/common/repos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 872fcad9..a6bb7368 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "arch-6.12.4-1"; - hash = "sha256-RAcM28eheOJeHU8liC2lh0zpt/SqwOsHlpWuLmncXVc="; + rev = "arch-6.12.7-1"; + hash = "sha256-Pv7O8D8ma+MPLhYP3HSGQki+Yczp8b7d63qMb6l4+mY="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From 178ff0c3f5880c5ab8577411d04f7a8bae7c657a Mon Sep 17 00:00:00 2001 From: matthiasdotsh Date: Thu, 2 Jan 2025 13:48:24 +0100 Subject: [PATCH 1167/1476] surface: linux 6.12.7 -> 6.12.8 --- microsoft/surface/common/kernel/linux-surface/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-surface/default.nix b/microsoft/surface/common/kernel/linux-surface/default.nix index 20f0ea5e..60ea03bf 100644 --- a/microsoft/surface/common/kernel/linux-surface/default.nix +++ b/microsoft/surface/common/kernel/linux-surface/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.12.7"; + version = "6.12.8"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "sha256-94X7ZIoOC2apQ7syKKS27WLJC5hc0ev2naXTjlidoM8="; + sha256 = "sha256-IpHaBlygS3Fcie5QNirsPwIadBS8lj8bVnNmgsgSKXk="; ignoreConfigErrors=true; }; From c422baea263648af47aaa6650fa9a0f270ecac8d Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sat, 28 Dec 2024 13:11:29 +0100 Subject: [PATCH 1168/1476] raspberry-pi.4.leds: enable overlays-dtmerge --- raspberry-pi/4/leds.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/raspberry-pi/4/leds.nix b/raspberry-pi/4/leds.nix index 95a6d058..279a71be 100644 --- a/raspberry-pi/4/leds.nix +++ b/raspberry-pi/4/leds.nix @@ -20,6 +20,10 @@ in # Adapted from: https://gist.github.com/SFrijters/206d2c09656affb04284f076c75a1969 config = lib.mkMerge [ + (lib.mkIf (cfg.eth.disable || cfg.act.disable || cfg.pwr.disable) { + hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true; + hardware.deviceTree.filter = "*-rpi-4-*.dtb"; + }) (lib.mkIf cfg.eth.disable { hardware.deviceTree = { overlays = [ From 90ecc4a20c4ed533e2ff3c61c9d611e41427f5c2 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sat, 28 Dec 2024 13:52:01 +0100 Subject: [PATCH 1169/1476] raspberry-pi.4.leds.{eth,pwr}: fix target rename --- raspberry-pi/4/leds.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/raspberry-pi/4/leds.nix b/raspberry-pi/4/leds.nix index 279a71be..5f58fa22 100644 --- a/raspberry-pi/4/leds.nix +++ b/raspberry-pi/4/leds.nix @@ -71,13 +71,16 @@ in { name = "disable-act-led"; filter = "*rpi-4-b*"; - dtsText = '' + dtsText = let + kernelVersion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2"; + target = if kernelVersion then "<&led_act>" else "<&act_led>"; + in '' /dts-v1/; /plugin/; /{ compatible = "raspberrypi,4-model-b"; fragment@0 { - target = <&act_led>; + target = ${target}; __overlay__ { gpios = <&gpio 42 0>; /* first two values copied from bcm2711-rpi-4-b.dts */ linux,default-trigger = "none"; @@ -98,13 +101,16 @@ in { name = "disable-pwr-led"; filter = "*rpi-4-b*"; - dtsText = '' + dtsText = let + kernelVersion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2"; + target = if kernelVersion then "<&led_pwr>" else "<&pwr_led>"; + in '' /dts-v1/; /plugin/; /{ compatible = "raspberrypi,4-model-b"; fragment@0 { - target = <&pwr_led>; + target = ${target}; __overlay__ { gpios = <&expgpio 2 0>; /* first two values copied from bcm2711-rpi-4-b.dts */ linux,default-trigger = "default-on"; From 8a2a2ef294e53084886d13c43be424153592a03b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Zavala=20Villag=C3=B3mez?= Date: Thu, 26 Dec 2024 00:16:42 -0500 Subject: [PATCH 1170/1476] lenovo/yoga/7/14IAH7: init - Added `lenovo-yoga-7-14IAH7-integrated` - Added `lenovo-yoga-7-14IAH7-hybrid` --- README.md | 554 ++++++++++---------- flake.nix | 2 + lenovo/yoga/7/14IAH7/hybrid/default.nix | 39 ++ lenovo/yoga/7/14IAH7/integrated/default.nix | 28 + lenovo/yoga/7/14IAH7/shared.nix | 19 + 5 files changed, 366 insertions(+), 276 deletions(-) create mode 100644 lenovo/yoga/7/14IAH7/hybrid/default.nix create mode 100644 lenovo/yoga/7/14IAH7/integrated/default.nix create mode 100644 lenovo/yoga/7/14IAH7/shared.nix diff --git a/README.md b/README.md index c9af3e14..b828dc43 100644 --- a/README.md +++ b/README.md @@ -73,280 +73,282 @@ For questions and discussions, come join us in the [nixos-anywhere matrix](https See code for all available configurations. -| Model | Path | -| ---------------------------------------------------------------------- | ------------------------------------------------------- | -| [Acer Aspire 4810T](acer/aspire/4810t) | `` | -| [Airis N990](airis/n990) | `` | -| [Apple iMac 14.2](apple/imac/14-2) | `` | -| [Apple iMac 18.2](apple/imac/18-2) | `` | -| [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | -| [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | -| [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | -| [Apple MacBook Air 7,X](apple/macbook-air/7) | `` | -| [Apple MacBook Pro 8,1](apple/macbook-pro/8-1) | `` | -| [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | -| [Apple MacBook Pro 11,1](apple/macbook-pro/11-1) | `` | -| [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | -| [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | -| [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | -| [Apple MacMini (2010, Intel, Nvidia)](apple/macmini/4) | `` | -| [Apple Macs with a T2 Chip](apple/t2) | `` | -| [Asus Pro WS X570-ACE](asus/pro-ws-x570-ace) | `` | -| [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | -| [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | -| [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `` | -| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | -| [Asus ROG Strix X570-E GAMING](asus/rog-strix/x570e) | `` | -| [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | -| [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | -| [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/amdgpu) | `` | -| [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/nvidia) | `` | -| [Asus ROG Zephyrus G15 GA502](asus/zephyrus/ga502) | `` | -| [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | -| [Asus ROG Zephyrus G16 GU605MY](asus/zephyrus/gu605my) | `` | -| [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | -| [Asus TUF FX504GD](asus/fx504gd) | `` | -| [Asus TUF FX506HM](asus/fx506hm) | `` | -| [Asus TUF FA507RM](asus/fa507rm) | `` | -| [Asus TUF FA507NV](asus/fa507nv) | `` | -| [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `` | -| [Asus Zenbook Pro 15 UX535](asus/zenbook/ux535/) | `` | -| [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | -| [Chuwi MiniBook X](chuwi/minibook-x) | `` | -| [Deciso DEC series](deciso/dec) | `` | -| [Dell G3 3779](dell/g3/3779) | `` | -| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | -| [Dell Inspiron 5509](dell/inspiron/5509) | `` | -| [Dell Inspiron 5515](dell/inspiron/5515) | `` | -| [Dell Inspiron 7405](dell/inspiron/7405) | `` | -| [Dell Inspiron 7460](dell/inspiron/7460) | `` | -| [Dell Latitude 3340](dell/latitude/3340) | `` | -| [Dell Latitude 3480](dell/latitude/3480) | `` | -| [Dell Latitude 5520](dell/latitude/5520) | `` | -| [Dell Latitude 7280](dell/latitude/7280) | `` | -| [Dell Latitude 7390](dell/latitude/7390) | `` | -| [Dell Latitude 7430](dell/latitude/7430) | `` | -| [Dell Latitude 7490](dell/latitude/7490) | `` | -| [Dell Latitude 9430](dell/latitude/9430) | `` | -| [Dell Optiplex 3050](dell/optiplex/3050) | `` | -| [Dell Poweredge R7515](dell/poweredge/r7515) | `` | -| [Dell Precision 3541](dell/precision/3541) | `` | -| [Dell Precision 5490](dell/precision/5490) | `` | -| [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) | `` | -| [Dell XPS 13 9315](dell/xps/13-9315) | `` | -| [Dell XPS 13 9333](dell/xps/13-9333) | `` | -| [Dell XPS 13 9343](dell/xps/13-9343) | `` | -| [Dell XPS 13 9350](dell/xps/13-9350) | `` | -| [Dell XPS 13 9360](dell/xps/13-9360) | `` | -| [Dell XPS 13 9370](dell/xps/13-9370) | `` | -| [Dell XPS 13 9380](dell/xps/13-9380) | `` | -| [Dell XPS 15 7590, nvidia](dell/xps/15-7590/nvidia) | `` | -| [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 9510, nvidia](dell/xps/15-9510/nvidia) | `` | -| [Dell XPS 15 9510](dell/xps/15-9510) | `` | -| [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) | `` | -| [Dell XPS 15 9560, nvidia only](dell/xps/15-9560/nvidia) | `` | -| [Dell XPS 15 9560](dell/xps/15-9560) | `` | -| [Dell XPS 15 9570, intel only](dell/xps/15-9570/intel) | `` | -| [Dell XPS 15 9570, nvidia](dell/xps/15-9570/nvidia) | `` | -| [Dell XPS 15 9570](dell/xps/15-9570) | `` | -| [Dell XPS 17 9700, intel](dell/xps/17-9700/intel) | `` | -| [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | -| [Dell XPS E7240](dell/e7240) | `` | -| [Framework 11th Gen Intel Core](framework/13-inch/11th-gen-intel) | `` | -| [Framework 12th Gen Intel Core](framework/13-inch/12th-gen-intel) | `` | -| [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `` | +| Model | Path | +| --------------------------------------------------------------------------------- | ------------------------------------------------------- | +| [Acer Aspire 4810T](acer/aspire/4810t) | `` | +| [Airis N990](airis/n990) | `` | +| [Apple iMac 14.2](apple/imac/14-2) | `` | +| [Apple iMac 18.2](apple/imac/18-2) | `` | +| [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | +| [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | +| [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | +| [Apple MacBook Air 7,X](apple/macbook-air/7) | `` | +| [Apple MacBook Pro 8,1](apple/macbook-pro/8-1) | `` | +| [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | +| [Apple MacBook Pro 11,1](apple/macbook-pro/11-1) | `` | +| [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | +| [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | +| [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | +| [Apple MacMini (2010, Intel, Nvidia)](apple/macmini/4) | `` | +| [Apple Macs with a T2 Chip](apple/t2) | `` | +| [Asus Pro WS X570-ACE](asus/pro-ws-x570-ace) | `` | +| [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | +| [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | +| [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `` | +| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | +| [Asus ROG Strix X570-E GAMING](asus/rog-strix/x570e) | `` | +| [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | +| [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | +| [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/amdgpu) | `` | +| [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/nvidia) | `` | +| [Asus ROG Zephyrus G15 GA502](asus/zephyrus/ga502) | `` | +| [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | +| [Asus ROG Zephyrus G16 GU605MY](asus/zephyrus/gu605my) | `` | +| [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | +| [Asus TUF FX504GD](asus/fx504gd) | `` | +| [Asus TUF FX506HM](asus/fx506hm) | `` | +| [Asus TUF FA507RM](asus/fa507rm) | `` | +| [Asus TUF FA507NV](asus/fa507nv) | `` | +| [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `` | +| [Asus Zenbook Pro 15 UX535](asus/zenbook/ux535/) | `` | +| [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | +| [Chuwi MiniBook X](chuwi/minibook-x) | `` | +| [Deciso DEC series](deciso/dec) | `` | +| [Dell G3 3779](dell/g3/3779) | `` | +| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | +| [Dell Inspiron 5509](dell/inspiron/5509) | `` | +| [Dell Inspiron 5515](dell/inspiron/5515) | `` | +| [Dell Inspiron 7405](dell/inspiron/7405) | `` | +| [Dell Inspiron 7460](dell/inspiron/7460) | `` | +| [Dell Latitude 3340](dell/latitude/3340) | `` | +| [Dell Latitude 3480](dell/latitude/3480) | `` | +| [Dell Latitude 5520](dell/latitude/5520) | `` | +| [Dell Latitude 7280](dell/latitude/7280) | `` | +| [Dell Latitude 7390](dell/latitude/7390) | `` | +| [Dell Latitude 7430](dell/latitude/7430) | `` | +| [Dell Latitude 7490](dell/latitude/7490) | `` | +| [Dell Latitude 9430](dell/latitude/9430) | `` | +| [Dell Optiplex 3050](dell/optiplex/3050) | `` | +| [Dell Poweredge R7515](dell/poweredge/r7515) | `` | +| [Dell Precision 3541](dell/precision/3541) | `` | +| [Dell Precision 5490](dell/precision/5490) | `` | +| [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) | `` | +| [Dell XPS 13 9315](dell/xps/13-9315) | `` | +| [Dell XPS 13 9333](dell/xps/13-9333) | `` | +| [Dell XPS 13 9343](dell/xps/13-9343) | `` | +| [Dell XPS 13 9350](dell/xps/13-9350) | `` | +| [Dell XPS 13 9360](dell/xps/13-9360) | `` | +| [Dell XPS 13 9370](dell/xps/13-9370) | `` | +| [Dell XPS 13 9380](dell/xps/13-9380) | `` | +| [Dell XPS 15 7590, nvidia](dell/xps/15-7590/nvidia) | `` | +| [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 9510, nvidia](dell/xps/15-9510/nvidia) | `` | +| [Dell XPS 15 9510](dell/xps/15-9510) | `` | +| [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) | `` | +| [Dell XPS 15 9560, nvidia only](dell/xps/15-9560/nvidia) | `` | +| [Dell XPS 15 9560](dell/xps/15-9560) | `` | +| [Dell XPS 15 9570, intel only](dell/xps/15-9570/intel) | `` | +| [Dell XPS 15 9570, nvidia](dell/xps/15-9570/nvidia) | `` | +| [Dell XPS 15 9570](dell/xps/15-9570) | `` | +| [Dell XPS 17 9700, intel](dell/xps/17-9700/intel) | `` | +| [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | +| [Dell XPS E7240](dell/e7240) | `` | +| [Framework 11th Gen Intel Core](framework/13-inch/11th-gen-intel) | `` | +| [Framework 12th Gen Intel Core](framework/13-inch/12th-gen-intel) | `` | +| [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `` | | [Framework Intel Core Ultra Series 1](framework/13-inch/intel-core-ultra-series1) | `` | -| [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | -| [Framework 16 AMD Ryzen 7040 Series](framework/16-inch/7040-amd) | `` | -| [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | -| [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | -| [Focus M2 Gen 1](focus/m2/gen1) | `` | -| [Gigabyte B550](gigabyte/b550) | `` | -| [GPD MicroPC](gpd/micropc) | `` | -| [GPD P2 Max](gpd/p2-max) | `` | -| [GPD Pocket 3](gpd/pocket-3) | `` | -| [GPD WIN 2](gpd/win-2) | `` | -| [GPD WIN Max 2 2023](gpd/win-max-2/2023) | `` | -| [GPD WIN Mini 2024](gpd/win-mini/2024) | `` | -| [Google Pixelbook](google/pixelbook) | `` | -| [HP Elitebook 2560p](hp/elitebook/2560p) | `` | -| [HP Elitebook 830g6](hp/elitebook/830/g6) | `` | -| [HP Elitebook 845g7](hp/elitebook/845/g7) | `` | -| [HP Elitebook 845g8](hp/elitebook/845/g8) | `` | -| [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | -| [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | -| [HP Laptop 14s-dq2024nf](hp/laptop/14s-dq2024nf) | `` | -| [Huawei Matebook X Pro (2020)](huawei/machc-wa) | `` | -| [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | -| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | -| [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `` | -| [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | -| [Lenovo IdeaPad Gaming 3 15ach6](lenovo/ideapad/15ach6) | `` | -| [Lenovo IdeaPad 5 Pro 16ach6](lenovo/ideapad/16ach6) | `` | -| [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | -| [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | -| [Lenovo IdeaPad Slim 5 16iah8](lenovo/ideapad/16iah8) | `` | -| [Lenovo Legion 5 15ach6h](lenovo/legion/15ach6h) | `` | -| [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | -| [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | -| [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | -| [Lenovo Legion 5 Pro 16ach6h (Hybrid)](lenovo/legion/16ach6h/hybrid) | `` | -| [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia) | `` | -| [Lenovo Legion 7 16achg6 (Hybrid)](lenovo/legion/16achg6/hybrid) | `` | -| [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `` | -| [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | -| [Lenovo Legion 7 Pro 16irx9h (Intel)](lenovo/legion/16irx9h) | `` | -| [Lenovo Legion Slim 7 Gen 7 (AMD)](lenovo/legion/16arha7/) | `` | -| [Lenovo Legion T5 AMR5](lenovo/legion/t526amr5) | `` | -| [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | -| [Lenovo ThinkPad A475](lenovo/thinkpad/a475) | `` | -| [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | -| [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | -| [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | -| [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | -| [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13/yoga) | `` | -| [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | -| [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | -| [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | -| [Lenovo ThinkPad L480](lenovo/thinkpad/l480) | `` | -| [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | -| [Lenovo ThinkPad P14s AMD Gen 1](lenovo/thinkpad/p14s/amd/gen1) | `` | -| [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | -| [Lenovo ThinkPad P14s AMD Gen 3](lenovo/thinkpad/p14s/amd/gen3) | `` | -| [Lenovo ThinkPad P14s AMD Gen 4](lenovo/thinkpad/p14s/amd/gen4) | `` | -| [Lenovo ThinkPad P14s Intel Gen 3](lenovo/thinkpad/p14s/intel/gen3) | `` | -| [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | -| [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | -| [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | -| [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `` | -| [Lenovo ThinkPad P52](lenovo/thinkpad/p52) | `` | -| [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | -| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | -| [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | -| [Lenovo ThinkPad T14 AMD Gen 3](lenovo/thinkpad/t14/amd/gen3) | `` | -| [Lenovo ThinkPad T14 AMD Gen 4](lenovo/thinkpad/t14/amd/gen4) | `` | -| [Lenovo ThinkPad T14 AMD Gen 5](lenovo/thinkpad/t14/amd/gen5) | `` | -| [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | -| [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | -| [Lenovo ThinkPad T14s AMD Gen 4](lenovo/thinkpad/t14s/amd/gen4) | `` | -| [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | -| [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `` | -| [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `` | -| [Lenovo ThinkPad T430](lenovo/thinkpad/t430) | `` | -| [Lenovo ThinkPad T440p](lenovo/thinkpad/t440p) | `` | -| [Lenovo ThinkPad T440s](lenovo/thinkpad/t440s) | `` | -| [Lenovo ThinkPad T450s](lenovo/thinkpad/t450s) | `` | -| [Lenovo ThinkPad T460](lenovo/thinkpad/t460) | `` | -| [Lenovo ThinkPad T460p](lenovo/thinkpad/t460p) | `` | -| [Lenovo ThinkPad T460s](lenovo/thinkpad/t460s) | `` | -| [Lenovo ThinkPad T470s](lenovo/thinkpad/t470s) | `` | -| [Lenovo ThinkPad T480](lenovo/thinkpad/t480) | `` | -| [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `` | -| [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | -| [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | -| [Lenovo ThinkPad T520](lenovo/thinkpad/t520) | `` | -| [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | -| [Lenovo ThinkPad T590](lenovo/thinkpad/t590) | `` | -| [Lenovo ThinkPad W520](lenovo/thinkpad/w520) | `` | -| [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | -| [Lenovo ThinkPad X1 Yoga Gen 7](lenovo/thinkpad/x1/yoga/7th-gen/) | `` | -| [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | -| [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | -| [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | -| [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `` | -| [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `` | -| [Lenovo ThinkPad X1 (12th Gen)](lenovo/thinkpad/x1/12th-gen) | `` | -| [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | -| [Lenovo ThinkPad X1 Extreme Gen 3](lenovo/thinkpad/x1-extreme/gen3) | `` | -| [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | -| [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | -| [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | -| [Lenovo ThinkPad X13 Yoga (3th Gen)](lenovo/thinkpad/x13/yoga/3th-gen) | `` | -| [Lenovo ThinkPad X13 (Intel)](lenovo/thinkpad/x13/intel) | `` | -| [Lenovo ThinkPad X13 (AMD)](lenovo/thinkpad/x13/amd) | `` | -| [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | -| [Lenovo ThinkPad X200s](lenovo/thinkpad/x200s) | `` | -| [Lenovo ThinkPad X220](lenovo/thinkpad/x220) | `` | -| [Lenovo ThinkPad X230](lenovo/thinkpad/x230) | `` | -| [Lenovo ThinkPad X250](lenovo/thinkpad/x250) | `` | -| [Lenovo ThinkPad X260](lenovo/thinkpad/x260) | `` | -| [Lenovo ThinkPad X270](lenovo/thinkpad/x270) | `` | -| [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | -| [Lenovo ThinkPad X390](lenovo/thinkpad/x390) | `` | -| [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | -| [Lenovo ThinkPad Z13 Gen 1](lenovo/thinkpad/z/gen1/z13) | `` | -| [Lenovo ThinkPad Z13 Gen 2](lenovo/thinkpad/z/gen2/z13) | `` | -| [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | -| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/amdgpu) | `` | -| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `` | -| [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `` | -| [MSI B550-A PRO](msi/b550-a-pro) | `` | -| [MSI B350 TOMAHAWK](msi/b350-tomahawk) | `` | -| [MSI GS60 2QE](msi/gs60) | `` | -| [MSI GL62/CX62](msi/gl62) | `` | -| [MSI GL65 10SDR-492](msi/gl65/10SDR-492) | `` | -| [Microchip Icicle Kit](microchip/icicle-kit) | `` | -| [Microsoft Surface Go](microsoft/surface/surface-go) | `` | -| [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel) | `` | -| [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd) | `` | -| [Microsoft Surface Range (Common Modules)](microsoft/surface/common) | `` | -| [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | -| [Microsoft Surface Pro 9](microsoft/surface-pro/9) | `` | -| [Morefine M600](morefine/m600) | `` | -| [Minisforum V3](minisforum/v3) | `` | -| [NXP iMX8 MPlus Evaluation Kit](nxp/imx8mp-evk) | `` | -| [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | -| [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | -| [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | -| [Omen 14-fb0798ng](omen/14-fb0798ng) | `` | -| [Omen 15-en0010ca](omen/15-en0010ca) | `` | -| [Omen 16-n0005ne](omen/16-n0005ne) | `` | -| [Omen 16-n0280nd](/omen/16-n0280nd) | `` | -| [Omen 15-en1007sa](omen/15-en1007sa) | `` | -| [Omen 15-en0002np](omen/15-en0002np) | `` | -| [One-Netbook OneNetbook 4](onenetbook/4) | `` | -| [Panasonic Let's Note CF-LX4](panasonic/letsnote/cf-lx4) | `` | -| [PC Engines APU](pcengines/apu) | `` | -| [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | -| [PINE64 RockPro64](pine64/rockpro64/) | `` | -| [PINE64 STAR64](pine64/star64/) | `` | -| [Protectli VP4670](protectli/vp4670/) | `` | -| [Purism Librem 13v3](purism/librem/13v3) | `` | -| [Purism Librem 15v3](purism/librem/13v3) | `` | -| [Purism Librem 5r4](purism/librem/5r4) | `` | -| [Raspberry Pi 2](raspberry-pi/2) | `` | -| [Raspberry Pi 3](raspberry-pi/3) | `` | -| [Raspberry Pi 4](raspberry-pi/4) | `` | -| [Raspberry Pi 5](raspberry-pi/5) | `` | -| [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | -| [StarFive VisionFive v1](starfive/visionfive/v1) | `` | -| [StarFive VisionFive 2](starfive/visionfive/v2) | `` | -| [StarLabs StarLite 5 (I5)](starlabs/starlite/i5) | `` | -| [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | -| [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | -| [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | -| [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | -| [System76 (generic)](system76) | `` | -| [System76 Darter Pro 6](system76/darp6) | `` | -| [System76 Gazelle 18](system76/gaze18) | `` | -| [System76 Galago Pro 5](system76/galp5-1650) | `` | -| [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | -| [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | -| [TUXEDO Aura 15 - Gen1](tuxedo/aura/15/gen1) | `` | -| [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | -| [TUXEDO Pulse 14 - Gen3](tuxedo/pulse/14/gen3) | `` | -| [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | +| [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | +| [Framework 16 AMD Ryzen 7040 Series](framework/16-inch/7040-amd) | `` | +| [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | +| [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | +| [Focus M2 Gen 1](focus/m2/gen1) | `` | +| [Gigabyte B550](gigabyte/b550) | `` | +| [GPD MicroPC](gpd/micropc) | `` | +| [GPD P2 Max](gpd/p2-max) | `` | +| [GPD Pocket 3](gpd/pocket-3) | `` | +| [GPD WIN 2](gpd/win-2) | `` | +| [GPD WIN Max 2 2023](gpd/win-max-2/2023) | `` | +| [GPD WIN Mini 2024](gpd/win-mini/2024) | `` | +| [Google Pixelbook](google/pixelbook) | `` | +| [HP Elitebook 2560p](hp/elitebook/2560p) | `` | +| [HP Elitebook 830g6](hp/elitebook/830/g6) | `` | +| [HP Elitebook 845g7](hp/elitebook/845/g7) | `` | +| [HP Elitebook 845g8](hp/elitebook/845/g8) | `` | +| [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | +| [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | +| [HP Laptop 14s-dq2024nf](hp/laptop/14s-dq2024nf) | `` | +| [Huawei Matebook X Pro (2020)](huawei/machc-wa) | `` | +| [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | +| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | +| [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `` | +| [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | +| [Lenovo IdeaPad Gaming 3 15ach6](lenovo/ideapad/15ach6) | `` | +| [Lenovo IdeaPad 5 Pro 16ach6](lenovo/ideapad/16ach6) | `` | +| [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | +| [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | +| [Lenovo IdeaPad Slim 5 16iah8](lenovo/ideapad/16iah8) | `` | +| [Lenovo Legion 5 15ach6h](lenovo/legion/15ach6h) | `` | +| [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | +| [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | +| [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | +| [Lenovo Legion 5 Pro 16ach6h (Hybrid)](lenovo/legion/16ach6h/hybrid) | `` | +| [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia) | `` | +| [Lenovo Legion 7 16achg6 (Hybrid)](lenovo/legion/16achg6/hybrid) | `` | +| [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `` | +| [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | +| [Lenovo Legion 7 Pro 16irx9h (Intel)](lenovo/legion/16irx9h) | `` | +| [Lenovo Legion Slim 7 Gen 7 (AMD)](lenovo/legion/16arha7/) | `` | +| [Lenovo Legion T5 AMR5](lenovo/legion/t526amr5) | `` | +| [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | +| [Lenovo ThinkPad A475](lenovo/thinkpad/a475) | `` | +| [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | +| [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | +| [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | +| [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | +| [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13/yoga) | `` | +| [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | +| [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | +| [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | +| [Lenovo ThinkPad L480](lenovo/thinkpad/l480) | `` | +| [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | +| [Lenovo ThinkPad P14s AMD Gen 1](lenovo/thinkpad/p14s/amd/gen1) | `` | +| [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | +| [Lenovo ThinkPad P14s AMD Gen 3](lenovo/thinkpad/p14s/amd/gen3) | `` | +| [Lenovo ThinkPad P14s AMD Gen 4](lenovo/thinkpad/p14s/amd/gen4) | `` | +| [Lenovo ThinkPad P14s Intel Gen 3](lenovo/thinkpad/p14s/intel/gen3) | `` | +| [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | +| [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | +| [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | +| [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `` | +| [Lenovo ThinkPad P52](lenovo/thinkpad/p52) | `` | +| [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | +| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | +| [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | +| [Lenovo ThinkPad T14 AMD Gen 3](lenovo/thinkpad/t14/amd/gen3) | `` | +| [Lenovo ThinkPad T14 AMD Gen 4](lenovo/thinkpad/t14/amd/gen4) | `` | +| [Lenovo ThinkPad T14 AMD Gen 5](lenovo/thinkpad/t14/amd/gen5) | `` | +| [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | +| [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | +| [Lenovo ThinkPad T14s AMD Gen 4](lenovo/thinkpad/t14s/amd/gen4) | `` | +| [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | +| [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `` | +| [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `` | +| [Lenovo ThinkPad T430](lenovo/thinkpad/t430) | `` | +| [Lenovo ThinkPad T440p](lenovo/thinkpad/t440p) | `` | +| [Lenovo ThinkPad T440s](lenovo/thinkpad/t440s) | `` | +| [Lenovo ThinkPad T450s](lenovo/thinkpad/t450s) | `` | +| [Lenovo ThinkPad T460](lenovo/thinkpad/t460) | `` | +| [Lenovo ThinkPad T460p](lenovo/thinkpad/t460p) | `` | +| [Lenovo ThinkPad T460s](lenovo/thinkpad/t460s) | `` | +| [Lenovo ThinkPad T470s](lenovo/thinkpad/t470s) | `` | +| [Lenovo ThinkPad T480](lenovo/thinkpad/t480) | `` | +| [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `` | +| [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | +| [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | +| [Lenovo ThinkPad T520](lenovo/thinkpad/t520) | `` | +| [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | +| [Lenovo ThinkPad T590](lenovo/thinkpad/t590) | `` | +| [Lenovo ThinkPad W520](lenovo/thinkpad/w520) | `` | +| [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | +| [Lenovo ThinkPad X1 Yoga Gen 7](lenovo/thinkpad/x1/yoga/7th-gen/) | `` | +| [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | +| [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | +| [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | +| [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `` | +| [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `` | +| [Lenovo ThinkPad X1 (12th Gen)](lenovo/thinkpad/x1/12th-gen) | `` | +| [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | +| [Lenovo ThinkPad X1 Extreme Gen 3](lenovo/thinkpad/x1-extreme/gen3) | `` | +| [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | +| [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | +| [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | +| [Lenovo ThinkPad X13 Yoga (3th Gen)](lenovo/thinkpad/x13/yoga/3th-gen) | `` | +| [Lenovo ThinkPad X13 (Intel)](lenovo/thinkpad/x13/intel) | `` | +| [Lenovo ThinkPad X13 (AMD)](lenovo/thinkpad/x13/amd) | `` | +| [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | +| [Lenovo ThinkPad X200s](lenovo/thinkpad/x200s) | `` | +| [Lenovo ThinkPad X220](lenovo/thinkpad/x220) | `` | +| [Lenovo ThinkPad X230](lenovo/thinkpad/x230) | `` | +| [Lenovo ThinkPad X250](lenovo/thinkpad/x250) | `` | +| [Lenovo ThinkPad X260](lenovo/thinkpad/x260) | `` | +| [Lenovo ThinkPad X270](lenovo/thinkpad/x270) | `` | +| [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | +| [Lenovo ThinkPad X390](lenovo/thinkpad/x390) | `` | +| [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | +| [Lenovo ThinkPad Z13 Gen 1](lenovo/thinkpad/z/gen1/z13) | `` | +| [Lenovo ThinkPad Z13 Gen 2](lenovo/thinkpad/z/gen2/z13) | `` | +| [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | +| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/amdgpu) | `` | +| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `` | +| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Integrated)](lenovo/yoga/7/14IAH7/integrated) |`` | +| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Hybrid)](lenovo/yoga/7/14IAH7/hybrid) |`` | +| [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `` | +| [MSI B550-A PRO](msi/b550-a-pro) | `` | +| [MSI B350 TOMAHAWK](msi/b350-tomahawk) | `` | +| [MSI GS60 2QE](msi/gs60) | `` | +| [MSI GL62/CX62](msi/gl62) | `` | +| [MSI GL65 10SDR-492](msi/gl65/10SDR-492) | `` | +| [Microchip Icicle Kit](microchip/icicle-kit) | `` | +| [Microsoft Surface Go](microsoft/surface/surface-go) | `` | +| [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel) | `` | +| [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd) | `` | +| [Microsoft Surface Range (Common Modules)](microsoft/surface/common) | `` | +| [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | +| [Microsoft Surface Pro 9](microsoft/surface-pro/9) | `` | +| [Morefine M600](morefine/m600) | `` | +| [Minisforum V3](minisforum/v3) | `` | +| [NXP iMX8 MPlus Evaluation Kit](nxp/imx8mp-evk) | `` | +| [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | +| [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | +| [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | +| [Omen 14-fb0798ng](omen/14-fb0798ng) | `` | +| [Omen 15-en0010ca](omen/15-en0010ca) | `` | +| [Omen 16-n0005ne](omen/16-n0005ne) | `` | +| [Omen 16-n0280nd](/omen/16-n0280nd) | `` | +| [Omen 15-en1007sa](omen/15-en1007sa) | `` | +| [Omen 15-en0002np](omen/15-en0002np) | `` | +| [One-Netbook OneNetbook 4](onenetbook/4) | `` | +| [Panasonic Let's Note CF-LX4](panasonic/letsnote/cf-lx4) | `` | +| [PC Engines APU](pcengines/apu) | `` | +| [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | +| [PINE64 RockPro64](pine64/rockpro64/) | `` | +| [PINE64 STAR64](pine64/star64/) | `` | +| [Protectli VP4670](protectli/vp4670/) | `` | +| [Purism Librem 13v3](purism/librem/13v3) | `` | +| [Purism Librem 15v3](purism/librem/13v3) | `` | +| [Purism Librem 5r4](purism/librem/5r4) | `` | +| [Raspberry Pi 2](raspberry-pi/2) | `` | +| [Raspberry Pi 3](raspberry-pi/3) | `` | +| [Raspberry Pi 4](raspberry-pi/4) | `` | +| [Raspberry Pi 5](raspberry-pi/5) | `` | +| [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | +| [StarFive VisionFive v1](starfive/visionfive/v1) | `` | +| [StarFive VisionFive 2](starfive/visionfive/v2) | `` | +| [StarLabs StarLite 5 (I5)](starlabs/starlite/i5) | `` | +| [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | +| [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | +| [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | +| [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | +| [System76 (generic)](system76) | `` | +| [System76 Darter Pro 6](system76/darp6) | `` | +| [System76 Gazelle 18](system76/gaze18) | `` | +| [System76 Galago Pro 5](system76/galp5-1650) | `` | +| [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | +| [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | +| [TUXEDO Aura 15 - Gen1](tuxedo/aura/15/gen1) | `` | +| [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | +| [TUXEDO Pulse 14 - Gen3](tuxedo/pulse/14/gen3) | `` | +| [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | diff --git a/flake.nix b/flake.nix index 44bedb0a..2b0449ac 100644 --- a/flake.nix +++ b/flake.nix @@ -238,6 +238,8 @@ lenovo-yoga-7-14ARH7 = import ./lenovo/yoga/7/14ARH7; lenovo-yoga-7-14ARH7-amdgpu = import ./lenovo/yoga/7/14ARH7/amdgpu; lenovo-yoga-7-14ARH7-nvidia = import ./lenovo/yoga/7/14ARH7/nvidia; + lenovo-yoga-7-14IAH7-integrated = import ./lenovo/yoga/7/14IAH7/integrated; + lenovo-yoga-7-14IAH7-hybrid = import ./lenovo/yoga/7/14IAH7/hybrid; lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; malibal-aon-s1-intel = import ./malibal/aon/s1; diff --git a/lenovo/yoga/7/14IAH7/hybrid/default.nix b/lenovo/yoga/7/14IAH7/hybrid/default.nix new file mode 100644 index 00000000..d202352c --- /dev/null +++ b/lenovo/yoga/7/14IAH7/hybrid/default.nix @@ -0,0 +1,39 @@ +/* + * `lenovo-yoga-7-14IAH7-hybrid`: + * + * This is a hybrid profile that enables the NVIDIA + * driver and PRIME offload mode for making use of both + * integrated and dedicated graphics. Use this profile if + * you want to use the NVIDIA GeForce RTX 3050 Mobile. + * Read about PRIME offload mode here: + * + * + * The `lenovo-yoga-7-14IAH7-integrated` profile only + * has the integrated Intel GPU enabled. The dedicated + * NVIDIA GPU is disabled entirely. Use that profile + * instead if you want to only use integrated graphics. + * + * `nouveau` wasn't added to any profiles since it + * is known to cause freezes for this device. + * `nouveau` is blacklisted by default when enabling this: + * + */ +{ lib, ... }: +{ + imports = [ + ../shared.nix + ../../../../../common/gpu/nvidia/ampere + ../../../../../common/gpu/nvidia/prime.nix + ]; + + hardware.nvidia = { + # Info: + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + + # Info: + powerManagement.enable = lib.mkDefault true; + }; +} diff --git a/lenovo/yoga/7/14IAH7/integrated/default.nix b/lenovo/yoga/7/14IAH7/integrated/default.nix new file mode 100644 index 00000000..6ba257b0 --- /dev/null +++ b/lenovo/yoga/7/14IAH7/integrated/default.nix @@ -0,0 +1,28 @@ +/* + * `lenovo-yoga-7-14IAH7-integrated`: + * + * This profile only has the integrated Intel GPU + * enabled. The dedicated NVIDIA GPU is disabled + * entirely. Use this profile if you want to only + * use the integrated GPU. + * + * It is recommended to use this profile to disable + * dedicated graphics, rather than doing it through + * the BIOS, since that method causes issues with + * the integrated graphics drivers. Doing it + * through blacklisting achieves the same result + * with no side-effects. + * + * The `lenovo-yoga-7-14IAH7-hybrid` hybrid profile + * enables the NVIDIA driver and PRIME offload mode + * for making use of both GPUs. Use that profile + * instead if you want to use the NVIDIA GPU. + * Read about PRIME offload mode here: + * + */ +{ + imports = [ + ../shared.nix + ../../../../../common/gpu/nvidia/disable.nix + ]; +} diff --git a/lenovo/yoga/7/14IAH7/shared.nix b/lenovo/yoga/7/14IAH7/shared.nix new file mode 100644 index 00000000..91220cd7 --- /dev/null +++ b/lenovo/yoga/7/14IAH7/shared.nix @@ -0,0 +1,19 @@ +/* + * Here are configurations for the + * Intel Core i7-12700H CPU, along + * with a few others. + */ +{ + imports = [ + ../../../../common/cpu/intel/alder-lake + ../../../../common/gpu/intel/alder-lake + ../../../../common/pc/laptop + ../../../../common/pc/ssd + ]; + + boot = { + kernelModules = [ "kvm-intel" ]; + # Info: + kernelParams = [ "pcie_aspm.policy=powersupersave" ]; + }; +} From b98df1827a48ebaa4db48ac98f178d5dfeae4275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 7 Jan 2025 08:12:22 +0100 Subject: [PATCH 1171/1476] framework/13-inch/7040-amd: remove fprint workaround fixes https://github.com/NixOS/nixos-hardware/issues/1256 --- framework/13-inch/7040-amd/README.md | 40 ---------------------------- 1 file changed, 40 deletions(-) diff --git a/framework/13-inch/7040-amd/README.md b/framework/13-inch/7040-amd/README.md index bb46c3cb..abaef603 100644 --- a/framework/13-inch/7040-amd/README.md +++ b/framework/13-inch/7040-amd/README.md @@ -27,43 +27,3 @@ 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 d3b4fe46c86824d10ffa7b2fe2cb1bf09fb6eae7 Mon Sep 17 00:00:00 2001 From: Samuel <60676867+sjhaleprogrammer@users.noreply.github.com> Date: Tue, 7 Jan 2025 06:57:39 +0000 Subject: [PATCH 1172/1476] Adding support for GV302X* 2023 (#1285) --- README.md | 2 + asus/flow/gv302x/amdgpu/default.nix | 44 ++++++++++++ asus/flow/gv302x/nvidia/default.nix | 58 +++++++++++++++ asus/flow/gv302x/shared.nix | 106 ++++++++++++++++++++++++++++ flake.nix | 2 + 5 files changed, 212 insertions(+) create mode 100644 asus/flow/gv302x/amdgpu/default.nix create mode 100644 asus/flow/gv302x/nvidia/default.nix create mode 100644 asus/flow/gv302x/shared.nix diff --git a/README.md b/README.md index b828dc43..02edc1e9 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,8 @@ See code for all available configurations. | [Apple Macs with a T2 Chip](apple/t2) | `` | | [Asus Pro WS X570-ACE](asus/pro-ws-x570-ace) | `` | | [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | +| [Asus ROG Flow X13 GV302X\* (2023)](asus/zephyrus/gv302x/amdgpu) | `` | +| [Asus ROG Flow X13 GV302X\* (2023)](asus/zephyrus/gv302x/nvidia) | `` | | [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | | [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | diff --git a/asus/flow/gv302x/amdgpu/default.nix b/asus/flow/gv302x/amdgpu/default.nix new file mode 100644 index 00000000..833e298f --- /dev/null +++ b/asus/flow/gv302x/amdgpu/default.nix @@ -0,0 +1,44 @@ +{ config, + lib, + ... +}: + +let + inherit (lib) mkEnableOption mkIf mkMerge; + cfg = config.hardware.asus.flow.gv302x; + +in { + imports = [ + ../shared.nix + ]; + + options.hardware.asus.flow.gv302x.amdgpu = { + recovery.enable = (mkEnableOption "Enable amdgpu.gpu_recovery kernel boot param") // { default = false; }; + sg_display.enable = (mkEnableOption "Enable amdgpu.gpu_recovery kernel boot param") // { default = true; }; + psr.enable = (mkEnableOption "Enable amdgpu.dcdebugmask=0x10 kernel boot param") // { default = true; }; + }; + + config = mkMerge [ + (mkIf cfg.amdgpu.recovery.enable { + # Hopefully fixes for where the kernel sometimes hangs when suspending or hibernating + # (Though, I'm very suspicious of the Mediatek Wifi...) + boot.kernelParams = [ + "amdgpu.gpu_recovery=1" + ]; + }) + + (mkIf (!cfg.amdgpu.sg_display.enable) { + # Can help solve flickering/glitching display issues since Scatter/Gather code was reenabled + boot.kernelParams = [ + "amdgpu.sg_display=0" + ]; + }) + + (mkIf (!cfg.amdgpu.psr.enable) { + # Can help solve flickering/glitching display issues since Scatter/Gather code was reenabled + boot.kernelParams = [ + "amdgpu.dcdebugmask=0x10" + ]; + }) + ]; +} diff --git a/asus/flow/gv302x/nvidia/default.nix b/asus/flow/gv302x/nvidia/default.nix new file mode 100644 index 00000000..3496a0a5 --- /dev/null +++ b/asus/flow/gv302x/nvidia/default.nix @@ -0,0 +1,58 @@ +{ lib, + pkgs, + config, + ... +}: + +let + inherit (lib) mkDefault; + +in { + imports = [ + ../shared.nix + ## "prime.nix" loads this, aleady: + # ../../../common/gpu/nvidia + ../../../../common/gpu/nvidia/prime.nix + ../../../../common/gpu/nvidia/ada-lovelace + + ]; + + # NVIDIA GeForce RTX 4070 Mobile + + boot = { + blacklistedKernelModules = [ "nouveau" ]; + }; + + + + hardware = { + ## Enable the Nvidia card, as well as Prime and Offload: + amdgpu.initrd.enable = mkDefault true; + + nvidia = { + + #to avoid problems with gnome 47 vulkan + package = mkDefault config.boot.kernelPackages.nvidiaPackages.beta; + + modesetting.enable = true; + nvidiaSettings = mkDefault true; + + prime = { + offload = { + enable = mkDefault true; + enableOffloadCmd = mkDefault true; + }; + amdgpuBusId = "PCI:69:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + + powerManagement = { + enable = mkDefault true; + finegrained = mkDefault true; + }; + + dynamicBoost.enable = mkDefault true; + + }; + }; +} diff --git a/asus/flow/gv302x/shared.nix b/asus/flow/gv302x/shared.nix new file mode 100644 index 00000000..474eb584 --- /dev/null +++ b/asus/flow/gv302x/shared.nix @@ -0,0 +1,106 @@ +{ config, + pkgs, + lib, + ... +}: + +let + inherit (lib) mkDefault mkEnableOption mkIf mkMerge version versionAtLeast versionOlder; + + cfg = config.hardware.asus.flow.gv302x; +in { + + imports = [ + ../../../common/cpu/amd + # Better power-savings from AMD PState: + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + options.hardware.asus.flow.gv302x = { + # Kernels earlier than 6.9 (possibly even earlier) tend to take 1-2 key-presses + # to wake-up the internal keyboard after the device is suspended. + # Therefore, this option disables auto-suspend for the keyboard by default, but + # enables it for kernel 6.9.x onwards. + # + # Note: the device name is "ASUS N-KEY Device". + keyboard.autosuspend.enable = ( + mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Flow GV302X" + ) // { + default = versionAtLeast config.boot.kernelPackages.kernel.version "6.9"; + defaultText = lib.literalExpression "lib.versionAtLeast config.boot.kernelPackages.kernel.version \"6.9\""; + }; + # The ASUS 8295 ITE device will cause an immediate wake-up when trying to suspend the laptop. + # After the first successful hibernate, it will work as expected, however. + # NOTE: I'm not actually sure what this device, as neither the touchpad nor the M1-M4 keys cause a wake-up. + ite-device.wakeup.enable = mkEnableOption "Enable power wakeup on the internal USB keyboard-like device (8295 ITE Device) on Flow GV302X"; + }; + + config = mkMerge [ + { + # Configure basic system settings: + boot = { + kernelModules = [ "kvm-amd" ]; + kernelParams = [ + "mem_sleep_default=deep" + "pcie_aspm.policy=powersupersave" + ]; + }; + + services = { + asusd = { + enable = mkDefault true; + enableUserService = mkDefault true; + }; + + supergfxd.enable = mkDefault true; + + udev = { + extraHwdb = '' + # Fixes mic mute button + evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* + KEYBOARD_KEY_ff31007c=f20 + ''; + }; + }; + + #flow devices are 2 in 1 laptops + hardware.sensor.iio.enable = mkDefault true; + + } + + (mkIf (! cfg.keyboard.autosuspend.enable) { + services.udev.extraRules = '' + # Disable power auto-suspend for the ASUS N-KEY device, i.e. USB Keyboard. + # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after the device suspends. + ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1" + ''; + }) + + (mkIf (! cfg.ite-device.wakeup.enable) { + services.udev.extraRules = '' + # Disable power wakeup for the 8295 ITE device. + # Otherwise on certain kernel-versions, it will tend to cause the laptop to immediately wake-up when suspending. + # ACTION=="add|change", SUBSYSTEM=="usb", DRIVER="usb", TEST="power/wakeup", ATTR{idVendor}=="0b05", ATTR{idProduct}=="193b", ATTR{power/wakeup}="disabled" + ACTION=="add|change", SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="193b", ATTR{power/wakeup}="disabled" + ''; + }) + + (mkIf (config.networking.wireless.iwd.enable && config.networking.wireless.scanOnLowSignal) { + # Meditek doesn't seem to be quite sensitive enough on the default roaming settings: + # https://wiki.archlinux.org/title/Wpa_supplicant#Roaming + # https://wiki.archlinux.org/title/Iwd#iwd_keeps_roaming + # + # But NixOS doesn't have the tweaks for IWD, yet. + networking.wireless.iwd.settings = { + General = { + RoamThreshold = -75; + RoamThreshold5G = -80; + RoamRetryInterval = 20; + }; + }; + }) + ]; +} diff --git a/flake.nix b/flake.nix index 2b0449ac..b50dd3ce 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,8 @@ asus-fx506hm = import ./asus/fx506hm; asus-fa507nv = import ./asus/fa507nv; asus-fa507rm = import ./asus/fa507rm; + asus-flow-gv302x-amdgpu = import ./asus/flow/gv302x/amdgpu; + asus-flow-gv302x-nvidia = import ./asus/flow/gv302x/nvidia; asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace; asus-rog-strix-g513im = import ./asus/rog-strix/g513im; asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie; From 4c5c3be74dc61a11346528e8240a655b8c26f0d2 Mon Sep 17 00:00:00 2001 From: LucasFA <23667494+LucasFA@users.noreply.github.com> Date: Tue, 19 Nov 2024 01:15:18 +0000 Subject: [PATCH 1173/1476] Slimbook/hero: Init --- README.md | 1 + flake.nix | 1 + slimbook/hero/rpl-rtx/README.md | 123 ++++++++++++++++++++++++++++++ slimbook/hero/rpl-rtx/default.nix | 34 +++++++++ 4 files changed, 159 insertions(+) create mode 100644 slimbook/hero/rpl-rtx/README.md create mode 100644 slimbook/hero/rpl-rtx/default.nix diff --git a/README.md b/README.md index 02edc1e9..d67a9fae 100644 --- a/README.md +++ b/README.md @@ -337,6 +337,7 @@ See code for all available configurations. | [Raspberry Pi 4](raspberry-pi/4) | `` | | [Raspberry Pi 5](raspberry-pi/5) | `` | | [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | +| [Slimbook Hero RPL-RTX](slimbook/hero/rpl-rtx) | `` | | [StarFive VisionFive v1](starfive/visionfive/v1) | `` | | [StarFive VisionFive 2](starfive/visionfive/v2) | `` | | [StarLabs StarLite 5 (I5)](starlabs/starlite/i5) | `` | diff --git a/flake.nix b/flake.nix index b50dd3ce..d8cdc618 100644 --- a/flake.nix +++ b/flake.nix @@ -287,6 +287,7 @@ raspberry-pi-5 = import ./raspberry-pi/5; kobol-helios4 = import ./kobol/helios4; samsung-np900x3c = import ./samsung/np900x3c; + slimbook-hero-rpl-rtx = import ./slimbook/hero/rpl-rtx; starfive-visionfive-v1 = import ./starfive/visionfive/v1; starfive-visionfive-2 = import ./starfive/visionfive/v2; starlabs-starlite-i5 = import ./starlabs/starlite/i5; diff --git a/slimbook/hero/rpl-rtx/README.md b/slimbook/hero/rpl-rtx/README.md new file mode 100644 index 00000000..73542518 --- /dev/null +++ b/slimbook/hero/rpl-rtx/README.md @@ -0,0 +1,123 @@ +# [Slimbook HERO](https://slimbook.com/en/shop/product/hero-intel-i7-13620h-1115) + +This configuration is for the Slimbook Hero with an i7-13620H and an RTX 4060. +Model name: SLIMBOOK HERO-RPL-RTX. + +To run software on your Nvidia GPU, use the `nvidia-offload` command. For example: +```bash +nvidia-offload `nix-shell -p glxinfo --run 'glxgears'` +``` +For more information, visit: https://wiki.nixos.org/wiki/NVIDIA#Offload_mode + +
System information + +```bash +>neofetch +OS: NixOS 24.11.20241216.3945713 (Vicuna) x86_64 +Host: SLIMBOOK HERO-RPL-RTX +Kernel: 6.6.66 +Uptime: 37 mins +Packages: 1296 (nix-system), 893 (nix-user), 2 (nix-default), 9 (flatpak) +Shell: bash 5.2.37 +Resolution: 2560x1440 +DE: GNOME 47.1 (Wayland) +WM: Mutter +WM Theme: Adwaita +Theme: Adwaita [GTK2/3] +Icons: Adwaita [GTK2/3] +Terminal: kgx +CPU: 13th Gen Intel i7-13620H (16) @ 4.700GHz +GPU: Intel Raptor Lake-P [UHD Graphics] +GPU: NVIDIA GeForce RTX 4060 Max-Q / Mobile +Memory: 4448MiB / 15734MiB + +$ lspci -nn +00:00.0 Host bridge [0600]: Intel Corporation Device [8086:a715] +00:01.0 PCI bridge [0604]: Intel Corporation Raptor Lake PCI Express 5.0 Graphics Port (PEG010) [8086:a70d] +00:02.0 VGA compatible controller [0300]: Intel Corporation Raptor Lake-P [UHD Graphics] [8086:a7a8] (rev 04) +00:04.0 Signal processing controller [1180]: Intel Corporation Raptor Lake Dynamic Platform and Thermal Framework Processor Participant [8086:a71d] +00:06.0 PCI bridge [0604]: Intel Corporation Raptor Lake PCIe 4.0 Graphics Port [8086:a74d] +00:06.2 PCI bridge [0604]: Intel Corporation Device [8086:a73d] +00:08.0 System peripheral [0880]: Intel Corporation GNA Scoring Accelerator module [8086:a74f] +00:0a.0 Signal processing controller [1180]: Intel Corporation Raptor Lake Crashlog and Telemetry [8086:a77d] (rev 01) +00:14.0 USB controller [0c03]: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller [8086:51ed] (rev 01) +00:14.2 RAM memory [0500]: Intel Corporation Alder Lake PCH Shared SRAM [8086:51ef] (rev 01) +00:14.3 Network controller [0280]: Intel Corporation Raptor Lake PCH CNVi WiFi [8086:51f1] (rev 01) +00:15.0 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 [8086:51e8] (rev 01) +00:16.0 Communication controller [0780]: Intel Corporation Alder Lake PCH HECI Controller [8086:51e0] (rev 01) +00:1c.0 PCI bridge [0604]: Intel Corporation Alder Lake PCH-P PCI Express Root Port #9 [8086:51bf] (rev 01) +00:1f.0 ISA bridge [0601]: Intel Corporation Raptor Lake LPC/eSPI Controller [8086:519d] (rev 01) +00:1f.3 Audio device [0403]: Intel Corporation Raptor Lake-P/U/H cAVS [8086:51ca] (rev 01) +00:1f.4 SMBus [0c05]: Intel Corporation Alder Lake PCH-P SMBus Host Controller [8086:51a3] (rev 01) +00:1f.5 Serial bus controller [0c80]: Intel Corporation Alder Lake-P PCH SPI Controller [8086:51a4] (rev 01) +01:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD107M [GeForce RTX 4060 Max-Q / Mobile] [10de:28a0] (rev a1) +01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:22be] (rev a1) +02:00.0 Non-Volatile memory controller [0108]: MAXIO Technology (Hangzhou) Ltd. NVMe SSD Controller MAP1202 (DRAM-less) [1e4b:1202] (rev 01) +03:00.0 Non-Volatile memory controller [0108]: Micron Technology Inc 2550 NVMe SSD (DRAM-less) [1344:5416] (rev 01) +04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15) +``` + +
+ +## Power Management +My testing shows suspend issues (tested in GNOME) when using `hardware.nvidia.powerManagement.enabled = true`, regardless of the value of `hardware.nvidia.powerManagement.finegrained`. +This seems related to this [issue](https://github.com/NixOS/nixpkgs/issues/336723), which is offered a solution in [this discouse thread](https://discourse.nixos.org/t/suspend-resume-cycling-on-system-resume/32322/12) with this config: + +
+ +```nix +systemd = { + services."gnome-suspend" = { + description = "suspend gnome shell"; + before = [ + "systemd-suspend.service" + "systemd-hibernate.service" + "nvidia-suspend.service" + "nvidia-hibernate.service" + ]; + wantedBy = [ + "systemd-suspend.service" + "systemd-hibernate.service" + ]; + serviceConfig = { + Type = "oneshot"; + ExecStart = ''${pkgs.procps}/bin/pkill -f -STOP ${pkgs.gnome-shell}/bin/gnome-shell''; + }; + }; + services."gnome-resume" = { + description = "resume gnome shell"; + after = [ + "systemd-suspend.service" + "systemd-hibernate.service" + "nvidia-resume.service" + ]; + wantedBy = [ + "systemd-suspend.service" + "systemd-hibernate.service" + ]; + serviceConfig = { + Type = "oneshot"; + ExecStart = ''${pkgs.procps}/bin/pkill -f -CONT ${pkgs.gnome-shell}/bin/gnome-shell''; + }; + }; + }; +``` + +
+ +At the same time, the Nvidia driver reports power management to still be working even with `nvidia.powerManagement.enable = false`: +```bash +>cat /proc/driver/nvidia/gpus/0000:01:00.0/power +Runtime D3 status: Enabled (fine-grained) +Video Memory: Off + +GPU Hardware Support: + Video Memory Self Refresh: Supported + Video Memory Off: Supported + +S0ix Power Management: + Platform Support: Supported + Status: Disabled +``` + +For more information see the [Nvidia documentation](https://download.nvidia.com/XFree86/Linux-x86_64/565.77/README/powermanagement.html), chapters 21 and 22. diff --git a/slimbook/hero/rpl-rtx/default.nix b/slimbook/hero/rpl-rtx/default.nix new file mode 100644 index 00000000..b71c22c7 --- /dev/null +++ b/slimbook/hero/rpl-rtx/default.nix @@ -0,0 +1,34 @@ +{ config, lib, ... }: +{ + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/intel + ../../../common/gpu/nvidia/ada-lovelace + ../../../common/gpu/nvidia/prime.nix + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + hardware = { + graphics = { + enable = lib.mkDefault true; + enable32Bit = lib.mkDefault true; + }; + nvidia = { + prime = { + intelBusId = lib.mkDefault "PCI:0:2:0"; + nvidiaBusId = lib.mkDefault "PCI:1:0:0"; + }; + powerManagement = { + enable = lib.mkDefault false; # Causes sleep issues. See README for more information + finegrained = lib.mkDefault false; + }; + dynamicBoost.enable = true; + }; + }; + + services = { + fwupd.enable = lib.mkDefault true; + thermald.enable = lib.mkDefault true; + }; +} From 95a812557bf86d6204f1ef99e88f9d209fcde8b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 7 Jan 2025 08:03:02 +0100 Subject: [PATCH 1174/1476] update flake.lock --- tests/flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/flake.lock b/tests/flake.lock index ceacb5e8..c0ee1775 100644 --- a/tests/flake.lock +++ b/tests/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1730504689, - "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", + "lastModified": 1736143030, + "narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "506278e768c2a08bec68eb62932193e341f55c90", + "rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1730874081, - "narHash": "sha256-VK7LkfdcpUi8tqcgMIYY2jejDh4O3MNw9An0FcKveRQ=", + "lastModified": 1736232973, + "narHash": "sha256-8YT/8TMwWRRYFiLWMS98wPW50YBwYeErX7nQ7EmSaVA=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "12ad8c1bf13ff15ffa6afe82c59b4af0b9226035", + "rev": "3713545aca79365cba20d7873b6e51044890b4e8", "type": "github" }, "original": { @@ -37,11 +37,11 @@ }, "nixos-stable": { "locked": { - "lastModified": 1730741070, - "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", + "lastModified": 1735563628, + "narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3", + "rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798", "type": "github" }, "original": { @@ -53,11 +53,11 @@ }, "nixos-unstable-small": { "locked": { - "lastModified": 1730858696, - "narHash": "sha256-us4xhqqW6OkjCihXYuFArhwx91cTzns8FEY8lE4v7JQ=", + "lastModified": 1736208088, + "narHash": "sha256-2030VBfWuPLPEUrONVY/uF79EuNCztKunuKLgKkQWqM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8541b4db5adb9dd835ed5d0023dec229987b7391", + "rev": "42de2bcb35ccf24626325bd6114ef9d812eaeb0d", "type": "github" }, "original": { From 75a920536c1cbc9403bc61d7e7ba803d675ad8d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 7 Jan 2025 08:21:10 +0100 Subject: [PATCH 1175/1476] rpi2: switch to extlinux bootloader --- raspberry-pi/2/default.nix | 5 +---- tests/build-profile.nix | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/raspberry-pi/2/default.nix b/raspberry-pi/2/default.nix index d22db5b5..368cb27f 100644 --- a/raspberry-pi/2/default.nix +++ b/raspberry-pi/2/default.nix @@ -13,10 +13,7 @@ loader = { grub.enable = lib.mkDefault false; generationsDir.enable = lib.mkDefault false; - raspberryPi = { - enable = lib.mkDefault true; - version = lib.mkDefault 2; - }; + generic-extlinux-compatible.enable = lib.mkDefault true; }; }; diff --git a/tests/build-profile.nix b/tests/build-profile.nix index aa3714ab..786fa8b6 100644 --- a/tests/build-profile.nix +++ b/tests/build-profile.nix @@ -4,7 +4,7 @@ profile ({ config, lib, ... }: { nixpkgs.pkgs = pkgs; - boot.loader.systemd-boot.enable = !config.boot.loader.generic-extlinux-compatible.enable && !config.boot.loader.raspberryPi.enable; + boot.loader.systemd-boot.enable = !config.boot.loader.generic-extlinux-compatible.enable; # we forcefully disable grub here just for testing purposes, even though some profiles might still use grub in the end. boot.loader.grub.enable = false; From ca30f8501ab452ca687a7fdcb2d43e1fb1732317 Mon Sep 17 00:00:00 2001 From: heydoyouknowme0 <68548165+heydoyouknowme0@users.noreply.github.com> Date: Mon, 23 Dec 2024 11:04:28 +0530 Subject: [PATCH 1176/1476] asus: init fa506ic --- README.md | 1 + asus/fa506ic/default.nix | 33 +++++++++++++++++++++++++++++++++ flake.nix | 1 + 3 files changed, 35 insertions(+) create mode 100644 asus/fa506ic/default.nix diff --git a/README.md b/README.md index d67a9fae..ff48b2c3 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,7 @@ See code for all available configurations. | [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | | [Asus TUF FX506HM](asus/fx506hm) | `` | +| [Asus TUF FA506IC](asus/fa506ic) | `` | | [Asus TUF FA507RM](asus/fa507rm) | `` | | [Asus TUF FA507NV](asus/fa507nv) | `` | | [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `` | diff --git a/asus/fa506ic/default.nix b/asus/fa506ic/default.nix new file mode 100644 index 00000000..10d08fbc --- /dev/null +++ b/asus/fa506ic/default.nix @@ -0,0 +1,33 @@ +{ lib, ... }: + +{ + imports = [ + ../../common/cpu/amd + ../../common/cpu/amd/pstate.nix + ../../common/gpu/amd + ../../common/gpu/nvidia/prime.nix + ../../common/gpu/nvidia/ampere + ../../common/pc/laptop + ../../common/pc/laptop/ssd + ]; + + hardware.nvidia = { + modesetting.enable = lib.mkDefault true; + open = lib.mkDefault false; + nvidiaSettings = lib.mkDefault true; + dynamicBoost.enable = lib.mkDefault true; + + prime = { + amdgpuBusId = "PCI:0:6:0"; + nvidiaBusId = "PCI:0:1:0"; + }; + }; + + services = { + asusd = { + enable = lib.mkDefault true; + enableUserService = lib.mkDefault true; + }; + supergfxd.enable = lib.mkDefault true; + }; +} diff --git a/flake.nix b/flake.nix index d8cdc618..f739b7d7 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,7 @@ asus-ally-rc71l = import ./asus/ally/rc71l; asus-fx504gd = import ./asus/fx504gd; asus-fx506hm = import ./asus/fx506hm; + asus-fa506ic = import ./asus/fa506ic; asus-fa507nv = import ./asus/fa507nv; asus-fa507rm = import ./asus/fa507rm; asus-flow-gv302x-amdgpu = import ./asus/flow/gv302x/amdgpu; From 4f339f6be2b61662f957c2ee9eda0fa597d8a6d6 Mon Sep 17 00:00:00 2001 From: Samuel <60676867+sjhaleprogrammer@users.noreply.github.com> Date: Tue, 7 Jan 2025 15:50:16 -0500 Subject: [PATCH 1177/1476] oversight --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ff48b2c3..bd51be4e 100644 --- a/README.md +++ b/README.md @@ -93,8 +93,8 @@ See code for all available configurations. | [Apple Macs with a T2 Chip](apple/t2) | `` | | [Asus Pro WS X570-ACE](asus/pro-ws-x570-ace) | `` | | [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | -| [Asus ROG Flow X13 GV302X\* (2023)](asus/zephyrus/gv302x/amdgpu) | `` | -| [Asus ROG Flow X13 GV302X\* (2023)](asus/zephyrus/gv302x/nvidia) | `` | +| [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/amdgpu) | `` | +| [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/nvidia) | `` | | [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | | [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | From d73a04dabfc4db21fca65b9d58eaea23573858ba Mon Sep 17 00:00:00 2001 From: Matei Dibu Date: Thu, 9 Jan 2025 16:44:30 +0200 Subject: [PATCH 1178/1476] gpu/intel/tiger-lake: don't try to use Xe by default it doesn't work without a force_probe anyway see https://github.com/NixOS/nixos-hardware/issues/1278 --- common/gpu/intel/tiger-lake/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/common/gpu/intel/tiger-lake/default.nix b/common/gpu/intel/tiger-lake/default.nix index 3621a4a1..535dc49c 100644 --- a/common/gpu/intel/tiger-lake/default.nix +++ b/common/gpu/intel/tiger-lake/default.nix @@ -2,7 +2,6 @@ { imports = [ ../. ]; config = { - hardware.intelgpu.driver = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8") "xe"; boot.kernelParams = lib.mkIf (config.hardware.intelgpu.driver == "i915") [ "i915.enable_guc=3" ]; hardware.intelgpu.vaapiDriver = "intel-media-driver"; }; From 8870dcaff63dfc6647fb10648b827e9d40b0a337 Mon Sep 17 00:00:00 2001 From: matthiasdotsh Date: Thu, 9 Jan 2025 15:27:35 +0100 Subject: [PATCH 1179/1476] surface: linux 6.12.8 -> 6.12.9 --- microsoft/surface/common/kernel/linux-surface/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-surface/default.nix b/microsoft/surface/common/kernel/linux-surface/default.nix index 60ea03bf..7db09d2d 100644 --- a/microsoft/surface/common/kernel/linux-surface/default.nix +++ b/microsoft/surface/common/kernel/linux-surface/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.12.8"; + version = "6.12.9"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "sha256-IpHaBlygS3Fcie5QNirsPwIadBS8lj8bVnNmgsgSKXk="; + sha256 = "sha256-h74DYN8JMbNA0rrDUWGlSAcPvDqMNSxJ4h6WZmwmrrQ="; ignoreConfigErrors=true; }; From 06c52bbc795a853d3c84ae2226652f3aa3b51db9 Mon Sep 17 00:00:00 2001 From: Gabgobie <105999094+Gabgobie@users.noreply.github.com> Date: Wed, 8 Jan 2025 02:38:50 +0000 Subject: [PATCH 1180/1476] Lenovo IdeaCentre K330 --- README.md | 1 + flake.nix | 1 + lenovo/ideacentre/k330/README.md | 17 +++++++++++++++++ lenovo/ideacentre/k330/default.nix | 19 +++++++++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 lenovo/ideacentre/k330/README.md create mode 100644 lenovo/ideacentre/k330/default.nix diff --git a/README.md b/README.md index bd51be4e..5f946f2a 100644 --- a/README.md +++ b/README.md @@ -194,6 +194,7 @@ See code for all available configurations. | [Huawei Matebook X Pro (2020)](huawei/machc-wa) | `` | | [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | +| [Lenovo IdeaCentre K330](lenovo/ideacentre/k330) | `` | | [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `` | | [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | | [Lenovo IdeaPad Gaming 3 15ach6](lenovo/ideapad/15ach6) | `` | diff --git a/flake.nix b/flake.nix index f739b7d7..b925530d 100644 --- a/flake.nix +++ b/flake.nix @@ -133,6 +133,7 @@ huawei-machc-wa = import ./huawei/machc-wa; hp-notebook-14-df0023 = import ./hp/notebook/14-df0023; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; + lenovo-ideacentre-k330 = import ./lenovo/ideacentre/k330; lenovo-ideapad-15alc6 = import ./lenovo/ideapad/15alc6; lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; lenovo-ideapad-15ach6 = import ./lenovo/ideapad/15ach6; diff --git a/lenovo/ideacentre/k330/README.md b/lenovo/ideacentre/k330/README.md new file mode 100644 index 00000000..6b81208d --- /dev/null +++ b/lenovo/ideacentre/k330/README.md @@ -0,0 +1,17 @@ +# Lenovo IdeaCentre K330 + +The specific system I took for reference has the following hardware configuration: + +- Intel Core i7 2600 +- NVIDIA GeForce GT 545 [Latest supported (proprietary) driver (390.xx)](https://www.nvidia.com/en-us/drivers/details/196213/) +- Some SSD (originally had a Seagate Barracuda hard drive) + +This hardware configuration was motivated by #1297 + +I recommend enabling xserver instead of trying to use Wayland. As documented in the above linked issue, using Wayland with this rather old hardware lead to the system freezing after a short time of operation. + +```nix +{ + services.xserver.enable = true; +} +``` diff --git a/lenovo/ideacentre/k330/default.nix b/lenovo/ideacentre/k330/default.nix new file mode 100644 index 00000000..381276fc --- /dev/null +++ b/lenovo/ideacentre/k330/default.nix @@ -0,0 +1,19 @@ +{ config, lib, ... }: +{ + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/nvidia # Is it possible/advisable to pin this to the 390.xx driver family in case the user wants to use non-free drivers? + ../../../common/gpu/amd # The K330 could be bought with AMD GPUs but I don't have that configuration + ../../../common/pc + ]; + + # On my machine Wayland causes the desktop to freeze after a short time of operation + services.displayManager.sddm.wayland.enable = false; + + # Should this be a conditional default in case plasma is activated? + # What if somebody installs both plasma AND another DE? + # The goal is to prefer x11 over wayland due to compatibility issues with the old hardware + + + services.displayManager.defaultSession = lib.mkIf config.services.xserver.desktopManager.plasma6.enable (lib.mkDefault "plasmax11"); +} \ No newline at end of file From b678606690027913f3434dea3864e712b862dde5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=B9=82=E0=B8=97=E0=B8=AA=E0=B8=95=E0=B8=B1=E0=B8=A5?= Date: Tue, 31 Dec 2024 12:22:58 +0700 Subject: [PATCH 1181/1476] =?UTF-8?q?lenovo-z13-gen2:=20networking.network?= =?UTF-8?q?manager.fccUnlockScripts=20=E2=86=92=20networking.modemmanager.?= =?UTF-8?q?fccUnlockScripts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes evaluation warning --- lenovo/thinkpad/z/gen2/z13/default.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/lenovo/thinkpad/z/gen2/z13/default.nix b/lenovo/thinkpad/z/gen2/z13/default.nix index 990ad6f1..2f68821d 100644 --- a/lenovo/thinkpad/z/gen2/z13/default.nix +++ b/lenovo/thinkpad/z/gen2/z13/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ...}: +{ pkgs, lib, ... }: { imports = [ @@ -7,10 +7,15 @@ environment.etc."asound.conf".source = ./asound.conf; - networking.networkmanager.fccUnlockScripts = [ - { - id = "2c7c:030a"; - path = "${pkgs.modemmanager}/share/ModemManager/fcc-unlock.available.d/2c7c:030a"; - } - ]; + networking = + let + fcc_unlock_script = rec { + id = "2c7c:030a"; + path = "${pkgs.modemmanager}/share/ModemManager/fcc-unlock.available.d/${id}"; + }; + in + if lib.versionOlder lib.version "25.05pre" then + { networkmanager.fccUnlockScripts = [ fcc_unlock_script ]; } + else + { modemmanager.fccUnlockScripts = [ fcc_unlock_script ]; }; } From b31613ae1087d086d98647a8f7f12d0200c33bad Mon Sep 17 00:00:00 2001 From: LucasFA <23667494+LucasFA@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:31:30 +0000 Subject: [PATCH 1182/1476] omen/15-ce002ns: Init --- README.md | 1 + flake.nix | 1 + omen/15-ce002ns/README.md | 31 +++++++++++++++++++++++++++++++ omen/15-ce002ns/default.nix | 11 +++++++++++ 4 files changed, 44 insertions(+) create mode 100644 omen/15-ce002ns/README.md create mode 100644 omen/15-ce002ns/default.nix diff --git a/README.md b/README.md index 5f946f2a..99c5e912 100644 --- a/README.md +++ b/README.md @@ -319,6 +319,7 @@ See code for all available configurations. | [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | | [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | | [Omen 14-fb0798ng](omen/14-fb0798ng) | `` | +| [Omen 15-ce002ns](omen/15-ce002ns) | `` | | [Omen 15-en0010ca](omen/15-en0010ca) | `` | | [Omen 16-n0005ne](omen/16-n0005ne) | `` | | [Omen 16-n0280nd](/omen/16-n0280nd) | `` | diff --git a/flake.nix b/flake.nix index b925530d..50c21f5d 100644 --- a/flake.nix +++ b/flake.nix @@ -268,6 +268,7 @@ hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; hardkernel-odroid-h3 = import ./hardkernel/odroid-h3; omen-14-fb0798ng = import ./omen/14-fb0798ng; + omen-15-ce002ns = import ./omen/15-ce002ns; omen-15-en0010ca = import ./omen/15-en0010ca; omen-16-n0005ne = import ./omen/16-n0005ne; omen-16-n0280nd = import ./omen/16-n0280nd; diff --git a/omen/15-ce002ns/README.md b/omen/15-ce002ns/README.md new file mode 100644 index 00000000..e5e8529f --- /dev/null +++ b/omen/15-ce002ns/README.md @@ -0,0 +1,31 @@ +# HP Omen 15-ce002ns + +Profile for the following laptop: https://support.hp.com/us-en/document/c05552952 + +```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: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:16.0 Communication controller [0780]: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 [8086:a13a] (rev 31) +00:17.0 SATA controller [0106]: Intel Corporation HM170/QM170 Chipset SATA Controller [AHCI Mode] [8086:a103] (rev 31) +00:1c.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #1 [8086:a110] (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:1c.5 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #6 [8086:a115] (rev f1) +00:1c.6 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #7 [8086:a116] (rev f1) +00:1d.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #9 [8086:a118] (rev f1) +00:1f.0 ISA bridge [0601]: Intel Corporation HM175 Chipset LPC/eSPI Controller [8086:a152] (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) +01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106BM [GeForce GTX 1060 Mobile 6GB] [10de:1c60] (rev a1) +01:00.1 Audio device [0403]: NVIDIA Corporation GP106 High Definition Audio Controller [10de:10f1] (rev a1) +3b:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 16) +3c:00.0 Network controller [0280]: Intel Corporation Wireless 7265 [8086:095a] (rev 61) +3d:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader [10ec:522a] (rev 01) +3e:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961/SM963 [144d:a804] +``` + diff --git a/omen/15-ce002ns/default.nix b/omen/15-ce002ns/default.nix new file mode 100644 index 00000000..c787d3a0 --- /dev/null +++ b/omen/15-ce002ns/default.nix @@ -0,0 +1,11 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../common/cpu/intel/kaby-lake + ../../common/gpu/nvidia/pascal + ../../common/pc/laptop + ../../common/pc/laptop/ssd + ../../common/pc/laptop/hdd + ]; +} From 3883dfe5eead7cbf48c1582297b4ab23e6cb0f31 Mon Sep 17 00:00:00 2001 From: "M. Ian Graham" Date: Thu, 16 Jan 2025 08:43:20 +0900 Subject: [PATCH 1183/1476] gpd/pocket-4: init --- README.md | 1 + flake.nix | 1 + gpd/pocket-4/default.nix | 29 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 gpd/pocket-4/default.nix diff --git a/README.md b/README.md index 5f946f2a..9e8e624f 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,7 @@ See code for all available configurations. | [GPD MicroPC](gpd/micropc) | `` | | [GPD P2 Max](gpd/p2-max) | `` | | [GPD Pocket 3](gpd/pocket-3) | `` | +| [GPD Pocket 4](gpd/pocket-4) | `` | | [GPD WIN 2](gpd/win-2) | `` | | [GPD WIN Max 2 2023](gpd/win-max-2/2023) | `` | | [GPD WIN Mini 2024](gpd/win-mini/2024) | `` | diff --git a/flake.nix b/flake.nix index b925530d..3608efa7 100644 --- a/flake.nix +++ b/flake.nix @@ -121,6 +121,7 @@ gpd-micropc = import ./gpd/micropc; gpd-p2-max = import ./gpd/p2-max; gpd-pocket-3 = import ./gpd/pocket-3; + gpd-pocket-4 = import ./gpd/pocket-4; gpd-win-2 = import ./gpd/win-2; gpd-win-max-2-2023 = import ./gpd/win-max-2/2023; gpd-win-mini-2024 = import ./gpd/win-mini/2024; diff --git a/gpd/pocket-4/default.nix b/gpd/pocket-4/default.nix new file mode 100644 index 00000000..d4c96242 --- /dev/null +++ b/gpd/pocket-4/default.nix @@ -0,0 +1,29 @@ +{ lib, pkgs, ... }: +let inherit (lib) mkDefault; +in +{ + imports = [ + ../../common/pc/laptop + ../../common/pc/laptop/ssd + ../../common/cpu/amd + ../../common/cpu/amd/pstate.nix + ../../common/gpu/amd + ../../common/hidpi.nix + ]; + + boot.kernelParams = [ + # The GPD Pocket 4 uses a tablet LTPS display, that is mounted rotated 90° counter-clockwise + "fbcon=rotate:1" "video=eDP-1:panel_orientation=right_side_up" + ]; + + fonts.fontconfig = { + subpixel.rgba = "vbgr"; # Pixel order for rotated screen + + # The display has √(2560² + 1600²) px / 8.8in ≃ 343 dpi + # Per the documentation, antialiasing, hinting, etc. have no visible effect at such high pixel densities anyhow. + hinting.enable = mkDefault false; + }; + + # More HiDPI settings + services.xserver.dpi = 343; +} From abe22227d7e8ef0077ba863804b3755545fbf5f7 Mon Sep 17 00:00:00 2001 From: Weathercold Date: Sun, 19 Jan 2025 05:47:17 +0000 Subject: [PATCH 1184/1476] xiaomi/redmibook/16-pro-2024: init --- README.md | 1 + flake.nix | 1 + xiaomi/fix-boot-quirk.nix | 12 ++++++++ xiaomi/redmibook/16-pro-2024/README.md | 39 ++++++++++++++++++++++++ xiaomi/redmibook/16-pro-2024/default.nix | 13 ++++++++ 5 files changed, 66 insertions(+) create mode 100644 xiaomi/fix-boot-quirk.nix create mode 100644 xiaomi/redmibook/16-pro-2024/README.md create mode 100644 xiaomi/redmibook/16-pro-2024/default.nix diff --git a/README.md b/README.md index 5f946f2a..13f373e5 100644 --- a/README.md +++ b/README.md @@ -357,3 +357,4 @@ See code for all available configurations. | [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | | [TUXEDO Pulse 14 - Gen3](tuxedo/pulse/14/gen3) | `` | | [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | +| [Xiaomi Redmibook 16 Pro 2024](xiaomi/redmibook/16-pro-2024) | `` | diff --git a/flake.nix b/flake.nix index b925530d..808764ca 100644 --- a/flake.nix +++ b/flake.nix @@ -308,6 +308,7 @@ tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7; tuxedo-pulse-14-gen3 = import ./tuxedo/pulse/14/gen3; tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; + xiaomi-redmibook-16-pro-2024 = import ./xiaomi/redmibook/16-pro-2024; common-cpu-amd = import ./common/cpu/amd; common-cpu-amd-pstate = import ./common/cpu/amd/pstate.nix; diff --git a/xiaomi/fix-boot-quirk.nix b/xiaomi/fix-boot-quirk.nix new file mode 100644 index 00000000..7f8446e3 --- /dev/null +++ b/xiaomi/fix-boot-quirk.nix @@ -0,0 +1,12 @@ +{ lib, ... }: +{ + # Required fix to allow booting NixOS on certain Xiaomi laptops + # https://discourse.nixos.org/t/system-wont-boot-path-efi-stub/29212/12 + boot.kernelPatches = lib.singleton { + name = "Fix boot"; + patch = null; + extraStructuredConfig = with lib.kernel; { + ACPI_DEBUG = yes; + }; + }; +} diff --git a/xiaomi/redmibook/16-pro-2024/README.md b/xiaomi/redmibook/16-pro-2024/README.md new file mode 100644 index 00000000..7fa95c05 --- /dev/null +++ b/xiaomi/redmibook/16-pro-2024/README.md @@ -0,0 +1,39 @@ +# Xiaomi Redmibook 16 Pro (2024) + +Note that the boot fix requires building the kernel. As such, you might run out +of space during nixos-rebuild if you mount tmpfs on `/tmp`. + +## Tested Hardware + +```shellsession +$ lspci -nn +00:00.0 Host bridge [0600]: Intel Corporation Device [8086:7d14] (rev 04) +00:01.0 PCI bridge [0604]: Intel Corporation Device [8086:7ecc] (rev 10) +00:02.0 VGA compatible controller [0300]: Intel Corporation Meteor Lake-P [Intel Arc Graphics] [8086:7d55] (rev 08) +00:04.0 Signal processing controller [1180]: Intel Corporation Meteor Lake-P Dynamic Tuning Technology [8086:7d03] (rev 04) +00:06.0 PCI bridge [0604]: Intel Corporation Device [8086:7e4d] (rev 20) +00:07.0 PCI bridge [0604]: Intel Corporation Meteor Lake-P Thunderbolt 4 PCI Express Root Port #1 [8086:7ec5] (rev 10) +00:08.0 System peripheral [0880]: Intel Corporation Meteor Lake-P Gaussian & Neural-Network Accelerator [8086:7e4c] (rev 20) +00:0a.0 Signal processing controller [1180]: Intel Corporation Meteor Lake-P Platform Monitoring Technology [8086:7d0d] (rev 01) +00:0b.0 Processing accelerators [1200]: Intel Corporation Meteor Lake NPU [8086:7d1d] (rev 04) +00:0d.0 USB controller [0c03]: Intel Corporation Meteor Lake-P Thunderbolt 4 USB Controller [8086:7ec0] (rev 10) +00:0d.2 USB controller [0c03]: Intel Corporation Meteor Lake-P Thunderbolt 4 NHI #0 [8086:7ec2] (rev 10) +00:12.0 Serial controller [0700]: Intel Corporation Meteor Lake-P Integrated Sensor Hub [8086:7e45] (rev 20) +00:14.0 USB controller [0c03]: Intel Corporation Meteor Lake-P USB 3.2 Gen 2x1 xHCI Host Controller [8086:7e7d] (rev 20) +00:14.2 RAM memory [0500]: Intel Corporation Device [8086:7e7f] (rev 20) +00:14.3 Network controller [0280]: Intel Corporation Meteor Lake PCH CNVi WiFi [8086:7e40] (rev 20) +00:15.0 Serial bus controller [0c80]: Intel Corporation Meteor Lake-P Serial IO I2C Controller #0 [8086:7e78] (rev 20) +00:16.0 Communication controller [0780]: Intel Corporation Meteor Lake-P CSME HECI #1 [8086:7e70] (rev 20) +00:1f.0 ISA bridge [0601]: Intel Corporation Device [8086:7e02] (rev 20) +00:1f.3 Multimedia audio controller [0401]: Intel Corporation Meteor Lake-P HD Audio Controller [8086:7e28] (rev 20) +00:1f.4 SMBus [0c05]: Intel Corporation Meteor Lake-P SMBus Controller [8086:7e22] (rev 20) +00:1f.5 Serial bus controller [0c80]: Intel Corporation Meteor Lake-P SPI Controller [8086:7e23] (rev 20) +01:00.0 Non-Volatile memory controller [0108]: SK hynix BC511 NVMe SSD [1c5c:1339] +02:00.0 Non-Volatile memory controller [0108]: Yangtze Memory Technologies Co.,Ltd PC300 NVMe SSD (DRAM-less) [1e49:1033] (rev 03) +``` + +## Extra Configuration + +### Bluetooth + +To enable bluetooth support, set `hardware.bluetooth.enable = true;`. diff --git a/xiaomi/redmibook/16-pro-2024/default.nix b/xiaomi/redmibook/16-pro-2024/default.nix new file mode 100644 index 00000000..ab76680a --- /dev/null +++ b/xiaomi/redmibook/16-pro-2024/default.nix @@ -0,0 +1,13 @@ +{ lib, ... }: +{ + imports = [ + ../../fix-boot-quirk.nix + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + hardware.enableRedistributableFirmware = lib.mkDefault true; + + services.thermald.enable = lib.mkDefault true; +} From cb3173dc5c746fa95bca1f035a7e4d2b588894ac Mon Sep 17 00:00:00 2001 From: Nicky Mouha Date: Sun, 19 Jan 2025 12:07:52 -0500 Subject: [PATCH 1185/1476] include Dell Latitude 549 in flake.nix (#1316) --- README.md | 1 + dell/latitude/5490/default.nix | 2 +- flake.nix | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 13f373e5..a5ee8df8 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,7 @@ See code for all available configurations. | [Dell Inspiron 7460](dell/inspiron/7460) | `` | | [Dell Latitude 3340](dell/latitude/3340) | `` | | [Dell Latitude 3480](dell/latitude/3480) | `` | +| [Dell Latitude 5490](dell/latitude/5490) | `` | | [Dell Latitude 5520](dell/latitude/5520) | `` | | [Dell Latitude 7280](dell/latitude/7280) | `` | | [Dell Latitude 7390](dell/latitude/7390) | `` | diff --git a/dell/latitude/5490/default.nix b/dell/latitude/5490/default.nix index 6cda5680..ee99f414 100644 --- a/dell/latitude/5490/default.nix +++ b/dell/latitude/5490/default.nix @@ -12,7 +12,7 @@ boot = { # Kernel Panic on suspend fix, taken from ArchLinux wiki. - kernelParams = "acpi_enforce_resources=lax i915.enable_dc=0"; + kernelParams = [ "acpi_enforce_resources=lax" "i915.enable_dc=0" ]; # Audio Mute LED extraModprobeConfig = '' options snd-hda-intel model=mute-led-gpio diff --git a/flake.nix b/flake.nix index 808764ca..3a461a74 100644 --- a/flake.nix +++ b/flake.nix @@ -64,6 +64,7 @@ dell-inspiron-7460 = import ./dell/inspiron/7460; dell-latitude-3340 = import ./dell/latitude/3340; dell-latitude-3480 = import ./dell/latitude/3480; + dell-latitude-5490 = import ./dell/latitude/5490; dell-latitude-5520 = import ./dell/latitude/5520; dell-latitude-7280 = import ./dell/latitude/7280; dell-latitude-7390 = import ./dell/latitude/7390; From 1f23785afe405ae924daa395f6000310397f395c Mon Sep 17 00:00:00 2001 From: BohdanQQ <40754203+BohdanQQ@users.noreply.github.com> Date: Sun, 19 Jan 2025 22:00:15 +0100 Subject: [PATCH 1186/1476] lenovo-legion-16ach6h: enable nvidia.powerd to unlock more gpu power --- lenovo/legion/16ach6h/hybrid/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/legion/16ach6h/hybrid/default.nix b/lenovo/legion/16ach6h/hybrid/default.nix index 101a6b35..28a68ba1 100644 --- a/lenovo/legion/16ach6h/hybrid/default.nix +++ b/lenovo/legion/16ach6h/hybrid/default.nix @@ -28,6 +28,7 @@ nvidia = { modesetting.enable = lib.mkDefault true; powerManagement.enable = lib.mkDefault true; + dynamicBoost.enable = lib.mkDefault true; prime = { amdgpuBusId = lib.mkDefault "PCI:5:0:0"; From b5399578399a07741f5a9025445e9e886d4f8d71 Mon Sep 17 00:00:00 2001 From: BohdanQQ <40754203+BohdanQQ@users.noreply.github.com> Date: Sun, 19 Jan 2025 22:59:42 +0100 Subject: [PATCH 1187/1476] update readme to mention power profile / nvidia-powerd troubleshooting --- lenovo/legion/16ach6h/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lenovo/legion/16ach6h/README.md b/lenovo/legion/16ach6h/README.md index 19f6c247..420330f8 100644 --- a/lenovo/legion/16ach6h/README.md +++ b/lenovo/legion/16ach6h/README.md @@ -9,6 +9,12 @@ When using more than one drive, the value of `hardware.nvidia.prime.amdgpuBusId` Make sure you override this default in your personal configuration. For two drives, it should be `PCI:6:0:0`. +## Using and troubleshooting power profiles (hybrid-only) + +Power profile support (cycled via Fn + Q) is provided by `nvidia-powerd`. +Should you encounter issues with the `nvidia-powerd` daemon, +override the value of `hardware.nvidia.dynamicBoost.enable` to `false` in your personal configuration (and consider creating an issue if one does not exist). + ## Setup at the time of testing ``` $ nix-info -m From 61c79181e77ef774ab0468b28a24bc2647d498d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Klecanda?= Date: Sat, 28 Dec 2024 21:14:45 +0100 Subject: [PATCH 1188/1476] feat: HP probook 440G5 config --- README.md | 3 ++- flake.nix | 1 + hp/probook/440G5/default.nix | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 hp/probook/440G5/default.nix diff --git a/README.md b/README.md index 4c25e9aa..b71337bb 100644 --- a/README.md +++ b/README.md @@ -191,8 +191,9 @@ See code for all available configurations. | [HP Elitebook 845g7](hp/elitebook/845/g7) | `` | | [HP Elitebook 845g8](hp/elitebook/845/g8) | `` | | [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | -| [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | | [HP Laptop 14s-dq2024nf](hp/laptop/14s-dq2024nf) | `` | +| [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | +| [HP Probook 440G5](hp/probook/440g5) | `` | | [Huawei Matebook X Pro (2020)](huawei/machc-wa) | `` | | [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | diff --git a/flake.nix b/flake.nix index ceb2bf40..c30a3853 100644 --- a/flake.nix +++ b/flake.nix @@ -131,6 +131,7 @@ hp-elitebook-845g7 = import ./hp/elitebook/845/g7; hp-elitebook-845g8 = import ./hp/elitebook/845/g8; hp-elitebook-845g9 = import ./hp/elitebook/845/g9; + hp-probook-440G5 = import ./hp/probook/440G5; hp-laptop-14s-dq2024nf = import ./hp/laptop/14s-dq2024nf; huawei-machc-wa = import ./huawei/machc-wa; hp-notebook-14-df0023 = import ./hp/notebook/14-df0023; diff --git a/hp/probook/440G5/default.nix b/hp/probook/440G5/default.nix new file mode 100644 index 00000000..7cc5a234 --- /dev/null +++ b/hp/probook/440G5/default.nix @@ -0,0 +1,16 @@ +{ config, lib, ... }: + +{ + # https://www.intel.com/content/www/us/en/products/sku/124967/intel-core-i58250u-processor-6m-cache-up-to-3-40-ghz/specifications.html + # this one works: https://nixos.wiki/wiki/Accelerated_Video_Playback + imports = [ + ../../../common/cpu/intel/kaby-lake + ../../../common/pc + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + config = { + services.thermald.enable = lib.mkDefault true; + }; +} From 8b5ef47338c924c827c00dec69cf7108744fe199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Tue, 21 Jan 2025 20:45:41 +0100 Subject: [PATCH 1189/1476] framework/13-inch/12th-gen-intel: add hdmi audio fix See https://community.frame.work/t/hdmi-audio-output/9523/23 for more details Tested on framework 13th gen Would need somebody to test this on 12th gen aswell --- framework/13-inch/12th-gen-intel/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/framework/13-inch/12th-gen-intel/default.nix b/framework/13-inch/12th-gen-intel/default.nix index 4cce4446..a4f78e6d 100644 --- a/framework/13-inch/12th-gen-intel/default.nix +++ b/framework/13-inch/12th-gen-intel/default.nix @@ -11,6 +11,13 @@ # same as 13th gen framework 13-inch hardware.framework.laptop13.audioEnhancement.rawDeviceName = lib.mkDefault "alsa_output.pci-0000_00_1f.3.analog-stereo"; } + { + # fix hdmi audio + # src https://community.frame.work/t/hdmi-audio-output/9523/23 + boot.extraModprobeConfig = '' + options snd-intel-dspcfg dsp_driver=3 + ''; + } # https://community.frame.work/t/tracking-hard-freezing-on-fedora-36-with-the-new-12th-gen-system/20675/391 (lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.2") { boot.kernelParams = [ From 63c0f02ce5d85f721871dda4be86894ba6b555dd Mon Sep 17 00:00:00 2001 From: Brian McGillion Date: Thu, 23 Jan 2025 00:17:20 +0400 Subject: [PATCH 1190/1476] nxp-imx: fix unused modules errors https://github.com/NixOS/nixpkgs/pull/366004 introduced a breaking change that if a module is declared but it is not being used it will fail. Signed-off-by: Brian McGillion --- nxp/common/bsp/linux-imx8.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nxp/common/bsp/linux-imx8.nix b/nxp/common/bsp/linux-imx8.nix index 926a0475..f57e8aee 100644 --- a/nxp/common/bsp/linux-imx8.nix +++ b/nxp/common/bsp/linux-imx8.nix @@ -10,6 +10,13 @@ buildLinux (args // rec { defconfig = "imx_v8_defconfig"; + # https://github.com/NixOS/nixpkgs/pull/366004 + # introduced a breaking change that if a module is declared but it is not being used it will fail + # if you try to suppress each of he errors e.g. + # REISERFS_FS_SECURITY = lib.mkForce unset; within structuredExtraConfig + # that list runs to a long 100+ modules so we go back to the previous default and ignore them + ignoreConfigErrors = true; + kernelPatches = [ ]; From 6209032a7c5c88f5c8fcd94a0b13f8177d828729 Mon Sep 17 00:00:00 2001 From: Brian McGillion Date: Thu, 23 Jan 2025 01:03:03 +0400 Subject: [PATCH 1191/1476] fix the unused module error accross all imx8 this fixes the unused modules error that wad introduced by https://github.com/NixOS/nixpkgs/pull/366004 Signed-off-by: Brian McGillion --- nxp/common/bsp/linux-imx8.nix | 93 +++++++++++++++-------------- nxp/imx8mp-evk/bsp/imx8mp-linux.nix | 92 +++++++++++++++------------- nxp/imx8mq-evk/bsp/imx8mq-linux.nix | 4 ++ 3 files changed, 100 insertions(+), 89 deletions(-) diff --git a/nxp/common/bsp/linux-imx8.nix b/nxp/common/bsp/linux-imx8.nix index f57e8aee..334907b2 100644 --- a/nxp/common/bsp/linux-imx8.nix +++ b/nxp/common/bsp/linux-imx8.nix @@ -1,56 +1,57 @@ -{ pkgs, ... } @ args: +{ pkgs, ... }@args: with pkgs; -buildLinux (args // rec { - version = "5.15.71"; +buildLinux ( + args + // rec { + version = "5.15.71"; - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = version; + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = version; - defconfig = "imx_v8_defconfig"; + defconfig = "imx_v8_defconfig"; - # https://github.com/NixOS/nixpkgs/pull/366004 - # introduced a breaking change that if a module is declared but it is not being used it will fail - # if you try to suppress each of he errors e.g. - # REISERFS_FS_SECURITY = lib.mkForce unset; within structuredExtraConfig - # that list runs to a long 100+ modules so we go back to the previous default and ignore them - ignoreConfigErrors = true; + # https://github.com/NixOS/nixpkgs/pull/366004 + # introduced a breaking change that if a module is declared but it is not being used it will fail. + ignoreConfigErrors = true; - kernelPatches = [ - ]; + kernelPatches = [ + ]; - autoModules = false; + autoModules = false; - extraConfig = '' - CRYPTO_TLS m - TLS 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 - ''; + extraConfig = '' + CRYPTO_TLS m + TLS 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 + ''; - src = fetchFromGitHub { - owner = "nxp-imx"; - repo = "linux-imx"; - # tag: refs/tags/lf-5.15.71-2.2.0 - rev = "3313732e9984cb8a6b10a9085c7e18d58e770d56"; - sha256 = "sha256-PBRiSgjPOq4keiwPOfNOswf1Zzdbn6YOjpOgv4/Oscc="; - }; -} // (args.argsOverride or { })) + src = fetchFromGitHub { + owner = "nxp-imx"; + repo = "linux-imx"; + # tag: refs/tags/lf-5.15.71-2.2.0 + rev = "3313732e9984cb8a6b10a9085c7e18d58e770d56"; + sha256 = "sha256-PBRiSgjPOq4keiwPOfNOswf1Zzdbn6YOjpOgv4/Oscc="; + }; + } + // (args.argsOverride or { }) +) diff --git a/nxp/imx8mp-evk/bsp/imx8mp-linux.nix b/nxp/imx8mp-evk/bsp/imx8mp-linux.nix index c7b75402..70b8370a 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-linux.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-linux.nix @@ -1,50 +1,56 @@ -{pkgs, ...} @ args: +{ pkgs, ... }@args: with pkgs; - buildLinux (args - // rec { - version = "6.1.55"; - name = "imx8mp-linux"; +buildLinux ( + args + // rec { + version = "6.1.55"; + name = "imx8mp-linux"; - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = version; + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = version; - defconfig = "imx_v8_defconfig"; + defconfig = "imx_v8_defconfig"; - kernelPatches = [ - ]; + # https://github.com/NixOS/nixpkgs/pull/366004 + # introduced a breaking change that if a module is declared but it is not being used it will faill. + ignoreConfigErrors = true; - autoModules = false; + kernelPatches = [ + ]; - extraConfig = '' - CRYPTO_TLS m - TLS 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 - ''; + autoModules = false; - src = fetchFromGitHub { - owner = "nxp-imx"; - repo = "linux-imx"; - # tag: lf-6.1.55-2.2.0 - rev = "770c5fe2c1d1529fae21b7043911cd50c6cf087e"; - sha256 = "sha256-tIWt75RUrjB6KmUuAYBVyAC1dmVGSUAgqV5ROJh3xU0="; - }; - } - // (args.argsOverride or {})) + extraConfig = '' + CRYPTO_TLS m + TLS 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 + ''; + + src = fetchFromGitHub { + owner = "nxp-imx"; + repo = "linux-imx"; + # tag: lf-6.1.55-2.2.0 + rev = "770c5fe2c1d1529fae21b7043911cd50c6cf087e"; + sha256 = "sha256-tIWt75RUrjB6KmUuAYBVyAC1dmVGSUAgqV5ROJh3xU0="; + }; + } + // (args.argsOverride or { }) +) diff --git a/nxp/imx8mq-evk/bsp/imx8mq-linux.nix b/nxp/imx8mq-evk/bsp/imx8mq-linux.nix index 247061d8..8e433b8c 100644 --- a/nxp/imx8mq-evk/bsp/imx8mq-linux.nix +++ b/nxp/imx8mq-evk/bsp/imx8mq-linux.nix @@ -10,6 +10,10 @@ with pkgs; defconfig = "imx_v8_defconfig"; + # https://github.com/NixOS/nixpkgs/pull/366004 + # introduced a breaking change that if a module is declared but it is not being used it will faill. + ignoreConfigErrors = true; + kernelPatches = [ ]; From cbefe8bde7399864cb100f9dc115edd818cbab3b Mon Sep 17 00:00:00 2001 From: Sandro Date: Fri, 24 Jan 2025 14:02:02 +0100 Subject: [PATCH 1192/1476] Fix doc build by adding missing defaultText --- framework/kmod.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/kmod.nix b/framework/kmod.nix index 3fc99659..6ed05b9a 100644 --- a/framework/kmod.nix +++ b/framework/kmod.nix @@ -9,6 +9,7 @@ in { default = lib.and (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05") kernel_version_compatible; + defaultText = "enabled by default on NixOS >= 24.05 and kernel >= 6.10"; }; From 3a123626d98d332c7cac5b5ca185d94a115a5464 Mon Sep 17 00:00:00 2001 From: matthiasdotsh Date: Thu, 23 Jan 2025 18:49:14 +0100 Subject: [PATCH 1193/1476] surface: linux 6.12.9 -> 6.12.11 --- microsoft/surface/common/kernel/linux-surface/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-surface/default.nix b/microsoft/surface/common/kernel/linux-surface/default.nix index 7db09d2d..b4766518 100644 --- a/microsoft/surface/common/kernel/linux-surface/default.nix +++ b/microsoft/surface/common/kernel/linux-surface/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.12.9"; + version = "6.12.11"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "sha256-h74DYN8JMbNA0rrDUWGlSAcPvDqMNSxJ4h6WZmwmrrQ="; + sha256 = "sha256-R1Fy/b2HoVPxI6V5Umcudzvbba9bWKQX0aXkGfz+7Ek="; ignoreConfigErrors=true; }; From c2aa5756c0ee18607c38f7db54a424e98618b0b3 Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Thu, 23 Jan 2025 19:20:48 +0100 Subject: [PATCH 1194/1476] onenetbook/4: update stylus patch for 6.12 --- .../4/goodix-stylus-mastykin/6.12.patch.patch | 27 +++++++++++++++++++ .../4/goodix-stylus-mastykin/default.nix | 10 ++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 onenetbook/4/goodix-stylus-mastykin/6.12.patch.patch diff --git a/onenetbook/4/goodix-stylus-mastykin/6.12.patch.patch b/onenetbook/4/goodix-stylus-mastykin/6.12.patch.patch new file mode 100644 index 00000000..2699e0d2 --- /dev/null +++ b/onenetbook/4/goodix-stylus-mastykin/6.12.patch.patch @@ -0,0 +1,27 @@ +--- orig.patch 2025-01-23 19:34:37.216154507 +0100 ++++ updated-6.12.patch 2025-01-23 19:36:28.316333973 +0100 +@@ -11,10 +11,10 @@ + #define MT_QUIRK_NOT_SEEN_MEANS_UP BIT(0) + #define MT_QUIRK_SLOT_IS_CONTACTID BIT(1) + @@ -70,6 +73,7 @@ +- #define MT_QUIRK_WIN8_PTP_BUTTONS BIT(18) +- #define MT_QUIRK_SEPARATE_APP_REPORT BIT(19) + #define MT_QUIRK_FORCE_MULTI_INPUT BIT(20) +-+#define MT_QUIRK_NON_MT_PEN BIT(21) ++ #define MT_QUIRK_DISABLE_WAKEUP BIT(21) ++ #define MT_QUIRK_ORIENTATION_INVERT BIT(22) +++#define MT_QUIRK_NON_MT_PEN BIT(23) + + #define MT_INPUTMODE_TOUCHSCREEN 0x02 + #define MT_INPUTMODE_TOUCHPAD 0x03 +@@ -41,9 +41,9 @@ + #define MT_CLS_RAZER_BLADE_STEALTH 0x0112 + #define MT_CLS_SMART_TECH 0x0113 + +#define MT_CLS_NON_MT_PEN 0x0114 ++ #define MT_CLS_SIS 0x0457 + + #define MT_DEFAULT_MAXCONTACT 10 +- #define MT_MAX_MAXCONTACT 250 + @@ -374,6 +383,9 @@ + MT_QUIRK_CONTACT_CNT_ACCURATE | + MT_QUIRK_SEPARATE_APP_REPORT, diff --git a/onenetbook/4/goodix-stylus-mastykin/default.nix b/onenetbook/4/goodix-stylus-mastykin/default.nix index 3a6c0e00..14c5e5cd 100644 --- a/onenetbook/4/goodix-stylus-mastykin/default.nix +++ b/onenetbook/4/goodix-stylus-mastykin/default.nix @@ -18,8 +18,16 @@ let cat ${patch1_original} > $out ${patch}/bin/patch $out < ${./6.1.patch.patch} ''; + patch1_updated_6_12 = runCommand + "goodix-stylus-mastykin-1-pen-support-6.12.patch" {} + '' + cat ${patch1_original} > $out + ${patch}/bin/patch $out < ${./6.12.patch.patch} + ''; patch1 = - if (lib.versionAtLeast kernel.version "6.1") then + if (lib.versionAtLeast kernel.version "6.12") then + patch1_updated_6_12 + else if (lib.versionAtLeast kernel.version "6.1") then patch1_updated_6_1 else if (lib.versionAtLeast kernel.version "5.12.12") then patch1_updated_5_12_12 From 7659093598c593aafb3e3ecd6a1ea9e6e2023faf Mon Sep 17 00:00:00 2001 From: "M. Ian Graham" Date: Thu, 23 Jan 2025 12:06:09 +0900 Subject: [PATCH 1195/1476] gpd/pocket-4: default kernel version to 6.12 to fix amdgpu error --- gpd/pocket-4/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/gpd/pocket-4/default.nix b/gpd/pocket-4/default.nix index d4c96242..36a6a0a7 100644 --- a/gpd/pocket-4/default.nix +++ b/gpd/pocket-4/default.nix @@ -1,5 +1,5 @@ { lib, pkgs, ... }: -let inherit (lib) mkDefault; +let inherit (lib) mkIf mkDefault; in { imports = [ @@ -11,10 +11,15 @@ in ../../common/hidpi.nix ]; - boot.kernelParams = [ - # The GPD Pocket 4 uses a tablet LTPS display, that is mounted rotated 90° counter-clockwise - "fbcon=rotate:1" "video=eDP-1:panel_orientation=right_side_up" - ]; + boot = { + # As of kernel version 6.6.72, amdgpu throws a fatal error during init, resulting in a barely-working display + kernelPackages = mkIf (lib.versionOlder pkgs.linux.version "6.12") pkgs.linuxPackages_latest; + + kernelParams = [ + # The GPD Pocket 4 uses a tablet LTPS display, that is mounted rotated 90° counter-clockwise + "fbcon=rotate:1" "video=eDP-1:panel_orientation=right_side_up" + ]; + }; fonts.fontconfig = { subpixel.rgba = "vbgr"; # Pixel order for rotated screen From dfad538f751a5aa5d4436d9781ab27a6128ec9d4 Mon Sep 17 00:00:00 2001 From: Alex Robbins Date: Tue, 21 Jan 2025 15:06:43 -0800 Subject: [PATCH 1196/1476] dell/latitude/7420: init --- README.md | 1 + dell/latitude/7420/default.nix | 9 +++++++++ flake.nix | 1 + 3 files changed, 11 insertions(+) create mode 100644 dell/latitude/7420/default.nix diff --git a/README.md b/README.md index b71337bb..0e503cf2 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,7 @@ See code for all available configurations. | [Dell Latitude 5520](dell/latitude/5520) | `` | | [Dell Latitude 7280](dell/latitude/7280) | `` | | [Dell Latitude 7390](dell/latitude/7390) | `` | +| [Dell Latitude 7420](dell/latitude/7420) | `` | | [Dell Latitude 7430](dell/latitude/7430) | `` | | [Dell Latitude 7490](dell/latitude/7490) | `` | | [Dell Latitude 9430](dell/latitude/9430) | `` | diff --git a/dell/latitude/7420/default.nix b/dell/latitude/7420/default.nix new file mode 100644 index 00000000..a100101a --- /dev/null +++ b/dell/latitude/7420/default.nix @@ -0,0 +1,9 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel/tiger-lake + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; +} diff --git a/flake.nix b/flake.nix index c30a3853..fb165c0e 100644 --- a/flake.nix +++ b/flake.nix @@ -68,6 +68,7 @@ dell-latitude-5520 = import ./dell/latitude/5520; dell-latitude-7280 = import ./dell/latitude/7280; dell-latitude-7390 = import ./dell/latitude/7390; + dell-latitude-7420 = import ./dell/latitude/7420; dell-latitude-7430 = import ./dell/latitude/7430; dell-latitude-7490 = import ./dell/latitude/7490; dell-latitude-9430 = import ./dell/latitude/9430; From 3009bcb058c036bf8312079da701146663dcf971 Mon Sep 17 00:00:00 2001 From: Joe <48526917+jblsp@users.noreply.github.com> Date: Tue, 28 Jan 2025 19:07:31 +0000 Subject: [PATCH 1197/1476] lenovo/thinkpad/t490s: init --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/t490s/default.nix | 9 +++++++++ 3 files changed, 11 insertions(+) create mode 100644 lenovo/thinkpad/t490s/default.nix diff --git a/README.md b/README.md index 0e503cf2..b02b7008 100644 --- a/README.md +++ b/README.md @@ -265,6 +265,7 @@ See code for all available configurations. | [Lenovo ThinkPad T480](lenovo/thinkpad/t480) | `` | | [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `` | | [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | +| [Lenovo ThinkPad T490s](lenovo/thinkpad/t490s) | `` | | [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | | [Lenovo ThinkPad T520](lenovo/thinkpad/t520) | `` | | [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | diff --git a/flake.nix b/flake.nix index fb165c0e..14e32a74 100644 --- a/flake.nix +++ b/flake.nix @@ -206,6 +206,7 @@ lenovo-thinkpad-t480 = import ./lenovo/thinkpad/t480; lenovo-thinkpad-t480s = import ./lenovo/thinkpad/t480s; lenovo-thinkpad-t490 = import ./lenovo/thinkpad/t490; + lenovo-thinkpad-t490s = import ./lenovo/thinkpad/t490s; lenovo-thinkpad-t495 = import ./lenovo/thinkpad/t495; lenovo-thinkpad-t520 = import ./lenovo/thinkpad/t520; lenovo-thinkpad-w520 = import ./lenovo/thinkpad/w520; diff --git a/lenovo/thinkpad/t490s/default.nix b/lenovo/thinkpad/t490s/default.nix new file mode 100644 index 00000000..35a0055b --- /dev/null +++ b/lenovo/thinkpad/t490s/default.nix @@ -0,0 +1,9 @@ +{lib, ...}: { + imports = [ + ../../../common/cpu/intel + ../../../common/pc/ssd + ../. + ]; + + services.throttled.enable = lib.mkDefault true; +} From 95c8efc0cb78ed190c03c6bd97f6dbbcdc0caaf8 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Tue, 28 Jan 2025 18:09:40 +0800 Subject: [PATCH 1198/1476] apple/t2: remove apple_set_os loader option the functionality of apple_set_os was upstreamed to the kernel a while ago and the loader is no longer needed. --- apple/t2/default.nix | 52 ++++++++------------------------------------ 1 file changed, 9 insertions(+), 43 deletions(-) diff --git a/apple/t2/default.nix b/apple/t2/default.nix index c1f212cf..9eb8ff3c 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -24,25 +24,6 @@ let pipewirePackage = overrideAudioFiles pkgs.pipewire "spa/plugins/"; - apple-set-os-loader-installer = pkgs.stdenv.mkDerivation { - name = "apple-set-os-loader-installer-1.0"; - src = pkgs.fetchFromGitHub { - owner = "Redecorating"; - repo = "apple_set_os-loader"; - rev = "r33.9856dc4"; - sha256 = "hvwqfoF989PfDRrwU0BMi69nFjPeOmSaD6vR6jIRK2Y="; - }; - buildInputs = [ pkgs.gnu-efi ]; - buildPhase = '' - substituteInPlace Makefile --replace "/usr" '$(GNU_EFI)' - export GNU_EFI=${pkgs.gnu-efi} - make - ''; - installPhase = '' - install -D bootx64_silent.efi $out/bootx64.efi - ''; - }; - t2Cfg = config.hardware.apple-t2; in @@ -52,13 +33,16 @@ in The hardware.apple-t2.enableTinyDfr option was deprecated and removed since upstream Nixpkgs now has an identical module. Please migrate to hardware.apple.touchBar. '') + + (lib.mkRemovedOptionModule ["hardware" "apple-t2" "enableAppleSetOsLoader"] '' + The hardware.apple-t2.enableAppleSetOsLoader option was removed as the apple_set_os functionality was integrated into the kernel. + Please uninstall the loader by replacing /esp/EFI/BOOTX64.EFI with /esp/EFI/BOOTX64_original.EFI, where esp is the EFI partition mount point. + + If you have a device with an AMD dGPU and would like to keep using the iGPU, please set hardware.apple-t2.enableIGPU to true. + '') ]; options.hardware.apple-t2 = { - enableAppleSetOsLoader = lib.mkOption { - default = false; - type = lib.types.bool; - description = "Whether to enable the appleSetOsLoader activation script."; - }; + enableIGPU = lib.mkEnableOption "the usage of the iGPU on specific Apple devices with an AMD dGPU"; }; config = lib.mkMerge [ @@ -82,25 +66,7 @@ in # Make sure post-resume.service exists powerManagement.enable = true; } - (lib.mkIf t2Cfg.enableAppleSetOsLoader { - # Activation script to install apple-set-os-loader in order to unlock the iGPU - system.activationScripts.appleSetOsLoader = '' - if [[ -e /boot/efi/efi/boot/bootx64_original.efi ]]; then - true # It's already installed, no action required - elif [[ -e /boot/efi/efi/boot/bootx64.efi ]]; then - # Copy the new bootloader to a temporary location - cp ${apple-set-os-loader-installer}/bootx64.efi /boot/efi/efi/boot/bootx64_temp.efi - - # Rename the original bootloader - mv /boot/efi/efi/boot/bootx64.efi /boot/efi/efi/boot/bootx64_original.efi - - # Move the new bootloader to the final destination - mv /boot/efi/efi/boot/bootx64_temp.efi /boot/efi/efi/boot/bootx64.efi - else - echo "Error: /boot/efi/efi/boot/bootx64.efi is missing" >&2 - fi - ''; - + (lib.mkIf t2Cfg.enableIGPU { # Enable the iGPU by default if present environment.etc."modprobe.d/apple-gmux.conf".text = '' options apple-gmux force_igd=y From 21fa58535d4a77283e4a85dccaf05dd0cf7af800 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Tue, 28 Jan 2025 18:25:06 +0800 Subject: [PATCH 1199/1476] apple/t2: kernel 6.12.4 -> 6.13 --- apple/t2/pkgs/linux-t2.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index 39f49505..6b0696f3 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -2,19 +2,19 @@ , ... } @ args: let - version = "6.12.4"; + version = "6.13"; majorVersion = lib.elemAt (lib.take 1 (lib.splitVersion version)) 0; patchRepo = fetchFromGitHub { owner = "t2linux"; repo = "linux-t2-patches"; - rev = "539eea1f9127f1623794ee8c7ccc37e8b00f60a3"; - hash = "sha256-pFeNOLTqnEupyEZDk+fX/5GFpobvN+L7Wv2K6V5Xx9g="; + rev = "07cba1a25b43834f24f8be302bd025f2f89493c5"; + hash = "sha256-kRSzqOApTmTTv3rfNmP9/RQ7zV4jptlEOLWixtgwTLk="; }; kernel = fetchzip { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-SiQzaqraT/5s6Mown8/DeOWU7VR3IG0ojvkqThO09+0="; + hash = "sha256-FD22KmTFrIhED5X3rcjPTot1UOq1ir1zouEpRWZkRC0="; }; in buildLinux (args // { From 34b64e4e1ddb14e3ffc7db8d4a781396dbbab773 Mon Sep 17 00:00:00 2001 From: XADE <56511165+imxade@users.noreply.github.com> Date: Sun, 26 Jan 2025 13:33:13 +0530 Subject: [PATCH 1200/1476] dell-inspiron-3442: init --- README.md | 1 + dell/inspiron/3442/README.md | 35 ++++++++++++++++++++++++++++++++++ dell/inspiron/3442/default.nix | 22 +++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 dell/inspiron/3442/README.md create mode 100644 dell/inspiron/3442/default.nix diff --git a/README.md b/README.md index b02b7008..070f9cdd 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ See code for all available configurations. | [Chuwi MiniBook X](chuwi/minibook-x) | `` | | [Deciso DEC series](deciso/dec) | `` | | [Dell G3 3779](dell/g3/3779) | `` | +| [Dell Inspiron 3442](dell/inspiron/3442) | `` | | [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | | [Dell Inspiron 5509](dell/inspiron/5509) | `` | | [Dell Inspiron 5515](dell/inspiron/5515) | `` | diff --git a/dell/inspiron/3442/README.md b/dell/inspiron/3442/README.md new file mode 100644 index 00000000..b7e6e0f5 --- /dev/null +++ b/dell/inspiron/3442/README.md @@ -0,0 +1,35 @@ +## Dell Inspiron 3442 + +### Tested Hardware + +```shellsession +$ lspci -nn + +00:00.0 Host bridge [0600]: Intel Corporation Haswell-ULT DRAM Controller [8086:0a04] (rev 0b) +00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 0b) +00:03.0 Audio device [0403]: Intel Corporation Haswell-ULT HD Audio Controller [8086:0a0c] (rev 0b) +00:14.0 USB controller [0c03]: Intel Corporation 8 Series USB xHCI HC [8086:9c31] (rev 04) +00:16.0 Communication controller [0780]: Intel Corporation 8 Series HECI #0 [8086:9c3a] (rev 04) +00:1b.0 Audio device [0403]: Intel Corporation 8 Series HD Audio Controller [8086:9c20] (rev 04) +00:1c.0 PCI bridge [0604]: Intel Corporation 8 Series PCI Express Root Port 1 [8086:9c10] (rev e4) +00:1c.2 PCI bridge [0604]: Intel Corporation 8 Series PCI Express Root Port 3 [8086:9c14] (rev e4) +00:1c.3 PCI bridge [0604]: Intel Corporation 8 Series PCI Express Root Port 4 [8086:9c16] (rev e4) +00:1d.0 USB controller [0c03]: Intel Corporation 8 Series USB EHCI #1 [8086:9c26] (rev 04) +00:1f.0 ISA bridge [0601]: Intel Corporation 8 Series LPC Controller [8086:9c45] (rev 04) +00:1f.2 SATA controller [0106]: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] [8086:9c03] (rev 04) +00:1f.3 SMBus [0c05]: Intel Corporation 8 Series SMBus Controller [8086:9c22] (rev 04) +06:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n [14e4:4365] (rev 01) +07:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller [10ec:8136] (rev 07) + +``` + +### Extra Configuration + +#### Bluetooth + +To enable bluetooth support, set `hardware.bluetooth.enable = true;`. + +### Firmware Upgrades + +This device is partially supported by [fwupd](https://fwupd.org). +Use `fwupdmgr` to perform updates. diff --git a/dell/inspiron/3442/default.nix b/dell/inspiron/3442/default.nix new file mode 100644 index 00000000..44b65ce6 --- /dev/null +++ b/dell/inspiron/3442/default.nix @@ -0,0 +1,22 @@ +{ config, lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/gpu/intel/haswell + ]; + + hardware.enableAllFirmware = lib.mkDefault true; + + services = { + fwupd.enable = lib.mkDefault true; + thermald.enable = lib.mkDefault true; + }; + + boot = { + # needs to be explicitly loaded or else bluetooth/wifi won't work. + kernelModules = [ "wl" ]; + extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + }; +} From b8be6f78b073bbb5368b085953ba366c132eccf5 Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Sun, 2 Feb 2025 13:10:46 +1100 Subject: [PATCH 1201/1476] codeowners: remove tomfitzhenry from pinebook-pro I no longer use this. --- CODEOWNERS | 1 - 1 file changed, 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index b197a5b2..367aaafa 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -5,7 +5,6 @@ dell/xps/15-9560 @Lyndeno lenovo/thinkpad/x230 @makefu @yegortimoshenko lenovo/thinkpad/x250 @Mic92 pcengines/apu @yegortimoshenko -pine64/pinebook-pro @tomfitzhenry pine64/rockpro64 @tomfitzhenry pine64/star64 @fgaz purism/librem/13v3 @yegortimoshenko From da7014af5d1a09f91d7125246ad967a99d412b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 6 Feb 2025 10:45:53 +0700 Subject: [PATCH 1202/1476] Revert "framework/13-inch/12th-gen-intel: add hdmi audio fix" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 8b5ef47338c924c827c00dec69cf7108744fe199. fixes https://github.com/NixOS/nixos-hardware/issues/1362 Signed-off-by: Jörg Thalheim --- framework/13-inch/12th-gen-intel/default.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/framework/13-inch/12th-gen-intel/default.nix b/framework/13-inch/12th-gen-intel/default.nix index a4f78e6d..4cce4446 100644 --- a/framework/13-inch/12th-gen-intel/default.nix +++ b/framework/13-inch/12th-gen-intel/default.nix @@ -11,13 +11,6 @@ # same as 13th gen framework 13-inch hardware.framework.laptop13.audioEnhancement.rawDeviceName = lib.mkDefault "alsa_output.pci-0000_00_1f.3.analog-stereo"; } - { - # fix hdmi audio - # src https://community.frame.work/t/hdmi-audio-output/9523/23 - boot.extraModprobeConfig = '' - options snd-intel-dspcfg dsp_driver=3 - ''; - } # https://community.frame.work/t/tracking-hard-freezing-on-fedora-36-with-the-new-12th-gen-system/20675/391 (lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.2") { boot.kernelParams = [ From d9819a6791f7e7eec0bbbaf1b79d2e0c1879b183 Mon Sep 17 00:00:00 2001 From: Samuel <60676867+sjhaleprogrammer@users.noreply.github.com> Date: Fri, 24 Jan 2025 21:43:40 -0500 Subject: [PATCH 1203/1476] Update default.nix --- asus/flow/gv302x/nvidia/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/asus/flow/gv302x/nvidia/default.nix b/asus/flow/gv302x/nvidia/default.nix index 3496a0a5..0c490c93 100644 --- a/asus/flow/gv302x/nvidia/default.nix +++ b/asus/flow/gv302x/nvidia/default.nix @@ -30,9 +30,6 @@ in { amdgpu.initrd.enable = mkDefault true; nvidia = { - - #to avoid problems with gnome 47 vulkan - package = mkDefault config.boot.kernelPackages.nvidiaPackages.beta; modesetting.enable = true; nvidiaSettings = mkDefault true; From 240f698fc8ff5dd089416e0dd34ad762373b6e5c Mon Sep 17 00:00:00 2001 From: aMerryElk Date: Mon, 3 Feb 2025 15:24:12 -0300 Subject: [PATCH 1204/1476] Added profile for Dell G3 3579 laptop --- README.md | 1 + dell/g3/3579/default.nix | 32 ++++++++++++++++++++++++++++++++ flake.nix | 1 + 3 files changed, 34 insertions(+) create mode 100644 dell/g3/3579/default.nix diff --git a/README.md b/README.md index 070f9cdd..4f514263 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ See code for all available configurations. | [Chuwi MiniBook X](chuwi/minibook-x) | `` | | [Deciso DEC series](deciso/dec) | `` | | [Dell G3 3779](dell/g3/3779) | `` | +| [Dell G3 3579](dell/g3/3579) | `` | | [Dell Inspiron 3442](dell/inspiron/3442) | `` | | [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | | [Dell Inspiron 5509](dell/inspiron/5509) | `` | diff --git a/dell/g3/3579/default.nix b/dell/g3/3579/default.nix new file mode 100644 index 00000000..e5246c4c --- /dev/null +++ b/dell/g3/3579/default.nix @@ -0,0 +1,32 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel/coffee-lake + ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/pascal + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + # Specify bus id of Nvidia and Intel graphics + hardware.nvidia.prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + + # Cooling management + services.thermald.enable = lib.mkDefault true; + + boot = { + # Use same ACPI identifier as Dell Ubuntu + kernelParams = [ "acpi_osi=Linux-Dell-Video" ]; + + # Enable fan sensors. + kernelModules = [ "dell-smm-hwmon" ]; + + # Forces the driver to load on unknown hardware + extraModprobeConfig = "options dell-smm-hwmon ignore_dmi=1"; + # NOTE: PWM fan control compatibility needs explicit whitelisting in the kernel driver's code. + }; +} diff --git a/flake.nix b/flake.nix index 14e32a74..50264dd1 100644 --- a/flake.nix +++ b/flake.nix @@ -57,6 +57,7 @@ deciso-dec = import ./deciso/dec; dell-e7240 = import ./dell/e7240; dell-g3-3779 = import ./dell/g3/3779; + dell-g3-3579 = import ./dell/g3/3579; dell-inspiron-14-5420 = import ./dell/inspiron/14-5420; dell-inspiron-5509 = import ./dell/inspiron/5509; dell-inspiron-5515 = import ./dell/inspiron/5515; From d85ec4b3c6d2253f58cb1b28bda1213fbde66fe9 Mon Sep 17 00:00:00 2001 From: Wanja Hentze Date: Sun, 2 Feb 2025 02:41:04 +0100 Subject: [PATCH 1205/1476] hardkernel/odroid-h4: init --- README.md | 1 + flake.nix | 1 + hardkernel/odroid-h4/default.nix | 5 +++++ 3 files changed, 7 insertions(+) create mode 100644 hardkernel/odroid-h4/default.nix diff --git a/README.md b/README.md index 4f514263..abcdfb67 100644 --- a/README.md +++ b/README.md @@ -325,6 +325,7 @@ See code for all available configurations. | [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | | [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | | [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | +| [Hardkernel Odroid H4](hardkernel/odroid-h4/default.nix) | `` | | [Omen 14-fb0798ng](omen/14-fb0798ng) | `` | | [Omen 15-ce002ns](omen/15-ce002ns) | `` | | [Omen 15-en0010ca](omen/15-en0010ca) | `` | diff --git a/flake.nix b/flake.nix index 50264dd1..17870854 100644 --- a/flake.nix +++ b/flake.nix @@ -273,6 +273,7 @@ nxp-imx8qm-mek = import ./nxp/imx8qm-mek; hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; hardkernel-odroid-h3 = import ./hardkernel/odroid-h3; + hardkernel-odroid-h4 = import ./hardkernel/odroid-h4; omen-14-fb0798ng = import ./omen/14-fb0798ng; omen-15-ce002ns = import ./omen/15-ce002ns; omen-15-en0010ca = import ./omen/15-en0010ca; diff --git a/hardkernel/odroid-h4/default.nix b/hardkernel/odroid-h4/default.nix new file mode 100644 index 00000000..e0b12b96 --- /dev/null +++ b/hardkernel/odroid-h4/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../../common/cpu/intel/alder-lake + ]; +} From c5666d9cd61ce774e8492cbafe65afe3656edd2d Mon Sep 17 00:00:00 2001 From: matthiasdotsh Date: Sat, 1 Feb 2025 21:14:54 +0100 Subject: [PATCH 1206/1476] surface: linux 6.12.11 -> 6.12.12 --- microsoft/surface/common/kernel/linux-surface/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-surface/default.nix b/microsoft/surface/common/kernel/linux-surface/default.nix index b4766518..4ff16558 100644 --- a/microsoft/surface/common/kernel/linux-surface/default.nix +++ b/microsoft/surface/common/kernel/linux-surface/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.12.11"; + version = "6.12.12"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "sha256-R1Fy/b2HoVPxI6V5Umcudzvbba9bWKQX0aXkGfz+7Ek="; + sha256 = "sha256-6YlC0X73Bjs/LW12kr8kiZ4uAhz4MtGbVTCOyOjgjv8="; ignoreConfigErrors=true; }; From 52047449bf5b6854a7ea5d769cffc0f1833b0e22 Mon Sep 17 00:00:00 2001 From: ZHANG Yuntian Date: Mon, 20 Jan 2025 20:59:44 +0800 Subject: [PATCH 1207/1476] rockchip/rk3399: init --- rockchip/default.nix | 33 ++++++++++++++++++++ rockchip/disko.nix | 62 +++++++++++++++++++++++++++++++++++++ rockchip/rk3399/default.nix | 20 ++++++++++++ rockchip/rk3399/disko.nix | 14 +++++++++ 4 files changed, 129 insertions(+) create mode 100644 rockchip/default.nix create mode 100644 rockchip/disko.nix create mode 100644 rockchip/rk3399/default.nix create mode 100644 rockchip/rk3399/disko.nix diff --git a/rockchip/default.nix b/rockchip/default.nix new file mode 100644 index 00000000..461baedd --- /dev/null +++ b/rockchip/default.nix @@ -0,0 +1,33 @@ +{ lib +, pkgs +, config +, ... +}: +let + cfg = config.hardware.rockchip; +in { + options.hardware.rockchip = { + enable = lib.mkEnableOption "Rockchip SoC support"; + diskoImageName = lib.mkOption { + type = lib.types.str; + default = "main.raw"; + description = '' + The output image name for Disko. + Can be used by diskoExtraPostVM. + ''; + }; + diskoExtraPostVM = lib.mkOption { + type = lib.types.str; + description = '' + The post VM hook for Disko's Image Builder. + Can be used to install platform firmware like U-Boot. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + boot = { + kernelParams = [ "console=ttyS2,1500000n8" ]; + }; + }; +} diff --git a/rockchip/disko.nix b/rockchip/disko.nix new file mode 100644 index 00000000..7d6b4c9a --- /dev/null +++ b/rockchip/disko.nix @@ -0,0 +1,62 @@ +{ lib +, pkgs +, config +, ... +}: +let + cfg = config.hardware.rockchip; +in { + imports = [ + rk3399/disko.nix + ]; + + config = lib.mkIf cfg.enable { + disko = { + imageBuilder = { + extraRootModules = [ "bcachefs" ]; + extraPostVM = cfg.diskoExtraPostVM; + }; + memSize = lib.mkDefault 4096; # Default 1024 MB will throw "Cannot allocate memory" error + devices.disk.main = { + type = "disk"; + imageSize = lib.mkDefault "2G"; + content = { + type = "gpt"; + partitions = { + ESP = { + type = "EF00"; + # Firmware backoff + start = "16M"; + size = "500M"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0022" ]; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "bcachefs"; + mountpoint = "/"; + extraArgs = [ + "--metadata_checksum=xxhash" + "--data_checksum=xxhash" + "--compression=zstd" + "--background_compression=zstd" + "--str_hash=siphash" + "--wide_macs" + "--encrypted" + "--no_passphrase" + "--discard" + ]; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/rockchip/rk3399/default.nix b/rockchip/rk3399/default.nix new file mode 100644 index 00000000..3aea18fd --- /dev/null +++ b/rockchip/rk3399/default.nix @@ -0,0 +1,20 @@ +{ lib +, pkgs +, config +, ... +}: +let + cfg = config.hardware.rockchip.rk3399; +in { + imports = [ + ../. + ]; + + options.hardware.rockchip.rk3399 = { + enable = lib.mkEnableOption "Rockchip RK3399 support"; + }; + + config = lib.mkIf cfg.enable { + hardware.rockchip.enable = true; + }; +} diff --git a/rockchip/rk3399/disko.nix b/rockchip/rk3399/disko.nix new file mode 100644 index 00000000..bae10ef5 --- /dev/null +++ b/rockchip/rk3399/disko.nix @@ -0,0 +1,14 @@ +{ lib +, pkgs +, config +, ... +}: +let + cfg = config.hardware.rockchip.rk3399; +in { + config = lib.mkIf cfg.enable { + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "arm-trusted-firmware-rk3399" + ]; + }; +} From 68cc7a876b1d997cd590b0f7d6bebc723a385349 Mon Sep 17 00:00:00 2001 From: ZHANG Yuntian Date: Mon, 20 Jan 2025 17:46:03 +0800 Subject: [PATCH 1208/1476] radxa/rock-4c-plus: init --- README.md | 1 + flake.nix | 1 + radxa/README.md | 94 ++++++++++++++++++++++++++++++++++ radxa/default.nix | 22 ++++++++ radxa/disko.nix | 12 +++++ radxa/rock-4c-plus/default.nix | 31 +++++++++++ 6 files changed, 161 insertions(+) create mode 100644 radxa/README.md create mode 100644 radxa/default.nix create mode 100644 radxa/disko.nix create mode 100644 radxa/rock-4c-plus/default.nix diff --git a/README.md b/README.md index abcdfb67..b8251ca7 100644 --- a/README.md +++ b/README.md @@ -343,6 +343,7 @@ See code for all available configurations. | [Purism Librem 13v3](purism/librem/13v3) | `` | | [Purism Librem 15v3](purism/librem/13v3) | `` | | [Purism Librem 5r4](purism/librem/5r4) | `` | +| [Radxa ROCK 4C+](radxa/rock-4c-plus) | `` | | [Raspberry Pi 2](raspberry-pi/2) | `` | | [Raspberry Pi 3](raspberry-pi/3) | `` | | [Raspberry Pi 4](raspberry-pi/4) | `` | diff --git a/flake.nix b/flake.nix index 17870854..3e9110d6 100644 --- a/flake.nix +++ b/flake.nix @@ -295,6 +295,7 @@ raspberry-pi-3 = import ./raspberry-pi/3; raspberry-pi-4 = import ./raspberry-pi/4; raspberry-pi-5 = import ./raspberry-pi/5; + rock-4c-plus = import ./radxa/rock-4c-plus; kobol-helios4 = import ./kobol/helios4; samsung-np900x3c = import ./samsung/np900x3c; slimbook-hero-rpl-rtx = import ./slimbook/hero/rpl-rtx; diff --git a/radxa/README.md b/radxa/README.md new file mode 100644 index 00000000..b17e6b67 --- /dev/null +++ b/radxa/README.md @@ -0,0 +1,94 @@ +# NixOS support for Radxa devices + +Radxa provides the NixOS implementation in the form of `nixos-hardware` modules +for advanced users. + +Our goals are: + +* Only use `nixpkgs` provided packages. +* Provide a consistent and simple experience to use our NixOS module. +* Targetted audiences are advanced users who care mostly about CPU compute, storage, and network. +* No support guarantee. We are not here to teach people how to use NixOS. + +We explicitly want to avoid packaging the entire vendor SDK bootloader and kernel +in Nix. Those are not going to be accepted in `nixpkgs`, and our targetted audiences +like homelabbers generally ignore the additional hardware features. + +This also aligns with [NixOS on ARM](https://wiki.nixos.org/wiki/NixOS_on_ARM)'s +definition of "support": + +> Support for those board assumes as much is supported as Mainline Linux supports. + +## Characteristic of the default profiles + +* Using `linuxPackages_latest` +* `bcachefs` rootfs with zstd compression and password-less encryption enabled +* EFI boot chain provided by `systemd-boot` +* Default serial console enabled with baud rate matches the platform firmware +* No automatic partition expansion, as the module is only focusing on hardware + +## Common Nix flake pattern + +Below is an annoated flake example to create the initial boot image. + +``` +{ + description = "Example NixOS configurations for Radxa product"; + # To build, run `nix build .#nixosConfigurations.radxa.config.system.build.diskoImages` + + inputs = { + disko.url = "github:nix-community/disko"; + disko.inputs.nixpkgs.follows = "nixpkgs"; + nixos-hardware.url = "github:NixOS/nixos-hardware"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + nixpkgs-unfree.url = "github:numtide/nixpkgs-unfree/nixos-unstable"; + }; + + outputs = inputs@{ + self, + disko, + nixos-hardware, + nixpkgs, + nixpkgs-unfree, + }: { + nixosConfigurations = { + radxa = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + system = "aarch64-linux"; + modules = [ + nixos-hardware.nixosModules.rock-4c-plus # Update the system according to your device. + disko.nixosModules.disko # disko usage is optional in the running system, but we need it to generate the initial boot image. + "${nixos-hardware}/radxa/disko.nix" # Common Radxa Disko profile. it is system-agnostic. + { + disko = { + imageBuilder = { + # Avoid double emulation to significantly speed up image building process. + # Update the system according to your host system. + # See https://github.com/nix-community/disko/issues/856 + qemu = nixpkgs.legacyPackages.x86_64-linux.qemu + "/bin/qemu-system-aarch64 -M virt -cpu cortex-a57"; + }; + # Default image size is 2G for a small basic CLI system. + # devices.disk.main.imageSize = "2G"; + }; + + # Override the default bootloader with a cross built one. + # Use this if you do not have binfmt configured on your system. + # For NixOS, please add `boot.binfmt.emulatedSystems = [ "aarch64-linux" ];` to your system configuration. + # Update the system and the firmware package according to your device. + # hardware.radxa.rock-4c-plus.platformFirmware = nixpkgs-unfree.legacyPackages.x86_64-linux.pkgsCross.aarch64-multiplatform.ubootRock4CPlus; + + users.users.radxa = { + isNormalUser = true; + initialPassword = "radxa"; + extraGroups = [ "wheel" ]; + }; + services.openssh.enable = true; + networking.hostName = "radxa"; + system.stateVersion = "24.11"; + } + ]; + }; + }; + }; +} +``` diff --git a/radxa/default.nix b/radxa/default.nix new file mode 100644 index 00000000..6c1998a7 --- /dev/null +++ b/radxa/default.nix @@ -0,0 +1,22 @@ +{ lib +, pkgs +, config +, ... +}: +let + cfg = config.hardware.radxa; +in { + options.hardware.radxa = { + enable = lib.mkEnableOption "Radxa system support"; + }; + + config = lib.mkIf cfg.enable { + boot = { + # Currently enable bcachefs automatically set + # kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; + kernelPackages = lib.mkOverride 990 pkgs.linuxPackages_latest; + supportedFilesystems = [ "bcachefs" ]; + loader.systemd-boot.enable = lib.mkDefault true; + }; + }; +} diff --git a/radxa/disko.nix b/radxa/disko.nix new file mode 100644 index 00000000..30c30a97 --- /dev/null +++ b/radxa/disko.nix @@ -0,0 +1,12 @@ +{ lib +, pkgs +, config +, ... +}: +let + cfg = config.hardware.radxa; +in { + imports = [ + ../rockchip/disko.nix + ]; +} diff --git a/radxa/rock-4c-plus/default.nix b/radxa/rock-4c-plus/default.nix new file mode 100644 index 00000000..5fb9d5d3 --- /dev/null +++ b/radxa/rock-4c-plus/default.nix @@ -0,0 +1,31 @@ +{ lib +, pkgs +, config +, ... +}: +let + cfg = config.hardware.radxa.rock-4c-plus; + rkCfg = config.hardware.rockchip; +in { + imports = [ + ../. + ../../rockchip/rk3399 + ]; + + options.hardware.radxa.rock-4c-plus = { + platformFirmware = lib.mkPackageOption pkgs "ubootRock4CPlus" { }; + }; + + config = { + hardware = { + radxa.enable = true; + rockchip = { + rk3399.enable = true; + diskoExtraPostVM = '' + dd conv=notrunc,fsync if=${cfg.platformFirmware}/idbloader.img of=$out/${rkCfg.diskoImageName} bs=512 seek=64 + dd conv=notrunc,fsync if=${cfg.platformFirmware}/u-boot.itb of=$out/${rkCfg.diskoImageName} bs=512 seek=16384 + ''; + }; + }; + }; +} From d1f201fc627098d764ed00f736864ce673f5975e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 6 Feb 2025 04:58:47 +0100 Subject: [PATCH 1209/1476] radxa: add remark about kernel. --- radxa/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/radxa/default.nix b/radxa/default.nix index 6c1998a7..fb311df7 100644 --- a/radxa/default.nix +++ b/radxa/default.nix @@ -14,6 +14,7 @@ in { boot = { # Currently enable bcachefs automatically set # kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; + # TODO: Consider removing this line once, we get an LTS kernel that is newer than 6.12 kernelPackages = lib.mkOverride 990 pkgs.linuxPackages_latest; supportedFilesystems = [ "bcachefs" ]; loader.systemd-boot.enable = lib.mkDefault true; From 2eccff41bab80839b1d25b303b53d339fbb07087 Mon Sep 17 00:00:00 2001 From: Nicky Mouha Date: Mon, 3 Feb 2025 03:16:29 -0500 Subject: [PATCH 1210/1476] framework/13-inch/intel-core-ultra-series1: Add Intel NPU firmware --- .../intel-core-ultra-series1/default.nix | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/framework/13-inch/intel-core-ultra-series1/default.nix b/framework/13-inch/intel-core-ultra-series1/default.nix index 2de7cff0..2efb3f77 100644 --- a/framework/13-inch/intel-core-ultra-series1/default.nix +++ b/framework/13-inch/intel-core-ultra-series1/default.nix @@ -9,4 +9,24 @@ # Need at least 6.9 to make suspend properly # Specifically this patch: https://github.com/torvalds/linux/commit/073237281a508ac80ec025872ad7de50cfb5a28a boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.9") (lib.mkDefault pkgs.linuxPackages_latest); + + # Intel NPU Driver + # https://discourse.nixos.org/t/new-installation-on-asus-zenbook-ux5406-intel-vpu-firmware-error-2/58732/2 + hardware.firmware = [ + ( + let + model = "37xx"; + version = "0.0"; + + firmware = pkgs.fetchurl { + url = "https://github.com/intel/linux-npu-driver/raw/v1.13.0/firmware/bin/vpu_${model}_v${version}.bin"; + hash = "sha256-Mpoeq8HrwChjtHALsss/7QsFtDYAoFNsnhllU0xp3os="; + }; + in + pkgs.runCommand "intel-vpu-firmware-${model}-${version}" { } '' + mkdir -p "$out/lib/firmware/intel/vpu" + cp '${firmware}' "$out/lib/firmware/intel/vpu/vpu_${model}_v${version}.bin" + '' + ) + ]; } From 4f90da509bd7f249ca36e145c4752a798b886641 Mon Sep 17 00:00:00 2001 From: matthiasdotsh Date: Mon, 17 Feb 2025 12:17:26 +0100 Subject: [PATCH 1211/1476] surface: linux 6.12.12 -> 6.12.14 --- microsoft/surface/common/kernel/linux-surface/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-surface/default.nix b/microsoft/surface/common/kernel/linux-surface/default.nix index 4ff16558..17260c9d 100644 --- a/microsoft/surface/common/kernel/linux-surface/default.nix +++ b/microsoft/surface/common/kernel/linux-surface/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.12.12"; + version = "6.12.14"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "sha256-6YlC0X73Bjs/LW12kr8kiZ4uAhz4MtGbVTCOyOjgjv8="; + sha256 = "sha256-lCP0v7TYdUF+OcsLAXtUmf6kfaVhGfDNKKIBc12JjxQ="; ignoreConfigErrors=true; }; From ba37846397c388e04db79c9f5bf8cb09ac68ea51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9B=A7-440729=20=5Bsophie=5D?= Date: Fri, 14 Feb 2025 17:16:25 +0100 Subject: [PATCH 1212/1476] purism/librem/5r4: update renamed pulseaudio option --- purism/librem/5r4/audio.nix | 57 ++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/purism/librem/5r4/audio.nix b/purism/librem/5r4/audio.nix index 80c1c879..8c8b00b9 100644 --- a/purism/librem/5r4/audio.nix +++ b/purism/librem/5r4/audio.nix @@ -1,18 +1,41 @@ -{ config, lib, pkgs, ... }: -{ - config = lib.mkIf config.hardware.librem5.audio { - assertions = [{ - assertion = config.hardware.pulseaudio.enable; - message = "Call audio on Librem5 requires pulse audio to be enabled through `hardware.pulseaudio.enable`."; - }]; - hardware.pulseaudio = { - enable = true; - # this is required to correctly configure the modem as PA source/sink - extraConfig = '' - .include ${config.hardware.librem5.package}/etc/pulse/librem5.pa - ''; - }; - - services.dbus.packages = [ pkgs.callaudiod ]; - }; +{ config +, lib +, pkgs +, ... +}: { + config = + lib.mkIf config.hardware.librem5.audio + { + services.dbus.packages = [ pkgs.callaudiod ]; + } + // ( + let + paConfig = { + enable = true; + # this is required to correctly configure the modem as PA source/sink + extraConfig = '' + .include ${config.hardware.librem5.package}/etc/pulse/librem5.pa + ''; + }; + in + if lib.versionOlder (lib.versions.majorMinor lib.version) "25.05" + then { + assertions = [ + { + assertion = config.hardware.pulseaudio.enable; + message = "Call audio on Librem5 requires pulse audio to be enabled through `hardware.pulseaudio.enable`."; + } + ]; + hardware.pulseaudio = paConfig; + } + else { + assertions = [ + { + assertion = config.services.pulseaudio.enable; + message = "Call audio on Librem5 requires pulse audio to be enabled through `services.pulseaudio.enable`."; + } + ]; + services.pulseaudio = paConfig; + } + ); } From e47365f377fddfaae2a62109ed3dfd8922c6795f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9B=A7-440729=20=5Bsophie=5D?= Date: Fri, 14 Feb 2025 17:17:05 +0100 Subject: [PATCH 1213/1476] purism/librem/5r4: kernel: 6.6.29-librem5 -> 6.6.74-librem5 --- purism/librem/5r4/kernel.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/purism/librem/5r4/kernel.nix b/purism/librem/5r4/kernel.nix index f348ff38..0ffbb3d3 100644 --- a/purism/librem/5r4/kernel.nix +++ b/purism/librem/5r4/kernel.nix @@ -6,16 +6,19 @@ buildLinux (args // rec { defconfig = "librem5_defconfig"; - version = "6.6.29-librem5"; + version = "6.6.74-librem5"; modDirVersion = version; src = fetchFromGitLab { domain = "source.puri.sm"; owner = "Librem5"; repo = "linux"; - rev = "pureos/6.6.29pureos1"; - hash = "sha256-i8HSAJ1/Z2Ux2s3Srse+L0S1Zd/70ldpGBhIgEZ6nBw="; + rev = "pureos/6.6.74pureos1"; + hash = "sha256-qUPY+2fHVu7SFc+Uf8U7QtkQJJsE/4I1SavpLqJ/34c="; }; kernelPatches = [ ]; + # see https://github.com/NixOS/nixpkgs/pull/366004 + ignoreConfigErrors = true; + structuredExtraConfig = with lib.kernel; { # buildLinux overrides this and defaults to 32, so go back to the value defined librem5_defconfig # this is required for millipixels to take photos, otherwise the VIDIOC_REQ_BUFS ioctl returns ENOMEM From 08c94a8b62d784a610cbaa5d2da8a13b405c2c4f Mon Sep 17 00:00:00 2001 From: bashfulrobot Date: Sun, 3 Mar 2024 11:33:22 -0800 Subject: [PATCH 1214/1476] docs: Add README file for Dell XPS 15 9530 - Add new file `dell/xps/15-9530/README.wiki` - Specify tested hardware - Add notes section - Add NVIDIA Offload section [dell/xps/15-9530/README.wiki] - Add a new file `dell/xps/15-9530/README.wiki` - Specify the tested hardware: CPU, RAM, HDD, Screen, Graphics, Input - Add a section for notes - Add a section for NVIDIA Offload Co-authored-by: Felix Svensson --- README.md | 2 ++ dell/xps/15-9530/README.wiki | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 dell/xps/15-9530/README.wiki diff --git a/README.md b/README.md index b8251ca7..0b109c34 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,8 @@ See code for all available configurations. | [Dell XPS 15 9510](dell/xps/15-9510) | `` | | [Dell XPS 15 9520, nvidia](dell/xps/15-9520/nvidia) | `` | | [Dell XPS 15 9520](dell/xps/15-9520) | `` | +| [Dell XPS 15 9530, nvidia](dell/xps/15-9520/nvidia) | `` | +| [Dell XPS 15 9420](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/xps/15-9530/README.wiki b/dell/xps/15-9530/README.wiki new file mode 100644 index 00000000..ffb58e25 --- /dev/null +++ b/dell/xps/15-9530/README.wiki @@ -0,0 +1,20 @@ += Dell XPS 15 9530 = + +== Tested Hardware == + +* CPU: 13th Gen Intel(R) Core(TM) i9-13900H +* RAM: 32 GB +* HDD: 1 TiB SSD (NVME) +* Screen: 15" 4k (3456 x 2160) +* Graphics: NVIDIA GeForce RTX 4070 Laptop GPU, with Intel Graphics too. +* Input: Touchscreen and trackpad. + +== Notes == + +== 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. From 3e2ea8a49d4d76276b0f4e2041df8ca5c0771371 Mon Sep 17 00:00:00 2001 From: bashfulrobot Date: Mon, 4 Mar 2024 14:16:13 -0800 Subject: [PATCH 1215/1476] feat: Add support for Dell XPS 15-9530 with NVIDIA graphics - Added `default.nix` file for Dell XPS 15-9530 configuration - Imported necessary files for CPU, laptop, SSD, and fingerprint - Enabled thermald service - Configured iwlwifi module with power saving option - Removed commented out code for `disable_11ax` option - Added `default.nix` file for NVIDIA configuration in Dell XPS 15-9530 - Imported `default.nix` file from parent directory and NVIDIA prime configuration file - Configured `hardware.nvidia.prime` with Bus IDs of Intel and NVIDIA GPUs [dell/xps/15-9530/default.nix] - Add a new file `dell/xps/15-9530/default.nix` - Import the following files: `../../../common/cpu/intel`, `../../../common/pc/laptop`, `../../../common/pc/laptop/ssd`, and `./fingerprint` - Enable thermald service - Add configuration for iwlwifi module with `options iwlwifi power_save=1` - Remove commented out code for `disable_11ax` option [dell/xps/15-9530/nvidia/default.nix] - Added a new file `default.nix` in the directory `dell/xps/15-9530/nvidia/` - The file `default.nix` includes two imports: `../default.nix` and `../../../../common/gpu/nvidia/prime.nix` - Added a configuration for `hardware.nvidia.prime` which includes the Bus IDs of the Intel and NVIDIA GPUs. Co-authored-by: Felix Svensson --- dell/xps/15-9530/default.nix | 29 +++++++++++++++++++++++++++++ dell/xps/15-9530/nvidia/default.nix | 15 +++++++++++++++ flake.nix | 2 ++ 3 files changed, 46 insertions(+) create mode 100644 dell/xps/15-9530/default.nix create mode 100644 dell/xps/15-9530/nvidia/default.nix diff --git a/dell/xps/15-9530/default.nix b/dell/xps/15-9530/default.nix new file mode 100644 index 00000000..95df2da6 --- /dev/null +++ b/dell/xps/15-9530/default.nix @@ -0,0 +1,29 @@ +{ 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; + + # 9530 wifi is: + # > lspci | grep i Network + # - 00:14.3 Network controller: Intel Corporation Raptor Lake PCH CNVi WiFi (rev 01) + # > sudo lspci -vv -s 00:14.3 + # 00:14.3 Network controller: Intel Corporation Raptor Lake PCH CNVi WiFi (rev 01) + # Subsystem: Intel Corporation Wi-Fi 6E AX211 160MHz + # + # 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 + # ''; + + boot.extraModprobeConfig = '' + options iwlwifi power_save=1 + ''; +} diff --git a/dell/xps/15-9530/nvidia/default.nix b/dell/xps/15-9530/nvidia/default.nix new file mode 100644 index 00000000..257462a4 --- /dev/null +++ b/dell/xps/15-9530/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 3e9110d6..17a36e63 100644 --- a/flake.nix +++ b/flake.nix @@ -98,6 +98,8 @@ 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-9530 = import ./dell/xps/15-9530; + dell-xps-15-9530-nvidia = import ./dell/xps/15-9530/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; From 18e9f9753e9ae261bcc7d3abe15745686991fd30 Mon Sep 17 00:00:00 2001 From: Matthieu Date: Thu, 20 Feb 2025 22:07:31 +0000 Subject: [PATCH 1216/1476] dell-xps-15-9570: fix imports, refactor (closer to recent profiles and more explicit) (#1331) --- dell/xps/15-9570/default.nix | 7 +------ dell/xps/15-9570/intel/default.nix | 6 +++--- dell/xps/15-9570/nvidia/default.nix | 5 +---- dell/xps/15-9570/shared.nix | 20 ++++++++++++++++++++ dell/xps/15-9570/xps-common.nix | 10 ---------- 5 files changed, 25 insertions(+), 23 deletions(-) create mode 100644 dell/xps/15-9570/shared.nix delete mode 100644 dell/xps/15-9570/xps-common.nix diff --git a/dell/xps/15-9570/default.nix b/dell/xps/15-9570/default.nix index 91fd0244..51787a4b 100644 --- a/dell/xps/15-9570/default.nix +++ b/dell/xps/15-9570/default.nix @@ -1,11 +1,6 @@ { lib, ... }: { imports = [ - ../../../common/cpu/intel/kaby-lake - ../../../common/pc/laptop - ./xps-common.nix + ./shared.nix ]; - - # Includes the Wi-Fi and Bluetooth firmware - hardware.enableRedistributableFirmware = lib.mkDefault true; } diff --git a/dell/xps/15-9570/intel/default.nix b/dell/xps/15-9570/intel/default.nix index c4d51ea6..ff92dd76 100644 --- a/dell/xps/15-9570/intel/default.nix +++ b/dell/xps/15-9570/intel/default.nix @@ -1,8 +1,8 @@ { imports = [ - ../../../../common/cpu/intel - ../../../../common/pc/laptop ../../../../common/gpu/nvidia/disable.nix - ../xps-common.nix + ../shared.nix ]; + + # Disables the Nvidia GPU, better for battery life } diff --git a/dell/xps/15-9570/nvidia/default.nix b/dell/xps/15-9570/nvidia/default.nix index 430e0e90..7cbb908a 100644 --- a/dell/xps/15-9570/nvidia/default.nix +++ b/dell/xps/15-9570/nvidia/default.nix @@ -1,12 +1,9 @@ { ... }: - { imports = [ - ../../../../common/cpu/intel ../../../../common/gpu/nvidia/prime.nix ../../../../common/gpu/nvidia/pascal - ../../../../common/pc/laptop - ../xps-common.nix + ../shared.nix ]; diff --git a/dell/xps/15-9570/shared.nix b/dell/xps/15-9570/shared.nix new file mode 100644 index 00000000..06701e75 --- /dev/null +++ b/dell/xps/15-9570/shared.nix @@ -0,0 +1,20 @@ +{ lib, ... }: +{ + + imports = [ + ../../../common/cpu/intel/coffee-lake + ../../../common/pc/laptop + ]; + + # Solution to rcu_sched freezing + boot.kernelParams = [ "acpi_rev_override" ]; + + # This will save you money and possibly your life! + # https://github.com/NixOS/nixos-hardware/pull/127 + services.thermald.enable = lib.mkDefault true; + + hardware.graphics = { + enable = lib.mkDefault true; + enable32Bit = lib.mkDefault true; + }; +} diff --git a/dell/xps/15-9570/xps-common.nix b/dell/xps/15-9570/xps-common.nix deleted file mode 100644 index 39151e96..00000000 --- a/dell/xps/15-9570/xps-common.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ lib, ... }: - -{ - # Solution to rcu_sched freezing - boot.kernelParams = [ "acpi_rev_override" ]; - boot.kernelModules = [ "kvm-intel" ]; - - # This will save you money and possibly your life! - services.thermald.enable = lib.mkDefault true; -} From d2483459e8113004955d34a025d500c21a683883 Mon Sep 17 00:00:00 2001 From: matthiasdotsh Date: Sat, 22 Feb 2025 11:39:23 +0100 Subject: [PATCH 1217/1476] surface: linux 6.12.14 -> 6.12.16 --- microsoft/surface/common/kernel/linux-surface/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-surface/default.nix b/microsoft/surface/common/kernel/linux-surface/default.nix index 17260c9d..0a784528 100644 --- a/microsoft/surface/common/kernel/linux-surface/default.nix +++ b/microsoft/surface/common/kernel/linux-surface/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.12.14"; + version = "6.12.16"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "sha256-lCP0v7TYdUF+OcsLAXtUmf6kfaVhGfDNKKIBc12JjxQ="; + sha256 = "sha256-X4E2KmlPUVIL/5+uy3PxzJvHvs5v3RDVwn40jfOdfcQ="; ignoreConfigErrors=true; }; From f75203cc311b092a4c11f909bacd2534a7078c37 Mon Sep 17 00:00:00 2001 From: Manuel Transfeld Date: Mon, 24 Feb 2025 08:48:14 +0100 Subject: [PATCH 1218/1476] common/gpu/nvidia: remove a default value (#1373) https://github.com/NixOS/nixpkgs/pull/326369 has been merged. --- common/gpu/nvidia/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/gpu/nvidia/default.nix b/common/gpu/nvidia/default.nix index df28c06a..281e33f7 100644 --- a/common/gpu/nvidia/default.nix +++ b/common/gpu/nvidia/default.nix @@ -3,6 +3,4 @@ { imports = [ ../24.05-compat.nix ]; services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ]; - # TODO: this will be a default after https://github.com/NixOS/nixpkgs/pull/326369 - hardware.nvidia.modesetting.enable = lib.mkDefault true; } From 9b49e201401825b581167c9467ff3791420644cc Mon Sep 17 00:00:00 2001 From: Nicky Mouha Date: Mon, 24 Feb 2025 02:54:44 -0500 Subject: [PATCH 1219/1476] framework/13-inch/intel-core-ultra-series1: add check for hardware.enableRedistributableFirmware (#1367) --- framework/13-inch/intel-core-ultra-series1/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/framework/13-inch/intel-core-ultra-series1/default.nix b/framework/13-inch/intel-core-ultra-series1/default.nix index 2efb3f77..7ac20d6e 100644 --- a/framework/13-inch/intel-core-ultra-series1/default.nix +++ b/framework/13-inch/intel-core-ultra-series1/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ config, lib, pkgs, ... }: { imports = [ @@ -12,7 +12,7 @@ # Intel NPU Driver # https://discourse.nixos.org/t/new-installation-on-asus-zenbook-ux5406-intel-vpu-firmware-error-2/58732/2 - hardware.firmware = [ + hardware.firmware = lib.optionals (config.hardware.enableRedistributableFirmware) [ ( let model = "37xx"; @@ -29,4 +29,9 @@ '' ) ]; + + warnings = lib.mkIf (!config.hardware.enableRedistributableFirmware) [ + ''For Intel NPU support, set the option: hardware.enableRedistributableFirmware = true;'' + ]; + } From 04be27ce4950145d6ac19e246720fdd8951d4c6c Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Thu, 13 Feb 2025 15:40:17 +0800 Subject: [PATCH 1220/1476] apple/t2: update docs to remove old option The option was removed in a previous PR but the README was not updated. Reduce confusion by removing references to the deleted option. --- apple/t2/README.md | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/apple/t2/README.md b/apple/t2/README.md index 44423955..351c6092 100644 --- a/apple/t2/README.md +++ b/apple/t2/README.md @@ -8,29 +8,5 @@ Following [this guide](https://wiki.t2linux.org/distributions/nixos/installation You can consult the [wiki](https://wiki.t2linux.org/) for information specific to T2 Macs. -## Unlocking Internal iGPU - -The `apple-set-os-loader-installer` module serves as an installer for the [`apple-set-os-loader`](https://github.com/Redecorating/apple_set_os-loader). This tool is designed to unlock the internal integrated GPU (iGPU) on certain MacBooks. See https://wiki.t2linux.org/guides/hybrid-graphics/ for more details. - -### What it Does: - -Upon activation, this module performs the following: - -- Renames the existing `BOOTX64.EFI` file to `bootx64_original.efi`. -- Installs the `apple-set-os-loader` hook in its place as `bootx64.efi`. -- Before the system boots the hook unlocks the iGPU and subsequently calls the original `bootx64_original.efi`. -- Enables the iGPU by default. - -### How to Implement: - -1. Add this into your `configuration.nix`: -``` -hardware.apple-t2.enableAppleSetOsLoader = true; -``` - -2. **Rebuild your system**: -``` -sudo nixos-rebuild switch -``` - -> **Note**: Always ensure compatibility and make backups of your data before making any system changes. +> [!warning] +> Always ensure compatibility and make backups of your data before making any system changes. From d098b095003946adf5714cc8edee501d8cf08e74 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Thu, 13 Feb 2025 15:31:24 +0800 Subject: [PATCH 1221/1476] apple/t2: refactor kernel package, add stable kernel Refactors the kernel package to a generic one and adds support for the lts kernel. Since nixpkgs' kernel packages provide the `kernelPatches` override, utilizing that ensures that kernel updates are not delayed too much due to having to PR them to nixos-hardware separately. This comes at the expense of possible breakage when upstream updates something that breaks the patches. Because the T2 Linux project has a lot of patches which changes periodically, including them in the repository directly is a maintenance burden. Instead, this patch comes with an update script and JSON files containing all of the patches to be downloaded (by fetchurl) and applied. The NixOS option to enable changing release versions will be added in the next commit. --- apple/t2/default.nix | 4 +- apple/t2/pkgs/linux-t2.nix | 56 ----------- apple/t2/pkgs/linux-t2/default.nix | 6 ++ apple/t2/pkgs/linux-t2/generic.nix | 59 ++++++++++++ apple/t2/pkgs/linux-t2/latest.json | 117 +++++++++++++++++++++++ apple/t2/pkgs/linux-t2/latest.nix | 6 ++ apple/t2/pkgs/linux-t2/stable.json | 113 ++++++++++++++++++++++ apple/t2/pkgs/linux-t2/update-patches.py | 93 ++++++++++++++++++ 8 files changed, 396 insertions(+), 58 deletions(-) delete mode 100644 apple/t2/pkgs/linux-t2.nix create mode 100644 apple/t2/pkgs/linux-t2/default.nix create mode 100644 apple/t2/pkgs/linux-t2/generic.nix create mode 100644 apple/t2/pkgs/linux-t2/latest.json create mode 100644 apple/t2/pkgs/linux-t2/latest.nix create mode 100644 apple/t2/pkgs/linux-t2/stable.json create mode 100755 apple/t2/pkgs/linux-t2/update-patches.py diff --git a/apple/t2/default.nix b/apple/t2/default.nix index 9eb8ff3c..10793762 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -47,8 +47,8 @@ in config = lib.mkMerge [ { - # For keyboard and touchbar - boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./pkgs/linux-t2.nix { }); + # For keyboard, touchpad, touchbar and audio. + boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./pkgs/linux-t2 { }); boot.initrd.kernelModules = [ "apple-bce" ]; services.udev.packages = [ audioFilesUdevRules ]; diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix deleted file mode 100644 index 6b0696f3..00000000 --- a/apple/t2/pkgs/linux-t2.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ lib, buildLinux, fetchFromGitHub, fetchzip, runCommand -, ... } @ args: - -let - version = "6.13"; - majorVersion = lib.elemAt (lib.take 1 (lib.splitVersion version)) 0; - - patchRepo = fetchFromGitHub { - owner = "t2linux"; - repo = "linux-t2-patches"; - rev = "07cba1a25b43834f24f8be302bd025f2f89493c5"; - hash = "sha256-kRSzqOApTmTTv3rfNmP9/RQ7zV4jptlEOLWixtgwTLk="; - }; - - kernel = fetchzip { - url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-FD22KmTFrIhED5X3rcjPTot1UOq1ir1zouEpRWZkRC0="; - }; -in -buildLinux (args // { - inherit version; - - pname = "linux-t2"; - # Snippet from nixpkgs - modDirVersion = "${lib.concatStringsSep "." (lib.take 3 (lib.splitVersion "${version}.0"))}"; - - src = runCommand "patched-source" {} '' - cp -r ${kernel} $out - chmod -R u+w $out - cd $out - while read -r patch; do - echo "Applying patch $patch"; - patch -p1 < $patch; - done < <(find ${patchRepo} -type f -name "*.patch" | sort) - ''; - - structuredExtraConfig = with lib.kernel; { - APPLE_BCE = module; - APPLE_GMUX = module; - APFS_FS = module; - BRCMFMAC = module; - BT_BCM = module; - BT_HCIBCM4377 = module; - BT_HCIUART_BCM = yes; - BT_HCIUART = module; - HID_APPLETB_BL = module; - HID_APPLETB_KBD = module; - HID_APPLE = module; - DRM_APPLETBDRM = module; - HID_SENSOR_ALS = module; - SND_PCM = module; - STAGING = yes; - }; - - kernelPatches = []; -} // (args.argsOverride or {})) diff --git a/apple/t2/pkgs/linux-t2/default.nix b/apple/t2/pkgs/linux-t2/default.nix new file mode 100644 index 00000000..76247b8b --- /dev/null +++ b/apple/t2/pkgs/linux-t2/default.nix @@ -0,0 +1,6 @@ +{ callPackage, linux_6_12, ... }@args: + +callPackage ./generic.nix args { + kernel = linux_6_12; + patchesFile = ./stable.json; +} diff --git a/apple/t2/pkgs/linux-t2/generic.nix b/apple/t2/pkgs/linux-t2/generic.nix new file mode 100644 index 00000000..297433c3 --- /dev/null +++ b/apple/t2/pkgs/linux-t2/generic.nix @@ -0,0 +1,59 @@ +{ + lib, + fetchurl, # fetchpatch does unnecessary normalization + ... +}@args: + +{ + kernel, + patchesFile, +}: +let + inherit (builtins) readFile fromJSON; + + patchset = fromJSON (readFile patchesFile); + t2-patches = map ( + { name, hash }: + { + inherit name; + patch = fetchurl { + inherit name hash; + url = patchset.base_url + name; + }; + } + ) patchset.patches; +in +kernel.override ( + args + // { + pname = "linux-t2"; + + structuredExtraConfig = with lib.kernel; { + APPLE_BCE = module; + APPLE_GMUX = module; + APFS_FS = module; + BRCMFMAC = module; + BT_BCM = module; + BT_HCIBCM4377 = module; + BT_HCIUART_BCM = yes; + BT_HCIUART = module; + HID_APPLETB_BL = module; + HID_APPLETB_KBD = module; + HID_APPLE = module; + DRM_APPLETBDRM = module; + HID_SENSOR_ALS = module; + SND_PCM = module; + STAGING = yes; + }; + + kernelPatches = t2-patches ++ (args.kernelPatches or [ ]); + + argsOverride.extraMeta = { + description = "The Linux kernel (with patches from the T2 Linux project)"; + + # take responsibility for the downstream kernel + maintainers = with lib.maintainers; [ soopyc ]; + }; + } + // (args.argsOverride or { }) +) diff --git a/apple/t2/pkgs/linux-t2/latest.json b/apple/t2/pkgs/linux-t2/latest.json new file mode 100644 index 00000000..03c9714b --- /dev/null +++ b/apple/t2/pkgs/linux-t2/latest.json @@ -0,0 +1,117 @@ +{ + "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/8f138bc16772fdeb0fc68b631fb6f66ddae1a0a1/", + "patches": [ + { + "name": "1001-Add-apple-bce-driver.patch", + "hash": "sha256-e3RPvWPj2QASGOS4kieO8YFekrXsBCJtfF82OPlOn2E=" + }, + { + "name": "1002-Put-apple-bce-in-drivers-staging.patch", + "hash": "sha256-wkveNo1qwAwXWDGTFed4ZDbuBnJbwKgWLmTHK9qq0oM=" + }, + { + "name": "1005-HID-hid-appletb-bl-add-driver-for-the-backlight-of-A.patch", + "hash": "sha256-kEscS1FAyDxLZPOPInYTXFEf4fouBEa4zGctX14hSu8=" + }, + { + "name": "1006-HID-hid-appletb-kbd-add-driver-for-the-keyboard-mode.patch", + "hash": "sha256-eVEuvnoRItaDjwWu41nn9bTkgHgY+1SL/hFAvUR2IlY=" + }, + { + "name": "1007-HID-multitouch-support-getting-the-contact-ID-from.patch", + "hash": "sha256-A4tExJafroVAv/Hbdt7farJM6RYl/DU5KwSbzqcdEVY=" + }, + { + "name": "1008-HID-multitouch-support-getting-the-tip-state-from-HI.patch", + "hash": "sha256-GwK+d87p3UMy66037dzq6/Zearj8gnRHhqSdZczRadY=" + }, + { + "name": "1009-HID-multitouch-take-cls-maxcontacts-into-account-for.patch", + "hash": "sha256-fywzHnCQ657UFye1ckiufral3pBwBGtKdxWqWqaFHM0=" + }, + { + "name": "1010-HID-multitouch-allow-specifying-if-a-device-is-direc.patch", + "hash": "sha256-87SOnLgeG60Svu2Z9QUyP9P6cZ1Gznt6ZYLFImfx+vY=" + }, + { + "name": "1011-HID-multitouch-add-device-ID-for-Apple-Touch-Bars.patch", + "hash": "sha256-TJjXAlQ4WEROnq/xd6/4JHTuEJjqT7dLLcE4etKdzc0=" + }, + { + "name": "1012-lib-vsprintf-Add-support-for-generic-FOURCCs-by-exte.patch", + "hash": "sha256-cMl4WJcT/nM/z12LEsnLxssQgnRqKE+d/P2uMr5PUDQ=" + }, + { + "name": "1014-drm-format-helper-add-helper-for-BGR888-to-XRGB8888-.patch", + "hash": "sha256-iBM2z+/jZb/3+c9wHjC7W359oRl+DzFDZ1KL5eUc3qo=" + }, + { + "name": "1015-drm-tiny-add-driver-for-Apple-Touch-Bars-in-x86-Macs.patch", + "hash": "sha256-sTb+ruY6W18wz9XRJzZKlfl4a8fGo1nrtCoOYNaPAjI=" + }, + { + "name": "2008-i915-4-lane-quirk-for-mbp15-1.patch", + "hash": "sha256-f/PTDwRGEyVkGHFyypTKi+gIni3R4TmcsOneGc7Ay5A=" + }, + { + "name": "2009-apple-gmux-allow-switching-to-igpu-at-probe.patch", + "hash": "sha256-XKwlyJZjJLQz39mc0/S7sPnRnwrqMsq9OKy+QCO+oho=" + }, + { + "name": "3001-applesmc-convert-static-structures-to-drvdata.patch", + "hash": "sha256-7KGC0pCos351wKNhwJI/Qoc7w+orOPpiTkdCN50G8nI=" + }, + { + "name": "3002-applesmc-make-io-port-base-addr-dynamic.patch", + "hash": "sha256-1fnmMP/3WSy2JqjdCvxu8tWoshCPr8eiG6ttYK/N9WA=" + }, + { + "name": "3003-applesmc-switch-to-acpi_device-from-platform.patch", + "hash": "sha256-3S6BzyoPLoirfyAu4yDyE9aYjUYr/7etmAvN3uKSDLE=" + }, + { + "name": "3004-applesmc-key-interface-wrappers.patch", + "hash": "sha256-9Bq28WcqiOnef0br6bATOudr1ViSpajQs7fv7o8Tg0I=" + }, + { + "name": "3005-applesmc-basic-mmio-interface-implementation.patch", + "hash": "sha256-Hh9DymQ+Y74oSs1zv9F0lTU3jfAenKTM+cmFH9tmN9Q=" + }, + { + "name": "3006-applesmc-fan-support-on-T2-Macs.patch", + "hash": "sha256-D5IQHE8QFo49mnUawSau7xUsMFkHKayyhnHW4hi+fWE=" + }, + { + "name": "3007-applesmc-Add-iMacPro-to-applesmc_whitelist.patch", + "hash": "sha256-rLDuyQYzAaWuu/u6nRRVvGdwyfpLvkGPu1OoD8KS0os=" + }, + { + "name": "3008-applesmc-make-applesmc_remove-void.patch", + "hash": "sha256-j2Rj1PW/bFEYh9IkGkkG9b+G27IAPCInyd828z4WE1s=" + }, + { + "name": "3009-applesmc-battery-charge-limiter.patch", + "hash": "sha256-skYKmLsJ6O42/wINLccZWoKS0XhVlC1Nfxi1Ekloxns=" + }, + { + "name": "4001-Input-bcm5974-Add-support-for-the-T2-Macs.patch", + "hash": "sha256-CaviinY3rYqQh+/DGyeBTzLL/ZfIvguOQlWCs3KN4zc=" + }, + { + "name": "5001-wifi-brcmfmac-use-random-seed-flag-for-BCM4355-and-B.patch", + "hash": "sha256-tlKhUNmDfsKat6O8eK1h84qikUj1Kiv9bbBQaZuDQK4=" + }, + { + "name": "7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch", + "hash": "sha256-O6RHFxmKZn7aCq1D+r5z2T3jLt0r5+01EABD9rs0E5M=" + }, + { + "name": "8001-Add-APFS-driver.patch", + "hash": "sha256-40Gl8eR9RB6qEoU+vY7+sVWms8e566OUmAb9LZWZK3w=" + }, + { + "name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch", + "hash": "sha256-n1SH5vC//LRJdWOavH9/BHqBTjkUj5f+dFGitSeHksw=" + } + ] +} diff --git a/apple/t2/pkgs/linux-t2/latest.nix b/apple/t2/pkgs/linux-t2/latest.nix new file mode 100644 index 00000000..7ab2e41b --- /dev/null +++ b/apple/t2/pkgs/linux-t2/latest.nix @@ -0,0 +1,6 @@ +{ callPackage, linux_6_13, ... }@args: + +callPackage ./generic.nix args { + kernel = linux_6_13; + patchesFile = ./latest.json; +} diff --git a/apple/t2/pkgs/linux-t2/stable.json b/apple/t2/pkgs/linux-t2/stable.json new file mode 100644 index 00000000..ce38004c --- /dev/null +++ b/apple/t2/pkgs/linux-t2/stable.json @@ -0,0 +1,113 @@ +{ + "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/19c29ff4bbda9f512b7b69d63d249de269dc66ab/", + "patches": [ + { + "name": "1001-Add-apple-bce-driver.patch", + "hash": "sha256-e3RPvWPj2QASGOS4kieO8YFekrXsBCJtfF82OPlOn2E=" + }, + { + "name": "1002-Put-apple-bce-in-drivers-staging.patch", + "hash": "sha256-DXj4CmE7TKMGrAhQDOR5RVw9YHmyQMiXZsmxYfkKAEA=" + }, + { + "name": "1005-HID-hid-appletb-bl-add-driver-for-the-backlight-of-A.patch", + "hash": "sha256-kEscS1FAyDxLZPOPInYTXFEf4fouBEa4zGctX14hSu8=" + }, + { + "name": "1006-HID-hid-appletb-kbd-add-driver-for-the-keyboard-mode.patch", + "hash": "sha256-eVEuvnoRItaDjwWu41nn9bTkgHgY+1SL/hFAvUR2IlY=" + }, + { + "name": "1007-HID-multitouch-support-getting-the-contact-ID-from.patch", + "hash": "sha256-A4tExJafroVAv/Hbdt7farJM6RYl/DU5KwSbzqcdEVY=" + }, + { + "name": "1008-HID-multitouch-support-getting-the-tip-state-from-HI.patch", + "hash": "sha256-GwK+d87p3UMy66037dzq6/Zearj8gnRHhqSdZczRadY=" + }, + { + "name": "1009-HID-multitouch-take-cls-maxcontacts-into-account-for.patch", + "hash": "sha256-fywzHnCQ657UFye1ckiufral3pBwBGtKdxWqWqaFHM0=" + }, + { + "name": "1010-HID-multitouch-allow-specifying-if-a-device-is-direc.patch", + "hash": "sha256-87SOnLgeG60Svu2Z9QUyP9P6cZ1Gznt6ZYLFImfx+vY=" + }, + { + "name": "1011-HID-multitouch-add-device-ID-for-Apple-Touch-Bars.patch", + "hash": "sha256-TJjXAlQ4WEROnq/xd6/4JHTuEJjqT7dLLcE4etKdzc0=" + }, + { + "name": "1012-lib-vsprintf-Add-support-for-generic-FOURCCs-by-exte.patch", + "hash": "sha256-cMl4WJcT/nM/z12LEsnLxssQgnRqKE+d/P2uMr5PUDQ=" + }, + { + "name": "1014-drm-format-helper-add-helper-for-BGR888-to-XRGB8888-.patch", + "hash": "sha256-iBM2z+/jZb/3+c9wHjC7W359oRl+DzFDZ1KL5eUc3qo=" + }, + { + "name": "1015-drm-tiny-add-driver-for-Apple-Touch-Bars-in-x86-Macs.patch", + "hash": "sha256-sTb+ruY6W18wz9XRJzZKlfl4a8fGo1nrtCoOYNaPAjI=" + }, + { + "name": "2008-i915-4-lane-quirk-for-mbp15-1.patch", + "hash": "sha256-lZ7MWXZubmAlJCqBmuzueg7agENJbikxP1SE46SmwNw=" + }, + { + "name": "2009-apple-gmux-allow-switching-to-igpu-at-probe.patch", + "hash": "sha256-XKwlyJZjJLQz39mc0/S7sPnRnwrqMsq9OKy+QCO+oho=" + }, + { + "name": "3001-applesmc-convert-static-structures-to-drvdata.patch", + "hash": "sha256-7KGC0pCos351wKNhwJI/Qoc7w+orOPpiTkdCN50G8nI=" + }, + { + "name": "3002-applesmc-make-io-port-base-addr-dynamic.patch", + "hash": "sha256-1fnmMP/3WSy2JqjdCvxu8tWoshCPr8eiG6ttYK/N9WA=" + }, + { + "name": "3003-applesmc-switch-to-acpi_device-from-platform.patch", + "hash": "sha256-3S6BzyoPLoirfyAu4yDyE9aYjUYr/7etmAvN3uKSDLE=" + }, + { + "name": "3004-applesmc-key-interface-wrappers.patch", + "hash": "sha256-9Bq28WcqiOnef0br6bATOudr1ViSpajQs7fv7o8Tg0I=" + }, + { + "name": "3005-applesmc-basic-mmio-interface-implementation.patch", + "hash": "sha256-Hh9DymQ+Y74oSs1zv9F0lTU3jfAenKTM+cmFH9tmN9Q=" + }, + { + "name": "3006-applesmc-fan-support-on-T2-Macs.patch", + "hash": "sha256-D5IQHE8QFo49mnUawSau7xUsMFkHKayyhnHW4hi+fWE=" + }, + { + "name": "3007-applesmc-Add-iMacPro-to-applesmc_whitelist.patch", + "hash": "sha256-rLDuyQYzAaWuu/u6nRRVvGdwyfpLvkGPu1OoD8KS0os=" + }, + { + "name": "3008-applesmc-make-applesmc_remove-void.patch", + "hash": "sha256-j2Rj1PW/bFEYh9IkGkkG9b+G27IAPCInyd828z4WE1s=" + }, + { + "name": "3009-applesmc-battery-charge-limiter.patch", + "hash": "sha256-skYKmLsJ6O42/wINLccZWoKS0XhVlC1Nfxi1Ekloxns=" + }, + { + "name": "4001-Input-bcm5974-Add-support-for-the-T2-Macs.patch", + "hash": "sha256-CaviinY3rYqQh+/DGyeBTzLL/ZfIvguOQlWCs3KN4zc=" + }, + { + "name": "7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch", + "hash": "sha256-O6RHFxmKZn7aCq1D+r5z2T3jLt0r5+01EABD9rs0E5M=" + }, + { + "name": "8001-Add-APFS-driver.patch", + "hash": "sha256-RjEhzCqGvwRSGFjMgg1Z1kFwbxB9VT3SkVKoOdtDvP0=" + }, + { + "name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch", + "hash": "sha256-n1SH5vC//LRJdWOavH9/BHqBTjkUj5f+dFGitSeHksw=" + } + ] +} diff --git a/apple/t2/pkgs/linux-t2/update-patches.py b/apple/t2/pkgs/linux-t2/update-patches.py new file mode 100755 index 00000000..28d46b13 --- /dev/null +++ b/apple/t2/pkgs/linux-t2/update-patches.py @@ -0,0 +1,93 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i python -p nix -p "python3.withPackages (p: [p.requests])" + +import argparse +import json +import re +import subprocess +import sys +from tempfile import NamedTemporaryFile + +import requests + +API_BASE = "https://api.github.com" +PATCH_PATTERN = re.compile(r"^\d{4}-.*\.patch$") + +parser = argparse.ArgumentParser( + description="Update linux-t2 patches from a GitHub repository." +) +parser.add_argument("filename", help="the output filename") +parser.add_argument( + "--repository", + help="the source github repository", + default="t2linux/linux-t2-patches", + nargs="?", +) +ref_group = parser.add_mutually_exclusive_group() +ref_group.add_argument( + "--reference", help="the git reference for the patches", default=None, nargs="?" +) +ref_group.add_argument( + "--branch", help="the git branch to fetch", default=None, nargs="?" +) + + +def get_api(endpoint, *args, **kwargs): + kwargs["headers"] = {"X-GitHub-Api-Version": "2022-11-28"} + response = requests.get(API_BASE + endpoint, *args, **kwargs) + response.raise_for_status() + return response.json() + + +def get_sri_hash(data: bytes): + with NamedTemporaryFile() as tmpfile: + tmpfile.write(data) + tmpfile.flush() + proc = subprocess.run( + ["nix-hash", "--sri", "--flat", "--type", "sha256", tmpfile.name], + check=True, + capture_output=True, + ) + return proc.stdout.decode("utf8").strip() + + +def main(): + args = parser.parse_args() + reference = args.reference + branch = args.branch + + if reference is None: + if branch is None: + print("Branch and reference not provided, fetching default branch") + branch = get_api(f"/repos/{args.repository}")["default_branch"] + + print(f"Reference not provided, fetching from branch {branch}") + branch_data = get_api(f"/repos/{args.repository}/branches/{branch}") + reference = branch_data["commit"]["sha"] + + print(f"Repository: {args.repository}") + print(f" Reference: {reference}") + + base_url = f"https://raw.githubusercontent.com/{args.repository}/{reference}/" + contents = get_api(f"/repos/{args.repository}/contents", {"ref": reference}) + patches = filter(lambda e: PATCH_PATTERN.match(e.get("name")), contents) + + patches_with_hash = [] + for patch in patches: + patch_content = requests.get(patch["download_url"]) + patch_hash = get_sri_hash(patch_content.content) + print(f"{patch['name']}: {patch_hash}") + patches_with_hash.append({"name": patch["name"], "hash": patch_hash}) + + result = {"base_url": base_url, "patches": patches_with_hash} + + with open(args.filename, "w+") as f: + json.dump(result, f, indent=2) + f.write("\n") # write final newline + print(f"Wrote to {args.filename}") + + return 0 + + +if __name__ == "__main__": + sys.exit(main()) From a0252d668cacd7df728c099e691aa3482ba664c3 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Wed, 19 Feb 2025 14:38:11 +0800 Subject: [PATCH 1222/1476] apple/t2: add option to select kernel release --- apple/t2/default.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/apple/t2/default.nix b/apple/t2/default.nix index 10793762..d1057caf 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, ... }: let + inherit (lib) types; audioFiles = pkgs.fetchFromGitHub { owner = "kekrby"; repo = "t2-better-audio"; @@ -43,12 +44,25 @@ in ]; options.hardware.apple-t2 = { enableIGPU = lib.mkEnableOption "the usage of the iGPU on specific Apple devices with an AMD dGPU"; + kernelChannel = lib.mkOption { + type = types.enum [ + "stable" + "latest" + ]; + default = "stable"; + example = "latest"; + description = "The kernel release stream to use."; + }; }; config = lib.mkMerge [ { - # For keyboard, touchpad, touchbar and audio. - boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./pkgs/linux-t2 { }); + # Specialized kernel for keyboard, touchpad, touchbar and audio. + boot.kernelPackages = pkgs.linuxPackagesFor ( + pkgs.callPackage ( + if t2Cfg.kernelChannel == "stable" then ./pkgs/linux-t2 else ./pkgs/linux-t2/latest.nix + ) { } + ); boot.initrd.kernelModules = [ "apple-bce" ]; services.udev.packages = [ audioFilesUdevRules ]; From cda83120608d10c0f122b2ac472a9c0c3e592b91 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Wed, 19 Feb 2025 14:40:09 +0800 Subject: [PATCH 1223/1476] apple/t2: format with nixfmt --- apple/t2/default.nix | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/apple/t2/default.nix b/apple/t2/default.nix index d1057caf..2201211a 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let inherit (lib) types; @@ -9,19 +14,22 @@ let hash = "sha256-x7K0qa++P1e1vuCGxnsFxL1d9+nwMtZUJ6Kd9e27TFs="; }; - audioFilesUdevRules = pkgs.runCommand "audio-files-udev-rules" {} '' + audioFilesUdevRules = pkgs.runCommand "audio-files-udev-rules" { } '' mkdir -p $out/lib/udev/rules.d cp ${audioFiles}/files/*.rules $out/lib/udev/rules.d substituteInPlace $out/lib/udev/rules.d/*.rules --replace "/usr/bin/sed" "${pkgs.gnused}/bin/sed" ''; - overrideAudioFiles = package: pluginsPath: - package.overrideAttrs (new: old: { - preConfigurePhases = old.preConfigurePhases or [ ] ++ [ "postPatchPhase" ]; - postPatchPhase = '' - cp -r ${audioFiles}/files/{profile-sets,paths} ${pluginsPath}/alsa/mixer/ - ''; - }); + overrideAudioFiles = + package: pluginsPath: + package.overrideAttrs ( + new: old: { + preConfigurePhases = old.preConfigurePhases or [ ] ++ [ "postPatchPhase" ]; + postPatchPhase = '' + cp -r ${audioFiles}/files/{profile-sets,paths} ${pluginsPath}/alsa/mixer/ + ''; + } + ); pipewirePackage = overrideAudioFiles pkgs.pipewire "spa/plugins/"; @@ -30,12 +38,12 @@ let in { imports = [ - (lib.mkRemovedOptionModule ["hardware" "apple-t2" "enableTinyDfr"] '' + (lib.mkRemovedOptionModule [ "hardware" "apple-t2" "enableTinyDfr" ] '' The hardware.apple-t2.enableTinyDfr option was deprecated and removed since upstream Nixpkgs now has an identical module. Please migrate to hardware.apple.touchBar. '') - (lib.mkRemovedOptionModule ["hardware" "apple-t2" "enableAppleSetOsLoader"] '' + (lib.mkRemovedOptionModule [ "hardware" "apple-t2" "enableAppleSetOsLoader" ] '' The hardware.apple-t2.enableAppleSetOsLoader option was removed as the apple_set_os functionality was integrated into the kernel. Please uninstall the loader by replacing /esp/EFI/BOOTX64.EFI with /esp/EFI/BOOTX64_original.EFI, where esp is the EFI partition mount point. @@ -68,7 +76,11 @@ in services.udev.packages = [ audioFilesUdevRules ]; # For audio - boot.kernelParams = [ "pcie_ports=compat" "intel_iommu=on" "iommu=pt" ]; + boot.kernelParams = [ + "pcie_ports=compat" + "intel_iommu=on" + "iommu=pt" + ]; hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/"; From fb12c8270abf8933256c5b0ac522776c18bd1dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Wed, 12 Feb 2025 19:27:37 +0100 Subject: [PATCH 1224/1476] dell/xps/13-9315: fix screen flickering --- dell/xps/13-9315/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dell/xps/13-9315/default.nix b/dell/xps/13-9315/default.nix index 03e16533..92ec28ce 100644 --- a/dell/xps/13-9315/default.nix +++ b/dell/xps/13-9315/default.nix @@ -27,4 +27,7 @@ # enable cooling management, see NixOS/nixos-hardware#127 services.thermald.enable = lib.mkDefault true; + + # fix laptop's screen flickering, see https://wiki.archlinux.org/title/Intel_graphics#Screen_flickering + boot.kernelParams = ["i915.enable_psr=0"]; } From 8f44cbb48c2f4a54e35d991a903a8528178ce1a8 Mon Sep 17 00:00:00 2001 From: Karolis Stasaitis Date: Fri, 7 Feb 2025 18:13:30 +0100 Subject: [PATCH 1225/1476] raspberry-pi-4: poe-hat: add PWM polarity value --- raspberry-pi/4/poe-hat.nix | 4 ++-- raspberry-pi/4/poe-plus-hat.nix | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/raspberry-pi/4/poe-hat.nix b/raspberry-pi/4/poe-hat.nix index 5d6cf8d0..07bc4e46 100644 --- a/raspberry-pi/4/poe-hat.nix +++ b/raspberry-pi/4/poe-hat.nix @@ -18,7 +18,7 @@ in { hardware.deviceTree = { overlays = [ - # Equivalent to: https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts + # Equivalent to: https://github.com/raspberrypi/linux/blob/rpi-6.6.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts { name = "rpi-poe-overlay"; dtsText = '' @@ -38,7 +38,7 @@ in { compatible = "pwm-fan"; cooling-levels = <0 1 10 100 255>; #cooling-cells = <2>; - pwms = <&fwpwm 0 80000>; + pwms = <&fwpwm 0 80000 0>; }; }; }; diff --git a/raspberry-pi/4/poe-plus-hat.nix b/raspberry-pi/4/poe-plus-hat.nix index bd7c28ec..96f50e40 100644 --- a/raspberry-pi/4/poe-plus-hat.nix +++ b/raspberry-pi/4/poe-plus-hat.nix @@ -19,8 +19,8 @@ in { hardware.deviceTree = { overlays = [ # Combined equivalent to: - # * https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts - # * https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-plus-overlay.dts + # * https://github.com/raspberrypi/linux/blob/rpi-6.6.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts + # * https://github.com/raspberrypi/linux/blob/rpi-6.6.y/arch/arm/boot/dts/overlays/rpi-poe-plus-overlay.dts { name = "rpi-poe-plus-overlay"; dtsText = '' @@ -40,7 +40,7 @@ in { compatible = "pwm-fan"; cooling-levels = <0 1 10 100 255>; #cooling-cells = <2>; - pwms = <&fwpwm 0 80000>; + pwms = <&fwpwm 0 80000 0>; }; }; }; From 71cca26f33cdef1fb6490b69bbf20f3ca08b1558 Mon Sep 17 00:00:00 2001 From: Louis Opter Date: Thu, 6 Feb 2025 08:11:07 +0000 Subject: [PATCH 1226/1476] Set Alder Lake support for the Aoostar R1 N100 In order to get micro-code updates, and select the right driver for hardware transcoding on the integrated GPU. --- README.md | 1 + aoostar/r1/n100/default.nix | 12 ++++++++++++ flake.nix | 1 + 3 files changed, 14 insertions(+) create mode 100644 aoostar/r1/n100/default.nix diff --git a/README.md b/README.md index 0b109c34..412d80e6 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,7 @@ See code for all available configurations. | [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | | [Apple MacMini (2010, Intel, Nvidia)](apple/macmini/4) | `` | | [Apple Macs with a T2 Chip](apple/t2) | `` | +| [Aoostar R1 N100](aoostar/r1/n100) | `` | | [Asus Pro WS X570-ACE](asus/pro-ws-x570-ace) | `` | | [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | | [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/amdgpu) | `` | diff --git a/aoostar/r1/n100/default.nix b/aoostar/r1/n100/default.nix new file mode 100644 index 00000000..b80e0654 --- /dev/null +++ b/aoostar/r1/n100/default.nix @@ -0,0 +1,12 @@ +{ + imports = [ + ../../../common/cpu/intel/alder-lake + ]; + + # lopter@(2025-02-06): according to sensors-detect this comes with an ITE + # IT8613E super io chip, which is not officialy supported yet. See also: + # + # - unofficial driver: https://github.com/frankcrawford/it87 + # - reddit thread on with useful information to configure pwm from the bios: + # https://www.reddit.com/r/MiniPCs/comments/1bnkg1u/aoostar_r1r7_question_does_the_fan_header_support/ +} diff --git a/flake.nix b/flake.nix index 17a36e63..8ef4e52e 100644 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,7 @@ { acer-aspire-4810t = import ./acer/aspire/4810t; airis-n990 = import ./airis/n990; + aoostar-r1-n100 = import ./aoostar/r1/n100; apple-imac-14-2 = import ./apple/imac/14-2; apple-imac-18-2 = import ./apple/imac/18-2; apple-macbook-air-3 = import ./apple/macbook-air/3; From 099d38a69ed75b6f549aa0daadc08c075d44a4d7 Mon Sep 17 00:00:00 2001 From: Andrew Kvalheim Date: Sat, 8 Feb 2025 09:00:22 -0800 Subject: [PATCH 1227/1476] lenovo/thinkpad/p16s/amd/gen2: init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Notes: - Tested on a model 21K9CTR1WW configured with: - AMD Ryzen 7 PRO 7840U with Radeon 780M Graphics - 64 GB soldered RAM - WQUXGA (3840×2400) OLED display - Qualcomm NFA765 wireless network adapter - BIOS version R2FET38W (1.18) - The user guide is shared by: - ThinkPad P14s Gen 4 - ThinkPad P16s Gen 2 - ThinkPad T14 Gen 4 - ThinkPad T16 Gen 2 --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/p16s/amd/default.nix | 7 +++++++ lenovo/thinkpad/p16s/amd/gen2/default.nix | 5 +++++ lenovo/thinkpad/p16s/default.nix | 6 ++++++ 5 files changed, 20 insertions(+) create mode 100644 lenovo/thinkpad/p16s/amd/default.nix create mode 100644 lenovo/thinkpad/p16s/amd/gen2/default.nix create mode 100644 lenovo/thinkpad/p16s/default.nix diff --git a/README.md b/README.md index 412d80e6..26e7dcbe 100644 --- a/README.md +++ b/README.md @@ -243,6 +243,7 @@ See code for all available configurations. | [Lenovo ThinkPad P14s AMD Gen 4](lenovo/thinkpad/p14s/amd/gen4) | `` | | [Lenovo ThinkPad P14s Intel Gen 3](lenovo/thinkpad/p14s/intel/gen3) | `` | | [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | +| [Lenovo ThinkPad P16s AMD Gen 2](lenovo/thinkpad/p16s/amd/gen2) | `` | | [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | | [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | | [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `` | diff --git a/flake.nix b/flake.nix index 8ef4e52e..b1b88f0b 100644 --- a/flake.nix +++ b/flake.nix @@ -184,6 +184,7 @@ lenovo-thinkpad-p14s-amd-gen4 = import ./lenovo/thinkpad/p14s/amd/gen4; lenovo-thinkpad-p14s-intel-gen3 = import ./lenovo/thinkpad/p14s/intel/gen3; lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1; + lenovo-thinkpad-p16s-amd-gen2 = import ./lenovo/thinkpad/p16s/amd/gen2; lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50; lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51; lenovo-thinkpad-p52 = import ./lenovo/thinkpad/p52; diff --git a/lenovo/thinkpad/p16s/amd/default.nix b/lenovo/thinkpad/p16s/amd/default.nix new file mode 100644 index 00000000..4dd23b34 --- /dev/null +++ b/lenovo/thinkpad/p16s/amd/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ../. + ../../../../common/cpu/amd + ../../../../common/gpu/amd + ]; +} diff --git a/lenovo/thinkpad/p16s/amd/gen2/default.nix b/lenovo/thinkpad/p16s/amd/gen2/default.nix new file mode 100644 index 00000000..665d3d41 --- /dev/null +++ b/lenovo/thinkpad/p16s/amd/gen2/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../. + ]; +} diff --git a/lenovo/thinkpad/p16s/default.nix b/lenovo/thinkpad/p16s/default.nix new file mode 100644 index 00000000..53a9fdf5 --- /dev/null +++ b/lenovo/thinkpad/p16s/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../. + ../../../common/pc/laptop/ssd + ]; +} From 80340dcf8634d6a8e0920c5696cad5293fc8b64b Mon Sep 17 00:00:00 2001 From: ZHANG Yuntian Date: Thu, 6 Feb 2025 19:13:51 +0800 Subject: [PATCH 1228/1476] rockchip/rk3399: reverse dependency order This order works better when we have more SoCs. --- radxa/rock-4c-plus/default.nix | 2 +- rockchip/default.nix | 4 ++++ rockchip/rk3399/default.nix | 6 +----- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/radxa/rock-4c-plus/default.nix b/radxa/rock-4c-plus/default.nix index 5fb9d5d3..5f1b0278 100644 --- a/radxa/rock-4c-plus/default.nix +++ b/radxa/rock-4c-plus/default.nix @@ -9,7 +9,7 @@ let in { imports = [ ../. - ../../rockchip/rk3399 + ../../rockchip ]; options.hardware.radxa.rock-4c-plus = { diff --git a/rockchip/default.nix b/rockchip/default.nix index 461baedd..d8d26720 100644 --- a/rockchip/default.nix +++ b/rockchip/default.nix @@ -6,6 +6,10 @@ let cfg = config.hardware.rockchip; in { + imports = [ + ./rk3399 + ]; + options.hardware.rockchip = { enable = lib.mkEnableOption "Rockchip SoC support"; diskoImageName = lib.mkOption { diff --git a/rockchip/rk3399/default.nix b/rockchip/rk3399/default.nix index 3aea18fd..5748c33e 100644 --- a/rockchip/rk3399/default.nix +++ b/rockchip/rk3399/default.nix @@ -6,12 +6,8 @@ let cfg = config.hardware.rockchip.rk3399; in { - imports = [ - ../. - ]; - options.hardware.rockchip.rk3399 = { - enable = lib.mkEnableOption "Rockchip RK3399 support"; + enable = lib.mkEnableOption "Rockchip RK3399 support"; }; config = lib.mkIf cfg.enable { From 79bc209be8dbb9fd68f1d6612fe0305ea0534099 Mon Sep 17 00:00:00 2001 From: ZHANG Yuntian Date: Thu, 6 Feb 2025 18:46:31 +0800 Subject: [PATCH 1229/1476] radxa/rock-pi-4: init --- README.md | 1 + flake.nix | 1 + radxa/rock-pi-4/default.nix | 31 +++++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 radxa/rock-pi-4/default.nix diff --git a/README.md b/README.md index 26e7dcbe..134c3d3f 100644 --- a/README.md +++ b/README.md @@ -348,6 +348,7 @@ See code for all available configurations. | [Purism Librem 15v3](purism/librem/13v3) | `` | | [Purism Librem 5r4](purism/librem/5r4) | `` | | [Radxa ROCK 4C+](radxa/rock-4c-plus) | `` | +| [Radxa ROCK Pi 4](radxa/rock-pi-4) | `` | | [Raspberry Pi 2](raspberry-pi/2) | `` | | [Raspberry Pi 3](raspberry-pi/3) | `` | | [Raspberry Pi 4](raspberry-pi/4) | `` | diff --git a/flake.nix b/flake.nix index b1b88f0b..8a1dc042 100644 --- a/flake.nix +++ b/flake.nix @@ -300,6 +300,7 @@ raspberry-pi-4 = import ./raspberry-pi/4; raspberry-pi-5 = import ./raspberry-pi/5; rock-4c-plus = import ./radxa/rock-4c-plus; + rock-pi-4 = import ./radxa/rock-pi-4; kobol-helios4 = import ./kobol/helios4; samsung-np900x3c = import ./samsung/np900x3c; slimbook-hero-rpl-rtx = import ./slimbook/hero/rpl-rtx; diff --git a/radxa/rock-pi-4/default.nix b/radxa/rock-pi-4/default.nix new file mode 100644 index 00000000..3cf2c6a4 --- /dev/null +++ b/radxa/rock-pi-4/default.nix @@ -0,0 +1,31 @@ +{ lib +, pkgs +, config +, ... +}: +let + cfg = config.hardware.radxa.rock-pi-4; + rkCfg = config.hardware.rockchip; +in { + imports = [ + ../. + ../../rockchip + ]; + + options.hardware.radxa.rock-pi-4 = { + platformFirmware = lib.mkPackageOption pkgs "ubootRockPi4" { }; + }; + + config = { + hardware = { + radxa.enable = true; + rockchip = { + rk3399.enable = true; + diskoExtraPostVM = '' + dd conv=notrunc,fsync if=${cfg.platformFirmware}/idbloader.img of=$out/${rkCfg.diskoImageName} bs=512 seek=64 + dd conv=notrunc,fsync if=${cfg.platformFirmware}/u-boot.itb of=$out/${rkCfg.diskoImageName} bs=512 seek=16384 + ''; + }; + }; + }; +} From 28f2a7454f6278ce51c8ce70b2fe8f6452789200 Mon Sep 17 00:00:00 2001 From: ZHANG Yuntian Date: Thu, 6 Feb 2025 18:50:15 +0800 Subject: [PATCH 1230/1476] rockchip/rk3588: init --- rockchip/default.nix | 1 + rockchip/rk3588/default.nix | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 rockchip/rk3588/default.nix diff --git a/rockchip/default.nix b/rockchip/default.nix index d8d26720..38a451fd 100644 --- a/rockchip/default.nix +++ b/rockchip/default.nix @@ -8,6 +8,7 @@ let in { imports = [ ./rk3399 + ./rk3588 ]; options.hardware.rockchip = { diff --git a/rockchip/rk3588/default.nix b/rockchip/rk3588/default.nix new file mode 100644 index 00000000..cabc04b2 --- /dev/null +++ b/rockchip/rk3588/default.nix @@ -0,0 +1,16 @@ +{ lib +, pkgs +, config +, ... +}: +let + cfg = config.hardware.rockchip.rk3588; +in { + options.hardware.rockchip.rk3588 = { + enable = lib.mkEnableOption "Rockchip RK3588 support"; + }; + + config = lib.mkIf cfg.enable { + hardware.rockchip.enable = true; + }; +} From ab84bd93a3988fcbb2380df6563e575634f4c06f Mon Sep 17 00:00:00 2001 From: ZHANG Yuntian Date: Thu, 6 Feb 2025 18:53:08 +0800 Subject: [PATCH 1231/1476] radxa/rock-5b: init --- README.md | 1 + flake.nix | 1 + radxa/rock-5b/default.nix | 31 +++++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 radxa/rock-5b/default.nix diff --git a/README.md b/README.md index 134c3d3f..4cad0390 100644 --- a/README.md +++ b/README.md @@ -348,6 +348,7 @@ See code for all available configurations. | [Purism Librem 15v3](purism/librem/13v3) | `` | | [Purism Librem 5r4](purism/librem/5r4) | `` | | [Radxa ROCK 4C+](radxa/rock-4c-plus) | `` | +| [Radxa ROCK 5 Model B](radxa/rock-5b) | `` | | [Radxa ROCK Pi 4](radxa/rock-pi-4) | `` | | [Raspberry Pi 2](raspberry-pi/2) | `` | | [Raspberry Pi 3](raspberry-pi/3) | `` | diff --git a/flake.nix b/flake.nix index 8a1dc042..0051c92b 100644 --- a/flake.nix +++ b/flake.nix @@ -300,6 +300,7 @@ raspberry-pi-4 = import ./raspberry-pi/4; raspberry-pi-5 = import ./raspberry-pi/5; rock-4c-plus = import ./radxa/rock-4c-plus; + rock-5b = import ./radxa/rock-5b; rock-pi-4 = import ./radxa/rock-pi-4; kobol-helios4 = import ./kobol/helios4; samsung-np900x3c = import ./samsung/np900x3c; diff --git a/radxa/rock-5b/default.nix b/radxa/rock-5b/default.nix new file mode 100644 index 00000000..992b5ca2 --- /dev/null +++ b/radxa/rock-5b/default.nix @@ -0,0 +1,31 @@ +{ lib +, pkgs +, config +, ... +}: +let + cfg = config.hardware.radxa.rock-5b; + rkCfg = config.hardware.rockchip; +in { + imports = [ + ../. + ../../rockchip + ]; + + options.hardware.radxa.rock-5b = { + platformFirmware = lib.mkPackageOption pkgs "ubootRock5ModelB" { }; + }; + + config = { + hardware = { + radxa.enable = true; + rockchip = { + rk3588.enable = true; + diskoExtraPostVM = '' + dd conv=notrunc,fsync if=${cfg.platformFirmware}/idbloader.img of=$out/${rkCfg.diskoImageName} bs=512 seek=64 + dd conv=notrunc,fsync if=${cfg.platformFirmware}/u-boot.itb of=$out/${rkCfg.diskoImageName} bs=512 seek=16384 + ''; + }; + }; + }; +} From 0b2e2fe9b312d973d347ec71ec9323685dd17e5b Mon Sep 17 00:00:00 2001 From: ZHANG Yuntian Date: Fri, 7 Feb 2025 14:28:18 +0800 Subject: [PATCH 1232/1476] rockchip: support generic firmware installation --- radxa/README.md | 4 ++-- radxa/rock-4c-plus/default.nix | 15 ++------------- radxa/rock-5b/default.nix | 15 ++------------- radxa/rock-pi-4/default.nix | 15 ++------------- rockchip/default.nix | 18 ++++++++++++++++-- 5 files changed, 24 insertions(+), 43 deletions(-) diff --git a/radxa/README.md b/radxa/README.md index b17e6b67..b4ec2a97 100644 --- a/radxa/README.md +++ b/radxa/README.md @@ -74,8 +74,8 @@ Below is an annoated flake example to create the initial boot image. # Override the default bootloader with a cross built one. # Use this if you do not have binfmt configured on your system. # For NixOS, please add `boot.binfmt.emulatedSystems = [ "aarch64-linux" ];` to your system configuration. - # Update the system and the firmware package according to your device. - # hardware.radxa.rock-4c-plus.platformFirmware = nixpkgs-unfree.legacyPackages.x86_64-linux.pkgsCross.aarch64-multiplatform.ubootRock4CPlus; + # Read the device module to see how it was configured. + # hardware.rockchip.platformFirmware = nixpkgs-unfree.legacyPackages.x86_64-linux.pkgsCross.aarch64-multiplatform.ubootRock4CPlus; users.users.radxa = { isNormalUser = true; diff --git a/radxa/rock-4c-plus/default.nix b/radxa/rock-4c-plus/default.nix index 5f1b0278..7550483d 100644 --- a/radxa/rock-4c-plus/default.nix +++ b/radxa/rock-4c-plus/default.nix @@ -2,29 +2,18 @@ , pkgs , config , ... -}: -let - cfg = config.hardware.radxa.rock-4c-plus; - rkCfg = config.hardware.rockchip; -in { +}: { imports = [ ../. ../../rockchip ]; - options.hardware.radxa.rock-4c-plus = { - platformFirmware = lib.mkPackageOption pkgs "ubootRock4CPlus" { }; - }; - config = { hardware = { radxa.enable = true; rockchip = { rk3399.enable = true; - diskoExtraPostVM = '' - dd conv=notrunc,fsync if=${cfg.platformFirmware}/idbloader.img of=$out/${rkCfg.diskoImageName} bs=512 seek=64 - dd conv=notrunc,fsync if=${cfg.platformFirmware}/u-boot.itb of=$out/${rkCfg.diskoImageName} bs=512 seek=16384 - ''; + platformFirmware = pkgs.ubootRock4CPlus; }; }; }; diff --git a/radxa/rock-5b/default.nix b/radxa/rock-5b/default.nix index 992b5ca2..aff9a81b 100644 --- a/radxa/rock-5b/default.nix +++ b/radxa/rock-5b/default.nix @@ -2,29 +2,18 @@ , pkgs , config , ... -}: -let - cfg = config.hardware.radxa.rock-5b; - rkCfg = config.hardware.rockchip; -in { +}: { imports = [ ../. ../../rockchip ]; - options.hardware.radxa.rock-5b = { - platformFirmware = lib.mkPackageOption pkgs "ubootRock5ModelB" { }; - }; - config = { hardware = { radxa.enable = true; rockchip = { rk3588.enable = true; - diskoExtraPostVM = '' - dd conv=notrunc,fsync if=${cfg.platformFirmware}/idbloader.img of=$out/${rkCfg.diskoImageName} bs=512 seek=64 - dd conv=notrunc,fsync if=${cfg.platformFirmware}/u-boot.itb of=$out/${rkCfg.diskoImageName} bs=512 seek=16384 - ''; + platformFirmware = pkgs.ubootRock5ModelB; }; }; }; diff --git a/radxa/rock-pi-4/default.nix b/radxa/rock-pi-4/default.nix index 3cf2c6a4..74b97dd9 100644 --- a/radxa/rock-pi-4/default.nix +++ b/radxa/rock-pi-4/default.nix @@ -2,29 +2,18 @@ , pkgs , config , ... -}: -let - cfg = config.hardware.radxa.rock-pi-4; - rkCfg = config.hardware.rockchip; -in { +}: { imports = [ ../. ../../rockchip ]; - options.hardware.radxa.rock-pi-4 = { - platformFirmware = lib.mkPackageOption pkgs "ubootRockPi4" { }; - }; - config = { hardware = { radxa.enable = true; rockchip = { rk3399.enable = true; - diskoExtraPostVM = '' - dd conv=notrunc,fsync if=${cfg.platformFirmware}/idbloader.img of=$out/${rkCfg.diskoImageName} bs=512 seek=64 - dd conv=notrunc,fsync if=${cfg.platformFirmware}/u-boot.itb of=$out/${rkCfg.diskoImageName} bs=512 seek=16384 - ''; + platformFirmware = pkgs.ubootRockPi4; }; }; }; diff --git a/rockchip/default.nix b/rockchip/default.nix index 38a451fd..2d4715d3 100644 --- a/rockchip/default.nix +++ b/rockchip/default.nix @@ -17,12 +17,26 @@ in { type = lib.types.str; default = "main.raw"; description = '' - The output image name for Disko. - Can be used by diskoExtraPostVM. + The output image name of Disko. + You need to match this value with the real image name. Setting it alone + won't change the output image name, as it is controlled by Disko module. + + Can be used in diskoExtraPostVM. ''; }; + platformFirmware = lib.mkPackageOption pkgs "platform firmware" { + default = null; + }; diskoExtraPostVM = lib.mkOption { type = lib.types.str; + default = '' + ${lib.getExe' pkgs.coreutils "dd"} conv=notrunc,fsync if=${config.hardware.rockchip.platformFirmware}/idbloader.img of=$out/${config.hardware.rockchip.diskoImageName} bs=512 seek=64 + ${lib.getExe' pkgs.coreutils "dd"} conv=notrunc,fsync if=${config.hardware.rockchip.platformFirmware}/u-boot.itb of=$out/${config.hardware.rockchip.diskoImageName} bs=512 seek=16384 + ''; + defaultText = lib.literalExpression '' + ${lib.getExe' pkgs.coreutils "dd"} conv=notrunc,fsync if=${config.hardware.rockchip.platformFirmware}/idbloader.img of=$out/${config.hardware.rockchip.diskoImageName} bs=512 seek=64 + ${lib.getExe' pkgs.coreutils "dd"} conv=notrunc,fsync if=${config.hardware.rockchip.platformFirmware}/u-boot.itb of=$out/${config.hardware.rockchip.diskoImageName} bs=512 seek=16384 + ''; description = '' The post VM hook for Disko's Image Builder. Can be used to install platform firmware like U-Boot. From 9d5dedae845305c219e18c5d5d32b3afe42e0f62 Mon Sep 17 00:00:00 2001 From: ZHANG Yuntian Date: Fri, 7 Feb 2025 14:45:09 +0800 Subject: [PATCH 1233/1476] radxa: clarify that the interface may subject to more changes We might refactor some parts again when we add Amlogic and Allwinner supports. --- radxa/README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/radxa/README.md b/radxa/README.md index b4ec2a97..e5940973 100644 --- a/radxa/README.md +++ b/radxa/README.md @@ -58,7 +58,7 @@ Below is an annoated flake example to create the initial boot image. modules = [ nixos-hardware.nixosModules.rock-4c-plus # Update the system according to your device. disko.nixosModules.disko # disko usage is optional in the running system, but we need it to generate the initial boot image. - "${nixos-hardware}/radxa/disko.nix" # Common Radxa Disko profile. it is system-agnostic. + "${nixos-hardware}/radxa/disko.nix" # Common Radxa Disko profile. It is system-agnostic. { disko = { imageBuilder = { @@ -92,3 +92,13 @@ Below is an annoated flake example to create the initial boot image. }; } ``` + +For most of the supported products, you only need to change the device module ( +i.e. `nixos-hardware.nixosModules.rock-4c-plus`) to match the one you are using. + +## Known issues + +* Currently, the `hardware.radxa` module and Radxa-maintained SoC vendor modules +(eg. `hardware.rockchip`) are tightly coupled and not intended for end-user to +use. Those options are currently used internally for hardware enablement, and +end-user should not need to modify them. Consider those interfaces **unstable**. From 76a98e3958980a4f59bf75bf615347b39f5576c6 Mon Sep 17 00:00:00 2001 From: ZHANG Yuntian Date: Fri, 7 Feb 2025 15:29:06 +0800 Subject: [PATCH 1234/1476] rockchip/rk3328: init --- rockchip/default.nix | 1 + rockchip/rk3328/default.nix | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 rockchip/rk3328/default.nix diff --git a/rockchip/default.nix b/rockchip/default.nix index 2d4715d3..68bbb83f 100644 --- a/rockchip/default.nix +++ b/rockchip/default.nix @@ -7,6 +7,7 @@ let cfg = config.hardware.rockchip; in { imports = [ + ./rk3328 ./rk3399 ./rk3588 ]; diff --git a/rockchip/rk3328/default.nix b/rockchip/rk3328/default.nix new file mode 100644 index 00000000..f2d53910 --- /dev/null +++ b/rockchip/rk3328/default.nix @@ -0,0 +1,16 @@ +{ lib +, pkgs +, config +, ... +}: +let + cfg = config.hardware.rockchip.rk3328; +in { + options.hardware.rockchip.rk3328 = { + enable = lib.mkEnableOption "Rockchip RK3328 support"; + }; + + config = lib.mkIf cfg.enable { + hardware.rockchip.enable = true; + }; +} From 9430c63e02d72eeb4d42b8df144f833a29d47f2e Mon Sep 17 00:00:00 2001 From: ZHANG Yuntian Date: Fri, 7 Feb 2025 15:33:49 +0800 Subject: [PATCH 1235/1476] radxa/rock-pi-e: init --- README.md | 1 + flake.nix | 1 + radxa/README.md | 8 ++++++++ radxa/rock-pi-e/default.nix | 20 ++++++++++++++++++++ 4 files changed, 30 insertions(+) create mode 100644 radxa/rock-pi-e/default.nix diff --git a/README.md b/README.md index 4cad0390..adc83e15 100644 --- a/README.md +++ b/README.md @@ -350,6 +350,7 @@ See code for all available configurations. | [Radxa ROCK 4C+](radxa/rock-4c-plus) | `` | | [Radxa ROCK 5 Model B](radxa/rock-5b) | `` | | [Radxa ROCK Pi 4](radxa/rock-pi-4) | `` | +| [Radxa ROCK Pi E](radxa/rock-pi-e) | `` | | [Raspberry Pi 2](raspberry-pi/2) | `` | | [Raspberry Pi 3](raspberry-pi/3) | `` | | [Raspberry Pi 4](raspberry-pi/4) | `` | diff --git a/flake.nix b/flake.nix index 0051c92b..08936002 100644 --- a/flake.nix +++ b/flake.nix @@ -302,6 +302,7 @@ rock-4c-plus = import ./radxa/rock-4c-plus; rock-5b = import ./radxa/rock-5b; rock-pi-4 = import ./radxa/rock-pi-4; + rock-pi-e = import ./radxa/rock-pi-e; kobol-helios4 = import ./kobol/helios4; samsung-np900x3c = import ./samsung/np900x3c; slimbook-hero-rpl-rtx = import ./slimbook/hero/rpl-rtx; diff --git a/radxa/README.md b/radxa/README.md index e5940973..484f2b3f 100644 --- a/radxa/README.md +++ b/radxa/README.md @@ -57,6 +57,14 @@ Below is an annoated flake example to create the initial boot image. system = "aarch64-linux"; modules = [ nixos-hardware.nixosModules.rock-4c-plus # Update the system according to your device. + + # Or, if the default platform firmware is not available in the NixOS version you are using: + # (import nixos-hardware.nixosModules.rock-pi-e { + # lib = nixpkgs-unfree.lib; + # config = nixpkgs-unfree.config; + # pkgs = nixpkgs-unfree.legacyPackages.aarch64-linux; + # }) + disko.nixosModules.disko # disko usage is optional in the running system, but we need it to generate the initial boot image. "${nixos-hardware}/radxa/disko.nix" # Common Radxa Disko profile. It is system-agnostic. { diff --git a/radxa/rock-pi-e/default.nix b/radxa/rock-pi-e/default.nix new file mode 100644 index 00000000..4328ca7b --- /dev/null +++ b/radxa/rock-pi-e/default.nix @@ -0,0 +1,20 @@ +{ lib +, pkgs +, config +, ... +}: { + imports = [ + ../. + ../../rockchip + ]; + + config = { + hardware = { + radxa.enable = true; + rockchip = { + rk3328.enable = true; + platformFirmware = pkgs.ubootRockPiE; + }; + }; + }; +} From bbf25ca940de16f74bf2264935bd748d6793228d Mon Sep 17 00:00:00 2001 From: ZHANG Yuntian Date: Fri, 7 Feb 2025 16:14:39 +0800 Subject: [PATCH 1236/1476] radxa: allow platformFirmware to be overridable Previously, it was a product-level option with a default value. --- radxa/rock-4c-plus/default.nix | 2 +- radxa/rock-5b/default.nix | 2 +- radxa/rock-pi-4/default.nix | 2 +- radxa/rock-pi-e/default.nix | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/radxa/rock-4c-plus/default.nix b/radxa/rock-4c-plus/default.nix index 7550483d..e432dd74 100644 --- a/radxa/rock-4c-plus/default.nix +++ b/radxa/rock-4c-plus/default.nix @@ -13,7 +13,7 @@ radxa.enable = true; rockchip = { rk3399.enable = true; - platformFirmware = pkgs.ubootRock4CPlus; + platformFirmware = lib.mkDefault pkgs.ubootRock4CPlus; }; }; }; diff --git a/radxa/rock-5b/default.nix b/radxa/rock-5b/default.nix index aff9a81b..c8a899dd 100644 --- a/radxa/rock-5b/default.nix +++ b/radxa/rock-5b/default.nix @@ -13,7 +13,7 @@ radxa.enable = true; rockchip = { rk3588.enable = true; - platformFirmware = pkgs.ubootRock5ModelB; + platformFirmware = lib.mkDefault pkgs.ubootRock5ModelB; }; }; }; diff --git a/radxa/rock-pi-4/default.nix b/radxa/rock-pi-4/default.nix index 74b97dd9..e205a46e 100644 --- a/radxa/rock-pi-4/default.nix +++ b/radxa/rock-pi-4/default.nix @@ -13,7 +13,7 @@ radxa.enable = true; rockchip = { rk3399.enable = true; - platformFirmware = pkgs.ubootRockPi4; + platformFirmware = lib.mkDefault pkgs.ubootRockPi4; }; }; }; diff --git a/radxa/rock-pi-e/default.nix b/radxa/rock-pi-e/default.nix index 4328ca7b..0eec4e9a 100644 --- a/radxa/rock-pi-e/default.nix +++ b/radxa/rock-pi-e/default.nix @@ -13,7 +13,7 @@ radxa.enable = true; rockchip = { rk3328.enable = true; - platformFirmware = pkgs.ubootRockPiE; + platformFirmware = lib.mkDefault pkgs.ubootRockPiE; }; }; }; From 55e9685ec6291cb010d57198dafc2e60bf294b13 Mon Sep 17 00:00:00 2001 From: shouya <526598+shouya@users.noreply.github.com> Date: Mon, 24 Feb 2025 17:29:57 +0900 Subject: [PATCH 1237/1476] Fix Gigabyte B650 suspend issue (#1385) --- README.md | 1 + flake.nix | 1 + gigabyte/b650/README.md | 5 ----- gigabyte/b650/b650-fix-suspend.nix | 6 ++++++ gigabyte/b650/default.nix | 5 +++++ 5 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 gigabyte/b650/b650-fix-suspend.nix create mode 100644 gigabyte/b650/default.nix diff --git a/README.md b/README.md index adc83e15..05f80eb4 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,7 @@ See code for all available configurations. | [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | | [Focus M2 Gen 1](focus/m2/gen1) | `` | | [Gigabyte B550](gigabyte/b550) | `` | +| [Gigabyte B650](gigabyte/b650) | `` | | [GPD MicroPC](gpd/micropc) | `` | | [GPD P2 Max](gpd/p2-max) | `` | | [GPD Pocket 3](gpd/pocket-3) | `` | diff --git a/flake.nix b/flake.nix index 08936002..b0ff9508 100644 --- a/flake.nix +++ b/flake.nix @@ -123,6 +123,7 @@ friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; focus-m2-gen1 = import ./focus/m2/gen1; gigabyte-b550 = import ./gigabyte/b550; + gigabyte-b650 = import ./gigabyte/b650; google-pixelbook = import ./google/pixelbook; gpd-micropc = import ./gpd/micropc; gpd-p2-max = import ./gpd/p2-max; diff --git a/gigabyte/b650/README.md b/gigabyte/b650/README.md index aeb23cd9..94d20c3c 100644 --- a/gigabyte/b650/README.md +++ b/gigabyte/b650/README.md @@ -6,8 +6,3 @@ bug where the PC will wakeup immediately after going into suspend. ## Affects at least - Gigabyte B650M Aorus Elite AX (Rev. 1.3) (BIOS Version F32b) - - Can not be fixed by modifying enabled entries in /proc/acpi/wakeup. - Computer wakes up even if all enabled entries are disabled. Therefore, no - fix exist currently. - - diff --git a/gigabyte/b650/b650-fix-suspend.nix b/gigabyte/b650/b650-fix-suspend.nix new file mode 100644 index 00000000..b82bd33c --- /dev/null +++ b/gigabyte/b650/b650-fix-suspend.nix @@ -0,0 +1,6 @@ +{ + # see https://bbs.archlinux.org/viewtopic.php?pid=2227023 + boot.kernelParams = [ + "acpi_osi=\"!Windows 2015\"" + ]; +} diff --git a/gigabyte/b650/default.nix b/gigabyte/b650/default.nix new file mode 100644 index 00000000..4b0a77af --- /dev/null +++ b/gigabyte/b650/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./b650-fix-suspend.nix + ]; +} From d58f642ddb23320965b27beb0beba7236e9117b5 Mon Sep 17 00:00:00 2001 From: Nicky Mouha Date: Mon, 20 Jan 2025 01:23:09 -0500 Subject: [PATCH 1238/1476] Rename dell/e7240 to dell/latitude/e7240 --- README.md | 2 +- dell/e7240/default.nix | 11 +++++++++-- dell/{ => latitude}/e7240/README.md | 0 dell/latitude/e7240/default.nix | 6 ++++++ flake.nix | 5 ++++- 5 files changed, 20 insertions(+), 4 deletions(-) rename dell/{ => latitude}/e7240/README.md (100%) create mode 100644 dell/latitude/e7240/default.nix diff --git a/README.md b/README.md index 05f80eb4..236c0714 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ See code for all available configurations. | [Dell Latitude 7430](dell/latitude/7430) | `` | | [Dell Latitude 7490](dell/latitude/7490) | `` | | [Dell Latitude 9430](dell/latitude/9430) | `` | +| [Dell Latitude E7240](dell/latitude/e7240) | `` | | [Dell Optiplex 3050](dell/optiplex/3050) | `` | | [Dell Poweredge R7515](dell/poweredge/r7515) | `` | | [Dell Precision 3541](dell/precision/3541) | `` | @@ -173,7 +174,6 @@ See code for all available configurations. | [Dell XPS 17 9700, intel](dell/xps/17-9700/intel) | `` | | [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | -| [Dell XPS E7240](dell/e7240) | `` | | [Framework 11th Gen Intel Core](framework/13-inch/11th-gen-intel) | `` | | [Framework 12th Gen Intel Core](framework/13-inch/12th-gen-intel) | `` | | [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `` | diff --git a/dell/e7240/default.nix b/dell/e7240/default.nix index 102da6bb..5b819abf 100644 --- a/dell/e7240/default.nix +++ b/dell/e7240/default.nix @@ -1,6 +1,13 @@ { imports = [ - ../../common/cpu/intel - ../../common/pc/laptop + ../latitude/e7240/default.nix + ]; + + warnings = [ + '' + DEPRECATED: Importing dell/e7240 is deprecated. Use dell/latitude/e7240 instead. + + This module will be removed in a future release. + '' ]; } diff --git a/dell/e7240/README.md b/dell/latitude/e7240/README.md similarity index 100% rename from dell/e7240/README.md rename to dell/latitude/e7240/README.md diff --git a/dell/latitude/e7240/default.nix b/dell/latitude/e7240/default.nix new file mode 100644 index 00000000..14701f94 --- /dev/null +++ b/dell/latitude/e7240/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ]; +} diff --git a/flake.nix b/flake.nix index b0ff9508..3a4efd77 100644 --- a/flake.nix +++ b/flake.nix @@ -56,7 +56,9 @@ beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; chuwi-minibook-x = import ./chuwi/minibook-x; deciso-dec = import ./deciso/dec; - dell-e7240 = import ./dell/e7240; + dell-e7240 = + deprecated "1326" "dell-e7240" + (import ./dell/e7240); dell-g3-3779 = import ./dell/g3/3779; dell-g3-3579 = import ./dell/g3/3579; dell-inspiron-14-5420 = import ./dell/inspiron/14-5420; @@ -74,6 +76,7 @@ dell-latitude-7430 = import ./dell/latitude/7430; dell-latitude-7490 = import ./dell/latitude/7490; dell-latitude-9430 = import ./dell/latitude/9430; + dell-latitude-e7240 = import ./dell/latitude/e7240; dell-optiplex-3050 = import ./dell/optiplex/3050; dell-poweredge-r7515 = import ./dell/poweredge/r7515; dell-precision-3541 = import ./dell/precision/3541; From 009b764ac98a3602d41fc68072eeec5d24fc0e49 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Tue, 25 Feb 2025 08:39:05 +0800 Subject: [PATCH 1239/1476] apple/t2: update patches for the latest kernel --- apple/t2/pkgs/linux-t2/latest.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apple/t2/pkgs/linux-t2/latest.json b/apple/t2/pkgs/linux-t2/latest.json index 03c9714b..d5b63805 100644 --- a/apple/t2/pkgs/linux-t2/latest.json +++ b/apple/t2/pkgs/linux-t2/latest.json @@ -1,5 +1,5 @@ { - "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/8f138bc16772fdeb0fc68b631fb6f66ddae1a0a1/", + "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/73bbcb413e8c9294c27ec9b53f84d8b19ecd3f05/", "patches": [ { "name": "1001-Add-apple-bce-driver.patch", @@ -97,10 +97,6 @@ "name": "4001-Input-bcm5974-Add-support-for-the-T2-Macs.patch", "hash": "sha256-CaviinY3rYqQh+/DGyeBTzLL/ZfIvguOQlWCs3KN4zc=" }, - { - "name": "5001-wifi-brcmfmac-use-random-seed-flag-for-BCM4355-and-B.patch", - "hash": "sha256-tlKhUNmDfsKat6O8eK1h84qikUj1Kiv9bbBQaZuDQK4=" - }, { "name": "7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch", "hash": "sha256-O6RHFxmKZn7aCq1D+r5z2T3jLt0r5+01EABD9rs0E5M=" From d23a3bc3c600a064c72c7fb02862edfab11a46cf Mon Sep 17 00:00:00 2001 From: matthiasdotsh Date: Fri, 28 Feb 2025 10:17:05 +0100 Subject: [PATCH 1240/1476] surface: linux 6.12.16 -> 6.12.17 --- microsoft/surface/common/kernel/linux-surface/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-surface/default.nix b/microsoft/surface/common/kernel/linux-surface/default.nix index 0a784528..f78aad86 100644 --- a/microsoft/surface/common/kernel/linux-surface/default.nix +++ b/microsoft/surface/common/kernel/linux-surface/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.12.16"; + version = "6.12.17"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "sha256-X4E2KmlPUVIL/5+uy3PxzJvHvs5v3RDVwn40jfOdfcQ="; + sha256 = "sha256-XCBc00+Al05Jc+MhywCPX2iVqKqMJXfwapRIzXfeY7M="; ignoreConfigErrors=true; }; From 52cfc084ef508ec25ea960afc2995032b679b45e Mon Sep 17 00:00:00 2001 From: ccritter <19559103+ccritter@users.noreply.github.com> Date: Mon, 24 Feb 2025 17:28:38 -0800 Subject: [PATCH 1241/1476] dell/inspiron/7559: add + corresponding Skylake architecture configuration. --- README.md | 3 +- common/cpu/intel/skylake/cpu-only.nix | 5 +++ common/cpu/intel/skylake/default.nix | 6 +++ common/gpu/intel/skylake/default.nix | 18 +++++++++ dell/inspiron/7559/README.md | 58 +++++++++++++++++++++++++++ dell/inspiron/7559/default.nix | 24 +++++++++++ flake.nix | 1 + 7 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 common/cpu/intel/skylake/cpu-only.nix create mode 100644 common/cpu/intel/skylake/default.nix create mode 100644 common/gpu/intel/skylake/default.nix create mode 100644 dell/inspiron/7559/README.md create mode 100644 dell/inspiron/7559/default.nix diff --git a/README.md b/README.md index 236c0714..3b8a0b50 100644 --- a/README.md +++ b/README.md @@ -120,12 +120,13 @@ See code for all available configurations. | [Deciso DEC series](deciso/dec) | `` | | [Dell G3 3779](dell/g3/3779) | `` | | [Dell G3 3579](dell/g3/3579) | `` | -| [Dell Inspiron 3442](dell/inspiron/3442) | `` | +| [Dell Inspiron 3442](dell/inspiron/3442) | `` | | [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | | [Dell Inspiron 5509](dell/inspiron/5509) | `` | | [Dell Inspiron 5515](dell/inspiron/5515) | `` | | [Dell Inspiron 7405](dell/inspiron/7405) | `` | | [Dell Inspiron 7460](dell/inspiron/7460) | `` | +| [Dell Inspiron 7559](dell/inspiron/7559) | `` | | [Dell Latitude 3340](dell/latitude/3340) | `` | | [Dell Latitude 3480](dell/latitude/3480) | `` | | [Dell Latitude 5490](dell/latitude/5490) | `` | diff --git a/common/cpu/intel/skylake/cpu-only.nix b/common/cpu/intel/skylake/cpu-only.nix new file mode 100644 index 00000000..82892615 --- /dev/null +++ b/common/cpu/intel/skylake/cpu-only.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../cpu-only.nix + ]; +} diff --git a/common/cpu/intel/skylake/default.nix b/common/cpu/intel/skylake/default.nix new file mode 100644 index 00000000..80deef3f --- /dev/null +++ b/common/cpu/intel/skylake/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./cpu-only.nix + ../../../gpu/intel/skylake + ]; +} diff --git a/common/gpu/intel/skylake/default.nix b/common/gpu/intel/skylake/default.nix new file mode 100644 index 00000000..e9c24279 --- /dev/null +++ b/common/gpu/intel/skylake/default.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: + +{ + imports = [ ../. ]; + + boot.kernelParams = [ + "i915.enable_guc=2" + ]; + + # VP9 decoding not supported when using intel-media-driver + # https://github.com/intel/media-driver/issues/1024 + # NixOS Wiki recommends using the legacy intel-vaapi-driver with the hybrid codec over that one for Skylake. + # https://wiki.nixos.org/wiki/Accelerated_Video_Playback + hardware.intelgpu = { + vaapiDriver = "intel-vaapi-driver"; + enableHybridCodec = true; + }; +} diff --git a/dell/inspiron/7559/README.md b/dell/inspiron/7559/README.md new file mode 100644 index 00000000..a1bb0427 --- /dev/null +++ b/dell/inspiron/7559/README.md @@ -0,0 +1,58 @@ +## Dell Inspiron 7559 + +### Tested Hardware + +```shellsession +$ lspci -nn +00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers [8086:1910] (rev 07) +00:01.0 PCI bridge [0604]: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 07) +00:01.1 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x8) [8086:1905] (rev 07) +00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:191b] (rev 06) +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 07) +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:16.0 Communication controller [0780]: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 [8086:a13a] (rev 31) +00:17.0 SATA controller [0106]: Intel Corporation HM170/QM170 Chipset SATA Controller [AHCI Mode] [8086:a103] (rev 31) +00:1c.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #1 [8086:a110] (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:1c.5 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #6 [8086:a115] (rev f1) +00:1c.6 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #7 [8086:a116] (rev f1) +00:1f.0 ISA bridge [0601]: Intel Corporation HM170 Chipset LPC/eSPI Controller [8086:a14e] (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 100 Series/C230 Series Chipset Family HD Audio Controller [8086:a170] (rev 31) +00:1f.4 SMBus [0c05]: Intel Corporation 100 Series/C230 Series Chipset Family SMBus [8086:a123] (rev 31) +02:00.0 3D controller [0302]: NVIDIA Corporation GM107M [GeForce GTX 960M] [10de:139b] (rev a2) +04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10) +05:00.0 Network controller [0280]: Intel Corporation Wireless 3165 [8086:3165] (rev 79) +06:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader [10ec:522a] (rev 01) + +``` + +### Extra Configuration + +#### Bluetooth + +To enable bluetooth support, set `hardware.bluetooth.enable = true;`. + +#### Prime Offloading + +This configuration uses Nvidia Prime offloading, which allows use of the `nvidia-offload` script for running commands on the dGPU. For example, you can instruct Steam to launch a game offloaded to the GPU by setting the launch options for that game to `nvidia-offload %command%`. + +#### SSD + +This laptop has an optional M.2 SSD slot, which isn't accounted for here. If you are using the SSD, you could look into implementing the options in [ssd](common/pc/laptop/ssd) manually. Some sources also say you should ensure your SATA Mode is set to AHCI in your BIOS for it to be detected, however I think this is a prerequisite to installing Linux on this laptop in the first place so you probably already have that set. + +#### Subwoofer + +Tested with the default PipeWire configuration on Plasma, the subwoofer appears to work depending on the device Profile in sound settings ("Analog Stereo Duplex" works best for me). I have had issues with it in the past on other distros, so if it's not working on your system you could try the solution in [this thread](https://bbs.archlinux.org/viewtopic.php?id=207222). + +#### Other issues + +There are plenty of documented bugs and threads around issues on Dell laptops like this. Some of them stem from using the nouveau drivers, but we're using the proprietary Nvidia drivers here. Some things to look into if you're experiencing issues: + +* I/O is slow: `nouveau` could be added as a kernel blocklist item: searching this repo shows other laptops with this configuration +* Power drain while sleeping: add the following as boot.kernelParams: `"mem_sleep_default=deep"` +* Issues coming back from suspend (particularly if the previous kernelParam is applied): add the following as boot.kernelParams: `"acpi_rev_override=1"` `"acpi_osi=Linux"` + * I also spotted [one person recommending](https://connorkuehl.github.io/dell-inspiron-7559-linux-guide/) setting just `"acpi_osi="`. This article is quite old though and I haven't tested the difference. +* Brightness function keys don't work: add the following as boot.kernelParams: `"acpi_backlight=vendor"` or `"acpi_backlight=native"` diff --git a/dell/inspiron/7559/default.nix b/dell/inspiron/7559/default.nix new file mode 100644 index 00000000..da837ba2 --- /dev/null +++ b/dell/inspiron/7559/default.nix @@ -0,0 +1,24 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/pc/laptop + ../../../common/pc/laptop/hdd + ../../../common/cpu/intel/skylake + ../../../common/gpu/nvidia/maxwell + ../../../common/gpu/nvidia/prime.nix + ]; + + hardware = { + nvidia.prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:2:0:0"; + }; + + enableRedistributableFirmware = lib.mkDefault true; + }; + + services = { + thermald.enable = lib.mkDefault true; + }; +} diff --git a/flake.nix b/flake.nix index 3a4efd77..96ee8c39 100644 --- a/flake.nix +++ b/flake.nix @@ -66,6 +66,7 @@ dell-inspiron-5515 = import ./dell/inspiron/5515; dell-inspiron-7405 = import ./dell/inspiron/7405; dell-inspiron-7460 = import ./dell/inspiron/7460; + dell-inspiron-7559 = import ./dell/inspiron/7559; dell-latitude-3340 = import ./dell/latitude/3340; dell-latitude-3480 = import ./dell/latitude/3480; dell-latitude-5490 = import ./dell/latitude/5490; From 5335d4303bb020eb43acdcd16a872468091aa649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 7 Mar 2025 05:04:17 +0100 Subject: [PATCH 1242/1476] README: fix typos in the examples and make formatting more consistent --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3b8a0b50..d52bc426 100644 --- a/README.md +++ b/README.md @@ -120,8 +120,8 @@ See code for all available configurations. | [Deciso DEC series](deciso/dec) | `` | | [Dell G3 3779](dell/g3/3779) | `` | | [Dell G3 3579](dell/g3/3579) | `` | -| [Dell Inspiron 3442](dell/inspiron/3442) | `` | -| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | +| [Dell Inspiron 3442](dell/inspiron/3442) | `` | +| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | | [Dell Inspiron 5509](dell/inspiron/5509) | `` | | [Dell Inspiron 5515](dell/inspiron/5515) | `` | | [Dell Inspiron 7405](dell/inspiron/7405) | `` | @@ -310,8 +310,8 @@ See code for all available configurations. | [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | | [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/amdgpu) | `` | | [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `` | -| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Integrated)](lenovo/yoga/7/14IAH7/integrated) |`` | -| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Hybrid)](lenovo/yoga/7/14IAH7/hybrid) |`` | +| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Integrated)](lenovo/yoga/7/14IAH7/integrated) | `` | +| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Hybrid)](lenovo/yoga/7/14IAH7/hybrid) | `` | | [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `` | | [MSI B550-A PRO](msi/b550-a-pro) | `` | | [MSI B350 TOMAHAWK](msi/b350-tomahawk) | `` | From 71ab5581a0f646e30482a3c39d7bd23f21425f12 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Tue, 4 Mar 2025 00:43:48 +0800 Subject: [PATCH 1243/1476] apple/t2: update patches --- apple/t2/pkgs/linux-t2/latest.json | 14 +++++--------- apple/t2/pkgs/linux-t2/stable.json | 14 +++++--------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/apple/t2/pkgs/linux-t2/latest.json b/apple/t2/pkgs/linux-t2/latest.json index d5b63805..5a1dfdcc 100644 --- a/apple/t2/pkgs/linux-t2/latest.json +++ b/apple/t2/pkgs/linux-t2/latest.json @@ -1,5 +1,5 @@ { - "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/73bbcb413e8c9294c27ec9b53f84d8b19ecd3f05/", + "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/2f093ab779b24997c3cbd9c2abb2e114bc34addb/", "patches": [ { "name": "1001-Add-apple-bce-driver.patch", @@ -38,16 +38,12 @@ "hash": "sha256-TJjXAlQ4WEROnq/xd6/4JHTuEJjqT7dLLcE4etKdzc0=" }, { - "name": "1012-lib-vsprintf-Add-support-for-generic-FOURCCs-by-exte.patch", - "hash": "sha256-cMl4WJcT/nM/z12LEsnLxssQgnRqKE+d/P2uMr5PUDQ=" - }, - { - "name": "1014-drm-format-helper-add-helper-for-BGR888-to-XRGB8888-.patch", - "hash": "sha256-iBM2z+/jZb/3+c9wHjC7W359oRl+DzFDZ1KL5eUc3qo=" + "name": "1014-drm-format-helper-Add-conversion-from-XRGB8888-to-BG.patch", + "hash": "sha256-Ky19+cCiYDaHBh2o5IhZO8J1ExDT7o8K9cgPz+AL8Cg=" }, { "name": "1015-drm-tiny-add-driver-for-Apple-Touch-Bars-in-x86-Macs.patch", - "hash": "sha256-sTb+ruY6W18wz9XRJzZKlfl4a8fGo1nrtCoOYNaPAjI=" + "hash": "sha256-wlMVeoDQtSRtGuquHKtAHvrGUzZOLxiwkmHj12ZQ8o0=" }, { "name": "2008-i915-4-lane-quirk-for-mbp15-1.patch", @@ -103,7 +99,7 @@ }, { "name": "8001-Add-APFS-driver.patch", - "hash": "sha256-40Gl8eR9RB6qEoU+vY7+sVWms8e566OUmAb9LZWZK3w=" + "hash": "sha256-qwLxBY0wDEPBqP32IcGS1Jd/5BlgMFxXu1z2N7+Ti50=" }, { "name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch", diff --git a/apple/t2/pkgs/linux-t2/stable.json b/apple/t2/pkgs/linux-t2/stable.json index ce38004c..5e672ec3 100644 --- a/apple/t2/pkgs/linux-t2/stable.json +++ b/apple/t2/pkgs/linux-t2/stable.json @@ -1,5 +1,5 @@ { - "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/19c29ff4bbda9f512b7b69d63d249de269dc66ab/", + "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/361d2cef87bb76ba14a24d30ed1479393d92be6f/", "patches": [ { "name": "1001-Add-apple-bce-driver.patch", @@ -38,16 +38,12 @@ "hash": "sha256-TJjXAlQ4WEROnq/xd6/4JHTuEJjqT7dLLcE4etKdzc0=" }, { - "name": "1012-lib-vsprintf-Add-support-for-generic-FOURCCs-by-exte.patch", - "hash": "sha256-cMl4WJcT/nM/z12LEsnLxssQgnRqKE+d/P2uMr5PUDQ=" - }, - { - "name": "1014-drm-format-helper-add-helper-for-BGR888-to-XRGB8888-.patch", - "hash": "sha256-iBM2z+/jZb/3+c9wHjC7W359oRl+DzFDZ1KL5eUc3qo=" + "name": "1014-drm-format-helper-Add-conversion-from-XRGB8888-to-BG.patch", + "hash": "sha256-Ky19+cCiYDaHBh2o5IhZO8J1ExDT7o8K9cgPz+AL8Cg=" }, { "name": "1015-drm-tiny-add-driver-for-Apple-Touch-Bars-in-x86-Macs.patch", - "hash": "sha256-sTb+ruY6W18wz9XRJzZKlfl4a8fGo1nrtCoOYNaPAjI=" + "hash": "sha256-wlMVeoDQtSRtGuquHKtAHvrGUzZOLxiwkmHj12ZQ8o0=" }, { "name": "2008-i915-4-lane-quirk-for-mbp15-1.patch", @@ -103,7 +99,7 @@ }, { "name": "8001-Add-APFS-driver.patch", - "hash": "sha256-RjEhzCqGvwRSGFjMgg1Z1kFwbxB9VT3SkVKoOdtDvP0=" + "hash": "sha256-oyk6K8smAWkNS2aFauCugP+9R5hJRaIhNBa9oEreIBU=" }, { "name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch", From ae546d018a7f23e3ca35fdcaf31be4ff8d148d80 Mon Sep 17 00:00:00 2001 From: Johannes Karl Arnold Date: Sun, 23 Feb 2025 10:56:31 +0100 Subject: [PATCH 1244/1476] Add support for TUXEDO InfinityBook Pro Intel Gen9 --- README.md | 1 + flake.nix | 1 + tuxedo/infinitybook/default.nix | 12 ++++++++++++ tuxedo/infinitybook/pro14/gen7/default.nix | 3 +-- tuxedo/infinitybook/pro14/gen9-intel/README.md | 1 + tuxedo/infinitybook/pro14/gen9-intel/default.nix | 6 ++++++ 6 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 tuxedo/infinitybook/default.nix create mode 100644 tuxedo/infinitybook/pro14/gen9-intel/README.md create mode 100644 tuxedo/infinitybook/pro14/gen9-intel/default.nix diff --git a/README.md b/README.md index d52bc426..342f8b56 100644 --- a/README.md +++ b/README.md @@ -374,6 +374,7 @@ See code for all available configurations. | [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | | [TUXEDO Aura 15 - Gen1](tuxedo/aura/15/gen1) | `` | | [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | +| [TUXEDO InfinityBook Pro 14 - Gen9 - INTEL](tuxedo/infinitybook/pro14/gen9-intel) | `` | | [TUXEDO Pulse 14 - Gen3](tuxedo/pulse/14/gen3) | `` | | [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | | [Xiaomi Redmibook 16 Pro 2024](xiaomi/redmibook/16-pro-2024) | `` | diff --git a/flake.nix b/flake.nix index 96ee8c39..0a0f505f 100644 --- a/flake.nix +++ b/flake.nix @@ -327,6 +327,7 @@ tuxedo-aura-15-gen1 = import ./tuxedo/aura/15/gen1; tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7; + tuxedo-infinitybook-pro14-gen9-intel = import ./tuxedo/infinitybook/pro14/gen9-intel; tuxedo-pulse-14-gen3 = import ./tuxedo/pulse/14/gen3; tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; xiaomi-redmibook-16-pro-2024 = import ./xiaomi/redmibook/16-pro-2024; diff --git a/tuxedo/infinitybook/default.nix b/tuxedo/infinitybook/default.nix new file mode 100644 index 00000000..99f53fcd --- /dev/null +++ b/tuxedo/infinitybook/default.nix @@ -0,0 +1,12 @@ +{ lib, options, ... }: +{ + imports = [ + ../../common/pc/laptop + ../../common/pc/ssd + ]; + + # Enable TUXEDO's kernel drivers if they are available + hardware = lib.optionalAttrs (options.hardware ? tuxedo-drivers) { + tuxedo-drivers.enable = lib.mkDefault true; + }; +} diff --git a/tuxedo/infinitybook/pro14/gen7/default.nix b/tuxedo/infinitybook/pro14/gen7/default.nix index 9971b7bc..271302b2 100644 --- a/tuxedo/infinitybook/pro14/gen7/default.nix +++ b/tuxedo/infinitybook/pro14/gen7/default.nix @@ -2,9 +2,8 @@ { imports = [ + ../../. ../../../../common/cpu/intel - ../../../../common/pc/laptop - ../../../../common/pc/ssd ]; # Cooling management diff --git a/tuxedo/infinitybook/pro14/gen9-intel/README.md b/tuxedo/infinitybook/pro14/gen9-intel/README.md new file mode 100644 index 00000000..d91a3e68 --- /dev/null +++ b/tuxedo/infinitybook/pro14/gen9-intel/README.md @@ -0,0 +1 @@ +# [TUXEDO InfinityBook Pro 14 - Gen9 - INTEL](https://www.tuxedocomputers.com/en/TUXEDO-InfinityBook-Pro-14-Gen9-INTEL) diff --git a/tuxedo/infinitybook/pro14/gen9-intel/default.nix b/tuxedo/infinitybook/pro14/gen9-intel/default.nix new file mode 100644 index 00000000..4b6ee893 --- /dev/null +++ b/tuxedo/infinitybook/pro14/gen9-intel/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../../. + ../../../../common/cpu/intel + ]; +} From b48cc4dab0f9711af296fc367b6108cf7b8ccb16 Mon Sep 17 00:00:00 2001 From: Erik Alonso Date: Mon, 24 Feb 2025 12:34:38 +0000 Subject: [PATCH 1245/1476] pine64/rockpro64: HDMI output and Network in initrd --- pine64/rockpro64/README.md | 8 ++++++++ pine64/rockpro64/console.nix | 17 +++++++++++++++++ pine64/rockpro64/default.nix | 7 +++++++ 3 files changed, 32 insertions(+) create mode 100644 pine64/rockpro64/console.nix diff --git a/pine64/rockpro64/README.md b/pine64/rockpro64/README.md index e4695a47..5eced1c6 100644 --- a/pine64/rockpro64/README.md +++ b/pine64/rockpro64/README.md @@ -12,3 +12,11 @@ firmware. Alternatively, starting from the _Tow-Boot_ disk image on eMMC is easier to deal with and understand than having to deal with _U-Boot_ manually. + +## Console + +To configure default console I/O to use serial instead of HDMI (default): + +```nix +hardware.rockpro64.console = "serial"; +``` diff --git a/pine64/rockpro64/console.nix b/pine64/rockpro64/console.nix new file mode 100644 index 00000000..d8a213dc --- /dev/null +++ b/pine64/rockpro64/console.nix @@ -0,0 +1,17 @@ +{ config, lib, ... }: +{ + options.hardware.rockpro64.console = lib.mkOption { + default = "hdmi"; + description = "Default console to use at boot."; + type = lib.types.enum [ + "hdmi" + "serial" + ]; + }; + config = lib.mkIf (config.hardware.rockpro64.console == "hdmi") { + boot.kernelParams = [ + "console=ttyS0" + "console=tty0" + ]; + }; +} diff --git a/pine64/rockpro64/default.nix b/pine64/rockpro64/default.nix index 9ac08e83..22f82195 100644 --- a/pine64/rockpro64/default.nix +++ b/pine64/rockpro64/default.nix @@ -1,10 +1,17 @@ { lib, ... }: { + imports = [ + ./console.nix + ]; boot.initrd.kernelModules = [ # PCIe/NVMe "nvme" "pcie_rockchip_host" "phy_rockchip_pcie" + # Network + "dwmac_rk" + # HDMI + "rockchipdrm" ]; # control the fan on the rockpro64 (like the one in the NAS case) hardware.fancontrol = { From d25dac1bd5eed6fbf67eb79d1f15d624e5a2c032 Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Wed, 12 Mar 2025 15:25:55 +0100 Subject: [PATCH 1246/1476] dell/xps/13-9350: use lunar-lake cpu config --- dell/xps/13-9350/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dell/xps/13-9350/default.nix b/dell/xps/13-9350/default.nix index 38c27865..8ee58b2c 100644 --- a/dell/xps/13-9350/default.nix +++ b/dell/xps/13-9350/default.nix @@ -2,7 +2,7 @@ { imports = [ - ../../../common/cpu/intel + ../../../common/cpu/intel/lunar-lake ../../../common/pc/laptop ../../../common/pc/laptop/ssd ]; From 14f45c1a639118ec3e08ebd18285895fb5dc8ad9 Mon Sep 17 00:00:00 2001 From: Cryolitia PukNgae Date: Tue, 11 Mar 2025 03:40:48 +0800 Subject: [PATCH 1247/1476] gpd-win-max-2-2023/bmi260: 1.0.0 -> 1.1.0 fix: https://github.com/NixOS/nixos-hardware/issues/1352 --- gpd/win-max-2/2023/bmi260/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gpd/win-max-2/2023/bmi260/package.nix b/gpd/win-max-2/2023/bmi260/package.nix index a1e2db4f..78464736 100644 --- a/gpd/win-max-2/2023/bmi260/package.nix +++ b/gpd/win-max-2/2023/bmi260/package.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation (finalAttr: { pname = "bmi260"; - version = "1.0.0"; + version = "1.1.0"; src = fetchFromGitHub { owner = "hhd-dev"; repo = finalAttr.pname; rev = "v${finalAttr.version}"; - hash = "sha256-EFous0pPpCuVoCsFz6/4NryQRSH9Jw9Qng+RY1hiX1c="; + hash = "sha256-So8rWDTXYsMUgLBU9WrJp47txA8dI98tcxXNy92AYgg="; }; hardeningDisable = [ "pic" ]; @@ -38,6 +38,6 @@ stdenv.mkDerivation (finalAttr: { gpl2Only ]; maintainers = with maintainers; [ Cryolitia ]; - platforms = platforms.linux; + platforms = [ "x86_64-linux" ]; }; }) From 59314eb9f5f542af1866ae8706ac9816542fc104 Mon Sep 17 00:00:00 2001 From: matthiasdotsh Date: Sun, 9 Mar 2025 12:13:13 +0100 Subject: [PATCH 1248/1476] surface: linux 6.12.17 -> 6.12.18 --- microsoft/surface/common/kernel/linux-surface/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-surface/default.nix b/microsoft/surface/common/kernel/linux-surface/default.nix index f78aad86..ada42185 100644 --- a/microsoft/surface/common/kernel/linux-surface/default.nix +++ b/microsoft/surface/common/kernel/linux-surface/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.12.17"; + version = "6.12.18"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "sha256-XCBc00+Al05Jc+MhywCPX2iVqKqMJXfwapRIzXfeY7M="; + sha256 = "sha256-vrkCpfadnldxARIgPbOBEdrW0wVW6ozjiShMgHf+lE0="; ignoreConfigErrors=true; }; From b416c1d56f33bf902625b2cd0ee43dbc59fc64dd Mon Sep 17 00:00:00 2001 From: Marien Zwart Date: Mon, 24 Feb 2025 21:23:15 +1100 Subject: [PATCH 1249/1476] Simplify implementation of B550 suspend fix Instead of using systemd oneshot services that have to be careful to not toggle wakeups back on, use a udev rule to disable wakeups by device ID. On a B550 Vision D, these do almost the same thing: ```` $ lspci -n | grep 1022:1483 00:01.1 0604: 1022:1483 00:01.2 0604: 1022:1483 00:03.1 0604: 1022:1483 $ cat /proc/acpi/wakeup Device S-state Status Sysfs node ... GPP0 S4 *disabled pci:0000:00:01.1 GPP8 S4 *disabled pci:0000:00:03.1 ```` Two of the three devices with the PCI vendor/device ID specified by the udev rule correspond to devices previously disabled via ACPI (if I understand correctly disabling these via either /proc/acpi/wakeup or udev device attribute has the same effect). The third device is (like the other two) using the "pcieport" driver. Using a device connected via that port as a wakeup device still works. --- gigabyte/b550/b550-fix-suspend.nix | 44 ++++++++---------------------- 1 file changed, 11 insertions(+), 33 deletions(-) diff --git a/gigabyte/b550/b550-fix-suspend.nix b/gigabyte/b550/b550-fix-suspend.nix index 49868093..abc04a2d 100644 --- a/gigabyte/b550/b550-fix-suspend.nix +++ b/gigabyte/b550/b550-fix-suspend.nix @@ -1,35 +1,13 @@ -{ pkgs, lib, ... } : - { - systemd.services.bugfixSuspend-GPP0 = { - enable = lib.mkDefault true; - description = "Fix crash on wakeup from suspend/hibernate (b550 bugfix)"; - unitConfig = { - Type = "oneshot"; - }; - serviceConfig = { - User = "root"; # root may not be necessary - # check for gppN, disable if enabled - # lifted from https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/ksbm0mb/ /u/Demotay - ExecStart = "-${pkgs.bash}/bin/bash -c 'if grep 'GPP0' /proc/acpi/wakeup | grep -q 'enabled'; then echo 'GPP0' > /proc/acpi/wakeup; fi'"; - RemainAfterExit = "yes"; # required to not toggle when `nixos-rebuild switch` is ran - - }; - wantedBy = ["multi-user.target"]; - }; - - systemd.services.bugfixSuspend-GPP8 = { - enable = lib.mkDefault true; - description = "Fix crash on wakeup from suspend/hibernate (b550 bugfix)"; - unitConfig = { - Type = "oneshot"; - }; - serviceConfig = { - User = "root"; - ExecStart = "-${pkgs.bash}/bin/bash -c 'if grep 'GPP8' /proc/acpi/wakeup | grep -q 'enabled'; then echo 'GPP8' > /proc/acpi/wakeup; fi'"; - RemainAfterExit = "yes"; - }; - wantedBy = ["multi-user.target"]; - }; - + # Work around an issue causing the system to unsuspend immediately after suspend + # and/or hang after suspend. + # + # See https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/ksbm0mb/ /u/Demotay + # + # Most suggestions elsewhere are to disable GPP0 and/or GPP8 using /proc/acpi/wakeup, but that is + # inconvenient because it toggles. This does essentially the same thing using udev, which can set + # the wakeup attribute to a specific value. + services.udev.extraRules = '' + ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1022", ATTR{device}=="0x1483", ATTR{power/wakeup}="disabled" + ''; } From de70a293ae40aebe74545017d1dd76c3c81353a3 Mon Sep 17 00:00:00 2001 From: Marien Zwart Date: Sat, 8 Mar 2025 14:09:11 +1100 Subject: [PATCH 1250/1476] Adjust README after suspend fix reimplementation The README still referenced the systemd service we no longer need. --- gigabyte/b550/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gigabyte/b550/README.md b/gigabyte/b550/README.md index e8ccf531..9a900a37 100644 --- a/gigabyte/b550/README.md +++ b/gigabyte/b550/README.md @@ -9,9 +9,10 @@ Symptoms: - It goes into suspend, then seems to boot and hang. Sometimes it suspends successfully, but waking it from suspend puts it in the "zombie" state. - By playing chicken with volatile storage and flicking the power switch on the back of power supply, you can sometimes get it to wake from suspend as the card un-powers before volatile storage does. -Fix: disable GPP0 and GPP8 (And, for some cards, potentially PTXH, I can't test) in /proc/acpi/wakeup - - To do this permanently, a systemd service is provided +This can be fixed by disabling GPP0 and GPP8 (And, for some cards, potentially PTXH, I can't test) in /proc/acpi/wakeup. +But because /proc/acpi/wakeup only supports toggling (not disabling) wakeups, we use a udev rule to disable wakeups for +the same device by PCI device ID instead. ## This affects at least: - Gigabyte b550m-d3sh (my machine) From 1b1acdc3e7e4b2e4b5f07430392939e19a90fb8a Mon Sep 17 00:00:00 2001 From: emergentmind <7410928+emergentmind@users.noreply.github.com> Date: Mon, 24 Feb 2025 19:53:51 -0700 Subject: [PATCH 1251/1476] init --- README.md | 1 + lenovo/thinkpad/e15/README.md | 45 +++++++++++++++++++++++++++ lenovo/thinkpad/e15/default.nix | 14 +++++++++ lenovo/thinkpad/e15/intel/default.nix | 10 ++++++ 4 files changed, 70 insertions(+) create mode 100644 lenovo/thinkpad/e15/README.md create mode 100644 lenovo/thinkpad/e15/default.nix create mode 100644 lenovo/thinkpad/e15/intel/default.nix diff --git a/README.md b/README.md index 342f8b56..72a4d281 100644 --- a/README.md +++ b/README.md @@ -231,6 +231,7 @@ See code for all available configurations. | [Lenovo ThinkPad A475](lenovo/thinkpad/a475) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | +| [Lenovo ThinkPad E15 (Intel)](lenovo/thinkpad/e15/intel) | `` | | [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | | [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | | [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13/yoga) | `` | diff --git a/lenovo/thinkpad/e15/README.md b/lenovo/thinkpad/e15/README.md new file mode 100644 index 00000000..879bfa9f --- /dev/null +++ b/lenovo/thinkpad/e15/README.md @@ -0,0 +1,45 @@ +# Lenovo Thinkpad E15 + +This is tested on an [E15 Gen4](https://psref.lenovo.com/WDProduct/ThinkPad/ThinkPad_E15_Gen_4_Intel). + +## Tested Hardware + +```bash +lspci -nn +00:00.0 Host bridge [0600]: Intel Corporation Alder Lake-U15 Host and DRAM Controller [8086:4601] (rev 04) +00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-UP3 GT2 [Iris Xe Graphics] [8086:46a8] (rev 0c) +00:04.0 Signal processing controller [1180]: Intel Corporation Alder Lake Innovation Platform Framework Processor Participant [8086:461d] (rev 04) +00:06.0 PCI bridge [0604]: Intel Corporation 12th Gen Core Processor PCI Express x4 Controller #0 [8086:464d] (rev 04) +00:07.0 PCI bridge [0604]: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #0 [8086:466e] (rev 04) +00:08.0 System peripheral [0880]: Intel Corporation 12th Gen Core Processor Gaussian & Neural Accelerator [8086:464f] (rev 04) +00:0a.0 Signal processing controller [1180]: Intel Corporation Platform Monitoring Technology [8086:467d] (rev 01) +00:0d.0 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 USB Controller [8086:461e] (rev 04) +00:0d.2 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #0 [8086:463e] (rev 04) +00:0d.3 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #1 [8086:466d] (rev 04) +00:14.0 USB controller [0c03]: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller [8086:51ed] (rev 01) +00:14.2 RAM memory [0500]: Intel Corporation Alder Lake PCH Shared SRAM [8086:51ef] (rev 01) +00:14.3 Network controller [0280]: Intel Corporation Alder Lake-P PCH CNVi WiFi [8086:51f0] (rev 01) +00:15.0 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 [8086:51e8] (rev 01) +00:15.2 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #2 [8086:51ea] (rev 01) +00:16.0 Communication controller [0780]: Intel Corporation Alder Lake PCH HECI Controller [8086:51e0] (rev 01) +00:1f.0 ISA bridge [0601]: Intel Corporation Alder Lake PCH eSPI Controller [8086:5182] (rev 01) +00:1f.3 Multimedia audio controller [0401]: Intel Corporation Alder Lake PCH-P High Definition Audio Controller [8086:51c8] (rev 01) +00:1f.4 SMBus [0c05]: Intel Corporation Alder Lake PCH-P SMBus Host Controller [8086:51a3] (rev 01) +00:1f.5 Serial bus controller [0c80]: Intel Corporation Alder Lake-P PCH SPI Controller [8086:51a4] (rev 01) +00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (16) I219-V [8086:1a1f] (rev 01) +01:00.0 Non-Volatile memory controller [0108]: Sandisk Corp WD PC SN740 NVMe SSD 512GB (DRAM-less) [15b7:5016] (rev 01) +``` + +## Updating Firmware + +First enable `fwupd` in your config + +```nix +services.fwupd.enable = true; +``` + +Then run + +```bash + $ fwupdmgr update +``` diff --git a/lenovo/thinkpad/e15/default.nix b/lenovo/thinkpad/e15/default.nix new file mode 100644 index 00000000..c6948b35 --- /dev/null +++ b/lenovo/thinkpad/e15/default.nix @@ -0,0 +1,14 @@ +{ ... }: + +{ + imports = [ + ../. + ../../../common/pc/laptop/ssd + ]; + + boot.kernelParams = [ + # Force use of the thinkpad_acpi driver for backlight control. + # This allows the backlight save/load systemd service to work. + "acpi_backlight=native" + ]; +} diff --git a/lenovo/thinkpad/e15/intel/default.nix b/lenovo/thinkpad/e15/intel/default.nix new file mode 100644 index 00000000..3aeee392 --- /dev/null +++ b/lenovo/thinkpad/e15/intel/default.nix @@ -0,0 +1,10 @@ +{ lib, ... }: + +{ + imports = [ + ../. + ../../../../common/cpu/intel/alder-lake + ]; + + services.throttled.enable = lib.mkDefault true; +} From 09e97074ad78706156e8c8d380b8196a602ef719 Mon Sep 17 00:00:00 2001 From: emergentmind <7410928+emergentmind@users.noreply.github.com> Date: Mon, 3 Mar 2025 09:48:34 -0700 Subject: [PATCH 1252/1476] refactor: add generic laptop spec --- lenovo/thinkpad/e15/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/e15/default.nix b/lenovo/thinkpad/e15/default.nix index c6948b35..a8805138 100644 --- a/lenovo/thinkpad/e15/default.nix +++ b/lenovo/thinkpad/e15/default.nix @@ -3,6 +3,7 @@ { imports = [ ../. + ../../../common/pc/laptop ../../../common/pc/laptop/ssd ]; From e1f12151258b12c567f456d8248e4694e9390613 Mon Sep 17 00:00:00 2001 From: emergentmind <7410928+emergentmind@users.noreply.github.com> Date: Mon, 3 Mar 2025 10:02:49 -0700 Subject: [PATCH 1253/1476] refactor: add model to outputs --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 0a0f505f..7ccecdda 100644 --- a/flake.nix +++ b/flake.nix @@ -174,6 +174,7 @@ lenovo-thinkpad-a475 = import ./lenovo/thinkpad/a475; lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel; + lenovo-thinkpad-e15-intel = import ./lenovo/thinkpad/e15/intel; lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; lenovo-thinkpad-e495 = import ./lenovo/thinkpad/e495; lenovo-thinkpad-l13 = import ./lenovo/thinkpad/l13; From 3970af5d5831be5c31eb6271a21bf5944cc0e791 Mon Sep 17 00:00:00 2001 From: Eva Dengler Date: Fri, 14 Mar 2025 11:19:45 +0100 Subject: [PATCH 1254/1476] lenovo/thinkpad/x13-yoga: add thunderbolt support --- lenovo/thinkpad/x13/yoga/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lenovo/thinkpad/x13/yoga/default.nix b/lenovo/thinkpad/x13/yoga/default.nix index 5a454d6f..b7ff8778 100644 --- a/lenovo/thinkpad/x13/yoga/default.nix +++ b/lenovo/thinkpad/x13/yoga/default.nix @@ -5,4 +5,6 @@ ]; services.xserver.wacom.enable = lib.mkDefault config.services.xserver.enable; + + services.hardware.bolt.enable = lib.mkDefault true; } From 113cd3916682def185290145924fa30b30bda972 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 02:45:14 +0000 Subject: [PATCH 1255/1476] build(deps): bump cachix/install-nix-action from 30 to 31 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 30 to 31. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v30...v31) --- 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 3e96b10d..1a7c3f7e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,5 +9,5 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v30 + - uses: cachix/install-nix-action@v31 - run: nix run ./tests#run . From 05fa89d1c502762064c964bcd2f7f304f3d6794f Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Mon, 17 Mar 2025 15:04:44 +0800 Subject: [PATCH 1256/1476] apple/t2: migrate renamed option --- apple/t2/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apple/t2/default.nix b/apple/t2/default.nix index 2201211a..28f9258a 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -7,6 +7,8 @@ let inherit (lib) types; + nixosVersion = lib.versions.majorMinor lib.version; + audioFiles = pkgs.fetchFromGitHub { owner = "kekrby"; repo = "t2-better-audio"; @@ -82,8 +84,6 @@ in "iommu=pt" ]; - hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/"; - services.pipewire.package = pipewirePackage; services.pipewire.wireplumber.package = pkgs.wireplumber.override { pipewire = pipewirePackage; @@ -92,6 +92,13 @@ in # Make sure post-resume.service exists powerManagement.enable = true; } + + (if lib.versionAtLeast nixosVersion "25.05" then { + services.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/"; + } else { + hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/"; + }) + (lib.mkIf t2Cfg.enableIGPU { # Enable the iGPU by default if present environment.etc."modprobe.d/apple-gmux.conf".text = '' From e8c83f075915408266b2f9794f49e65ac4b3c110 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Tue, 11 Mar 2025 08:32:54 +0800 Subject: [PATCH 1257/1476] apple/t2: sync patches this includes a new touchpad driver which was tested and should feel smoother. users may need to re-set touchpad settings in their DE. --- apple/t2/pkgs/linux-t2/generic.nix | 1 + apple/t2/pkgs/linux-t2/latest.json | 22 +++++++++++++++++----- apple/t2/pkgs/linux-t2/stable.json | 22 +++++++++++++++++----- 3 files changed, 35 insertions(+), 10 deletions(-) diff --git a/apple/t2/pkgs/linux-t2/generic.nix b/apple/t2/pkgs/linux-t2/generic.nix index 297433c3..a4e6e284 100644 --- a/apple/t2/pkgs/linux-t2/generic.nix +++ b/apple/t2/pkgs/linux-t2/generic.nix @@ -40,6 +40,7 @@ kernel.override ( HID_APPLETB_BL = module; HID_APPLETB_KBD = module; HID_APPLE = module; + HID_MAGICMOUSE = module; DRM_APPLETBDRM = module; HID_SENSOR_ALS = module; SND_PCM = module; diff --git a/apple/t2/pkgs/linux-t2/latest.json b/apple/t2/pkgs/linux-t2/latest.json index 5a1dfdcc..4ed6b186 100644 --- a/apple/t2/pkgs/linux-t2/latest.json +++ b/apple/t2/pkgs/linux-t2/latest.json @@ -1,5 +1,5 @@ { - "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/2f093ab779b24997c3cbd9c2abb2e114bc34addb/", + "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/4109f2144b626097a34b21def849a5d8cbcf3f7c/", "patches": [ { "name": "1001-Add-apple-bce-driver.patch", @@ -43,7 +43,7 @@ }, { "name": "1015-drm-tiny-add-driver-for-Apple-Touch-Bars-in-x86-Macs.patch", - "hash": "sha256-wlMVeoDQtSRtGuquHKtAHvrGUzZOLxiwkmHj12ZQ8o0=" + "hash": "sha256-zFeDJeoM/XS+Ds3DBLEcv4JbUhlEk9z4rHQ4t6XaghA=" }, { "name": "2008-i915-4-lane-quirk-for-mbp15-1.patch", @@ -90,8 +90,20 @@ "hash": "sha256-skYKmLsJ6O42/wINLccZWoKS0XhVlC1Nfxi1Ekloxns=" }, { - "name": "4001-Input-bcm5974-Add-support-for-the-T2-Macs.patch", - "hash": "sha256-CaviinY3rYqQh+/DGyeBTzLL/ZfIvguOQlWCs3KN4zc=" + "name": "4001-asahi-trackpad.patch", + "hash": "sha256-NOuGgUxDQEfFPlij/EnhWmgqeG3/l+j+r2T1YJG7raY=" + }, + { + "name": "4002-HID-quirks-remove-T2-devices-from-hid_mouse_ignore_l.patch", + "hash": "sha256-DdUo4/4254VD+MzEaLI3opSS0Z7+UwsitJaS2lAlpI8=" + }, + { + "name": "4003-HID-apple-ignore-the-trackpad-on-T2-Macs.patch", + "hash": "sha256-PZpdvPKvVsLsg3vx3jmq3QCapBUcUVE35N37usBRb6g=" + }, + { + "name": "4004-HID-magicmouse-Add-support-for-trackpads-found-on-T2.patch", + "hash": "sha256-pmGR0JdMMwGWG3zwMwMBuSyzltLvvzjTgfi1Ii1cglk=" }, { "name": "7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch", @@ -99,7 +111,7 @@ }, { "name": "8001-Add-APFS-driver.patch", - "hash": "sha256-qwLxBY0wDEPBqP32IcGS1Jd/5BlgMFxXu1z2N7+Ti50=" + "hash": "sha256-T0ZmO99nmnpNVLjlzMRc7wrkBON7w2F6HaPk4pQVV7A=" }, { "name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch", diff --git a/apple/t2/pkgs/linux-t2/stable.json b/apple/t2/pkgs/linux-t2/stable.json index 5e672ec3..0426662f 100644 --- a/apple/t2/pkgs/linux-t2/stable.json +++ b/apple/t2/pkgs/linux-t2/stable.json @@ -1,5 +1,5 @@ { - "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/361d2cef87bb76ba14a24d30ed1479393d92be6f/", + "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/dd2e78d234fc289d3ebadf1852d761498e668a02/", "patches": [ { "name": "1001-Add-apple-bce-driver.patch", @@ -43,7 +43,7 @@ }, { "name": "1015-drm-tiny-add-driver-for-Apple-Touch-Bars-in-x86-Macs.patch", - "hash": "sha256-wlMVeoDQtSRtGuquHKtAHvrGUzZOLxiwkmHj12ZQ8o0=" + "hash": "sha256-zFeDJeoM/XS+Ds3DBLEcv4JbUhlEk9z4rHQ4t6XaghA=" }, { "name": "2008-i915-4-lane-quirk-for-mbp15-1.patch", @@ -90,8 +90,20 @@ "hash": "sha256-skYKmLsJ6O42/wINLccZWoKS0XhVlC1Nfxi1Ekloxns=" }, { - "name": "4001-Input-bcm5974-Add-support-for-the-T2-Macs.patch", - "hash": "sha256-CaviinY3rYqQh+/DGyeBTzLL/ZfIvguOQlWCs3KN4zc=" + "name": "4001-asahi-trackpad.patch", + "hash": "sha256-NOuGgUxDQEfFPlij/EnhWmgqeG3/l+j+r2T1YJG7raY=" + }, + { + "name": "4002-HID-quirks-remove-T2-devices-from-hid_mouse_ignore_l.patch", + "hash": "sha256-DdUo4/4254VD+MzEaLI3opSS0Z7+UwsitJaS2lAlpI8=" + }, + { + "name": "4003-HID-apple-ignore-the-trackpad-on-T2-Macs.patch", + "hash": "sha256-PZpdvPKvVsLsg3vx3jmq3QCapBUcUVE35N37usBRb6g=" + }, + { + "name": "4004-HID-magicmouse-Add-support-for-trackpads-found-on-T2.patch", + "hash": "sha256-pmGR0JdMMwGWG3zwMwMBuSyzltLvvzjTgfi1Ii1cglk=" }, { "name": "7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch", @@ -99,7 +111,7 @@ }, { "name": "8001-Add-APFS-driver.patch", - "hash": "sha256-oyk6K8smAWkNS2aFauCugP+9R5hJRaIhNBa9oEreIBU=" + "hash": "sha256-xjB7lqE4bweUvDa6Tx6LurxWlUlX4nUN+DbTRQb5bQI=" }, { "name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch", From 36d0027ef4a2d23476a5e29bc7f76c8861912b57 Mon Sep 17 00:00:00 2001 From: mkorje Date: Mon, 17 Mar 2025 12:40:06 +1100 Subject: [PATCH 1258/1476] apple/t2: add Wi-Fi and Bluetooth firmware option --- apple/t2/default.nix | 19 +++ apple/t2/pkgs/brcm-firmware/default.nix | 89 ++++++++++++ apple/t2/pkgs/brcm-firmware/fetchmacos.nix | 42 ++++++ .../get-firmware-standalone.patch | 133 ++++++++++++++++++ apple/t2/pkgs/brcm-firmware/get-firmware.nix | 35 +++++ apple/t2/pkgs/brcm-firmware/macrecovery.nix | 36 +++++ 6 files changed, 354 insertions(+) create mode 100644 apple/t2/pkgs/brcm-firmware/default.nix create mode 100644 apple/t2/pkgs/brcm-firmware/fetchmacos.nix create mode 100644 apple/t2/pkgs/brcm-firmware/get-firmware-standalone.patch create mode 100644 apple/t2/pkgs/brcm-firmware/get-firmware.nix create mode 100644 apple/t2/pkgs/brcm-firmware/macrecovery.nix diff --git a/apple/t2/default.nix b/apple/t2/default.nix index 28f9258a..38115ba2 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -63,6 +63,19 @@ in example = "latest"; description = "The kernel release stream to use."; }; + firmware = { + enable = lib.mkEnableOption "automatic and declarative Wi-Fi and Bluetooth firmware configuration"; + version = lib.mkOption { + type = types.enum [ + "monterey" + "ventura" + "sonoma" + ]; + default = "sonoma"; + example = "ventura"; + description = "The macOS version to use."; + }; + }; }; config = lib.mkMerge [ @@ -105,5 +118,11 @@ in options apple-gmux force_igd=y ''; }) + (lib.mkIf t2Cfg.firmware.enable { + # Configure Wi-Fi and Bluetooth firmware + hardware.firmware = [ + (pkgs.callPackage ./pkgs/brcm-firmware { version = t2Cfg.firmware.version; }) + ]; + }) ]; } diff --git a/apple/t2/pkgs/brcm-firmware/default.nix b/apple/t2/pkgs/brcm-firmware/default.nix new file mode 100644 index 00000000..742d6ff6 --- /dev/null +++ b/apple/t2/pkgs/brcm-firmware/default.nix @@ -0,0 +1,89 @@ +{ + lib, + stdenvNoCC, + callPackage, + vmTools, + util-linux, + linux, + kmod, + version, +}: + +let + get-firmware = callPackage ./get-firmware.nix { }; + fetchmacos = callPackage ./fetchmacos.nix { }; + + # See https://github.com/kholia/OSX-KVM/blob/master/fetch-macOS-v2.py#L534-L546. + # Versions before macOS Monterey don't have Bluetooth firmware. + # Whereas macOS Sequoia doesn't have firmware for MacBook Air 2018 and 2019. + boards = { + monterey = { + boardId = "Mac-B809C3757DA9BB8D"; + mlb = "00000000000000000"; + osType = "latest"; + hash = "sha256-My8FLnqHZn+THfGPIhTSApW/kIWM0ZZhjBxWujhhWPM="; + }; + ventura = { + boardId = "Mac-4B682C642B45593E"; + mlb = "00000000000000000"; + osType = "latest"; + hash = "sha256-Qy9Whu8pqHo+m6wHnCIqURAR53LYQKc0r87g9eHgnS4="; + }; + sonoma = { + boardId = "Mac-827FAC58A8FDFA22"; + mlb = "00000000000000000"; + osType = "default"; + hash = "sha256-phlpwNTYhugqX2KGljqxpbfGtCFDgggQPzB7U29XSmM="; + }; + }; +in + +vmTools.runInLinuxVM ( + stdenvNoCC.mkDerivation { + pname = "brcm-firmware"; + inherit version; + + src = fetchmacos { + name = version; + inherit (boards.${version}) + boardId + mlb + osType + hash + ; + }; + dontUnpack = true; + + nativeBuildInputs = [ + util-linux + get-firmware + ]; + buildPhase = '' + ln -s ${linux}/lib /lib + ${kmod}/bin/modprobe loop + ${kmod}/bin/modprobe hfsplus + + imgdir=$(mktemp -d) + loopdev=$(losetup -f | cut -d "/" -f 3) + losetup -P $loopdev $src + loopdev_partition=/dev/$(lsblk -o KNAME,TYPE,MOUNTPOINT -n | grep $loopdev | tail -1 | awk '{print $1}') + mount $loopdev_partition $imgdir + + get-bluetooth $imgdir/usr/share/firmware/bluetooth bluetooth/ + get-wifi $imgdir/usr/share/firmware/wifi wifi/ + ''; + + installPhase = '' + mkdir -p $out/lib/firmware/brcm + cp bluetooth/brcm/* $out/lib/firmware/brcm/ + cp wifi/brcm/* $out/lib/firmware/brcm/ + ''; + + meta = with lib; { + description = "Wi-Fi and Bluetooth firmware for T2 Macs"; + license = licenses.unfree; + maintainers = with maintainers; [ mkorje ]; + platforms = platforms.linux; + }; + } +) diff --git a/apple/t2/pkgs/brcm-firmware/fetchmacos.nix b/apple/t2/pkgs/brcm-firmware/fetchmacos.nix new file mode 100644 index 00000000..8af21291 --- /dev/null +++ b/apple/t2/pkgs/brcm-firmware/fetchmacos.nix @@ -0,0 +1,42 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + callPackage, + dmg2img, +}: + +let + macrecovery = callPackage ./macrecovery.nix { }; +in + +{ + name, + boardId, + mlb, + osType, + hash, +}: + +stdenvNoCC.mkDerivation { + name = name; + + dontUnpack = true; + + nativeBuildInputs = [ + macrecovery + dmg2img + ]; + buildPhase = '' + macrecovery download -o . -b ${boardId} -m ${mlb} -os ${osType} + dmg2img -s BaseSystem.dmg fw.img + ''; + + installPhase = '' + cp fw.img $out + ''; + + outputHashMode = "recursive"; + outputHashAlgo = "sha256"; + outputHash = hash; +} diff --git a/apple/t2/pkgs/brcm-firmware/get-firmware-standalone.patch b/apple/t2/pkgs/brcm-firmware/get-firmware-standalone.patch new file mode 100644 index 00000000..f0b13f22 --- /dev/null +++ b/apple/t2/pkgs/brcm-firmware/get-firmware-standalone.patch @@ -0,0 +1,133 @@ +diff --git a/asahi_firmware/bluetooth.py b/asahi_firmware/bluetooth.py +index 0934225..3eaa442 100644 +--- a/asahi_firmware/bluetooth.py ++++ b/asahi_firmware/bluetooth.py +@@ -1,8 +1,25 @@ ++#!/usr/bin/env python3 + # SPDX-License-Identifier: MIT + import logging, os, os.path, re, sys + from collections import namedtuple, defaultdict ++from hashlib import sha256 + +-from .core import FWFile ++class FWFile(object): ++ def __init__(self, name, data): ++ self.name = name ++ self.data = data ++ self.sha = sha256(data).hexdigest() ++ ++ def __repr__(self): ++ return f"FWFile({self.name!r}, <{self.sha[:16]}>)" ++ ++ def __eq__(self, other): ++ if other is None: ++ return False ++ return self.sha == other.sha ++ ++ def __hash__(self): ++ return hash(self.sha) + + log = logging.getLogger("asahi_firmware.bluetooth") + +@@ -127,16 +144,16 @@ class BluetoothFWCollection(object): + + if __name__ == "__main__": + col = BluetoothFWCollection(sys.argv[1]) +- +- if len(sys.argv) > 2: +- from . import FWPackage +- +- pkg = FWPackage(sys.argv[2]) +- pkg.add_files(sorted(col.files())) +- pkg.close() +- +- for i in pkg.manifest: +- print(i) +- else: +- for name, fwfile in col.files(): +- print(name, f"{fwfile.name} ({len(fwfile.data)} bytes)") ++ ++ dir = os.path.join(sys.argv[2], "brcm") ++ os.makedirs(dir) ++ ++ hashes = {} ++ for name, data in sorted(col.files()): ++ path = os.path.join(sys.argv[2], name) ++ if data.sha in hashes: ++ os.link(hashes[data.sha], path) ++ else: ++ with open(path, "wb") as f: ++ f.write(data.data) ++ hashes[data.sha] = path +diff --git a/asahi_firmware/wifi.py b/asahi_firmware/wifi.py +index 346965c..261aa32 100644 +--- a/asahi_firmware/wifi.py ++++ b/asahi_firmware/wifi.py +@@ -1,6 +1,24 @@ ++#!/usr/bin/env python3 + # SPDX-License-Identifier: MIT + import sys, os, os.path, pprint, statistics, logging +-from .core import FWFile ++from hashlib import sha256 ++ ++class FWFile(object): ++ def __init__(self, name, data): ++ self.name = name ++ self.data = data ++ self.sha = sha256(data).hexdigest() ++ ++ def __repr__(self): ++ return f"FWFile({self.name!r}, <{self.sha[:16]}>)" ++ ++ def __eq__(self, other): ++ if other is None: ++ return False ++ return self.sha == other.sha ++ ++ def __hash__(self): ++ return hash(self.sha) + + log = logging.getLogger("asahi_firmware.wifi") + +@@ -40,7 +58,9 @@ class WiFiFWCollection(object): + self.prune() + + def load(self, source_path): ++ included_folders = ["C-4355__s-C1", "C-4364__s-B2", "C-4364__s-B3", "C-4377__s-B3"] + for dirpath, dirnames, filenames in os.walk(source_path): ++ dirnames[:] = [d for d in dirnames if d in included_folders] + if "perf" in dirnames: + dirnames.remove("perf") + if "assert" in dirnames: +@@ -141,18 +161,16 @@ class WiFiFWCollection(object): + + if __name__ == "__main__": + col = WiFiFWCollection(sys.argv[1]) +- if len(sys.argv) > 2: +- from .core import FWPackage +- +- pkg = FWPackage(sys.argv[2]) +- pkg.add_files(sorted(col.files())) +- pkg.close() +- +- for i in pkg.manifest: +- print(i) +- else: +- for name, fwfile in col.files(): +- if isinstance(fwfile, str): +- print(name, "->", fwfile) +- else: +- print(name, f"({len(fwfile.data)} bytes)") ++ ++ dir = os.path.join(sys.argv[2], "brcm") ++ os.makedirs(dir) ++ ++ hashes = {} ++ for name, data in sorted(col.files()): ++ path = os.path.join(sys.argv[2], name) ++ if data.sha in hashes: ++ os.link(hashes[data.sha], path) ++ else: ++ with open(path, "wb") as f: ++ f.write(data.data) ++ hashes[data.sha] = path diff --git a/apple/t2/pkgs/brcm-firmware/get-firmware.nix b/apple/t2/pkgs/brcm-firmware/get-firmware.nix new file mode 100644 index 00000000..9c294016 --- /dev/null +++ b/apple/t2/pkgs/brcm-firmware/get-firmware.nix @@ -0,0 +1,35 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + python3, +}: + +stdenvNoCC.mkDerivation { + name = "get-firmware"; + + src = fetchFromGitHub { + owner = "AsahiLinux"; + repo = "asahi-installer"; + rev = "v0.7.9"; + hash = "sha256-vbhepoZ52k5tW2Gd7tfQTZ5CLqzhV7dUcVh6+AYwECk="; + }; + + patches = [ ./get-firmware-standalone.patch ]; + + buildInputs = [ python3 ]; + + installPhase = '' + cd asahi_firmware + install -Dm755 bluetooth.py $out/bin/get-bluetooth + install -Dm755 wifi.py $out/bin/get-wifi + ''; + + meta = with lib; { + description = "Patched Asahi Linux Installer scripts to get brcm firmware"; + homepage = "https://github.com/AsahiLinux/asahi-installer"; + license = licenses.mit; + maintainers = with maintainers; [ mkorje ]; + platforms = platforms.all; + }; +} diff --git a/apple/t2/pkgs/brcm-firmware/macrecovery.nix b/apple/t2/pkgs/brcm-firmware/macrecovery.nix new file mode 100644 index 00000000..eb4a867a --- /dev/null +++ b/apple/t2/pkgs/brcm-firmware/macrecovery.nix @@ -0,0 +1,36 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + python3, +}: + +stdenvNoCC.mkDerivation { + name = "macrecovery"; + + src = fetchFromGitHub { + owner = "acidanthera"; + repo = "OpenCorePkg"; + rev = "1.0.4"; + hash = "sha256-5Eypza9teSJSulHaK7Sxh562cTKedXKn3y+Z3+fC6sM="; + }; + + buildInputs = [ python3 ]; + + installPhase = '' + cd Utilities/macrecovery + install -Dm755 macrecovery.py $out/opt/macrecovery + cp boards.json $out/opt/boards.json + mkdir $out/bin + ln -s $out/opt/macrecovery $out/bin/macrecovery + ''; + + meta = with lib; { + description = "A tool that helps to automate recovery interaction"; + homepage = "https://github.com/acidanthera/OpenCorePkg"; + license = licenses.bsd3; + maintainers = with maintainers; [ mkorje ]; + mainProgram = "macrecovery"; + platforms = platforms.all; + }; +} From 4f4d97d7b7be387286cc9c988760a7ebaa5be1f1 Mon Sep 17 00:00:00 2001 From: matthiasdotsh Date: Fri, 14 Mar 2025 09:46:41 +0100 Subject: [PATCH 1259/1476] surface: linux 6.12.18 -> 6.12.19 --- microsoft/surface/common/kernel/linux-surface/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-surface/default.nix b/microsoft/surface/common/kernel/linux-surface/default.nix index ada42185..5eb1e976 100644 --- a/microsoft/surface/common/kernel/linux-surface/default.nix +++ b/microsoft/surface/common/kernel/linux-surface/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.12.18"; + version = "6.12.19"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "sha256-vrkCpfadnldxARIgPbOBEdrW0wVW6ozjiShMgHf+lE0="; + sha256 = "sha256-1zvwV77ARDSxadG2FkGTb30Ml865I6KB8y413U3MZTE="; ignoreConfigErrors=true; }; From 380ed15bcd6440606c6856db44a99140d422b46f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 22 Mar 2025 00:07:31 +0100 Subject: [PATCH 1260/1476] framework: fix TRRS headphones modprobe --- framework/13-inch/common/default.nix | 5 +++-- framework/16-inch/common/default.nix | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/framework/13-inch/common/default.nix b/framework/13-inch/common/default.nix index 5d228d03..4e6f519a 100644 --- a/framework/13-inch/common/default.nix +++ b/framework/13-inch/common/default.nix @@ -1,4 +1,5 @@ -{ lib, pkgs, ... }: { +{ lib, config, ... }: +{ imports = [ ../../../common/pc/laptop ../../../common/pc/laptop/ssd @@ -10,7 +11,7 @@ # Fix TRRS headphones missing a mic # https://community.frame.work/t/headset-microphone-on-linux/12387/3 - boot.extraModprobeConfig = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6.8") '' + boot.extraModprobeConfig = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.6.8") '' options snd-hda-intel model=dell-headset-multi ''; diff --git a/framework/16-inch/common/default.nix b/framework/16-inch/common/default.nix index 5ec8a171..0b803063 100644 --- a/framework/16-inch/common/default.nix +++ b/framework/16-inch/common/default.nix @@ -1,4 +1,5 @@ -{ lib, pkgs, ... }: { +{ lib, config, ... }: +{ imports = [ ../../../common/pc/laptop ../../../common/pc/laptop/ssd @@ -9,7 +10,7 @@ # Fix TRRS headphones missing a mic # https://community.frame.work/t/headset-microphone-on-linux/12387/3 - boot.extraModprobeConfig = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6.8") '' + boot.extraModprobeConfig = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.6.8") '' options snd-hda-intel model=dell-headset-multi ''; From 97280e2440a75ffae340304817e62c3130055963 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Sun, 23 Mar 2025 19:54:37 +0100 Subject: [PATCH 1261/1476] Make comment less intimidating (Lenovo X1 Yoga Gen 7) --- lenovo/thinkpad/x1/yoga/7th-gen/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lenovo/thinkpad/x1/yoga/7th-gen/default.nix b/lenovo/thinkpad/x1/yoga/7th-gen/default.nix index d95ad1ec..20c49074 100644 --- a/lenovo/thinkpad/x1/yoga/7th-gen/default.nix +++ b/lenovo/thinkpad/x1/yoga/7th-gen/default.nix @@ -4,10 +4,7 @@ ../../../../../common/pc/laptop/ssd ]; - # This laptop is too new for the kernel currently in nixos-unstable. - # On Kernel 5.15.x, dmesg shows the `hardware is newer than drivers` message. - # When starting the system with 5.15.x, only a tty is being displayed. - # After our tests, at least version 5.19 is required for the system to work properly. + # At least kernel 5.19 is required for the system to work properly. boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.19") (lib.mkDefault pkgs.linuxPackages_latest); From 32cd43425941880843359879fb9f3880b29f163a Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Tue, 18 Mar 2025 07:20:59 +0800 Subject: [PATCH 1262/1476] apple/t2: sync patches also made the update script use threading for speed --- apple/t2/pkgs/linux-t2/latest.json | 24 ++++++++++++++++-------- apple/t2/pkgs/linux-t2/latest.nix | 4 ++-- apple/t2/pkgs/linux-t2/stable.json | 18 +++++++++++++----- apple/t2/pkgs/linux-t2/update-patches.py | 18 ++++++++++++------ 4 files changed, 43 insertions(+), 21 deletions(-) diff --git a/apple/t2/pkgs/linux-t2/latest.json b/apple/t2/pkgs/linux-t2/latest.json index 4ed6b186..d02a40eb 100644 --- a/apple/t2/pkgs/linux-t2/latest.json +++ b/apple/t2/pkgs/linux-t2/latest.json @@ -1,5 +1,5 @@ { - "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/4109f2144b626097a34b21def849a5d8cbcf3f7c/", + "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/60a2912ad2d05f8a2d6c68a94641d912c3a555fd/", "patches": [ { "name": "1001-Add-apple-bce-driver.patch", @@ -43,11 +43,11 @@ }, { "name": "1015-drm-tiny-add-driver-for-Apple-Touch-Bars-in-x86-Macs.patch", - "hash": "sha256-zFeDJeoM/XS+Ds3DBLEcv4JbUhlEk9z4rHQ4t6XaghA=" + "hash": "sha256-Ga0LlaS1jWTXSKh1ClcETPJctAymC6jYBQK9wwDU4Xs=" }, { "name": "2008-i915-4-lane-quirk-for-mbp15-1.patch", - "hash": "sha256-f/PTDwRGEyVkGHFyypTKi+gIni3R4TmcsOneGc7Ay5A=" + "hash": "sha256-Ui9tK4IGSWfEscmD92emX/NfulO0m8zwLc9ivIClCFQ=" }, { "name": "2009-apple-gmux-allow-switching-to-igpu-at-probe.patch", @@ -91,19 +91,27 @@ }, { "name": "4001-asahi-trackpad.patch", - "hash": "sha256-NOuGgUxDQEfFPlij/EnhWmgqeG3/l+j+r2T1YJG7raY=" + "hash": "sha256-yfkTKKokb/+JtTwE0Dzht14S0nrSIwLFAFND90P/Cis=" }, { "name": "4002-HID-quirks-remove-T2-devices-from-hid_mouse_ignore_l.patch", - "hash": "sha256-DdUo4/4254VD+MzEaLI3opSS0Z7+UwsitJaS2lAlpI8=" + "hash": "sha256-0PMCE3IWHekir5YV1BD6Jakc7dOV6Fj2HfIGWZnXZV0=" }, { "name": "4003-HID-apple-ignore-the-trackpad-on-T2-Macs.patch", - "hash": "sha256-PZpdvPKvVsLsg3vx3jmq3QCapBUcUVE35N37usBRb6g=" + "hash": "sha256-JTeYtaBqMyTu5IdGb8x7wbP9ZE1rXT4lpEjudR1ySFI=" }, { "name": "4004-HID-magicmouse-Add-support-for-trackpads-found-on-T2.patch", - "hash": "sha256-pmGR0JdMMwGWG3zwMwMBuSyzltLvvzjTgfi1Ii1cglk=" + "hash": "sha256-HcPX7gY3hnlwM/tY06pbtXnch04AqwHgC596E8ZqGY8=" + }, + { + "name": "4005-HID-apple-Add-necessary-IDs-and-support-for-replacem.patch", + "hash": "sha256-SRKESCbpxSYm7U0VyCmvkmT/er6/GEHhwo8tgJDO6mQ=" + }, + { + "name": "4006-HID-magicmouse-Add-MacBookPro15-1-replacement-trackp.patch", + "hash": "sha256-uAlT/4ADwYyKvbuPQaGwqCjZ2/myruC63etVV6cfFLk=" }, { "name": "7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch", @@ -111,7 +119,7 @@ }, { "name": "8001-Add-APFS-driver.patch", - "hash": "sha256-T0ZmO99nmnpNVLjlzMRc7wrkBON7w2F6HaPk4pQVV7A=" + "hash": "sha256-py4DNKBsUWvw6o730ApmNdUlSyabOFnFDoAPrF40DNE=" }, { "name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch", diff --git a/apple/t2/pkgs/linux-t2/latest.nix b/apple/t2/pkgs/linux-t2/latest.nix index 7ab2e41b..70145fdb 100644 --- a/apple/t2/pkgs/linux-t2/latest.nix +++ b/apple/t2/pkgs/linux-t2/latest.nix @@ -1,6 +1,6 @@ -{ callPackage, linux_6_13, ... }@args: +{ callPackage, linux_6_14, ... }@args: callPackage ./generic.nix args { - kernel = linux_6_13; + kernel = linux_6_14; patchesFile = ./latest.json; } diff --git a/apple/t2/pkgs/linux-t2/stable.json b/apple/t2/pkgs/linux-t2/stable.json index 0426662f..3a788c72 100644 --- a/apple/t2/pkgs/linux-t2/stable.json +++ b/apple/t2/pkgs/linux-t2/stable.json @@ -1,5 +1,5 @@ { - "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/dd2e78d234fc289d3ebadf1852d761498e668a02/", + "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/0543a832ecf1400798e8aef6727110ec21c3484a/", "patches": [ { "name": "1001-Add-apple-bce-driver.patch", @@ -95,15 +95,23 @@ }, { "name": "4002-HID-quirks-remove-T2-devices-from-hid_mouse_ignore_l.patch", - "hash": "sha256-DdUo4/4254VD+MzEaLI3opSS0Z7+UwsitJaS2lAlpI8=" + "hash": "sha256-0PMCE3IWHekir5YV1BD6Jakc7dOV6Fj2HfIGWZnXZV0=" }, { "name": "4003-HID-apple-ignore-the-trackpad-on-T2-Macs.patch", - "hash": "sha256-PZpdvPKvVsLsg3vx3jmq3QCapBUcUVE35N37usBRb6g=" + "hash": "sha256-JTeYtaBqMyTu5IdGb8x7wbP9ZE1rXT4lpEjudR1ySFI=" }, { "name": "4004-HID-magicmouse-Add-support-for-trackpads-found-on-T2.patch", - "hash": "sha256-pmGR0JdMMwGWG3zwMwMBuSyzltLvvzjTgfi1Ii1cglk=" + "hash": "sha256-HcPX7gY3hnlwM/tY06pbtXnch04AqwHgC596E8ZqGY8=" + }, + { + "name": "4005-HID-apple-Add-necessary-IDs-and-support-for-replacem.patch", + "hash": "sha256-SRKESCbpxSYm7U0VyCmvkmT/er6/GEHhwo8tgJDO6mQ=" + }, + { + "name": "4006-HID-magicmouse-Add-MacBookPro15-1-replacement-trackp.patch", + "hash": "sha256-uAlT/4ADwYyKvbuPQaGwqCjZ2/myruC63etVV6cfFLk=" }, { "name": "7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch", @@ -111,7 +119,7 @@ }, { "name": "8001-Add-APFS-driver.patch", - "hash": "sha256-xjB7lqE4bweUvDa6Tx6LurxWlUlX4nUN+DbTRQb5bQI=" + "hash": "sha256-1VHKrO2haBqXDCef2xt2fHfCCPv2q/AhFmmM4Xxu24E=" }, { "name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch", diff --git a/apple/t2/pkgs/linux-t2/update-patches.py b/apple/t2/pkgs/linux-t2/update-patches.py index 28d46b13..7b907293 100755 --- a/apple/t2/pkgs/linux-t2/update-patches.py +++ b/apple/t2/pkgs/linux-t2/update-patches.py @@ -7,6 +7,7 @@ import re import subprocess import sys from tempfile import NamedTemporaryFile +from concurrent.futures import ThreadPoolExecutor, as_completed import requests @@ -50,6 +51,11 @@ def get_sri_hash(data: bytes): ) return proc.stdout.decode("utf8").strip() +def download_task(patch: dict): + patch_content = requests.get(patch["download_url"]) + patch_hash = get_sri_hash(patch_content.content) + print(f"{patch['name']}: {patch_hash}") + return {"name": patch["name"], "hash": patch_hash} def main(): args = parser.parse_args() @@ -73,13 +79,13 @@ def main(): patches = filter(lambda e: PATCH_PATTERN.match(e.get("name")), contents) patches_with_hash = [] - for patch in patches: - patch_content = requests.get(patch["download_url"]) - patch_hash = get_sri_hash(patch_content.content) - print(f"{patch['name']}: {patch_hash}") - patches_with_hash.append({"name": patch["name"], "hash": patch_hash}) + with ThreadPoolExecutor() as executor: + futures = {executor.submit(download_task, patch) for patch in patches} - result = {"base_url": base_url, "patches": patches_with_hash} + for future in as_completed(futures): + patches_with_hash.append(future.result()) + + result = {"base_url": base_url, "patches": sorted(patches_with_hash, key=lambda p: p["name"])} with open(args.filename, "w+") as f: json.dump(result, f, indent=2) From af7de84f851e61202cb32bc528917416359336e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 3 Dec 2024 15:42:01 +0100 Subject: [PATCH 1263/1476] E14-intel: import intel comet lake The E14 has a i5-10210U which is from comet lake. see https://www.intel.com/content/www/us/en/products/sku/195436/intel-core-i510210u-processor-6m-cache-up-to-4-20-ghz/specifications.html --- lenovo/thinkpad/e14/intel/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/thinkpad/e14/intel/default.nix b/lenovo/thinkpad/e14/intel/default.nix index 64d2f177..57252205 100644 --- a/lenovo/thinkpad/e14/intel/default.nix +++ b/lenovo/thinkpad/e14/intel/default.nix @@ -3,7 +3,7 @@ { imports = [ ../. - ../../../../common/cpu/intel + ../../../../common/cpu/intel/comet-lake ]; services.throttled.enable = lib.mkDefault true; From 085c9ada2dae5b7a67c8d7ab17754362f96ba8dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 28 Mar 2025 17:20:53 +0100 Subject: [PATCH 1264/1476] intel-comet-lake: use intel-media-driver It is new enough that we don't need or want intel-vaapi-driver. --- common/cpu/intel/comet-lake/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/cpu/intel/comet-lake/default.nix b/common/cpu/intel/comet-lake/default.nix index 3c688f50..25af65fe 100644 --- a/common/cpu/intel/comet-lake/default.nix +++ b/common/cpu/intel/comet-lake/default.nix @@ -3,4 +3,6 @@ ./cpu-only.nix ../../../gpu/intel/comet-lake ]; + + hardware.intelgpu.vaapiDriver = "intel-media-driver"; } From be7794e5a66c81be581ceccaf741a97189652f95 Mon Sep 17 00:00:00 2001 From: steeb-k <133536278+steeb-k@users.noreply.github.com> Date: Fri, 21 Mar 2025 17:36:11 -0700 Subject: [PATCH 1265/1476] Added Lenovo Thinkpad P14s Gen 5 Intel config --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/p14s/intel/gen5/default.nix | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 lenovo/thinkpad/p14s/intel/gen5/default.nix diff --git a/README.md b/README.md index 72a4d281..884a5634 100644 --- a/README.md +++ b/README.md @@ -245,6 +245,7 @@ See code for all available configurations. | [Lenovo ThinkPad P14s AMD Gen 3](lenovo/thinkpad/p14s/amd/gen3) | `` | | [Lenovo ThinkPad P14s AMD Gen 4](lenovo/thinkpad/p14s/amd/gen4) | `` | | [Lenovo ThinkPad P14s Intel Gen 3](lenovo/thinkpad/p14s/intel/gen3) | `` | +| [Lenovo ThinkPad P14s Intel Gen 5](lenovo/thinkpad/p14s/intel/gen5) | `` | | [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | | [Lenovo ThinkPad P16s AMD Gen 2](lenovo/thinkpad/p16s/amd/gen2) | `` | | [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | diff --git a/flake.nix b/flake.nix index 7ccecdda..5d160997 100644 --- a/flake.nix +++ b/flake.nix @@ -189,6 +189,7 @@ lenovo-thinkpad-p14s-amd-gen3 = import ./lenovo/thinkpad/p14s/amd/gen3; lenovo-thinkpad-p14s-amd-gen4 = import ./lenovo/thinkpad/p14s/amd/gen4; lenovo-thinkpad-p14s-intel-gen3 = import ./lenovo/thinkpad/p14s/intel/gen3; + lenovo-thinkpad-p14s-intel-gen5 = import ./lenovo/thinkpad/p14s/intel/gen5; lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1; lenovo-thinkpad-p16s-amd-gen2 = import ./lenovo/thinkpad/p16s/amd/gen2; lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50; diff --git a/lenovo/thinkpad/p14s/intel/gen5/default.nix b/lenovo/thinkpad/p14s/intel/gen5/default.nix new file mode 100644 index 00000000..919df030 --- /dev/null +++ b/lenovo/thinkpad/p14s/intel/gen5/default.nix @@ -0,0 +1,19 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../../../common/gpu/nvidia/prime.nix + ../../../../../common/gpu/nvidia/turing + ]; + + hardware = { + intelgpu.driver = "i915"; #xe driver may be used on newer kernels + nvidia = { + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + }; +} From a3f63440fcfb280d7c9c5dd83f6cc95051867b17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mads=20Rumle=20Nordstr=C3=B8m?= Date: Wed, 19 Mar 2025 18:12:28 +0100 Subject: [PATCH 1266/1476] added lenovo thinkpad p43s --- flake.nix | 1 + lenovo/thinkpad/p43s/default.nix | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 lenovo/thinkpad/p43s/default.nix diff --git a/flake.nix b/flake.nix index 5d160997..629d8f71 100644 --- a/flake.nix +++ b/flake.nix @@ -192,6 +192,7 @@ lenovo-thinkpad-p14s-intel-gen5 = import ./lenovo/thinkpad/p14s/intel/gen5; lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1; lenovo-thinkpad-p16s-amd-gen2 = import ./lenovo/thinkpad/p16s/amd/gen2; + lenovo-thinkpad-p43s = import ./lenovo/thinkpad/p43s; lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50; lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51; lenovo-thinkpad-p52 = import ./lenovo/thinkpad/p52; diff --git a/lenovo/thinkpad/p43s/default.nix b/lenovo/thinkpad/p43s/default.nix new file mode 100644 index 00000000..f9d722de --- /dev/null +++ b/lenovo/thinkpad/p43s/default.nix @@ -0,0 +1,22 @@ +{ lib, config, ... }: { + imports = [ + ../. + ../../../common/cpu/intel + ../../../common/pc/laptop/ssd + ../../../common/gpu/nvidia/pascal + ../../../common/gpu/nvidia/prime-sync.nix + ]; + + hardware = { + graphics.enable = lib.mkDefault true; + + nvidia = { + prime = { + intelBusId = lib.mkDefault "PCI:0:2:0"; + nvidiaBusId = lib.mkDefault "PCI:60:0:0"; + }; + + powerManagement.enable = lib.mkDefault config.hardware.nvidia.prime.sync.enable; + }; + }; +} From de6fc5551121c59c01e2a3d45b277a6d05077bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mads=20Rumle=20Nordstr=C3=B8m?= Date: Thu, 20 Mar 2025 00:05:37 +0100 Subject: [PATCH 1267/1476] added intel whiskey lake --- README.md | 1 + common/cpu/intel/whiskey-lake/cpu-only.nix | 5 +++ common/cpu/intel/whiskey-lake/default.nix | 6 +++ common/gpu/intel/whiskey-lake/default.nix | 7 ++++ lenovo/thinkpad/p43s/README.md | 45 ++++++++++++++++++++++ lenovo/thinkpad/p43s/default.nix | 2 +- 6 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 common/cpu/intel/whiskey-lake/cpu-only.nix create mode 100644 common/cpu/intel/whiskey-lake/default.nix create mode 100644 common/gpu/intel/whiskey-lake/default.nix create mode 100644 lenovo/thinkpad/p43s/README.md diff --git a/README.md b/README.md index 884a5634..29e22f7a 100644 --- a/README.md +++ b/README.md @@ -249,6 +249,7 @@ See code for all available configurations. | [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | | [Lenovo ThinkPad P16s AMD Gen 2](lenovo/thinkpad/p16s/amd/gen2) | `` | | [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | +| [Lenovo ThinkPad P43s](lenovo/thinkpad/p43s) | `` | | [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | | [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `` | | [Lenovo ThinkPad P52](lenovo/thinkpad/p52) | `` | diff --git a/common/cpu/intel/whiskey-lake/cpu-only.nix b/common/cpu/intel/whiskey-lake/cpu-only.nix new file mode 100644 index 00000000..82892615 --- /dev/null +++ b/common/cpu/intel/whiskey-lake/cpu-only.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../cpu-only.nix + ]; +} diff --git a/common/cpu/intel/whiskey-lake/default.nix b/common/cpu/intel/whiskey-lake/default.nix new file mode 100644 index 00000000..2cb88597 --- /dev/null +++ b/common/cpu/intel/whiskey-lake/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./cpu-only.nix + ../../../gpu/intel/whiskey-lake + ]; +} diff --git a/common/gpu/intel/whiskey-lake/default.nix b/common/gpu/intel/whiskey-lake/default.nix new file mode 100644 index 00000000..43ed1c46 --- /dev/null +++ b/common/gpu/intel/whiskey-lake/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ ../. ]; + + boot.kernelParams = [ "i915.enable_guc=2" ]; + + hardware.intelgpu.vaapiDriver = "intel-media-driver"; +} diff --git a/lenovo/thinkpad/p43s/README.md b/lenovo/thinkpad/p43s/README.md new file mode 100644 index 00000000..49c31923 --- /dev/null +++ b/lenovo/thinkpad/p43s/README.md @@ -0,0 +1,45 @@ +# Lenovo Thinkpad P43s + +[Product page](https://www.lenovo.com/us/en/p/laptops/thinkpad/thinkpadp/p43s/22ws2wpp43s) + +## Tested Hardware +```console +foo@bar:~$ lspci -nn +00:00.0 Host bridge [0600]: Intel Corporation Coffee Lake HOST and DRAM Controller [8086:3e34] (rev 0c) +00:02.0 VGA compatible controller [0300]: Intel Corporation WhiskeyLake-U GT2 [UHD Graphics 620] [8086:3ea0] (rev 02) +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 0c) +00:08.0 System peripheral [0880]: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model [8086:1911] +00:12.0 Signal processing controller [1180]: Intel Corporation Cannon Point-LP Thermal Controller [8086:9df9] (rev 30) +00:14.0 USB controller [0c03]: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller [8086:9ded] (rev 30) +00:14.2 RAM memory [0500]: Intel Corporation Cannon Point-LP Shared SRAM [8086:9def] (rev 30) +00:14.3 Network controller [0280]: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] [8086:9df0] (rev 30) +00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 [8086:9de8] (rev 30) +00:16.0 Communication controller [0780]: Intel Corporation Cannon Point-LP MEI Controller #1 [8086:9de0] (rev 30) +00:16.3 Serial controller [0700]: Intel Corporation Cannon Point-LP Keyboard and Text (KT) Redirection [8086:9de3] (rev 30) +00:1c.0 PCI bridge [0604]: Intel Corporation Cannon Point-LP PCI Express Root Port #1 [8086:9db8] (rev f0) +00:1c.4 PCI bridge [0604]: Intel Corporation Cannon Point-LP PCI Express Root Port #5 [8086:9dbc] (rev f0) +00:1d.0 PCI bridge [0604]: Intel Corporation Cannon Point-LP PCI Express Root Port #9 [8086:9db0] (rev f0) +00:1d.4 PCI bridge [0604]: Intel Corporation Cannon Point-LP PCI Express Root Port #13 [8086:9db4] (rev f0) +00:1f.0 ISA bridge [0601]: Intel Corporation Cannon Point-LP LPC Controller [8086:9d84] (rev 30) +00:1f.3 Audio device [0403]: Intel Corporation Cannon Point-LP High Definition Audio Controller [8086:9dc8] (rev 30) +00:1f.4 SMBus [0c05]: Intel Corporation Cannon Point-LP SMBus Controller [8086:9da3] (rev 30) +00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller [8086:9da4] (rev 30) +00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (6) I219-LM [8086:15bd] (rev 30) +01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader [10ec:522a] (rev 01) +02:00.0 PCI bridge [0604]: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] [8086:15c0] (rev 01) +03:00.0 PCI bridge [0604]: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] [8086:15c0] (rev 01) +03:01.0 PCI bridge [0604]: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] [8086:15c0] (rev 01) +03:02.0 PCI bridge [0604]: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] [8086:15c0] (rev 01) +04:00.0 System peripheral [0880]: Intel Corporation JHL6240 Thunderbolt 3 NHI (Low Power) [Alpine Ridge LP 2016] [8086:15bf] (rev 01) +3a:00.0 USB controller [0c03]: Intel Corporation JHL6240 Thunderbolt 3 USB 3.1 Controller (Low Power) [Alpine Ridge LP 2016] [8086:15c1] (rev 01) +3c:00.0 3D controller [0302]: NVIDIA Corporation GP108GLM [Quadro P520] [10de:1d34] (rev a1) +3d:00.0 Non-Volatile memory controller [0108]: SK hynix PC601 NVMe Solid State Drive [1c5c:1627] +``` + +## Tested Nix Configuration + - system: `"x86_64-linux"` + - host os: `Linux 6.12.18, NixOS, 25.05 (Warbler), 25.05.20250309.e3e32b6` + - multi-user?: `yes` + - sandbox: `yes` + - version: `nix-env (Nix) 2.24.12` + - nixpkgs: `/nix/store/g4ppspdl4fy7hnp4jgjl4ll03v7i08w3-source` diff --git a/lenovo/thinkpad/p43s/default.nix b/lenovo/thinkpad/p43s/default.nix index f9d722de..46632b79 100644 --- a/lenovo/thinkpad/p43s/default.nix +++ b/lenovo/thinkpad/p43s/default.nix @@ -1,7 +1,7 @@ { lib, config, ... }: { imports = [ ../. - ../../../common/cpu/intel + ../../../common/cpu/intel/whiskey-lake ../../../common/pc/laptop/ssd ../../../common/gpu/nvidia/pascal ../../../common/gpu/nvidia/prime-sync.nix From 8141742b12ab3ff3d4769640dad1e1abeeda6171 Mon Sep 17 00:00:00 2001 From: Andre Date: Thu, 10 Apr 2025 20:37:04 -0400 Subject: [PATCH 1268/1476] microsoft/surface: add kernel switching for LTS and latest kernels --- microsoft/surface/common/default.nix | 66 ++++++-- .../{linux-surface => 6.12}/patches.nix | 0 .../surface/common/kernel/6.13/patches.nix | 157 ++++++++++++++++++ microsoft/surface/common/kernel/default.nix | 15 -- .../surface/common/kernel/linux-package.nix | 3 +- .../common/kernel/linux-surface/default.nix | 31 ---- microsoft/surface/common/kernel/repos.nix | 9 + microsoft/surface/common/repos.nix | 25 --- .../firmware/ath10k/ath10k-replace.nix | 9 +- 9 files changed, 228 insertions(+), 87 deletions(-) rename microsoft/surface/common/kernel/{linux-surface => 6.12}/patches.nix (100%) create mode 100644 microsoft/surface/common/kernel/6.13/patches.nix delete mode 100644 microsoft/surface/common/kernel/default.nix delete mode 100644 microsoft/surface/common/kernel/linux-surface/default.nix create mode 100644 microsoft/surface/common/kernel/repos.nix delete mode 100644 microsoft/surface/common/repos.nix diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index d49f4e31..fe3a41ed 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -1,22 +1,62 @@ -{ lib, ... }: +{ config, lib, pkgs, ... }: let - inherit (lib) mkDefault; + inherit (lib) mkDefault mkOption types; + + version = config.microsoft-surface.kernelVersion; + rev = + if version == "6.12" then + "arch-6.12.19-1" + else if version == "6.13" then + "arch-6.13.6-1" + else + abort "Invalid kernel version: ${version}"; + + hash = + if version == "6.12" then + "sha256-Pv7O8D8ma+MPLhYP3HSGQki+Yczp8b7d63qMb6l4+mY=" + else if version == "6.13" then + "sha256-otD1ckNxNnvV8xipf9SZpbfg+bBq5EPwyieYtLIV4Ck=" + else + abort "Invalid kernel version: ${version}"; + + inherit (pkgs.callPackage ./kernel/linux-package.nix { repos = pkgs.callPackage ./kernel/repos.nix { rev = rev; hash = hash; }; }) linuxPackage surfacePatches; + + kernelPatches = surfacePatches { + inherit version; + patchFn = ./kernel/${version}/patches.nix; + }; + kernelPackages = linuxPackage { + inherit version kernelPatches; + sha256 = "sha256-1zvwV77ARDSxadG2FkGTb30Ml865I6KB8y413U3MZTE="; + ignoreConfigErrors=true; + }; in { - imports = [ - ./kernel - ]; + options.microsoft-surface.kernelVersion = mkOption { + description = "Kernel Version to use (patched for MS Surface)"; + type = types.enum [ + "6.12" + "6.13" + ]; + default = "6.12"; + }; - microsoft-surface.kernelVersion = mkDefault "6.12"; + config = { + boot = { + inherit kernelPackages; - # Seems to be required to properly enable S0ix "Modern Standby": - boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; + kernelParams = mkDefault [ "mem_sleep_default=deep" ]; + # Seems to be required to properly enable S0ix "Modern Standby": + }; - # NOTE: Check the README before enabling TLP: - services.tlp.enable = mkDefault false; + # NOTE: Check the README before enabling TLP: + services.tlp.enable = mkDefault false; - # i.e. needed for wifi firmware, see https://github.com/NixOS/nixos-hardware/issues/364 - hardware.enableRedistributableFirmware = mkDefault true; - hardware.sensor.iio.enable = mkDefault true; + # i.e. needed for wifi firmware, see https://github.com/NixOS/nixos-hardware/issues/364 + hardware = { + enableRedistributableFirmware = mkDefault true; + sensor.iio.enable = mkDefault true; + }; + }; } diff --git a/microsoft/surface/common/kernel/linux-surface/patches.nix b/microsoft/surface/common/kernel/6.12/patches.nix similarity index 100% rename from microsoft/surface/common/kernel/linux-surface/patches.nix rename to microsoft/surface/common/kernel/6.12/patches.nix diff --git a/microsoft/surface/common/kernel/6.13/patches.nix b/microsoft/surface/common/kernel/6.13/patches.nix new file mode 100644 index 00000000..d905499f --- /dev/null +++ b/microsoft/surface/common/kernel/6.13/patches.nix @@ -0,0 +1,157 @@ +{ lib, + kernel ? lib.kernel, + patchSrc, + version, +}: + +[ + { + name = "microsoft-surface-patches-linux-${version}"; + patch = null; + extraStructuredConfig = with kernel; { + STAGING_MEDIA = yes; + +## +## Surface Aggregator Module +## +CONFIG_SURFACE_AGGREGATOR= module; +# CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION is not set +CONFIG_SURFACE_AGGREGATOR_BUS= yes; +CONFIG_SURFACE_AGGREGATOR_CDEV= module; +CONFIG_SURFACE_AGGREGATOR_HUB= module; +CONFIG_SURFACE_AGGREGATOR_REGISTRY= module; +CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH= module; + +CONFIG_SURFACE_ACPI_NOTIFY= module; +CONFIG_SURFACE_DTX= module; +CONFIG_SURFACE_PLATFORM_PROFILE= module; + +CONFIG_SURFACE_HID= module; +CONFIG_SURFACE_KBD= module; + +CONFIG_BATTERY_SURFACE= module; +CONFIG_CHARGER_SURFACE= module; + +CONFIG_SENSORS_SURFACE_TEMP= module; +CONFIG_SENSORS_SURFACE_FAN= module; + +## +## Surface Hotplug +## +CONFIG_SURFACE_HOTPLUG= module; + +## +## IPTS and ITHC touchscreen +## +## This only enables the user interface for IPTS/ITHC data. +## For the touchscreen to work, you need to install iptsd. +## +CONFIG_HID_IPTS= module; +CONFIG_HID_ITHC= module; + +## +## Cameras: IPU3 +## +CONFIG_VIDEO_DW9719= module; +CONFIG_VIDEO_IPU3_IMGU= module; +CONFIG_VIDEO_IPU3_CIO2= module; +CONFIG_IPU_BRIDGE= module; +CONFIG_INTEL_SKL_INT3472= module; +CONFIG_REGULATOR_TPS68470= module; +CONFIG_COMMON_CLK_TPS68470= module; +CONFIG_LEDS_TPS68470= module; + +## +## Cameras: Sensor drivers +## +CONFIG_VIDEO_OV5693= module; +CONFIG_VIDEO_OV7251= module; +CONFIG_VIDEO_OV8865= module; + +## +## Surface 3: atomisp causes problems (see issue #1095). Disable it for now. +## +# CONFIG_INTEL_ATOMISP is not set + +## +## ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 +## +CONFIG_APDS9960= module; + +## +## Build-in UFS support (required for some Surface Go devices) +## +CONFIG_SCSI_UFSHCD= module; +CONFIG_SCSI_UFSHCD_PCI= module; + +## +## Other Drivers +## +CONFIG_INPUT_SOC_BUTTON_ARRAY= module; +CONFIG_SURFACE_3_POWER_OPREGION= module; +CONFIG_SURFACE_PRO3_BUTTON= module; +CONFIG_SURFACE_GPE= module; +CONFIG_SURFACE_BOOK1_DGPU_SWITCH= module; + }; + } + { + name = "ms-surface/0001-secureboot"; + patch = patchSrc + "/0001-secureboot.patch"; + } + { + name = "ms-surface/0002-surface3"; + patch = patchSrc + "/0002-surface3.patch"; + } + { + name = "ms-surface/0003-mwifiex"; + patch = patchSrc + "/0003-mwifiex.patch"; + } + { + name = "ms-surface/0004-ath10k"; + patch = patchSrc + "/0004-ath10k.patch"; + } + { + name = "ms-surface/0005-ipts"; + patch = patchSrc + "/0005-ipts.patch"; + } + { + name = "ms-surface/0006-ithc"; + patch = patchSrc + "/0006-ithc.patch"; + } + { + name = "ms-surface/0007-surface-sam"; + patch = patchSrc + "/0007-surface-sam.patch"; + } + { + name = "ms-surface/0008-surface-sam-over-hid"; + patch = patchSrc + "/0008-surface-sam-over-hid.patch"; + } + { + name = "ms-surface/0009-surface-button"; + patch = patchSrc + "/0009-surface-button.patch"; + } + { + name = "ms-surface/0010-surface-typecover"; + patch = patchSrc + "/0010-surface-typecover.patch"; + } + { + name = "ms-surface/0011-surface-shutdown"; + patch = patchSrc + "/0011-surface-shutdown.patch"; + } + { + name = "ms-surface/0012-surface-gpe"; + patch = patchSrc + "/0012-surface-gpe.patch"; + } + { + name = "ms-surface/0013-cameras"; + patch = patchSrc + "/0013-cameras.patch"; + } + { + name = "ms-surface/0014-amd-gpio"; + patch = patchSrc + "/0014-amd-gpio.patch"; + } + { + name = "ms-surface/0015-rtc"; + patch = patchSrc + "/0015-rtc.patch"; + } +] diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix deleted file mode 100644 index 490ecd0d..00000000 --- a/microsoft/surface/common/kernel/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ lib, ... }: - -let - inherit (lib) mkOption types; - -in { - imports = [ - ./linux-surface - ]; - - options.microsoft-surface.kernelVersion = mkOption { - description = "Kernel Version to use (patched for MS Surface)"; - type = types.enum [ ]; - }; -} diff --git a/microsoft/surface/common/kernel/linux-package.nix b/microsoft/surface/common/kernel/linux-package.nix index b179fcb7..28e3e0e7 100644 --- a/microsoft/surface/common/kernel/linux-package.nix +++ b/microsoft/surface/common/kernel/linux-package.nix @@ -3,14 +3,13 @@ fetchurl, buildLinux, linuxPackagesFor, + repos, }: let inherit (builtins) elem; inherit (lib) recurseIntoAttrs types versions; - repos = pkgs.callPackage ../repos.nix {}; - linuxPackage = { url ? "mirror://kernel/linux/kernel/v${versions.major version}.x/linux-${version}.tar.xz", sha256 ? null, diff --git a/microsoft/surface/common/kernel/linux-surface/default.nix b/microsoft/surface/common/kernel/linux-surface/default.nix deleted file mode 100644 index 5eb1e976..00000000 --- a/microsoft/surface/common/kernel/linux-surface/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - inherit (lib) mkIf mkOption; - - inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches isVersionOf versionsOfEnum; - - cfg = config.microsoft-surface; - - version = "6.12.19"; - kernelPatches = surfacePatches { - inherit version; - patchFn = ./patches.nix; - }; - kernelPackages = linuxPackage { - inherit version kernelPatches; - sha256 = "sha256-1zvwV77ARDSxadG2FkGTb30Ml865I6KB8y413U3MZTE="; - ignoreConfigErrors=true; - }; - -in { - options.microsoft-surface.kernelVersion = mkOption { - type = versionsOfEnum version; - }; - - config = mkIf (isVersionOf cfg.kernelVersion version) { - boot = { - inherit kernelPackages; - }; - }; -} diff --git a/microsoft/surface/common/kernel/repos.nix b/microsoft/surface/common/kernel/repos.nix new file mode 100644 index 00000000..6d8349fd --- /dev/null +++ b/microsoft/surface/common/kernel/repos.nix @@ -0,0 +1,9 @@ +{ fetchFromGitHub, rev, hash }: +{ + linux-surface = fetchFromGitHub { + owner = "linux-surface"; + repo = "linux-surface"; + rev = rev; + hash = hash; + }; +} \ No newline at end of file diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix deleted file mode 100644 index a6bb7368..00000000 --- a/microsoft/surface/common/repos.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ fetchFromGitHub }: - -{ - linux-surface = fetchFromGitHub { - owner = "linux-surface"; - repo = "linux-surface"; - rev = "arch-6.12.7-1"; - hash = "sha256-Pv7O8D8ma+MPLhYP3HSGQki+Yczp8b7d63qMb6l4+mY="; - }; - - # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: - linux-surface-kernel = { rev, sha256 }: - fetchFromGitHub { - owner = "linux-surface"; - repo = "kernel"; - inherit rev sha256; - }; - - surface-go-ath10k-firmware_backup = fetchFromGitHub { - owner = "mexisme"; - repo = "linux-surface_ath10k-firmware"; - rev = "74e5409e699383d6ca2bc4da4a8433d16f3850b1"; - sha256 = "169vgvxpgad9anmchs22fj5qm6ahzjfdnwhd8pc280q705vx6pjk"; - }; -} diff --git a/microsoft/surface/surface-go/firmware/ath10k/ath10k-replace.nix b/microsoft/surface/surface-go/firmware/ath10k/ath10k-replace.nix index 6cc55fa2..132695e5 100644 --- a/microsoft/surface/surface-go/firmware/ath10k/ath10k-replace.nix +++ b/microsoft/surface/surface-go/firmware/ath10k/ath10k-replace.nix @@ -1,7 +1,14 @@ { stdenv, lib, pkgs, firmwareLinuxNonfree, ... }: let - repos = pkgs.callPackage ../../../common/repos.nix {}; + repos = pkgs.callPackage { + surface-go-ath10k-firmware_backup = lib.fetchFromGitHub { + owner = "mexisme"; + repo = "linux-surface_ath10k-firmware"; + rev = "74e5409e699383d6ca2bc4da4a8433d16f3850b1"; + sha256 = "169vgvxpgad9anmchs22fj5qm6ahzjfdnwhd8pc280q705vx6pjk"; + }; + } {}; killernetworking_firmware = repos.surface-go-ath10k-firmware_backup + "/K1535_Debian"; in stdenv.mkDerivation { From c7034bb57b045c0b6d4fb9180abe42a96f4d1add Mon Sep 17 00:00:00 2001 From: Ganga Ram Date: Fri, 11 Apr 2025 12:37:15 +0400 Subject: [PATCH 1269/1476] Fix compilation issue Updated makeFlags as latest buildArmTrustedFirmware specifies CC and LD explicitly, which doesn't work well with the nxp imx8mp-evk platform. Signed-off-by: Ganga Ram --- nxp/imx8mp-evk/bsp/imx8mp-atf.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/nxp/imx8mp-evk/bsp/imx8mp-atf.nix b/nxp/imx8mp-evk/bsp/imx8mp-atf.nix index 55454c4a..84e921f6 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-atf.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-atf.nix @@ -25,10 +25,16 @@ in sha256 = "sha256-96EddJXlFEkP/LIGVgNBvUP4IDI3BbDE/c9Yub22gnc="; }; - extraMakeFlags = lib.concatLists [ - (lib.optional (lib.versionAtLeast pkgs.binutils.version "2.39") "LDFLAGS=--no-warn-rwx-segments") - ["PLAT=${platform}" "bl31" "${opteedflag}"] - ]; + makeFlags = [ + "HOSTCC=$(CC_FOR_BUILD)" + "M0_CROSS_COMPILE=arm-none-eabi-" + "CROSS_COMPILE=aarch64-unknown-linux-gnu-" + # binutils 2.39 regression + # `warning: /build/source/build/rk3399/release/bl31/bl31.elf has a LOAD segment with RWX permissions` + # See also: https://developer.trustedfirmware.org/T996 + "LDFLAGS=-no-warn-rwx-segments" + "PLAT=${platform}" "bl31" "${opteedflag}" + ]; filesToInstall = ["build/${target-board}/release/bl31.bin"]; } From 9726adf371a51e3f6884b190b259e8842c32e6ca Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 11 Apr 2025 09:35:36 -0400 Subject: [PATCH 1270/1476] microsoft/surface: add kernel source hash logic --- microsoft/surface/common/default.nix | 33 ++++++++++++++++++---------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index fe3a41ed..2ad22332 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -3,32 +3,41 @@ let inherit (lib) mkDefault mkOption types; - version = config.microsoft-surface.kernelVersion; - rev = - if version == "6.12" then - "arch-6.12.19-1" - else if version == "6.13" then - "arch-6.13.6-1" + shortVersion = config.microsoft-surface.kernelVersion; + version = if shortVersion == "6.12" then + "6.12.19" + else if shortVersion == "6.13" then + "6.13.6" else - abort "Invalid kernel version: ${version}"; + abort "Invalid kernel version: ${shortVersion}"; + + rev = "arch-${version}-1"; hash = - if version == "6.12" then + if shortVersion == "6.12" then "sha256-Pv7O8D8ma+MPLhYP3HSGQki+Yczp8b7d63qMb6l4+mY=" - else if version == "6.13" then + else if shortVersion == "6.13" then "sha256-otD1ckNxNnvV8xipf9SZpbfg+bBq5EPwyieYtLIV4Ck=" else - abort "Invalid kernel version: ${version}"; + abort "Invalid kernel version: ${shortVersion}"; + + srcHash = + if shortVersion == "6.12" then + "sha256-1zvwV77ARDSxadG2FkGTb30Ml865I6KB8y413U3MZTE=" + else if shortVersion == "6.13" then + "sha256-3gBTy0E9QI8g/R1XiCGZUbikQD5drBsdkDIJCTis0Zk=" + else + abort "Invalid kernel version: ${shortVersion}"; inherit (pkgs.callPackage ./kernel/linux-package.nix { repos = pkgs.callPackage ./kernel/repos.nix { rev = rev; hash = hash; }; }) linuxPackage surfacePatches; kernelPatches = surfacePatches { inherit version; - patchFn = ./kernel/${version}/patches.nix; + patchFn = ./kernel/${shortVersion}/patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "sha256-1zvwV77ARDSxadG2FkGTb30Ml865I6KB8y413U3MZTE="; + sha256 = srcHash; ignoreConfigErrors=true; }; From bb295c09d96dc62b24f101c98a1115552449db92 Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 11 Apr 2025 14:54:03 -0400 Subject: [PATCH 1271/1476] microsoft/surface: remove repos.nix file and update README --- microsoft/surface/README.md | 26 +++++++++----- microsoft/surface/common/default.nix | 41 ++++++++++++++--------- microsoft/surface/common/kernel/repos.nix | 9 ----- 3 files changed, 44 insertions(+), 32 deletions(-) delete mode 100644 microsoft/surface/common/kernel/repos.nix diff --git a/microsoft/surface/README.md b/microsoft/surface/README.md index a461f318..508bbebc 100644 --- a/microsoft/surface/README.md +++ b/microsoft/surface/README.md @@ -1,8 +1,3 @@ -# NOTE: Structure changes from 2023-01-10 - -Please read the [Deprecated Behaviour README](./OLD-BEHAVIOUR-DEPRECATION.md) to understand how some structural changes to -the code might affect you! - # Derivations for Microsoft Surface notebooks These derivatives use the patches from the [linux-surface repo](https://github.com/linux-surface/linux-surface/tree/master/patches). @@ -32,13 +27,24 @@ Not all hardware is fully supported, but the [linux-surface feature matrix](https://github.com/linux-surface/linux-surface/wiki/Supported-Devices-and-Features#feature-matrix) provides details on which devices are supported on which types of machine. -The kernel-specific derivations are under the [`common/kernel/`](./common/kernel/) sub-directory. -In order to simplify maintenance of the Nix code, only the most-recent kernel patch-set is expected -to be maintained in this repo. +The kernel-specific derivations are under the [`common/kernel/`](./common/kernel/) sub-directory. This directory defines patch sets for each supported kernel release (see Kernel versions below for more information). _*NOTE:*_ Some built-in Kernel config items need to be set, that aren't set by default: - https://github.com/linux-surface/surface-aggregator-module/wiki/Testing-and-Installing +#### Kernel versions + +There are multiple versions of the Surface kernel available: + +- `lts`, which tracks the latest LTS release. +- `latest`, which tracks the most recent release. + +This repo uses `lts` by default, but you can switch it to `latest` by adding this to your configuration file: + +```nix +microsoft-surface.kernelVersion = "latest"; +``` + ### Support Tools ### IPTS @@ -120,3 +126,7 @@ References: - https://github.com/thebitstick/surfacego-wifi - https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/ath10k - https://wireless.wiki.kernel.org/en/users/drivers/ath10k/firmware + +## Structural changes from earlier versions (2023-01-10 and earlier) + +If you're upgrading from an older version of nixos-hardware, please read the [Deprecated Behaviour README](./OLD-BEHAVIOUR-DEPRECATION.md) to understand how some structural changes to the code might affect you! diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 2ad22332..c7bd3547 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -1,19 +1,19 @@ { config, lib, pkgs, ... }: let - inherit (lib) mkDefault mkOption types; + inherit (lib) fetchFromGitHub mkDefault mkOption types versions; - shortVersion = config.microsoft-surface.kernelVersion; - version = if shortVersion == "6.12" then + # Set the full kernel version and hashes + version = + if config.microsoft-surface.kernelVersion == "lts" then "6.12.19" - else if shortVersion == "6.13" then + else if config.microsoft-surface.kernelVersion == "latest" then "6.13.6" else - abort "Invalid kernel version: ${shortVersion}"; - - rev = "arch-${version}-1"; + abort "Invalid kernel version: ${config.microsoft-surface.kernelVersion}"; - hash = + shortVersion = versions.majorMinor version; + packageHash = if shortVersion == "6.12" then "sha256-Pv7O8D8ma+MPLhYP3HSGQki+Yczp8b7d63qMb6l4+mY=" else if shortVersion == "6.13" then @@ -29,15 +29,26 @@ let else abort "Invalid kernel version: ${shortVersion}"; - inherit (pkgs.callPackage ./kernel/linux-package.nix { repos = pkgs.callPackage ./kernel/repos.nix { rev = rev; hash = hash; }; }) linuxPackage surfacePatches; + # Fetch the release from the linux-surface project + rev = "arch-${version}-1"; + repos = pkgs.callPackage ({ fetchFromGitHub, rev, packageHash }: { + linux-surface = fetchFromGitHub { + owner = "linux-surface"; + repo = "linux-surface"; + rev = rev; + hash = packageHash; + }; + }) { inherit rev packageHash; }; + # Build the kernel package + inherit (pkgs.callPackage ./kernel/linux-package.nix { inherit repos; }) linuxPackage surfacePatches; kernelPatches = surfacePatches { inherit version; patchFn = ./kernel/${shortVersion}/patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = srcHash; + hash = srcHash; ignoreConfigErrors=true; }; @@ -45,24 +56,24 @@ in { options.microsoft-surface.kernelVersion = mkOption { description = "Kernel Version to use (patched for MS Surface)"; type = types.enum [ - "6.12" - "6.13" + "lts" + "latest" ]; - default = "6.12"; + default = "lts"; }; config = { boot = { inherit kernelPackages; - kernelParams = mkDefault [ "mem_sleep_default=deep" ]; # Seems to be required to properly enable S0ix "Modern Standby": + kernelParams = mkDefault [ "mem_sleep_default=deep" ]; }; # NOTE: Check the README before enabling TLP: services.tlp.enable = mkDefault false; - # i.e. needed for wifi firmware, see https://github.com/NixOS/nixos-hardware/issues/364 + # Needed for wifi firmware, see https://github.com/NixOS/nixos-hardware/issues/364 hardware = { enableRedistributableFirmware = mkDefault true; sensor.iio.enable = mkDefault true; diff --git a/microsoft/surface/common/kernel/repos.nix b/microsoft/surface/common/kernel/repos.nix deleted file mode 100644 index 6d8349fd..00000000 --- a/microsoft/surface/common/kernel/repos.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ fetchFromGitHub, rev, hash }: -{ - linux-surface = fetchFromGitHub { - owner = "linux-surface"; - repo = "linux-surface"; - rev = rev; - hash = hash; - }; -} \ No newline at end of file From dab2104c1fe488bf5d7ef537e60378a9d9b81a34 Mon Sep 17 00:00:00 2001 From: Andre Date: Sat, 12 Apr 2025 10:37:47 -0400 Subject: [PATCH 1272/1476] microsoft/surface: switch back to using sha256 instead of hash due to connection breaking --- microsoft/surface/common/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index c7bd3547..ecbdf4e7 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let - inherit (lib) fetchFromGitHub mkDefault mkOption types versions; + inherit (lib) mkDefault mkOption types versions; # Set the full kernel version and hashes version = @@ -48,7 +48,7 @@ let }; kernelPackages = linuxPackage { inherit version kernelPatches; - hash = srcHash; + sha256 = srcHash; ignoreConfigErrors=true; }; From 2034c5d2e7831e8aab82e2fa21821b30767fbe8e Mon Sep 17 00:00:00 2001 From: Andre Date: Sat, 12 Apr 2025 10:42:29 -0400 Subject: [PATCH 1273/1476] microsoft/surface: rename 'lts' and 'latest' to 'longterm' and 'stable' --- microsoft/surface/README.md | 8 ++++---- microsoft/surface/common/default.nix | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/microsoft/surface/README.md b/microsoft/surface/README.md index 508bbebc..cc5dbde5 100644 --- a/microsoft/surface/README.md +++ b/microsoft/surface/README.md @@ -36,13 +36,13 @@ _*NOTE:*_ Some built-in Kernel config items need to be set, that aren't set by d There are multiple versions of the Surface kernel available: -- `lts`, which tracks the latest LTS release. -- `latest`, which tracks the most recent release. +- `longterm`, which tracks the latest long term support (LTS) release. +- `stable`, which tracks the most recent stable release. -This repo uses `lts` by default, but you can switch it to `latest` by adding this to your configuration file: +This repo uses `longterm` by default, but you can switch it to `stable` by adding this to your configuration file: ```nix -microsoft-surface.kernelVersion = "latest"; +microsoft-surface.kernelVersion = "stable"; ``` ### Support Tools diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index ecbdf4e7..52435ec4 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -5,9 +5,9 @@ let # Set the full kernel version and hashes version = - if config.microsoft-surface.kernelVersion == "lts" then + if config.microsoft-surface.kernelVersion == "longterm" then "6.12.19" - else if config.microsoft-surface.kernelVersion == "latest" then + else if config.microsoft-surface.kernelVersion == "stable" then "6.13.6" else abort "Invalid kernel version: ${config.microsoft-surface.kernelVersion}"; @@ -56,10 +56,10 @@ in { options.microsoft-surface.kernelVersion = mkOption { description = "Kernel Version to use (patched for MS Surface)"; type = types.enum [ - "lts" - "latest" + "longterm" + "stable" ]; - default = "lts"; + default = "longterm"; }; config = { From 33aa2d8399259a2b761ebc52815566b7654ff1c9 Mon Sep 17 00:00:00 2001 From: Andre Date: Sat, 12 Apr 2025 11:28:09 -0400 Subject: [PATCH 1274/1476] microsoft/surface: decouple kernel source and linux-surface package versions --- microsoft/surface/common/default.nix | 61 ++++++++++++++++------------ 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 52435ec4..f40de69e 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -3,51 +3,58 @@ let inherit (lib) mkDefault mkOption types versions; - # Set the full kernel version and hashes - version = - if config.microsoft-surface.kernelVersion == "longterm" then + # Set the version and hash for the kernel sources + srcVersion = with config.microsoft-surface; + if kernelVersion == "longterm" then "6.12.19" - else if config.microsoft-surface.kernelVersion == "stable" then + else if kernelVersion == "stable" then "6.13.6" else - abort "Invalid kernel version: ${config.microsoft-surface.kernelVersion}"; - - shortVersion = versions.majorMinor version; - packageHash = - if shortVersion == "6.12" then - "sha256-Pv7O8D8ma+MPLhYP3HSGQki+Yczp8b7d63qMb6l4+mY=" - else if shortVersion == "6.13" then - "sha256-otD1ckNxNnvV8xipf9SZpbfg+bBq5EPwyieYtLIV4Ck=" - else - abort "Invalid kernel version: ${shortVersion}"; + abort "Invalid kernel version: ${kernelVersion}"; - srcHash = - if shortVersion == "6.12" then + srcHash = with config.microsoft-surface; + if kernelVersion == "longterm" then "sha256-1zvwV77ARDSxadG2FkGTb30Ml865I6KB8y413U3MZTE=" - else if shortVersion == "6.13" then + else if kernelVersion == "stable" then "sha256-3gBTy0E9QI8g/R1XiCGZUbikQD5drBsdkDIJCTis0Zk=" else - abort "Invalid kernel version: ${shortVersion}"; + abort "Invalid kernel version: ${kernelVersion}"; - # Fetch the release from the linux-surface project - rev = "arch-${version}-1"; - repos = pkgs.callPackage ({ fetchFromGitHub, rev, packageHash }: { + # Set the version and hash for the linux-surface releases + pkgVersion = with config.microsoft-surface; + if kernelVersion == "longterm" then + "6.12.7" + else if kernelVersion == "stable" then + "6.13.6" + else + abort "Invalid kernel version: ${kernelVersion}"; + + pkgHash = with config.microsoft-surface; + if kernelVersion == "longterm" then + "sha256-Pv7O8D8ma+MPLhYP3HSGQki+Yczp8b7d63qMb6l4+mY=" + else if kernelVersion == "stable" then + "sha256-otD1ckNxNnvV8xipf9SZpbfg+bBq5EPwyieYtLIV4Ck=" + else + abort "Invalid kernel version: ${kernelVersion}"; + + # Fetch the linux-surface package + repos = pkgs.callPackage ({ fetchFromGitHub, rev, hash }: { linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; rev = rev; - hash = packageHash; + hash = hash; }; - }) { inherit rev packageHash; }; + }) { hash = pkgHash; rev = "arch-${pkgVersion}-1"; }; - # Build the kernel package + # Fetch and build the kernel package inherit (pkgs.callPackage ./kernel/linux-package.nix { inherit repos; }) linuxPackage surfacePatches; kernelPatches = surfacePatches { - inherit version; - patchFn = ./kernel/${shortVersion}/patches.nix; + version = pkgVersion; + patchFn = ./kernel/${versions.majorMinor pkgVersion}/patches.nix; }; kernelPackages = linuxPackage { - inherit version kernelPatches; + inherit kernelPatches; version = srcVersion; sha256 = srcHash; ignoreConfigErrors=true; }; From 48a8eaeac8059c23a2f8d6f41e8486a47d6ba95f Mon Sep 17 00:00:00 2001 From: Ganga Ram Date: Mon, 14 Apr 2025 11:10:36 +0400 Subject: [PATCH 1275/1476] Fixed native build issues for imx8mp-evk atf Signed-off-by: Ganga Ram --- nxp/imx8mp-evk/bsp/imx8mp-atf.nix | 89 ++++++++++++++++++------------ nxp/imx8mp-evk/bsp/imx8mp-boot.nix | 1 - 2 files changed, 53 insertions(+), 37 deletions(-) diff --git a/nxp/imx8mp-evk/bsp/imx8mp-atf.nix b/nxp/imx8mp-evk/bsp/imx8mp-atf.nix index 84e921f6..a75cec33 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-atf.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-atf.nix @@ -1,40 +1,57 @@ -{ - lib, - pkgs, - buildArmTrustedFirmware, - fetchgit, - enable-tee, -}: -with pkgs; let - opteedflag = - if enable-tee - then "SPD=opteed" - else ""; +{ lib, fetchgit, enable-tee, stdenv, buildPackages, pkgsCross, openssl, }: +let + opteedflag = if enable-tee then "SPD=opteed" else ""; target-board = "imx8mp"; -in - buildArmTrustedFirmware rec { - pname = "imx8mp-atf"; - platform = target-board; - enableParallelBuilding = true; - extraMeta.platforms = ["aarch64-linux"]; +in stdenv.mkDerivation rec { + pname = "imx8mp-atf"; + version = "lf6.1.55_2.2.0"; + platform = target-board; + enableParallelBuilding = true; - src = fetchgit { - url = "https://github.com/nxp-imx/imx-atf.git"; - #lf6.1.55_2.2.0 - rev = "08e9d4eef2262c0dd072b4325e8919e06d349e02"; - sha256 = "sha256-96EddJXlFEkP/LIGVgNBvUP4IDI3BbDE/c9Yub22gnc="; - }; + src = fetchgit { + url = "https://github.com/nxp-imx/imx-atf.git"; + rev = "08e9d4eef2262c0dd072b4325e8919e06d349e02"; + sha256 = "sha256-96EddJXlFEkP/LIGVgNBvUP4IDI3BbDE/c9Yub22gnc="; + }; - makeFlags = [ - "HOSTCC=$(CC_FOR_BUILD)" - "M0_CROSS_COMPILE=arm-none-eabi-" - "CROSS_COMPILE=aarch64-unknown-linux-gnu-" - # binutils 2.39 regression - # `warning: /build/source/build/rk3399/release/bl31/bl31.elf has a LOAD segment with RWX permissions` - # See also: https://developer.trustedfirmware.org/T996 - "LDFLAGS=-no-warn-rwx-segments" - "PLAT=${platform}" "bl31" "${opteedflag}" - ]; + depsBuildBuild = [ buildPackages.stdenv.cc ]; - filesToInstall = ["build/${target-board}/release/bl31.bin"]; - } + # For Cortex-M0 firmware in RK3399 + nativeBuildInputs = [ pkgsCross.arm-embedded.stdenv.cc ]; + + buildInputs = [ openssl ]; + + makeFlags = [ + "HOSTCC=$(CC_FOR_BUILD)" + "M0_CROSS_COMPILE=${pkgsCross.arm-embedded.stdenv.cc.targetPrefix}" + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" + # binutils 2.39 regression + # `warning: /build/source/build/rk3399/release/bl31/bl31.elf has a LOAD segment with RWX permissions` + # See also: https://developer.trustedfirmware.org/T996 + "LDFLAGS=-no-warn-rwx-segments" + "PLAT=${platform}" + "bl31" + "${opteedflag}" + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp build/${target-board}/release/bl31.bin $out + + runHook postInstall + ''; + + hardeningDisable = [ "all" ]; + dontStrip = true; + + meta = with lib; { + homepage = "https://github.com/nxp-imx/imx-atf"; + description = + "Reference implementation of secure world software for ARMv8-A"; + license = [ licenses.bsd3 ]; + maintainers = with maintainers; [ gngram ]; + platforms = [ "aarch64-linux" ]; + }; +} diff --git a/nxp/imx8mp-evk/bsp/imx8mp-boot.nix b/nxp/imx8mp-evk/bsp/imx8mp-boot.nix index 25e72ccb..c078f9ca 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-boot.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-boot.nix @@ -10,7 +10,6 @@ with pkgs; let else ""; imx8mp-atf = pkgs.callPackage ./imx8mp-atf.nix { - inherit (pkgs) buildArmTrustedFirmware; inherit enable-tee; }; imx8mp-firmware = pkgs.callPackage ./imx8mp-firmware.nix {}; From e3a967ba29a3fdb55373231a70fe791cd19945ed Mon Sep 17 00:00:00 2001 From: Ganga Ram Date: Mon, 14 Apr 2025 13:39:52 +0400 Subject: [PATCH 1276/1476] Fixed build issues for imx8mq-evk Signed-off-by: Ganga Ram --- nxp/imx8mq-evk/bsp/imx8mq-atf.nix | 83 +++++++++++++++++++----------- nxp/imx8mq-evk/bsp/imx8mq-boot.nix | 1 - 2 files changed, 53 insertions(+), 31 deletions(-) diff --git a/nxp/imx8mq-evk/bsp/imx8mq-atf.nix b/nxp/imx8mq-evk/bsp/imx8mq-atf.nix index 0d5028d6..a7e86b86 100644 --- a/nxp/imx8mq-evk/bsp/imx8mq-atf.nix +++ b/nxp/imx8mq-evk/bsp/imx8mq-atf.nix @@ -1,34 +1,57 @@ -{ - lib, - pkgs, - buildArmTrustedFirmware, - fetchgit, - enable-tee, -}: -with pkgs; let - opteedflag = - if enable-tee - then "SPD=opteed" - else ""; +{ lib, fetchgit, enable-tee, stdenv, buildPackages, pkgsCross, openssl, }: +let + opteedflag = if enable-tee then "SPD=opteed" else ""; target-board = "imx8mq"; -in - buildArmTrustedFirmware rec { - pname = "imx8mq-atf"; - platform = target-board; - enableParallelBuilding = true; - extraMeta.platforms = ["aarch64-linux"]; +in stdenv.mkDerivation rec { + pname = "imx8mq-atf"; + version = "lf6.1.55_2.2.0"; + platform = target-board; + enableParallelBuilding = true; - src = fetchgit { - url = "https://github.com/nxp-imx/imx-atf.git"; - #lf6.1.55_2.2.0 - rev = "08e9d4eef2262c0dd072b4325e8919e06d349e02"; - sha256 = "sha256-96EddJXlFEkP/LIGVgNBvUP4IDI3BbDE/c9Yub22gnc="; - }; + src = fetchgit { + url = "https://github.com/nxp-imx/imx-atf.git"; + rev = "08e9d4eef2262c0dd072b4325e8919e06d349e02"; + sha256 = "sha256-96EddJXlFEkP/LIGVgNBvUP4IDI3BbDE/c9Yub22gnc="; + }; - extraMakeFlags = lib.concatLists [ - (lib.optional (lib.versionAtLeast pkgs.binutils.version "2.39") "LDFLAGS=--no-warn-rwx-segments") - ["PLAT=${platform}" "bl31" "${opteedflag}"] - ]; + depsBuildBuild = [ buildPackages.stdenv.cc ]; - filesToInstall = ["build/${target-board}/release/bl31.bin"]; - } + # For Cortex-M0 firmware in RK3399 + nativeBuildInputs = [ pkgsCross.arm-embedded.stdenv.cc ]; + + buildInputs = [ openssl ]; + + makeFlags = [ + "HOSTCC=$(CC_FOR_BUILD)" + "M0_CROSS_COMPILE=${pkgsCross.arm-embedded.stdenv.cc.targetPrefix}" + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" + # binutils 2.39 regression + # `warning: /build/source/build/rk3399/release/bl31/bl31.elf has a LOAD segment with RWX permissions` + # See also: https://developer.trustedfirmware.org/T996 + "LDFLAGS=-no-warn-rwx-segments" + "PLAT=${platform}" + "bl31" + "${opteedflag}" + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp build/${target-board}/release/bl31.bin $out + + runHook postInstall + ''; + + hardeningDisable = [ "all" ]; + dontStrip = true; + + meta = with lib; { + homepage = "https://github.com/nxp-imx/imx-atf"; + description = + "Reference implementation of secure world software for ARMv8-A"; + license = [ licenses.bsd3 ]; + maintainers = with maintainers; [ gngram ]; + platforms = [ "aarch64-linux" ]; + }; +} diff --git a/nxp/imx8mq-evk/bsp/imx8mq-boot.nix b/nxp/imx8mq-evk/bsp/imx8mq-boot.nix index 72fcfc0a..f0e53d49 100644 --- a/nxp/imx8mq-evk/bsp/imx8mq-boot.nix +++ b/nxp/imx8mq-evk/bsp/imx8mq-boot.nix @@ -9,7 +9,6 @@ with pkgs; let else ""; imx8mq-atf = pkgs.callPackage ./imx8mq-atf.nix { - inherit (pkgs) buildArmTrustedFirmware; inherit enable-tee; }; imx8mq-firmware = pkgs.callPackage ./imx8mq-firmware.nix {}; From 0012cffb692c640807d1f19b395502499cc9d80b Mon Sep 17 00:00:00 2001 From: Andre Date: Sun, 20 Apr 2025 12:08:18 -0400 Subject: [PATCH 1277/1476] microsoft/surface: update stable linux-surface to 6.14.2 --- microsoft/surface/common/default.nix | 12 +- .../surface/common/kernel/6.13/patches.nix | 157 ----------------- .../surface/common/kernel/6.14/patches.nix | 158 ++++++++++++++++++ 3 files changed, 164 insertions(+), 163 deletions(-) delete mode 100644 microsoft/surface/common/kernel/6.13/patches.nix create mode 100644 microsoft/surface/common/kernel/6.14/patches.nix diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index f40de69e..09fa344a 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -6,17 +6,17 @@ let # Set the version and hash for the kernel sources srcVersion = with config.microsoft-surface; if kernelVersion == "longterm" then - "6.12.19" + "6.12.22" else if kernelVersion == "stable" then - "6.13.6" + "6.14.2" else abort "Invalid kernel version: ${kernelVersion}"; srcHash = with config.microsoft-surface; if kernelVersion == "longterm" then - "sha256-1zvwV77ARDSxadG2FkGTb30Ml865I6KB8y413U3MZTE=" + "sha256-q0iACrSZhaeNIxiuisXyj9PhI+oXNX7yFJgQWlMzczY=" else if kernelVersion == "stable" then - "sha256-3gBTy0E9QI8g/R1XiCGZUbikQD5drBsdkDIJCTis0Zk=" + "sha256-xcaCo1TqMZATk1elfTSnnlw3IhrOgjqTjhARa1d6Lhs=" else abort "Invalid kernel version: ${kernelVersion}"; @@ -25,7 +25,7 @@ let if kernelVersion == "longterm" then "6.12.7" else if kernelVersion == "stable" then - "6.13.6" + "6.14.2" else abort "Invalid kernel version: ${kernelVersion}"; @@ -33,7 +33,7 @@ let if kernelVersion == "longterm" then "sha256-Pv7O8D8ma+MPLhYP3HSGQki+Yczp8b7d63qMb6l4+mY=" else if kernelVersion == "stable" then - "sha256-otD1ckNxNnvV8xipf9SZpbfg+bBq5EPwyieYtLIV4Ck=" + "sha256-Pzn+C52TtDcqDVepM5z2cVNCsnRDy0Wwn+FLwgsuicQ=" else abort "Invalid kernel version: ${kernelVersion}"; diff --git a/microsoft/surface/common/kernel/6.13/patches.nix b/microsoft/surface/common/kernel/6.13/patches.nix deleted file mode 100644 index d905499f..00000000 --- a/microsoft/surface/common/kernel/6.13/patches.nix +++ /dev/null @@ -1,157 +0,0 @@ -{ lib, - kernel ? lib.kernel, - patchSrc, - version, -}: - -[ - { - name = "microsoft-surface-patches-linux-${version}"; - patch = null; - extraStructuredConfig = with kernel; { - STAGING_MEDIA = yes; - -## -## Surface Aggregator Module -## -CONFIG_SURFACE_AGGREGATOR= module; -# CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION is not set -CONFIG_SURFACE_AGGREGATOR_BUS= yes; -CONFIG_SURFACE_AGGREGATOR_CDEV= module; -CONFIG_SURFACE_AGGREGATOR_HUB= module; -CONFIG_SURFACE_AGGREGATOR_REGISTRY= module; -CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH= module; - -CONFIG_SURFACE_ACPI_NOTIFY= module; -CONFIG_SURFACE_DTX= module; -CONFIG_SURFACE_PLATFORM_PROFILE= module; - -CONFIG_SURFACE_HID= module; -CONFIG_SURFACE_KBD= module; - -CONFIG_BATTERY_SURFACE= module; -CONFIG_CHARGER_SURFACE= module; - -CONFIG_SENSORS_SURFACE_TEMP= module; -CONFIG_SENSORS_SURFACE_FAN= module; - -## -## Surface Hotplug -## -CONFIG_SURFACE_HOTPLUG= module; - -## -## IPTS and ITHC touchscreen -## -## This only enables the user interface for IPTS/ITHC data. -## For the touchscreen to work, you need to install iptsd. -## -CONFIG_HID_IPTS= module; -CONFIG_HID_ITHC= module; - -## -## Cameras: IPU3 -## -CONFIG_VIDEO_DW9719= module; -CONFIG_VIDEO_IPU3_IMGU= module; -CONFIG_VIDEO_IPU3_CIO2= module; -CONFIG_IPU_BRIDGE= module; -CONFIG_INTEL_SKL_INT3472= module; -CONFIG_REGULATOR_TPS68470= module; -CONFIG_COMMON_CLK_TPS68470= module; -CONFIG_LEDS_TPS68470= module; - -## -## Cameras: Sensor drivers -## -CONFIG_VIDEO_OV5693= module; -CONFIG_VIDEO_OV7251= module; -CONFIG_VIDEO_OV8865= module; - -## -## Surface 3: atomisp causes problems (see issue #1095). Disable it for now. -## -# CONFIG_INTEL_ATOMISP is not set - -## -## ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 -## -CONFIG_APDS9960= module; - -## -## Build-in UFS support (required for some Surface Go devices) -## -CONFIG_SCSI_UFSHCD= module; -CONFIG_SCSI_UFSHCD_PCI= module; - -## -## Other Drivers -## -CONFIG_INPUT_SOC_BUTTON_ARRAY= module; -CONFIG_SURFACE_3_POWER_OPREGION= module; -CONFIG_SURFACE_PRO3_BUTTON= module; -CONFIG_SURFACE_GPE= module; -CONFIG_SURFACE_BOOK1_DGPU_SWITCH= module; - }; - } - { - name = "ms-surface/0001-secureboot"; - patch = patchSrc + "/0001-secureboot.patch"; - } - { - name = "ms-surface/0002-surface3"; - patch = patchSrc + "/0002-surface3.patch"; - } - { - name = "ms-surface/0003-mwifiex"; - patch = patchSrc + "/0003-mwifiex.patch"; - } - { - name = "ms-surface/0004-ath10k"; - patch = patchSrc + "/0004-ath10k.patch"; - } - { - name = "ms-surface/0005-ipts"; - patch = patchSrc + "/0005-ipts.patch"; - } - { - name = "ms-surface/0006-ithc"; - patch = patchSrc + "/0006-ithc.patch"; - } - { - name = "ms-surface/0007-surface-sam"; - patch = patchSrc + "/0007-surface-sam.patch"; - } - { - name = "ms-surface/0008-surface-sam-over-hid"; - patch = patchSrc + "/0008-surface-sam-over-hid.patch"; - } - { - name = "ms-surface/0009-surface-button"; - patch = patchSrc + "/0009-surface-button.patch"; - } - { - name = "ms-surface/0010-surface-typecover"; - patch = patchSrc + "/0010-surface-typecover.patch"; - } - { - name = "ms-surface/0011-surface-shutdown"; - patch = patchSrc + "/0011-surface-shutdown.patch"; - } - { - name = "ms-surface/0012-surface-gpe"; - patch = patchSrc + "/0012-surface-gpe.patch"; - } - { - name = "ms-surface/0013-cameras"; - patch = patchSrc + "/0013-cameras.patch"; - } - { - name = "ms-surface/0014-amd-gpio"; - patch = patchSrc + "/0014-amd-gpio.patch"; - } - { - name = "ms-surface/0015-rtc"; - patch = patchSrc + "/0015-rtc.patch"; - } -] diff --git a/microsoft/surface/common/kernel/6.14/patches.nix b/microsoft/surface/common/kernel/6.14/patches.nix new file mode 100644 index 00000000..a78be406 --- /dev/null +++ b/microsoft/surface/common/kernel/6.14/patches.nix @@ -0,0 +1,158 @@ +{ lib, + kernel ? lib.kernel, + patchSrc, + version, +}: + +[ + { + name = "microsoft-surface-patches-linux-${version}"; + patch = null; + extraStructuredConfig = with kernel; { + STAGING_MEDIA = yes; + ## + ## Surface Aggregator Module + ## + CONFIG_SURFACE_AGGREGATOR = module; + # CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION is not set + CONFIG_SURFACE_AGGREGATOR_BUS = yes; + CONFIG_SURFACE_AGGREGATOR_CDEV = module; + CONFIG_SURFACE_AGGREGATOR_HUB = module; + CONFIG_SURFACE_AGGREGATOR_REGISTRY = module; + CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH = module; + + CONFIG_SURFACE_ACPI_NOTIFY = module; + CONFIG_SURFACE_DTX = module; + CONFIG_SURFACE_PLATFORM_PROFILE = module; + + CONFIG_SURFACE_HID = module; + CONFIG_SURFACE_KBD = module; + + CONFIG_BATTERY_SURFACE = module; + CONFIG_CHARGER_SURFACE = module; + + CONFIG_SENSORS_SURFACE_TEMP = module; + CONFIG_SENSORS_SURFACE_FAN = module; + + CONFIG_RTC_DRV_SURFACE = module; + + ## + ## Surface Hotplug + ## + CONFIG_SURFACE_HOTPLUG = module; + + ## + ## IPTS and ITHC touchscreen + ## + ## This only enables the user interface for IPTS/ITHC data. + ## For the touchscreen to work, you need to install iptsd. + ## + CONFIG_HID_IPTS = module; + CONFIG_HID_ITHC = module; + + ## + ## Cameras: IPU3 + ## + CONFIG_VIDEO_DW9719 = module; + CONFIG_VIDEO_IPU3_IMGU = module; + CONFIG_VIDEO_IPU3_CIO2 = module; + CONFIG_IPU_BRIDGE = module; + CONFIG_INTEL_SKL_INT3472 = module; + CONFIG_REGULATOR_TPS68470 = module; + CONFIG_COMMON_CLK_TPS68470 = module; + CONFIG_LEDS_TPS68470 = module; + + ## + ## Cameras: Sensor drivers + ## + CONFIG_VIDEO_OV5693 = module; + CONFIG_VIDEO_OV7251 = module; + CONFIG_VIDEO_OV8865 = module; + + ## + ## Surface 3: atomisp causes problems (see issue #1095). Disable it for now. + ## + # CONFIG_INTEL_ATOMISP is not set + + ## + ## ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 + ## + CONFIG_APDS9960 = module; + + ## + ## Build-in UFS support (required for some Surface Go devices) + ## + CONFIG_SCSI_UFSHCD = module; + CONFIG_SCSI_UFSHCD_PCI = module; + + ## + ## Other Drivers + ## + CONFIG_INPUT_SOC_BUTTON_ARRAY = module; + CONFIG_SURFACE_3_POWER_OPREGION = module; + CONFIG_SURFACE_PRO3_BUTTON = module; + CONFIG_SURFACE_GPE = module; + CONFIG_SURFACE_BOOK1_DGPU_SWITCH = module; + }; + } + { + name = "ms-surface/0001-secureboot"; + patch = patchSrc + "/0001-secureboot.patch"; + } + { + name = "ms-surface/0002-surface3"; + patch = patchSrc + "/0002-surface3.patch"; + } + { + name = "ms-surface/0003-mwifiex"; + patch = patchSrc + "/0003-mwifiex.patch"; + } + { + name = "ms-surface/0004-ath10k"; + patch = patchSrc + "/0004-ath10k.patch"; + } + { + name = "ms-surface/0005-ipts"; + patch = patchSrc + "/0005-ipts.patch"; + } + { + name = "ms-surface/0006-ithc"; + patch = patchSrc + "/0006-ithc.patch"; + } + { + name = "ms-surface/0007-surface-sam"; + patch = patchSrc + "/0007-surface-sam.patch"; + } + { + name = "ms-surface/0008-surface-sam-over-hid"; + patch = patchSrc + "/0008-surface-sam-over-hid.patch"; + } + { + name = "ms-surface/0009-surface-button"; + patch = patchSrc + "/0009-surface-button.patch"; + } + { + name = "ms-surface/0010-surface-typecover"; + patch = patchSrc + "/0010-surface-typecover.patch"; + } + { + name = "ms-surface/0011-surface-shutdown"; + patch = patchSrc + "/0011-surface-shutdown.patch"; + } + { + name = "ms-surface/0012-surface-gpe"; + patch = patchSrc + "/0012-surface-gpe.patch"; + } + { + name = "ms-surface/0013-cameras"; + patch = patchSrc + "/0013-cameras.patch"; + } + { + name = "ms-surface/0014-amd-gpio"; + patch = patchSrc + "/0014-amd-gpio.patch"; + } + { + name = "ms-surface/0015-rtc"; + patch = patchSrc + "/0015-rtc.patch"; + } +] From 047799739c0c04c11075018a23b5ec55e4652b24 Mon Sep 17 00:00:00 2001 From: QuietSeeker <123584613+QuietSeeker@users.noreply.github.com> Date: Fri, 11 Apr 2025 17:00:57 +0100 Subject: [PATCH 1278/1476] lenovo-legion-16arh7h: add integrated GPU only and hybrid configurations --- README.md | 2 ++ flake.nix | 2 ++ lenovo/legion/16arh7h/README.md | 4 +++ lenovo/legion/16arh7h/hybrid/default.nix | 32 +++++++++++++++++++++ lenovo/legion/16arh7h/igpu-only/default.nix | 11 +++++++ 5 files changed, 51 insertions(+) create mode 100644 lenovo/legion/16arh7h/README.md create mode 100644 lenovo/legion/16arh7h/hybrid/default.nix create mode 100644 lenovo/legion/16arh7h/igpu-only/default.nix diff --git a/README.md b/README.md index 29e22f7a..8b7849a2 100644 --- a/README.md +++ b/README.md @@ -221,6 +221,8 @@ See code for all available configurations. | [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | | [Lenovo Legion 5 Pro 16ach6h (Hybrid)](lenovo/legion/16ach6h/hybrid) | `` | | [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia) | `` | +| [Lenovo Legion 5 Pro 16arh7h (IGPU Only)](lenovo/legion/16arh7h/igpu-only) | `` | +| [Lenovo Legion 5 Pro 16arh7h (Hybrid)](lenovo/legion/16arh7h/hybrid) | `` | | [Lenovo Legion 7 16achg6 (Hybrid)](lenovo/legion/16achg6/hybrid) | `` | | [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `` | | [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | diff --git a/flake.nix b/flake.nix index 629d8f71..4587806c 100644 --- a/flake.nix +++ b/flake.nix @@ -161,6 +161,8 @@ lenovo-legion-16ach6h = import ./lenovo/legion/16ach6h; lenovo-legion-16ach6h-hybrid = import ./lenovo/legion/16ach6h/hybrid; lenovo-legion-16ach6h-nvidia = import ./lenovo/legion/16ach6h/nvidia; + lenovo-legion-16arh7h-igpu-only = import ./lenovo/legion/16arh7h/igpu-only; + lenovo-legion-16arh7h-hybrid = import ./lenovo/legion/16arh7h/hybrid; lenovo-legion-16achg6-hybrid = import ./lenovo/legion/16achg6/hybrid; lenovo-legion-16achg6-nvidia = import ./lenovo/legion/16achg6/nvidia; lenovo-legion-16aph8 = import ./lenovo/legion/16aph8; diff --git a/lenovo/legion/16arh7h/README.md b/lenovo/legion/16arh7h/README.md new file mode 100644 index 00000000..0258d495 --- /dev/null +++ b/lenovo/legion/16arh7h/README.md @@ -0,0 +1,4 @@ +# Useful Links + +[NixOS Wiki - Nvidia](https://wiki.nixos.org/wiki/NVIDIA) + diff --git a/lenovo/legion/16arh7h/hybrid/default.nix b/lenovo/legion/16arh7h/hybrid/default.nix new file mode 100644 index 00000000..af6ff64a --- /dev/null +++ b/lenovo/legion/16arh7h/hybrid/default.nix @@ -0,0 +1,32 @@ +{ + config, + lib, + ... +}: { + imports = [ + ../../../../common/cpu/amd + ../../../../common/cpu/amd/pstate.nix + ../../../../common/gpu/nvidia/prime.nix # prime offload + ../../../../common/gpu/nvidia/ampere # use open drivers + ../../../../common/pc/laptop + ../../../../common/pc/laptop/ssd + ]; + + boot.kernelModules = ["amdgpu"]; + services.xserver.videoDrivers = ["nvidia"]; + + hardware = { + amdgpu.initrd.enable = false; + + nvidia = { + package = config.boot.kernelPackages.nvidiaPackages.latest; + modesetting.enable = lib.mkDefault true; + powerManagement.enable = lib.mkDefault true; + powerManagement.finegrained = lib.mkDefault true; + prime = { + amdgpuBusId = lib.mkDefault "PCI:52:0:0"; # Hexadecimal 34:00.0 + nvidiaBusId = lib.mkDefault "PCI:1:0:0"; # Hexadecimal 01:00.0 + }; + }; + }; +} diff --git a/lenovo/legion/16arh7h/igpu-only/default.nix b/lenovo/legion/16arh7h/igpu-only/default.nix new file mode 100644 index 00000000..c8e477f2 --- /dev/null +++ b/lenovo/legion/16arh7h/igpu-only/default.nix @@ -0,0 +1,11 @@ +# This will enable only the integrated AMD GPU, while disabling the dedicated Nvidia GPU +{...}: { + imports = [ + ../../../../common/cpu/amd + ../../../../common/cpu/amd/pstate.nix + ../../../../common/gpu/amd + ../../../../common/gpu/nvidia/disable.nix + ../../../../common/pc/laptop + ../../../../common/pc/laptop/ssd + ]; +} From 34f02c326d7458750b5ac30fae4b794cc0610ab4 Mon Sep 17 00:00:00 2001 From: Andre <10094408+8bitbuddhist@users.noreply.github.com> Date: Wed, 23 Apr 2025 09:49:58 -0400 Subject: [PATCH 1279/1476] Apply suggestions from code review - option name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add `hardware` to option name Co-authored-by: Jörg Thalheim --- microsoft/surface/README.md | 2 +- microsoft/surface/common/default.nix | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/microsoft/surface/README.md b/microsoft/surface/README.md index cc5dbde5..7fc5675c 100644 --- a/microsoft/surface/README.md +++ b/microsoft/surface/README.md @@ -42,7 +42,7 @@ There are multiple versions of the Surface kernel available: This repo uses `longterm` by default, but you can switch it to `stable` by adding this to your configuration file: ```nix -microsoft-surface.kernelVersion = "stable"; +hardware.microsoft-surface.kernelVersion = "stable"; ``` ### Support Tools diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 09fa344a..361b802d 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -4,7 +4,7 @@ let inherit (lib) mkDefault mkOption types versions; # Set the version and hash for the kernel sources - srcVersion = with config.microsoft-surface; + srcVersion = with config.hardware.microsoft-surface; if kernelVersion == "longterm" then "6.12.22" else if kernelVersion == "stable" then @@ -12,7 +12,7 @@ let else abort "Invalid kernel version: ${kernelVersion}"; - srcHash = with config.microsoft-surface; + srcHash = with config.hardware.microsoft-surface; if kernelVersion == "longterm" then "sha256-q0iACrSZhaeNIxiuisXyj9PhI+oXNX7yFJgQWlMzczY=" else if kernelVersion == "stable" then @@ -21,7 +21,7 @@ let abort "Invalid kernel version: ${kernelVersion}"; # Set the version and hash for the linux-surface releases - pkgVersion = with config.microsoft-surface; + pkgVersion = with config.hardware.microsoft-surface; if kernelVersion == "longterm" then "6.12.7" else if kernelVersion == "stable" then @@ -29,7 +29,7 @@ let else abort "Invalid kernel version: ${kernelVersion}"; - pkgHash = with config.microsoft-surface; + pkgHash = with config.hardware.microsoft-surface; if kernelVersion == "longterm" then "sha256-Pv7O8D8ma+MPLhYP3HSGQki+Yczp8b7d63qMb6l4+mY=" else if kernelVersion == "stable" then @@ -60,7 +60,7 @@ let }; in { - options.microsoft-surface.kernelVersion = mkOption { + options.hardware.microsoft-surface.kernelVersion = mkOption { description = "Kernel Version to use (patched for MS Surface)"; type = types.enum [ "longterm" From 306ff6c5f6b5554ef5e99af7cc336518d51538d3 Mon Sep 17 00:00:00 2001 From: Andre Date: Wed, 23 Apr 2025 13:44:36 -0400 Subject: [PATCH 1280/1476] surface: revert longterm kernel to 6.12.19 --- microsoft/surface/common/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 361b802d..5d9d7d98 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -6,7 +6,7 @@ let # Set the version and hash for the kernel sources srcVersion = with config.hardware.microsoft-surface; if kernelVersion == "longterm" then - "6.12.22" + "6.12.19" else if kernelVersion == "stable" then "6.14.2" else @@ -14,7 +14,7 @@ let srcHash = with config.hardware.microsoft-surface; if kernelVersion == "longterm" then - "sha256-q0iACrSZhaeNIxiuisXyj9PhI+oXNX7yFJgQWlMzczY=" + "sha256-1zvwV77ARDSxadG2FkGTb30Ml865I6KB8y413U3MZTE=" else if kernelVersion == "stable" then "sha256-xcaCo1TqMZATk1elfTSnnlw3IhrOgjqTjhARa1d6Lhs=" else From 3fd285f3860727e5af8d8859db914392cfdab5ef Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Sat, 12 Apr 2025 08:24:21 +0200 Subject: [PATCH 1281/1476] lenovo-thinkpad-x13s: Add support for aarch64 system --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/x13s/README.md | 10 +++ lenovo/thinkpad/x13s/default.nix | 101 +++++++++++++++++++++++++++++++ 4 files changed, 113 insertions(+) create mode 100644 lenovo/thinkpad/x13s/README.md create mode 100644 lenovo/thinkpad/x13s/default.nix diff --git a/README.md b/README.md index 29e22f7a..273ca628 100644 --- a/README.md +++ b/README.md @@ -294,6 +294,7 @@ See code for all available configurations. | [Lenovo ThinkPad X1 Extreme Gen 3](lenovo/thinkpad/x1-extreme/gen3) | `` | | [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | | [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | +| [Lenovo ThinkPad X13s](lenovo/thinkpad/x13s) | `` | | [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | | [Lenovo ThinkPad X13 Yoga (3th Gen)](lenovo/thinkpad/x13/yoga/3th-gen) | `` | | [Lenovo ThinkPad X13 (Intel)](lenovo/thinkpad/x13/intel) | `` | diff --git a/flake.nix b/flake.nix index 629d8f71..848265ca 100644 --- a/flake.nix +++ b/flake.nix @@ -244,6 +244,7 @@ lenovo-thinkpad-x13-amd = import ./lenovo/thinkpad/x13/amd; lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13/yoga; lenovo-thinkpad-x13-yoga-3th-gen = import ./lenovo/thinkpad/x13/yoga/3th-gen; + lenovo-thinkpad-x13s = import ./lenovo/thinkpad/x13s; lenovo-thinkpad-x140e = import ./lenovo/thinkpad/x140e; lenovo-thinkpad-x200s = import ./lenovo/thinkpad/x200s; lenovo-thinkpad-x220 = import ./lenovo/thinkpad/x220; diff --git a/lenovo/thinkpad/x13s/README.md b/lenovo/thinkpad/x13s/README.md new file mode 100644 index 00000000..f4608185 --- /dev/null +++ b/lenovo/thinkpad/x13s/README.md @@ -0,0 +1,10 @@ +# Lenovo X13s + +[Debian](https://wiki.debian.org/InstallingDebianOn/Thinkpad/X13s) +[PostmarketOS](https://wiki.postmarketos.org/wiki/Lenovo_ThinkPad_X13s_(lenovo-21bx)) + +## Camera +The MIPI camera does work, however, it's not accelerated by the ISP and therefore image processing is done on CPU. + +## Wifi and Bluetooth MAC addresses +Currently they need to be set manually diff --git a/lenovo/thinkpad/x13s/default.nix b/lenovo/thinkpad/x13s/default.nix new file mode 100644 index 00000000..161d3891 --- /dev/null +++ b/lenovo/thinkpad/x13s/default.nix @@ -0,0 +1,101 @@ +{ lib, pkgs, ... }: + +let + dtbName = "sc8280xp-lenovo-thinkpad-x13s.dtb"; + dtb = "${pkgs.linux}/dtbs/qcom/${dtbName}"; + # Version the dtb based on the kernel + dtbEfiPath = "dtbs/x13s-${pkgs.linux.version}.dtb"; + cfg = { + wifiMac = "e4:65:38:52:22:a9"; + bluetoothMac = "E4:25:18:22:44:AA"; + }; + inherit (lib) mkDefault; +in +{ + imports = [ + ../. + ../../../common/pc/laptop + ]; + + boot = { + loader.systemd-boot.extraFiles = { + "${dtbEfiPath}" = dtb; + }; + + kernelParams = mkDefault [ + # needed to boot + "dtb=${dtbEfiPath}" + + # jhovold recommended + "clk_ignore_unused" + "pd_ignore_unused" + "arm64.nopauth" + ]; + + kernelModules = mkDefault [ + "nvme" + "phy-qcom-qmp-pcie" + "pcie-qcom" + + "i2c-core" + "i2c-hid" + "i2c-hid-of" + "i2c-qcom-geni" + + "leds_qcom_lpg" + "pwm_bl" + "qrtr" + "pmic_glink_altmode" + "gpio_sbu_mux" + "phy-qcom-qmp-combo" + "gpucc_sc8280xp" + "dispcc_sc8280xp" + "phy_qcom_edp" + "panel-edp" + "msm" + ]; + }; + + hardware.enableRedistributableFirmware = mkDefault true; + + systemd.services.bluetooth-x13s-mac = lib.mkIf (cfg.bluetoothMac != null) { + wantedBy = [ "multi-user.target" ]; + before = [ "bluetooth.service" ]; + requiredBy = [ "bluetooth.service" ]; + + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + ExecStart = "${pkgs.util-linux}/bin/script -q -c '${pkgs.bluez}/bin/btmgmt --index 0 public-addr ${cfg.bluetoothMac}'"; + }; + }; + + # https://github.com/jhovold/linux/wiki/X13s#modem + networking.networkmanager.fccUnlockScripts = [ + + { + id = "105b:e0c3"; + path = "${pkgs.modemmanager}/share/ModemManager/fcc-unlock.available.d/105b"; + } + ]; + + # https://github.com/jhovold/linux/wiki/X13s#camera + services.udev.extraRules = lib.strings.concatLines ( + [ + '' + ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="linux,cma", GROUP="video", MODE="0660" + ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="system", GROUP="video", MODE="0660" + '' + ] + ++ ( + if cfg.wifiMac != null then + [ + '' + ACTION=="add", SUBSYSTEM=="net", KERNELS=="0006:01:00.0", RUN+="${pkgs.iproute2}/bin/ip link set dev $name address ${cfg.wifiMac}" + '' + ] + else + [ ] + ) + ); +} From d07bb614490b4e55765b5c963ac88375fb53d0da Mon Sep 17 00:00:00 2001 From: VuiMuich Date: Sat, 26 Apr 2025 15:21:12 +0200 Subject: [PATCH 1282/1476] lenovo-thinkpad-x1-2nd-gen --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/x1/2nd-gen/default.nix | 10 ++++++++++ 3 files changed, 12 insertions(+) create mode 100644 lenovo/thinkpad/x1/2nd-gen/default.nix diff --git a/README.md b/README.md index b68ee6b7..77942129 100644 --- a/README.md +++ b/README.md @@ -286,6 +286,7 @@ See code for all available configurations. | [Lenovo ThinkPad W520](lenovo/thinkpad/w520) | `` | | [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | | [Lenovo ThinkPad X1 Yoga Gen 7](lenovo/thinkpad/x1/yoga/7th-gen/) | `` | +| [Lenovo ThinkPad X1 (2nd Gen)](lenovo/thinkpad/x1/2nd-gen) | `` | | [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | | [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | | [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | diff --git a/flake.nix b/flake.nix index 68cc77a7..fc673574 100644 --- a/flake.nix +++ b/flake.nix @@ -230,6 +230,7 @@ lenovo-thinkpad-x1 = import ./lenovo/thinkpad/x1; lenovo-thinkpad-x1-yoga = import ./lenovo/thinkpad/x1/yoga; lenovo-thinkpad-x1-yoga-7th-gen = import ./lenovo/thinkpad/x1/yoga/7th-gen; + lenovo-thinkpad-x1-2nd-gen = import ./lenovo/thinkpad/x1/2nd-gen; lenovo-thinkpad-x1-6th-gen = import ./lenovo/thinkpad/x1/6th-gen; lenovo-thinkpad-x1-7th-gen = import ./lenovo/thinkpad/x1/7th-gen; lenovo-thinkpad-x1-9th-gen = import ./lenovo/thinkpad/x1/9th-gen; diff --git a/lenovo/thinkpad/x1/2nd-gen/default.nix b/lenovo/thinkpad/x1/2nd-gen/default.nix new file mode 100644 index 00000000..ac338c61 --- /dev/null +++ b/lenovo/thinkpad/x1/2nd-gen/default.nix @@ -0,0 +1,10 @@ +{ lib, ... }: +{ + imports = [ + ../. + ../../../../common/cpu/intel/haswell + ../../../../common/pc/laptop/ssd + ]; + + services.throttled.enable = lib.mkDefault true; +} From f16e0cd51c8bb6df7bfc5b7bbec3b36ed59020ae Mon Sep 17 00:00:00 2001 From: Johannes Arnold Date: Sat, 19 Apr 2025 12:15:00 +0200 Subject: [PATCH 1283/1476] Add yt6801 driver for TUXEDO InfinityBook Pro 14 - Gen9 - INTEL --- flake.nix | 2 +- tuxedo/infinitybook/gen9-intel/default.nix | 11 +++++++++++ tuxedo/infinitybook/pro14/gen9-intel/default.nix | 6 ------ .../infinitybook/pro14/{gen9-intel => gen9}/README.md | 0 tuxedo/infinitybook/pro14/gen9/default.nix | 9 +++++++++ tuxedo/infinitybook/pro14/gen9/intel/default.nix | 6 ++++++ 6 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 tuxedo/infinitybook/gen9-intel/default.nix delete mode 100644 tuxedo/infinitybook/pro14/gen9-intel/default.nix rename tuxedo/infinitybook/pro14/{gen9-intel => gen9}/README.md (100%) create mode 100644 tuxedo/infinitybook/pro14/gen9/default.nix create mode 100644 tuxedo/infinitybook/pro14/gen9/intel/default.nix diff --git a/flake.nix b/flake.nix index fc673574..fc84741f 100644 --- a/flake.nix +++ b/flake.nix @@ -334,7 +334,7 @@ tuxedo-aura-15-gen1 = import ./tuxedo/aura/15/gen1; tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7; - tuxedo-infinitybook-pro14-gen9-intel = import ./tuxedo/infinitybook/pro14/gen9-intel; + tuxedo-infinitybook-pro14-gen9-intel = import ./tuxedo/infinitybook/pro14/gen9/intel; tuxedo-pulse-14-gen3 = import ./tuxedo/pulse/14/gen3; tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; xiaomi-redmibook-16-pro-2024 = import ./xiaomi/redmibook/16-pro-2024; diff --git a/tuxedo/infinitybook/gen9-intel/default.nix b/tuxedo/infinitybook/gen9-intel/default.nix new file mode 100644 index 00000000..3f0b97a2 --- /dev/null +++ b/tuxedo/infinitybook/gen9-intel/default.nix @@ -0,0 +1,11 @@ +{ + warnings = [ + '' + DEPRECATED: The module has been renamed to + + The gen9-intel module will be removed in a future release. + '' + ]; + + imports = [ ../pro14/gen9/intel ]; +} diff --git a/tuxedo/infinitybook/pro14/gen9-intel/default.nix b/tuxedo/infinitybook/pro14/gen9-intel/default.nix deleted file mode 100644 index 4b6ee893..00000000 --- a/tuxedo/infinitybook/pro14/gen9-intel/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ../../. - ../../../../common/cpu/intel - ]; -} diff --git a/tuxedo/infinitybook/pro14/gen9-intel/README.md b/tuxedo/infinitybook/pro14/gen9/README.md similarity index 100% rename from tuxedo/infinitybook/pro14/gen9-intel/README.md rename to tuxedo/infinitybook/pro14/gen9/README.md diff --git a/tuxedo/infinitybook/pro14/gen9/default.nix b/tuxedo/infinitybook/pro14/gen9/default.nix new file mode 100644 index 00000000..7662c658 --- /dev/null +++ b/tuxedo/infinitybook/pro14/gen9/default.nix @@ -0,0 +1,9 @@ +{ lib, config, ... }: { + imports = [ + ../../. + ]; + + # Add Motorcomm YT6801 Driver if available + boot.extraModulePackages = with config.boot; lib.lists.optional + ( kernelPackages ? yt6801 ) kernelPackages.yt6801; +} diff --git a/tuxedo/infinitybook/pro14/gen9/intel/default.nix b/tuxedo/infinitybook/pro14/gen9/intel/default.nix new file mode 100644 index 00000000..80d5c29c --- /dev/null +++ b/tuxedo/infinitybook/pro14/gen9/intel/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../. + ../../../../../common/cpu/intel + ]; +} From c56ef7b7228987345916b74ac9ddb3886c8a0c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 29 Apr 2025 07:52:25 +0200 Subject: [PATCH 1284/1476] dell-precision-5530: remove unnecessary default nvidia options In the nvidia module, we already disable the open source driver and we default to the stable nvidia package --- dell/precision/5530/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dell/precision/5530/default.nix b/dell/precision/5530/default.nix index 6f270c26..84ac324b 100644 --- a/dell/precision/5530/default.nix +++ b/dell/precision/5530/default.nix @@ -1,4 +1,4 @@ -{ lib, config, ... }: +{ lib, ... }: { imports = [ @@ -29,19 +29,17 @@ hardware = { nvidia = { - open = lib.mkDefault false; nvidiaSettings = lib.mkDefault true; modesetting.enable = lib.mkDefault true; - package = lib.mkDefault config.boot.kernelPackages.nvidiaPackages.stable; prime = { intelBusId = lib.mkDefault "PCI:0:2:0"; nvidiaBusId = lib.mkDefault "PCI:1:0:0"; }; }; }; - # This will save you money and possibly your life! services = { fwupd.enable = lib.mkDefault true; + # This will save you money and possibly your life! thermald.enable = lib.mkDefault true; }; } From 342b1b319d04d4afe775752523feb643e23f4397 Mon Sep 17 00:00:00 2001 From: Relief Melone Date: Sun, 3 Nov 2024 23:36:46 +0100 Subject: [PATCH 1285/1476] gu605my: modsettings, fn keys and use laptop/ssd --- asus/zephyrus/gu605my/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/asus/zephyrus/gu605my/default.nix b/asus/zephyrus/gu605my/default.nix index f9f1d9ac..003dbf13 100644 --- a/asus/zephyrus/gu605my/default.nix +++ b/asus/zephyrus/gu605my/default.nix @@ -6,7 +6,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/ada-lovelace ../../../common/pc/laptop - ../../../common/pc/ssd + ../../../common/pc/laptop/ssd ]; hardware.nvidia = { @@ -15,6 +15,7 @@ nvidiaBusId = "PCI:1:0:0"; }; + modesetting.enable = lib.mkDefault true; dynamicBoost.enable = lib.mkDefault true; }; @@ -23,7 +24,9 @@ udev.extraHwdb = '' evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* - KEYBOARD_KEY_ff31007c=f20 # fixes mic mute button + KEYBOARD_KEY_ff31007c=f20 # fixes mic mute button + KEYBOARD_KEY_ff3100b2=home # Set fn+LeftArrow as Home + KEYBOARD_KEY_ff3100b3=end # Set fn+RightArrow as End ''; }; } From f1e52a018166e1a324f832de913e12c0e55792d0 Mon Sep 17 00:00:00 2001 From: Relief Melone Date: Tue, 7 Jan 2025 17:21:49 +0100 Subject: [PATCH 1286/1476] gu605my: enable zeph g16 backlight control --- asus/zephyrus/gu605my/default.nix | 1 + asus/zephyrus/shared/backlight.nix | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 asus/zephyrus/shared/backlight.nix diff --git a/asus/zephyrus/gu605my/default.nix b/asus/zephyrus/gu605my/default.nix index 003dbf13..d1ce68bb 100644 --- a/asus/zephyrus/gu605my/default.nix +++ b/asus/zephyrus/gu605my/default.nix @@ -7,6 +7,7 @@ ../../../common/gpu/nvidia/ada-lovelace ../../../common/pc/laptop ../../../common/pc/laptop/ssd + ../shared/backlight.nix ]; hardware.nvidia = { diff --git a/asus/zephyrus/shared/backlight.nix b/asus/zephyrus/shared/backlight.nix new file mode 100644 index 00000000..938ce4ac --- /dev/null +++ b/asus/zephyrus/shared/backlight.nix @@ -0,0 +1,9 @@ +{ ... }: +{ + # These flags are used to enable backlight control when the dGPU is working in hybrid mode + boot.kernelParams = [ + "i915.enable_dpcd_backlight=1" + "nvidia.NVreg_EnableBacklightHandler=0" + "nvidia.NVReg_RegistryDwords=EnableBrightnessControl=0" + ]; +} From 6267b43af934ed22b2402b065ceeec3f9a276312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Zavala=20Villag=C3=B3mez?= Date: Mon, 28 Apr 2025 02:34:19 -0400 Subject: [PATCH 1287/1476] hp/elitebook/830/g6: check kernel version through `config` instead of `pkgs` The previous implementation was checking the kernel version through `pkgs.linux`, which is only representative of the final system if `boot.kernelPackages` is left as the default value of `pkgs.linuxPackages`. You can of course change this to other package sets, such as `pkgs.linuxPackages_latest`. Instead, we now reference the kernel through `config.boot.kernelPackages.kernel`. --- hp/elitebook/830/g6/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hp/elitebook/830/g6/default.nix b/hp/elitebook/830/g6/default.nix index 3b209b46..9e62264f 100644 --- a/hp/elitebook/830/g6/default.nix +++ b/hp/elitebook/830/g6/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ config, lib, ... }: { imports = [ ../../../../common/cpu/intel @@ -16,7 +16,7 @@ services.fwupd.enable = lib.mkDefault true; # Enables ACPI platform profiles - boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1") { kernelModules = [ "hp-wmi" ]; }; From 6e80224000e1ee4a883cb0f26e3ac7510aaefe90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Zavala=20Villag=C3=B3mez?= Date: Mon, 28 Apr 2025 02:37:02 -0400 Subject: [PATCH 1288/1476] lenovo/thinkpad/p14s: check kernel version through `config` instead of `pkgs` The previous implementation was checking the kernel version through `pkgs.linux`, which is only representative of the final system if `boot.kernelPackages` is left as the default value of `pkgs.linuxPackages`. You can of course change this to other package sets, such as `pkgs.linuxPackages_latest`. Instead, we now reference the kernel through `config.boot.kernelPackages.kernel`. --- lenovo/thinkpad/p14s/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lenovo/thinkpad/p14s/default.nix b/lenovo/thinkpad/p14s/default.nix index edaeda86..6e87b7bc 100644 --- a/lenovo/thinkpad/p14s/default.nix +++ b/lenovo/thinkpad/p14s/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ config, lib, pkgs, ... }: { # P14s is a rebadged T14 with slight internal differences. @@ -14,7 +14,7 @@ # "vendor" setting, in this case the thinkpad_acpi driver. # See https://hansdegoede.livejournal.com/27130.html # See https://lore.kernel.org/linux-acpi/20221105145258.12700-1-hdegoede@redhat.com/ - boot.kernelParams = lib.mkIf (lib.versionOlder pkgs.linux.version "6.2") [ "acpi_backlight=native" ]; + boot.kernelParams = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.2") [ "acpi_backlight=native" ]; # see https://github.com/NixOS/nixpkgs/issues/69289 boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest; From 01f1548e40f6f629d370bc43b4623b52b30fef85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Zavala=20Villag=C3=B3mez?= Date: Mon, 28 Apr 2025 02:40:37 -0400 Subject: [PATCH 1289/1476] lenovo/thinkpad/x13s: source kernel through `config` instead of `pkgs` The previous implementation was sourcing the kernel through `pkgs.linux`, which is only representative of the final system if `boot.kernelPackages` is left as the default value of `pkgs.linuxPackages`. You can of course change this to other package sets, such as `pkgs.linuxPackages_latest`. Instead, we now reference the kernel through `config.boot.kernelPackages.kernel`. --- lenovo/thinkpad/x13s/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lenovo/thinkpad/x13s/default.nix b/lenovo/thinkpad/x13s/default.nix index 161d3891..dd9159dc 100644 --- a/lenovo/thinkpad/x13s/default.nix +++ b/lenovo/thinkpad/x13s/default.nix @@ -1,10 +1,12 @@ -{ lib, pkgs, ... }: +{ config, lib, pkgs, ... }: let + inherit (config.boot.kernelPackages) kernel; + dtbName = "sc8280xp-lenovo-thinkpad-x13s.dtb"; - dtb = "${pkgs.linux}/dtbs/qcom/${dtbName}"; + dtb = "${kernel}/dtbs/qcom/${dtbName}"; # Version the dtb based on the kernel - dtbEfiPath = "dtbs/x13s-${pkgs.linux.version}.dtb"; + dtbEfiPath = "dtbs/x13s-${kernel.version}.dtb"; cfg = { wifiMac = "e4:65:38:52:22:a9"; bluetoothMac = "E4:25:18:22:44:AA"; From 232c204afb36fa16a928e8c0a289f8cf8313be72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Zavala=20Villag=C3=B3mez?= Date: Mon, 28 Apr 2025 02:16:15 -0400 Subject: [PATCH 1290/1476] omen/*: check kernel version through `config` instead of `pkgs` The previous implementation was checking the kernel version through `pkgs.linux`, which is only representative of the final system if `boot.kernelPackages` is left as the default value of `pkgs.linuxPackages`. You can of course change this to other package sets, such as `pkgs.linuxPackages_latest`. Instead, we now reference the kernel through `config.boot.kernelPackages.kernel`. --- omen/14-fb0798ng/default.nix | 4 ++-- omen/15-en0010ca/default.nix | 4 ++-- omen/15-en1007sa/default.nix | 4 ++-- omen/16-n0005ne/default.nix | 4 ++-- omen/16-n0280nd/default.nix | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/omen/14-fb0798ng/default.nix b/omen/14-fb0798ng/default.nix index b1382455..f5cc17d7 100644 --- a/omen/14-fb0798ng/default.nix +++ b/omen/14-fb0798ng/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ config, lib, ... }: { imports = [ @@ -10,7 +10,7 @@ ]; # Enables ACPI platform profiles - boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1") { kernelModules = [ "hp-wmi" ]; }; diff --git a/omen/15-en0010ca/default.nix b/omen/15-en0010ca/default.nix index da3c85e8..c99e8066 100644 --- a/omen/15-en0010ca/default.nix +++ b/omen/15-en0010ca/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ config, lib, ... }: { imports = [ @@ -12,7 +12,7 @@ ]; # Enables ACPI platform profiles - boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1") { kernelModules = [ "hp-wmi" ]; }; diff --git a/omen/15-en1007sa/default.nix b/omen/15-en1007sa/default.nix index 704e4d8b..cdb09a82 100644 --- a/omen/15-en1007sa/default.nix +++ b/omen/15-en1007sa/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ config, lib, ... }: { imports = [ @@ -11,7 +11,7 @@ ]; # Enables ACPI platform profiles - boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1") { kernelModules = [ "hp-wmi" ]; }; diff --git a/omen/16-n0005ne/default.nix b/omen/16-n0005ne/default.nix index e8bfea83..c8d5636c 100644 --- a/omen/16-n0005ne/default.nix +++ b/omen/16-n0005ne/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ config, lib, ... }: { imports = [ @@ -10,7 +10,7 @@ ]; # Enables ACPI platform profiles - boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1") { kernelModules = [ "hp-wmi" ]; }; } diff --git a/omen/16-n0280nd/default.nix b/omen/16-n0280nd/default.nix index 704e4d8b..cdb09a82 100644 --- a/omen/16-n0280nd/default.nix +++ b/omen/16-n0280nd/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ config, lib, ... }: { imports = [ @@ -11,7 +11,7 @@ ]; # Enables ACPI platform profiles - boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1") { kernelModules = [ "hp-wmi" ]; }; From c06d50adebc684d5659fe8426ac29fb85f3bde3c Mon Sep 17 00:00:00 2001 From: Connor Prussin Date: Fri, 25 Apr 2025 07:01:53 -0700 Subject: [PATCH 1291/1476] Add Framework AMD AI 300 Series --- README.md | 1 + flake.nix | 1 + framework/13-inch/amd-ai-300-series/README.md | 15 +++++++++++++++ framework/13-inch/amd-ai-300-series/default.nix | 9 +++++++++ 4 files changed, 26 insertions(+) create mode 100644 framework/13-inch/amd-ai-300-series/README.md create mode 100644 framework/13-inch/amd-ai-300-series/default.nix diff --git a/README.md b/README.md index 77942129..098b39cb 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,7 @@ See code for all available configurations. | [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `` | | [Framework Intel Core Ultra Series 1](framework/13-inch/intel-core-ultra-series1) | `` | | [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | +| [Framework 13 AMD AI 300 Series](framework/13-inch/amd-ai-300-series) | `` | | [Framework 16 AMD Ryzen 7040 Series](framework/16-inch/7040-amd) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | diff --git a/flake.nix b/flake.nix index fc84741f..2af97858 100644 --- a/flake.nix +++ b/flake.nix @@ -122,6 +122,7 @@ framework-13th-gen-intel = import ./framework/13-inch/13th-gen-intel; framework-intel-core-ultra-series1 = import ./framework/13-inch/intel-core-ultra-series1; framework-13-7040-amd = import ./framework/13-inch/7040-amd; + framework-amd-ai-300-series = import ./framework/13-inch/amd-ai-300-series; framework-16-7040-amd = import ./framework/16-inch/7040-amd; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; diff --git a/framework/13-inch/amd-ai-300-series/README.md b/framework/13-inch/amd-ai-300-series/README.md new file mode 100644 index 00000000..8f3b7a42 --- /dev/null +++ b/framework/13-inch/amd-ai-300-series/README.md @@ -0,0 +1,15 @@ +# [Framework Laptop 13](https://frame.work/) + +## Updating Firmware + +First put enable `fwupd` + +```nix +services.fwupd.enable = true; +``` + +Then run + +```sh + $ fwupdmgr update +``` diff --git a/framework/13-inch/amd-ai-300-series/default.nix b/framework/13-inch/amd-ai-300-series/default.nix new file mode 100644 index 00000000..33c5ec67 --- /dev/null +++ b/framework/13-inch/amd-ai-300-series/default.nix @@ -0,0 +1,9 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../common + ../common/amd.nix + ]; + config.hardware.framework.laptop13.audioEnhancement.rawDeviceName = lib.mkDefault "alsa_output.pci-0000_c1_00.6.analog-stereo"; +} From 72081c9fbbef63765ae82bff9727ea79cc86bd5b Mon Sep 17 00:00:00 2001 From: Benedikt Rips Date: Fri, 25 Apr 2025 00:44:36 +0200 Subject: [PATCH 1292/1476] dell-precision-3490: init module --- README.md | 1 + common/cpu/intel/meteor-lake/default.nix | 6 ++++++ common/gpu/intel/meteor-lake/default.nix | 5 +++++ dell/precision/3490/default.nix | 21 +++++++++++++++++++++ flake.nix | 1 + 5 files changed, 34 insertions(+) create mode 100644 common/cpu/intel/meteor-lake/default.nix create mode 100644 common/gpu/intel/meteor-lake/default.nix create mode 100644 dell/precision/3490/default.nix diff --git a/README.md b/README.md index 098b39cb..2d46d425 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,7 @@ See code for all available configurations. | [Dell Latitude E7240](dell/latitude/e7240) | `` | | [Dell Optiplex 3050](dell/optiplex/3050) | `` | | [Dell Poweredge R7515](dell/poweredge/r7515) | `` | +| [Dell Precision 3490](dell/precision/3490) | `` | | [Dell Precision 3541](dell/precision/3541) | `` | | [Dell Precision 5490](dell/precision/5490) | `` | | [Dell Precision 5530](dell/precision/5530) | `` | diff --git a/common/cpu/intel/meteor-lake/default.nix b/common/cpu/intel/meteor-lake/default.nix new file mode 100644 index 00000000..1330e1c5 --- /dev/null +++ b/common/cpu/intel/meteor-lake/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../cpu-only.nix + ../../../gpu/intel/meteor-lake + ]; +} diff --git a/common/gpu/intel/meteor-lake/default.nix b/common/gpu/intel/meteor-lake/default.nix new file mode 100644 index 00000000..eb5abe99 --- /dev/null +++ b/common/gpu/intel/meteor-lake/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ ../. ]; + + hardware.intelgpu.vaapiDriver = "intel-media-driver"; +} diff --git a/dell/precision/3490/default.nix b/dell/precision/3490/default.nix new file mode 100644 index 00000000..c579f880 --- /dev/null +++ b/dell/precision/3490/default.nix @@ -0,0 +1,21 @@ +{ + imports = [ + ../../../common/cpu/intel/meteor-lake + ../../../common/gpu/nvidia/ada-lovelace + ../../../common/pc/laptop + ]; + + boot.initrd.availableKernelModules = [ + "nvme" + "sd_mod" + "thunderbolt" + "usb_storage" + "vmd" + "xhci_pci" + ]; + + hardware.nvidia.prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} diff --git a/flake.nix b/flake.nix index 2af97858..d52a37d4 100644 --- a/flake.nix +++ b/flake.nix @@ -80,6 +80,7 @@ dell-latitude-e7240 = import ./dell/latitude/e7240; dell-optiplex-3050 = import ./dell/optiplex/3050; dell-poweredge-r7515 = import ./dell/poweredge/r7515; + dell-precision-3490 = import ./dell/precision/3490; dell-precision-3541 = import ./dell/precision/3541; dell-precision-5490 = import ./dell/precision/5490; dell-precision-5530 = import ./dell/precision/5530; From 84eb0330aed636ed56ce3f3495cc4a329db45278 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Thu, 13 Mar 2025 11:15:20 +0000 Subject: [PATCH 1293/1476] feat: add Lenovo ThinkPad P16s Intel Gen 2 @moduon MT-9339 --- README.md | 1 + common/cpu/intel/raptor-lake/default.nix | 5 +++ common/gpu/intel/raptor-lake/default.nix | 5 +++ flake.nix | 1 + lenovo/thinkpad/p16s/intel/default.nix | 5 +++ lenovo/thinkpad/p16s/intel/gen2/README.md | 40 +++++++++++++++++++++ lenovo/thinkpad/p16s/intel/gen2/default.nix | 18 ++++++++++ 7 files changed, 75 insertions(+) create mode 100644 common/cpu/intel/raptor-lake/default.nix create mode 100644 common/gpu/intel/raptor-lake/default.nix create mode 100644 lenovo/thinkpad/p16s/intel/default.nix create mode 100644 lenovo/thinkpad/p16s/intel/gen2/README.md create mode 100644 lenovo/thinkpad/p16s/intel/gen2/default.nix diff --git a/README.md b/README.md index 2d46d425..4ec3ca8a 100644 --- a/README.md +++ b/README.md @@ -252,6 +252,7 @@ See code for all available configurations. | [Lenovo ThinkPad P14s Intel Gen 5](lenovo/thinkpad/p14s/intel/gen5) | `` | | [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | | [Lenovo ThinkPad P16s AMD Gen 2](lenovo/thinkpad/p16s/amd/gen2) | `` | +| [Lenovo ThinkPad P16s Intel Gen 2](lenovo/thinkpad/p16s/intel/gen2) | `` | | [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | | [Lenovo ThinkPad P43s](lenovo/thinkpad/p43s) | `` | | [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | diff --git a/common/cpu/intel/raptor-lake/default.nix b/common/cpu/intel/raptor-lake/default.nix new file mode 100644 index 00000000..665d3d41 --- /dev/null +++ b/common/cpu/intel/raptor-lake/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../. + ]; +} diff --git a/common/gpu/intel/raptor-lake/default.nix b/common/gpu/intel/raptor-lake/default.nix new file mode 100644 index 00000000..665d3d41 --- /dev/null +++ b/common/gpu/intel/raptor-lake/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../. + ]; +} diff --git a/flake.nix b/flake.nix index d52a37d4..254f9453 100644 --- a/flake.nix +++ b/flake.nix @@ -196,6 +196,7 @@ lenovo-thinkpad-p14s-intel-gen5 = import ./lenovo/thinkpad/p14s/intel/gen5; lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1; lenovo-thinkpad-p16s-amd-gen2 = import ./lenovo/thinkpad/p16s/amd/gen2; + lenovo-thinkpad-p16s-intel-gen2 = import ./lenovo/thinkpad/p16s/intel/gen2; lenovo-thinkpad-p43s = import ./lenovo/thinkpad/p43s; lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50; lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51; diff --git a/lenovo/thinkpad/p16s/intel/default.nix b/lenovo/thinkpad/p16s/intel/default.nix new file mode 100644 index 00000000..665d3d41 --- /dev/null +++ b/lenovo/thinkpad/p16s/intel/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../. + ]; +} diff --git a/lenovo/thinkpad/p16s/intel/gen2/README.md b/lenovo/thinkpad/p16s/intel/gen2/README.md new file mode 100644 index 00000000..43ab342d --- /dev/null +++ b/lenovo/thinkpad/p16s/intel/gen2/README.md @@ -0,0 +1,40 @@ +# Lenovo Thinkpad P16s Gen 2 + +https://www.lenovo.com/us/en/p/laptops/thinkpad/thinkpadp/thinkpad-p16s-gen-2-16-inch-intel/len101t0065 + + +## Tested Hardware + +```shell +lspci -nn +00:00.0 Host bridge [0600]: Intel Corporation Raptor Lake-P/U 4p+8e cores Host Bridge/DRAM Controller [8086:a707] +00:02.0 VGA compatible controller [0300]: Intel Corporation Raptor Lake-P [Iris Xe Graphics] [8086:a7a0] (rev 04) +00:04.0 Signal processing controller [1180]: Intel Corporation Raptor Lake Dynamic Platform and Thermal Framework Processor Participant [8086:a71d] +00:06.0 PCI bridge [0604]: Intel Corporation Raptor Lake PCIe 4.0 Graphics Port [8086:a74d] +00:06.2 PCI bridge [0604]: Intel Corporation Device [8086:a73d] +00:07.0 PCI bridge [0604]: Intel Corporation Raptor Lake-P Thunderbolt 4 PCI Express Root Port #0 [8086:a76e] +00:07.2 PCI bridge [0604]: Intel Corporation Raptor Lake-P Thunderbolt 4 PCI Express Root Port #2 [8086:a72f] +00:0d.0 USB controller [0c03]: Intel Corporation Raptor Lake-P Thunderbolt 4 USB Controller [8086:a71e] +00:0d.2 USB controller [0c03]: Intel Corporation Raptor Lake-P Thunderbolt 4 NHI #0 [8086:a73e] +00:0d.3 USB controller [0c03]: Intel Corporation Raptor Lake-P Thunderbolt 4 NHI #1 [8086:a76d] +00:14.0 USB controller [0c03]: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller [8086:51ed] (rev 01) +00:14.2 RAM memory [0500]: Intel Corporation Alder Lake PCH Shared SRAM [8086:51ef] (rev 01) +00:14.3 Network controller [0280]: Intel Corporation Raptor Lake PCH CNVi WiFi [8086:51f1] (rev 01) +00:15.0 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 [8086:51e8] (rev 01) +00:16.0 Communication controller [0780]: Intel Corporation Alder Lake PCH HECI Controller [8086:51e0] (rev 01) +00:1f.0 ISA bridge [0601]: Intel Corporation Raptor Lake LPC/eSPI Controller [8086:519d] (rev 01) +00:1f.3 Audio device [0403]: Intel Corporation Raptor Lake-P/U/H cAVS [8086:51ca] (rev 01) +00:1f.4 SMBus [0c05]: Intel Corporation Alder Lake PCH-P SMBus Host Controller [8086:51a3] (rev 01) +00:1f.5 Serial bus controller [0c80]: Intel Corporation Alder Lake-P PCH SPI Controller [8086:51a4] (rev 01) +00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (23) I219-V [8086:0dc6] (rev 01) +02:00.0 Non-Volatile memory controller [0108]: SK hynix Platinum P41/PC801 NVMe Solid State Drive [1c5c:1959] +03:00.0 3D controller [0302]: NVIDIA Corporation GA107GLM [RTX A500 Laptop GPU] [10de:25bb] (rev a1) + +nix-info -m + - system: `"x86_64-linux"` + - host os: `Linux 6.12.10-zen1, NixOS, 24.11 (Vicuna), 24.11.20250304.6af28b8` + - multi-user?: `yes` + - sandbox: `yes` + - version: `nix-env (Nix) 2.24.12` + - nixpkgs: `/nix/store/cdjqlnn7kx4hfmxkry9yjfdvqp2pradh-source` +``` diff --git a/lenovo/thinkpad/p16s/intel/gen2/default.nix b/lenovo/thinkpad/p16s/intel/gen2/default.nix new file mode 100644 index 00000000..39940255 --- /dev/null +++ b/lenovo/thinkpad/p16s/intel/gen2/default.nix @@ -0,0 +1,18 @@ +{lib, ...}: { + imports = [ + ../. + ../../../../../common/cpu/intel/raptor-lake + ../../../../../common/gpu/intel/raptor-lake + ../../../../../common/gpu/nvidia/ampere + ../../../../../common/gpu/nvidia/prime.nix + ]; + + # DOCS https://wiki.nixos.org/wiki/NVIDIA#Offload_mode + hardware.nvidia.prime = { + intelBusId = lib.mkDefault "PCI:0:2:0"; + nvidiaBusId = lib.mkDefault "PCI:3:0:0"; + }; + + # HACK https://github.com/NVIDIA/open-gpu-kernel-modules/issues/472 + hardware.nvidia.open = lib.mkOverride 993 false; +} From 0833dc8bbc4ffa9cf9b0cbfccf1c5ec8632fc66e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Zavala=20Villag=C3=B3mez?= Date: Tue, 29 Apr 2025 07:38:09 -0400 Subject: [PATCH 1294/1476] gmktec/nucbox/g3-plus: init Product page: This profile just configures the Intel Twin Lake N150 CPU and integrated graphics for this mini-PC. fstrim is also enabled for the SSD. That's all this seemed to need to function properly. As is now expected from Intel NUC systems, it provides a solid "out-of-the-box" experience. No special quirks are apparent. We import the Alder Lake modules since Twin Lake is just a refreshed version of the Alder Lake-N series. Re-using those seems to be fine for this purpose. --- README.md | 1 + flake.nix | 1 + gmktec/nucbox/g3-plus/default.nix | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 gmktec/nucbox/g3-plus/default.nix diff --git a/README.md b/README.md index 4ec3ca8a..3c5fd9ad 100644 --- a/README.md +++ b/README.md @@ -188,6 +188,7 @@ See code for all available configurations. | [Focus M2 Gen 1](focus/m2/gen1) | `` | | [Gigabyte B550](gigabyte/b550) | `` | | [Gigabyte B650](gigabyte/b650) | `` | +| [GMKtec NucBox G3 Plus](gmktec/nucbox/g3-plus) | `` | | [GPD MicroPC](gpd/micropc) | `` | | [GPD P2 Max](gpd/p2-max) | `` | | [GPD Pocket 3](gpd/pocket-3) | `` | diff --git a/flake.nix b/flake.nix index 254f9453..aa2e9564 100644 --- a/flake.nix +++ b/flake.nix @@ -130,6 +130,7 @@ focus-m2-gen1 = import ./focus/m2/gen1; gigabyte-b550 = import ./gigabyte/b550; gigabyte-b650 = import ./gigabyte/b650; + gmktec-nucbox-g3-plus = import ./gmktec/nucbox/g3-plus; google-pixelbook = import ./google/pixelbook; gpd-micropc = import ./gpd/micropc; gpd-p2-max = import ./gpd/p2-max; diff --git a/gmktec/nucbox/g3-plus/default.nix b/gmktec/nucbox/g3-plus/default.nix new file mode 100644 index 00000000..7cd7d6f3 --- /dev/null +++ b/gmktec/nucbox/g3-plus/default.nix @@ -0,0 +1,27 @@ +/* + * `gmktec-nucbox-g3-plus`: + * + * Product page: + * + * + * This profile just configures the Intel + * Twin Lake N150 CPU and integrated + * graphics for this mini-PC. fstrim is also + * enabled for the SSD. That's all this seemed + * to need to function properly. As is now + * expected from Intel NUC systems, it provides + * a solid "out-of-the-box" experience. No + * special quirks are apparent. + * + * We import the Alder Lake modules since Twin + * Lake is just a refreshed version of the + * Alder Lake-N series. Re-using those seems + * to be fine for this purpose. + */ +{ + imports = [ + ../../../common/cpu/intel/alder-lake + ../../../common/gpu/intel/alder-lake + ../../../common/pc/ssd + ]; +} From f5eedd65a342e155585e6d7a4ca7a4bbefecceee Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Wed, 16 Apr 2025 11:29:41 +0200 Subject: [PATCH 1295/1476] Lenovo ThinkPad X1 Yoga Gen 8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convertible laptop equipped with e.g. 13th Gen Intel Core i7-1365U × 12, 32 GiB RAM, and 512 MiB or 1 TiB SSD HDD --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/x1/yoga/8th-gen/default.nix | 6 ++++++ 3 files changed, 8 insertions(+) create mode 100644 lenovo/thinkpad/x1/yoga/8th-gen/default.nix diff --git a/README.md b/README.md index 3c5fd9ad..82994ba2 100644 --- a/README.md +++ b/README.md @@ -290,6 +290,7 @@ See code for all available configurations. | [Lenovo ThinkPad W520](lenovo/thinkpad/w520) | `` | | [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | | [Lenovo ThinkPad X1 Yoga Gen 7](lenovo/thinkpad/x1/yoga/7th-gen/) | `` | +| [Lenovo ThinkPad X1 Yoga Gen 8](lenovo/thinkpad/x1/yoga/8th-gen/) | `` | | [Lenovo ThinkPad X1 (2nd Gen)](lenovo/thinkpad/x1/2nd-gen) | `` | | [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | | [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | diff --git a/flake.nix b/flake.nix index aa2e9564..e79c0068 100644 --- a/flake.nix +++ b/flake.nix @@ -234,6 +234,7 @@ lenovo-thinkpad-x1 = import ./lenovo/thinkpad/x1; lenovo-thinkpad-x1-yoga = import ./lenovo/thinkpad/x1/yoga; lenovo-thinkpad-x1-yoga-7th-gen = import ./lenovo/thinkpad/x1/yoga/7th-gen; + lenovo-thinkpad-x1-yoga-8th-gen = import ./lenovo/thinkpad/x1/yoga/8th-gen; lenovo-thinkpad-x1-2nd-gen = import ./lenovo/thinkpad/x1/2nd-gen; lenovo-thinkpad-x1-6th-gen = import ./lenovo/thinkpad/x1/6th-gen; lenovo-thinkpad-x1-7th-gen = import ./lenovo/thinkpad/x1/7th-gen; diff --git a/lenovo/thinkpad/x1/yoga/8th-gen/default.nix b/lenovo/thinkpad/x1/yoga/8th-gen/default.nix new file mode 100644 index 00000000..cc1676cc --- /dev/null +++ b/lenovo/thinkpad/x1/yoga/8th-gen/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../. + ../../../../../common/pc/laptop/ssd + ]; +} From a4bb30a9000cf0444ecc8fdca8096d072f77f9e8 Mon Sep 17 00:00:00 2001 From: "Andreas V. W. Zacchi" Date: Thu, 20 Mar 2025 14:30:24 +0100 Subject: [PATCH 1296/1476] add asus-zenbook-ux481 --- README.md | 2 + asus/zenbook/ux481/README.md | 53 +++++++++++++++++++++++++ asus/zenbook/ux481/intelgpu/default.nix | 8 ++++ asus/zenbook/ux481/nvidia/default.nix | 17 ++++++++ asus/zenbook/ux481/shared.nix | 25 ++++++++++++ flake.nix | 2 + 6 files changed, 107 insertions(+) create mode 100644 asus/zenbook/ux481/README.md create mode 100644 asus/zenbook/ux481/intelgpu/default.nix create mode 100644 asus/zenbook/ux481/nvidia/default.nix create mode 100644 asus/zenbook/ux481/shared.nix diff --git a/README.md b/README.md index 82994ba2..6245e507 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,8 @@ See code for all available configurations. | [Asus TUF FA506IC](asus/fa506ic) | `` | | [Asus TUF FA507RM](asus/fa507rm) | `` | | [Asus TUF FA507NV](asus/fa507nv) | `` | +| [Asus Zenbook Duo 14 UX481](asus/zenbook/ux481/intelgpu/) | `` | +| [Asus Zenbook Duo 14 UX481](asus/zenbook/ux481/nvidia/) | `` | | [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `` | | [Asus Zenbook Pro 15 UX535](asus/zenbook/ux535/) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | diff --git a/asus/zenbook/ux481/README.md b/asus/zenbook/ux481/README.md new file mode 100644 index 00000000..9c03bcf2 --- /dev/null +++ b/asus/zenbook/ux481/README.md @@ -0,0 +1,53 @@ +# Asus Zenbook Duo 14 UX481 + +These profiles has been tested on a slightly modified device as I have swapped the Intel Optane NVME for a Kingston NVME with a higher capacity. + +# GPU + +You need to pick between running only Intel iGPU or running both Intel iGPU and NVIDIA dGPU. By only running iGPU the battery life is a bit better as the dGPU is turned off. You can offload applications if running on NVIDIA dGPU using + +```bash +nvidia-offload +``` + +## Battery charging limit: + +Using the ASUS module you can limit the charging percentage. This can be done as follows: + +```nix +hardware.asus.battery = +{ + chargeUpto = 90; # Maximum level of charge for your battery, as a percentage. + enableChargeUptoScript = true; # Whether to add charge-upto to environment.systemPackages. `charge-upto 100` temporarily sets the charge limit to 100%, useful if you're going to need the extra battery on a longer journey. +}; +``` + +## Hardware: + +```bash +$ lspci -nn +00:00.0 Host bridge [0600]: Intel Corporation Comet Lake-U v1 4c Host Bridge/DRAM Controller [8086:9b61] (rev 0c) +00:02.0 VGA compatible controller [0300]: Intel Corporation CometLake-U GT2 [UHD Graphics] [8086:9b41] (rev 02) +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 0c) +00:08.0 System peripheral [0880]: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model [8086:1911] +00:12.0 Signal processing controller [1180]: Intel Corporation Comet Lake Thermal Subsytem [8086:02f9] +00:14.0 USB controller [0c03]: Intel Corporation Comet Lake PCH-LP USB 3.1 xHCI Host Controller [8086:02ed] +00:14.2 RAM memory [0500]: Intel Corporation Comet Lake PCH-LP Shared SRAM [8086:02ef] +00:14.3 Network controller [0280]: Intel Corporation Comet Lake PCH-LP CNVi WiFi [8086:02f0] +00:15.0 Serial bus controller [0c80]: Intel Corporation Serial IO I2C Host Controller [8086:02e8] +00:15.1 Serial bus controller [0c80]: Intel Corporation Comet Lake Serial IO I2C Host Controller [8086:02e9] +00:15.2 Serial bus controller [0c80]: Intel Corporation Comet Lake PCH-LP LPSS: I2C Controller #2 [8086:02ea] +00:15.3 Serial bus controller [0c80]: Intel Corporation Device [8086:02eb] +00:16.0 Communication controller [0780]: Intel Corporation Comet Lake Management Engine Interface [8086:02e0] +00:1c.0 PCI bridge [0604]: Intel Corporation Comet Lake PCI Express Root Port #1 [8086:02b8] (rev f0) +00:1c.4 PCI bridge [0604]: Intel Corporation Comet Lake PCI Express Root Port #5 [8086:02bc] (rev f0) +00:1d.0 PCI bridge [0604]: Intel Corporation Comet Lake PCI Express Root Port #9 [8086:02b0] (rev f0) +00:1d.4 PCI bridge [0604]: Intel Corporation Comet Lake PCI Express Root Port #13 [8086:02b4] (rev f0) +00:1f.0 ISA bridge [0601]: Intel Corporation Comet Lake PCH-LP LPC Premium Controller/eSPI Controller [8086:0284] +00:1f.3 Audio device [0403]: Intel Corporation Comet Lake PCH-LP cAVS [8086:02c8] +00:1f.4 SMBus [0c05]: Intel Corporation Comet Lake PCH-LP SMBus Host Controller [8086:02a3] +00:1f.5 Serial bus controller [0c80]: Intel Corporation Comet Lake SPI (flash) Controller [8086:02a4] +02:00.0 3D controller [0302]: NVIDIA Corporation GP108BM [GeForce MX250] [10de:1d52] (rev a1) +03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader [10ec:522a] (rev 01) +04:00.0 Non-Volatile memory controller [0108]: Kingston Technology Company, Inc. NV2 NVMe SSD [TC2200] (DRAM-less) [2646:501d] +``` diff --git a/asus/zenbook/ux481/intelgpu/default.nix b/asus/zenbook/ux481/intelgpu/default.nix new file mode 100644 index 00000000..b69d9097 --- /dev/null +++ b/asus/zenbook/ux481/intelgpu/default.nix @@ -0,0 +1,8 @@ +{ lib, ... }: +{ + imports = [ + ../shared.nix + ../../../../common/gpu/intel/comet-lake + ../../../../common/gpu/nvidia/disable.nix # Disabling nvidia + ]; +} diff --git a/asus/zenbook/ux481/nvidia/default.nix b/asus/zenbook/ux481/nvidia/default.nix new file mode 100644 index 00000000..359a97d6 --- /dev/null +++ b/asus/zenbook/ux481/nvidia/default.nix @@ -0,0 +1,17 @@ +{lib, ...}: +{ + imports = [ + ../shared.nix + ../../../../common/gpu/nvidia/pascal + ../../../../common/gpu/nvidia/prime.nix + ]; + + hardware.nvidia = { + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:2:0:0"; + }; + + dynamicBoost.enable = lib.mkForce false; # Dynamic boost is not supported on Pascal architeture + }; +} diff --git a/asus/zenbook/ux481/shared.nix b/asus/zenbook/ux481/shared.nix new file mode 100644 index 00000000..f23d5e17 --- /dev/null +++ b/asus/zenbook/ux481/shared.nix @@ -0,0 +1,25 @@ +{ + config, + lib, + ... +}: +{ + imports = [ + ../../../common/cpu/intel/comet-lake/cpu-only.nix + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ../../battery.nix + ]; + + boot.kernelParams = [ + # These options are needed for suspend to work, + # otherwise the nvme will be mounted read-only on resume + "pcie_aspm=off" + "pcie_port_pm=off" + "nvme_core.default_ps_max_latency_us=0" + "mem_sleep_default=deep" + ]; + + services.thermald.enable = lib.mkDefault true; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; +} diff --git a/flake.nix b/flake.nix index e79c0068..e48d1bd9 100644 --- a/flake.nix +++ b/flake.nix @@ -44,6 +44,8 @@ asus-rog-strix-x570e = import ./asus/rog-strix/x570e; asus-zenbook-ux371 = import ./asus/zenbook/ux371; asus-zenbook-ux535 = import ./asus/zenbook/ux535; + asus-zenbook-ux481-intelgpu = import ./asus/zenbook/ux481/intelgpu; + asus-zenbook-ux481-nvidia = import ./asus/zenbook/ux481/nvidia; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; asus-zephyrus-ga402x = import ./asus/zephyrus/ga402x; From 7d9552ef6b02da7b8fafe426c0db5358ab8c4009 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Mon, 5 May 2025 11:15:11 +0200 Subject: [PATCH 1297/1476] Replace symlink references by real path and delete symlink The common/pc/laptop/ssd folder was apparently moved a level up and was replaced by a symlink to keep things working. We can consolidate this now. --- apple/imac/18-2/default.nix | 2 +- apple/imac/default.nix | 2 +- apple/macbook-air/default.nix | 2 +- apple/macbook-pro/10-1/default.nix | 2 +- apple/macbook-pro/11-1/default.nix | 2 +- apple/macbook-pro/11-5/default.nix | 2 +- apple/macbook-pro/12-1/default.nix | 2 +- apple/macbook-pro/14-1/default.nix | 2 +- apple/macbook-pro/8-1/default.nix | 2 +- asus/ally/rc71l/default.nix | 2 +- asus/fa506ic/default.nix | 2 +- asus/zenbook/ux371/default.nix | 2 +- asus/zenbook/ux481/shared.nix | 6 +++--- asus/zenbook/ux535/default.nix | 2 +- asus/zephyrus/ga401/default.nix | 2 +- asus/zephyrus/ga402/default.nix | 2 +- asus/zephyrus/gu605my/default.nix | 2 +- chuwi/minibook-x/default.nix | 2 +- common/pc/laptop/ssd | 1 - dell/g3/3579/default.nix | 2 +- dell/g3/3779/default.nix | 2 +- dell/inspiron/7405/default.nix | 2 +- dell/inspiron/7460/default.nix | 2 +- dell/inspiron/7559/README.md | 2 +- dell/latitude/3340/default.nix | 2 +- dell/latitude/3480/default.nix | 2 +- dell/latitude/5490/default.nix | 4 ++-- dell/latitude/5520/default.nix | 2 +- dell/latitude/7280/default.nix | 2 +- dell/latitude/7420/default.nix | 2 +- dell/latitude/7430/default.nix | 8 ++++---- dell/latitude/9430/default.nix | 2 +- dell/precision/5530/default.nix | 2 +- dell/precision/5560/default.nix | 2 +- dell/precision/7520/default.nix | 2 +- dell/xps/13-7390/default.nix | 2 +- dell/xps/13-9343/default.nix | 2 +- dell/xps/13-9350/default.nix | 2 +- dell/xps/15-9500/default.nix | 4 ++-- dell/xps/15-9510/default.nix | 2 +- dell/xps/15-9520/default.nix | 2 +- dell/xps/15-9530/default.nix | 2 +- focus/m2/gen1/default.nix | 2 +- framework/13-inch/common/default.nix | 2 +- framework/16-inch/common/default.nix | 2 +- google/pixelbook/default.nix | 2 +- gpd/micropc/default.nix | 2 +- gpd/p2-max/default.nix | 2 +- gpd/pocket-3/default.nix | 2 +- gpd/pocket-4/default.nix | 2 +- hp/elitebook/830/g6/default.nix | 2 +- hp/elitebook/845/g7/default.nix | 2 +- hp/elitebook/845/g8/default.nix | 2 +- hp/elitebook/845/g9/default.nix | 2 +- hp/laptop/14s-dq2024nf/default.nix | 2 +- hp/probook/440G5/default.nix | 2 +- lenovo/ideapad/15ach6/default.nix | 2 +- lenovo/ideapad/15alc6/default.nix | 2 +- lenovo/ideapad/15arh05/default.nix | 2 +- lenovo/ideapad/16ach6/default.nix | 2 +- lenovo/ideapad/16ahp9/default.nix | 2 +- lenovo/ideapad/16iah8/default.nix | 2 +- lenovo/ideapad/slim-5/default.nix | 2 +- lenovo/legion/15ach6/default.nix | 2 +- lenovo/legion/15ach6h/hybrid/default.nix | 2 +- lenovo/legion/15arh05h/default.nix | 2 +- lenovo/legion/15ich/default.nix | 2 +- lenovo/legion/16ach6h/hybrid/default.nix | 2 +- lenovo/legion/16achg6/hybrid/default.nix | 4 ++-- lenovo/legion/16aph8/default.nix | 2 +- lenovo/legion/16arh7h/hybrid/default.nix | 2 +- lenovo/legion/16arh7h/igpu-only/default.nix | 2 +- lenovo/legion/16arha7/default.nix | 4 ++-- lenovo/legion/16irx8h/default.nix | 2 +- lenovo/legion/16irx9h/default.nix | 2 +- lenovo/legion/16ithg6/default.nix | 2 +- lenovo/thinkpad/e14/default.nix | 2 +- lenovo/thinkpad/e15/default.nix | 2 +- lenovo/thinkpad/l13/default.nix | 2 +- lenovo/thinkpad/l14/default.nix | 2 +- lenovo/thinkpad/l480/default.nix | 2 +- lenovo/thinkpad/p1/default.nix | 2 +- lenovo/thinkpad/p14s/default.nix | 2 +- lenovo/thinkpad/p16s/default.nix | 2 +- lenovo/thinkpad/p43s/default.nix | 2 +- lenovo/thinkpad/t14/default.nix | 2 +- lenovo/thinkpad/x1-extreme/default.nix | 2 +- lenovo/thinkpad/x1-nano/default.nix | 2 +- lenovo/thinkpad/x1/10th-gen/default.nix | 2 +- lenovo/thinkpad/x1/11th-gen/default.nix | 2 +- lenovo/thinkpad/x1/12th-gen/default.nix | 2 +- lenovo/thinkpad/x1/2nd-gen/default.nix | 2 +- lenovo/thinkpad/x1/6th-gen/default.nix | 2 +- lenovo/thinkpad/x1/7th-gen/default.nix | 2 +- lenovo/thinkpad/x1/9th-gen/default.nix | 2 +- lenovo/thinkpad/x1/yoga/7th-gen/default.nix | 2 +- lenovo/thinkpad/x1/yoga/8th-gen/default.nix | 2 +- lenovo/thinkpad/x13/common.nix | 2 +- lenovo/thinkpad/x270/default.nix | 2 +- lenovo/thinkpad/x280/default.nix | 2 +- lenovo/thinkpad/x390/default.nix | 2 +- lenovo/thinkpad/z/default.nix | 2 +- malibal/aon/s1/default.nix | 2 +- msi/gl62/default.nix | 2 +- msi/gl65/10SDR-492/default.nix | 2 +- omen/15-ce002ns/default.nix | 2 +- onenetbook/4/default.nix | 2 +- slimbook/hero/rpl-rtx/default.nix | 2 +- starlabs/starlite/i5/default.nix | 2 +- system76/darp6/default.nix | 2 +- tuxedo/pulse/14/gen3/default.nix | 2 +- tuxedo/pulse/15/gen2/default.nix | 2 +- xiaomi/redmibook/16-pro-2024/default.nix | 2 +- 113 files changed, 121 insertions(+), 122 deletions(-) delete mode 120000 common/pc/laptop/ssd diff --git a/apple/imac/18-2/default.nix b/apple/imac/18-2/default.nix index 4770e10b..9d71ba32 100644 --- a/apple/imac/18-2/default.nix +++ b/apple/imac/18-2/default.nix @@ -9,7 +9,7 @@ ../../../common/cpu/intel/kaby-lake ../../../common/gpu/amd ../../../common/hidpi.nix - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # apple smc (TODO: check spi) diff --git a/apple/imac/default.nix b/apple/imac/default.nix index ea15175d..86d48299 100644 --- a/apple/imac/default.nix +++ b/apple/imac/default.nix @@ -3,6 +3,6 @@ ../. ../../common/cpu/intel ../../common/pc/laptop - ../../common/pc/laptop/ssd + ../../common/pc/ssd ]; } diff --git a/apple/macbook-air/default.nix b/apple/macbook-air/default.nix index ea15175d..86d48299 100644 --- a/apple/macbook-air/default.nix +++ b/apple/macbook-air/default.nix @@ -3,6 +3,6 @@ ../. ../../common/cpu/intel ../../common/pc/laptop - ../../common/pc/laptop/ssd + ../../common/pc/ssd ]; } diff --git a/apple/macbook-pro/10-1/default.nix b/apple/macbook-pro/10-1/default.nix index 08302289..8967b1cb 100644 --- a/apple/macbook-pro/10-1/default.nix +++ b/apple/macbook-pro/10-1/default.nix @@ -3,7 +3,7 @@ { imports = [ ../. - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../../common/gpu/24.05-compat.nix ../../../common/gpu/nvidia/kepler ]; diff --git a/apple/macbook-pro/11-1/default.nix b/apple/macbook-pro/11-1/default.nix index 17525084..6c9509b2 100644 --- a/apple/macbook-pro/11-1/default.nix +++ b/apple/macbook-pro/11-1/default.nix @@ -2,7 +2,7 @@ { imports = [ ../. - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../../common/cpu/intel/haswell ]; diff --git a/apple/macbook-pro/11-5/default.nix b/apple/macbook-pro/11-5/default.nix index 81eda9b2..1db2878f 100644 --- a/apple/macbook-pro/11-5/default.nix +++ b/apple/macbook-pro/11-5/default.nix @@ -9,7 +9,7 @@ in { imports = [ ../. - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # Enable broadcom-43xx firmware diff --git a/apple/macbook-pro/12-1/default.nix b/apple/macbook-pro/12-1/default.nix index 7497b2ff..6f1bc995 100644 --- a/apple/macbook-pro/12-1/default.nix +++ b/apple/macbook-pro/12-1/default.nix @@ -3,7 +3,7 @@ { imports = [ ../. - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd "${modulesPath}/hardware/network/broadcom-43xx.nix" ]; diff --git a/apple/macbook-pro/14-1/default.nix b/apple/macbook-pro/14-1/default.nix index cec9e262..e7897708 100644 --- a/apple/macbook-pro/14-1/default.nix +++ b/apple/macbook-pro/14-1/default.nix @@ -8,7 +8,7 @@ ../. ../../../common/cpu/intel/kaby-lake ../../../common/hidpi.nix - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # Make the keyboard work in stage1, enable iommu diff --git a/apple/macbook-pro/8-1/default.nix b/apple/macbook-pro/8-1/default.nix index bc77ea6a..a807da27 100644 --- a/apple/macbook-pro/8-1/default.nix +++ b/apple/macbook-pro/8-1/default.nix @@ -4,7 +4,7 @@ imports = [ ../. ../../../common/cpu/intel/sandy-bridge - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; networking.enableB43Firmware = lib.mkDefault true; diff --git a/asus/ally/rc71l/default.nix b/asus/ally/rc71l/default.nix index 9cc83fed..7f2552ec 100644 --- a/asus/ally/rc71l/default.nix +++ b/asus/ally/rc71l/default.nix @@ -5,7 +5,7 @@ ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../battery.nix ]; diff --git a/asus/fa506ic/default.nix b/asus/fa506ic/default.nix index 10d08fbc..c9591fd7 100644 --- a/asus/fa506ic/default.nix +++ b/asus/fa506ic/default.nix @@ -8,7 +8,7 @@ ../../common/gpu/nvidia/prime.nix ../../common/gpu/nvidia/ampere ../../common/pc/laptop - ../../common/pc/laptop/ssd + ../../common/pc/ssd ]; hardware.nvidia = { diff --git a/asus/zenbook/ux371/default.nix b/asus/zenbook/ux371/default.nix index 8e387c0c..1b4b7f26 100644 --- a/asus/zenbook/ux371/default.nix +++ b/asus/zenbook/ux371/default.nix @@ -7,7 +7,7 @@ imports = [ ../../../common/cpu/intel/tiger-lake ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../battery.nix ]; diff --git a/asus/zenbook/ux481/shared.nix b/asus/zenbook/ux481/shared.nix index f23d5e17..a9842c7d 100644 --- a/asus/zenbook/ux481/shared.nix +++ b/asus/zenbook/ux481/shared.nix @@ -7,12 +7,12 @@ imports = [ ../../../common/cpu/intel/comet-lake/cpu-only.nix ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../battery.nix ]; - boot.kernelParams = [ - # These options are needed for suspend to work, + boot.kernelParams = [ + # These options are needed for suspend to work, # otherwise the nvme will be mounted read-only on resume "pcie_aspm=off" "pcie_port_pm=off" diff --git a/asus/zenbook/ux535/default.nix b/asus/zenbook/ux535/default.nix index a6df788d..f2b3da6e 100644 --- a/asus/zenbook/ux535/default.nix +++ b/asus/zenbook/ux535/default.nix @@ -8,7 +8,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/cpu/intel ../../../common/gpu/intel/comet-lake - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../../common/hidpi.nix # 4K screen is HiDPI ../../battery.nix ]; diff --git a/asus/zephyrus/ga401/default.nix b/asus/zephyrus/ga401/default.nix index 9dad2c17..f7469f1c 100644 --- a/asus/zephyrus/ga401/default.nix +++ b/asus/zephyrus/ga401/default.nix @@ -8,7 +8,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/ampere ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; hardware.nvidia = { diff --git a/asus/zephyrus/ga402/default.nix b/asus/zephyrus/ga402/default.nix index 2002fd09..e38e52e5 100644 --- a/asus/zephyrus/ga402/default.nix +++ b/asus/zephyrus/ga402/default.nix @@ -6,7 +6,7 @@ ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; services = { diff --git a/asus/zephyrus/gu605my/default.nix b/asus/zephyrus/gu605my/default.nix index d1ce68bb..3ccbdbfd 100644 --- a/asus/zephyrus/gu605my/default.nix +++ b/asus/zephyrus/gu605my/default.nix @@ -6,7 +6,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/ada-lovelace ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../shared/backlight.nix ]; diff --git a/chuwi/minibook-x/default.nix b/chuwi/minibook-x/default.nix index 39bc9ccc..0b78d046 100644 --- a/chuwi/minibook-x/default.nix +++ b/chuwi/minibook-x/default.nix @@ -2,7 +2,7 @@ imports = [ ../../common/cpu/intel ../../common/pc/laptop - ../../common/pc/laptop/ssd + ../../common/pc/ssd ../../common/hidpi.nix ]; # Fixes the display being rotated 90 degrees. diff --git a/common/pc/laptop/ssd b/common/pc/laptop/ssd deleted file mode 120000 index e313834a..00000000 --- a/common/pc/laptop/ssd +++ /dev/null @@ -1 +0,0 @@ -../ssd \ No newline at end of file diff --git a/dell/g3/3579/default.nix b/dell/g3/3579/default.nix index e5246c4c..9b74d522 100644 --- a/dell/g3/3579/default.nix +++ b/dell/g3/3579/default.nix @@ -6,7 +6,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/pascal ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # Specify bus id of Nvidia and Intel graphics diff --git a/dell/g3/3779/default.nix b/dell/g3/3779/default.nix index c9afd482..4e345a02 100644 --- a/dell/g3/3779/default.nix +++ b/dell/g3/3779/default.nix @@ -6,7 +6,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/pascal ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # Specify bus id of Nvidia and Intel graphics diff --git a/dell/inspiron/7405/default.nix b/dell/inspiron/7405/default.nix index 06ccf92f..d894e179 100644 --- a/dell/inspiron/7405/default.nix +++ b/dell/inspiron/7405/default.nix @@ -7,7 +7,7 @@ with lib; ../../../common/cpu/amd ../../../common/gpu/amd ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # TSC is unstable diff --git a/dell/inspiron/7460/default.nix b/dell/inspiron/7460/default.nix index 5a268970..aacbacaa 100644 --- a/dell/inspiron/7460/default.nix +++ b/dell/inspiron/7460/default.nix @@ -3,7 +3,7 @@ { imports = [ ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../../common/gpu/intel/kaby-lake ../../../common/gpu/nvidia/maxwell ../../../common/gpu/nvidia/prime.nix diff --git a/dell/inspiron/7559/README.md b/dell/inspiron/7559/README.md index a1bb0427..6a4b2033 100644 --- a/dell/inspiron/7559/README.md +++ b/dell/inspiron/7559/README.md @@ -41,7 +41,7 @@ This configuration uses Nvidia Prime offloading, which allows use of the `nvidia #### SSD -This laptop has an optional M.2 SSD slot, which isn't accounted for here. If you are using the SSD, you could look into implementing the options in [ssd](common/pc/laptop/ssd) manually. Some sources also say you should ensure your SATA Mode is set to AHCI in your BIOS for it to be detected, however I think this is a prerequisite to installing Linux on this laptop in the first place so you probably already have that set. +This laptop has an optional M.2 SSD slot, which isn't accounted for here. If you are using the SSD, you could look into implementing the options in [ssd](common/pc/ssd) manually. Some sources also say you should ensure your SATA Mode is set to AHCI in your BIOS for it to be detected, however I think this is a prerequisite to installing Linux on this laptop in the first place so you probably already have that set. #### Subwoofer diff --git a/dell/latitude/3340/default.nix b/dell/latitude/3340/default.nix index d50b024c..dda36a88 100644 --- a/dell/latitude/3340/default.nix +++ b/dell/latitude/3340/default.nix @@ -4,6 +4,6 @@ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; } diff --git a/dell/latitude/3480/default.nix b/dell/latitude/3480/default.nix index 0b16e0aa..e54673cb 100644 --- a/dell/latitude/3480/default.nix +++ b/dell/latitude/3480/default.nix @@ -4,7 +4,7 @@ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # touchpad goes over i2c diff --git a/dell/latitude/5490/default.nix b/dell/latitude/5490/default.nix index ee99f414..2cde4ad0 100644 --- a/dell/latitude/5490/default.nix +++ b/dell/latitude/5490/default.nix @@ -4,12 +4,12 @@ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # Important Firmware hardware.enableRedistributableFirmware = lib.mkDefault true; - + boot = { # Kernel Panic on suspend fix, taken from ArchLinux wiki. kernelParams = [ "acpi_enforce_resources=lax" "i915.enable_dc=0" ]; diff --git a/dell/latitude/5520/default.nix b/dell/latitude/5520/default.nix index 6ad43309..b72a1830 100644 --- a/dell/latitude/5520/default.nix +++ b/dell/latitude/5520/default.nix @@ -4,7 +4,7 @@ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # Essential Firmware diff --git a/dell/latitude/7280/default.nix b/dell/latitude/7280/default.nix index 3b57a289..c98daed5 100644 --- a/dell/latitude/7280/default.nix +++ b/dell/latitude/7280/default.nix @@ -4,6 +4,6 @@ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; } diff --git a/dell/latitude/7420/default.nix b/dell/latitude/7420/default.nix index a100101a..7e1f49f1 100644 --- a/dell/latitude/7420/default.nix +++ b/dell/latitude/7420/default.nix @@ -4,6 +4,6 @@ imports = [ ../../../common/cpu/intel/tiger-lake ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; } diff --git a/dell/latitude/7430/default.nix b/dell/latitude/7430/default.nix index 7d2f6f98..18f4bb21 100644 --- a/dell/latitude/7430/default.nix +++ b/dell/latitude/7430/default.nix @@ -4,16 +4,16 @@ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; - boot.kernelParams = [ + boot.kernelParams = [ # needed for Intel Iris Xe "i915.force_probe=46a8" "i915.enable_guc=3" "i915.fastboot=1" # needed for keyboard - "i8042.dumbkbd=1" - "i8042.nopnp=1" + "i8042.dumbkbd=1" + "i8042.nopnp=1" ]; } diff --git a/dell/latitude/9430/default.nix b/dell/latitude/9430/default.nix index f652e9ac..0441f53d 100644 --- a/dell/latitude/9430/default.nix +++ b/dell/latitude/9430/default.nix @@ -4,7 +4,7 @@ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; boot.kernelParams = [ diff --git a/dell/precision/5530/default.nix b/dell/precision/5530/default.nix index 84ac324b..1b7007af 100644 --- a/dell/precision/5530/default.nix +++ b/dell/precision/5530/default.nix @@ -3,7 +3,7 @@ { imports = [ ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../../common/gpu/nvidia/pascal ../../../common/gpu/nvidia/prime.nix ../../../common/cpu/intel/coffee-lake diff --git a/dell/precision/5560/default.nix b/dell/precision/5560/default.nix index a17ef775..efd227ca 100644 --- a/dell/precision/5560/default.nix +++ b/dell/precision/5560/default.nix @@ -2,7 +2,7 @@ { imports = [ ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../../common/cpu/intel/tiger-lake ../../../common/gpu/nvidia/turing ]; diff --git a/dell/precision/7520/default.nix b/dell/precision/7520/default.nix index 59fa95e6..567aa382 100644 --- a/dell/precision/7520/default.nix +++ b/dell/precision/7520/default.nix @@ -6,7 +6,7 @@ imports = [ ../../../common/cpu/intel/kaby-lake ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../../common/gpu/nvidia ]; hardware.enableRedistributableFirmware = lib.mkDefault true; diff --git a/dell/xps/13-7390/default.nix b/dell/xps/13-7390/default.nix index 1f1c4561..c5e8a698 100644 --- a/dell/xps/13-7390/default.nix +++ b/dell/xps/13-7390/default.nix @@ -4,7 +4,7 @@ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; boot.kernelParams = [ "mem_sleep_default=deep" ]; diff --git a/dell/xps/13-9343/default.nix b/dell/xps/13-9343/default.nix index 2904a773..98e0c417 100644 --- a/dell/xps/13-9343/default.nix +++ b/dell/xps/13-9343/default.nix @@ -4,7 +4,7 @@ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # This will save you money and possibly your life! diff --git a/dell/xps/13-9350/default.nix b/dell/xps/13-9350/default.nix index 8ee58b2c..2157e642 100644 --- a/dell/xps/13-9350/default.nix +++ b/dell/xps/13-9350/default.nix @@ -4,7 +4,7 @@ imports = [ ../../../common/cpu/intel/lunar-lake ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # The touchpad uses I²C, so PS/2 is unnecessary diff --git a/dell/xps/15-9500/default.nix b/dell/xps/15-9500/default.nix index 7d346a27..b11ecd16 100644 --- a/dell/xps/15-9500/default.nix +++ b/dell/xps/15-9500/default.nix @@ -6,7 +6,7 @@ in imports = [ ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # Boot loader @@ -18,7 +18,7 @@ in # Thermald doesn't have a default config for the 9500 yet, the one in this repo # was generated with dptfxtract-static (https://github.com/intel/dptfxtract) services.thermald.configFile = lib.mkDefault thermald-conf; - + # 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 diff --git a/dell/xps/15-9510/default.nix b/dell/xps/15-9510/default.nix index 066039c6..12a64450 100644 --- a/dell/xps/15-9510/default.nix +++ b/dell/xps/15-9510/default.nix @@ -2,7 +2,7 @@ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # This will save you money and possibly your life! diff --git a/dell/xps/15-9520/default.nix b/dell/xps/15-9520/default.nix index 19205454..b30eee31 100644 --- a/dell/xps/15-9520/default.nix +++ b/dell/xps/15-9520/default.nix @@ -4,7 +4,7 @@ ../../../common/cpu/intel ../../../common/gpu/intel/alder-lake ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # This will save you money and possibly your life! diff --git a/dell/xps/15-9530/default.nix b/dell/xps/15-9530/default.nix index 95df2da6..99fd8a71 100644 --- a/dell/xps/15-9530/default.nix +++ b/dell/xps/15-9530/default.nix @@ -3,7 +3,7 @@ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # This will save you money and possibly your life! diff --git a/focus/m2/gen1/default.nix b/focus/m2/gen1/default.nix index f9242900..2b8e5e7c 100644 --- a/focus/m2/gen1/default.nix +++ b/focus/m2/gen1/default.nix @@ -6,7 +6,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/turing ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; diff --git a/framework/13-inch/common/default.nix b/framework/13-inch/common/default.nix index 4e6f519a..d42a9f72 100644 --- a/framework/13-inch/common/default.nix +++ b/framework/13-inch/common/default.nix @@ -2,7 +2,7 @@ { imports = [ ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../bluetooth.nix ../../kmod.nix ../../framework-tool.nix diff --git a/framework/16-inch/common/default.nix b/framework/16-inch/common/default.nix index 0b803063..8443e401 100644 --- a/framework/16-inch/common/default.nix +++ b/framework/16-inch/common/default.nix @@ -2,7 +2,7 @@ { imports = [ ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../bluetooth.nix ../../kmod.nix ../../framework-tool.nix diff --git a/google/pixelbook/default.nix b/google/pixelbook/default.nix index 1ea4c7af..6ad1d2cc 100644 --- a/google/pixelbook/default.nix +++ b/google/pixelbook/default.nix @@ -3,7 +3,7 @@ { imports = [ ../../common/pc/laptop - ../../common/pc/laptop/ssd + ../../common/pc/ssd ../../common/cpu/intel/kaby-lake ]; } diff --git a/gpd/micropc/default.nix b/gpd/micropc/default.nix index d9a699ef..34b35201 100644 --- a/gpd/micropc/default.nix +++ b/gpd/micropc/default.nix @@ -2,7 +2,7 @@ { imports = [ ../../common/pc/laptop - ../../common/pc/laptop/ssd + ../../common/pc/ssd ]; # Needed to have the keyboard working during the initrd sequence diff --git a/gpd/p2-max/default.nix b/gpd/p2-max/default.nix index e8f183e2..206348c4 100644 --- a/gpd/p2-max/default.nix +++ b/gpd/p2-max/default.nix @@ -1,7 +1,7 @@ { imports = [ ../../common/pc/laptop - ../../common/pc/laptop/ssd + ../../common/pc/ssd ../../common/cpu/intel/kaby-lake ../../common/hidpi.nix ]; diff --git a/gpd/pocket-3/default.nix b/gpd/pocket-3/default.nix index 621f4454..a271a644 100644 --- a/gpd/pocket-3/default.nix +++ b/gpd/pocket-3/default.nix @@ -4,7 +4,7 @@ in { imports = [ ../../common/pc/laptop - ../../common/pc/laptop/ssd + ../../common/pc/ssd ../../common/hidpi.nix ../../common/gpu/24.05-compat.nix ]; diff --git a/gpd/pocket-4/default.nix b/gpd/pocket-4/default.nix index 36a6a0a7..4ec54b63 100644 --- a/gpd/pocket-4/default.nix +++ b/gpd/pocket-4/default.nix @@ -4,7 +4,7 @@ in { imports = [ ../../common/pc/laptop - ../../common/pc/laptop/ssd + ../../common/pc/ssd ../../common/cpu/amd ../../common/cpu/amd/pstate.nix ../../common/gpu/amd diff --git a/hp/elitebook/830/g6/default.nix b/hp/elitebook/830/g6/default.nix index 9e62264f..1790c8a9 100644 --- a/hp/elitebook/830/g6/default.nix +++ b/hp/elitebook/830/g6/default.nix @@ -3,7 +3,7 @@ imports = [ ../../../../common/cpu/intel ../../../../common/pc/laptop - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; # Needed for wifi diff --git a/hp/elitebook/845/g7/default.nix b/hp/elitebook/845/g7/default.nix index 823bf40c..d18ef3cf 100644 --- a/hp/elitebook/845/g7/default.nix +++ b/hp/elitebook/845/g7/default.nix @@ -7,7 +7,7 @@ ../../../../common/cpu/amd/pstate.nix ../../../../common/gpu/amd ../../../../common/pc/laptop - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; hardware.enableRedistributableFirmware = lib.mkDefault true; diff --git a/hp/elitebook/845/g8/default.nix b/hp/elitebook/845/g8/default.nix index 823bf40c..d18ef3cf 100644 --- a/hp/elitebook/845/g8/default.nix +++ b/hp/elitebook/845/g8/default.nix @@ -7,7 +7,7 @@ ../../../../common/cpu/amd/pstate.nix ../../../../common/gpu/amd ../../../../common/pc/laptop - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; hardware.enableRedistributableFirmware = lib.mkDefault true; diff --git a/hp/elitebook/845/g9/default.nix b/hp/elitebook/845/g9/default.nix index 823bf40c..d18ef3cf 100644 --- a/hp/elitebook/845/g9/default.nix +++ b/hp/elitebook/845/g9/default.nix @@ -7,7 +7,7 @@ ../../../../common/cpu/amd/pstate.nix ../../../../common/gpu/amd ../../../../common/pc/laptop - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; hardware.enableRedistributableFirmware = lib.mkDefault true; diff --git a/hp/laptop/14s-dq2024nf/default.nix b/hp/laptop/14s-dq2024nf/default.nix index acad2f55..f7a1a654 100644 --- a/hp/laptop/14s-dq2024nf/default.nix +++ b/hp/laptop/14s-dq2024nf/default.nix @@ -5,7 +5,7 @@ ../../../common/cpu/intel/tiger-lake ../../../common/pc ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; config = { diff --git a/hp/probook/440G5/default.nix b/hp/probook/440G5/default.nix index 7cc5a234..9bc0fc82 100644 --- a/hp/probook/440G5/default.nix +++ b/hp/probook/440G5/default.nix @@ -7,7 +7,7 @@ ../../../common/cpu/intel/kaby-lake ../../../common/pc ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; config = { diff --git a/lenovo/ideapad/15ach6/default.nix b/lenovo/ideapad/15ach6/default.nix index e86fee90..35527a01 100644 --- a/lenovo/ideapad/15ach6/default.nix +++ b/lenovo/ideapad/15ach6/default.nix @@ -8,7 +8,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/turing ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; hardware.nvidia = { diff --git a/lenovo/ideapad/15alc6/default.nix b/lenovo/ideapad/15alc6/default.nix index 386f2720..31a8b390 100644 --- a/lenovo/ideapad/15alc6/default.nix +++ b/lenovo/ideapad/15alc6/default.nix @@ -5,6 +5,6 @@ ../../../common/cpu/amd ../../../common/gpu/amd ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; } diff --git a/lenovo/ideapad/15arh05/default.nix b/lenovo/ideapad/15arh05/default.nix index f021a2d6..a4ff8df1 100644 --- a/lenovo/ideapad/15arh05/default.nix +++ b/lenovo/ideapad/15arh05/default.nix @@ -6,7 +6,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/turing ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # Specify bus id of Nvidia and Intel graphics. diff --git a/lenovo/ideapad/16ach6/default.nix b/lenovo/ideapad/16ach6/default.nix index aeec3298..246b35ea 100644 --- a/lenovo/ideapad/16ach6/default.nix +++ b/lenovo/ideapad/16ach6/default.nix @@ -8,7 +8,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/turing ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; hardware.nvidia = { diff --git a/lenovo/ideapad/16ahp9/default.nix b/lenovo/ideapad/16ahp9/default.nix index f83290e2..5a6acd06 100644 --- a/lenovo/ideapad/16ahp9/default.nix +++ b/lenovo/ideapad/16ahp9/default.nix @@ -6,6 +6,6 @@ ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; } diff --git a/lenovo/ideapad/16iah8/default.nix b/lenovo/ideapad/16iah8/default.nix index 1f71aed2..ee899fc5 100644 --- a/lenovo/ideapad/16iah8/default.nix +++ b/lenovo/ideapad/16iah8/default.nix @@ -4,6 +4,6 @@ imports = [ ../../../common/cpu/intel/alder-lake ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; } diff --git a/lenovo/ideapad/slim-5/default.nix b/lenovo/ideapad/slim-5/default.nix index 02173bd4..202d2c85 100644 --- a/lenovo/ideapad/slim-5/default.nix +++ b/lenovo/ideapad/slim-5/default.nix @@ -3,6 +3,6 @@ ../../../common/cpu/amd ../../../common/gpu/amd ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; } diff --git a/lenovo/legion/15ach6/default.nix b/lenovo/legion/15ach6/default.nix index 0166a5fe..6c890105 100644 --- a/lenovo/legion/15ach6/default.nix +++ b/lenovo/legion/15ach6/default.nix @@ -7,7 +7,7 @@ ../../../common/gpu/nvidia/ampere ../../../common/hidpi.nix ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; hardware.nvidia.prime = { diff --git a/lenovo/legion/15ach6h/hybrid/default.nix b/lenovo/legion/15ach6h/hybrid/default.nix index 044d088b..7fa179ce 100644 --- a/lenovo/legion/15ach6h/hybrid/default.nix +++ b/lenovo/legion/15ach6h/hybrid/default.nix @@ -8,7 +8,7 @@ ../../../../common/gpu/nvidia/prime.nix ../../../../common/gpu/nvidia/ampere ../../../../common/pc/laptop - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; # Still needs to load at some point if we want X11 to work diff --git a/lenovo/legion/15arh05h/default.nix b/lenovo/legion/15arh05h/default.nix index bfff924a..554ad8ff 100644 --- a/lenovo/legion/15arh05h/default.nix +++ b/lenovo/legion/15arh05h/default.nix @@ -6,7 +6,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/turing ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # Specify bus id of Nvidia and Intel graphics. diff --git a/lenovo/legion/15ich/default.nix b/lenovo/legion/15ich/default.nix index 8aaffff8..630e1378 100644 --- a/lenovo/legion/15ich/default.nix +++ b/lenovo/legion/15ich/default.nix @@ -6,7 +6,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/pascal ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../../common/pc/laptop/hdd ]; diff --git a/lenovo/legion/16ach6h/hybrid/default.nix b/lenovo/legion/16ach6h/hybrid/default.nix index 28a68ba1..e987ecd5 100644 --- a/lenovo/legion/16ach6h/hybrid/default.nix +++ b/lenovo/legion/16ach6h/hybrid/default.nix @@ -9,7 +9,7 @@ ../../../../common/gpu/nvidia/prime.nix ../../../../common/gpu/nvidia/ampere ../../../../common/pc/laptop - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ../edid ]; diff --git a/lenovo/legion/16achg6/hybrid/default.nix b/lenovo/legion/16achg6/hybrid/default.nix index fa69491b..f61c4307 100644 --- a/lenovo/legion/16achg6/hybrid/default.nix +++ b/lenovo/legion/16achg6/hybrid/default.nix @@ -7,7 +7,7 @@ ../../../../common/gpu/amd ../../../../common/gpu/nvidia/prime.nix ../../../../common/pc/laptop - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; services.xserver.videoDrivers = [ "nvidia" ]; @@ -25,4 +25,4 @@ }; }; }; -} \ No newline at end of file +} diff --git a/lenovo/legion/16aph8/default.nix b/lenovo/legion/16aph8/default.nix index 4718cd3d..e44329fa 100644 --- a/lenovo/legion/16aph8/default.nix +++ b/lenovo/legion/16aph8/default.nix @@ -7,7 +7,7 @@ ../../../common/gpu/amd ../../../common/gpu/nvidia ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # Use latest LTS kernel for more Raphael fixes diff --git a/lenovo/legion/16arh7h/hybrid/default.nix b/lenovo/legion/16arh7h/hybrid/default.nix index af6ff64a..1654e23c 100644 --- a/lenovo/legion/16arh7h/hybrid/default.nix +++ b/lenovo/legion/16arh7h/hybrid/default.nix @@ -9,7 +9,7 @@ ../../../../common/gpu/nvidia/prime.nix # prime offload ../../../../common/gpu/nvidia/ampere # use open drivers ../../../../common/pc/laptop - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; boot.kernelModules = ["amdgpu"]; diff --git a/lenovo/legion/16arh7h/igpu-only/default.nix b/lenovo/legion/16arh7h/igpu-only/default.nix index c8e477f2..bd61814f 100644 --- a/lenovo/legion/16arh7h/igpu-only/default.nix +++ b/lenovo/legion/16arh7h/igpu-only/default.nix @@ -6,6 +6,6 @@ ../../../../common/gpu/amd ../../../../common/gpu/nvidia/disable.nix ../../../../common/pc/laptop - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; } diff --git a/lenovo/legion/16arha7/default.nix b/lenovo/legion/16arha7/default.nix index 8c258d58..c6e3a8c4 100644 --- a/lenovo/legion/16arha7/default.nix +++ b/lenovo/legion/16arha7/default.nix @@ -11,12 +11,12 @@ in ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # Kernel 6.10 includes the speaker fix, so only install this on systems with older kernels. boot.extraModulePackages = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.10") [ lenovo-speaker-fix ]; - + # √(2560² + 1600²) px / 16 in ≃ 189 dpi services.xserver.dpi = 189; diff --git a/lenovo/legion/16irx8h/default.nix b/lenovo/legion/16irx8h/default.nix index 6d9c772c..e4b6ca86 100644 --- a/lenovo/legion/16irx8h/default.nix +++ b/lenovo/legion/16irx8h/default.nix @@ -8,7 +8,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/ada-lovelace ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../../common/hidpi.nix ]; diff --git a/lenovo/legion/16irx9h/default.nix b/lenovo/legion/16irx9h/default.nix index f96bc51b..6a8077d8 100644 --- a/lenovo/legion/16irx9h/default.nix +++ b/lenovo/legion/16irx9h/default.nix @@ -8,7 +8,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/ada-lovelace ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../../common/hidpi.nix ]; diff --git a/lenovo/legion/16ithg6/default.nix b/lenovo/legion/16ithg6/default.nix index 9d6c292f..a0ee3a76 100644 --- a/lenovo/legion/16ithg6/default.nix +++ b/lenovo/legion/16ithg6/default.nix @@ -6,7 +6,7 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/ampere ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../../common/hidpi.nix ]; diff --git a/lenovo/thinkpad/e14/default.nix b/lenovo/thinkpad/e14/default.nix index c6948b35..85c83e17 100644 --- a/lenovo/thinkpad/e14/default.nix +++ b/lenovo/thinkpad/e14/default.nix @@ -3,7 +3,7 @@ { imports = [ ../. - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; boot.kernelParams = [ diff --git a/lenovo/thinkpad/e15/default.nix b/lenovo/thinkpad/e15/default.nix index a8805138..a54db80e 100644 --- a/lenovo/thinkpad/e15/default.nix +++ b/lenovo/thinkpad/e15/default.nix @@ -4,7 +4,7 @@ imports = [ ../. ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; boot.kernelParams = [ diff --git a/lenovo/thinkpad/l13/default.nix b/lenovo/thinkpad/l13/default.nix index dcf9a572..2ee6567a 100644 --- a/lenovo/thinkpad/l13/default.nix +++ b/lenovo/thinkpad/l13/default.nix @@ -2,7 +2,7 @@ { imports = [ ../../../common/cpu/intel - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../. ]; diff --git a/lenovo/thinkpad/l14/default.nix b/lenovo/thinkpad/l14/default.nix index a59ec14c..d33b4bfa 100644 --- a/lenovo/thinkpad/l14/default.nix +++ b/lenovo/thinkpad/l14/default.nix @@ -1,7 +1,7 @@ { imports = [ ../. - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; boot.kernelParams = [ diff --git a/lenovo/thinkpad/l480/default.nix b/lenovo/thinkpad/l480/default.nix index d000320d..2568433c 100644 --- a/lenovo/thinkpad/l480/default.nix +++ b/lenovo/thinkpad/l480/default.nix @@ -3,7 +3,7 @@ imports = [ ../. ../../../common/cpu/intel/kaby-lake - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # available cpufreq governors: performance powersave diff --git a/lenovo/thinkpad/p1/default.nix b/lenovo/thinkpad/p1/default.nix index f26e01b5..197bfab2 100644 --- a/lenovo/thinkpad/p1/default.nix +++ b/lenovo/thinkpad/p1/default.nix @@ -4,7 +4,7 @@ # might need nvidia module but we don't know the PCI ids: # https://github.com/NixOS/nixos-hardware/pull/274#discussion_r650483740 #../../../common/gpu/nvidia/prime.nix - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # Need to set Thunderbolt to "BIOS Assist Mode" diff --git a/lenovo/thinkpad/p14s/default.nix b/lenovo/thinkpad/p14s/default.nix index 6e87b7bc..3a19fc1c 100644 --- a/lenovo/thinkpad/p14s/default.nix +++ b/lenovo/thinkpad/p14s/default.nix @@ -6,7 +6,7 @@ imports = [ ../. - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # Force use of the amdgpu driver for backlight control on kernel versions where the diff --git a/lenovo/thinkpad/p16s/default.nix b/lenovo/thinkpad/p16s/default.nix index 53a9fdf5..83a4942f 100644 --- a/lenovo/thinkpad/p16s/default.nix +++ b/lenovo/thinkpad/p16s/default.nix @@ -1,6 +1,6 @@ { imports = [ ../. - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; } diff --git a/lenovo/thinkpad/p43s/default.nix b/lenovo/thinkpad/p43s/default.nix index 46632b79..c5e34ff0 100644 --- a/lenovo/thinkpad/p43s/default.nix +++ b/lenovo/thinkpad/p43s/default.nix @@ -2,7 +2,7 @@ imports = [ ../. ../../../common/cpu/intel/whiskey-lake - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../../common/gpu/nvidia/pascal ../../../common/gpu/nvidia/prime-sync.nix ]; diff --git a/lenovo/thinkpad/t14/default.nix b/lenovo/thinkpad/t14/default.nix index fb42f2b9..2a725bb5 100644 --- a/lenovo/thinkpad/t14/default.nix +++ b/lenovo/thinkpad/t14/default.nix @@ -3,7 +3,7 @@ { imports = [ ../. - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # For suspending to RAM to work, set Config -> Power -> Sleep State to "Linux" in EFI. diff --git a/lenovo/thinkpad/x1-extreme/default.nix b/lenovo/thinkpad/x1-extreme/default.nix index 2e4c10e0..b816d538 100644 --- a/lenovo/thinkpad/x1-extreme/default.nix +++ b/lenovo/thinkpad/x1-extreme/default.nix @@ -2,6 +2,6 @@ imports = [ ../. ../../../common/cpu/intel - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; } diff --git a/lenovo/thinkpad/x1-nano/default.nix b/lenovo/thinkpad/x1-nano/default.nix index a842d437..b67595c3 100644 --- a/lenovo/thinkpad/x1-nano/default.nix +++ b/lenovo/thinkpad/x1-nano/default.nix @@ -3,6 +3,6 @@ imports = [ ../. ../../../common/cpu/intel - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; } diff --git a/lenovo/thinkpad/x1/10th-gen/default.nix b/lenovo/thinkpad/x1/10th-gen/default.nix index 75a23d85..8f814835 100644 --- a/lenovo/thinkpad/x1/10th-gen/default.nix +++ b/lenovo/thinkpad/x1/10th-gen/default.nix @@ -1,7 +1,7 @@ { imports = [ ../. - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; # Use the right Intel graphics driver diff --git a/lenovo/thinkpad/x1/11th-gen/default.nix b/lenovo/thinkpad/x1/11th-gen/default.nix index 86c2992b..07b32232 100644 --- a/lenovo/thinkpad/x1/11th-gen/default.nix +++ b/lenovo/thinkpad/x1/11th-gen/default.nix @@ -1,7 +1,7 @@ { imports = [ ../. - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; # Use the right Intel graphics driver diff --git a/lenovo/thinkpad/x1/12th-gen/default.nix b/lenovo/thinkpad/x1/12th-gen/default.nix index 7d17c714..b13ea279 100644 --- a/lenovo/thinkpad/x1/12th-gen/default.nix +++ b/lenovo/thinkpad/x1/12th-gen/default.nix @@ -1,7 +1,7 @@ { imports = [ ../. - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; hardware.trackpoint.device = "TPPS/2 Synaptics TrackPoint"; diff --git a/lenovo/thinkpad/x1/2nd-gen/default.nix b/lenovo/thinkpad/x1/2nd-gen/default.nix index ac338c61..8d381f23 100644 --- a/lenovo/thinkpad/x1/2nd-gen/default.nix +++ b/lenovo/thinkpad/x1/2nd-gen/default.nix @@ -3,7 +3,7 @@ imports = [ ../. ../../../../common/cpu/intel/haswell - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; services.throttled.enable = lib.mkDefault true; diff --git a/lenovo/thinkpad/x1/6th-gen/default.nix b/lenovo/thinkpad/x1/6th-gen/default.nix index 264faa6c..92cefaf7 100644 --- a/lenovo/thinkpad/x1/6th-gen/default.nix +++ b/lenovo/thinkpad/x1/6th-gen/default.nix @@ -10,7 +10,7 @@ imports = [ ../. ../../../../common/cpu/intel/kaby-lake - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; # New ThinkPads have a different TrackPoint manufacturer/name. diff --git a/lenovo/thinkpad/x1/7th-gen/default.nix b/lenovo/thinkpad/x1/7th-gen/default.nix index 6dd02b8e..38c66fd0 100644 --- a/lenovo/thinkpad/x1/7th-gen/default.nix +++ b/lenovo/thinkpad/x1/7th-gen/default.nix @@ -2,7 +2,7 @@ { imports = [ ../. - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; services.throttled.enable = lib.mkDefault true; diff --git a/lenovo/thinkpad/x1/9th-gen/default.nix b/lenovo/thinkpad/x1/9th-gen/default.nix index a52f02b7..ef8bd9f1 100644 --- a/lenovo/thinkpad/x1/9th-gen/default.nix +++ b/lenovo/thinkpad/x1/9th-gen/default.nix @@ -2,7 +2,7 @@ { imports = [ ../. - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; # This solves lagging noticeable on high-resolution screens. diff --git a/lenovo/thinkpad/x1/yoga/7th-gen/default.nix b/lenovo/thinkpad/x1/yoga/7th-gen/default.nix index 20c49074..ed1a747f 100644 --- a/lenovo/thinkpad/x1/yoga/7th-gen/default.nix +++ b/lenovo/thinkpad/x1/yoga/7th-gen/default.nix @@ -1,7 +1,7 @@ { lib, pkgs, ... }: { imports = [ ../. - ../../../../../common/pc/laptop/ssd + ../../../../../common/pc/ssd ]; # At least kernel 5.19 is required for the system to work properly. diff --git a/lenovo/thinkpad/x1/yoga/8th-gen/default.nix b/lenovo/thinkpad/x1/yoga/8th-gen/default.nix index cc1676cc..d89bbd49 100644 --- a/lenovo/thinkpad/x1/yoga/8th-gen/default.nix +++ b/lenovo/thinkpad/x1/yoga/8th-gen/default.nix @@ -1,6 +1,6 @@ { imports = [ ../. - ../../../../../common/pc/laptop/ssd + ../../../../../common/pc/ssd ]; } diff --git a/lenovo/thinkpad/x13/common.nix b/lenovo/thinkpad/x13/common.nix index c45a7a67..131f468c 100644 --- a/lenovo/thinkpad/x13/common.nix +++ b/lenovo/thinkpad/x13/common.nix @@ -1,7 +1,7 @@ { ... }: { imports = [ ../. - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # Somehow psmouse does not load automatically on boot for me diff --git a/lenovo/thinkpad/x270/default.nix b/lenovo/thinkpad/x270/default.nix index 8e09d2a1..636ef145 100644 --- a/lenovo/thinkpad/x270/default.nix +++ b/lenovo/thinkpad/x270/default.nix @@ -2,7 +2,7 @@ imports = [ ../. ../../../common/cpu/intel - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; boot.kernelParams = [ diff --git a/lenovo/thinkpad/x280/default.nix b/lenovo/thinkpad/x280/default.nix index 5b6121a0..7a3b5508 100644 --- a/lenovo/thinkpad/x280/default.nix +++ b/lenovo/thinkpad/x280/default.nix @@ -4,7 +4,7 @@ imports = [ ../. ../../../common/cpu/intel - ../../../common/pc/laptop/ssd/default.nix + ../../../common/pc/ssd/default.nix ]; services.throttled.enable = lib.mkDefault true; diff --git a/lenovo/thinkpad/x390/default.nix b/lenovo/thinkpad/x390/default.nix index d06a4aea..80c893ba 100644 --- a/lenovo/thinkpad/x390/default.nix +++ b/lenovo/thinkpad/x390/default.nix @@ -4,7 +4,7 @@ imports = [ ../. ../../../common/cpu/intel - ../../../common/pc/laptop/ssd/default.nix + ../../../common/pc/ssd/default.nix ]; services.throttled.enable = lib.mkDefault true; diff --git a/lenovo/thinkpad/z/default.nix b/lenovo/thinkpad/z/default.nix index 5d8ba8ac..11dda086 100644 --- a/lenovo/thinkpad/z/default.nix +++ b/lenovo/thinkpad/z/default.nix @@ -5,7 +5,7 @@ ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; hardware.enableRedistributableFirmware = lib.mkDefault true; diff --git a/malibal/aon/s1/default.nix b/malibal/aon/s1/default.nix index 86995beb..c682a447 100644 --- a/malibal/aon/s1/default.nix +++ b/malibal/aon/s1/default.nix @@ -3,7 +3,7 @@ { imports = [ ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../../common/cpu/intel diff --git a/msi/gl62/default.nix b/msi/gl62/default.nix index 977af651..bae5dea5 100644 --- a/msi/gl62/default.nix +++ b/msi/gl62/default.nix @@ -2,7 +2,7 @@ { imports = [ - ../../common/pc/laptop/ssd + ../../common/pc/ssd ../../common/cpu/intel ../../common/gpu/nvidia/prime.nix ../../common/gpu/nvidia/pascal diff --git a/msi/gl65/10SDR-492/default.nix b/msi/gl65/10SDR-492/default.nix index 75289d4b..f2e56656 100644 --- a/msi/gl65/10SDR-492/default.nix +++ b/msi/gl65/10SDR-492/default.nix @@ -2,7 +2,7 @@ { imports = [ - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ../../../common/cpu/intel/comet-lake ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/turing diff --git a/omen/15-ce002ns/default.nix b/omen/15-ce002ns/default.nix index c787d3a0..990d59f8 100644 --- a/omen/15-ce002ns/default.nix +++ b/omen/15-ce002ns/default.nix @@ -5,7 +5,7 @@ ../../common/cpu/intel/kaby-lake ../../common/gpu/nvidia/pascal ../../common/pc/laptop - ../../common/pc/laptop/ssd + ../../common/pc/ssd ../../common/pc/laptop/hdd ]; } diff --git a/onenetbook/4/default.nix b/onenetbook/4/default.nix index 6b108b4c..251bc651 100644 --- a/onenetbook/4/default.nix +++ b/onenetbook/4/default.nix @@ -4,7 +4,7 @@ imports = [ ../../common/cpu/intel ../../common/pc/laptop - ../../common/pc/laptop/ssd + ../../common/pc/ssd ]; # OneNetbook 4 has `GXTP7386:00 27C6:011A Stylus` exporting no buttons in 5.12 diff --git a/slimbook/hero/rpl-rtx/default.nix b/slimbook/hero/rpl-rtx/default.nix index b71c22c7..f1a249de 100644 --- a/slimbook/hero/rpl-rtx/default.nix +++ b/slimbook/hero/rpl-rtx/default.nix @@ -6,7 +6,7 @@ ../../../common/gpu/nvidia/ada-lovelace ../../../common/gpu/nvidia/prime.nix ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; hardware = { diff --git a/starlabs/starlite/i5/default.nix b/starlabs/starlite/i5/default.nix index 018a5766..62e9d5a3 100644 --- a/starlabs/starlite/i5/default.nix +++ b/starlabs/starlite/i5/default.nix @@ -3,7 +3,7 @@ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; # Turn on IIO for accelerometer screen rotation. diff --git a/system76/darp6/default.nix b/system76/darp6/default.nix index 3f93993e..ff70ac94 100644 --- a/system76/darp6/default.nix +++ b/system76/darp6/default.nix @@ -28,7 +28,7 @@ in imports = [ ../. ../../common/pc/laptop - ../../common/pc/laptop/ssd + ../../common/pc/ssd ]; options.hardware.system76.darp6 = { diff --git a/tuxedo/pulse/14/gen3/default.nix b/tuxedo/pulse/14/gen3/default.nix index 34cca9ab..52d292cf 100644 --- a/tuxedo/pulse/14/gen3/default.nix +++ b/tuxedo/pulse/14/gen3/default.nix @@ -9,7 +9,7 @@ ../../../../common/cpu/amd/pstate.nix ../../../../common/cpu/amd/raphael/igpu.nix ../../../../common/pc/laptop - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; # Fixing a power-issue with older kernels. diff --git a/tuxedo/pulse/15/gen2/default.nix b/tuxedo/pulse/15/gen2/default.nix index 39ed0064..05c56055 100644 --- a/tuxedo/pulse/15/gen2/default.nix +++ b/tuxedo/pulse/15/gen2/default.nix @@ -2,7 +2,7 @@ imports = [ ../../../../common/cpu/amd ../../../../common/gpu/amd - ../../../../common/pc/laptop/ssd + ../../../../common/pc/ssd ]; services.udev.extraRules = builtins.concatStringsSep "\n" ( diff --git a/xiaomi/redmibook/16-pro-2024/default.nix b/xiaomi/redmibook/16-pro-2024/default.nix index ab76680a..35fe687d 100644 --- a/xiaomi/redmibook/16-pro-2024/default.nix +++ b/xiaomi/redmibook/16-pro-2024/default.nix @@ -4,7 +4,7 @@ ../../fix-boot-quirk.nix ../../../common/cpu/intel ../../../common/pc/laptop - ../../../common/pc/laptop/ssd + ../../../common/pc/ssd ]; hardware.enableRedistributableFirmware = lib.mkDefault true; From 33d083f55bab2d3ce5b02666630860038e9867fb Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Thu, 13 Mar 2025 11:53:24 +0000 Subject: [PATCH 1298/1476] feat(nvidia-prime): automatic battery-saver specialisation This enables a boot option that switches off NVIDIA GPU. Allows for battery saving. @moduon MT-9339 --- common/gpu/nvidia/prime.nix | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/common/gpu/nvidia/prime.nix b/common/gpu/nvidia/prime.nix index e54f942c..cf3e7d45 100644 --- a/common/gpu/nvidia/prime.nix +++ b/common/gpu/nvidia/prime.nix @@ -3,11 +3,35 @@ { imports = [ ./. ]; - hardware.nvidia.prime = { - offload = { - enable = lib.mkOverride 990 true; - enableOffloadCmd = lib.mkIf config.hardware.nvidia.prime.offload.enable true; # Provides `nvidia-offload` command. + options = { + hardware.nvidia.primeBatterySaverSpecialisation = lib.mkEnableOption "configure a specialisation which turns on NVIDIA Prime battery saver"; + }; + + config = { + + hardware.nvidia.prime = { + offload = { + enable = lib.mkOverride 990 true; + enableOffloadCmd = lib.mkIf config.hardware.nvidia.prime.offload.enable true; # Provides `nvidia-offload` command. + }; + # Hardware should specify the bus ID for intel/nvidia devices + }; + + specialisation = lib.mkIf config.hardware.nvidia.primeBatterySaverSpecialisation { + battery-saver.configuration = { + system.nixos.tags = ["battery-saver"]; + imports = [ + # Leave only the integrated GPU enabled + ./disable.nix + ]; + hardware.nvidia = { + prime.offload.enable = lib.mkForce false; + powerManagement = { + enable = lib.mkForce false; + finegrained = lib.mkForce false; + }; + }; + }; }; - # Hardware should specify the bus ID for intel/nvidia devices }; } From 9b383cd3f4364ee37728978c8daa33e4f4b2f5f1 Mon Sep 17 00:00:00 2001 From: Or Dagmi Date: Wed, 7 May 2025 15:07:45 +0300 Subject: [PATCH 1299/1476] Adding gen6 support for lenovo thinkpad e14 (#1470) Co-authored-by: DiGMi --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/e14/intel/gen6/default.nix | 10 ++++++++++ 3 files changed, 12 insertions(+) create mode 100644 lenovo/thinkpad/e14/intel/gen6/default.nix diff --git a/README.md b/README.md index 6245e507..f3c411b8 100644 --- a/README.md +++ b/README.md @@ -238,6 +238,7 @@ See code for all available configurations. | [Lenovo ThinkPad A475](lenovo/thinkpad/a475) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | +| [Lenovo ThinkPad E14 (Intel - Gen 6)](lenovo/thinkpad/e14/intel/gen6) | `` | | [Lenovo ThinkPad E15 (Intel)](lenovo/thinkpad/e15/intel) | `` | | [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | | [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | diff --git a/flake.nix b/flake.nix index e48d1bd9..badd9ab7 100644 --- a/flake.nix +++ b/flake.nix @@ -181,6 +181,7 @@ lenovo-thinkpad-a475 = import ./lenovo/thinkpad/a475; lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel; + lenovo-thinkpad-e14-intel-gen6 = import ./lenovo/thinkpad/e14/intel/gen6; lenovo-thinkpad-e15-intel = import ./lenovo/thinkpad/e15/intel; lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; lenovo-thinkpad-e495 = import ./lenovo/thinkpad/e495; diff --git a/lenovo/thinkpad/e14/intel/gen6/default.nix b/lenovo/thinkpad/e14/intel/gen6/default.nix new file mode 100644 index 00000000..2e4505dd --- /dev/null +++ b/lenovo/thinkpad/e14/intel/gen6/default.nix @@ -0,0 +1,10 @@ +{ lib, ... }: + +{ + imports = [ + ../../. + ../../../../../common/cpu/intel/meteor-lake + ]; + + services.throttled.enable = lib.mkDefault false; +} From aaa8e548c34cd261deb760f1641957d6926c7913 Mon Sep 17 00:00:00 2001 From: Florian Pester Date: Wed, 7 May 2025 09:10:30 +0200 Subject: [PATCH 1300/1476] E14-intel: add gen4 configuration --- README.md | 5 +++-- flake.nix | 1 + lenovo/thinkpad/e14/intel/gen4/default.nix | 11 +++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 lenovo/thinkpad/e14/intel/gen4/default.nix diff --git a/README.md b/README.md index f3c411b8..66108eb7 100644 --- a/README.md +++ b/README.md @@ -237,7 +237,8 @@ See code for all available configurations. | [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | | [Lenovo ThinkPad A475](lenovo/thinkpad/a475) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | -| [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | +| [Lenovo ThinkPad E14 (Intel - Gen 1)](lenovo/thinkpad/e14/intel) | `` | +| [Lenovo ThinkPad E14 (Intel - Gen 4)](lenovo/thinkpad/e14/intel/gen4) | `` | | [Lenovo ThinkPad E14 (Intel - Gen 6)](lenovo/thinkpad/e14/intel/gen6) | `` | | [Lenovo ThinkPad E15 (Intel)](lenovo/thinkpad/e15/intel) | `` | | [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | @@ -258,7 +259,7 @@ See code for all available configurations. | [Lenovo ThinkPad P16s AMD Gen 2](lenovo/thinkpad/p16s/amd/gen2) | `` | | [Lenovo ThinkPad P16s Intel Gen 2](lenovo/thinkpad/p16s/intel/gen2) | `` | | [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | -| [Lenovo ThinkPad P43s](lenovo/thinkpad/p43s) | `` | +| [Lenovo ThinkPad P43s](lenovo/thinkpad/p43s) | `` | | [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | | [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `` | | [Lenovo ThinkPad P52](lenovo/thinkpad/p52) | `` | diff --git a/flake.nix b/flake.nix index badd9ab7..8a93ad4c 100644 --- a/flake.nix +++ b/flake.nix @@ -181,6 +181,7 @@ lenovo-thinkpad-a475 = import ./lenovo/thinkpad/a475; lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel; + lenovo-thinkpad-e14-intel-gen4 = import ./lenovo/thinkpad/e14/intel/gen4; lenovo-thinkpad-e14-intel-gen6 = import ./lenovo/thinkpad/e14/intel/gen6; lenovo-thinkpad-e15-intel = import ./lenovo/thinkpad/e15/intel; lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; diff --git a/lenovo/thinkpad/e14/intel/gen4/default.nix b/lenovo/thinkpad/e14/intel/gen4/default.nix new file mode 100644 index 00000000..c79cf8bb --- /dev/null +++ b/lenovo/thinkpad/e14/intel/gen4/default.nix @@ -0,0 +1,11 @@ +{ lib, ... }: + +{ + imports = [ + ../../. + ../../../../../common/cpu/intel/alder-lake + ]; + + services.throttled.enable = lib.mkDefault false; + hardware.intelgpu.driver = "xe"; +} From c40135076deb53668394a023c0220303c0126007 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Mon, 5 May 2025 23:42:16 +0200 Subject: [PATCH 1301/1476] Ensure WiFi works out-of-the-box on XPS13 Inspired by https://github.com/NixOS/nixos-hardware/blob/master/dell/inspiron/3442/default.nix --- dell/xps/13-9343/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/dell/xps/13-9343/default.nix b/dell/xps/13-9343/default.nix index 98e0c417..db7012b9 100644 --- a/dell/xps/13-9343/default.nix +++ b/dell/xps/13-9343/default.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ config, lib, ... }: { imports = [ @@ -7,6 +7,14 @@ ../../../common/pc/ssd ]; - # This will save you money and possibly your life! - services.thermald.enable = lib.mkDefault true; + services = { + fwupd.enable = lib.mkDefault true; + thermald.enable = lib.mkDefault true; + }; + + boot = { + # needs to be explicitly loaded or else bluetooth/wifi won't work + kernelModules = [ "wl" ]; + extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + }; } From 3c5e12673265dfb0de3d9121420c0c2153bf21e0 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Mon, 5 May 2025 23:54:38 +0200 Subject: [PATCH 1302/1476] Add kvm-intel kernel module for XPS13 --- dell/xps/13-9343/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dell/xps/13-9343/default.nix b/dell/xps/13-9343/default.nix index db7012b9..9cab0427 100644 --- a/dell/xps/13-9343/default.nix +++ b/dell/xps/13-9343/default.nix @@ -14,7 +14,7 @@ boot = { # needs to be explicitly loaded or else bluetooth/wifi won't work - kernelModules = [ "wl" ]; + kernelModules = [ "kvm-intel" "wl" ]; extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; }; } From 0d3ca7531030e2a405e6e7f885cc07681cac6aba Mon Sep 17 00:00:00 2001 From: Michael Hess Date: Sun, 11 May 2025 15:39:42 -0400 Subject: [PATCH 1303/1476] add asus-rog-strix-g533zw --- README.md | 1 + asus/rog-strix/g533zw/default.nix | 17 +++++++++++++++++ flake.nix | 1 + 3 files changed, 19 insertions(+) create mode 100644 asus/rog-strix/g533zw/default.nix diff --git a/README.md b/README.md index 66108eb7..0a6abb05 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,7 @@ See code for all available configurations. | [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/amdgpu) | `` | | [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/nvidia) | `` | | [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | +| [Asus ROG Strix G533ZW](asus/rog-strix/g533zw) | `` | | [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Strix X570-E GAMING](asus/rog-strix/x570e) | `` | diff --git a/asus/rog-strix/g533zw/default.nix b/asus/rog-strix/g533zw/default.nix new file mode 100644 index 00000000..635ae559 --- /dev/null +++ b/asus/rog-strix/g533zw/default.nix @@ -0,0 +1,17 @@ +{ ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ampere + ../../../common/pc/laptop + ../../../common/pc/ssd + ../../battery.nix + ]; + + hardware.nvidia.prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} diff --git a/flake.nix b/flake.nix index 8a93ad4c..64f968ce 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,7 @@ asus-flow-gv302x-nvidia = import ./asus/flow/gv302x/nvidia; asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace; asus-rog-strix-g513im = import ./asus/rog-strix/g513im; + asus-rog-strix-g533zw = import ./asus/rog-strix/g533zw; asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-rog-strix-x570e = import ./asus/rog-strix/x570e; From 16023fe3d4d48a79deaa3ebd9385716ef038a211 Mon Sep 17 00:00:00 2001 From: Flameopathic Date: Sun, 11 May 2025 21:38:50 -0400 Subject: [PATCH 1304/1476] lenovo/yoga/7/14ILL10: init --- README.md | 1 + flake.nix | 1 + lenovo/yoga/7/14ILL10/README.md | 3 +++ lenovo/yoga/7/14ILL10/default.nix | 13 +++++++++++++ 4 files changed, 18 insertions(+) create mode 100644 lenovo/yoga/7/14ILL10/README.md create mode 100644 lenovo/yoga/7/14ILL10/default.nix diff --git a/README.md b/README.md index 66108eb7..8bea731f 100644 --- a/README.md +++ b/README.md @@ -328,6 +328,7 @@ See code for all available configurations. | [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `` | | [Lenovo Yoga Slim 7i Pro X 14IAH7 (Integrated)](lenovo/yoga/7/14IAH7/integrated) | `` | | [Lenovo Yoga Slim 7i Pro X 14IAH7 (Hybrid)](lenovo/yoga/7/14IAH7/hybrid) | `` | +| [Lenovo Yoga Slim 7 14ILL10](lenovo/yoga/7/14ILL10) | `` | | [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `` | | [MSI B550-A PRO](msi/b550-a-pro) | `` | | [MSI B350 TOMAHAWK](msi/b350-tomahawk) | `` | diff --git a/flake.nix b/flake.nix index 8a93ad4c..cbf9a2de 100644 --- a/flake.nix +++ b/flake.nix @@ -275,6 +275,7 @@ lenovo-yoga-7-14ARH7-nvidia = import ./lenovo/yoga/7/14ARH7/nvidia; lenovo-yoga-7-14IAH7-integrated = import ./lenovo/yoga/7/14IAH7/integrated; lenovo-yoga-7-14IAH7-hybrid = import ./lenovo/yoga/7/14IAH7/hybrid; + lenovo-yoga-7-14ILL10 = import ./lenovo/yoga/7/14ILL10; lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; malibal-aon-s1-intel = import ./malibal/aon/s1; diff --git a/lenovo/yoga/7/14ILL10/README.md b/lenovo/yoga/7/14ILL10/README.md new file mode 100644 index 00000000..602dc465 --- /dev/null +++ b/lenovo/yoga/7/14ILL10/README.md @@ -0,0 +1,3 @@ +# Lenovo Slim 7 14ILL10 + +This module imports configuration for the Lunar Lake processors as well as ensuring that the Linux kernel is up to date enough for most features to be available. This does not make the device's built-in speakers or audio jack function. diff --git a/lenovo/yoga/7/14ILL10/default.nix b/lenovo/yoga/7/14ILL10/default.nix new file mode 100644 index 00000000..9c9ca25e --- /dev/null +++ b/lenovo/yoga/7/14ILL10/default.nix @@ -0,0 +1,13 @@ +{ lib, pkgs, ... }: +{ + imports = [ + ../../../../common/cpu/intel/lunar-lake + ../../../../common/pc/laptop + ../../../../common/pc/ssd + ]; + + # touchpad, wifi, and bluetooth do not work before 6.12 + config.boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.12") ( + lib.mkDefault pkgs.linuxPackages_latest + ); +} From b83e517bfc92868c6e7e216d4373ea3edb19d876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 13 May 2025 08:10:23 +0200 Subject: [PATCH 1305/1476] bump tests/flake.nix to 24.11 --- tests/flake.lock | 52 +++++++++++++++++++++++++----------------------- tests/flake.nix | 5 ++--- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/tests/flake.lock b/tests/flake.lock index c0ee1775..ba2dc9ab 100644 --- a/tests/flake.lock +++ b/tests/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1736143030, - "narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=", + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1736232973, - "narHash": "sha256-8YT/8TMwWRRYFiLWMS98wPW50YBwYeErX7nQ7EmSaVA=", + "lastModified": 1747083103, + "narHash": "sha256-dMx20S2molwqJxbmMB4pGjNfgp5H1IOHNa1Eby6xL+0=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "3713545aca79365cba20d7873b6e51044890b4e8", + "rev": "d1d68fe8b00248caaa5b3bbe4984c12b47e0867d", "type": "github" }, "original": { @@ -37,34 +37,36 @@ }, "nixos-stable": { "locked": { - "lastModified": 1735563628, - "narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798", - "type": "github" + "lastModified": 1746957726, + "narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=", + "ref": "nixos-24.11", + "rev": "a39ed32a651fdee6842ec930761e31d1f242cb94", + "shallow": true, + "type": "git", + "url": "https://github.com/NixOS/nixpkgs" }, "original": { - "owner": "NixOS", - "ref": "nixos-24.05", - "repo": "nixpkgs", - "type": "github" + "ref": "nixos-24.11", + "shallow": true, + "type": "git", + "url": "https://github.com/NixOS/nixpkgs" } }, "nixos-unstable-small": { "locked": { - "lastModified": 1736208088, - "narHash": "sha256-2030VBfWuPLPEUrONVY/uF79EuNCztKunuKLgKkQWqM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "42de2bcb35ccf24626325bd6114ef9d812eaeb0d", - "type": "github" + "lastModified": 1747040834, + "narHash": "sha256-iKQKoNlZmxQq+O2WfImm/jn97g5GZBVW5EZEoCTXZ3I=", + "ref": "nixos-unstable-small", + "rev": "e4f52f3ea82ddd3754b467e3fdc0d709685c9a05", + "shallow": true, + "type": "git", + "url": "https://github.com/NixOS/nixpkgs" }, "original": { - "owner": "NixOS", "ref": "nixos-unstable-small", - "repo": "nixpkgs", - "type": "github" + "shallow": true, + "type": "git", + "url": "https://github.com/NixOS/nixpkgs" } }, "root": { diff --git a/tests/flake.nix b/tests/flake.nix index 2e65b843..91de6edf 100644 --- a/tests/flake.nix +++ b/tests/flake.nix @@ -2,8 +2,8 @@ description = "Test flake for nixos-hardware"; inputs = { - nixos-unstable-small.url = "github:NixOS/nixpkgs/nixos-unstable-small"; - nixos-stable.url = "github:NixOS/nixpkgs/nixos-24.05"; + nixos-unstable-small.url = "git+https://github.com/NixOS/nixpkgs?shallow=1&ref=nixos-unstable-small"; + nixos-stable.url = "git+https://github.com/NixOS/nixpkgs?shallow=1&ref=nixos-24.11"; # override in the test nixos-hardware.url = "github:NixOS/nixos-hardware"; flake-parts.url = "github:hercules-ci/flake-parts"; @@ -23,7 +23,6 @@ system, lib, pkgs, - inputs', ... }: let From d371c70b454935c787c237550bc21debab684f30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 13 May 2025 08:11:36 +0200 Subject: [PATCH 1306/1476] docs/CONTRIBUTING: replace bors with mergify --- CONTRIBUTING.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 22e78dd4..63a147a7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,8 +48,6 @@ assurance is up to *you*. # For reviewers: -This repository has bors enabled for easier merging after a successfull build: +This repository has [mergify](https://mergify.com/) enabled for easier merging after a successfull build: -* `bors try` - check if the PR builds. -* `bors merge` - same as `bors try` but will also merge the PR if it builds successfully. -* https://bors.tech/documentation/ +* `@mergify queue` will add the current pull request to the merge queue and merge when all tests succeed From 91dc75a805501815969342ad1672e9b553d1f95b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 13 May 2025 08:14:17 +0200 Subject: [PATCH 1307/1476] fix system.stateVersion for tests --- tests/build-profile.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/build-profile.nix b/tests/build-profile.nix index 786fa8b6..36ab88b5 100644 --- a/tests/build-profile.nix +++ b/tests/build-profile.nix @@ -16,6 +16,6 @@ device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000"; fsType = "btrfs"; }; - system.stateVersion = lib.version; + system.stateVersion = config.system.nixos.release; }) ]).config.system.build.toplevel From 5aa1b0f04942d01cb51b4e865d2ca161ce14a818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 13 May 2025 08:21:52 +0200 Subject: [PATCH 1308/1476] dell-xps-15-9530-nvidia: include ada-lovelace profile --- dell/xps/15-9530/nvidia/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/dell/xps/15-9530/nvidia/default.nix b/dell/xps/15-9530/nvidia/default.nix index 257462a4..e82bada6 100644 --- a/dell/xps/15-9530/nvidia/default.nix +++ b/dell/xps/15-9530/nvidia/default.nix @@ -3,6 +3,7 @@ imports = [ ../default.nix ../../../../common/gpu/nvidia/prime.nix + ../../../../common/gpu/nvidia/ada-lovelace ]; hardware.nvidia.prime = { From ff949f78d6b04a5294ff059cf7cdce9638ea8a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 13 May 2025 11:41:12 +0200 Subject: [PATCH 1309/1476] ideacentr-k330: include nvidia-fermi architecture --- common/gpu/nvidia/fermi/default.nix | 7 +++++++ lenovo/ideacentre/k330/default.nix | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 common/gpu/nvidia/fermi/default.nix diff --git a/common/gpu/nvidia/fermi/default.nix b/common/gpu/nvidia/fermi/default.nix new file mode 100644 index 00000000..0f5c47f0 --- /dev/null +++ b/common/gpu/nvidia/fermi/default.nix @@ -0,0 +1,7 @@ +{ ... }: +{ + imports = [ ../. ]; + + # The open source driver does not support Fermi GPUs. + hardware.nvidia.open = false; +} diff --git a/lenovo/ideacentre/k330/default.nix b/lenovo/ideacentre/k330/default.nix index 381276fc..ff5cf3c4 100644 --- a/lenovo/ideacentre/k330/default.nix +++ b/lenovo/ideacentre/k330/default.nix @@ -2,7 +2,7 @@ { imports = [ ../../../common/cpu/intel - ../../../common/gpu/nvidia # Is it possible/advisable to pin this to the 390.xx driver family in case the user wants to use non-free drivers? + ../../../common/gpu/nvidia/fermi # Is it possible/advisable to pin this to the 390.xx driver family in case the user wants to use non-free drivers? ../../../common/gpu/amd # The K330 could be bought with AMD GPUs but I don't have that configuration ../../../common/pc ]; @@ -14,6 +14,6 @@ # What if somebody installs both plasma AND another DE? # The goal is to prefer x11 over wayland due to compatibility issues with the old hardware - + services.displayManager.defaultSession = lib.mkIf config.services.xserver.desktopManager.plasma6.enable (lib.mkDefault "plasmax11"); -} \ No newline at end of file +} From f139290af12744eca2a5b460ea6cfb1dceded227 Mon Sep 17 00:00:00 2001 From: Johannes Arnold Date: Tue, 13 May 2025 08:12:08 +0200 Subject: [PATCH 1310/1476] TUXEDO Infinitybook: Enable bluetooth by default --- tuxedo/infinitybook/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tuxedo/infinitybook/default.nix b/tuxedo/infinitybook/default.nix index 99f53fcd..a0f21a44 100644 --- a/tuxedo/infinitybook/default.nix +++ b/tuxedo/infinitybook/default.nix @@ -5,8 +5,12 @@ ../../common/pc/ssd ]; - # Enable TUXEDO's kernel drivers if they are available - hardware = lib.optionalAttrs (options.hardware ? tuxedo-drivers) { - tuxedo-drivers.enable = lib.mkDefault true; - }; + hardware = + lib.mkDefault { + bluetooth.enable = true; + } + # Enable TUXEDO's kernel drivers if they are available + // lib.optionalAttrs (options.hardware ? tuxedo-drivers) { + tuxedo-drivers.enable = true; + }; } From 45da8c8ad8f77302ab3cbbcda7a113507f8ecebb Mon Sep 17 00:00:00 2001 From: "Winston R. Milling" Date: Sun, 18 May 2025 10:22:14 -0500 Subject: [PATCH 1311/1476] lenovo/legion/15ich: Use Coffee Lake CPU --- lenovo/legion/15ich/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/legion/15ich/default.nix b/lenovo/legion/15ich/default.nix index 630e1378..881e7bce 100644 --- a/lenovo/legion/15ich/default.nix +++ b/lenovo/legion/15ich/default.nix @@ -2,7 +2,7 @@ { imports = [ - ../../../common/cpu/intel + ../../../common/cpu/intel/coffee-lake ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/pascal ../../../common/pc/laptop From 687c8fcf681371df084ad98b6211b928163b7394 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Mon, 19 May 2025 13:54:40 +0200 Subject: [PATCH 1312/1476] X1 Yoga: Enable fingerprint reader and FW update --- lenovo/thinkpad/x1/yoga/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lenovo/thinkpad/x1/yoga/default.nix b/lenovo/thinkpad/x1/yoga/default.nix index dfabfd41..2b13440f 100644 --- a/lenovo/thinkpad/x1/yoga/default.nix +++ b/lenovo/thinkpad/x1/yoga/default.nix @@ -4,5 +4,9 @@ ../../yoga.nix ]; - services.xserver.wacom.enable = lib.mkDefault config.services.xserver.enable; + services = { + fprintd.enable = lib.mkDefault true; + fwupd.enable = lib.mkDefault true; + xserver.wacom.enable = lib.mkDefault config.services.xserver.enable; + }; } From a9a7323a067284b5546beef7221ce49a1f3b8d24 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Mon, 19 May 2025 22:20:12 +0800 Subject: [PATCH 1313/1476] framework: Add framework12 Signed-off-by: Daniel Schaefer --- README.md | 1 + flake.nix | 1 + framework/12-inch/13th-gen-intel/README.md | 17 +++++++++++++++++ framework/12-inch/13th-gen-intel/default.nix | 7 +++++++ framework/12-inch/common/default.nix | 19 +++++++++++++++++++ 5 files changed, 45 insertions(+) create mode 100644 framework/12-inch/13th-gen-intel/README.md create mode 100644 framework/12-inch/13th-gen-intel/default.nix create mode 100644 framework/12-inch/common/default.nix diff --git a/README.md b/README.md index cbc8896d..d3522b00 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,7 @@ See code for all available configurations. | [Framework Intel Core Ultra Series 1](framework/13-inch/intel-core-ultra-series1) | `` | | [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | | [Framework 13 AMD AI 300 Series](framework/13-inch/amd-ai-300-series) | `` | +| [Framework 12 13th Gen Intel Core](framework/12-inch/13th-gen-intel) | `` | | [Framework 16 AMD Ryzen 7040 Series](framework/16-inch/7040-amd) | `` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | | [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | diff --git a/flake.nix b/flake.nix index 9d3dacb2..5f93fd25 100644 --- a/flake.nix +++ b/flake.nix @@ -124,6 +124,7 @@ framework-11th-gen-intel = import ./framework/13-inch/11th-gen-intel; framework-12th-gen-intel = import ./framework/13-inch/12th-gen-intel; framework-13th-gen-intel = import ./framework/13-inch/13th-gen-intel; + framework-12-13th-gen-intel = import ./framework/12-inch/13th-gen-intel; framework-intel-core-ultra-series1 = import ./framework/13-inch/intel-core-ultra-series1; framework-13-7040-amd = import ./framework/13-inch/7040-amd; framework-amd-ai-300-series = import ./framework/13-inch/amd-ai-300-series; diff --git a/framework/12-inch/13th-gen-intel/README.md b/framework/12-inch/13th-gen-intel/README.md new file mode 100644 index 00000000..6d35825f --- /dev/null +++ b/framework/12-inch/13th-gen-intel/README.md @@ -0,0 +1,17 @@ +# [Framework Laptop 12](https://frame.work/laptop12) + +## Updating Firmware + +First put enable `fwupd` + +```nix +services.fwupd.enable = true; +``` + +Then run + +```sh + $ fwupdmgr update +``` + +- [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop12.RPL.BIOS.firmware) diff --git a/framework/12-inch/13th-gen-intel/default.nix b/framework/12-inch/13th-gen-intel/default.nix new file mode 100644 index 00000000..6431338a --- /dev/null +++ b/framework/12-inch/13th-gen-intel/default.nix @@ -0,0 +1,7 @@ +{ config, lib, ... }: +{ + imports = [ + ../common + ../../../common/cpu/intel + ]; +} diff --git a/framework/12-inch/common/default.nix b/framework/12-inch/common/default.nix new file mode 100644 index 00000000..88195ea6 --- /dev/null +++ b/framework/12-inch/common/default.nix @@ -0,0 +1,19 @@ +{ lib, config, ... }: +{ + imports = [ + ../../../common/pc/laptop + ../../../common/pc/ssd + ../../bluetooth.nix + ../../kmod.nix + ../../framework-tool.nix + ]; + + # Fix TRRS headphones missing a mic + # https://github.com/torvalds/linux/commit/7b509910b3ad6d7aacead24c8744de10daf8715d + boot.extraModprobeConfig = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.13.0") '' + options snd-hda-intel model=dell-headset-multi + ''; + + # Needed for desktop environments to detect display orientation + hardware.sensor.iio.enable = lib.mkDefault true; +} From ee94f43c05e80c7a7e5d94ec78426f2bc92a63dd Mon Sep 17 00:00:00 2001 From: Bu Kun <65808665+pokon548@users.noreply.github.com> Date: Sun, 18 May 2025 17:23:47 +0800 Subject: [PATCH 1314/1476] Add Lenovo Ideapad 5 Pro 14IMH9 / XiaoXin Pro 14IMH9 2024 --- README.md | 2 + flake.nix | 1 + lenovo/ideapad/14imh9/README.md | 16 +++++ lenovo/ideapad/14imh9/default.nix | 110 ++++++++++++++++++++++++++++++ 4 files changed, 129 insertions(+) create mode 100644 lenovo/ideapad/14imh9/README.md create mode 100644 lenovo/ideapad/14imh9/default.nix diff --git a/README.md b/README.md index cbc8896d..a329894f 100644 --- a/README.md +++ b/README.md @@ -215,6 +215,7 @@ See code for all available configurations. | [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `` | | [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | | [Lenovo IdeaPad Gaming 3 15ach6](lenovo/ideapad/15ach6) | `` | +| [Lenovo IdeaPad 5 Pro 14imh9](lenovo/ideapad/14imh9) | `` | | [Lenovo IdeaPad 5 Pro 16ach6](lenovo/ideapad/16ach6) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | @@ -324,6 +325,7 @@ See code for all available configurations. | [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | | [Lenovo ThinkPad Z13 Gen 1](lenovo/thinkpad/z/gen1/z13) | `` | | [Lenovo ThinkPad Z13 Gen 2](lenovo/thinkpad/z/gen2/z13) | `` | +| [Lenovo XiaoXin Pro 14imh9 2024](lenovo/ideapad/14imh9) | `` | | [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | | [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/amdgpu) | `` | | [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `` | diff --git a/flake.nix b/flake.nix index 9d3dacb2..a091503f 100644 --- a/flake.nix +++ b/flake.nix @@ -153,6 +153,7 @@ hp-notebook-14-df0023 = import ./hp/notebook/14-df0023; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; lenovo-ideacentre-k330 = import ./lenovo/ideacentre/k330; + lenovo-ideapad-14imh9 = import ./lenovo/ideapad/14imh9; lenovo-ideapad-15alc6 = import ./lenovo/ideapad/15alc6; lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; lenovo-ideapad-15ach6 = import ./lenovo/ideapad/15ach6; diff --git a/lenovo/ideapad/14imh9/README.md b/lenovo/ideapad/14imh9/README.md new file mode 100644 index 00000000..f3950701 --- /dev/null +++ b/lenovo/ideapad/14imh9/README.md @@ -0,0 +1,16 @@ +# Lenovo Ideapad 5 Pro 14IMH9 / XiaoXin Pro 14IMH9 2024 + +These devices support Conservation mode which charges the battery to 79/80%. See [TLP docs](https://linrunner.de/tlp/settings/bc-vendors.html#lenovo-non-thinkpad-series) and [auto-cpu freq](https://github.com/AdnanHodzic/auto-cpufreq?tab=readme-ov-file#battery-charging-thresholds) to enable it. + +`lspci`: +``` +00:02.0 VGA compatible controller: Intel Corporation Meteor Lake-P [Intel Arc Graphics] (rev 08) +``` +There is no dedicated graphics card. See specs [here](https://psref.lenovo.com/syspool/Sys/PDF/IdeaPad/IdeaPad_Pro_5_14IMH9/IdeaPad_Pro_5_14IMH9_Spec.pdf). + +## Extra Configuration +### Bluetooth +To enable bluetooth support, set `hardware.bluetooth.enable = true;`. + +### Sound +This laptop need extra firmware for hi-quality sound. To enable that, set `hardware.firmware = [ pkgs.sof-firmware ];`. \ No newline at end of file diff --git a/lenovo/ideapad/14imh9/default.nix b/lenovo/ideapad/14imh9/default.nix new file mode 100644 index 00000000..f2bb0f52 --- /dev/null +++ b/lenovo/ideapad/14imh9/default.nix @@ -0,0 +1,110 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../../common/cpu/intel/meteor-lake + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + boot = { + # Workaround: Out of the box, resuming from hibernation will break sounds. + # See https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/766 + extraModprobeConfig = '' + options snd-hda-intel model=generic + options snd-hda-intel snd-intel-dspcfg.dsp_driver=1 + blacklist snd_soc_skl + ''; + + kernelParams = [ + # Workaround: i915 0000:00:02.0: [drm] *ERROR* Atomic update failure on pipe A + # See https://www.dedoimedo.com/computers/intel-microcode-atomic-update.html + "i915.enable_psr=0" + + # Workaround: Seems like guc on VT-d is faulty and may also cause GUC: TLB invalidation response timed out. + # It will cause random gpu resets under hw video decoding. + # See https://wiki.archlinux.org/title/Dell_XPS_16_(9640)#Random_freezes + "iommu.strict=1" + "iommu.passthrough=1" + ]; + }; + + environment.variables = { + # Workaround: GPU HANG: ecode 12:1:85dffdfb, in CanvasRenderer [4408] + # See https://gitlab.freedesktop.org/mesa/mesa/-/issues/7755 + INTEL_DEBUG = "no32"; + }; + + systemd = { + # Workaround: Sometimes xhci driver will become malfunctional after resuming from hibernate / suspend. + # This will cause (almost) all external devices stop working. + # A simple reset is enough to bring external devices alive :) + # + # Note: to avoid unnecessary resets, we firstly check if integrated camera is presented + # (Should always be there as it was built into machine!). + # If not, just do the reset. + services.workaround-reset-xhci-driver-after-resume-if-needed = { + script = '' + result=$(${pkgs.usbutils}/bin/lsusb | ${pkgs.gnugrep}/bin/grep Chicony) + if [[ -z $result ]]; then + ${pkgs.kmod}/bin/rmmod xhci_pci xhci_hcd + ${pkgs.kmod}/bin/modprobe xhci_pci xhci_hcd + fi + ''; + after = [ + "suspend.target" + "hibernate.target" + "hybrid-sleep.target" + ]; + wantedBy = [ + "suspend.target" + "hibernate.target" + "hybrid-sleep.target" + "multi-user.target" + ]; + }; + + # Workaround: Lenovo seems write bad acpi power management firmware. Without this config, + # suspend (to ram / disk) will simply reboot instead of power off. :( + sleep.extraConfig = '' + HibernateMode=shutdown + ''; + }; + + # TPM2 module + security.tpm2.enable = lib.mkDefault true; + + hardware = { + enableRedistributableFirmware = lib.mkDefault true; # WiFi + + # Workaround: Lenovo wrote bad screen edid firmware that will cause system + # not able to use 120Hz screen fresh rate. + # Manually patch it with correct value fixes this problem. + # + # TODO: This laptop actually support VRR (Variable refresh rate). + # But I do not have any interests in supporting this. + # PR is welecomed :) + display = { + edid.packages = [ + (pkgs.runCommand "edid-14imh9" { } '' + mkdir -p "$out/lib/firmware/edid" + base64 -d > "$out/lib/firmware/edid/14imh9.bin" <<'EOF' + AP///////wAObxYUAAAAAAAgAQS1HhN4AyEVqFNJnCUPUFQAAAABAQEBAQEBAQEBAQEBAQEBzodAoLAIanAwIDYALbwQAAAYAAAA/QAoeOXlRgEKICAgICAgAAAA/gBDU09UIFQzCiAgICAgAAAA/gBNTkUwMDdaQTEtNQogAa9wE3kAAAMBFJoPAQU/C58ALwAfAAcHaQACAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4kA== + EOF + '') + ]; + + outputs = { + "eDP-1".edid = "14imh9.bin"; + }; + }; + + i2c.enable = lib.mkDefault true; # Touchpad + }; + + services = { + fwupd.enable = lib.mkDefault true; # Firmware Upgrades. Partially supported. + hardware.bolt.enable = lib.mkDefault true; # Thunderbolt + thermald.enable = lib.mkDefault true; # This will save you money and possibly your life! + }; +} From 4165eb0f7983e0e0aad9b71b5a6aa2bc5389d28c Mon Sep 17 00:00:00 2001 From: spaceoden <26421479+spaceoden@users.noreply.github.com> Date: Wed, 21 May 2025 11:18:34 -0400 Subject: [PATCH 1315/1476] fix typo in framework audio.nix --- framework/13-inch/common/audio.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/13-inch/common/audio.nix b/framework/13-inch/common/audio.nix index b6aa6d65..8133ab88 100644 --- a/framework/13-inch/common/audio.nix +++ b/framework/13-inch/common/audio.nix @@ -14,7 +14,7 @@ in This option requires PipeWire and WirePlumber. The filter chain includes the following: - - Pyschoacoustic bass enhancement + - Psychoacoustic bass enhancement - Loudness compensation - Equalizer - Slight compression From 03107726cd65509db5dead83b1599e90efa9e0ed Mon Sep 17 00:00:00 2001 From: Danny Freeman Date: Wed, 21 May 2025 22:23:41 -0400 Subject: [PATCH 1316/1476] Change libusb to libusb1 in pinebook keyboard updater This error is shown after updating to nixos 24.11 > error: 'libusb' has been renamed to/replaced by 'libusb1' --- pine64/pinebook-pro/keyboard-updater/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pine64/pinebook-pro/keyboard-updater/default.nix b/pine64/pinebook-pro/keyboard-updater/default.nix index 3f3cf712..3138277f 100644 --- a/pine64/pinebook-pro/keyboard-updater/default.nix +++ b/pine64/pinebook-pro/keyboard-updater/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, xxd, libusb }: +{ stdenv, fetchFromGitHub, xxd, libusb1 }: stdenv.mkDerivation { pname = "pinebook-pro-keyboard-updater"; @@ -9,7 +9,7 @@ stdenv.mkDerivation { ]; buildInputs = [ - libusb + libusb1 ]; installPhase = '' From 4ce6bba2f7c0d13b930685068e964dfd9f542fe1 Mon Sep 17 00:00:00 2001 From: Ganga Ram Date: Wed, 21 May 2025 16:51:52 +0400 Subject: [PATCH 1317/1476] Update correct hash for imx mkimage utility - Don't fetch dotGit directory. - Dot git dir gets different object packs when it is pulled from different nixpkgs versions which causes hash mismatch. - Patch Makefile not use git revision from .git. Signed-off-by: Ganga Ram --- nxp/imx8mp-evk/bsp/imx8mp-boot.nix | 15 +++++++++------ nxp/imx8mq-evk/bsp/imx8mq-boot.nix | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/nxp/imx8mp-evk/bsp/imx8mp-boot.nix b/nxp/imx8mp-evk/bsp/imx8mp-boot.nix index c078f9ca..b7fec803 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-boot.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-boot.nix @@ -15,18 +15,21 @@ with pkgs; let imx8mp-firmware = pkgs.callPackage ./imx8mp-firmware.nix {}; imx8mp-uboot = pkgs.callPackage ./imx8mp-uboot.nix {}; imx8mp-optee-os = pkgs.callPackage ./imx8mp-optee-os.nix {}; + src = pkgs.fetchgit { + url = "https://github.com/nxp-imx/imx-mkimage.git"; + rev = "c4365450fb115d87f245df2864fee1604d97c06a"; + sha256 = "sha256-KVIVHwBpAwd1RKy3RrYxGIniE45CDlN5RQTXsMg1Jwk="; + }; + shortRev = builtins.substring 0 8 src.rev; in { imx8m-boot = pkgs.stdenv.mkDerivation rec { + inherit src; name = "imx8mp-mkimage"; version = "lf-6.1.55-2.2.0"; - src = pkgs.fetchgit { - url = "https://github.com/nxp-imx/imx-mkimage.git"; - rev = "c4365450fb115d87f245df2864fee1604d97c06a"; - sha256 = "sha256-xycEaWKVM63BlDyBKNN0OefyK6iX/fQOTvv4fRVM55U="; - leaveDotGit = true; - }; postPatch = '' + substituteInPlace Makefile \ + --replace 'git rev-parse --short=8 HEAD' 'echo ${shortRev}' substituteInPlace Makefile \ --replace 'CC = gcc' 'CC = clang' patchShebangs scripts diff --git a/nxp/imx8mq-evk/bsp/imx8mq-boot.nix b/nxp/imx8mq-evk/bsp/imx8mq-boot.nix index f0e53d49..2b5c246d 100644 --- a/nxp/imx8mq-evk/bsp/imx8mq-boot.nix +++ b/nxp/imx8mq-evk/bsp/imx8mq-boot.nix @@ -14,18 +14,21 @@ with pkgs; let imx8mq-firmware = pkgs.callPackage ./imx8mq-firmware.nix {}; imx8mq-uboot = pkgs.callPackage ./imx8mq-uboot.nix {}; imx8mq-optee-os = pkgs.callPackage ./imx8mq-optee-os.nix {}; + src = pkgs.fetchgit { + url = "https://github.com/nxp-imx/imx-mkimage.git"; + rev = "c4365450fb115d87f245df2864fee1604d97c06a"; + sha256 = "sha256-KVIVHwBpAwd1RKy3RrYxGIniE45CDlN5RQTXsMg1Jwk="; + }; + shortRev = builtins.substring 0 8 src.rev; in { imx8m-boot = pkgs.stdenv.mkDerivation rec { + inherit src; name = "imx8mq-mkimage"; version = "lf-6.1.55-2.2.0"; - src = pkgs.fetchgit { - url = "https://github.com/nxp-imx/imx-mkimage.git"; - rev = "c4365450fb115d87f245df2864fee1604d97c06a"; - sha256 = "sha256-xycEaWKVM63BlDyBKNN0OefyK6iX/fQOTvv4fRVM55U="; - leaveDotGit = true; - }; postPatch = '' + substituteInPlace Makefile \ + --replace 'git rev-parse --short=8 HEAD' 'echo ${shortRev}' substituteInPlace Makefile \ --replace 'CC = gcc' 'CC = clang' patchShebangs scripts From 50c1d00e9def0ca0b483459dc2f1e403158eabb1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 28 May 2025 20:32:58 -0400 Subject: [PATCH 1318/1476] add optional config that makes lgpio and pigpio work --- raspberry-pi/4/default.nix | 1 + raspberry-pi/4/gpio.nix | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 raspberry-pi/4/gpio.nix diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index ca2c7a89..150a66b9 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -8,6 +8,7 @@ ./cpu-revision.nix ./digi-amp-plus.nix ./dwc2.nix + ./gpio.nix ./i2c.nix ./leds.nix ./modesetting.nix diff --git a/raspberry-pi/4/gpio.nix b/raspberry-pi/4/gpio.nix new file mode 100644 index 00000000..23c7bdae --- /dev/null +++ b/raspberry-pi/4/gpio.nix @@ -0,0 +1,36 @@ +{ pkgs, lib, config, ... }: +{ + options.hardware.raspberry-pi."4".gpio = { + enable = lib.mkOption { + type = lib.types.bool; + description = + "Enable udev rules and kernelParams that make lgpio and pigpio work"; + default = false; + }; + }; + config = let + cfg = config.hardware.raspberry-pi."4".gpio; + in + lib.mkIf cfg.enable { + users.groups.gpio = lib.mkDefault { }; + + # the bit that matters to lgpio here is + # "${pkgs.coreutils}/bin/chgrp gpio /dev/%k && chmod 660 /dev/%k" + # see https://github.com/NixOS/nixpkgs/pull/352308 + + # sudo udevadm test --action=add /dev/gpiochip0 to test + + # import lgpio; lgpio.gpiochip_open(0) should show "1" and not raise + # an exception + + services.udev.extraRules = lib.mkBefore '' + KERNEL=="gpiomem", GROUP="gpio", MODE="0660" + SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", PROGRAM="${pkgs.bash}/bin/bash -c '${pkgs.coreutils}/bin/chgrp gpio /dev/%k && chmod 660 /dev/%k && ${pkgs.coreutils}/bin/chgrp -R gpio /sys/class/gpio && ${pkgs.coreutils}/bin/chmod -R g=u /sys/class/gpio'" + SUBSYSTEM=="gpio", ACTION=="add", PROGRAM="${pkgs.bash}/bin/bash -c '${pkgs.coreutils}/bin/chgrp -R gpio /sys%p && ${pkgs.coreutils}/bin/chmod -R g=u /sys%p'" + ''; + + boot.kernelParams = [ + "iomem=relaxed" # for pigpiod + ]; + }; +} From 0985f253857967e0e5ea0f147672742a117c9ca0 Mon Sep 17 00:00:00 2001 From: Ralf Gueldemeister <410488+rgueldem@users.noreply.github.com> Date: Wed, 9 Apr 2025 19:37:17 -0600 Subject: [PATCH 1319/1476] Add Lenovo Thinkpad X1 13th Gen --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/x1/13th-gen/default.nix | 12 ++++++++++++ 3 files changed, 14 insertions(+) create mode 100644 lenovo/thinkpad/x1/13th-gen/default.nix diff --git a/README.md b/README.md index 1bf859ab..8d6bcf95 100644 --- a/README.md +++ b/README.md @@ -305,6 +305,7 @@ See code for all available configurations. | [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `` | | [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `` | | [Lenovo ThinkPad X1 (12th Gen)](lenovo/thinkpad/x1/12th-gen) | `` | +| [Lenovo ThinkPad X1 (13th Gen)](lenovo/thinkpad/x1/13th-gen) | `` | | [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | | [Lenovo ThinkPad X1 Extreme Gen 3](lenovo/thinkpad/x1-extreme/gen3) | `` | | [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | diff --git a/flake.nix b/flake.nix index 048a59b7..915d9a78 100644 --- a/flake.nix +++ b/flake.nix @@ -249,6 +249,7 @@ lenovo-thinkpad-x1-10th-gen = import ./lenovo/thinkpad/x1/10th-gen; lenovo-thinkpad-x1-11th-gen = import ./lenovo/thinkpad/x1/11th-gen; lenovo-thinkpad-x1-12th-gen = import ./lenovo/thinkpad/x1/12th-gen; + lenovo-thinkpad-x1-13th-gen = import ./lenovo/thinkpad/x1/13th-gen; lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme; lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2; lenovo-thinkpad-x1-extreme-gen3 = import ./lenovo/thinkpad/x1-extreme/gen3; diff --git a/lenovo/thinkpad/x1/13th-gen/default.nix b/lenovo/thinkpad/x1/13th-gen/default.nix new file mode 100644 index 00000000..399ea64a --- /dev/null +++ b/lenovo/thinkpad/x1/13th-gen/default.nix @@ -0,0 +1,12 @@ +{lib, ...}: + +{ + imports = [ + ../../../../common/pc/ssd + ../../../../common/cpu/intel/lunar-lake + ]; + + hardware.trackpoint.device = "TPPS/2 Synaptics TrackPoint"; + + services.thermald.enable = lib.mkDefault true; +} From 773b49122afe05a89748f71cff1250e8800e481c Mon Sep 17 00:00:00 2001 From: Keanu Kerr Date: Sun, 1 Jun 2025 07:04:26 -0400 Subject: [PATCH 1320/1476] Added config file for Lenovo Thinkpad P14s AMD Gen 5 --- README.md | 1 + flake.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 8d6bcf95..8f2c54a3 100644 --- a/README.md +++ b/README.md @@ -256,6 +256,7 @@ See code for all available configurations. | [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | | [Lenovo ThinkPad P14s AMD Gen 3](lenovo/thinkpad/p14s/amd/gen3) | `` | | [Lenovo ThinkPad P14s AMD Gen 4](lenovo/thinkpad/p14s/amd/gen4) | `` | +| [Lenovo ThinkPad P14s AMD Gen 5](lenovo/thinkpad/p14s/amd/gen5) | `` | | [Lenovo ThinkPad P14s Intel Gen 3](lenovo/thinkpad/p14s/intel/gen3) | `` | | [Lenovo ThinkPad P14s Intel Gen 5](lenovo/thinkpad/p14s/intel/gen5) | `` | | [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | diff --git a/flake.nix b/flake.nix index 915d9a78..f7481983 100644 --- a/flake.nix +++ b/flake.nix @@ -200,6 +200,7 @@ lenovo-thinkpad-p14s-amd-gen2 = import ./lenovo/thinkpad/p14s/amd/gen2; lenovo-thinkpad-p14s-amd-gen3 = import ./lenovo/thinkpad/p14s/amd/gen3; lenovo-thinkpad-p14s-amd-gen4 = import ./lenovo/thinkpad/p14s/amd/gen4; + lenovo-thinkpad-p14s-amd-gen5 = import ./lenovo/thinkpad/p14s/amd/gen5; lenovo-thinkpad-p14s-intel-gen3 = import ./lenovo/thinkpad/p14s/intel/gen3; lenovo-thinkpad-p14s-intel-gen5 = import ./lenovo/thinkpad/p14s/intel/gen5; lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1; From e9dcc95a38974bcc05718a08a3a1c1629b0b35c3 Mon Sep 17 00:00:00 2001 From: Keanu Kerr Date: Sun, 1 Jun 2025 07:05:03 -0400 Subject: [PATCH 1321/1476] Add config file --- lenovo/thinkpad/p14s/amd/gen5/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lenovo/thinkpad/p14s/amd/gen5/default.nix diff --git a/lenovo/thinkpad/p14s/amd/gen5/default.nix b/lenovo/thinkpad/p14s/amd/gen5/default.nix new file mode 100644 index 00000000..f70dde41 --- /dev/null +++ b/lenovo/thinkpad/p14s/amd/gen5/default.nix @@ -0,0 +1,12 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../../../common/cpu/amd/pstate.nix + ]; + + # For the Qualcomm NFA-725A (Device 1103) wireless network controller + # See https://bugzilla.redhat.com/show_bug.cgi?id=2047878 + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; +} From 938f82a4a9829b08beba62cfac32b7ad0b8e62da Mon Sep 17 00:00:00 2001 From: Malix Date: Tue, 3 Jun 2025 17:16:00 +0200 Subject: [PATCH 1322/1476] remove confusing acronym --- lenovo/legion/15ach6h/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lenovo/legion/15ach6h/README.md b/lenovo/legion/15ach6h/README.md index 19f6c247..63f4e97f 100644 --- a/lenovo/legion/15ach6h/README.md +++ b/lenovo/legion/15ach6h/README.md @@ -1,7 +1,7 @@ ## Introduction -Due to the introduction of DDG feature, you may toggle DDG frequently, so for the default settings of this laptop, we use "specialization" feature of Nix so that you can easily select the required graphics card driver in the startup menu. +Due to the introduction of Dual-Direct-GFX-Mode feature, you may toggle Dual-Direct-GFX-Mode frequently, so for the default settings of this laptop, we use "specialization" feature of Nix so that you can easily select the required graphics card driver in the startup menu. **But It will slow down NixOS evaluation by factor 2 and increase memory usage.** -So if you don't need specialization feature, you can just use hybrid only configuration or nvidia only (DDG only) configuration +So if you don't need specialization feature, you can just use hybrid only configuration or nvidia only (Dual-Direct-GFX-Mode only) configuration ## Using multiple drives with this configuration @@ -27,4 +27,4 @@ $ nix-info -m ... 06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne (rev c5) ... -``` \ No newline at end of file +``` From 51e51e601448705c0d2f92ef90ec7b680123077c Mon Sep 17 00:00:00 2001 From: Andre Date: Wed, 4 Jun 2025 12:11:03 -0400 Subject: [PATCH 1323/1476] chore: format repo using treefmt-nix and nixfmt-rfc-style --- airis/n990/default.nix | 6 +- apple/default.nix | 3 +- apple/imac/18-2/default.nix | 10 +- apple/macbook-air/3/default.nix | 2 +- apple/macbook-air/7/default.nix | 7 +- apple/macbook-pro/11-5/default.nix | 3 +- apple/macbook-pro/12-1/default.nix | 9 +- apple/macbook-pro/14-1/default.nix | 10 +- apple/macbook-pro/8-1/default.nix | 7 +- apple/t2/default.nix | 17 +- asus/ally/rc71l/default.nix | 4 +- asus/battery.nix | 17 +- asus/fa507nv/default.nix | 7 +- asus/fa507rm/default.nix | 24 +- asus/flow/gv302x/amdgpu/default.nix | 18 +- asus/flow/gv302x/nvidia/default.nix | 10 +- asus/flow/gv302x/shared.nix | 33 +- asus/fx504gd/default.nix | 2 +- asus/fx506hm/default.nix | 11 +- asus/rog-strix/g513im/default.nix | 28 +- asus/rog-strix/g533zw/default.nix | 2 +- asus/rog-strix/g713ie/default.nix | 22 +- asus/rog-strix/g733qs/default.nix | 4 +- asus/zenbook/ux481/nvidia/default.nix | 12 +- asus/zephyrus/ga402x/amdgpu/default.nix | 18 +- asus/zephyrus/ga402x/nvidia/default.nix | 6 +- asus/zephyrus/ga402x/shared.nix | 32 +- chuwi/minibook-x/default.nix | 9 +- common/cpu/amd/default.nix | 3 +- common/cpu/amd/pstate.nix | 24 +- common/gpu/24.05-compat.nix | 15 +- common/gpu/amd/sea-islands/default.nix | 5 +- common/gpu/amd/southern-islands/default.nix | 5 +- common/gpu/intel/default.nix | 12 +- common/gpu/nvidia/ada-lovelace/default.nix | 2 +- common/gpu/nvidia/ampere/default.nix | 2 +- common/gpu/nvidia/disable.nix | 9 +- common/gpu/nvidia/kepler/default.nix | 2 +- common/gpu/nvidia/maxwell/default.nix | 2 +- common/gpu/nvidia/pascal/default.nix | 2 +- common/gpu/nvidia/prime.nix | 4 +- common/gpu/nvidia/turing/default.nix | 2 +- common/pc/laptop/default.nix | 6 +- default.nix | 2 +- dell/inspiron/14-5420/default.nix | 34 +- dell/inspiron/5515/default.nix | 6 +- dell/inspiron/7405/default.nix | 5 +- dell/inspiron/7559/default.nix | 2 +- dell/latitude/5490/default.nix | 7 +- dell/precision/5490/default.nix | 4 +- dell/precision/5530/default.nix | 2 +- dell/precision/7520/default.nix | 17 +- dell/xps/13-9300/default.nix | 3 +- dell/xps/13-9310/default.nix | 8 +- dell/xps/13-9315/default.nix | 7 +- dell/xps/13-9333/default.nix | 7 +- dell/xps/13-9343/default.nix | 5 +- dell/xps/15-7590/nvidia/default.nix | 2 +- dell/xps/15-9510/default.nix | 3 +- dell/xps/15-9510/nvidia/default.nix | 8 +- dell/xps/15-9530/default.nix | 2 +- dell/xps/15-9560/default.nix | 4 +- dell/xps/15-9560/nvidia/default.nix | 1 - dell/xps/15-9570/nvidia/default.nix | 1 - dell/xps/15-9570/shared.nix | 2 +- dell/xps/17-9700/common.nix | 24 +- dell/xps/17-9710/intel/default.nix | 7 +- dell/xps/sleep-resume/bluetooth/default.nix | 10 +- .../sleep-resume/i2c-designware/default.nix | 13 +- flake.lock | 62 ++ flake.nix | 798 +++++++++--------- focus/m2/gen1/default.nix | 9 +- framework/13-inch/11th-gen-intel/default.nix | 10 +- framework/13-inch/12th-gen-intel/default.nix | 3 +- framework/13-inch/7040-amd/default.nix | 22 +- .../13-inch/amd-ai-300-series/default.nix | 10 +- framework/13-inch/common/amd.nix | 7 +- framework/13-inch/common/audio.nix | 644 +++++++------- framework/13-inch/common/intel.nix | 31 +- .../intel-core-ultra-series1/default.nix | 13 +- framework/16-inch/7040-amd/default.nix | 7 +- framework/16-inch/common/amd.nix | 7 +- framework/bluetooth.nix | 61 +- framework/framework-tool.nix | 3 +- framework/kmod.nix | 55 +- friendlyarm/nanopc-t4/default.nix | 22 +- friendlyarm/nanopi-r5s/default.nix | 5 +- gmktec/nucbox/g3-plus/default.nix | 38 +- gpd/pocket-3/default.nix | 72 +- gpd/pocket-4/default.nix | 6 +- gpd/win-2/default.nix | 10 +- gpd/win-max-2/2023/default.nix | 8 +- gpd/win-max-2/default.nix | 7 +- gpd/win-mini/default.nix | 3 - hardkernel/odroid-hc4/default.nix | 44 +- hp/elitebook/845/g7/default.nix | 19 +- hp/elitebook/845/g8/default.nix | 19 +- hp/elitebook/845/g9/default.nix | 19 +- huawei/machc-wa/default.nix | 3 +- kobol/helios4/modules/fancontrol.nix | 8 +- kobol/helios4/overlay.nix | 2 +- lenovo/ideacentre/k330/default.nix | 27 +- lenovo/legion/15ach6h/nvidia/default.nix | 14 +- lenovo/legion/16ach6h/nvidia/default.nix | 14 +- lenovo/legion/16achg6/nvidia/default.nix | 14 +- lenovo/legion/16aph8/default.nix | 20 +- lenovo/legion/16arh7h/hybrid/default.nix | 7 +- lenovo/legion/16arh7h/igpu-only/default.nix | 3 +- .../audio/lenovo-16ARHA7_speaker-fix.nix | 17 +- lenovo/legion/16arha7/default.nix | 11 +- lenovo/legion/16irx8h/default.nix | 10 +- lenovo/legion/16irx9h/default.nix | 5 +- lenovo/thinkpad/a475/default.nix | 6 +- lenovo/thinkpad/p1/3th-gen/audio.nix | 6 +- lenovo/thinkpad/p14s/amd/gen2/default.nix | 11 +- lenovo/thinkpad/p14s/amd/gen4/default.nix | 7 +- lenovo/thinkpad/p14s/default.nix | 11 +- lenovo/thinkpad/p14s/intel/gen5/default.nix | 2 +- lenovo/thinkpad/p16s/intel/gen2/default.nix | 3 +- lenovo/thinkpad/p43s/default.nix | 3 +- lenovo/thinkpad/p50/default.nix | 17 +- lenovo/thinkpad/p51/default.nix | 17 +- lenovo/thinkpad/p52/default.nix | 17 +- lenovo/thinkpad/t14/amd/gen4/default.nix | 7 +- lenovo/thinkpad/t14/amd/gen5/default.nix | 7 +- lenovo/thinkpad/t410/default.nix | 5 +- lenovo/thinkpad/t490/default.nix | 22 +- lenovo/thinkpad/t490s/default.nix | 3 +- lenovo/thinkpad/x1-nano/default.nix | 3 +- lenovo/thinkpad/x1-nano/gen1/default.nix | 26 +- lenovo/thinkpad/x1/13th-gen/default.nix | 2 +- lenovo/thinkpad/x1/9th-gen/default.nix | 6 +- lenovo/thinkpad/x1/yoga/7th-gen/default.nix | 9 +- lenovo/thinkpad/x1/yoga/default.nix | 3 +- lenovo/thinkpad/x13/amd/default.nix | 3 +- lenovo/thinkpad/x13/common.nix | 3 +- lenovo/thinkpad/x13/intel/default.nix | 3 +- lenovo/thinkpad/x13/yoga/3th-gen/default.nix | 3 +- lenovo/thinkpad/x13/yoga/default.nix | 5 +- lenovo/thinkpad/x13s/default.nix | 11 +- lenovo/thinkpad/x390/default.nix | 1 - lenovo/thinkpad/z/default.nix | 7 +- lenovo/thinkpad/z/gen1/default.nix | 7 +- lenovo/thinkpad/z/gen2/default.nix | 4 +- lenovo/yoga/7/14ARH7/nvidia/default.nix | 3 +- lenovo/yoga/7/14IAH7/hybrid/default.nix | 38 +- lenovo/yoga/7/14IAH7/integrated/default.nix | 42 +- lenovo/yoga/7/14IAH7/shared.nix | 8 +- lenovo/yoga/7/slim/gen8/default.nix | 27 +- .../common/bsp/hss-payload-generator.nix | 2 +- microchip/common/bsp/linux-icicle-kit.nix | 124 +-- microchip/common/bsp/uboot.nix | 17 +- microchip/common/modules.nix | 16 +- microchip/icicle-kit/overlay.nix | 5 +- microsoft/surface-pro/9/default.nix | 2 +- microsoft/surface/common/default.nix | 70 +- .../surface/common/kernel/6.12/patches.nix | 141 ++-- .../surface/common/kernel/6.14/patches.nix | 3 +- .../surface/common/kernel/linux-package.nix | 62 +- microsoft/surface/surface-go/default.nix | 3 +- .../firmware/ath10k/ath10k-replace.nix | 18 +- .../surface-go/firmware/ath10k/default.nix | 29 +- .../surface/surface-pro-intel/default.nix | 2 +- milkv/pioneer/default.nix | 15 +- milkv/pioneer/firmware.nix | 19 +- milkv/pioneer/linux.nix | 86 +- milkv/pioneer/linuxboot-initrd.nix | 13 +- milkv/pioneer/linuxboot-kernel.nix | 8 +- milkv/pioneer/sd-image.nix | 17 +- milkv/pioneer/zsbl.nix | 15 +- minisforum/v3/audio.nix | 2 +- minisforum/v3/sensors.nix | 4 +- morefine/m600/default.nix | 3 +- msi/b350-tomahawk/default.nix | 2 +- msi/b550-a-pro/default.nix | 2 +- nxp/common/bsp/imx-atf.nix | 15 +- nxp/common/bsp/imx-firmware.nix | 26 +- nxp/common/bsp/imx-optee-os.nix | 8 +- nxp/common/bsp/imx-uboot.nix | 32 +- nxp/common/modules.nix | 3 +- nxp/imx8mp-evk/bsp/imx8mp-atf.nix | 16 +- nxp/imx8mp-evk/bsp/imx8mp-boot.nix | 17 +- nxp/imx8mp-evk/bsp/imx8mp-firmware.nix | 30 +- nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix | 109 +-- nxp/imx8mp-evk/bsp/imx8mp-uboot.nix | 147 ++-- nxp/imx8mp-evk/default.nix | 5 +- nxp/imx8mp-evk/modules.nix | 7 +- nxp/imx8mp-evk/overlay.nix | 4 +- nxp/imx8mq-evk/bsp/imx8mq-atf.nix | 16 +- nxp/imx8mq-evk/bsp/imx8mq-boot.nix | 17 +- nxp/imx8mq-evk/bsp/imx8mq-firmware.nix | 30 +- nxp/imx8mq-evk/bsp/imx8mq-linux.nix | 94 ++- nxp/imx8mq-evk/bsp/imx8mq-optee-os.nix | 109 +-- nxp/imx8mq-evk/bsp/imx8mq-uboot.nix | 147 ++-- nxp/imx8mq-evk/default.nix | 5 +- nxp/imx8mq-evk/modules.nix | 7 +- nxp/imx8mq-evk/overlay.nix | 4 +- nxp/imx8qm-mek/default.nix | 4 +- nxp/imx8qm-mek/overlay.nix | 11 +- nxp/imx8qxp-mek/overlay.nix | 11 +- olimex/teres_i/default.nix | 10 +- onenetbook/4/default.nix | 2 +- .../4/goodix-stylus-mastykin/default.nix | 52 +- .../pinebook-pro/keyboard-updater/default.nix | 7 +- pine64/star64/default.nix | 54 +- pine64/star64/firmware.nix | 15 +- pine64/star64/linux-5.15.nix | 470 ++++++----- pine64/star64/opensbi.nix | 26 +- pine64/star64/sd-image.nix | 16 +- pine64/star64/spl-tool.nix | 2 +- purism/librem/5r4/audio.nix | 58 +- purism/librem/5r4/default.nix | 16 +- purism/librem/5r4/kernel.nix | 55 +- purism/librem/5r4/librem5-base/default.nix | 8 +- purism/librem/5r4/lockdown-fix.nix | 19 +- purism/librem/5r4/u-boot/default.nix | 19 +- radxa/default.nix | 12 +- radxa/disko.nix | 13 +- radxa/rock-4c-plus/default.nix | 12 +- radxa/rock-5b/default.nix | 12 +- radxa/rock-pi-4/default.nix | 12 +- radxa/rock-pi-e/default.nix | 12 +- raspberry-pi/2/default.nix | 2 +- raspberry-pi/3/default.nix | 10 +- raspberry-pi/4/apply-overlays-dtmerge.nix | 95 ++- raspberry-pi/4/audio.nix | 16 +- raspberry-pi/4/default.nix | 8 +- raspberry-pi/4/dwc2.nix | 6 +- raspberry-pi/4/gpio.nix | 49 +- raspberry-pi/4/i2c.nix | 63 +- raspberry-pi/4/leds.nix | 86 +- raspberry-pi/4/pkgs-overlays.nix | 3 +- raspberry-pi/4/poe-hat.nix | 3 +- raspberry-pi/4/poe-plus-hat.nix | 3 +- raspberry-pi/4/pwm0.nix | 52 +- raspberry-pi/4/tv-hat.nix | 3 +- raspberry-pi/4/xhci.nix | 6 +- raspberry-pi/5/default.nix | 19 +- rockchip/default.nix | 12 +- rockchip/disko.nix | 12 +- rockchip/rk3328/default.nix | 12 +- rockchip/rk3399/default.nix | 12 +- rockchip/rk3399/disko.nix | 20 +- rockchip/rk3588/default.nix | 12 +- samsung/np900x3c/default.nix | 2 +- starfive/visionfive/v1/default.nix | 21 +- starfive/visionfive/v1/firmware.nix | 52 +- starfive/visionfive/v1/linux.nix | 64 +- starfive/visionfive/v1/sd-image.nix | 10 +- starfive/visionfive/v1/uboot.nix | 10 +- starfive/visionfive/v2/firmware.nix | 27 +- starfive/visionfive/v2/sd-image.nix | 10 +- starfive/visionfive/v2/spl-tool.nix | 2 +- starfive/visionfive/v2/uboot.nix | 5 +- supermicro/default.nix | 5 +- supermicro/x10sll-f/default.nix | 5 +- system76/darp6/default.nix | 15 +- system76/galp5-1650/default.nix | 7 +- system76/gaze18/default.nix | 7 +- tests/build-profile.nix | 31 +- tests/flake.nix | 11 +- toshiba/swanky/default.nix | 14 +- treefmt.nix | 19 + tuxedo/infinitybook/pro14/gen9/default.nix | 8 +- tuxedo/pulse/14/gen3/default.nix | 10 +- tuxedo/pulse/15/gen2/default.nix | 18 +- 266 files changed, 3721 insertions(+), 2733 deletions(-) create mode 100644 flake.lock create mode 100644 treefmt.nix diff --git a/airis/n990/default.nix b/airis/n990/default.nix index e4711419..ab450958 100644 --- a/airis/n990/default.nix +++ b/airis/n990/default.nix @@ -9,10 +9,10 @@ kernelParams = [ "apm=on" "acpi=on" - "vga=0x317" # 1024x768 + "vga=0x317" # 1024x768 "console=tty1" - "video=vesafb:ywrap" # Faster scroll - ]; + "video=vesafb:ywrap" # Faster scroll + ]; }; hardware.firmware = with pkgs; [ intel2200BGFirmware ]; diff --git a/apple/default.nix b/apple/default.nix index a2ee2623..5663cfeb 100644 --- a/apple/default.nix +++ b/apple/default.nix @@ -5,8 +5,7 @@ "hid_apple.iso_layout=0" ]; - hardware.facetimehd.enable = lib.mkDefault - (config.nixpkgs.config.allowUnfree or false); + hardware.facetimehd.enable = lib.mkDefault (config.nixpkgs.config.allowUnfree or false); services.mbpfan.enable = lib.mkDefault true; } diff --git a/apple/imac/18-2/default.nix b/apple/imac/18-2/default.nix index 9d71ba32..6849037d 100644 --- a/apple/imac/18-2/default.nix +++ b/apple/imac/18-2/default.nix @@ -3,7 +3,8 @@ lib, pkgs, ... -}: { +}: +{ imports = [ ../. ../../../common/cpu/intel/kaby-lake @@ -14,7 +15,12 @@ # apple smc (TODO: check spi) boot = { - initrd.kernelModules = ["applespi" "spi_pxa2xx_platform" "intel_lpss_pci" "applesmc" ]; + initrd.kernelModules = [ + "applespi" + "spi_pxa2xx_platform" + "intel_lpss_pci" + "applesmc" + ]; kernelParams = [ "intel_iommu=on" ]; kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest; }; diff --git a/apple/macbook-air/3/default.nix b/apple/macbook-air/3/default.nix index 9589e762..72fbdb31 100644 --- a/apple/macbook-air/3/default.nix +++ b/apple/macbook-air/3/default.nix @@ -1,7 +1,7 @@ { config, lib, ... }: { - imports = [ + imports = [ ../../. ../../../common/cpu/intel ../../../common/pc/laptop diff --git a/apple/macbook-air/7/default.nix b/apple/macbook-air/7/default.nix index f6c82282..f6dd654a 100644 --- a/apple/macbook-air/7/default.nix +++ b/apple/macbook-air/7/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: { imports = [ diff --git a/apple/macbook-pro/11-5/default.nix b/apple/macbook-pro/11-5/default.nix index 1db2878f..0dcd557f 100644 --- a/apple/macbook-pro/11-5/default.nix +++ b/apple/macbook-pro/11-5/default.nix @@ -18,7 +18,6 @@ in services.udev.extraRules = # Disable XHC1 wakeup signal to avoid resume getting triggered some time # after suspend. Reboot required for this to take effect. - lib.optionalString - (lib.versionAtLeast kernelPackages.kernel.version "3.13") + lib.optionalString (lib.versionAtLeast kernelPackages.kernel.version "3.13") ''SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled"''; } diff --git a/apple/macbook-pro/12-1/default.nix b/apple/macbook-pro/12-1/default.nix index 6f1bc995..e48dbc24 100644 --- a/apple/macbook-pro/12-1/default.nix +++ b/apple/macbook-pro/12-1/default.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, modulesPath, ... }: +{ + lib, + pkgs, + modulesPath, + ... +}: { imports = [ @@ -19,7 +24,7 @@ powerDownCommands = lib.mkBefore '' ${pkgs.kmod}/bin/rmmod -f -v brcmfmac_wcc 2>/dev/null || true ${pkgs.kmod}/bin/rmmod brcmfmac - ''; + ''; }; # USB subsystem wakes up MBP right after suspend unless we disable it. diff --git a/apple/macbook-pro/14-1/default.nix b/apple/macbook-pro/14-1/default.nix index e7897708..ad8c5d1d 100644 --- a/apple/macbook-pro/14-1/default.nix +++ b/apple/macbook-pro/14-1/default.nix @@ -3,7 +3,8 @@ lib, pkgs, ... -}: { +}: +{ imports = [ ../. ../../../common/cpu/intel/kaby-lake @@ -15,7 +16,12 @@ # https://www.kernelconfig.io/config_keyboard_applespi boot = { - initrd.kernelModules = ["applespi" "spi_pxa2xx_platform" "intel_lpss_pci" "applesmc" ]; + initrd.kernelModules = [ + "applespi" + "spi_pxa2xx_platform" + "intel_lpss_pci" + "applesmc" + ]; kernelParams = [ "intel_iommu=on" ]; kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest; }; diff --git a/apple/macbook-pro/8-1/default.nix b/apple/macbook-pro/8-1/default.nix index a807da27..0b6eef12 100644 --- a/apple/macbook-pro/8-1/default.nix +++ b/apple/macbook-pro/8-1/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: { imports = [ diff --git a/apple/t2/default.nix b/apple/t2/default.nix index 38115ba2..825a181a 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -25,7 +25,7 @@ let overrideAudioFiles = package: pluginsPath: package.overrideAttrs ( - new: old: { + _new: old: { preConfigurePhases = old.preConfigurePhases or [ ] ++ [ "postPatchPhase" ]; postPatchPhase = '' cp -r ${audioFiles}/files/{profile-sets,paths} ${pluginsPath}/alsa/mixer/ @@ -106,11 +106,16 @@ in powerManagement.enable = true; } - (if lib.versionAtLeast nixosVersion "25.05" then { - services.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/"; - } else { - hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/"; - }) + ( + if lib.versionAtLeast nixosVersion "25.05" then + { + services.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/"; + } + else + { + hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/"; + } + ) (lib.mkIf t2Cfg.enableIGPU { # Enable the iGPU by default if present diff --git a/asus/ally/rc71l/default.nix b/asus/ally/rc71l/default.nix index 7f2552ec..5d1e58a7 100644 --- a/asus/ally/rc71l/default.nix +++ b/asus/ally/rc71l/default.nix @@ -11,5 +11,7 @@ # 6.5 adds many fixes and improvements for the Ally # This includes for example performance, audio and bluetooth - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.5") (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.5") ( + lib.mkDefault pkgs.linuxPackages_latest + ); } diff --git a/asus/battery.nix b/asus/battery.nix index d61e3502..4bdf6b64 100644 --- a/asus/battery.nix +++ b/asus/battery.nix @@ -1,4 +1,9 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let p = pkgs.writeScriptBin "charge-upto" '' echo ''${0:-100} > /sys/class/power_supply/BAT?/charge_control_end_threshold @@ -22,8 +27,14 @@ in config = { environment.systemPackages = lib.mkIf cfg.enableChargeUptoScript [ p ]; systemd.services.battery-charge-threshold = { - wantedBy = [ "local-fs.target" "suspend.target" ]; - after = [ "local-fs.target" "suspend.target" ]; + wantedBy = [ + "local-fs.target" + "suspend.target" + ]; + after = [ + "local-fs.target" + "suspend.target" + ]; description = "Set the battery charge threshold to ${toString cfg.chargeUpto}%"; startLimitBurst = 5; startLimitIntervalSec = 1; diff --git a/asus/fa507nv/default.nix b/asus/fa507nv/default.nix index 3a304012..01fafbb2 100644 --- a/asus/fa507nv/default.nix +++ b/asus/fa507nv/default.nix @@ -3,7 +3,8 @@ pkgs, config, ... -}: { +}: +{ imports = [ ../../common/cpu/amd ../../common/cpu/amd/raphael/igpu.nix @@ -20,7 +21,9 @@ # The bottom 2 parts are taken from the framework 16-inch laptops configurations. # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ - boot.kernelParams = lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") ["rtc_cmos.use_acpi_alarm=1"]; + boot.kernelParams = + lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") + [ "rtc_cmos.use_acpi_alarm=1" ]; # AMD has better battery life with PPD over TLP: # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 diff --git a/asus/fa507rm/default.nix b/asus/fa507rm/default.nix index a07a6413..ffbae513 100644 --- a/asus/fa507rm/default.nix +++ b/asus/fa507rm/default.nix @@ -1,16 +1,16 @@ { ... }: { - imports = [ - ../../common/cpu/amd - ../../common/gpu/nvidia/prime.nix - ../../common/gpu/nvidia/ampere - ../../common/pc/laptop - ../../common/pc/ssd - ]; + imports = [ + ../../common/cpu/amd + ../../common/gpu/nvidia/prime.nix + ../../common/gpu/nvidia/ampere + ../../common/pc/laptop + ../../common/pc/ssd + ]; - hardware.nvidia.prime = { - amdgpuBusId = "PCI:5:0:0"; - nvidiaBusId = "PCI:1:0:0"; - }; - } + hardware.nvidia.prime = { + amdgpuBusId = "PCI:5:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} diff --git a/asus/flow/gv302x/amdgpu/default.nix b/asus/flow/gv302x/amdgpu/default.nix index 833e298f..8cfb2403 100644 --- a/asus/flow/gv302x/amdgpu/default.nix +++ b/asus/flow/gv302x/amdgpu/default.nix @@ -1,4 +1,5 @@ -{ config, +{ + config, lib, ... }: @@ -7,15 +8,22 @@ let inherit (lib) mkEnableOption mkIf mkMerge; cfg = config.hardware.asus.flow.gv302x; -in { +in +{ imports = [ ../shared.nix ]; options.hardware.asus.flow.gv302x.amdgpu = { - recovery.enable = (mkEnableOption "Enable amdgpu.gpu_recovery kernel boot param") // { default = false; }; - sg_display.enable = (mkEnableOption "Enable amdgpu.gpu_recovery kernel boot param") // { default = true; }; - psr.enable = (mkEnableOption "Enable amdgpu.dcdebugmask=0x10 kernel boot param") // { default = true; }; + recovery.enable = (mkEnableOption "Enable amdgpu.gpu_recovery kernel boot param") // { + default = false; + }; + sg_display.enable = (mkEnableOption "Enable amdgpu.gpu_recovery kernel boot param") // { + default = true; + }; + psr.enable = (mkEnableOption "Enable amdgpu.dcdebugmask=0x10 kernel boot param") // { + default = true; + }; }; config = mkMerge [ diff --git a/asus/flow/gv302x/nvidia/default.nix b/asus/flow/gv302x/nvidia/default.nix index 0c490c93..7abfea1d 100644 --- a/asus/flow/gv302x/nvidia/default.nix +++ b/asus/flow/gv302x/nvidia/default.nix @@ -1,4 +1,5 @@ -{ lib, +{ + lib, pkgs, config, ... @@ -7,7 +8,8 @@ let inherit (lib) mkDefault; -in { +in +{ imports = [ ../shared.nix ## "prime.nix" loads this, aleady: @@ -23,8 +25,6 @@ in { blacklistedKernelModules = [ "nouveau" ]; }; - - hardware = { ## Enable the Nvidia card, as well as Prime and Offload: amdgpu.initrd.enable = mkDefault true; @@ -49,7 +49,7 @@ in { }; dynamicBoost.enable = mkDefault true; - + }; }; } diff --git a/asus/flow/gv302x/shared.nix b/asus/flow/gv302x/shared.nix index 474eb584..a556e7d0 100644 --- a/asus/flow/gv302x/shared.nix +++ b/asus/flow/gv302x/shared.nix @@ -1,14 +1,23 @@ -{ config, +{ + config, pkgs, lib, ... }: let - inherit (lib) mkDefault mkEnableOption mkIf mkMerge version versionAtLeast versionOlder; + inherit (lib) + mkDefault + mkEnableOption + mkIf + mkMerge + version + versionAtLeast + ; cfg = config.hardware.asus.flow.gv302x; -in { +in +{ imports = [ ../../../common/cpu/amd @@ -26,12 +35,12 @@ in { # enables it for kernel 6.9.x onwards. # # Note: the device name is "ASUS N-KEY Device". - keyboard.autosuspend.enable = ( - mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Flow GV302X" - ) // { - default = versionAtLeast config.boot.kernelPackages.kernel.version "6.9"; - defaultText = lib.literalExpression "lib.versionAtLeast config.boot.kernelPackages.kernel.version \"6.9\""; - }; + keyboard.autosuspend.enable = + (mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Flow GV302X") + // { + default = versionAtLeast config.boot.kernelPackages.kernel.version "6.9"; + defaultText = lib.literalExpression "lib.versionAtLeast config.boot.kernelPackages.kernel.version \"6.9\""; + }; # The ASUS 8295 ITE device will cause an immediate wake-up when trying to suspend the laptop. # After the first successful hibernate, it will work as expected, however. # NOTE: I'm not actually sure what this device, as neither the touchpad nor the M1-M4 keys cause a wake-up. @@ -63,7 +72,7 @@ in { evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* KEYBOARD_KEY_ff31007c=f20 ''; - }; + }; }; #flow devices are 2 in 1 laptops @@ -71,7 +80,7 @@ in { } - (mkIf (! cfg.keyboard.autosuspend.enable) { + (mkIf (!cfg.keyboard.autosuspend.enable) { services.udev.extraRules = '' # Disable power auto-suspend for the ASUS N-KEY device, i.e. USB Keyboard. # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after the device suspends. @@ -79,7 +88,7 @@ in { ''; }) - (mkIf (! cfg.ite-device.wakeup.enable) { + (mkIf (!cfg.ite-device.wakeup.enable) { services.udev.extraRules = '' # Disable power wakeup for the 8295 ITE device. # Otherwise on certain kernel-versions, it will tend to cause the laptop to immediately wake-up when suspending. diff --git a/asus/fx504gd/default.nix b/asus/fx504gd/default.nix index 45132509..244eaae4 100644 --- a/asus/fx504gd/default.nix +++ b/asus/fx504gd/default.nix @@ -2,7 +2,7 @@ { imports = [ ../../common/cpu/intel - ../../common/pc/laptop + ../../common/pc/laptop ]; #Nouveau doesn't work at all on this model. diff --git a/asus/fx506hm/default.nix b/asus/fx506hm/default.nix index a50ffdf4..6f29a8b8 100644 --- a/asus/fx506hm/default.nix +++ b/asus/fx506hm/default.nix @@ -1,8 +1,7 @@ { config, lib, ... }: { - imports = - [ + imports = [ ../../common/cpu/intel ../../common/gpu/nvidia ../../common/gpu/nvidia/prime.nix @@ -11,14 +10,12 @@ ../battery.nix ]; - hardware.nvidia = - { + hardware.nvidia = { modesetting.enable = lib.mkDefault true; open = lib.mkIf (lib.versionAtLeast config.hardware.nvidia.package.version "555") true; - prime = - { - intelBusId = "PCI:0:2:0"; + prime = { + intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; }; }; diff --git a/asus/rog-strix/g513im/default.nix b/asus/rog-strix/g513im/default.nix index 654cdd14..12320165 100644 --- a/asus/rog-strix/g513im/default.nix +++ b/asus/rog-strix/g513im/default.nix @@ -1,17 +1,17 @@ { - imports = [ - ../../../common/cpu/amd - ../../../common/cpu/amd/pstate.nix - ../../../common/gpu/nvidia - ../../../common/gpu/nvidia/prime.nix - ../../../common/gpu/nvidia/ampere - ../../../common/pc/laptop - ../../../common/pc/ssd - ../../battery.nix - ]; + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/nvidia + ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ampere + ../../../common/pc/laptop + ../../../common/pc/ssd + ../../battery.nix + ]; - hardware.nvidia.prime = { - amdgpuBusId = "PCI:05:00:0"; - nvidiaBusId = "PCI:01:00:0"; - }; + hardware.nvidia.prime = { + amdgpuBusId = "PCI:05:00:0"; + nvidiaBusId = "PCI:01:00:0"; + }; } diff --git a/asus/rog-strix/g533zw/default.nix b/asus/rog-strix/g533zw/default.nix index 635ae559..d93f4f4a 100644 --- a/asus/rog-strix/g533zw/default.nix +++ b/asus/rog-strix/g533zw/default.nix @@ -13,5 +13,5 @@ hardware.nvidia.prime = { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; - }; + }; } diff --git a/asus/rog-strix/g713ie/default.nix b/asus/rog-strix/g713ie/default.nix index f82ddb9b..3ef4c23f 100644 --- a/asus/rog-strix/g713ie/default.nix +++ b/asus/rog-strix/g713ie/default.nix @@ -1,16 +1,16 @@ { - imports = [ - ../../../common/cpu/amd - ../../../common/cpu/amd/pstate.nix - ../../../common/gpu/nvidia - ../../../common/gpu/nvidia/prime.nix - ../../../common/gpu/nvidia/ampere - ../../../common/pc/laptop - ../../../common/pc/ssd - ../../battery.nix - ]; + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/nvidia + ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ampere + ../../../common/pc/laptop + ../../../common/pc/ssd + ../../battery.nix + ]; - hardware.nvidia.prime = { + hardware.nvidia.prime = { amdgpuBusId = "PCI:5:0:0"; nvidiaBusId = "PCI:1:0:0"; }; diff --git a/asus/rog-strix/g733qs/default.nix b/asus/rog-strix/g733qs/default.nix index b09142af..41fda8ad 100644 --- a/asus/rog-strix/g733qs/default.nix +++ b/asus/rog-strix/g733qs/default.nix @@ -20,7 +20,9 @@ options snd-hda-intel patch=hda-jack-retask.fw ''; # before 5.12 it would interpret every keystroke as the power button - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") ( + lib.mkDefault pkgs.linuxPackages_latest + ); hardware.nvidia.prime = { amdgpuBusId = "PCI:5:0:0"; diff --git a/asus/zenbook/ux481/nvidia/default.nix b/asus/zenbook/ux481/nvidia/default.nix index 359a97d6..e65ed0bc 100644 --- a/asus/zenbook/ux481/nvidia/default.nix +++ b/asus/zenbook/ux481/nvidia/default.nix @@ -1,4 +1,4 @@ -{lib, ...}: +{ lib, ... }: { imports = [ ../shared.nix @@ -7,11 +7,11 @@ ]; hardware.nvidia = { - prime = { - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:2:0:0"; - }; + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:2:0:0"; + }; - dynamicBoost.enable = lib.mkForce false; # Dynamic boost is not supported on Pascal architeture + dynamicBoost.enable = lib.mkForce false; # Dynamic boost is not supported on Pascal architeture }; } diff --git a/asus/zephyrus/ga402x/amdgpu/default.nix b/asus/zephyrus/ga402x/amdgpu/default.nix index 2610db89..09acc327 100644 --- a/asus/zephyrus/ga402x/amdgpu/default.nix +++ b/asus/zephyrus/ga402x/amdgpu/default.nix @@ -1,4 +1,5 @@ -{ config, +{ + config, lib, ... }: @@ -7,15 +8,22 @@ let inherit (lib) mkEnableOption mkIf mkMerge; cfg = config.hardware.asus.zephyrus.ga402x; -in { +in +{ imports = [ ../shared.nix ]; options.hardware.asus.zephyrus.ga402x.amdgpu = { - recovery.enable = (mkEnableOption "Enable amdgpu.gpu_recovery kernel boot param") // { default = false; }; - sg_display.enable = (mkEnableOption "Enable amdgpu.gpu_recovery kernel boot param") // { default = true; }; - psr.enable = (mkEnableOption "Enable amdgpu.dcdebugmask=0x10 kernel boot param") // { default = true; }; + recovery.enable = (mkEnableOption "Enable amdgpu.gpu_recovery kernel boot param") // { + default = false; + }; + sg_display.enable = (mkEnableOption "Enable amdgpu.gpu_recovery kernel boot param") // { + default = true; + }; + psr.enable = (mkEnableOption "Enable amdgpu.dcdebugmask=0x10 kernel boot param") // { + default = true; + }; }; config = mkMerge [ diff --git a/asus/zephyrus/ga402x/nvidia/default.nix b/asus/zephyrus/ga402x/nvidia/default.nix index 7c5b1d7f..c2750490 100644 --- a/asus/zephyrus/ga402x/nvidia/default.nix +++ b/asus/zephyrus/ga402x/nvidia/default.nix @@ -1,4 +1,5 @@ -{ lib, +{ + lib, pkgs, ... }: @@ -6,7 +7,8 @@ let inherit (lib) mkDefault; -in { +in +{ imports = [ ../shared.nix ## "prime.nix" loads this, aleady: diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix index f1069037..bd0eda35 100644 --- a/asus/zephyrus/ga402x/shared.nix +++ b/asus/zephyrus/ga402x/shared.nix @@ -1,14 +1,24 @@ -{ config, +{ + config, pkgs, lib, ... }: let - inherit (lib) mkDefault mkEnableOption mkIf mkMerge version versionAtLeast versionOlder; + inherit (lib) + mkDefault + mkEnableOption + mkIf + mkMerge + version + versionAtLeast + versionOlder + ; cfg = config.hardware.asus.zephyrus.ga402x; -in { +in +{ imports = [ ../../../common/cpu/amd @@ -26,12 +36,12 @@ in { # enables it for kernel 6.9.x onwards. # # Note: the device name is "ASUS N-KEY Device". - keyboard.autosuspend.enable = ( - mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Zephyrus GA402X" - ) // { - default = versionAtLeast config.boot.kernelPackages.kernel.version "6.9"; - defaultText = lib.literalExpression "lib.versionAtLeast config.boot.kernelPackages.kernel.version \"6.9\""; - }; + keyboard.autosuspend.enable = + (mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Zephyrus GA402X") + // { + default = versionAtLeast config.boot.kernelPackages.kernel.version "6.9"; + defaultText = lib.literalExpression "lib.versionAtLeast config.boot.kernelPackages.kernel.version \"6.9\""; + }; # The ASUS 8295 ITE device will cause an immediate wake-up when trying to suspend the laptop. # After the first successful hibernate, it will work as expected, however. # NOTE: I'm not actually sure what this device, as neither the touchpad nor the M1-M4 keys cause a wake-up. @@ -67,7 +77,7 @@ in { }; } - (mkIf (! cfg.keyboard.autosuspend.enable) { + (mkIf (!cfg.keyboard.autosuspend.enable) { services.udev.extraRules = '' # Disable power auto-suspend for the ASUS N-KEY device, i.e. USB Keyboard. # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after the device suspends. @@ -75,7 +85,7 @@ in { ''; }) - (mkIf (! cfg.ite-device.wakeup.enable) { + (mkIf (!cfg.ite-device.wakeup.enable) { services.udev.extraRules = '' # Disable power wakeup for the 8295 ITE device. # Otherwise on certain kernel-versions, it will tend to cause the laptop to immediately wake-up when suspending. diff --git a/chuwi/minibook-x/default.nix b/chuwi/minibook-x/default.nix index 0b78d046..480909e2 100644 --- a/chuwi/minibook-x/default.nix +++ b/chuwi/minibook-x/default.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ ... }: +{ imports = [ ../../common/cpu/intel ../../common/pc/laptop @@ -6,6 +7,8 @@ ../../common/hidpi.nix ]; # Fixes the display being rotated 90 degrees. - boot.kernelParams = - [ "fbcon=rotate:1" "video=DSI-1:panel_orientation=right_side_up" ]; + boot.kernelParams = [ + "fbcon=rotate:1" + "video=DSI-1:panel_orientation=right_side_up" + ]; } diff --git a/common/cpu/amd/default.nix b/common/cpu/amd/default.nix index d8c48a26..10ec6fd5 100644 --- a/common/cpu/amd/default.nix +++ b/common/cpu/amd/default.nix @@ -1,6 +1,5 @@ { config, lib, ... }: { - hardware.cpu.amd.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/common/cpu/amd/pstate.nix b/common/cpu/amd/pstate.nix index 6a84027a..19f1d74f 100644 --- a/common/cpu/amd/pstate.nix +++ b/common/cpu/amd/pstate.nix @@ -8,23 +8,13 @@ in imports = [ ./. ]; boot = lib.mkMerge [ - (lib.mkIf - ( - (lib.versionAtLeast kver "5.17") - && (lib.versionOlder kver "6.1") - ) - { - kernelParams = [ "initcall_blacklist=acpi_cpufreq_init" ]; - kernelModules = [ "amd-pstate" ]; - }) - (lib.mkIf - ( - (lib.versionAtLeast kver "6.1") - && (lib.versionOlder kver "6.3") - ) - { - kernelParams = [ "amd_pstate=passive" ]; - }) + (lib.mkIf ((lib.versionAtLeast kver "5.17") && (lib.versionOlder kver "6.1")) { + kernelParams = [ "initcall_blacklist=acpi_cpufreq_init" ]; + kernelModules = [ "amd-pstate" ]; + }) + (lib.mkIf ((lib.versionAtLeast kver "6.1") && (lib.versionOlder kver "6.3")) { + kernelParams = [ "amd_pstate=passive" ]; + }) (lib.mkIf (lib.versionAtLeast kver "6.3") { kernelParams = [ "amd_pstate=active" ]; }) diff --git a/common/gpu/24.05-compat.nix b/common/gpu/24.05-compat.nix index 17508882..bcccd2ca 100644 --- a/common/gpu/24.05-compat.nix +++ b/common/gpu/24.05-compat.nix @@ -6,9 +6,18 @@ # Backward-compat for 24.05, can be removed after we drop 24.05 support imports = lib.optionals (lib.versionOlder lib.version "24.11pre") [ (lib.mkAliasOptionModule [ "hardware" "graphics" "enable" ] [ "hardware" "opengl" "enable" ]) - (lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages" ] [ "hardware" "opengl" "extraPackages" ]) - (lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages32" ] [ "hardware" "opengl" "extraPackages32" ]) - (lib.mkAliasOptionModule [ "hardware" "graphics" "enable32Bit" ] [ "hardware" "opengl" "driSupport32Bit" ]) + (lib.mkAliasOptionModule + [ "hardware" "graphics" "extraPackages" ] + [ "hardware" "opengl" "extraPackages" ] + ) + (lib.mkAliasOptionModule + [ "hardware" "graphics" "extraPackages32" ] + [ "hardware" "opengl" "extraPackages32" ] + ) + (lib.mkAliasOptionModule + [ "hardware" "graphics" "enable32Bit" ] + [ "hardware" "opengl" "driSupport32Bit" ] + ) (lib.mkAliasOptionModule [ "hardware" "graphics" "package" ] [ "hardware" "opengl" "package" ]) (lib.mkAliasOptionModule [ "hardware" "graphics" "package32" ] [ "hardware" "opengl" "package32" ]) ]; diff --git a/common/gpu/amd/sea-islands/default.nix b/common/gpu/amd/sea-islands/default.nix index 697e8250..593d7437 100644 --- a/common/gpu/amd/sea-islands/default.nix +++ b/common/gpu/amd/sea-islands/default.nix @@ -1,5 +1,8 @@ { imports = [ ../. ]; # Explicitly set amdgpu support in place of radeon - boot.kernelParams = [ "radeon.cik_support=0" "amdgpu.cik_support=1" ]; + boot.kernelParams = [ + "radeon.cik_support=0" + "amdgpu.cik_support=1" + ]; } diff --git a/common/gpu/amd/southern-islands/default.nix b/common/gpu/amd/southern-islands/default.nix index 4939117f..fa98cb1a 100644 --- a/common/gpu/amd/southern-islands/default.nix +++ b/common/gpu/amd/southern-islands/default.nix @@ -1,5 +1,8 @@ { imports = [ ../. ]; # Explicitly set amdgpu support in place of radeon - boot.kernelParams = [ "radeon.si_support=0" "amdgpu.si_support=1" ]; + boot.kernelParams = [ + "radeon.si_support=0" + "amdgpu.si_support=1" + ]; } diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index 28c6e93e..a8671d41 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -45,11 +45,15 @@ intel-vaapi-driver = (pkgs.intel-vaapi-driver or pkgs.vaapiIntel).override { enableHybridCodec = cfg.enableHybridCodec; }; - intel-vaapi-driver-32 = (pkgs.driversi686Linux.intel-vaapi-driver or pkgs.driversi686Linux.vaapiIntel).override { - enableHybridCodec = cfg.enableHybridCodec; - }; + intel-vaapi-driver-32 = + (pkgs.driversi686Linux.intel-vaapi-driver or pkgs.driversi686Linux.vaapiIntel).override + { + enableHybridCodec = cfg.enableHybridCodec; + }; - useIntelOcl = useIntelVaapiDriver && (config.hardware.enableAllFirmware or config.nixpkgs.config.allowUnfree or false); + useIntelOcl = + useIntelVaapiDriver + && (config.hardware.enableAllFirmware or config.nixpkgs.config.allowUnfree or false); intel-ocl = pkgs.intel-ocl; useIntelMediaDriver = cfg.vaapiDriver == "intel-media-driver" || cfg.vaapiDriver == null; diff --git a/common/gpu/nvidia/ada-lovelace/default.nix b/common/gpu/nvidia/ada-lovelace/default.nix index 461ae914..5e8d48f6 100644 --- a/common/gpu/nvidia/ada-lovelace/default.nix +++ b/common/gpu/nvidia/ada-lovelace/default.nix @@ -1,4 +1,4 @@ -{lib, config, ...}: +{ lib, config, ... }: let nvidiaPackage = config.hardware.nvidia.package; in diff --git a/common/gpu/nvidia/ampere/default.nix b/common/gpu/nvidia/ampere/default.nix index 461ae914..5e8d48f6 100644 --- a/common/gpu/nvidia/ampere/default.nix +++ b/common/gpu/nvidia/ampere/default.nix @@ -1,4 +1,4 @@ -{lib, config, ...}: +{ lib, config, ... }: let nvidiaPackage = config.hardware.nvidia.package; in diff --git a/common/gpu/nvidia/disable.nix b/common/gpu/nvidia/disable.nix index 6ea07adc..550da56e 100644 --- a/common/gpu/nvidia/disable.nix +++ b/common/gpu/nvidia/disable.nix @@ -8,7 +8,7 @@ blacklist nouveau options nouveau modeset=0 ''; - + services.udev.extraRules = '' # Remove NVIDIA USB xHCI Host Controller devices, if present ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1" @@ -22,5 +22,10 @@ # Remove NVIDIA VGA/3D controller devices ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1" ''; - boot.blacklistedKernelModules = [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ]; + boot.blacklistedKernelModules = [ + "nouveau" + "nvidia" + "nvidia_drm" + "nvidia_modeset" + ]; } diff --git a/common/gpu/nvidia/kepler/default.nix b/common/gpu/nvidia/kepler/default.nix index f8d89a1e..129bcad4 100644 --- a/common/gpu/nvidia/kepler/default.nix +++ b/common/gpu/nvidia/kepler/default.nix @@ -1,4 +1,4 @@ -{lib, ...}: +{ lib, ... }: { imports = [ ../. ]; diff --git a/common/gpu/nvidia/maxwell/default.nix b/common/gpu/nvidia/maxwell/default.nix index 89565090..194f39c9 100644 --- a/common/gpu/nvidia/maxwell/default.nix +++ b/common/gpu/nvidia/maxwell/default.nix @@ -1,4 +1,4 @@ -{lib, ...}: +{ lib, ... }: { imports = [ ../. ]; diff --git a/common/gpu/nvidia/pascal/default.nix b/common/gpu/nvidia/pascal/default.nix index ad3555dc..acd77a2b 100644 --- a/common/gpu/nvidia/pascal/default.nix +++ b/common/gpu/nvidia/pascal/default.nix @@ -1,4 +1,4 @@ -{lib, ...}: +{ lib, ... }: { imports = [ ../. ]; diff --git a/common/gpu/nvidia/prime.nix b/common/gpu/nvidia/prime.nix index cf3e7d45..edfda26d 100644 --- a/common/gpu/nvidia/prime.nix +++ b/common/gpu/nvidia/prime.nix @@ -19,7 +19,7 @@ specialisation = lib.mkIf config.hardware.nvidia.primeBatterySaverSpecialisation { battery-saver.configuration = { - system.nixos.tags = ["battery-saver"]; + system.nixos.tags = [ "battery-saver" ]; imports = [ # Leave only the integrated GPU enabled ./disable.nix @@ -28,7 +28,7 @@ prime.offload.enable = lib.mkForce false; powerManagement = { enable = lib.mkForce false; - finegrained = lib.mkForce false; + finegrained = lib.mkForce false; }; }; }; diff --git a/common/gpu/nvidia/turing/default.nix b/common/gpu/nvidia/turing/default.nix index 461ae914..5e8d48f6 100644 --- a/common/gpu/nvidia/turing/default.nix +++ b/common/gpu/nvidia/turing/default.nix @@ -1,4 +1,4 @@ -{lib, config, ...}: +{ lib, config, ... }: let nvidiaPackage = config.hardware.nvidia.package; in diff --git a/common/pc/laptop/default.nix b/common/pc/laptop/default.nix index 9121b5f0..abc76fa7 100644 --- a/common/pc/laptop/default.nix +++ b/common/pc/laptop/default.nix @@ -6,6 +6,8 @@ # Gnome 40 introduced a new way of managing power, without tlp. # However, these 2 services clash when enabled simultaneously. # https://github.com/NixOS/nixos-hardware/issues/260 - services.tlp.enable = lib.mkDefault ((lib.versionOlder (lib.versions.majorMinor lib.version) "21.05") - || !config.services.power-profiles-daemon.enable); + services.tlp.enable = lib.mkDefault ( + (lib.versionOlder (lib.versions.majorMinor lib.version) "21.05") + || !config.services.power-profiles-daemon.enable + ); } diff --git a/default.nix b/default.nix index fbb5b770..c73bd5ad 100644 --- a/default.nix +++ b/default.nix @@ -1,3 +1,3 @@ # This file is necessary so nix-env -qa does not break, # when nixos-hardware is used as a channel -{} +{ } diff --git a/dell/inspiron/14-5420/default.nix b/dell/inspiron/14-5420/default.nix index 658f0b3b..8958afe6 100644 --- a/dell/inspiron/14-5420/default.nix +++ b/dell/inspiron/14-5420/default.nix @@ -1,22 +1,22 @@ { lib, ... }: - + { - imports = [ - ../../../common/cpu/intel - ../../../common/pc/laptop - ../../../common/pc/ssd - ]; + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; - hardware = { - enableRedistributableFirmware = lib.mkDefault true; - }; + hardware = { + enableRedistributableFirmware = lib.mkDefault true; + }; - services = { - fwupd = { - enable = lib.mkDefault true; - }; - thermald = { - enable = lib.mkDefault true; - }; - }; + services = { + fwupd = { + enable = lib.mkDefault true; + }; + thermald = { + enable = lib.mkDefault true; + }; + }; } diff --git a/dell/inspiron/5515/default.nix b/dell/inspiron/5515/default.nix index c2e8e310..452e9fae 100644 --- a/dell/inspiron/5515/default.nix +++ b/dell/inspiron/5515/default.nix @@ -16,7 +16,10 @@ serviceConfig.Type = "oneshot"; description = "reload touchpad driver"; # must run at boot (and not too early), and after suspend - wantedBy = [ "display-manager.service" "post-resume.target" ]; + wantedBy = [ + "display-manager.service" + "post-resume.target" + ]; # prevent running before suspend after = [ "post-resume.target" ]; }; @@ -24,7 +27,6 @@ # so that post-resume.service exists powerManagement.enable = true; - # fix suspend # https://bbs.archlinux.org/viewtopic.php?id=266108 says linux >= 5.12 required boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") pkgs.linuxPackages_latest; diff --git a/dell/inspiron/7405/default.nix b/dell/inspiron/7405/default.nix index d894e179..8068e8eb 100644 --- a/dell/inspiron/7405/default.nix +++ b/dell/inspiron/7405/default.nix @@ -11,7 +11,10 @@ with lib; ]; # TSC is unstable - boot.kernelParams = [ "notsc" "trace_clock=local" ]; + boot.kernelParams = [ + "notsc" + "trace_clock=local" + ]; hardware.enableRedistributableFirmware = mkDefault true; } diff --git a/dell/inspiron/7559/default.nix b/dell/inspiron/7559/default.nix index da837ba2..d742d249 100644 --- a/dell/inspiron/7559/default.nix +++ b/dell/inspiron/7559/default.nix @@ -17,7 +17,7 @@ enableRedistributableFirmware = lib.mkDefault true; }; - + services = { thermald.enable = lib.mkDefault true; }; diff --git a/dell/latitude/5490/default.nix b/dell/latitude/5490/default.nix index 2cde4ad0..9790967c 100644 --- a/dell/latitude/5490/default.nix +++ b/dell/latitude/5490/default.nix @@ -12,10 +12,13 @@ boot = { # Kernel Panic on suspend fix, taken from ArchLinux wiki. - kernelParams = [ "acpi_enforce_resources=lax" "i915.enable_dc=0" ]; + kernelParams = [ + "acpi_enforce_resources=lax" + "i915.enable_dc=0" + ]; # Audio Mute LED extraModprobeConfig = '' - options snd-hda-intel model=mute-led-gpio + options snd-hda-intel model=mute-led-gpio ''; }; } diff --git a/dell/precision/5490/default.nix b/dell/precision/5490/default.nix index b2cbabe4..d3619547 100644 --- a/dell/precision/5490/default.nix +++ b/dell/precision/5490/default.nix @@ -4,7 +4,9 @@ ../../../common/gpu/nvidia/ada-lovelace ]; - boot.kernelParams = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.7") [ "i915.force_probe=7d55" ]; + boot.kernelParams = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.7") [ + "i915.force_probe=7d55" + ]; hardware.nvidia.prime = { intelBusId = "PCI:0:2:0"; diff --git a/dell/precision/5530/default.nix b/dell/precision/5530/default.nix index 1b7007af..38390c8d 100644 --- a/dell/precision/5530/default.nix +++ b/dell/precision/5530/default.nix @@ -39,7 +39,7 @@ }; services = { fwupd.enable = lib.mkDefault true; - # This will save you money and possibly your life! + # This will save you money and possibly your life! thermald.enable = lib.mkDefault true; }; } diff --git a/dell/precision/7520/default.nix b/dell/precision/7520/default.nix index 567aa382..4742afb3 100644 --- a/dell/precision/7520/default.nix +++ b/dell/precision/7520/default.nix @@ -2,7 +2,8 @@ config, lib, ... -}: { +}: +{ imports = [ ../../../common/cpu/intel/kaby-lake ../../../common/pc/laptop @@ -11,13 +12,19 @@ ]; hardware.enableRedistributableFirmware = lib.mkDefault true; - boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "usb_storage" + "sd_mod" + "rtsx_pci_sdmmc" + ]; boot = { - kernelModules = ["kvm-intel"]; - blacklistedKernelModules = ["nouveau"]; + kernelModules = [ "kvm-intel" ]; + blacklistedKernelModules = [ "nouveau" ]; }; - boot.kernelParams = ["i915.modeset=1"]; + boot.kernelParams = [ "i915.modeset=1" ]; hardware = { graphics = { diff --git a/dell/xps/13-9300/default.nix b/dell/xps/13-9300/default.nix index 53828cfa..046fde85 100644 --- a/dell/xps/13-9300/default.nix +++ b/dell/xps/13-9300/default.nix @@ -3,7 +3,8 @@ let inherit (lib) mkDefault; -in { +in +{ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop diff --git a/dell/xps/13-9310/default.nix b/dell/xps/13-9310/default.nix index d5fcdc62..0f10b25f 100644 --- a/dell/xps/13-9310/default.nix +++ b/dell/xps/13-9310/default.nix @@ -1,16 +1,18 @@ -{ lib, pkgs, ... }: { +{ lib, pkgs, ... }: +{ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop ../../../common/pc/ssd ]; - # Includes the Wi-Fi and Bluetooth firmware for the QCA6390. hardware.enableRedistributableFirmware = true; # Requires at least 5.12 for working wi-fi and bluetooth. - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") ( + lib.mkDefault pkgs.linuxPackages_latest + ); # Touchpad goes over i2c. # Without this we get errors in dmesg on boot and hangs when shutting down. diff --git a/dell/xps/13-9315/default.nix b/dell/xps/13-9315/default.nix index 92ec28ce..c2a696b3 100644 --- a/dell/xps/13-9315/default.nix +++ b/dell/xps/13-9315/default.nix @@ -2,7 +2,8 @@ lib, pkgs, ... -}: { +}: +{ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop @@ -14,7 +15,7 @@ hardware.enableRedistributableFirmware = true; # touchpad uses I²C, so PS/2 is unnecessary - boot.blacklistedKernelModules = ["psmouse"]; + boot.blacklistedKernelModules = [ "psmouse" ]; # enable finger print sensor # configure with `sudo fprintd-enroll ` @@ -29,5 +30,5 @@ services.thermald.enable = lib.mkDefault true; # fix laptop's screen flickering, see https://wiki.archlinux.org/title/Intel_graphics#Screen_flickering - boot.kernelParams = ["i915.enable_psr=0"]; + boot.kernelParams = [ "i915.enable_psr=0" ]; } diff --git a/dell/xps/13-9333/default.nix b/dell/xps/13-9333/default.nix index a17c094d..c848e808 100644 --- a/dell/xps/13-9333/default.nix +++ b/dell/xps/13-9333/default.nix @@ -7,6 +7,9 @@ # Required to allow the touchpad to work boot.kernelParams = [ "i8042.nopnp=1" ]; - boot.blacklistedKernelModules = [ "i2c_hid" "i2c_hid_acpi" ]; - boot.kernelModules = [ "synaptics_i2c"]; + boot.blacklistedKernelModules = [ + "i2c_hid" + "i2c_hid_acpi" + ]; + boot.kernelModules = [ "synaptics_i2c" ]; } diff --git a/dell/xps/13-9343/default.nix b/dell/xps/13-9343/default.nix index 9cab0427..e98bb09b 100644 --- a/dell/xps/13-9343/default.nix +++ b/dell/xps/13-9343/default.nix @@ -14,7 +14,10 @@ boot = { # needs to be explicitly loaded or else bluetooth/wifi won't work - kernelModules = [ "kvm-intel" "wl" ]; + kernelModules = [ + "kvm-intel" + "wl" + ]; extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; }; } diff --git a/dell/xps/15-7590/nvidia/default.nix b/dell/xps/15-7590/nvidia/default.nix index 78da989d..dc80a2a3 100644 --- a/dell/xps/15-7590/nvidia/default.nix +++ b/dell/xps/15-7590/nvidia/default.nix @@ -1,4 +1,4 @@ -{lib, ...}: +{ lib, ... }: { imports = [ ../. diff --git a/dell/xps/15-9510/default.nix b/dell/xps/15-9510/default.nix index 12a64450..14779f0f 100644 --- a/dell/xps/15-9510/default.nix +++ b/dell/xps/15-9510/default.nix @@ -1,4 +1,5 @@ -{ lib, ... }: { +{ lib, ... }: +{ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop diff --git a/dell/xps/15-9510/nvidia/default.nix b/dell/xps/15-9510/nvidia/default.nix index 6ca0fd5a..248738a4 100644 --- a/dell/xps/15-9510/nvidia/default.nix +++ b/dell/xps/15-9510/nvidia/default.nix @@ -1,4 +1,5 @@ -{ lib, pkgs, ... }: { +{ lib, pkgs, ... }: +{ imports = [ ../../../../common/gpu/nvidia/prime.nix ../../../../common/gpu/nvidia/ampere @@ -11,7 +12,10 @@ graphics = { enable = lib.mkDefault true; enable32Bit = lib.mkDefault true; - extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ]; + extraPackages = with pkgs; [ + intel-media-driver + intel-compute-runtime + ]; }; nvidia = { prime = { diff --git a/dell/xps/15-9530/default.nix b/dell/xps/15-9530/default.nix index 99fd8a71..eb7a184b 100644 --- a/dell/xps/15-9530/default.nix +++ b/dell/xps/15-9530/default.nix @@ -14,7 +14,7 @@ # - 00:14.3 Network controller: Intel Corporation Raptor Lake PCH CNVi WiFi (rev 01) # > sudo lspci -vv -s 00:14.3 # 00:14.3 Network controller: Intel Corporation Raptor Lake PCH CNVi WiFi (rev 01) - # Subsystem: Intel Corporation Wi-Fi 6E AX211 160MHz + # Subsystem: Intel Corporation Wi-Fi 6E AX211 160MHz # # 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 diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index bae517d8..a5ffff66 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -12,10 +12,10 @@ hardware.nvidia.modesetting.enable = true; hardware.nvidia.prime = { - # integrated + # integrated intelBusId = "PCI:0:2:0"; - # dedicated + # dedicated nvidiaBusId = "PCI:1:0:0"; }; } diff --git a/dell/xps/15-9560/nvidia/default.nix b/dell/xps/15-9560/nvidia/default.nix index 8026a227..46b122b8 100644 --- a/dell/xps/15-9560/nvidia/default.nix +++ b/dell/xps/15-9560/nvidia/default.nix @@ -9,7 +9,6 @@ ../../../../common/gpu/nvidia/pascal ]; - # This runs only nvidia, great for games or heavy use of render applications ##### disable intel, run nvidia only and as default diff --git a/dell/xps/15-9570/nvidia/default.nix b/dell/xps/15-9570/nvidia/default.nix index 7cbb908a..ce1c8e04 100644 --- a/dell/xps/15-9570/nvidia/default.nix +++ b/dell/xps/15-9570/nvidia/default.nix @@ -6,7 +6,6 @@ ../shared.nix ]; - # This runs only nvidia, great for games or heavy use of render applications ##### disable intel, run nvidia only and as default diff --git a/dell/xps/15-9570/shared.nix b/dell/xps/15-9570/shared.nix index 06701e75..dcf9191b 100644 --- a/dell/xps/15-9570/shared.nix +++ b/dell/xps/15-9570/shared.nix @@ -1,7 +1,7 @@ { lib, ... }: { - imports = [ + imports = [ ../../../common/cpu/intel/coffee-lake ../../../common/pc/laptop ]; diff --git a/dell/xps/17-9700/common.nix b/dell/xps/17-9700/common.nix index 04241061..cb130350 100644 --- a/dell/xps/17-9700/common.nix +++ b/dell/xps/17-9700/common.nix @@ -10,17 +10,17 @@ # This will save you money and possibly your life! services.thermald.enable = lib.mkDefault true; - boot.kernelPatches = [{ - name = "enable-soundwire-drivers"; - patch = null; - extraConfig = '' - SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES y - SND_SOC_INTEL_SOUNDWIRE_SOF_MACH m - SND_SOC_RT1308 m - ''; - }]; + boot.kernelPatches = [ + { + name = "enable-soundwire-drivers"; + patch = null; + extraConfig = '' + SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES y + SND_SOC_INTEL_SOUNDWIRE_SOF_MACH m + SND_SOC_RT1308 m + ''; + } + ]; - boot.kernelPackages = - lib.mkIf (lib.versionOlder pkgs.linux.version "5.11") - pkgs.linuxPackages_latest; + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.11") pkgs.linuxPackages_latest; } diff --git a/dell/xps/17-9710/intel/default.nix b/dell/xps/17-9710/intel/default.nix index b07c6095..3224b51a 100644 --- a/dell/xps/17-9710/intel/default.nix +++ b/dell/xps/17-9710/intel/default.nix @@ -1,4 +1,5 @@ -{ lib, pkgs, ... }: { +{ lib, pkgs, ... }: +{ imports = [ ../../../../common/cpu/intel ../../../../common/pc/laptop @@ -9,5 +10,7 @@ hardware.enableRedistributableFirmware = true; # Requires at least 5.12 for working sound - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") ( + lib.mkDefault pkgs.linuxPackages_latest + ); } diff --git a/dell/xps/sleep-resume/bluetooth/default.nix b/dell/xps/sleep-resume/bluetooth/default.nix index e23e9c66..31731a1c 100644 --- a/dell/xps/sleep-resume/bluetooth/default.nix +++ b/dell/xps/sleep-resume/bluetooth/default.nix @@ -1,4 +1,9 @@ -{config, lib, pkgs, ...}: +{ + config, + lib, + pkgs, + ... +}: let inherit (lib) mkIf mkOption types; @@ -23,7 +28,8 @@ let }; cfg = config.services.sleep-resume.bluetooth; -in { +in +{ options = { services.sleep-resume.bluetooth = { enable = mkOption { diff --git a/dell/xps/sleep-resume/i2c-designware/default.nix b/dell/xps/sleep-resume/i2c-designware/default.nix index 55be5494..418abfb2 100644 --- a/dell/xps/sleep-resume/i2c-designware/default.nix +++ b/dell/xps/sleep-resume/i2c-designware/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let inherit (lib) mkIf mkOption types; @@ -22,7 +27,8 @@ let }; cfg = config.services.sleep-resume.i2c-designware; -in { +in +{ options = { services.sleep-resume.i2c-designware = { enable = mkOption { @@ -37,6 +43,3 @@ in { powerManagement.resumeCommands = "${reloadDesignware}/bin/reload-i2c-designware.sh"; }; } - - - diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..0477b1ca --- /dev/null +++ b/flake.lock @@ -0,0 +1,62 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1748995760, + "narHash": "sha256-f6UIyqm6JZs45pG667YdHOFYgDt+gvxQvt32ZLBp1h4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "26a54a5886c238b5df6f1e9ba0aa713434d73f06", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1747958103, + "narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "treefmt-nix": "treefmt-nix" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1748243702, + "narHash": "sha256-9YzfeN8CB6SzNPyPm2XjRRqSixDopTapaRsnTpXUEY8=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "1f3f7b784643d488ba4bf315638b2b0a4c5fb007", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index f7481983..4b2d832f 100644 --- a/flake.nix +++ b/flake.nix @@ -1,391 +1,417 @@ { description = "nixos-hardware"; - outputs = _: { - nixosModules = - let - deprecated = - issue: name: value: - builtins.trace "warning: ${name} flake output is deprecated and will be removed. See https://github.com/NixOS/nixos-hardware/issues/${issue} for more information" value; - import = path: path; # let the module system know what we are exporting - in - { - acer-aspire-4810t = import ./acer/aspire/4810t; - airis-n990 = import ./airis/n990; - aoostar-r1-n100 = import ./aoostar/r1/n100; - apple-imac-14-2 = import ./apple/imac/14-2; - apple-imac-18-2 = import ./apple/imac/18-2; - apple-macbook-air-3 = import ./apple/macbook-air/3; - apple-macbook-air-4 = import ./apple/macbook-air/4; - apple-macbook-air-6 = import ./apple/macbook-air/6; - apple-macbook-air-7 = import ./apple/macbook-air/7; - apple-macbook-pro = import ./apple/macbook-pro; - apple-macbook-pro-8-1 = import ./apple/macbook-pro/8-1; - apple-macbook-pro-10-1 = import ./apple/macbook-pro/10-1; - apple-macbook-pro-11-1 = import ./apple/macbook-pro/11-1; - apple-macbook-pro-11-5 = import ./apple/macbook-pro/11-5; - apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; - apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1; - apple-macmini-4-1 = import ./apple/macmini/4; - apple-t2 = import ./apple/t2; - asus-battery = import ./asus/battery.nix; - asus-ally-rc71l = import ./asus/ally/rc71l; - asus-fx504gd = import ./asus/fx504gd; - asus-fx506hm = import ./asus/fx506hm; - asus-fa506ic = import ./asus/fa506ic; - asus-fa507nv = import ./asus/fa507nv; - asus-fa507rm = import ./asus/fa507rm; - asus-flow-gv302x-amdgpu = import ./asus/flow/gv302x/amdgpu; - asus-flow-gv302x-nvidia = import ./asus/flow/gv302x/nvidia; - asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace; - asus-rog-strix-g513im = import ./asus/rog-strix/g513im; - asus-rog-strix-g533zw = import ./asus/rog-strix/g533zw; - asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie; - asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; - asus-rog-strix-x570e = import ./asus/rog-strix/x570e; - asus-zenbook-ux371 = import ./asus/zenbook/ux371; - asus-zenbook-ux535 = import ./asus/zenbook/ux535; - asus-zenbook-ux481-intelgpu = import ./asus/zenbook/ux481/intelgpu; - asus-zenbook-ux481-nvidia = import ./asus/zenbook/ux481/nvidia; - asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; - asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; - asus-zephyrus-ga402x = import ./asus/zephyrus/ga402x; - asus-zephyrus-ga402x-amdgpu = import ./asus/zephyrus/ga402x/amdgpu; - asus-zephyrus-ga402x-nvidia = import ./asus/zephyrus/ga402x/nvidia; - asus-zephyrus-ga502 = import ./asus/zephyrus/ga502; - asus-zephyrus-ga503 = import ./asus/zephyrus/ga503; - asus-zephyrus-gu603h = import ./asus/zephyrus/gu603h; - asus-zephyrus-gu605my = import ./asus/zephyrus/gu605my; - beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; - chuwi-minibook-x = import ./chuwi/minibook-x; - deciso-dec = import ./deciso/dec; - dell-e7240 = - deprecated "1326" "dell-e7240" - (import ./dell/e7240); - dell-g3-3779 = import ./dell/g3/3779; - dell-g3-3579 = import ./dell/g3/3579; - dell-inspiron-14-5420 = import ./dell/inspiron/14-5420; - dell-inspiron-5509 = import ./dell/inspiron/5509; - dell-inspiron-5515 = import ./dell/inspiron/5515; - dell-inspiron-7405 = import ./dell/inspiron/7405; - dell-inspiron-7460 = import ./dell/inspiron/7460; - dell-inspiron-7559 = import ./dell/inspiron/7559; - dell-latitude-3340 = import ./dell/latitude/3340; - dell-latitude-3480 = import ./dell/latitude/3480; - dell-latitude-5490 = import ./dell/latitude/5490; - dell-latitude-5520 = import ./dell/latitude/5520; - dell-latitude-7280 = import ./dell/latitude/7280; - dell-latitude-7390 = import ./dell/latitude/7390; - dell-latitude-7420 = import ./dell/latitude/7420; - dell-latitude-7430 = import ./dell/latitude/7430; - dell-latitude-7490 = import ./dell/latitude/7490; - dell-latitude-9430 = import ./dell/latitude/9430; - dell-latitude-e7240 = import ./dell/latitude/e7240; - dell-optiplex-3050 = import ./dell/optiplex/3050; - dell-poweredge-r7515 = import ./dell/poweredge/r7515; - dell-precision-3490 = import ./dell/precision/3490; - dell-precision-3541 = import ./dell/precision/3541; - dell-precision-5490 = import ./dell/precision/5490; - dell-precision-5530 = import ./dell/precision/5530; - dell-precision-5560 = import ./dell/precision/5560; - 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; - dell-xps-13-9315 = import ./dell/xps/13-9315; - dell-xps-13-9333 = import ./dell/xps/13-9333; - dell-xps-13-9343 = import ./dell/xps/13-9343; - dell-xps-13-9350 = import ./dell/xps/13-9350; - dell-xps-13-9360 = import ./dell/xps/13-9360; - dell-xps-13-9370 = import ./dell/xps/13-9370; - dell-xps-13-9380 = import ./dell/xps/13-9380; - dell-xps-15-7590 = import ./dell/xps/15-7590; - 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-9530 = import ./dell/xps/15-9530; - dell-xps-15-9530-nvidia = import ./dell/xps/15-9530/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; - dell-xps-15-9560-intel = import ./dell/xps/15-9560/intel; - dell-xps-15-9560-nvidia = import ./dell/xps/15-9560/nvidia; - dell-xps-15-9570 = import ./dell/xps/15-9570; - dell-xps-15-9570-intel = import ./dell/xps/15-9570/intel; - dell-xps-15-9570-nvidia = import ./dell/xps/15-9570/nvidia; - dell-xps-17-9700-intel = import ./dell/xps/17-9700/intel; - dell-xps-17-9700-nvidia = import ./dell/xps/17-9700/nvidia; - dell-xps-17-9710-intel = import ./dell/xps/17-9710/intel; - framework = import ./framework; - framework-11th-gen-intel = import ./framework/13-inch/11th-gen-intel; - framework-12th-gen-intel = import ./framework/13-inch/12th-gen-intel; - framework-13th-gen-intel = import ./framework/13-inch/13th-gen-intel; - framework-12-13th-gen-intel = import ./framework/12-inch/13th-gen-intel; - framework-intel-core-ultra-series1 = import ./framework/13-inch/intel-core-ultra-series1; - framework-13-7040-amd = import ./framework/13-inch/7040-amd; - framework-amd-ai-300-series = import ./framework/13-inch/amd-ai-300-series; - framework-16-7040-amd = import ./framework/16-inch/7040-amd; - friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; - friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; - focus-m2-gen1 = import ./focus/m2/gen1; - gigabyte-b550 = import ./gigabyte/b550; - gigabyte-b650 = import ./gigabyte/b650; - gmktec-nucbox-g3-plus = import ./gmktec/nucbox/g3-plus; - google-pixelbook = import ./google/pixelbook; - gpd-micropc = import ./gpd/micropc; - gpd-p2-max = import ./gpd/p2-max; - gpd-pocket-3 = import ./gpd/pocket-3; - gpd-pocket-4 = import ./gpd/pocket-4; - gpd-win-2 = import ./gpd/win-2; - gpd-win-max-2-2023 = import ./gpd/win-max-2/2023; - gpd-win-mini-2024 = import ./gpd/win-mini/2024; - hp-elitebook-2560p = import ./hp/elitebook/2560p; - hp-elitebook-830g6 = import ./hp/elitebook/830/g6; - hp-elitebook-845g7 = import ./hp/elitebook/845/g7; - hp-elitebook-845g8 = import ./hp/elitebook/845/g8; - hp-elitebook-845g9 = import ./hp/elitebook/845/g9; - hp-probook-440G5 = import ./hp/probook/440G5; - hp-laptop-14s-dq2024nf = import ./hp/laptop/14s-dq2024nf; - huawei-machc-wa = import ./huawei/machc-wa; - hp-notebook-14-df0023 = import ./hp/notebook/14-df0023; - intel-nuc-8i7beh = import ./intel/nuc/8i7beh; - lenovo-ideacentre-k330 = import ./lenovo/ideacentre/k330; - lenovo-ideapad-14imh9 = import ./lenovo/ideapad/14imh9; - lenovo-ideapad-15alc6 = import ./lenovo/ideapad/15alc6; - lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; - lenovo-ideapad-15ach6 = import ./lenovo/ideapad/15ach6; - lenovo-ideapad-16ach6 = import ./lenovo/ideapad/16ach6; - lenovo-ideapad-16ahp9 = import ./lenovo/ideapad/16ahp9; - lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; - lenovo-ideapad-slim-5 = import ./lenovo/ideapad/slim-5; - lenovo-ideapad-s145-15api = import ./lenovo/ideapad/s145-15api; - lenovo-legion-15ach6 = import ./lenovo/legion/15ach6; - lenovo-legion-15ach6h = import ./lenovo/legion/15ach6h; - lenovo-legion-15arh05h = import ./lenovo/legion/15arh05h; - lenovo-legion-16ach6h = import ./lenovo/legion/16ach6h; - lenovo-legion-16ach6h-hybrid = import ./lenovo/legion/16ach6h/hybrid; - lenovo-legion-16ach6h-nvidia = import ./lenovo/legion/16ach6h/nvidia; - lenovo-legion-16arh7h-igpu-only = import ./lenovo/legion/16arh7h/igpu-only; - lenovo-legion-16arh7h-hybrid = import ./lenovo/legion/16arh7h/hybrid; - lenovo-legion-16achg6-hybrid = import ./lenovo/legion/16achg6/hybrid; - lenovo-legion-16achg6-nvidia = import ./lenovo/legion/16achg6/nvidia; - lenovo-legion-16aph8 = import ./lenovo/legion/16aph8; - lenovo-legion-16arha7 = import ./lenovo/legion/16arha7; - lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; - lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h; - lenovo-legion-16irx9h = import ./lenovo/legion/16irx9h; - lenovo-legion-t526amr5 = import ./lenovo/legion/t526amr5; - lenovo-legion-y530-15ich = import ./lenovo/legion/15ich; - lenovo-thinkpad = import ./lenovo/thinkpad; - lenovo-thinkpad-a475 = import ./lenovo/thinkpad/a475; - lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; - lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel; - lenovo-thinkpad-e14-intel-gen4 = import ./lenovo/thinkpad/e14/intel/gen4; - lenovo-thinkpad-e14-intel-gen6 = import ./lenovo/thinkpad/e14/intel/gen6; - lenovo-thinkpad-e15-intel = import ./lenovo/thinkpad/e15/intel; - lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; - lenovo-thinkpad-e495 = import ./lenovo/thinkpad/e495; - lenovo-thinkpad-l13 = import ./lenovo/thinkpad/l13; - lenovo-thinkpad-l13-yoga = import ./lenovo/thinkpad/l13/yoga; - lenovo-thinkpad-l14-amd = import ./lenovo/thinkpad/l14/amd; - lenovo-thinkpad-l14-intel = import ./lenovo/thinkpad/l14/intel; - lenovo-thinkpad-l480 = import ./lenovo/thinkpad/l480; - lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1; - lenovo-thinkpad-p1-gen3 = import ./lenovo/thinkpad/p1/3th-gen; - lenovo-thinkpad-p14s-amd-gen1 = import ./lenovo/thinkpad/p14s/amd/gen1; - lenovo-thinkpad-p14s-amd-gen2 = import ./lenovo/thinkpad/p14s/amd/gen2; - lenovo-thinkpad-p14s-amd-gen3 = import ./lenovo/thinkpad/p14s/amd/gen3; - lenovo-thinkpad-p14s-amd-gen4 = import ./lenovo/thinkpad/p14s/amd/gen4; - lenovo-thinkpad-p14s-amd-gen5 = import ./lenovo/thinkpad/p14s/amd/gen5; - lenovo-thinkpad-p14s-intel-gen3 = import ./lenovo/thinkpad/p14s/intel/gen3; - lenovo-thinkpad-p14s-intel-gen5 = import ./lenovo/thinkpad/p14s/intel/gen5; - lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1; - lenovo-thinkpad-p16s-amd-gen2 = import ./lenovo/thinkpad/p16s/amd/gen2; - lenovo-thinkpad-p16s-intel-gen2 = import ./lenovo/thinkpad/p16s/intel/gen2; - lenovo-thinkpad-p43s = import ./lenovo/thinkpad/p43s; - lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50; - lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51; - lenovo-thinkpad-p52 = import ./lenovo/thinkpad/p52; - lenovo-thinkpad-p53 = import ./lenovo/thinkpad/p53; - lenovo-thinkpad-t14 = import ./lenovo/thinkpad/t14; - lenovo-thinkpad-t14-amd-gen1 = import ./lenovo/thinkpad/t14/amd/gen1; - lenovo-thinkpad-t14-amd-gen2 = import ./lenovo/thinkpad/t14/amd/gen2; - lenovo-thinkpad-t14-amd-gen3 = import ./lenovo/thinkpad/t14/amd/gen3; - lenovo-thinkpad-t14-amd-gen4 = import ./lenovo/thinkpad/t14/amd/gen4; - lenovo-thinkpad-t14-amd-gen5 = import ./lenovo/thinkpad/t14/amd/gen5; - lenovo-thinkpad-t14s = import ./lenovo/thinkpad/t14s; - lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1; - lenovo-thinkpad-t14s-amd-gen4 = import ./lenovo/thinkpad/t14s/amd/gen4; - lenovo-thinkpad-t410 = import ./lenovo/thinkpad/t410; - lenovo-thinkpad-t420 = import ./lenovo/thinkpad/t420; - lenovo-thinkpad-t430 = import ./lenovo/thinkpad/t430; - lenovo-thinkpad-t440p = import ./lenovo/thinkpad/t440p; - lenovo-thinkpad-t440s = import ./lenovo/thinkpad/t440s; - lenovo-thinkpad-t450s = import ./lenovo/thinkpad/t450s; - lenovo-thinkpad-t460 = import ./lenovo/thinkpad/t460; - lenovo-thinkpad-t460p = import ./lenovo/thinkpad/t460p; - lenovo-thinkpad-t460s = import ./lenovo/thinkpad/t460s; - lenovo-thinkpad-t470s = import ./lenovo/thinkpad/t470s; - lenovo-thinkpad-t480 = import ./lenovo/thinkpad/t480; - lenovo-thinkpad-t480s = import ./lenovo/thinkpad/t480s; - lenovo-thinkpad-t490 = import ./lenovo/thinkpad/t490; - lenovo-thinkpad-t490s = import ./lenovo/thinkpad/t490s; - lenovo-thinkpad-t495 = import ./lenovo/thinkpad/t495; - lenovo-thinkpad-t520 = import ./lenovo/thinkpad/t520; - lenovo-thinkpad-w520 = import ./lenovo/thinkpad/w520; - lenovo-thinkpad-t550 = import ./lenovo/thinkpad/t550; - lenovo-thinkpad-t590 = import ./lenovo/thinkpad/t590; - lenovo-thinkpad-x1 = import ./lenovo/thinkpad/x1; - lenovo-thinkpad-x1-yoga = import ./lenovo/thinkpad/x1/yoga; - lenovo-thinkpad-x1-yoga-7th-gen = import ./lenovo/thinkpad/x1/yoga/7th-gen; - lenovo-thinkpad-x1-yoga-8th-gen = import ./lenovo/thinkpad/x1/yoga/8th-gen; - lenovo-thinkpad-x1-2nd-gen = import ./lenovo/thinkpad/x1/2nd-gen; - lenovo-thinkpad-x1-6th-gen = import ./lenovo/thinkpad/x1/6th-gen; - lenovo-thinkpad-x1-7th-gen = import ./lenovo/thinkpad/x1/7th-gen; - lenovo-thinkpad-x1-9th-gen = import ./lenovo/thinkpad/x1/9th-gen; - lenovo-thinkpad-x1-10th-gen = import ./lenovo/thinkpad/x1/10th-gen; - lenovo-thinkpad-x1-11th-gen = import ./lenovo/thinkpad/x1/11th-gen; - lenovo-thinkpad-x1-12th-gen = import ./lenovo/thinkpad/x1/12th-gen; - lenovo-thinkpad-x1-13th-gen = import ./lenovo/thinkpad/x1/13th-gen; - lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme; - lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2; - lenovo-thinkpad-x1-extreme-gen3 = import ./lenovo/thinkpad/x1-extreme/gen3; - lenovo-thinkpad-x1-extreme-gen4 = import ./lenovo/thinkpad/x1-extreme/gen4; - lenovo-thinkpad-x1-nano = import ./lenovo/thinkpad/x1-nano; - lenovo-thinkpad-x1-nano-gen1 = import ./lenovo/thinkpad/x1-nano/gen1; - lenovo-thinkpad-x13 = import ./lenovo/thinkpad/x13/intel; - lenovo-thinkpad-x13-amd = import ./lenovo/thinkpad/x13/amd; - lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13/yoga; - lenovo-thinkpad-x13-yoga-3th-gen = import ./lenovo/thinkpad/x13/yoga/3th-gen; - lenovo-thinkpad-x13s = import ./lenovo/thinkpad/x13s; - lenovo-thinkpad-x140e = import ./lenovo/thinkpad/x140e; - lenovo-thinkpad-x200s = import ./lenovo/thinkpad/x200s; - lenovo-thinkpad-x220 = import ./lenovo/thinkpad/x220; - lenovo-thinkpad-x230 = import ./lenovo/thinkpad/x230; - lenovo-thinkpad-x250 = import ./lenovo/thinkpad/x250; - lenovo-thinkpad-x260 = import ./lenovo/thinkpad/x260; - lenovo-thinkpad-x270 = import ./lenovo/thinkpad/x270; - lenovo-thinkpad-x280 = import ./lenovo/thinkpad/x280; - lenovo-thinkpad-x390 = import ./lenovo/thinkpad/x390; - lenovo-thinkpad-z = import ./lenovo/thinkpad/z; - lenovo-thinkpad-z13-gen1 = import ./lenovo/thinkpad/z/gen1/z13; - lenovo-thinkpad-z13-gen2 = import ./lenovo/thinkpad/z/gen2/z13; - lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; - lenovo-yoga-7-14ARH7 = import ./lenovo/yoga/7/14ARH7; - lenovo-yoga-7-14ARH7-amdgpu = import ./lenovo/yoga/7/14ARH7/amdgpu; - lenovo-yoga-7-14ARH7-nvidia = import ./lenovo/yoga/7/14ARH7/nvidia; - lenovo-yoga-7-14IAH7-integrated = import ./lenovo/yoga/7/14IAH7/integrated; - lenovo-yoga-7-14IAH7-hybrid = import ./lenovo/yoga/7/14IAH7/hybrid; - lenovo-yoga-7-14ILL10 = import ./lenovo/yoga/7/14ILL10; - lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8; - letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; - malibal-aon-s1-intel = import ./malibal/aon/s1; - microchip-icicle-kit = import ./microchip/icicle-kit; - microsoft-surface-go = import ./microsoft/surface/surface-go; - microsoft-surface-pro-intel = import ./microsoft/surface/surface-pro-intel; - microsoft-surface-laptop-amd = import ./microsoft/surface/surface-laptop-amd; - microsoft-surface-common = import ./microsoft/surface/common; - microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; - microsoft-surface-pro-9 = import ./microsoft/surface-pro/9; - milkv-pioneer = import ./milkv/pioneer; - minisforum-v3 = import ./minisforum/v3; - morefine-m600 = import ./morefine/m600; - msi-b350-tomahawk = import ./msi/b350-tomahawk; - msi-b550-a-pro = import ./msi/b550-a-pro; - msi-gs60 = import ./msi/gs60; - msi-gl62 = import ./msi/gl62; - msi-gl65-10SDR-492 = import ./msi/gl65/10SDR-492; - nxp-imx8mp-evk = import ./nxp/imx8mp-evk; - nxp-imx8mq-evk = import ./nxp/imx8mq-evk; - nxp-imx8qm-mek = import ./nxp/imx8qm-mek; - hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; - hardkernel-odroid-h3 = import ./hardkernel/odroid-h3; - hardkernel-odroid-h4 = import ./hardkernel/odroid-h4; - omen-14-fb0798ng = import ./omen/14-fb0798ng; - omen-15-ce002ns = import ./omen/15-ce002ns; - omen-15-en0010ca = import ./omen/15-en0010ca; - omen-16-n0005ne = import ./omen/16-n0005ne; - omen-16-n0280nd = import ./omen/16-n0280nd; - omen-15-en1007sa = import ./omen/15-en1007sa; - omen-15-en0002np = import ./omen/15-en0002np; - onenetbook-4 = import ./onenetbook/4; - olimex-teres_i = import ./olimex/teres_i; - pcengines-apu = import ./pcengines/apu; - pine64-pinebook-pro = import ./pine64/pinebook-pro; - pine64-rockpro64 = import ./pine64/rockpro64; - pine64-star64 = import ./pine64/star64; - protectli-vp4670 = import ./protectli/vp4670; - purism-librem-13v3 = import ./purism/librem/13v3; - purism-librem-15v3 = import ./purism/librem/15v3; - purism-librem-5r4 = import ./purism/librem/5r4; - raspberry-pi-2 = import ./raspberry-pi/2; - raspberry-pi-3 = import ./raspberry-pi/3; - raspberry-pi-4 = import ./raspberry-pi/4; - raspberry-pi-5 = import ./raspberry-pi/5; - rock-4c-plus = import ./radxa/rock-4c-plus; - rock-5b = import ./radxa/rock-5b; - rock-pi-4 = import ./radxa/rock-pi-4; - rock-pi-e = import ./radxa/rock-pi-e; - kobol-helios4 = import ./kobol/helios4; - samsung-np900x3c = import ./samsung/np900x3c; - slimbook-hero-rpl-rtx = import ./slimbook/hero/rpl-rtx; - starfive-visionfive-v1 = import ./starfive/visionfive/v1; - starfive-visionfive-2 = import ./starfive/visionfive/v2; - starlabs-starlite-i5 = import ./starlabs/starlite/i5; - supermicro = import ./supermicro; - supermicro-a1sri-2758f = import ./supermicro/a1sri-2758f; - supermicro-m11sdv-8c-ln4f = import ./supermicro/m11sdv-8c-ln4f; - supermicro-x10sll-f = import ./supermicro/x10sll-f; - supermicro-x12scz-tln4f = import ./supermicro/x12scz-tln4f; - system76 = import ./system76; - system76-gaze18 = import ./system76/gaze18; - system76-galp5-1650 = import ./system76/galp5-1650; - system76-darp6 = import ./system76/darp6; - toshiba-swanky = import ./toshiba/swanky; - tuxedo-aura-15-gen1 = import ./tuxedo/aura/15/gen1; - tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; - tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7; - tuxedo-infinitybook-pro14-gen9-intel = import ./tuxedo/infinitybook/pro14/gen9/intel; - tuxedo-pulse-14-gen3 = import ./tuxedo/pulse/14/gen3; - tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; - xiaomi-redmibook-16-pro-2024 = import ./xiaomi/redmibook/16-pro-2024; - - common-cpu-amd = import ./common/cpu/amd; - common-cpu-amd-pstate = import ./common/cpu/amd/pstate.nix; - common-cpu-amd-zenpower = import ./common/cpu/amd/zenpower.nix; - common-cpu-amd-raphael-igpu = import ./common/cpu/amd/raphael/igpu.nix; - common-cpu-intel = import ./common/cpu/intel; - common-gpu-intel-comet-lake = - deprecated "992" "common-gpu-intel-comet-lake" - (import ./common/gpu/intel/comet-lake); - common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix; - common-gpu-intel-kaby-lake = - deprecated "992" "common-gpu-intel-kaby-lake" - (import ./common/gpu/intel/kaby-lake); - common-gpu-intel-sandy-bridge = - deprecated "992" "common-gpu-intel-sandy-bridge" - (import ./common/gpu/intel/sandy-bridge); - common-gpu-amd = import ./common/gpu/amd; - common-gpu-amd-sea-islands = import ./common/gpu/amd/sea-islands; - common-gpu-amd-southern-islands = import ./common/gpu/amd/southern-islands; - common-gpu-intel = import ./common/gpu/intel; - common-gpu-intel-disable = import ./common/gpu/intel/disable.nix; - common-gpu-nvidia = import ./common/gpu/nvidia/prime.nix; - common-gpu-nvidia-sync = import ./common/gpu/nvidia/prime-sync.nix; - common-gpu-nvidia-nonprime = import ./common/gpu/nvidia; - common-gpu-nvidia-disable = import ./common/gpu/nvidia/disable.nix; - common-hidpi = import ./common/hidpi.nix; - common-pc = import ./common/pc; - common-pc-hdd = import ./common/pc/hdd; - common-pc-laptop = import ./common/pc/laptop; - common-pc-laptop-acpi_call = throw "common-pc-laptop-acpi_call has been removed because it is obsolete: https://github.com/NixOS/nixos-hardware/issues/1114"; - common-pc-laptop-hdd = import ./common/pc/laptop/hdd; - common-pc-laptop-ssd = import ./common/pc/ssd; - common-pc-ssd = import ./common/pc/ssd; - }; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05-small"; + treefmt-nix.url = "github:numtide/treefmt-nix"; }; + + outputs = + { + nixpkgs, + self, + treefmt-nix, + }: + let + systems = [ + "aarch64-darwin" + "aarch64-linux" + "x86_64-darwin" + "x86_64-linux" + ]; + forEachSystem = + function: nixpkgs.lib.genAttrs (systems) (system: function nixpkgs.legacyPackages.${system}); + + treefmtEval = forEachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix); + in + { + checks = forEachSystem (pkgs: { + formatting = treefmtEval.${pkgs.system}.config.build.check self; + }); + formatter = forEachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper); + + nixosModules = + let + deprecated = + issue: name: value: + builtins.trace "warning: ${name} flake output is deprecated and will be removed. See https://github.com/NixOS/nixos-hardware/issues/${issue} for more information" value; + import = path: path; # let the module system know what we are exporting + in + { + acer-aspire-4810t = import ./acer/aspire/4810t; + airis-n990 = import ./airis/n990; + aoostar-r1-n100 = import ./aoostar/r1/n100; + apple-imac-14-2 = import ./apple/imac/14-2; + apple-imac-18-2 = import ./apple/imac/18-2; + apple-macbook-air-3 = import ./apple/macbook-air/3; + apple-macbook-air-4 = import ./apple/macbook-air/4; + apple-macbook-air-6 = import ./apple/macbook-air/6; + apple-macbook-air-7 = import ./apple/macbook-air/7; + apple-macbook-pro = import ./apple/macbook-pro; + apple-macbook-pro-8-1 = import ./apple/macbook-pro/8-1; + apple-macbook-pro-10-1 = import ./apple/macbook-pro/10-1; + apple-macbook-pro-11-1 = import ./apple/macbook-pro/11-1; + apple-macbook-pro-11-5 = import ./apple/macbook-pro/11-5; + apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; + apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1; + apple-macmini-4-1 = import ./apple/macmini/4; + apple-t2 = import ./apple/t2; + asus-battery = import ./asus/battery.nix; + asus-ally-rc71l = import ./asus/ally/rc71l; + asus-fx504gd = import ./asus/fx504gd; + asus-fx506hm = import ./asus/fx506hm; + asus-fa506ic = import ./asus/fa506ic; + asus-fa507nv = import ./asus/fa507nv; + asus-fa507rm = import ./asus/fa507rm; + asus-flow-gv302x-amdgpu = import ./asus/flow/gv302x/amdgpu; + asus-flow-gv302x-nvidia = import ./asus/flow/gv302x/nvidia; + asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace; + asus-rog-strix-g513im = import ./asus/rog-strix/g513im; + asus-rog-strix-g533zw = import ./asus/rog-strix/g533zw; + asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie; + asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; + asus-rog-strix-x570e = import ./asus/rog-strix/x570e; + asus-zenbook-ux371 = import ./asus/zenbook/ux371; + asus-zenbook-ux535 = import ./asus/zenbook/ux535; + asus-zenbook-ux481-intelgpu = import ./asus/zenbook/ux481/intelgpu; + asus-zenbook-ux481-nvidia = import ./asus/zenbook/ux481/nvidia; + asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; + asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; + asus-zephyrus-ga402x = import ./asus/zephyrus/ga402x; + asus-zephyrus-ga402x-amdgpu = import ./asus/zephyrus/ga402x/amdgpu; + asus-zephyrus-ga402x-nvidia = import ./asus/zephyrus/ga402x/nvidia; + asus-zephyrus-ga502 = import ./asus/zephyrus/ga502; + asus-zephyrus-ga503 = import ./asus/zephyrus/ga503; + asus-zephyrus-gu603h = import ./asus/zephyrus/gu603h; + asus-zephyrus-gu605my = import ./asus/zephyrus/gu605my; + beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle; + chuwi-minibook-x = import ./chuwi/minibook-x; + deciso-dec = import ./deciso/dec; + dell-e7240 = deprecated "1326" "dell-e7240" (import ./dell/e7240); + dell-g3-3779 = import ./dell/g3/3779; + dell-g3-3579 = import ./dell/g3/3579; + dell-inspiron-14-5420 = import ./dell/inspiron/14-5420; + dell-inspiron-5509 = import ./dell/inspiron/5509; + dell-inspiron-5515 = import ./dell/inspiron/5515; + dell-inspiron-7405 = import ./dell/inspiron/7405; + dell-inspiron-7460 = import ./dell/inspiron/7460; + dell-inspiron-7559 = import ./dell/inspiron/7559; + dell-latitude-3340 = import ./dell/latitude/3340; + dell-latitude-3480 = import ./dell/latitude/3480; + dell-latitude-5490 = import ./dell/latitude/5490; + dell-latitude-5520 = import ./dell/latitude/5520; + dell-latitude-7280 = import ./dell/latitude/7280; + dell-latitude-7390 = import ./dell/latitude/7390; + dell-latitude-7420 = import ./dell/latitude/7420; + dell-latitude-7430 = import ./dell/latitude/7430; + dell-latitude-7490 = import ./dell/latitude/7490; + dell-latitude-9430 = import ./dell/latitude/9430; + dell-latitude-e7240 = import ./dell/latitude/e7240; + dell-optiplex-3050 = import ./dell/optiplex/3050; + dell-poweredge-r7515 = import ./dell/poweredge/r7515; + dell-precision-3490 = import ./dell/precision/3490; + dell-precision-3541 = import ./dell/precision/3541; + dell-precision-5490 = import ./dell/precision/5490; + dell-precision-5530 = import ./dell/precision/5530; + dell-precision-5560 = import ./dell/precision/5560; + 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; + dell-xps-13-9315 = import ./dell/xps/13-9315; + dell-xps-13-9333 = import ./dell/xps/13-9333; + dell-xps-13-9343 = import ./dell/xps/13-9343; + dell-xps-13-9350 = import ./dell/xps/13-9350; + dell-xps-13-9360 = import ./dell/xps/13-9360; + dell-xps-13-9370 = import ./dell/xps/13-9370; + dell-xps-13-9380 = import ./dell/xps/13-9380; + dell-xps-15-7590 = import ./dell/xps/15-7590; + 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-9530 = import ./dell/xps/15-9530; + dell-xps-15-9530-nvidia = import ./dell/xps/15-9530/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; + dell-xps-15-9560-intel = import ./dell/xps/15-9560/intel; + dell-xps-15-9560-nvidia = import ./dell/xps/15-9560/nvidia; + dell-xps-15-9570 = import ./dell/xps/15-9570; + dell-xps-15-9570-intel = import ./dell/xps/15-9570/intel; + dell-xps-15-9570-nvidia = import ./dell/xps/15-9570/nvidia; + dell-xps-17-9700-intel = import ./dell/xps/17-9700/intel; + dell-xps-17-9700-nvidia = import ./dell/xps/17-9700/nvidia; + dell-xps-17-9710-intel = import ./dell/xps/17-9710/intel; + framework = import ./framework; + framework-11th-gen-intel = import ./framework/13-inch/11th-gen-intel; + framework-12th-gen-intel = import ./framework/13-inch/12th-gen-intel; + framework-13th-gen-intel = import ./framework/13-inch/13th-gen-intel; + framework-12-13th-gen-intel = import ./framework/12-inch/13th-gen-intel; + framework-intel-core-ultra-series1 = import ./framework/13-inch/intel-core-ultra-series1; + framework-13-7040-amd = import ./framework/13-inch/7040-amd; + framework-amd-ai-300-series = import ./framework/13-inch/amd-ai-300-series; + framework-16-7040-amd = import ./framework/16-inch/7040-amd; + friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; + friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; + focus-m2-gen1 = import ./focus/m2/gen1; + gigabyte-b550 = import ./gigabyte/b550; + gigabyte-b650 = import ./gigabyte/b650; + gmktec-nucbox-g3-plus = import ./gmktec/nucbox/g3-plus; + google-pixelbook = import ./google/pixelbook; + gpd-micropc = import ./gpd/micropc; + gpd-p2-max = import ./gpd/p2-max; + gpd-pocket-3 = import ./gpd/pocket-3; + gpd-pocket-4 = import ./gpd/pocket-4; + gpd-win-2 = import ./gpd/win-2; + gpd-win-max-2-2023 = import ./gpd/win-max-2/2023; + gpd-win-mini-2024 = import ./gpd/win-mini/2024; + hp-elitebook-2560p = import ./hp/elitebook/2560p; + hp-elitebook-830g6 = import ./hp/elitebook/830/g6; + hp-elitebook-845g7 = import ./hp/elitebook/845/g7; + hp-elitebook-845g8 = import ./hp/elitebook/845/g8; + hp-elitebook-845g9 = import ./hp/elitebook/845/g9; + hp-probook-440G5 = import ./hp/probook/440G5; + hp-laptop-14s-dq2024nf = import ./hp/laptop/14s-dq2024nf; + huawei-machc-wa = import ./huawei/machc-wa; + hp-notebook-14-df0023 = import ./hp/notebook/14-df0023; + intel-nuc-8i7beh = import ./intel/nuc/8i7beh; + lenovo-ideacentre-k330 = import ./lenovo/ideacentre/k330; + lenovo-ideapad-14imh9 = import ./lenovo/ideapad/14imh9; + lenovo-ideapad-15alc6 = import ./lenovo/ideapad/15alc6; + lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; + lenovo-ideapad-15ach6 = import ./lenovo/ideapad/15ach6; + lenovo-ideapad-16ach6 = import ./lenovo/ideapad/16ach6; + lenovo-ideapad-16ahp9 = import ./lenovo/ideapad/16ahp9; + lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; + lenovo-ideapad-slim-5 = import ./lenovo/ideapad/slim-5; + lenovo-ideapad-s145-15api = import ./lenovo/ideapad/s145-15api; + lenovo-legion-15ach6 = import ./lenovo/legion/15ach6; + lenovo-legion-15ach6h = import ./lenovo/legion/15ach6h; + lenovo-legion-15arh05h = import ./lenovo/legion/15arh05h; + lenovo-legion-16ach6h = import ./lenovo/legion/16ach6h; + lenovo-legion-16ach6h-hybrid = import ./lenovo/legion/16ach6h/hybrid; + lenovo-legion-16ach6h-nvidia = import ./lenovo/legion/16ach6h/nvidia; + lenovo-legion-16arh7h-igpu-only = import ./lenovo/legion/16arh7h/igpu-only; + lenovo-legion-16arh7h-hybrid = import ./lenovo/legion/16arh7h/hybrid; + lenovo-legion-16achg6-hybrid = import ./lenovo/legion/16achg6/hybrid; + lenovo-legion-16achg6-nvidia = import ./lenovo/legion/16achg6/nvidia; + lenovo-legion-16aph8 = import ./lenovo/legion/16aph8; + lenovo-legion-16arha7 = import ./lenovo/legion/16arha7; + lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; + lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h; + lenovo-legion-16irx9h = import ./lenovo/legion/16irx9h; + lenovo-legion-t526amr5 = import ./lenovo/legion/t526amr5; + lenovo-legion-y530-15ich = import ./lenovo/legion/15ich; + lenovo-thinkpad = import ./lenovo/thinkpad; + lenovo-thinkpad-a475 = import ./lenovo/thinkpad/a475; + lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; + lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel; + lenovo-thinkpad-e14-intel-gen4 = import ./lenovo/thinkpad/e14/intel/gen4; + lenovo-thinkpad-e14-intel-gen6 = import ./lenovo/thinkpad/e14/intel/gen6; + lenovo-thinkpad-e15-intel = import ./lenovo/thinkpad/e15/intel; + lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; + lenovo-thinkpad-e495 = import ./lenovo/thinkpad/e495; + lenovo-thinkpad-l13 = import ./lenovo/thinkpad/l13; + lenovo-thinkpad-l13-yoga = import ./lenovo/thinkpad/l13/yoga; + lenovo-thinkpad-l14-amd = import ./lenovo/thinkpad/l14/amd; + lenovo-thinkpad-l14-intel = import ./lenovo/thinkpad/l14/intel; + lenovo-thinkpad-l480 = import ./lenovo/thinkpad/l480; + lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1; + lenovo-thinkpad-p1-gen3 = import ./lenovo/thinkpad/p1/3th-gen; + lenovo-thinkpad-p14s-amd-gen1 = import ./lenovo/thinkpad/p14s/amd/gen1; + lenovo-thinkpad-p14s-amd-gen2 = import ./lenovo/thinkpad/p14s/amd/gen2; + lenovo-thinkpad-p14s-amd-gen3 = import ./lenovo/thinkpad/p14s/amd/gen3; + lenovo-thinkpad-p14s-amd-gen4 = import ./lenovo/thinkpad/p14s/amd/gen4; + lenovo-thinkpad-p14s-amd-gen5 = import ./lenovo/thinkpad/p14s/amd/gen5; + lenovo-thinkpad-p14s-intel-gen3 = import ./lenovo/thinkpad/p14s/intel/gen3; + lenovo-thinkpad-p14s-intel-gen5 = import ./lenovo/thinkpad/p14s/intel/gen5; + lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1; + lenovo-thinkpad-p16s-amd-gen2 = import ./lenovo/thinkpad/p16s/amd/gen2; + lenovo-thinkpad-p16s-intel-gen2 = import ./lenovo/thinkpad/p16s/intel/gen2; + lenovo-thinkpad-p43s = import ./lenovo/thinkpad/p43s; + lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50; + lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51; + lenovo-thinkpad-p52 = import ./lenovo/thinkpad/p52; + lenovo-thinkpad-p53 = import ./lenovo/thinkpad/p53; + lenovo-thinkpad-t14 = import ./lenovo/thinkpad/t14; + lenovo-thinkpad-t14-amd-gen1 = import ./lenovo/thinkpad/t14/amd/gen1; + lenovo-thinkpad-t14-amd-gen2 = import ./lenovo/thinkpad/t14/amd/gen2; + lenovo-thinkpad-t14-amd-gen3 = import ./lenovo/thinkpad/t14/amd/gen3; + lenovo-thinkpad-t14-amd-gen4 = import ./lenovo/thinkpad/t14/amd/gen4; + lenovo-thinkpad-t14-amd-gen5 = import ./lenovo/thinkpad/t14/amd/gen5; + lenovo-thinkpad-t14s = import ./lenovo/thinkpad/t14s; + lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1; + lenovo-thinkpad-t14s-amd-gen4 = import ./lenovo/thinkpad/t14s/amd/gen4; + lenovo-thinkpad-t410 = import ./lenovo/thinkpad/t410; + lenovo-thinkpad-t420 = import ./lenovo/thinkpad/t420; + lenovo-thinkpad-t430 = import ./lenovo/thinkpad/t430; + lenovo-thinkpad-t440p = import ./lenovo/thinkpad/t440p; + lenovo-thinkpad-t440s = import ./lenovo/thinkpad/t440s; + lenovo-thinkpad-t450s = import ./lenovo/thinkpad/t450s; + lenovo-thinkpad-t460 = import ./lenovo/thinkpad/t460; + lenovo-thinkpad-t460p = import ./lenovo/thinkpad/t460p; + lenovo-thinkpad-t460s = import ./lenovo/thinkpad/t460s; + lenovo-thinkpad-t470s = import ./lenovo/thinkpad/t470s; + lenovo-thinkpad-t480 = import ./lenovo/thinkpad/t480; + lenovo-thinkpad-t480s = import ./lenovo/thinkpad/t480s; + lenovo-thinkpad-t490 = import ./lenovo/thinkpad/t490; + lenovo-thinkpad-t490s = import ./lenovo/thinkpad/t490s; + lenovo-thinkpad-t495 = import ./lenovo/thinkpad/t495; + lenovo-thinkpad-t520 = import ./lenovo/thinkpad/t520; + lenovo-thinkpad-w520 = import ./lenovo/thinkpad/w520; + lenovo-thinkpad-t550 = import ./lenovo/thinkpad/t550; + lenovo-thinkpad-t590 = import ./lenovo/thinkpad/t590; + lenovo-thinkpad-x1 = import ./lenovo/thinkpad/x1; + lenovo-thinkpad-x1-yoga = import ./lenovo/thinkpad/x1/yoga; + lenovo-thinkpad-x1-yoga-7th-gen = import ./lenovo/thinkpad/x1/yoga/7th-gen; + lenovo-thinkpad-x1-yoga-8th-gen = import ./lenovo/thinkpad/x1/yoga/8th-gen; + lenovo-thinkpad-x1-2nd-gen = import ./lenovo/thinkpad/x1/2nd-gen; + lenovo-thinkpad-x1-6th-gen = import ./lenovo/thinkpad/x1/6th-gen; + lenovo-thinkpad-x1-7th-gen = import ./lenovo/thinkpad/x1/7th-gen; + lenovo-thinkpad-x1-9th-gen = import ./lenovo/thinkpad/x1/9th-gen; + lenovo-thinkpad-x1-10th-gen = import ./lenovo/thinkpad/x1/10th-gen; + lenovo-thinkpad-x1-11th-gen = import ./lenovo/thinkpad/x1/11th-gen; + lenovo-thinkpad-x1-12th-gen = import ./lenovo/thinkpad/x1/12th-gen; + lenovo-thinkpad-x1-13th-gen = import ./lenovo/thinkpad/x1/13th-gen; + lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme; + lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2; + lenovo-thinkpad-x1-extreme-gen3 = import ./lenovo/thinkpad/x1-extreme/gen3; + lenovo-thinkpad-x1-extreme-gen4 = import ./lenovo/thinkpad/x1-extreme/gen4; + lenovo-thinkpad-x1-nano = import ./lenovo/thinkpad/x1-nano; + lenovo-thinkpad-x1-nano-gen1 = import ./lenovo/thinkpad/x1-nano/gen1; + lenovo-thinkpad-x13 = import ./lenovo/thinkpad/x13/intel; + lenovo-thinkpad-x13-amd = import ./lenovo/thinkpad/x13/amd; + lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13/yoga; + lenovo-thinkpad-x13-yoga-3th-gen = import ./lenovo/thinkpad/x13/yoga/3th-gen; + lenovo-thinkpad-x13s = import ./lenovo/thinkpad/x13s; + lenovo-thinkpad-x140e = import ./lenovo/thinkpad/x140e; + lenovo-thinkpad-x200s = import ./lenovo/thinkpad/x200s; + lenovo-thinkpad-x220 = import ./lenovo/thinkpad/x220; + lenovo-thinkpad-x230 = import ./lenovo/thinkpad/x230; + lenovo-thinkpad-x250 = import ./lenovo/thinkpad/x250; + lenovo-thinkpad-x260 = import ./lenovo/thinkpad/x260; + lenovo-thinkpad-x270 = import ./lenovo/thinkpad/x270; + lenovo-thinkpad-x280 = import ./lenovo/thinkpad/x280; + lenovo-thinkpad-x390 = import ./lenovo/thinkpad/x390; + lenovo-thinkpad-z = import ./lenovo/thinkpad/z; + lenovo-thinkpad-z13-gen1 = import ./lenovo/thinkpad/z/gen1/z13; + lenovo-thinkpad-z13-gen2 = import ./lenovo/thinkpad/z/gen2/z13; + lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; + lenovo-yoga-7-14ARH7 = import ./lenovo/yoga/7/14ARH7; + lenovo-yoga-7-14ARH7-amdgpu = import ./lenovo/yoga/7/14ARH7/amdgpu; + lenovo-yoga-7-14ARH7-nvidia = import ./lenovo/yoga/7/14ARH7/nvidia; + lenovo-yoga-7-14IAH7-integrated = import ./lenovo/yoga/7/14IAH7/integrated; + lenovo-yoga-7-14IAH7-hybrid = import ./lenovo/yoga/7/14IAH7/hybrid; + lenovo-yoga-7-14ILL10 = import ./lenovo/yoga/7/14ILL10; + lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8; + letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; + malibal-aon-s1-intel = import ./malibal/aon/s1; + microchip-icicle-kit = import ./microchip/icicle-kit; + microsoft-surface-go = import ./microsoft/surface/surface-go; + microsoft-surface-pro-intel = import ./microsoft/surface/surface-pro-intel; + microsoft-surface-laptop-amd = import ./microsoft/surface/surface-laptop-amd; + microsoft-surface-common = import ./microsoft/surface/common; + microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; + microsoft-surface-pro-9 = import ./microsoft/surface-pro/9; + milkv-pioneer = import ./milkv/pioneer; + minisforum-v3 = import ./minisforum/v3; + morefine-m600 = import ./morefine/m600; + msi-b350-tomahawk = import ./msi/b350-tomahawk; + msi-b550-a-pro = import ./msi/b550-a-pro; + msi-gs60 = import ./msi/gs60; + msi-gl62 = import ./msi/gl62; + msi-gl65-10SDR-492 = import ./msi/gl65/10SDR-492; + nxp-imx8mp-evk = import ./nxp/imx8mp-evk; + nxp-imx8mq-evk = import ./nxp/imx8mq-evk; + nxp-imx8qm-mek = import ./nxp/imx8qm-mek; + hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; + hardkernel-odroid-h3 = import ./hardkernel/odroid-h3; + hardkernel-odroid-h4 = import ./hardkernel/odroid-h4; + omen-14-fb0798ng = import ./omen/14-fb0798ng; + omen-15-ce002ns = import ./omen/15-ce002ns; + omen-15-en0010ca = import ./omen/15-en0010ca; + omen-16-n0005ne = import ./omen/16-n0005ne; + omen-16-n0280nd = import ./omen/16-n0280nd; + omen-15-en1007sa = import ./omen/15-en1007sa; + omen-15-en0002np = import ./omen/15-en0002np; + onenetbook-4 = import ./onenetbook/4; + olimex-teres_i = import ./olimex/teres_i; + pcengines-apu = import ./pcengines/apu; + pine64-pinebook-pro = import ./pine64/pinebook-pro; + pine64-rockpro64 = import ./pine64/rockpro64; + pine64-star64 = import ./pine64/star64; + protectli-vp4670 = import ./protectli/vp4670; + purism-librem-13v3 = import ./purism/librem/13v3; + purism-librem-15v3 = import ./purism/librem/15v3; + purism-librem-5r4 = import ./purism/librem/5r4; + raspberry-pi-2 = import ./raspberry-pi/2; + raspberry-pi-3 = import ./raspberry-pi/3; + raspberry-pi-4 = import ./raspberry-pi/4; + raspberry-pi-5 = import ./raspberry-pi/5; + rock-4c-plus = import ./radxa/rock-4c-plus; + rock-5b = import ./radxa/rock-5b; + rock-pi-4 = import ./radxa/rock-pi-4; + rock-pi-e = import ./radxa/rock-pi-e; + kobol-helios4 = import ./kobol/helios4; + samsung-np900x3c = import ./samsung/np900x3c; + slimbook-hero-rpl-rtx = import ./slimbook/hero/rpl-rtx; + starfive-visionfive-v1 = import ./starfive/visionfive/v1; + starfive-visionfive-2 = import ./starfive/visionfive/v2; + starlabs-starlite-i5 = import ./starlabs/starlite/i5; + supermicro = import ./supermicro; + supermicro-a1sri-2758f = import ./supermicro/a1sri-2758f; + supermicro-m11sdv-8c-ln4f = import ./supermicro/m11sdv-8c-ln4f; + supermicro-x10sll-f = import ./supermicro/x10sll-f; + supermicro-x12scz-tln4f = import ./supermicro/x12scz-tln4f; + system76 = import ./system76; + system76-gaze18 = import ./system76/gaze18; + system76-galp5-1650 = import ./system76/galp5-1650; + system76-darp6 = import ./system76/darp6; + toshiba-swanky = import ./toshiba/swanky; + tuxedo-aura-15-gen1 = import ./tuxedo/aura/15/gen1; + tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; + tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7; + tuxedo-infinitybook-pro14-gen9-intel = import ./tuxedo/infinitybook/pro14/gen9/intel; + tuxedo-pulse-14-gen3 = import ./tuxedo/pulse/14/gen3; + tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; + xiaomi-redmibook-16-pro-2024 = import ./xiaomi/redmibook/16-pro-2024; + + common-cpu-amd = import ./common/cpu/amd; + common-cpu-amd-pstate = import ./common/cpu/amd/pstate.nix; + common-cpu-amd-zenpower = import ./common/cpu/amd/zenpower.nix; + common-cpu-amd-raphael-igpu = import ./common/cpu/amd/raphael/igpu.nix; + common-cpu-intel = import ./common/cpu/intel; + common-gpu-intel-comet-lake = + deprecated "992" "common-gpu-intel-comet-lake" + (import ./common/gpu/intel/comet-lake); + common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix; + common-gpu-intel-kaby-lake = + deprecated "992" "common-gpu-intel-kaby-lake" + (import ./common/gpu/intel/kaby-lake); + common-gpu-intel-sandy-bridge = + deprecated "992" "common-gpu-intel-sandy-bridge" + (import ./common/gpu/intel/sandy-bridge); + common-gpu-amd = import ./common/gpu/amd; + common-gpu-amd-sea-islands = import ./common/gpu/amd/sea-islands; + common-gpu-amd-southern-islands = import ./common/gpu/amd/southern-islands; + common-gpu-intel = import ./common/gpu/intel; + common-gpu-intel-disable = import ./common/gpu/intel/disable.nix; + common-gpu-nvidia = import ./common/gpu/nvidia/prime.nix; + common-gpu-nvidia-sync = import ./common/gpu/nvidia/prime-sync.nix; + common-gpu-nvidia-nonprime = import ./common/gpu/nvidia; + common-gpu-nvidia-disable = import ./common/gpu/nvidia/disable.nix; + common-hidpi = import ./common/hidpi.nix; + common-pc = import ./common/pc; + common-pc-hdd = import ./common/pc/hdd; + common-pc-laptop = import ./common/pc/laptop; + common-pc-laptop-acpi_call = throw "common-pc-laptop-acpi_call has been removed because it is obsolete: https://github.com/NixOS/nixos-hardware/issues/1114"; + common-pc-laptop-hdd = import ./common/pc/laptop/hdd; + common-pc-laptop-ssd = import ./common/pc/ssd; + common-pc-ssd = import ./common/pc/ssd; + }; + }; } diff --git a/focus/m2/gen1/default.nix b/focus/m2/gen1/default.nix index 2b8e5e7c..34996510 100644 --- a/focus/m2/gen1/default.nix +++ b/focus/m2/gen1/default.nix @@ -9,7 +9,14 @@ ../../../common/pc/ssd ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + "usb_storage" + "sd_mod" + "rtsx_pci_sdmmc" + ]; boot.kernelModules = [ "kvm-intel" ]; boot.kernelParams = [ "tpm_tis.interrupts=0" # Upstream bug: https://bugzilla.kernel.org/show_bug.cgi?id=204121 diff --git a/framework/13-inch/11th-gen-intel/default.nix b/framework/13-inch/11th-gen-intel/default.nix index 2ea33969..4a24c4cb 100644 --- a/framework/13-inch/11th-gen-intel/default.nix +++ b/framework/13-inch/11th-gen-intel/default.nix @@ -1,4 +1,5 @@ -{ lib, pkgs, ...}: { +{ lib, pkgs, ... }: +{ imports = [ ../common ../common/intel.nix @@ -6,7 +7,10 @@ # Requires at least 5.16 for working wi-fi and bluetooth. # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") ( + lib.mkDefault pkgs.linuxPackages_latest + ); - hardware.framework.laptop13.audioEnhancement.rawDeviceName = lib.mkDefault "alsa_output.pci-0000_00_1f.3.analog-stereo"; + hardware.framework.laptop13.audioEnhancement.rawDeviceName = + lib.mkDefault "alsa_output.pci-0000_00_1f.3.analog-stereo"; } diff --git a/framework/13-inch/12th-gen-intel/default.nix b/framework/13-inch/12th-gen-intel/default.nix index 4cce4446..f8ff0c01 100644 --- a/framework/13-inch/12th-gen-intel/default.nix +++ b/framework/13-inch/12th-gen-intel/default.nix @@ -9,7 +9,8 @@ { hardware.intelgpu.loadInInitrd = lib.versionOlder config.boot.kernelPackages.kernel.version "6.2"; # same as 13th gen framework 13-inch - hardware.framework.laptop13.audioEnhancement.rawDeviceName = lib.mkDefault "alsa_output.pci-0000_00_1f.3.analog-stereo"; + hardware.framework.laptop13.audioEnhancement.rawDeviceName = + lib.mkDefault "alsa_output.pci-0000_00_1f.3.analog-stereo"; } # https://community.frame.work/t/tracking-hard-freezing-on-fedora-36-with-the-new-12th-gen-system/20675/391 (lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.2") { diff --git a/framework/13-inch/7040-amd/default.nix b/framework/13-inch/7040-amd/default.nix index 9ec5e728..2cd21f60 100644 --- a/framework/13-inch/7040-amd/default.nix +++ b/framework/13-inch/7040-amd/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.hardware.framework.amd-7040; @@ -27,12 +32,15 @@ in config = { # 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 config.boot.kernelPackages.kernel.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" - ''; + services.udev.extraRules = + lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.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" + ''; - hardware.framework.laptop13.audioEnhancement.rawDeviceName = lib.mkDefault "alsa_output.pci-0000_c1_00.6.analog-stereo"; + hardware.framework.laptop13.audioEnhancement.rawDeviceName = + lib.mkDefault "alsa_output.pci-0000_c1_00.6.analog-stereo"; }; } diff --git a/framework/13-inch/amd-ai-300-series/default.nix b/framework/13-inch/amd-ai-300-series/default.nix index 33c5ec67..5eecb38b 100644 --- a/framework/13-inch/amd-ai-300-series/default.nix +++ b/framework/13-inch/amd-ai-300-series/default.nix @@ -1,9 +1,15 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: { imports = [ ../common ../common/amd.nix ]; - config.hardware.framework.laptop13.audioEnhancement.rawDeviceName = lib.mkDefault "alsa_output.pci-0000_c1_00.6.analog-stereo"; + config.hardware.framework.laptop13.audioEnhancement.rawDeviceName = + lib.mkDefault "alsa_output.pci-0000_c1_00.6.analog-stereo"; } diff --git a/framework/13-inch/common/amd.nix b/framework/13-inch/common/amd.nix index 20d9d235..ae35fffe 100644 --- a/framework/13-inch/common/amd.nix +++ b/framework/13-inch/common/amd.nix @@ -1,4 +1,5 @@ -{ lib, config, ... }: { +{ lib, config, ... }: +{ imports = [ ../../../common/cpu/amd ../../../common/cpu/amd/pstate.nix @@ -15,7 +16,9 @@ "amdgpu.dcdebugmask=0x10" ] # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ - ++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") ["rtc_cmos.use_acpi_alarm=1"]; + ++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") [ + "rtc_cmos.use_acpi_alarm=1" + ]; # AMD has better battery life with PPD over TLP: # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 diff --git a/framework/13-inch/common/audio.nix b/framework/13-inch/common/audio.nix index 8133ab88..7010c35a 100644 --- a/framework/13-inch/common/audio.nix +++ b/framework/13-inch/common/audio.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.hardware.framework.laptop13.audioEnhancement; in @@ -51,332 +56,335 @@ in }; }; - config = lib.mkIf cfg.enable (let - outputName = cfg.rawDeviceName; - prettyName = "Framework Speakers"; + config = lib.mkIf cfg.enable ( + let + outputName = cfg.rawDeviceName; + prettyName = "Framework Speakers"; - # These are pre-made decibel to linear value conversions, since Nix doesn't have pow(). - # Use the formula `10 ** (db / 20)` to calculate. - db = { - "-18.1" = 0.1244514611771385; - "-5.48" = 0.5321082592667942; - "-4.76" = 0.5780960474057181; - "8.1" = 2.5409727055493048; - "-36" = 1.5848931924611134e-2; - }; - - json = pkgs.formats.json { }; - - # The filter chain, heavily inspired by the asahi-audio project: https://github.com/AsahiLinux/asahi-audio - filter-chain = json.generate "filter-chain.json" { - "node.description" = prettyName; - "media.name" = prettyName; - "filter.graph" = { - nodes = [ - # Psychoacoustic bass extension, - # it creates harmonics of the missing bass to fool our ears into hearing it. - { - type = "lv2"; - plugin = "https://chadmed.au/bankstown"; - name = "bassex"; - control = { - bypass = 0; - amt = 1.2; - sat_second = 1.3; - sat_third = 2.5; - blend = 1.0; - ceil = 200.0; - floor = 20.0; - }; - } - # Loudness compensation, - # it ensures that the sound profile stays consistent across different volumes. - { - type = "lv2"; - plugin = "http://lsp-plug.in/plugins/lv2/loud_comp_stereo"; - name = "el"; - control = { - enabled = 1; - input = 1.0; - fft = 4; - }; - } - # 8-band equalizer, - # it tries to lessen frequencies where the laptop might resonate, - # and tries to make the frequency curve more pleasing; - # this is the "Lappy McTopface" profile (https://github.com/ceiphr/ee-framework-presets) - # further tuned for the Framework Laptop 13 AMD 7040 series - # and might need some tuning on other models. - { - type = "lv2"; - plugin = "http://lsp-plug.in/plugins/lv2/para_equalizer_x8_lr"; - name = "fw13eq"; - control = { - mode = 0; - react = 0.2; - zoom = db."-36"; - - fl_0 = 101.0; - fml_0 = 0; - ftl_0 = 5; - gl_0 = db."-18.1"; - huel_0 = 0.0; - ql_0 = 4.36; - sl_0 = 0; - wl_0 = 4.0; - - fl_1 = 451.0; - fml_1 = 0; - ftl_1 = 1; - gl_1 = db."-5.48"; - huel_1 = 3.125e-2; - ql_1 = 2.46; - sl_1 = 0; - wl_1 = 4.0; - - fl_2 = 918.0; - fml_2 = 0; - ftl_2 = 1; - gl_2 = db."-4.76"; - huel_2 = 6.25e-2; - ql_2 = 2.44; - sl_2 = 0; - wl_2 = 4.0; - - fl_3 = 9700.0; - fml_3 = 0; - ftl_3 = 1; - gl_3 = db."8.1"; - huel_3 = 9.375e-2; - ql_3 = 2.0; - sl_3 = 0; - wl_3 = 4.0; - - fr_0 = 101.0; - fmr_0 = 0; - ftr_0 = 5; - gr_0 = db."-18.1"; - huer_0 = 0.0; - qr_0 = 4.36; - sr_0 = 0; - wr_0 = 4.0; - - fr_1 = 451.0; - fmr_1 = 0; - ftr_1 = 1; - gr_1 = db."-5.48"; - huer_1 = 3.125e-2; - qr_1 = 2.46; - sr_1 = 0; - wr_1 = 4.0; - - fr_2 = 918.0; - fmr_2 = 0; - ftr_2 = 1; - gr_2 = db."-4.76"; - huer_2 = 6.25e-2; - qr_2 = 2.44; - sr_2 = 0; - wr_2 = 4.0; - - fr_3 = 9700.0; - fmr_3 = 0; - ftr_3 = 1; - gr_3 = db."8.1"; - huer_3 = 9.375e-2; - qr_3 = 2.0; - sr_3 = 0; - wr_3 = 4.0; - }; - } - # Compressors. The settings were taken from the asahi-audio project. - { - type = "lv2"; - plugin = "http://lsp-plug.in/plugins/lv2/mb_compressor_stereo"; - name = "woofer_bp"; - control = { - mode = 0; - ce_0 = 1; - sla_0 = 5.0; - cr_0 = 1.75; - al_0 = 0.725; - at_0 = 1.0; - rt_0 = 100; - kn_0 = 0.125; - cbe_1 = 1; - sf_1 = 200.0; - ce_1 = 0; - cbe_2 = 0; - ce_2 = 0; - cbe_3 = 0; - ce_3 = 0; - cbe_4 = 0; - ce_4 = 0; - cbe_5 = 0; - ce_5 = 0; - cbe_6 = 0; - ce_6 = 0; - }; - } - { - type = "lv2"; - plugin = "http://lsp-plug.in/plugins/lv2/compressor_stereo"; - name = "woofer_lim"; - control = { - sla = 5.0; - al = 1.0; - at = 1.0; - rt = 100.0; - cr = 15.0; - kn = 0.5; - }; - } - ]; - - # Now, we're chaining together the modules instantiated above. - links = [ - { - output = "bassex:out_l"; - input = "el:in_l"; - } - { - output = "bassex:out_r"; - input = "el:in_r"; - } - - { - output = "el:out_l"; - input = "fw13eq:in_l"; - } - { - output = "el:out_r"; - input = "fw13eq:in_r"; - } - { - output = "fw13eq:out_l"; - input = "woofer_bp:in_l"; - } - { - output = "fw13eq:out_r"; - input = "woofer_bp:in_r"; - } - { - output = "woofer_bp:out_l"; - input = "woofer_lim:in_l"; - } - { - output = "woofer_bp:out_r"; - input = "woofer_lim:in_r"; - } - ]; - - inputs = [ - "bassex:in_l" - "bassex:in_r" - ]; - outputs = [ - "woofer_lim:out_l" - "woofer_lim:out_r" - ]; - - # This makes pipewire's volume control actually control the loudness comp module - "capture.volumes" = [ - { - control = "el:volume"; - min = -47.5; - max = 0.0; - scale = "cubic"; - } - ]; + # These are pre-made decibel to linear value conversions, since Nix doesn't have pow(). + # Use the formula `10 ** (db / 20)` to calculate. + db = { + "-18.1" = 0.1244514611771385; + "-5.48" = 0.5321082592667942; + "-4.76" = 0.5780960474057181; + "8.1" = 2.5409727055493048; + "-36" = 1.5848931924611134e-2; }; - "capture.props" = { - "node.name" = "audio_effect.laptop-convolver"; - "media.class" = "Audio/Sink"; - "audio.channels" = "2"; - "audio.position" = [ - "FL" - "FR" - ]; - "audio.allowed-rates" = [ - 44100 - 48000 - 88200 - 96000 - 176400 - 192000 - ]; - "device.api" = "dsp"; - "node.virtual" = "false"; - # Lower seems to mean "more preferred", - # bluetooth devices seem to be ~1000, speakers seem to be ~2000 - # since this is between the two, bluetooth devices take over when they connect, - # and hand over to this instead of the speakers when they disconnect. - "priority.session" = 1500; - "priority.driver" = 1500; - "state.default-volume" = 0.343; - "device.icon-name" = "audio-card-analog-pci"; - }; - "playback.props" = { - "node.name" = "audio_effect.laptop-convolver"; - "target.object" = outputName; - "node.passive" = "true"; - "audio.channels" = "2"; - "audio.allowed-rates" = [ - 44100 - 48000 - 88200 - 96000 - 176400 - 192000 - ]; - "audio.position" = [ - "FL" - "FR" - ]; - "device.icon-name" = "audio-card-analog-pci"; - }; - }; + json = pkgs.formats.json { }; - configPackage = - (pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/99-laptop.conf" '' - monitor.alsa.rules = [ - { - matches = [{ node.name = "${outputName}" }] - actions = { - update-props = { - audio.allowed-rates = [44100, 48000, 88200, 96000, 176400, 192000] + # The filter chain, heavily inspired by the asahi-audio project: https://github.com/AsahiLinux/asahi-audio + filter-chain = json.generate "filter-chain.json" { + "node.description" = prettyName; + "media.name" = prettyName; + "filter.graph" = { + nodes = [ + # Psychoacoustic bass extension, + # it creates harmonics of the missing bass to fool our ears into hearing it. + { + type = "lv2"; + plugin = "https://chadmed.au/bankstown"; + name = "bassex"; + control = { + bypass = 0; + amt = 1.2; + sat_second = 1.3; + sat_third = 2.5; + blend = 1.0; + ceil = 200.0; + floor = 20.0; + }; + } + # Loudness compensation, + # it ensures that the sound profile stays consistent across different volumes. + { + type = "lv2"; + plugin = "http://lsp-plug.in/plugins/lv2/loud_comp_stereo"; + name = "el"; + control = { + enabled = 1; + input = 1.0; + fft = 4; + }; + } + # 8-band equalizer, + # it tries to lessen frequencies where the laptop might resonate, + # and tries to make the frequency curve more pleasing; + # this is the "Lappy McTopface" profile (https://github.com/ceiphr/ee-framework-presets) + # further tuned for the Framework Laptop 13 AMD 7040 series + # and might need some tuning on other models. + { + type = "lv2"; + plugin = "http://lsp-plug.in/plugins/lv2/para_equalizer_x8_lr"; + name = "fw13eq"; + control = { + mode = 0; + react = 0.2; + zoom = db."-36"; + + fl_0 = 101.0; + fml_0 = 0; + ftl_0 = 5; + gl_0 = db."-18.1"; + huel_0 = 0.0; + ql_0 = 4.36; + sl_0 = 0; + wl_0 = 4.0; + + fl_1 = 451.0; + fml_1 = 0; + ftl_1 = 1; + gl_1 = db."-5.48"; + huel_1 = 3.125e-2; + ql_1 = 2.46; + sl_1 = 0; + wl_1 = 4.0; + + fl_2 = 918.0; + fml_2 = 0; + ftl_2 = 1; + gl_2 = db."-4.76"; + huel_2 = 6.25e-2; + ql_2 = 2.44; + sl_2 = 0; + wl_2 = 4.0; + + fl_3 = 9700.0; + fml_3 = 0; + ftl_3 = 1; + gl_3 = db."8.1"; + huel_3 = 9.375e-2; + ql_3 = 2.0; + sl_3 = 0; + wl_3 = 4.0; + + fr_0 = 101.0; + fmr_0 = 0; + ftr_0 = 5; + gr_0 = db."-18.1"; + huer_0 = 0.0; + qr_0 = 4.36; + sr_0 = 0; + wr_0 = 4.0; + + fr_1 = 451.0; + fmr_1 = 0; + ftr_1 = 1; + gr_1 = db."-5.48"; + huer_1 = 3.125e-2; + qr_1 = 2.46; + sr_1 = 0; + wr_1 = 4.0; + + fr_2 = 918.0; + fmr_2 = 0; + ftr_2 = 1; + gr_2 = db."-4.76"; + huer_2 = 6.25e-2; + qr_2 = 2.44; + sr_2 = 0; + wr_2 = 4.0; + + fr_3 = 9700.0; + fmr_3 = 0; + ftr_3 = 1; + gr_3 = db."8.1"; + huer_3 = 9.375e-2; + qr_3 = 2.0; + sr_3 = 0; + wr_3 = 4.0; + }; + } + # Compressors. The settings were taken from the asahi-audio project. + { + type = "lv2"; + plugin = "http://lsp-plug.in/plugins/lv2/mb_compressor_stereo"; + name = "woofer_bp"; + control = { + mode = 0; + ce_0 = 1; + sla_0 = 5.0; + cr_0 = 1.75; + al_0 = 0.725; + at_0 = 1.0; + rt_0 = 100; + kn_0 = 0.125; + cbe_1 = 1; + sf_1 = 200.0; + ce_1 = 0; + cbe_2 = 0; + ce_2 = 0; + cbe_3 = 0; + ce_3 = 0; + cbe_4 = 0; + ce_4 = 0; + cbe_5 = 0; + ce_5 = 0; + cbe_6 = 0; + ce_6 = 0; + }; + } + { + type = "lv2"; + plugin = "http://lsp-plug.in/plugins/lv2/compressor_stereo"; + name = "woofer_lim"; + control = { + sla = 5.0; + al = 1.0; + at = 1.0; + rt = 100.0; + cr = 15.0; + kn = 0.5; + }; + } + ]; + + # Now, we're chaining together the modules instantiated above. + links = [ + { + output = "bassex:out_l"; + input = "el:in_l"; + } + { + output = "bassex:out_r"; + input = "el:in_r"; + } + + { + output = "el:out_l"; + input = "fw13eq:in_l"; + } + { + output = "el:out_r"; + input = "fw13eq:in_r"; + } + { + output = "fw13eq:out_l"; + input = "woofer_bp:in_l"; + } + { + output = "fw13eq:out_r"; + input = "woofer_bp:in_r"; + } + { + output = "woofer_bp:out_l"; + input = "woofer_lim:in_l"; + } + { + output = "woofer_bp:out_r"; + input = "woofer_lim:in_r"; + } + ]; + + inputs = [ + "bassex:in_l" + "bassex:in_r" + ]; + outputs = [ + "woofer_lim:out_l" + "woofer_lim:out_r" + ]; + + # This makes pipewire's volume control actually control the loudness comp module + "capture.volumes" = [ + { + control = "el:volume"; + min = -47.5; + max = 0.0; + scale = "cubic"; + } + ]; + }; + "capture.props" = { + "node.name" = "audio_effect.laptop-convolver"; + "media.class" = "Audio/Sink"; + "audio.channels" = "2"; + "audio.position" = [ + "FL" + "FR" + ]; + "audio.allowed-rates" = [ + 44100 + 48000 + 88200 + 96000 + 176400 + 192000 + ]; + "device.api" = "dsp"; + "node.virtual" = "false"; + + # Lower seems to mean "more preferred", + # bluetooth devices seem to be ~1000, speakers seem to be ~2000 + # since this is between the two, bluetooth devices take over when they connect, + # and hand over to this instead of the speakers when they disconnect. + "priority.session" = 1500; + "priority.driver" = 1500; + "state.default-volume" = 0.343; + "device.icon-name" = "audio-card-analog-pci"; + }; + "playback.props" = { + "node.name" = "audio_effect.laptop-convolver"; + "target.object" = outputName; + "node.passive" = "true"; + "audio.channels" = "2"; + "audio.allowed-rates" = [ + 44100 + 48000 + 88200 + 96000 + 176400 + 192000 + ]; + "audio.position" = [ + "FL" + "FR" + ]; + "device.icon-name" = "audio-card-analog-pci"; + }; + }; + + configPackage = + (pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/99-laptop.conf" '' + monitor.alsa.rules = [ + { + matches = [{ node.name = "${outputName}" }] + actions = { + update-props = { + audio.allowed-rates = [44100, 48000, 88200, 96000, 176400, 192000] + } } } - } - ] + ] - node.software-dsp.rules = [ - { - matches = [{ node.name = "${outputName}" }] - actions = { - create-filter = { - filter-path = "${filter-chain}" - hide-parent = ${lib.boolToString cfg.hideRawDevice} + node.software-dsp.rules = [ + { + matches = [{ node.name = "${outputName}" }] + actions = { + create-filter = { + filter-path = "${filter-chain}" + hide-parent = ${lib.boolToString cfg.hideRawDevice} + } } } + ] + + wireplumber.profiles = { + main = { node.software-dsp = "required" } } - ] + '') + // { + passthru.requiredLv2Packages = with pkgs; [ + lsp-plugins + bankstown-lv2 + ]; + }; + in + { + services.pipewire.wireplumber.configPackages = [ configPackage ]; - wireplumber.profiles = { - main = { node.software-dsp = "required" } - } - '') - // { - passthru.requiredLv2Packages = with pkgs; [ - lsp-plugins - bankstown-lv2 - ]; - }; - in { - services.pipewire.wireplumber.configPackages = [ configPackage ]; - - # Pipewire is needed for this. - services.pipewire.enable = lib.mkDefault true; - }); + # Pipewire is needed for this. + services.pipewire.enable = lib.mkDefault true; + } + ); } diff --git a/framework/13-inch/common/intel.nix b/framework/13-inch/common/intel.nix index 96bbec97..6248e75f 100644 --- a/framework/13-inch/common/intel.nix +++ b/framework/13-inch/common/intel.nix @@ -1,21 +1,30 @@ -{ config, lib, pkgs, ... }: { +{ + config, + lib, + pkgs, + ... +}: +{ imports = [ ../../../common/cpu/intel ]; - boot.kernelParams = [ - # For Power consumption - # https://community.frame.work/t/linux-battery-life-tuning/6665/156 - "nvme.noacpi=1" - ] - # Fixes a regression in s2idle, making it more power efficient than deep sleep - # Update 04/2024: It appears that s2idle-regression got fixed in newer kernel-versions (SebTM) - # (see: https://github.com/NixOS/nixos-hardware/pull/903#discussion_r1556096657) - ++ lib.lists.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") "acpi_osi=\"!Windows 2020\""; + boot.kernelParams = + [ + # For Power consumption + # https://community.frame.work/t/linux-battery-life-tuning/6665/156 + "nvme.noacpi=1" + ] + # Fixes a regression in s2idle, making it more power efficient than deep sleep + # Update 04/2024: It appears that s2idle-regression got fixed in newer kernel-versions (SebTM) + # (see: https://github.com/NixOS/nixos-hardware/pull/903#discussion_r1556096657) + ++ lib.lists.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") "acpi_osi=\"!Windows 2020\""; # Requires at least 5.16 for working wi-fi and bluetooth. # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") ( + lib.mkDefault pkgs.linuxPackages_latest + ); # Module is not used for Framework EC but causes boot time error log. boot.blacklistedKernelModules = [ "cros-usbpd-charger" ]; diff --git a/framework/13-inch/intel-core-ultra-series1/default.nix b/framework/13-inch/intel-core-ultra-series1/default.nix index 7ac20d6e..4851d54f 100644 --- a/framework/13-inch/intel-core-ultra-series1/default.nix +++ b/framework/13-inch/intel-core-ultra-series1/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: { imports = [ @@ -8,7 +13,9 @@ # Need at least 6.9 to make suspend properly # Specifically this patch: https://github.com/torvalds/linux/commit/073237281a508ac80ec025872ad7de50cfb5a28a - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.9") (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.9") ( + lib.mkDefault pkgs.linuxPackages_latest + ); # Intel NPU Driver # https://discourse.nixos.org/t/new-installation-on-asus-zenbook-ux5406-intel-vpu-firmware-error-2/58732/2 @@ -32,6 +39,6 @@ warnings = lib.mkIf (!config.hardware.enableRedistributableFirmware) [ ''For Intel NPU support, set the option: hardware.enableRedistributableFirmware = true;'' - ]; + ]; } diff --git a/framework/16-inch/7040-amd/default.nix b/framework/16-inch/7040-amd/default.nix index 6c02455a..70275e69 100644 --- a/framework/16-inch/7040-amd/default.nix +++ b/framework/16-inch/7040-amd/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: { imports = [ diff --git a/framework/16-inch/common/amd.nix b/framework/16-inch/common/amd.nix index 20d9d235..ae35fffe 100644 --- a/framework/16-inch/common/amd.nix +++ b/framework/16-inch/common/amd.nix @@ -1,4 +1,5 @@ -{ lib, config, ... }: { +{ lib, config, ... }: +{ imports = [ ../../../common/cpu/amd ../../../common/cpu/amd/pstate.nix @@ -15,7 +16,9 @@ "amdgpu.dcdebugmask=0x10" ] # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ - ++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") ["rtc_cmos.use_acpi_alarm=1"]; + ++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") [ + "rtc_cmos.use_acpi_alarm=1" + ]; # AMD has better battery life with PPD over TLP: # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 diff --git a/framework/bluetooth.nix b/framework/bluetooth.nix index ba76081c..0e08adb7 100644 --- a/framework/bluetooth.nix +++ b/framework/bluetooth.nix @@ -10,29 +10,46 @@ pkgs, ... # TODO: drop this if linux 6.11 goes EOL -}: lib.mkIf ((config.boot.kernelPackages.kernelAtLeast "6.11") && (config.boot.kernelPackages.kernelOlder "6.12")) { - systemd.services = { - bluetooth-rfkill-suspend = { - description = "Soft block Bluetooth on suspend/hibernate"; - before = ["sleep.target"]; - unitConfig.StopWhenUnneeded = true; - serviceConfig = { - Type = "oneshot"; - ExecStart = "${pkgs.util-linux}/bin/rfkill block bluetooth"; - ExecStartPost = "${pkgs.coreutils}/bin/sleep 3"; - RemainAfterExit = true; +}: +lib.mkIf + ( + (config.boot.kernelPackages.kernelAtLeast "6.11") && (config.boot.kernelPackages.kernelOlder "6.12") + ) + { + systemd.services = { + bluetooth-rfkill-suspend = { + description = "Soft block Bluetooth on suspend/hibernate"; + before = [ "sleep.target" ]; + unitConfig.StopWhenUnneeded = true; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.util-linux}/bin/rfkill block bluetooth"; + ExecStartPost = "${pkgs.coreutils}/bin/sleep 3"; + RemainAfterExit = true; + }; + wantedBy = [ + "suspend.target" + "hibernate.target" + "suspend-then-hibernate.target" + ]; }; - wantedBy = ["suspend.target" "hibernate.target" "suspend-then-hibernate.target"]; - }; - bluetooth-rfkill-resume = { - description = "Unblock Bluetooth on resume"; - after = ["suspend.target" "hibernate.target" "suspend-then-hibernate.target"]; - serviceConfig = { - Type = "oneshot"; - ExecStart = "${pkgs.util-linux}/bin/rfkill unblock bluetooth"; + bluetooth-rfkill-resume = { + description = "Unblock Bluetooth on resume"; + after = [ + "suspend.target" + "hibernate.target" + "suspend-then-hibernate.target" + ]; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.util-linux}/bin/rfkill unblock bluetooth"; + }; + wantedBy = [ + "suspend.target" + "hibernate.target" + "suspend-then-hibernate.target" + ]; }; - wantedBy = ["suspend.target" "hibernate.target" "suspend-then-hibernate.target"]; }; - }; -} + } diff --git a/framework/framework-tool.nix b/framework/framework-tool.nix index 4effcca8..4c70193e 100644 --- a/framework/framework-tool.nix +++ b/framework/framework-tool.nix @@ -1,3 +1,4 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ environment.systemPackages = [ pkgs.framework-tool ]; } diff --git a/framework/kmod.nix b/framework/kmod.nix index 6ed05b9a..7cb53746 100644 --- a/framework/kmod.nix +++ b/framework/kmod.nix @@ -1,17 +1,20 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let kernel_version_compatible = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.10"; -in { - options.hardware.framework.enableKmod = (lib.mkEnableOption - "Enable the community created Framework kernel module that allows interacting with the embedded controller from sysfs." - ) // { - # enable by default on NixOS >= 24.05 and kernel >= 6.10 - default = lib.and - (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05") - kernel_version_compatible; - defaultText = "enabled by default on NixOS >= 24.05 and kernel >= 6.10"; - }; - +in +{ + options.hardware.framework.enableKmod = + (lib.mkEnableOption "Enable the community created Framework kernel module that allows interacting with the embedded controller from sysfs.") + // { + # enable by default on NixOS >= 24.05 and kernel >= 6.10 + default = lib.and (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05") kernel_version_compatible; + defaultText = "enabled by default on NixOS >= 24.05 and kernel >= 6.10"; + }; config.boot = lib.mkIf config.hardware.framework.enableKmod { extraModulePackages = with config.boot.kernelPackages; [ @@ -19,7 +22,10 @@ in { ]; # https://github.com/DHowett/framework-laptop-kmod?tab=readme-ov-file#usage - kernelModules = [ "cros_ec" "cros_ec_lpcs" ]; + kernelModules = [ + "cros_ec" + "cros_ec_lpcs" + ]; # add required patch if enabled on kernel <6.10 kernelPatches = lib.mkIf (!kernel_version_compatible) [ @@ -28,15 +34,22 @@ in { msgid = "20240403004713.130365-1-dustin@howett.net"; version = "3"; hash = "sha256-aQSyys8CMzlj9EdNhg8vtp76fg1qEwUVeJL0E+8w5HU="; - patch = pkgs.runCommandLocal "patch-${msgid}" { - nativeBuildInputs = with pkgs; [ b4 git cacert ]; - SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; + patch = + pkgs.runCommandLocal "patch-${msgid}" + { + nativeBuildInputs = with pkgs; [ + b4 + git + cacert + ]; + SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; - outputHash = hash; - } '' - export HOME="$TMP" - PYTHONHASHSEED=0 ${pkgs.b4}/bin/b4 -n am -C -T -v ${version} -o- "${msgid}" > "$out" - ''; + outputHash = hash; + } + '' + export HOME="$TMP" + PYTHONHASHSEED=0 ${pkgs.b4}/bin/b4 -n am -C -T -v ${version} -o- "${msgid}" > "$out" + ''; } ]; }; diff --git a/friendlyarm/nanopc-t4/default.nix b/friendlyarm/nanopc-t4/default.nix index 61b86576..55bbf6b4 100644 --- a/friendlyarm/nanopc-t4/default.nix +++ b/friendlyarm/nanopc-t4/default.nix @@ -14,13 +14,17 @@ hardware.enableRedistributableFirmware = lib.mkDefault true; # Fix for not detecting the M.2 NVMe SSD. Will cause recompilation. - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.10") (lib.mkDefault pkgs.linuxPackages_latest); - boot.kernelPatches = lib.mkDefault [{ - name = "pcie-rockchip-config.patch"; - patch = null; - extraConfig = '' - PHY_ROCKCHIP_PCIE y - PCIE_ROCKCHIP_HOST y - ''; - }]; + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.10") ( + lib.mkDefault pkgs.linuxPackages_latest + ); + boot.kernelPatches = lib.mkDefault [ + { + name = "pcie-rockchip-config.patch"; + patch = null; + extraConfig = '' + PHY_ROCKCHIP_PCIE y + PCIE_ROCKCHIP_HOST y + ''; + } + ]; } diff --git a/friendlyarm/nanopi-r5s/default.nix b/friendlyarm/nanopi-r5s/default.nix index b7ecb916..ba018200 100644 --- a/friendlyarm/nanopi-r5s/default.nix +++ b/friendlyarm/nanopi-r5s/default.nix @@ -1,5 +1,6 @@ -{ lib -, ... +{ + lib, + ... }: { diff --git a/gmktec/nucbox/g3-plus/default.nix b/gmktec/nucbox/g3-plus/default.nix index 7cd7d6f3..1396aa71 100644 --- a/gmktec/nucbox/g3-plus/default.nix +++ b/gmktec/nucbox/g3-plus/default.nix @@ -1,23 +1,23 @@ /* - * `gmktec-nucbox-g3-plus`: - * - * Product page: - * - * - * This profile just configures the Intel - * Twin Lake N150 CPU and integrated - * graphics for this mini-PC. fstrim is also - * enabled for the SSD. That's all this seemed - * to need to function properly. As is now - * expected from Intel NUC systems, it provides - * a solid "out-of-the-box" experience. No - * special quirks are apparent. - * - * We import the Alder Lake modules since Twin - * Lake is just a refreshed version of the - * Alder Lake-N series. Re-using those seems - * to be fine for this purpose. - */ + `gmktec-nucbox-g3-plus`: + + Product page: + + + This profile just configures the Intel + Twin Lake N150 CPU and integrated + graphics for this mini-PC. fstrim is also + enabled for the SSD. That's all this seemed + to need to function properly. As is now + expected from Intel NUC systems, it provides + a solid "out-of-the-box" experience. No + special quirks are apparent. + + We import the Alder Lake modules since Twin + Lake is just a refreshed version of the + Alder Lake-N series. Re-using those seems + to be fine for this purpose. +*/ { imports = [ ../../../common/cpu/intel/alder-lake diff --git a/gpd/pocket-3/default.nix b/gpd/pocket-3/default.nix index a271a644..730249be 100644 --- a/gpd/pocket-3/default.nix +++ b/gpd/pocket-3/default.nix @@ -1,44 +1,56 @@ { lib, pkgs, ... }: -let inherit (lib) mkDefault mkIf; +let + inherit (lib) mkDefault mkIf; in { - imports = [ - ../../common/pc/laptop - ../../common/pc/ssd + imports = [ + ../../common/pc/laptop + ../../common/pc/ssd ../../common/hidpi.nix ../../common/gpu/24.05-compat.nix - ]; + ]; # Necessary kernel modules - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "thunderbolt" ]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "usbhid" + "thunderbolt" + ]; - # GPU is an Intel Iris Xe, on a “TigerLake” mobile CPU - boot.initrd.kernelModules = [ "i915" ]; # Early loading so the passphrase prompt appears on external displays - hardware.graphics.extraPackages = with pkgs; [ - intel-media-driver - (if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver) - ]; + # GPU is an Intel Iris Xe, on a “TigerLake” mobile CPU + boot.initrd.kernelModules = [ "i915" ]; # Early loading so the passphrase prompt appears on external displays + hardware.graphics.extraPackages = with pkgs; [ + intel-media-driver + ( + if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then + vaapiIntel + else + intel-vaapi-driver + ) + ]; - boot.kernelParams = [ - # The GPD Pocket3 uses a tablet OLED display, that is mounted rotated 90° counter-clockwise - "fbcon=rotate:1" "video=DSI-1:panel_orientation=right_side_up" - ]; + boot.kernelParams = [ + # The GPD Pocket3 uses a tablet OLED display, that is mounted rotated 90° counter-clockwise + "fbcon=rotate:1" + "video=DSI-1:panel_orientation=right_side_up" + ]; - fonts.fontconfig = { - subpixel.rgba = "vbgr"; # Pixel order for rotated screen + fonts.fontconfig = { + subpixel.rgba = "vbgr"; # Pixel order for rotated screen - # The OLED display has √(1920² + 1200²) px / 8in ≃ 283 dpi - # Per the documentation, antialiasing, hinting, etc. have no visible effect at such high pixel densities anyhow. - # Set manually, as the hiDPI module had incorrect settings prior to NixOS 22.11; see nixpkgs#194594. - hinting.enable = mkDefault false; - antialias = mkIf (lib.versionOlder (lib.versions.majorMinor lib.version) "22.11") false; - }; + # The OLED display has √(1920² + 1200²) px / 8in ≃ 283 dpi + # Per the documentation, antialiasing, hinting, etc. have no visible effect at such high pixel densities anyhow. + # Set manually, as the hiDPI module had incorrect settings prior to NixOS 22.11; see nixpkgs#194594. + hinting.enable = mkDefault false; + antialias = mkIf (lib.versionOlder (lib.versions.majorMinor lib.version) "22.11") false; + }; - # More HiDPI settings - services.xserver.dpi = 280; + # More HiDPI settings + services.xserver.dpi = 280; - # Necessary for audio support on the 1195G7 model - boot.extraModprobeConfig = '' - options snd-intel-dspcfg dsp_driver=1 - ''; + # Necessary for audio support on the 1195G7 model + boot.extraModprobeConfig = '' + options snd-intel-dspcfg dsp_driver=1 + ''; } diff --git a/gpd/pocket-4/default.nix b/gpd/pocket-4/default.nix index 4ec54b63..8d08b2e8 100644 --- a/gpd/pocket-4/default.nix +++ b/gpd/pocket-4/default.nix @@ -1,5 +1,6 @@ { lib, pkgs, ... }: -let inherit (lib) mkIf mkDefault; +let + inherit (lib) mkIf mkDefault; in { imports = [ @@ -17,7 +18,8 @@ in kernelParams = [ # The GPD Pocket 4 uses a tablet LTPS display, that is mounted rotated 90° counter-clockwise - "fbcon=rotate:1" "video=eDP-1:panel_orientation=right_side_up" + "fbcon=rotate:1" + "video=eDP-1:panel_orientation=right_side_up" ]; }; diff --git a/gpd/win-2/default.nix b/gpd/win-2/default.nix index aaaba374..e7247534 100644 --- a/gpd/win-2/default.nix +++ b/gpd/win-2/default.nix @@ -1,17 +1,19 @@ -{ config, lib, ...}: +{ config, lib, ... }: { imports = [ ../../common/cpu/intel ../../common/pc/ssd - ]; + ]; boot.kernelParams = [ "fbcon=rotate:1" "video=eDP-1:panel_orientation=right_side_up" ]; - services.tlp.enable = lib.mkDefault ((lib.versionOlder (lib.versions.majorMinor lib.version) "21.05") - || !config.services.power-profiles-daemon.enable); + services.tlp.enable = lib.mkDefault ( + (lib.versionOlder (lib.versions.majorMinor lib.version) "21.05") + || !config.services.power-profiles-daemon.enable + ); # Required for grub to properly display the boot menu. boot.loader.grub.gfxmodeEfi = lib.mkDefault "720x1280x32"; diff --git a/gpd/win-max-2/2023/default.nix b/gpd/win-max-2/2023/default.nix index b20f2ca3..1338c843 100644 --- a/gpd/win-max-2/2023/default.nix +++ b/gpd/win-max-2/2023/default.nix @@ -1,4 +1,4 @@ -{ config, lib, ...}: +{ config, lib, ... }: with lib; { imports = [ @@ -12,6 +12,10 @@ with lib; hardware.sensor.iio.bmi260.enable = lib.mkDefault true; #see README - boot.blacklistedKernelModules = mkIf config.hardware.sensor.iio.bmi260.enable [ "bmi160_spi" "bmi160_i2c" "bmi160_core" ]; + boot.blacklistedKernelModules = mkIf config.hardware.sensor.iio.bmi260.enable [ + "bmi160_spi" + "bmi160_i2c" + "bmi160_core" + ]; hardware.sensor.iio.enable = mkIf config.hardware.sensor.iio.bmi260.enable true; } diff --git a/gpd/win-max-2/default.nix b/gpd/win-max-2/default.nix index d7ff52d6..c9762cd6 100644 --- a/gpd/win-max-2/default.nix +++ b/gpd/win-max-2/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.hardware.gpd.ppt; diff --git a/gpd/win-mini/default.nix b/gpd/win-mini/default.nix index 6361d576..f0d23926 100644 --- a/gpd/win-mini/default.nix +++ b/gpd/win-mini/default.nix @@ -5,9 +5,6 @@ ... }: with lib; -let - cfg = config.hardware.gpd.ppt; -in { imports = [ ../../common/pc/laptop diff --git a/hardkernel/odroid-hc4/default.nix b/hardkernel/odroid-hc4/default.nix index e591a871..a6442aba 100644 --- a/hardkernel/odroid-hc4/default.nix +++ b/hardkernel/odroid-hc4/default.nix @@ -4,25 +4,31 @@ # Based on the config from https://www.armbian.com/odroid-hc4/ hardware.fancontrol = { enable = lib.mkDefault true; - config = let - # According to https://www.armbian.com/odroid-hc4/ the FCFANS line should be removed on kernel 5.15. - kernelVersion = config.boot.kernelPackages.kernel.version; - needFcFans = lib.versions.majorMinor kernelVersion != "5.15"; - in lib.mkDefault ('' - INTERVAL=10 - DEVPATH=hwmon0=devices/virtual/thermal/thermal_zone0 hwmon2=devices/platform/pwm-fan - DEVNAME=hwmon0=cpu_thermal hwmon2=pwmfan - FCTEMPS=hwmon2/pwm1=hwmon0/temp1_input - '' + lib.optionalString needFcFans '' - FCFANS= hwmon2/pwm1=hwmon2/fan1_input - '' + '' - MINTEMP=hwmon2/pwm1=50 - MAXTEMP=hwmon2/pwm1=60 - MINSTART=hwmon2/pwm1=20 - MINSTOP=hwmon2/pwm1=28 - MINPWM=hwmon2/pwm1=0 - MAXPWM=hwmon2/pwm1=255 - ''); + config = + let + # According to https://www.armbian.com/odroid-hc4/ the FCFANS line should be removed on kernel 5.15. + kernelVersion = config.boot.kernelPackages.kernel.version; + needFcFans = lib.versions.majorMinor kernelVersion != "5.15"; + in + lib.mkDefault ( + '' + INTERVAL=10 + DEVPATH=hwmon0=devices/virtual/thermal/thermal_zone0 hwmon2=devices/platform/pwm-fan + DEVNAME=hwmon0=cpu_thermal hwmon2=pwmfan + FCTEMPS=hwmon2/pwm1=hwmon0/temp1_input + '' + + lib.optionalString needFcFans '' + FCFANS= hwmon2/pwm1=hwmon2/fan1_input + '' + + '' + MINTEMP=hwmon2/pwm1=50 + MAXTEMP=hwmon2/pwm1=60 + MINSTART=hwmon2/pwm1=20 + MINSTOP=hwmon2/pwm1=28 + MINPWM=hwmon2/pwm1=0 + MAXPWM=hwmon2/pwm1=255 + '' + ); }; # Linux 5.15 sometimes crash under heavy network usage diff --git a/hp/elitebook/845/g7/default.nix b/hp/elitebook/845/g7/default.nix index d18ef3cf..542921e0 100644 --- a/hp/elitebook/845/g7/default.nix +++ b/hp/elitebook/845/g7/default.nix @@ -1,18 +1,19 @@ { pkgs, lib, ... }: { - imports = - [ - ../../../../common/cpu/amd - ../../../../common/cpu/amd/pstate.nix - ../../../../common/gpu/amd - ../../../../common/pc/laptop - ../../../../common/pc/ssd - ]; + imports = [ + ../../../../common/cpu/amd + ../../../../common/cpu/amd/pstate.nix + ../../../../common/gpu/amd + ../../../../common/pc/laptop + ../../../../common/pc/ssd + ]; hardware.enableRedistributableFirmware = lib.mkDefault true; boot.kernelModules = [ "synaptics_usb" ]; - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.3") (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.3") ( + lib.mkDefault pkgs.linuxPackages_latest + ); # disable Scatter/Gather APU recently enabled by default, # which results in white screen after display reconfiguration diff --git a/hp/elitebook/845/g8/default.nix b/hp/elitebook/845/g8/default.nix index d18ef3cf..542921e0 100644 --- a/hp/elitebook/845/g8/default.nix +++ b/hp/elitebook/845/g8/default.nix @@ -1,18 +1,19 @@ { pkgs, lib, ... }: { - imports = - [ - ../../../../common/cpu/amd - ../../../../common/cpu/amd/pstate.nix - ../../../../common/gpu/amd - ../../../../common/pc/laptop - ../../../../common/pc/ssd - ]; + imports = [ + ../../../../common/cpu/amd + ../../../../common/cpu/amd/pstate.nix + ../../../../common/gpu/amd + ../../../../common/pc/laptop + ../../../../common/pc/ssd + ]; hardware.enableRedistributableFirmware = lib.mkDefault true; boot.kernelModules = [ "synaptics_usb" ]; - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.3") (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.3") ( + lib.mkDefault pkgs.linuxPackages_latest + ); # disable Scatter/Gather APU recently enabled by default, # which results in white screen after display reconfiguration diff --git a/hp/elitebook/845/g9/default.nix b/hp/elitebook/845/g9/default.nix index d18ef3cf..542921e0 100644 --- a/hp/elitebook/845/g9/default.nix +++ b/hp/elitebook/845/g9/default.nix @@ -1,18 +1,19 @@ { pkgs, lib, ... }: { - imports = - [ - ../../../../common/cpu/amd - ../../../../common/cpu/amd/pstate.nix - ../../../../common/gpu/amd - ../../../../common/pc/laptop - ../../../../common/pc/ssd - ]; + imports = [ + ../../../../common/cpu/amd + ../../../../common/cpu/amd/pstate.nix + ../../../../common/gpu/amd + ../../../../common/pc/laptop + ../../../../common/pc/ssd + ]; hardware.enableRedistributableFirmware = lib.mkDefault true; boot.kernelModules = [ "synaptics_usb" ]; - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.3") (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.3") ( + lib.mkDefault pkgs.linuxPackages_latest + ); # disable Scatter/Gather APU recently enabled by default, # which results in white screen after display reconfiguration diff --git a/huawei/machc-wa/default.nix b/huawei/machc-wa/default.nix index 9e3259d8..6279843d 100644 --- a/huawei/machc-wa/default.nix +++ b/huawei/machc-wa/default.nix @@ -3,7 +3,8 @@ pkgs, config, ... -}: { +}: +{ imports = [ ../../common/cpu/intel/comet-lake ../../common/gpu/nvidia diff --git a/kobol/helios4/modules/fancontrol.nix b/kobol/helios4/modules/fancontrol.nix index 27722765..3ab73a9d 100644 --- a/kobol/helios4/modules/fancontrol.nix +++ b/kobol/helios4/modules/fancontrol.nix @@ -19,7 +19,11 @@ services.udev.packages = [ # Fan control (pkgs.callPackage ( - { stdenv, lib, coreutils }: + { + stdenv, + lib, + coreutils, + }: stdenv.mkDerivation { name = "helios4-udev-fancontrol"; @@ -39,6 +43,6 @@ platforms = platforms.linux; }; } - ) {}) + ) { }) ]; } diff --git a/kobol/helios4/overlay.nix b/kobol/helios4/overlay.nix index 32262c56..1ffd02ff 100644 --- a/kobol/helios4/overlay.nix +++ b/kobol/helios4/overlay.nix @@ -11,6 +11,6 @@ final: _prev: { rev = "v${version}"; sha256 = "sha256-QxrTPcx0n0NWUJ990EuIWyOBtknW/fHDRcrYP0yQzTo="; }; - patches = []; + patches = [ ]; }; } diff --git a/lenovo/ideacentre/k330/default.nix b/lenovo/ideacentre/k330/default.nix index ff5cf3c4..9639b738 100644 --- a/lenovo/ideacentre/k330/default.nix +++ b/lenovo/ideacentre/k330/default.nix @@ -1,19 +1,20 @@ { config, lib, ... }: { - imports = [ - ../../../common/cpu/intel - ../../../common/gpu/nvidia/fermi # Is it possible/advisable to pin this to the 390.xx driver family in case the user wants to use non-free drivers? - ../../../common/gpu/amd # The K330 could be bought with AMD GPUs but I don't have that configuration - ../../../common/pc - ]; + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/nvidia/fermi # Is it possible/advisable to pin this to the 390.xx driver family in case the user wants to use non-free drivers? + ../../../common/gpu/amd # The K330 could be bought with AMD GPUs but I don't have that configuration + ../../../common/pc + ]; - # On my machine Wayland causes the desktop to freeze after a short time of operation - services.displayManager.sddm.wayland.enable = false; + # On my machine Wayland causes the desktop to freeze after a short time of operation + services.displayManager.sddm.wayland.enable = false; - # Should this be a conditional default in case plasma is activated? - # What if somebody installs both plasma AND another DE? - # The goal is to prefer x11 over wayland due to compatibility issues with the old hardware + # Should this be a conditional default in case plasma is activated? + # What if somebody installs both plasma AND another DE? + # The goal is to prefer x11 over wayland due to compatibility issues with the old hardware - - services.displayManager.defaultSession = lib.mkIf config.services.xserver.desktopManager.plasma6.enable (lib.mkDefault "plasmax11"); + services.displayManager.defaultSession = lib.mkIf config.services.xserver.desktopManager.plasma6.enable ( + lib.mkDefault "plasmax11" + ); } diff --git a/lenovo/legion/15ach6h/nvidia/default.nix b/lenovo/legion/15ach6h/nvidia/default.nix index 33f32652..37dd1148 100644 --- a/lenovo/legion/15ach6h/nvidia/default.nix +++ b/lenovo/legion/15ach6h/nvidia/default.nix @@ -10,10 +10,12 @@ # remove all packages for amd igpu. I only removed amdgpu from # services.xserver.videoDrivers by overriding. This is because the specialization # of nix cannot implement such an operation as canceling an import. - hardware = { - nvidia.prime.offload.enable = false; - } // lib.optionalAttrs (options ? amdgpu.opencl.enable) { - # introduced in https://github.com/NixOS/nixpkgs/pull/319865 - amdgpu.opencl.enable = lib.mkDefault false; - }; + hardware = + { + nvidia.prime.offload.enable = false; + } + // lib.optionalAttrs (options ? amdgpu.opencl.enable) { + # introduced in https://github.com/NixOS/nixpkgs/pull/319865 + amdgpu.opencl.enable = lib.mkDefault false; + }; } diff --git a/lenovo/legion/16ach6h/nvidia/default.nix b/lenovo/legion/16ach6h/nvidia/default.nix index 33f32652..37dd1148 100644 --- a/lenovo/legion/16ach6h/nvidia/default.nix +++ b/lenovo/legion/16ach6h/nvidia/default.nix @@ -10,10 +10,12 @@ # remove all packages for amd igpu. I only removed amdgpu from # services.xserver.videoDrivers by overriding. This is because the specialization # of nix cannot implement such an operation as canceling an import. - hardware = { - nvidia.prime.offload.enable = false; - } // lib.optionalAttrs (options ? amdgpu.opencl.enable) { - # introduced in https://github.com/NixOS/nixpkgs/pull/319865 - amdgpu.opencl.enable = lib.mkDefault false; - }; + hardware = + { + nvidia.prime.offload.enable = false; + } + // lib.optionalAttrs (options ? amdgpu.opencl.enable) { + # introduced in https://github.com/NixOS/nixpkgs/pull/319865 + amdgpu.opencl.enable = lib.mkDefault false; + }; } diff --git a/lenovo/legion/16achg6/nvidia/default.nix b/lenovo/legion/16achg6/nvidia/default.nix index 5c933fad..d279b6a2 100644 --- a/lenovo/legion/16achg6/nvidia/default.nix +++ b/lenovo/legion/16achg6/nvidia/default.nix @@ -3,10 +3,12 @@ { imports = [ ../hybrid ]; services.xserver.videoDrivers = [ "nvidia" ]; - hardware = { - nvidia.prime.offload.enable = false; - } // lib.optionalAttrs (options ? amdgpu.opencl.enable) { - # introduced in https://github.com/NixOS/nixpkgs/pull/319865 - amdgpu.opencl.enable = lib.mkDefault false; - }; + hardware = + { + nvidia.prime.offload.enable = false; + } + // lib.optionalAttrs (options ? amdgpu.opencl.enable) { + # introduced in https://github.com/NixOS/nixpkgs/pull/319865 + amdgpu.opencl.enable = lib.mkDefault false; + }; } diff --git a/lenovo/legion/16aph8/default.nix b/lenovo/legion/16aph8/default.nix index e44329fa..5771d65b 100644 --- a/lenovo/legion/16aph8/default.nix +++ b/lenovo/legion/16aph8/default.nix @@ -14,20 +14,20 @@ boot = lib.mkMerge [ (lib.mkIf (lib.versionOlder pkgs.linux.version "6.6") { kernelPackages = pkgs.linuxPackages_latest; - kernelParams = ["amdgpu.sg_display=0"]; + kernelParams = [ "amdgpu.sg_display=0" ]; }) ]; hardware.nvidia = { - modesetting.enable = lib.mkDefault true; - powerManagement.enable = lib.mkDefault false; - powerManagement.finegrained = lib.mkDefault false; - open = lib.mkDefault false; - prime = { - sync.enable = lib.mkDefault true; - amdgpuBusId = "PCI:5:0:0"; - nvidiaBusId = "PCI:1:0:0"; - }; + modesetting.enable = lib.mkDefault true; + powerManagement.enable = lib.mkDefault false; + powerManagement.finegrained = lib.mkDefault false; + open = lib.mkDefault false; + prime = { + sync.enable = lib.mkDefault true; + amdgpuBusId = "PCI:5:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; }; # Avoid issues with modesetting causing blank screen diff --git a/lenovo/legion/16arh7h/hybrid/default.nix b/lenovo/legion/16arh7h/hybrid/default.nix index 1654e23c..8dcfb46d 100644 --- a/lenovo/legion/16arh7h/hybrid/default.nix +++ b/lenovo/legion/16arh7h/hybrid/default.nix @@ -2,7 +2,8 @@ config, lib, ... -}: { +}: +{ imports = [ ../../../../common/cpu/amd ../../../../common/cpu/amd/pstate.nix @@ -12,8 +13,8 @@ ../../../../common/pc/ssd ]; - boot.kernelModules = ["amdgpu"]; - services.xserver.videoDrivers = ["nvidia"]; + boot.kernelModules = [ "amdgpu" ]; + services.xserver.videoDrivers = [ "nvidia" ]; hardware = { amdgpu.initrd.enable = false; diff --git a/lenovo/legion/16arh7h/igpu-only/default.nix b/lenovo/legion/16arh7h/igpu-only/default.nix index bd61814f..24de7ddf 100644 --- a/lenovo/legion/16arh7h/igpu-only/default.nix +++ b/lenovo/legion/16arh7h/igpu-only/default.nix @@ -1,5 +1,6 @@ # This will enable only the integrated AMD GPU, while disabling the dedicated Nvidia GPU -{...}: { +{ ... }: +{ imports = [ ../../../../common/cpu/amd ../../../../common/cpu/amd/pstate.nix diff --git a/lenovo/legion/16arha7/audio/lenovo-16ARHA7_speaker-fix.nix b/lenovo/legion/16arha7/audio/lenovo-16ARHA7_speaker-fix.nix index 3e163b6b..40843b0d 100644 --- a/lenovo/legion/16arha7/audio/lenovo-16ARHA7_speaker-fix.nix +++ b/lenovo/legion/16arha7/audio/lenovo-16ARHA7_speaker-fix.nix @@ -1,9 +1,18 @@ # Patch sourced from https://github.com/christian-bendiksen/kernel-6.8.0-63.16ARHA7.fc40 -{ pkgs, lib, kernel ? pkgs.linuxPackages_latest.kernel }: +{ + pkgs, + lib, + kernel ? pkgs.linuxPackages_latest.kernel, +}: pkgs.stdenv.mkDerivation { pname = "lenovo-16ARHA7-speaker-fix-module"; - inherit (kernel) src version postPatch nativeBuildInputs; + inherit (kernel) + src + version + postPatch + nativeBuildInputs + ; kernel_dev = kernel.dev; kernelVersion = kernel.modDirVersion; @@ -29,10 +38,10 @@ pkgs.stdenv.mkDerivation { modules_install ''; - patches = [ ./lenovo_16ARHA7_sound_fix.patch ]; + patches = [ ./lenovo_16ARHA7_sound_fix.patch ]; meta = { description = "Patch to get the speakers working for Lenovo Legion Slim 7 Gen 7 AMD (16ARHA7)"; license = lib.licenses.gpl3; }; -} \ No newline at end of file +} diff --git a/lenovo/legion/16arha7/default.nix b/lenovo/legion/16arha7/default.nix index c6e3a8c4..39fcc6be 100644 --- a/lenovo/legion/16arha7/default.nix +++ b/lenovo/legion/16arha7/default.nix @@ -1,4 +1,9 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let lenovo-speaker-fix = pkgs.callPackage ./audio/lenovo-16ARHA7_speaker-fix.nix { @@ -15,7 +20,9 @@ in ]; # Kernel 6.10 includes the speaker fix, so only install this on systems with older kernels. - boot.extraModulePackages = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.10") [ lenovo-speaker-fix ]; + boot.extraModulePackages = + lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.10") + [ lenovo-speaker-fix ]; # √(2560² + 1600²) px / 16 in ≃ 189 dpi services.xserver.dpi = 189; diff --git a/lenovo/legion/16irx8h/default.nix b/lenovo/legion/16irx8h/default.nix index e4b6ca86..c39d8d46 100644 --- a/lenovo/legion/16irx8h/default.nix +++ b/lenovo/legion/16irx8h/default.nix @@ -2,7 +2,8 @@ lib, config, ... -}: { +}: +{ imports = [ ../../../common/cpu/intel ../../../common/gpu/nvidia/prime.nix @@ -12,8 +13,11 @@ ../../../common/hidpi.nix ]; - boot.initrd.kernelModules = ["nvidia"]; - boot.extraModulePackages = [config.boot.kernelPackages.lenovo-legion-module config.boot.kernelPackages.nvidia_x11]; + boot.initrd.kernelModules = [ "nvidia" ]; + boot.extraModulePackages = [ + config.boot.kernelPackages.lenovo-legion-module + config.boot.kernelPackages.nvidia_x11 + ]; hardware = { nvidia = { diff --git a/lenovo/legion/16irx9h/default.nix b/lenovo/legion/16irx9h/default.nix index 6a8077d8..877d31f7 100644 --- a/lenovo/legion/16irx9h/default.nix +++ b/lenovo/legion/16irx9h/default.nix @@ -2,7 +2,8 @@ lib, config, ... -}: { +}: +{ imports = [ ../../../common/cpu/intel ../../../common/gpu/nvidia/prime.nix @@ -12,7 +13,7 @@ ../../../common/hidpi.nix ]; - boot.extraModulePackages = [config.boot.kernelPackages.lenovo-legion-module]; + boot.extraModulePackages = [ config.boot.kernelPackages.lenovo-legion-module ]; hardware = { nvidia = { diff --git a/lenovo/thinkpad/a475/default.nix b/lenovo/thinkpad/a475/default.nix index dc89dc12..7a4f68cc 100644 --- a/lenovo/thinkpad/a475/default.nix +++ b/lenovo/thinkpad/a475/default.nix @@ -10,6 +10,8 @@ ../. ]; - boot.kernelParams = [ "i8042.nomux=1" "i8042.reset" ]; # Fix trackpoint and touchpad working only after reboot + boot.kernelParams = [ + "i8042.nomux=1" + "i8042.reset" + ]; # Fix trackpoint and touchpad working only after reboot } - diff --git a/lenovo/thinkpad/p1/3th-gen/audio.nix b/lenovo/thinkpad/p1/3th-gen/audio.nix index 8b6c854f..25baf545 100644 --- a/lenovo/thinkpad/p1/3th-gen/audio.nix +++ b/lenovo/thinkpad/p1/3th-gen/audio.nix @@ -1,7 +1,7 @@ { lib, pkgs, ... }: { # This can be removed when the default kernel is at least version 5.11 due to sof module - boot.kernelPackages = lib.mkIf - (lib.versionOlder pkgs.linux.version "5.11") - (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.11") ( + lib.mkDefault pkgs.linuxPackages_latest + ); } diff --git a/lenovo/thinkpad/p14s/amd/gen2/default.nix b/lenovo/thinkpad/p14s/amd/gen2/default.nix index 7c496f6e..b79e1cf3 100644 --- a/lenovo/thinkpad/p14s/amd/gen2/default.nix +++ b/lenovo/thinkpad/p14s/amd/gen2/default.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, config, ... }: +{ + lib, + pkgs, + config, + ... +}: { imports = [ ../. @@ -9,7 +14,9 @@ # amdgpu.backlight=0 makes the backlight work # acpi_backlight=none allows the backlight save/load systemd service to work on older kernel versions - boot.kernelParams = [ "amdgpu.backlight=0" ] ++ lib.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.1.6") "acpi_backlight=none"; + boot.kernelParams = + [ "amdgpu.backlight=0" ] + ++ lib.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.1.6") "acpi_backlight=none"; # For mainline support of rtw89 wireless networking boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; diff --git a/lenovo/thinkpad/p14s/amd/gen4/default.nix b/lenovo/thinkpad/p14s/amd/gen4/default.nix index cc6244e7..1e9182b7 100644 --- a/lenovo/thinkpad/p14s/amd/gen4/default.nix +++ b/lenovo/thinkpad/p14s/amd/gen4/default.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, config, ... }: +{ + lib, + pkgs, + config, + ... +}: { imports = [ ../. diff --git a/lenovo/thinkpad/p14s/default.nix b/lenovo/thinkpad/p14s/default.nix index 3a19fc1c..78396d32 100644 --- a/lenovo/thinkpad/p14s/default.nix +++ b/lenovo/thinkpad/p14s/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: { # P14s is a rebadged T14 with slight internal differences. @@ -14,7 +19,9 @@ # "vendor" setting, in this case the thinkpad_acpi driver. # See https://hansdegoede.livejournal.com/27130.html # See https://lore.kernel.org/linux-acpi/20221105145258.12700-1-hdegoede@redhat.com/ - boot.kernelParams = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.2") [ "acpi_backlight=native" ]; + boot.kernelParams = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.2") [ + "acpi_backlight=native" + ]; # see https://github.com/NixOS/nixpkgs/issues/69289 boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest; diff --git a/lenovo/thinkpad/p14s/intel/gen5/default.nix b/lenovo/thinkpad/p14s/intel/gen5/default.nix index 919df030..49c3fc7c 100644 --- a/lenovo/thinkpad/p14s/intel/gen5/default.nix +++ b/lenovo/thinkpad/p14s/intel/gen5/default.nix @@ -8,7 +8,7 @@ ]; hardware = { - intelgpu.driver = "i915"; #xe driver may be used on newer kernels + intelgpu.driver = "i915"; # xe driver may be used on newer kernels nvidia = { prime = { intelBusId = "PCI:0:2:0"; diff --git a/lenovo/thinkpad/p16s/intel/gen2/default.nix b/lenovo/thinkpad/p16s/intel/gen2/default.nix index 39940255..299f07a3 100644 --- a/lenovo/thinkpad/p16s/intel/gen2/default.nix +++ b/lenovo/thinkpad/p16s/intel/gen2/default.nix @@ -1,4 +1,5 @@ -{lib, ...}: { +{ lib, ... }: +{ imports = [ ../. ../../../../../common/cpu/intel/raptor-lake diff --git a/lenovo/thinkpad/p43s/default.nix b/lenovo/thinkpad/p43s/default.nix index c5e34ff0..9a05aeeb 100644 --- a/lenovo/thinkpad/p43s/default.nix +++ b/lenovo/thinkpad/p43s/default.nix @@ -1,4 +1,5 @@ -{ lib, config, ... }: { +{ lib, config, ... }: +{ imports = [ ../. ../../../common/cpu/intel/whiskey-lake diff --git a/lenovo/thinkpad/p50/default.nix b/lenovo/thinkpad/p50/default.nix index 62edb254..1deaddd1 100644 --- a/lenovo/thinkpad/p50/default.nix +++ b/lenovo/thinkpad/p50/default.nix @@ -1,4 +1,5 @@ -{ lib, config, ... }: { +{ lib, config, ... }: +{ imports = [ ../../../common/gpu/nvidia/prime.nix ../../../common/gpu/nvidia/maxwell @@ -19,16 +20,14 @@ hardware.enableAllFirmware = lib.mkDefault true; # fix suspend/resume screen corruption in sync mode - hardware.nvidia.powerManagement = - lib.mkIf config.hardware.nvidia.prime.sync.enable { - enable = lib.mkDefault true; - }; + hardware.nvidia.powerManagement = lib.mkIf config.hardware.nvidia.prime.sync.enable { + enable = lib.mkDefault true; + }; # fix screen tearing in sync mode - hardware.nvidia.modesetting = - lib.mkIf config.hardware.nvidia.prime.sync.enable { - enable = lib.mkDefault true; - }; + hardware.nvidia.modesetting = lib.mkIf config.hardware.nvidia.prime.sync.enable { + enable = lib.mkDefault true; + }; # Make the DPI the same in sync mode as in offload mode (disabled because # these thinkpads come with many kinds of screens, but this is valid for the diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix index 38f5614d..da133e49 100644 --- a/lenovo/thinkpad/p51/default.nix +++ b/lenovo/thinkpad/p51/default.nix @@ -1,4 +1,5 @@ -{ config, lib, ... }: { +{ config, lib, ... }: +{ imports = [ ../../../common/gpu/24.05-compat.nix ../../../common/gpu/nvidia/prime.nix @@ -25,16 +26,14 @@ hardware.enableAllFirmware = lib.mkDefault true; # fix suspend/resume screen corruption in sync mode - hardware.nvidia.powerManagement = - lib.mkIf config.hardware.nvidia.prime.sync.enable { - enable = lib.mkDefault true; - }; + hardware.nvidia.powerManagement = lib.mkIf config.hardware.nvidia.prime.sync.enable { + enable = lib.mkDefault true; + }; # fix screen tearing in sync mode - hardware.nvidia.modesetting = - lib.mkIf config.hardware.nvidia.prime.sync.enable { - enable = lib.mkDefault true; - }; + hardware.nvidia.modesetting = lib.mkIf config.hardware.nvidia.prime.sync.enable { + enable = lib.mkDefault true; + }; # Make the DPI the same in sync mode as in offload mode (disabled because # these thinkpads come with many kinds of screens, but this is valid for the diff --git a/lenovo/thinkpad/p52/default.nix b/lenovo/thinkpad/p52/default.nix index 6c9ea67b..fc8811f6 100644 --- a/lenovo/thinkpad/p52/default.nix +++ b/lenovo/thinkpad/p52/default.nix @@ -1,4 +1,5 @@ -{ lib, config, ... }: { +{ lib, config, ... }: +{ imports = [ ../../../common/gpu/24.05-compat.nix ../../../common/gpu/nvidia/prime.nix @@ -26,16 +27,14 @@ hardware.enableAllFirmware = lib.mkDefault true; # fix suspend/resume screen corruption in sync mode - hardware.nvidia.powerManagement = - lib.mkIf config.hardware.nvidia.prime.sync.enable { - enable = lib.mkDefault true; - }; + hardware.nvidia.powerManagement = lib.mkIf config.hardware.nvidia.prime.sync.enable { + enable = lib.mkDefault true; + }; # fix screen tearing in sync mode - hardware.nvidia.modesetting = - lib.mkIf config.hardware.nvidia.prime.sync.enable { - enable = lib.mkDefault true; - }; + hardware.nvidia.modesetting = lib.mkIf config.hardware.nvidia.prime.sync.enable { + enable = lib.mkDefault true; + }; # Make the DPI the same in sync mode as in offload mode (disabled because # these thinkpads come with many kinds of screens, but this is valid for the diff --git a/lenovo/thinkpad/t14/amd/gen4/default.nix b/lenovo/thinkpad/t14/amd/gen4/default.nix index e61a3a0d..6ca06529 100644 --- a/lenovo/thinkpad/t14/amd/gen4/default.nix +++ b/lenovo/thinkpad/t14/amd/gen4/default.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, config, ... }: +{ + lib, + pkgs, + config, + ... +}: { imports = [ diff --git a/lenovo/thinkpad/t14/amd/gen5/default.nix b/lenovo/thinkpad/t14/amd/gen5/default.nix index 917da63f..a092523c 100644 --- a/lenovo/thinkpad/t14/amd/gen5/default.nix +++ b/lenovo/thinkpad/t14/amd/gen5/default.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, config, ... }: +{ + lib, + pkgs, + config, + ... +}: { imports = [ diff --git a/lenovo/thinkpad/t410/default.nix b/lenovo/thinkpad/t410/default.nix index 9cb15b3d..cd77abaf 100644 --- a/lenovo/thinkpad/t410/default.nix +++ b/lenovo/thinkpad/t410/default.nix @@ -28,7 +28,10 @@ "i915.i915_enable_rc6=1" ]; blacklistedKernelModules = [ - "sierra_net" "cdc_mbim" "cdc_ncm" "btusb" + "sierra_net" + "cdc_mbim" + "cdc_ncm" + "btusb" ]; }; } diff --git a/lenovo/thinkpad/t490/default.nix b/lenovo/thinkpad/t490/default.nix index f524223d..cc6bfc55 100644 --- a/lenovo/thinkpad/t490/default.nix +++ b/lenovo/thinkpad/t490/default.nix @@ -12,18 +12,20 @@ # This configures a profile set for pulseaudio which offers multiple sinks corresponding to the # speaker + 4 HDMI ports. This allows the user to play audio streams on the speaker and any of the 4 HDMI/USB-C # ports at the same time. - udev.extraRules = let - t490ProfileSet = ./t490-profile-set.conf; - in '' - SUBSYSTEM!="sound", GOTO="pulseaudio_end" - ACTION!="change", GOTO="pulseaudio_end" - KERNEL!="card*", GOTO="pulseaudio_end" + udev.extraRules = + let + t490ProfileSet = ./t490-profile-set.conf; + in + '' + SUBSYSTEM!="sound", GOTO="pulseaudio_end" + ACTION!="change", GOTO="pulseaudio_end" + KERNEL!="card*", GOTO="pulseaudio_end" - # Lenovo T490 - ATTRS{vendor}=="0x8086" ATTRS{device}=="0x9dc8" ATTRS{subsystem_vendor}=="0x17aa", ATTRS{subsystem_device}=="0x2279", ENV{PULSE_PROFILE_SET}="${t490ProfileSet}" + # Lenovo T490 + ATTRS{vendor}=="0x8086" ATTRS{device}=="0x9dc8" ATTRS{subsystem_vendor}=="0x17aa", ATTRS{subsystem_device}=="0x2279", ENV{PULSE_PROFILE_SET}="${t490ProfileSet}" - LABEL="pulseaudio_end" - ''; + LABEL="pulseaudio_end" + ''; throttled.enable = lib.mkDefault true; }; diff --git a/lenovo/thinkpad/t490s/default.nix b/lenovo/thinkpad/t490s/default.nix index 35a0055b..2ee6567a 100644 --- a/lenovo/thinkpad/t490s/default.nix +++ b/lenovo/thinkpad/t490s/default.nix @@ -1,4 +1,5 @@ -{lib, ...}: { +{ lib, ... }: +{ imports = [ ../../../common/cpu/intel ../../../common/pc/ssd diff --git a/lenovo/thinkpad/x1-nano/default.nix b/lenovo/thinkpad/x1-nano/default.nix index b67595c3..fdbf9f32 100644 --- a/lenovo/thinkpad/x1-nano/default.nix +++ b/lenovo/thinkpad/x1-nano/default.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ ... }: +{ # Reference to hardware: https://ubuntu.com/certified/202012-28574 imports = [ ../. diff --git a/lenovo/thinkpad/x1-nano/gen1/default.nix b/lenovo/thinkpad/x1-nano/gen1/default.nix index 22c4019f..5ce106c1 100644 --- a/lenovo/thinkpad/x1-nano/gen1/default.nix +++ b/lenovo/thinkpad/x1-nano/gen1/default.nix @@ -1,19 +1,19 @@ -{ pkgs, ... }: +{ pkgs, ... }: { imports = [ ../. ]; - environment.systemPackages = with pkgs; [ - alsa-utils - ]; + environment.systemPackages = with pkgs; [ + alsa-utils + ]; - systemd.services.x1-fix = { - description = "Use alsa-utils to fix sound interference on Thinkpad x1 Nano"; - serviceConfig = { - Type = "simple"; - ExecStart = "${pkgs.alsa-tools}/bin/hda-verb /dev/snd/hwC0D0 0x1d SET_PIN_WIDGET_CONTROL 0x0"; - Restart = "on-failure"; - }; - wantedBy = [ "default.target" ]; - }; + systemd.services.x1-fix = { + description = "Use alsa-utils to fix sound interference on Thinkpad x1 Nano"; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.alsa-tools}/bin/hda-verb /dev/snd/hwC0D0 0x1d SET_PIN_WIDGET_CONTROL 0x0"; + Restart = "on-failure"; + }; + wantedBy = [ "default.target" ]; + }; } diff --git a/lenovo/thinkpad/x1/13th-gen/default.nix b/lenovo/thinkpad/x1/13th-gen/default.nix index 399ea64a..a2caba51 100644 --- a/lenovo/thinkpad/x1/13th-gen/default.nix +++ b/lenovo/thinkpad/x1/13th-gen/default.nix @@ -1,4 +1,4 @@ -{lib, ...}: +{ lib, ... }: { imports = [ diff --git a/lenovo/thinkpad/x1/9th-gen/default.nix b/lenovo/thinkpad/x1/9th-gen/default.nix index ef8bd9f1..cb2f5b80 100644 --- a/lenovo/thinkpad/x1/9th-gen/default.nix +++ b/lenovo/thinkpad/x1/9th-gen/default.nix @@ -6,7 +6,7 @@ ]; # This solves lagging noticeable on high-resolution screens. - boot.kernelPackages = lib.mkIf - (lib.versionOlder pkgs.linux.version "5.15") - (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.15") ( + lib.mkDefault pkgs.linuxPackages_latest + ); } diff --git a/lenovo/thinkpad/x1/yoga/7th-gen/default.nix b/lenovo/thinkpad/x1/yoga/7th-gen/default.nix index ed1a747f..8f5365a7 100644 --- a/lenovo/thinkpad/x1/yoga/7th-gen/default.nix +++ b/lenovo/thinkpad/x1/yoga/7th-gen/default.nix @@ -1,11 +1,12 @@ -{ lib, pkgs, ... }: { +{ lib, pkgs, ... }: +{ imports = [ ../. ../../../../../common/pc/ssd ]; # At least kernel 5.19 is required for the system to work properly. - boot.kernelPackages = lib.mkIf - (lib.versionOlder pkgs.linux.version "5.19") - (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.19") ( + lib.mkDefault pkgs.linuxPackages_latest + ); } diff --git a/lenovo/thinkpad/x1/yoga/default.nix b/lenovo/thinkpad/x1/yoga/default.nix index 2b13440f..25b85378 100644 --- a/lenovo/thinkpad/x1/yoga/default.nix +++ b/lenovo/thinkpad/x1/yoga/default.nix @@ -1,4 +1,5 @@ -{ config, lib, ... }: { +{ config, lib, ... }: +{ imports = [ ../. ../../yoga.nix diff --git a/lenovo/thinkpad/x13/amd/default.nix b/lenovo/thinkpad/x13/amd/default.nix index 61ca7b75..4543132d 100644 --- a/lenovo/thinkpad/x13/amd/default.nix +++ b/lenovo/thinkpad/x13/amd/default.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ ... }: +{ imports = [ ../common.nix ../../../../common/cpu/amd diff --git a/lenovo/thinkpad/x13/common.nix b/lenovo/thinkpad/x13/common.nix index 131f468c..1b9a75cf 100644 --- a/lenovo/thinkpad/x13/common.nix +++ b/lenovo/thinkpad/x13/common.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ ... }: +{ imports = [ ../. ../../../common/pc/ssd diff --git a/lenovo/thinkpad/x13/intel/default.nix b/lenovo/thinkpad/x13/intel/default.nix index ed4771fd..71d0324a 100644 --- a/lenovo/thinkpad/x13/intel/default.nix +++ b/lenovo/thinkpad/x13/intel/default.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ ... }: +{ # Reference to hardware: https://certification.ubuntu.com/hardware/202004-27844 imports = [ ../common.nix diff --git a/lenovo/thinkpad/x13/yoga/3th-gen/default.nix b/lenovo/thinkpad/x13/yoga/3th-gen/default.nix index 1b02f61f..971b925f 100644 --- a/lenovo/thinkpad/x13/yoga/3th-gen/default.nix +++ b/lenovo/thinkpad/x13/yoga/3th-gen/default.nix @@ -1,4 +1,5 @@ -{ lib, ... }: { +{ lib, ... }: +{ imports = [ ../. ]; diff --git a/lenovo/thinkpad/x13/yoga/default.nix b/lenovo/thinkpad/x13/yoga/default.nix index b7ff8778..7719520a 100644 --- a/lenovo/thinkpad/x13/yoga/default.nix +++ b/lenovo/thinkpad/x13/yoga/default.nix @@ -1,10 +1,11 @@ -{ config, lib, ... }: { +{ config, lib, ... }: +{ imports = [ ../intel ../../yoga.nix ]; services.xserver.wacom.enable = lib.mkDefault config.services.xserver.enable; - + services.hardware.bolt.enable = lib.mkDefault true; } diff --git a/lenovo/thinkpad/x13s/default.nix b/lenovo/thinkpad/x13s/default.nix index dd9159dc..59cf01b4 100644 --- a/lenovo/thinkpad/x13s/default.nix +++ b/lenovo/thinkpad/x13s/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let inherit (config.boot.kernelPackages) kernel; @@ -8,8 +13,8 @@ let # Version the dtb based on the kernel dtbEfiPath = "dtbs/x13s-${kernel.version}.dtb"; cfg = { - wifiMac = "e4:65:38:52:22:a9"; - bluetoothMac = "E4:25:18:22:44:AA"; + wifiMac = "e4:65:38:52:22:a9"; + bluetoothMac = "E4:25:18:22:44:AA"; }; inherit (lib) mkDefault; in diff --git a/lenovo/thinkpad/x390/default.nix b/lenovo/thinkpad/x390/default.nix index 80c893ba..7a3b5508 100644 --- a/lenovo/thinkpad/x390/default.nix +++ b/lenovo/thinkpad/x390/default.nix @@ -9,4 +9,3 @@ services.throttled.enable = lib.mkDefault true; } - diff --git a/lenovo/thinkpad/z/default.nix b/lenovo/thinkpad/z/default.nix index 11dda086..d3af3e5f 100644 --- a/lenovo/thinkpad/z/default.nix +++ b/lenovo/thinkpad/z/default.nix @@ -1,4 +1,5 @@ -{ lib, pkgs, ... }: { +{ lib, pkgs, ... }: +{ imports = [ ../../../lenovo/thinkpad ../../../common/cpu/amd @@ -15,5 +16,7 @@ # kernel versions below 6.0 don’t contain ACPI suspend2idle drivers for the Z-series’ AMD hardware # my Z13 froze after waking up from suspend/ hibernate - services.logind.lidSwitch = lib.mkIf (lib.versionOlder pkgs.linux.version "6.00") (lib.mkDefault "lock"); + services.logind.lidSwitch = lib.mkIf (lib.versionOlder pkgs.linux.version "6.00") ( + lib.mkDefault "lock" + ); } diff --git a/lenovo/thinkpad/z/gen1/default.nix b/lenovo/thinkpad/z/gen1/default.nix index b51da6e8..22d49544 100644 --- a/lenovo/thinkpad/z/gen1/default.nix +++ b/lenovo/thinkpad/z/gen1/default.nix @@ -1,8 +1,11 @@ -{ lib, pkgs, ... }: { +{ lib, pkgs, ... }: +{ imports = [ ../../../../lenovo/thinkpad/z ]; # Kernel 5.18 is required for the Ryzen 6000 series - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.18") (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.18") ( + lib.mkDefault pkgs.linuxPackages_latest + ); } diff --git a/lenovo/thinkpad/z/gen2/default.nix b/lenovo/thinkpad/z/gen2/default.nix index cb7e05c2..a91581d8 100644 --- a/lenovo/thinkpad/z/gen2/default.nix +++ b/lenovo/thinkpad/z/gen2/default.nix @@ -6,7 +6,9 @@ ]; # Kernel 6.4 is required for the Ryzen 7040 series - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.4") (lib.mkDefault pkgs.linuxPackages_latest); + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.4") ( + lib.mkDefault pkgs.linuxPackages_latest + ); systemd.services = { # Modified from Arch Wiki diff --git a/lenovo/yoga/7/14ARH7/nvidia/default.nix b/lenovo/yoga/7/14ARH7/nvidia/default.nix index cf7aedc9..71b7e00b 100644 --- a/lenovo/yoga/7/14ARH7/nvidia/default.nix +++ b/lenovo/yoga/7/14ARH7/nvidia/default.nix @@ -5,7 +5,8 @@ let inherit (lib) mkDefault; -in { +in +{ imports = [ ../shared.nix ## "prime.nix" loads this, aleady: diff --git a/lenovo/yoga/7/14IAH7/hybrid/default.nix b/lenovo/yoga/7/14IAH7/hybrid/default.nix index d202352c..0a46b053 100644 --- a/lenovo/yoga/7/14IAH7/hybrid/default.nix +++ b/lenovo/yoga/7/14IAH7/hybrid/default.nix @@ -1,23 +1,23 @@ /* - * `lenovo-yoga-7-14IAH7-hybrid`: - * - * This is a hybrid profile that enables the NVIDIA - * driver and PRIME offload mode for making use of both - * integrated and dedicated graphics. Use this profile if - * you want to use the NVIDIA GeForce RTX 3050 Mobile. - * Read about PRIME offload mode here: - * - * - * The `lenovo-yoga-7-14IAH7-integrated` profile only - * has the integrated Intel GPU enabled. The dedicated - * NVIDIA GPU is disabled entirely. Use that profile - * instead if you want to only use integrated graphics. - * - * `nouveau` wasn't added to any profiles since it - * is known to cause freezes for this device. - * `nouveau` is blacklisted by default when enabling this: - * - */ + `lenovo-yoga-7-14IAH7-hybrid`: + + This is a hybrid profile that enables the NVIDIA + driver and PRIME offload mode for making use of both + integrated and dedicated graphics. Use this profile if + you want to use the NVIDIA GeForce RTX 3050 Mobile. + Read about PRIME offload mode here: + + + The `lenovo-yoga-7-14IAH7-integrated` profile only + has the integrated Intel GPU enabled. The dedicated + NVIDIA GPU is disabled entirely. Use that profile + instead if you want to only use integrated graphics. + + `nouveau` wasn't added to any profiles since it + is known to cause freezes for this device. + `nouveau` is blacklisted by default when enabling this: + +*/ { lib, ... }: { imports = [ diff --git a/lenovo/yoga/7/14IAH7/integrated/default.nix b/lenovo/yoga/7/14IAH7/integrated/default.nix index 6ba257b0..3a3ce89a 100644 --- a/lenovo/yoga/7/14IAH7/integrated/default.nix +++ b/lenovo/yoga/7/14IAH7/integrated/default.nix @@ -1,25 +1,25 @@ /* - * `lenovo-yoga-7-14IAH7-integrated`: - * - * This profile only has the integrated Intel GPU - * enabled. The dedicated NVIDIA GPU is disabled - * entirely. Use this profile if you want to only - * use the integrated GPU. - * - * It is recommended to use this profile to disable - * dedicated graphics, rather than doing it through - * the BIOS, since that method causes issues with - * the integrated graphics drivers. Doing it - * through blacklisting achieves the same result - * with no side-effects. - * - * The `lenovo-yoga-7-14IAH7-hybrid` hybrid profile - * enables the NVIDIA driver and PRIME offload mode - * for making use of both GPUs. Use that profile - * instead if you want to use the NVIDIA GPU. - * Read about PRIME offload mode here: - * - */ + `lenovo-yoga-7-14IAH7-integrated`: + + This profile only has the integrated Intel GPU + enabled. The dedicated NVIDIA GPU is disabled + entirely. Use this profile if you want to only + use the integrated GPU. + + It is recommended to use this profile to disable + dedicated graphics, rather than doing it through + the BIOS, since that method causes issues with + the integrated graphics drivers. Doing it + through blacklisting achieves the same result + with no side-effects. + + The `lenovo-yoga-7-14IAH7-hybrid` hybrid profile + enables the NVIDIA driver and PRIME offload mode + for making use of both GPUs. Use that profile + instead if you want to use the NVIDIA GPU. + Read about PRIME offload mode here: + +*/ { imports = [ ../shared.nix diff --git a/lenovo/yoga/7/14IAH7/shared.nix b/lenovo/yoga/7/14IAH7/shared.nix index 91220cd7..22f868e0 100644 --- a/lenovo/yoga/7/14IAH7/shared.nix +++ b/lenovo/yoga/7/14IAH7/shared.nix @@ -1,8 +1,8 @@ /* - * Here are configurations for the - * Intel Core i7-12700H CPU, along - * with a few others. - */ + Here are configurations for the + Intel Core i7-12700H CPU, along + with a few others. +*/ { imports = [ ../../../../common/cpu/intel/alder-lake diff --git a/lenovo/yoga/7/slim/gen8/default.nix b/lenovo/yoga/7/slim/gen8/default.nix index 5f87802d..7e3099c4 100644 --- a/lenovo/yoga/7/slim/gen8/default.nix +++ b/lenovo/yoga/7/slim/gen8/default.nix @@ -1,20 +1,25 @@ -{ pkgs, lib, ... }: { +{ pkgs, lib, ... }: +{ boot.initrd.kernelModules = [ "amdgpu" ]; boot.kernelModules = [ "kvm-amd" ]; - # https://gitlab.freedesktop.org/drm/amd/-/issues/2812#note_2190544 - boot.kernelParams = ["mem_sleep_default=deep" "rtc_cmos.use_acpi_alarm=1"]; + # https://gitlab.freedesktop.org/drm/amd/-/issues/2812#note_2190544 + boot.kernelParams = [ + "mem_sleep_default=deep" + "rtc_cmos.use_acpi_alarm=1" + ]; # suspend needs kernel 6.7 or later - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.7") pkgs.linuxPackages_latest; + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.7") pkgs.linuxPackages_latest; - # https://gitlab.freedesktop.org/drm/amd/-/issues/2812#note_2190544 + # https://gitlab.freedesktop.org/drm/amd/-/issues/2812#note_2190544 hardware.enableRedistributableFirmware = true; hardware.cpu.amd.updateMicrocode = true; - boot.initrd.prepend = lib.mkOrder 0 [ "${pkgs.fetchurl { - url = "https://gitlab.freedesktop.org/drm/amd/uploads/9fe228c7aa403b78c61fb1e29b3b35e3/slim7-ssdt"; - sha256 = "sha256-Ef4QTxdjt33OJEPLAPEChvvSIXx3Wd/10RGvLfG5JUs="; - name = "slim7-ssdt"; - }}" ]; + boot.initrd.prepend = lib.mkOrder 0 [ + "${pkgs.fetchurl { + url = "https://gitlab.freedesktop.org/drm/amd/uploads/9fe228c7aa403b78c61fb1e29b3b35e3/slim7-ssdt"; + sha256 = "sha256-Ef4QTxdjt33OJEPLAPEChvvSIXx3Wd/10RGvLfG5JUs="; + name = "slim7-ssdt"; + }}" + ]; } - diff --git a/microchip/common/bsp/hss-payload-generator.nix b/microchip/common/bsp/hss-payload-generator.nix index 4044d51f..74bbe07b 100644 --- a/microchip/common/bsp/hss-payload-generator.nix +++ b/microchip/common/bsp/hss-payload-generator.nix @@ -1,4 +1,4 @@ -{ pkgs, ...}: +{ pkgs, ... }: with pkgs; stdenv.mkDerivation rec { pname = "hss"; diff --git a/microchip/common/bsp/linux-icicle-kit.nix b/microchip/common/bsp/linux-icicle-kit.nix index 6ac1eb14..13d4f34f 100644 --- a/microchip/common/bsp/linux-icicle-kit.nix +++ b/microchip/common/bsp/linux-icicle-kit.nix @@ -1,65 +1,77 @@ -{ lib, buildLinux, fetchFromGitHub -, kernelPatches ? [] -, structuredExtraConfig ? {} -, extraMeta ? {} -, argsOverride ? {} -, ... } @ args: +{ + lib, + buildLinux, + fetchFromGitHub, + kernelPatches ? [ ], + structuredExtraConfig ? { }, + extraMeta ? { }, + argsOverride ? { }, + ... +}@args: let version = "6.1.43-linux4microchip+fpga-2023.09"; -in buildLinux (args // { - inherit version kernelPatches extraMeta; +in +buildLinux ( + args + // { + inherit version kernelPatches extraMeta; - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = version; + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = version; - defconfig = "mpfs_defconfig"; + defconfig = "mpfs_defconfig"; - autoModules = false; + autoModules = false; - 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; + 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; + # 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"; - repo = "linux"; - rev = "25e35c7c54ad853d03c14a02b189b408cb5b5eb3"; - sha256 = "sha256-wj7lz247MkhxmhSHUcNeWmcZK+DL+5PAnLwTmALD97M="; - }; -} // argsOverride) + src = fetchFromGitHub { + owner = "linux4microchip"; + repo = "linux"; + rev = "25e35c7c54ad853d03c14a02b189b408cb5b5eb3"; + sha256 = "sha256-wj7lz247MkhxmhSHUcNeWmcZK+DL+5PAnLwTmALD97M="; + }; + } + // argsOverride +) diff --git a/microchip/common/bsp/uboot.nix b/microchip/common/bsp/uboot.nix index 2db04d56..22be6d0b 100644 --- a/microchip/common/bsp/uboot.nix +++ b/microchip/common/bsp/uboot.nix @@ -1,9 +1,12 @@ { - pkgs, targetBoard, ... + pkgs, + targetBoard, + ... }: -with pkgs; let - payload-generator = pkgs.callPackage ./hss-payload-generator.nix {}; +with pkgs; +let + payload-generator = pkgs.callPackage ./hss-payload-generator.nix { }; payload_config = ./uboot.yaml; in buildUBoot rec { @@ -19,7 +22,7 @@ buildUBoot rec { }; extraMakeFlags = [ - "OPENSBI=${opensbi}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin" + "OPENSBI=${opensbi}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin" ]; patches = [ @@ -27,9 +30,9 @@ buildUBoot rec { ]; defconfig = "${targetBoard}_defconfig"; enableParallelBuilding = true; - extraMeta.platforms = ["riscv64-linux"]; + extraMeta.platforms = [ "riscv64-linux" ]; postBuild = '' - ${payload-generator}/hss-payload-generator -c ${payload_config} payload.bin - ''; + ${payload-generator}/hss-payload-generator -c ${payload_config} payload.bin + ''; filesToInstall = [ "payload.bin" ]; } diff --git a/microchip/common/modules.nix b/microchip/common/modules.nix index c6a75198..34874aac 100644 --- a/microchip/common/modules.nix +++ b/microchip/common/modules.nix @@ -1,8 +1,16 @@ -{ pkgs, lib, config, ... }: { +{ + pkgs, + lib, + config, + ... +}: +{ boot = { - kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/linux-icicle-kit.nix { - inherit (config.boot) kernelPatches; - }); + kernelPackages = pkgs.linuxPackagesFor ( + pkgs.callPackage ./bsp/linux-icicle-kit.nix { + inherit (config.boot) kernelPatches; + } + ); initrd.includeDefaultModules = lib.mkDefault false; }; } diff --git a/microchip/icicle-kit/overlay.nix b/microchip/icicle-kit/overlay.nix index f145dcf6..86b60d93 100644 --- a/microchip/icicle-kit/overlay.nix +++ b/microchip/icicle-kit/overlay.nix @@ -1,3 +1,6 @@ final: _prev: { - uboot-icicle-kit = final.callPackage ./../common/bsp/uboot.nix { pkgs = final; targetBoard = "microchip_mpfs_icicle";}; + uboot-icicle-kit = final.callPackage ./../common/bsp/uboot.nix { + pkgs = final; + targetBoard = "microchip_mpfs_icicle"; + }; } diff --git a/microsoft/surface-pro/9/default.nix b/microsoft/surface-pro/9/default.nix index 60b82ad3..b8334cac 100644 --- a/microsoft/surface-pro/9/default.nix +++ b/microsoft/surface-pro/9/default.nix @@ -2,4 +2,4 @@ imports = [ ../../surface/surface-pro-intel ]; boot.kernelParams = [ "i915.enable_psr=0" ]; # Disable Intel Panel Self Refresh -} \ No newline at end of file +} diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 5d9d7d98..236ddc4b 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -1,10 +1,21 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let - inherit (lib) mkDefault mkOption types versions; + inherit (lib) + mkDefault + mkOption + types + versions + ; # Set the version and hash for the kernel sources - srcVersion = with config.hardware.microsoft-surface; + srcVersion = + with config.hardware.microsoft-surface; if kernelVersion == "longterm" then "6.12.19" else if kernelVersion == "stable" then @@ -12,7 +23,8 @@ let else abort "Invalid kernel version: ${kernelVersion}"; - srcHash = with config.hardware.microsoft-surface; + srcHash = + with config.hardware.microsoft-surface; if kernelVersion == "longterm" then "sha256-1zvwV77ARDSxadG2FkGTb30Ml865I6KB8y413U3MZTE=" else if kernelVersion == "stable" then @@ -21,15 +33,17 @@ let abort "Invalid kernel version: ${kernelVersion}"; # Set the version and hash for the linux-surface releases - pkgVersion = with config.hardware.microsoft-surface; + pkgVersion = + with config.hardware.microsoft-surface; if kernelVersion == "longterm" then "6.12.7" else if kernelVersion == "stable" then "6.14.2" else abort "Invalid kernel version: ${kernelVersion}"; - - pkgHash = with config.hardware.microsoft-surface; + + pkgHash = + with config.hardware.microsoft-surface; if kernelVersion == "longterm" then "sha256-Pv7O8D8ma+MPLhYP3HSGQki+Yczp8b7d63qMb6l4+mY=" else if kernelVersion == "stable" then @@ -38,28 +52,46 @@ let abort "Invalid kernel version: ${kernelVersion}"; # Fetch the linux-surface package - repos = pkgs.callPackage ({ fetchFromGitHub, rev, hash }: { - linux-surface = fetchFromGitHub { - owner = "linux-surface"; - repo = "linux-surface"; - rev = rev; - hash = hash; - }; - }) { hash = pkgHash; rev = "arch-${pkgVersion}-1"; }; + repos = + pkgs.callPackage + ( + { + fetchFromGitHub, + rev, + hash, + }: + { + linux-surface = fetchFromGitHub { + owner = "linux-surface"; + repo = "linux-surface"; + rev = rev; + hash = hash; + }; + } + ) + { + hash = pkgHash; + rev = "arch-${pkgVersion}-1"; + }; # Fetch and build the kernel package - inherit (pkgs.callPackage ./kernel/linux-package.nix { inherit repos; }) linuxPackage surfacePatches; + inherit (pkgs.callPackage ./kernel/linux-package.nix { inherit repos; }) + linuxPackage + surfacePatches + ; kernelPatches = surfacePatches { version = pkgVersion; patchFn = ./kernel/${versions.majorMinor pkgVersion}/patches.nix; }; kernelPackages = linuxPackage { - inherit kernelPatches; version = srcVersion; + inherit kernelPatches; + version = srcVersion; sha256 = srcHash; - ignoreConfigErrors=true; + ignoreConfigErrors = true; }; -in { +in +{ options.hardware.microsoft-surface.kernelVersion = mkOption { description = "Kernel Version to use (patched for MS Surface)"; type = types.enum [ diff --git a/microsoft/surface/common/kernel/6.12/patches.nix b/microsoft/surface/common/kernel/6.12/patches.nix index 93e3c2ef..d5cc8ccc 100644 --- a/microsoft/surface/common/kernel/6.12/patches.nix +++ b/microsoft/surface/common/kernel/6.12/patches.nix @@ -1,4 +1,5 @@ -{ lib, +{ + lib, kernel ? lib.kernel, patchSrc, version, @@ -11,87 +12,87 @@ extraStructuredConfig = with kernel; { STAGING_MEDIA = yes; -## -## Surface Aggregator Module -## -CONFIG_SURFACE_AGGREGATOR= module; -# CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION is not set -CONFIG_SURFACE_AGGREGATOR_BUS= yes; -CONFIG_SURFACE_AGGREGATOR_CDEV= module; -CONFIG_SURFACE_AGGREGATOR_HUB= module; -CONFIG_SURFACE_AGGREGATOR_REGISTRY= module; -CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH= module; + ## + ## Surface Aggregator Module + ## + CONFIG_SURFACE_AGGREGATOR = module; + # CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION is not set + CONFIG_SURFACE_AGGREGATOR_BUS = yes; + CONFIG_SURFACE_AGGREGATOR_CDEV = module; + CONFIG_SURFACE_AGGREGATOR_HUB = module; + CONFIG_SURFACE_AGGREGATOR_REGISTRY = module; + CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH = module; -CONFIG_SURFACE_ACPI_NOTIFY= module; -CONFIG_SURFACE_DTX= module; -CONFIG_SURFACE_PLATFORM_PROFILE= module; + CONFIG_SURFACE_ACPI_NOTIFY = module; + CONFIG_SURFACE_DTX = module; + CONFIG_SURFACE_PLATFORM_PROFILE = module; -CONFIG_SURFACE_HID= module; -CONFIG_SURFACE_KBD= module; + CONFIG_SURFACE_HID = module; + CONFIG_SURFACE_KBD = module; -CONFIG_BATTERY_SURFACE= module; -CONFIG_CHARGER_SURFACE= module; + CONFIG_BATTERY_SURFACE = module; + CONFIG_CHARGER_SURFACE = module; -CONFIG_SENSORS_SURFACE_TEMP= module; -CONFIG_SENSORS_SURFACE_FAN= module; + CONFIG_SENSORS_SURFACE_TEMP = module; + CONFIG_SENSORS_SURFACE_FAN = module; -## -## Surface Hotplug -## -CONFIG_SURFACE_HOTPLUG= module; + ## + ## Surface Hotplug + ## + CONFIG_SURFACE_HOTPLUG = module; -## -## IPTS and ITHC touchscreen -## -## This only enables the user interface for IPTS/ITHC data. -## For the touchscreen to work, you need to install iptsd. -## -CONFIG_HID_IPTS= module; -CONFIG_HID_ITHC= module; + ## + ## IPTS and ITHC touchscreen + ## + ## This only enables the user interface for IPTS/ITHC data. + ## For the touchscreen to work, you need to install iptsd. + ## + CONFIG_HID_IPTS = module; + CONFIG_HID_ITHC = module; -## -## Cameras: IPU3 -## -CONFIG_VIDEO_DW9719= module; -CONFIG_VIDEO_IPU3_IMGU= module; -CONFIG_VIDEO_IPU3_CIO2= module; -CONFIG_IPU_BRIDGE= module; -CONFIG_INTEL_SKL_INT3472= module; -CONFIG_REGULATOR_TPS68470= module; -CONFIG_COMMON_CLK_TPS68470= module; -CONFIG_LEDS_TPS68470= module; + ## + ## Cameras: IPU3 + ## + CONFIG_VIDEO_DW9719 = module; + CONFIG_VIDEO_IPU3_IMGU = module; + CONFIG_VIDEO_IPU3_CIO2 = module; + CONFIG_IPU_BRIDGE = module; + CONFIG_INTEL_SKL_INT3472 = module; + CONFIG_REGULATOR_TPS68470 = module; + CONFIG_COMMON_CLK_TPS68470 = module; + CONFIG_LEDS_TPS68470 = module; -## -## Cameras: Sensor drivers -## -CONFIG_VIDEO_OV5693= module; -CONFIG_VIDEO_OV7251= module; -CONFIG_VIDEO_OV8865= module; + ## + ## Cameras: Sensor drivers + ## + CONFIG_VIDEO_OV5693 = module; + CONFIG_VIDEO_OV7251 = module; + CONFIG_VIDEO_OV8865 = module; -## -## Surface 3: atomisp causes problems (see issue #1095). Disable it for now. -## -# CONFIG_INTEL_ATOMISP is not set + ## + ## Surface 3: atomisp causes problems (see issue #1095). Disable it for now. + ## + # CONFIG_INTEL_ATOMISP is not set -## -## ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 -## -CONFIG_APDS9960= module; + ## + ## ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 + ## + CONFIG_APDS9960 = module; -## -## Build-in UFS support (required for some Surface Go devices) -## -CONFIG_SCSI_UFSHCD= module; -CONFIG_SCSI_UFSHCD_PCI= module; + ## + ## Build-in UFS support (required for some Surface Go devices) + ## + CONFIG_SCSI_UFSHCD = module; + CONFIG_SCSI_UFSHCD_PCI = module; -## -## Other Drivers -## -CONFIG_INPUT_SOC_BUTTON_ARRAY= module; -CONFIG_SURFACE_3_POWER_OPREGION= module; -CONFIG_SURFACE_PRO3_BUTTON= module; -CONFIG_SURFACE_GPE= module; -CONFIG_SURFACE_BOOK1_DGPU_SWITCH= module; + ## + ## Other Drivers + ## + CONFIG_INPUT_SOC_BUTTON_ARRAY = module; + CONFIG_SURFACE_3_POWER_OPREGION = module; + CONFIG_SURFACE_PRO3_BUTTON = module; + CONFIG_SURFACE_GPE = module; + CONFIG_SURFACE_BOOK1_DGPU_SWITCH = module; }; } { diff --git a/microsoft/surface/common/kernel/6.14/patches.nix b/microsoft/surface/common/kernel/6.14/patches.nix index a78be406..6f685ee4 100644 --- a/microsoft/surface/common/kernel/6.14/patches.nix +++ b/microsoft/surface/common/kernel/6.14/patches.nix @@ -1,4 +1,5 @@ -{ lib, +{ + lib, kernel ? lib.kernel, patchSrc, version, diff --git a/microsoft/surface/common/kernel/linux-package.nix b/microsoft/surface/common/kernel/linux-package.nix index 28e3e0e7..995ba75c 100644 --- a/microsoft/surface/common/kernel/linux-package.nix +++ b/microsoft/surface/common/kernel/linux-package.nix @@ -1,4 +1,5 @@ -{ pkgs, +{ + pkgs, lib, fetchurl, buildLinux, @@ -11,44 +12,73 @@ let inherit (lib) recurseIntoAttrs types versions; linuxPackage = - { url ? "mirror://kernel/linux/kernel/v${versions.major version}.x/linux-${version}.tar.xz", + { + url ? "mirror://kernel/linux/kernel/v${versions.major version}.x/linux-${version}.tar.xz", sha256 ? null, src ? (fetchurl { inherit url sha256; }), version, modDirVersion ? (versions.pad 3 version), - kernelPatches ? [], + kernelPatches ? [ ], ... - } @ args: let + }@args: + let inherit (builtins) removeAttrs; - args' = { - inherit src version modDirVersion kernelPatches; - } // removeAttrs args [ "url" "sha256" ]; + args' = + { + inherit + src + version + modDirVersion + kernelPatches + ; + } + // removeAttrs args [ + "url" + "sha256" + ]; linuxPackage = buildLinux args'; linuxPackages' = recurseIntoAttrs (linuxPackagesFor linuxPackage); - in linuxPackages'; + in + linuxPackages'; surfacePatches = - { patchSrc ? (repos.linux-surface + "/patches/${versions.majorMinor version}"), + { + patchSrc ? (repos.linux-surface + "/patches/${versions.majorMinor version}"), version, patchFn, - }: pkgs.callPackage patchFn { + }: + pkgs.callPackage patchFn { inherit (lib) kernel; inherit version patchSrc; }; - versionsOf = version: + versionsOf = + version: # Provides a list of versions that can be used as an enum option for this full version: - [ version (versions.majorMinor version) ]; + [ + version + (versions.majorMinor version) + ]; - versionsOfEnum = version: + versionsOfEnum = + version: # Provide an enum option for versions of this kernel: types.enum (versionsOf version); - isVersionOf = kernelVersion: version: + isVersionOf = + kernelVersion: version: # Test if the provided version is considered one of the list of versions from above: elem kernelVersion (versionsOf version); -in { - inherit linuxPackage repos surfacePatches versionsOf isVersionOf versionsOfEnum; +in +{ + inherit + linuxPackage + repos + surfacePatches + versionsOf + isVersionOf + versionsOfEnum + ; } diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix index a86f741d..a5d717b1 100644 --- a/microsoft/surface/surface-go/default.nix +++ b/microsoft/surface/surface-go/default.nix @@ -6,7 +6,8 @@ let inherit (lib) mkDefault; -in { +in +{ imports = [ ../common ./firmware/ath10k diff --git a/microsoft/surface/surface-go/firmware/ath10k/ath10k-replace.nix b/microsoft/surface/surface-go/firmware/ath10k/ath10k-replace.nix index 132695e5..e5cf182d 100644 --- a/microsoft/surface/surface-go/firmware/ath10k/ath10k-replace.nix +++ b/microsoft/surface/surface-go/firmware/ath10k/ath10k-replace.nix @@ -1,4 +1,10 @@ -{ stdenv, lib, pkgs, firmwareLinuxNonfree, ... }: +{ + stdenv, + lib, + pkgs, + firmwareLinuxNonfree, + ... +}: let repos = pkgs.callPackage { @@ -8,14 +14,18 @@ let rev = "74e5409e699383d6ca2bc4da4a8433d16f3850b1"; sha256 = "169vgvxpgad9anmchs22fj5qm6ahzjfdnwhd8pc280q705vx6pjk"; }; - } {}; + } { }; killernetworking_firmware = repos.surface-go-ath10k-firmware_backup + "/K1535_Debian"; -in stdenv.mkDerivation { +in +stdenv.mkDerivation { pname = "microsoft-surface-go-firmware-linux-nonfree"; inherit (firmwareLinuxNonfree) version; src = firmwareLinuxNonfree; - phases = [ "unpackPhase" "installPhase" ]; + phases = [ + "unpackPhase" + "installPhase" + ]; installPhase = '' # Install the Surface Go Wifi firmware: diff --git a/microsoft/surface/surface-go/firmware/ath10k/default.nix b/microsoft/surface/surface-go/firmware/ath10k/default.nix index a7ad6a9a..efed6de8 100644 --- a/microsoft/surface/surface-go/firmware/ath10k/default.nix +++ b/microsoft/surface/surface-go/firmware/ath10k/default.nix @@ -1,11 +1,17 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let inherit (lib) mkDefault mkEnableOption mkIf; cfg = config.hardware.microsoft-surface.firmware.surface-go-ath10k; -in { +in +{ options = { hardware.microsoft-surface.firmware.surface-go-ath10k = { replace = mkEnableOption ''Use the "board.bin" firmware for ath10k-based WiFi on Surface Go.''; @@ -13,18 +19,21 @@ in { }; config = mkIf cfg.replace { - warnings = [''A working version of the ath10k QCA6174 firmware has been added to the kernel.org linux-firmware - repo, making this fix obsolete. - See: - - https://github.com/linux-surface/linux-surface/issues/542#issuecomment-976995453 - - https://github.com/linux-surface/linux-surface/wiki/Surface-Go#wi-fi-firmware + warnings = [ + '' + A working version of the ath10k QCA6174 firmware has been added to the kernel.org linux-firmware + repo, making this fix obsolete. + See: + - https://github.com/linux-surface/linux-surface/issues/542#issuecomment-976995453 + - https://github.com/linux-surface/linux-surface/wiki/Surface-Go#wi-fi-firmware - NOTE: This module option will probably be removed in the near future. - '']; + NOTE: This module option will probably be removed in the near future. + '' + ]; hardware.enableAllFirmware = true; hardware.firmware = [ - (pkgs.callPackage ./ath10k-replace.nix {}) + (pkgs.callPackage ./ath10k-replace.nix { }) ]; boot.extraModprobeConfig = mkDefault '' diff --git a/microsoft/surface/surface-pro-intel/default.nix b/microsoft/surface/surface-pro-intel/default.nix index 20ebbbab..c50e4515 100644 --- a/microsoft/surface/surface-pro-intel/default.nix +++ b/microsoft/surface/surface-pro-intel/default.nix @@ -15,7 +15,7 @@ services.iptsd.enable = lib.mkDefault true; environment.systemPackages = [ pkgs.surface-control ]; - + services.thermald = lib.mkDefault { enable = true; configFile = ./thermal-conf.xml; diff --git a/milkv/pioneer/default.nix b/milkv/pioneer/default.nix index aaf685a7..a7297e6d 100644 --- a/milkv/pioneer/default.nix +++ b/milkv/pioneer/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: { boot = { @@ -11,9 +16,11 @@ "sdhci_sophgo" ]; }; - kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./linux.nix { - inherit (config.boot) kernelPatches; - }); + kernelPackages = pkgs.linuxPackagesFor ( + pkgs.callPackage ./linux.nix { + inherit (config.boot) kernelPatches; + } + ); kernelParams = lib.mkDefault [ "earlycon" "console=ttyS0,115200" diff --git a/milkv/pioneer/firmware.nix b/milkv/pioneer/firmware.nix index fb49962b..2adedf74 100644 --- a/milkv/pioneer/firmware.nix +++ b/milkv/pioneer/firmware.nix @@ -1,12 +1,13 @@ -{ stdenv -, writeText -, opensbi -, fip -, zsbl -, linuxboot-kernel -, linuxboot-initrd -, dtbs ? "${linuxboot-kernel}/dtbs" -, ... +{ + stdenv, + writeText, + opensbi, + fip, + zsbl, + linuxboot-kernel, + linuxboot-initrd, + dtbs ? "${linuxboot-kernel}/dtbs", + ... }: let diff --git a/milkv/pioneer/linux.nix b/milkv/pioneer/linux.nix index b2396c75..48c4ecd1 100644 --- a/milkv/pioneer/linux.nix +++ b/milkv/pioneer/linux.nix @@ -1,44 +1,58 @@ -{ buildLinux, fetchFromGitHub, kernelPatches, lib, ... } @ args: +{ + buildLinux, + fetchFromGitHub, + kernelPatches, + lib, + ... +}@args: let modDirVersion = "6.6.20"; in -buildLinux (args // { - inherit kernelPatches modDirVersion; - version = "${modDirVersion}-milkv-pioneer"; - src = fetchFromGitHub { - owner = "sophgo"; - repo = "linux-riscv"; - rev = "caa949e3690fe8a4656313b2b56f52666fa880db"; - hash = "sha256-qJpR3KMgvP4tfPfBfQ/MiEWg/uuuxHYuACK8taKKK3E="; - }; +buildLinux ( + args + // { + inherit kernelPatches modDirVersion; + version = "${modDirVersion}-milkv-pioneer"; + src = fetchFromGitHub { + owner = "sophgo"; + repo = "linux-riscv"; + rev = "caa949e3690fe8a4656313b2b56f52666fa880db"; + hash = "sha256-qJpR3KMgvP4tfPfBfQ/MiEWg/uuuxHYuACK8taKKK3E="; + }; - defconfig = "sophgo_mango_normal_defconfig"; - structuredExtraConfig = let inherit (lib.kernel) freeform module yes; in { - # LinuxBoot will override the console bootparams which will result - # in the distro kernel to be booted with e.g. console=tty1 only. - # https://github.com/sophgo/bootloader-riscv/issues/71 - # Force output on serial console through the config. This is also - # needed to get the forced serial-getty to be started. - # We also list tty1 again because according to - # https://docs.kernel.org/admin-guide/serial-console.html and - # https://0pointer.de/blog/projects/serial-console.html - # this will be the main console. - CMDLINE = freeform "console=ttyS0,115200 console=tty1"; - CMDLINE_EXTEND = yes; + defconfig = "sophgo_mango_normal_defconfig"; + structuredExtraConfig = + let + inherit (lib.kernel) freeform module yes; + in + { + # LinuxBoot will override the console bootparams which will result + # in the distro kernel to be booted with e.g. console=tty1 only. + # https://github.com/sophgo/bootloader-riscv/issues/71 + # Force output on serial console through the config. This is also + # needed to get the forced serial-getty to be started. + # We also list tty1 again because according to + # https://docs.kernel.org/admin-guide/serial-console.html and + # https://0pointer.de/blog/projects/serial-console.html + # this will be the main console. + CMDLINE = freeform "console=ttyS0,115200 console=tty1"; + CMDLINE_EXTEND = yes; - # Enable these explicitly because they are not enabled by the defconfig. - # The all-hardware profile expects these to be built. - VIRTIO_MENU = yes; - VIRTIO_PCI = module; + # Enable these explicitly because they are not enabled by the defconfig. + # The all-hardware profile expects these to be built. + VIRTIO_MENU = yes; + VIRTIO_PCI = module; - # There is an i2c mcu driver (drivers/soc/sophgo/umcu) which is always - # compiled into the kernel. Hence some of the i2c support also needs to - # be compiled in instead of being compiled as a module. - I2C = yes; - I2C_CHARDEV = yes; - I2C_DESIGNWARE_PLATFORM = yes; - }; + # There is an i2c mcu driver (drivers/soc/sophgo/umcu) which is always + # compiled into the kernel. Hence some of the i2c support also needs to + # be compiled in instead of being compiled as a module. + I2C = yes; + I2C_CHARDEV = yes; + I2C_DESIGNWARE_PLATFORM = yes; + }; - extraMeta.branch = "sg2042-dev-6.6"; -} // (args.argsOverride or { })) + extraMeta.branch = "sg2042-dev-6.6"; + } + // (args.argsOverride or { }) +) diff --git a/milkv/pioneer/linuxboot-initrd.nix b/milkv/pioneer/linuxboot-initrd.nix index 507fc0e3..a0cfd7ef 100644 --- a/milkv/pioneer/linuxboot-initrd.nix +++ b/milkv/pioneer/linuxboot-initrd.nix @@ -1,9 +1,10 @@ -{ buildPackages -, fetchFromGitHub -, fetchpatch -, linux-firmware -, buildGoModule -, ... +{ + buildPackages, + fetchFromGitHub, + fetchpatch, + linux-firmware, + buildGoModule, + ... }: # Based on diff --git a/milkv/pioneer/linuxboot-kernel.nix b/milkv/pioneer/linuxboot-kernel.nix index 5f8fd815..d7d400e3 100644 --- a/milkv/pioneer/linuxboot-kernel.nix +++ b/milkv/pioneer/linuxboot-kernel.nix @@ -1,4 +1,10 @@ -{ fetchFromGitHub, lib, linuxManualConfig, stdenv, ... }: +{ + fetchFromGitHub, + lib, + linuxManualConfig, + stdenv, + ... +}: linuxManualConfig rec { inherit lib stdenv; diff --git a/milkv/pioneer/sd-image.nix b/milkv/pioneer/sd-image.nix index eaa378c4..dccfdd28 100644 --- a/milkv/pioneer/sd-image.nix +++ b/milkv/pioneer/sd-image.nix @@ -1,4 +1,10 @@ -{ config, lib, modulesPath, pkgs, ... }: +{ + config, + lib, + modulesPath, + pkgs, + ... +}: let inherit (pkgs) callPackage; @@ -10,7 +16,14 @@ let linuxboot-initrd = callPackage ./linuxboot-initrd.nix { }; dtbs = config.hardware.deviceTree.package; firmware = callPackage ./firmware.nix { - inherit fip zsbl opensbi linuxboot-kernel linuxboot-initrd dtbs; + inherit + fip + zsbl + opensbi + linuxboot-kernel + linuxboot-initrd + dtbs + ; }; in { diff --git a/milkv/pioneer/zsbl.nix b/milkv/pioneer/zsbl.nix index a275d301..9890e6fc 100644 --- a/milkv/pioneer/zsbl.nix +++ b/milkv/pioneer/zsbl.nix @@ -1,11 +1,12 @@ -{ buildPackages -, bison -, fetchFromGitHub -, flex -, lib -, stdenv +{ + buildPackages, + bison, + fetchFromGitHub, + flex, + lib, + stdenv, -, ... + ... }: stdenv.mkDerivation rec { pname = "zsbl-sg2042"; diff --git a/minisforum/v3/audio.nix b/minisforum/v3/audio.nix index 029b87ce..0cefc40a 100644 --- a/minisforum/v3/audio.nix +++ b/minisforum/v3/audio.nix @@ -1,7 +1,7 @@ { ... }: { # Fix microphone. - # Based on https://github.com/mudkipme/awesome-minisforum-v3/issues/10#issuecomment-2317474057 (Volume control workaround doesn't work on Arch) + # Based on https://github.com/mudkipme/awesome-minisforum-v3/issues/10#issuecomment-2317474057 (Volume control workaround doesn't work on Arch) boot.extraModprobeConfig = '' options snd-hda-intel model=alc256-asus-aio ''; diff --git a/minisforum/v3/sensors.nix b/minisforum/v3/sensors.nix index 0f336e90..453f29ed 100644 --- a/minisforum/v3/sensors.nix +++ b/minisforum/v3/sensors.nix @@ -5,7 +5,7 @@ hardware.sensor.iio.enable = lib.mkDefault true; services.fprintd.enable = lib.mkDefault true; - + # Override ACPI DSDT to fix the accelerometer. # A driver already exists for a similar sensor. # This overrides the IDs to make the existing driver work. @@ -16,7 +16,7 @@ name = "minisforum-acpi-override"; CPIO_PATH = "kernel/firmware/acpi"; - src = pkgs.callPackage ./src.nix {}; + src = pkgs.callPackage ./src.nix { }; patches = [ ./dsdt.patch ]; nativeBuildInputs = with pkgs; [ diff --git a/morefine/m600/default.nix b/morefine/m600/default.nix index 48790760..a2cae8d8 100644 --- a/morefine/m600/default.nix +++ b/morefine/m600/default.nix @@ -1,4 +1,5 @@ -{ lib, ...}: { +{ lib, ... }: +{ imports = [ ../../common/cpu/amd ../../common/cpu/amd/pstate.nix diff --git a/msi/b350-tomahawk/default.nix b/msi/b350-tomahawk/default.nix index 664c1029..440f32ae 100644 --- a/msi/b350-tomahawk/default.nix +++ b/msi/b350-tomahawk/default.nix @@ -5,5 +5,5 @@ ../../common/pc ]; - boot.kernelModules = ["nct6775"]; + boot.kernelModules = [ "nct6775" ]; } diff --git a/msi/b550-a-pro/default.nix b/msi/b550-a-pro/default.nix index e1070b0e..e1588005 100644 --- a/msi/b550-a-pro/default.nix +++ b/msi/b550-a-pro/default.nix @@ -5,5 +5,5 @@ ../../common/pc ]; - boot.kernelModules = ["nct6683"]; + boot.kernelModules = [ "nct6683" ]; } diff --git a/nxp/common/bsp/imx-atf.nix b/nxp/common/bsp/imx-atf.nix index efd8c43f..3325a13a 100644 --- a/nxp/common/bsp/imx-atf.nix +++ b/nxp/common/bsp/imx-atf.nix @@ -1,7 +1,7 @@ { - buildArmTrustedFirmware , - targetBoard , - fetchgit , + buildArmTrustedFirmware, + targetBoard, + fetchgit, }: { @@ -15,8 +15,11 @@ platform = targetBoard; enableParallelBuilding = true; # To build with tee.bin use extraMakeFlags = [ "bl31 SPD=opteed" ]; - extraMakeFlags = [ "PIE_LDFLAGS=--no-warn-rwx-segments LDFLAGS=--no-warn-rwx-segments" "bl31" ]; - extraMeta.platforms = ["aarch64-linux"]; - filesToInstall = ["build/${targetBoard}/release/bl31.bin"]; + extraMakeFlags = [ + "PIE_LDFLAGS=--no-warn-rwx-segments LDFLAGS=--no-warn-rwx-segments" + "bl31" + ]; + extraMeta.platforms = [ "aarch64-linux" ]; + filesToInstall = [ "build/${targetBoard}/release/bl31.bin" ]; }; } diff --git a/nxp/common/bsp/imx-firmware.nix b/nxp/common/bsp/imx-firmware.nix index 207d7ea2..46e905f8 100644 --- a/nxp/common/bsp/imx-firmware.nix +++ b/nxp/common/bsp/imx-firmware.nix @@ -1,5 +1,5 @@ { - pkgs , + pkgs, targetBoard, }: @@ -47,15 +47,21 @@ pkgs.stdenv.mkDerivation rec { ${firmwareSeco} --auto-accept --force ''; - filesToInstall = [ - "firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/dpfw.bin" - "firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/hdmi?xfw.bin" - ] ++ pkgs.lib.optional ( targetBoard == "imx8qm" ) - ("imx-sc-firmware-${fwScVersion}/mx8qm-mek-scfw-tcm.bin" + " " + - "imx-seco-${fwSecoVersion}/firmware/seco/mx8qmb0-ahab-container.img") - ++ pkgs.lib.optional ( targetBoard == "imx8qxp" ) - ("imx-sc-firmware-${fwScVersion}/mx8qx-mek-scfw-tcm.bin" + " " + - "imx-seco-${fwSecoVersion}/firmware/seco/mx8qxc0-ahab-container.img"); + filesToInstall = + [ + "firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/dpfw.bin" + "firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/hdmi?xfw.bin" + ] + ++ pkgs.lib.optional (targetBoard == "imx8qm") ( + "imx-sc-firmware-${fwScVersion}/mx8qm-mek-scfw-tcm.bin" + + " " + + "imx-seco-${fwSecoVersion}/firmware/seco/mx8qmb0-ahab-container.img" + ) + ++ pkgs.lib.optional (targetBoard == "imx8qxp") ( + "imx-sc-firmware-${fwScVersion}/mx8qx-mek-scfw-tcm.bin" + + " " + + "imx-seco-${fwSecoVersion}/firmware/seco/mx8qxc0-ahab-container.img" + ); installPhase = '' mkdir -p $out diff --git a/nxp/common/bsp/imx-optee-os.nix b/nxp/common/bsp/imx-optee-os.nix index eeef5a85..839d3dcd 100644 --- a/nxp/common/bsp/imx-optee-os.nix +++ b/nxp/common/bsp/imx-optee-os.nix @@ -5,9 +5,9 @@ let pkgsCross = import { - crossSystem = { - config = "aarch64-unknown-linux-gnu"; - }; + crossSystem = { + config = "aarch64-unknown-linux-gnu"; + }; }; outdir = "out/arm-plat-imx/core"; @@ -18,7 +18,7 @@ let in pkgs.stdenv.mkDerivation rec { - + pname = "imx-optee-os"; version = "5.15.32_2.0.0"; diff --git a/nxp/common/bsp/imx-uboot.nix b/nxp/common/bsp/imx-uboot.nix index 25cca39e..c2773f43 100644 --- a/nxp/common/bsp/imx-uboot.nix +++ b/nxp/common/bsp/imx-uboot.nix @@ -1,8 +1,10 @@ -{ pkgs , +{ + pkgs, targetBoard, }: -with pkgs; let +with pkgs; +let inherit buildUBoot; imx8qxp-attrs = { @@ -21,14 +23,25 @@ with pkgs; let patches = [ ../patches/0001-Add-UEFI-boot-for-imx8qm.patch ]; }; - imx8-attrs = if (targetBoard == "imx8qxp") then imx8qxp-attrs - else if (targetBoard == "imx8qm") then imx8qm-attrs - else {}; + imx8-attrs = + if (targetBoard == "imx8qxp") then + imx8qxp-attrs + else if (targetBoard == "imx8qm") then + imx8qm-attrs + else + { }; - inherit (callPackage ./imx-atf.nix { inherit buildArmTrustedFirmware; targetBoard = imx8-attrs.atf; }) armTrustedFirmwareiMX8; + inherit + (callPackage ./imx-atf.nix { + inherit buildArmTrustedFirmware; + targetBoard = imx8-attrs.atf; + }) + armTrustedFirmwareiMX8 + ; imx-firmware = callPackage ./imx-firmware.nix { inherit pkgs targetBoard; }; imx-mkimage = buildPackages.callPackage ./imx-mkimage.nix { inherit pkgs; }; -in { +in +{ ubootImx8 = buildUBoot { version = "2022.04"; src = fetchgit { @@ -41,7 +54,7 @@ in { patches = imx8-attrs.patches; enableParallelBuilding = true; defconfig = "${targetBoard}_mek_defconfig"; - extraMeta.platforms = ["aarch64-linux"]; + extraMeta.platforms = [ "aarch64-linux" ]; preBuildPhases = [ "copyBinaries" ]; copyBinaries = '' @@ -54,10 +67,9 @@ in { cat u-boot.bin head.hash > u-boot-hash.bin dd if=u-boot-hash.bin of=u-boot-atf.bin bs=1K seek=128 ${imx-mkimage} -soc ${imx8-attrs.soc} -rev B0 -append ahab-container.img -c -scfw ${imx8-attrs.scfw} -ap u-boot-atf.bin a35 0x80000000 -out flash.bin - ''; + ''; filesToInstall = [ "flash.bin" ]; }; inherit imx-firmware; } - diff --git a/nxp/common/modules.nix b/nxp/common/modules.nix index 16bf0ca4..e35eb405 100644 --- a/nxp/common/modules.nix +++ b/nxp/common/modules.nix @@ -1,4 +1,5 @@ -{ pkgs, lib, ... }: { +{ pkgs, lib, ... }: +{ nixpkgs.hostPlatform = "aarch64-linux"; boot = { diff --git a/nxp/imx8mp-evk/bsp/imx8mp-atf.nix b/nxp/imx8mp-evk/bsp/imx8mp-atf.nix index a75cec33..a3ac8107 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-atf.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-atf.nix @@ -1,8 +1,17 @@ -{ lib, fetchgit, enable-tee, stdenv, buildPackages, pkgsCross, openssl, }: +{ + lib, + fetchgit, + enable-tee, + stdenv, + buildPackages, + pkgsCross, + openssl, +}: let opteedflag = if enable-tee then "SPD=opteed" else ""; target-board = "imx8mp"; -in stdenv.mkDerivation rec { +in +stdenv.mkDerivation rec { pname = "imx8mp-atf"; version = "lf6.1.55_2.2.0"; platform = target-board; @@ -48,8 +57,7 @@ in stdenv.mkDerivation rec { meta = with lib; { homepage = "https://github.com/nxp-imx/imx-atf"; - description = - "Reference implementation of secure world software for ARMv8-A"; + description = "Reference implementation of secure world software for ARMv8-A"; license = [ licenses.bsd3 ]; maintainers = with maintainers; [ gngram ]; platforms = [ "aarch64-linux" ]; diff --git a/nxp/imx8mp-evk/bsp/imx8mp-boot.nix b/nxp/imx8mp-evk/bsp/imx8mp-boot.nix index b7fec803..8a74f500 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-boot.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-boot.nix @@ -2,26 +2,25 @@ pkgs, enable-tee ? true, }: -with pkgs; let +with pkgs; +let fw-ver = "202006"; - cp-tee = - if enable-tee - then "install -m 0644 ${imx8mp-optee-os}/tee.bin ./iMX8M/tee.bin" - else ""; + cp-tee = if enable-tee then "install -m 0644 ${imx8mp-optee-os}/tee.bin ./iMX8M/tee.bin" else ""; imx8mp-atf = pkgs.callPackage ./imx8mp-atf.nix { inherit enable-tee; }; - imx8mp-firmware = pkgs.callPackage ./imx8mp-firmware.nix {}; - imx8mp-uboot = pkgs.callPackage ./imx8mp-uboot.nix {}; - imx8mp-optee-os = pkgs.callPackage ./imx8mp-optee-os.nix {}; + imx8mp-firmware = pkgs.callPackage ./imx8mp-firmware.nix { }; + imx8mp-uboot = pkgs.callPackage ./imx8mp-uboot.nix { }; + imx8mp-optee-os = pkgs.callPackage ./imx8mp-optee-os.nix { }; src = pkgs.fetchgit { url = "https://github.com/nxp-imx/imx-mkimage.git"; rev = "c4365450fb115d87f245df2864fee1604d97c06a"; sha256 = "sha256-KVIVHwBpAwd1RKy3RrYxGIniE45CDlN5RQTXsMg1Jwk="; }; shortRev = builtins.substring 0 8 src.rev; -in { +in +{ imx8m-boot = pkgs.stdenv.mkDerivation rec { inherit src; name = "imx8mp-mkimage"; diff --git a/nxp/imx8mp-evk/bsp/imx8mp-firmware.nix b/nxp/imx8mp-evk/bsp/imx8mp-firmware.nix index 5dba9c70..361257fb 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-firmware.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-firmware.nix @@ -1,19 +1,19 @@ -{pkgs, ...}: +{ pkgs, ... }: with pkgs; - stdenv.mkDerivation rec { - pname = "imx8mp-firmware"; - version = "8.22"; +stdenv.mkDerivation rec { + pname = "imx8mp-firmware"; + version = "8.22"; - src = pkgs.fetchurl { - url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-${version}.bin"; - sha256 = "sha256-lMi86sVuxQPCMuYU931rvY4Xx9qnHU5lHqj9UDTDA1A="; - }; + src = pkgs.fetchurl { + url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-${version}.bin"; + sha256 = "sha256-lMi86sVuxQPCMuYU931rvY4Xx9qnHU5lHqj9UDTDA1A="; + }; - dontUnpack = true; - dontStrip = true; + dontUnpack = true; + dontStrip = true; - installPhase = '' - ${pkgs.bash}/bin/bash $src --auto-accept --force - mv firmware-imx-${version} $out - ''; - } + installPhase = '' + ${pkgs.bash}/bin/bash $src --auto-accept --force + mv firmware-imx-${version} $out + ''; +} diff --git a/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix b/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix index 70789f11..4119efb1 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix @@ -1,66 +1,67 @@ -{pkgs}: let +{ pkgs }: +let python3 = pkgs.buildPackages.python3; toolchain = pkgs.gcc9Stdenv.cc; binutils = pkgs.gcc9Stdenv.cc.bintools.bintools_bin; cpp = pkgs.gcc; in - pkgs.stdenv.mkDerivation rec { - pname = "imx8mp-optee-os"; - version = "lf-6.1.55-2.2.0"; +pkgs.stdenv.mkDerivation rec { + pname = "imx8mp-optee-os"; + version = "lf-6.1.55-2.2.0"; - nativeBuildInputs = [ - python3 - ]; + nativeBuildInputs = [ + python3 + ]; - enableParallelBuilding = true; + enableParallelBuilding = true; - propagatedBuildInputs = with python3.pkgs; [ - pycryptodomex - pyelftools - cryptography - ]; + propagatedBuildInputs = with python3.pkgs; [ + pycryptodomex + pyelftools + cryptography + ]; - src = pkgs.fetchgit { - url = "https://github.com/nxp-imx/imx-optee-os.git"; - rev = "a303fc80f7c4bd713315687a1fa1d6ed136e78ee"; - sha256 = "sha256-OpyG812DX0c06bRZPKWB2cNu6gtZCOvewDhsKgrGB+s="; - }; + src = pkgs.fetchgit { + url = "https://github.com/nxp-imx/imx-optee-os.git"; + rev = "a303fc80f7c4bd713315687a1fa1d6ed136e78ee"; + sha256 = "sha256-OpyG812DX0c06bRZPKWB2cNu6gtZCOvewDhsKgrGB+s="; + }; - postPatch = '' - substituteInPlace scripts/arm32_sysreg.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' - substituteInPlace scripts/gen_tee_bin.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' - substituteInPlace scripts/pem_to_pub_c.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' - substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ - --replace '/bin/bash' '${pkgs.bash}/bin/bash' - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp - ''; + postPatch = '' + substituteInPlace scripts/arm32_sysreg.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace scripts/gen_tee_bin.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace scripts/pem_to_pub_c.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ + --replace '/bin/bash' '${pkgs.bash}/bin/bash' + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp + ''; - makeFlags = [ - "PLATFORM=imx" - "PLATFORM_FLAVOR=mx8mpevk" - "CFG_ARM64_core=y" - "CFG_TEE_TA_LOG_LEVEL=0" - "CFG_TEE_CORE_LOG_LEVEL=0" - "CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}" - "CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}" - ]; + makeFlags = [ + "PLATFORM=imx" + "PLATFORM_FLAVOR=mx8mpevk" + "CFG_ARM64_core=y" + "CFG_TEE_TA_LOG_LEVEL=0" + "CFG_TEE_CORE_LOG_LEVEL=0" + "CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}" + "CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}" + ]; - installPhase = '' - mkdir -p $out - cp ./out/arm-plat-imx/core/tee-raw.bin $out/tee.bin - ''; - } + installPhase = '' + mkdir -p $out + cp ./out/arm-plat-imx/core/tee-raw.bin $out/tee.bin + ''; +} diff --git a/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix b/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix index c542af22..14586d47 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix @@ -1,90 +1,91 @@ -{ stdenv -, lib -, bison -, dtc -, fetchgit -, flex -, gnutls -, libuuid -, ncurses -, openssl -, which -, perl -, buildPackages +{ + stdenv, + lib, + bison, + dtc, + fetchgit, + flex, + gnutls, + libuuid, + ncurses, + openssl, + which, + perl, + buildPackages, }: let ubsrc = fetchgit { - url = "https://github.com/nxp-imx/uboot-imx.git"; - # tag: "lf-6.1.55-2.2.0" - rev = "49b102d98881fc28af6e0a8af5ea2186c1d90a5f"; - sha256 = "sha256-1j6X82DqezEizeWoSS600XKPNwrQ4yT0vZuUImKAVVA="; - }; + url = "https://github.com/nxp-imx/uboot-imx.git"; + # tag: "lf-6.1.55-2.2.0" + rev = "49b102d98881fc28af6e0a8af5ea2186c1d90a5f"; + sha256 = "sha256-1j6X82DqezEizeWoSS600XKPNwrQ4yT0vZuUImKAVVA="; + }; in - (stdenv.mkDerivation { - pname = "imx8mp-uboot"; - version = "2023.04"; - src = ubsrc; +(stdenv.mkDerivation { + pname = "imx8mp-uboot"; + version = "2023.04"; + src = ubsrc; - postPatch = '' - patchShebangs tools - patchShebangs scripts - ''; + postPatch = '' + patchShebangs tools + patchShebangs scripts + ''; - nativeBuildInputs = [ - bison - flex - openssl - which - ncurses - libuuid - gnutls - openssl - perl - ]; + nativeBuildInputs = [ + bison + flex + openssl + which + ncurses + libuuid + gnutls + openssl + perl + ]; - depsBuildBuild = [ buildPackages.stdenv.cc ]; - hardeningDisable = [ "all" ]; - enableParallelBuilding = true; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + hardeningDisable = [ "all" ]; + enableParallelBuilding = true; - makeFlags = [ - "DTC=${lib.getExe buildPackages.dtc}" - "CROSS_COMPILE=${stdenv.cc.targetPrefix}" - ]; + makeFlags = [ + "DTC=${lib.getExe buildPackages.dtc}" + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" + ]; - extraConfig = '' - CONFIG_USE_BOOTCOMMAND=y - CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x45000000; setenv fdt_addr_r 0x44000000; run distro_bootcmd; " - CONFIG_CMD_BOOTEFI_SELFTEST=y - CONFIG_CMD_BOOTEFI=y - CONFIG_EFI_LOADER=y - CONFIG_BLK=y - CONFIG_PARTITIONS=y - CONFIG_DM_DEVICE_REMOVE=n - CONFIG_CMD_CACHE=y - ''; + extraConfig = '' + CONFIG_USE_BOOTCOMMAND=y + CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x45000000; setenv fdt_addr_r 0x44000000; run distro_bootcmd; " + CONFIG_CMD_BOOTEFI_SELFTEST=y + CONFIG_CMD_BOOTEFI=y + CONFIG_EFI_LOADER=y + CONFIG_BLK=y + CONFIG_PARTITIONS=y + CONFIG_DM_DEVICE_REMOVE=n + CONFIG_CMD_CACHE=y + ''; - passAsFile = [ "extraConfig" ]; + passAsFile = [ "extraConfig" ]; - configurePhase = '' - runHook preConfigure + configurePhase = '' + runHook preConfigure - make imx8mp_evk_defconfig - cat $extraConfigPath >> .config + make imx8mp_evk_defconfig + cat $extraConfigPath >> .config - runHook postConfigure - ''; + runHook postConfigure + ''; - installPhase = '' - runHook preInstall + installPhase = '' + runHook preInstall - mkdir -p $out - cp ./u-boot-nodtb.bin $out - cp ./spl/u-boot-spl.bin $out - cp ./arch/arm/dts/imx8mp-evk.dtb $out - cp .config $out + mkdir -p $out + cp ./u-boot-nodtb.bin $out + cp ./spl/u-boot-spl.bin $out + cp ./arch/arm/dts/imx8mp-evk.dtb $out + cp .config $out - runHook postInstall - ''; + runHook postInstall + ''; - dontStrip = true; - }) + dontStrip = true; +}) diff --git a/nxp/imx8mp-evk/default.nix b/nxp/imx8mp-evk/default.nix index c4ba0505..13ec359a 100644 --- a/nxp/imx8mp-evk/default.nix +++ b/nxp/imx8mp-evk/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ nixpkgs.overlays = [ (import ./overlay.nix) ]; @@ -8,7 +9,7 @@ ]; boot.loader.grub.extraFiles = { - "imx8mp-evk.dtb" = "${pkgs.callPackage ./bsp/imx8mp-linux.nix {}}/dtbs/freescale/imx8mp-evk.dtb"; + "imx8mp-evk.dtb" = "${pkgs.callPackage ./bsp/imx8mp-linux.nix { }}/dtbs/freescale/imx8mp-evk.dtb"; }; hardware.deviceTree = { diff --git a/nxp/imx8mp-evk/modules.nix b/nxp/imx8mp-evk/modules.nix index d53f60d2..ec4e28f7 100644 --- a/nxp/imx8mp-evk/modules.nix +++ b/nxp/imx8mp-evk/modules.nix @@ -2,15 +2,16 @@ pkgs, lib, ... -}: { +}: +{ nixpkgs.hostPlatform = "aarch64-linux"; boot = { - kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/imx8mp-linux.nix {}); + kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/imx8mp-linux.nix { }); initrd.includeDefaultModules = lib.mkForce false; }; - disabledModules = ["profiles/all-hardware.nix"]; + disabledModules = [ "profiles/all-hardware.nix" ]; hardware.deviceTree.enable = true; } diff --git a/nxp/imx8mp-evk/overlay.nix b/nxp/imx8mp-evk/overlay.nix index 7f5d0c71..72166a37 100644 --- a/nxp/imx8mp-evk/overlay.nix +++ b/nxp/imx8mp-evk/overlay.nix @@ -1,3 +1,3 @@ -final: prev: { - inherit (final.callPackage ./bsp/imx8mp-boot.nix {pkgs = final;}) imx8m-boot; +final: _prev: { + inherit (final.callPackage ./bsp/imx8mp-boot.nix { pkgs = final; }) imx8m-boot; } diff --git a/nxp/imx8mq-evk/bsp/imx8mq-atf.nix b/nxp/imx8mq-evk/bsp/imx8mq-atf.nix index a7e86b86..151008bf 100644 --- a/nxp/imx8mq-evk/bsp/imx8mq-atf.nix +++ b/nxp/imx8mq-evk/bsp/imx8mq-atf.nix @@ -1,8 +1,17 @@ -{ lib, fetchgit, enable-tee, stdenv, buildPackages, pkgsCross, openssl, }: +{ + lib, + fetchgit, + enable-tee, + stdenv, + buildPackages, + pkgsCross, + openssl, +}: let opteedflag = if enable-tee then "SPD=opteed" else ""; target-board = "imx8mq"; -in stdenv.mkDerivation rec { +in +stdenv.mkDerivation rec { pname = "imx8mq-atf"; version = "lf6.1.55_2.2.0"; platform = target-board; @@ -48,8 +57,7 @@ in stdenv.mkDerivation rec { meta = with lib; { homepage = "https://github.com/nxp-imx/imx-atf"; - description = - "Reference implementation of secure world software for ARMv8-A"; + description = "Reference implementation of secure world software for ARMv8-A"; license = [ licenses.bsd3 ]; maintainers = with maintainers; [ gngram ]; platforms = [ "aarch64-linux" ]; diff --git a/nxp/imx8mq-evk/bsp/imx8mq-boot.nix b/nxp/imx8mq-evk/bsp/imx8mq-boot.nix index 2b5c246d..f38b3501 100644 --- a/nxp/imx8mq-evk/bsp/imx8mq-boot.nix +++ b/nxp/imx8mq-evk/bsp/imx8mq-boot.nix @@ -2,25 +2,24 @@ pkgs, enable-tee ? false, }: -with pkgs; let - cp-tee = - if enable-tee - then "install -m 0644 ${imx8mq-optee-os}/tee.bin ./iMX8M/tee.bin" - else ""; +with pkgs; +let + cp-tee = if enable-tee then "install -m 0644 ${imx8mq-optee-os}/tee.bin ./iMX8M/tee.bin" else ""; imx8mq-atf = pkgs.callPackage ./imx8mq-atf.nix { inherit enable-tee; }; - imx8mq-firmware = pkgs.callPackage ./imx8mq-firmware.nix {}; - imx8mq-uboot = pkgs.callPackage ./imx8mq-uboot.nix {}; - imx8mq-optee-os = pkgs.callPackage ./imx8mq-optee-os.nix {}; + imx8mq-firmware = pkgs.callPackage ./imx8mq-firmware.nix { }; + imx8mq-uboot = pkgs.callPackage ./imx8mq-uboot.nix { }; + imx8mq-optee-os = pkgs.callPackage ./imx8mq-optee-os.nix { }; src = pkgs.fetchgit { url = "https://github.com/nxp-imx/imx-mkimage.git"; rev = "c4365450fb115d87f245df2864fee1604d97c06a"; sha256 = "sha256-KVIVHwBpAwd1RKy3RrYxGIniE45CDlN5RQTXsMg1Jwk="; }; shortRev = builtins.substring 0 8 src.rev; -in { +in +{ imx8m-boot = pkgs.stdenv.mkDerivation rec { inherit src; name = "imx8mq-mkimage"; diff --git a/nxp/imx8mq-evk/bsp/imx8mq-firmware.nix b/nxp/imx8mq-evk/bsp/imx8mq-firmware.nix index e576f87f..05dba5f3 100644 --- a/nxp/imx8mq-evk/bsp/imx8mq-firmware.nix +++ b/nxp/imx8mq-evk/bsp/imx8mq-firmware.nix @@ -1,19 +1,19 @@ -{pkgs, ...}: +{ pkgs, ... }: with pkgs; - stdenv.mkDerivation rec { - pname = "imx8mq-firmware"; - version = "8.22"; +stdenv.mkDerivation rec { + pname = "imx8mq-firmware"; + version = "8.22"; - src = pkgs.fetchurl { - url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-${version}.bin"; - sha256 = "sha256-lMi86sVuxQPCMuYU931rvY4Xx9qnHU5lHqj9UDTDA1A="; - }; + src = pkgs.fetchurl { + url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-${version}.bin"; + sha256 = "sha256-lMi86sVuxQPCMuYU931rvY4Xx9qnHU5lHqj9UDTDA1A="; + }; - dontUnpack = true; - dontStrip = true; + dontUnpack = true; + dontStrip = true; - installPhase = '' - ${pkgs.bash}/bin/bash $src --auto-accept --force - mv firmware-imx-${version} $out - ''; - } + installPhase = '' + ${pkgs.bash}/bin/bash $src --auto-accept --force + mv firmware-imx-${version} $out + ''; +} diff --git a/nxp/imx8mq-evk/bsp/imx8mq-linux.nix b/nxp/imx8mq-evk/bsp/imx8mq-linux.nix index 8e433b8c..5c2fb535 100644 --- a/nxp/imx8mq-evk/bsp/imx8mq-linux.nix +++ b/nxp/imx8mq-evk/bsp/imx8mq-linux.nix @@ -1,54 +1,56 @@ -{pkgs, ...} @ args: +{ pkgs, ... }@args: with pkgs; - buildLinux (args - // rec { - version = "6.1.55"; - name = "imx8mq-linux"; +buildLinux ( + args + // rec { + version = "6.1.55"; + name = "imx8mq-linux"; - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = version; + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = version; - defconfig = "imx_v8_defconfig"; + defconfig = "imx_v8_defconfig"; - # https://github.com/NixOS/nixpkgs/pull/366004 - # introduced a breaking change that if a module is declared but it is not being used it will faill. - ignoreConfigErrors = true; + # https://github.com/NixOS/nixpkgs/pull/366004 + # introduced a breaking change that if a module is declared but it is not being used it will faill. + ignoreConfigErrors = true; - kernelPatches = [ - ]; + kernelPatches = [ + ]; - autoModules = false; + autoModules = false; - extraConfig = '' - CRYPTO_TLS m - TLS 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 - ''; + extraConfig = '' + CRYPTO_TLS m + TLS 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 + ''; - src = fetchFromGitHub { - owner = "nxp-imx"; - repo = "linux-imx"; - # tag: lf-6.1.55-2.2.0 - rev = "770c5fe2c1d1529fae21b7043911cd50c6cf087e"; - sha256 = "sha256-tIWt75RUrjB6KmUuAYBVyAC1dmVGSUAgqV5ROJh3xU0="; - }; - } - // (args.argsOverride or {})) + src = fetchFromGitHub { + owner = "nxp-imx"; + repo = "linux-imx"; + # tag: lf-6.1.55-2.2.0 + rev = "770c5fe2c1d1529fae21b7043911cd50c6cf087e"; + sha256 = "sha256-tIWt75RUrjB6KmUuAYBVyAC1dmVGSUAgqV5ROJh3xU0="; + }; + } + // (args.argsOverride or { }) +) diff --git a/nxp/imx8mq-evk/bsp/imx8mq-optee-os.nix b/nxp/imx8mq-evk/bsp/imx8mq-optee-os.nix index 4fa6e3e5..73b60a35 100644 --- a/nxp/imx8mq-evk/bsp/imx8mq-optee-os.nix +++ b/nxp/imx8mq-evk/bsp/imx8mq-optee-os.nix @@ -1,66 +1,67 @@ -{pkgs}: let +{ pkgs }: +let python3 = pkgs.buildPackages.python3; toolchain = pkgs.gcc9Stdenv.cc; binutils = pkgs.gcc9Stdenv.cc.bintools.bintools_bin; cpp = pkgs.gcc; in - pkgs.stdenv.mkDerivation rec { - pname = "imx8mq-optee-os"; - version = "lf-6.1.55-2.2.0"; +pkgs.stdenv.mkDerivation rec { + pname = "imx8mq-optee-os"; + version = "lf-6.1.55-2.2.0"; - nativeBuildInputs = [ - python3 - ]; + nativeBuildInputs = [ + python3 + ]; - enableParallelBuilding = true; + enableParallelBuilding = true; - propagatedBuildInputs = with python3.pkgs; [ - pycryptodomex - pyelftools - cryptography - ]; + propagatedBuildInputs = with python3.pkgs; [ + pycryptodomex + pyelftools + cryptography + ]; - src = pkgs.fetchgit { - url = "https://github.com/nxp-imx/imx-optee-os.git"; - rev = "a303fc80f7c4bd713315687a1fa1d6ed136e78ee"; - sha256 = "sha256-OpyG812DX0c06bRZPKWB2cNu6gtZCOvewDhsKgrGB+s="; - }; + src = pkgs.fetchgit { + url = "https://github.com/nxp-imx/imx-optee-os.git"; + rev = "a303fc80f7c4bd713315687a1fa1d6ed136e78ee"; + sha256 = "sha256-OpyG812DX0c06bRZPKWB2cNu6gtZCOvewDhsKgrGB+s="; + }; - postPatch = '' - substituteInPlace scripts/arm32_sysreg.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' - substituteInPlace scripts/gen_tee_bin.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' - substituteInPlace scripts/pem_to_pub_c.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' - substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ - --replace '/bin/bash' '${pkgs.bash}/bin/bash' - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp - ''; + postPatch = '' + substituteInPlace scripts/arm32_sysreg.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace scripts/gen_tee_bin.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace scripts/pem_to_pub_c.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ + --replace '/bin/bash' '${pkgs.bash}/bin/bash' + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp + ''; - makeFlags = [ - "PLATFORM=imx" - "PLATFORM_FLAVOR=mx8mqevk" - "CFG_ARM64_core=y" - "CFG_TEE_TA_LOG_LEVEL=0" - "CFG_TEE_CORE_LOG_LEVEL=0" - "CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}" - "CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}" - ]; + makeFlags = [ + "PLATFORM=imx" + "PLATFORM_FLAVOR=mx8mqevk" + "CFG_ARM64_core=y" + "CFG_TEE_TA_LOG_LEVEL=0" + "CFG_TEE_CORE_LOG_LEVEL=0" + "CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}" + "CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}" + ]; - installPhase = '' - mkdir -p $out - cp ./out/arm-plat-imx/core/tee-raw.bin $out/tee.bin - ''; - } + installPhase = '' + mkdir -p $out + cp ./out/arm-plat-imx/core/tee-raw.bin $out/tee.bin + ''; +} diff --git a/nxp/imx8mq-evk/bsp/imx8mq-uboot.nix b/nxp/imx8mq-evk/bsp/imx8mq-uboot.nix index fbbf92a1..7bb9c2df 100644 --- a/nxp/imx8mq-evk/bsp/imx8mq-uboot.nix +++ b/nxp/imx8mq-evk/bsp/imx8mq-uboot.nix @@ -1,90 +1,91 @@ -{ stdenv -, lib -, bison -, dtc -, fetchgit -, flex -, gnutls -, libuuid -, ncurses -, openssl -, which -, perl -, buildPackages +{ + stdenv, + lib, + bison, + dtc, + fetchgit, + flex, + gnutls, + libuuid, + ncurses, + openssl, + which, + perl, + buildPackages, }: let ubsrc = fetchgit { - url = "https://github.com/nxp-imx/uboot-imx.git"; - # tag: "lf-6.1.55-2.2.0" - rev = "49b102d98881fc28af6e0a8af5ea2186c1d90a5f"; - sha256 = "sha256-1j6X82DqezEizeWoSS600XKPNwrQ4yT0vZuUImKAVVA="; - }; + url = "https://github.com/nxp-imx/uboot-imx.git"; + # tag: "lf-6.1.55-2.2.0" + rev = "49b102d98881fc28af6e0a8af5ea2186c1d90a5f"; + sha256 = "sha256-1j6X82DqezEizeWoSS600XKPNwrQ4yT0vZuUImKAVVA="; + }; in - (stdenv.mkDerivation { - pname = "imx8mq-uboot"; - version = "2023.04"; - src = ubsrc; +(stdenv.mkDerivation { + pname = "imx8mq-uboot"; + version = "2023.04"; + src = ubsrc; - postPatch = '' - patchShebangs tools - patchShebangs scripts - ''; + postPatch = '' + patchShebangs tools + patchShebangs scripts + ''; - nativeBuildInputs = [ - bison - flex - openssl - which - ncurses - libuuid - gnutls - openssl - perl - ]; + nativeBuildInputs = [ + bison + flex + openssl + which + ncurses + libuuid + gnutls + openssl + perl + ]; - depsBuildBuild = [ buildPackages.stdenv.cc ]; - hardeningDisable = [ "all" ]; - enableParallelBuilding = true; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + hardeningDisable = [ "all" ]; + enableParallelBuilding = true; - makeFlags = [ - "DTC=${lib.getExe buildPackages.dtc}" - "CROSS_COMPILE=${stdenv.cc.targetPrefix}" - ]; + makeFlags = [ + "DTC=${lib.getExe buildPackages.dtc}" + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" + ]; - extraConfig = '' - CONFIG_USE_BOOTCOMMAND=y - CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x45000000; setenv fdt_addr_r 0x44000000; run distro_bootcmd; " - CONFIG_CMD_BOOTEFI_SELFTEST=y - CONFIG_CMD_BOOTEFI=y - CONFIG_EFI_LOADER=y - CONFIG_BLK=y - CONFIG_PARTITIONS=y - CONFIG_DM_DEVICE_REMOVE=n - CONFIG_CMD_CACHE=y - ''; + extraConfig = '' + CONFIG_USE_BOOTCOMMAND=y + CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x45000000; setenv fdt_addr_r 0x44000000; run distro_bootcmd; " + CONFIG_CMD_BOOTEFI_SELFTEST=y + CONFIG_CMD_BOOTEFI=y + CONFIG_EFI_LOADER=y + CONFIG_BLK=y + CONFIG_PARTITIONS=y + CONFIG_DM_DEVICE_REMOVE=n + CONFIG_CMD_CACHE=y + ''; - passAsFile = [ "extraConfig" ]; + passAsFile = [ "extraConfig" ]; - configurePhase = '' - runHook preConfigure + configurePhase = '' + runHook preConfigure - make imx8mq_evk_defconfig - cat $extraConfigPath >> .config + make imx8mq_evk_defconfig + cat $extraConfigPath >> .config - runHook postConfigure - ''; + runHook postConfigure + ''; - installPhase = '' - runHook preInstall + installPhase = '' + runHook preInstall - mkdir -p $out - cp ./u-boot-nodtb.bin $out - cp ./spl/u-boot-spl.bin $out - cp ./arch/arm/dts/imx8mq-evk.dtb $out - cp .config $out + mkdir -p $out + cp ./u-boot-nodtb.bin $out + cp ./spl/u-boot-spl.bin $out + cp ./arch/arm/dts/imx8mq-evk.dtb $out + cp .config $out - runHook postInstall - ''; + runHook postInstall + ''; - dontStrip = true; - }) + dontStrip = true; +}) diff --git a/nxp/imx8mq-evk/default.nix b/nxp/imx8mq-evk/default.nix index ca35c269..95504599 100644 --- a/nxp/imx8mq-evk/default.nix +++ b/nxp/imx8mq-evk/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ nixpkgs.overlays = [ (import ./overlay.nix) ]; @@ -8,7 +9,7 @@ ]; boot.loader.grub.extraFiles = { - "imx8mq-evk.dtb" = "${pkgs.callPackage ./bsp/imx8mq-linux.nix {}}/dtbs/freescale/imx8mq-evk.dtb"; + "imx8mq-evk.dtb" = "${pkgs.callPackage ./bsp/imx8mq-linux.nix { }}/dtbs/freescale/imx8mq-evk.dtb"; }; hardware.deviceTree = { diff --git a/nxp/imx8mq-evk/modules.nix b/nxp/imx8mq-evk/modules.nix index 4408bebc..0307d133 100644 --- a/nxp/imx8mq-evk/modules.nix +++ b/nxp/imx8mq-evk/modules.nix @@ -2,15 +2,16 @@ pkgs, lib, ... -}: { +}: +{ nixpkgs.hostPlatform = "aarch64-linux"; boot = { - kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/imx8mq-linux.nix {}); + kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/imx8mq-linux.nix { }); initrd.includeDefaultModules = lib.mkForce false; }; - disabledModules = ["profiles/all-hardware.nix"]; + disabledModules = [ "profiles/all-hardware.nix" ]; hardware.deviceTree.enable = true; } diff --git a/nxp/imx8mq-evk/overlay.nix b/nxp/imx8mq-evk/overlay.nix index 31af2bdc..ea53ce88 100644 --- a/nxp/imx8mq-evk/overlay.nix +++ b/nxp/imx8mq-evk/overlay.nix @@ -1,3 +1,3 @@ -final: prev: { - inherit (final.callPackage ./bsp/imx8mq-boot.nix {pkgs = final;}) imx8m-boot; +final: _prev: { + inherit (final.callPackage ./bsp/imx8mq-boot.nix { pkgs = final; }) imx8m-boot; } diff --git a/nxp/imx8qm-mek/default.nix b/nxp/imx8qm-mek/default.nix index 4974455c..52c8697f 100644 --- a/nxp/imx8qm-mek/default.nix +++ b/nxp/imx8qm-mek/default.nix @@ -10,7 +10,9 @@ ]; boot.loader.grub.extraFiles = { - "imx8qm-mek.dtb" = "${pkgs.callPackage ../common/bsp/linux-imx8.nix { }}/dtbs/freescale/imx8qm-mek.dtb"; + "imx8qm-mek.dtb" = "${ + pkgs.callPackage ../common/bsp/linux-imx8.nix { } + }/dtbs/freescale/imx8qm-mek.dtb"; }; hardware.deviceTree = { diff --git a/nxp/imx8qm-mek/overlay.nix b/nxp/imx8qm-mek/overlay.nix index db250883..12d1d946 100644 --- a/nxp/imx8qm-mek/overlay.nix +++ b/nxp/imx8qm-mek/overlay.nix @@ -1,3 +1,10 @@ -final: prev: { - inherit ( final.callPackage ../common/bsp/imx-uboot.nix { pkgs = final; targetBoard = "imx8qm"; }) ubootImx8 imx-firmware; +final: _prev: { + inherit + (final.callPackage ../common/bsp/imx-uboot.nix { + pkgs = final; + targetBoard = "imx8qm"; + }) + ubootImx8 + imx-firmware + ; } diff --git a/nxp/imx8qxp-mek/overlay.nix b/nxp/imx8qxp-mek/overlay.nix index 21b339d7..bcb344b7 100644 --- a/nxp/imx8qxp-mek/overlay.nix +++ b/nxp/imx8qxp-mek/overlay.nix @@ -1,3 +1,10 @@ -final: prev: { - inherit ( final.callPackage ../common/bsp/imx-uboot.nix { pkgs = final; targetBoard = "imx8qxp"; }) ubootImx8 imx-firmware; +final: _prev: { + inherit + (final.callPackage ../common/bsp/imx-uboot.nix { + pkgs = final; + targetBoard = "imx8qxp"; + }) + ubootImx8 + imx-firmware + ; } diff --git a/olimex/teres_i/default.nix b/olimex/teres_i/default.nix index f72cb1d4..4f2c97d5 100644 --- a/olimex/teres_i/default.nix +++ b/olimex/teres_i/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ...}: +{ lib, pkgs, ... }: { hardware.deviceTree = { @@ -10,12 +10,12 @@ consoleLogLevel = lib.mkDefault 7; kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; - kernelParams = lib.mkDefault ["console=ttyS0,115200n8"]; - extraModulePackages = lib.mkDefault []; + kernelParams = lib.mkDefault [ "console=ttyS0,115200n8" ]; + extraModulePackages = lib.mkDefault [ ]; initrd = { - availableKernelModules = lib.mkDefault ["usbhid"]; - kernelModules = lib.mkDefault []; + availableKernelModules = lib.mkDefault [ "usbhid" ]; + kernelModules = lib.mkDefault [ ]; }; loader = { diff --git a/onenetbook/4/default.nix b/onenetbook/4/default.nix index 251bc651..c0b77f94 100644 --- a/onenetbook/4/default.nix +++ b/onenetbook/4/default.nix @@ -16,7 +16,7 @@ # `hid-multitouch-onenetbook4` is the fixed one, don't use `hid-multitouch`. boot.blacklistedKernelModules = [ "hid-multitouch" ]; boot.extraModulePackages = [ - (config.boot.kernelPackages.callPackage ./goodix-stylus-mastykin {}) + (config.boot.kernelPackages.callPackage ./goodix-stylus-mastykin { }) ]; # OneNetbook 4 has an accelerometer, diff --git a/onenetbook/4/goodix-stylus-mastykin/default.nix b/onenetbook/4/goodix-stylus-mastykin/default.nix index 14c5e5cd..8b81fdb0 100644 --- a/onenetbook/4/goodix-stylus-mastykin/default.nix +++ b/onenetbook/4/goodix-stylus-mastykin/default.nix @@ -1,4 +1,11 @@ -{ stdenv, lib, kernel, fetchpatch, runCommand, patch }: +{ + stdenv, + lib, + kernel, + fetchpatch, + runCommand, + patch, +}: let patch1_original = fetchpatch { @@ -6,24 +13,18 @@ let name = "goodix-stylus-mastykin-1-pen-support.patch"; sha256 = "sha256-1oc8OvfhScYvtsMeV9A4hU+09i59tEJ6HZS6jspsJR8="; }; - patch1_updated_5_12_12 = runCommand - "goodix-stylus-mastykin-1-pen-support-5.12.12.patch" {} - '' - cat ${patch1_original} > $out - ${patch}/bin/patch $out < ${./5.12.12.patch.patch} - ''; - patch1_updated_6_1 = runCommand - "goodix-stylus-mastykin-1-pen-support-6.1.patch" {} - '' - cat ${patch1_original} > $out - ${patch}/bin/patch $out < ${./6.1.patch.patch} - ''; - patch1_updated_6_12 = runCommand - "goodix-stylus-mastykin-1-pen-support-6.12.patch" {} - '' - cat ${patch1_original} > $out - ${patch}/bin/patch $out < ${./6.12.patch.patch} - ''; + patch1_updated_5_12_12 = runCommand "goodix-stylus-mastykin-1-pen-support-5.12.12.patch" { } '' + cat ${patch1_original} > $out + ${patch}/bin/patch $out < ${./5.12.12.patch.patch} + ''; + patch1_updated_6_1 = runCommand "goodix-stylus-mastykin-1-pen-support-6.1.patch" { } '' + cat ${patch1_original} > $out + ${patch}/bin/patch $out < ${./6.1.patch.patch} + ''; + patch1_updated_6_12 = runCommand "goodix-stylus-mastykin-1-pen-support-6.12.patch" { } '' + cat ${patch1_original} > $out + ${patch}/bin/patch $out < ${./6.12.patch.patch} + ''; patch1 = if (lib.versionAtLeast kernel.version "6.12") then patch1_updated_6_12 @@ -31,7 +32,8 @@ let patch1_updated_6_1 else if (lib.versionAtLeast kernel.version "5.12.12") then patch1_updated_5_12_12 - else patch1_original; + else + patch1_original; patch2 = fetchpatch { url = "https://marc.info/?l=linux-input&m=161847127221531&q=p4"; name = "goodix-stylus-mastykin-2-buttons.patch"; @@ -42,11 +44,17 @@ stdenv.mkDerivation rec { name = "hid-multitouch-onenetbook4-${version}"; inherit (kernel) version; - hardeningDisable = [ "pic" "format" ]; + hardeningDisable = [ + "pic" + "format" + ]; nativeBuildInputs = kernel.moduleBuildDependencies; src = ./.; - patches = [ patch1 patch2 ]; + patches = [ + patch1 + patch2 + ]; postUnpack = '' tar -C goodix-stylus-mastykin \ diff --git a/pine64/pinebook-pro/keyboard-updater/default.nix b/pine64/pinebook-pro/keyboard-updater/default.nix index 3138277f..2ed428cf 100644 --- a/pine64/pinebook-pro/keyboard-updater/default.nix +++ b/pine64/pinebook-pro/keyboard-updater/default.nix @@ -1,4 +1,9 @@ -{ stdenv, fetchFromGitHub, xxd, libusb1 }: +{ + stdenv, + fetchFromGitHub, + xxd, + libusb1, +}: stdenv.mkDerivation { pname = "pinebook-pro-keyboard-updater"; diff --git a/pine64/star64/default.nix b/pine64/star64/default.nix index ce7134bd..e286533c 100644 --- a/pine64/star64/default.nix +++ b/pine64/star64/default.nix @@ -1,9 +1,22 @@ -{ config, lib, pkgs, ... }: { - nixpkgs.overlays = [(self: super: { - makeModulesClosure = x: super.makeModulesClosure (x // { - allowMissing = true; - }); - })]; +{ + config, + lib, + pkgs, + ... +}: +{ + nixpkgs.overlays = [ + (_self: super: { + makeModulesClosure = + x: + super.makeModulesClosure ( + x + // { + allowMissing = true; + } + ); + }) + ]; # Somehow ttyS0 doesn't get enabled by default systemd.services."serial-getty@ttyS0".enable = lib.mkDefault true; @@ -12,15 +25,27 @@ boot = { # Force no ZFS (from nixos/modules/profiles/base.nix) until updated to kernel 6.0 # TODO still valid for star64? - supportedFilesystems = - lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; + supportedFilesystems = lib.mkForce [ + "btrfs" + "reiserfs" + "vfat" + "f2fs" + "xfs" + "ntfs" + "cifs" + ]; consoleLogLevel = lib.mkDefault 7; - kernelPackages = lib.mkDefault (pkgs.callPackage ./linux-5.15.nix { - inherit (config.boot) kernelPatches; - }); + kernelPackages = lib.mkDefault ( + pkgs.callPackage ./linux-5.15.nix { + inherit (config.boot) kernelPatches; + } + ); - kernelParams = - lib.mkDefault [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ]; + kernelParams = lib.mkDefault [ + "console=tty0" + "console=ttyS0,115200n8" + "earlycon=sbi" + ]; initrd.availableKernelModules = [ "8250_dw" # serial port driver @@ -39,8 +64,7 @@ }; }; - hardware.deviceTree.name = - lib.mkDefault "starfive/jh7110-pine64-star64.dtb"; + hardware.deviceTree.name = lib.mkDefault "starfive/jh7110-pine64-star64.dtb"; # Only "performance" and "schedutil" are available, # and "performance" takes precedence by default, which is a waste of power. diff --git a/pine64/star64/firmware.nix b/pine64/star64/firmware.nix index e0173a6c..5242f779 100644 --- a/pine64/star64/firmware.nix +++ b/pine64/star64/firmware.nix @@ -1,5 +1,13 @@ -{ callPackage, pkgsBuildHost, writeText, writeShellApplication -, stdenv, dtc, mtdutils, coreutils }: +{ + callPackage, + pkgsBuildHost, + writeText, + writeShellApplication, + stdenv, + dtc, + mtdutils, + coreutils, +}: let uboot = callPackage ./uboot.nix { }; opensbi = callPackage ./opensbi.nix { @@ -37,7 +45,8 @@ let }; }; ''; -in rec { +in +rec { inherit opensbi uboot; spl = stdenv.mkDerivation { name = "pine64-star64-spl"; diff --git a/pine64/star64/linux-5.15.nix b/pine64/star64/linux-5.15.nix index 020af357..28d9adbb 100644 --- a/pine64/star64/linux-5.15.nix +++ b/pine64/star64/linux-5.15.nix @@ -1,237 +1,257 @@ -{ lib, callPackage, linuxPackagesFor, kernelPatches, fetchpatch, ... }: +{ + lib, + callPackage, + linuxPackagesFor, + kernelPatches, + fetchpatch, + ... +}: let modDirVersion = "5.15.131"; - linuxPkg = { lib, fetchFromGitHub, buildLinux, ... }@args: - buildLinux (args // { - version = "${modDirVersion}-fishwaldo-star64"; + linuxPkg = + { + lib, + fetchFromGitHub, + buildLinux, + ... + }@args: + buildLinux ( + args + // { + version = "${modDirVersion}-fishwaldo-star64"; - src = fetchFromGitHub { - owner = "Fishwaldo"; - repo = "Star64_linux"; - rev = "1456c984f15e21e28fb8a9ce96d0ca10e61a71c4"; # Star64_devel branch - hash = "sha256-I5wzmxiY7PWpahYCqTOAmYEiJvpRPpUV7S21Kn9lLwg="; - }; + src = fetchFromGitHub { + owner = "Fishwaldo"; + repo = "Star64_linux"; + rev = "1456c984f15e21e28fb8a9ce96d0ca10e61a71c4"; # Star64_devel branch + hash = "sha256-I5wzmxiY7PWpahYCqTOAmYEiJvpRPpUV7S21Kn9lLwg="; + }; - inherit modDirVersion; - defconfig = "pine64_star64_defconfig"; - kernelPatches = [ - { patch = fetchpatch { - url = "https://github.com/torvalds/linux/commit/215bebc8c6ac438c382a6a56bd2764a2d4e1da72.diff"; - hash = "sha256-1ZqmVOkgcDBRkHvVRPH8I5G1STIS1R/l/63PzQQ0z0I="; - includes = ["security/keys/dh.c"]; - }; - } - { patch = fetchpatch { - url = "https://github.com/starfive-tech/linux/pull/108/commits/9ae8cb751c4d1fd2146b279a8e67887590e9d07a.diff"; - hash = "sha256-EY0lno+HkY5mradBUPII3qqu0xh+BVQRzveCQcaht0M="; - }; - } - { patch = ./irq-desc-to-data.patch; } - ] ++ kernelPatches; + inherit modDirVersion; + defconfig = "pine64_star64_defconfig"; + kernelPatches = [ + { + patch = fetchpatch { + url = "https://github.com/torvalds/linux/commit/215bebc8c6ac438c382a6a56bd2764a2d4e1da72.diff"; + hash = "sha256-1ZqmVOkgcDBRkHvVRPH8I5G1STIS1R/l/63PzQQ0z0I="; + includes = [ "security/keys/dh.c" ]; + }; + } + { + patch = fetchpatch { + url = "https://github.com/starfive-tech/linux/pull/108/commits/9ae8cb751c4d1fd2146b279a8e67887590e9d07a.diff"; + hash = "sha256-EY0lno+HkY5mradBUPII3qqu0xh+BVQRzveCQcaht0M="; + }; + } + { patch = ./irq-desc-to-data.patch; } + ] ++ kernelPatches; - structuredExtraConfig = with lib.kernel; { - # A ton of stuff just does not build. We disable it all. - # Most of it is not important except drm. - # https://github.com/starfive-tech/linux/issues/79 + structuredExtraConfig = with lib.kernel; { + # A ton of stuff just does not build. We disable it all. + # Most of it is not important except drm. + # https://github.com/starfive-tech/linux/issues/79 - # Removed files, re-added to the makefile by accident in - # https://github.com/Fishwaldo/Star64_linux/commit/cd96097d17a494974dfc5e9909476145ab4f09f5 - CRYPTO_RMD128 = no; - CRYPTO_RMD256 = no; - CRYPTO_RMD320 = no; - CRYPTO_TGR192 = no; - CRYPTO_SALSA20 = no; + # Removed files, re-added to the makefile by accident in + # https://github.com/Fishwaldo/Star64_linux/commit/cd96097d17a494974dfc5e9909476145ab4f09f5 + CRYPTO_RMD128 = no; + CRYPTO_RMD256 = no; + CRYPTO_RMD320 = no; + CRYPTO_TGR192 = no; + CRYPTO_SALSA20 = no; - CRYPTO_SM4 = no; # modpost: undefined stuff - CRYPTO_DEV_CCREE = no; # reverse dep of CRYPTO_SM4 - NLS_CODEPAGE_949 = no; - VIDEO_OV5640 = no; # conflicts with starfive VIN_SENSOR_OV5640 + CRYPTO_SM4 = no; # modpost: undefined stuff + CRYPTO_DEV_CCREE = no; # reverse dep of CRYPTO_SM4 + NLS_CODEPAGE_949 = no; + VIDEO_OV5640 = no; # conflicts with starfive VIN_SENSOR_OV5640 - DRM_IMG = no; - DRM_IMG_ROGUE = no; - DRM_VERISILICON = no; + DRM_IMG = no; + DRM_IMG_ROGUE = no; + DRM_VERISILICON = no; - # brute force disable drm - CEC_CORE = no; - CEC_NOTIFIER = no; - DRM = lib.mkForce no; - DRM_MIPI_DBI = no; - DRM_MIPI_DSI = no; - DRM_DP_AUX_BUS = no; - DRM_DP_AUX_CHARDEV = lib.mkForce no; - DRM_KMS_HELPER = no; - DRM_FBDEV_EMULATION = lib.mkForce no; - DRM_LOAD_EDID_FIRMWARE = lib.mkForce no; - DRM_TTM = no; - DRM_VRAM_HELPER = no; - DRM_TTM_HELPER = no; - DRM_GEM_CMA_HELPER = no; - DRM_KMS_CMA_HELPER = no; - DRM_GEM_SHMEM_HELPER = no; - DRM_SCHED = no; - DRM_I2C_CH7006 = no; - DRM_I2C_SIL164 = no; - DRM_I2C_NXP_TDA998X = no; # https://github.com/starfive-tech/linux/pull/86 - DRM_I2C_NXP_TDA9950 = no; - DRM_KOMEDA = no; - DRM_RADEON = no; - DRM_AMDGPU = no; - DRM_AMDGPU_SI = lib.mkForce no; - DRM_AMDGPU_CIK = lib.mkForce no; - DRM_AMDGPU_USERPTR = lib.mkForce no; - DRM_AMD_DC = no; - DRM_AMD_DC_HDCP = lib.mkForce no; - DRM_AMD_DC_SI = lib.mkForce no; - DRM_NOUVEAU = no; - NOUVEAU_LEGACY_CTX_SUPPORT = no; - DRM_NOUVEAU_BACKLIGHT = no; - DRM_VGEM = no; - DRM_VKMS = no; - DRM_UDL = no; - DRM_AST = no; - DRM_MGAG200 = no; - DRM_RCAR_DW_HDMI = no; - DRM_QXL = no; - DRM_VIRTIO_GPU = no; - DRM_PANEL = no; - DRM_PANEL_ABT_Y030XX067A = no; - DRM_PANEL_ARM_VERSATILE = no; - DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 = no; - DRM_PANEL_BOE_HIMAX8279D = no; - DRM_PANEL_BOE_TV101WUM_NL6 = no; - DRM_PANEL_DSI_CM = no; - DRM_PANEL_LVDS = no; - DRM_PANEL_SIMPLE = no; - DRM_PANEL_ELIDA_KD35T133 = no; - DRM_PANEL_FEIXIN_K101_IM2BA02 = no; - DRM_PANEL_FEIYANG_FY07024DI26A30D = no; - DRM_PANEL_ILITEK_IL9322 = no; - DRM_PANEL_ILITEK_ILI9341 = no; - DRM_PANEL_ILITEK_ILI9881C = no; - DRM_PANEL_INNOLUX_EJ030NA = no; - DRM_PANEL_INNOLUX_P079ZCA = no; - DRM_PANEL_JDI_LT070ME05000 = no; - DRM_PANEL_KHADAS_TS050 = no; - DRM_PANEL_KINGDISPLAY_KD097D04 = no; - DRM_PANEL_LEADTEK_LTK050H3146W = no; - DRM_PANEL_LEADTEK_LTK500HD1829 = no; - DRM_PANEL_SAMSUNG_LD9040 = no; - DRM_PANEL_LG_LB035Q02 = no; - DRM_PANEL_LG_LG4573 = no; - DRM_PANEL_NEC_NL8048HL11 = no; - DRM_PANEL_NOVATEK_NT35510 = no; - DRM_PANEL_NOVATEK_NT36672A = no; - DRM_PANEL_NOVATEK_NT39016 = no; - DRM_PANEL_MANTIX_MLAF057WE51 = no; - DRM_PANEL_OLIMEX_LCD_OLINUXINO = no; - DRM_PANEL_ORISETECH_OTM8009A = no; - DRM_PANEL_OSD_OSD101T2587_53TS = no; - DRM_PANEL_PANASONIC_VVX10F034N00 = no; - DRM_PANEL_RASPBERRYPI_TOUCHSCREEN = no; - DRM_PANEL_RAYDIUM_RM67191 = no; - DRM_PANEL_RAYDIUM_RM68200 = no; - DRM_PANEL_RONBO_RB070D30 = no; - DRM_PANEL_SAMSUNG_ATNA33XC20 = no; - DRM_PANEL_SAMSUNG_DB7430 = no; - DRM_PANEL_SAMSUNG_S6D16D0 = no; - DRM_PANEL_SAMSUNG_S6E3HA2 = no; - DRM_PANEL_SAMSUNG_S6E63J0X03 = no; - DRM_PANEL_SAMSUNG_S6E63M0 = no; - DRM_PANEL_SAMSUNG_S6E63M0_SPI = no; - DRM_PANEL_SAMSUNG_S6E63M0_DSI = no; - DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 = no; - DRM_PANEL_SAMSUNG_S6E8AA0 = no; - DRM_PANEL_SAMSUNG_SOFEF00 = no; - DRM_PANEL_SEIKO_43WVF1G = no; - DRM_PANEL_SHARP_LQ101R1SX01 = no; - DRM_PANEL_SHARP_LS037V7DW01 = no; - DRM_PANEL_SHARP_LS043T1LE01 = no; - DRM_PANEL_SITRONIX_ST7701 = no; - DRM_PANEL_SITRONIX_ST7703 = no; - DRM_PANEL_SITRONIX_ST7789V = no; - DRM_PANEL_SONY_ACX565AKM = no; - DRM_PANEL_TDO_TL070WSH30 = no; - DRM_PANEL_TPO_TD028TTEC1 = no; - DRM_PANEL_TPO_TD043MTEA1 = no; - DRM_PANEL_TPO_TPG110 = no; - DRM_PANEL_TRULY_NT35597_WQXGA = no; - DRM_PANEL_VISIONOX_RM69299 = no; - DRM_PANEL_WIDECHIPS_WS2401 = no; - DRM_PANEL_XINPENG_XPP055C272 = no; - DRM_BRIDGE = no; - DRM_PANEL_BRIDGE = no; - DRM_CDNS_DSI = no; - DRM_CHIPONE_ICN6211 = no; - DRM_CHRONTEL_CH7033 = no; - DRM_DISPLAY_CONNECTOR = no; - DRM_LONTIUM_LT8912B = no; - DRM_LONTIUM_LT9611 = no; - DRM_LONTIUM_LT9611UXC = no; - DRM_ITE_IT66121 = no; - DRM_LVDS_CODEC = no; - DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW = no; - DRM_NWL_MIPI_DSI = no; - DRM_NXP_PTN3460 = no; - DRM_PARADE_PS8622 = no; - DRM_PARADE_PS8640 = no; - DRM_SIL_SII8620 = no; - DRM_SII902X = no; - DRM_SII9234 = no; - DRM_SIMPLE_BRIDGE = no; - DRM_THINE_THC63LVD1024 = no; - DRM_TOSHIBA_TC358762 = no; - DRM_TOSHIBA_TC358764 = no; - DRM_TOSHIBA_TC358767 = no; - DRM_TOSHIBA_TC358768 = no; - DRM_TOSHIBA_TC358775 = no; - DRM_TI_TFP410 = no; - DRM_TI_SN65DSI83 = no; - DRM_TI_SN65DSI86 = no; - DRM_TI_TPD12S015 = no; - DRM_ANALOGIX_ANX6345 = no; - DRM_ANALOGIX_ANX78XX = no; - DRM_ANALOGIX_DP = no; - DRM_ANALOGIX_ANX7625 = no; - DRM_I2C_ADV7511 = no; - DRM_I2C_ADV7511_CEC = no; - DRM_CDNS_MHDP8546 = no; - DRM_DW_HDMI = no; - DRM_DW_HDMI_AHB_AUDIO = no; - DRM_DW_HDMI_I2S_AUDIO = no; - DRM_DW_HDMI_CEC = no; - DRM_ETNAVIV = no; - DRM_ETNAVIV_THERMAL = no; - DRM_MXS = no; - DRM_MXSFB = no; - DRM_ARCPGU = no; - DRM_BOCHS = no; - DRM_CIRRUS_QEMU = no; - DRM_GM12U320 = no; - TINYDRM_HX8357D = no; - TINYDRM_ILI9225 = no; - TINYDRM_ILI9341 = no; - TINYDRM_ILI9486 = no; - TINYDRM_MI0283QT = no; - TINYDRM_REPAPER = no; - TINYDRM_ST7586 = no; - TINYDRM_ST7735R = no; - DRM_GUD = no; - DRM_LEGACY = no; - DRM_TDFX = no; - DRM_R128 = no; - DRM_MGA = no; - DRM_VIA = no; - DRM_SAVAGE = no; - VIDEOMODE_HELPERS = no; - SND_PCM_ELD = no; - SND_PCM_IEC958 = no; - SND_HDA_COMPONENT = no; - SND_SOC_HDMI_CODEC = no; - VIRTIO_DMA_SHARED_BUFFER = no; - }; + # brute force disable drm + CEC_CORE = no; + CEC_NOTIFIER = no; + DRM = lib.mkForce no; + DRM_MIPI_DBI = no; + DRM_MIPI_DSI = no; + DRM_DP_AUX_BUS = no; + DRM_DP_AUX_CHARDEV = lib.mkForce no; + DRM_KMS_HELPER = no; + DRM_FBDEV_EMULATION = lib.mkForce no; + DRM_LOAD_EDID_FIRMWARE = lib.mkForce no; + DRM_TTM = no; + DRM_VRAM_HELPER = no; + DRM_TTM_HELPER = no; + DRM_GEM_CMA_HELPER = no; + DRM_KMS_CMA_HELPER = no; + DRM_GEM_SHMEM_HELPER = no; + DRM_SCHED = no; + DRM_I2C_CH7006 = no; + DRM_I2C_SIL164 = no; + DRM_I2C_NXP_TDA998X = no; # https://github.com/starfive-tech/linux/pull/86 + DRM_I2C_NXP_TDA9950 = no; + DRM_KOMEDA = no; + DRM_RADEON = no; + DRM_AMDGPU = no; + DRM_AMDGPU_SI = lib.mkForce no; + DRM_AMDGPU_CIK = lib.mkForce no; + DRM_AMDGPU_USERPTR = lib.mkForce no; + DRM_AMD_DC = no; + DRM_AMD_DC_HDCP = lib.mkForce no; + DRM_AMD_DC_SI = lib.mkForce no; + DRM_NOUVEAU = no; + NOUVEAU_LEGACY_CTX_SUPPORT = no; + DRM_NOUVEAU_BACKLIGHT = no; + DRM_VGEM = no; + DRM_VKMS = no; + DRM_UDL = no; + DRM_AST = no; + DRM_MGAG200 = no; + DRM_RCAR_DW_HDMI = no; + DRM_QXL = no; + DRM_VIRTIO_GPU = no; + DRM_PANEL = no; + DRM_PANEL_ABT_Y030XX067A = no; + DRM_PANEL_ARM_VERSATILE = no; + DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 = no; + DRM_PANEL_BOE_HIMAX8279D = no; + DRM_PANEL_BOE_TV101WUM_NL6 = no; + DRM_PANEL_DSI_CM = no; + DRM_PANEL_LVDS = no; + DRM_PANEL_SIMPLE = no; + DRM_PANEL_ELIDA_KD35T133 = no; + DRM_PANEL_FEIXIN_K101_IM2BA02 = no; + DRM_PANEL_FEIYANG_FY07024DI26A30D = no; + DRM_PANEL_ILITEK_IL9322 = no; + DRM_PANEL_ILITEK_ILI9341 = no; + DRM_PANEL_ILITEK_ILI9881C = no; + DRM_PANEL_INNOLUX_EJ030NA = no; + DRM_PANEL_INNOLUX_P079ZCA = no; + DRM_PANEL_JDI_LT070ME05000 = no; + DRM_PANEL_KHADAS_TS050 = no; + DRM_PANEL_KINGDISPLAY_KD097D04 = no; + DRM_PANEL_LEADTEK_LTK050H3146W = no; + DRM_PANEL_LEADTEK_LTK500HD1829 = no; + DRM_PANEL_SAMSUNG_LD9040 = no; + DRM_PANEL_LG_LB035Q02 = no; + DRM_PANEL_LG_LG4573 = no; + DRM_PANEL_NEC_NL8048HL11 = no; + DRM_PANEL_NOVATEK_NT35510 = no; + DRM_PANEL_NOVATEK_NT36672A = no; + DRM_PANEL_NOVATEK_NT39016 = no; + DRM_PANEL_MANTIX_MLAF057WE51 = no; + DRM_PANEL_OLIMEX_LCD_OLINUXINO = no; + DRM_PANEL_ORISETECH_OTM8009A = no; + DRM_PANEL_OSD_OSD101T2587_53TS = no; + DRM_PANEL_PANASONIC_VVX10F034N00 = no; + DRM_PANEL_RASPBERRYPI_TOUCHSCREEN = no; + DRM_PANEL_RAYDIUM_RM67191 = no; + DRM_PANEL_RAYDIUM_RM68200 = no; + DRM_PANEL_RONBO_RB070D30 = no; + DRM_PANEL_SAMSUNG_ATNA33XC20 = no; + DRM_PANEL_SAMSUNG_DB7430 = no; + DRM_PANEL_SAMSUNG_S6D16D0 = no; + DRM_PANEL_SAMSUNG_S6E3HA2 = no; + DRM_PANEL_SAMSUNG_S6E63J0X03 = no; + DRM_PANEL_SAMSUNG_S6E63M0 = no; + DRM_PANEL_SAMSUNG_S6E63M0_SPI = no; + DRM_PANEL_SAMSUNG_S6E63M0_DSI = no; + DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 = no; + DRM_PANEL_SAMSUNG_S6E8AA0 = no; + DRM_PANEL_SAMSUNG_SOFEF00 = no; + DRM_PANEL_SEIKO_43WVF1G = no; + DRM_PANEL_SHARP_LQ101R1SX01 = no; + DRM_PANEL_SHARP_LS037V7DW01 = no; + DRM_PANEL_SHARP_LS043T1LE01 = no; + DRM_PANEL_SITRONIX_ST7701 = no; + DRM_PANEL_SITRONIX_ST7703 = no; + DRM_PANEL_SITRONIX_ST7789V = no; + DRM_PANEL_SONY_ACX565AKM = no; + DRM_PANEL_TDO_TL070WSH30 = no; + DRM_PANEL_TPO_TD028TTEC1 = no; + DRM_PANEL_TPO_TD043MTEA1 = no; + DRM_PANEL_TPO_TPG110 = no; + DRM_PANEL_TRULY_NT35597_WQXGA = no; + DRM_PANEL_VISIONOX_RM69299 = no; + DRM_PANEL_WIDECHIPS_WS2401 = no; + DRM_PANEL_XINPENG_XPP055C272 = no; + DRM_BRIDGE = no; + DRM_PANEL_BRIDGE = no; + DRM_CDNS_DSI = no; + DRM_CHIPONE_ICN6211 = no; + DRM_CHRONTEL_CH7033 = no; + DRM_DISPLAY_CONNECTOR = no; + DRM_LONTIUM_LT8912B = no; + DRM_LONTIUM_LT9611 = no; + DRM_LONTIUM_LT9611UXC = no; + DRM_ITE_IT66121 = no; + DRM_LVDS_CODEC = no; + DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW = no; + DRM_NWL_MIPI_DSI = no; + DRM_NXP_PTN3460 = no; + DRM_PARADE_PS8622 = no; + DRM_PARADE_PS8640 = no; + DRM_SIL_SII8620 = no; + DRM_SII902X = no; + DRM_SII9234 = no; + DRM_SIMPLE_BRIDGE = no; + DRM_THINE_THC63LVD1024 = no; + DRM_TOSHIBA_TC358762 = no; + DRM_TOSHIBA_TC358764 = no; + DRM_TOSHIBA_TC358767 = no; + DRM_TOSHIBA_TC358768 = no; + DRM_TOSHIBA_TC358775 = no; + DRM_TI_TFP410 = no; + DRM_TI_SN65DSI83 = no; + DRM_TI_SN65DSI86 = no; + DRM_TI_TPD12S015 = no; + DRM_ANALOGIX_ANX6345 = no; + DRM_ANALOGIX_ANX78XX = no; + DRM_ANALOGIX_DP = no; + DRM_ANALOGIX_ANX7625 = no; + DRM_I2C_ADV7511 = no; + DRM_I2C_ADV7511_CEC = no; + DRM_CDNS_MHDP8546 = no; + DRM_DW_HDMI = no; + DRM_DW_HDMI_AHB_AUDIO = no; + DRM_DW_HDMI_I2S_AUDIO = no; + DRM_DW_HDMI_CEC = no; + DRM_ETNAVIV = no; + DRM_ETNAVIV_THERMAL = no; + DRM_MXS = no; + DRM_MXSFB = no; + DRM_ARCPGU = no; + DRM_BOCHS = no; + DRM_CIRRUS_QEMU = no; + DRM_GM12U320 = no; + TINYDRM_HX8357D = no; + TINYDRM_ILI9225 = no; + TINYDRM_ILI9341 = no; + TINYDRM_ILI9486 = no; + TINYDRM_MI0283QT = no; + TINYDRM_REPAPER = no; + TINYDRM_ST7586 = no; + TINYDRM_ST7735R = no; + DRM_GUD = no; + DRM_LEGACY = no; + DRM_TDFX = no; + DRM_R128 = no; + DRM_MGA = no; + DRM_VIA = no; + DRM_SAVAGE = no; + VIDEOMODE_HELPERS = no; + SND_PCM_ELD = no; + SND_PCM_IEC958 = no; + SND_HDA_COMPONENT = no; + SND_SOC_HDMI_CODEC = no; + VIRTIO_DMA_SHARED_BUFFER = no; + }; - extraMeta.branch = "Star64_devel"; - } // (args.argsOverride or { })); + extraMeta.branch = "Star64_devel"; + } + // (args.argsOverride or { }) + ); -in lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg { })) +in +lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg { })) diff --git a/pine64/star64/opensbi.nix b/pine64/star64/opensbi.nix index 5b46fec6..e9a79129 100644 --- a/pine64/star64/opensbi.nix +++ b/pine64/star64/opensbi.nix @@ -1,14 +1,18 @@ -{ opensbi, withPayload, withFDT }: +{ + opensbi, + withPayload, + withFDT, +}: (opensbi.override { inherit withPayload withFDT; -}).overrideAttrs (attrs: { - makeFlags = attrs.makeFlags ++ [ - # opensbi generic platform default FW_TEXT_START is 0x80000000 - # For JH7110, need to specify the FW_TEXT_START to 0x40000000 - # Otherwise, the fw_payload.bin downloading via jtag will not run. - # https://github.com/starfive-tech/VisionFive2/blob/7733673d27052dc5a48f1cb1d060279dfa3f0241/Makefile#L274 - "FW_TEXT_START=0x40000000" - ]; -}) - +}).overrideAttrs + (attrs: { + makeFlags = attrs.makeFlags ++ [ + # opensbi generic platform default FW_TEXT_START is 0x80000000 + # For JH7110, need to specify the FW_TEXT_START to 0x40000000 + # Otherwise, the fw_payload.bin downloading via jtag will not run. + # https://github.com/starfive-tech/VisionFive2/blob/7733673d27052dc5a48f1cb1d060279dfa3f0241/Makefile#L274 + "FW_TEXT_START=0x40000000" + ]; + }) diff --git a/pine64/star64/sd-image.nix b/pine64/star64/sd-image.nix index 07d00ae8..e76b0c03 100644 --- a/pine64/star64/sd-image.nix +++ b/pine64/star64/sd-image.nix @@ -1,7 +1,14 @@ -{ config, pkgs, modulesPath, ... }: +{ + config, + pkgs, + modulesPath, + ... +}: -let firmware = pkgs.callPackage ./firmware.nix { }; -in { +let + firmware = pkgs.callPackage ./firmware.nix { }; +in +{ imports = [ "${modulesPath}/profiles/base.nix" "${modulesPath}/installer/sd-card/sd-image.nix" @@ -9,8 +16,7 @@ in { ]; sdImage = { - imageName = - "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}-pine64-star64.img"; + imageName = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}-pine64-star64.img"; # Overridden by postBuildCommands populateFirmwareCommands = ""; diff --git a/pine64/star64/spl-tool.nix b/pine64/star64/spl-tool.nix index 6b91a36e..0f1f8df9 100644 --- a/pine64/star64/spl-tool.nix +++ b/pine64/star64/spl-tool.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub }: -stdenv.mkDerivation rec{ +stdenv.mkDerivation rec { pname = "spi_tool"; version = "unstable-2023-04-14"; src = fetchFromGitHub { diff --git a/purism/librem/5r4/audio.nix b/purism/librem/5r4/audio.nix index 8c8b00b9..9c49fa7a 100644 --- a/purism/librem/5r4/audio.nix +++ b/purism/librem/5r4/audio.nix @@ -1,13 +1,14 @@ -{ config -, lib -, pkgs -, ... -}: { +{ + config, + lib, + pkgs, + ... +}: +{ config = - lib.mkIf config.hardware.librem5.audio - { - services.dbus.packages = [ pkgs.callaudiod ]; - } + lib.mkIf config.hardware.librem5.audio { + services.dbus.packages = [ pkgs.callaudiod ]; + } // ( let paConfig = { @@ -18,24 +19,25 @@ ''; }; in - if lib.versionOlder (lib.versions.majorMinor lib.version) "25.05" - then { - assertions = [ - { - assertion = config.hardware.pulseaudio.enable; - message = "Call audio on Librem5 requires pulse audio to be enabled through `hardware.pulseaudio.enable`."; - } - ]; - hardware.pulseaudio = paConfig; - } - else { - assertions = [ - { - assertion = config.services.pulseaudio.enable; - message = "Call audio on Librem5 requires pulse audio to be enabled through `services.pulseaudio.enable`."; - } - ]; - services.pulseaudio = paConfig; - } + if lib.versionOlder (lib.versions.majorMinor lib.version) "25.05" then + { + assertions = [ + { + assertion = config.hardware.pulseaudio.enable; + message = "Call audio on Librem5 requires pulse audio to be enabled through `hardware.pulseaudio.enable`."; + } + ]; + hardware.pulseaudio = paConfig; + } + else + { + assertions = [ + { + assertion = config.services.pulseaudio.enable; + message = "Call audio on Librem5 requires pulse audio to be enabled through `services.pulseaudio.enable`."; + } + ]; + services.pulseaudio = paConfig; + } ); } diff --git a/purism/librem/5r4/default.nix b/purism/librem/5r4/default.nix index 339b43b3..33eeefdd 100644 --- a/purism/librem/5r4/default.nix +++ b/purism/librem/5r4/default.nix @@ -1,9 +1,15 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let cfg = config.hardware.librem5; linuxPackages_librem5 = pkgs.linuxPackagesFor (pkgs.callPackage ./kernel.nix { }); ubootLibrem5 = pkgs.callPackage ./u-boot { }; -in { +in +{ options = { hardware.librem5 = { package = lib.mkOption { @@ -11,7 +17,11 @@ in { default = pkgs.callPackage ./librem5-base { }; }; wifiCard = lib.mkOption { - type = lib.types.enum [ "redpine" "sparklan" "none" ]; + type = lib.types.enum [ + "redpine" + "sparklan" + "none" + ]; description = '' Which wi-fi card is installed in your phone. diff --git a/purism/librem/5r4/kernel.nix b/purism/librem/5r4/kernel.nix index 0ffbb3d3..9e42a586 100644 --- a/purism/librem/5r4/kernel.nix +++ b/purism/librem/5r4/kernel.nix @@ -1,28 +1,31 @@ -{ lib -, buildLinux -, fetchFromGitLab -, ... -} @ args: -buildLinux (args +{ + lib, + buildLinux, + fetchFromGitLab, + ... +}@args: +buildLinux ( + args // rec { - defconfig = "librem5_defconfig"; - version = "6.6.74-librem5"; - modDirVersion = version; - src = fetchFromGitLab { - domain = "source.puri.sm"; - owner = "Librem5"; - repo = "linux"; - rev = "pureos/6.6.74pureos1"; - hash = "sha256-qUPY+2fHVu7SFc+Uf8U7QtkQJJsE/4I1SavpLqJ/34c="; - }; - kernelPatches = [ ]; - # see https://github.com/NixOS/nixpkgs/pull/366004 - ignoreConfigErrors = true; + defconfig = "librem5_defconfig"; + version = "6.6.74-librem5"; + modDirVersion = version; + src = fetchFromGitLab { + domain = "source.puri.sm"; + owner = "Librem5"; + repo = "linux"; + rev = "pureos/6.6.74pureos1"; + hash = "sha256-qUPY+2fHVu7SFc+Uf8U7QtkQJJsE/4I1SavpLqJ/34c="; + }; + kernelPatches = [ ]; + # see https://github.com/NixOS/nixpkgs/pull/366004 + ignoreConfigErrors = true; - structuredExtraConfig = with lib.kernel; { - # buildLinux overrides this and defaults to 32, so go back to the value defined librem5_defconfig - # this is required for millipixels to take photos, otherwise the VIDIOC_REQ_BUFS ioctl returns ENOMEM - CMA_SIZE_MBYTES = lib.mkForce (freeform "320"); - }; -} - // args.argsOverride or { }) + structuredExtraConfig = with lib.kernel; { + # buildLinux overrides this and defaults to 32, so go back to the value defined librem5_defconfig + # this is required for millipixels to take photos, otherwise the VIDIOC_REQ_BUFS ioctl returns ENOMEM + CMA_SIZE_MBYTES = lib.mkForce (freeform "320"); + }; + } + // args.argsOverride or { } +) diff --git a/purism/librem/5r4/librem5-base/default.nix b/purism/librem/5r4/librem5-base/default.nix index da9a39e2..5ad48597 100644 --- a/purism/librem/5r4/librem5-base/default.nix +++ b/purism/librem/5r4/librem5-base/default.nix @@ -1,4 +1,10 @@ -{ stdenv, fetchFromGitLab, shellcheck, kmod, lib }: +{ + stdenv, + fetchFromGitLab, + shellcheck, + kmod, + lib, +}: stdenv.mkDerivation { pname = "librem5-base"; version = "unstable"; diff --git a/purism/librem/5r4/lockdown-fix.nix b/purism/librem/5r4/lockdown-fix.nix index 121ded30..08ee137f 100644 --- a/purism/librem/5r4/lockdown-fix.nix +++ b/purism/librem/5r4/lockdown-fix.nix @@ -1,4 +1,9 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: lib.mkIf config.hardware.librem5.lockdownFix { # We blacklist the drivers so they don't load during early boot when the sensors are disconnected, boot.blacklistedKernelModules = [ @@ -17,10 +22,10 @@ lib.mkIf config.hardware.librem5.lockdownFix { }; # udev rules from librem5-base handle going into "lockdown mode" and back. - assertions = [{ - assertion = with config.hardware.librem5; - lockdownFix -> installUdevPackages; - message = - "'hardware.librem5.lockdownFix' requires 'hardware.librem5.installUdevPackages', but it is not enabled."; - }]; + assertions = [ + { + assertion = with config.hardware.librem5; lockdownFix -> installUdevPackages; + message = "'hardware.librem5.lockdownFix' requires 'hardware.librem5.installUdevPackages', but it is not enabled."; + } + ]; } diff --git a/purism/librem/5r4/u-boot/default.nix b/purism/librem/5r4/u-boot/default.nix index a6b00a79..43dcee43 100644 --- a/purism/librem/5r4/u-boot/default.nix +++ b/purism/librem/5r4/u-boot/default.nix @@ -1,4 +1,12 @@ -{ stdenv, gcc11Stdenv, buildUBoot, fetchurl, fetchFromGitLab, lib, bison }: +{ + stdenv, + gcc11Stdenv, + buildUBoot, + fetchurl, + fetchFromGitLab, + lib, + bison, +}: let firmware-imx = stdenv.mkDerivation (fa: { pname = "firmware-imx"; @@ -20,7 +28,7 @@ let meta.license = lib.licenses.unfree; }); - arm-trusted-firmware-imx8mq = gcc11Stdenv.mkDerivation (fa: { + arm-trusted-firmware-imx8mq = gcc11Stdenv.mkDerivation (_fa: { pname = "arm-trusted-firmware-bl31"; version = "unstable-2020-07-08"; src = fetchFromGitLab { @@ -33,7 +41,10 @@ let enableParallelBuilding = true; hardeningDisable = [ "all" ]; NIX_LDFLAGS = "--no-warn-rwx-segments"; - buildFlags = [ "PLAT=imx8mq" "bl31" ]; + buildFlags = [ + "PLAT=imx8mq" + "bl31" + ]; installPhase = '' mkdir -p $out cp build/imx8mq/release/bl31.bin $out @@ -51,7 +62,7 @@ let rev = "956aa590c93977992743b41c45d3c7ee5a024915"; # this is the latest commit on the upstream/librem5 branch hash = "sha256-MsIIlarN+WFFEzc0ptLAgS7BwJ6Cosy42xo0EwPn1AU="; }; - patches = []; + patches = [ ]; BL31 = "${arm-trusted-firmware-imx8mq}/bl31.bin"; preConfigure = '' cp $BL31 . diff --git a/radxa/default.nix b/radxa/default.nix index fb311df7..e687ff88 100644 --- a/radxa/default.nix +++ b/radxa/default.nix @@ -1,11 +1,13 @@ -{ lib -, pkgs -, config -, ... +{ + lib, + pkgs, + config, + ... }: let cfg = config.hardware.radxa; -in { +in +{ options.hardware.radxa = { enable = lib.mkEnableOption "Radxa system support"; }; diff --git a/radxa/disko.nix b/radxa/disko.nix index 30c30a97..739f4575 100644 --- a/radxa/disko.nix +++ b/radxa/disko.nix @@ -1,11 +1,10 @@ -{ lib -, pkgs -, config -, ... +{ + lib, + pkgs, + config, + ... }: -let - cfg = config.hardware.radxa; -in { +{ imports = [ ../rockchip/disko.nix ]; diff --git a/radxa/rock-4c-plus/default.nix b/radxa/rock-4c-plus/default.nix index e432dd74..956fc546 100644 --- a/radxa/rock-4c-plus/default.nix +++ b/radxa/rock-4c-plus/default.nix @@ -1,8 +1,10 @@ -{ lib -, pkgs -, config -, ... -}: { +{ + lib, + pkgs, + config, + ... +}: +{ imports = [ ../. ../../rockchip diff --git a/radxa/rock-5b/default.nix b/radxa/rock-5b/default.nix index c8a899dd..891ae26c 100644 --- a/radxa/rock-5b/default.nix +++ b/radxa/rock-5b/default.nix @@ -1,8 +1,10 @@ -{ lib -, pkgs -, config -, ... -}: { +{ + lib, + pkgs, + config, + ... +}: +{ imports = [ ../. ../../rockchip diff --git a/radxa/rock-pi-4/default.nix b/radxa/rock-pi-4/default.nix index e205a46e..d6000816 100644 --- a/radxa/rock-pi-4/default.nix +++ b/radxa/rock-pi-4/default.nix @@ -1,8 +1,10 @@ -{ lib -, pkgs -, config -, ... -}: { +{ + lib, + pkgs, + config, + ... +}: +{ imports = [ ../. ../../rockchip diff --git a/radxa/rock-pi-e/default.nix b/radxa/rock-pi-e/default.nix index 0eec4e9a..95ad4106 100644 --- a/radxa/rock-pi-e/default.nix +++ b/radxa/rock-pi-e/default.nix @@ -1,8 +1,10 @@ -{ lib -, pkgs -, config -, ... -}: { +{ + lib, + pkgs, + config, + ... +}: +{ imports = [ ../. ../../rockchip diff --git a/raspberry-pi/2/default.nix b/raspberry-pi/2/default.nix index 368cb27f..2e61025c 100644 --- a/raspberry-pi/2/default.nix +++ b/raspberry-pi/2/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ...}: +{ lib, pkgs, ... }: { boot = { diff --git a/raspberry-pi/3/default.nix b/raspberry-pi/3/default.nix index 57da74a3..00e052f6 100644 --- a/raspberry-pi/3/default.nix +++ b/raspberry-pi/3/default.nix @@ -1,6 +1,7 @@ -{ lib -, pkgs -, ... +{ + lib, + pkgs, + ... }: { @@ -11,8 +12,7 @@ # https://github.com/NixOS/nixpkgs/issues/154163#issuecomment-1350599022 nixpkgs.overlays = [ (_final: super: { - makeModulesClosure = x: - super.makeModulesClosure (x // { allowMissing = true; }); + makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; }); }) ]; diff --git a/raspberry-pi/4/apply-overlays-dtmerge.nix b/raspberry-pi/4/apply-overlays-dtmerge.nix index e5b52d37..ab6d5296 100644 --- a/raspberry-pi/4/apply-overlays-dtmerge.nix +++ b/raspberry-pi/4/apply-overlays-dtmerge.nix @@ -1,48 +1,67 @@ # modification of nixpkgs deviceTree.applyOverlays to resolve https://github.com/NixOS/nixpkgs/issues/125354 # derived from https://github.com/NixOS/nixpkgs/blob/916ca8f2b0c208def051f8ea9760c534a40309db/pkgs/os-specific/linux/device-tree/default.nix -{ lib, stdenvNoCC, dtc, libraspberrypi }: +{ + lib, + stdenvNoCC, + dtc, + libraspberrypi, +}: -with lib; (base: overlays': stdenvNoCC.mkDerivation { - name = "device-tree-overlays"; - nativeBuildInputs = [ dtc libraspberrypi ]; - buildCommand = let - overlays = toList overlays'; - in '' - mkdir -p $out - cd "${base}" - find . -type f -name '*.dtb' -print0 \ - | xargs -0 cp -v --no-preserve=mode --target-directory "$out" --parents +with lib; +( + base: overlays': + stdenvNoCC.mkDerivation { + name = "device-tree-overlays"; + nativeBuildInputs = [ + dtc + libraspberrypi + ]; + buildCommand = + let + overlays = toList overlays'; + in + '' + mkdir -p $out + cd "${base}" + find . -type f -name '*.dtb' -print0 \ + | xargs -0 cp -v --no-preserve=mode --target-directory "$out" --parents - for dtb in $(find "$out" -type f -name '*.dtb'); do - dtbCompat=$(fdtget -t s "$dtb" / compatible 2>/dev/null || true) - # skip files without `compatible` string - test -z "$dtbCompat" && continue + for dtb in $(find "$out" -type f -name '*.dtb'); do + dtbCompat=$(fdtget -t s "$dtb" / compatible 2>/dev/null || true) + # skip files without `compatible` string + test -z "$dtbCompat" && continue - ${flip (concatMapStringsSep "\n") overlays (o: '' - overlayCompat="$(fdtget -t s "${o.dtboFile}" / compatible)" + ${flip (concatMapStringsSep "\n") overlays (o: '' + overlayCompat="$(fdtget -t s "${o.dtboFile}" / compatible)" - # skip incompatible and non-matching overlays - if [[ ! "$dtbCompat" =~ "$overlayCompat" ]]; then - echo "Skipping overlay ${o.name}: incompatible with $(basename "$dtb")" - elif ${if ((o.filter or null) == null) then "false" else '' - [[ "''${dtb//${o.filter}/}" == "$dtb" ]] - ''} - then - echo "Skipping overlay ${o.name}: filter does not match $(basename "$dtb")" - else - echo -n "Applying overlay ${o.name} to $(basename "$dtb")... " - mv "$dtb"{,.in} + # skip incompatible and non-matching overlays + if [[ ! "$dtbCompat" =~ "$overlayCompat" ]]; then + echo "Skipping overlay ${o.name}: incompatible with $(basename "$dtb")" + elif ${ + if ((o.filter or null) == null) then + "false" + else + '' + [[ "''${dtb//${o.filter}/}" == "$dtb" ]] + '' + } + then + echo "Skipping overlay ${o.name}: filter does not match $(basename "$dtb")" + else + echo -n "Applying overlay ${o.name} to $(basename "$dtb")... " + mv "$dtb"{,.in} - # dtmerge requires a .dtbo ext for dtbo files, otherwise it adds it to the given file implicitly - dtboWithExt="$TMPDIR/$(basename "${o.dtboFile}").dtbo" - cp -r ${o.dtboFile} "$dtboWithExt" + # dtmerge requires a .dtbo ext for dtbo files, otherwise it adds it to the given file implicitly + dtboWithExt="$TMPDIR/$(basename "${o.dtboFile}").dtbo" + cp -r ${o.dtboFile} "$dtboWithExt" - dtmerge "$dtb.in" "$dtb" "$dtboWithExt" + dtmerge "$dtb.in" "$dtb" "$dtboWithExt" - echo "ok" - rm "$dtb.in" "$dtboWithExt" - fi - '')} + echo "ok" + rm "$dtb.in" "$dtboWithExt" + fi + '')} - done''; -}) + done''; + } +) diff --git a/raspberry-pi/4/audio.nix b/raspberry-pi/4/audio.nix index 38773864..08c0b921 100644 --- a/raspberry-pi/4/audio.nix +++ b/raspberry-pi/4/audio.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.hardware.raspberry-pi."4".audio; @@ -38,9 +43,10 @@ in # set tsched=0 in pulseaudio config to avoid audio glitches # see https://wiki.archlinux.org/title/PulseAudio/Troubleshooting#Glitches,_skips_or_crackling - hardware.pulseaudio.configFile = lib.mkOverride 990 (pkgs.runCommand "default.pa" {} '' - sed 's/module-udev-detect$/module-udev-detect tsched=0/' ${config.hardware.pulseaudio.package}/etc/pulse/default.pa > $out - ''); + hardware.pulseaudio.configFile = lib.mkOverride 990 ( + pkgs.runCommand "default.pa" { } '' + sed 's/module-udev-detect$/module-udev-detect tsched=0/' ${config.hardware.pulseaudio.package}/etc/pulse/default.pa > $out + '' + ); }; } - diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index 150a66b9..e02ba0b3 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, config, ... }: +{ + lib, + pkgs, + config, + ... +}: { imports = [ @@ -40,7 +45,6 @@ hardware.deviceTree.filter = lib.mkDefault "bcm2711-rpi-*.dtb"; - assertions = [ { assertion = (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1"); diff --git a/raspberry-pi/4/dwc2.nix b/raspberry-pi/4/dwc2.nix index bdb63b18..874efa24 100644 --- a/raspberry-pi/4/dwc2.nix +++ b/raspberry-pi/4/dwc2.nix @@ -25,7 +25,11 @@ in https://www.kernel.org/doc/Documentation/usb/gadget-testing.txt ''; dr_mode = lib.mkOption { - type = lib.types.enum [ "host" "peripheral" "otg" ]; + type = lib.types.enum [ + "host" + "peripheral" + "otg" + ]; default = "otg"; description = '' Dual role mode setting for the dwc2 USB controller driver. diff --git a/raspberry-pi/4/gpio.nix b/raspberry-pi/4/gpio.nix index 23c7bdae..dc12965c 100644 --- a/raspberry-pi/4/gpio.nix +++ b/raspberry-pi/4/gpio.nix @@ -1,36 +1,41 @@ -{ pkgs, lib, config, ... }: +{ + pkgs, + lib, + config, + ... +}: { options.hardware.raspberry-pi."4".gpio = { enable = lib.mkOption { type = lib.types.bool; - description = - "Enable udev rules and kernelParams that make lgpio and pigpio work"; + description = "Enable udev rules and kernelParams that make lgpio and pigpio work"; default = false; }; }; - config = let - cfg = config.hardware.raspberry-pi."4".gpio; + config = + let + cfg = config.hardware.raspberry-pi."4".gpio; in - lib.mkIf cfg.enable { - users.groups.gpio = lib.mkDefault { }; + lib.mkIf cfg.enable { + users.groups.gpio = lib.mkDefault { }; - # the bit that matters to lgpio here is - # "${pkgs.coreutils}/bin/chgrp gpio /dev/%k && chmod 660 /dev/%k" - # see https://github.com/NixOS/nixpkgs/pull/352308 + # the bit that matters to lgpio here is + # "${pkgs.coreutils}/bin/chgrp gpio /dev/%k && chmod 660 /dev/%k" + # see https://github.com/NixOS/nixpkgs/pull/352308 - # sudo udevadm test --action=add /dev/gpiochip0 to test + # sudo udevadm test --action=add /dev/gpiochip0 to test - # import lgpio; lgpio.gpiochip_open(0) should show "1" and not raise - # an exception + # import lgpio; lgpio.gpiochip_open(0) should show "1" and not raise + # an exception - services.udev.extraRules = lib.mkBefore '' - KERNEL=="gpiomem", GROUP="gpio", MODE="0660" - SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", PROGRAM="${pkgs.bash}/bin/bash -c '${pkgs.coreutils}/bin/chgrp gpio /dev/%k && chmod 660 /dev/%k && ${pkgs.coreutils}/bin/chgrp -R gpio /sys/class/gpio && ${pkgs.coreutils}/bin/chmod -R g=u /sys/class/gpio'" - SUBSYSTEM=="gpio", ACTION=="add", PROGRAM="${pkgs.bash}/bin/bash -c '${pkgs.coreutils}/bin/chgrp -R gpio /sys%p && ${pkgs.coreutils}/bin/chmod -R g=u /sys%p'" - ''; + services.udev.extraRules = lib.mkBefore '' + KERNEL=="gpiomem", GROUP="gpio", MODE="0660" + SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", PROGRAM="${pkgs.bash}/bin/bash -c '${pkgs.coreutils}/bin/chgrp gpio /dev/%k && chmod 660 /dev/%k && ${pkgs.coreutils}/bin/chgrp -R gpio /sys/class/gpio && ${pkgs.coreutils}/bin/chmod -R g=u /sys/class/gpio'" + SUBSYSTEM=="gpio", ACTION=="add", PROGRAM="${pkgs.bash}/bin/bash -c '${pkgs.coreutils}/bin/chgrp -R gpio /sys%p && ${pkgs.coreutils}/bin/chmod -R g=u /sys%p'" + ''; - boot.kernelParams = [ - "iomem=relaxed" # for pigpiod - ]; - }; + boot.kernelParams = [ + "iomem=relaxed" # for pigpiod + ]; + }; } diff --git a/raspberry-pi/4/i2c.nix b/raspberry-pi/4/i2c.nix index 0355397e..5939a78a 100644 --- a/raspberry-pi/4/i2c.nix +++ b/raspberry-pi/4/i2c.nix @@ -2,24 +2,31 @@ let cfg = config.hardware.raspberry-pi."4"; - optionalProperty = name: value: lib.optionalString (value != null) "${name} = <${builtins.toString value}>;"; - simple-overlay = { target, status, frequency }: { - name = "${target}-${status}-overlay"; - dtsText = '' - /dts-v1/; - /plugin/; - / { - compatible = "brcm,bcm2711"; - fragment@0 { - target = <&${target}>; - __overlay__ { - status = "${status}"; - ${optionalProperty "clock-frequency" frequency} + optionalProperty = + name: value: lib.optionalString (value != null) "${name} = <${builtins.toString value}>;"; + simple-overlay = + { + target, + status, + frequency, + }: + { + name = "${target}-${status}-overlay"; + dtsText = '' + /dts-v1/; + /plugin/; + / { + compatible = "brcm,bcm2711"; + fragment@0 { + target = <&${target}>; + __overlay__ { + status = "${status}"; + ${optionalProperty "clock-frequency" frequency} + }; }; }; - }; - ''; - }; + ''; + }; in { options.hardware.raspberry-pi."4" = { @@ -54,21 +61,25 @@ in (lib.mkIf cfg.i2c0.enable { i2c.enable = lib.mkDefault true; deviceTree = { - overlays = [ (simple-overlay { - target = "i2c0if"; - status = "okay"; - inherit (cfg.i2c0) frequency; - }) ]; + overlays = [ + (simple-overlay { + target = "i2c0if"; + status = "okay"; + inherit (cfg.i2c0) frequency; + }) + ]; }; }) (lib.mkIf cfg.i2c1.enable { i2c.enable = lib.mkDefault true; deviceTree = { - overlays = [ (simple-overlay { - target = "i2c1"; - status = "okay"; - inherit (cfg.i2c1) frequency; - }) ]; + overlays = [ + (simple-overlay { + target = "i2c1"; + status = "okay"; + inherit (cfg.i2c1) frequency; + }) + ]; }; }) ]; diff --git a/raspberry-pi/4/leds.nix b/raspberry-pi/4/leds.nix index 5f58fa22..3860fff5 100644 --- a/raspberry-pi/4/leds.nix +++ b/raspberry-pi/4/leds.nix @@ -2,12 +2,14 @@ let cfg = config.hardware.raspberry-pi."4".leds; - mkDisableOption = name: lib.mkOption { - default = false; - example = true; - description = "Whether to disable ${name}."; - type = lib.types.bool; - }; + mkDisableOption = + name: + lib.mkOption { + default = false; + example = true; + description = "Whether to disable ${name}."; + type = lib.types.bool; + }; in { options.hardware = { @@ -71,23 +73,25 @@ in { name = "disable-act-led"; filter = "*rpi-4-b*"; - dtsText = let - kernelVersion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2"; - target = if kernelVersion then "<&led_act>" else "<&act_led>"; - in '' - /dts-v1/; - /plugin/; - /{ - compatible = "raspberrypi,4-model-b"; - fragment@0 { - target = ${target}; - __overlay__ { - gpios = <&gpio 42 0>; /* first two values copied from bcm2711-rpi-4-b.dts */ - linux,default-trigger = "none"; - }; - }; - }; - ''; + dtsText = + let + kernelVersion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2"; + target = if kernelVersion then "<&led_act>" else "<&act_led>"; + in + '' + /dts-v1/; + /plugin/; + /{ + compatible = "raspberrypi,4-model-b"; + fragment@0 { + target = ${target}; + __overlay__ { + gpios = <&gpio 42 0>; /* first two values copied from bcm2711-rpi-4-b.dts */ + linux,default-trigger = "none"; + }; + }; + }; + ''; } ]; }; @@ -101,23 +105,25 @@ in { name = "disable-pwr-led"; filter = "*rpi-4-b*"; - dtsText = let - kernelVersion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2"; - target = if kernelVersion then "<&led_pwr>" else "<&pwr_led>"; - in '' - /dts-v1/; - /plugin/; - /{ - compatible = "raspberrypi,4-model-b"; - fragment@0 { - target = ${target}; - __overlay__ { - gpios = <&expgpio 2 0>; /* first two values copied from bcm2711-rpi-4-b.dts */ - linux,default-trigger = "default-on"; - }; - }; - }; - ''; + dtsText = + let + kernelVersion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2"; + target = if kernelVersion then "<&led_pwr>" else "<&pwr_led>"; + in + '' + /dts-v1/; + /plugin/; + /{ + compatible = "raspberrypi,4-model-b"; + fragment@0 { + target = ${target}; + __overlay__ { + gpios = <&expgpio 2 0>; /* first two values copied from bcm2711-rpi-4-b.dts */ + linux,default-trigger = "default-on"; + }; + }; + }; + ''; } ]; }; diff --git a/raspberry-pi/4/pkgs-overlays.nix b/raspberry-pi/4/pkgs-overlays.nix index 8c3e29af..95109c21 100644 --- a/raspberry-pi/4/pkgs-overlays.nix +++ b/raspberry-pi/4/pkgs-overlays.nix @@ -6,7 +6,8 @@ let applyOverlays = _final.callPackage ./apply-overlays-dtmerge.nix { }; }; }; -in { +in +{ options.hardware = { raspberry-pi."4".apply-overlays-dtmerge = { enable = lib.mkEnableOption '' diff --git a/raspberry-pi/4/poe-hat.nix b/raspberry-pi/4/poe-hat.nix index 07bc4e46..0eb8d847 100644 --- a/raspberry-pi/4/poe-hat.nix +++ b/raspberry-pi/4/poe-hat.nix @@ -2,7 +2,8 @@ let cfg = config.hardware.raspberry-pi."4".poe-hat; -in { +in +{ options.hardware = { raspberry-pi."4".poe-hat = { enable = lib.mkEnableOption '' diff --git a/raspberry-pi/4/poe-plus-hat.nix b/raspberry-pi/4/poe-plus-hat.nix index 96f50e40..985971f3 100644 --- a/raspberry-pi/4/poe-plus-hat.nix +++ b/raspberry-pi/4/poe-plus-hat.nix @@ -2,7 +2,8 @@ let cfg = config.hardware.raspberry-pi."4".poe-plus-hat; -in { +in +{ options.hardware = { raspberry-pi."4".poe-plus-hat = { enable = lib.mkEnableOption '' diff --git a/raspberry-pi/4/pwm0.nix b/raspberry-pi/4/pwm0.nix index 5470eaf4..665f81be 100644 --- a/raspberry-pi/4/pwm0.nix +++ b/raspberry-pi/4/pwm0.nix @@ -14,37 +14,39 @@ in config = lib.mkIf cfg.enable { hardware.deviceTree = { - overlays = [{ - name = "pwm-overlay"; - dtsText = '' - /dts-v1/; - /plugin/; - / { - compatible = "brcm,bcm2711"; + overlays = [ + { + name = "pwm-overlay"; + dtsText = '' + /dts-v1/; + /plugin/; + / { + compatible = "brcm,bcm2711"; - fragment@0 { - target = <&gpio>; - __overlay__ { - pwm_pins: pwm_pins { - brcm,pins = <18>; - brcm,function = <2>; /* Alt5 */ + fragment@0 { + target = <&gpio>; + __overlay__ { + pwm_pins: pwm_pins { + brcm,pins = <18>; + brcm,function = <2>; /* Alt5 */ + }; }; }; - }; - fragment@1 { - target = <&pwm>; - __overlay__ { - pinctrl-names = "default"; - assigned-clock-rates = <100000000>; - status = "okay"; - pinctrl-0 = <&pwm_pins>; + fragment@1 { + target = <&pwm>; + __overlay__ { + pinctrl-names = "default"; + assigned-clock-rates = <100000000>; + status = "okay"; + pinctrl-0 = <&pwm_pins>; + }; }; - }; - }; - ''; - }]; + }; + ''; + } + ]; }; }; } diff --git a/raspberry-pi/4/tv-hat.nix b/raspberry-pi/4/tv-hat.nix index 8c480f43..263d6fcf 100644 --- a/raspberry-pi/4/tv-hat.nix +++ b/raspberry-pi/4/tv-hat.nix @@ -2,7 +2,8 @@ let cfg = config.hardware.raspberry-pi."4".tv-hat; -in { +in +{ options.hardware = { raspberry-pi."4".tv-hat = { enable = lib.mkEnableOption '' diff --git a/raspberry-pi/4/xhci.nix b/raspberry-pi/4/xhci.nix index b5398f2e..eb1d2ada 100644 --- a/raspberry-pi/4/xhci.nix +++ b/raspberry-pi/4/xhci.nix @@ -2,9 +2,11 @@ config, lib, ... -}: let +}: +let cfg = config.hardware.raspberry-pi."4".xhci; -in { +in +{ options.hardware = { raspberry-pi."4".xhci = { enable = lib.mkEnableOption '' diff --git a/raspberry-pi/5/default.nix b/raspberry-pi/5/default.nix index aba0178f..12d51b4d 100644 --- a/raspberry-pi/5/default.nix +++ b/raspberry-pi/5/default.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, config, ... }: +{ + lib, + pkgs, + config, + ... +}: let linux_rpi5 = pkgs.linux_rpi4.override { rpiVersion = 5; @@ -18,12 +23,12 @@ in # Needed for Xorg to start (https://github.com/raspberrypi-ui/gldriver-test/blob/master/usr/lib/systemd/scripts/rp1_test.sh) # This won't work for displays connected to the RP1 (DPI/composite/MIPI DSI), since I don't have one to test. services.xserver.extraConfig = '' - Section "OutputClass" - Identifier "vc4" - MatchDriver "vc4" - Driver "modesetting" - Option "PrimaryGPU" "true" - EndSection + Section "OutputClass" + Identifier "vc4" + MatchDriver "vc4" + Driver "modesetting" + Option "PrimaryGPU" "true" + EndSection ''; assertions = [ diff --git a/rockchip/default.nix b/rockchip/default.nix index 68bbb83f..f0195f9d 100644 --- a/rockchip/default.nix +++ b/rockchip/default.nix @@ -1,11 +1,13 @@ -{ lib -, pkgs -, config -, ... +{ + lib, + pkgs, + config, + ... }: let cfg = config.hardware.rockchip; -in { +in +{ imports = [ ./rk3328 ./rk3399 diff --git a/rockchip/disko.nix b/rockchip/disko.nix index 7d6b4c9a..fa846c2e 100644 --- a/rockchip/disko.nix +++ b/rockchip/disko.nix @@ -1,11 +1,13 @@ -{ lib -, pkgs -, config -, ... +{ + lib, + pkgs, + config, + ... }: let cfg = config.hardware.rockchip; -in { +in +{ imports = [ rk3399/disko.nix ]; diff --git a/rockchip/rk3328/default.nix b/rockchip/rk3328/default.nix index f2d53910..804be1a5 100644 --- a/rockchip/rk3328/default.nix +++ b/rockchip/rk3328/default.nix @@ -1,11 +1,13 @@ -{ lib -, pkgs -, config -, ... +{ + lib, + pkgs, + config, + ... }: let cfg = config.hardware.rockchip.rk3328; -in { +in +{ options.hardware.rockchip.rk3328 = { enable = lib.mkEnableOption "Rockchip RK3328 support"; }; diff --git a/rockchip/rk3399/default.nix b/rockchip/rk3399/default.nix index 5748c33e..17f92779 100644 --- a/rockchip/rk3399/default.nix +++ b/rockchip/rk3399/default.nix @@ -1,11 +1,13 @@ -{ lib -, pkgs -, config -, ... +{ + lib, + pkgs, + config, + ... }: let cfg = config.hardware.rockchip.rk3399; -in { +in +{ options.hardware.rockchip.rk3399 = { enable = lib.mkEnableOption "Rockchip RK3399 support"; }; diff --git a/rockchip/rk3399/disko.nix b/rockchip/rk3399/disko.nix index bae10ef5..b48972b4 100644 --- a/rockchip/rk3399/disko.nix +++ b/rockchip/rk3399/disko.nix @@ -1,14 +1,18 @@ -{ lib -, pkgs -, config -, ... +{ + lib, + pkgs, + config, + ... }: let cfg = config.hardware.rockchip.rk3399; -in { +in +{ config = lib.mkIf cfg.enable { - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "arm-trusted-firmware-rk3399" - ]; + nixpkgs.config.allowUnfreePredicate = + pkg: + builtins.elem (lib.getName pkg) [ + "arm-trusted-firmware-rk3399" + ]; }; } diff --git a/rockchip/rk3588/default.nix b/rockchip/rk3588/default.nix index cabc04b2..7dff0b64 100644 --- a/rockchip/rk3588/default.nix +++ b/rockchip/rk3588/default.nix @@ -1,11 +1,13 @@ -{ lib -, pkgs -, config -, ... +{ + lib, + pkgs, + config, + ... }: let cfg = config.hardware.rockchip.rk3588; -in { +in +{ options.hardware.rockchip.rk3588 = { enable = lib.mkEnableOption "Rockchip RK3588 support"; }; diff --git a/samsung/np900x3c/default.nix b/samsung/np900x3c/default.nix index 1d850eb5..83261ed9 100644 --- a/samsung/np900x3c/default.nix +++ b/samsung/np900x3c/default.nix @@ -1,2 +1,2 @@ # TODO: use ../../common/pc/laptop -{} +{ } diff --git a/starfive/visionfive/v1/default.nix b/starfive/visionfive/v1/default.nix index 4a3c3dd0..0d55a3e9 100644 --- a/starfive/visionfive/v1/default.nix +++ b/starfive/visionfive/v1/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ...}: +{ + config, + lib, + pkgs, + ... +}: { hardware.deviceTree.name = lib.mkDefault "starfive/jh7100-starfive-visionfive-v1.dtb"; @@ -7,9 +12,19 @@ boot = { # Force no ZFS (from nixos/modules/profiles/base.nix) until updated to kernel 6.0 - supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; + supportedFilesystems = lib.mkForce [ + "btrfs" + "reiserfs" + "vfat" + "f2fs" + "xfs" + "ntfs" + "cifs" + ]; consoleLogLevel = lib.mkDefault 7; - kernelPackages = lib.mkDefault (pkgs.callPackage ./linux.nix { inherit (config.boot) kernelPatches; }); + kernelPackages = lib.mkDefault ( + pkgs.callPackage ./linux.nix { inherit (config.boot) kernelPatches; } + ); kernelParams = lib.mkDefault [ "console=tty0" diff --git a/starfive/visionfive/v1/firmware.nix b/starfive/visionfive/v1/firmware.nix index 3ea63757..308e355c 100644 --- a/starfive/visionfive/v1/firmware.nix +++ b/starfive/visionfive/v1/firmware.nix @@ -1,6 +1,7 @@ -{ runCommand -, buildPackages -, pkgs +{ + runCommand, + buildPackages, + pkgs, }: let @@ -10,26 +11,29 @@ let withPayload = "${uboot}/u-boot.bin"; withFDT = "${uboot}/u-boot.dtb"; }; -in runCommand "firmware-starfive-visionfive-v1" { - nativeBuildInputs = with buildPackages; [ xxd ]; -} '' - function handle_file { - inFile=$1 - echo inFile: $inFile - outFile=$2 - inSize=`stat -c "%s" $inFile` - inSize32HexBe=`printf "%08x\n" $inSize` - inSize32HexLe=''${inSize32HexBe:6:2}''${inSize32HexBe:4:2}''${inSize32HexBe:2:2}''${inSize32HexBe:0:2} - echo "inSize: $inSize (0x$inSize32HexBe, LE:0x$inSize32HexLe)" - echo $inSize32HexLe | xxd -r -ps > $outFile - cat $inFile >> $outFile - echo outFile: $outFile - outSize=`stat -c "%s" $outFile` - outSize32HexBe=`printf "%08x\n" $outSize` - echo "outSize: $outSize (0x$outSize32HexBe)" +in +runCommand "firmware-starfive-visionfive-v1" + { + nativeBuildInputs = with buildPackages; [ xxd ]; } + '' + function handle_file { + inFile=$1 + echo inFile: $inFile + outFile=$2 + inSize=`stat -c "%s" $inFile` + inSize32HexBe=`printf "%08x\n" $inSize` + inSize32HexLe=''${inSize32HexBe:6:2}''${inSize32HexBe:4:2}''${inSize32HexBe:2:2}''${inSize32HexBe:0:2} + echo "inSize: $inSize (0x$inSize32HexBe, LE:0x$inSize32HexLe)" + echo $inSize32HexLe | xxd -r -ps > $outFile + cat $inFile >> $outFile + echo outFile: $outFile + outSize=`stat -c "%s" $outFile` + outSize32HexBe=`printf "%08x\n" $outSize` + echo "outSize: $outSize (0x$outSize32HexBe)" + } - mkdir -p "$out/nix-support" - echo "file bin \"$out/opensbi_u-boot_starfive_visionfive_v1.bin\"" >> "$out/nix-support/hydra-build-products" - handle_file ${opensbi}/share/opensbi/lp64/generic/firmware/fw_payload.bin $out/opensbi_u-boot_starfive_visionfive_v1.bin -'' + mkdir -p "$out/nix-support" + echo "file bin \"$out/opensbi_u-boot_starfive_visionfive_v1.bin\"" >> "$out/nix-support/hydra-build-products" + handle_file ${opensbi}/share/opensbi/lp64/generic/firmware/fw_payload.bin $out/opensbi_u-boot_starfive_visionfive_v1.bin + '' diff --git a/starfive/visionfive/v1/linux.nix b/starfive/visionfive/v1/linux.nix index 88909099..157745ed 100644 --- a/starfive/visionfive/v1/linux.nix +++ b/starfive/visionfive/v1/linux.nix @@ -1,36 +1,44 @@ -{ lib -, callPackage -, linuxPackagesFor -, kernelPatches -, ... }: +{ + lib, + callPackage, + linuxPackagesFor, + kernelPatches, + ... +}: let modDirVersion = "6.0.0"; - linuxPkg = { fetchFromGitHub, buildLinux, ... } @ args: - buildLinux (args // { - inherit modDirVersion kernelPatches; - version = "${modDirVersion}-starfive-visionfive-v1"; + linuxPkg = + { fetchFromGitHub, buildLinux, ... }@args: + buildLinux ( + args + // { + inherit modDirVersion kernelPatches; + version = "${modDirVersion}-starfive-visionfive-v1"; - src = fetchFromGitHub { - owner = "starfive-tech"; - repo = "linux"; - rev = "cfcb617265422c0af0ae5bc9688dceba2d10b27a"; - sha256 = "sha256-EAMCOtJZ51xSLySQPaZyomfa/1Xs9kNedz04tIbELqg="; - }; + src = fetchFromGitHub { + owner = "starfive-tech"; + repo = "linux"; + rev = "cfcb617265422c0af0ae5bc9688dceba2d10b27a"; + sha256 = "sha256-EAMCOtJZ51xSLySQPaZyomfa/1Xs9kNedz04tIbELqg="; + }; - defconfig = "starfive_jh7100_fedora_defconfig"; + defconfig = "starfive_jh7100_fedora_defconfig"; - structuredExtraConfig = with lib.kernel; { - KEXEC = yes; - SERIAL_8250_DW = yes; - PINCTRL_STARFIVE = yes; - DW_AXI_DMAC_STARFIVE = yes; - PTP_1588_CLOCK = yes; - STMMAC_ETH = yes; - STMMAC_PCI = yes; - }; + structuredExtraConfig = with lib.kernel; { + KEXEC = yes; + SERIAL_8250_DW = yes; + PINCTRL_STARFIVE = yes; + DW_AXI_DMAC_STARFIVE = yes; + PTP_1588_CLOCK = yes; + STMMAC_ETH = yes; + STMMAC_PCI = yes; + }; - extraMeta.branch = "visionfive"; - } // (args.argsOverride or { })); -in lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg { })) + extraMeta.branch = "visionfive"; + } + // (args.argsOverride or { }) + ); +in +lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg { })) diff --git a/starfive/visionfive/v1/sd-image.nix b/starfive/visionfive/v1/sd-image.nix index 6b4acfc5..7b855c44 100644 --- a/starfive/visionfive/v1/sd-image.nix +++ b/starfive/visionfive/v1/sd-image.nix @@ -1,10 +1,16 @@ # To build, use: # nix-build "" -I nixos-config=starfive/visionfive/v1/sd-image.nix -A config.system.build.sdImage -{ config, pkgs, modulesPath, ... }: +{ + config, + pkgs, + modulesPath, + ... +}: let firmware = pkgs.callPackage ./firmware.nix { }; -in { +in +{ imports = [ "${modulesPath}/profiles/base.nix" "${modulesPath}/installer/sd-card/sd-image.nix" diff --git a/starfive/visionfive/v1/uboot.nix b/starfive/visionfive/v1/uboot.nix index 9eebeb9f..4f3d6a52 100644 --- a/starfive/visionfive/v1/uboot.nix +++ b/starfive/visionfive/v1/uboot.nix @@ -1,5 +1,6 @@ -{ fetchFromGitHub -, buildUBoot +{ + fetchFromGitHub, + buildUBoot, }: buildUBoot { @@ -13,5 +14,8 @@ buildUBoot { }; defconfig = "starfive_jh7100_visionfive_smode_defconfig"; - filesToInstall = [ "u-boot.bin" "u-boot.dtb" ]; + filesToInstall = [ + "u-boot.bin" + "u-boot.dtb" + ]; } diff --git a/starfive/visionfive/v2/firmware.nix b/starfive/visionfive/v2/firmware.nix index b6291152..54360093 100644 --- a/starfive/visionfive/v2/firmware.nix +++ b/starfive/visionfive/v2/firmware.nix @@ -1,4 +1,9 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let cfg = config.hardware.visionfive2; in @@ -34,15 +39,19 @@ in config = { system.build = { - opensbi = (pkgs.callPackage ./opensbi.nix {}).overrideAttrs (f: p: { - src = if cfg.opensbi.src != null then cfg.opensbi.src else p.src; - patches = if cfg.opensbi.patches != null then cfg.opensbi.patches else (p.patches or []); - }); + opensbi = (pkgs.callPackage ./opensbi.nix { }).overrideAttrs ( + _f: p: { + src = if cfg.opensbi.src != null then cfg.opensbi.src else p.src; + patches = if cfg.opensbi.patches != null then cfg.opensbi.patches else (p.patches or [ ]); + } + ); - uboot = (pkgs.callPackage ./uboot.nix { inherit (config.system.build) opensbi; }).overrideAttrs (f: p: { - src = if cfg.uboot.src != null then cfg.uboot.src else p.src; - patches = if cfg.uboot.patches != null then cfg.uboot.patches else (p.patches or []); - }); + uboot = (pkgs.callPackage ./uboot.nix { inherit (config.system.build) opensbi; }).overrideAttrs ( + _f: p: { + src = if cfg.uboot.src != null then cfg.uboot.src else p.src; + patches = if cfg.uboot.patches != null then cfg.uboot.patches else (p.patches or [ ]); + } + ); updater-flash = pkgs.writeShellApplication { name = "visionfive2-firmware-update-flash"; diff --git a/starfive/visionfive/v2/sd-image.nix b/starfive/visionfive/v2/sd-image.nix index a14b87b2..667dc3fa 100644 --- a/starfive/visionfive/v2/sd-image.nix +++ b/starfive/visionfive/v2/sd-image.nix @@ -1,4 +1,9 @@ -{ config, pkgs, modulesPath, ... }: +{ + config, + pkgs, + modulesPath, + ... +}: { imports = [ "${modulesPath}/profiles/base.nix" @@ -7,8 +12,7 @@ ]; sdImage = { - imageName = - "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}-starfive-visionfive2.img"; + imageName = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}-starfive-visionfive2.img"; # Overridden by postBuildCommands populateFirmwareCommands = ""; diff --git a/starfive/visionfive/v2/spl-tool.nix b/starfive/visionfive/v2/spl-tool.nix index cd0a77b0..a4543373 100644 --- a/starfive/visionfive/v2/spl-tool.nix +++ b/starfive/visionfive/v2/spl-tool.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub }: -stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation (_finalAttrs: { pname = "spi_tool"; version = "0x01010101"; src = fetchFromGitHub { diff --git a/starfive/visionfive/v2/uboot.nix b/starfive/visionfive/v2/uboot.nix index ef92cce3..6fe62a70 100644 --- a/starfive/visionfive/v2/uboot.nix +++ b/starfive/visionfive/v2/uboot.nix @@ -1,5 +1,6 @@ -{ buildUBoot -, opensbi +{ + buildUBoot, + opensbi, }: buildUBoot { diff --git a/supermicro/default.nix b/supermicro/default.nix index 9c5a2bb3..817f01d1 100644 --- a/supermicro/default.nix +++ b/supermicro/default.nix @@ -1,5 +1,8 @@ { pkgs, ... }: { - boot.kernelModules = [ "ipmi_devintf" "ipmi_si" ]; + boot.kernelModules = [ + "ipmi_devintf" + "ipmi_si" + ]; environment.systemPackages = [ pkgs.ipmitool ]; } diff --git a/supermicro/x10sll-f/default.nix b/supermicro/x10sll-f/default.nix index c0200510..cbba1eb8 100644 --- a/supermicro/x10sll-f/default.nix +++ b/supermicro/x10sll-f/default.nix @@ -3,7 +3,10 @@ ../. ]; - boot.kernelModules = [ "jc42" "tpm_rng" ]; + boot.kernelModules = [ + "jc42" + "tpm_rng" + ]; # services.cron.systemCronJobs = [ # # Reset 5-minute watchdog timer every minute diff --git a/system76/darp6/default.nix b/system76/darp6/default.nix index ff70ac94..b5a2560f 100644 --- a/system76/darp6/default.nix +++ b/system76/darp6/default.nix @@ -10,19 +10,24 @@ # system76-io-dkms also appears to be loaded on darp6 with Pop!_OS, and # system76-dkms does not, and in fact refuses to load. -{ config, lib, options, pkgs, ... }: +{ + config, + lib, + options, + pkgs, + ... +}: let cfg = config.hardware.system76.darp6; # Allow silencing the warning about these options if either is defined. soundSettingsDefined = - options.hardware.system76.darp6.soundVendorId.isDefined || - options.hardware.system76.darp6.soundSubsystemId.isDefined; + options.hardware.system76.darp6.soundVendorId.isDefined + || options.hardware.system76.darp6.soundSubsystemId.isDefined; # We neeed both options non-null to be able to apply the headset fixup though. soundSettingsAvailable = - soundSettingsDefined && - (cfg.soundVendorId != null && cfg.soundSubsystemId != null); + soundSettingsDefined && (cfg.soundVendorId != null && cfg.soundSubsystemId != null); in { imports = [ diff --git a/system76/galp5-1650/default.nix b/system76/galp5-1650/default.nix index c2fcf231..71820f6d 100644 --- a/system76/galp5-1650/default.nix +++ b/system76/galp5-1650/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: { imports = [ ../. diff --git a/system76/gaze18/default.nix b/system76/gaze18/default.nix index dd4302b8..61b3f92f 100644 --- a/system76/gaze18/default.nix +++ b/system76/gaze18/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: { imports = [ ../. diff --git a/tests/build-profile.nix b/tests/build-profile.nix index 36ab88b5..3c20380d 100644 --- a/tests/build-profile.nix +++ b/tests/build-profile.nix @@ -2,20 +2,23 @@ (pkgs.nixos [ profile - ({ config, lib, ... }: { - nixpkgs.pkgs = pkgs; - boot.loader.systemd-boot.enable = !config.boot.loader.generic-extlinux-compatible.enable; - # we forcefully disable grub here just for testing purposes, even though some profiles might still use grub in the end. - boot.loader.grub.enable = false; + ( + { config, lib, ... }: + { + nixpkgs.pkgs = pkgs; + boot.loader.systemd-boot.enable = !config.boot.loader.generic-extlinux-compatible.enable; + # we forcefully disable grub here just for testing purposes, even though some profiles might still use grub in the end. + boot.loader.grub.enable = false; - # so we can have assertions that require a certain minimum kernel version, - # We use a priority of 1200 here, which is higher than the default of 1000 - boot.kernelPackages = lib.mkOverride 1200 pkgs.linuxPackages_latest; + # so we can have assertions that require a certain minimum kernel version, + # We use a priority of 1200 here, which is higher than the default of 1000 + boot.kernelPackages = lib.mkOverride 1200 pkgs.linuxPackages_latest; - fileSystems."/" = { - device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000"; - fsType = "btrfs"; - }; - system.stateVersion = config.system.nixos.release; - }) + fileSystems."/" = { + device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000"; + fsType = "btrfs"; + }; + system.stateVersion = config.system.nixos.release; + } + ) ]).config.system.build.toplevel diff --git a/tests/flake.nix b/tests/flake.nix index 91de6edf..bf20ed3a 100644 --- a/tests/flake.nix +++ b/tests/flake.nix @@ -85,10 +85,17 @@ in { _module.args.pkgs = nixpkgsUnstable; - checks = checksForNixpkgs "nixos-unstable" nixpkgsUnstable // checksForNixpkgs "nixos-stable" nixpkgsStable; + checks = + checksForNixpkgs "nixos-unstable" nixpkgsUnstable + // checksForNixpkgs "nixos-stable" nixpkgsStable; packages.run = pkgs.writeShellScriptBin "run.py" '' #!${pkgs.bash}/bin/bash - export PATH=${lib.makeBinPath [ pkgs.nix-eval-jobs pkgs.nix-eval-jobs.nix ]} + export PATH=${ + lib.makeBinPath [ + pkgs.nix-eval-jobs + pkgs.nix-eval-jobs.nix + ] + } exec ${pkgs.python3.interpreter} ${./.}/run.py --nixos-hardware "$@" ''; }; diff --git a/toshiba/swanky/default.nix b/toshiba/swanky/default.nix index 32e3b126..7557d0a9 100644 --- a/toshiba/swanky/default.nix +++ b/toshiba/swanky/default.nix @@ -17,11 +17,13 @@ in boot.kernelParams = [ "acpi_backlight=vendor" ]; # Sound requires a custom UCM config: - system.replaceRuntimeDependencies = [{ - original = pkgs.alsa-lib; + system.replaceRuntimeDependencies = [ + { + original = pkgs.alsa-lib; - replacement = pkgs.alsa-lib.overrideAttrs (_super: { - postFixup = "cp -r ${ucm}/chtmax98090 $out/share/alsa/ucm"; - }); - }]; + replacement = pkgs.alsa-lib.overrideAttrs (_super: { + postFixup = "cp -r ${ucm}/chtmax98090 $out/share/alsa/ucm"; + }); + } + ]; } diff --git a/treefmt.nix b/treefmt.nix new file mode 100644 index 00000000..7039d8b5 --- /dev/null +++ b/treefmt.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: +{ + projectRootFile = "flake.nix"; + + programs = { + deadnix = { + enable = true; + no-lambda-pattern-names = true; + }; + nixfmt = { + enable = true; + package = pkgs.nixfmt-rfc-style; + }; + }; + + settings = { + on-unmatched = "info"; + }; +} diff --git a/tuxedo/infinitybook/pro14/gen9/default.nix b/tuxedo/infinitybook/pro14/gen9/default.nix index 7662c658..5dc50911 100644 --- a/tuxedo/infinitybook/pro14/gen9/default.nix +++ b/tuxedo/infinitybook/pro14/gen9/default.nix @@ -1,9 +1,11 @@ -{ lib, config, ... }: { +{ lib, config, ... }: +{ imports = [ ../../. ]; # Add Motorcomm YT6801 Driver if available - boot.extraModulePackages = with config.boot; lib.lists.optional - ( kernelPackages ? yt6801 ) kernelPackages.yt6801; + boot.extraModulePackages = + with config.boot; + lib.lists.optional (kernelPackages ? yt6801) kernelPackages.yt6801; } diff --git a/tuxedo/pulse/14/gen3/default.nix b/tuxedo/pulse/14/gen3/default.nix index 52d292cf..5458ce9d 100644 --- a/tuxedo/pulse/14/gen3/default.nix +++ b/tuxedo/pulse/14/gen3/default.nix @@ -3,7 +3,8 @@ pkgs, config, ... -}: { +}: +{ imports = [ ../../../../common/cpu/amd ../../../../common/cpu/amd/pstate.nix @@ -17,8 +18,9 @@ # Kernel 6.6.35 apparently does not have this issue, # the exact version is still unknown which fixed this. boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6.35") ( - if (config.boot.zfs.enabled) - then pkgs.zfs.latestCompatibleLinuxPackages - else pkgs.linuxPackages_latest + if (config.boot.zfs.enabled) then + pkgs.zfs.latestCompatibleLinuxPackages + else + pkgs.linuxPackages_latest ); } diff --git a/tuxedo/pulse/15/gen2/default.nix b/tuxedo/pulse/15/gen2/default.nix index 05c56055..0afd6b3b 100644 --- a/tuxedo/pulse/15/gen2/default.nix +++ b/tuxedo/pulse/15/gen2/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ imports = [ ../../../../common/cpu/amd ../../../../common/gpu/amd @@ -6,11 +7,16 @@ ]; services.udev.extraRules = builtins.concatStringsSep "\n" ( - ["# Properly suspend the system."] - ++ ( - map - (device: ''SUBSYSTEM=="pci", ACTION=="add", ATTR{vendor}=="0x144d", ATTR{device}=="${device}", RUN+="${pkgs.runtimeShell} -c 'echo 0 > /sys/bus/pci/devices/$kernel/d3cold_allowed'"'') - ["0xa80a" "0xa808"] + [ "# Properly suspend the system." ] + ++ (map + ( + device: + ''SUBSYSTEM=="pci", ACTION=="add", ATTR{vendor}=="0x144d", ATTR{device}=="${device}", RUN+="${pkgs.runtimeShell} -c 'echo 0 > /sys/bus/pci/devices/$kernel/d3cold_allowed'"'' + ) + [ + "0xa80a" + "0xa808" + ] ) ); } From 2b0ced06c1543883636ec5dea30b48b13a28c9f5 Mon Sep 17 00:00:00 2001 From: Andre Date: Wed, 4 Jun 2025 13:39:40 -0400 Subject: [PATCH 1324/1476] chore: add formatting job to GitHub Actions --- .github/workflows/test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1a7c3f7e..7200246e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,14 @@ on: branches: - master jobs: + nixfmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v31 + - run: nix fmt . tests: + needs: nixfmt runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 34762bf406b82fd06e71d78556884f04f7d409fd Mon Sep 17 00:00:00 2001 From: Rituraj <56511165+imxade@users.noreply.github.com> Date: Fri, 6 Jun 2025 08:12:58 +0530 Subject: [PATCH 1325/1476] added inspiron 3442 to the flake --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index f7481983..1dedc2f1 100644 --- a/flake.nix +++ b/flake.nix @@ -64,6 +64,7 @@ (import ./dell/e7240); dell-g3-3779 = import ./dell/g3/3779; dell-g3-3579 = import ./dell/g3/3579; + dell-inspiron-3442 = import ./dell/inspiron/3442; dell-inspiron-14-5420 = import ./dell/inspiron/14-5420; dell-inspiron-5509 = import ./dell/inspiron/5509; dell-inspiron-5515 = import ./dell/inspiron/5515; From 293b5e472b5d740bdc218de82c7a6b77955dd7ed Mon Sep 17 00:00:00 2001 From: Pasha Fistanto Date: Wed, 28 May 2025 20:19:16 +0200 Subject: [PATCH 1326/1476] dell-precision-3490: split into intel and nvidia configurations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- README.md | 3 ++- dell/precision/3490/default.nix | 29 +++++++++++--------------- dell/precision/3490/intel/default.nix | 5 +++++ dell/precision/3490/nvidia/default.nix | 12 +++++++++++ dell/precision/3490/shared.nix | 6 ++++++ flake.nix | 6 +++++- 6 files changed, 42 insertions(+), 19 deletions(-) create mode 100644 dell/precision/3490/intel/default.nix create mode 100644 dell/precision/3490/nvidia/default.nix create mode 100644 dell/precision/3490/shared.nix diff --git a/README.md b/README.md index 1bf859ab..2fb3bcc9 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,8 @@ See code for all available configurations. | [Dell Latitude E7240](dell/latitude/e7240) | `` | | [Dell Optiplex 3050](dell/optiplex/3050) | `` | | [Dell Poweredge R7515](dell/poweredge/r7515) | `` | -| [Dell Precision 3490](dell/precision/3490) | `` | +| [Dell Precision 3490, nvidia](dell/precision/3490/nvidia) | `` | +| [Dell Precision 3490, intel](dell/precision/3490/intel) | `` | | [Dell Precision 3541](dell/precision/3541) | `` | | [Dell Precision 5490](dell/precision/5490) | `` | | [Dell Precision 5530](dell/precision/5530) | `` | diff --git a/dell/precision/3490/default.nix b/dell/precision/3490/default.nix index c579f880..08d80d2f 100644 --- a/dell/precision/3490/default.nix +++ b/dell/precision/3490/default.nix @@ -1,21 +1,16 @@ { + warnings = [ + '' + DEPRECATED: The module has been deprecated. + + Either use + + for NVIDIA graphics or + + for Intel graphics. + '' + ]; imports = [ - ../../../common/cpu/intel/meteor-lake - ../../../common/gpu/nvidia/ada-lovelace - ../../../common/pc/laptop + ./nvidia/default.nix ]; - - boot.initrd.availableKernelModules = [ - "nvme" - "sd_mod" - "thunderbolt" - "usb_storage" - "vmd" - "xhci_pci" - ]; - - hardware.nvidia.prime = { - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:1:0:0"; - }; } diff --git a/dell/precision/3490/intel/default.nix b/dell/precision/3490/intel/default.nix new file mode 100644 index 00000000..a5678040 --- /dev/null +++ b/dell/precision/3490/intel/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../shared.nix + ]; +} diff --git a/dell/precision/3490/nvidia/default.nix b/dell/precision/3490/nvidia/default.nix new file mode 100644 index 00000000..379ea1f5 --- /dev/null +++ b/dell/precision/3490/nvidia/default.nix @@ -0,0 +1,12 @@ +{ + imports = [ + ../shared.nix + ../../../../common/gpu/nvidia/ada-lovelace + ]; + + + hardware.nvidia.prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} diff --git a/dell/precision/3490/shared.nix b/dell/precision/3490/shared.nix new file mode 100644 index 00000000..a4de2011 --- /dev/null +++ b/dell/precision/3490/shared.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../../../common/cpu/intel/meteor-lake + ../../../common/pc/laptop + ]; +} diff --git a/flake.nix b/flake.nix index 048a59b7..97a3aef2 100644 --- a/flake.nix +++ b/flake.nix @@ -83,7 +83,11 @@ dell-latitude-e7240 = import ./dell/latitude/e7240; dell-optiplex-3050 = import ./dell/optiplex/3050; dell-poweredge-r7515 = import ./dell/poweredge/r7515; - dell-precision-3490 = import ./dell/precision/3490; + dell-precision-3490 = + deprecated "1491" "dell-precision-3490" + (import ./dell/precision/3490); + dell-precision-3490-nvidia = import ./dell/precision/3490/nvidia; + dell-precision-3490-intel = import ./dell/precision/3490/intel; dell-precision-3541 = import ./dell/precision/3541; dell-precision-5490 = import ./dell/precision/5490; dell-precision-5530 = import ./dell/precision/5530; From 12b4b1a92966020c748097e5feaf8a2ce585abe7 Mon Sep 17 00:00:00 2001 From: Leandro Reina Date: Fri, 6 Jun 2025 19:38:14 +0200 Subject: [PATCH 1327/1476] Add support for TUXEDO InfinityBook Pro AMD Gen9 --- flake.nix | 1 + tuxedo/infinitybook/pro14/gen9/amd/README.md | 1 + tuxedo/infinitybook/pro14/gen9/amd/default.nix | 6 ++++++ tuxedo/infinitybook/pro14/gen9/{ => intel}/README.md | 0 4 files changed, 8 insertions(+) create mode 100644 tuxedo/infinitybook/pro14/gen9/amd/README.md create mode 100644 tuxedo/infinitybook/pro14/gen9/amd/default.nix rename tuxedo/infinitybook/pro14/gen9/{ => intel}/README.md (100%) diff --git a/flake.nix b/flake.nix index 9fa91b25..f22412b6 100644 --- a/flake.nix +++ b/flake.nix @@ -353,6 +353,7 @@ tuxedo-aura-15-gen1 = import ./tuxedo/aura/15/gen1; tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7; + tuxedo-infinitybook-pro14-gen9-amd = import ./tuxedo/infinitybook/pro14/gen9/amd; tuxedo-infinitybook-pro14-gen9-intel = import ./tuxedo/infinitybook/pro14/gen9/intel; tuxedo-pulse-14-gen3 = import ./tuxedo/pulse/14/gen3; tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; diff --git a/tuxedo/infinitybook/pro14/gen9/amd/README.md b/tuxedo/infinitybook/pro14/gen9/amd/README.md new file mode 100644 index 00000000..9f8c4038 --- /dev/null +++ b/tuxedo/infinitybook/pro14/gen9/amd/README.md @@ -0,0 +1 @@ +# [TUXEDO InfinityBook Pro 14 - Gen9 - AMD](https://www.tuxedocomputers.com/en/TUXEDO-InfinityBook-Pro-14-Gen9-AMD) diff --git a/tuxedo/infinitybook/pro14/gen9/amd/default.nix b/tuxedo/infinitybook/pro14/gen9/amd/default.nix new file mode 100644 index 00000000..15452013 --- /dev/null +++ b/tuxedo/infinitybook/pro14/gen9/amd/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../. + ../../../../../common/cpu/amd + ]; +} diff --git a/tuxedo/infinitybook/pro14/gen9/README.md b/tuxedo/infinitybook/pro14/gen9/intel/README.md similarity index 100% rename from tuxedo/infinitybook/pro14/gen9/README.md rename to tuxedo/infinitybook/pro14/gen9/intel/README.md From ddd49b38e4994c200e9d1f135a5d1c5e52ea8932 Mon Sep 17 00:00:00 2001 From: Leandro Reina Date: Fri, 6 Jun 2025 20:03:11 +0200 Subject: [PATCH 1328/1476] Forgot README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f20d7a3e..07ec6308 100644 --- a/README.md +++ b/README.md @@ -398,7 +398,8 @@ See code for all available configurations. | [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | | [TUXEDO Aura 15 - Gen1](tuxedo/aura/15/gen1) | `` | | [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | -| [TUXEDO InfinityBook Pro 14 - Gen9 - INTEL](tuxedo/infinitybook/pro14/gen9-intel) | `` | +| [TUXEDO InfinityBook Pro 14 - Gen9 - AMD](tuxedo/infinitybook/pro14/gen9/amd) | `` | +| [TUXEDO InfinityBook Pro 14 - Gen9 - INTEL](tuxedo/infinitybook/pro14/gen9/intel) | `` | | [TUXEDO Pulse 14 - Gen3](tuxedo/pulse/14/gen3) | `` | | [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | | [Xiaomi Redmibook 16 Pro 2024](xiaomi/redmibook/16-pro-2024) | `` | From 62acc1db8ecebdda404eb86a0e3c947f4ec573ea Mon Sep 17 00:00:00 2001 From: Weathercold Date: Wed, 11 Jun 2025 00:38:36 -0400 Subject: [PATCH 1329/1476] xiaomi/redmibook/16-pro-2024: remove boot fix This option was enabled in the NixOS kernel config in https://github.com/NixOS/nixpkgs/pull/410324 --- xiaomi/fix-boot-quirk.nix | 12 ------------ xiaomi/redmibook/16-pro-2024/README.md | 3 --- xiaomi/redmibook/16-pro-2024/default.nix | 1 - 3 files changed, 16 deletions(-) delete mode 100644 xiaomi/fix-boot-quirk.nix diff --git a/xiaomi/fix-boot-quirk.nix b/xiaomi/fix-boot-quirk.nix deleted file mode 100644 index 7f8446e3..00000000 --- a/xiaomi/fix-boot-quirk.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ lib, ... }: -{ - # Required fix to allow booting NixOS on certain Xiaomi laptops - # https://discourse.nixos.org/t/system-wont-boot-path-efi-stub/29212/12 - boot.kernelPatches = lib.singleton { - name = "Fix boot"; - patch = null; - extraStructuredConfig = with lib.kernel; { - ACPI_DEBUG = yes; - }; - }; -} diff --git a/xiaomi/redmibook/16-pro-2024/README.md b/xiaomi/redmibook/16-pro-2024/README.md index 7fa95c05..d63bcfb6 100644 --- a/xiaomi/redmibook/16-pro-2024/README.md +++ b/xiaomi/redmibook/16-pro-2024/README.md @@ -1,8 +1,5 @@ # Xiaomi Redmibook 16 Pro (2024) -Note that the boot fix requires building the kernel. As such, you might run out -of space during nixos-rebuild if you mount tmpfs on `/tmp`. - ## Tested Hardware ```shellsession diff --git a/xiaomi/redmibook/16-pro-2024/default.nix b/xiaomi/redmibook/16-pro-2024/default.nix index 35fe687d..1c824b15 100644 --- a/xiaomi/redmibook/16-pro-2024/default.nix +++ b/xiaomi/redmibook/16-pro-2024/default.nix @@ -1,7 +1,6 @@ { lib, ... }: { imports = [ - ../../fix-boot-quirk.nix ../../../common/cpu/intel ../../../common/pc/laptop ../../../common/pc/ssd From 88c842d260a3c3bc88ca03b7f54d9e8a2b0c410e Mon Sep 17 00:00:00 2001 From: Rishabh <40533251+Rishabh5321@users.noreply.github.com> Date: Fri, 13 Jun 2025 19:33:13 +0530 Subject: [PATCH 1330/1476] xiaomi/redmibook/15-pro-2021: init --- README.md | 1 + flake.nix | 1 + xiaomi/redmibook/15-pro-2021/README.md | 37 ++++++++++++++++++++++++ xiaomi/redmibook/15-pro-2021/default.nix | 12 ++++++++ 4 files changed, 51 insertions(+) create mode 100644 xiaomi/redmibook/15-pro-2021/README.md create mode 100644 xiaomi/redmibook/15-pro-2021/default.nix diff --git a/README.md b/README.md index 07ec6308..836284c5 100644 --- a/README.md +++ b/README.md @@ -402,4 +402,5 @@ See code for all available configurations. | [TUXEDO InfinityBook Pro 14 - Gen9 - INTEL](tuxedo/infinitybook/pro14/gen9/intel) | `` | | [TUXEDO Pulse 14 - Gen3](tuxedo/pulse/14/gen3) | `` | | [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | +| [Xiaomi Redmibook 15 Pro 2021](xiaomi/redmibook/15-pro-2021) | `` | | [Xiaomi Redmibook 16 Pro 2024](xiaomi/redmibook/16-pro-2024) | `` | diff --git a/flake.nix b/flake.nix index 2302c0be..a804dd8e 100644 --- a/flake.nix +++ b/flake.nix @@ -358,6 +358,7 @@ tuxedo-infinitybook-pro14-gen9-intel = import ./tuxedo/infinitybook/pro14/gen9/intel; tuxedo-pulse-14-gen3 = import ./tuxedo/pulse/14/gen3; tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; + xiaomi-redmibook-15-pro-2021 = import ./xiaomi/redmibook/15-pro-2021; xiaomi-redmibook-16-pro-2024 = import ./xiaomi/redmibook/16-pro-2024; common-cpu-amd = import ./common/cpu/amd; diff --git a/xiaomi/redmibook/15-pro-2021/README.md b/xiaomi/redmibook/15-pro-2021/README.md new file mode 100644 index 00000000..d47c7546 --- /dev/null +++ b/xiaomi/redmibook/15-pro-2021/README.md @@ -0,0 +1,37 @@ +# Xiaomi Redmibook 15 Pro (2021) + +## Tested Hardware + +```shellsession +$ lspci -nn +00:00.0 Host bridge [0600]: Intel Corporation Tiger Lake-UP3/H35 4 cores Host Bridge/DRAM Registers [8086:9a14] (rev 01) +00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] [8086:9a49] (rev 01) +00:04.0 Signal processing controller [1180]: Intel Corporation TigerLake-LP Dynamic Tuning Processor Participant [8086:9a03] (rev 01) +00:08.0 System peripheral [0880]: Intel Corporation GNA Scoring Accelerator module [8086:9a11] (rev 01) +00:0a.0 Signal processing controller [1180]: Intel Corporation Tigerlake Telemetry Aggregator Driver [8086:9a0d] (rev 01) +00:0d.0 USB controller [0c03]: Intel Corporation Tiger Lake-LP Thunderbolt 4 USB Controller [8086:9a13] (rev 01) +00:14.0 USB controller [0c03]: Intel Corporation Tiger Lake-LP USB 3.2 Gen 2x1 xHCI Host Controller [8086:a0ed] (rev 20) +00:14.2 RAM memory [0500]: Intel Corporation Tiger Lake-LP Shared SRAM [8086:a0ef] (rev 20) +00:14.3 Network controller [0280]: Intel Corporation Wi-Fi 6 AX201 [8086:a0f0] (rev 20) +00:15.0 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #0 [8086:a0e8] (rev 20) +00:15.1 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #1 [8086:a0e9] (rev 20) +00:15.2 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #2 [8086:a0ea] (rev 20) +00:15.3 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #3 [8086:a0eb] (rev 20) +00:16.0 Communication controller [0780]: Intel Corporation Tiger Lake-LP Management Engine Interface [8086:a0e0] (rev 20) +00:19.0 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #4 [8086:a0c5] (rev 20) +00:19.1 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #5 [8086:a0c6] (rev 20) +00:1d.0 PCI bridge [0604]: Intel Corporation Tiger Lake-LP PCI Express Root Port #9 [8086:a0b0] (rev 20) +00:1d.3 PCI bridge [0604]: Intel Corporation Tiger Lake-LP PCI Express Root Port #12 [8086:a0b3] (rev 20) +00:1f.0 ISA bridge [0601]: Intel Corporation Tiger Lake-LP LPC Controller [8086:a082] (rev 20) +00:1f.3 Multimedia audio controller [0401]: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller [8086:a0c8] (rev 20) +00:1f.4 SMBus [0c05]: Intel Corporation Tiger Lake-LP SMBus Controller [8086:a0a3] (rev 20) +00:1f.5 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP SPI Controller [8086:a0a4] (rev 20) +01:00.0 Non-Volatile memory controller [0108]: Shenzhen Longsys Electronics Co., Ltd. FORESEE XP1000 / Lexar Professional CFexpress Type B Gold series, NM620 PCIe NVME SSD (DRAM-less) [1d97:5216] (rev 01) +02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15) +``` + +## Extra Configuration + +### Bluetooth + +To enable bluetooth support, set `hardware.bluetooth.enable = true;`. diff --git a/xiaomi/redmibook/15-pro-2021/default.nix b/xiaomi/redmibook/15-pro-2021/default.nix new file mode 100644 index 00000000..1c824b15 --- /dev/null +++ b/xiaomi/redmibook/15-pro-2021/default.nix @@ -0,0 +1,12 @@ +{ lib, ... }: +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + hardware.enableRedistributableFirmware = lib.mkDefault true; + + services.thermald.enable = lib.mkDefault true; +} From 16aad554b0f1a5ac40cce80c8681c06d8907c56b Mon Sep 17 00:00:00 2001 From: Rituraj <56511165+imxade@users.noreply.github.com> Date: Sun, 15 Jun 2025 20:07:14 +0530 Subject: [PATCH 1331/1476] removed explicit gpu mention as it's included in cpu profile --- dell/inspiron/3442/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dell/inspiron/3442/default.nix b/dell/inspiron/3442/default.nix index 44b65ce6..0d298ff3 100644 --- a/dell/inspiron/3442/default.nix +++ b/dell/inspiron/3442/default.nix @@ -2,9 +2,8 @@ { imports = [ - ../../../common/cpu/intel + ../../../common/cpu/intel/haswell ../../../common/pc/laptop - ../../../common/gpu/intel/haswell ]; hardware.enableAllFirmware = lib.mkDefault true; From 9b86fa5d67f0192d8f2f8d3fcd8a019664b41c55 Mon Sep 17 00:00:00 2001 From: Biaogo <481622717@qq.com> Date: Mon, 16 Jun 2025 22:11:03 +0800 Subject: [PATCH 1332/1476] Add 16iah7h --- README.md | 1 + flake.nix | 1 + lenovo/legion/16iah7h/default.nix | 31 +++++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 lenovo/legion/16iah7h/default.nix diff --git a/README.md b/README.md index 836284c5..758c2ab2 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,7 @@ See code for all available configurations. | [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia) | `` | | [Lenovo Legion 5 Pro 16arh7h (IGPU Only)](lenovo/legion/16arh7h/igpu-only) | `` | | [Lenovo Legion 5 Pro 16arh7h (Hybrid)](lenovo/legion/16arh7h/hybrid) | `` | +| [Legion Legion 5 Pro 16IAH7H (Intel)](lenovo/legion/16iah7h/) | `` | | [Lenovo Legion 7 16achg6 (Hybrid)](lenovo/legion/16achg6/hybrid) | `` | | [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `` | | [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | diff --git a/flake.nix b/flake.nix index a804dd8e..389be153 100644 --- a/flake.nix +++ b/flake.nix @@ -180,6 +180,7 @@ lenovo-legion-16achg6-nvidia = import ./lenovo/legion/16achg6/nvidia; lenovo-legion-16aph8 = import ./lenovo/legion/16aph8; lenovo-legion-16arha7 = import ./lenovo/legion/16arha7; + lenovo-legion-16iah7h = import ./lenovo/legion/16iah7h; lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h; lenovo-legion-16irx9h = import ./lenovo/legion/16irx9h; diff --git a/lenovo/legion/16iah7h/default.nix b/lenovo/legion/16iah7h/default.nix new file mode 100644 index 00000000..cf1fe5f8 --- /dev/null +++ b/lenovo/legion/16iah7h/default.nix @@ -0,0 +1,31 @@ +{ + lib, + config, + ... +}: { + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ampere + ../../../common/pc/laptop + ../../../common/pc/ssd + ../../../common/hidpi.nix + ]; + + boot.extraModulePackages = [config.boot.kernelPackages.lenovo-legion-module]; + + hardware = { + nvidia = { + powerManagement.enable = lib.mkDefault true; + + prime = { + intelBusId = "PCI:00:02:0"; + nvidiaBusId = "PCI:01:00:0"; + }; + }; + }; + + services.thermald.enable = lib.mkDefault true; + + services.xserver.dpi = 189; +} From 66b2b86107252af9524305096d91368674850ed4 Mon Sep 17 00:00:00 2001 From: AlexAntonik Date: Wed, 18 Jun 2025 22:48:44 +0300 Subject: [PATCH 1333/1476] add module names to README, add missing modulle declaration, fix typos Signed-off-by: AlexAntonik --- README.md | 664 +++++++++++++++++++++++++++--------------------------- flake.nix | 1 + 2 files changed, 333 insertions(+), 332 deletions(-) diff --git a/README.md b/README.md index 758c2ab2..dce01f4a 100644 --- a/README.md +++ b/README.md @@ -73,335 +73,335 @@ For questions and discussions, come join us in the [nixos-anywhere matrix](https See code for all available configurations. -| Model | Path | -| --------------------------------------------------------------------------------- | ------------------------------------------------------- | -| [Acer Aspire 4810T](acer/aspire/4810t) | `` | -| [Airis N990](airis/n990) | `` | -| [Apple iMac 14.2](apple/imac/14-2) | `` | -| [Apple iMac 18.2](apple/imac/18-2) | `` | -| [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | -| [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | -| [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | -| [Apple MacBook Air 7,X](apple/macbook-air/7) | `` | -| [Apple MacBook Pro 8,1](apple/macbook-pro/8-1) | `` | -| [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | -| [Apple MacBook Pro 11,1](apple/macbook-pro/11-1) | `` | -| [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | -| [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | -| [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | -| [Apple MacMini (2010, Intel, Nvidia)](apple/macmini/4) | `` | -| [Apple Macs with a T2 Chip](apple/t2) | `` | -| [Aoostar R1 N100](aoostar/r1/n100) | `` | -| [Asus Pro WS X570-ACE](asus/pro-ws-x570-ace) | `` | -| [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | -| [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/amdgpu) | `` | -| [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/nvidia) | `` | -| [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | -| [Asus ROG Strix G533ZW](asus/rog-strix/g533zw) | `` | -| [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `` | -| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | -| [Asus ROG Strix X570-E GAMING](asus/rog-strix/x570e) | `` | -| [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | -| [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | -| [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/amdgpu) | `` | -| [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/nvidia) | `` | -| [Asus ROG Zephyrus G15 GA502](asus/zephyrus/ga502) | `` | -| [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | -| [Asus ROG Zephyrus G16 GU605MY](asus/zephyrus/gu605my) | `` | -| [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | -| [Asus TUF FX504GD](asus/fx504gd) | `` | -| [Asus TUF FX506HM](asus/fx506hm) | `` | -| [Asus TUF FA506IC](asus/fa506ic) | `` | -| [Asus TUF FA507RM](asus/fa507rm) | `` | -| [Asus TUF FA507NV](asus/fa507nv) | `` | -| [Asus Zenbook Duo 14 UX481](asus/zenbook/ux481/intelgpu/) | `` | -| [Asus Zenbook Duo 14 UX481](asus/zenbook/ux481/nvidia/) | `` | -| [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `` | -| [Asus Zenbook Pro 15 UX535](asus/zenbook/ux535/) | `` | -| [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | -| [Chuwi MiniBook X](chuwi/minibook-x) | `` | -| [Deciso DEC series](deciso/dec) | `` | -| [Dell G3 3779](dell/g3/3779) | `` | -| [Dell G3 3579](dell/g3/3579) | `` | -| [Dell Inspiron 3442](dell/inspiron/3442) | `` | -| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | -| [Dell Inspiron 5509](dell/inspiron/5509) | `` | -| [Dell Inspiron 5515](dell/inspiron/5515) | `` | -| [Dell Inspiron 7405](dell/inspiron/7405) | `` | -| [Dell Inspiron 7460](dell/inspiron/7460) | `` | -| [Dell Inspiron 7559](dell/inspiron/7559) | `` | -| [Dell Latitude 3340](dell/latitude/3340) | `` | -| [Dell Latitude 3480](dell/latitude/3480) | `` | -| [Dell Latitude 5490](dell/latitude/5490) | `` | -| [Dell Latitude 5520](dell/latitude/5520) | `` | -| [Dell Latitude 7280](dell/latitude/7280) | `` | -| [Dell Latitude 7390](dell/latitude/7390) | `` | -| [Dell Latitude 7420](dell/latitude/7420) | `` | -| [Dell Latitude 7430](dell/latitude/7430) | `` | -| [Dell Latitude 7490](dell/latitude/7490) | `` | -| [Dell Latitude 9430](dell/latitude/9430) | `` | -| [Dell Latitude E7240](dell/latitude/e7240) | `` | -| [Dell Optiplex 3050](dell/optiplex/3050) | `` | -| [Dell Poweredge R7515](dell/poweredge/r7515) | `` | -| [Dell Precision 3490, nvidia](dell/precision/3490/nvidia) | `` | -| [Dell Precision 3490, intel](dell/precision/3490/intel) | `` | -| [Dell Precision 3541](dell/precision/3541) | `` | -| [Dell Precision 5490](dell/precision/5490) | `` | -| [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) | `` | -| [Dell XPS 13 9315](dell/xps/13-9315) | `` | -| [Dell XPS 13 9333](dell/xps/13-9333) | `` | -| [Dell XPS 13 9343](dell/xps/13-9343) | `` | -| [Dell XPS 13 9350](dell/xps/13-9350) | `` | -| [Dell XPS 13 9360](dell/xps/13-9360) | `` | -| [Dell XPS 13 9370](dell/xps/13-9370) | `` | -| [Dell XPS 13 9380](dell/xps/13-9380) | `` | -| [Dell XPS 15 7590, nvidia](dell/xps/15-7590/nvidia) | `` | -| [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 9510, nvidia](dell/xps/15-9510/nvidia) | `` | -| [Dell XPS 15 9510](dell/xps/15-9510) | `` | -| [Dell XPS 15 9520, nvidia](dell/xps/15-9520/nvidia) | `` | -| [Dell XPS 15 9520](dell/xps/15-9520) | `` | -| [Dell XPS 15 9530, nvidia](dell/xps/15-9520/nvidia) | `` | -| [Dell XPS 15 9420](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) | `` | -| [Dell XPS 15 9560, nvidia only](dell/xps/15-9560/nvidia) | `` | -| [Dell XPS 15 9560](dell/xps/15-9560) | `` | -| [Dell XPS 15 9570, intel only](dell/xps/15-9570/intel) | `` | -| [Dell XPS 15 9570, nvidia](dell/xps/15-9570/nvidia) | `` | -| [Dell XPS 15 9570](dell/xps/15-9570) | `` | -| [Dell XPS 17 9700, intel](dell/xps/17-9700/intel) | `` | -| [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | -| [Framework 11th Gen Intel Core](framework/13-inch/11th-gen-intel) | `` | -| [Framework 12th Gen Intel Core](framework/13-inch/12th-gen-intel) | `` | -| [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `` | -| [Framework Intel Core Ultra Series 1](framework/13-inch/intel-core-ultra-series1) | `` | -| [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | -| [Framework 13 AMD AI 300 Series](framework/13-inch/amd-ai-300-series) | `` | -| [Framework 12 13th Gen Intel Core](framework/12-inch/13th-gen-intel) | `` | -| [Framework 16 AMD Ryzen 7040 Series](framework/16-inch/7040-amd) | `` | -| [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | -| [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | -| [Focus M2 Gen 1](focus/m2/gen1) | `` | -| [Gigabyte B550](gigabyte/b550) | `` | -| [Gigabyte B650](gigabyte/b650) | `` | -| [GMKtec NucBox G3 Plus](gmktec/nucbox/g3-plus) | `` | -| [GPD MicroPC](gpd/micropc) | `` | -| [GPD P2 Max](gpd/p2-max) | `` | -| [GPD Pocket 3](gpd/pocket-3) | `` | -| [GPD Pocket 4](gpd/pocket-4) | `` | -| [GPD WIN 2](gpd/win-2) | `` | -| [GPD WIN Max 2 2023](gpd/win-max-2/2023) | `` | -| [GPD WIN Mini 2024](gpd/win-mini/2024) | `` | -| [Google Pixelbook](google/pixelbook) | `` | -| [HP Elitebook 2560p](hp/elitebook/2560p) | `` | -| [HP Elitebook 830g6](hp/elitebook/830/g6) | `` | -| [HP Elitebook 845g7](hp/elitebook/845/g7) | `` | -| [HP Elitebook 845g8](hp/elitebook/845/g8) | `` | -| [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | -| [HP Laptop 14s-dq2024nf](hp/laptop/14s-dq2024nf) | `` | -| [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | -| [HP Probook 440G5](hp/probook/440g5) | `` | -| [Huawei Matebook X Pro (2020)](huawei/machc-wa) | `` | -| [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | -| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | -| [Lenovo IdeaCentre K330](lenovo/ideacentre/k330) | `` | -| [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `` | -| [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | -| [Lenovo IdeaPad Gaming 3 15ach6](lenovo/ideapad/15ach6) | `` | -| [Lenovo IdeaPad 5 Pro 14imh9](lenovo/ideapad/14imh9) | `` | -| [Lenovo IdeaPad 5 Pro 16ach6](lenovo/ideapad/16ach6) | `` | -| [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | -| [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | -| [Lenovo IdeaPad Slim 5 16iah8](lenovo/ideapad/16iah8) | `` | -| [Lenovo Legion 5 15ach6h](lenovo/legion/15ach6h) | `` | -| [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | -| [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | -| [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | -| [Lenovo Legion 5 Pro 16ach6h (Hybrid)](lenovo/legion/16ach6h/hybrid) | `` | -| [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia) | `` | -| [Lenovo Legion 5 Pro 16arh7h (IGPU Only)](lenovo/legion/16arh7h/igpu-only) | `` | -| [Lenovo Legion 5 Pro 16arh7h (Hybrid)](lenovo/legion/16arh7h/hybrid) | `` | -| [Legion Legion 5 Pro 16IAH7H (Intel)](lenovo/legion/16iah7h/) | `` | -| [Lenovo Legion 7 16achg6 (Hybrid)](lenovo/legion/16achg6/hybrid) | `` | -| [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `` | -| [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | -| [Lenovo Legion 7 Pro 16irx9h (Intel)](lenovo/legion/16irx9h) | `` | -| [Lenovo Legion Slim 7 Gen 7 (AMD)](lenovo/legion/16arha7/) | `` | -| [Lenovo Legion T5 AMR5](lenovo/legion/t526amr5) | `` | -| [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | -| [Lenovo ThinkPad A475](lenovo/thinkpad/a475) | `` | -| [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | -| [Lenovo ThinkPad E14 (Intel - Gen 1)](lenovo/thinkpad/e14/intel) | `` | -| [Lenovo ThinkPad E14 (Intel - Gen 4)](lenovo/thinkpad/e14/intel/gen4) | `` | -| [Lenovo ThinkPad E14 (Intel - Gen 6)](lenovo/thinkpad/e14/intel/gen6) | `` | -| [Lenovo ThinkPad E15 (Intel)](lenovo/thinkpad/e15/intel) | `` | -| [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | -| [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | -| [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13/yoga) | `` | -| [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | -| [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | -| [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | -| [Lenovo ThinkPad L480](lenovo/thinkpad/l480) | `` | -| [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | -| [Lenovo ThinkPad P14s AMD Gen 1](lenovo/thinkpad/p14s/amd/gen1) | `` | -| [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | -| [Lenovo ThinkPad P14s AMD Gen 3](lenovo/thinkpad/p14s/amd/gen3) | `` | -| [Lenovo ThinkPad P14s AMD Gen 4](lenovo/thinkpad/p14s/amd/gen4) | `` | -| [Lenovo ThinkPad P14s AMD Gen 5](lenovo/thinkpad/p14s/amd/gen5) | `` | -| [Lenovo ThinkPad P14s Intel Gen 3](lenovo/thinkpad/p14s/intel/gen3) | `` | -| [Lenovo ThinkPad P14s Intel Gen 5](lenovo/thinkpad/p14s/intel/gen5) | `` | -| [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | -| [Lenovo ThinkPad P16s AMD Gen 2](lenovo/thinkpad/p16s/amd/gen2) | `` | -| [Lenovo ThinkPad P16s Intel Gen 2](lenovo/thinkpad/p16s/intel/gen2) | `` | -| [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | -| [Lenovo ThinkPad P43s](lenovo/thinkpad/p43s) | `` | -| [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | -| [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `` | -| [Lenovo ThinkPad P52](lenovo/thinkpad/p52) | `` | -| [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | -| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | -| [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | -| [Lenovo ThinkPad T14 AMD Gen 3](lenovo/thinkpad/t14/amd/gen3) | `` | -| [Lenovo ThinkPad T14 AMD Gen 4](lenovo/thinkpad/t14/amd/gen4) | `` | -| [Lenovo ThinkPad T14 AMD Gen 5](lenovo/thinkpad/t14/amd/gen5) | `` | -| [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | -| [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | -| [Lenovo ThinkPad T14s AMD Gen 4](lenovo/thinkpad/t14s/amd/gen4) | `` | -| [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | -| [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `` | -| [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `` | -| [Lenovo ThinkPad T430](lenovo/thinkpad/t430) | `` | -| [Lenovo ThinkPad T440p](lenovo/thinkpad/t440p) | `` | -| [Lenovo ThinkPad T440s](lenovo/thinkpad/t440s) | `` | -| [Lenovo ThinkPad T450s](lenovo/thinkpad/t450s) | `` | -| [Lenovo ThinkPad T460](lenovo/thinkpad/t460) | `` | -| [Lenovo ThinkPad T460p](lenovo/thinkpad/t460p) | `` | -| [Lenovo ThinkPad T460s](lenovo/thinkpad/t460s) | `` | -| [Lenovo ThinkPad T470s](lenovo/thinkpad/t470s) | `` | -| [Lenovo ThinkPad T480](lenovo/thinkpad/t480) | `` | -| [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `` | -| [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | -| [Lenovo ThinkPad T490s](lenovo/thinkpad/t490s) | `` | -| [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | -| [Lenovo ThinkPad T520](lenovo/thinkpad/t520) | `` | -| [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | -| [Lenovo ThinkPad T590](lenovo/thinkpad/t590) | `` | -| [Lenovo ThinkPad W520](lenovo/thinkpad/w520) | `` | -| [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | -| [Lenovo ThinkPad X1 Yoga Gen 7](lenovo/thinkpad/x1/yoga/7th-gen/) | `` | -| [Lenovo ThinkPad X1 Yoga Gen 8](lenovo/thinkpad/x1/yoga/8th-gen/) | `` | -| [Lenovo ThinkPad X1 (2nd Gen)](lenovo/thinkpad/x1/2nd-gen) | `` | -| [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | -| [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | -| [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | -| [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `` | -| [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `` | -| [Lenovo ThinkPad X1 (12th Gen)](lenovo/thinkpad/x1/12th-gen) | `` | -| [Lenovo ThinkPad X1 (13th Gen)](lenovo/thinkpad/x1/13th-gen) | `` | -| [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | -| [Lenovo ThinkPad X1 Extreme Gen 3](lenovo/thinkpad/x1-extreme/gen3) | `` | -| [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | -| [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | -| [Lenovo ThinkPad X13s](lenovo/thinkpad/x13s) | `` | -| [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | -| [Lenovo ThinkPad X13 Yoga (3th Gen)](lenovo/thinkpad/x13/yoga/3th-gen) | `` | -| [Lenovo ThinkPad X13 (Intel)](lenovo/thinkpad/x13/intel) | `` | -| [Lenovo ThinkPad X13 (AMD)](lenovo/thinkpad/x13/amd) | `` | -| [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | -| [Lenovo ThinkPad X200s](lenovo/thinkpad/x200s) | `` | -| [Lenovo ThinkPad X220](lenovo/thinkpad/x220) | `` | -| [Lenovo ThinkPad X230](lenovo/thinkpad/x230) | `` | -| [Lenovo ThinkPad X250](lenovo/thinkpad/x250) | `` | -| [Lenovo ThinkPad X260](lenovo/thinkpad/x260) | `` | -| [Lenovo ThinkPad X270](lenovo/thinkpad/x270) | `` | -| [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | -| [Lenovo ThinkPad X390](lenovo/thinkpad/x390) | `` | -| [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | -| [Lenovo ThinkPad Z13 Gen 1](lenovo/thinkpad/z/gen1/z13) | `` | -| [Lenovo ThinkPad Z13 Gen 2](lenovo/thinkpad/z/gen2/z13) | `` | -| [Lenovo XiaoXin Pro 14imh9 2024](lenovo/ideapad/14imh9) | `` | -| [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | -| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/amdgpu) | `` | -| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `` | -| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Integrated)](lenovo/yoga/7/14IAH7/integrated) | `` | -| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Hybrid)](lenovo/yoga/7/14IAH7/hybrid) | `` | -| [Lenovo Yoga Slim 7 14ILL10](lenovo/yoga/7/14ILL10) | `` | -| [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `` | -| [MSI B550-A PRO](msi/b550-a-pro) | `` | -| [MSI B350 TOMAHAWK](msi/b350-tomahawk) | `` | -| [MSI GS60 2QE](msi/gs60) | `` | -| [MSI GL62/CX62](msi/gl62) | `` | -| [MSI GL65 10SDR-492](msi/gl65/10SDR-492) | `` | -| [Microchip Icicle Kit](microchip/icicle-kit) | `` | -| [Microsoft Surface Go](microsoft/surface/surface-go) | `` | -| [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel) | `` | -| [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd) | `` | -| [Microsoft Surface Range (Common Modules)](microsoft/surface/common) | `` | -| [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | -| [Microsoft Surface Pro 9](microsoft/surface-pro/9) | `` | -| [Morefine M600](morefine/m600) | `` | -| [Minisforum V3](minisforum/v3) | `` | -| [NXP iMX8 MPlus Evaluation Kit](nxp/imx8mp-evk) | `` | -| [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | -| [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | -| [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | -| [Hardkernel Odroid H4](hardkernel/odroid-h4/default.nix) | `` | -| [Omen 14-fb0798ng](omen/14-fb0798ng) | `` | -| [Omen 15-ce002ns](omen/15-ce002ns) | `` | -| [Omen 15-en0010ca](omen/15-en0010ca) | `` | -| [Omen 16-n0005ne](omen/16-n0005ne) | `` | -| [Omen 16-n0280nd](/omen/16-n0280nd) | `` | -| [Omen 15-en1007sa](omen/15-en1007sa) | `` | -| [Omen 15-en0002np](omen/15-en0002np) | `` | -| [One-Netbook OneNetbook 4](onenetbook/4) | `` | -| [Panasonic Let's Note CF-LX4](panasonic/letsnote/cf-lx4) | `` | -| [PC Engines APU](pcengines/apu) | `` | -| [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | -| [PINE64 RockPro64](pine64/rockpro64/) | `` | -| [PINE64 STAR64](pine64/star64/) | `` | -| [Protectli VP4670](protectli/vp4670/) | `` | -| [Purism Librem 13v3](purism/librem/13v3) | `` | -| [Purism Librem 15v3](purism/librem/13v3) | `` | -| [Purism Librem 5r4](purism/librem/5r4) | `` | -| [Radxa ROCK 4C+](radxa/rock-4c-plus) | `` | -| [Radxa ROCK 5 Model B](radxa/rock-5b) | `` | -| [Radxa ROCK Pi 4](radxa/rock-pi-4) | `` | -| [Radxa ROCK Pi E](radxa/rock-pi-e) | `` | -| [Raspberry Pi 2](raspberry-pi/2) | `` | -| [Raspberry Pi 3](raspberry-pi/3) | `` | -| [Raspberry Pi 4](raspberry-pi/4) | `` | -| [Raspberry Pi 5](raspberry-pi/5) | `` | -| [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | -| [Slimbook Hero RPL-RTX](slimbook/hero/rpl-rtx) | `` | -| [StarFive VisionFive v1](starfive/visionfive/v1) | `` | -| [StarFive VisionFive 2](starfive/visionfive/v2) | `` | -| [StarLabs StarLite 5 (I5)](starlabs/starlite/i5) | `` | -| [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | -| [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | -| [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | -| [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | -| [System76 (generic)](system76) | `` | -| [System76 Darter Pro 6](system76/darp6) | `` | -| [System76 Gazelle 18](system76/gaze18) | `` | -| [System76 Galago Pro 5](system76/galp5-1650) | `` | -| [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | -| [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | -| [TUXEDO Aura 15 - Gen1](tuxedo/aura/15/gen1) | `` | -| [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | -| [TUXEDO InfinityBook Pro 14 - Gen9 - AMD](tuxedo/infinitybook/pro14/gen9/amd) | `` | -| [TUXEDO InfinityBook Pro 14 - Gen9 - INTEL](tuxedo/infinitybook/pro14/gen9/intel) | `` | -| [TUXEDO Pulse 14 - Gen3](tuxedo/pulse/14/gen3) | `` | -| [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | -| [Xiaomi Redmibook 15 Pro 2021](xiaomi/redmibook/15-pro-2021) | `` | -| [Xiaomi Redmibook 16 Pro 2024](xiaomi/redmibook/16-pro-2024) | `` | +| Model | Path | Flake Module | +| --------------------------------------------------------------------------------- | ------------------------------------------------------- | ---------------------------------- | +| [Acer Aspire 4810T](acer/aspire/4810t) | `` | `acer-aspire-4810t` | +| [Airis N990](airis/n990) | `` | `airis-n990` | +| [Apple iMac 14.2](apple/imac/14-2) | `` | `apple-imac-14-2` | +| [Apple iMac 18.2](apple/imac/18-2) | `` | `apple-imac-18-2` | +| [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | `apple-macbook-air-3` | +| [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | `apple-macbook-air-4` | +| [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | `apple-macbook-air-6` | +| [Apple MacBook Air 7,X](apple/macbook-air/7) | `` | `apple-macbook-air-7` | +| [Apple MacBook Pro 8,1](apple/macbook-pro/8-1) | `` | `apple-macbook-pro-8-1` | +| [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | `apple-macbook-pro-10-1` | +| [Apple MacBook Pro 11,1](apple/macbook-pro/11-1) | `` | `apple-macbook-pro-11-1` | +| [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | `apple-macbook-pro-11-5` | +| [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | `apple-macbook-pro-12-1` | +| [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | `apple-macbook-pro-14-1` | +| [Apple MacMini (2010, Intel, Nvidia)](apple/macmini/4) | `` | `apple-macmini-4-1` | +| [Apple Macs with a T2 Chip](apple/t2) | `` | `apple-t2` | +| [Aoostar R1 N100](aoostar/r1/n100) | `` | `aoostar-r1-n100` | +| [Asus Pro WS X570-ACE](asus/pro-ws-x570-ace) | `` | `asus-pro-ws-x570-ace` | +| [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | `asus-ally-rc71l` | +| [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/amdgpu) | `` | `asus-flow-gv302x-amdgpu` | +| [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/nvidia) | `` | `asus-flow-gv302x-nvidia` | +| [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | `asus-rog-strix-g513im` | +| [Asus ROG Strix G533ZW](asus/rog-strix/g533zw) | `` | `asus-rog-strix-g533zw` | +| [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `` | `asus-rog-strix-g713ie` | +| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | `asus-rog-strix-g733qs` | +| [Asus ROG Strix X570-E GAMING](asus/rog-strix/x570e) | `` | `asus-rog-strix-x570e` | +| [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | `asus-zephyrus-ga401` | +| [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | `asus-zephyrus-ga402` | +| [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/amdgpu) | `` | `asus-zephyrus-ga402x-amdgpu` | +| [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/nvidia) | `` | `asus-zephyrus-ga402x-nvidia` | +| [Asus ROG Zephyrus G15 GA502](asus/zephyrus/ga502) | `` | `asus-zephyrus-ga502` | +| [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | `asus-zephyrus-ga503` | +| [Asus ROG Zephyrus G16 GU605MY](asus/zephyrus/gu605my) | `` | `asus-zephyrus-gu605my` | +| [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | `asus-zephyrus-gu603h` | +| [Asus TUF FX504GD](asus/fx504gd) | `` | `asus-fx504gd` | +| [Asus TUF FX506HM](asus/fx506hm) | `` | `asus-fx506hm` | +| [Asus TUF FA506IC](asus/fa506ic) | `` | `asus-fa506ic` | +| [Asus TUF FA507RM](asus/fa507rm) | `` | `asus-fa507rm` | +| [Asus TUF FA507NV](asus/fa507nv) | `` | `asus-fa507nv` | +| [Asus Zenbook Duo 14 UX481](asus/zenbook/ux481/intelgpu/) | `` | `asus-zenbook-ux481-intelgpu` | +| [Asus Zenbook Duo 14 UX481](asus/zenbook/ux481/nvidia/) | `` | `asus-zenbook-ux481-nvidia` | +| [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `` | `asus-zenbook-ux371` | +| [Asus Zenbook Pro 15 UX535](asus/zenbook/ux535/) | `` | `asus-zenbook-ux535` | +| [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | `beagleboard-pocketbeagle` | +| [Chuwi MiniBook X](chuwi/minibook-x) | `` | `chuwi-minibook-x` | +| [Deciso DEC series](deciso/dec) | `` | `deciso-dec` | +| [Dell G3 3779](dell/g3/3779) | `` | `dell-g3-3779` | +| [Dell G3 3579](dell/g3/3579) | `` | `dell-g3-3579` | +| [Dell Inspiron 3442](dell/inspiron/3442) | `` | `dell-inspiron-3442` | +| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | `dell-inspiron-14-5420` | +| [Dell Inspiron 5509](dell/inspiron/5509) | `` | `dell-inspiron-5509` | +| [Dell Inspiron 5515](dell/inspiron/5515) | `` | `dell-inspiron-5515` | +| [Dell Inspiron 7405](dell/inspiron/7405) | `` | `dell-inspiron-7405` | +| [Dell Inspiron 7460](dell/inspiron/7460) | `` | `dell-inspiron-7460` | +| [Dell Inspiron 7559](dell/inspiron/7559) | `` | `dell-inspiron-7559` | +| [Dell Latitude 3340](dell/latitude/3340) | `` | `dell-latitude-3340` | +| [Dell Latitude 3480](dell/latitude/3480) | `` | `dell-latitude-3480` | +| [Dell Latitude 5490](dell/latitude/5490) | `` | `dell-latitude-5490` | +| [Dell Latitude 5520](dell/latitude/5520) | `` | `dell-latitude-5520` | +| [Dell Latitude 7280](dell/latitude/7280) | `` | `dell-latitude-7280` | +| [Dell Latitude 7390](dell/latitude/7390) | `` | `dell-latitude-7390` | +| [Dell Latitude 7420](dell/latitude/7420) | `` | `dell-latitude-7420` | +| [Dell Latitude 7430](dell/latitude/7430) | `` | `dell-latitude-7430` | +| [Dell Latitude 7490](dell/latitude/7490) | `` | `dell-latitude-7490` | +| [Dell Latitude 9430](dell/latitude/9430) | `` | `dell-latitude-9430` | +| [Dell Latitude E7240](dell/latitude/e7240) | `` | `dell-latitude-e7240` | +| [Dell Optiplex 3050](dell/optiplex/3050) | `` | `dell-optiplex-3050` | +| [Dell Poweredge R7515](dell/poweredge/r7515) | `` | `dell-poweredge-r7515` | +| [Dell Precision 3490, nvidia](dell/precision/3490/nvidia) | `` | `dell-precision-3490-nvidia` | +| [Dell Precision 3490, intel](dell/precision/3490/intel) | `` | `dell-precision-3490-intel` | +| [Dell Precision 3541](dell/precision/3541) | `` | `dell-precision-3541` | +| [Dell Precision 5490](dell/precision/5490) | `` | `dell-precision-5490` | +| [Dell Precision 5530](dell/precision/5530) | `` | `dell-precision-5530` | +| [Dell Precision 7520](dell/precision/7520) | `` | `dell-precision-7520` | +| [Dell XPS 13 7390](dell/xps/13-7390) | `` | `dell-xps-13-7390` | +| [Dell XPS 13 9300](dell/xps/13-9300) | `` | `dell-xps-13-9300` | +| [Dell XPS 13 9310](dell/xps/13-9310) | `` | `dell-xps-13-9310` | +| [Dell XPS 13 9315](dell/xps/13-9315) | `` | `dell-xps-13-9315` | +| [Dell XPS 13 9333](dell/xps/13-9333) | `` | `dell-xps-13-9333` | +| [Dell XPS 13 9343](dell/xps/13-9343) | `` | `dell-xps-13-9343` | +| [Dell XPS 13 9350](dell/xps/13-9350) | `` | `dell-xps-13-9350` | +| [Dell XPS 13 9360](dell/xps/13-9360) | `` | `dell-xps-13-9360` | +| [Dell XPS 13 9370](dell/xps/13-9370) | `` | `dell-xps-13-9370` | +| [Dell XPS 13 9380](dell/xps/13-9380) | `` | `dell-xps-13-9380` | +| [Dell XPS 15 7590, nvidia](dell/xps/15-7590/nvidia) | `` | `dell-xps-15-7590-nvidia` | +| [Dell XPS 15 7590](dell/xps/15-7590) | `` | `dell-xps-15-7590` | +| [Dell XPS 15 9500, nvidia](dell/xps/15-9500/nvidia) | `` | `dell-xps-15-9500-nvidia` | +| [Dell XPS 15 9500](dell/xps/15-9500) | `` | `dell-xps-15-9500` | +| [Dell XPS 15 9510, nvidia](dell/xps/15-9510/nvidia) | `` | `dell-xps-15-9510-nvidia` | +| [Dell XPS 15 9510](dell/xps/15-9510) | `` | `dell-xps-15-9510` | +| [Dell XPS 15 9520, nvidia](dell/xps/15-9520/nvidia) | `` | `dell-xps-15-9520-nvidia` | +| [Dell XPS 15 9520](dell/xps/15-9520) | `` | `dell-xps-15-9520` | +| [Dell XPS 15 9530, nvidia](dell/xps/15-9530/nvidia) | `` | `dell-xps-15-9530-nvidia` | +| [Dell XPS 15 9530](dell/xps/15-9530) | `` | `dell-xps-15-9530` | +| [Dell XPS 15 9550, nvidia](dell/xps/15-9550/nvidia) | `` | `dell-xps-15-9550-nvidia` | +| [Dell XPS 15 9550](dell/xps/15-9550) | `` | `dell-xps-15-9550` | +| [Dell XPS 15 9560, intel only](dell/xps/15-9560/intel) | `` | `dell-xps-15-9560-intel` | +| [Dell XPS 15 9560, nvidia only](dell/xps/15-9560/nvidia) | `` | `dell-xps-15-9560-nvidia` | +| [Dell XPS 15 9560](dell/xps/15-9560) | `` | `dell-xps-15-9560` | +| [Dell XPS 15 9570, intel only](dell/xps/15-9570/intel) | `` | `dell-xps-15-9570-intel` | +| [Dell XPS 15 9570, nvidia](dell/xps/15-9570/nvidia) | `` | `dell-xps-15-9570-nvidia` | +| [Dell XPS 15 9570](dell/xps/15-9570) | `` | `dell-xps-15-9570` | +| [Dell XPS 17 9700, intel](dell/xps/17-9700/intel) | `` | `dell-xps-17-9700-nvidia` | +| [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | `dell-xps-17-9710-intel` | +| [Framework 11th Gen Intel Core](framework/13-inch/11th-gen-intel) | `` | `framework-11th-gen-intel` | +| [Framework 12th Gen Intel Core](framework/12-inch/13th-gen-intel) | `` | `framework-12th-gen-intel` | +| [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `` | `framework-13th-gen-intel` | +| [Framework Intel Core Ultra Series 1](framework/13-inch/intel-core-ultra-series1) | `` | `framework-intel-core-ultra-series1` | +| [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | `framework-13-7040-amd` | +| [Framework 13 AMD AI 300 Series](framework/13-inch/amd-ai-300-series) | `` | `framework-amd-ai-300-series` | +| [Framework 12 13th Gen Intel Core](framework/12-inch/13th-gen-intel) | `` | `framework-12-13th-gen-intel` | +| [Framework 16 AMD Ryzen 7040 Series](framework/16-inch/7040-amd) | `` | `framework-16-7040-amd` | +| [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | `friendlyarm-nanopc-t4` | +| [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | `friendlyarm-nanopi-r5s` | +| [Focus M2 Gen 1](focus/m2/gen1) | `` | `focus-m2-gen1` | +| [Gigabyte B550](gigabyte/b550) | `` | `gigabyte-b550` | +| [Gigabyte B650](gigabyte/b650) | `` | `gigabyte-b650` | +| [GMKtec NucBox G3 Plus](gmktec/nucbox/g3-plus) | `` | `gmktec-nucbox-g3-plus` | +| [GPD MicroPC](gpd/micropc) | `` | `gpd-micropc` | +| [GPD P2 Max](gpd/p2-max) | `` | `gpd-p2-max` | +| [GPD Pocket 3](gpd/pocket-3) | `` | `gpd-pocket-3` | +| [GPD Pocket 4](gpd/pocket-4) | `` | `gpd-pocket-4` | +| [GPD WIN 2](gpd/win-2) | `` | `gpd-win-2` | +| [GPD WIN Max 2 2023](gpd/win-max-2/2023) | `` | `gpd-win-max-2-2023` | +| [GPD WIN Mini 2024](gpd/win-mini/2024) | `` | `gpd-win-mini-2024` | +| [Google Pixelbook](google/pixelbook) | `` | `google-pixelbook` | +| [HP Elitebook 2560p](hp/elitebook/2560p) | `` | `hp-elitebook-2560p` | +| [HP Elitebook 830g6](hp/elitebook/830/g6) | `` | `hp-elitebook-830g6` | +| [HP Elitebook 845g7](hp/elitebook/845/g7) | `` | `hp-elitebook-845g7` | +| [HP Elitebook 845g8](hp/elitebook/845/g8) | `` | `hp-elitebook-845g8` | +| [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | `hp-elitebook-845g9` | +| [HP Laptop 14s-dq2024nf](hp/laptop/14s-dq2024nf) | `` | `hp-laptop-14s-dq2024nf` | +| [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | `hp-notebook-14-df0023` | +| [HP Probook 440G5](hp/probook/440g5) | `` | `hp-probook-440G5` | +| [Huawei Matebook X Pro (2020)](huawei/machc-wa) | `` | `huawei-machc-wa` | +| [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | `nxp-imx8qm-mek` | +| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | `intel-nuc-8i7beh` | +| [Lenovo IdeaCentre K330](lenovo/ideacentre/k330) | `` | `lenovo-ideacentre-k330` | +| [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `` | `lenovo-ideapad-15alc6` | +| [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | `lenovo-ideapad-15arh05` | +| [Lenovo IdeaPad Gaming 3 15ach6](lenovo/ideapad/15ach6) | `` | `lenovo-ideapad-15ach6` | +| [Lenovo IdeaPad 5 Pro 14imh9](lenovo/ideapad/14imh9) | `` | `lenovo-ideapad-14imh9` | +| [Lenovo IdeaPad 5 Pro 16ach6](lenovo/ideapad/16ach6) | `` | `lenovo-ideapad-16ach6` | +| [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | `lenovo-ideapad-z510` | +| [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | `lenovo-ideapad-slim-5` | +| [Lenovo IdeaPad Slim 5 16iah8](lenovo/ideapad/16iah8) | `` | `lenovo-ideapad-16ahp9` | +| [Lenovo IdeaPad S145 15api](lenovo/ideapad/s145-15api) | `` | `lenovo-ideapad-s145-15api` | +| [Lenovo Legion 5 15ach6h](lenovo/legion/15ach6h) | `` | `lenovo-legion-15ach6h` | +| [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | `lenovo-legion-15arh05h` | +| [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | `lenovo-legion-15ach6` | +| [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | `lenovo-legion-16ach6h` | +| [Lenovo Legion 5 Pro 16ach6h (Hybrid)](lenovo/legion/16ach6h/hybrid) | `` | `lenovo-legion-16ach6h-hybrid` | +| [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia) | `` | `lenovo-legion-16ach6h-nvidia` | +| [Lenovo Legion 5 Pro 16arh7h (IGPU Only)](lenovo/legion/16arh7h/igpu-only) | `` | `lenovo-legion-16arh7h-igpu-only` | +| [Lenovo Legion 5 Pro 16arh7h (Hybrid)](lenovo/legion/16arh7h/hybrid) | `` | `lenovo-legion-16arh7h-hybrid` | +| [Lenovo Legion 5 Pro 16IAH7H (Intel)](lenovo/legion/16iah7h/) | `` | `lenovo-legion-16iah7h` | +| [Lenovo Legion 7 16achg6 (Hybrid)](lenovo/legion/16achg6/hybrid) | `` | `lenovo-legion-16achg6-hybrid` | +| [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `` | `lenovo-legion-16achg6-nvidia` | +| [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | `lenovo-legion-16irx8h` | +| [Lenovo Legion 7 Pro 16irx9h (Intel)](lenovo/legion/16irx9h) | `` | `lenovo-legion-16irx9h` | +| [Lenovo Legion Slim 7 Gen 7 (AMD)](lenovo/legion/16arha7/) | `` | `lenovo-legion-16arha7` | +| [Lenovo Legion T5 AMR5](lenovo/legion/t526amr5) | `` | `lenovo-legion-t526amr5` | +| [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | `lenovo-legion-15ich` | +| [Lenovo ThinkPad A475](lenovo/thinkpad/a475) | `` | `lenovo-thinkpad-a475` | +| [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | `lenovo-thinkpad-e14-amd` | +| [Lenovo ThinkPad E14 (Intel - Gen 1)](lenovo/thinkpad/e14/intel) | `` | `lenovo-thinkpad-e14-intel` | +| [Lenovo ThinkPad E14 (Intel - Gen 4)](lenovo/thinkpad/e14/intel/gen4) | `` | `lenovo-thinkpad-e14-intel-gen4` | +| [Lenovo ThinkPad E14 (Intel - Gen 6)](lenovo/thinkpad/e14/intel/gen6) | `` | `lenovo-thinkpad-e14-intel-gen6` | +| [Lenovo ThinkPad E15 (Intel)](lenovo/thinkpad/e15/intel) | `` | `lenovo-thinkpad-e15-intel` | +| [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | `lenovo-thinkpad-e470` | +| [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | `lenovo-thinkpad-e495` | +| [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13/yoga) | `` | `lenovo-thinkpad-l13-yoga` | +| [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | `lenovo-thinkpad-l13` | +| [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | `lenovo-thinkpad-l14-amd` | +| [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | `lenovo-thinkpad-l14-intel` | +| [Lenovo ThinkPad L480](lenovo/thinkpad/l480) | `` | `lenovo-thinkpad-l480` | +| [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | `lenovo-thinkpad-p1-gen3` | +| [Lenovo ThinkPad P14s AMD Gen 1](lenovo/thinkpad/p14s/amd/gen1) | `` | `lenovo-thinkpad-p14s-amd-gen1` | +| [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | `lenovo-thinkpad-p14s-amd-gen2` | +| [Lenovo ThinkPad P14s AMD Gen 3](lenovo/thinkpad/p14s/amd/gen3) | `` | `lenovo-thinkpad-p14s-amd-gen3` | +| [Lenovo ThinkPad P14s AMD Gen 4](lenovo/thinkpad/p14s/amd/gen4) | `` | `lenovo-thinkpad-p14s-amd-gen4` | +| [Lenovo ThinkPad P14s AMD Gen 5](lenovo/thinkpad/p14s/amd/gen5) | `` | `lenovo-thinkpad-p14s-amd-gen5` | +| [Lenovo ThinkPad P14s Intel Gen 3](lenovo/thinkpad/p14s/intel/gen3) | `` | `lenovo-thinkpad-p14s-intel-gen3`| +| [Lenovo ThinkPad P14s Intel Gen 5](lenovo/thinkpad/p14s/intel/gen5) | `` | `lenovo-thinkpad-p14s-intel-gen5`| +| [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | `lenovo-thinkpad-p16s-amd-gen1` | +| [Lenovo ThinkPad P16s AMD Gen 2](lenovo/thinkpad/p16s/amd/gen2) | `` | `lenovo-thinkpad-p16s-amd-gen2` | +| [Lenovo ThinkPad P16s Intel Gen 2](lenovo/thinkpad/p16s/intel/gen2) | `` | `lenovo-thinkpad-p16s-intel-gen2`| +| [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | `lenovo-thinkpad-p1` | +| [Lenovo ThinkPad P43s](lenovo/thinkpad/p43s) | `` | `lenovo-thinkpad-p43s` | +| [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | `lenovo-thinkpad-p50` | +| [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `` | `lenovo-thinkpad-p51` | +| [Lenovo ThinkPad P52](lenovo/thinkpad/p52) | `` | `lenovo-thinkpad-p52` | +| [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | `lenovo-thinkpad-p53` | +| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | `lenovo-thinkpad-t14-amd-gen1` | +| [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | `lenovo-thinkpad-t14-amd-gen2` | +| [Lenovo ThinkPad T14 AMD Gen 3](lenovo/thinkpad/t14/amd/gen3) | `` | `lenovo-thinkpad-t14-amd-gen3` | +| [Lenovo ThinkPad T14 AMD Gen 4](lenovo/thinkpad/t14/amd/gen4) | `` | `lenovo-thinkpad-t14-amd-gen4` | +| [Lenovo ThinkPad T14 AMD Gen 5](lenovo/thinkpad/t14/amd/gen5) | `` | `lenovo-thinkpad-t14-amd-gen5` | +| [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | `lenovo-thinkpad-t14` | +| [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | `lenovo-thinkpad-t14s-amd-gen1` | +| [Lenovo ThinkPad T14s AMD Gen 4](lenovo/thinkpad/t14s/amd/gen4) | `` | `lenovo-thinkpad-t14s-amd-gen4` | +| [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | `lenovo-thinkpad-t14s` | +| [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `` | `lenovo-thinkpad-t410` | +| [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `` | `lenovo-thinkpad-t420` | +| [Lenovo ThinkPad T430](lenovo/thinkpad/t430) | `` | `lenovo-thinkpad-t430` | +| [Lenovo ThinkPad T440p](lenovo/thinkpad/t440p) | `` | `lenovo-thinkpad-t440p` | +| [Lenovo ThinkPad T440s](lenovo/thinkpad/t440s) | `` | `lenovo-thinkpad-t440s` | +| [Lenovo ThinkPad T450s](lenovo/thinkpad/t450s) | `` | `lenovo-thinkpad-t450s` | +| [Lenovo ThinkPad T460](lenovo/thinkpad/t460) | `` | `lenovo-thinkpad-t460` | +| [Lenovo ThinkPad T460p](lenovo/thinkpad/t460p) | `` | `lenovo-thinkpad-t460p` | +| [Lenovo ThinkPad T460s](lenovo/thinkpad/t460s) | `` | `lenovo-thinkpad-t460s` | +| [Lenovo ThinkPad T470s](lenovo/thinkpad/t470s) | `` | `lenovo-thinkpad-t470s` | +| [Lenovo ThinkPad T480](lenovo/thinkpad/t480) | `` | `lenovo-thinkpad-t480` | +| [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `` | `lenovo-thinkpad-t480s` | +| [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | `lenovo-thinkpad-t490` | +| [Lenovo ThinkPad T490s](lenovo/thinkpad/t490s) | `` | `lenovo-thinkpad-t490s` | +| [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | `lenovo-thinkpad-t495` | +| [Lenovo ThinkPad T520](lenovo/thinkpad/t520) | `` | `lenovo-thinkpad-t520` | +| [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | `lenovo-thinkpad-t550` | +| [Lenovo ThinkPad T590](lenovo/thinkpad/t590) | `` | `lenovo-thinkpad-t590` | +| [Lenovo ThinkPad W520](lenovo/thinkpad/w520) | `` | `lenovo-thinkpad-w520` | +| [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | `lenovo-thinkpad-x1-yoga` | +| [Lenovo ThinkPad X1 Yoga Gen 7](lenovo/thinkpad/x1/yoga/7th-gen/) | `` | `lenovo-thinkpad-x1-yoga-7th-gen` | +| [Lenovo ThinkPad X1 Yoga Gen 8](lenovo/thinkpad/x1/yoga/8th-gen/) | `` | `lenovo-thinkpad-x1-yoga-8th-gen` | +| [Lenovo ThinkPad X1 (2nd Gen)](lenovo/thinkpad/x1/2nd-gen) | `` | `lenovo-thinkpad-x1-2nd-gen` | +| [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | `lenovo-thinkpad-x1-6th-gen` | +| [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | `lenovo-thinkpad-x1-7th-gen` | +| [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | `lenovo-thinkpad-x1-9th-gen` | +| [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `` | `lenovo-thinkpad-x1-10th-gen` | +| [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `` | `lenovo-thinkpad-x1-11th-gen` | +| [Lenovo ThinkPad X1 (12th Gen)](lenovo/thinkpad/x1/12th-gen) | `` | `lenovo-thinkpad-x1-12th-gen` | +| [Lenovo ThinkPad X1 (13th Gen)](lenovo/thinkpad/x1/13th-gen) | `` | `lenovo-thinkpad-x1-13th-gen` | +| [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | `lenovo-thinkpad-x1-extreme-gen2` | +| [Lenovo ThinkPad X1 Extreme Gen 3](lenovo/thinkpad/x1-extreme/gen3) | `` | `lenovo-thinkpad-x1-extreme-gen3` | +| [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | `lenovo-thinkpad-x1-extreme-gen4` | +| [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | `lenovo-thinkpad-x1-nano-gen1` | +| [Lenovo ThinkPad X13s](lenovo/thinkpad/x13s) | `` | `lenovo-thinkpad-x13s` | +| [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | `lenovo-thinkpad-x13-yoga` | +| [Lenovo ThinkPad X13 Yoga (3th Gen)](lenovo/thinkpad/x13/yoga/3th-gen) | `` | `lenovo-thinkpad-x13-yoga-3th-gen` | +| [Lenovo ThinkPad X13 (Intel)](lenovo/thinkpad/x13/intel) | `` | `lenovo-thinkpad-x13-intel` | +| [Lenovo ThinkPad X13 (AMD)](lenovo/thinkpad/x13/amd) | `` | `lenovo-thinkpad-x13-amd` | +| [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | `lenovo-thinkpad-x140e` | +| [Lenovo ThinkPad X200s](lenovo/thinkpad/x200s) | `` | `lenovo-thinkpad-x200s` | +| [Lenovo ThinkPad X220](lenovo/thinkpad/x220) | `` | `lenovo-thinkpad-x220` | +| [Lenovo ThinkPad X230](lenovo/thinkpad/x230) | `` | `lenovo-thinkpad-x230` | +| [Lenovo ThinkPad X250](lenovo/thinkpad/x250) | `` | `lenovo-thinkpad-x250` | +| [Lenovo ThinkPad X260](lenovo/thinkpad/x260) | `` | `lenovo-thinkpad-x260` | +| [Lenovo ThinkPad X270](lenovo/thinkpad/x270) | `` | `lenovo-thinkpad-x270` | +| [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | `lenovo-thinkpad-x280` | +| [Lenovo ThinkPad X390](lenovo/thinkpad/x390) | `` | `lenovo-thinkpad-x390` | +| [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | `lenovo-thinkpad-z` | +| [Lenovo ThinkPad Z13 Gen 1](lenovo/thinkpad/z/gen1/z13) | `` | `lenovo-thinkpad-z-gen1-z13` | +| [Lenovo ThinkPad Z13 Gen 2](lenovo/thinkpad/z/gen2/z13) | `` | `lenovo-thinkpad-z-gen2-z13` | +| [Lenovo XiaoXin Pro 14imh9 2024](lenovo/ideapad/14imh9) | `` | `lenovo-ideapad-14imh9` | +| [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | `lenovo-yoga-6-13ALC6` | +| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/amdgpu) | `` | `lenovo-yoga-7-14ARH7-amdgpu` | +| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `` | `lenovo-yoga-7-14ARH7-nvidia` | +| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Integrated)](lenovo/yoga/7/14IAH7/integrated) | `` | `lenovo-yoga-7-14IAH7-integrated` | +| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Hybrid)](lenovo/yoga/7/14IAH7/hybrid) | `` | `lenovo-yoga-7-14IAH7-hybrid` | +| [Lenovo Yoga Slim 7 14ILL10](lenovo/yoga/7/14ILL10) | `` | `lenovo-yoga-7-14ILL10` | +| [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `` | `lenovo-yoga-7-slim-gen8` | +| [MSI B550-A PRO](msi/b550-a-pro) | `` | `msi-b550-a-pro` | +| [MSI B350 TOMAHAWK](msi/b350-tomahawk) | `` | `msi-b350-tomahawk` | +| [MSI GS60 2QE](msi/gs60) | `` | `msi-gs60` | +| [MSI GL62/CX62](msi/gl62) | `` | `msi-gl62` | +| [MSI GL65 10SDR-492](msi/gl65/10SDR-492) | `` | `msi-gl65-10SDR-492` | +| [Microchip Icicle Kit](microchip/icicle-kit) | `` | `microchip-icicle-kit` | +| [Microsoft Surface Go](microsoft/surface/surface-go) | `` | `microsoft-surface-surface-go` | +| [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel) | `` | `microsoft-surface-surface-pro-intel` | +| [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd) | `` | `microsoft-surface-surface-laptop-amd` | +| [Microsoft Surface Range (Common Modules)](microsoft/surface/common) | `` | `microsoft-surface-common` | +| [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | `microsoft-surface-pro-3` | +| [Microsoft Surface Pro 9](microsoft/surface-pro/9) | `` | `microsoft-surface-pro-9` | +| [Morefine M600](morefine/m600) | `` | `morefine-m600` | +| [Minisforum V3](minisforum/v3) | `` | `minisforum-v3` | +| [NXP iMX8 MPlus Evaluation Kit](nxp/imx8mp-evk) | `` | `nxp-imx8mp-evk` | +| [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | `nxp-imx8mq-evk` | +| [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | `hardkernel-odroid-hc4` | +| [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | `hardkernel-odroid-h3` | +| [Hardkernel Odroid H4](hardkernel/odroid-h4/default.nix) | `` | `hardkernel-odroid-h4` | +| [Omen 14-fb0798ng](omen/14-fb0798ng) | `` | `omen-14-fb0798ng` | +| [Omen 15-ce002ns](omen/15-ce002ns) | `` | `omen-15-ce002ns` | +| [Omen 15-en0010ca](omen/15-en0010ca) | `` | `omen-15-en0010ca` | +| [Omen 16-n0005ne](omen/16-n0005ne) | `` | `omen-16-n0005ne` | +| [Omen 16-n0280nd](/omen/16-n0280nd) | `` | `omen-16-n0280nd` | +| [Omen 15-en1007sa](omen/15-en1007sa) | `` | `omen-15-en1007sa` | +| [Omen 15-en0002np](omen/15-en0002np) | `` | `omen-15-en0002np` | +| [One-Netbook OneNetbook 4](onenetbook/4) | `` | `onenetbook-4` | +| [Panasonic Let's Note CF-LX4](panasonic/letsnote/cf-lx4) | `` | `panasonic-letsnote-cf-lx4` | +| [PC Engines APU](pcengines/apu) | `` | `pcengines-apu` | +| [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | `pine64-pinebook-pro` | +| [PINE64 RockPro64](pine64/rockpro64/) | `` | `pine64-rockpro64` | +| [PINE64 STAR64](pine64/star64/) | `` | `pine64-star64` | +| [Protectli VP4670](protectli/vp4670/) | `` | `protectli-vp4670` | +| [Purism Librem 13v3](purism/librem/13v3) | `` | `purism-librem-13v3` | +| [Purism Librem 15v3](purism/librem/15v3) | `` | `purism-librem-15v3` | +| [Purism Librem 5r4](purism/librem/5r4) | `` | `purism-librem-5r4` | +| [Radxa ROCK 4C+](radxa/rock-4c-plus) | `` | `rock-4c-plus` | +| [Radxa ROCK 5 Model B](radxa/rock-5b) | `` | `rock-5b` | +| [Radxa ROCK Pi 4](radxa/rock-pi-4) | `` | `rock-pi-4` | +| [Radxa ROCK Pi E](radxa/rock-pi-e) | `` | `rock-pi-e`| +| [Raspberry Pi 2](raspberry-pi/2) | `` | `raspberry-pi-2`| +| [Raspberry Pi 3](raspberry-pi/3) | `` | `raspberry-pi-3`| +| [Raspberry Pi 4](raspberry-pi/4) | `` | `raspberry-pi-4`| +| [Raspberry Pi 5](raspberry-pi/5) | `` | `raspberry-pi-5`| +| [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | `samsung-np900x3c`| +| [Slimbook Hero RPL-RTX](slimbook/hero/rpl-rtx) | `` | `slimbook-hero-rpl-rtx`| +| [StarFive VisionFive v1](starfive/visionfive/v1) | `` | `starfive-visionfive-v1`| +| [StarFive VisionFive 2](starfive/visionfive/v2) | `` | `starfive-visionfive-2`| +| [StarLabs StarLite 5 (I5)](starlabs/starlite/i5) | `` | `starlabs-starlite-i5`| +| [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | `supermicro-a1sri-2758f`| +| [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | `supermicro-m11sdv-8c-ln4f`| +| [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | `supermicro-x10sll-f`| +| [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | `supermicro-x12scz-tln4f`| +| [System76 (generic)](system76) | `` | `system76`| +| [System76 Darter Pro 6](system76/darp6) | `` | `system76-darp6`| +| [System76 Gazelle 18](system76/gaze18) | `` | `system76-gaze18`| +| [System76 Galago Pro 5](system76/galp5-1650) | `` | `system76-galp5-1650`| +| [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | `toshiba-swanky`| +| [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | `tuxedo-infinitybook-v4`| +| [TUXEDO Aura 15 - Gen1](tuxedo/aura/15/gen1) | `` | `tuxedo-aura-15-gen1`| +| [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | `tuxedo-infinitybook-pro14-gen7`| +| [TUXEDO InfinityBook Pro 14 - Gen9 - AMD](tuxedo/infinitybook/pro14/gen9/amd) | `` | `tuxedo-infinitybook-pro14-gen9-amd`| +| [TUXEDO InfinityBook Pro 14 - Gen9 - INTEL](tuxedo/infinitybook/pro14/gen9/intel) | `` | `tuxedo-infinitybook-pro14-gen9-intel`| +| [TUXEDO Pulse 14 - Gen3](tuxedo/pulse/14/gen3) | `` | `tuxedo-pulse-14-gen3`| +| [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | `tuxedo-pulse-15-gen2`| +| [Xiaomi Redmibook 15 Pro 2021](xiaomi/redmibook/15-pro-2021) | `` | `xiaomi-redmibook-15-pro-2021`| +| [Xiaomi Redmibook 16 Pro 2024](xiaomi/redmibook/16-pro-2024) | `` | `xiaomi-redmibook-16-pro-2024`| diff --git a/flake.nix b/flake.nix index 389be153..fce2c783 100644 --- a/flake.nix +++ b/flake.nix @@ -167,6 +167,7 @@ lenovo-ideapad-16ahp9 = import ./lenovo/ideapad/16ahp9; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-ideapad-slim-5 = import ./lenovo/ideapad/slim-5; + lenovo-ideapad-s5-16iah8 = import ./lenovo/ideapad/16iah8; lenovo-ideapad-s145-15api = import ./lenovo/ideapad/s145-15api; lenovo-legion-15ach6 = import ./lenovo/legion/15ach6; lenovo-legion-15ach6h = import ./lenovo/legion/15ach6h; From e9a0908c620cfd828f477ce815d691cbf4bf86cd Mon Sep 17 00:00:00 2001 From: AlexAntonik Date: Fri, 20 Jun 2025 01:21:04 +0300 Subject: [PATCH 1334/1476] flake.nix: add more distinct common modules import support --- flake.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/flake.nix b/flake.nix index fce2c783..1e668c8a 100644 --- a/flake.nix +++ b/flake.nix @@ -384,7 +384,15 @@ common-gpu-intel = import ./common/gpu/intel; common-gpu-intel-disable = import ./common/gpu/intel/disable.nix; common-gpu-nvidia = import ./common/gpu/nvidia/prime.nix; + common-gpu-nvidia-ada-lovelace = import ./common/gpu/nvidia/ada-lovelace; + common-gpu-nvidia-ampere = import ./common/gpu/nvidia/ampere; + common-gpu-nvidia-fermi = import ./common/gpu/nvidia/fermi; + common-gpu-nvidia-kepler = import ./common/gpu/nvidia/kepler; + common-gpu-nvidia-maxwell = import ./common/gpu/nvidia/maxwell; + common-gpu-nvidia-pascal = import ./common/gpu/nvidia/pascal; + common-gpu-nvidia-turing = import ./common/gpu/nvidia/turing; common-gpu-nvidia-sync = import ./common/gpu/nvidia/prime-sync.nix; + common-gpu-nvidia-prime = import ./common/gpu/nvidia/prime.nix; common-gpu-nvidia-nonprime = import ./common/gpu/nvidia; common-gpu-nvidia-disable = import ./common/gpu/nvidia/disable.nix; common-hidpi = import ./common/hidpi.nix; From 1552a9f4513f3f0ceedcf90320e48d3d47165712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 20 Jun 2025 16:35:38 +0200 Subject: [PATCH 1335/1476] add community meetings to CONTRIBUTING.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index dce01f4a..50b78d58 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,17 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md). For questions and discussions, come join us in the [nixos-anywhere matrix](https://matrix.to/#/#nixos-hardware:nixos.org) room. +# Community Meetings + +The [NixOS hardware](https://nixos.org/community/teams/nix/) team meets regularly to discuss hardware profiles and maintenance: + +- **When**: Every 3rd Friday of the month +- **Time**: 04:00 pm (UTC) / 16:00 (UTC) +- **Where**: https://jitsi.lassul.us/Hardware-team +- **Contact**: hardware@nixos.org + +All contributors and users are welcome to join! + ## List of Profiles See code for all available configurations. From dcbb69f9bc071826aeb05e95014cb607b88f0c9b Mon Sep 17 00:00:00 2001 From: Andre Date: Sun, 22 Jun 2025 11:55:13 -0400 Subject: [PATCH 1336/1476] feat: update Surface stable kernel to 6.15.3 --- microsoft/surface/common/default.nix | 9 +++++---- .../surface/common/kernel/{6.14 => 6.15}/patches.nix | 0 microsoft/surface/common/kernel/linux-package.nix | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) rename microsoft/surface/common/kernel/{6.14 => 6.15}/patches.nix (100%) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 5d9d7d98..286383d8 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -8,7 +8,7 @@ let if kernelVersion == "longterm" then "6.12.19" else if kernelVersion == "stable" then - "6.14.2" + "6.15.3" else abort "Invalid kernel version: ${kernelVersion}"; @@ -16,7 +16,7 @@ let if kernelVersion == "longterm" then "sha256-1zvwV77ARDSxadG2FkGTb30Ml865I6KB8y413U3MZTE=" else if kernelVersion == "stable" then - "sha256-xcaCo1TqMZATk1elfTSnnlw3IhrOgjqTjhARa1d6Lhs=" + "sha256-ErUMiZJUONnNc4WgyvycQz5lYqxd8AohiJ/On1SNZbA=" else abort "Invalid kernel version: ${kernelVersion}"; @@ -25,7 +25,7 @@ let if kernelVersion == "longterm" then "6.12.7" else if kernelVersion == "stable" then - "6.14.2" + "6.15.3" else abort "Invalid kernel version: ${kernelVersion}"; @@ -33,7 +33,7 @@ let if kernelVersion == "longterm" then "sha256-Pv7O8D8ma+MPLhYP3HSGQki+Yczp8b7d63qMb6l4+mY=" else if kernelVersion == "stable" then - "sha256-Pzn+C52TtDcqDVepM5z2cVNCsnRDy0Wwn+FLwgsuicQ=" + "sha256-ozvYrZDiVtMkdCcVnNEdlF2Kdw4jivW0aMJrDynN3Hk=" else abort "Invalid kernel version: ${kernelVersion}"; @@ -52,6 +52,7 @@ let kernelPatches = surfacePatches { version = pkgVersion; patchFn = ./kernel/${versions.majorMinor pkgVersion}/patches.nix; + patchSrc = (repos.linux-surface + "/patches/${versions.majorMinor pkgVersion}"); }; kernelPackages = linuxPackage { inherit kernelPatches; version = srcVersion; diff --git a/microsoft/surface/common/kernel/6.14/patches.nix b/microsoft/surface/common/kernel/6.15/patches.nix similarity index 100% rename from microsoft/surface/common/kernel/6.14/patches.nix rename to microsoft/surface/common/kernel/6.15/patches.nix diff --git a/microsoft/surface/common/kernel/linux-package.nix b/microsoft/surface/common/kernel/linux-package.nix index 28e3e0e7..a44c4f24 100644 --- a/microsoft/surface/common/kernel/linux-package.nix +++ b/microsoft/surface/common/kernel/linux-package.nix @@ -29,7 +29,7 @@ let in linuxPackages'; surfacePatches = - { patchSrc ? (repos.linux-surface + "/patches/${versions.majorMinor version}"), + { patchSrc, version, patchFn, }: pkgs.callPackage patchFn { From 3a17771215396a208131f3217ef8fb48c395d06d Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 23 Jun 2025 01:51:09 +0200 Subject: [PATCH 1337/1476] README: fix team url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 50b78d58..7f084e64 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ For questions and discussions, come join us in the [nixos-anywhere matrix](https # Community Meetings -The [NixOS hardware](https://nixos.org/community/teams/nix/) team meets regularly to discuss hardware profiles and maintenance: +The [NixOS hardware](https://github.com/orgs/NixOS/teams/nixos-hardware) team meets regularly to discuss hardware profiles and maintenance: - **When**: Every 3rd Friday of the month - **Time**: 04:00 pm (UTC) / 16:00 (UTC) From 42dedc05793c842ab7afbfd0cf5a8ee4007d7ea5 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Wed, 25 Jun 2025 17:43:58 +0800 Subject: [PATCH 1338/1476] apple/t2: kernel 6.14 -> 6.15; sync patches --- apple/t2/pkgs/linux-t2/latest.json | 54 ++++++++++++++++++------------ apple/t2/pkgs/linux-t2/latest.nix | 4 +-- apple/t2/pkgs/linux-t2/stable.json | 34 +++++++++++++------ 3 files changed, 58 insertions(+), 34 deletions(-) diff --git a/apple/t2/pkgs/linux-t2/latest.json b/apple/t2/pkgs/linux-t2/latest.json index d02a40eb..629d74d2 100644 --- a/apple/t2/pkgs/linux-t2/latest.json +++ b/apple/t2/pkgs/linux-t2/latest.json @@ -1,49 +1,61 @@ { - "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/60a2912ad2d05f8a2d6c68a94641d912c3a555fd/", + "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/8ec11f3aaa314d25e18842851a2124c0031e2e3f/", "patches": [ { "name": "1001-Add-apple-bce-driver.patch", - "hash": "sha256-e3RPvWPj2QASGOS4kieO8YFekrXsBCJtfF82OPlOn2E=" + "hash": "sha256-00K3LmId2Ag6s5K76p7mB2a0oEXp815yRd+U5wxWPMc=" }, { "name": "1002-Put-apple-bce-in-drivers-staging.patch", "hash": "sha256-wkveNo1qwAwXWDGTFed4ZDbuBnJbwKgWLmTHK9qq0oM=" }, { - "name": "1005-HID-hid-appletb-bl-add-driver-for-the-backlight-of-A.patch", - "hash": "sha256-kEscS1FAyDxLZPOPInYTXFEf4fouBEa4zGctX14hSu8=" + "name": "1003-Fix-sparse-errors.patch", + "hash": "sha256-nuCOPWa4Hp+HCCBe6Y++M4g1k4plOWzy2hqHXlJbp9g=" }, { - "name": "1006-HID-hid-appletb-kbd-add-driver-for-the-keyboard-mode.patch", - "hash": "sha256-eVEuvnoRItaDjwWu41nn9bTkgHgY+1SL/hFAvUR2IlY=" + "name": "1004-Fix-freezing-on-turning-off-camera.patch", + "hash": "sha256-rFrSUhiNXgQbfgKjryJktYxYcchXE1PI49Q1gW001+0=" }, { - "name": "1007-HID-multitouch-support-getting-the-contact-ID-from.patch", - "hash": "sha256-A4tExJafroVAv/Hbdt7farJM6RYl/DU5KwSbzqcdEVY=" + "name": "1007-HID-multitouch-Get-the-contact-ID-from-HID_DG_TRANSD.patch", + "hash": "sha256-JF5PjByo4S1Rd/B5luAzOXDv+iakCnJfmujIQuUiT1A=" }, { "name": "1008-HID-multitouch-support-getting-the-tip-state-from-HI.patch", - "hash": "sha256-GwK+d87p3UMy66037dzq6/Zearj8gnRHhqSdZczRadY=" + "hash": "sha256-m/NAKoHRC/HwxG5fFZxFl6DtY4Xv8kPBWvdKdtadrrk=" }, { "name": "1009-HID-multitouch-take-cls-maxcontacts-into-account-for.patch", - "hash": "sha256-fywzHnCQ657UFye1ckiufral3pBwBGtKdxWqWqaFHM0=" + "hash": "sha256-h6jk9yw/4txd8PATpMxB9mIzik9+X1zP6p4K35AqdXw=" }, { - "name": "1010-HID-multitouch-allow-specifying-if-a-device-is-direc.patch", - "hash": "sha256-87SOnLgeG60Svu2Z9QUyP9P6cZ1Gznt6ZYLFImfx+vY=" + "name": "1010-HID-multitouch-specify-that-Apple-Touch-Bar-is-direc.patch", + "hash": "sha256-5PbLynVnQqlJKPTWhcmwXCkYDEopLBQWnxWvZUt0EN4=" }, { - "name": "1011-HID-multitouch-add-device-ID-for-Apple-Touch-Bars.patch", - "hash": "sha256-TJjXAlQ4WEROnq/xd6/4JHTuEJjqT7dLLcE4etKdzc0=" + "name": "1011-HID-multitouch-add-device-ID-for-Apple-Touch-Bar.patch", + "hash": "sha256-dIzEOj89D2rIEc2/mjq3TkIfI3ZHzu0VRDQQOzp+Snc=" }, { - "name": "1014-drm-format-helper-Add-conversion-from-XRGB8888-to-BG.patch", - "hash": "sha256-Ky19+cCiYDaHBh2o5IhZO8J1ExDT7o8K9cgPz+AL8Cg=" + "name": "1013-lib-vsprintf-Add-support-for-generic-FourCCs-by-exte.patch", + "hash": "sha256-g8M3j1ZPND10/LtPD/txaSoJGV9Lp+g5bgn+vQc56p4=" }, { - "name": "1015-drm-tiny-add-driver-for-Apple-Touch-Bars-in-x86-Macs.patch", - "hash": "sha256-Ga0LlaS1jWTXSKh1ClcETPJctAymC6jYBQK9wwDU4Xs=" + "name": "1014-printf-add-tests-for-generic-FourCCs.patch", + "hash": "sha256-5Z4cFBMAY695OEU/CxiGQkUz68zmKdxssD+yp1DCYgs=" + }, + { + "name": "1015-drm-appletbdrm-use-p4cl-instead-of-p4cc.patch", + "hash": "sha256-rZej0ZbpPv+8NROuYnf4Jpu9scCsmbKWyz7yf5A3G3s=" + }, + { + "name": "1016-vsprintf-Use-p4chR-instead-of-p4cn-for-reading-data-.patch", + "hash": "sha256-/Ork2CmYk6SG213Owk+nGsw7KTEVDLRzQTeWcKrPZGw=" + }, + { + "name": "1017-checkpatch-remove-p4cn.patch", + "hash": "sha256-lnMnjnMiR9WSNf/XYsiOwFdC9xKv8zSluWiR584xFPU=" }, { "name": "2008-i915-4-lane-quirk-for-mbp15-1.patch", @@ -51,7 +63,7 @@ }, { "name": "2009-apple-gmux-allow-switching-to-igpu-at-probe.patch", - "hash": "sha256-XKwlyJZjJLQz39mc0/S7sPnRnwrqMsq9OKy+QCO+oho=" + "hash": "sha256-aE+MEu/jRrZBa+3Q03quOHUsIseRED6A7N/K9kEVtbM=" }, { "name": "3001-applesmc-convert-static-structures-to-drvdata.patch", @@ -91,7 +103,7 @@ }, { "name": "4001-asahi-trackpad.patch", - "hash": "sha256-yfkTKKokb/+JtTwE0Dzht14S0nrSIwLFAFND90P/Cis=" + "hash": "sha256-QM/FtDft4N4imJBuEHg6cH3e8vEyMPLt0alDhugLPy8=" }, { "name": "4002-HID-quirks-remove-T2-devices-from-hid_mouse_ignore_l.patch", @@ -119,7 +131,7 @@ }, { "name": "8001-Add-APFS-driver.patch", - "hash": "sha256-py4DNKBsUWvw6o730ApmNdUlSyabOFnFDoAPrF40DNE=" + "hash": "sha256-io17Kk6FDscDoDshddK9TqSPuXVFTzjvRUwOGTl5cjM=" }, { "name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch", diff --git a/apple/t2/pkgs/linux-t2/latest.nix b/apple/t2/pkgs/linux-t2/latest.nix index 70145fdb..747db71e 100644 --- a/apple/t2/pkgs/linux-t2/latest.nix +++ b/apple/t2/pkgs/linux-t2/latest.nix @@ -1,6 +1,6 @@ -{ callPackage, linux_6_14, ... }@args: +{ callPackage, linux_6_15, ... }@args: callPackage ./generic.nix args { - kernel = linux_6_14; + kernel = linux_6_15; patchesFile = ./latest.json; } diff --git a/apple/t2/pkgs/linux-t2/stable.json b/apple/t2/pkgs/linux-t2/stable.json index 3a788c72..325f42e4 100644 --- a/apple/t2/pkgs/linux-t2/stable.json +++ b/apple/t2/pkgs/linux-t2/stable.json @@ -1,5 +1,5 @@ { - "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/0543a832ecf1400798e8aef6727110ec21c3484a/", + "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/e08a76e1f1234885b9b68be6c843bf91833e8b0a/", "patches": [ { "name": "1001-Add-apple-bce-driver.patch", @@ -9,6 +9,14 @@ "name": "1002-Put-apple-bce-in-drivers-staging.patch", "hash": "sha256-DXj4CmE7TKMGrAhQDOR5RVw9YHmyQMiXZsmxYfkKAEA=" }, + { + "name": "1003-Fix-sparse-errors.patch", + "hash": "sha256-nuCOPWa4Hp+HCCBe6Y++M4g1k4plOWzy2hqHXlJbp9g=" + }, + { + "name": "1004-Fix-freezing-on-turning-off-camera.patch", + "hash": "sha256-rFrSUhiNXgQbfgKjryJktYxYcchXE1PI49Q1gW001+0=" + }, { "name": "1005-HID-hid-appletb-bl-add-driver-for-the-backlight-of-A.patch", "hash": "sha256-kEscS1FAyDxLZPOPInYTXFEf4fouBEa4zGctX14hSu8=" @@ -18,24 +26,28 @@ "hash": "sha256-eVEuvnoRItaDjwWu41nn9bTkgHgY+1SL/hFAvUR2IlY=" }, { - "name": "1007-HID-multitouch-support-getting-the-contact-ID-from.patch", - "hash": "sha256-A4tExJafroVAv/Hbdt7farJM6RYl/DU5KwSbzqcdEVY=" + "name": "1007-HID-multitouch-Get-the-contact-ID-from-HID_DG_TRANSD.patch", + "hash": "sha256-JF5PjByo4S1Rd/B5luAzOXDv+iakCnJfmujIQuUiT1A=" }, { "name": "1008-HID-multitouch-support-getting-the-tip-state-from-HI.patch", - "hash": "sha256-GwK+d87p3UMy66037dzq6/Zearj8gnRHhqSdZczRadY=" + "hash": "sha256-m/NAKoHRC/HwxG5fFZxFl6DtY4Xv8kPBWvdKdtadrrk=" }, { "name": "1009-HID-multitouch-take-cls-maxcontacts-into-account-for.patch", - "hash": "sha256-fywzHnCQ657UFye1ckiufral3pBwBGtKdxWqWqaFHM0=" + "hash": "sha256-h6jk9yw/4txd8PATpMxB9mIzik9+X1zP6p4K35AqdXw=" }, { - "name": "1010-HID-multitouch-allow-specifying-if-a-device-is-direc.patch", - "hash": "sha256-87SOnLgeG60Svu2Z9QUyP9P6cZ1Gznt6ZYLFImfx+vY=" + "name": "1010-HID-multitouch-specify-that-Apple-Touch-Bar-is-direc.patch", + "hash": "sha256-5PbLynVnQqlJKPTWhcmwXCkYDEopLBQWnxWvZUt0EN4=" }, { - "name": "1011-HID-multitouch-add-device-ID-for-Apple-Touch-Bars.patch", - "hash": "sha256-TJjXAlQ4WEROnq/xd6/4JHTuEJjqT7dLLcE4etKdzc0=" + "name": "1011-HID-multitouch-add-device-ID-for-Apple-Touch-Bar.patch", + "hash": "sha256-dIzEOj89D2rIEc2/mjq3TkIfI3ZHzu0VRDQQOzp+Snc=" + }, + { + "name": "1013-lib-vsprintf-Add-support-for-generic-FourCCs-by-exte.patch", + "hash": "sha256-h3gxaKtvdm/GSd+AP1sPC9avWHOsceUxTmoua/3rIf4=" }, { "name": "1014-drm-format-helper-Add-conversion-from-XRGB8888-to-BG.patch", @@ -43,7 +55,7 @@ }, { "name": "1015-drm-tiny-add-driver-for-Apple-Touch-Bars-in-x86-Macs.patch", - "hash": "sha256-zFeDJeoM/XS+Ds3DBLEcv4JbUhlEk9z4rHQ4t6XaghA=" + "hash": "sha256-tDjK/VipVQbuNOURW38gssqeRLy3s8I+DVq0+4zGnHs=" }, { "name": "2008-i915-4-lane-quirk-for-mbp15-1.patch", @@ -119,7 +131,7 @@ }, { "name": "8001-Add-APFS-driver.patch", - "hash": "sha256-1VHKrO2haBqXDCef2xt2fHfCCPv2q/AhFmmM4Xxu24E=" + "hash": "sha256-O3RNtpeZQENPEfyYi/0ZTLhAWBAw6pmxMS30NUxOTdk=" }, { "name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch", From d4b603125e98ce2da1340e0a67bc430d7384b344 Mon Sep 17 00:00:00 2001 From: QuietSeeker <123584613+QuietSeeker@users.noreply.github.com> Date: Thu, 26 Jun 2025 19:49:43 +0100 Subject: [PATCH 1339/1476] Updated nvidia offload mode to include amd drivers --- lenovo/legion/16arh7h/hybrid/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/legion/16arh7h/hybrid/default.nix b/lenovo/legion/16arh7h/hybrid/default.nix index 1654e23c..9d47b58a 100644 --- a/lenovo/legion/16arh7h/hybrid/default.nix +++ b/lenovo/legion/16arh7h/hybrid/default.nix @@ -13,7 +13,7 @@ ]; boot.kernelModules = ["amdgpu"]; - services.xserver.videoDrivers = ["nvidia"]; + services.xserver.videoDrivers = ["amdgpu" "nvidia"]; hardware = { amdgpu.initrd.enable = false; From 9ac3df2a020ea6c6efb9f30c42aa2a031a5e9241 Mon Sep 17 00:00:00 2001 From: Andre Date: Tue, 1 Jul 2025 11:26:23 -0400 Subject: [PATCH 1340/1476] Remove GitHub action --- .github/workflows/test.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7200246e..2efb8acc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,12 +5,6 @@ on: branches: - master jobs: - nixfmt: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v31 - - run: nix fmt . tests: needs: nixfmt runs-on: ubuntu-latest From c3f13f261032b6c393bd4fc2c25990783937b4d9 Mon Sep 17 00:00:00 2001 From: Andre Date: Tue, 1 Jul 2025 11:30:09 -0400 Subject: [PATCH 1341/1476] Remove GitHub action requirement --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2efb8acc..1a7c3f7e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,6 @@ on: - master jobs: tests: - needs: nixfmt runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From fe49c326d572e4a92f8d2aa6f5f0c6b39245cd37 Mon Sep 17 00:00:00 2001 From: Andre Date: Tue, 1 Jul 2025 11:35:17 -0400 Subject: [PATCH 1342/1476] chore: add formatting job to GitHub Actions --- .github/workflows/test.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1a7c3f7e..8d75b139 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,9 +5,16 @@ on: branches: - master jobs: - tests: + nixfmt: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v31 - - run: nix run ./tests#run . + - run: nix fmt . + tests: + needs: nixfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v31 + - run: nix run ./tests#run . \ No newline at end of file From a7600cef40e350c6f3fcb6eefb6f0d6b09c7d05e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 1 Jul 2025 19:13:17 +0200 Subject: [PATCH 1343/1476] move treefmt to tests flake this way we don't polute our consumers flake.lock with treefmt --- .github/workflows/test.yml | 2 +- flake.lock | 43 ++++---------------------------------- flake.nix | 27 +----------------------- tests/flake.lock | 23 +++++++++++++++++++- tests/flake.nix | 23 ++++++++++++++++++++ treefmt.nix | 19 ----------------- 6 files changed, 51 insertions(+), 86 deletions(-) delete mode 100644 treefmt.nix diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d75b139..e34c7e7c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v31 - - run: nix fmt . + - run: cd tests && nix fmt .. -- --fail-on-change tests: needs: nixfmt runs-on: ubuntu-latest diff --git a/flake.lock b/flake.lock index 0477b1ca..8f2f2e35 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1748995760, - "narHash": "sha256-f6UIyqm6JZs45pG667YdHOFYgDt+gvxQvt32ZLBp1h4=", + "lastModified": 1751290770, + "narHash": "sha256-u4s8yKAqTzPGY3vTcDyAIet11uXaNCM//93/0O0NlbA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "26a54a5886c238b5df6f1e9ba0aa713434d73f06", + "rev": "0620a50e9a847851bf802c59a4202552ed79b821", "type": "github" }, "original": { @@ -16,44 +16,9 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1747958103, - "narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { - "nixpkgs": "nixpkgs", - "treefmt-nix": "treefmt-nix" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1748243702, - "narHash": "sha256-9YzfeN8CB6SzNPyPm2XjRRqSixDopTapaRsnTpXUEY8=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "1f3f7b784643d488ba4bf315638b2b0a4c5fb007", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index aed8651d..c5d599bb 100644 --- a/flake.nix +++ b/flake.nix @@ -1,34 +1,9 @@ { description = "nixos-hardware"; - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05-small"; - treefmt-nix.url = "github:numtide/treefmt-nix"; - }; - outputs = + { ... }: { - nixpkgs, - self, - treefmt-nix, - }: - let - systems = [ - "aarch64-darwin" - "aarch64-linux" - "x86_64-darwin" - "x86_64-linux" - ]; - forEachSystem = - function: nixpkgs.lib.genAttrs (systems) (system: function nixpkgs.legacyPackages.${system}); - - treefmtEval = forEachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix); - in - { - checks = forEachSystem (pkgs: { - formatting = treefmtEval.${pkgs.system}.config.build.check self; - }); - formatter = forEachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper); nixosModules = let diff --git a/tests/flake.lock b/tests/flake.lock index ba2dc9ab..bc9dc885 100644 --- a/tests/flake.lock +++ b/tests/flake.lock @@ -74,7 +74,28 @@ "flake-parts": "flake-parts", "nixos-hardware": "nixos-hardware", "nixos-stable": "nixos-stable", - "nixos-unstable-small": "nixos-unstable-small" + "nixos-unstable-small": "nixos-unstable-small", + "treefmt-nix": "treefmt-nix" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixos-unstable-small" + ] + }, + "locked": { + "lastModified": 1750931469, + "narHash": "sha256-0IEdQB1nS+uViQw4k3VGUXntjkDp7aAlqcxdewb/hAc=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "ac8e6f32e11e9c7f153823abc3ab007f2a65d3e1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" } } }, diff --git a/tests/flake.nix b/tests/flake.nix index bf20ed3a..aa493971 100644 --- a/tests/flake.nix +++ b/tests/flake.nix @@ -8,11 +8,16 @@ nixos-hardware.url = "github:NixOS/nixos-hardware"; flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.inputs.nixpkgs-lib.follows = "nixos-unstable-small"; + treefmt-nix.url = "github:numtide/treefmt-nix"; + treefmt-nix.inputs.nixpkgs.follows = "nixos-unstable-small"; }; outputs = inputs@{ flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } { + imports = [ + inputs.treefmt-nix.flakeModule + ]; systems = [ "aarch64-linux" "x86_64-linux" @@ -85,6 +90,24 @@ in { _module.args.pkgs = nixpkgsUnstable; + + treefmt = { + projectRootFile = "COPYING"; + programs = { + deadnix = { + enable = true; + no-lambda-pattern-names = true; + }; + nixfmt = { + enable = true; + package = pkgs.nixfmt-rfc-style; + }; + }; + settings = { + on-unmatched = "info"; + }; + }; + checks = checksForNixpkgs "nixos-unstable" nixpkgsUnstable // checksForNixpkgs "nixos-stable" nixpkgsStable; diff --git a/treefmt.nix b/treefmt.nix deleted file mode 100644 index 7039d8b5..00000000 --- a/treefmt.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ pkgs, ... }: -{ - projectRootFile = "flake.nix"; - - programs = { - deadnix = { - enable = true; - no-lambda-pattern-names = true; - }; - nixfmt = { - enable = true; - package = pkgs.nixfmt-rfc-style; - }; - }; - - settings = { - on-unmatched = "info"; - }; -} From b2c7dee5c6aa93cf1029bbe38e32d4799042cc9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 1 Jul 2025 19:19:15 +0200 Subject: [PATCH 1344/1476] ci: support for merge queues --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e34c7e7c..4f58d888 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,6 +4,7 @@ on: push: branches: - master + merge_group: jobs: nixfmt: runs-on: ubuntu-latest From bd65595c6d689c407d7f15f3b5a8f681c91101b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 1 Jul 2025 19:27:33 +0200 Subject: [PATCH 1345/1476] Add .git-blame-ignore-revs file for auto-rebasing --- .git-blame-ignore-revs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .git-blame-ignore-revs diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 00000000..4c9bbd01 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,12 @@ +# This file contains commits that should be ignored by git blame +# See https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-file +# and https://github.com/NixOS/nixpkgs/blob/master/.git-blame-ignore-revs for more info + +# To enable this in your local repository, run: +# git config blame.ignoreRevsFile .git-blame-ignore-revs + +# For rebasing PRs, commits marked with !autorebase will be automatically +# reapplied by the auto-rebase script + +# nixfmt-rfc-style formatting +51e51e601448705c0d2f92ef90ec7b680123077c #!autorebase cd tests && nix fmt .. \ No newline at end of file From 1ead2d05dd46c21b721a28ae1ce963849e1f3423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 1 Jul 2025 19:30:42 +0200 Subject: [PATCH 1346/1476] bump nixos-stable/nixos-unstable --- tests/flake.lock | 10 +++++----- tests/flake.nix | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/flake.lock b/tests/flake.lock index bc9dc885..4363c6d1 100644 --- a/tests/flake.lock +++ b/tests/flake.lock @@ -37,16 +37,16 @@ }, "nixos-stable": { "locked": { - "lastModified": 1746957726, - "narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=", - "ref": "nixos-24.11", - "rev": "a39ed32a651fdee6842ec930761e31d1f242cb94", + "lastModified": 1751211869, + "narHash": "sha256-1Cu92i1KSPbhPCKxoiVG5qnoRiKTgR5CcGSRyLpOd7Y=", + "ref": "nixos-25.05", + "rev": "b43c397f6c213918d6cfe6e3550abfe79b5d1c51", "shallow": true, "type": "git", "url": "https://github.com/NixOS/nixpkgs" }, "original": { - "ref": "nixos-24.11", + "ref": "nixos-25.05", "shallow": true, "type": "git", "url": "https://github.com/NixOS/nixpkgs" diff --git a/tests/flake.nix b/tests/flake.nix index aa493971..9e5aa0ed 100644 --- a/tests/flake.nix +++ b/tests/flake.nix @@ -3,7 +3,7 @@ inputs = { nixos-unstable-small.url = "git+https://github.com/NixOS/nixpkgs?shallow=1&ref=nixos-unstable-small"; - nixos-stable.url = "git+https://github.com/NixOS/nixpkgs?shallow=1&ref=nixos-24.11"; + nixos-stable.url = "git+https://github.com/NixOS/nixpkgs?shallow=1&ref=nixos-25.05"; # override in the test nixos-hardware.url = "github:NixOS/nixos-hardware"; flake-parts.url = "github:hercules-ci/flake-parts"; From 72cdb2246305abf2bd3cbc88d2c72ea6040fcef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 1 Jul 2025 19:31:14 +0200 Subject: [PATCH 1347/1476] add script to update nar hashes in tests --- scripts/update-tests-hash | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 scripts/update-tests-hash diff --git a/scripts/update-tests-hash b/scripts/update-tests-hash new file mode 100755 index 00000000..f2508b9a --- /dev/null +++ b/scripts/update-tests-hash @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# Helper script to update the tests flake hash +set -euo pipefail + +# Go to the root of the repository +cd "$(dirname "$0")/.." + +echo "Updating tests.narHash..." >&2 + +# Update the flake lock file +nix --extra-experimental-features 'flakes nix-command' flake lock ./tests + +# Generate the hash +nix --extra-experimental-features 'flakes nix-command' hash path ./tests > ./tests.narHash + +echo "Hash updated successfully: $(cat tests.narHash)" \ No newline at end of file From e8bd6a44ac0d6041996531b96ed190d0de9f8598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 1 Jul 2025 20:02:30 +0200 Subject: [PATCH 1348/1476] disable treefmt on riscv64 --- tests/flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/flake.nix b/tests/flake.nix index 9e5aa0ed..443bfbd7 100644 --- a/tests/flake.nix +++ b/tests/flake.nix @@ -92,6 +92,7 @@ _module.args.pkgs = nixpkgsUnstable; treefmt = { + flakeCheck = pkgs.hostPlatform.system != "riscv64-linux"; projectRootFile = "COPYING"; programs = { deadnix = { From 66e88bdcaa444d06a644f1350927b3e20a495436 Mon Sep 17 00:00:00 2001 From: florianvazelle Date: Mon, 16 Jun 2025 17:25:23 +0200 Subject: [PATCH 1349/1476] asus/rog-gl552vw: init --- README.md | 1 + asus/rog-gl552vw/default.nix | 16 ++++++++++++++++ flake.nix | 1 + 3 files changed, 18 insertions(+) create mode 100644 asus/rog-gl552vw/default.nix diff --git a/README.md b/README.md index 7f084e64..f906245a 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,7 @@ See code for all available configurations. | [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | `asus-ally-rc71l` | | [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/amdgpu) | `` | `asus-flow-gv302x-amdgpu` | | [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/nvidia) | `` | `asus-flow-gv302x-nvidia` | +| [Asus ROG GL552VW](asus/rog-gl552vw) | `` | `asus-rog-gl552vw` | | [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | `asus-rog-strix-g513im` | | [Asus ROG Strix G533ZW](asus/rog-strix/g533zw) | `` | `asus-rog-strix-g533zw` | | [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `` | `asus-rog-strix-g713ie` | diff --git a/asus/rog-gl552vw/default.nix b/asus/rog-gl552vw/default.nix new file mode 100644 index 00000000..e93b1ab6 --- /dev/null +++ b/asus/rog-gl552vw/default.nix @@ -0,0 +1,16 @@ +{ ... }: + +{ + imports = [ + ../../common/cpu/intel/skylake + ../../common/gpu/nvidia/maxwell + ../../common/gpu/nvidia/prime.nix + ../../common/pc/laptop + ../../common/pc/ssd + ]; + + hardware.nvidia.prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} diff --git a/flake.nix b/flake.nix index c5d599bb..0e230308 100644 --- a/flake.nix +++ b/flake.nix @@ -41,6 +41,7 @@ asus-flow-gv302x-amdgpu = import ./asus/flow/gv302x/amdgpu; asus-flow-gv302x-nvidia = import ./asus/flow/gv302x/nvidia; asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace; + asus-rog-gl552vw = import ./asus/rog-gl552vw; asus-rog-strix-g513im = import ./asus/rog-strix/g513im; asus-rog-strix-g533zw = import ./asus/rog-strix/g533zw; asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie; From a724614b86a2a67f7dbb3873942dcd0561106102 Mon Sep 17 00:00:00 2001 From: Rishabh <40533251+Rishabh5321@users.noreply.github.com> Date: Wed, 2 Jul 2025 07:52:52 +0530 Subject: [PATCH 1350/1476] xiaomi/redmibook/15-pro-2021: fix flake.nix --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index c5d599bb..0a0a749d 100644 --- a/flake.nix +++ b/flake.nix @@ -355,6 +355,7 @@ tuxedo-infinitybook-pro14-gen9-intel = import ./tuxedo/infinitybook/pro14/gen9/intel; tuxedo-pulse-14-gen3 = import ./tuxedo/pulse/14/gen3; tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; + xiaomi-redmibook-15-pro-2021 = import ./xiaomi/redmibook/15-pro-2021; xiaomi-redmibook-16-pro-2024 = import ./xiaomi/redmibook/16-pro-2024; common-cpu-amd = import ./common/cpu/amd; From 3b622ae6e613bf0b59bd142394ee86ed62cd2a60 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Wed, 25 Jun 2025 21:22:07 -0700 Subject: [PATCH 1351/1476] Add System76 Thelio Mega module --- README.md | 1 + flake.nix | 1 + system76/thelio-mega/default.nix | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 system76/thelio-mega/default.nix diff --git a/README.md b/README.md index 7f084e64..a064978f 100644 --- a/README.md +++ b/README.md @@ -406,6 +406,7 @@ See code for all available configurations. | [System76 Darter Pro 6](system76/darp6) | `` | `system76-darp6`| | [System76 Gazelle 18](system76/gaze18) | `` | `system76-gaze18`| | [System76 Galago Pro 5](system76/galp5-1650) | `` | `system76-galp5-1650`| +| [System76 Thelio Mega](system76/thelio-mega) | `` | `system76-thelio-mega`| | [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | `toshiba-swanky`| | [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | `tuxedo-infinitybook-v4`| | [TUXEDO Aura 15 - Gen1](tuxedo/aura/15/gen1) | `` | `tuxedo-aura-15-gen1`| diff --git a/flake.nix b/flake.nix index c5d599bb..18867756 100644 --- a/flake.nix +++ b/flake.nix @@ -348,6 +348,7 @@ system76-gaze18 = import ./system76/gaze18; system76-galp5-1650 = import ./system76/galp5-1650; system76-darp6 = import ./system76/darp6; + system76-thelio-mega = import ./system76/thelio-mega; toshiba-swanky = import ./toshiba/swanky; tuxedo-aura-15-gen1 = import ./tuxedo/aura/15/gen1; tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; diff --git a/system76/thelio-mega/default.nix b/system76/thelio-mega/default.nix new file mode 100644 index 00000000..b88f1366 --- /dev/null +++ b/system76/thelio-mega/default.nix @@ -0,0 +1,16 @@ +# Hardware profile for the Thelio Mega desktop workstation by System76. +# +# https://system76.com/desktops/thelio-mega-r4-n3/configure +{ + config, + lib, + ... +}: +{ + imports = [ + ../../common/cpu/amd + ../../common/gpu/nvidia + ]; + + hardware.nvidia.open = true; +} From 1828627b087329e5324be0909892ec7337d55f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=E1=BB=97=20Quang=20Minh?= <59284549+shinishiho@users.noreply.github.com> Date: Fri, 4 Jul 2025 06:48:03 +0700 Subject: [PATCH 1352/1476] asus: fix charge-upto script --- asus/battery.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/asus/battery.nix b/asus/battery.nix index 4bdf6b64..4639baa4 100644 --- a/asus/battery.nix +++ b/asus/battery.nix @@ -6,7 +6,8 @@ }: let p = pkgs.writeScriptBin "charge-upto" '' - echo ''${0:-100} > /sys/class/power_supply/BAT?/charge_control_end_threshold + #!${pkgs.bash}/bin/bash + echo ''${1:-100} > /sys/class/power_supply/BAT?/charge_control_end_threshold ''; cfg = config.hardware.asus.battery; in From 41f2cad3f96c1fb163fde49c27f22e1faabced9a Mon Sep 17 00:00:00 2001 From: Bu Kun <65808665+pokon548@users.noreply.github.com> Date: Sun, 6 Jul 2025 19:12:49 +0800 Subject: [PATCH 1353/1476] Add flip_done timeout workaround for 14IMH9 --- lenovo/ideapad/14imh9/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lenovo/ideapad/14imh9/default.nix b/lenovo/ideapad/14imh9/default.nix index f2bb0f52..c8bb71c9 100644 --- a/lenovo/ideapad/14imh9/default.nix +++ b/lenovo/ideapad/14imh9/default.nix @@ -26,6 +26,10 @@ # See https://wiki.archlinux.org/title/Dell_XPS_16_(9640)#Random_freezes "iommu.strict=1" "iommu.passthrough=1" + + # Workaround: i915 0000:00:02.0: [drm] *ERROR* [CRTC:82:pipe A] flip_done timed out + # See https://github.com/pop-os/pop/issues/3130 + "i915.dmc_firmware_path=\"\"" ]; }; From 6015af43f34b6cf943adc29cbbc7acf85983cb1f Mon Sep 17 00:00:00 2001 From: Jasper Chan Date: Fri, 24 May 2024 00:34:42 -0700 Subject: [PATCH 1354/1476] raspberry-pi/4: support 4lane csi --- raspberry-pi/4/tc358743.nix | 63 +++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 13 deletions(-) diff --git a/raspberry-pi/4/tc358743.nix b/raspberry-pi/4/tc358743.nix index 840953aa..117d9aa4 100644 --- a/raspberry-pi/4/tc358743.nix +++ b/raspberry-pi/4/tc358743.nix @@ -13,6 +13,16 @@ in running ustreamer (which starts webservice providing a camera stream): ''${pkgs.ustreamer}/bin/ustreamer --persistent --dv-timings ''; + lanes = lib.mkOption { + type = lib.types.enum [ + 2 + 4 + ]; + default = 2; + description = '' + Number of CSI lanes available + ''; + }; }; }; @@ -74,17 +84,31 @@ in fragment@2 { target = <0x03>; - __overlay__ { - data-lanes = <0x01 0x02>; - }; + ${ + if cfg.lanes == 2 then + '' + __overlay__ { + data-lanes = <0x01 0x02>; + }; + '' + else + "" + } }; fragment@3 { target = <0x03>; - __dormant__ { - data-lanes = <0x01 0x02 0x03 0x04>; - }; + ${ + if cfg.lanes == 4 then + '' + __overlay__ { + data-lanes = <0x01 0x02 0x03 0x04>; + }; + '' + else + "" + } }; fragment@4 { @@ -120,21 +144,34 @@ in fragment@7 { target = <0x02>; - __overlay__ { - data-lanes = <0x01 0x02>; - }; + ${ + if cfg.lanes == 2 then + '' + __overlay__ { + data-lanes = <0x01 0x02>; + }; + '' + else + "" + } }; fragment@8 { target = <0x02>; - __dormant__ { - data-lanes = <0x01 0x02 0x03 0x04>; - }; + ${ + if cfg.lanes == 4 then + '' + __overlay__ { + data-lanes = <0x01 0x02 0x03 0x04>; + }; + '' + else + "" + } }; __overrides__ { - 4lane = "\0\0\0\0-2+3-7+8"; link-frequency = [00 00 00 03 6c 69 6e 6b 2d 66 72 65 71 75 65 6e 63 69 65 73 23 30 00]; }; From 323366c51c42cfee23fe9e04d5998350d4f77cac Mon Sep 17 00:00:00 2001 From: Rituraj <56511165+imxade@users.noreply.github.com> Date: Fri, 6 Jun 2025 08:12:58 +0530 Subject: [PATCH 1355/1476] added inspiron 3442 to the flake --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index a0ac1fb8..284186b6 100644 --- a/flake.nix +++ b/flake.nix @@ -65,6 +65,7 @@ dell-e7240 = deprecated "1326" "dell-e7240" (import ./dell/e7240); dell-g3-3779 = import ./dell/g3/3779; dell-g3-3579 = import ./dell/g3/3579; + dell-inspiron-3442 = import ./dell/inspiron/3442; dell-inspiron-14-5420 = import ./dell/inspiron/14-5420; dell-inspiron-5509 = import ./dell/inspiron/5509; dell-inspiron-5515 = import ./dell/inspiron/5515; From 94100810798c046d1e9f17e370da8bf8734eb8f4 Mon Sep 17 00:00:00 2001 From: LucasFA <23667494+LucasFA@users.noreply.github.com> Date: Sun, 13 Jul 2025 12:31:37 +0100 Subject: [PATCH 1356/1476] init: NUC 5i5RYB --- README.md | 1 + flake.nix | 1 + intel/nuc/5i5ryb/default.nix | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 intel/nuc/5i5ryb/default.nix diff --git a/README.md b/README.md index a064978f..7a774cf0 100644 --- a/README.md +++ b/README.md @@ -223,6 +223,7 @@ See code for all available configurations. | [HP Probook 440G5](hp/probook/440g5) | `` | `hp-probook-440G5` | | [Huawei Matebook X Pro (2020)](huawei/machc-wa) | `` | `huawei-machc-wa` | | [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | `nxp-imx8qm-mek` | +| [Intel NUC 5i5RYB](intel/nuc/5i5ryb/) | `` | `intel-nuc-5i5ryb` | | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | `intel-nuc-8i7beh` | | [Lenovo IdeaCentre K330](lenovo/ideacentre/k330) | `` | `lenovo-ideacentre-k330` | | [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `` | `lenovo-ideapad-15alc6` | diff --git a/flake.nix b/flake.nix index 284186b6..14cd6884 100644 --- a/flake.nix +++ b/flake.nix @@ -156,6 +156,7 @@ hp-laptop-14s-dq2024nf = import ./hp/laptop/14s-dq2024nf; huawei-machc-wa = import ./huawei/machc-wa; hp-notebook-14-df0023 = import ./hp/notebook/14-df0023; + intel-nuc-5i5ryb = import ./intel/nuc/5i5ryb; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; lenovo-ideacentre-k330 = import ./lenovo/ideacentre/k330; lenovo-ideapad-14imh9 = import ./lenovo/ideapad/14imh9; diff --git a/intel/nuc/5i5ryb/default.nix b/intel/nuc/5i5ryb/default.nix new file mode 100644 index 00000000..7ff80dd2 --- /dev/null +++ b/intel/nuc/5i5ryb/default.nix @@ -0,0 +1,11 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel/broadwell + ../../../common/pc + ../../../common/pc/ssd + ]; + + services.thermald.enable = lib.mkDefault true; +} From 8ea54c025e9ef7e4929234bdd12c22a52709dcbb Mon Sep 17 00:00:00 2001 From: matthiasdotsh Date: Mon, 14 Jul 2025 17:06:15 +0200 Subject: [PATCH 1357/1476] surface: linux 6.15.3 -> 6.15.6 --- microsoft/surface/common/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index a4defb61..442d7e17 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -19,7 +19,7 @@ let if kernelVersion == "longterm" then "6.12.19" else if kernelVersion == "stable" then - "6.15.3" + "6.15.6" else abort "Invalid kernel version: ${kernelVersion}"; @@ -28,7 +28,7 @@ let if kernelVersion == "longterm" then "sha256-1zvwV77ARDSxadG2FkGTb30Ml865I6KB8y413U3MZTE=" else if kernelVersion == "stable" then - "sha256-ErUMiZJUONnNc4WgyvycQz5lYqxd8AohiJ/On1SNZbA=" + "sha256-K7WGyVQnfQcMj99tcnX6qTtIB9m/M1O0kdgUnMoCtPw=" else abort "Invalid kernel version: ${kernelVersion}"; From 95ee2804d7ac805bf9deaef8bcff414a2dfc152a Mon Sep 17 00:00:00 2001 From: Anna Oake Date: Mon, 7 Jul 2025 13:26:57 +0200 Subject: [PATCH 1358/1476] framework-intel-core-ultra-series1: preset device name for audio enhancement --- framework/13-inch/intel-core-ultra-series1/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/13-inch/intel-core-ultra-series1/default.nix b/framework/13-inch/intel-core-ultra-series1/default.nix index 4851d54f..b2828ff1 100644 --- a/framework/13-inch/intel-core-ultra-series1/default.nix +++ b/framework/13-inch/intel-core-ultra-series1/default.nix @@ -41,4 +41,6 @@ ''For Intel NPU support, set the option: hardware.enableRedistributableFirmware = true;'' ]; + hardware.framework.laptop13.audioEnhancement.rawDeviceName = + lib.mkDefault "alsa_output.pci-0000_00_1f.3.analog-stereo"; } From b90855f92a87c0e3b849004396baf178dd801ff9 Mon Sep 17 00:00:00 2001 From: fidgetingbits Date: Thu, 24 Jul 2025 10:31:11 +0800 Subject: [PATCH 1359/1476] Added Dell Precision 5570 --- README.md | 2 ++ dell/precision/5570/README.md | 32 ++++++++++++++++++++++++++++ dell/precision/5570/default.nix | 37 +++++++++++++++++++++++++++++++++ flake.nix | 1 + 4 files changed, 72 insertions(+) create mode 100644 dell/precision/5570/README.md create mode 100644 dell/precision/5570/default.nix diff --git a/README.md b/README.md index a064978f..c516cc4f 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,8 @@ See code for all available configurations. | [Dell Precision 3541](dell/precision/3541) | `` | `dell-precision-3541` | | [Dell Precision 5490](dell/precision/5490) | `` | `dell-precision-5490` | | [Dell Precision 5530](dell/precision/5530) | `` | `dell-precision-5530` | +| [Dell Precision 5560](dell/precision/5560) | `` | `dell-precision-5560` | +| [Dell Precision 5570](dell/precision/5570) | `` | `dell-precision-5570` | | [Dell Precision 7520](dell/precision/7520) | `` | `dell-precision-7520` | | [Dell XPS 13 7390](dell/xps/13-7390) | `` | `dell-xps-13-7390` | | [Dell XPS 13 9300](dell/xps/13-9300) | `` | `dell-xps-13-9300` | diff --git a/dell/precision/5570/README.md b/dell/precision/5570/README.md new file mode 100644 index 00000000..49473934 --- /dev/null +++ b/dell/precision/5570/README.md @@ -0,0 +1,32 @@ +# Dell Precision 5570 + +## Tested Hardware + +```bash +lspci -nn +00:00.0 Host bridge [0600]: Intel Corporation 12th Gen Core Processor Host Bridge/DRAM Registers [8086:4641] (rev 02) +00:01.0 PCI bridge [0604]: Intel Corporation 12th Gen Core Processor PCI Express x16 Controller #1 [8086:460d] (rev 02) +00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-P GT2 [Iris Xe Graphics] [8086:46a6] (rev 0c) +00:04.0 Signal processing controller [1180]: Intel Corporation Alder Lake Innovation Platform Framework Processor Participant [8086:461d] (rev 02) +00:06.0 PCI bridge [0604]: Intel Corporation 12th Gen Core Processor PCI Express x4 Controller #0 [8086:464d] (rev 02) +00:07.0 PCI bridge [0604]: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #0 [8086:466e] (rev 02) +00:07.1 PCI bridge [0604]: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #1 [8086:463f] (rev 02) +00:08.0 System peripheral [0880]: Intel Corporation 12th Gen Core Processor Gaussian & Neural Accelerator [8086:464f] (rev 02) +00:0d.0 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 USB Controller [8086:461e] (rev 02) +00:0d.2 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #0 [8086:463e] (rev 02) +00:12.0 Serial controller [0700]: Intel Corporation Alder Lake-P Integrated Sensor Hub [8086:51fc] (rev 01) +00:14.0 USB controller [0c03]: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller [8086:51ed] (rev 01) +00:14.2 RAM memory [0500]: Intel Corporation Alder Lake PCH Shared SRAM [8086:51ef] (rev 01) +00:14.3 Network controller [0280]: Intel Corporation Alder Lake-P PCH CNVi WiFi [8086:51f0] (rev 01) +00:15.0 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 [8086:51e8] (rev 01) +00:15.1 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #1 [8086:51e9] (rev 01) +00:16.0 Communication controller [0780]: Intel Corporation Alder Lake PCH HECI Controller [8086:51e0] (rev 01) +00:1c.0 PCI bridge [0604]: Intel Corporation Alder Lake-P PCH PCIe Root Port #4 [8086:51bb] (rev 01) +00:1f.0 ISA bridge [0601]: Intel Corporation Alder Lake PCH eSPI Controller [8086:5182] (rev 01) +00:1f.3 Audio device [0403]: Intel Corporation Alder Lake PCH-P High Definition Audio Controller [8086:51c8] (rev 01) +00:1f.4 SMBus [0c05]: Intel Corporation Alder Lake PCH-P SMBus Host Controller [8086:51a3] (rev 01) +00:1f.5 Serial bus controller [0c80]: Intel Corporation Alder Lake-P PCH SPI Controller [8086:51a4] (rev 01) +01:00.0 3D controller [0302]: NVIDIA Corporation GA107GLM [RTX A1000 Laptop GPU] [10de:25b9] (rev a1) +02:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller PM9A1/PM9A3/980PRO [144d:a80a] +a5:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5260 PCI Express Card Reader [10ec:5260] (rev 01) +``` diff --git a/dell/precision/5570/default.nix b/dell/precision/5570/default.nix new file mode 100644 index 00000000..a50b675a --- /dev/null +++ b/dell/precision/5570/default.nix @@ -0,0 +1,37 @@ +{ + config, + lib, + ... +}: +{ + imports = [ + ../../../common/cpu/intel/alder-lake + ../../../common/pc/laptop + ../../../common/pc/ssd + ../../../common/gpu/nvidia/prime-sync.nix + ]; + + hardware.intelgpu.driver = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8") "xe"; + + boot.kernelParams = lib.mkIf (config.hardware.intelgpu.driver == "xe") [ + "i915.force_probe=!9a49" + "xe.force_probe=9a49" + ]; + + hardware.nvidia = { + nvidiaSettings = lib.mkDefault true; + modesetting.enable = lib.mkDefault true; + open = lib.mkDefault false; + prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + + # 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; +} diff --git a/flake.nix b/flake.nix index 284186b6..6be749d0 100644 --- a/flake.nix +++ b/flake.nix @@ -92,6 +92,7 @@ dell-precision-5490 = import ./dell/precision/5490; dell-precision-5530 = import ./dell/precision/5530; dell-precision-5560 = import ./dell/precision/5560; + dell-precision-5570 = import ./dell/precision/5570; 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; From 25fdfb36a7db4e468a246b55c36a8bf0c99e43cb Mon Sep 17 00:00:00 2001 From: Ace-h121 Date: Wed, 23 Jul 2025 23:07:00 -0400 Subject: [PATCH 1360/1476] Adding Power Management on Asus fa507nv I personally own this laptop, I am running gnome and on sleep the graphics always corrupt without fail, this setting has been the only way to correct it. --- asus/fa507nv/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/asus/fa507nv/default.nix b/asus/fa507nv/default.nix index 01fafbb2..879a41c2 100644 --- a/asus/fa507nv/default.nix +++ b/asus/fa507nv/default.nix @@ -39,6 +39,7 @@ }; hardware.nvidia = { + powerManagement.enable = true; modesetting.enable = lib.mkDefault true; open = lib.mkDefault false; nvidiaSettings = lib.mkDefault true; From c46bd952e9d3645913ebc587619be271645c181f Mon Sep 17 00:00:00 2001 From: Ace-h121 Date: Wed, 23 Jul 2025 23:13:43 -0400 Subject: [PATCH 1361/1476] Forgot to add lib.mkDefault --- asus/fa507nv/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asus/fa507nv/default.nix b/asus/fa507nv/default.nix index 879a41c2..43ff7133 100644 --- a/asus/fa507nv/default.nix +++ b/asus/fa507nv/default.nix @@ -39,7 +39,7 @@ }; hardware.nvidia = { - powerManagement.enable = true; + powerManagement.enable = lib.mkDefault true; modesetting.enable = lib.mkDefault true; open = lib.mkDefault false; nvidiaSettings = lib.mkDefault true; From 37d0301b3c1afca426e8de46d237527f8bc7b5d7 Mon Sep 17 00:00:00 2001 From: Rituraj <56511165+imxade@users.noreply.github.com> Date: Sat, 26 Jul 2025 18:13:24 +0530 Subject: [PATCH 1362/1476] Removed enableAllFirmware, BT doesn't rely on it --- dell/inspiron/3442/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/dell/inspiron/3442/default.nix b/dell/inspiron/3442/default.nix index 0d298ff3..584c6e39 100644 --- a/dell/inspiron/3442/default.nix +++ b/dell/inspiron/3442/default.nix @@ -6,8 +6,6 @@ ../../../common/pc/laptop ]; - hardware.enableAllFirmware = lib.mkDefault true; - services = { fwupd.enable = lib.mkDefault true; thermald.enable = lib.mkDefault true; From 1f7ed6211f956ceaa2261e89f5c17d61b2dc521a Mon Sep 17 00:00:00 2001 From: omeyemburg Date: Sun, 27 Jul 2025 11:49:59 +0200 Subject: [PATCH 1363/1476] macbook-pro/12-1: remove redundant bracket in readme --- apple/macbook-pro/12-1/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/apple/macbook-pro/12-1/README.md b/apple/macbook-pro/12-1/README.md index 6618dc9e..84055a95 100644 --- a/apple/macbook-pro/12-1/README.md +++ b/apple/macbook-pro/12-1/README.md @@ -9,7 +9,6 @@ This means it might be required to restart your wifi deamon i.e. wpa_supplicant: powerManagement.powerUpCommands = '' ${pkgs.systemd}/bin/systemctl restart wpa_supplicant.service ''; -}; ``` You can apply this to your network management software of choice. From 85070738e9016a53f834b1804d63d5024be05ed7 Mon Sep 17 00:00:00 2001 From: omeyemburg Date: Sun, 27 Jul 2025 11:50:21 +0200 Subject: [PATCH 1364/1476] macbook-pro/8-1: remove redundant line in readme --- apple/macbook-pro/8-1/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/apple/macbook-pro/8-1/README.md b/apple/macbook-pro/8-1/README.md index 723df2e8..57d897fc 100644 --- a/apple/macbook-pro/8-1/README.md +++ b/apple/macbook-pro/8-1/README.md @@ -12,7 +12,6 @@ "b43-firmware" ]; } - ``` ### For all packages From 28fc41508c1fa7c7b1f13e2e3f81f7dcdbf7c883 Mon Sep 17 00:00:00 2001 From: suzana2314 <105118318+suzana2314@users.noreply.github.com> Date: Mon, 28 Jul 2025 18:51:21 +0100 Subject: [PATCH 1365/1476] lenovo-legion-15ach6h: added hybrid and nvidia configurations --- README.md | 2 ++ flake.nix | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 7a774cf0..d504b776 100644 --- a/README.md +++ b/README.md @@ -237,6 +237,8 @@ See code for all available configurations. | [Lenovo IdeaPad 2-in-1 16ahp9](lenovo/ideapad/16ahp9) | `` | `lenovo-ideapad-16ahp9` | | [Lenovo IdeaPad S145 15api](lenovo/ideapad/s145-15api) | `` | `lenovo-ideapad-s145-15api` | | [Lenovo Legion 5 15ach6h](lenovo/legion/15ach6h) | `` | `lenovo-legion-15ach6h` | +| [Lenovo Legion 5 15ach6h (Hybrid)](lenovo/legion/15ach6h/hybrid) | `` | `lenovo-legion-15ach6h-hybrid` | +| [Lenovo Legion 5 15ach6h (Nvidia)](lenovo/legion/15ach6h/hybrid) | `` | `lenovo-legion-15ach6h-nvidia` | | [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | `lenovo-legion-15arh05h` | | [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | `lenovo-legion-15ach6` | | [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | `lenovo-legion-16ach6h` | diff --git a/flake.nix b/flake.nix index 14cd6884..7b24db27 100644 --- a/flake.nix +++ b/flake.nix @@ -170,6 +170,8 @@ lenovo-ideapad-s145-15api = import ./lenovo/ideapad/s145-15api; lenovo-legion-15ach6 = import ./lenovo/legion/15ach6; lenovo-legion-15ach6h = import ./lenovo/legion/15ach6h; + lenovo-legion-15ach6h-hybrid = import ./lenovo/legion/15ach6h/hybrid; + lenovo-legion-15ach6h-nvidia = import ./lenovo/legion/15ach6h/nvidia; lenovo-legion-15arh05h = import ./lenovo/legion/15arh05h; lenovo-legion-16ach6h = import ./lenovo/legion/16ach6h; lenovo-legion-16ach6h-hybrid = import ./lenovo/legion/16ach6h/hybrid; From c92f8fc536cbd9898ad2cad099579c3a07c683ef Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 31 Jul 2025 15:42:08 +0200 Subject: [PATCH 1366/1476] style: apply formatter --- asus/rog-gl552vw/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asus/rog-gl552vw/default.nix b/asus/rog-gl552vw/default.nix index e93b1ab6..979631b4 100644 --- a/asus/rog-gl552vw/default.nix +++ b/asus/rog-gl552vw/default.nix @@ -12,5 +12,5 @@ hardware.nvidia.prime = { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; - }; + }; } From f30fc54b0ea2039cbd06342ffcba1faa665931e6 Mon Sep 17 00:00:00 2001 From: matthiasdotsh Date: Fri, 1 Aug 2025 12:41:34 +0200 Subject: [PATCH 1367/1476] surface: linux 6.15.6 -> 6.15.9 --- microsoft/surface/common/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 442d7e17..1fe46fee 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -19,7 +19,7 @@ let if kernelVersion == "longterm" then "6.12.19" else if kernelVersion == "stable" then - "6.15.6" + "6.15.9" else abort "Invalid kernel version: ${kernelVersion}"; @@ -28,7 +28,7 @@ let if kernelVersion == "longterm" then "sha256-1zvwV77ARDSxadG2FkGTb30Ml865I6KB8y413U3MZTE=" else if kernelVersion == "stable" then - "sha256-K7WGyVQnfQcMj99tcnX6qTtIB9m/M1O0kdgUnMoCtPw=" + "sha256-6U86+FSSMC96gZRBRY+AvKCtmRLlpMg8aZ/zxjxSlX0=" else abort "Invalid kernel version: ${kernelVersion}"; From 26c9d906630821f49ca7ee755bf745f7fdb406ca Mon Sep 17 00:00:00 2001 From: Flameopathic Date: Sat, 2 Aug 2025 22:53:06 -0400 Subject: [PATCH 1368/1476] lenovo/yoga/7/14ILL10: update kernel version requirement --- lenovo/yoga/7/14ILL10/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lenovo/yoga/7/14ILL10/default.nix b/lenovo/yoga/7/14ILL10/default.nix index 9c9ca25e..6db6b47f 100644 --- a/lenovo/yoga/7/14ILL10/default.nix +++ b/lenovo/yoga/7/14ILL10/default.nix @@ -6,8 +6,8 @@ ../../../../common/pc/ssd ]; - # touchpad, wifi, and bluetooth do not work before 6.12 - config.boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.12") ( + # device will not boot in kernel versions older than 6.15 + config.boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.15") ( lib.mkDefault pkgs.linuxPackages_latest ); } From d99ca4e5f4d5dbbe3c8107e2fd2c778edeb37851 Mon Sep 17 00:00:00 2001 From: 0x4A6F <0x4A6F@users.noreply.github.com> Date: Sun, 27 Jul 2025 20:31:22 +0200 Subject: [PATCH 1369/1476] framework-amd-ai-300-series: bump kernel to latest for suspend support --- framework/13-inch/amd-ai-300-series/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/framework/13-inch/amd-ai-300-series/default.nix b/framework/13-inch/amd-ai-300-series/default.nix index 5eecb38b..78af36cd 100644 --- a/framework/13-inch/amd-ai-300-series/default.nix +++ b/framework/13-inch/amd-ai-300-series/default.nix @@ -10,6 +10,11 @@ ../common ../common/amd.nix ]; - config.hardware.framework.laptop13.audioEnhancement.rawDeviceName = - lib.mkDefault "alsa_output.pci-0000_c1_00.6.analog-stereo"; + config = { + hardware.framework.laptop13.audioEnhancement.rawDeviceName = + lib.mkDefault "alsa_output.pci-0000_c1_00.6.analog-stereo"; + + # suspend works with 6.15 + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.15") pkgs.linuxPackages_latest; + }; } From 547c96d797da1c0cd1ca737d66f2d18c7de91618 Mon Sep 17 00:00:00 2001 From: 0x4A6F <0x4A6F@users.noreply.github.com> Date: Mon, 4 Aug 2025 12:19:53 +0200 Subject: [PATCH 1370/1476] framework-amd-ai-300-series: mkDefault boot.kernelPackages --- framework/13-inch/amd-ai-300-series/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/13-inch/amd-ai-300-series/default.nix b/framework/13-inch/amd-ai-300-series/default.nix index 78af36cd..0b59e780 100644 --- a/framework/13-inch/amd-ai-300-series/default.nix +++ b/framework/13-inch/amd-ai-300-series/default.nix @@ -15,6 +15,8 @@ lib.mkDefault "alsa_output.pci-0000_c1_00.6.analog-stereo"; # suspend works with 6.15 - boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.15") pkgs.linuxPackages_latest; + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.15") ( + lib.mkDefault pkgs.linuxPackages_latest + ); }; } From 8972e6538b8914babc510fc4f306c231faa92c74 Mon Sep 17 00:00:00 2001 From: Nicky Mouha Date: Wed, 6 Aug 2025 13:04:39 -0400 Subject: [PATCH 1371/1476] framework/13-inch/intel-core-ultra-series1: revert #1358 (fix intel_vpu firmware error -2) --- .../intel-core-ultra-series1/default.nix | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/framework/13-inch/intel-core-ultra-series1/default.nix b/framework/13-inch/intel-core-ultra-series1/default.nix index b2828ff1..3136fbc7 100644 --- a/framework/13-inch/intel-core-ultra-series1/default.nix +++ b/framework/13-inch/intel-core-ultra-series1/default.nix @@ -17,30 +17,6 @@ lib.mkDefault pkgs.linuxPackages_latest ); - # Intel NPU Driver - # https://discourse.nixos.org/t/new-installation-on-asus-zenbook-ux5406-intel-vpu-firmware-error-2/58732/2 - hardware.firmware = lib.optionals (config.hardware.enableRedistributableFirmware) [ - ( - let - model = "37xx"; - version = "0.0"; - - firmware = pkgs.fetchurl { - url = "https://github.com/intel/linux-npu-driver/raw/v1.13.0/firmware/bin/vpu_${model}_v${version}.bin"; - hash = "sha256-Mpoeq8HrwChjtHALsss/7QsFtDYAoFNsnhllU0xp3os="; - }; - in - pkgs.runCommand "intel-vpu-firmware-${model}-${version}" { } '' - mkdir -p "$out/lib/firmware/intel/vpu" - cp '${firmware}' "$out/lib/firmware/intel/vpu/vpu_${model}_v${version}.bin" - '' - ) - ]; - - warnings = lib.mkIf (!config.hardware.enableRedistributableFirmware) [ - ''For Intel NPU support, set the option: hardware.enableRedistributableFirmware = true;'' - ]; - hardware.framework.laptop13.audioEnhancement.rawDeviceName = lib.mkDefault "alsa_output.pci-0000_00_1f.3.analog-stereo"; } From 915755282509cdb7d707eb1b3c4e4ef5919bf4ef Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Mon, 19 May 2025 22:51:57 +0800 Subject: [PATCH 1372/1476] framework: Add Framework Desktop Signed-off-by: Daniel Schaefer --- flake.nix | 1 + .../desktop/amd-ai-max-300-series/README.md | 17 +++++++++++++++++ .../desktop/amd-ai-max-300-series/default.nix | 10 ++++++++++ 3 files changed, 28 insertions(+) create mode 100644 framework/desktop/amd-ai-max-300-series/README.md create mode 100644 framework/desktop/amd-ai-max-300-series/default.nix diff --git a/flake.nix b/flake.nix index 14cd6884..3cd9e355 100644 --- a/flake.nix +++ b/flake.nix @@ -133,6 +133,7 @@ framework-13-7040-amd = import ./framework/13-inch/7040-amd; framework-amd-ai-300-series = import ./framework/13-inch/amd-ai-300-series; framework-16-7040-amd = import ./framework/16-inch/7040-amd; + framework-desktop-amd-ai-max-300-series = import ./framework/desktop/amd-ai-max-300-series; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; focus-m2-gen1 = import ./focus/m2/gen1; diff --git a/framework/desktop/amd-ai-max-300-series/README.md b/framework/desktop/amd-ai-max-300-series/README.md new file mode 100644 index 00000000..6cc79bcd --- /dev/null +++ b/framework/desktop/amd-ai-max-300-series/README.md @@ -0,0 +1,17 @@ +# [Framework Desktop](https://frame.work/desktop) + +## Updating Firmware + +First put enable `fwupd` + +```nix +services.fwupd.enable = true; +``` + +Then run + +```sh + $ fwupdmgr update +``` + +- [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Desktop.RyzenAIMax300.BIOS.firmware) diff --git a/framework/desktop/amd-ai-max-300-series/default.nix b/framework/desktop/amd-ai-max-300-series/default.nix new file mode 100644 index 00000000..b0205923 --- /dev/null +++ b/framework/desktop/amd-ai-max-300-series/default.nix @@ -0,0 +1,10 @@ +{ config, lib, ... }: +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ../../../common/pc/ssd + ../../framework-tool.nix + ]; +} From 659b41d59cf586362a99adbfc9e0fb9de1acac3b Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Thu, 24 Jul 2025 18:18:06 +0800 Subject: [PATCH 1373/1476] framework/desktop: Add minimum kernel version Signed-off-by: Daniel Schaefer --- framework/desktop/amd-ai-max-300-series/README.md | 6 ++++++ framework/desktop/amd-ai-max-300-series/default.nix | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/framework/desktop/amd-ai-max-300-series/README.md b/framework/desktop/amd-ai-max-300-series/README.md index 6cc79bcd..e9c274e7 100644 --- a/framework/desktop/amd-ai-max-300-series/README.md +++ b/framework/desktop/amd-ai-max-300-series/README.md @@ -1,5 +1,11 @@ # [Framework Desktop](https://frame.work/desktop) +## Kernel version + +The recommended version is 6.15 or newer, it has good GPU and also EC firmware support (for sensors and ARGB). +The lowest recommended version is 6.14. It has good GPU support already. +The absolute lowest that runs okay on headless systems is 6.11, but the GPU is not fully supported yet. + ## Updating Firmware First put enable `fwupd` diff --git a/framework/desktop/amd-ai-max-300-series/default.nix b/framework/desktop/amd-ai-max-300-series/default.nix index b0205923..60fc6216 100644 --- a/framework/desktop/amd-ai-max-300-series/default.nix +++ b/framework/desktop/amd-ai-max-300-series/default.nix @@ -1,4 +1,9 @@ -{ config, lib, ... }: +{ + config, + lib, + pkgs, + ... +}: { imports = [ ../../../common/cpu/amd @@ -7,4 +12,9 @@ ../../../common/pc/ssd ../../framework-tool.nix ]; + + # 6.14 and above have good GPU support + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.14") ( + lib.mkDefault pkgs.linuxPackages_latest + ); } From df02f4f16a46d258967705383f408ce4a684f3e7 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Thu, 24 Jul 2025 12:58:11 +0800 Subject: [PATCH 1374/1476] framework/12-inch: Fix tabletmode on some kernels NixOS kernels don't have pinctrl_tigerlake built-in, we need to make sure it loads before soc_button_array. Adding it to the initrd ensures that. Signed-off-by: Daniel Schaefer --- framework/12-inch/13th-gen-intel/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/framework/12-inch/13th-gen-intel/default.nix b/framework/12-inch/13th-gen-intel/default.nix index 6431338a..7a3e1de4 100644 --- a/framework/12-inch/13th-gen-intel/default.nix +++ b/framework/12-inch/13th-gen-intel/default.nix @@ -4,4 +4,10 @@ ../common ../../../common/cpu/intel ]; + + # If this module isn't built into the kernel, we need to make sure it loads + # before soc_button_array. Otherwise the tablet mode gpio doesn't work. + # If correctly loaded, dmesg should show + # input: gpio-keys as /devices/platform/INT33D3:00 + boot.initrd.kernelModules = [ "pinctrl_tigerlake" ]; } From aaecdd8d3bd6e7e52a6375e7bab914582ce5e540 Mon Sep 17 00:00:00 2001 From: pancho horrillo Date: Fri, 8 Aug 2025 07:17:15 +0200 Subject: [PATCH 1375/1476] Update flake.lock, dropping unused `nixpkgs` input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On a7600cef40e350c6f3fcb6eefb6f0d6b09c7d05e all the inputs on `flake.nix` were moved to `tests/flake.nix`, but `flake.lock` was not updated correctly, and a reference to `nixpkgs` still remains, producing this error upon evaluation when used as an input in my flake: evaluating file ''copying "/nix/store/xjzjf1f6nyg6yqxb6v5awf9hs14606yp-source" to the store...evaluating file '/nix/store/xjzjf1f6nyg6yqxb6v5awf9hs14606yp-source/flake.nix'evaluating file '/nix/store/xjzjf1f6nyg6yqxb6v5awf9hs14606yp-source/flake.nix'warning: updating lock file '"/nix/store/xjzjf1f6nyg6yqxb6v5awf9hs14606yp-source/flake.lock"':• Removed input 'nixpkgs'error:… while updating the lock file of flake 'path:/nix/store/xjzjf1f6nyg6yqxb6v5awf9hs14606yp-source?lastModified=0&narHash=sha256-dz303vGuzWjzOPOaYkS9xSW%2BB93PSAJxvBd6CambXVA%3D'error: opening file '/nix/store/xjzjf1f6nyg6yqxb6v5awf9hs14606yp-source/flake.lock': Read-only file system I’ve thus updated `flake.lock` with the standard procedure: ```console ❯ nix flake lock --verbose warning: updating lock file '"/home/pancho/sandbox/NixOS/nixos-hardware/flake.lock"': • Removed input 'nixpkgs' ``` --- flake.lock | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index 8f2f2e35..5999137c 100644 --- a/flake.lock +++ b/flake.lock @@ -1,26 +1,6 @@ { "nodes": { - "nixpkgs": { - "locked": { - "lastModified": 1751290770, - "narHash": "sha256-u4s8yKAqTzPGY3vTcDyAIet11uXaNCM//93/0O0NlbA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0620a50e9a847851bf802c59a4202552ed79b821", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.05-small", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "nixpkgs": "nixpkgs" - } - } + "root": {} }, "root": "root", "version": 7 From 139a6586edaa656ca7beee79d6bf397af4066fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Eyselein?= Date: Fri, 8 Aug 2025 09:51:11 +0200 Subject: [PATCH 1376/1476] Add Lenovo Thinkpad P16s AMD Gen 4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Björn Eyselein --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/p16s/amd/gen4/default.nix | 5 +++++ 3 files changed, 7 insertions(+) create mode 100644 lenovo/thinkpad/p16s/amd/gen4/default.nix diff --git a/README.md b/README.md index 7a774cf0..b9a54364 100644 --- a/README.md +++ b/README.md @@ -275,6 +275,7 @@ See code for all available configurations. | [Lenovo ThinkPad P14s Intel Gen 5](lenovo/thinkpad/p14s/intel/gen5) | `` | `lenovo-thinkpad-p14s-intel-gen5`| | [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | `lenovo-thinkpad-p16s-amd-gen1` | | [Lenovo ThinkPad P16s AMD Gen 2](lenovo/thinkpad/p16s/amd/gen2) | `` | `lenovo-thinkpad-p16s-amd-gen2` | +| [Lenovo ThinkPad P16s AMD Gen 4](lenovo/thinkpad/p16s/amd/gen4) | `` | `lenovo-thinkpad-p16s-amd-gen4` | | [Lenovo ThinkPad P16s Intel Gen 2](lenovo/thinkpad/p16s/intel/gen2) | `` | `lenovo-thinkpad-p16s-intel-gen2`| | [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | `lenovo-thinkpad-p1` | | [Lenovo ThinkPad P43s](lenovo/thinkpad/p43s) | `` | `lenovo-thinkpad-p43s` | diff --git a/flake.nix b/flake.nix index 3cd9e355..2b78c7f3 100644 --- a/flake.nix +++ b/flake.nix @@ -211,6 +211,7 @@ lenovo-thinkpad-p14s-intel-gen5 = import ./lenovo/thinkpad/p14s/intel/gen5; lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1; lenovo-thinkpad-p16s-amd-gen2 = import ./lenovo/thinkpad/p16s/amd/gen2; + lenovo-thinkpad-p16s-amd-gen4 = import ./lenovo/thinkpad/p16s/amd/gen4; lenovo-thinkpad-p16s-intel-gen2 = import ./lenovo/thinkpad/p16s/intel/gen2; lenovo-thinkpad-p43s = import ./lenovo/thinkpad/p43s; lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50; diff --git a/lenovo/thinkpad/p16s/amd/gen4/default.nix b/lenovo/thinkpad/p16s/amd/gen4/default.nix new file mode 100644 index 00000000..665d3d41 --- /dev/null +++ b/lenovo/thinkpad/p16s/amd/gen4/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ../. + ]; +} From 680761f019c3d37c5a3d920b1ff8c61ded68cd6b Mon Sep 17 00:00:00 2001 From: eymeric Date: Sun, 3 Aug 2025 11:45:33 +0200 Subject: [PATCH 1377/1476] fix: tc358743 dt overlay --- raspberry-pi/4/tc358743.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/raspberry-pi/4/tc358743.nix b/raspberry-pi/4/tc358743.nix index 840953aa..329112bb 100644 --- a/raspberry-pi/4/tc358743.nix +++ b/raspberry-pi/4/tc358743.nix @@ -17,6 +17,7 @@ in }; config = lib.mkIf cfg.enable { + hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb"; hardware.deviceTree.overlays = [ { name = "tc358743-overlay"; From 79649965c5f00f1a13c0517625828f3df0f50f47 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Sat, 2 Aug 2025 13:16:10 +0100 Subject: [PATCH 1378/1476] fix(raspberry-pi-4): enable building kernel Fixes https://github.com/NixOS/nixos-hardware/issues/858 --- raspberry-pi/4/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index e02ba0b3..d862a2e7 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -37,6 +37,9 @@ "reset-raspberrypi" # required for vl805 firmware to load ]; + # Allow building kernel + initrd.systemd.tpm2.enable = false; + loader = { grub.enable = lib.mkDefault false; generic-extlinux-compatible.enable = lib.mkDefault true; From c4af46bb6a91f90a99d9fc0b89a0fda85122943b Mon Sep 17 00:00:00 2001 From: Jasper Chan Date: Wed, 13 Aug 2025 21:36:43 -0700 Subject: [PATCH 1379/1476] raspberry-pi/4: support enabling/disabling media-controller api on tc358743 --- raspberry-pi/4/tc358743.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/raspberry-pi/4/tc358743.nix b/raspberry-pi/4/tc358743.nix index 840953aa..a8a7c356 100644 --- a/raspberry-pi/4/tc358743.nix +++ b/raspberry-pi/4/tc358743.nix @@ -13,6 +13,11 @@ in running ustreamer (which starts webservice providing a camera stream): ''${pkgs.ustreamer}/bin/ustreamer --persistent --dv-timings ''; + media-controller = lib.mkEnableOption '' + Enable support for the Media Controller API. + + See https://forums.raspberrypi.com/viewtopic.php?t=322076 for details + ''; }; }; @@ -61,6 +66,15 @@ in __overlay__ { status = "okay"; + ${ + if cfg.media-controller then + "" + else + '' + compatible = "brcm,bcm2835-unicam-legacy"; + '' + } + port { endpoint { From 292aeb6fd6a33045f73e24cbf51ed22ef4156094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mads=20Rumle=20Nordstr=C3=B8m?= Date: Fri, 15 Aug 2025 13:16:50 +0200 Subject: [PATCH 1380/1476] added macbook pro 11,4 config --- README.md | 1 + apple/macbook-pro/11-4/README.md | 42 ++++++++++++++++++++++++++++++ apple/macbook-pro/11-4/default.nix | 16 ++++++++++++ flake.nix | 1 + 4 files changed, 60 insertions(+) create mode 100644 apple/macbook-pro/11-4/README.md create mode 100644 apple/macbook-pro/11-4/default.nix diff --git a/README.md b/README.md index 7a774cf0..99bfd20c 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,7 @@ See code for all available configurations. | [Apple MacBook Pro 8,1](apple/macbook-pro/8-1) | `` | `apple-macbook-pro-8-1` | | [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | `apple-macbook-pro-10-1` | | [Apple MacBook Pro 11,1](apple/macbook-pro/11-1) | `` | `apple-macbook-pro-11-1` | +| [Apple MacBook Pro 11,4](apple/macbook-pro/11-4) | `` | `apple-macbook-pro-11-4` | | [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | `apple-macbook-pro-11-5` | | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | `apple-macbook-pro-12-1` | | [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | `apple-macbook-pro-14-1` | diff --git a/apple/macbook-pro/11-4/README.md b/apple/macbook-pro/11-4/README.md new file mode 100644 index 00000000..dc0a17c8 --- /dev/null +++ b/apple/macbook-pro/11-4/README.md @@ -0,0 +1,42 @@ +# Apple MacBookPro11,4 + +[Product page](https://support.apple.com/en-us/111955) + + +## Tested Hardware +```console +foo@bar:~$ lspci -nn +00:00.0 Host bridge [0600]: Intel Corporation Crystal Well DRAM Controller [8086:0d04] (rev 08) +00:01.0 PCI bridge [0604]: Intel Corporation Crystal Well PCI Express x16 Controller [8086:0d01] (rev 08) +00:01.1 PCI bridge [0604]: Intel Corporation Crystal Well PCI Express x8 Controller [8086:0d05] (rev 08) +00:02.0 VGA compatible controller [0300]: Intel Corporation Crystal Well Integrated Graphics Controller [8086:0d26] (rev 08) +00:03.0 Audio device [0403]: Intel Corporation Crystal Well HD Audio Controller [8086:0d0c] (rev 08) +00:14.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI [8086:8c31] (rev 05) +00:16.0 Communication controller [0780]: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 [8086:8c3a] (rev 04) +00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 05) +00:1c.0 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 [8086:8c10] (rev d5) +00:1c.2 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 [8086:8c14] (rev d5) +00:1c.3 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 [8086:8c16] (rev d5) +00:1f.0 ISA bridge [0601]: Intel Corporation HM87 Express LPC Controller [8086:8c4b] (rev 05) +00:1f.3 SMBus [0c05]: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller [8086:8c22] (rev 05) +00:1f.6 Signal processing controller [1180]: Intel Corporation 8 Series Chipset Family Thermal Management Controller [8086:8c24] (rev 05) +01:00.0 SATA controller [0106]: Samsung Electronics Co Ltd S4LN058A01[SSUBX] AHCI SSD Controller (Apple slot) [144d:a801] (rev 01) +03:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM43602 802.11ac Wireless LAN SoC [14e4:43ba] (rev 01) +04:00.0 Multimedia controller [0480]: Broadcom Inc. and subsidiaries 720p FaceTime HD Camera [14e4:1570] +05:00.0 PCI bridge [0604]: Intel Corporation DSL5520 Thunderbolt 2 Bridge [Falcon Ridge 4C 2013] [8086:156d] +06:00.0 PCI bridge [0604]: Intel Corporation DSL5520 Thunderbolt 2 Bridge [Falcon Ridge 4C 2013] [8086:156d] +06:03.0 PCI bridge [0604]: Intel Corporation DSL5520 Thunderbolt 2 Bridge [Falcon Ridge 4C 2013] [8086:156d] +06:04.0 PCI bridge [0604]: Intel Corporation DSL5520 Thunderbolt 2 Bridge [Falcon Ridge 4C 2013] [8086:156d] +06:05.0 PCI bridge [0604]: Intel Corporation DSL5520 Thunderbolt 2 Bridge [Falcon Ridge 4C 2013] [8086:156d] +06:06.0 PCI bridge [0604]: Intel Corporation DSL5520 Thunderbolt 2 Bridge [Falcon Ridge 4C 2013] [8086:156d] +07:00.0 System peripheral [0880]: Intel Corporation DSL5520 Thunderbolt 2 NHI [Falcon Ridge 4C 2013] [8086:156c] +``` + +## Tested Nix Configuration + - system: `"x86_64-linux"` + - host os: `Linux 6.12.36, NixOS, 25.11 (Xantusia), 25.11.20250708.9807714` + - multi-user?: `yes` + - sandbox: `yes` + - version: `nix-env (Nix) 2.28.4` + - channels(root): `"nixos"` + - nixpkgs: `/nix/store/bgl6ldj5ihbwcq8p42z3a0qzgqafgk2b-source` diff --git a/apple/macbook-pro/11-4/default.nix b/apple/macbook-pro/11-4/default.nix new file mode 100644 index 00000000..7dec9858 --- /dev/null +++ b/apple/macbook-pro/11-4/default.nix @@ -0,0 +1,16 @@ +{ lib, config, pkgs, modulesPath, ... }: +{ + imports = [ + ../. + ../../../common/cpu/intel/haswell + ../../../common/pc/ssd + "${modulesPath}/hardware/network/broadcom-43xx.nix" + ]; + + hardware.graphics.enable = lib.mkDefault true; + + # Faster wakeups from suspend + systemd.sleep.extraConfig = '' + MemorySleepMode=s2idle + ''; +} diff --git a/flake.nix b/flake.nix index 14cd6884..2340c81a 100644 --- a/flake.nix +++ b/flake.nix @@ -26,6 +26,7 @@ apple-macbook-pro-8-1 = import ./apple/macbook-pro/8-1; apple-macbook-pro-10-1 = import ./apple/macbook-pro/10-1; apple-macbook-pro-11-1 = import ./apple/macbook-pro/11-1; + apple-macbook-pro-11-4 = import ./apple/macbook-pro/11-4; apple-macbook-pro-11-5 = import ./apple/macbook-pro/11-5; apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1; From 7dd36b62fc1316dc33d63d4ada114f52b5300d8d Mon Sep 17 00:00:00 2001 From: Matt Schwennesen Date: Fri, 15 Aug 2025 18:22:42 -0500 Subject: [PATCH 1381/1476] fix typo casuing error --- microsoft/surface/common/kernel/6.12/patches.nix | 6 ++---- microsoft/surface/common/kernel/6.15/patches.nix | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/microsoft/surface/common/kernel/6.12/patches.nix b/microsoft/surface/common/kernel/6.12/patches.nix index d5cc8ccc..a2ce7d1a 100644 --- a/microsoft/surface/common/kernel/6.12/patches.nix +++ b/microsoft/surface/common/kernel/6.12/patches.nix @@ -3,13 +3,11 @@ kernel ? lib.kernel, patchSrc, version, -}: - -[ +}: [ { name = "microsoft-surface-patches-linux-${version}"; patch = null; - extraStructuredConfig = with kernel; { + structuredExtraConfig = with kernel; { STAGING_MEDIA = yes; ## diff --git a/microsoft/surface/common/kernel/6.15/patches.nix b/microsoft/surface/common/kernel/6.15/patches.nix index 6f685ee4..bcd253c1 100644 --- a/microsoft/surface/common/kernel/6.15/patches.nix +++ b/microsoft/surface/common/kernel/6.15/patches.nix @@ -3,13 +3,11 @@ kernel ? lib.kernel, patchSrc, version, -}: - -[ +}: [ { name = "microsoft-surface-patches-linux-${version}"; patch = null; - extraStructuredConfig = with kernel; { + structuredExtraConfig = with kernel; { STAGING_MEDIA = yes; ## ## Surface Aggregator Module From c006c5a59b9f844ca5e835e0bb1aed85a9bf4284 Mon Sep 17 00:00:00 2001 From: Matt Schwennesen Date: Fri, 15 Aug 2025 23:00:53 -0500 Subject: [PATCH 1382/1476] formatting --- microsoft/surface/common/kernel/6.12/patches.nix | 4 +++- microsoft/surface/common/kernel/6.15/patches.nix | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/6.12/patches.nix b/microsoft/surface/common/kernel/6.12/patches.nix index a2ce7d1a..fd48cb7e 100644 --- a/microsoft/surface/common/kernel/6.12/patches.nix +++ b/microsoft/surface/common/kernel/6.12/patches.nix @@ -3,7 +3,9 @@ kernel ? lib.kernel, patchSrc, version, -}: [ +}: + +[ { name = "microsoft-surface-patches-linux-${version}"; patch = null; diff --git a/microsoft/surface/common/kernel/6.15/patches.nix b/microsoft/surface/common/kernel/6.15/patches.nix index bcd253c1..e4245046 100644 --- a/microsoft/surface/common/kernel/6.15/patches.nix +++ b/microsoft/surface/common/kernel/6.15/patches.nix @@ -3,7 +3,9 @@ kernel ? lib.kernel, patchSrc, version, -}: [ +}: + +[ { name = "microsoft-surface-patches-linux-${version}"; patch = null; From 6287c9e15f1f575157e8c8b7627b5b5858265821 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 03:34:00 +0000 Subject: [PATCH 1383/1476] build(deps): bump actions/checkout from 4 to 5 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4f58d888..ac55dd2a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,13 +9,13 @@ jobs: nixfmt: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: cachix/install-nix-action@v31 - run: cd tests && nix fmt .. -- --fail-on-change tests: needs: nixfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: cachix/install-nix-action@v31 - run: nix run ./tests#run . \ No newline at end of file From 2d512d0f4ef9908c104c4e451bb1571fe81a4267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mads=20Rumle=20Nordstr=C3=B8m?= Date: Mon, 18 Aug 2025 13:14:33 +0200 Subject: [PATCH 1384/1476] removed s2idle for macbookpro11,4 as default --- apple/macbook-pro/11-4/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/apple/macbook-pro/11-4/default.nix b/apple/macbook-pro/11-4/default.nix index 7dec9858..049380c6 100644 --- a/apple/macbook-pro/11-4/default.nix +++ b/apple/macbook-pro/11-4/default.nix @@ -8,9 +8,4 @@ ]; hardware.graphics.enable = lib.mkDefault true; - - # Faster wakeups from suspend - systemd.sleep.extraConfig = '' - MemorySleepMode=s2idle - ''; } From e3e3717d85ca1105afc9ec5b3a6a4ce4ba204135 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Mon, 11 Aug 2025 18:14:42 +0800 Subject: [PATCH 1385/1476] apple/t2: kernel 6.15 -> 6.16; sync patches --- apple/t2/pkgs/linux-t2/latest.json | 34 ++++++------------------------ apple/t2/pkgs/linux-t2/latest.nix | 4 ++-- apple/t2/pkgs/linux-t2/stable.json | 4 ++-- 3 files changed, 11 insertions(+), 31 deletions(-) diff --git a/apple/t2/pkgs/linux-t2/latest.json b/apple/t2/pkgs/linux-t2/latest.json index 629d74d2..09dc89b3 100644 --- a/apple/t2/pkgs/linux-t2/latest.json +++ b/apple/t2/pkgs/linux-t2/latest.json @@ -1,5 +1,5 @@ { - "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/8ec11f3aaa314d25e18842851a2124c0031e2e3f/", + "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/6b41c3fd65913e0fa3592ad16ff4a3a5b01efc7a/", "patches": [ { "name": "1001-Add-apple-bce-driver.patch", @@ -37,29 +37,9 @@ "name": "1011-HID-multitouch-add-device-ID-for-Apple-Touch-Bar.patch", "hash": "sha256-dIzEOj89D2rIEc2/mjq3TkIfI3ZHzu0VRDQQOzp+Snc=" }, - { - "name": "1013-lib-vsprintf-Add-support-for-generic-FourCCs-by-exte.patch", - "hash": "sha256-g8M3j1ZPND10/LtPD/txaSoJGV9Lp+g5bgn+vQc56p4=" - }, - { - "name": "1014-printf-add-tests-for-generic-FourCCs.patch", - "hash": "sha256-5Z4cFBMAY695OEU/CxiGQkUz68zmKdxssD+yp1DCYgs=" - }, - { - "name": "1015-drm-appletbdrm-use-p4cl-instead-of-p4cc.patch", - "hash": "sha256-rZej0ZbpPv+8NROuYnf4Jpu9scCsmbKWyz7yf5A3G3s=" - }, - { - "name": "1016-vsprintf-Use-p4chR-instead-of-p4cn-for-reading-data-.patch", - "hash": "sha256-/Ork2CmYk6SG213Owk+nGsw7KTEVDLRzQTeWcKrPZGw=" - }, - { - "name": "1017-checkpatch-remove-p4cn.patch", - "hash": "sha256-lnMnjnMiR9WSNf/XYsiOwFdC9xKv8zSluWiR584xFPU=" - }, { "name": "2008-i915-4-lane-quirk-for-mbp15-1.patch", - "hash": "sha256-Ui9tK4IGSWfEscmD92emX/NfulO0m8zwLc9ivIClCFQ=" + "hash": "sha256-PjMVt4u505PXnKFpojov0Uwhj0KxZas1E4NYJGI6lQ4=" }, { "name": "2009-apple-gmux-allow-switching-to-igpu-at-probe.patch", @@ -103,7 +83,7 @@ }, { "name": "4001-asahi-trackpad.patch", - "hash": "sha256-QM/FtDft4N4imJBuEHg6cH3e8vEyMPLt0alDhugLPy8=" + "hash": "sha256-nOpQ3t+QQXco6p7C03fM5EZ3ZfnzwC6UCFwHQd1EnGE=" }, { "name": "4002-HID-quirks-remove-T2-devices-from-hid_mouse_ignore_l.patch", @@ -115,7 +95,7 @@ }, { "name": "4004-HID-magicmouse-Add-support-for-trackpads-found-on-T2.patch", - "hash": "sha256-HcPX7gY3hnlwM/tY06pbtXnch04AqwHgC596E8ZqGY8=" + "hash": "sha256-dNrpDlIE9SaQUOntVQHMOyj7T/dsuRemN56yskKWue0=" }, { "name": "4005-HID-apple-Add-necessary-IDs-and-support-for-replacem.patch", @@ -123,15 +103,15 @@ }, { "name": "4006-HID-magicmouse-Add-MacBookPro15-1-replacement-trackp.patch", - "hash": "sha256-uAlT/4ADwYyKvbuPQaGwqCjZ2/myruC63etVV6cfFLk=" + "hash": "sha256-mMqHhxig+Z9eVPaa1qfcNVCRX16B6/KuEd1KnSZMLLk=" }, { "name": "7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch", - "hash": "sha256-O6RHFxmKZn7aCq1D+r5z2T3jLt0r5+01EABD9rs0E5M=" + "hash": "sha256-/EKN7JsAxcpAgfJFtPp2NLYaGqQ0kl8wjJEXifSzJpY=" }, { "name": "8001-Add-APFS-driver.patch", - "hash": "sha256-io17Kk6FDscDoDshddK9TqSPuXVFTzjvRUwOGTl5cjM=" + "hash": "sha256-uR5hg75SFFWzfrKyU5UnzPL4U7LkjqGs44rkxM7ur8o=" }, { "name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch", diff --git a/apple/t2/pkgs/linux-t2/latest.nix b/apple/t2/pkgs/linux-t2/latest.nix index 747db71e..bba508ba 100644 --- a/apple/t2/pkgs/linux-t2/latest.nix +++ b/apple/t2/pkgs/linux-t2/latest.nix @@ -1,6 +1,6 @@ -{ callPackage, linux_6_15, ... }@args: +{ callPackage, linux_6_16, ... }@args: callPackage ./generic.nix args { - kernel = linux_6_15; + kernel = linux_6_16; patchesFile = ./latest.json; } diff --git a/apple/t2/pkgs/linux-t2/stable.json b/apple/t2/pkgs/linux-t2/stable.json index 325f42e4..d6d64cd1 100644 --- a/apple/t2/pkgs/linux-t2/stable.json +++ b/apple/t2/pkgs/linux-t2/stable.json @@ -1,5 +1,5 @@ { - "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/e08a76e1f1234885b9b68be6c843bf91833e8b0a/", + "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/7ddb75990d7377d6aebe3f2cd3a718124c61c809/", "patches": [ { "name": "1001-Add-apple-bce-driver.patch", @@ -131,7 +131,7 @@ }, { "name": "8001-Add-APFS-driver.patch", - "hash": "sha256-O3RNtpeZQENPEfyYi/0ZTLhAWBAw6pmxMS30NUxOTdk=" + "hash": "sha256-QpIPsMjWNPOkw6rSKn7rW0Fmx9HUwJaiGy3pZeT5Fd0=" }, { "name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch", From 0413405b45b381c8c8fa25d8e81fcbb395bc423e Mon Sep 17 00:00:00 2001 From: bashfulrobot Date: Tue, 19 Aug 2025 10:13:29 -0700 Subject: [PATCH 1386/1476] =?UTF-8?q?feat:=20=E2=9C=A8=20add=20ThinkPad=20?= =?UTF-8?q?T14=20Intel=20Gen=206=20hardware=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add complete hardware profile for Lenovo ThinkPad T14 Intel Gen 6 with: - Lunar Lake CPU architecture support with modern kernel requirements - Intel Arc graphics integration - Kernel parameters for backlight and touchpad optimization - Fingerprint reader support with comprehensive PAM configuration guidance - Disabled throttled service for modern Intel power management - Updated flake.nix and README.md with new module entries Includes detailed documentation for fingerprint authentication setup with warnings about potential login issues and proper PAM configuration in host systems. Follows CONTRIBUTING.md guidelines for profile structure. --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/t14/intel/default.nix | 9 ++++ lenovo/thinkpad/t14/intel/gen6/default.nix | 60 ++++++++++++++++++++++ 4 files changed, 71 insertions(+) create mode 100644 lenovo/thinkpad/t14/intel/default.nix create mode 100644 lenovo/thinkpad/t14/intel/gen6/default.nix diff --git a/README.md b/README.md index 7a774cf0..5316196b 100644 --- a/README.md +++ b/README.md @@ -288,6 +288,7 @@ See code for all available configurations. | [Lenovo ThinkPad T14 AMD Gen 4](lenovo/thinkpad/t14/amd/gen4) | `` | `lenovo-thinkpad-t14-amd-gen4` | | [Lenovo ThinkPad T14 AMD Gen 5](lenovo/thinkpad/t14/amd/gen5) | `` | `lenovo-thinkpad-t14-amd-gen5` | | [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | `lenovo-thinkpad-t14` | +| [Lenovo ThinkPad T14 Intel Gen 6](lenovo/thinkpad/t14/intel/gen6) | `` | `lenovo-thinkpad-t14-intel-gen6` | | [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | `lenovo-thinkpad-t14s-amd-gen1` | | [Lenovo ThinkPad T14s AMD Gen 4](lenovo/thinkpad/t14s/amd/gen4) | `` | `lenovo-thinkpad-t14s-amd-gen4` | | [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | `lenovo-thinkpad-t14s` | diff --git a/flake.nix b/flake.nix index 3cd9e355..019c8428 100644 --- a/flake.nix +++ b/flake.nix @@ -223,6 +223,7 @@ lenovo-thinkpad-t14-amd-gen3 = import ./lenovo/thinkpad/t14/amd/gen3; lenovo-thinkpad-t14-amd-gen4 = import ./lenovo/thinkpad/t14/amd/gen4; lenovo-thinkpad-t14-amd-gen5 = import ./lenovo/thinkpad/t14/amd/gen5; + lenovo-thinkpad-t14-intel-gen6 = import ./lenovo/thinkpad/t14/intel/gen6; lenovo-thinkpad-t14s = import ./lenovo/thinkpad/t14s; lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1; lenovo-thinkpad-t14s-amd-gen4 = import ./lenovo/thinkpad/t14s/amd/gen4; diff --git a/lenovo/thinkpad/t14/intel/default.nix b/lenovo/thinkpad/t14/intel/default.nix new file mode 100644 index 00000000..330ecd3e --- /dev/null +++ b/lenovo/thinkpad/t14/intel/default.nix @@ -0,0 +1,9 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../../common/cpu/intel + ../../../../common/gpu/intel + ]; +} diff --git a/lenovo/thinkpad/t14/intel/gen6/default.nix b/lenovo/thinkpad/t14/intel/gen6/default.nix new file mode 100644 index 00000000..e6e6a5f4 --- /dev/null +++ b/lenovo/thinkpad/t14/intel/gen6/default.nix @@ -0,0 +1,60 @@ +{ + lib, + pkgs, + config, + ... +}: + +{ + imports = [ + ../../. + ../../../../../common/cpu/intel/lunar-lake + ]; + + # T14 Gen 6 uses Intel Core Ultra processors (Lunar Lake architecture) + # with integrated Intel Arc graphics + # The lunar-lake module already includes appropriate GPU support + + # Ensure modern kernel for full Lunar Lake support + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.8") pkgs.linuxPackages_latest; + + # TODO: Looking for feedback on these kernel parameters for T14 Gen 6 + # Force use of the thinkpad_acpi driver for backlight control + # This allows the backlight save/load systemd service to work + boot.kernelParams = [ + "acpi_backlight=native" + # TODO: Looking for feedback - touchpad fix needed for proper click registration on some T14 models + "psmouse.synaptics_intertouch=0" + ]; + + # TODO: Looking for feedback - modern Intel CPUs don't typically need throttled service + # which can interfere with newer power management on Lunar Lake + services.throttled.enable = lib.mkDefault false; + + # Enable fingerprint reader support + # NOTE: PAM configuration should be done in host config to avoid login issues + # See: https://github.com/NixOS/nixpkgs/issues/171136 + services.fprintd.enable = lib.mkDefault true; + + # For complete fingerprint authentication in GNOME, add the following to your host config: + # + # security.pam.services = { + # # Enable fingerprint authentication for sudo + # sudo.fprintAuth = lib.mkDefault true; + # + # # Enable fingerprint authentication for su + # su.fprintAuth = lib.mkDefault true; + # + # # Enable fingerprint authentication for screen unlock + # xscreensaver.fprintAuth = lib.mkDefault true; + # + # # WARNING: login.fprintAuth may break GDM password authentication + # # Only enable if you understand the risks: + # # login.fprintAuth = lib.mkDefault true; + # }; + # + # After configuration: + # 1. Rebuild your system + # 2. Enroll fingerprint: sudo fprintd-enroll $USER + # 3. Test sudo and screen unlock with fingerprint +} From 17113fc124517f837c27f3ebb3a23659a7ca4442 Mon Sep 17 00:00:00 2001 From: ktechmidas Date: Wed, 20 Aug 2025 13:42:37 +0300 Subject: [PATCH 1387/1476] Added g533q --- asus/rog-strix/g533q/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 asus/rog-strix/g533q/default.nix diff --git a/asus/rog-strix/g533q/default.nix b/asus/rog-strix/g533q/default.nix new file mode 100644 index 00000000..be3acbfa --- /dev/null +++ b/asus/rog-strix/g533q/default.nix @@ -0,0 +1,18 @@ +{ ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ampere + ../../../common/pc/laptop + ../../../common/pc/ssd + ../../battery.nix + ]; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:6:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} From 5e741b56dc39de0ff7f2565867dd08a2118155b2 Mon Sep 17 00:00:00 2001 From: ktechmidas Date: Wed, 20 Aug 2025 13:50:51 +0300 Subject: [PATCH 1388/1476] added supporting files --- README.md | 1 + flake.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 7a774cf0..03361105 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,7 @@ See code for all available configurations. | [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/nvidia) | `` | `asus-flow-gv302x-nvidia` | | [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | `asus-rog-strix-g513im` | | [Asus ROG Strix G533ZW](asus/rog-strix/g533zw) | `` | `asus-rog-strix-g533zw` | +| [Asus ROG Strix G533Q](asus/rog-strix/g533q) | `` | `asus-rog-strix-g533zw` | | [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `` | `asus-rog-strix-g713ie` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | `asus-rog-strix-g733qs` | | [Asus ROG Strix X570-E GAMING](asus/rog-strix/x570e) | `` | `asus-rog-strix-x570e` | diff --git a/flake.nix b/flake.nix index 3cd9e355..5f512890 100644 --- a/flake.nix +++ b/flake.nix @@ -43,6 +43,7 @@ asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace; asus-rog-strix-g513im = import ./asus/rog-strix/g513im; asus-rog-strix-g533zw = import ./asus/rog-strix/g533zw; + asus-rog-strix-g533q = import ./asus/rog-strix/g533q; asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-rog-strix-x570e = import ./asus/rog-strix/x570e; From ebd8f57cd95295264da6b92537c28c6e654fddf4 Mon Sep 17 00:00:00 2001 From: fidgetingbits Date: Thu, 21 Aug 2025 08:52:27 +0800 Subject: [PATCH 1389/1476] Fix probe id and switch from sync to offload --- dell/precision/5570/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dell/precision/5570/default.nix b/dell/precision/5570/default.nix index a50b675a..903cce6b 100644 --- a/dell/precision/5570/default.nix +++ b/dell/precision/5570/default.nix @@ -8,14 +8,14 @@ ../../../common/cpu/intel/alder-lake ../../../common/pc/laptop ../../../common/pc/ssd - ../../../common/gpu/nvidia/prime-sync.nix + ../../../common/gpu/nvidia/prime.nix ]; hardware.intelgpu.driver = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8") "xe"; boot.kernelParams = lib.mkIf (config.hardware.intelgpu.driver == "xe") [ - "i915.force_probe=!9a49" - "xe.force_probe=9a49" + "i915.force_probe=!46a6" + "xe.force_probe=46a6" ]; hardware.nvidia = { From c13241f1c0ba923840b2598db289ef120818c88b Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 27 Aug 2025 00:30:49 +0800 Subject: [PATCH 1390/1476] framework 16: Remove headset quirk Framework 16 does not have a built-in headphone jack, this is not needed. Signed-off-by: Daniel Schaefer --- framework/16-inch/common/default.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/framework/16-inch/common/default.nix b/framework/16-inch/common/default.nix index 8443e401..d84252b3 100644 --- a/framework/16-inch/common/default.nix +++ b/framework/16-inch/common/default.nix @@ -8,12 +8,6 @@ ../../framework-tool.nix ]; - # Fix TRRS headphones missing a mic - # https://community.frame.work/t/headset-microphone-on-linux/12387/3 - boot.extraModprobeConfig = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.6.8") '' - options snd-hda-intel model=dell-headset-multi - ''; - # For fingerprint support services.fprintd.enable = lib.mkDefault true; From cd3d24b038b375208dbf204ca71131764b8b4ea8 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 27 Aug 2025 00:29:09 +0800 Subject: [PATCH 1391/1476] Add Framework Laptop 16 AMD AI 300 Series Signed-off-by: Daniel Schaefer --- README.md | 1 + flake.nix | 1 + framework/16-inch/amd-ai-300-series/README.md | 25 +++++++++++++++++++ .../16-inch/amd-ai-300-series/default.nix | 21 ++++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 framework/16-inch/amd-ai-300-series/README.md create mode 100644 framework/16-inch/amd-ai-300-series/default.nix diff --git a/README.md b/README.md index 7a774cf0..93a9069b 100644 --- a/README.md +++ b/README.md @@ -199,6 +199,7 @@ See code for all available configurations. | [Framework 13 AMD AI 300 Series](framework/13-inch/amd-ai-300-series) | `` | `framework-amd-ai-300-series` | | [Framework 12 13th Gen Intel Core](framework/12-inch/13th-gen-intel) | `` | `framework-12-13th-gen-intel` | | [Framework 16 AMD Ryzen 7040 Series](framework/16-inch/7040-amd) | `` | `framework-16-7040-amd` | +| [Framework 16 AMD Ryzen AI 300 Series](framework/16-inch/amd-ai-300-series) | `` | `framework-16-amd-ai-300-series` | | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | `friendlyarm-nanopc-t4` | | [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | `friendlyarm-nanopi-r5s` | | [Focus M2 Gen 1](focus/m2/gen1) | `` | `focus-m2-gen1` | diff --git a/flake.nix b/flake.nix index 3cd9e355..78f6c71f 100644 --- a/flake.nix +++ b/flake.nix @@ -133,6 +133,7 @@ framework-13-7040-amd = import ./framework/13-inch/7040-amd; framework-amd-ai-300-series = import ./framework/13-inch/amd-ai-300-series; framework-16-7040-amd = import ./framework/16-inch/7040-amd; + framework-16-amd-ai-300-series = import ./framework/16-inch/amd-ai-300-series; framework-desktop-amd-ai-max-300-series = import ./framework/desktop/amd-ai-max-300-series; friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; diff --git a/framework/16-inch/amd-ai-300-series/README.md b/framework/16-inch/amd-ai-300-series/README.md new file mode 100644 index 00000000..1c0cc41d --- /dev/null +++ b/framework/16-inch/amd-ai-300-series/README.md @@ -0,0 +1,25 @@ +# [Framework Laptop 16 AMD AI 300 Series](https://frame.work/) + +## nvidia + +If you have an nvidia dGPU module, you can enable it via the nvidia open drivers: + +``` +services.xserver.videoDrivers = [ "nvidia" ]; +hardware.nvidia.open = true; # see the note above +``` + +See also [NVIDIA](https://wiki.nixos.org/wiki/NVIDIA) on the NixOS Wiki. + +## Updating Firmware + +Everything is updateable through fwupd, so it's enabled by default. + +To get the latest firmware, run: + +```sh +$ fwupdmgr refresh +$ fwupdmgr update +``` + +- [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop16.RyzenAI300.BIOS.firmware) diff --git a/framework/16-inch/amd-ai-300-series/default.nix b/framework/16-inch/amd-ai-300-series/default.nix new file mode 100644 index 00000000..bdb94e66 --- /dev/null +++ b/framework/16-inch/amd-ai-300-series/default.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ + ../common + ../common/amd.nix + ]; + + # 6.14 is the minimum recommended kernel, 6.15 has many useful changes, too + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.15") ( + lib.mkDefault pkgs.linuxPackages_latest + ); + + # Everything is updateable through fwupd + services.fwupd.enable = true; +} From 3a4da5f8c13b542c1298e7f0da6c1767db59602d Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 27 Aug 2025 00:43:20 +0800 Subject: [PATCH 1392/1476] framework: Enable fwupd by default Users should keep their firmware (not just BIOS) up to date. Framework 13 Intel 11-13th Gen have some components that can't be updated with fwupd, so some BIOS versions are better to be installed through the EFI shell or Windows. Signed-off-by: Daniel Schaefer --- framework/12-inch/13th-gen-intel/README.md | 11 ++++------- framework/12-inch/common/default.nix | 3 +++ framework/13-inch/7040-amd/README.md | 11 ++++------- framework/13-inch/7040-amd/default.nix | 3 ++- framework/13-inch/amd-ai-300-series/README.md | 13 ++++++------- framework/13-inch/amd-ai-300-series/default.nix | 4 ++++ .../13-inch/intel-core-ultra-series1/README.md | 13 ++++++------- .../13-inch/intel-core-ultra-series1/default.nix | 3 +++ framework/16-inch/7040-amd/README.md | 12 +++++++++++- framework/16-inch/7040-amd/default.nix | 2 ++ framework/16-inch/common/default.nix | 3 +++ 11 files changed, 48 insertions(+), 30 deletions(-) diff --git a/framework/12-inch/13th-gen-intel/README.md b/framework/12-inch/13th-gen-intel/README.md index 6d35825f..4d9ecdb5 100644 --- a/framework/12-inch/13th-gen-intel/README.md +++ b/framework/12-inch/13th-gen-intel/README.md @@ -2,16 +2,13 @@ ## Updating Firmware -First put enable `fwupd` +Everything is updateable through fwupd, so it's enabled by default. -```nix -services.fwupd.enable = true; -``` - -Then run +To get the latest firmware, run: ```sh - $ fwupdmgr update +$ fwupdmgr refresh +$ fwupdmgr update ``` - [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop12.RPL.BIOS.firmware) diff --git a/framework/12-inch/common/default.nix b/framework/12-inch/common/default.nix index 88195ea6..5e8aa81f 100644 --- a/framework/12-inch/common/default.nix +++ b/framework/12-inch/common/default.nix @@ -16,4 +16,7 @@ # Needed for desktop environments to detect display orientation hardware.sensor.iio.enable = lib.mkDefault true; + + # Everything is updateable through fwupd + services.fwupd.enable = true; } diff --git a/framework/13-inch/7040-amd/README.md b/framework/13-inch/7040-amd/README.md index abaef603..76b0db1a 100644 --- a/framework/13-inch/7040-amd/README.md +++ b/framework/13-inch/7040-amd/README.md @@ -2,16 +2,13 @@ ## Updating Firmware -First put enable `fwupd` +Everything is updateable through fwupd, so it's enabled by default. -```nix -services.fwupd.enable = true; -``` - -Then run +To get the latest firmware, run: ```sh - $ fwupdmgr update +$ fwupdmgr refresh +$ fwupdmgr update ``` - [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.Ryzen7040.BIOS.firmware) diff --git a/framework/13-inch/7040-amd/default.nix b/framework/13-inch/7040-amd/default.nix index 2cd21f60..65b71749 100644 --- a/framework/13-inch/7040-amd/default.nix +++ b/framework/13-inch/7040-amd/default.nix @@ -14,7 +14,6 @@ in ../common/amd.nix ../../../common/cpu/amd/raphael/igpu.nix ]; - options = { hardware.framework.amd-7040.preventWakeOnAC = lib.mkOption { type = lib.types.bool; @@ -30,6 +29,8 @@ in }; config = { + services.fwupd.enable = true; + # Workaround applied upstream in Linux >=6.7 (on BIOS 03.03) # https://github.com/torvalds/linux/commit/a55bdad5dfd1efd4ed9ffe518897a21ca8e4e193 services.udev.extraRules = diff --git a/framework/13-inch/amd-ai-300-series/README.md b/framework/13-inch/amd-ai-300-series/README.md index 8f3b7a42..a01b177b 100644 --- a/framework/13-inch/amd-ai-300-series/README.md +++ b/framework/13-inch/amd-ai-300-series/README.md @@ -2,14 +2,13 @@ ## Updating Firmware -First put enable `fwupd` +Everything is updateable through fwupd, so it's enabled by default. -```nix -services.fwupd.enable = true; -``` - -Then run +To get the latest firmware, run: ```sh - $ fwupdmgr update +$ fwupdmgr refresh +$ fwupdmgr update ``` + +- [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.RyzenAI300.BIOS.firmware) diff --git a/framework/13-inch/amd-ai-300-series/default.nix b/framework/13-inch/amd-ai-300-series/default.nix index 0b59e780..c0a479a8 100644 --- a/framework/13-inch/amd-ai-300-series/default.nix +++ b/framework/13-inch/amd-ai-300-series/default.nix @@ -10,7 +10,11 @@ ../common ../common/amd.nix ]; + config = { + # Everything is updateable through fwupd + services.fwupd.enable = true; + hardware.framework.laptop13.audioEnhancement.rawDeviceName = lib.mkDefault "alsa_output.pci-0000_c1_00.6.analog-stereo"; diff --git a/framework/13-inch/intel-core-ultra-series1/README.md b/framework/13-inch/intel-core-ultra-series1/README.md index 8f3b7a42..7f0902e4 100644 --- a/framework/13-inch/intel-core-ultra-series1/README.md +++ b/framework/13-inch/intel-core-ultra-series1/README.md @@ -2,14 +2,13 @@ ## Updating Firmware -First put enable `fwupd` +Everything is updateable through fwupd, so it's enabled by default. -```nix -services.fwupd.enable = true; -``` - -Then run +To get the latest firmware, run: ```sh - $ fwupdmgr update +$ fwupdmgr refresh +$ fwupdmgr update ``` + +- [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop.MTL.BIOS.firmware) diff --git a/framework/13-inch/intel-core-ultra-series1/default.nix b/framework/13-inch/intel-core-ultra-series1/default.nix index b2828ff1..7553e687 100644 --- a/framework/13-inch/intel-core-ultra-series1/default.nix +++ b/framework/13-inch/intel-core-ultra-series1/default.nix @@ -11,6 +11,9 @@ ../common/intel.nix ]; + # Everything is updateable through fwupd + services.fwupd.enable = true; + # Need at least 6.9 to make suspend properly # Specifically this patch: https://github.com/torvalds/linux/commit/073237281a508ac80ec025872ad7de50cfb5a28a boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.9") ( diff --git a/framework/16-inch/7040-amd/README.md b/framework/16-inch/7040-amd/README.md index 0ce3dbe8..0e994c6e 100644 --- a/framework/16-inch/7040-amd/README.md +++ b/framework/16-inch/7040-amd/README.md @@ -1,4 +1,14 @@ # [Framework Laptop 16](https://frame.work/) ## Updating Firmware -The Framework Laptop 16 uses LVFS, so it can be updated via fwupd; see https://wiki.nixos.org/wiki/Fwupd for details + +Everything is updateable through fwupd, so it's enabled by default. + +To get the latest firmware, run: + +```sh +$ fwupdmgr refresh +$ fwupdmgr update +``` + +- [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop16.Ryzen7040.BIOS.firmware) diff --git a/framework/16-inch/7040-amd/default.nix b/framework/16-inch/7040-amd/default.nix index 70275e69..b3bd0333 100644 --- a/framework/16-inch/7040-amd/default.nix +++ b/framework/16-inch/7040-amd/default.nix @@ -12,4 +12,6 @@ ../../../common/cpu/amd/raphael/igpu.nix ]; + # Everything is updateable through fwupd + services.fwupd.enable = true; } diff --git a/framework/16-inch/common/default.nix b/framework/16-inch/common/default.nix index 8443e401..cec1b7be 100644 --- a/framework/16-inch/common/default.nix +++ b/framework/16-inch/common/default.nix @@ -50,4 +50,7 @@ MatchDMIModalias=dmi:*svnFramework:pnLaptop16* AttrKeyboardIntegration=internal ''; + + # Everything is updateable through fwupd + services.fwupd.enable = true; } From cfb36e4feb6a9a423510260a7959eb0831461570 Mon Sep 17 00:00:00 2001 From: Tatesa Uradnik Date: Wed, 27 Aug 2025 13:04:31 +0200 Subject: [PATCH 1393/1476] fix: add missing import of ideapad 16iah8 --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 3cd9e355..807f811d 100644 --- a/flake.nix +++ b/flake.nix @@ -166,6 +166,7 @@ lenovo-ideapad-15ach6 = import ./lenovo/ideapad/15ach6; lenovo-ideapad-16ach6 = import ./lenovo/ideapad/16ach6; lenovo-ideapad-16ahp9 = import ./lenovo/ideapad/16ahp9; + lenovo-ideapad-s5-16iah8 = import ./lenovo/ideapad/16iah8; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-ideapad-slim-5 = import ./lenovo/ideapad/slim-5; lenovo-ideapad-s145-15api = import ./lenovo/ideapad/s145-15api; From 6439a46c7ce9bf5b0d51438e0e316b748cf42fd5 Mon Sep 17 00:00:00 2001 From: lantianx Date: Fri, 8 Aug 2025 02:50:58 +0800 Subject: [PATCH 1394/1476] feat: add MECHREVO Yilong15Pro(GM5HG0A) --- README.md | 1 + flake.nix | 1 + mechrevo/GM5HG0A/default.nix | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 mechrevo/GM5HG0A/default.nix diff --git a/README.md b/README.md index 7a774cf0..b258c1d9 100644 --- a/README.md +++ b/README.md @@ -364,6 +364,7 @@ See code for all available configurations. | [Microsoft Surface Pro 9](microsoft/surface-pro/9) | `` | `microsoft-surface-pro-9` | | [Morefine M600](morefine/m600) | `` | `morefine-m600` | | [Minisforum V3](minisforum/v3) | `` | `minisforum-v3` | +| [MECHREVO Yilong15Pro](mechrevo/GM5HG0A) | `` | `mechrevo-gm5hg0a` | | [NXP iMX8 MPlus Evaluation Kit](nxp/imx8mp-evk) | `` | `nxp-imx8mp-evk` | | [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | `nxp-imx8mq-evk` | | [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | `hardkernel-odroid-hc4` | diff --git a/flake.nix b/flake.nix index 3cd9e355..5d940674 100644 --- a/flake.nix +++ b/flake.nix @@ -290,6 +290,7 @@ lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; malibal-aon-s1-intel = import ./malibal/aon/s1; + mechrevo-gm5hg0a = import ./mechrevo/GM5HG0A; microchip-icicle-kit = import ./microchip/icicle-kit; microsoft-surface-go = import ./microsoft/surface/surface-go; microsoft-surface-pro-intel = import ./microsoft/surface/surface-pro-intel; diff --git a/mechrevo/GM5HG0A/default.nix b/mechrevo/GM5HG0A/default.nix new file mode 100644 index 00000000..6a9e2a9f --- /dev/null +++ b/mechrevo/GM5HG0A/default.nix @@ -0,0 +1,35 @@ +{ + lib, + pkgs, + config, + ... +}: +{ + imports = [ + ../../common/cpu/amd + ../../common/cpu/amd/pstate.nix + ../../common/cpu/amd/zenpower.nix + ../../common/cpu/amd/raphael/igpu.nix + ../../common/gpu/amd + ../../common/gpu/nvidia + ../../common/gpu/nvidia/ada-lovelace + ../../common/gpu/nvidia/prime.nix + ../../common/hidpi.nix + ../../common/pc/laptop + ../../common/pc/ssd + ]; + + # Resolve the issue of sleep mode being awakened by GPIO 6. + # https://nova.gal/blog/%E6%9C%BA%E6%A2%B0%E9%9D%A9%E5%91%BD%E7%BF%BC%E9%BE%99-15Pro-%E8%BF%81%E7%A7%BB-Linux-%E9%81%87%E5%88%B0%E7%9A%84%E4%B8%80%E4%BA%9B%E9%97%AE%E9%A2%98#%E6%97%A0%E6%B3%95%E4%BC%91%E7%9C%A0 + # https://lore.kernel.org/all/20221012221028.4817-1-mario.limonciello@amd.com/T/ + boot.kernelParams = [ "gpiolib_acpi.ignore_interrupt=AMDI0030:00@6" ]; + + hardware.nvidia = { + primeBatterySaverSpecialisation = lib.mkDefault true; + modesetting.enable = lib.mkDefault true; + prime = { + amdgpuBusId = "PCI:6:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; +} From 59e2d82cc23b05e99815ae7ad95f454905f3689d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mads=20Rumle=20Nordstr=C3=B8m?= Date: Fri, 29 Aug 2025 11:16:31 +0200 Subject: [PATCH 1395/1476] ran formatter for mbp11,4 --- apple/macbook-pro/11-4/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apple/macbook-pro/11-4/default.nix b/apple/macbook-pro/11-4/default.nix index 049380c6..611ac0b4 100644 --- a/apple/macbook-pro/11-4/default.nix +++ b/apple/macbook-pro/11-4/default.nix @@ -1,4 +1,10 @@ -{ lib, config, pkgs, modulesPath, ... }: +{ + lib, + config, + pkgs, + modulesPath, + ... +}: { imports = [ ../. From bfda6f34d3eaf310ea2565bd51bc48aabcc45f3a Mon Sep 17 00:00:00 2001 From: Stefano Pacifici Date: Fri, 29 Aug 2025 11:58:46 +0200 Subject: [PATCH 1396/1476] dell/precision/7520: use stable nvidia driver (not legacy) --- dell/precision/7520/README.md | 11 +++++++---- dell/precision/7520/default.nix | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dell/precision/7520/README.md b/dell/precision/7520/README.md index b5c0946c..2c58d84e 100644 --- a/dell/precision/7520/README.md +++ b/dell/precision/7520/README.md @@ -61,7 +61,10 @@ 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. +The choice of the `stable` driver is based on looking at the family of the card on [nouveau wiki's code names page](https://nouveau.freedesktop.org/CodeNames.html) obtained with: + +```bash +$ lspci -k -d ::03xx +``` + +Both `Quadro M2200 Mobile (GM206GLM)` and `Quadro M1200 Mobile (GM107GLM)` belong to the **Maxwell** family which is still supported by the stable driver. diff --git a/dell/precision/7520/default.nix b/dell/precision/7520/default.nix index 4742afb3..8ddc312e 100644 --- a/dell/precision/7520/default.nix +++ b/dell/precision/7520/default.nix @@ -32,7 +32,7 @@ enable32Bit = lib.mkDefault true; }; nvidia = { - package = config.boot.kernelPackages.nvidiaPackages.legacy_390; + package = config.boot.kernelPackages.nvidiaPackages.stable; nvidiaSettings = lib.mkDefault true; modesetting.enable = lib.mkDefault true; open = lib.mkDefault false; From 9691e6ee8a33dec6f8222314785868415bb78560 Mon Sep 17 00:00:00 2001 From: mkorje Date: Sat, 30 Aug 2025 00:52:57 +1000 Subject: [PATCH 1397/1476] apple/t2: sync stable patches --- apple/t2/pkgs/linux-t2/stable.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apple/t2/pkgs/linux-t2/stable.json b/apple/t2/pkgs/linux-t2/stable.json index d6d64cd1..a8dc9a04 100644 --- a/apple/t2/pkgs/linux-t2/stable.json +++ b/apple/t2/pkgs/linux-t2/stable.json @@ -1,5 +1,5 @@ { - "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/7ddb75990d7377d6aebe3f2cd3a718124c61c809/", + "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/cba79a9fcc64d8cd02e0d6f5ab519034db812648/", "patches": [ { "name": "1001-Add-apple-bce-driver.patch", @@ -103,7 +103,7 @@ }, { "name": "4001-asahi-trackpad.patch", - "hash": "sha256-NOuGgUxDQEfFPlij/EnhWmgqeG3/l+j+r2T1YJG7raY=" + "hash": "sha256-kfAYVovukZLD5ocHQxhoHJSa9c5XAJ1GhH1RlzGkS+k=" }, { "name": "4002-HID-quirks-remove-T2-devices-from-hid_mouse_ignore_l.patch", From f3444245a78f55dd22fca2f9f52b1f3e5382572b Mon Sep 17 00:00:00 2001 From: mkorje Date: Mon, 1 Sep 2025 21:05:51 +1000 Subject: [PATCH 1398/1476] apple/t2: sync stable patches (6.12.43 -> 6.12.44) --- apple/t2/pkgs/linux-t2/stable.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apple/t2/pkgs/linux-t2/stable.json b/apple/t2/pkgs/linux-t2/stable.json index a8dc9a04..f70de9dc 100644 --- a/apple/t2/pkgs/linux-t2/stable.json +++ b/apple/t2/pkgs/linux-t2/stable.json @@ -1,5 +1,5 @@ { - "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/cba79a9fcc64d8cd02e0d6f5ab519034db812648/", + "base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/5eaf1261d069bbc67aba7fe2737a5fe981e05a9e/", "patches": [ { "name": "1001-Add-apple-bce-driver.patch", @@ -49,10 +49,6 @@ "name": "1013-lib-vsprintf-Add-support-for-generic-FourCCs-by-exte.patch", "hash": "sha256-h3gxaKtvdm/GSd+AP1sPC9avWHOsceUxTmoua/3rIf4=" }, - { - "name": "1014-drm-format-helper-Add-conversion-from-XRGB8888-to-BG.patch", - "hash": "sha256-Ky19+cCiYDaHBh2o5IhZO8J1ExDT7o8K9cgPz+AL8Cg=" - }, { "name": "1015-drm-tiny-add-driver-for-Apple-Touch-Bars-in-x86-Macs.patch", "hash": "sha256-tDjK/VipVQbuNOURW38gssqeRLy3s8I+DVq0+4zGnHs=" From a57aded40e877bb419d98f8290efa4b8aa5beada Mon Sep 17 00:00:00 2001 From: KaiStarkk Date: Tue, 2 Sep 2025 01:19:01 +1000 Subject: [PATCH 1399/1476] Update README.md - wireplumber example issue --- microsoft/surface/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/microsoft/surface/README.md b/microsoft/surface/README.md index 7fc5675c..3f99001c 100644 --- a/microsoft/surface/README.md +++ b/microsoft/surface/README.md @@ -103,6 +103,23 @@ with the `ath10k` QCA6174 Wifi device. This was fixed in Nov 2021: - https://github.com/linux-surface/linux-surface/issues/542#issuecomment-976995453 +## Troubleshooting IPU6 + +While the camera patches are applied in `common`, camera functionality is still WIP for several devices (see [https://github.com/linux-surface/linux-surface/wiki/Camera-Support](https://github.com/linux-surface/linux-surface/wiki/Camera-Support)). As a result they may break some userspace tools on unsupported devices, notably such as Wireplumber. An example fix for such userspace issues is shown below. +``` +services.pipewire.wireplumber.extraConfig = { + "50-surface-disable-libcamera.conf" = '' + monitor.libcamera = { enabled = false } + wireplumber.profiles = { + main = { + monitor.libcamera = disabled + hardware.video-capture = disabled + } + } + ''; +}; +``` + ### Background: With the older firmware, you would see messages like "Can't ping firmware". From e903fd796da4396598e1d0573f7516927feb3577 Mon Sep 17 00:00:00 2001 From: Hannah Izzie Gesser Date: Wed, 20 Aug 2025 14:15:42 +0200 Subject: [PATCH 1400/1476] Revert "apple: add hid_apple.iso_layout=0 kernel param" This reverts commit e228c7827b5ac2b08f07433aa8fbc8f2c41e85a5. --- apple/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apple/default.nix b/apple/default.nix index 5663cfeb..8ba93fdf 100644 --- a/apple/default.nix +++ b/apple/default.nix @@ -1,10 +1,6 @@ { config, lib, ... }: { - boot.kernelParams = [ - "hid_apple.iso_layout=0" - ]; - hardware.facetimehd.enable = lib.mkDefault (config.nixpkgs.config.allowUnfree or false); services.mbpfan.enable = lib.mkDefault true; From c69cdbed34aa6a39e91a7217a11833358f198036 Mon Sep 17 00:00:00 2001 From: Matteo Bongiovanni Date: Tue, 5 Aug 2025 10:04:49 +0200 Subject: [PATCH 1401/1476] system76-gaze18: add CPU module --- system76/gaze18/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/system76/gaze18/default.nix b/system76/gaze18/default.nix index 61b3f92f..6a9b337a 100644 --- a/system76/gaze18/default.nix +++ b/system76/gaze18/default.nix @@ -9,6 +9,7 @@ ../. ../../common/gpu/nvidia/prime.nix ../../common/gpu/nvidia/ampere + ../../common/cpu/intel/raptor-lake ]; boot.initrd.kernelModules = [ "nvidia" ]; From 7fe67c44d1ca93e55219cdd470e64da6ce3fee64 Mon Sep 17 00:00:00 2001 From: Matteo Bongiovanni Date: Tue, 5 Aug 2025 10:11:38 +0200 Subject: [PATCH 1402/1476] system76-gaze18: use xserver.videoDrivers instead of initrd.kernelModules system76-gaze18: use xserver.videoDrivers instead of initrd.kernelModules --- system76/gaze18/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/system76/gaze18/default.nix b/system76/gaze18/default.nix index 6a9b337a..b65124e5 100644 --- a/system76/gaze18/default.nix +++ b/system76/gaze18/default.nix @@ -12,7 +12,11 @@ ../../common/cpu/intel/raptor-lake ]; - boot.initrd.kernelModules = [ "nvidia" ]; + # For offloading, `modesetting` is needed + services.xserver.videoDrivers = [ + "modesetting" + "nvidia" + ]; hardware.graphics = { enable = lib.mkDefault true; @@ -21,8 +25,6 @@ hardware.nvidia = { - # modesetting.enable = lib.mkDefault true; - powerManagement.finegrained = lib.mkDefault true; prime = { From f4a07aa370c5cb3d39f3d0f2215bbf5bce8f87b2 Mon Sep 17 00:00:00 2001 From: Matteo Bongiovanni Date: Tue, 19 Aug 2025 15:26:56 +0200 Subject: [PATCH 1403/1476] system76-gaze18: add laptop and ssd imports --- system76/gaze18/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system76/gaze18/default.nix b/system76/gaze18/default.nix index b65124e5..51caa436 100644 --- a/system76/gaze18/default.nix +++ b/system76/gaze18/default.nix @@ -10,6 +10,8 @@ ../../common/gpu/nvidia/prime.nix ../../common/gpu/nvidia/ampere ../../common/cpu/intel/raptor-lake + ../../common/pc/laptop + ../../common/pc/ssd ]; # For offloading, `modesetting` is needed From 2f7f1dc6ec1f3ef483eec820d2f0ffca3af63b1d Mon Sep 17 00:00:00 2001 From: Noah Markert Date: Wed, 3 Sep 2025 10:59:22 +0200 Subject: [PATCH 1404/1476] renamed flake modules in README.md to match them in flake.nix; add missing nixos modules to flake.nix; --- README.md | 14 +++++++------- flake.nix | 4 +++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a0c5d094..85503179 100644 --- a/README.md +++ b/README.md @@ -255,7 +255,7 @@ See code for all available configurations. | [Lenovo Legion 7 Pro 16irx9h (Intel)](lenovo/legion/16irx9h) | `` | `lenovo-legion-16irx9h` | | [Lenovo Legion Slim 7 Gen 7 (AMD)](lenovo/legion/16arha7/) | `` | `lenovo-legion-16arha7` | | [Lenovo Legion T5 AMR5](lenovo/legion/t526amr5) | `` | `lenovo-legion-t526amr5` | -| [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | `lenovo-legion-15ich` | +| [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | `lenovo-legion-y530-15ich` | | [Lenovo ThinkPad A475](lenovo/thinkpad/a475) | `` | `lenovo-thinkpad-a475` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | `lenovo-thinkpad-e14-amd` | | [Lenovo ThinkPad E14 (Intel - Gen 1)](lenovo/thinkpad/e14/intel) | `` | `lenovo-thinkpad-e14-intel` | @@ -346,8 +346,8 @@ See code for all available configurations. | [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | `lenovo-thinkpad-x280` | | [Lenovo ThinkPad X390](lenovo/thinkpad/x390) | `` | `lenovo-thinkpad-x390` | | [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | `lenovo-thinkpad-z` | -| [Lenovo ThinkPad Z13 Gen 1](lenovo/thinkpad/z/gen1/z13) | `` | `lenovo-thinkpad-z-gen1-z13` | -| [Lenovo ThinkPad Z13 Gen 2](lenovo/thinkpad/z/gen2/z13) | `` | `lenovo-thinkpad-z-gen2-z13` | +| [Lenovo ThinkPad Z13 Gen 1](lenovo/thinkpad/z/gen1/z13) | `` | `lenovo-thinkpad-z13-gen1` | +| [Lenovo ThinkPad Z13 Gen 2](lenovo/thinkpad/z/gen2/z13) | `` | `lenovo-thinkpad-z13-gen2` | | [Lenovo XiaoXin Pro 14imh9 2024](lenovo/ideapad/14imh9) | `` | `lenovo-ideapad-14imh9` | | [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | `lenovo-yoga-6-13ALC6` | | [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/amdgpu) | `` | `lenovo-yoga-7-14ARH7-amdgpu` | @@ -362,9 +362,9 @@ See code for all available configurations. | [MSI GL62/CX62](msi/gl62) | `` | `msi-gl62` | | [MSI GL65 10SDR-492](msi/gl65/10SDR-492) | `` | `msi-gl65-10SDR-492` | | [Microchip Icicle Kit](microchip/icicle-kit) | `` | `microchip-icicle-kit` | -| [Microsoft Surface Go](microsoft/surface/surface-go) | `` | `microsoft-surface-surface-go` | -| [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel) | `` | `microsoft-surface-surface-pro-intel` | -| [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd) | `` | `microsoft-surface-surface-laptop-amd` | +| [Microsoft Surface Go](microsoft/surface/surface-go) | `` | `microsoft-surface-go` | +| [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel) | `` | `microsoft-surface-pro-intel` | +| [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd) | `` | `microsoft-surface-laptop-amd` | | [Microsoft Surface Range (Common Modules)](microsoft/surface/common) | `` | `microsoft-surface-common` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | `microsoft-surface-pro-3` | | [Microsoft Surface Pro 9](microsoft/surface-pro/9) | `` | `microsoft-surface-pro-9` | @@ -384,7 +384,7 @@ See code for all available configurations. | [Omen 15-en1007sa](omen/15-en1007sa) | `` | `omen-15-en1007sa` | | [Omen 15-en0002np](omen/15-en0002np) | `` | `omen-15-en0002np` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | `onenetbook-4` | -| [Panasonic Let's Note CF-LX4](panasonic/letsnote/cf-lx4) | `` | `panasonic-letsnote-cf-lx4` | +| [Panasonic Let's Note CF-LX4](panasonic/letsnote/cf-lx4) | `` | `letsnote-cf-lx4` | | [PC Engines APU](pcengines/apu) | `` | `pcengines-apu` | | [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | `pine64-pinebook-pro` | | [PINE64 RockPro64](pine64/rockpro64/) | `` | `pine64-rockpro64` | diff --git a/flake.nix b/flake.nix index 729729dc..bb50521f 100644 --- a/flake.nix +++ b/flake.nix @@ -186,6 +186,7 @@ lenovo-legion-16achg6-nvidia = import ./lenovo/legion/16achg6/nvidia; lenovo-legion-16aph8 = import ./lenovo/legion/16aph8; lenovo-legion-16arha7 = import ./lenovo/legion/16arha7; + lenovo-legion-16iah7h = import ./lenovo/legion/16iah7h; lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h; lenovo-legion-16irx9h = import ./lenovo/legion/16irx9h; @@ -270,8 +271,8 @@ lenovo-thinkpad-x1-extreme-gen4 = import ./lenovo/thinkpad/x1-extreme/gen4; lenovo-thinkpad-x1-nano = import ./lenovo/thinkpad/x1-nano; lenovo-thinkpad-x1-nano-gen1 = import ./lenovo/thinkpad/x1-nano/gen1; - lenovo-thinkpad-x13 = import ./lenovo/thinkpad/x13/intel; lenovo-thinkpad-x13-amd = import ./lenovo/thinkpad/x13/amd; + lenovo-thinkpad-x13-intel = import ./lenovo/thinkpad/x13/intel; lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13/yoga; lenovo-thinkpad-x13-yoga-3th-gen = import ./lenovo/thinkpad/x13/yoga/3th-gen; lenovo-thinkpad-x13s = import ./lenovo/thinkpad/x13s; @@ -364,6 +365,7 @@ tuxedo-aura-15-gen1 = import ./tuxedo/aura/15/gen1; tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7; + tuxedo-infinitybook-pro14-gen9-amd = import ./tuxedo/infinitybook/pro14/gen9/amd; tuxedo-infinitybook-pro14-gen9-intel = import ./tuxedo/infinitybook/pro14/gen9/intel; tuxedo-pulse-14-gen3 = import ./tuxedo/pulse/14/gen3; tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; From 2dbfb943a027f47552a8725f995e211c6a04c95f Mon Sep 17 00:00:00 2001 From: Ganga Ram Date: Mon, 1 Sep 2025 21:34:12 +0400 Subject: [PATCH 1405/1476] bsp update for imx8mp-evk Signed-off-by: Ganga Ram --- nxp/imx8mp-evk/bsp/imx8mp-atf.nix | 50 ++++++++------------------ nxp/imx8mp-evk/bsp/imx8mp-boot.nix | 5 +-- nxp/imx8mp-evk/bsp/imx8mp-firmware.nix | 4 +-- nxp/imx8mp-evk/bsp/imx8mp-linux.nix | 8 ++--- nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix | 16 +++++---- nxp/imx8mp-evk/bsp/imx8mp-uboot.nix | 16 +++++---- 6 files changed, 41 insertions(+), 58 deletions(-) diff --git a/nxp/imx8mp-evk/bsp/imx8mp-atf.nix b/nxp/imx8mp-evk/bsp/imx8mp-atf.nix index a3ac8107..d2495097 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-atf.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-atf.nix @@ -1,59 +1,36 @@ { + pkgs, lib, fetchgit, - enable-tee, - stdenv, - buildPackages, - pkgsCross, - openssl, + buildArmTrustedFirmware, + enable-tee ? true, }: +with pkgs; let - opteedflag = if enable-tee then "SPD=opteed" else ""; target-board = "imx8mp"; + opteedflag = if enable-tee then "SPD=opteed" else ""; in -stdenv.mkDerivation rec { +buildArmTrustedFirmware rec { pname = "imx8mp-atf"; - version = "lf6.1.55_2.2.0"; platform = target-board; enableParallelBuilding = true; + extraMeta.platforms = [ "aarch64-linux" ]; src = fetchgit { url = "https://github.com/nxp-imx/imx-atf.git"; - rev = "08e9d4eef2262c0dd072b4325e8919e06d349e02"; - sha256 = "sha256-96EddJXlFEkP/LIGVgNBvUP4IDI3BbDE/c9Yub22gnc="; + rev = "6ddd57019494cabfca5065368349109c37f2cc9f"; + sha256 = "sha256-8+5kV6wHhwMYVA9aqn4fNRhvgOLsU9RlX3UL7edMM+A="; }; - depsBuildBuild = [ buildPackages.stdenv.cc ]; - - # For Cortex-M0 firmware in RK3399 - nativeBuildInputs = [ pkgsCross.arm-embedded.stdenv.cc ]; - - buildInputs = [ openssl ]; - - makeFlags = [ - "HOSTCC=$(CC_FOR_BUILD)" - "M0_CROSS_COMPILE=${pkgsCross.arm-embedded.stdenv.cc.targetPrefix}" - "CROSS_COMPILE=${stdenv.cc.targetPrefix}" - # binutils 2.39 regression - # `warning: /build/source/build/rk3399/release/bl31/bl31.elf has a LOAD segment with RWX permissions` - # See also: https://developer.trustedfirmware.org/T996 - "LDFLAGS=-no-warn-rwx-segments" + extraMakeFlags = [ "PLAT=${platform}" "bl31" "${opteedflag}" ]; - installPhase = '' - runHook preInstall - - mkdir -p $out - cp build/${target-board}/release/bl31.bin $out - - runHook postInstall - ''; - - hardeningDisable = [ "all" ]; - dontStrip = true; + filesToInstall = [ + "build/${target-board}/release/bl31.bin" + ]; meta = with lib; { homepage = "https://github.com/nxp-imx/imx-atf"; @@ -62,4 +39,5 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ gngram ]; platforms = [ "aarch64-linux" ]; }; + } diff --git a/nxp/imx8mp-evk/bsp/imx8mp-boot.nix b/nxp/imx8mp-evk/bsp/imx8mp-boot.nix index 8a74f500..a53600b9 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-boot.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-boot.nix @@ -15,8 +15,9 @@ let imx8mp-optee-os = pkgs.callPackage ./imx8mp-optee-os.nix { }; src = pkgs.fetchgit { url = "https://github.com/nxp-imx/imx-mkimage.git"; - rev = "c4365450fb115d87f245df2864fee1604d97c06a"; - sha256 = "sha256-KVIVHwBpAwd1RKy3RrYxGIniE45CDlN5RQTXsMg1Jwk="; + #tag: lf-6.12.20_2.0.0 + rev = "4c2e5b25232f5aa003976ddca9d1d2fb9667beb1"; + sha256 = "sha256-bXvM5Q0Fsb18gupw6/ub62/qNE7wGLaZKugp0URWeUk="; }; shortRev = builtins.substring 0 8 src.rev; in diff --git a/nxp/imx8mp-evk/bsp/imx8mp-firmware.nix b/nxp/imx8mp-evk/bsp/imx8mp-firmware.nix index 361257fb..c763d8cf 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-firmware.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-firmware.nix @@ -2,11 +2,11 @@ with pkgs; stdenv.mkDerivation rec { pname = "imx8mp-firmware"; - version = "8.22"; + version = "8.23"; src = pkgs.fetchurl { url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-${version}.bin"; - sha256 = "sha256-lMi86sVuxQPCMuYU931rvY4Xx9qnHU5lHqj9UDTDA1A="; + sha256 = "sha256-/gdjMpXaw92Z8LpOB6fN6VuySinKgrmps/YCbSmukWo="; }; dontUnpack = true; diff --git a/nxp/imx8mp-evk/bsp/imx8mp-linux.nix b/nxp/imx8mp-evk/bsp/imx8mp-linux.nix index 70b8370a..86025f2a 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-linux.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-linux.nix @@ -3,7 +3,7 @@ with pkgs; buildLinux ( args // rec { - version = "6.1.55"; + version = "6.12.20"; name = "imx8mp-linux"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed @@ -47,9 +47,9 @@ buildLinux ( src = fetchFromGitHub { owner = "nxp-imx"; repo = "linux-imx"; - # tag: lf-6.1.55-2.2.0 - rev = "770c5fe2c1d1529fae21b7043911cd50c6cf087e"; - sha256 = "sha256-tIWt75RUrjB6KmUuAYBVyAC1dmVGSUAgqV5ROJh3xU0="; + # tag: lf-6.12.20-2.0.0 + rev = "dfaf2136deb2af2e60b994421281ba42f1c087e0"; + sha256 = "sha256-ITrmj3a5YfXh/PSRTi+Rlto5uEBIAWFWtkTsO1ATXIo="; }; } // (args.argsOverride or { }) diff --git a/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix b/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix index 4119efb1..4cdd5f5d 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix @@ -1,13 +1,13 @@ { pkgs }: let - python3 = pkgs.buildPackages.python3; - toolchain = pkgs.gcc9Stdenv.cc; - binutils = pkgs.gcc9Stdenv.cc.bintools.bintools_bin; + inherit (pkgs.buildPackages) python3; + toolchain = pkgs.gccStdenv.cc; + binutils = pkgs.gccStdenv.cc.bintools.bintools_bin; cpp = pkgs.gcc; in pkgs.stdenv.mkDerivation rec { pname = "imx8mp-optee-os"; - version = "lf-6.1.55-2.2.0"; + version = "lf-6.12.20-2.0.0"; nativeBuildInputs = [ python3 @@ -23,8 +23,8 @@ pkgs.stdenv.mkDerivation rec { src = pkgs.fetchgit { url = "https://github.com/nxp-imx/imx-optee-os.git"; - rev = "a303fc80f7c4bd713315687a1fa1d6ed136e78ee"; - sha256 = "sha256-OpyG812DX0c06bRZPKWB2cNu6gtZCOvewDhsKgrGB+s="; + rev = "87964807d80baf1dcfd89cafc66de34a1cf16bf3"; + sha256 = "sha256-AMZUMgmmyi5l3BMT84uubwjU0lwNObs9XW6ZCbqfhmc="; }; postPatch = '' @@ -35,7 +35,9 @@ pkgs.stdenv.mkDerivation rec { substituteInPlace scripts/pem_to_pub_c.py \ --replace '/usr/bin/env python3' '${python3}/bin/python' substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ - --replace '/bin/bash' '${pkgs.bash}/bin/bash' + --replace '/usr/bin/env bash' '${pkgs.bash}/bin/bash' + substituteInPlace ta/pkcs11/scripts/dump_ec_curve_params.sh \ + --replace '/usr/bin/env bash' '${pkgs.bash}/bin/bash' substituteInPlace mk/gcc.mk \ --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy substituteInPlace mk/gcc.mk \ diff --git a/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix b/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix index 14586d47..582cb70b 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix @@ -12,18 +12,19 @@ which, perl, buildPackages, + efitools, }: let ubsrc = fetchgit { url = "https://github.com/nxp-imx/uboot-imx.git"; - # tag: "lf-6.1.55-2.2.0" - rev = "49b102d98881fc28af6e0a8af5ea2186c1d90a5f"; - sha256 = "sha256-1j6X82DqezEizeWoSS600XKPNwrQ4yT0vZuUImKAVVA="; + # tag: lf-6.12.20-2.0.0 + rev = "9383f8387dc76524524da69992db96c22195a57c"; + sha256 = "sha256-httRSwN8NiKOdL7fZEvN/4AbypGQfegYtJgxKIea+Zg="; }; in -(stdenv.mkDerivation { +stdenv.mkDerivation { pname = "imx8mp-uboot"; - version = "2023.04"; + version = "2025.04"; src = ubsrc; postPatch = '' @@ -41,6 +42,7 @@ in gnutls openssl perl + efitools ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; @@ -81,11 +83,11 @@ in mkdir -p $out cp ./u-boot-nodtb.bin $out cp ./spl/u-boot-spl.bin $out - cp ./arch/arm/dts/imx8mp-evk.dtb $out + cp ./dts/upstream/src/arm64/freescale/imx8mp-evk.dtb $out cp .config $out runHook postInstall ''; dontStrip = true; -}) +} From 4a395855464bd8740cff5d6b3be5b5a57d5a5013 Mon Sep 17 00:00:00 2001 From: cassis163 Date: Wed, 16 Jul 2025 22:37:38 +0200 Subject: [PATCH 1406/1476] Add HP ProBook 460 G11 --- flake.nix | 1 + hp/probook/460G11/default.nix | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 hp/probook/460G11/default.nix diff --git a/flake.nix b/flake.nix index 729729dc..e7a496c4 100644 --- a/flake.nix +++ b/flake.nix @@ -156,6 +156,7 @@ hp-elitebook-845g8 = import ./hp/elitebook/845/g8; hp-elitebook-845g9 = import ./hp/elitebook/845/g9; hp-probook-440G5 = import ./hp/probook/440G5; + hp-probook-460G11 = import ./hp/probook/460G11; hp-laptop-14s-dq2024nf = import ./hp/laptop/14s-dq2024nf; huawei-machc-wa = import ./huawei/machc-wa; hp-notebook-14-df0023 = import ./hp/notebook/14-df0023; diff --git a/hp/probook/460G11/default.nix b/hp/probook/460G11/default.nix new file mode 100644 index 00000000..050be84b --- /dev/null +++ b/hp/probook/460G11/default.nix @@ -0,0 +1,14 @@ +{ config, lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel/meteor-lake + ../../../common/pc + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + config = { + services.thermald.enable = lib.mkDefault true; + }; +} From 4091b501aa0953259197f588bb89019a506936f3 Mon Sep 17 00:00:00 2001 From: caangeenbrug-fvt Date: Fri, 25 Jul 2025 08:15:40 +0200 Subject: [PATCH 1407/1476] Add HP ProBook 460 G11 to hardware table in /README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a0c5d094..9c9a0812 100644 --- a/README.md +++ b/README.md @@ -223,6 +223,7 @@ See code for all available configurations. | [HP Laptop 14s-dq2024nf](hp/laptop/14s-dq2024nf) | `` | `hp-laptop-14s-dq2024nf` | | [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | `hp-notebook-14-df0023` | | [HP Probook 440G5](hp/probook/440g5) | `` | `hp-probook-440G5` | +| [HP Probook 460G11](hp/probook/460g11) | `` | `hp-probook-46011` | | [Huawei Matebook X Pro (2020)](huawei/machc-wa) | `` | `huawei-machc-wa` | | [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | `nxp-imx8qm-mek` | | [Intel NUC 5i5RYB](intel/nuc/5i5ryb/) | `` | `intel-nuc-5i5ryb` | From d9b0f10475074fb58ea1bbc13c8d754f82dc41a9 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Mon, 18 Aug 2025 21:40:57 -0700 Subject: [PATCH 1408/1476] Add Fydetab Duo --- README.md | 1 + flake.nix | 1 + fydetab/duo/README.md | 17 + fydetab/duo/ap6275p.nix | 43 + fydetab/duo/brcm-patchram.nix | 44 + fydetab/duo/config | 9549 ++++++++++++++++++++++++ fydetab/duo/config.nix | 28 + fydetab/duo/default.nix | 129 + fydetab/duo/himax.nix | 34 + fydetab/duo/kernel.nix | 18 + fydetab/duo/mali-g610.nix | 35 + fydetab/duo/u-boot.nix | 98 + fydetab/duo/uboot-remove-sig-req.patch | 11 + 13 files changed, 10008 insertions(+) create mode 100644 fydetab/duo/README.md create mode 100644 fydetab/duo/ap6275p.nix create mode 100644 fydetab/duo/brcm-patchram.nix create mode 100644 fydetab/duo/config create mode 100644 fydetab/duo/config.nix create mode 100644 fydetab/duo/default.nix create mode 100644 fydetab/duo/himax.nix create mode 100644 fydetab/duo/kernel.nix create mode 100644 fydetab/duo/mali-g610.nix create mode 100644 fydetab/duo/u-boot.nix create mode 100644 fydetab/duo/uboot-remove-sig-req.patch diff --git a/README.md b/README.md index 7a774cf0..b3bbdbca 100644 --- a/README.md +++ b/README.md @@ -202,6 +202,7 @@ See code for all available configurations. | [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | `friendlyarm-nanopc-t4` | | [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | `friendlyarm-nanopi-r5s` | | [Focus M2 Gen 1](focus/m2/gen1) | `` | `focus-m2-gen1` | +| [Fydetab Duo](fydetab/duo) | `` | `fydetab-duo` | | [Gigabyte B550](gigabyte/b550) | `` | `gigabyte-b550` | | [Gigabyte B650](gigabyte/b650) | `` | `gigabyte-b650` | | [GMKtec NucBox G3 Plus](gmktec/nucbox/g3-plus) | `` | `gmktec-nucbox-g3-plus` | diff --git a/flake.nix b/flake.nix index 3cd9e355..47fdf34e 100644 --- a/flake.nix +++ b/flake.nix @@ -137,6 +137,7 @@ friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4; friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s; focus-m2-gen1 = import ./focus/m2/gen1; + fydetab-duo = import ./fydetab/duo; gigabyte-b550 = import ./gigabyte/b550; gigabyte-b650 = import ./gigabyte/b650; gmktec-nucbox-g3-plus = import ./gmktec/nucbox/g3-plus; diff --git a/fydetab/duo/README.md b/fydetab/duo/README.md new file mode 100644 index 00000000..f96960d1 --- /dev/null +++ b/fydetab/duo/README.md @@ -0,0 +1,17 @@ +# Fydetab Duo + +The Fydetab Duo is an open source and hackable tablet by FydeOS. + +## Features + +- Display: **works** +- GPU driver: **not working** +- WiFi: **working** +- Cellular: **untested** +- SD card: **untested** +- Sound: **untested** +- Fingerprint: **untested** + +## Flashing + +Flashing requires `rkdeveloptool` and using it to write the new bootloader and eMMC image. To flash, press and hold the mask rom button on the board. Ensure a USB C cable is already plugged into the host computer. Run `nix build .#nixosConfigurations..config.hardware.rockchip.platformFirmware` and then use `rkdeveloptool ul result/rk3588_spl_loader_v1.18.113.bin`. The NixOS image can then be downloaded using `rkdeveloptool wl 0`, it is recommended to use the disko image configuration which is provided. diff --git a/fydetab/duo/ap6275p.nix b/fydetab/duo/ap6275p.nix new file mode 100644 index 00000000..fbb14b57 --- /dev/null +++ b/fydetab/duo/ap6275p.nix @@ -0,0 +1,43 @@ +{ + lib, + stdenv, + fetchFromGitHub, +}: +stdenv.mkDerivation (_finalAttrs: { + pname = "ap6275p-firmware"; + version = "2023-11-05"; + + src = fetchFromGitHub { + owner = "Joshua-Riek"; + repo = "firmware"; + rev = "621ac45f5d931522bc08b51b995b938778973d2a"; + hash = "sha256-ksAOxZTnEka9SirHYxroLMbKi+99FY72X2z1pJhgYnY="; + }; + + compressFirmware = false; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/lib/firmware/ap6275p + install -m644 ap6275p/BCM4362A2.hcd $out/lib/firmware/ap6275p/ + install -m644 ap6275p/clm_bcm43752a2_pcie_ag.blob $out/lib/firmware/ap6275p/ + install -m644 ap6275p/fw_bcm43752a2_pcie_ag.bin $out/lib/firmware/ap6275p/ + install -m644 ap6275p/nvram_AP6275P.txt $out/lib/firmware/ap6275p/ + install -m644 ap6275p/config.txt $out/lib/firmware/ap6275p/ + + mv $out/lib/firmware/ap6275p/nvram_AP6275P.txt $out/lib/firmware/ap6275p/nvram_ap6275p.txt + mv $out/lib/firmware/ap6275p/config.txt $out/lib/firmware/ap6275p/config_bcm43752a2_pcie_ag.txt + + runHook postInstall + ''; + + meta = { + description = "Firmware for the AP6275P WiFi/Bluetooth module"; + homepage = "https://github.com/Joshua-Riek/firmware"; + license = lib.licenses.unfree; + }; +}) diff --git a/fydetab/duo/brcm-patchram.nix b/fydetab/duo/brcm-patchram.nix new file mode 100644 index 00000000..6c44146d --- /dev/null +++ b/fydetab/duo/brcm-patchram.nix @@ -0,0 +1,44 @@ +{ + lib, + stdenv, + fetchurl, + autoPatchelfHook, +}: +stdenv.mkDerivation (_finalAttrs: { + pname = "brcm-patchram-plus"; + version = "2024-08-23"; + + src = fetchurl { + url = "https://github.com/Linux-for-Fydetab-Duo/pkgbuilds/raw/fd5ebe4914f32c5a1c4fc15b4fb5a62bad2da1ea/fydetabduo-post-install/brcm_patchram_plus"; + hash = "sha256-fZ1ximZcosZDYbveEkyMnasLWpcifaZ5CKz7QKtqKZQ="; + }; + + nativeBuildInputs = [ + autoPatchelfHook + ]; + + unpackPhase = '' + runHook preUnpack + cp --no-preserve=ownership,mode $src brcm_patchram_plus + chmod +x brcm_patchram_plus + runHook postUnpack + ''; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + cp brcm_patchram_plus $out/bin + autoPatchelf $out/bin/brcm_patchram_plus + + runHook postInstall + ''; + + meta = { + license = lib.licenses.unfree; + mainProgram = "brcm_patchram_plus"; + }; +}) diff --git a/fydetab/duo/config b/fydetab/duo/config new file mode 100644 index 00000000..2b343df4 --- /dev/null +++ b/fydetab/duo/config @@ -0,0 +1,9549 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm64 6.1.75-rkr3 Kernel Configuration +# +CONFIG_CC_VERSION_TEXT="gcc (GCC) 14.1.1 20240507" +CONFIG_CC_IS_GCC=y +CONFIG_GCC_VERSION=140101 +CONFIG_CLANG_VERSION=0 +CONFIG_AS_IS_GNU=y +CONFIG_AS_VERSION=24200 +CONFIG_LD_IS_BFD=y +CONFIG_LD_VERSION=24200 +CONFIG_LLD_VERSION=0 +CONFIG_CC_CAN_LINK=y +CONFIG_CC_CAN_LINK_STATIC=y +CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y +CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y +CONFIG_CC_HAS_ASM_INLINE=y +CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y +CONFIG_PAHOLE_VERSION=0 +CONFIG_IRQ_WORK=y +CONFIG_BUILDTIME_TABLE_SORT=y +CONFIG_THREAD_INFO_IN_TASK=y + +# +# General setup +# +CONFIG_INIT_ENV_ARG_LIMIT=32 +# CONFIG_COMPILE_TEST is not set +CONFIG_WERROR=y +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_BUILD_SALT="" +CONFIG_DEFAULT_INIT="" +CONFIG_DEFAULT_HOSTNAME="(none)" +CONFIG_VERSION_SIGNATURE="" +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_SYSVIPC_COMPAT=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +# CONFIG_WATCH_QUEUE is not set +CONFIG_CROSS_MEMORY_ATTACH=y +# CONFIG_USELIB is not set +CONFIG_AUDIT=y +CONFIG_HAVE_ARCH_AUDITSYSCALL=y +CONFIG_AUDITSYSCALL=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y +CONFIG_GENERIC_IRQ_MIGRATION=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_SIM=y +CONFIG_IRQ_DOMAIN_HIERARCHY=y +CONFIG_GENERIC_IRQ_IPI=y +CONFIG_GENERIC_MSI_IRQ=y +CONFIG_GENERIC_MSI_IRQ_DOMAIN=y +CONFIG_IRQ_MSI_IOMMU=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_SPARSE_IRQ=y +# CONFIG_GENERIC_IRQ_DEBUGFS is not set +# end of IRQ subsystem + +CONFIG_GENERIC_TIME_VSYSCALL=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_ARCH_HAS_TICK_BROADCAST=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y +CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y +CONFIG_CONTEXT_TRACKING=y +CONFIG_CONTEXT_TRACKING_IDLE=y + +# +# Timers subsystem +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ_COMMON=y +# CONFIG_HZ_PERIODIC is not set +CONFIG_NO_HZ_IDLE=y +# CONFIG_NO_HZ_FULL is not set +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +# end of Timers subsystem + +CONFIG_BPF=y +CONFIG_HAVE_EBPF_JIT=y +CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y + +# +# BPF subsystem +# +CONFIG_BPF_SYSCALL=y +CONFIG_BPF_JIT=y +# CONFIG_BPF_JIT_ALWAYS_ON is not set +CONFIG_BPF_JIT_DEFAULT_ON=y +# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set +CONFIG_USERMODE_DRIVER=y +# CONFIG_BPF_PRELOAD is not set +# CONFIG_BPF_LSM is not set +# end of BPF subsystem + +CONFIG_PREEMPT_VOLUNTARY_BUILD=y +# CONFIG_PREEMPT_NONE is not set +CONFIG_PREEMPT_VOLUNTARY=y +# CONFIG_PREEMPT is not set +# CONFIG_PREEMPT_DYNAMIC is not set + +# +# CPU/Task time and stats accounting +# +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set +# CONFIG_IRQ_TIME_ACCOUNTING is not set +CONFIG_SCHED_THERMAL_PRESSURE=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_PSI=y +# CONFIG_PSI_DEFAULT_DISABLED is not set +# end of CPU/Task time and stats accounting + +CONFIG_CPU_ISOLATION=y + +# +# RCU Subsystem +# +CONFIG_TREE_RCU=y +# CONFIG_RCU_EXPERT is not set +CONFIG_SRCU=y +CONFIG_TREE_SRCU=y +CONFIG_TASKS_RCU_GENERIC=y +CONFIG_TASKS_RUDE_RCU=y +CONFIG_TASKS_TRACE_RCU=y +CONFIG_RCU_STALL_COMMON=y +CONFIG_RCU_NEED_SEGCBLIST=y +# end of RCU Subsystem + +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +# CONFIG_IKHEADERS is not set +CONFIG_LOG_BUF_SHIFT=18 +CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 +CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13 +# CONFIG_PRINTK_INDEX is not set +CONFIG_GENERIC_SCHED_CLOCK=y + +# +# Scheduler features +# +CONFIG_UCLAMP_TASK=y +CONFIG_UCLAMP_BUCKETS_COUNT=20 +# end of Scheduler features + +CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y +CONFIG_CC_HAS_INT128=y +CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5" +CONFIG_GCC11_NO_ARRAY_BOUNDS=y +CONFIG_CC_NO_ARRAY_BOUNDS=y +CONFIG_ARCH_SUPPORTS_INT128=y +CONFIG_CGROUPS=y +CONFIG_PAGE_COUNTER=y +# CONFIG_CGROUP_FAVOR_DYNMODS is not set +CONFIG_MEMCG=y +CONFIG_MEMCG_KMEM=y +CONFIG_BLK_CGROUP=y +CONFIG_CGROUP_WRITEBACK=y +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_CFS_BANDWIDTH=y +# CONFIG_RT_GROUP_SCHED is not set +CONFIG_UCLAMP_TASK_GROUP=y +CONFIG_CGROUP_PIDS=y +CONFIG_CGROUP_RDMA=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_HUGETLB=y +CONFIG_CPUSETS=y +CONFIG_PROC_PID_CPUSET=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_CGROUP_PERF=y +CONFIG_CGROUP_BPF=y +# CONFIG_CGROUP_MISC is not set +# CONFIG_CGROUP_DEBUG is not set +CONFIG_SOCK_CGROUP_DATA=y +CONFIG_NAMESPACES=y +CONFIG_UTS_NS=y +CONFIG_TIME_NS=y +CONFIG_IPC_NS=y +CONFIG_USER_NS=y +CONFIG_PID_NS=y +CONFIG_NET_NS=y +CONFIG_CHECKPOINT_RESTORE=y +CONFIG_SCHED_AUTOGROUP=y +# CONFIG_SYSFS_DEPRECATED is not set +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_RD_XZ=y +CONFIG_RD_LZO=y +CONFIG_RD_LZ4=y +CONFIG_RD_ZSTD=y +# CONFIG_BOOT_CONFIG is not set +CONFIG_INITRAMFS_PRESERVE_MTIME=y +# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_LD_ORPHAN_WARN=y +CONFIG_SYSCTL=y +CONFIG_HAVE_UID16=y +CONFIG_SYSCTL_EXCEPTION_TRACE=y +CONFIG_EXPERT=y +CONFIG_UID16=y +CONFIG_MULTIUSER=y +# CONFIG_SGETMASK_SYSCALL is not set +CONFIG_SYSFS_SYSCALL=y +CONFIG_FHANDLE=y +CONFIG_POSIX_TIMERS=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_FUTEX_PI=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_IO_URING=y +CONFIG_ADVISE_SYSCALLS=y +CONFIG_MEMBARRIER=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_KALLSYMS_BASE_RELATIVE=y +CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y +CONFIG_KCMP=y +CONFIG_RSEQ=y +# CONFIG_DEBUG_RSEQ is not set +# CONFIG_EMBEDDED is not set +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_GUEST_PERF_EVENTS=y +# CONFIG_PC104 is not set + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +# end of Kernel Performance Events And Counters + +CONFIG_SYSTEM_DATA_VERIFICATION=y +CONFIG_PROFILING=y +CONFIG_TRACEPOINTS=y +# end of General setup + +CONFIG_ARM64=y +CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y +CONFIG_64BIT=y +CONFIG_MMU=y +CONFIG_ARM64_PAGE_SHIFT=12 +CONFIG_ARM64_CONT_PTE_SHIFT=4 +CONFIG_ARM64_CONT_PMD_SHIFT=4 +CONFIG_ARCH_MMAP_RND_BITS_MIN=18 +CONFIG_ARCH_MMAP_RND_BITS_MAX=33 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16 +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CSUM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y +CONFIG_SMP=y +CONFIG_KERNEL_MODE_NEON=y +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_PGTABLE_LEVELS=4 +CONFIG_ARCH_SUPPORTS_UPROBES=y +CONFIG_ARCH_PROC_KCORE_TEXT=y + +# +# Platform selection +# +# CONFIG_ARCH_ACTIONS is not set +# CONFIG_ARCH_SUNXI is not set +# CONFIG_ARCH_ALPINE is not set +# CONFIG_ARCH_APPLE is not set +# CONFIG_ARCH_BCM is not set +# CONFIG_ARCH_BERLIN is not set +# CONFIG_ARCH_BITMAIN is not set +# CONFIG_ARCH_EXYNOS is not set +# CONFIG_ARCH_SPARX5 is not set +# CONFIG_ARCH_K3 is not set +# CONFIG_ARCH_LG1K is not set +# CONFIG_ARCH_HISI is not set +# CONFIG_ARCH_KEEMBAY is not set +# CONFIG_ARCH_MEDIATEK is not set +# CONFIG_ARCH_MESON is not set +# CONFIG_ARCH_MVEBU is not set +# CONFIG_ARCH_NXP is not set +# CONFIG_ARCH_NPCM is not set +# CONFIG_ARCH_QCOM is not set +# CONFIG_ARCH_REALTEK is not set +# CONFIG_ARCH_RENESAS is not set +CONFIG_ARCH_ROCKCHIP=y +# CONFIG_ARCH_SEATTLE is not set +# CONFIG_ARCH_INTEL_SOCFPGA is not set +# CONFIG_ARCH_SYNQUACER is not set +# CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_SPRD is not set +# CONFIG_ARCH_THUNDER is not set +# CONFIG_ARCH_THUNDER2 is not set +# CONFIG_ARCH_UNIPHIER is not set +# CONFIG_ARCH_VEXPRESS is not set +# CONFIG_ARCH_VISCONTI is not set +# CONFIG_ARCH_XGENE is not set +# CONFIG_ARCH_ZYNQMP is not set +# end of Platform selection + +# +# Kernel Features +# + +# +# ARM errata workarounds via the alternatives framework +# +CONFIG_AMPERE_ERRATUM_AC03_CPU_38=y +# CONFIG_ARM64_ERRATUM_826319 is not set +# CONFIG_ARM64_ERRATUM_827319 is not set +# CONFIG_ARM64_ERRATUM_824069 is not set +# CONFIG_ARM64_ERRATUM_819472 is not set +# CONFIG_ARM64_ERRATUM_832075 is not set +CONFIG_ARM64_ERRATUM_834220=y +CONFIG_ARM64_ERRATUM_1742098=y +CONFIG_ARM64_ERRATUM_845719=y +CONFIG_ARM64_ERRATUM_843419=y +CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y +CONFIG_ARM64_ERRATUM_1024718=y +CONFIG_ARM64_ERRATUM_1418040=y +CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y +CONFIG_ARM64_ERRATUM_1165522=y +CONFIG_ARM64_ERRATUM_1319367=y +CONFIG_ARM64_ERRATUM_1530923=y +CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y +CONFIG_ARM64_ERRATUM_2441007=y +CONFIG_ARM64_ERRATUM_1286807=y +CONFIG_ARM64_ERRATUM_1463225=y +CONFIG_ARM64_ERRATUM_1542419=y +CONFIG_ARM64_ERRATUM_1508412=y +# CONFIG_ARM64_ERRATUM_2051678 is not set +CONFIG_ARM64_ERRATUM_2077057=y +CONFIG_ARM64_ERRATUM_2658417=y +CONFIG_ARM64_WORKAROUND_TSB_FLUSH_FAILURE=y +CONFIG_ARM64_ERRATUM_2054223=y +CONFIG_ARM64_ERRATUM_2067961=y +CONFIG_ARM64_ERRATUM_2441009=y +CONFIG_ARM64_ERRATUM_2457168=y +CONFIG_ARM64_ERRATUM_2966298=y +# CONFIG_CAVIUM_ERRATUM_22375 is not set +# CONFIG_CAVIUM_ERRATUM_23154 is not set +CONFIG_CAVIUM_ERRATUM_27456=y +CONFIG_CAVIUM_ERRATUM_30115=y +CONFIG_CAVIUM_TX2_ERRATUM_219=y +CONFIG_FUJITSU_ERRATUM_010001=y +CONFIG_HISILICON_ERRATUM_161600802=y +CONFIG_QCOM_FALKOR_ERRATUM_1003=y +CONFIG_QCOM_FALKOR_ERRATUM_1009=y +CONFIG_QCOM_QDF2400_ERRATUM_0065=y +CONFIG_QCOM_FALKOR_ERRATUM_E1041=y +CONFIG_NVIDIA_CARMEL_CNP_ERRATUM=y +CONFIG_SOCIONEXT_SYNQUACER_PREITS=y +# end of ARM errata workarounds via the alternatives framework + +CONFIG_ARM64_4K_PAGES=y +# CONFIG_ARM64_16K_PAGES is not set +# CONFIG_ARM64_64K_PAGES is not set +# CONFIG_ARM64_VA_BITS_39 is not set +CONFIG_ARM64_VA_BITS_48=y +CONFIG_ARM64_VA_BITS=48 +CONFIG_ARM64_PA_BITS_48=y +CONFIG_ARM64_PA_BITS=48 +# CONFIG_CPU_BIG_ENDIAN is not set +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_SCHED_MC=y +# CONFIG_SCHED_CLUSTER is not set +# CONFIG_SCHED_SMT is not set +CONFIG_NR_CPUS=8 +CONFIG_HOTPLUG_CPU=y +# CONFIG_NUMA is not set +# CONFIG_HZ_100 is not set +# CONFIG_HZ_250 is not set +CONFIG_HZ_300=y +# CONFIG_HZ_1000 is not set +CONFIG_HZ=300 +CONFIG_SCHED_HRTICK=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_HW_PERF_EVENTS=y +CONFIG_CC_HAVE_SHADOW_CALL_STACK=y +# CONFIG_PARAVIRT is not set +# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set +# CONFIG_KEXEC is not set +# CONFIG_KEXEC_FILE is not set +# CONFIG_CRASH_DUMP is not set +CONFIG_TRANS_TABLE=y +# CONFIG_XEN is not set +CONFIG_ARCH_FORCE_MAX_ORDER=11 +CONFIG_UNMAP_KERNEL_AT_EL0=y +CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y +CONFIG_RODATA_FULL_DEFAULT_ENABLED=y +# CONFIG_ARM64_SW_TTBR0_PAN is not set +CONFIG_ARM64_TAGGED_ADDR_ABI=y +CONFIG_COMPAT=y +CONFIG_KUSER_HELPERS=y +# CONFIG_COMPAT_ALIGNMENT_FIXUPS is not set +CONFIG_ARMV8_DEPRECATED=y +CONFIG_SWP_EMULATION=y +CONFIG_CP15_BARRIER_EMULATION=y +CONFIG_SETEND_EMULATION=y + +# +# ARMv8.1 architectural features +# +CONFIG_ARM64_HW_AFDBM=y +CONFIG_ARM64_PAN=y +CONFIG_AS_HAS_LDAPR=y +CONFIG_AS_HAS_LSE_ATOMICS=y +# end of ARMv8.1 architectural features + +# +# ARMv8.2 architectural features +# +CONFIG_AS_HAS_ARMV8_2=y +CONFIG_AS_HAS_SHA3=y +# CONFIG_ARM64_PMEM is not set +CONFIG_ARM64_RAS_EXTN=y +CONFIG_ARM64_CNP=y +# end of ARMv8.2 architectural features + +# +# ARMv8.3 architectural features +# +CONFIG_ARM64_PTR_AUTH=y +CONFIG_ARM64_PTR_AUTH_KERNEL=y +CONFIG_CC_HAS_BRANCH_PROT_PAC_RET=y +CONFIG_CC_HAS_SIGN_RETURN_ADDRESS=y +CONFIG_AS_HAS_PAC=y +CONFIG_AS_HAS_CFI_NEGATE_RA_STATE=y +# end of ARMv8.3 architectural features + +# +# ARMv8.4 architectural features +# +CONFIG_ARM64_AMU_EXTN=y +CONFIG_AS_HAS_ARMV8_4=y +CONFIG_ARM64_TLB_RANGE=y +# end of ARMv8.4 architectural features + +# +# ARMv8.5 architectural features +# +CONFIG_AS_HAS_ARMV8_5=y +CONFIG_ARM64_BTI=y +CONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI=y +CONFIG_ARM64_E0PD=y +CONFIG_ARM64_AS_HAS_MTE=y +CONFIG_ARM64_MTE=y +# end of ARMv8.5 architectural features + +# +# ARMv8.7 architectural features +# +CONFIG_ARM64_EPAN=y +# end of ARMv8.7 architectural features + +CONFIG_ARM64_SVE=y +CONFIG_ARM64_SME=y +CONFIG_ARM64_MODULE_PLTS=y +CONFIG_ARM64_PSEUDO_NMI=y +# CONFIG_ARM64_DEBUG_PRIORITY_MASKING is not set +CONFIG_RELOCATABLE=y +CONFIG_RANDOMIZE_BASE=y +CONFIG_RANDOMIZE_MODULE_REGION_FULL=y +CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y +CONFIG_STACKPROTECTOR_PER_TASK=y +CONFIG_ARCH_NR_GPIO=0 +# end of Kernel Features + +# +# Boot options +# +CONFIG_CMDLINE="" +CONFIG_EFI_STUB=y +CONFIG_EFI=y +CONFIG_DMI=y +# end of Boot options + +# +# Power management options +# +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +# CONFIG_SUSPEND_SKIP_SYNC is not set +CONFIG_HIBERNATE_CALLBACKS=y +CONFIG_HIBERNATION=y +CONFIG_HIBERNATION_SNAPSHOT_DEV=y +CONFIG_PM_STD_PARTITION="" +CONFIG_PM_SLEEP=y +CONFIG_PM_SLEEP_SMP=y +# CONFIG_PM_AUTOSLEEP is not set +# CONFIG_PM_USERSPACE_AUTOSLEEP is not set +# CONFIG_PM_WAKELOCKS is not set +CONFIG_PM=y +CONFIG_PM_DEBUG=y +CONFIG_PM_ADVANCED_DEBUG=y +# CONFIG_PM_TEST_SUSPEND is not set +CONFIG_PM_SLEEP_DEBUG=y +# CONFIG_DPM_WATCHDOG is not set +CONFIG_PM_CLK=y +CONFIG_PM_GENERIC_DOMAINS=y +CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y +CONFIG_PM_GENERIC_DOMAINS_SLEEP=y +CONFIG_PM_GENERIC_DOMAINS_OF=y +CONFIG_CPU_PM=y +CONFIG_ENERGY_MODEL=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_HIBERNATION_HEADER=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +# end of Power management options + +# +# CPU Power Management +# + +# +# CPU Idle +# +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y +# CONFIG_CPU_IDLE_GOV_LADDER is not set +CONFIG_CPU_IDLE_GOV_MENU=y +# CONFIG_CPU_IDLE_GOV_TEO is not set +CONFIG_DT_IDLE_STATES=y +CONFIG_DT_IDLE_GENPD=y + +# +# ARM CPU Idle Drivers +# +CONFIG_ARM_PSCI_CPUIDLE=y +CONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y +# end of ARM CPU Idle Drivers +# end of CPU Idle + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_GOV_ATTR_SET=y +CONFIG_CPU_FREQ_GOV_COMMON=y +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y +# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set + +# +# CPU frequency scaling drivers +# +CONFIG_CPUFREQ_DT=y +CONFIG_ARM_ROCKCHIP_CPUFREQ=y +# CONFIG_ARM_SCMI_CPUFREQ is not set +# end of CPU Frequency scaling +# end of CPU Power Management + +CONFIG_ARCH_SUPPORTS_ACPI=y +# CONFIG_ACPI is not set +CONFIG_IRQ_BYPASS_MANAGER=y +CONFIG_HAVE_KVM=y +CONFIG_HAVE_KVM_IRQCHIP=y +CONFIG_HAVE_KVM_IRQFD=y +CONFIG_HAVE_KVM_IRQ_ROUTING=y +CONFIG_HAVE_KVM_EVENTFD=y +CONFIG_KVM_MMIO=y +CONFIG_HAVE_KVM_MSI=y +CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y +CONFIG_KVM_VFIO=y +CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL=y +CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y +CONFIG_HAVE_KVM_IRQ_BYPASS=y +CONFIG_HAVE_KVM_VCPU_RUN_PID_CHANGE=y +CONFIG_KVM_XFER_TO_GUEST_WORK=y +CONFIG_VIRTUALIZATION=y +CONFIG_KVM=y +# CONFIG_NVHE_EL2_DEBUG is not set + +# +# General architecture-dependent options +# +CONFIG_ARCH_HAS_SUBPAGE_FAULTS=y +# CONFIG_KPROBES is not set +# CONFIG_JUMP_LABEL is not set +CONFIG_UPROBES=y +CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_HAVE_IOREMAP_PROT=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y +CONFIG_HAVE_FUNCTION_ERROR_INJECTION=y +CONFIG_HAVE_NMI=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_ARCH_HAS_FORTIFY_SOURCE=y +CONFIG_ARCH_HAS_KEEPINITRD=y +CONFIG_ARCH_HAS_SET_MEMORY=y +CONFIG_ARCH_HAS_SET_DIRECT_MAP=y +CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y +CONFIG_ARCH_WANTS_NO_INSTR=y +CONFIG_HAVE_ASM_MODVERSIONS=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_RSEQ=y +CONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_PERF_REGS=y +CONFIG_HAVE_PERF_USER_STACK_DUMP=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y +CONFIG_MMU_GATHER_TABLE_FREE=y +CONFIG_MMU_GATHER_RCU_TABLE_FREE=y +CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y +CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y +CONFIG_HAVE_CMPXCHG_LOCAL=y +CONFIG_HAVE_CMPXCHG_DOUBLE=y +CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y +CONFIG_HAVE_ARCH_SECCOMP=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_SECCOMP=y +CONFIG_SECCOMP_FILTER=y +# CONFIG_SECCOMP_CACHE_DEBUG is not set +CONFIG_HAVE_ARCH_STACKLEAK=y +CONFIG_HAVE_STACKPROTECTOR=y +CONFIG_STACKPROTECTOR=y +CONFIG_STACKPROTECTOR_STRONG=y +CONFIG_ARCH_SUPPORTS_SHADOW_CALL_STACK=y +# CONFIG_SHADOW_CALL_STACK is not set +CONFIG_ARCH_SUPPORTS_LTO_CLANG=y +CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y +CONFIG_LTO_NONE=y +CONFIG_ARCH_SUPPORTS_CFI_CLANG=y +CONFIG_HAVE_CONTEXT_TRACKING_USER=y +CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y +CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y +CONFIG_HAVE_MOVE_PUD=y +CONFIG_HAVE_MOVE_PMD=y +CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y +CONFIG_HAVE_ARCH_HUGE_VMAP=y +CONFIG_HAVE_ARCH_HUGE_VMALLOC=y +CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y +CONFIG_HAVE_MOD_ARCH_SPECIFIC=y +CONFIG_MODULES_USE_ELF_RELA=y +CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y +CONFIG_SOFTIRQ_ON_OWN_STACK=y +CONFIG_ARCH_HAS_ELF_RANDOMIZE=y +CONFIG_HAVE_ARCH_MMAP_RND_BITS=y +CONFIG_ARCH_MMAP_RND_BITS=18 +CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y +CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11 +CONFIG_PAGE_SIZE_LESS_THAN_64KB=y +CONFIG_PAGE_SIZE_LESS_THAN_256KB=y +CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_OLD_SIGSUSPEND3=y +CONFIG_COMPAT_OLD_SIGACTION=y +CONFIG_COMPAT_32BIT_TIME=y +CONFIG_HAVE_ARCH_VMAP_STACK=y +CONFIG_VMAP_STACK=y +CONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y +CONFIG_RANDOMIZE_KSTACK_OFFSET=y +# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set +CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y +CONFIG_STRICT_KERNEL_RWX=y +CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y +CONFIG_STRICT_MODULE_RWX=y +CONFIG_HAVE_ARCH_COMPILER_H=y +CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y +CONFIG_ARCH_USE_MEMREMAP_PROT=y +# CONFIG_LOCK_EVENT_COUNTS is not set +CONFIG_ARCH_HAS_RELR=y +CONFIG_HAVE_PREEMPT_DYNAMIC=y +CONFIG_HAVE_PREEMPT_DYNAMIC_KEY=y +CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y +CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y +CONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y +CONFIG_ARCH_HAVE_TRACE_MMIO_ACCESS=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y +# end of GCOV-based kernel profiling + +CONFIG_HAVE_GCC_PLUGINS=y +CONFIG_GCC_PLUGINS=y +# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set +# end of General architecture-dependent options + +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set +CONFIG_MODVERSIONS=y +CONFIG_ASM_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +# CONFIG_MODULE_SIG is not set +CONFIG_MODULE_COMPRESS_NONE=y +# CONFIG_MODULE_COMPRESS_GZIP is not set +# CONFIG_MODULE_COMPRESS_XZ is not set +# CONFIG_MODULE_COMPRESS_ZSTD is not set +# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set +CONFIG_MODPROBE_PATH="/sbin/modprobe" +# CONFIG_TRIM_UNUSED_KSYMS is not set +CONFIG_MODULES_TREE_LOOKUP=y +CONFIG_BLOCK=y +CONFIG_BLOCK_LEGACY_AUTOLOAD=y +CONFIG_BLK_CGROUP_RWSTAT=y +CONFIG_BLK_DEV_BSG_COMMON=y +CONFIG_BLK_DEV_BSGLIB=y +# CONFIG_BLK_DEV_INTEGRITY is not set +# CONFIG_BLK_DEV_ZONED is not set +CONFIG_BLK_DEV_THROTTLING=y +# CONFIG_BLK_DEV_THROTTLING_LOW is not set +# CONFIG_BLK_WBT is not set +# CONFIG_BLK_CGROUP_IOLATENCY is not set +# CONFIG_BLK_CGROUP_FC_APPID is not set +# CONFIG_BLK_CGROUP_IOCOST is not set +# CONFIG_BLK_CGROUP_IOPRIO is not set +CONFIG_BLK_DEBUG_FS=y +# CONFIG_BLK_SED_OPAL is not set +# CONFIG_BLK_INLINE_ENCRYPTION is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +CONFIG_AIX_PARTITION=y +CONFIG_OSF_PARTITION=y +CONFIG_AMIGA_PARTITION=y +CONFIG_ATARI_PARTITION=y +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +CONFIG_LDM_PARTITION=y +# CONFIG_LDM_DEBUG is not set +CONFIG_SGI_PARTITION=y +CONFIG_ULTRIX_PARTITION=y +CONFIG_SUN_PARTITION=y +CONFIG_KARMA_PARTITION=y +CONFIG_EFI_PARTITION=y +CONFIG_SYSV68_PARTITION=y +CONFIG_CMDLINE_PARTITION=y +# end of Partition Types + +CONFIG_BLOCK_COMPAT=y +CONFIG_BLK_MQ_PCI=y +CONFIG_BLK_MQ_VIRTIO=y +CONFIG_BLK_PM=y +CONFIG_BLOCK_HOLDER_DEPRECATED=y +CONFIG_BLK_MQ_STACKING=y + +# +# IO Schedulers +# +CONFIG_MQ_IOSCHED_DEADLINE=y +CONFIG_MQ_IOSCHED_KYBER=y +# CONFIG_IOSCHED_BFQ is not set +# end of IO Schedulers + +CONFIG_PREEMPT_NOTIFIERS=y +CONFIG_ASN1=y +CONFIG_ARCH_INLINE_SPIN_TRYLOCK=y +CONFIG_ARCH_INLINE_SPIN_TRYLOCK_BH=y +CONFIG_ARCH_INLINE_SPIN_LOCK=y +CONFIG_ARCH_INLINE_SPIN_LOCK_BH=y +CONFIG_ARCH_INLINE_SPIN_LOCK_IRQ=y +CONFIG_ARCH_INLINE_SPIN_LOCK_IRQSAVE=y +CONFIG_ARCH_INLINE_SPIN_UNLOCK=y +CONFIG_ARCH_INLINE_SPIN_UNLOCK_BH=y +CONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQ=y +CONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE=y +CONFIG_ARCH_INLINE_READ_LOCK=y +CONFIG_ARCH_INLINE_READ_LOCK_BH=y +CONFIG_ARCH_INLINE_READ_LOCK_IRQ=y +CONFIG_ARCH_INLINE_READ_LOCK_IRQSAVE=y +CONFIG_ARCH_INLINE_READ_UNLOCK=y +CONFIG_ARCH_INLINE_READ_UNLOCK_BH=y +CONFIG_ARCH_INLINE_READ_UNLOCK_IRQ=y +CONFIG_ARCH_INLINE_READ_UNLOCK_IRQRESTORE=y +CONFIG_ARCH_INLINE_WRITE_LOCK=y +CONFIG_ARCH_INLINE_WRITE_LOCK_BH=y +CONFIG_ARCH_INLINE_WRITE_LOCK_IRQ=y +CONFIG_ARCH_INLINE_WRITE_LOCK_IRQSAVE=y +CONFIG_ARCH_INLINE_WRITE_UNLOCK=y +CONFIG_ARCH_INLINE_WRITE_UNLOCK_BH=y +CONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQ=y +CONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE=y +CONFIG_INLINE_SPIN_TRYLOCK=y +CONFIG_INLINE_SPIN_TRYLOCK_BH=y +CONFIG_INLINE_SPIN_LOCK=y +CONFIG_INLINE_SPIN_LOCK_BH=y +CONFIG_INLINE_SPIN_LOCK_IRQ=y +CONFIG_INLINE_SPIN_LOCK_IRQSAVE=y +CONFIG_INLINE_SPIN_UNLOCK_BH=y +CONFIG_INLINE_SPIN_UNLOCK_IRQ=y +CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE=y +CONFIG_INLINE_READ_LOCK=y +CONFIG_INLINE_READ_LOCK_BH=y +CONFIG_INLINE_READ_LOCK_IRQ=y +CONFIG_INLINE_READ_LOCK_IRQSAVE=y +CONFIG_INLINE_READ_UNLOCK=y +CONFIG_INLINE_READ_UNLOCK_BH=y +CONFIG_INLINE_READ_UNLOCK_IRQ=y +CONFIG_INLINE_READ_UNLOCK_IRQRESTORE=y +CONFIG_INLINE_WRITE_LOCK=y +CONFIG_INLINE_WRITE_LOCK_BH=y +CONFIG_INLINE_WRITE_LOCK_IRQ=y +CONFIG_INLINE_WRITE_LOCK_IRQSAVE=y +CONFIG_INLINE_WRITE_UNLOCK=y +CONFIG_INLINE_WRITE_UNLOCK_BH=y +CONFIG_INLINE_WRITE_UNLOCK_IRQ=y +CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE=y +CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y +CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_RWSEM_SPIN_ON_OWNER=y +CONFIG_LOCK_SPIN_ON_OWNER=y +CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y +CONFIG_QUEUED_SPINLOCKS=y +CONFIG_ARCH_USE_QUEUED_RWLOCKS=y +CONFIG_QUEUED_RWLOCKS=y +CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y +CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y +CONFIG_FREEZER=y + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +CONFIG_COMPAT_BINFMT_ELF=y +CONFIG_ARCH_BINFMT_ELF_STATE=y +CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y +CONFIG_ARCH_HAVE_ELF_PROT=y +CONFIG_ARCH_USE_GNU_PROPERTY=y +CONFIG_ELFCORE=y +CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y +CONFIG_BINFMT_SCRIPT=y +CONFIG_BINFMT_MISC=m +CONFIG_COREDUMP=y +# end of Executable file formats + +# +# Memory Management options +# +CONFIG_SWAP=y +# CONFIG_ZSWAP is not set +CONFIG_ZSMALLOC=m +# CONFIG_ZSMALLOC_STAT is not set + +# +# SLAB allocator options +# +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +CONFIG_SLAB_MERGE_DEFAULT=y +# CONFIG_SLAB_FREELIST_RANDOM is not set +# CONFIG_SLAB_FREELIST_HARDENED is not set +CONFIG_SLUB_SYSFS=y +# CONFIG_SLUB_STATS is not set +CONFIG_SLUB_CPU_PARTIAL=y +# end of SLAB allocator options + +# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_SPARSEMEM=y +CONFIG_SPARSEMEM_EXTREME=y +CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y +CONFIG_SPARSEMEM_VMEMMAP=y +CONFIG_HAVE_FAST_GUP=y +CONFIG_ARCH_KEEP_MEMBLOCK=y +CONFIG_MEMORY_ISOLATION=y +CONFIG_EXCLUSIVE_SYSTEM_RAM=y +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y +CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y +# CONFIG_MEMORY_HOTPLUG is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y +# CONFIG_COMPACTION is not set +# CONFIG_PAGE_REPORTING is not set +CONFIG_MIGRATION=y +CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y +CONFIG_CONTIG_ALLOC=y +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_MMU_NOTIFIER=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=32768 +CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y +# CONFIG_MEMORY_FAILURE is not set +CONFIG_ARCH_WANTS_THP_SWAP=y +# CONFIG_TRANSPARENT_HUGEPAGE is not set +CONFIG_CMA=y +# CONFIG_CMA_INACTIVE is not set +# CONFIG_CMA_DEBUG is not set +CONFIG_CMA_DEBUGFS=y +CONFIG_CMA_DEBUGFS_BITMAP_HEX=y +CONFIG_CMA_SYSFS=y +CONFIG_CMA_AREAS=7 +CONFIG_GENERIC_EARLY_IOREMAP=y +# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set +# CONFIG_IDLE_PAGE_TRACKING is not set +CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y +CONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y +CONFIG_ARCH_HAS_PTE_DEVMAP=y +CONFIG_ARCH_HAS_ZONE_DMA_SET=y +CONFIG_ZONE_DMA=y +CONFIG_ZONE_DMA32=y +CONFIG_ARCH_USES_HIGH_VMA_FLAGS=y +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_PERCPU_STATS is not set +# CONFIG_GUP_TEST is not set +CONFIG_ARCH_HAS_PTE_SPECIAL=y +CONFIG_SECRETMEM=y +# CONFIG_ANON_VMA_NAME is not set +# CONFIG_USERFAULTFD is not set +# CONFIG_LRU_GEN is not set +CONFIG_LOCK_MM_AND_FIND_VMA=y + +# +# Data Access Monitoring +# +# CONFIG_DAMON is not set +# end of Data Access Monitoring +# end of Memory Management options + +CONFIG_NET=y +CONFIG_COMPAT_NETLINK_MESSAGES=y +CONFIG_NET_INGRESS=y +CONFIG_NET_EGRESS=y +CONFIG_NET_REDIRECT=y +CONFIG_SKB_EXTENSIONS=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_PACKET_DIAG=m +CONFIG_UNIX=y +CONFIG_UNIX_SCM=y +CONFIG_AF_UNIX_OOB=y +CONFIG_UNIX_DIAG=m +CONFIG_TLS=m +CONFIG_TLS_DEVICE=y +CONFIG_TLS_TOE=y +CONFIG_XFRM=y +CONFIG_XFRM_ALGO=y +CONFIG_XFRM_USER=y +CONFIG_XFRM_INTERFACE=m +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +CONFIG_XFRM_AH=m +CONFIG_XFRM_ESP=m +CONFIG_XFRM_IPCOMP=m +CONFIG_NET_KEY=m +# CONFIG_NET_KEY_MIGRATE is not set +# CONFIG_XDP_SOCKETS is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +# CONFIG_IP_FIB_TRIE_STATS is not set +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_ROUTE_CLASSID=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m +CONFIG_NET_IP_TUNNEL=m +CONFIG_NET_IPGRE=m +# CONFIG_NET_IPGRE_BROADCAST is not set +CONFIG_IP_MROUTE_COMMON=y +CONFIG_IP_MROUTE=y +CONFIG_IP_MROUTE_MULTIPLE_TABLES=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +CONFIG_SYN_COOKIES=y +CONFIG_NET_IPVTI=m +CONFIG_NET_UDP_TUNNEL=m +# CONFIG_NET_FOU is not set +# CONFIG_NET_FOU_IP_TUNNELS is not set +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +# CONFIG_INET_ESP_OFFLOAD is not set +# CONFIG_INET_ESPINTCP is not set +CONFIG_INET_IPCOMP=m +CONFIG_INET_TABLE_PERTURB_ORDER=16 +CONFIG_INET_XFRM_TUNNEL=m +CONFIG_INET_TUNNEL=m +CONFIG_INET_DIAG=m +CONFIG_INET_TCP_DIAG=m +CONFIG_INET_UDP_DIAG=m +CONFIG_INET_RAW_DIAG=m +# CONFIG_INET_DIAG_DESTROY is not set +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=y +CONFIG_TCP_CONG_WESTWOOD=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_VEGAS=m +CONFIG_TCP_CONG_NV=m +CONFIG_TCP_CONG_SCALABLE=m +CONFIG_TCP_CONG_LP=m +CONFIG_TCP_CONG_VENO=m +CONFIG_TCP_CONG_YEAH=m +CONFIG_TCP_CONG_ILLINOIS=m +CONFIG_TCP_CONG_DCTCP=m +CONFIG_TCP_CONG_CDG=m +CONFIG_TCP_CONG_BBR=m +CONFIG_DEFAULT_CUBIC=y +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="cubic" +CONFIG_TCP_MD5SIG=y +CONFIG_IPV6=m +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +# CONFIG_IPV6_OPTIMISTIC_DAD is not set +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +# CONFIG_INET6_ESP_OFFLOAD is not set +# CONFIG_INET6_ESPINTCP is not set +CONFIG_INET6_IPCOMP=m +# CONFIG_IPV6_MIP6 is not set +CONFIG_IPV6_ILA=m +CONFIG_INET6_XFRM_TUNNEL=m +CONFIG_INET6_TUNNEL=m +# CONFIG_IPV6_VTI is not set +CONFIG_IPV6_SIT=m +CONFIG_IPV6_SIT_6RD=y +CONFIG_IPV6_NDISC_NODETYPE=y +CONFIG_IPV6_TUNNEL=m +# CONFIG_IPV6_GRE is not set +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_IPV6_MROUTE=y +CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y +CONFIG_IPV6_PIMSM_V2=y +# CONFIG_IPV6_SEG6_LWTUNNEL is not set +# CONFIG_IPV6_SEG6_HMAC is not set +# CONFIG_IPV6_RPL_LWTUNNEL is not set +# CONFIG_IPV6_IOAM6_LWTUNNEL is not set +CONFIG_NETLABEL=y +CONFIG_MPTCP=y +CONFIG_INET_MPTCP_DIAG=m +CONFIG_NETWORK_SECMARK=y +CONFIG_NET_PTP_CLASSIFY=y +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +CONFIG_NETFILTER=y +CONFIG_NETFILTER_ADVANCED=y +CONFIG_BRIDGE_NETFILTER=m + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_INGRESS=y +CONFIG_NETFILTER_EGRESS=y +CONFIG_NETFILTER_SKIP_EGRESS=y +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_FAMILY_BRIDGE=y +CONFIG_NETFILTER_FAMILY_ARP=y +# CONFIG_NETFILTER_NETLINK_HOOK is not set +CONFIG_NETFILTER_NETLINK_ACCT=m +CONFIG_NETFILTER_NETLINK_QUEUE=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NETFILTER_NETLINK_OSF=m +CONFIG_NF_CONNTRACK=m +CONFIG_NF_LOG_SYSLOG=m +CONFIG_NETFILTER_CONNCOUNT=m +CONFIG_NF_CONNTRACK_MARK=y +# CONFIG_NF_CONNTRACK_SECMARK is not set +# CONFIG_NF_CONNTRACK_ZONES is not set +CONFIG_NF_CONNTRACK_PROCFS=y +CONFIG_NF_CONNTRACK_EVENTS=y +# CONFIG_NF_CONNTRACK_TIMEOUT is not set +CONFIG_NF_CONNTRACK_TIMESTAMP=y +CONFIG_NF_CONNTRACK_LABELS=y +CONFIG_NF_CT_PROTO_DCCP=y +CONFIG_NF_CT_PROTO_GRE=y +CONFIG_NF_CT_PROTO_SCTP=y +CONFIG_NF_CT_PROTO_UDPLITE=y +CONFIG_NF_CONNTRACK_AMANDA=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_H323=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_BROADCAST=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m +CONFIG_NF_CONNTRACK_PPTP=m +CONFIG_NF_CONNTRACK_SANE=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_CT_NETLINK=m +CONFIG_NF_CT_NETLINK_HELPER=m +CONFIG_NETFILTER_NETLINK_GLUE_CT=y +CONFIG_NF_NAT=m +CONFIG_NF_NAT_AMANDA=m +CONFIG_NF_NAT_FTP=m +CONFIG_NF_NAT_IRC=m +CONFIG_NF_NAT_SIP=m +CONFIG_NF_NAT_TFTP=m +CONFIG_NF_NAT_REDIRECT=y +CONFIG_NF_NAT_MASQUERADE=y +CONFIG_NETFILTER_SYNPROXY=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=y +CONFIG_NF_TABLES_NETDEV=y +CONFIG_NFT_NUMGEN=m +CONFIG_NFT_CT=m +CONFIG_NFT_FLOW_OFFLOAD=m +CONFIG_NFT_CONNLIMIT=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_MASQ=m +CONFIG_NFT_REDIR=m +CONFIG_NFT_NAT=m +CONFIG_NFT_TUNNEL=m +CONFIG_NFT_OBJREF=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_QUOTA=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_REJECT_INET=m +CONFIG_NFT_COMPAT=m +CONFIG_NFT_HASH=m +CONFIG_NFT_FIB=m +CONFIG_NFT_FIB_INET=m +CONFIG_NFT_XFRM=m +CONFIG_NFT_SOCKET=m +CONFIG_NFT_OSF=m +CONFIG_NFT_TPROXY=m +CONFIG_NFT_SYNPROXY=m +CONFIG_NF_DUP_NETDEV=m +CONFIG_NFT_DUP_NETDEV=m +CONFIG_NFT_FWD_NETDEV=m +CONFIG_NFT_FIB_NETDEV=m +# CONFIG_NFT_REJECT_NETDEV is not set +CONFIG_NF_FLOW_TABLE_INET=m +CONFIG_NF_FLOW_TABLE=m +# CONFIG_NF_FLOW_TABLE_PROCFS is not set +CONFIG_NETFILTER_XTABLES=y +CONFIG_NETFILTER_XTABLES_COMPAT=y + +# +# Xtables combined modules +# +CONFIG_NETFILTER_XT_MARK=m +CONFIG_NETFILTER_XT_CONNMARK=m +CONFIG_NETFILTER_XT_SET=m + +# +# Xtables targets +# +CONFIG_NETFILTER_XT_TARGET_AUDIT=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_CT=m +CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HL=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LED=m +CONFIG_NETFILTER_XT_TARGET_LOG=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_NAT=m +CONFIG_NETFILTER_XT_TARGET_NETMAP=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set +CONFIG_NETFILTER_XT_TARGET_RATEEST=m +CONFIG_NETFILTER_XT_TARGET_REDIRECT=m +CONFIG_NETFILTER_XT_TARGET_MASQUERADE=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m +CONFIG_NETFILTER_XT_TARGET_TRACE=m +CONFIG_NETFILTER_XT_TARGET_SECMARK=m +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m + +# +# Xtables matches +# +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m +CONFIG_NETFILTER_XT_MATCH_CGROUP=m +CONFIG_NETFILTER_XT_MATCH_CLUSTER=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_CPU=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ECN=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_HL=m +CONFIG_NETFILTER_XT_MATCH_IPCOMP=m +CONFIG_NETFILTER_XT_MATCH_IPRANGE=m +CONFIG_NETFILTER_XT_MATCH_IPVS=m +CONFIG_NETFILTER_XT_MATCH_L2TP=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m +CONFIG_NETFILTER_XT_MATCH_OWNER=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_QUOTA=m +CONFIG_NETFILTER_XT_MATCH_RATEEST=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TIME=m +CONFIG_NETFILTER_XT_MATCH_U32=m +# end of Core Netfilter Configuration + +CONFIG_IP_SET=m +CONFIG_IP_SET_MAX=256 +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_IPMAC=m +CONFIG_IP_SET_HASH_MAC=m +CONFIG_IP_SET_HASH_NETPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETNET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m +CONFIG_IP_VS=m +CONFIG_IP_VS_IPV6=y +# CONFIG_IP_VS_DEBUG is not set +CONFIG_IP_VS_TAB_BITS=12 + +# +# IPVS transport protocol load balancing support +# +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_PROTO_AH_ESP=y +CONFIG_IP_VS_PROTO_ESP=y +CONFIG_IP_VS_PROTO_AH=y +CONFIG_IP_VS_PROTO_SCTP=y + +# +# IPVS scheduler +# +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_FO=m +CONFIG_IP_VS_OVF=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_MH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m +# CONFIG_IP_VS_TWOS is not set + +# +# IPVS SH scheduler +# +CONFIG_IP_VS_SH_TAB_BITS=8 + +# +# IPVS MH scheduler +# +CONFIG_IP_VS_MH_TAB_INDEX=12 + +# +# IPVS application helper +# +CONFIG_IP_VS_FTP=m +CONFIG_IP_VS_NFCT=y +CONFIG_IP_VS_PE_SIP=m + +# +# IP: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV4=m +CONFIG_NF_SOCKET_IPV4=m +CONFIG_NF_TPROXY_IPV4=m +CONFIG_NF_TABLES_IPV4=y +CONFIG_NFT_REJECT_IPV4=m +CONFIG_NFT_DUP_IPV4=m +CONFIG_NFT_FIB_IPV4=m +CONFIG_NF_TABLES_ARP=y +CONFIG_NF_DUP_IPV4=m +CONFIG_NF_LOG_ARP=m +CONFIG_NF_LOG_IPV4=m +CONFIG_NF_REJECT_IPV4=m +CONFIG_NF_NAT_SNMP_BASIC=m +CONFIG_NF_NAT_PPTP=m +CONFIG_NF_NAT_H323=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_SYNPROXY=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_SECURITY=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +# end of IP: Netfilter Configuration + +# +# IPv6: Netfilter Configuration +# +CONFIG_NF_SOCKET_IPV6=m +CONFIG_NF_TPROXY_IPV6=m +CONFIG_NF_TABLES_IPV6=y +CONFIG_NFT_REJECT_IPV6=m +CONFIG_NFT_DUP_IPV6=m +CONFIG_NFT_FIB_IPV6=m +CONFIG_NF_DUP_IPV6=m +CONFIG_NF_REJECT_IPV6=m +CONFIG_NF_LOG_IPV6=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_SRH=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_RAW=m +CONFIG_IP6_NF_SECURITY=m +CONFIG_IP6_NF_NAT=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +# end of IPv6: Netfilter Configuration + +CONFIG_NF_DEFRAG_IPV6=m +CONFIG_NF_TABLES_BRIDGE=m +CONFIG_NFT_BRIDGE_META=m +CONFIG_NFT_BRIDGE_REJECT=m +CONFIG_NF_CONNTRACK_BRIDGE=m +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_IP6=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_NFLOG=m +CONFIG_BPFILTER=y +CONFIG_BPFILTER_UMH=m +CONFIG_IP_DCCP=m +CONFIG_INET_DCCP_DIAG=m + +# +# DCCP CCIDs Configuration +# +# CONFIG_IP_DCCP_CCID2_DEBUG is not set +CONFIG_IP_DCCP_CCID3=y +# CONFIG_IP_DCCP_CCID3_DEBUG is not set +CONFIG_IP_DCCP_TFRC_LIB=y +# end of DCCP CCIDs Configuration + +# +# DCCP Kernel Hacking +# +# CONFIG_IP_DCCP_DEBUG is not set +# end of DCCP Kernel Hacking + +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_OBJCNT is not set +CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y +# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set +# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set +CONFIG_SCTP_COOKIE_HMAC_MD5=y +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_INET_SCTP_DIAG=m +CONFIG_RDS=m +CONFIG_RDS_TCP=m +CONFIG_RDS_DEBUG=y +CONFIG_TIPC=m +CONFIG_TIPC_MEDIA_UDP=y +CONFIG_TIPC_CRYPTO=y +CONFIG_TIPC_DIAG=m +CONFIG_ATM=m +CONFIG_ATM_CLIP=m +CONFIG_ATM_CLIP_NO_ICMP=y +CONFIG_ATM_LANE=m +CONFIG_ATM_MPOA=m +CONFIG_ATM_BR2684=m +CONFIG_ATM_BR2684_IPFILTER=y +CONFIG_L2TP=m +# CONFIG_L2TP_DEBUGFS is not set +# CONFIG_L2TP_V3 is not set +CONFIG_STP=m +CONFIG_GARP=m +CONFIG_MRP=m +CONFIG_BRIDGE=m +CONFIG_BRIDGE_IGMP_SNOOPING=y +CONFIG_BRIDGE_VLAN_FILTERING=y +CONFIG_BRIDGE_MRP=y +# CONFIG_BRIDGE_CFM is not set +# CONFIG_NET_DSA is not set +CONFIG_VLAN_8021Q=m +CONFIG_VLAN_8021Q_GVRP=y +CONFIG_VLAN_8021Q_MVRP=y +CONFIG_LLC=m +CONFIG_LLC2=m +CONFIG_ATALK=m +CONFIG_DEV_APPLETALK=m +CONFIG_IPDDP=m +CONFIG_IPDDP_ENCAP=y +CONFIG_X25=m +CONFIG_LAPB=m +CONFIG_PHONET=m +CONFIG_6LOWPAN=m +# CONFIG_6LOWPAN_DEBUGFS is not set +CONFIG_6LOWPAN_NHC=m +CONFIG_6LOWPAN_NHC_DEST=m +CONFIG_6LOWPAN_NHC_FRAGMENT=m +CONFIG_6LOWPAN_NHC_HOP=m +CONFIG_6LOWPAN_NHC_IPV6=m +CONFIG_6LOWPAN_NHC_MOBILITY=m +CONFIG_6LOWPAN_NHC_ROUTING=m +CONFIG_6LOWPAN_NHC_UDP=m +# CONFIG_6LOWPAN_GHC_EXT_HDR_HOP is not set +# CONFIG_6LOWPAN_GHC_UDP is not set +# CONFIG_6LOWPAN_GHC_ICMPV6 is not set +# CONFIG_6LOWPAN_GHC_EXT_HDR_DEST is not set +# CONFIG_6LOWPAN_GHC_EXT_HDR_FRAG is not set +# CONFIG_6LOWPAN_GHC_EXT_HDR_ROUTE is not set +CONFIG_IEEE802154=m +# CONFIG_IEEE802154_NL802154_EXPERIMENTAL is not set +CONFIG_IEEE802154_SOCKET=m +CONFIG_IEEE802154_6LOWPAN=m +CONFIG_MAC802154=m +CONFIG_NET_SCHED=y + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_MULTIQ=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFB=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +# CONFIG_NET_SCH_CBS is not set +# CONFIG_NET_SCH_ETF is not set +# CONFIG_NET_SCH_TAPRIO is not set +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_DRR=m +CONFIG_NET_SCH_MQPRIO=m +# CONFIG_NET_SCH_SKBPRIO is not set +CONFIG_NET_SCH_CHOKE=m +CONFIG_NET_SCH_QFQ=m +CONFIG_NET_SCH_CODEL=m +CONFIG_NET_SCH_FQ_CODEL=m +# CONFIG_NET_SCH_CAKE is not set +CONFIG_NET_SCH_FQ=m +CONFIG_NET_SCH_HHF=m +CONFIG_NET_SCH_PIE=m +# CONFIG_NET_SCH_FQ_PIE is not set +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_SCH_PLUG=m +# CONFIG_NET_SCH_ETS is not set +# CONFIG_NET_SCH_DEFAULT is not set + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_ROUTE4=m +# CONFIG_NET_CLS_FW is not set +CONFIG_NET_CLS_U32=m +# CONFIG_CLS_U32_PERF is not set +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_FLOW=m +CONFIG_NET_CLS_CGROUP=m +CONFIG_NET_CLS_BPF=m +CONFIG_NET_CLS_FLOWER=m +# CONFIG_NET_CLS_MATCHALL is not set +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_STACK=32 +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_TEXT=m +# CONFIG_NET_EMATCH_CANID is not set +CONFIG_NET_EMATCH_IPSET=m +# CONFIG_NET_EMATCH_IPT is not set +CONFIG_NET_CLS_ACT=y +CONFIG_NET_ACT_POLICE=m +CONFIG_NET_ACT_GACT=m +CONFIG_GACT_PROB=y +CONFIG_NET_ACT_MIRRED=m +# CONFIG_NET_ACT_SAMPLE is not set +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_NAT=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_SIMP=m +CONFIG_NET_ACT_SKBEDIT=m +CONFIG_NET_ACT_CSUM=m +# CONFIG_NET_ACT_MPLS is not set +# CONFIG_NET_ACT_VLAN is not set +# CONFIG_NET_ACT_BPF is not set +# CONFIG_NET_ACT_CONNMARK is not set +# CONFIG_NET_ACT_CTINFO is not set +# CONFIG_NET_ACT_SKBMOD is not set +# CONFIG_NET_ACT_IFE is not set +# CONFIG_NET_ACT_TUNNEL_KEY is not set +# CONFIG_NET_ACT_CT is not set +# CONFIG_NET_ACT_GATE is not set +# CONFIG_NET_TC_SKB_EXT is not set +CONFIG_NET_SCH_FIFO=y +CONFIG_DCB=y +CONFIG_DNS_RESOLVER=y +CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_BATMAN_V=y +CONFIG_BATMAN_ADV_BLA=y +CONFIG_BATMAN_ADV_DAT=y +CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y +CONFIG_BATMAN_ADV_DEBUG=y +CONFIG_BATMAN_ADV_TRACING=y +CONFIG_OPENVSWITCH=m +CONFIG_OPENVSWITCH_GRE=m +CONFIG_OPENVSWITCH_VXLAN=m +CONFIG_OPENVSWITCH_GENEVE=m +CONFIG_VSOCKETS=m +CONFIG_VSOCKETS_DIAG=m +CONFIG_VSOCKETS_LOOPBACK=m +# CONFIG_VIRTIO_VSOCKETS is not set +CONFIG_VIRTIO_VSOCKETS_COMMON=m +# CONFIG_NETLINK_DIAG is not set +CONFIG_MPLS=y +CONFIG_NET_MPLS_GSO=m +# CONFIG_MPLS_ROUTING is not set +CONFIG_NET_NSH=m +CONFIG_HSR=m +CONFIG_NET_SWITCHDEV=y +CONFIG_NET_L3_MASTER_DEV=y +CONFIG_QRTR=m +CONFIG_QRTR_TUN=m +CONFIG_QRTR_MHI=m +CONFIG_NET_NCSI=y +CONFIG_NCSI_OEM_CMD_GET_MAC=y +# CONFIG_NCSI_OEM_CMD_KEEP_PHY is not set +CONFIG_PCPU_DEV_REFCNT=y +CONFIG_RPS=y +CONFIG_RFS_ACCEL=y +CONFIG_SOCK_RX_QUEUE_MAPPING=y +CONFIG_XPS=y +CONFIG_CGROUP_NET_PRIO=y +CONFIG_CGROUP_NET_CLASSID=y +CONFIG_NET_RX_BUSY_POLL=y +CONFIG_BQL=y +CONFIG_BPF_STREAM_PARSER=y +CONFIG_NET_FLOW_LIMIT=y + +# +# Network testing +# +CONFIG_NET_PKTGEN=m +CONFIG_NET_DROP_MONITOR=m +# end of Network testing +# end of Networking options + +# CONFIG_HAMRADIO is not set +CONFIG_CAN=m +CONFIG_CAN_RAW=m +CONFIG_CAN_BCM=m +CONFIG_CAN_GW=m +# CONFIG_CAN_J1939 is not set +# CONFIG_CAN_ISOTP is not set +CONFIG_BT=m +CONFIG_BT_BREDR=y +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m +CONFIG_BT_HS=y +CONFIG_BT_LE=y +CONFIG_BT_6LOWPAN=m +CONFIG_BT_LEDS=y +CONFIG_BT_MSFTEXT=y +# CONFIG_BT_AOSPEXT is not set +CONFIG_BT_DEBUGFS=y +# CONFIG_BT_SELFTEST is not set + +# +# Bluetooth device drivers +# +CONFIG_BT_INTEL=m +CONFIG_BT_BCM=m +CONFIG_BT_RTL=m +CONFIG_BT_QCA=m +CONFIG_BT_MTK=m +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y +CONFIG_BT_HCIBTUSB_BCM=y +CONFIG_BT_HCIBTUSB_MTK=y +CONFIG_BT_HCIBTUSB_RTL=y +CONFIG_BT_HCIBTSDIO=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_SERDEV=y +CONFIG_BT_HCIUART_H4=y +# CONFIG_BT_HCIUART_NOKIA is not set +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_ATH3K=y +# CONFIG_BT_HCIUART_LL is not set +CONFIG_BT_HCIUART_3WIRE=y +CONFIG_BT_HCIUART_INTEL=y +CONFIG_BT_HCIUART_BCM=y +CONFIG_BT_HCIUART_RTL=y +CONFIG_BT_HCIUART_QCA=y +CONFIG_BT_HCIUART_AG6XX=y +# CONFIG_BT_HCIUART_MRVL is not set +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +CONFIG_BT_HCIVHCI=m +CONFIG_BT_MRVL=m +CONFIG_BT_MRVL_SDIO=m +CONFIG_BT_ATH3K=m +CONFIG_BT_MTKSDIO=m +# CONFIG_BT_MTKUART is not set +# CONFIG_BT_VIRTIO is not set +# CONFIG_BT_HCIBTUSB_RTLBTUSB is not set +# end of Bluetooth device drivers + +# CONFIG_AF_RXRPC is not set +# CONFIG_AF_KCM is not set +CONFIG_STREAM_PARSER=y +# CONFIG_MCTP is not set +CONFIG_FIB_RULES=y +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_SPY=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211=y +CONFIG_NL80211_TESTMODE=y +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_CERTIFICATION_ONUS is not set +CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y +CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y +CONFIG_CFG80211_DEFAULT_PS=y +CONFIG_CFG80211_DEBUGFS=y +CONFIG_CFG80211_CRDA_SUPPORT=y +CONFIG_CFG80211_WEXT=y +CONFIG_CFG80211_WEXT_EXPORT=y +CONFIG_LIB80211=m +CONFIG_LIB80211_CRYPT_WEP=m +CONFIG_LIB80211_CRYPT_CCMP=m +CONFIG_LIB80211_CRYPT_TKIP=m +# CONFIG_LIB80211_DEBUG is not set +CONFIG_MAC80211=y +CONFIG_MAC80211_HAS_RC=y +CONFIG_MAC80211_RC_MINSTREL=y +CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y +CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" +# CONFIG_MAC80211_MESH is not set +CONFIG_MAC80211_LEDS=y +CONFIG_MAC80211_DEBUGFS=y +# CONFIG_MAC80211_MESSAGE_TRACING is not set +CONFIG_MAC80211_DEBUG_MENU=y +# CONFIG_MAC80211_NOINLINE is not set +CONFIG_MAC80211_VERBOSE_DEBUG=y +# CONFIG_MAC80211_MLME_DEBUG is not set +# CONFIG_MAC80211_STA_DEBUG is not set +# CONFIG_MAC80211_HT_DEBUG is not set +# CONFIG_MAC80211_OCB_DEBUG is not set +# CONFIG_MAC80211_IBSS_DEBUG is not set +# CONFIG_MAC80211_PS_DEBUG is not set +# CONFIG_MAC80211_TDLS_DEBUG is not set +# CONFIG_MAC80211_DEBUG_COUNTERS is not set +CONFIG_MAC80211_STA_HASH_MAX_SIZE=0 +CONFIG_RFKILL=y +CONFIG_RFKILL_LEDS=y +CONFIG_RFKILL_INPUT=y +# CONFIG_RFKILL_GPIO is not set +CONFIG_RFKILL_RK=y +CONFIG_NET_9P=m +CONFIG_NET_9P_VIRTIO=m +CONFIG_9P_FS=m +CONFIG_CAIF=m +# CONFIG_CAIF_DEBUG is not set +CONFIG_CAIF_NETDEV=m +CONFIG_CAIF_USB=m +CONFIG_CEPH_LIB=y +CONFIG_CEPH_LIB_PRETTYDEBUG=y +CONFIG_CEPH_LIB_USE_DNS_RESOLVER=y +# CONFIG_NFC is not set +# CONFIG_PSAMPLE is not set +# CONFIG_NET_IFE is not set +CONFIG_LWTUNNEL=y +CONFIG_LWTUNNEL_BPF=y +CONFIG_DST_CACHE=y +CONFIG_GRO_CELLS=y +CONFIG_SOCK_VALIDATE_XMIT=y +CONFIG_NET_SELFTESTS=y +CONFIG_NET_SOCK_MSG=y +CONFIG_NET_DEVLINK=y +CONFIG_PAGE_POOL=y +# CONFIG_PAGE_POOL_STATS is not set +CONFIG_FAILOVER=m +CONFIG_ETHTOOL_NETLINK=y + +# +# Device Drivers +# +CONFIG_ARM_AMBA=y +CONFIG_HAVE_PCI=y +CONFIG_PCI=y +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_DOMAINS_GENERIC=y +CONFIG_PCI_SYSCALL=y +CONFIG_PCIEPORTBUS=y +# CONFIG_PCIEAER is not set +CONFIG_PCIEASPM=y +CONFIG_PCIEASPM_DEFAULT=y +# CONFIG_PCIEASPM_POWERSAVE is not set +# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set +# CONFIG_PCIEASPM_PERFORMANCE is not set +# CONFIG_PCIEASPM_EXT is not set +CONFIG_PCIE_PME=y +# CONFIG_PCIE_PTM is not set +CONFIG_PCI_MSI=y +CONFIG_PCI_MSI_IRQ_DOMAIN=y +CONFIG_PCI_QUIRKS=y +# CONFIG_PCI_DEBUG is not set +# CONFIG_PCI_STUB is not set +# CONFIG_PCI_IOV is not set +# CONFIG_PCI_PRI is not set +# CONFIG_PCI_PASID is not set +CONFIG_PCI_LABEL=y +# CONFIG_PCIE_BUS_TUNE_OFF is not set +CONFIG_PCIE_BUS_DEFAULT=y +# CONFIG_PCIE_BUS_SAFE is not set +# CONFIG_PCIE_BUS_PERFORMANCE is not set +# CONFIG_PCIE_BUS_PEER2PEER is not set +CONFIG_VGA_ARB=y +CONFIG_VGA_ARB_MAX_GPUS=16 +# CONFIG_HOTPLUG_PCI is not set + +# +# PCI controller drivers +# +# CONFIG_PCI_FTPCI100 is not set +# CONFIG_PCI_HOST_GENERIC is not set +# CONFIG_PCIE_XILINX is not set +# CONFIG_PCI_XGENE is not set +# CONFIG_PCIE_ALTERA is not set +# CONFIG_PCI_HOST_THUNDER_PEM is not set +# CONFIG_PCI_HOST_THUNDER_ECAM is not set +CONFIG_PCIE_ROCKCHIP=y +CONFIG_PCIE_ROCKCHIP_HOST=y +# CONFIG_ROCKCHIP_PCIE_DMA_OBJ is not set +# CONFIG_PCIE_MICROCHIP_HOST is not set + +# +# DesignWare PCI Core Support +# +CONFIG_PCIE_DW=y +CONFIG_PCIE_DW_HOST=y +CONFIG_PCIE_DW_PLAT=y +CONFIG_PCIE_DW_PLAT_HOST=y +CONFIG_PCIE_DW_ROCKCHIP=y +CONFIG_PCIE_RK_THREADED_INIT=y +# CONFIG_PCIE_DW_DMATEST is not set +# CONFIG_PCIE_DW_ROCKCHIP_EP is not set +# CONFIG_PCI_HISI is not set +# CONFIG_PCIE_KIRIN is not set +# CONFIG_PCI_MESON is not set +# CONFIG_PCIE_AL is not set +# end of DesignWare PCI Core Support + +# +# Mobiveil PCIe Core Support +# +# end of Mobiveil PCIe Core Support + +# +# Cadence PCIe controllers support +# +# CONFIG_PCIE_CADENCE_PLAT_HOST is not set +# CONFIG_PCI_J721E_HOST is not set +# end of Cadence PCIe controllers support +# end of PCI controller drivers + +# +# PCI Endpoint +# +# CONFIG_PCI_ENDPOINT is not set +# end of PCI Endpoint + +# +# PCI switch controller drivers +# +# CONFIG_PCI_SW_SWITCHTEC is not set +# end of PCI switch controller drivers + +# CONFIG_CXL_BUS is not set +# CONFIG_PCCARD is not set +# CONFIG_RAPIDIO is not set + +# +# Generic Driver Options +# +# CONFIG_UEVENT_HELPER is not set +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_DEVTMPFS_SAFE is not set +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y + +# +# Firmware loader +# +CONFIG_FW_LOADER=y +CONFIG_FW_LOADER_PAGED_BUF=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_FW_LOADER_USER_HELPER is not set +CONFIG_FW_LOADER_COMPRESS=y +CONFIG_FW_LOADER_COMPRESS_XZ=y +CONFIG_FW_LOADER_COMPRESS_ZSTD=y +CONFIG_FW_CACHE=y +# CONFIG_FW_UPLOAD is not set +# end of Firmware loader + +CONFIG_WANT_DEV_COREDUMP=y +CONFIG_ALLOW_DEV_COREDUMP=y +CONFIG_DEV_COREDUMP=y +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set +# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_CPU_VULNERABILITIES=y +CONFIG_SOC_BUS=y +CONFIG_REGMAP=y +CONFIG_REGMAP_I2C=y +CONFIG_REGMAP_SPI=y +CONFIG_REGMAP_MMIO=y +CONFIG_REGMAP_IRQ=y +CONFIG_REGMAP_SCCB=m +# CONFIG_MALI_BASE_MODULES is not set +CONFIG_DMA_SHARED_BUFFER=y +# CONFIG_DMA_FENCE_TRACE is not set +CONFIG_GENERIC_ARCH_TOPOLOGY=y +# end of Generic Driver Options + +# +# Bus devices +# +# CONFIG_BRCMSTB_GISB_ARB is not set +# CONFIG_MOXTET is not set +# CONFIG_VEXPRESS_CONFIG is not set +CONFIG_MHI_BUS=m +# CONFIG_MHI_BUS_DEBUG is not set +# CONFIG_MHI_BUS_PCI_GENERIC is not set +# CONFIG_MHI_BUS_EP is not set +# end of Bus devices + +CONFIG_CONNECTOR=y +CONFIG_PROC_EVENTS=y + +# +# Firmware Drivers +# + +# +# ARM System Control and Management Interface Protocol +# +CONFIG_ARM_SCMI_PROTOCOL=y +CONFIG_ARM_SCMI_HAVE_TRANSPORT=y +CONFIG_ARM_SCMI_HAVE_SHMEM=y +CONFIG_ARM_SCMI_HAVE_MSG=y +CONFIG_ARM_SCMI_TRANSPORT_MAILBOX=y +CONFIG_ARM_SCMI_TRANSPORT_OPTEE=y +CONFIG_ARM_SCMI_TRANSPORT_SMC=y +# CONFIG_ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE is not set +CONFIG_ARM_SCMI_POWER_DOMAIN=y +# CONFIG_ARM_SCMI_POWER_CONTROL is not set +# end of ARM System Control and Management Interface Protocol + +# CONFIG_ARM_SCPI_PROTOCOL is not set +# CONFIG_FIRMWARE_MEMMAP is not set +CONFIG_DMIID=y +# CONFIG_DMI_SYSFS is not set +# CONFIG_FW_CFG_SYSFS is not set +CONFIG_ROCKCHIP_SIP=y +# CONFIG_SYSFB_SIMPLEFB is not set +# CONFIG_ARM_FFA_TRANSPORT is not set +# CONFIG_GOOGLE_FIRMWARE is not set + +# +# EFI (Extensible Firmware Interface) Support +# +CONFIG_EFI_ESRT=y +CONFIG_EFI_VARS_PSTORE=y +# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set +CONFIG_EFI_PARAMS_FROM_FDT=y +CONFIG_EFI_RUNTIME_WRAPPERS=y +CONFIG_EFI_GENERIC_STUB=y +# CONFIG_EFI_ZBOOT is not set +CONFIG_EFI_ARMSTUB_DTB_LOADER=y +CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y +# CONFIG_EFI_BOOTLOADER_CONTROL is not set +# CONFIG_EFI_CAPSULE_LOADER is not set +# CONFIG_EFI_TEST is not set +# CONFIG_RESET_ATTACK_MITIGATION is not set +# CONFIG_EFI_DISABLE_PCI_DMA is not set +CONFIG_EFI_EARLYCON=y +# CONFIG_EFI_DISABLE_RUNTIME is not set +# CONFIG_EFI_COCO_SECRET is not set +# end of EFI (Extensible Firmware Interface) Support + +CONFIG_ARM_PSCI_FW=y +# CONFIG_ARM_PSCI_CHECKER is not set +CONFIG_HAVE_ARM_SMCCC=y +CONFIG_HAVE_ARM_SMCCC_DISCOVERY=y +CONFIG_ARM_SMCCC_SOC_ID=y + +# +# Tegra firmware driver +# +# end of Tegra firmware driver +# end of Firmware Drivers + +# CONFIG_GNSS is not set +CONFIG_MTD=y +# CONFIG_MTD_TESTS is not set + +# +# Partition parsers +# +# CONFIG_MTD_AR7_PARTS is not set +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_OF_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +# end of Partition parsers + +# +# User Modules And Translation Layers +# +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y + +# +# Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK. +# +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_SM_FTL is not set +# CONFIG_MTD_OOPS is not set +# CONFIG_MTD_SWAP is not set +# CONFIG_MTD_PARTITIONED_MASTER is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# end of RAM/ROM/Flash chip drivers + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_INTEL_VR_NOR is not set +# CONFIG_MTD_PLATRAM is not set +# end of Mapping drivers for chip access + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_DATAFLASH is not set +# CONFIG_MTD_MCHP23K256 is not set +# CONFIG_MTD_MCHP48L640 is not set +# CONFIG_MTD_SST25L is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOCG3 is not set +# end of Self-contained MTD device drivers + +# +# NAND +# +CONFIG_MTD_NAND_CORE=y +# CONFIG_MTD_ONENAND is not set +# CONFIG_MTD_RAW_NAND is not set +CONFIG_MTD_SPI_NAND=y + +# +# ECC engine support +# +CONFIG_MTD_NAND_ECC=y +# CONFIG_MTD_NAND_ECC_SW_HAMMING is not set +# CONFIG_MTD_NAND_ECC_SW_BCH is not set +# CONFIG_MTD_NAND_ECC_MXIC is not set +CONFIG_MTD_NAND_BBT_USING_FLASH=y +# end of ECC engine support +# end of NAND + +# +# LPDDR & LPDDR2 PCM memory drivers +# +# CONFIG_MTD_LPDDR is not set +# end of LPDDR & LPDDR2 PCM memory drivers + +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y +# CONFIG_MTD_SPI_NOR_MISC is not set +# CONFIG_MTD_SPI_NOR_SWP_DISABLE is not set +CONFIG_MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y +# CONFIG_MTD_SPI_NOR_SWP_KEEP is not set +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_MTD_UBI_BEB_LIMIT=20 +# CONFIG_MTD_UBI_FASTMAP is not set +# CONFIG_MTD_UBI_GLUEBI is not set +# CONFIG_MTD_UBI_BLOCK is not set +# CONFIG_MTD_HYPERBUS is not set +CONFIG_DTC=y +CONFIG_OF=y +# CONFIG_DTC_SYMBOLS is not set +# CONFIG_OF_UNITTEST is not set +CONFIG_OF_FLATTREE=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_KOBJ=y +CONFIG_OF_DYNAMIC=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_IRQ=y +CONFIG_OF_RESERVED_MEM=y +# CONFIG_OF_OVERLAY is not set +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_NULL_BLK is not set +CONFIG_CDROM=y +# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set +CONFIG_ZRAM=m +CONFIG_ZRAM_DEF_COMP_LZORLE=y +# CONFIG_ZRAM_DEF_COMP_ZSTD is not set +# CONFIG_ZRAM_DEF_COMP_LZO is not set +CONFIG_ZRAM_DEF_COMP="lzo-rle" +# CONFIG_ZRAM_WRITEBACK is not set +# CONFIG_ZRAM_MEMORY_TRACKING is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 +# CONFIG_BLK_DEV_DRBD is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=1 +CONFIG_BLK_DEV_RAM_SIZE=4096 +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +CONFIG_VIRTIO_BLK=m +CONFIG_BLK_DEV_RBD=y +# CONFIG_BLK_DEV_UBLK is not set + +# +# NVME Support +# +CONFIG_NVME_COMMON=y +CONFIG_NVME_CORE=y +CONFIG_BLK_DEV_NVME=y +CONFIG_NVME_MULTIPATH=y +# CONFIG_NVME_VERBOSE_ERRORS is not set +CONFIG_NVME_HWMON=y +CONFIG_NVME_FABRICS=m +CONFIG_NVME_FC=m +CONFIG_NVME_TCP=m +CONFIG_NVME_AUTH=y +CONFIG_NVME_TARGET=m +CONFIG_NVME_TARGET_PASSTHRU=y +CONFIG_NVME_TARGET_LOOP=m +CONFIG_NVME_TARGET_FC=m +CONFIG_NVME_TARGET_FCLOOP=m +CONFIG_NVME_TARGET_TCP=m +CONFIG_NVME_TARGET_AUTH=y +# end of NVME Support + +# +# Misc devices +# + +# +# RK628 misc driver +# +# CONFIG_RK628_MISC is not set +# end of RK628 misc driver + +# CONFIG_JW_IO is not set +# CONFIG_RK803 is not set +# CONFIG_PCIE_FUNC_RKEP is not set +# CONFIG_LT7911D_FB_NOTIFIER is not set +# CONFIG_AD525X_DPOT is not set +# CONFIG_DUMMY_IRQ is not set +# CONFIG_PHANTOM is not set +# CONFIG_TIFM_CORE is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_HI6421V600_IRQ is not set +# CONFIG_HP_ILO is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +# CONFIG_HMC6352 is not set +# CONFIG_DS1682 is not set +# CONFIG_LATTICE_ECP3_CONFIG is not set +CONFIG_SRAM=y +# CONFIG_DW_XDATA_PCIE is not set +# CONFIG_PCI_ENDPOINT_TEST is not set +# CONFIG_XILINX_SDFEC is not set +# CONFIG_HISI_HIKEY_USB is not set +# CONFIG_OPEN_DICE is not set +# CONFIG_VCPU_STALL_DETECTOR is not set +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +CONFIG_EEPROM_AT24=y +# CONFIG_EEPROM_AT25 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +CONFIG_EEPROM_93CX6=y +# CONFIG_EEPROM_93XX46 is not set +# CONFIG_EEPROM_IDT_89HPESX is not set +# CONFIG_EEPROM_EE1004 is not set +# end of EEPROM support + +# CONFIG_CB710_CORE is not set + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_TI_ST is not set +# end of Texas Instruments shared transport line discipline + +# CONFIG_SENSORS_LIS3_SPI is not set +# CONFIG_SENSORS_LIS3_I2C is not set +# CONFIG_ALTERA_STAPL is not set +# CONFIG_VMWARE_VMCI is not set +# CONFIG_GENWQE is not set +# CONFIG_ECHO is not set +# CONFIG_BCM_VK is not set +# CONFIG_MISC_ALCOR_PCI is not set +# CONFIG_MISC_RTSX_PCI is not set +# CONFIG_MISC_RTSX_USB is not set +# CONFIG_HABANA_AI is not set +# CONFIG_UACCE is not set +# CONFIG_PVPANIC is not set +# CONFIG_GP_PCI1XXXX is not set +# end of Misc devices + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI_COMMON=y +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +CONFIG_BLK_DEV_SR=y +CONFIG_CHR_DEV_SG=y +CONFIG_BLK_DEV_BSG=y +CONFIG_CHR_DEV_SCH=m +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y + +# +# SCSI Transports +# +CONFIG_SCSI_SPI_ATTRS=y +# CONFIG_SCSI_FC_ATTRS is not set +CONFIG_SCSI_ISCSI_ATTRS=m +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +# end of SCSI Transports + +CONFIG_SCSI_LOWLEVEL=y +CONFIG_ISCSI_TCP=m +# CONFIG_ISCSI_BOOT_SYSFS is not set +# CONFIG_SCSI_CXGB3_ISCSI is not set +# CONFIG_SCSI_CXGB4_ISCSI is not set +# CONFIG_SCSI_BNX2_ISCSI is not set +# CONFIG_BE2ISCSI is not set +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_HPSA is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_3W_SAS is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_AIC94XX is not set +# CONFIG_SCSI_HISI_SAS is not set +# CONFIG_SCSI_MVSAS is not set +# CONFIG_SCSI_MVUMI is not set +# CONFIG_SCSI_ADVANSYS is not set +# CONFIG_SCSI_ARCMSR is not set +# CONFIG_SCSI_ESAS2R is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_SAS is not set +# CONFIG_SCSI_MPT3SAS is not set +# CONFIG_SCSI_MPT2SAS is not set +# CONFIG_SCSI_MPI3MR is not set +# CONFIG_SCSI_SMARTPQI is not set +# CONFIG_SCSI_HPTIOP is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_MYRB is not set +# CONFIG_SCSI_MYRS is not set +# CONFIG_SCSI_SNIC is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_FDOMAIN_PCI is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_STEX is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_QLA_ISCSI is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_AM53C974 is not set +# CONFIG_SCSI_WD719X is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI_PMCRAID is not set +# CONFIG_SCSI_PM8001 is not set +# CONFIG_SCSI_VIRTIO is not set +# CONFIG_SCSI_DH is not set +# end of SCSI device support + +CONFIG_ATA=y +CONFIG_SATA_HOST=y +CONFIG_ATA_VERBOSE_ERROR=y +CONFIG_ATA_FORCE=y +CONFIG_SATA_PMP=y + +# +# Controllers with non-SFF native interface +# +CONFIG_SATA_AHCI=y +CONFIG_SATA_MOBILE_LPM_POLICY=0 +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_AHCI_DWC=m +# CONFIG_AHCI_CEVA is not set +# CONFIG_AHCI_QORIQ is not set +# CONFIG_SATA_INIC162X is not set +# CONFIG_SATA_ACARD_AHCI is not set +# CONFIG_SATA_SIL24 is not set +# CONFIG_ATA_SFF is not set +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +CONFIG_MD_RAID10=m +CONFIG_MD_RAID456=m +CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m +CONFIG_BCACHE=m +# CONFIG_BCACHE_DEBUG is not set +# CONFIG_BCACHE_CLOSURES_DEBUG is not set +# CONFIG_BCACHE_ASYNC_REGISTRATION is not set +CONFIG_BLK_DEV_DM_BUILTIN=y +CONFIG_BLK_DEV_DM=m +# CONFIG_DM_DEBUG is not set +CONFIG_DM_BUFIO=m +# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set +CONFIG_DM_BIO_PRISON=m +CONFIG_DM_PERSISTENT_DATA=m +# CONFIG_DM_UNSTRIPED is not set +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_CACHE_SMQ=m +# CONFIG_DM_WRITECACHE is not set +# CONFIG_DM_EBS is not set +CONFIG_DM_ERA=m +# CONFIG_DM_CLONE is not set +CONFIG_DM_MIRROR=m +CONFIG_DM_LOG_USERSPACE=m +CONFIG_DM_RAID=m +CONFIG_DM_ZERO=m +CONFIG_DM_MULTIPATH=m +CONFIG_DM_MULTIPATH_QL=m +CONFIG_DM_MULTIPATH_ST=m +# CONFIG_DM_MULTIPATH_HST is not set +# CONFIG_DM_MULTIPATH_IOA is not set +CONFIG_DM_DELAY=m +# CONFIG_DM_DUST is not set +# CONFIG_DM_UEVENT is not set +CONFIG_DM_FLAKEY=m +CONFIG_DM_VERITY=m +# CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG is not set +# CONFIG_DM_VERITY_FEC is not set +CONFIG_DM_SWITCH=m +CONFIG_DM_LOG_WRITES=m +# CONFIG_DM_INTEGRITY is not set +# CONFIG_DM_AUDIT is not set +CONFIG_TARGET_CORE=m +# CONFIG_TCM_IBLOCK is not set +# CONFIG_TCM_FILEIO is not set +# CONFIG_TCM_PSCSI is not set +# CONFIG_LOOPBACK_TARGET is not set +# CONFIG_ISCSI_TARGET is not set +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_FIREWIRE is not set +# CONFIG_FIREWIRE_NOSY is not set +# end of IEEE 1394 (FireWire) support + +CONFIG_NETDEVICES=y +CONFIG_MII=y +CONFIG_NET_CORE=y +CONFIG_BONDING=m +CONFIG_DUMMY=m +CONFIG_WIREGUARD=m +# CONFIG_WIREGUARD_DEBUG is not set +CONFIG_EQUALIZER=m +# CONFIG_NET_FC is not set +CONFIG_IFB=m +CONFIG_NET_TEAM=m +# CONFIG_NET_TEAM_MODE_BROADCAST is not set +# CONFIG_NET_TEAM_MODE_ROUNDROBIN is not set +# CONFIG_NET_TEAM_MODE_RANDOM is not set +# CONFIG_NET_TEAM_MODE_ACTIVEBACKUP is not set +# CONFIG_NET_TEAM_MODE_LOADBALANCE is not set +CONFIG_MACVLAN=m +CONFIG_MACVTAP=m +CONFIG_IPVLAN_L3S=y +CONFIG_IPVLAN=m +# CONFIG_IPVTAP is not set +CONFIG_VXLAN=m +CONFIG_GENEVE=m +# CONFIG_BAREUDP is not set +# CONFIG_GTP is not set +# CONFIG_AMT is not set +# CONFIG_MACSEC is not set +CONFIG_NETCONSOLE=m +# CONFIG_NETCONSOLE_DYNAMIC is not set +CONFIG_NETPOLL=y +CONFIG_NET_POLL_CONTROLLER=y +CONFIG_TUN=m +CONFIG_TAP=m +# CONFIG_TUN_VNET_CROSS_LE is not set +CONFIG_VETH=m +CONFIG_VIRTIO_NET=m +CONFIG_NLMON=m +CONFIG_NET_VRF=m +# CONFIG_VSOCKMON is not set +# CONFIG_MHI_NET is not set +CONFIG_ARCNET=m +# CONFIG_ARCNET_1201 is not set +# CONFIG_ARCNET_1051 is not set +# CONFIG_ARCNET_RAW is not set +# CONFIG_ARCNET_CAP is not set +# CONFIG_ARCNET_COM90xx is not set +# CONFIG_ARCNET_COM90xxIO is not set +# CONFIG_ARCNET_RIM_I is not set +# CONFIG_ARCNET_COM20020 is not set +CONFIG_ATM_DRIVERS=y +# CONFIG_ATM_DUMMY is not set +# CONFIG_ATM_TCP is not set +# CONFIG_ATM_LANAI is not set +# CONFIG_ATM_ENI is not set +# CONFIG_ATM_NICSTAR is not set +# CONFIG_ATM_IDT77252 is not set +# CONFIG_ATM_IA is not set +# CONFIG_ATM_FORE200E is not set +# CONFIG_ATM_HE is not set +# CONFIG_ATM_SOLOS is not set +CONFIG_CAIF_DRIVERS=y +# CONFIG_CAIF_TTY is not set +CONFIG_CAIF_VIRTIO=m +CONFIG_ETHERNET=y +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_NET_VENDOR_ADAPTEC is not set +# CONFIG_NET_VENDOR_AGERE is not set +CONFIG_NET_VENDOR_ALACRITECH=y +# CONFIG_SLICOSS is not set +# CONFIG_NET_VENDOR_ALTEON is not set +# CONFIG_ALTERA_TSE is not set +CONFIG_NET_VENDOR_AMAZON=y +# CONFIG_ENA_ETHERNET is not set +# CONFIG_NET_VENDOR_AMD is not set +CONFIG_NET_VENDOR_AQUANTIA=y +# CONFIG_AQTION is not set +# CONFIG_NET_VENDOR_ARC is not set +CONFIG_NET_VENDOR_ASIX=y +# CONFIG_SPI_AX88796C is not set +# CONFIG_NET_VENDOR_ATHEROS is not set +CONFIG_NET_VENDOR_MOTORCOMM=y +# CONFIG_FUXI is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +CONFIG_NET_VENDOR_CADENCE=y +# CONFIG_MACB is not set +# CONFIG_NET_VENDOR_CAVIUM is not set +# CONFIG_NET_VENDOR_CHELSIO is not set +# CONFIG_NET_VENDOR_CISCO is not set +CONFIG_NET_VENDOR_CORTINA=y +# CONFIG_GEMINI_ETHERNET is not set +CONFIG_NET_VENDOR_DAVICOM=y +# CONFIG_DM9051 is not set +# CONFIG_DNET is not set +# CONFIG_NET_VENDOR_DEC is not set +# CONFIG_NET_VENDOR_DLINK is not set +# CONFIG_NET_VENDOR_EMULEX is not set +CONFIG_NET_VENDOR_ENGLEDER=y +# CONFIG_TSNEP is not set +# CONFIG_NET_VENDOR_EZCHIP is not set +CONFIG_NET_VENDOR_FUNGIBLE=y +# CONFIG_FUN_ETH is not set +CONFIG_NET_VENDOR_GOOGLE=y +# CONFIG_GVE is not set +# CONFIG_NET_VENDOR_HISILICON is not set +CONFIG_NET_VENDOR_HUAWEI=y +# CONFIG_HINIC is not set +# CONFIG_NET_VENDOR_INTEL is not set +CONFIG_NET_VENDOR_WANGXUN=y +# CONFIG_NGBE is not set +# CONFIG_TXGBE is not set +# CONFIG_JME is not set +CONFIG_NET_VENDOR_ADI=y +# CONFIG_ADIN1110 is not set +CONFIG_NET_VENDOR_LITEX=y +# CONFIG_LITEX_LITEETH is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MELLANOX is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +CONFIG_NET_VENDOR_MICROSEMI=y +# CONFIG_MSCC_OCELOT_SWITCH is not set +CONFIG_NET_VENDOR_MICROSOFT=y +# CONFIG_NET_VENDOR_MYRI is not set +# CONFIG_FEALNX is not set +CONFIG_NET_VENDOR_NI=y +# CONFIG_NI_XGE_MANAGEMENT_ENET is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +CONFIG_NET_VENDOR_NETERION=y +# CONFIG_S2IO is not set +CONFIG_NET_VENDOR_NETRONOME=y +# CONFIG_NFP is not set +# CONFIG_NET_VENDOR_NVIDIA is not set +# CONFIG_NET_VENDOR_OKI is not set +# CONFIG_ETHOC is not set +CONFIG_NET_VENDOR_PACKET_ENGINES=y +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +CONFIG_NET_VENDOR_PENSANDO=y +CONFIG_IONIC=y +# CONFIG_NET_VENDOR_QLOGIC is not set +# CONFIG_NET_VENDOR_BROCADE is not set +# CONFIG_NET_VENDOR_QUALCOMM is not set +# CONFIG_NET_VENDOR_RDC is not set +CONFIG_NET_VENDOR_REALTEK=y +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +CONFIG_R8169=m +CONFIG_R8169_LEDS=y +# CONFIG_NET_VENDOR_RENESAS is not set +# CONFIG_NET_VENDOR_ROCKER is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SILAN is not set +# CONFIG_NET_VENDOR_SIS is not set +CONFIG_NET_VENDOR_SOLARFLARE=y +# CONFIG_SFC is not set +# CONFIG_SFC_FALCON is not set +# CONFIG_SFC_SIENA is not set +# CONFIG_NET_VENDOR_SMSC is not set +CONFIG_NET_VENDOR_SOCIONEXT=y +CONFIG_NET_VENDOR_STMICRO=y +CONFIG_STMMAC_ETH=y +# CONFIG_STMMAC_SELFTESTS is not set +# CONFIG_STMMAC_UIO is not set +CONFIG_STMMAC_ETHTOOL=y +CONFIG_STMMAC_FULL=y +CONFIG_STMMAC_PLATFORM=y +# CONFIG_DWMAC_DWC_QOS_ETH is not set +CONFIG_DWMAC_GENERIC=y +CONFIG_DWMAC_ROCKCHIP=y +CONFIG_DWMAC_ROCKCHIP_TOOL=y +# CONFIG_DWMAC_INTEL_PLAT is not set +# CONFIG_STMMAC_PCI is not set +# CONFIG_NET_VENDOR_SUN is not set +# CONFIG_NET_VENDOR_SYNOPSYS is not set +# CONFIG_NET_VENDOR_TEHUTI is not set +# CONFIG_NET_VENDOR_TI is not set +CONFIG_NET_VENDOR_VERTEXCOM=y +# CONFIG_MSE102X is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_NET_VENDOR_XILINX=y +# CONFIG_XILINX_EMACLITE is not set +# CONFIG_XILINX_AXI_EMAC is not set +# CONFIG_XILINX_LL_TEMAC is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +CONFIG_PHYLINK=y +CONFIG_PHYLIB=y +CONFIG_SWPHY=y +# CONFIG_LED_TRIGGER_PHY is not set +CONFIG_FIXED_PHY=y +# CONFIG_SFP is not set + +# +# MII PHY device drivers +# +# CONFIG_AMD_PHY is not set +# CONFIG_ADIN_PHY is not set +# CONFIG_ADIN1100_PHY is not set +# CONFIG_AQUANTIA_PHY is not set +CONFIG_AX88796B_PHY=y +CONFIG_BROADCOM_PHY=m +# CONFIG_BCM54140_PHY is not set +# CONFIG_BCM7XXX_PHY is not set +# CONFIG_BCM84881_PHY is not set +# CONFIG_BCM87XX_PHY is not set +CONFIG_BCM_NET_PHYLIB=m +# CONFIG_CICADA_PHY is not set +# CONFIG_CORTINA_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_INTEL_XWAY_PHY is not set +# CONFIG_LSI_ET1011C_PHY is not set +# CONFIG_MARVELL_PHY is not set +# CONFIG_MARVELL_10G_PHY is not set +# CONFIG_MARVELL_88X2222_PHY is not set +# CONFIG_MAXLINEAR_GPHY is not set +# CONFIG_MEDIATEK_GE_PHY is not set +# CONFIG_MICREL_PHY is not set +CONFIG_MICROCHIP_PHY=m +# CONFIG_MICROCHIP_T1_PHY is not set +# CONFIG_MICROSEMI_PHY is not set +CONFIG_MOTORCOMM_PHY=y +# CONFIG_NATIONAL_PHY is not set +# CONFIG_NXP_C45_TJA11XX_PHY is not set +# CONFIG_NXP_TJA11XX_PHY is not set +# CONFIG_AT803X_PHY is not set +# CONFIG_QSEMI_PHY is not set +CONFIG_REALTEK_PHY=y +# CONFIG_RENESAS_PHY is not set +CONFIG_ROCKCHIP_PHY=y +# CONFIG_RK630_PHY is not set +CONFIG_SMSC_PHY=m +# CONFIG_STE10XP is not set +# CONFIG_TERANETICS_PHY is not set +# CONFIG_DP83822_PHY is not set +# CONFIG_DP83TC811_PHY is not set +# CONFIG_DP83848_PHY is not set +# CONFIG_DP83867_PHY is not set +# CONFIG_DP83869_PHY is not set +# CONFIG_DP83TD510_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_XILINX_GMII2RGMII is not set +# CONFIG_MICREL_KS8995MA is not set +# CONFIG_PSE_CONTROLLER is not set +CONFIG_CAN_DEV=m +CONFIG_CAN_VCAN=m +# CONFIG_CAN_VXCAN is not set +CONFIG_CAN_NETLINK=y +CONFIG_CAN_CALC_BITTIMING=y +CONFIG_CAN_RX_OFFLOAD=y +# CONFIG_CAN_CAN327 is not set +# CONFIG_CAN_FLEXCAN is not set +CONFIG_CAN_GRCAN=m +# CONFIG_CAN_KVASER_PCIEFD is not set +CONFIG_CAN_SLCAN=m +CONFIG_CAN_XILINXCAN=m +CONFIG_CAN_C_CAN=m +CONFIG_CAN_C_CAN_PLATFORM=m +CONFIG_CAN_C_CAN_PCI=m +CONFIG_CAN_CC770=m +CONFIG_CAN_CC770_ISA=m +CONFIG_CAN_CC770_PLATFORM=m +# CONFIG_CAN_CTUCANFD_PCI is not set +# CONFIG_CAN_CTUCANFD_PLATFORM is not set +# CONFIG_CAN_IFI_CANFD is not set +CONFIG_CAN_M_CAN=m +# CONFIG_CAN_M_CAN_PCI is not set +# CONFIG_CAN_M_CAN_PLATFORM is not set +# CONFIG_CAN_M_CAN_TCAN4X5X is not set +# CONFIG_CAN_PEAK_PCIEFD is not set +# CONFIG_CAN_ROCKCHIP is not set +# CONFIG_CANFD_ROCKCHIP is not set +# CONFIG_CANFD_RK3576 is not set +CONFIG_CAN_SJA1000=m +CONFIG_CAN_EMS_PCI=m +# CONFIG_CAN_F81601 is not set +CONFIG_CAN_KVASER_PCI=m +CONFIG_CAN_PEAK_PCI=m +CONFIG_CAN_PEAK_PCIEC=y +CONFIG_CAN_PLX_PCI=m +CONFIG_CAN_SJA1000_ISA=m +CONFIG_CAN_SJA1000_PLATFORM=m +CONFIG_CAN_SOFTING=m + +# +# CAN SPI interfaces +# +CONFIG_CAN_HI311X=m +CONFIG_CAN_MCP251X=m +CONFIG_CAN_MCP251XFD=m +# CONFIG_CAN_MCP251XFD_SANITY is not set +# end of CAN SPI interfaces + +# +# CAN USB interfaces +# +CONFIG_CAN_8DEV_USB=m +CONFIG_CAN_EMS_USB=m +# CONFIG_CAN_ESD_USB is not set +# CONFIG_CAN_ETAS_ES58X is not set +CONFIG_CAN_GS_USB=m +CONFIG_CAN_KVASER_USB=m +# CONFIG_CAN_MCBA_USB is not set +CONFIG_CAN_PEAK_USB=m +# CONFIG_CAN_UCAN is not set +# end of CAN USB interfaces + +CONFIG_CAN_DEBUG_DEVICES=y +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_BUS=y +CONFIG_FWNODE_MDIO=y +CONFIG_OF_MDIO=y +CONFIG_MDIO_DEVRES=y +# CONFIG_MDIO_BITBANG is not set +# CONFIG_MDIO_BCM_UNIMAC is not set +# CONFIG_MDIO_HISI_FEMAC is not set +# CONFIG_MDIO_MVUSB is not set +# CONFIG_MDIO_MSCC_MIIM is not set +# CONFIG_MDIO_OCTEON is not set +# CONFIG_MDIO_IPQ4019 is not set +# CONFIG_MDIO_IPQ8064 is not set +# CONFIG_MDIO_THUNDER is not set + +# +# MDIO Multiplexers +# +# CONFIG_MDIO_BUS_MUX_GPIO is not set +# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set +# CONFIG_MDIO_BUS_MUX_MMIOREG is not set + +# +# PCS device drivers +# +CONFIG_PCS_XPCS=y +# end of PCS device drivers + +CONFIG_PPP=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_MPPE=m +# CONFIG_PPP_MULTILINK is not set +CONFIG_PPPOATM=m +CONFIG_PPPOE=m +# CONFIG_PPTP is not set +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +# CONFIG_SLIP is not set +CONFIG_SLHC=m +CONFIG_USB_NET_DRIVERS=y +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_RTL8152=m +CONFIG_USB_LAN78XX=m +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=y +CONFIG_USB_NET_AX88179_178A=m +CONFIG_USB_NET_CDCETHER=y +CONFIG_USB_NET_CDC_EEM=m +CONFIG_USB_NET_CDC_NCM=y +CONFIG_USB_NET_HUAWEI_CDC_NCM=m +CONFIG_USB_NET_CDC_MBIM=m +CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_SR9700=m +CONFIG_USB_NET_SR9800=m +CONFIG_USB_NET_SMSC75XX=m +CONFIG_USB_NET_SMSC95XX=m +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +# CONFIG_USB_NET_MCS7830 is not set +CONFIG_USB_NET_RNDIS_HOST=y +CONFIG_USB_NET_CDC_SUBSET_ENABLE=m +CONFIG_USB_NET_CDC_SUBSET=m +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +CONFIG_USB_BELKIN=y +# CONFIG_USB_ARMLINUX is not set +# CONFIG_USB_EPSON2888 is not set +CONFIG_USB_KC2190=y +CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_NET_CX82310_ETH=m +CONFIG_USB_NET_KALMIA=m +CONFIG_USB_NET_QMI_WWAN=m +CONFIG_USB_HSO=m +CONFIG_USB_NET_INT51X1=m +# CONFIG_USB_CDC_PHONET is not set +CONFIG_USB_IPHETH=m +CONFIG_USB_SIERRA_NET=m +CONFIG_USB_VL600=m +CONFIG_USB_NET_CH9200=m +# CONFIG_USB_NET_AQC111 is not set +CONFIG_USB_RTL8153_ECM=m +CONFIG_WLAN=y +CONFIG_WLAN_VENDOR_ADMTEK=y +# CONFIG_ADM8211 is not set +CONFIG_AIC_WLAN_SUPPORT=y +CONFIG_AIC_FW_PATH="/lib/firmware/aic8800/SDIO/aic8800D80/" +CONFIG_AIC8800_WLAN_SUPPORT=m +CONFIG_AIC8800_BTLPM_SUPPORT=m +CONFIG_ATH_COMMON=m +CONFIG_WLAN_VENDOR_ATH=y +# CONFIG_ATH_DEBUG is not set +CONFIG_ATH5K=m +# CONFIG_ATH5K_DEBUG is not set +# CONFIG_ATH5K_TRACER is not set +CONFIG_ATH5K_PCI=y +CONFIG_ATH9K_HW=m +CONFIG_ATH9K_COMMON=m +CONFIG_ATH9K_BTCOEX_SUPPORT=y +CONFIG_ATH9K=m +CONFIG_ATH9K_PCI=y +# CONFIG_ATH9K_AHB is not set +# CONFIG_ATH9K_DEBUGFS is not set +# CONFIG_ATH9K_DYNACK is not set +# CONFIG_ATH9K_WOW is not set +CONFIG_ATH9K_RFKILL=y +# CONFIG_ATH9K_CHANNEL_CONTEXT is not set +CONFIG_ATH9K_PCOEM=y +# CONFIG_ATH9K_PCI_NO_EEPROM is not set +# CONFIG_ATH9K_HTC is not set +# CONFIG_ATH9K_HWRNG is not set +CONFIG_CARL9170=m +CONFIG_CARL9170_LEDS=y +# CONFIG_CARL9170_DEBUGFS is not set +CONFIG_CARL9170_WPC=y +# CONFIG_CARL9170_HWRNG is not set +CONFIG_ATH6KL=m +# CONFIG_ATH6KL_SDIO is not set +CONFIG_ATH6KL_USB=m +# CONFIG_ATH6KL_DEBUG is not set +# CONFIG_ATH6KL_TRACING is not set +CONFIG_AR5523=m +CONFIG_WIL6210=m +CONFIG_WIL6210_ISR_COR=y +# CONFIG_WIL6210_TRACING is not set +CONFIG_WIL6210_DEBUGFS=y +CONFIG_ATH10K=m +CONFIG_ATH10K_CE=y +CONFIG_ATH10K_PCI=m +CONFIG_ATH10K_AHB=y +CONFIG_ATH10K_SDIO=m +CONFIG_ATH10K_USB=m +# CONFIG_ATH10K_DEBUG is not set +# CONFIG_ATH10K_DEBUGFS is not set +# CONFIG_ATH10K_TRACING is not set +CONFIG_WCN36XX=m +# CONFIG_WCN36XX_DEBUGFS is not set +CONFIG_ATH11K=m +CONFIG_ATH11K_PCI=m +# CONFIG_ATH11K_DEBUG is not set +# CONFIG_ATH11K_DEBUGFS is not set +# CONFIG_ATH11K_TRACING is not set +CONFIG_WLAN_VENDOR_ATMEL=y +# CONFIG_ATMEL is not set +CONFIG_AT76C50X_USB=m +CONFIG_WLAN_VENDOR_BROADCOM=y +CONFIG_B43=m +CONFIG_B43_BCMA=y +CONFIG_B43_SSB=y +CONFIG_B43_BUSES_BCMA_AND_SSB=y +# CONFIG_B43_BUSES_BCMA is not set +# CONFIG_B43_BUSES_SSB is not set +CONFIG_B43_PCI_AUTOSELECT=y +CONFIG_B43_PCICORE_AUTOSELECT=y +# CONFIG_B43_SDIO is not set +CONFIG_B43_BCMA_PIO=y +CONFIG_B43_PIO=y +CONFIG_B43_PHY_G=y +CONFIG_B43_PHY_N=y +CONFIG_B43_PHY_LP=y +CONFIG_B43_PHY_HT=y +CONFIG_B43_LEDS=y +CONFIG_B43_HWRNG=y +# CONFIG_B43_DEBUG is not set +CONFIG_B43LEGACY=m +CONFIG_B43LEGACY_PCI_AUTOSELECT=y +CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y +CONFIG_B43LEGACY_LEDS=y +CONFIG_B43LEGACY_HWRNG=y +# CONFIG_B43LEGACY_DEBUG is not set +CONFIG_B43LEGACY_DMA=y +CONFIG_B43LEGACY_PIO=y +CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y +# CONFIG_B43LEGACY_DMA_MODE is not set +# CONFIG_B43LEGACY_PIO_MODE is not set +CONFIG_BRCMUTIL=m +CONFIG_BRCMSMAC=m +CONFIG_BRCMFMAC=m +CONFIG_BRCMFMAC_PROTO_BCDC=y +CONFIG_BRCMFMAC_PROTO_MSGBUF=y +CONFIG_BRCMFMAC_SDIO=y +CONFIG_BRCMFMAC_USB=y +CONFIG_BRCMFMAC_PCIE=y +# CONFIG_BRCM_TRACING is not set +# CONFIG_BRCMDBG is not set +CONFIG_WLAN_VENDOR_CISCO=y +CONFIG_WLAN_VENDOR_INTEL=y +CONFIG_IPW2100=m +# CONFIG_IPW2100_MONITOR is not set +# CONFIG_IPW2100_DEBUG is not set +CONFIG_IPW2200=m +# CONFIG_IPW2200_MONITOR is not set +# CONFIG_IPW2200_QOS is not set +# CONFIG_IPW2200_DEBUG is not set +CONFIG_LIBIPW=m +# CONFIG_LIBIPW_DEBUG is not set +CONFIG_IWLEGACY=m +CONFIG_IWL4965=m +CONFIG_IWL3945=m + +# +# iwl3945 / iwl4965 Debugging Options +# +# CONFIG_IWLEGACY_DEBUG is not set +# CONFIG_IWLEGACY_DEBUGFS is not set +# end of iwl3945 / iwl4965 Debugging Options + +CONFIG_IWLWIFI=m +CONFIG_IWLWIFI_LEDS=y +CONFIG_IWLDVM=m +CONFIG_IWLMVM=m +CONFIG_IWLWIFI_OPMODE_MODULAR=y + +# +# Debugging Options +# +# CONFIG_IWLWIFI_DEBUG is not set +# CONFIG_IWLWIFI_DEBUGFS is not set +CONFIG_IWLWIFI_DEVICE_TRACING=y +# end of Debugging Options + +CONFIG_WLAN_VENDOR_INTERSIL=y +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +# CONFIG_HOSTAP_PLX is not set +# CONFIG_HOSTAP_PCI is not set +# CONFIG_HERMES is not set +# CONFIG_P54_COMMON is not set +CONFIG_WLAN_VENDOR_MARVELL=y +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_USB=m +CONFIG_LIBERTAS_SDIO=m +CONFIG_LIBERTAS_SPI=m +# CONFIG_LIBERTAS_DEBUG is not set +# CONFIG_LIBERTAS_MESH is not set +CONFIG_LIBERTAS_THINFIRM=y +# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set +# CONFIG_LIBERTAS_THINFIRM_USB is not set +CONFIG_MWIFIEX=m +CONFIG_MWIFIEX_SDIO=m +# CONFIG_MWIFIEX_PCIE is not set +CONFIG_MWIFIEX_USB=m +# CONFIG_MWL8K is not set +CONFIG_WLAN_VENDOR_MEDIATEK=y +CONFIG_MT7601U=m +CONFIG_MT76_CORE=m +CONFIG_MT76_LEDS=y +CONFIG_MT76_USB=m +CONFIG_MT76_SDIO=m +CONFIG_MT76x02_LIB=m +CONFIG_MT76x02_USB=m +CONFIG_MT76_CONNAC_LIB=m +CONFIG_MT76x0_COMMON=m +CONFIG_MT76x0U=m +CONFIG_MT76x0E=m +CONFIG_MT76x2_COMMON=m +CONFIG_MT76x2E=m +CONFIG_MT76x2U=m +CONFIG_MT7603E=m +CONFIG_MT7615_COMMON=m +CONFIG_MT7615E=m +CONFIG_MT7663_USB_SDIO_COMMON=m +CONFIG_MT7663U=m +CONFIG_MT7663S=m +CONFIG_MT7915E=m +CONFIG_MT7921_COMMON=m +CONFIG_MT7921E=m +CONFIG_MT7921S=m +CONFIG_MT7921U=m +CONFIG_WLAN_VENDOR_MICROCHIP=y +CONFIG_WILC1000=m +CONFIG_WILC1000_SDIO=m +CONFIG_WILC1000_SPI=m +# CONFIG_WILC1000_HW_OOB_INTR is not set +CONFIG_WLAN_VENDOR_PURELIFI=y +# CONFIG_PLFXLC is not set +CONFIG_WLAN_VENDOR_RALINK=y +CONFIG_RT2X00=m +# CONFIG_RT2400PCI is not set +# CONFIG_RT2500PCI is not set +# CONFIG_RT61PCI is not set +CONFIG_RT2800PCI=m +CONFIG_RT2800PCI_RT33XX=y +CONFIG_RT2800PCI_RT35XX=y +CONFIG_RT2800PCI_RT53XX=y +CONFIG_RT2800PCI_RT3290=y +CONFIG_RT2500USB=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RT2800USB_RT33XX=y +CONFIG_RT2800USB_RT35XX=y +CONFIG_RT2800USB_RT3573=y +CONFIG_RT2800USB_RT53XX=y +CONFIG_RT2800USB_RT55XX=y +CONFIG_RT2800USB_UNKNOWN=y +CONFIG_RT2800_LIB=m +CONFIG_RT2800_LIB_MMIO=m +CONFIG_RT2X00_LIB_MMIO=m +CONFIG_RT2X00_LIB_PCI=m +CONFIG_RT2X00_LIB_USB=m +CONFIG_RT2X00_LIB=m +CONFIG_RT2X00_LIB_FIRMWARE=y +CONFIG_RT2X00_LIB_CRYPTO=y +CONFIG_RT2X00_LIB_LEDS=y +# CONFIG_RT2X00_LIB_DEBUGFS is not set +# CONFIG_RT2X00_DEBUG is not set +CONFIG_WLAN_VENDOR_REALTEK=y +CONFIG_RTL8180=y +CONFIG_RTL8187=m +CONFIG_RTL8187_LEDS=y +CONFIG_RTL_CARDS=m +# CONFIG_RTL8192CE is not set +# CONFIG_RTL8192SE is not set +# CONFIG_RTL8192DE is not set +# CONFIG_RTL8723AE is not set +CONFIG_RTL8723BE=m +# CONFIG_RTL8188EE is not set +CONFIG_RTL8192EE=m +# CONFIG_RTL8821AE is not set +CONFIG_RTL8192CU=m +CONFIG_RTLWIFI=m +CONFIG_RTLWIFI_PCI=m +CONFIG_RTLWIFI_USB=m +CONFIG_RTLWIFI_DEBUG=y +CONFIG_RTL8192C_COMMON=m +CONFIG_RTL8723_COMMON=m +CONFIG_RTLBTCOEXIST=m +CONFIG_RTL8XXXU=m +# CONFIG_RTL8XXXU_UNTESTED is not set +CONFIG_RTW88=m +CONFIG_RTW88_CORE=m +CONFIG_RTW88_PCI=m +CONFIG_RTW88_8822B=m +CONFIG_RTW88_8822C=m +CONFIG_RTW88_8723D=m +CONFIG_RTW88_8821C=m +CONFIG_RTW88_8822BE=m +# CONFIG_RTW88_8822BS is not set +# CONFIG_RTW88_8822BU is not set +CONFIG_RTW88_8822CE=m +# CONFIG_RTW88_8822CS is not set +# CONFIG_RTW88_8822CU is not set +CONFIG_RTW88_8723DE=m +# CONFIG_RTW88_8723DS is not set +# CONFIG_RTW88_8723DU is not set +CONFIG_RTW88_8821CE=m +# CONFIG_RTW88_8821CS is not set +# CONFIG_RTW88_8821CU is not set +# CONFIG_RTW88_DEBUG is not set +# CONFIG_RTW88_DEBUGFS is not set +CONFIG_RTW89=m +CONFIG_RTW89_CORE=m +CONFIG_RTW89_PCI=m +CONFIG_RTW89_8852A=m +CONFIG_RTW89_8852B=m +CONFIG_RTW89_8852C=m +# CONFIG_RTW89_8851BE is not set +CONFIG_RTW89_8852AE=m +CONFIG_RTW89_8852BE=m +CONFIG_RTW89_8852CE=m +# CONFIG_RTW89_DEBUGMSG is not set +# CONFIG_RTW89_DEBUGFS is not set +CONFIG_WL_ROCKCHIP=y +CONFIG_WIFI_BUILD_MODULE=y +# CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP is not set +# CONFIG_WIFI_GENERATE_RANDOM_MAC_ADDR is not set +CONFIG_BCMDHD=y +CONFIG_AP6XXX=m +# CONFIG_BCMDHD_SDIO is not set +CONFIG_BCMDHD_PCIE=y +CONFIG_BCMDHD_FW_PATH="/lib/firmware/ap6275p/fw_bcmdhd.bin" +CONFIG_BCMDHD_NVRAM_PATH="/lib/firmware/ap6275p/nvram.txt" +# CONFIG_BCMDHD_STATIC_IF is not set +CONFIG_WLAN_VENDOR_RSI=y +# CONFIG_RSI_91X is not set +CONFIG_WLAN_VENDOR_SILABS=y +# CONFIG_WFX is not set +CONFIG_WLAN_VENDOR_ST=y +# CONFIG_CW1200 is not set +CONFIG_WLAN_VENDOR_TI=y +# CONFIG_WL1251 is not set +# CONFIG_WL12XX is not set +# CONFIG_WL18XX is not set +# CONFIG_WLCORE is not set +CONFIG_WLAN_VENDOR_ZYDAS=y +CONFIG_USB_ZD1201=m +# CONFIG_ZD1211RW is not set +CONFIG_WLAN_VENDOR_QUANTENNA=y +# CONFIG_QTNFMAC_PCIE is not set +# CONFIG_RTL8723DS is not set +# CONFIG_RTL8822BU is not set +# CONFIG_RTL8821CU is not set +# CONFIG_88XXAU is not set +# CONFIG_RTL8192EU is not set +# CONFIG_RTL8189FS is not set +# CONFIG_RTL8189ES is not set +# CONFIG_RTL8852BS is not set +# CONFIG_SPARD_WLAN_SUPPORT is not set +# CONFIG_MAC80211_HWSIM is not set +CONFIG_USB_NET_RNDIS_WLAN=y +# CONFIG_VIRT_WIFI is not set +# CONFIG_WAN is not set +# CONFIG_IEEE802154_DRIVERS is not set + +# +# Wireless WAN +# +CONFIG_WWAN=y +# end of Wireless WAN + +# CONFIG_VMXNET3 is not set +CONFIG_LTE=y +# CONFIG_NETDEVSIM is not set +CONFIG_NET_FAILOVER=m +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_LEDS=m +CONFIG_INPUT_FF_MEMLESS=m +CONFIG_INPUT_SPARSEKMAP=m +CONFIG_INPUT_MATRIXKMAP=m +CONFIG_INPUT_VIVALDIFMAP=m + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +CONFIG_INPUT_JOYDEV=m +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ADC=m +CONFIG_KEYBOARD_ADP5588=m +CONFIG_KEYBOARD_ADP5589=m +CONFIG_KEYBOARD_ATKBD=m +CONFIG_KEYBOARD_QT1050=m +CONFIG_KEYBOARD_QT1070=m +CONFIG_KEYBOARD_QT2160=m +CONFIG_KEYBOARD_DLINK_DIR685=m +CONFIG_KEYBOARD_LKKBD=m +CONFIG_KEYBOARD_GPIO=m +CONFIG_KEYBOARD_GPIO_POLLED=m +CONFIG_KEYBOARD_TCA6416=m +CONFIG_KEYBOARD_TCA8418=m +CONFIG_KEYBOARD_MATRIX=m +CONFIG_KEYBOARD_LM8323=m +CONFIG_KEYBOARD_LM8333=m +CONFIG_KEYBOARD_MAX7359=m +CONFIG_KEYBOARD_MCS=m +CONFIG_KEYBOARD_MPR121=m +CONFIG_KEYBOARD_NEWTON=m +CONFIG_KEYBOARD_OPENCORES=m +CONFIG_KEYBOARD_PINEPHONE=m +CONFIG_KEYBOARD_SAMSUNG=m +CONFIG_KEYBOARD_STOWAWAY=m +CONFIG_KEYBOARD_SUNKBD=m +CONFIG_KEYBOARD_OMAP4=m +CONFIG_KEYBOARD_TM2_TOUCHKEY=m +CONFIG_KEYBOARD_XTKBD=m +CONFIG_KEYBOARD_CAP11XX=m +CONFIG_KEYBOARD_BCM=m +CONFIG_KEYBOARD_CYPRESS_SF=m +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_BYD=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y +CONFIG_MOUSE_PS2_CYPRESS=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +CONFIG_MOUSE_PS2_ELANTECH=y +CONFIG_MOUSE_PS2_ELANTECH_SMBUS=y +CONFIG_MOUSE_PS2_SENTELIC=y +CONFIG_MOUSE_PS2_TOUCHKIT=y +CONFIG_MOUSE_PS2_FOCALTECH=y +CONFIG_MOUSE_PS2_SMBUS=y +CONFIG_MOUSE_SERIAL=m +CONFIG_MOUSE_APPLETOUCH=m +CONFIG_MOUSE_BCM5974=m +CONFIG_MOUSE_CYAPA=m +CONFIG_MOUSE_ELAN_I2C=m +CONFIG_MOUSE_ELAN_I2C_I2C=y +CONFIG_MOUSE_ELAN_I2C_SMBUS=y +CONFIG_MOUSE_VSXXXAA=m +CONFIG_MOUSE_GPIO=m +CONFIG_MOUSE_SYNAPTICS_I2C=m +CONFIG_MOUSE_SYNAPTICS_USB=m +CONFIG_INPUT_JOYSTICK=y +CONFIG_JOYSTICK_ANALOG=m +CONFIG_JOYSTICK_A3D=m +CONFIG_JOYSTICK_ADC=m +CONFIG_JOYSTICK_ADI=m +CONFIG_JOYSTICK_COBRA=m +CONFIG_JOYSTICK_GF2K=m +CONFIG_JOYSTICK_GRIP=m +CONFIG_JOYSTICK_GRIP_MP=m +CONFIG_JOYSTICK_GUILLEMOT=m +CONFIG_JOYSTICK_INTERACT=m +CONFIG_JOYSTICK_SIDEWINDER=m +CONFIG_JOYSTICK_TMDC=m +CONFIG_JOYSTICK_IFORCE=m +CONFIG_JOYSTICK_IFORCE_USB=m +CONFIG_JOYSTICK_IFORCE_232=m +CONFIG_JOYSTICK_WARRIOR=m +CONFIG_JOYSTICK_MAGELLAN=m +CONFIG_JOYSTICK_SPACEORB=m +CONFIG_JOYSTICK_SPACEBALL=m +CONFIG_JOYSTICK_STINGER=m +CONFIG_JOYSTICK_TWIDJOY=m +CONFIG_JOYSTICK_ZHENHUA=m +CONFIG_JOYSTICK_AS5011=m +CONFIG_JOYSTICK_JOYDUMP=m +CONFIG_JOYSTICK_XPAD=m +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +CONFIG_JOYSTICK_PSXPAD_SPI=m +CONFIG_JOYSTICK_PSXPAD_SPI_FF=y +CONFIG_JOYSTICK_PXRC=m +CONFIG_JOYSTICK_QWIIC=m +CONFIG_JOYSTICK_FSIA6B=m +CONFIG_JOYSTICK_SENSEHAT=m +CONFIG_INPUT_TABLET=y +CONFIG_TABLET_USB_ACECAD=m +CONFIG_TABLET_USB_AIPTEK=m +CONFIG_TABLET_USB_HANWANG=m +CONFIG_TABLET_USB_KBTAB=m +CONFIG_TABLET_USB_PEGASUS=m +CONFIG_TABLET_SERIAL_WACOM4=m +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=m +CONFIG_TOUCHSCREEN_AD7877=m +CONFIG_TOUCHSCREEN_AD7879=m +CONFIG_TOUCHSCREEN_AD7879_I2C=m +CONFIG_TOUCHSCREEN_AD7879_SPI=m +CONFIG_TOUCHSCREEN_ADC=m +CONFIG_TOUCHSCREEN_AR1021_I2C=m +CONFIG_TOUCHSCREEN_ATMEL_MXT=m +CONFIG_TOUCHSCREEN_ATMEL_MXT_T37=y +CONFIG_TOUCHSCREEN_AUO_PIXCIR=m +CONFIG_TOUCHSCREEN_BU21013=m +CONFIG_TOUCHSCREEN_BU21029=m +CONFIG_TOUCHSCREEN_CHIPONE_ICN8318=m +# CONFIG_TOUCHSCREEN_CHIPONE_9551R is not set +CONFIG_TOUCHSCREEN_CY8CTMA140=m +CONFIG_TOUCHSCREEN_CY8CTMG110=m +CONFIG_TOUCHSCREEN_CYTTSP_CORE=m +CONFIG_TOUCHSCREEN_CYTTSP_I2C=m +CONFIG_TOUCHSCREEN_CYTTSP_SPI=m +CONFIG_TOUCHSCREEN_CYTTSP4_CORE=m +CONFIG_TOUCHSCREEN_CYTTSP4_I2C=m +CONFIG_TOUCHSCREEN_CYTTSP4_SPI=m +CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5=m +# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICETREE_SUPPORT is not set +# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_I2C is not set +# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_SPI is not set +# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_MT_A is not set +CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_MT_B=y +# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_BUTTON is not set +# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_PROXIMITY is not set +# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICE_ACCESS is not set +# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_LOADER is not set +# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEBUG_MDL is not set +CONFIG_TOUCHSCREEN_DYNAPRO=m +CONFIG_TOUCHSCREEN_HAMPSHIRE=m +CONFIG_TOUCHSCREEN_EETI=m +CONFIG_TOUCHSCREEN_EGALAX=m +CONFIG_TOUCHSCREEN_EGALAX_SERIAL=m +CONFIG_TOUCHSCREEN_EXC3000=m +# CONFIG_TOUCHSCREEN_FTS is not set +# CONFIG_TOUCHSCREEN_FT5726 is not set +CONFIG_TOUCHSCREEN_FUJITSU=m +CONFIG_TOUCHSCREEN_GOODIX=m +CONFIG_TOUCHSCREEN_GSL3673=y +CONFIG_TOUCHSCREEN_GSL3673_800X1280=m +CONFIG_TOUCHSCREEN_GSLX680_PAD=m +CONFIG_TOUCHSCREEN_GT1X=y +CONFIG_TOUCHSCREEN_GT9XX=m +CONFIG_TOUCHSCREEN_HIDEEP=m +CONFIG_TOUCHSCREEN_HYCON_HY46XX=m +CONFIG_TOUCHSCREEN_ILI210X=m +CONFIG_TOUCHSCREEN_ILITEK=m +CONFIG_TOUCHSCREEN_S6SY761=m +CONFIG_TOUCHSCREEN_GUNZE=m +CONFIG_TOUCHSCREEN_EKTF2127=m +CONFIG_TOUCHSCREEN_ELAN=m +CONFIG_TOUCHSCREEN_ELAN5515=m +CONFIG_TOUCHSCREEN_ELO=m +CONFIG_TOUCHSCREEN_WACOM_W8001=m +CONFIG_TOUCHSCREEN_WACOM_W9013=m +CONFIG_TOUCHSCREEN_WACOM_I2C=m +CONFIG_TOUCHSCREEN_MAX11801=m +CONFIG_TOUCHSCREEN_MCS5000=m +CONFIG_TOUCHSCREEN_MMS114=m +CONFIG_TOUCHSCREEN_MELFAS_MIP4=m +CONFIG_TOUCHSCREEN_MSG2638=m +CONFIG_TOUCHSCREEN_MTOUCH=m +CONFIG_TOUCHSCREEN_IMAGIS=m +CONFIG_TOUCHSCREEN_IMX6UL_TSC=m +CONFIG_TOUCHSCREEN_INEXIO=m +CONFIG_TOUCHSCREEN_MK712=m +# CONFIG_TOUCHSCREEN_PARADE is not set +CONFIG_TOUCHSCREEN_PENMOUNT=m +CONFIG_TOUCHSCREEN_EDT_FT5X06=m +CONFIG_TOUCHSCREEN_TOUCHRIGHT=m +CONFIG_TOUCHSCREEN_TOUCHWIN=m +CONFIG_TOUCHSCREEN_PIXCIR=m +CONFIG_TOUCHSCREEN_WDT87XX_I2C=m +CONFIG_TOUCHSCREEN_USB_COMPOSITE=m +CONFIG_TOUCHSCREEN_USB_EGALAX=y +CONFIG_TOUCHSCREEN_USB_PANJIT=y +CONFIG_TOUCHSCREEN_USB_3M=y +CONFIG_TOUCHSCREEN_USB_ITM=y +CONFIG_TOUCHSCREEN_USB_ETURBO=y +CONFIG_TOUCHSCREEN_USB_GUNZE=y +CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y +CONFIG_TOUCHSCREEN_USB_IRTOUCH=y +CONFIG_TOUCHSCREEN_USB_IDEALTEK=y +CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y +CONFIG_TOUCHSCREEN_USB_GOTOP=y +CONFIG_TOUCHSCREEN_USB_JASTEC=y +CONFIG_TOUCHSCREEN_USB_ELO=y +CONFIG_TOUCHSCREEN_USB_E2I=y +CONFIG_TOUCHSCREEN_USB_ZYTRONIC=y +CONFIG_TOUCHSCREEN_USB_ETT_TC45USB=y +CONFIG_TOUCHSCREEN_USB_NEXIO=y +CONFIG_TOUCHSCREEN_USB_EASYTOUCH=y +CONFIG_TOUCHSCREEN_TOUCHIT213=m +CONFIG_TOUCHSCREEN_TSC_SERIO=m +CONFIG_TOUCHSCREEN_TSC200X_CORE=m +CONFIG_TOUCHSCREEN_TSC2004=m +CONFIG_TOUCHSCREEN_TSC2005=m +CONFIG_TOUCHSCREEN_TSC2007=m +CONFIG_TOUCHSCREEN_TSC2007_IIO=y +CONFIG_TOUCHSCREEN_RM_TS=m +CONFIG_TOUCHSCREEN_SILEAD=m +CONFIG_TOUCHSCREEN_SIS_I2C=m +CONFIG_TOUCHSCREEN_ST1232=m +CONFIG_TOUCHSCREEN_STMFTS=m +CONFIG_TOUCHSCREEN_SUR40=m +CONFIG_TOUCHSCREEN_SURFACE3_SPI=m +CONFIG_TOUCHSCREEN_SX8654=m +CONFIG_TOUCHSCREEN_TPS6507X=m +CONFIG_TOUCHSCREEN_ZET6223=m +CONFIG_TOUCHSCREEN_ZFORCE=m +CONFIG_TOUCHSCREEN_COLIBRI_VF50=m +CONFIG_TOUCHSCREEN_ROHM_BU21023=m +CONFIG_TOUCHSCREEN_IQS5XX=m +CONFIG_TOUCHSCREEN_ZINITIX=m +CONFIG_TOUCHSCREEN_HIMAX_CHIPSET=y +CONFIG_TOUCHSCREEN_HIMAX_COMMON=m +# CONFIG_TOUCHSCREEN_HIMAX_ONCELL is not set +CONFIG_TOUCHSCREEN_HIMAX_INCELL=y +# CONFIG_TOUCHSCREEN_HIMAX_IC_HX83192 is not set +# CONFIG_TOUCHSCREEN_HIMAX_IC_HX83191 is not set +# CONFIG_TOUCHSCREEN_HIMAX_IC_HX83113 is not set +# CONFIG_TOUCHSCREEN_HIMAX_IC_HX83112 is not set +# CONFIG_TOUCHSCREEN_HIMAX_IC_HX83111 is not set +# CONFIG_TOUCHSCREEN_HIMAX_IC_HX83106 is not set +# CONFIG_TOUCHSCREEN_HIMAX_IC_HX83108 is not set +# CONFIG_TOUCHSCREEN_HIMAX_IC_HX83103 is not set +# CONFIG_TOUCHSCREEN_HIMAX_IC_HX83102 is not set +CONFIG_TOUCHSCREEN_HIMAX_IC_HX83121=y +# CONFIG_TOUCHSCREEN_HIMAX_DEBUG is not set +CONFIG_TOUCHSCREEN_HIMAX_INSPECT=y +# CONFIG_TOUCHSCREEN_HIMAX_EMBEDDED_FIRMWARE is not set +# CONFIG_HMX_DB is not set +# CONFIG_HIMAX_SUPPORT_KERNEL_419 is not set +CONFIG_ROCKCHIP_REMOTECTL=y +CONFIG_ROCKCHIP_REMOTECTL_PWM=y + +# +# handle all sensors +# +CONFIG_SENSOR_DEVICE=m +CONFIG_ANGLE_DEVICE=m +CONFIG_ANGLE_KXTIK=m +CONFIG_ANGLE_LIS3DH=m +CONFIG_GSENSOR_DEVICE=m +CONFIG_GS_MMA8452=m +CONFIG_STK8BAXX_ACC=m +CONFIG_MPU6880_ACC=m +CONFIG_MPU6500_ACC=m +CONFIG_GS_KXTIK=m +CONFIG_GS_KXTJ9=m +CONFIG_GS_LIS3DH=m +CONFIG_GS_MMA7660=m +CONFIG_GS_MC3230=m +CONFIG_GS_SC7660=m +CONFIG_GS_SC7A20=m +CONFIG_GS_SC7A30=m +CONFIG_GS_MXC6225=m +CONFIG_GS_MXC6655XA=m +CONFIG_GS_DMT10=m +CONFIG_GS_LSM303D=m +CONFIG_GS_BMA023=m +CONFIG_LSM330_ACC=m +CONFIG_BMA2XX_ACC=m +CONFIG_GS_DA215S=m +CONFIG_GS_DA223=m +CONFIG_GS_DA228E=m +CONFIG_ICM2060X_ACC=m +# CONFIG_ICM4260X_ACC is not set +# CONFIG_IAM20680_ACC is not set +CONFIG_COMPASS_DEVICE=m +CONFIG_COMPASS_AK8975=m +CONFIG_COMPASS_AK8963=m +CONFIG_COMPASS_AK09911=m +CONFIG_COMPASS_AK09918=m +CONFIG_GYROSCOPE_DEVICE=m +CONFIG_GYRO_L3G4200D=m +CONFIG_GYRO_K3G=m +CONFIG_GYRO_L3G20D=m +CONFIG_GYRO_EWTSA=m +CONFIG_GYRO_MPU6500=m +CONFIG_GYRO_MPU6880=m +CONFIG_GYRO_LSM330=m +CONFIG_GYRO_ICM2060X=m +# CONFIG_GYRO_ICM4260X is not set +# CONFIG_GYRO_IAM20680 is not set +CONFIG_LIGHT_DEVICE=m +CONFIG_LS_CM3217=m +CONFIG_LS_CM3218=m +CONFIG_LS_CM3232=m +CONFIG_LS_AL3006=m +CONFIG_LS_STK3171=m +CONFIG_LS_ISL29023=m +CONFIG_LS_AP321XX=m +CONFIG_LS_UCS14620=m +CONFIG_LS_US5152=m +CONFIG_LS_STK3332=m +CONFIG_LS_STK3410=m +CONFIG_LS_EM3071X=m +CONFIG_PROXIMITY_DEVICE=m +CONFIG_PS_AL3006=m +CONFIG_PS_STK3171=m +CONFIG_PS_AP321XX=m +CONFIG_PS_STK3332=m +CONFIG_PS_STK3410=m +CONFIG_PS_EM3071X=m +CONFIG_PS_UCS14620=m +CONFIG_TEMPERATURE_DEVICE=m +CONFIG_TMP_MS5607=m +CONFIG_PRESSURE_DEVICE=m +CONFIG_PR_MS5607=m +CONFIG_HALL_DEVICE=m +CONFIG_HS_OCH165T=m +CONFIG_HS_MH248=m + +# +# Fingerprint support +# +# CONFIG_MICROARRAY_FINGERPRINT is not set +# end of Fingerprint support + +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +# CONFIG_INPUT_ATMEL_CAPTOUCH is not set +# CONFIG_INPUT_BMA150 is not set +# CONFIG_INPUT_E3X0_BUTTON is not set +# CONFIG_INPUT_MMA8450 is not set +# CONFIG_INPUT_GPIO_BEEPER is not set +# CONFIG_INPUT_GPIO_DECODER is not set +# CONFIG_INPUT_GPIO_VIBRA is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_KXTJ9 is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +# CONFIG_INPUT_REGULATOR_HAPTIC is not set +CONFIG_INPUT_UINPUT=y +# CONFIG_INPUT_PCF8574 is not set +# CONFIG_INPUT_PWM_BEEPER is not set +# CONFIG_INPUT_PWM_VIBRA is not set +CONFIG_INPUT_RK805_PWRKEY=m +# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set +# CONFIG_INPUT_DA7280_HAPTICS is not set +# CONFIG_INPUT_ADXL34X is not set +# CONFIG_INPUT_IBM_PANEL is not set +# CONFIG_INPUT_IMS_PCU is not set +# CONFIG_INPUT_IQS269A is not set +# CONFIG_INPUT_IQS626A is not set +# CONFIG_INPUT_IQS7222 is not set +# CONFIG_INPUT_CMA3000 is not set +# CONFIG_INPUT_DRV260X_HAPTICS is not set +# CONFIG_INPUT_DRV2665_HAPTICS is not set +# CONFIG_INPUT_DRV2667_HAPTICS is not set +# CONFIG_RMI4_CORE is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=m +CONFIG_SERIO_SERPORT=m +# CONFIG_SERIO_AMBAKMI is not set +# CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=m +CONFIG_SERIO_RAW=m +# CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_SERIO_PS2MULT is not set +# CONFIG_SERIO_ARC_PS2 is not set +# CONFIG_SERIO_APBPS2 is not set +# CONFIG_SERIO_GPIO_PS2 is not set +# CONFIG_USERIO is not set +CONFIG_GAMEPORT=m +# CONFIG_GAMEPORT_NS558 is not set +# CONFIG_GAMEPORT_L4 is not set +# CONFIG_GAMEPORT_EMU10K1 is not set +# CONFIG_GAMEPORT_FM801 is not set +# end of Hardware I/O ports +# end of Input device support + +# +# Character devices +# +CONFIG_TTY=y +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_VT_CONSOLE_SLEEP=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_UNIX98_PTYS=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_LDISC_AUTOLOAD=y + +# +# Serial drivers +# +CONFIG_SERIAL_EARLYCON=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y +CONFIG_SERIAL_8250_16550A_VARIANTS=y +# CONFIG_SERIAL_8250_FINTEK is not set +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_DMA=y +# CONFIG_SERIAL_8250_PCI is not set +CONFIG_SERIAL_8250_NR_UARTS=10 +CONFIG_SERIAL_8250_RUNTIME_UARTS=10 +# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_DWLIB=y +CONFIG_SERIAL_8250_FSL=y +CONFIG_SERIAL_8250_DW=y +# CONFIG_SERIAL_8250_RT288X is not set +CONFIG_SERIAL_8250_PERICOM=y +CONFIG_SERIAL_OF_PLATFORM=y + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_AMBA_PL010 is not set +# CONFIG_SERIAL_AMBA_PL011 is not set +# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set +# CONFIG_SERIAL_MAX3100 is not set +# CONFIG_SERIAL_MAX310X is not set +# CONFIG_SERIAL_UARTLITE is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_JSM is not set +# CONFIG_SERIAL_SIFIVE is not set +# CONFIG_SERIAL_SCCNXP is not set +# CONFIG_SERIAL_SC16IS7XX is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +# CONFIG_SERIAL_XILINX_PS_UART is not set +# CONFIG_SERIAL_ARC is not set +# CONFIG_SERIAL_RP2 is not set +# CONFIG_SERIAL_FSL_LPUART is not set +# CONFIG_SERIAL_FSL_LINFLEXUART is not set +# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set +# CONFIG_SERIAL_SPRD is not set +# end of Serial drivers + +CONFIG_SERIAL_MCTRL_GPIO=y +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set +# CONFIG_NOZOMI is not set +# CONFIG_NULL_TTY is not set +# CONFIG_HVC_DCC is not set +CONFIG_SERIAL_DEV_BUS=y +CONFIG_SERIAL_DEV_CTRL_TTYPORT=y +# CONFIG_TTY_PRINTK is not set +# CONFIG_VIRTIO_CONSOLE is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_IPMB_DEVICE_INTERFACE is not set +CONFIG_HW_RANDOM=y +# CONFIG_HW_RANDOM_TIMERIOMEM is not set +# CONFIG_HW_RANDOM_BA431 is not set +CONFIG_HW_RANDOM_VIRTIO=m +CONFIG_HW_RANDOM_OPTEE=y +# CONFIG_HW_RANDOM_CCTRNG is not set +# CONFIG_HW_RANDOM_XIPHERA is not set +CONFIG_HW_RANDOM_ARM_SMCCC_TRNG=y +CONFIG_HW_RANDOM_CN10K=y +CONFIG_HW_RANDOM_ROCKCHIP=y +# CONFIG_APPLICOM is not set +CONFIG_DEVMEM=y +CONFIG_DEVPORT=y +CONFIG_TCG_TPM=y +CONFIG_HW_RANDOM_TPM=y +# CONFIG_TCG_TIS is not set +# CONFIG_TCG_TIS_SPI is not set +# CONFIG_TCG_TIS_I2C is not set +# CONFIG_TCG_TIS_I2C_CR50 is not set +# CONFIG_TCG_TIS_I2C_ATMEL is not set +CONFIG_TCG_TIS_I2C_INFINEON=y +# CONFIG_TCG_TIS_I2C_NUVOTON is not set +# CONFIG_TCG_ATMEL is not set +# CONFIG_TCG_VTPM_PROXY is not set +# CONFIG_TCG_FTPM_TEE is not set +# CONFIG_TCG_TIS_ST33ZP24_I2C is not set +# CONFIG_TCG_TIS_ST33ZP24_SPI is not set +# CONFIG_XILLYBUS is not set +# CONFIG_XILLYUSB is not set +# CONFIG_RANDOM_TRUST_CPU is not set +# CONFIG_RANDOM_TRUST_BOOTLOADER is not set +# end of Character devices + +# +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_COMPAT=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=y + +# +# Multiplexer I2C Chip support +# +CONFIG_I2C_ARB_GPIO_CHALLENGE=m +CONFIG_I2C_MUX_GPIO=m +CONFIG_I2C_MUX_GPMUX=m +CONFIG_I2C_MUX_LTC4306=m +CONFIG_I2C_MUX_PCA9541=m +CONFIG_I2C_MUX_PCA954x=m +CONFIG_I2C_MUX_PINCTRL=m +CONFIG_I2C_MUX_REG=m +CONFIG_I2C_DEMUX_PINCTRL=m +CONFIG_I2C_MUX_MLXCPLD=m +# end of Multiplexer I2C Chip support + +CONFIG_I2C_HELPER_AUTO=y +CONFIG_I2C_SMBUS=m +CONFIG_I2C_ALGOBIT=y +CONFIG_I2C_ALGOPCA=m + +# +# I2C Hardware Bus support +# + +# +# PC SMBus host controller drivers +# +# CONFIG_I2C_ALI1535 is not set +# CONFIG_I2C_ALI1563 is not set +# CONFIG_I2C_ALI15X3 is not set +# CONFIG_I2C_AMD756 is not set +# CONFIG_I2C_AMD8111 is not set +# CONFIG_I2C_I801 is not set +# CONFIG_I2C_ISCH is not set +# CONFIG_I2C_PIIX4 is not set +# CONFIG_I2C_NFORCE2 is not set +# CONFIG_I2C_NVIDIA_GPU is not set +# CONFIG_I2C_SIS5595 is not set +# CONFIG_I2C_SIS630 is not set +# CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_VIA is not set +# CONFIG_I2C_VIAPRO is not set + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_CADENCE is not set +# CONFIG_I2C_CBUS_GPIO is not set +# CONFIG_I2C_DESIGNWARE_PLATFORM is not set +# CONFIG_I2C_DESIGNWARE_PCI is not set +# CONFIG_I2C_EMEV2 is not set +CONFIG_I2C_GPIO=m +# CONFIG_I2C_GPIO_FAULT_INJECTOR is not set +CONFIG_I2C_NOMADIK=m +CONFIG_I2C_OCORES=m +CONFIG_I2C_PCA_PLATFORM=m +CONFIG_I2C_RK3X=y +CONFIG_I2C_SIMTEC=m +CONFIG_I2C_THUNDERX=m +CONFIG_I2C_XILINX=m + +# +# External I2C/SMBus adapter drivers +# +CONFIG_I2C_DIOLAN_U2C=m +# CONFIG_I2C_CP2615 is not set +# CONFIG_I2C_PCI1XXXX is not set +CONFIG_I2C_ROBOTFUZZ_OSIF=m +CONFIG_I2C_TAOS_EVM=m +CONFIG_I2C_TINY_USB=m + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_VIRTIO is not set +# end of I2C Hardware Bus support + +CONFIG_I2C_STUB=m +CONFIG_I2C_SLAVE=y +CONFIG_I2C_SLAVE_EEPROM=m +CONFIG_I2C_SLAVE_TESTUNIT=m +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# end of I2C support + +# CONFIG_I3C is not set +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y +CONFIG_SPI_MEM=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_ALTERA is not set +# CONFIG_SPI_AXI_SPI_ENGINE is not set +CONFIG_SPI_BITBANG=y +# CONFIG_SPI_CADENCE is not set +# CONFIG_SPI_CADENCE_QUADSPI is not set +# CONFIG_SPI_CADENCE_XSPI is not set +# CONFIG_SPI_DESIGNWARE is not set +# CONFIG_SPI_NXP_FLEXSPI is not set +# CONFIG_SPI_GPIO is not set +# CONFIG_SPI_FSL_SPI is not set +# CONFIG_SPI_MICROCHIP_CORE is not set +# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set +# CONFIG_SPI_OC_TINY is not set +# CONFIG_SPI_PL022 is not set +# CONFIG_SPI_PXA2XX is not set +CONFIG_SPI_ROCKCHIP=y +CONFIG_SPI_ROCKCHIP_MISCDEV=y +# CONFIG_SPI_ROCKCHIP_FLEXBUS_FSPI is not set +CONFIG_SPI_ROCKCHIP_SFC=y +CONFIG_SPI_ROCKCHIP_SLAVE=y +# CONFIG_SPI_SC18IS602 is not set +# CONFIG_SPI_SIFIVE is not set +# CONFIG_SPI_MXIC is not set +# CONFIG_SPI_THUNDERX is not set +# CONFIG_SPI_XCOMM is not set +# CONFIG_SPI_XILINX is not set +# CONFIG_SPI_ZYNQMP_GQSPI is not set +# CONFIG_SPI_AMD is not set + +# +# SPI Multiplexer support +# +CONFIG_SPI_MUX=m + +# +# SPI Protocol Masters +# +CONFIG_SPI_SPIDEV=y +CONFIG_SPI_LOOPBACK_TEST=m +# CONFIG_SPI_TLE62X0 is not set +CONFIG_SPI_SLAVE=y +# CONFIG_SPI_SLAVE_TIME is not set +# CONFIG_SPI_SLAVE_SYSTEM_CONTROL is not set +# CONFIG_SPI_SLAVE_ROCKCHIP_OBJ is not set +CONFIG_SPI_DYNAMIC=y +CONFIG_SPMI=m +# CONFIG_SPMI_HISI3670 is not set +CONFIG_HSI=m +CONFIG_HSI_BOARDINFO=y + +# +# HSI controllers +# + +# +# HSI clients +# +# CONFIG_HSI_CHAR is not set +CONFIG_PPS=y +# CONFIG_PPS_DEBUG is not set + +# +# PPS clients support +# +CONFIG_PPS_CLIENT_KTIMER=m +# CONFIG_PPS_CLIENT_LDISC is not set +CONFIG_PPS_CLIENT_GPIO=m + +# +# PPS generators support +# + +# +# PTP clock support +# +CONFIG_PTP_1588_CLOCK=y +CONFIG_PTP_1588_CLOCK_OPTIONAL=y + +# +# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. +# +CONFIG_PTP_1588_CLOCK_KVM=m +# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set +# CONFIG_PTP_1588_CLOCK_IDTCM is not set +# CONFIG_PTP_1588_CLOCK_OCP is not set +# end of PTP clock support + +CONFIG_PINCTRL=y +CONFIG_PINMUX=y +CONFIG_PINCONF=y +CONFIG_GENERIC_PINCONF=y +# CONFIG_DEBUG_PINCTRL is not set +# CONFIG_PINCTRL_CY8C95X0 is not set +# CONFIG_PINCTRL_MCP23S08 is not set +# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set +# CONFIG_PINCTRL_OCELOT is not set +CONFIG_PINCTRL_RK805=m +CONFIG_PINCTRL_RK806=y +CONFIG_PINCTRL_ROCKCHIP=y +# CONFIG_PINCTRL_SINGLE is not set +# CONFIG_PINCTRL_STMFX is not set +# CONFIG_PINCTRL_SX150X is not set + +# +# Renesas pinctrl drivers +# +# end of Renesas pinctrl drivers + +CONFIG_GPIOLIB=y +CONFIG_GPIOLIB_FASTPATH_LIMIT=512 +CONFIG_OF_GPIO=y +CONFIG_GPIOLIB_IRQCHIP=y +# CONFIG_DEBUG_GPIO is not set +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_CDEV=y +CONFIG_GPIO_CDEV_V1=y +CONFIG_GPIO_GENERIC=y +CONFIG_GPIO_MAX730X=m + +# +# Memory mapped GPIO drivers +# +# CONFIG_GPIO_74XX_MMIO is not set +# CONFIG_GPIO_ALTERA is not set +# CONFIG_GPIO_CADENCE is not set +# CONFIG_GPIO_DWAPB is not set +# CONFIG_GPIO_FTGPIO010 is not set +CONFIG_GPIO_GENERIC_PLATFORM=y +# CONFIG_GPIO_GRGPIO is not set +# CONFIG_GPIO_HLWD is not set +# CONFIG_GPIO_LOGICVC is not set +# CONFIG_GPIO_MB86S7X is not set +# CONFIG_GPIO_PL061 is not set +CONFIG_GPIO_ROCKCHIP=y +# CONFIG_GPIO_SIFIVE is not set +# CONFIG_GPIO_SYSCON is not set +# CONFIG_GPIO_XGENE is not set +# CONFIG_GPIO_XILINX is not set +# CONFIG_GPIO_AMD_FCH is not set +# end of Memory mapped GPIO drivers + +# +# I2C GPIO expanders +# +CONFIG_GPIO_ADNP=m +CONFIG_GPIO_AW9110=m +CONFIG_GPIO_GW_PLD=m +CONFIG_GPIO_MAX7300=m +CONFIG_GPIO_MAX732X=m +# CONFIG_GPIO_NCA9539 is not set +CONFIG_GPIO_PCA953X=m +CONFIG_GPIO_PCA953X_IRQ=y +CONFIG_GPIO_PCA9570=m +CONFIG_GPIO_PCF857X=m +CONFIG_GPIO_TPIC2810=m +# end of I2C GPIO expanders + +# +# MFD GPIO expanders +# +# CONFIG_GPIO_TPS6586X is not set +# end of MFD GPIO expanders + +# +# PCI GPIO expanders +# +CONFIG_GPIO_BT8XX=m +CONFIG_GPIO_PCI_IDIO_16=m +CONFIG_GPIO_PCIE_IDIO_24=m +CONFIG_GPIO_RDC321X=m +# end of PCI GPIO expanders + +# +# SPI GPIO expanders +# +CONFIG_GPIO_74X164=m +CONFIG_GPIO_MAX3191X=m +CONFIG_GPIO_MAX7301=m +CONFIG_GPIO_MC33880=m +CONFIG_GPIO_PISOSR=m +CONFIG_GPIO_XRA1403=m +# end of SPI GPIO expanders + +# +# USB GPIO expanders +# +# end of USB GPIO expanders + +# +# Virtual GPIO drivers +# +CONFIG_GPIO_AGGREGATOR=m +CONFIG_GPIO_MOCKUP=m +# CONFIG_GPIO_VIRTIO is not set +# CONFIG_GPIO_SIM is not set +# end of Virtual GPIO drivers + +CONFIG_W1=m +CONFIG_W1_CON=y + +# +# 1-wire Bus Masters +# +CONFIG_W1_MASTER_MATROX=m +CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS2482=m +CONFIG_W1_MASTER_DS1WM=m +CONFIG_W1_MASTER_GPIO=m +CONFIG_W1_MASTER_SGI=m +# end of 1-wire Bus Masters + +# +# 1-wire Slaves +# +CONFIG_W1_SLAVE_THERM=m +CONFIG_W1_SLAVE_SMEM=m +CONFIG_W1_SLAVE_DS2405=m +CONFIG_W1_SLAVE_DS2408=m +CONFIG_W1_SLAVE_DS2408_READBACK=y +CONFIG_W1_SLAVE_DS2413=m +CONFIG_W1_SLAVE_DS2406=m +CONFIG_W1_SLAVE_DS2423=m +CONFIG_W1_SLAVE_DS2805=m +CONFIG_W1_SLAVE_DS2430=m +CONFIG_W1_SLAVE_DS2431=m +CONFIG_W1_SLAVE_DS2433=m +CONFIG_W1_SLAVE_DS2433_CRC=y +CONFIG_W1_SLAVE_DS2438=m +CONFIG_W1_SLAVE_DS250X=m +CONFIG_W1_SLAVE_DS2780=m +CONFIG_W1_SLAVE_DS2781=m +CONFIG_W1_SLAVE_DS28E04=m +CONFIG_W1_SLAVE_DS28E17=m +# end of 1-wire Slaves + +CONFIG_POWER_RESET=y +# CONFIG_POWER_RESET_BRCMSTB is not set +CONFIG_POWER_RESET_GPIO=y +CONFIG_POWER_RESET_GPIO_RESTART=y +# CONFIG_POWER_RESET_LTC2952 is not set +# CONFIG_POWER_RESET_REGULATOR is not set +# CONFIG_POWER_RESET_RESTART is not set +# CONFIG_POWER_RESET_XGENE is not set +# CONFIG_POWER_RESET_SYSCON is not set +# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set +CONFIG_REBOOT_MODE=y +CONFIG_SYSCON_REBOOT_MODE=y +# CONFIG_NVMEM_REBOOT_MODE is not set +CONFIG_POWER_SUPPLY=y +# CONFIG_POWER_SUPPLY_DEBUG is not set +CONFIG_POWER_SUPPLY_HWMON=y +# CONFIG_PDA_POWER is not set +# CONFIG_GENERIC_ADC_BATTERY is not set +# CONFIG_IP5XXX_POWER is not set +# CONFIG_TEST_POWER is not set +# CONFIG_CHARGER_ADP5061 is not set +# CONFIG_BATTERY_CW2015 is not set +CONFIG_BATTERY_CW2017=y +# CONFIG_BATTERY_CW221X is not set +# CONFIG_BATTERY_DS2760 is not set +# CONFIG_BATTERY_DS2780 is not set +# CONFIG_BATTERY_DS2781 is not set +# CONFIG_BATTERY_DS2782 is not set +# CONFIG_BATTERY_SAMSUNG_SDI is not set +CONFIG_BATTERY_SBS=y +# CONFIG_CHARGER_SBS is not set +# CONFIG_MANAGER_SBS is not set +# CONFIG_BATTERY_BQ27XXX is not set +# CONFIG_BATTERY_MAX17040 is not set +CONFIG_BATTERY_MAX17042=y +# CONFIG_BATTERY_MAX1721X is not set +# CONFIG_CHARGER_ISP1704 is not set +# CONFIG_CHARGER_MAX8903 is not set +# CONFIG_CHARGER_LP8727 is not set +CONFIG_CHARGER_GPIO=y +# CONFIG_CHARGER_MANAGER is not set +# CONFIG_ROCKCHIP_CHARGER_MANAGER is not set +# CONFIG_CHARGER_LT3651 is not set +# CONFIG_CHARGER_LTC4162L is not set +# CONFIG_CHARGER_SC8551 is not set +# CONFIG_CHARGER_SC89890 is not set +# CONFIG_CHARGER_DETECTOR_MAX14656 is not set +# CONFIG_CHARGER_MAX77976 is not set +# CONFIG_CHARGER_BQ2415X is not set +# CONFIG_CHARGER_BQ24190 is not set +# CONFIG_CHARGER_BQ24257 is not set +CONFIG_CHARGER_BQ24735=y +# CONFIG_CHARGER_BQ2515X is not set +CONFIG_CHARGER_BQ25700=y +# CONFIG_CHARGER_BQ25890 is not set +# CONFIG_CHARGER_BQ25980 is not set +# CONFIG_CHARGER_BQ256XX is not set +# CONFIG_BATTERY_RK816 is not set +CONFIG_BATTERY_RK817=y +CONFIG_CHARGER_RK817=y +# CONFIG_BATTERY_RK818 is not set +# CONFIG_CHARGER_RK818 is not set +# CONFIG_CHARGER_SGM41542 is not set +# CONFIG_CHARGER_SMB347 is not set +# CONFIG_BATTERY_GAUGE_LTC2941 is not set +# CONFIG_BATTERY_GOLDFISH is not set +# CONFIG_BATTERY_RT5033 is not set +# CONFIG_CHARGER_RT9455 is not set +# CONFIG_CHARGER_UCS1002 is not set +# CONFIG_CHARGER_BD99954 is not set +# CONFIG_BATTERY_UG3105 is not set +CONFIG_HWMON=y +CONFIG_HWMON_VID=m +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# +CONFIG_SENSORS_AD7314=m +CONFIG_SENSORS_AD7414=m +CONFIG_SENSORS_AD7418=m +CONFIG_SENSORS_ADM1025=m +CONFIG_SENSORS_ADM1026=m +CONFIG_SENSORS_ADM1029=m +CONFIG_SENSORS_ADM1031=m +CONFIG_SENSORS_ADM1177=m +CONFIG_SENSORS_ADM9240=m +CONFIG_SENSORS_ADT7X10=m +CONFIG_SENSORS_ADT7310=m +CONFIG_SENSORS_ADT7410=m +CONFIG_SENSORS_ADT7411=m +CONFIG_SENSORS_ADT7462=m +CONFIG_SENSORS_ADT7470=m +CONFIG_SENSORS_ADT7475=m +# CONFIG_SENSORS_AHT10 is not set +# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set +CONFIG_SENSORS_AS370=m +CONFIG_SENSORS_ASC7621=m +CONFIG_SENSORS_AXI_FAN_CONTROL=m +CONFIG_SENSORS_ARM_SCMI=m +CONFIG_SENSORS_ATXP1=m +CONFIG_SENSORS_CORSAIR_CPRO=m +# CONFIG_SENSORS_CORSAIR_PSU is not set +CONFIG_SENSORS_DRIVETEMP=m +CONFIG_SENSORS_DS620=m +CONFIG_SENSORS_DS1621=m +CONFIG_SENSORS_I5K_AMB=m +CONFIG_SENSORS_F71805F=m +CONFIG_SENSORS_F71882FG=m +CONFIG_SENSORS_F75375S=m +CONFIG_SENSORS_FTSTEUTATES=m +CONFIG_SENSORS_GL518SM=m +CONFIG_SENSORS_GL520SM=m +CONFIG_SENSORS_G760A=m +CONFIG_SENSORS_G762=m +CONFIG_SENSORS_GPIO_FAN=m +CONFIG_SENSORS_HIH6130=m +CONFIG_SENSORS_IIO_HWMON=m +CONFIG_SENSORS_IT87=m +CONFIG_SENSORS_JC42=m +CONFIG_SENSORS_POWR1220=m +CONFIG_SENSORS_LINEAGE=m +CONFIG_SENSORS_LTC2945=m +CONFIG_SENSORS_LTC2947=m +CONFIG_SENSORS_LTC2947_I2C=m +CONFIG_SENSORS_LTC2947_SPI=m +CONFIG_SENSORS_LTC2990=m +# CONFIG_SENSORS_LTC2992 is not set +CONFIG_SENSORS_LTC4151=m +CONFIG_SENSORS_LTC4215=m +CONFIG_SENSORS_LTC4222=m +CONFIG_SENSORS_LTC4245=m +CONFIG_SENSORS_LTC4260=m +CONFIG_SENSORS_LTC4261=m +CONFIG_SENSORS_MAX1111=m +# CONFIG_SENSORS_MAX127 is not set +CONFIG_SENSORS_MAX16065=m +CONFIG_SENSORS_MAX1619=m +CONFIG_SENSORS_MAX1668=m +CONFIG_SENSORS_MAX197=m +CONFIG_SENSORS_MAX31722=m +CONFIG_SENSORS_MAX31730=m +# CONFIG_SENSORS_MAX31760 is not set +# CONFIG_SENSORS_MAX6620 is not set +CONFIG_SENSORS_MAX6621=m +CONFIG_SENSORS_MAX6639=m +CONFIG_SENSORS_MAX6650=m +CONFIG_SENSORS_MAX6697=m +CONFIG_SENSORS_MAX31790=m +CONFIG_SENSORS_MCP3021=m +CONFIG_SENSORS_TC654=m +# CONFIG_SENSORS_TPS23861 is not set +CONFIG_SENSORS_MR75203=m +CONFIG_SENSORS_ADCXX=m +CONFIG_SENSORS_LM63=m +CONFIG_SENSORS_LM70=m +CONFIG_SENSORS_LM73=m +CONFIG_SENSORS_LM75=m +CONFIG_SENSORS_LM77=m +CONFIG_SENSORS_LM78=m +CONFIG_SENSORS_LM80=m +CONFIG_SENSORS_LM83=m +CONFIG_SENSORS_LM85=m +CONFIG_SENSORS_LM87=m +CONFIG_SENSORS_LM90=m +CONFIG_SENSORS_LM92=m +CONFIG_SENSORS_LM93=m +CONFIG_SENSORS_LM95234=m +CONFIG_SENSORS_LM95241=m +CONFIG_SENSORS_LM95245=m +CONFIG_SENSORS_PC87360=m +CONFIG_SENSORS_PC87427=m +CONFIG_SENSORS_NTC_THERMISTOR=m +CONFIG_SENSORS_NCT6683=m +CONFIG_SENSORS_NCT6775_CORE=m +CONFIG_SENSORS_NCT6775=m +# CONFIG_SENSORS_NCT6775_I2C is not set +CONFIG_SENSORS_NCT7802=m +CONFIG_SENSORS_NCT7904=m +CONFIG_SENSORS_NPCM7XX=m +# CONFIG_SENSORS_NZXT_KRAKEN2 is not set +# CONFIG_SENSORS_NZXT_SMART2 is not set +CONFIG_SENSORS_OCC_P8_I2C=m +CONFIG_SENSORS_OCC=m +CONFIG_SENSORS_PCF8591=m +CONFIG_PMBUS=m +CONFIG_SENSORS_PMBUS=m +# CONFIG_SENSORS_ADM1266 is not set +# CONFIG_SENSORS_ADM1275 is not set +# CONFIG_SENSORS_BEL_PFE is not set +# CONFIG_SENSORS_BPA_RS600 is not set +# CONFIG_SENSORS_DELTA_AHE50DC_FAN is not set +# CONFIG_SENSORS_FSP_3Y is not set +# CONFIG_SENSORS_IBM_CFFPS is not set +# CONFIG_SENSORS_DPS920AB is not set +# CONFIG_SENSORS_INSPUR_IPSPS is not set +# CONFIG_SENSORS_IR35221 is not set +# CONFIG_SENSORS_IR36021 is not set +# CONFIG_SENSORS_IR38064 is not set +# CONFIG_SENSORS_IRPS5401 is not set +# CONFIG_SENSORS_ISL68137 is not set +# CONFIG_SENSORS_LM25066 is not set +# CONFIG_SENSORS_LT7182S is not set +# CONFIG_SENSORS_LTC2978 is not set +# CONFIG_SENSORS_LTC3815 is not set +# CONFIG_SENSORS_MAX15301 is not set +# CONFIG_SENSORS_MAX16064 is not set +# CONFIG_SENSORS_MAX16601 is not set +# CONFIG_SENSORS_MAX20730 is not set +# CONFIG_SENSORS_MAX20751 is not set +# CONFIG_SENSORS_MAX31785 is not set +# CONFIG_SENSORS_MAX34440 is not set +# CONFIG_SENSORS_MAX8688 is not set +# CONFIG_SENSORS_MP2888 is not set +# CONFIG_SENSORS_MP2975 is not set +# CONFIG_SENSORS_MP5023 is not set +# CONFIG_SENSORS_PIM4328 is not set +# CONFIG_SENSORS_PLI1209BC is not set +# CONFIG_SENSORS_PM6764TR is not set +# CONFIG_SENSORS_PXE1610 is not set +# CONFIG_SENSORS_Q54SJ108A2 is not set +# CONFIG_SENSORS_STPDDC60 is not set +# CONFIG_SENSORS_TPS40422 is not set +# CONFIG_SENSORS_TPS53679 is not set +# CONFIG_SENSORS_TPS546D24 is not set +# CONFIG_SENSORS_UCD9000 is not set +# CONFIG_SENSORS_UCD9200 is not set +# CONFIG_SENSORS_XDPE152 is not set +# CONFIG_SENSORS_XDPE122 is not set +# CONFIG_SENSORS_ZL6100 is not set +CONFIG_SENSORS_PWM_FAN=m +# CONFIG_SENSORS_SBTSI is not set +# CONFIG_SENSORS_SBRMI is not set +CONFIG_SENSORS_SHT15=m +CONFIG_SENSORS_SHT21=m +CONFIG_SENSORS_SHT3x=m +# CONFIG_SENSORS_SHT4x is not set +CONFIG_SENSORS_SHTC1=m +CONFIG_SENSORS_SIS5595=m +CONFIG_SENSORS_DME1737=m +CONFIG_SENSORS_EMC1403=m +CONFIG_SENSORS_EMC2103=m +# CONFIG_SENSORS_EMC2305 is not set +CONFIG_SENSORS_EMC6W201=m +CONFIG_SENSORS_SMSC47M1=m +CONFIG_SENSORS_SMSC47M192=m +CONFIG_SENSORS_SMSC47B397=m +CONFIG_SENSORS_SCH56XX_COMMON=m +CONFIG_SENSORS_SCH5627=m +CONFIG_SENSORS_SCH5636=m +CONFIG_SENSORS_STTS751=m +CONFIG_SENSORS_SMM665=m +CONFIG_SENSORS_ADC128D818=m +CONFIG_SENSORS_ADS7828=m +CONFIG_SENSORS_ADS7871=m +CONFIG_SENSORS_AMC6821=m +CONFIG_SENSORS_INA209=m +CONFIG_SENSORS_INA2XX=m +# CONFIG_SENSORS_INA238 is not set +CONFIG_SENSORS_INA3221=m +CONFIG_SENSORS_TC74=m +CONFIG_SENSORS_THMC50=m +CONFIG_SENSORS_TMP102=m +CONFIG_SENSORS_TMP103=m +CONFIG_SENSORS_TMP108=m +CONFIG_SENSORS_TMP401=m +CONFIG_SENSORS_TMP421=m +# CONFIG_SENSORS_TMP464 is not set +CONFIG_SENSORS_TMP513=m +CONFIG_SENSORS_VIA686A=m +CONFIG_SENSORS_VT1211=m +CONFIG_SENSORS_VT8231=m +CONFIG_SENSORS_W83773G=m +CONFIG_SENSORS_W83781D=m +CONFIG_SENSORS_W83791D=m +CONFIG_SENSORS_W83792D=m +CONFIG_SENSORS_W83793=m +CONFIG_SENSORS_W83795=m +# CONFIG_SENSORS_W83795_FANCTRL is not set +CONFIG_SENSORS_W83L785TS=m +CONFIG_SENSORS_W83L786NG=m +CONFIG_SENSORS_W83627HF=m +CONFIG_SENSORS_W83627EHF=m +CONFIG_THERMAL=y +# CONFIG_THERMAL_NETLINK is not set +# CONFIG_THERMAL_STATISTICS is not set +CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 +CONFIG_THERMAL_HWMON=y +CONFIG_THERMAL_OF=y +CONFIG_THERMAL_WRITABLE_TRIPS=y +CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y +# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set +# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set +# CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR is not set +CONFIG_THERMAL_GOV_FAIR_SHARE=y +CONFIG_THERMAL_GOV_STEP_WISE=y +# CONFIG_THERMAL_GOV_BANG_BANG is not set +CONFIG_THERMAL_GOV_USER_SPACE=y +CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y +CONFIG_CPU_THERMAL=y +CONFIG_CPU_FREQ_THERMAL=y +CONFIG_DEVFREQ_THERMAL=y +# CONFIG_THERMAL_EMULATION is not set +# CONFIG_THERMAL_MMIO is not set +CONFIG_ROCKCHIP_THERMAL=y +# CONFIG_RK_VIRTUAL_THERMAL is not set +# CONFIG_GENERIC_ADC_THERMAL is not set +CONFIG_KHADAS_MCU_FAN_THERMAL=m +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_CORE=y +# CONFIG_WATCHDOG_NOWAYOUT is not set +CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y +CONFIG_WATCHDOG_OPEN_TIMEOUT=0 +# CONFIG_WATCHDOG_SYSFS is not set +# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set + +# +# Watchdog Pretimeout Governors +# +# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_GPIO_WATCHDOG is not set +# CONFIG_XILINX_WATCHDOG is not set +# CONFIG_ZIIRAVE_WATCHDOG is not set +# CONFIG_ARM_SP805_WATCHDOG is not set +# CONFIG_ARM_SBSA_WATCHDOG is not set +# CONFIG_CADENCE_WATCHDOG is not set +CONFIG_DW_WATCHDOG=y +# CONFIG_MAX63XX_WATCHDOG is not set +CONFIG_KHADAS_WATCHDOG=y +# CONFIG_ARM_SMC_WATCHDOG is not set +# CONFIG_ALIM7101_WDT is not set +# CONFIG_I6300ESB_WDT is not set +# CONFIG_HP_WATCHDOG is not set +# CONFIG_MEN_A21_WDT is not set + +# +# PCI-based Watchdog Cards +# +# CONFIG_PCIPCWATCHDOG is not set +# CONFIG_WDTPCI is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +CONFIG_SSB_POSSIBLE=y +CONFIG_SSB=m +CONFIG_SSB_SPROM=y +CONFIG_SSB_BLOCKIO=y +CONFIG_SSB_PCIHOST_POSSIBLE=y +CONFIG_SSB_PCIHOST=y +CONFIG_SSB_B43_PCI_BRIDGE=y +CONFIG_SSB_SDIOHOST_POSSIBLE=y +# CONFIG_SSB_SDIOHOST is not set +CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y +CONFIG_SSB_DRIVER_PCICORE=y +# CONFIG_SSB_DRIVER_GPIO is not set +CONFIG_BCMA_POSSIBLE=y +CONFIG_BCMA=m +CONFIG_BCMA_BLOCKIO=y +CONFIG_BCMA_HOST_PCI_POSSIBLE=y +CONFIG_BCMA_HOST_PCI=y +# CONFIG_BCMA_HOST_SOC is not set +CONFIG_BCMA_DRIVER_PCI=y +# CONFIG_BCMA_DRIVER_GMAC_CMN is not set +# CONFIG_BCMA_DRIVER_GPIO is not set +# CONFIG_BCMA_DEBUG is not set + +# +# Multifunction device drivers +# +CONFIG_MFD_CORE=y +# CONFIG_MFD_ACT8945A is not set +# CONFIG_MFD_AS3711 is not set +# CONFIG_MFD_AS3722 is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_AAT2870_CORE is not set +# CONFIG_MFD_ATMEL_FLEXCOM is not set +# CONFIG_MFD_ATMEL_HLCDC is not set +# CONFIG_MFD_BCM590XX is not set +# CONFIG_MFD_BD9571MWV is not set +# CONFIG_MFD_AXP20X_I2C is not set +# CONFIG_MFD_MADERA is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_MFD_DA9052_SPI is not set +# CONFIG_MFD_DA9052_I2C is not set +# CONFIG_MFD_DA9055 is not set +# CONFIG_MFD_DA9062 is not set +# CONFIG_MFD_DA9063 is not set +# CONFIG_MFD_DA9150 is not set +# CONFIG_MFD_DLN2 is not set +# CONFIG_MFD_GATEWORKS_GSC is not set +# CONFIG_MFD_MC13XXX_SPI is not set +# CONFIG_MFD_MC13XXX_I2C is not set +# CONFIG_MFD_MP2629 is not set +# CONFIG_MFD_HI6421_PMIC is not set +# CONFIG_MFD_HI6421_SPMI is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_LPC_ICH is not set +# CONFIG_LPC_SCH is not set +# CONFIG_MFD_IQS62X is not set +# CONFIG_MFD_JANZ_CMODIO is not set +# CONFIG_MFD_KEMPLD is not set +# CONFIG_MFD_88PM800 is not set +# CONFIG_MFD_88PM805 is not set +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_MAX14577 is not set +# CONFIG_MFD_MAX77620 is not set +# CONFIG_MFD_MAX77650 is not set +# CONFIG_MFD_MAX77686 is not set +# CONFIG_MFD_MAX77693 is not set +# CONFIG_MFD_MAX77714 is not set +# CONFIG_MFD_MAX77843 is not set +# CONFIG_MFD_MAX8907 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8997 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_MFD_MAX96745 is not set +# CONFIG_MFD_MAX96755F is not set +# CONFIG_MFD_MT6360 is not set +# CONFIG_MFD_MT6370 is not set +# CONFIG_MFD_MT6397 is not set +# CONFIG_MFD_MENF21BMC is not set +# CONFIG_MFD_OCELOT is not set +# CONFIG_EZX_PCAP is not set +# CONFIG_MFD_CPCAP is not set +# CONFIG_MFD_VIPERBOARD is not set +# CONFIG_MFD_NTXEC is not set +# CONFIG_MFD_RETU is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_MFD_SY7636A is not set +CONFIG_MFD_RDC321X=m +# CONFIG_MFD_RT4831 is not set +# CONFIG_MFD_RT5033 is not set +# CONFIG_MFD_RT5120 is not set +# CONFIG_MFD_RC5T583 is not set +# CONFIG_MFD_RK618 is not set +# CONFIG_MFD_RK630 is not set +# CONFIG_MFD_RK630_I2C is not set +# CONFIG_MFD_RK630_SPI is not set +CONFIG_MFD_RK806=y +CONFIG_MFD_RK806_I2C=y +CONFIG_MFD_RK806_SPI=y +CONFIG_MFD_RK808=y +# CONFIG_MFD_RK1000 is not set + +# +# driver for different display serdes +# +# CONFIG_MFD_SERDES_DISPLAY is not set +# CONFIG_MFD_RKX110_X120 is not set +# CONFIG_MFD_ROCKCHIP_FLEXBUS is not set +# CONFIG_MFD_RN5T618 is not set +# CONFIG_MFD_SEC_CORE is not set +# CONFIG_MFD_SI476X_CORE is not set +CONFIG_MFD_SIMPLE_MFD_I2C=m +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_SKY81452 is not set +# CONFIG_MFD_STMPE is not set +CONFIG_MFD_SYSCON=y +# CONFIG_MFD_TI_AM335X_TSCADC is not set +# CONFIG_MFD_LP3943 is not set +# CONFIG_MFD_LP8788 is not set +# CONFIG_MFD_TI_LMU is not set +# CONFIG_MFD_PALMAS is not set +# CONFIG_TPS6105X is not set +# CONFIG_TPS65010 is not set +# CONFIG_TPS6507X is not set +# CONFIG_MFD_TPS65086 is not set +# CONFIG_MFD_TPS65090 is not set +# CONFIG_MFD_TPS65217 is not set +# CONFIG_MFD_TI_LP873X is not set +# CONFIG_MFD_TI_LP87565 is not set +# CONFIG_MFD_TPS65218 is not set +CONFIG_MFD_TPS6586X=y +# CONFIG_MFD_TPS65910 is not set +# CONFIG_MFD_TPS65912_I2C is not set +# CONFIG_MFD_TPS65912_SPI is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_TWL6040_CORE is not set +CONFIG_MFD_WL1273_CORE=m +# CONFIG_MFD_LM3533 is not set +# CONFIG_MFD_TC3589X is not set +# CONFIG_MFD_TQMX86 is not set +# CONFIG_MFD_VX855 is not set +# CONFIG_MFD_LOCHNAGAR is not set +# CONFIG_MFD_ARIZONA_I2C is not set +# CONFIG_MFD_ARIZONA_SPI is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM831X_SPI is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +# CONFIG_MFD_ROHM_BD718XX is not set +# CONFIG_MFD_ROHM_BD71828 is not set +# CONFIG_MFD_ROHM_BD957XMUF is not set +# CONFIG_MFD_STPMIC1 is not set +# CONFIG_MFD_STMFX is not set +# CONFIG_MFD_ATC260X_I2C is not set +CONFIG_MFD_KHADAS_MCU=m +# CONFIG_MFD_QCOM_PM8008 is not set +# CONFIG_RAVE_SP_CORE is not set +# CONFIG_MFD_INTEL_M10_BMC is not set +# CONFIG_MFD_RSMU_I2C is not set +# CONFIG_MFD_RSMU_SPI is not set +# end of Multifunction device drivers + +CONFIG_REGULATOR=y +CONFIG_REGULATOR_DEBUG=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_88PG86X is not set +CONFIG_REGULATOR_ACT8865=y +# CONFIG_REGULATOR_AD5398 is not set +# CONFIG_REGULATOR_ARM_SCMI is not set +# CONFIG_REGULATOR_DA9121 is not set +# CONFIG_REGULATOR_DA9210 is not set +# CONFIG_REGULATOR_DA9211 is not set +# CONFIG_REGULATOR_DW9807 is not set +CONFIG_REGULATOR_FAN53555=y +# CONFIG_REGULATOR_FAN53880 is not set +CONFIG_REGULATOR_GPIO=y +# CONFIG_REGULATOR_ISL9305 is not set +# CONFIG_REGULATOR_ISL6271A is not set +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_LP3972 is not set +# CONFIG_REGULATOR_LP872X is not set +CONFIG_REGULATOR_LP8752=y +# CONFIG_REGULATOR_LP8755 is not set +# CONFIG_REGULATOR_LTC3589 is not set +# CONFIG_REGULATOR_LTC3676 is not set +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_MAX8893 is not set +# CONFIG_REGULATOR_MAX8952 is not set +# CONFIG_REGULATOR_MAX8973 is not set +# CONFIG_REGULATOR_MAX20086 is not set +# CONFIG_REGULATOR_MAX77826 is not set +# CONFIG_REGULATOR_MCP16502 is not set +# CONFIG_REGULATOR_MP5416 is not set +# CONFIG_REGULATOR_MP8859 is not set +CONFIG_REGULATOR_MP8865=y +# CONFIG_REGULATOR_MP886X is not set +# CONFIG_REGULATOR_MPQ7920 is not set +# CONFIG_REGULATOR_MT6311 is not set +# CONFIG_REGULATOR_MT6315 is not set +# CONFIG_REGULATOR_PCA9450 is not set +# CONFIG_REGULATOR_PF8X00 is not set +# CONFIG_REGULATOR_PFUZE100 is not set +# CONFIG_REGULATOR_PV88060 is not set +# CONFIG_REGULATOR_PV88080 is not set +# CONFIG_REGULATOR_PV88090 is not set +CONFIG_REGULATOR_PWM=y +# CONFIG_REGULATOR_QCOM_SPMI is not set +# CONFIG_REGULATOR_QCOM_USB_VBUS is not set +# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY is not set +CONFIG_REGULATOR_RK806=y +CONFIG_REGULATOR_RK808=y +CONFIG_REGULATOR_RK860X=y +# CONFIG_REGULATOR_RT4801 is not set +# CONFIG_REGULATOR_RT5190A is not set +# CONFIG_REGULATOR_RT5759 is not set +# CONFIG_REGULATOR_RT6160 is not set +# CONFIG_REGULATOR_RT6245 is not set +# CONFIG_REGULATOR_RTQ2134 is not set +# CONFIG_REGULATOR_RTMV20 is not set +# CONFIG_REGULATOR_RTQ6752 is not set +# CONFIG_REGULATOR_SLG51000 is not set +# CONFIG_REGULATOR_SY8106A is not set +# CONFIG_REGULATOR_SY8824X is not set +# CONFIG_REGULATOR_SY8827N is not set +# CONFIG_REGULATOR_TPS51632 is not set +# CONFIG_REGULATOR_TPS62360 is not set +# CONFIG_REGULATOR_TPS6286X is not set +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +CONFIG_REGULATOR_TPS65132=y +# CONFIG_REGULATOR_TPS6524X is not set +CONFIG_REGULATOR_TPS6586X=y +# CONFIG_REGULATOR_VCTRL is not set +# CONFIG_REGULATOR_WL2868C is not set +# CONFIG_REGULATOR_QCOM_LABIBB is not set +CONFIG_REGULATOR_XZ3216=y +# CONFIG_RC_CORE is not set +CONFIG_CEC_CORE=y +CONFIG_CEC_NOTIFIER=y + +# +# CEC support +# +CONFIG_MEDIA_CEC_SUPPORT=y +CONFIG_CEC_CH7322=m +CONFIG_USB_PULSE8_CEC=m +CONFIG_USB_RAINSHADOW_CEC=m +# end of CEC support + +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_SUPPORT_FILTER=y +CONFIG_MEDIA_SUBDRV_AUTOSELECT=y + +# +# Media device types +# +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_ANALOG_TV_SUPPORT=y +CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y +CONFIG_MEDIA_RADIO_SUPPORT=y +CONFIG_MEDIA_SDR_SUPPORT=y +CONFIG_MEDIA_PLATFORM_SUPPORT=y +CONFIG_MEDIA_TEST_SUPPORT=y +# end of Media device types + +CONFIG_VIDEO_DEV=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_DVB_CORE=y + +# +# Video4Linux options +# +CONFIG_VIDEO_V4L2_I2C=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +CONFIG_VIDEO_TUNER=m +CONFIG_V4L2_MEM2MEM_DEV=y +CONFIG_V4L2_FWNODE=y +CONFIG_V4L2_ASYNC=y +# end of Video4Linux options + +# +# Media controller options +# +CONFIG_MEDIA_CONTROLLER_DVB=y +# end of Media controller options + +# +# Digital TV options +# +# CONFIG_DVB_MMAP is not set +CONFIG_DVB_NET=y +CONFIG_DVB_MAX_ADAPTERS=16 +CONFIG_DVB_DYNAMIC_MINORS=y +# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set +# CONFIG_DVB_ULE_DEBUG is not set +# end of Digital TV options + +# +# Media drivers +# + +# +# Drivers filtered as selected at 'Filter media drivers' +# + +# +# Media drivers +# +CONFIG_MEDIA_USB_SUPPORT=y + +# +# Webcam devices +# +CONFIG_USB_GSPCA=m +CONFIG_USB_GSPCA_BENQ=m +CONFIG_USB_GSPCA_CONEX=m +CONFIG_USB_GSPCA_CPIA1=m +CONFIG_USB_GSPCA_DTCS033=m +CONFIG_USB_GSPCA_ETOMS=m +CONFIG_USB_GSPCA_FINEPIX=m +CONFIG_USB_GSPCA_JEILINJ=m +CONFIG_USB_GSPCA_JL2005BCD=m +CONFIG_USB_GSPCA_KINECT=m +CONFIG_USB_GSPCA_KONICA=m +CONFIG_USB_GSPCA_MARS=m +CONFIG_USB_GSPCA_MR97310A=m +CONFIG_USB_GSPCA_NW80X=m +CONFIG_USB_GSPCA_OV519=m +CONFIG_USB_GSPCA_OV534=m +CONFIG_USB_GSPCA_OV534_9=m +CONFIG_USB_GSPCA_PAC207=m +CONFIG_USB_GSPCA_PAC7302=m +CONFIG_USB_GSPCA_PAC7311=m +CONFIG_USB_GSPCA_SE401=m +CONFIG_USB_GSPCA_SN9C2028=m +CONFIG_USB_GSPCA_SN9C20X=m +CONFIG_USB_GSPCA_SONIXB=m +CONFIG_USB_GSPCA_SONIXJ=m +CONFIG_USB_GSPCA_SPCA1528=m +CONFIG_USB_GSPCA_SPCA500=m +CONFIG_USB_GSPCA_SPCA501=m +CONFIG_USB_GSPCA_SPCA505=m +CONFIG_USB_GSPCA_SPCA506=m +CONFIG_USB_GSPCA_SPCA508=m +CONFIG_USB_GSPCA_SPCA561=m +CONFIG_USB_GSPCA_SQ905=m +CONFIG_USB_GSPCA_SQ905C=m +CONFIG_USB_GSPCA_SQ930X=m +CONFIG_USB_GSPCA_STK014=m +CONFIG_USB_GSPCA_STK1135=m +CONFIG_USB_GSPCA_STV0680=m +CONFIG_USB_GSPCA_SUNPLUS=m +CONFIG_USB_GSPCA_T613=m +CONFIG_USB_GSPCA_TOPRO=m +CONFIG_USB_GSPCA_TOUPTEK=m +CONFIG_USB_GSPCA_TV8532=m +CONFIG_USB_GSPCA_VC032X=m +CONFIG_USB_GSPCA_VICAM=m +CONFIG_USB_GSPCA_XIRLINK_CIT=m +CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_USB_GL860=m +CONFIG_USB_M5602=m +CONFIG_USB_STV06XX=m +CONFIG_USB_PWC=m +# CONFIG_USB_PWC_DEBUG is not set +CONFIG_USB_PWC_INPUT_EVDEV=y +CONFIG_USB_S2255=m +CONFIG_VIDEO_USBTV=m +CONFIG_USB_VIDEO_CLASS=y +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y + +# +# Analog TV USB devices +# +CONFIG_VIDEO_GO7007=m +CONFIG_VIDEO_GO7007_USB=m +CONFIG_VIDEO_GO7007_LOADER=m +CONFIG_VIDEO_GO7007_USB_S2250_BOARD=m +CONFIG_VIDEO_HDPVR=m +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_PVRUSB2_SYSFS=y +CONFIG_VIDEO_PVRUSB2_DVB=y +# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set +CONFIG_VIDEO_STK1160_COMMON=m +CONFIG_VIDEO_STK1160=m + +# +# Analog/digital TV USB devices +# +CONFIG_VIDEO_AU0828=m +CONFIG_VIDEO_AU0828_V4L2=y +CONFIG_VIDEO_CX231XX=m +CONFIG_VIDEO_CX231XX_ALSA=m +CONFIG_VIDEO_CX231XX_DVB=m + +# +# Digital TV USB devices +# +CONFIG_DVB_AS102=m +CONFIG_DVB_B2C2_FLEXCOP_USB=m +# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set +CONFIG_DVB_USB_V2=m +CONFIG_DVB_USB_AF9015=m +CONFIG_DVB_USB_AF9035=m +CONFIG_DVB_USB_ANYSEE=m +CONFIG_DVB_USB_AU6610=m +CONFIG_DVB_USB_AZ6007=m +CONFIG_DVB_USB_CE6230=m +CONFIG_DVB_USB_DVBSKY=m +CONFIG_DVB_USB_EC168=m +CONFIG_DVB_USB_GL861=m +CONFIG_DVB_USB_MXL111SF=m +CONFIG_DVB_USB_RTL28XXU=m +CONFIG_DVB_USB_ZD1301=m +CONFIG_SMS_USB_DRV=m +CONFIG_DVB_TTUSB_BUDGET=m +CONFIG_DVB_TTUSB_DEC=m + +# +# Webcam, TV (analog/digital) USB devices +# +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_V4L2=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m + +# +# Software defined radio USB devices +# +CONFIG_USB_AIRSPY=m +CONFIG_USB_HACKRF=m +CONFIG_USB_MSI2500=m +CONFIG_MEDIA_PCI_SUPPORT=y + +# +# Media capture support +# +CONFIG_VIDEO_SOLO6X10=m +CONFIG_VIDEO_TW5864=m +CONFIG_VIDEO_TW68=m +CONFIG_VIDEO_TW686X=m +# CONFIG_VIDEO_ZORAN is not set + +# +# Media capture/analog TV support +# +CONFIG_VIDEO_DT3155=m + +# +# Media capture/analog/hybrid TV support +# +CONFIG_VIDEO_CX25821=m +CONFIG_VIDEO_CX25821_ALSA=m +CONFIG_VIDEO_SAA7134=m +CONFIG_VIDEO_SAA7134_ALSA=m +CONFIG_VIDEO_SAA7134_DVB=m +CONFIG_VIDEO_SAA7134_GO7007=m +CONFIG_VIDEO_SAA7164=m + +# +# Media digital TV PCI Adapters +# +CONFIG_DVB_B2C2_FLEXCOP_PCI=m +# CONFIG_DVB_B2C2_FLEXCOP_PCI_DEBUG is not set +CONFIG_DVB_DDBRIDGE=m +# CONFIG_DVB_DDBRIDGE_MSIENABLE is not set +CONFIG_DVB_NETUP_UNIDVB=m +CONFIG_DVB_NGENE=m +CONFIG_DVB_PLUTO2=m +CONFIG_DVB_PT1=m +CONFIG_DVB_PT3=m +CONFIG_RADIO_ADAPTERS=y +CONFIG_RADIO_MAXIRADIO=m +CONFIG_RADIO_SAA7706H=m +CONFIG_RADIO_SHARK=m +CONFIG_RADIO_SHARK2=m +CONFIG_RADIO_SI4713=m +CONFIG_RADIO_TEA575X=m +CONFIG_RADIO_TEA5764=m +CONFIG_RADIO_TEF6862=m +CONFIG_RADIO_WL1273=m +CONFIG_USB_DSBR=m +CONFIG_USB_KEENE=m +CONFIG_USB_MA901=m +CONFIG_USB_MR800=m +CONFIG_USB_RAREMONO=m +CONFIG_RADIO_SI470X=m +CONFIG_USB_SI470X=m +CONFIG_I2C_SI470X=m +CONFIG_USB_SI4713=m +CONFIG_PLATFORM_SI4713=m +CONFIG_I2C_SI4713=m +CONFIG_MEDIA_PLATFORM_DRIVERS=y +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_SDR_PLATFORM_DRIVERS=y +CONFIG_DVB_PLATFORM_DRIVERS=y +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_MEM2MEM_DEINTERLACE=m +# CONFIG_VIDEO_MUX is not set + +# +# Allegro DVT media platform drivers +# + +# +# Amlogic media platform drivers +# + +# +# Amphion drivers +# + +# +# Aspeed media platform drivers +# +# CONFIG_VIDEO_ASPEED is not set + +# +# Atmel media platform drivers +# + +# +# Cadence media platform drivers +# +# CONFIG_VIDEO_CADENCE_CSI2RX is not set +# CONFIG_VIDEO_CADENCE_CSI2TX is not set + +# +# Chips&Media media platform drivers +# + +# +# Intel media platform drivers +# + +# +# Marvell media platform drivers +# +# CONFIG_VIDEO_CAFE_CCIC is not set + +# +# Mediatek media platform drivers +# + +# +# NVidia media platform drivers +# + +# +# NXP media platform drivers +# + +# +# Qualcomm media platform drivers +# + +# +# Renesas media platform drivers +# + +# +# Rockchip media platform drivers +# +CONFIG_VIDEO_ROCKCHIP_CIF=y +CONFIG_ROCKCHIP_CIF_WORKMODE_PINGPONG=y +# CONFIG_ROCKCHIP_CIF_WORKMODE_ONEFRAME is not set +CONFIG_ROCKCHIP_CIF_USE_DUMMY_BUF=y +# CONFIG_ROCKCHIP_CIF_USE_NONE_DUMMY_BUF is not set +# CONFIG_ROCKCHIP_CIF_USE_MONITOR is not set +CONFIG_VIDEO_ROCKCHIP_RKISP1=y +CONFIG_VIDEO_ROCKCHIP_ISP=y +CONFIG_VIDEO_ROCKCHIP_ISP_VERSION_V1X=y +CONFIG_VIDEO_ROCKCHIP_ISP_VERSION_V21=y +CONFIG_VIDEO_ROCKCHIP_ISP_VERSION_V30=y +CONFIG_VIDEO_ROCKCHIP_ISP_VERSION_V39=y +CONFIG_VIDEO_ROCKCHIP_ISPP=y +# CONFIG_VIDEO_ROCKCHIP_ISPP_FEC is not set +CONFIG_VIDEO_ROCKCHIP_ISPP_VERSION_V20=y +CONFIG_VIDEO_ROCKCHIP_HDMIRX_CLASS=y +CONFIG_VIDEO_ROCKCHIP_HDMIRX=y +CONFIG_VIDEO_ROCKCHIP_RGA=y +# CONFIG_VIDEO_ROCKCHIP_ISP1 is not set +# CONFIG_VIDEO_ROCKCHIP_VPSS is not set + +# +# Samsung media platform drivers +# + +# +# STMicroelectronics media platform drivers +# + +# +# Sunxi media platform drivers +# + +# +# Texas Instruments drivers +# + +# +# Verisilicon media platform drivers +# +# CONFIG_VIDEO_HANTRO is not set + +# +# VIA media platform drivers +# + +# +# Xilinx media platform drivers +# +# CONFIG_VIDEO_XILINX is not set + +# +# MMC/SDIO DVB adapters +# +# CONFIG_SMS_SDIO_DRV is not set +# CONFIG_V4L_TEST_DRIVERS is not set +# CONFIG_DVB_TEST_DRIVERS is not set +CONFIG_MEDIA_COMMON_OPTIONS=y + +# +# common driver options +# +CONFIG_CYPRESS_FIRMWARE=m +CONFIG_VIDEO_CX2341X=m +CONFIG_VIDEO_TVEEPROM=m +CONFIG_DVB_B2C2_FLEXCOP=m +CONFIG_SMS_SIANO_MDTV=m +CONFIG_VIDEOBUF2_CORE=y +CONFIG_VIDEOBUF2_V4L2=y +CONFIG_VIDEOBUF2_MEMOPS=y +CONFIG_VIDEOBUF2_CMA_SG=y +CONFIG_VIDEOBUF2_DMA_CONTIG=y +CONFIG_VIDEOBUF2_VMALLOC=y +CONFIG_VIDEOBUF2_DMA_SG=y +CONFIG_VIDEOBUF2_DVB=m +# end of Media drivers + +# +# Media ancillary drivers +# +CONFIG_MEDIA_ATTACH=y +# CONFIG_VIDEO_CAM_SLEEP_WAKEUP is not set +CONFIG_VIDEO_CAMERA_SENSOR=y +CONFIG_VIDEO_APTINA_PLL=m +CONFIG_VIDEO_AR0230=m +# CONFIG_VIDEO_AR0521 is not set +# CONFIG_VIDEO_AR0822 is not set +# CONFIG_VIDEO_AR2020 is not set +# CONFIG_VIDEO_BF3925 is not set +CONFIG_VIDEO_GC02M2=m +# CONFIG_VIDEO_GC0312 is not set +# CONFIG_VIDEO_GC0329 is not set +# CONFIG_VIDEO_GC0403 is not set +# CONFIG_VIDEO_GC05A2 is not set +CONFIG_VIDEO_GC08A3=m +CONFIG_VIDEO_GC1084=m +# CONFIG_VIDEO_GC2035 is not set +CONFIG_VIDEO_GC2053=m +CONFIG_VIDEO_GC2093=m +CONFIG_VIDEO_GC2145=m +# CONFIG_VIDEO_GC2155 is not set +# CONFIG_VIDEO_GC2355 is not set +# CONFIG_VIDEO_GC2375H is not set +CONFIG_VIDEO_GC2385=m +CONFIG_VIDEO_GC3003=m +CONFIG_VIDEO_GC4023=m +CONFIG_VIDEO_GC4653=m +CONFIG_VIDEO_GC4663=m +CONFIG_VIDEO_GC4C33=m +# CONFIG_VIDEO_GC5024 is not set +CONFIG_VIDEO_GC5025=m +CONFIG_VIDEO_GC5035=m +CONFIG_VIDEO_GC8034=y +CONFIG_VIDEO_HI556=m +# CONFIG_VIDEO_HI846 is not set +# CONFIG_VIDEO_HI847 is not set +# CONFIG_VIDEO_IMX208 is not set +CONFIG_VIDEO_IMX214=m +CONFIG_VIDEO_IMX214_EEPROM=m +CONFIG_VIDEO_IMX219=m +CONFIG_VIDEO_IMX258=m +CONFIG_VIDEO_IMX258_EEPROM=m +CONFIG_VIDEO_IMX274=m +CONFIG_VIDEO_IMX290=m +CONFIG_VIDEO_IMX307=m +CONFIG_VIDEO_IMX317=m +CONFIG_VIDEO_IMX319=m +CONFIG_VIDEO_IMX323=m +CONFIG_VIDEO_IMX327=m +CONFIG_VIDEO_IMX334=m +CONFIG_VIDEO_IMX335=m +CONFIG_VIDEO_IMX347=m +CONFIG_VIDEO_IMX355=m +CONFIG_VIDEO_IMX378=m +# CONFIG_VIDEO_IMX412 is not set +CONFIG_VIDEO_IMX415=y +CONFIG_VIDEO_IMX464=y +# CONFIG_VIDEO_IMX492 is not set +# CONFIG_VIDEO_IMX498 is not set +CONFIG_VIDEO_IMX577=m +CONFIG_VIDEO_IMX586=m +# CONFIG_VIDEO_IMX708 is not set +# CONFIG_VIDEO_JX_F37 is not set +# CONFIG_VIDEO_JX_H62 is not set +# CONFIG_VIDEO_JX_H65 is not set +CONFIG_VIDEO_JX_K17=m +CONFIG_VIDEO_MAX9271_LIB=m +# CONFIG_VIDEO_MIS2031 is not set +# CONFIG_VIDEO_MIS4001 is not set +CONFIG_VIDEO_MT9M001=m +CONFIG_VIDEO_MT9M032=m +CONFIG_VIDEO_MT9M111=m +CONFIG_VIDEO_MT9P031=m +CONFIG_VIDEO_MT9T001=m +CONFIG_VIDEO_MT9T112=m +CONFIG_VIDEO_MT9V011=m +CONFIG_VIDEO_MT9V032=m +CONFIG_VIDEO_MT9V111=m +CONFIG_VIDEO_NOON010PC30=m +# CONFIG_VIDEO_OG01A10 is not set +# CONFIG_VIDEO_OG01A1B is not set +# CONFIG_VIDEO_OG02B10 is not set +CONFIG_VIDEO_OS02G10=m +# CONFIG_VIDEO_OS02K10 is not set +CONFIG_VIDEO_OS03B10=m +CONFIG_VIDEO_OS04A10=y +# CONFIG_VIDEO_OS04D10 is not set +CONFIG_VIDEO_OS05A20=m +CONFIG_VIDEO_OS08A20=m +# CONFIG_VIDEO_OV02A10 is not set +CONFIG_VIDEO_OV02B10=m +CONFIG_VIDEO_OV02K10=m +# CONFIG_VIDEO_OV08D10 is not set +CONFIG_VIDEO_OV12D2Q=m +CONFIG_VIDEO_OV13850=y +CONFIG_VIDEO_OV13855=y +CONFIG_VIDEO_OV13858=m +# CONFIG_VIDEO_OV13B10 is not set +# CONFIG_VIDEO_OV16880 is not set +# CONFIG_VIDEO_OV16885 is not set +CONFIG_VIDEO_OV16A10=m +CONFIG_VIDEO_OV16A1Q=m +CONFIG_VIDEO_OV2640=m +CONFIG_VIDEO_OV2659=m +CONFIG_VIDEO_OV2680=m +CONFIG_VIDEO_OV2685=m +CONFIG_VIDEO_OV2718=m +CONFIG_VIDEO_OV4686=m +CONFIG_VIDEO_OV4688=m +CONFIG_VIDEO_OV4689=y +CONFIG_VIDEO_OV50C40=m +CONFIG_VIDEO_OV5640=m +CONFIG_VIDEO_OV5645=m +CONFIG_VIDEO_OV5647=m +# CONFIG_VIDEO_OV5648 is not set +CONFIG_VIDEO_OV5670=m +CONFIG_VIDEO_OV5675=m +# CONFIG_VIDEO_OV5693 is not set +CONFIG_VIDEO_OV5695=y +CONFIG_VIDEO_OV6650=m +CONFIG_VIDEO_OV7251=y +CONFIG_VIDEO_OV7640=m +CONFIG_VIDEO_OV7670=m +CONFIG_VIDEO_OV772X=m +CONFIG_VIDEO_OV7740=m +CONFIG_VIDEO_OV8856=m +CONFIG_VIDEO_OV8858=m +# CONFIG_VIDEO_OV8865 is not set +CONFIG_VIDEO_OV9281=m +# CONFIG_VIDEO_OV9282 is not set +CONFIG_VIDEO_OV9640=m +CONFIG_VIDEO_OV9650=m +CONFIG_VIDEO_PREISP_DUMMY_SENSOR=m +CONFIG_VIDEO_RDACM20=m +# CONFIG_VIDEO_RDACM21 is not set +CONFIG_VIDEO_RJ54N1=m +CONFIG_VIDEO_S5C73M3=m +CONFIG_VIDEO_S5K3L6XX=m +# CONFIG_VIDEO_S5K3L8XX is not set +CONFIG_VIDEO_S5K4ECGX=m +CONFIG_VIDEO_S5K5BAF=m +CONFIG_VIDEO_S5K6A3=m +CONFIG_VIDEO_S5K6AA=m +CONFIG_VIDEO_S5KJN1=m +CONFIG_VIDEO_SC031GS=m +CONFIG_VIDEO_SC035GS=m +CONFIG_VIDEO_SC132GS=m +# CONFIG_VIDEO_SC1346 is not set +CONFIG_VIDEO_SC200AI=m +CONFIG_VIDEO_SC210IOT=m +CONFIG_VIDEO_SC2232=m +CONFIG_VIDEO_SC2239=m +# CONFIG_VIDEO_SC223A is not set +CONFIG_VIDEO_SC230AI=m +CONFIG_VIDEO_SC2310=m +CONFIG_VIDEO_SC2336=m +# CONFIG_VIDEO_SC2355 is not set +CONFIG_VIDEO_SC301IOT=m +CONFIG_VIDEO_SC3336=m +# CONFIG_VIDEO_SC3336P is not set +CONFIG_VIDEO_SC3338=m +CONFIG_VIDEO_SC401AI=m +CONFIG_VIDEO_SC4210=m +CONFIG_VIDEO_SC4238=m +CONFIG_VIDEO_SC430CS=m +CONFIG_VIDEO_SC4336=m +# CONFIG_VIDEO_SC4336P is not set +# CONFIG_VIDEO_SC450AI is not set +CONFIG_VIDEO_SC500AI=m +CONFIG_VIDEO_SC501AI=m +CONFIG_VIDEO_SC530AI=m +# CONFIG_VIDEO_SC5336 is not set +# CONFIG_VIDEO_SC830AI is not set +# CONFIG_VIDEO_SC831AI is not set +CONFIG_VIDEO_SC850SL=m +CONFIG_VIDEO_SENSOR_ADAPTER=m +CONFIG_VIDEO_SR030PC30=m +CONFIG_VIDEO_VS6624=m +# CONFIG_VIDEO_CCS is not set +CONFIG_VIDEO_ET8EK8=m +CONFIG_VIDEO_M5MOLS=m + +# +# Lens drivers +# +CONFIG_VIDEO_AD5820=m +CONFIG_VIDEO_AK7375=m +CONFIG_VIDEO_AW8601=m +# CONFIG_VIDEO_CES6301 is not set +CONFIG_VIDEO_CN3927V=m +CONFIG_VIDEO_DW9714=m +CONFIG_VIDEO_DW9763=m +CONFIG_VIDEO_DW9768=m +# CONFIG_VIDEO_DW9800V is not set +CONFIG_VIDEO_DW9800W=m +CONFIG_VIDEO_DW9807_VCM=m +CONFIG_VIDEO_FP5510=m +# end of Lens drivers + +# +# Flash devices +# +CONFIG_VIDEO_ADP1653=m +CONFIG_VIDEO_AW36518=m +CONFIG_VIDEO_LM3560=m +CONFIG_VIDEO_LM3646=m +CONFIG_VIDEO_SGM3784=m +# end of Flash devices + +# +# Audio decoders, processors and mixers +# +# CONFIG_VIDEO_CS3308 is not set +# CONFIG_VIDEO_CS5345 is not set +CONFIG_VIDEO_CS53L32A=m +CONFIG_VIDEO_MSP3400=m +CONFIG_VIDEO_SONY_BTF_MPX=m +# CONFIG_VIDEO_TDA1997X is not set +# CONFIG_VIDEO_TDA7432 is not set +# CONFIG_VIDEO_TDA9840 is not set +# CONFIG_VIDEO_TEA6415C is not set +# CONFIG_VIDEO_TEA6420 is not set +# CONFIG_VIDEO_TLV320AIC23B is not set +# CONFIG_VIDEO_TVAUDIO is not set +CONFIG_VIDEO_UDA1342=m +# CONFIG_VIDEO_VP27SMPX is not set +# CONFIG_VIDEO_WM8739 is not set +CONFIG_VIDEO_WM8775=m +# end of Audio decoders, processors and mixers + +# +# RDS decoders +# +CONFIG_VIDEO_SAA6588=m +# end of RDS decoders + +# +# Video decoders +# +# CONFIG_VIDEO_ADV7180 is not set +# CONFIG_VIDEO_ADV7183 is not set +# CONFIG_VIDEO_ADV748X is not set +# CONFIG_VIDEO_ADV7604 is not set +# CONFIG_VIDEO_ADV7842 is not set +# CONFIG_VIDEO_BT819 is not set +# CONFIG_VIDEO_BT856 is not set +# CONFIG_VIDEO_BT866 is not set +# CONFIG_VIDEO_EP9461E is not set +# CONFIG_VIDEO_ISL7998X is not set +# CONFIG_VIDEO_IT6616 is not set +# CONFIG_VIDEO_KS0127 is not set +# CONFIG_VIDEO_LT6911C is not set +# CONFIG_VIDEO_LT6911UXC is not set +# CONFIG_VIDEO_LT6911UXE is not set +# CONFIG_VIDEO_LT7911D is not set +# CONFIG_VIDEO_LT7911UXC is not set +# CONFIG_VIDEO_LT8619C is not set +# CONFIG_VIDEO_LT8668SX is not set +# CONFIG_VIDEO_MAX9286 is not set +# CONFIG_VIDEO_MAX96712 is not set +# CONFIG_VIDEO_MAX96714 is not set +# CONFIG_VIDEO_MAX96722 is not set +# CONFIG_VIDEO_MAX96756 is not set +# CONFIG_VIDEO_ML86V7667 is not set +# CONFIG_VIDEO_NVP6158 is not set +# CONFIG_VIDEO_NVP6188 is not set +# CONFIG_VIDEO_NVP6324 is not set +CONFIG_VIDEO_OTP_EEPROM=m +# CONFIG_VIDEO_SAA7110 is not set +CONFIG_VIDEO_SAA711X=m +# CONFIG_VIDEO_TC358743 is not set +# CONFIG_VIDEO_TC35874X is not set +# CONFIG_VIDEO_TECHPOINT is not set +# CONFIG_VIDEO_THCV244 is not set +# CONFIG_VIDEO_TVP514X is not set +CONFIG_VIDEO_TVP5150=m +# CONFIG_VIDEO_TVP7002 is not set +CONFIG_VIDEO_TW2804=m +CONFIG_VIDEO_TW9903=m +CONFIG_VIDEO_TW9906=m +# CONFIG_VIDEO_TW9910 is not set +# CONFIG_VIDEO_VPX3220 is not set +# CONFIG_VIDEO_RK628_CSI is not set +# CONFIG_VIDEO_RK628_BT1120 is not set +# CONFIG_VIDEO_MAXIM_SERDES is not set + +# +# Video and audio decoders +# +# CONFIG_VIDEO_SAA717X is not set +CONFIG_VIDEO_CX25840=m +# CONFIG_VIDEO_IT66353 is not set +# end of Video decoders + +# +# Video encoders +# +# CONFIG_VIDEO_AD9389B is not set +# CONFIG_VIDEO_ADV7170 is not set +# CONFIG_VIDEO_ADV7175 is not set +# CONFIG_VIDEO_ADV7343 is not set +# CONFIG_VIDEO_ADV7393 is not set +# CONFIG_VIDEO_ADV7511 is not set +# CONFIG_VIDEO_AK881X is not set +# CONFIG_VIDEO_SAA7127 is not set +# CONFIG_VIDEO_SAA7185 is not set +# CONFIG_VIDEO_THS8200 is not set +# end of Video encoders + +# +# Video improvement chips +# +# CONFIG_VIDEO_UPD64031A is not set +# CONFIG_VIDEO_UPD64083 is not set +# end of Video improvement chips + +# +# Audio/Video compression chips +# +CONFIG_VIDEO_SAA6752HS=m +# end of Audio/Video compression chips + +# +# SDR tuner chips +# +# CONFIG_SDR_MAX2175 is not set +# end of SDR tuner chips + +# +# Miscellaneous helper chips +# +# CONFIG_VIDEO_I2C is not set +# CONFIG_VIDEO_M52790 is not set +# CONFIG_VIDEO_RK_IRCUT is not set +# CONFIG_VIDEO_ST_MIPID02 is not set +# CONFIG_VIDEO_THS7303 is not set +# end of Miscellaneous helper chips + +# +# Media SPI Adapters +# +CONFIG_CXD2880_SPI_DRV=m +CONFIG_VIDEO_GS1662=m +# CONFIG_VIDEO_ROCKCHIP_PREISP is not set +# end of Media SPI Adapters + +CONFIG_MEDIA_TUNER=y + +# +# Customize TV tuners +# +CONFIG_MEDIA_TUNER_E4000=m +CONFIG_MEDIA_TUNER_FC0011=m +CONFIG_MEDIA_TUNER_FC0012=m +CONFIG_MEDIA_TUNER_FC0013=m +CONFIG_MEDIA_TUNER_FC2580=m +CONFIG_MEDIA_TUNER_IT913X=m +# CONFIG_MEDIA_TUNER_M88RS6000T is not set +# CONFIG_MEDIA_TUNER_MAX2165 is not set +CONFIG_MEDIA_TUNER_MC44S803=y +CONFIG_MEDIA_TUNER_MSI001=m +CONFIG_MEDIA_TUNER_MT2060=m +CONFIG_MEDIA_TUNER_MT2063=m +CONFIG_MEDIA_TUNER_MT20XX=y +CONFIG_MEDIA_TUNER_MT2131=m +# CONFIG_MEDIA_TUNER_MT2266 is not set +CONFIG_MEDIA_TUNER_MXL301RF=m +CONFIG_MEDIA_TUNER_MXL5005S=m +CONFIG_MEDIA_TUNER_MXL5007T=m +CONFIG_MEDIA_TUNER_QM1D1B0004=m +CONFIG_MEDIA_TUNER_QM1D1C0042=m +CONFIG_MEDIA_TUNER_QT1010=m +CONFIG_MEDIA_TUNER_R820T=m +CONFIG_MEDIA_TUNER_SI2157=m +CONFIG_MEDIA_TUNER_SIMPLE=y +CONFIG_MEDIA_TUNER_TDA18212=m +CONFIG_MEDIA_TUNER_TDA18218=m +# CONFIG_MEDIA_TUNER_TDA18250 is not set +CONFIG_MEDIA_TUNER_TDA18271=y +CONFIG_MEDIA_TUNER_TDA827X=y +CONFIG_MEDIA_TUNER_TDA8290=y +CONFIG_MEDIA_TUNER_TDA9887=y +CONFIG_MEDIA_TUNER_TEA5761=y +CONFIG_MEDIA_TUNER_TEA5767=y +CONFIG_MEDIA_TUNER_TUA9001=m +CONFIG_MEDIA_TUNER_XC2028=y +CONFIG_MEDIA_TUNER_XC4000=y +CONFIG_MEDIA_TUNER_XC5000=y +# end of Customize TV tuners + +# +# Customise DVB Frontends +# + +# +# Multistandard (satellite) frontends +# +CONFIG_DVB_M88DS3103=m +CONFIG_DVB_MXL5XX=m +# CONFIG_DVB_STB0899 is not set +# CONFIG_DVB_STB6100 is not set +CONFIG_DVB_STV090x=m +CONFIG_DVB_STV0910=m +CONFIG_DVB_STV6110x=m +CONFIG_DVB_STV6111=m + +# +# Multistandard (cable + terrestrial) frontends +# +CONFIG_DVB_DRXK=m +CONFIG_DVB_MN88472=m +CONFIG_DVB_MN88473=m +CONFIG_DVB_SI2165=m +CONFIG_DVB_TDA18271C2DD=m + +# +# DVB-S (satellite) frontends +# +# CONFIG_DVB_CX24110 is not set +CONFIG_DVB_CX24116=m +# CONFIG_DVB_CX24117 is not set +CONFIG_DVB_CX24120=m +CONFIG_DVB_CX24123=m +# CONFIG_DVB_DS3000 is not set +# CONFIG_DVB_MB86A16 is not set +CONFIG_DVB_MT312=m +CONFIG_DVB_S5H1420=m +# CONFIG_DVB_SI21XX is not set +# CONFIG_DVB_STB6000 is not set +# CONFIG_DVB_STV0288 is not set +CONFIG_DVB_STV0299=m +CONFIG_DVB_STV0900=m +CONFIG_DVB_STV6110=m +CONFIG_DVB_TDA10071=m +CONFIG_DVB_TDA10086=m +CONFIG_DVB_TDA8083=m +# CONFIG_DVB_TDA8261 is not set +CONFIG_DVB_TDA826X=m +CONFIG_DVB_TS2020=m +# CONFIG_DVB_TUA6100 is not set +CONFIG_DVB_TUNER_CX24113=m +CONFIG_DVB_TUNER_ITD1000=m +# CONFIG_DVB_VES1X93 is not set +CONFIG_DVB_ZL10036=m +CONFIG_DVB_ZL10039=m + +# +# DVB-T (terrestrial) frontends +# +CONFIG_DVB_AF9013=m +CONFIG_DVB_AS102_FE=m +CONFIG_DVB_CX22700=m +# CONFIG_DVB_CX22702 is not set +CONFIG_DVB_CXD2820R=m +CONFIG_DVB_CXD2841ER=m +# CONFIG_DVB_DIB3000MB is not set +# CONFIG_DVB_DIB3000MC is not set +# CONFIG_DVB_DIB7000M is not set +# CONFIG_DVB_DIB7000P is not set +# CONFIG_DVB_DIB9000 is not set +CONFIG_DVB_DRXD=m +CONFIG_DVB_EC100=m +# CONFIG_DVB_L64781 is not set +CONFIG_DVB_MT352=m +# CONFIG_DVB_NXT6000 is not set +CONFIG_DVB_RTL2830=m +CONFIG_DVB_RTL2832=m +CONFIG_DVB_RTL2832_SDR=m +# CONFIG_DVB_S5H1432 is not set +CONFIG_DVB_SI2168=m +# CONFIG_DVB_SP887X is not set +CONFIG_DVB_STV0367=m +CONFIG_DVB_TDA10048=m +CONFIG_DVB_TDA1004X=m +CONFIG_DVB_ZD1301_DEMOD=m +CONFIG_DVB_ZL10353=m +# CONFIG_DVB_CXD2880 is not set + +# +# DVB-C (cable) frontends +# +CONFIG_DVB_STV0297=m +# CONFIG_DVB_TDA10021 is not set +CONFIG_DVB_TDA10023=m +CONFIG_DVB_VES1820=m + +# +# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# +CONFIG_DVB_AU8522=m +CONFIG_DVB_AU8522_DTV=m +CONFIG_DVB_AU8522_V4L=m +CONFIG_DVB_BCM3510=m +CONFIG_DVB_LG2160=m +CONFIG_DVB_LGDT3305=m +CONFIG_DVB_LGDT3306A=m +CONFIG_DVB_LGDT330X=m +CONFIG_DVB_MXL692=m +CONFIG_DVB_NXT200X=m +# CONFIG_DVB_OR51132 is not set +# CONFIG_DVB_OR51211 is not set +CONFIG_DVB_S5H1409=m +CONFIG_DVB_S5H1411=m + +# +# ISDB-T (terrestrial) frontends +# +# CONFIG_DVB_DIB8000 is not set +CONFIG_DVB_MB86A20S=m +CONFIG_DVB_S921=m + +# +# ISDB-S (satellite) & ISDB-T (terrestrial) frontends +# +# CONFIG_DVB_MN88443X is not set +CONFIG_DVB_TC90522=m + +# +# Digital terrestrial only tuners/PLL +# +CONFIG_DVB_PLL=m +# CONFIG_DVB_TUNER_DIB0070 is not set +# CONFIG_DVB_TUNER_DIB0090 is not set + +# +# SEC control devices for DVB-S +# +CONFIG_DVB_A8293=m +CONFIG_DVB_AF9033=m +CONFIG_DVB_ASCOT2E=m +# CONFIG_DVB_ATBM8830 is not set +CONFIG_DVB_HELENE=m +CONFIG_DVB_HORUS3A=m +CONFIG_DVB_ISL6405=m +CONFIG_DVB_ISL6421=m +CONFIG_DVB_ISL6423=m +# CONFIG_DVB_IX2505V is not set +# CONFIG_DVB_LGS8GL5 is not set +# CONFIG_DVB_LGS8GXX is not set +CONFIG_DVB_LNBH25=m +# CONFIG_DVB_LNBH29 is not set +CONFIG_DVB_LNBP21=m +# CONFIG_DVB_LNBP22 is not set +# CONFIG_DVB_M88RS2000 is not set +# CONFIG_DVB_TDA665x is not set +CONFIG_DVB_DRX39XYJ=m + +# +# Common Interface (EN50221) controller drivers +# +CONFIG_DVB_CXD2099=m +CONFIG_DVB_SP2=m +# end of Customise DVB Frontends + +# +# Tools to develop new frontends +# +# CONFIG_DVB_DUMMY_FE is not set +# end of Media ancillary drivers + +# +# Graphics support +# +CONFIG_DRM=y +CONFIG_DRM_MIPI_DBI=m +CONFIG_DRM_EDID=y +# CONFIG_DRM_IGNORE_IOTCL_PERMIT is not set +CONFIG_DRM_MIPI_DSI=y +# CONFIG_DRM_DEBUG_MM is not set +CONFIG_DRM_KMS_HELPER=y +# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set +# CONFIG_DRM_DEBUG_MODESET_LOCK is not set +CONFIG_DRM_FBDEV_EMULATION=y +CONFIG_DRM_FBDEV_OVERALLOC=100 +# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set +CONFIG_DRM_LOAD_EDID_FIRMWARE=y +CONFIG_DRM_DP=y +CONFIG_DRM_DP_AUX_BUS=m +CONFIG_DRM_DISPLAY_HELPER=y +CONFIG_DRM_DISPLAY_DP_HELPER=y +CONFIG_DRM_DISPLAY_HDCP_HELPER=y +CONFIG_DRM_DISPLAY_HDMI_HELPER=y +CONFIG_DRM_DP_AUX_CHARDEV=y +# CONFIG_DRM_DP_CEC is not set +CONFIG_DRM_EXEC=m +CONFIG_DRM_GPUVM=m +CONFIG_DRM_GEM_DMA_HELPER=y +CONFIG_DRM_GEM_SHMEM_HELPER=m +CONFIG_DRM_SCHED=m + +# +# I2C encoder or helper chips +# +# CONFIG_DRM_I2C_CH7006 is not set +# CONFIG_DRM_I2C_SIL164 is not set +# CONFIG_DRM_I2C_NXP_TDA998X is not set +# CONFIG_DRM_I2C_NXP_TDA9950 is not set +# end of I2C encoder or helper chips + +# +# ARM devices +# +# CONFIG_DRM_HDLCD is not set +# CONFIG_DRM_MALI_DISPLAY is not set +# CONFIG_DRM_KOMEDA is not set +# end of ARM devices + +# CONFIG_DRM_RADEON is not set +# CONFIG_DRM_AMDGPU is not set +# CONFIG_DRM_NOUVEAU is not set +# CONFIG_DRM_VGEM is not set +# CONFIG_DRM_VKMS is not set +CONFIG_DRM_ROCKCHIP=y +# CONFIG_ROCKCHIP_DRM_DEBUG is not set +# CONFIG_ROCKCHIP_DRM_DIRECT_SHOW is not set +CONFIG_ROCKCHIP_VOP=y +CONFIG_ROCKCHIP_VOP2=y +CONFIG_ROCKCHIP_ANALOGIX_DP=y +CONFIG_ROCKCHIP_CDN_DP=y +# CONFIG_ROCKCHIP_DRM_TVE is not set +CONFIG_ROCKCHIP_DW_HDMI=y +CONFIG_ROCKCHIP_DW_MIPI_DSI=y +CONFIG_ROCKCHIP_DW_DP=y +CONFIG_ROCKCHIP_INNO_HDMI=y +CONFIG_ROCKCHIP_LVDS=y +# CONFIG_ROCKCHIP_PANEL_NOTIFIER is not set +CONFIG_ROCKCHIP_RGB=y +# CONFIG_ROCKCHIP_RK3066_HDMI is not set +# CONFIG_ROCKCHIP_VCONN is not set +# CONFIG_DRM_ROCKCHIP_VVOP is not set +CONFIG_ROCKCHIP_DW_HDCP2=y +# CONFIG_ROCKCHIP_DP_MST_AUX_CLIENT is not set +# CONFIG_DRM_VMWGFX is not set +# CONFIG_DRM_UDL is not set +# CONFIG_DRM_AST is not set +# CONFIG_DRM_MGAG200 is not set +# CONFIG_DRM_RCAR_DW_HDMI is not set +# CONFIG_DRM_RCAR_USE_LVDS is not set +# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set +# CONFIG_DRM_QXL is not set +# CONFIG_DRM_VIRTIO_GPU is not set +CONFIG_DRM_PANEL=y + +# +# Display Panels +# +CONFIG_DRM_PANEL_ABT_Y030XX067A=m +# CONFIG_DRM_PANEL_ARM_VERSATILE is not set +CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596=m +CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0=m +CONFIG_DRM_PANEL_BOE_HIMAX8279D=m +CONFIG_DRM_PANEL_BOE_TV101WUM_NL6=m +CONFIG_DRM_PANEL_DSI_CM=m +CONFIG_DRM_PANEL_LVDS=m +CONFIG_DRM_PANEL_SIMPLE=m +CONFIG_DRM_PANEL_EDP=m +CONFIG_DRM_PANEL_EBBG_FT8719=m +CONFIG_DRM_PANEL_ELIDA_KD35T133=m +CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02=m +CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D=m +# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set +CONFIG_DRM_PANEL_ILITEK_ILI9341=m +CONFIG_DRM_PANEL_ILITEK_ILI9881C=m +CONFIG_DRM_PANEL_INNOLUX_EJ030NA=m +CONFIG_DRM_PANEL_INNOLUX_P079ZCA=m +# CONFIG_DRM_PANEL_JADARD_JD9365DA_H3 is not set +CONFIG_DRM_PANEL_JDI_LT070ME05000=m +CONFIG_DRM_PANEL_JDI_R63452=m +CONFIG_DRM_PANEL_KHADAS_TS050=m +CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04=m +CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W=m +CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829=m +CONFIG_DRM_PANEL_SAMSUNG_LD9040=m +# CONFIG_DRM_PANEL_LG_LB035Q02 is not set +CONFIG_DRM_PANEL_LG_LG4573=m +# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set +CONFIG_DRM_PANEL_NEWVISION_NV3052C=m +CONFIG_DRM_PANEL_NOVATEK_NT35510=m +CONFIG_DRM_PANEL_NOVATEK_NT35560=m +CONFIG_DRM_PANEL_NOVATEK_NT35950=m +CONFIG_DRM_PANEL_NOVATEK_NT36672A=m +# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set +CONFIG_DRM_PANEL_MANTIX_MLAF057WE51=m +# CONFIG_DRM_PANEL_MAXIM_MAX96752F is not set +# CONFIG_DRM_PANEL_MAXIM_MAX96772 is not set +# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set +CONFIG_DRM_PANEL_ORISETECH_OTM8009A=m +# CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS is not set +CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00=m +# CONFIG_DRM_PANEL_RADXA_DISPLAY_8HD is not set +CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m +# CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set +# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set +CONFIG_DRM_PANEL_RONBO_RB070D30=m +CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=m +CONFIG_DRM_PANEL_SAMSUNG_DB7430=m +# CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set +CONFIG_DRM_PANEL_SAMSUNG_S6D27A1=m +CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2=m +CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03=m +# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set +CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01=m +CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=m +CONFIG_DRM_PANEL_SAMSUNG_SOFEF00=m +CONFIG_DRM_PANEL_SEIKO_43WVF1G=m +CONFIG_DRM_PANEL_SHARP_LQ101R1SX01=m +# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set +CONFIG_DRM_PANEL_SHARP_LS043T1LE01=m +CONFIG_DRM_PANEL_SHARP_LS060T1SX01=m +CONFIG_DRM_PANEL_SITRONIX_ST7701=m +CONFIG_DRM_PANEL_SITRONIX_ST7703=m +CONFIG_DRM_PANEL_SITRONIX_ST7789V=m +# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set +CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521=m +CONFIG_DRM_PANEL_TDO_TL070WSH30=m +# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set +# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set +CONFIG_DRM_PANEL_TPO_TPG110=m +# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set +CONFIG_DRM_PANEL_VISIONOX_RM69299=m +CONFIG_DRM_PANEL_WIDECHIPS_WS2401=m +CONFIG_DRM_PANEL_XINPENG_XPP055C272=m +# CONFIG_DRM_PANEL_INNOLUX_AFJ101_BA2131 is not set +# end of Display Panels + +CONFIG_DRM_BRIDGE=y +CONFIG_DRM_PANEL_BRIDGE=y + +# +# Display Interface Bridges +# +# CONFIG_DRM_CDNS_DSI is not set +# CONFIG_DRM_CHIPONE_ICN6211 is not set +# CONFIG_DRM_CHRONTEL_CH7033 is not set +CONFIG_DRM_DISPLAY_CONNECTOR=y +# CONFIG_DRM_ITE_IT6161 is not set +# CONFIG_DRM_ITE_IT6505 is not set +# CONFIG_DRM_LONTIUM_LT8912B is not set +# CONFIG_DRM_LONTIUM_LT9211 is not set +# CONFIG_DRM_LONTIUM_LT9611 is not set +# CONFIG_DRM_LONTIUM_LT9611UXC is not set +# CONFIG_DRM_ITE_IT66121 is not set +# CONFIG_DRM_LVDS_CODEC is not set +# CONFIG_DRM_MAXIM_MAX96745 is not set +# CONFIG_DRM_MAXIM_MAX96755F is not set +# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set +# CONFIG_DRM_NWL_MIPI_DSI is not set +# CONFIG_DRM_NXP_PTN3460 is not set +# CONFIG_DRM_PARADE_PS8622 is not set +# CONFIG_DRM_PARADE_PS8640 is not set +# CONFIG_DRM_RK1000_TVE is not set +# CONFIG_DRM_ROHM_BU18XL82 is not set +# CONFIG_DRM_SIL_SII8620 is not set +CONFIG_DRM_SII902X=y +# CONFIG_DRM_SII9234 is not set +# CONFIG_DRM_SIMPLE_BRIDGE is not set +# CONFIG_DRM_THINE_THC63LVD1024 is not set +# CONFIG_DRM_TOSHIBA_TC358762 is not set +# CONFIG_DRM_TOSHIBA_TC358764 is not set +# CONFIG_DRM_TOSHIBA_TC358767 is not set +# CONFIG_DRM_TOSHIBA_TC358768 is not set +# CONFIG_DRM_TOSHIBA_TC358775 is not set +# CONFIG_DRM_TI_DLPC3433 is not set +# CONFIG_DRM_TI_TFP410 is not set +# CONFIG_DRM_TI_SN65DSI83 is not set +# CONFIG_DRM_TI_SN65DSI86 is not set +# CONFIG_DRM_TI_TPD12S015 is not set +# CONFIG_DRM_ANALOGIX_ANX6345 is not set +# CONFIG_DRM_ANALOGIX_ANX78XX is not set +CONFIG_DRM_ANALOGIX_DP=y +# CONFIG_DRM_ANALOGIX_ANX7625 is not set +# CONFIG_DRM_I2C_ADV7511 is not set +# CONFIG_DRM_CDNS_MHDP8546 is not set +CONFIG_DRM_DW_HDMI=y +# CONFIG_DRM_DW_HDMI_AHB_AUDIO is not set +CONFIG_DRM_DW_HDMI_I2S_AUDIO=y +# CONFIG_DRM_DW_HDMI_GP_AUDIO is not set +CONFIG_DRM_DW_HDMI_CEC=y +CONFIG_DRM_DW_MIPI_DSI=y +# end of Display Interface Bridges + +# CONFIG_DRM_ETNAVIV is not set +# CONFIG_DRM_HISI_HIBMC is not set +# CONFIG_DRM_HISI_KIRIN is not set +# CONFIG_DRM_LOGICVC is not set +# CONFIG_DRM_ARCPGU is not set +# CONFIG_DRM_BOCHS is not set +# CONFIG_DRM_CIRRUS_QEMU is not set +# CONFIG_DRM_GM12U320 is not set +# CONFIG_DRM_PANEL_MIPI_DBI is not set +# CONFIG_DRM_SIMPLEDRM is not set +# CONFIG_TINYDRM_HX8357D is not set +# CONFIG_TINYDRM_ILI9163 is not set +# CONFIG_TINYDRM_ILI9225 is not set +# CONFIG_TINYDRM_ILI9341 is not set +# CONFIG_TINYDRM_ILI9486 is not set +# CONFIG_TINYDRM_MI0283QT is not set +# CONFIG_TINYDRM_REPAPER is not set +# CONFIG_TINYDRM_ST7586 is not set +# CONFIG_TINYDRM_ST7735R is not set +# CONFIG_DRM_PL111 is not set +CONFIG_DRM_LIMA=m +CONFIG_DRM_PANFROST=m +CONFIG_DRM_PANTHOR=m +# CONFIG_DRM_TIDSS is not set +# CONFIG_DRM_GUD is not set +# CONFIG_DRM_SSD130X is not set +# CONFIG_DRM_LEGACY is not set +CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y +CONFIG_DRM_NOMODESET=y +# CONFIG_MALI400 is not set +CONFIG_MALI_DEVFREQ=y +CONFIG_MALI_MIDGARD=y +# CONFIG_MALI_GATOR_SUPPORT is not set +# CONFIG_MALI_MIDGARD_ENABLE_TRACE is not set +# CONFIG_MALI_DMA_FENCE is not set +CONFIG_MALI_EXPERT=y +# CONFIG_MALI_CORESTACK is not set +# CONFIG_MALI_PRFCNT_SET_SECONDARY is not set +# CONFIG_MALI_PLATFORM_FAKE is not set +# CONFIG_MALI_PLATFORM_DEVICETREE is not set +CONFIG_MALI_PLATFORM_THIRDPARTY=y +CONFIG_MALI_PLATFORM_THIRDPARTY_NAME="rk" +CONFIG_MALI_DEBUG=y +CONFIG_MALI_FENCE_DEBUG=y +# CONFIG_MALI_NO_MALI is not set +# CONFIG_MALI_TRACE_TIMELINE is not set +# CONFIG_MALI_SYSTEM_TRACE is not set +# CONFIG_MALI_GPU_MMU_AARCH64 is not set +CONFIG_MALI_PWRSOFT_765=y +# CONFIG_MALI_KUTF is not set +CONFIG_MALI_BIFROST=y +CONFIG_MALI_PLATFORM_NAME="rk" +CONFIG_MALI_REAL_HW=y +# CONFIG_MALI_BIFROST_NO_MALI is not set + +# +# Platform specific options +# +# end of Platform specific options + +CONFIG_MALI_CSF_SUPPORT=y +CONFIG_MALI_BIFROST_DEVFREQ=y +CONFIG_MALI_BIFROST_GATOR_SUPPORT=y +CONFIG_MALI_BIFROST_ENABLE_TRACE=y +# CONFIG_MALI_DMA_BUF_MAP_ON_DEMAND is not set +# CONFIG_MALI_DMA_BUF_LEGACY_COMPAT is not set +# CONFIG_MALI_CORESIGHT is not set +CONFIG_MALI_BIFROST_EXPERT=y +# CONFIG_LARGE_PAGE_ALLOC_OVERRIDE is not set +# CONFIG_LARGE_PAGE_ALLOC is not set +# CONFIG_MALI_MEMORY_FULLY_BACKED is not set + +# +# Platform options +# + +# +# Debug options +# +CONFIG_MALI_BIFROST_DEBUG=y +CONFIG_MALI_BIFROST_FENCE_DEBUG=y +CONFIG_MALI_BIFROST_SYSTEM_TRACE=y + +# +# Instrumentation options +# +CONFIG_MALI_PRFCNT_SET_PRIMARY=y +# CONFIG_MALI_BIFROST_PRFCNT_SET_SECONDARY is not set +# CONFIG_MALI_PRFCNT_SET_TERTIARY is not set +# CONFIG_MALI_PRFCNT_SET_SELECT_VIA_DEBUG_FS is not set +# CONFIG_MALI_JOB_DUMP is not set + +# +# Workarounds +# +# CONFIG_MALI_HW_ERRATA_1485982_NOT_AFFECTED is not set +# CONFIG_MALI_HW_ERRATA_1485982_USE_CLOCK_ALTERNATIVE is not set +# CONFIG_MALI_ARBITRATION is not set + +# +# Frame buffer Devices +# +CONFIG_FB_CMDLINE=y +CONFIG_FB_NOTIFY=y +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SYS_FILLRECT=y +CONFIG_FB_SYS_COPYAREA=y +CONFIG_FB_SYS_IMAGEBLIT=y +# CONFIG_FB_FOREIGN_ENDIAN is not set +CONFIG_FB_SYS_FOPS=y +CONFIG_FB_DEFERRED_IO=y +CONFIG_FB_BACKLIGHT=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_CIRRUS is not set +# CONFIG_FB_PM2 is not set +# CONFIG_FB_ARMCLCD is not set +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +# CONFIG_FB_UVESA is not set +# CONFIG_FB_EFI is not set +# CONFIG_FB_OPENCORES is not set +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_NVIDIA is not set +# CONFIG_FB_RIVA is not set +# CONFIG_FB_I740 is not set +# CONFIG_FB_MATROX is not set +# CONFIG_FB_RADEON is not set +# CONFIG_FB_ATY128 is not set +# CONFIG_FB_ATY is not set +# CONFIG_FB_S3 is not set +# CONFIG_FB_SAVAGE is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_KYRO is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_VT8623 is not set +# CONFIG_FB_TRIDENT is not set +# CONFIG_FB_ARK is not set +# CONFIG_FB_PM3 is not set +# CONFIG_FB_CARMINE is not set +# CONFIG_FB_SMSCUFX is not set +# CONFIG_FB_UDL is not set +# CONFIG_FB_IBM_GXT4500 is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_SIMPLE is not set +# CONFIG_FB_SSD1307 is not set +# CONFIG_FB_SM712 is not set +# end of Frame buffer Devices + +# +# Backlight & LCD device support +# +CONFIG_LCD_CLASS_DEVICE=m +CONFIG_LCD_L4F00242T03=m +CONFIG_LCD_LMS283GF05=m +CONFIG_LCD_LTV350QV=m +CONFIG_LCD_ILI922X=m +CONFIG_LCD_ILI9320=m +CONFIG_LCD_TDO24M=m +CONFIG_LCD_VGG2432A4=m +CONFIG_LCD_PLATFORM=m +CONFIG_LCD_AMS369FG06=m +CONFIG_LCD_LMS501KF03=m +CONFIG_LCD_HX8357=m +CONFIG_LCD_OTM3225A=m +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_KTD253=m +CONFIG_BACKLIGHT_PWM=m +CONFIG_BACKLIGHT_QCOM_WLED=m +CONFIG_BACKLIGHT_ADP8860=m +CONFIG_BACKLIGHT_ADP8870=m +CONFIG_BACKLIGHT_LM3630A=m +CONFIG_BACKLIGHT_LM3639=m +CONFIG_BACKLIGHT_LP855X=m +CONFIG_BACKLIGHT_GPIO=m +CONFIG_BACKLIGHT_LV5207LP=m +CONFIG_BACKLIGHT_BD6107=m +CONFIG_BACKLIGHT_ARCXCNN=m +CONFIG_BACKLIGHT_LED=m +# end of Backlight & LCD device support + +# +# Rockchip Misc Video driver +# + +# +# RGA +# +# CONFIG_ROCKCHIP_RGA is not set +# end of RGA + +CONFIG_ROCKCHIP_MULTI_RGA=y +CONFIG_ROCKCHIP_RGA_ASYNC=y +# CONFIG_ROCKCHIP_RGA_PROC_FS is not set +CONFIG_ROCKCHIP_RGA_DEBUG_FS=y +CONFIG_ROCKCHIP_RGA_DEBUGGER=y +# CONFIG_ROCKCHIP_RVE is not set + +# +# IEP +# +CONFIG_IEP=y +# end of IEP + +CONFIG_ROCKCHIP_MPP_SERVICE=y +CONFIG_ROCKCHIP_MPP_PROC_FS=y +CONFIG_ROCKCHIP_MPP_RKVDEC=y +CONFIG_ROCKCHIP_MPP_RKVDEC2=y +CONFIG_ROCKCHIP_MPP_RKVENC=y +CONFIG_ROCKCHIP_MPP_RKVENC2=y +CONFIG_ROCKCHIP_MPP_VDPU1=y +CONFIG_ROCKCHIP_MPP_VEPU1=y +CONFIG_ROCKCHIP_MPP_VDPU2=y +CONFIG_ROCKCHIP_MPP_VEPU2=y +CONFIG_ROCKCHIP_MPP_IEP2=y +CONFIG_ROCKCHIP_MPP_JPGDEC=y +# CONFIG_ROCKCHIP_MPP_JPGENC is not set +CONFIG_ROCKCHIP_MPP_AV1DEC=y +# CONFIG_ROCKCHIP_MPP_VDPP is not set +# CONFIG_ROCKCHIP_DVBM is not set + +# +# Rockchip video tunnel support +# +# CONFIG_ROCKCHIP_VIDEO_TUNNEL is not set +# end of Rockchip video tunnel support +# end of Rockchip Misc Video driver + +CONFIG_VIDEOMODE_HELPERS=y +CONFIG_HDMI=y + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_DUMMY_CONSOLE_COLUMNS=80 +CONFIG_DUMMY_CONSOLE_ROWS=25 +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set +# end of Console display driver support + +# CONFIG_LOGO is not set +# end of Graphics support + +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_PCM_ELD=y +CONFIG_SND_PCM_IEC958=y +CONFIG_SND_DMAENGINE_PCM=y +CONFIG_SND_HWDEP=y +CONFIG_SND_SEQ_DEVICE=y +CONFIG_SND_RAWMIDI=y +CONFIG_SND_JACK=y +CONFIG_SND_JACK_INPUT_DEV=y +# CONFIG_SND_OSSEMUL is not set +CONFIG_SND_PCM_TIMER=y +CONFIG_SND_HRTIMER=y +CONFIG_SND_DYNAMIC_MINORS=y +CONFIG_SND_MAX_CARDS=32 +# CONFIG_SND_SUPPORT_OLD_API is not set +CONFIG_SND_PROC_FS=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +CONFIG_SND_CTL_FAST_LOOKUP=y +# CONFIG_SND_DEBUG is not set +# CONFIG_SND_CTL_INPUT_VALIDATION is not set +CONFIG_SND_SEQUENCER=y +CONFIG_SND_SEQ_DUMMY=y +CONFIG_SND_SEQ_HRTIMER_DEFAULT=y +CONFIG_SND_SEQ_MIDI_EVENT=y +CONFIG_SND_SEQ_MIDI=y +CONFIG_SND_DRIVERS=y +# CONFIG_SND_DUMMY is not set +CONFIG_SND_ALOOP=m +# CONFIG_SND_VIRMIDI is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_SERIAL_GENERIC is not set +# CONFIG_SND_MPU401 is not set +# CONFIG_SND_PCI is not set + +# +# HD-Audio +# +# end of HD-Audio + +CONFIG_SND_HDA_PREALLOC_SIZE=64 +# CONFIG_SND_SPI is not set +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=y +CONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y +# CONFIG_SND_USB_UA101 is not set +# CONFIG_SND_USB_CAIAQ is not set +# CONFIG_SND_USB_6FIRE is not set +# CONFIG_SND_USB_HIFACE is not set +# CONFIG_SND_BCD2000 is not set +# CONFIG_SND_USB_POD is not set +# CONFIG_SND_USB_PODHD is not set +# CONFIG_SND_USB_TONEPORT is not set +# CONFIG_SND_USB_VARIAX is not set +CONFIG_SND_SOC=y +CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y +# CONFIG_SND_SOC_ADI is not set +# CONFIG_SND_SOC_AMD_ACP is not set +# CONFIG_SND_AMD_ACP_CONFIG is not set +# CONFIG_SND_ATMEL_SOC is not set +# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set +# CONFIG_SND_DESIGNWARE_I2S is not set + +# +# SoC Audio for Freescale CPUs +# + +# +# Common SoC Audio options for Freescale CPUs: +# +# CONFIG_SND_SOC_FSL_ASRC is not set +# CONFIG_SND_SOC_FSL_SAI is not set +# CONFIG_SND_SOC_FSL_AUDMIX is not set +# CONFIG_SND_SOC_FSL_SSI is not set +# CONFIG_SND_SOC_FSL_SPDIF is not set +# CONFIG_SND_SOC_FSL_ESAI is not set +# CONFIG_SND_SOC_FSL_MICFIL is not set +# CONFIG_SND_SOC_FSL_XCVR is not set +# CONFIG_SND_SOC_IMX_AUDMUX is not set +# end of SoC Audio for Freescale CPUs + +# CONFIG_SND_I2S_HI6210_I2S is not set +# CONFIG_SND_SOC_IMG is not set +# CONFIG_SND_SOC_MTK_BTCVSD is not set +CONFIG_SND_SOC_ROCKCHIP=y +# CONFIG_SND_SOC_ROCKCHIP_DLP_PCM is not set +CONFIG_SND_SOC_ROCKCHIP_I2S=y +CONFIG_SND_SOC_ROCKCHIP_I2S_TDM=y +# CONFIG_SND_SOC_ROCKCHIP_I2S_TDM_MULTI_LANES is not set +# CONFIG_SND_SOC_ROCKCHIP_MULTI_DAIS is not set +CONFIG_SND_SOC_ROCKCHIP_PDM=y +# CONFIG_SND_SOC_ROCKCHIP_PDM_V2 is not set +CONFIG_SND_SOC_ROCKCHIP_SAI=y +# CONFIG_SND_SOC_ROCKCHIP_SAI_VERBOSE is not set +CONFIG_SND_SOC_ROCKCHIP_SPDIF=y +CONFIG_SND_SOC_ROCKCHIP_SPDIFRX=y +CONFIG_SND_SOC_ROCKCHIP_TRCM=y +# CONFIG_SND_SOC_ROCKCHIP_VAD is not set +CONFIG_SND_SOC_ROCKCHIP_MAX98090=y +CONFIG_SND_SOC_ROCKCHIP_MULTICODECS=y +CONFIG_SND_SOC_ROCKCHIP_RT5645=y +CONFIG_SND_SOC_ROCKCHIP_HDMI=y +# CONFIG_SND_SOC_RK3288_HDMI_ANALOG is not set +# CONFIG_SND_SOC_RK3399_GRU_SOUND is not set +# CONFIG_SND_SOC_SOF_TOPLEVEL is not set + +# +# STMicroelectronics STM32 SOC audio support +# +# end of STMicroelectronics STM32 SOC audio support + +# CONFIG_SND_SOC_XILINX_I2S is not set +# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set +# CONFIG_SND_SOC_XILINX_SPDIF is not set +# CONFIG_SND_SOC_XTFPGA_I2S is not set +CONFIG_SND_SOC_I2C_AND_SPI=y + +# +# CODEC drivers +# +# CONFIG_SND_SOC_AC97_CODEC is not set +# CONFIG_SND_SOC_ADAU1372_I2C is not set +# CONFIG_SND_SOC_ADAU1372_SPI is not set +# CONFIG_SND_SOC_ADAU1701 is not set +# CONFIG_SND_SOC_ADAU1761_I2C is not set +# CONFIG_SND_SOC_ADAU1761_SPI is not set +# CONFIG_SND_SOC_ADAU7002 is not set +# CONFIG_SND_SOC_ADAU7118_HW is not set +# CONFIG_SND_SOC_ADAU7118_I2C is not set +# CONFIG_SND_SOC_AK4104 is not set +# CONFIG_SND_SOC_AK4118 is not set +# CONFIG_SND_SOC_AK4375 is not set +# CONFIG_SND_SOC_AK4458 is not set +# CONFIG_SND_SOC_AK4554 is not set +# CONFIG_SND_SOC_AK4613 is not set +# CONFIG_SND_SOC_AK4642 is not set +# CONFIG_SND_SOC_AK5386 is not set +# CONFIG_SND_SOC_AK5558 is not set +# CONFIG_SND_SOC_ALC5623 is not set +# CONFIG_SND_SOC_AW8738 is not set +# CONFIG_SND_SOC_BD28623 is not set +# CONFIG_SND_SOC_BT_SCO is not set +# CONFIG_SND_SOC_CS35L32 is not set +# CONFIG_SND_SOC_CS35L33 is not set +# CONFIG_SND_SOC_CS35L34 is not set +# CONFIG_SND_SOC_CS35L35 is not set +# CONFIG_SND_SOC_CS35L36 is not set +# CONFIG_SND_SOC_CS35L41_SPI is not set +# CONFIG_SND_SOC_CS35L41_I2C is not set +# CONFIG_SND_SOC_CS35L45_SPI is not set +# CONFIG_SND_SOC_CS35L45_I2C is not set +# CONFIG_SND_SOC_CS42L42 is not set +# CONFIG_SND_SOC_CS42L51_I2C is not set +# CONFIG_SND_SOC_CS42L52 is not set +# CONFIG_SND_SOC_CS42L56 is not set +# CONFIG_SND_SOC_CS42L73 is not set +# CONFIG_SND_SOC_CS42L83 is not set +# CONFIG_SND_SOC_CS4234 is not set +# CONFIG_SND_SOC_CS4265 is not set +# CONFIG_SND_SOC_CS4270 is not set +# CONFIG_SND_SOC_CS4271_I2C is not set +# CONFIG_SND_SOC_CS4271_SPI is not set +# CONFIG_SND_SOC_CS42XX8_I2C is not set +# CONFIG_SND_SOC_CS43130 is not set +# CONFIG_SND_SOC_CS4341 is not set +# CONFIG_SND_SOC_CS4349 is not set +# CONFIG_SND_SOC_CS53L30 is not set +# CONFIG_SND_SOC_CX2072X is not set +# CONFIG_SND_SOC_DA7213 is not set +# CONFIG_SND_SOC_DMIC is not set +CONFIG_SND_SOC_DUMMY_CODEC=y +CONFIG_SND_SOC_HDMI_CODEC=y +# CONFIG_SND_SOC_ES7134 is not set +CONFIG_SND_SOC_ES7202=y +CONFIG_SND_SOC_ES7202_MIC_MAX_CHANNELS=2 +CONFIG_SND_SOC_ES7202_I2C_BUS=1 +# CONFIG_SND_SOC_ES7210 is not set +# CONFIG_SND_SOC_ES7241 is not set +CONFIG_SND_SOC_ES7243E=y +CONFIG_SND_SOC_ES8311=y +CONFIG_SND_SOC_ES8316=y +CONFIG_SND_SOC_ES8323=y +CONFIG_SND_SOC_ES8326=y +# CONFIG_SND_SOC_ES8328_I2C is not set +# CONFIG_SND_SOC_ES8328_SPI is not set +# CONFIG_SND_SOC_ES8396 is not set +# CONFIG_SND_SOC_GTM601 is not set +# CONFIG_SND_SOC_HDA is not set +# CONFIG_SND_SOC_ICS43432 is not set +# CONFIG_SND_SOC_INNO_RK3036 is not set +# CONFIG_SND_SOC_MAX98088 is not set +CONFIG_SND_SOC_MAX98090=y +# CONFIG_SND_SOC_MAX98357A is not set +# CONFIG_SND_SOC_MAX98504 is not set +# CONFIG_SND_SOC_MAX9867 is not set +# CONFIG_SND_SOC_MAX98927 is not set +# CONFIG_SND_SOC_MAX98520 is not set +# CONFIG_SND_SOC_MAX98373_I2C is not set +# CONFIG_SND_SOC_MAX98390 is not set +# CONFIG_SND_SOC_MAX98396 is not set +# CONFIG_SND_SOC_MAX9860 is not set +# CONFIG_SND_SOC_MSM8916_WCD_ANALOG is not set +# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set +# CONFIG_SND_SOC_PCM1681 is not set +# CONFIG_SND_SOC_PCM1789_I2C is not set +# CONFIG_SND_SOC_PCM179X_I2C is not set +# CONFIG_SND_SOC_PCM179X_SPI is not set +# CONFIG_SND_SOC_PCM186X_I2C is not set +# CONFIG_SND_SOC_PCM186X_SPI is not set +# CONFIG_SND_SOC_PCM3060_I2C is not set +# CONFIG_SND_SOC_PCM3060_SPI is not set +# CONFIG_SND_SOC_PCM3168A_I2C is not set +# CONFIG_SND_SOC_PCM3168A_SPI is not set +# CONFIG_SND_SOC_PCM5102A is not set +# CONFIG_SND_SOC_PCM512x_I2C is not set +# CONFIG_SND_SOC_PCM512x_SPI is not set +# CONFIG_SND_SOC_RK312X is not set +# CONFIG_SND_SOC_RK3228 is not set +CONFIG_SND_SOC_RK3308=y +CONFIG_SND_SOC_RK3328=y +CONFIG_SND_SOC_RK3528=y +# CONFIG_SND_SOC_RK730 is not set +CONFIG_SND_SOC_RK817=y +CONFIG_SND_SOC_RK_CODEC_DIGITAL=y +# CONFIG_SND_SOC_RK_DSM is not set +CONFIG_SND_SOC_RL6231=y +# CONFIG_SND_SOC_ROCKCHIP_SPI_CODEC is not set +CONFIG_SND_SOC_RT5616=y +# CONFIG_SND_SOC_RT5631 is not set +CONFIG_SND_SOC_RT5640=y +CONFIG_SND_SOC_RT5645=y +CONFIG_SND_SOC_RT5651=y +# CONFIG_SND_SOC_RT5659 is not set +# CONFIG_SND_SOC_RT9120 is not set +# CONFIG_SND_SOC_RV1106 is not set +# CONFIG_SND_SOC_SGTL5000 is not set +# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set +# CONFIG_SND_SOC_SIMPLE_MUX is not set +CONFIG_SND_SOC_SPDIF=y +# CONFIG_SND_SOC_SRC4XXX_I2C is not set +# CONFIG_SND_SOC_SSM2305 is not set +# CONFIG_SND_SOC_SSM2518 is not set +# CONFIG_SND_SOC_SSM2602_SPI is not set +# CONFIG_SND_SOC_SSM2602_I2C is not set +# CONFIG_SND_SOC_SSM4567 is not set +# CONFIG_SND_SOC_STA32X is not set +# CONFIG_SND_SOC_STA350 is not set +# CONFIG_SND_SOC_STI_SAS is not set +# CONFIG_SND_SOC_TAS2552 is not set +# CONFIG_SND_SOC_TAS2562 is not set +# CONFIG_SND_SOC_TAS2764 is not set +# CONFIG_SND_SOC_TAS2770 is not set +# CONFIG_SND_SOC_TAS2780 is not set +# CONFIG_SND_SOC_TAS5086 is not set +# CONFIG_SND_SOC_TAS571X is not set +# CONFIG_SND_SOC_TAS5720 is not set +# CONFIG_SND_SOC_TAS5805M is not set +# CONFIG_SND_SOC_TAS6424 is not set +# CONFIG_SND_SOC_TDA7419 is not set +# CONFIG_SND_SOC_TDA7803 is not set +# CONFIG_SND_SOC_TFA9879 is not set +# CONFIG_SND_SOC_TFA989X is not set +# CONFIG_SND_SOC_TLV320ADC3XXX is not set +# CONFIG_SND_SOC_TLV320AIC23_I2C is not set +# CONFIG_SND_SOC_TLV320AIC23_SPI is not set +# CONFIG_SND_SOC_TLV320AIC31XX is not set +# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set +# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set +# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set +# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set +# CONFIG_SND_SOC_TLV320ADCX140 is not set +CONFIG_SND_SOC_TS3A227E=y +# CONFIG_SND_SOC_TSCS42XX is not set +# CONFIG_SND_SOC_TSCS454 is not set +# CONFIG_SND_SOC_UDA1334 is not set +# CONFIG_SND_SOC_WM8510 is not set +# CONFIG_SND_SOC_WM8523 is not set +# CONFIG_SND_SOC_WM8524 is not set +# CONFIG_SND_SOC_WM8580 is not set +# CONFIG_SND_SOC_WM8711 is not set +# CONFIG_SND_SOC_WM8728 is not set +# CONFIG_SND_SOC_WM8731_I2C is not set +# CONFIG_SND_SOC_WM8731_SPI is not set +# CONFIG_SND_SOC_WM8737 is not set +# CONFIG_SND_SOC_WM8741 is not set +# CONFIG_SND_SOC_WM8750 is not set +# CONFIG_SND_SOC_WM8753 is not set +# CONFIG_SND_SOC_WM8770 is not set +# CONFIG_SND_SOC_WM8776 is not set +# CONFIG_SND_SOC_WM8782 is not set +# CONFIG_SND_SOC_WM8804_I2C is not set +# CONFIG_SND_SOC_WM8804_SPI is not set +# CONFIG_SND_SOC_WM8903 is not set +# CONFIG_SND_SOC_WM8904 is not set +# CONFIG_SND_SOC_WM8940 is not set +CONFIG_SND_SOC_WM8960=y +# CONFIG_SND_SOC_WM8962 is not set +# CONFIG_SND_SOC_WM8974 is not set +# CONFIG_SND_SOC_WM8978 is not set +# CONFIG_SND_SOC_WM8985 is not set +# CONFIG_SND_SOC_ZL38060 is not set +# CONFIG_SND_SOC_MAX9759 is not set +# CONFIG_SND_SOC_MT6351 is not set +# CONFIG_SND_SOC_MT6358 is not set +# CONFIG_SND_SOC_MT6660 is not set +# CONFIG_SND_SOC_NAU8315 is not set +# CONFIG_SND_SOC_NAU8540 is not set +# CONFIG_SND_SOC_NAU8810 is not set +# CONFIG_SND_SOC_NAU8821 is not set +# CONFIG_SND_SOC_NAU8822 is not set +# CONFIG_SND_SOC_NAU8824 is not set +# CONFIG_SND_SOC_TPA6130A2 is not set +# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set +# CONFIG_SND_SOC_LPASS_VA_MACRO is not set +# CONFIG_SND_SOC_LPASS_RX_MACRO is not set +# CONFIG_SND_SOC_LPASS_TX_MACRO is not set +CONFIG_SND_SOC_AW87XXX=y +# CONFIG_SND_SOC_AW882XX is not set +# CONFIG_SND_SOC_AW883XX is not set +# CONFIG_SND_SOC_IT6621 is not set +# end of CODEC drivers + +CONFIG_SND_SIMPLE_CARD_UTILS=y +CONFIG_SND_SIMPLE_CARD=y +# CONFIG_SND_AUDIO_GRAPH_CARD is not set +# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set +# CONFIG_SND_TEST_COMPONENT is not set +# CONFIG_SND_VIRTIO is not set + +# +# HID support +# +CONFIG_HID=y +CONFIG_HID_BATTERY_STRENGTH=y +CONFIG_HIDRAW=y +CONFIG_UHID=y +CONFIG_HID_GENERIC=y + +# +# Special HID drivers +# +# CONFIG_HID_A4TECH is not set +# CONFIG_HID_ACCUTOUCH is not set +# CONFIG_HID_ACRUX is not set +CONFIG_HID_APPLE=m +# CONFIG_HID_APPLEIR is not set +# CONFIG_HID_ASUS is not set +# CONFIG_HID_AUREAL is not set +# CONFIG_HID_BELKIN is not set +# CONFIG_HID_BETOP_FF is not set +# CONFIG_HID_BIGBEN_FF is not set +# CONFIG_HID_CHERRY is not set +# CONFIG_HID_CHICONY is not set +# CONFIG_HID_CORSAIR is not set +# CONFIG_HID_COUGAR is not set +# CONFIG_HID_MACALLY is not set +# CONFIG_HID_PRODIKEYS is not set +# CONFIG_HID_CMEDIA is not set +# CONFIG_HID_CP2112 is not set +# CONFIG_HID_CREATIVE_SB0540 is not set +# CONFIG_HID_CYPRESS is not set +# CONFIG_HID_DRAGONRISE is not set +# CONFIG_HID_EMS_FF is not set +# CONFIG_HID_ELAN is not set +# CONFIG_HID_ELECOM is not set +# CONFIG_HID_ELO is not set +# CONFIG_HID_EZKEY is not set +# CONFIG_HID_FT260 is not set +# CONFIG_HID_GEMBIRD is not set +# CONFIG_HID_GFRM is not set +# CONFIG_HID_GLORIOUS is not set +# CONFIG_HID_HOLTEK is not set +# CONFIG_HID_VIVALDI is not set +# CONFIG_HID_GT683R is not set +# CONFIG_HID_KEYTOUCH is not set +# CONFIG_HID_KYE is not set +# CONFIG_HID_UCLOGIC is not set +# CONFIG_HID_WALTOP is not set +# CONFIG_HID_VIEWSONIC is not set +# CONFIG_HID_VRC2 is not set +# CONFIG_HID_XIAOMI is not set +# CONFIG_HID_GYRATION is not set +# CONFIG_HID_ICADE is not set +# CONFIG_HID_ITE is not set +# CONFIG_HID_JABRA is not set +# CONFIG_HID_TWINHAN is not set +CONFIG_HID_KENSINGTON=m +# CONFIG_HID_LCPOWER is not set +# CONFIG_HID_LED is not set +# CONFIG_HID_LENOVO is not set +# CONFIG_HID_LETSKETCH is not set +# CONFIG_HID_LOGITECH is not set +CONFIG_HID_MAGICMOUSE=m +# CONFIG_HID_MALTRON is not set +# CONFIG_HID_MAYFLASH is not set +# CONFIG_HID_MEGAWORLD_FF is not set +# CONFIG_HID_REDRAGON is not set +CONFIG_HID_MICROSOFT=m +# CONFIG_HID_MONTEREY is not set +CONFIG_HID_MULTITOUCH=m +CONFIG_HID_NINTENDO=m +# CONFIG_NINTENDO_FF is not set +# CONFIG_HID_NTI is not set +# CONFIG_HID_NTRIG is not set +# CONFIG_HID_ORTEK is not set +# CONFIG_HID_PANTHERLORD is not set +# CONFIG_HID_PENMOUNT is not set +# CONFIG_HID_PETALYNX is not set +# CONFIG_HID_PICOLCD is not set +# CONFIG_HID_PLANTRONICS is not set +# CONFIG_HID_PXRC is not set +# CONFIG_HID_RAZER is not set +# CONFIG_HID_PRIMAX is not set +# CONFIG_HID_RETRODE is not set +CONFIG_HID_ROCCAT=m +CONFIG_HID_SAITEK=m +# CONFIG_HID_SAMSUNG is not set +# CONFIG_HID_SEMITEK is not set +# CONFIG_HID_SIGMAMICRO is not set +CONFIG_HID_SONY=m +# CONFIG_SONY_FF is not set +# CONFIG_HID_SPEEDLINK is not set +CONFIG_HID_STEAM=m +CONFIG_HID_STEELSERIES=m +# CONFIG_HID_SUNPLUS is not set +# CONFIG_HID_RMI is not set +# CONFIG_HID_GREENASIA is not set +# CONFIG_HID_SMARTJOYPLUS is not set +# CONFIG_HID_TIVO is not set +# CONFIG_HID_TOPSEED is not set +# CONFIG_HID_TOPRE is not set +# CONFIG_HID_THINGM is not set +# CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_UDRAW_PS3 is not set +# CONFIG_HID_U2FZERO is not set +CONFIG_HID_WACOM=y +CONFIG_HID_WIIMOTE=m +# CONFIG_HID_XINMO is not set +# CONFIG_HID_ZEROPLUS is not set +# CONFIG_HID_ZYDACRON is not set +# CONFIG_HID_SENSOR_HUB is not set +# CONFIG_HID_ALPS is not set +# CONFIG_HID_MCP2221 is not set +# end of Special HID drivers + +# +# USB HID support +# +CONFIG_USB_HID=y +# CONFIG_HID_PID is not set +CONFIG_USB_HIDDEV=y +# end of USB HID support + +# +# I2C HID support +# +# CONFIG_I2C_HID_OF is not set +# CONFIG_I2C_HID_OF_ELAN is not set +# CONFIG_I2C_HID_OF_GOODIX is not set +# end of I2C HID support +# end of HID support + +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_COMMON=y +CONFIG_USB_LED_TRIG=y +CONFIG_USB_ULPI_BUS=m +CONFIG_USB_CONN_GPIO=m +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB=y +CONFIG_USB_PCI=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEFAULT_PERSIST is not set +# CONFIG_USB_FEW_INIT_RETRIES is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +CONFIG_USB_OTG=y +# CONFIG_USB_OTG_PRODUCTLIST is not set +# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set +# CONFIG_USB_OTG_FSM is not set +# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set +CONFIG_USB_AUTOSUSPEND_DELAY=2 +CONFIG_USB_MON=m + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +CONFIG_USB_XHCI_HCD=y +# CONFIG_USB_XHCI_DBGCAP is not set +CONFIG_USB_XHCI_PCI=y +# CONFIG_USB_XHCI_PCI_RENESAS is not set +CONFIG_USB_XHCI_PLATFORM=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_EHCI_TT_NEWSCHED=y +CONFIG_USB_EHCI_PCI=y +# CONFIG_USB_EHCI_FSL is not set +CONFIG_USB_EHCI_HCD_PLATFORM=y +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_FOTG210_HCD is not set +# CONFIG_USB_MAX3421_HCD is not set +CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_HCD_PCI is not set +CONFIG_USB_OHCI_HCD_PLATFORM=y +# CONFIG_USB_UHCI_HCD is not set +# CONFIG_USB_U132_HCD is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_HCD_BCMA is not set +# CONFIG_USB_HCD_SSB is not set +# CONFIG_USB_HCD_TEST_MODE is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=y +CONFIG_USB_PRINTER=m +CONFIG_USB_WDM=m +CONFIG_USB_TMC=m + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_REALTEK=m +CONFIG_REALTEK_AUTOPM=y +CONFIG_USB_STORAGE_DATAFAB=m +CONFIG_USB_STORAGE_FREECOM=m +CONFIG_USB_STORAGE_ISD200=m +CONFIG_USB_STORAGE_USBAT=m +CONFIG_USB_STORAGE_SDDR09=m +CONFIG_USB_STORAGE_SDDR55=m +CONFIG_USB_STORAGE_JUMPSHOT=m +CONFIG_USB_STORAGE_ALAUDA=m +CONFIG_USB_STORAGE_ONETOUCH=m +CONFIG_USB_STORAGE_KARMA=m +CONFIG_USB_STORAGE_CYPRESS_ATACB=m +CONFIG_USB_STORAGE_ENE_UB6250=m +CONFIG_USB_UAS=y + +# +# USB Imaging devices +# +CONFIG_USB_MDC800=m +CONFIG_USB_MICROTEK=m +CONFIG_USBIP_CORE=m +CONFIG_USBIP_VHCI_HCD=m +CONFIG_USBIP_VHCI_HC_PORTS=8 +CONFIG_USBIP_VHCI_NR_HCS=1 +CONFIG_USBIP_HOST=m +CONFIG_USBIP_VUDC=m +CONFIG_USBIP_DEBUG=y +# CONFIG_USB_CDNS_SUPPORT is not set +# CONFIG_USB_MUSB_HDRC is not set +CONFIG_USB_DWC3=y +# CONFIG_USB_DWC3_HOST is not set +# CONFIG_USB_DWC3_GADGET is not set +CONFIG_USB_DWC3_DUAL_ROLE=y + +# +# Platform Glue Driver Support +# +CONFIG_USB_DWC3_HAPS=y +CONFIG_USB_DWC3_OF_SIMPLE=y +CONFIG_USB_DWC3_ROCKCHIP_INNO=y +CONFIG_USB_DWC2=y +# CONFIG_USB_DWC2_HOST is not set + +# +# Gadget/Dual-role mode requires USB Gadget support to be enabled +# +# CONFIG_USB_DWC2_PERIPHERAL is not set +CONFIG_USB_DWC2_DUAL_ROLE=y +# CONFIG_USB_DWC2_PCI is not set +# CONFIG_USB_DWC2_DEBUG is not set +# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set +# CONFIG_USB_CHIPIDEA is not set +# CONFIG_USB_ISP1760 is not set + +# +# USB port drivers +# +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_SIMPLE=m +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_CP210X=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_F81232=m +CONFIG_USB_SERIAL_F8153X=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_METRO=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_MXUPORT=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_OTI6858=m +CONFIG_USB_SERIAL_QCAUX=m +CONFIG_USB_SERIAL_QUALCOMM=m +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SAFE_PADDED=y +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_SYMBOL=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_WWAN=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +CONFIG_USB_SERIAL_XSENS_MT=m +CONFIG_USB_SERIAL_WISHBONE=m +CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_QT2=m +CONFIG_USB_SERIAL_UPD78F0730=m +# CONFIG_USB_SERIAL_XR is not set +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +CONFIG_USB_EMI62=m +CONFIG_USB_EMI26=m +CONFIG_USB_ADUTUX=m +CONFIG_USB_SEVSEG=m +CONFIG_USB_LEGOTOWER=m +CONFIG_USB_LCD=m +CONFIG_USB_CYPRESS_CY7C63=m +CONFIG_USB_CYTHERM=m +CONFIG_USB_IDMOUSE=m +CONFIG_USB_FTDI_ELAN=m +CONFIG_USB_APPLEDISPLAY=m +CONFIG_APPLE_MFI_FASTCHARGE=m +CONFIG_USB_SISUSBVGA=m +CONFIG_USB_LD=m +CONFIG_USB_TRANCEVIBRATOR=m +CONFIG_USB_IOWARRIOR=m +CONFIG_USB_TEST=m +CONFIG_USB_EHSET_TEST_FIXTURE=m +CONFIG_USB_ISIGHTFW=m +CONFIG_USB_YUREX=m +CONFIG_USB_EZUSB_FX2=y +# CONFIG_USB_HUB_USB251XB is not set +# CONFIG_USB_HSIC_USB3503 is not set +# CONFIG_USB_HSIC_USB4604 is not set +# CONFIG_USB_LINK_LAYER_TEST is not set +# CONFIG_USB_CHAOSKEY is not set +# CONFIG_USB_ONBOARD_HUB is not set +CONFIG_USB_ATM=m +# CONFIG_USB_SPEEDTOUCH is not set +# CONFIG_USB_CXACRU is not set +# CONFIG_USB_UEAGLEATM is not set +# CONFIG_USB_XUSBATM is not set + +# +# USB Physical Layer drivers +# +CONFIG_USB_PHY=y +# CONFIG_NOP_USB_XCEIV is not set +# CONFIG_USB_GPIO_VBUS is not set +# CONFIG_USB_ISP1301 is not set +# CONFIG_USB_ULPI is not set +# end of USB Physical Layer drivers + +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG is not set +CONFIG_USB_GADGET_DEBUG_FILES=y +# CONFIG_USB_GADGET_DEBUG_FS is not set +CONFIG_USB_GADGET_VBUS_DRAW=500 +CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 +CONFIG_U_SERIAL_CONSOLE=y + +# +# USB Peripheral Controller +# +CONFIG_USB_FOTG210_UDC=m +CONFIG_USB_GR_UDC=m +CONFIG_USB_R8A66597=m +CONFIG_USB_PXA27X=m +CONFIG_USB_MV_UDC=m +CONFIG_USB_MV_U3D=m +CONFIG_USB_SNP_CORE=m +CONFIG_USB_SNP_UDC_PLAT=m +CONFIG_USB_M66592=m +CONFIG_USB_BDC_UDC=m +CONFIG_USB_AMD5536UDC=m +CONFIG_USB_NET2272=m +CONFIG_USB_NET2272_DMA=y +CONFIG_USB_NET2280=m +CONFIG_USB_GOKU=m +CONFIG_USB_EG20T=m +CONFIG_USB_GADGET_XILINX=m +CONFIG_USB_MAX3420_UDC=m +CONFIG_USB_DUMMY_HCD=m +# end of USB Peripheral Controller + +CONFIG_USB_LIBCOMPOSITE=y +CONFIG_USB_F_ACM=y +CONFIG_USB_F_SS_LB=m +CONFIG_USB_U_SERIAL=y +CONFIG_USB_U_ETHER=y +CONFIG_USB_U_AUDIO=y +CONFIG_USB_F_SERIAL=y +CONFIG_USB_F_OBEX=y +CONFIG_USB_F_NCM=y +CONFIG_USB_F_ECM=y +CONFIG_USB_F_EEM=y +CONFIG_USB_F_SUBSET=y +CONFIG_USB_F_RNDIS=y +CONFIG_USB_F_MASS_STORAGE=y +CONFIG_USB_F_FS=y +CONFIG_USB_F_UAC1=y +CONFIG_USB_F_UAC1_LEGACY=y +CONFIG_USB_F_UAC2=y +CONFIG_USB_F_UVC=y +CONFIG_USB_F_MIDI=y +CONFIG_USB_F_HID=y +CONFIG_USB_F_PRINTER=y +CONFIG_USB_CONFIGFS=y +CONFIG_USB_CONFIGFS_UEVENT=y +CONFIG_USB_CONFIGFS_SERIAL=y +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_OBEX=y +CONFIG_USB_CONFIGFS_NCM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_ECM_SUBSET=y +CONFIG_USB_CONFIGFS_RNDIS=y +CONFIG_USB_CONFIGFS_EEM=y +# CONFIG_USB_CONFIGFS_PHONET is not set +CONFIG_USB_CONFIGFS_MASS_STORAGE=y +# CONFIG_USB_CONFIGFS_F_LB_SS is not set +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC1_LEGACY=y +CONFIG_USB_CONFIGFS_F_UAC2=y +CONFIG_USB_CONFIGFS_F_MIDI=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_CONFIGFS_F_UVC=y +CONFIG_USB_CONFIGFS_F_PRINTER=y +# CONFIG_USB_CONFIGFS_F_TCM is not set + +# +# USB Gadget precomposed configurations +# +CONFIG_USB_ZERO=m +CONFIG_USB_ZERO_HNPTEST=y +CONFIG_USB_AUDIO=m +CONFIG_GADGET_UAC1=y +CONFIG_GADGET_UAC1_LEGACY=y +CONFIG_USB_ETH=m +CONFIG_USB_ETH_RNDIS=y +CONFIG_USB_ETH_EEM=y +CONFIG_USB_G_NCM=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_FUNCTIONFS=m +CONFIG_USB_FUNCTIONFS_ETH=y +CONFIG_USB_FUNCTIONFS_RNDIS=y +CONFIG_USB_FUNCTIONFS_GENERIC=y +CONFIG_USB_MASS_STORAGE=m +# CONFIG_USB_GADGET_TARGET is not set +CONFIG_USB_G_SERIAL=m +CONFIG_USB_MIDI_GADGET=m +CONFIG_USB_G_PRINTER=m +CONFIG_USB_CDC_COMPOSITE=m +# CONFIG_USB_G_NOKIA is not set +CONFIG_USB_G_ACM_MS=m +CONFIG_USB_G_MULTI=m +CONFIG_USB_G_MULTI_RNDIS=y +CONFIG_USB_G_MULTI_CDC=y +CONFIG_USB_G_HID=m +CONFIG_USB_G_DBGP=m +# CONFIG_USB_G_DBGP_PRINTK is not set +CONFIG_USB_G_DBGP_SERIAL=y +CONFIG_USB_G_WEBCAM=m +CONFIG_USB_RAW_GADGET=m +# end of USB Gadget precomposed configurations + +CONFIG_TYPEC=y +CONFIG_TYPEC_TCPM=y +CONFIG_TYPEC_TCPCI=y +# CONFIG_TYPEC_ET7303 is not set +CONFIG_TYPEC_HUSB311=y +# CONFIG_TYPEC_RT1711H is not set +# CONFIG_TYPEC_TCPCI_MAXIM is not set +CONFIG_TYPEC_FUSB302=y +# CONFIG_TYPEC_UCSI is not set +# CONFIG_TYPEC_TPS6598X is not set +# CONFIG_TYPEC_ANX7411 is not set +# CONFIG_TYPEC_RT1719 is not set +# CONFIG_TYPEC_HD3SS3220 is not set +# CONFIG_TYPEC_STUSB160X is not set +# CONFIG_TYPEC_WUSB3801 is not set + +# +# USB Type-C Multiplexer/DeMultiplexer Switch support +# +# CONFIG_TYPEC_MUX_FSA4480 is not set +# CONFIG_TYPEC_MUX_PI3USB30532 is not set +# end of USB Type-C Multiplexer/DeMultiplexer Switch support + +# +# USB Type-C Alternate Mode drivers +# +CONFIG_TYPEC_DP_ALTMODE=y +# CONFIG_TYPEC_NVIDIA_ALTMODE is not set +# end of USB Type-C Alternate Mode drivers + +CONFIG_USB_ROLE_SWITCH=y +CONFIG_MMC=y +CONFIG_PWRSEQ_EMMC=y +# CONFIG_PWRSEQ_SD8787 is not set +CONFIG_PWRSEQ_SIMPLE=y +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_MINORS=32 +# CONFIG_SDIO_UART is not set +CONFIG_MMC_TEST=y + +# +# MMC/SD/SDIO Host Controller Drivers +# +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_ARMMMCI is not set +CONFIG_MMC_SDHCI=y +# CONFIG_MMC_SDHCI_PCI is not set +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_OF_ARASAN=y +# CONFIG_MMC_SDHCI_OF_AT91 is not set +CONFIG_MMC_SDHCI_OF_DWCMSHC=y +# CONFIG_MMC_SDHCI_CADENCE is not set +# CONFIG_MMC_SDHCI_F_SDH30 is not set +# CONFIG_MMC_SDHCI_MILBEAUT is not set +# CONFIG_MMC_TIFM_SD is not set +# CONFIG_MMC_SPI is not set +# CONFIG_MMC_CB710 is not set +# CONFIG_MMC_VIA_SDMMC is not set +CONFIG_MMC_DW=y +CONFIG_MMC_DW_PLTFM=y +# CONFIG_MMC_DW_BLUEFIELD is not set +# CONFIG_MMC_DW_EXYNOS is not set +# CONFIG_MMC_DW_HI3798CV200 is not set +# CONFIG_MMC_DW_K3 is not set +# CONFIG_MMC_DW_PCI is not set +CONFIG_MMC_DW_ROCKCHIP=y +# CONFIG_MMC_VUB300 is not set +# CONFIG_MMC_USHC is not set +# CONFIG_MMC_USDHI6ROL0 is not set +CONFIG_MMC_CQHCI=y +CONFIG_MMC_HSQ=y +# CONFIG_MMC_TOSHIBA_PCI is not set +# CONFIG_MMC_MTK is not set +# CONFIG_MMC_SDHCI_XENON is not set +# CONFIG_SCSI_UFSHCD is not set +# CONFIG_MEMSTICK is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +# CONFIG_LEDS_CLASS_FLASH is not set +# CONFIG_LEDS_CLASS_MULTICOLOR is not set +# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set + +# +# LED drivers +# +# CONFIG_LEDS_AN30259A is not set +# CONFIG_LEDS_AW2013 is not set +# CONFIG_LEDS_BCM6328 is not set +# CONFIG_LEDS_BCM6358 is not set +# CONFIG_LEDS_CR0014114 is not set +# CONFIG_LEDS_EL15203000 is not set +# CONFIG_LEDS_LM3530 is not set +# CONFIG_LEDS_LM3532 is not set +# CONFIG_LEDS_LM3642 is not set +# CONFIG_LEDS_LM3692X is not set +# CONFIG_LEDS_PCA9532 is not set +CONFIG_LEDS_GPIO=y +# CONFIG_LEDS_LP3944 is not set +# CONFIG_LEDS_LP3952 is not set +# CONFIG_LEDS_LP50XX is not set +# CONFIG_LEDS_LP55XX_COMMON is not set +# CONFIG_LEDS_LP8860 is not set +# CONFIG_LEDS_PCA955X is not set +# CONFIG_LEDS_PCA963X is not set +# CONFIG_LEDS_DAC124S085 is not set +# CONFIG_LEDS_PWM is not set +# CONFIG_LEDS_REGULATOR is not set +# CONFIG_LEDS_BD2802 is not set +# CONFIG_LEDS_LT3593 is not set +# CONFIG_LEDS_TCA6507 is not set +# CONFIG_LEDS_TLC591XX is not set +# CONFIG_LEDS_LM355x is not set +# CONFIG_LEDS_IS31FL319X is not set +CONFIG_LEDS_IS31FL32XX=y + +# +# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) +# +# CONFIG_LEDS_BLINKM is not set +# CONFIG_LEDS_SYSCON is not set +# CONFIG_LEDS_MLXREG is not set +# CONFIG_LEDS_USER is not set +# CONFIG_LEDS_SPI_BYTE is not set +# CONFIG_LEDS_TI_LMU_COMMON is not set + +# +# Flash and Torch LED drivers +# + +# +# RGB LED drivers +# + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_DISK=y +CONFIG_LEDS_TRIGGER_MTD=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_ACTIVITY=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y + +# +# iptables trigger is under Netfilter config (LED target) +# +CONFIG_LEDS_TRIGGER_TRANSIENT=y +CONFIG_LEDS_TRIGGER_CAMERA=y +CONFIG_LEDS_TRIGGER_PANIC=y +CONFIG_LEDS_TRIGGER_NETDEV=y +CONFIG_LEDS_TRIGGER_PATTERN=m +CONFIG_LEDS_TRIGGER_AUDIO=m +# CONFIG_LEDS_TRIGGER_TTY is not set + +# +# Simple LED drivers +# +# CONFIG_ACCESSIBILITY is not set +# CONFIG_INFINIBAND is not set +CONFIG_EDAC_SUPPORT=y +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +CONFIG_RTC_SYSTOHC=y +CONFIG_RTC_SYSTOHC_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set +CONFIG_RTC_NVMEM=y + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_ABB5ZES3 is not set +# CONFIG_RTC_DRV_ABEOZ9 is not set +# CONFIG_RTC_DRV_ABX80X is not set +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +CONFIG_RTC_DRV_HYM8563=y +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_NCT3018Y is not set +CONFIG_RTC_DRV_RK808=y +# CONFIG_RTC_DRV_ROCKCHIP is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_ISL12022 is not set +# CONFIG_RTC_DRV_ISL12026 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8523 is not set +# CONFIG_RTC_DRV_PCF85063 is not set +# CONFIG_RTC_DRV_PCF85363 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_BQ32K is not set +# CONFIG_RTC_DRV_TPS6586X is not set +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8010 is not set +# CONFIG_RTC_DRV_RX8581 is not set +# CONFIG_RTC_DRV_RX8025 is not set +# CONFIG_RTC_DRV_EM3027 is not set +# CONFIG_RTC_DRV_RV3028 is not set +# CONFIG_RTC_DRV_RV3032 is not set +# CONFIG_RTC_DRV_RV8803 is not set +# CONFIG_RTC_DRV_SD3078 is not set + +# +# SPI RTC drivers +# +# CONFIG_RTC_DRV_M41T93 is not set +# CONFIG_RTC_DRV_M41T94 is not set +# CONFIG_RTC_DRV_DS1302 is not set +# CONFIG_RTC_DRV_DS1305 is not set +# CONFIG_RTC_DRV_DS1343 is not set +# CONFIG_RTC_DRV_DS1347 is not set +# CONFIG_RTC_DRV_DS1390 is not set +# CONFIG_RTC_DRV_MAX6916 is not set +# CONFIG_RTC_DRV_R9701 is not set +# CONFIG_RTC_DRV_RX4581 is not set +# CONFIG_RTC_DRV_RS5C348 is not set +# CONFIG_RTC_DRV_MAX6902 is not set +# CONFIG_RTC_DRV_PCF2123 is not set +# CONFIG_RTC_DRV_MCP795 is not set +CONFIG_RTC_I2C_AND_SPI=y + +# +# SPI and I2C RTC drivers +# +# CONFIG_RTC_DRV_DS3232 is not set +# CONFIG_RTC_DRV_PCF2127 is not set +# CONFIG_RTC_DRV_RV3029C2 is not set +# CONFIG_RTC_DRV_RX6110 is not set + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1685_FAMILY is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_DS2404 is not set +# CONFIG_RTC_DRV_EFI is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set +# CONFIG_RTC_DRV_OPTEE is not set +# CONFIG_RTC_DRV_ZYNQMP is not set + +# +# on-CPU RTC drivers +# +# CONFIG_RTC_DRV_PL030 is not set +# CONFIG_RTC_DRV_PL031 is not set +# CONFIG_RTC_DRV_CADENCE is not set +# CONFIG_RTC_DRV_FTRTC010 is not set +# CONFIG_RTC_DRV_R7301 is not set + +# +# HID Sensor RTC drivers +# +# CONFIG_RTC_DRV_GOLDFISH is not set +CONFIG_DMADEVICES=y +# CONFIG_DMADEVICES_DEBUG is not set + +# +# DMA Devices +# +CONFIG_DMA_ENGINE=y +CONFIG_DMA_OF=y +# CONFIG_ALTERA_MSGDMA is not set +# CONFIG_AMBA_PL08X is not set +# CONFIG_BCM_SBA_RAID is not set +# CONFIG_DW_AXI_DMAC is not set +# CONFIG_FSL_EDMA is not set +# CONFIG_FSL_QDMA is not set +# CONFIG_INTEL_IDMA64 is not set +# CONFIG_MV_XOR_V2 is not set +CONFIG_PL330_DMA=y +# CONFIG_PLX_DMA is not set +# CONFIG_XILINX_DMA is not set +# CONFIG_XILINX_ZYNQMP_DMA is not set +# CONFIG_XILINX_ZYNQMP_DPDMA is not set +# CONFIG_QCOM_HIDMA_MGMT is not set +# CONFIG_QCOM_HIDMA is not set +CONFIG_DW_DMAC_CORE=y +# CONFIG_DW_DMAC is not set +CONFIG_DW_DMAC_PCI=y +# CONFIG_DW_EDMA is not set +# CONFIG_DW_EDMA_PCIE is not set +# CONFIG_SF_PDMA is not set + +# +# DMA Clients +# +# CONFIG_ASYNC_TX_DMA is not set +# CONFIG_DMATEST is not set + +# +# DMABUF options +# +CONFIG_DMABUF_CACHE=y +# CONFIG_RK_DMABUF_DEBUG is not set +# CONFIG_DMABUF_PARTIAL is not set +CONFIG_SYNC_FILE=y +CONFIG_SW_SYNC=y +CONFIG_SW_SYNC_DEBUG=y +# CONFIG_UDMABUF is not set +# CONFIG_DMABUF_MOVE_NOTIFY is not set +# CONFIG_DMABUF_DEBUG is not set +# CONFIG_DMABUF_SELFTESTS is not set +CONFIG_DMABUF_HEAPS=y +CONFIG_DMABUF_SYSFS_STATS=y +CONFIG_DMABUF_HEAPS_SYSTEM=y +CONFIG_DMABUF_HEAPS_CMA=y +# CONFIG_DMABUF_HEAPS_SRAM is not set +# CONFIG_DMABUF_HEAPS_ROCKCHIP is not set +# end of DMABUF options + +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set +CONFIG_VFIO=y +CONFIG_VFIO_IOMMU_TYPE1=y +CONFIG_VFIO_VIRQFD=y +# CONFIG_VFIO_NOIOMMU is not set +CONFIG_VFIO_PCI_CORE=y +CONFIG_VFIO_PCI_MMAP=y +CONFIG_VFIO_PCI_INTX=y +CONFIG_VFIO_PCI=y +# CONFIG_VFIO_PLATFORM is not set +# CONFIG_VFIO_MDEV is not set +# CONFIG_VIRT_DRIVERS is not set +CONFIG_VIRTIO_ANCHOR=y +CONFIG_VIRTIO=m +CONFIG_VIRTIO_MENU=y +CONFIG_VIRTIO_PCI=m +CONFIG_VIRTIO_BALLOON=m +CONFIG_VIRTIO_INPUT=m +CONFIG_VIRTIO_MMIO=m +# CONFIG_VDPA is not set +CONFIG_VHOST_IOTLB=m +CONFIG_VHOST_RING=m +CONFIG_VHOST=m +CONFIG_VHOST_MENU=y +CONFIG_VHOST_NET=m +CONFIG_VHOST_SCSI=m +CONFIG_VHOST_VSOCK=m +# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set + +# +# Microsoft Hyper-V guest support +# +# end of Microsoft Hyper-V guest support + +# CONFIG_GREYBUS is not set +# CONFIG_COMEDI is not set +CONFIG_STAGING=y +# CONFIG_PRISM2_USB is not set +# CONFIG_RTL8192U is not set +# CONFIG_RTLLIB is not set +# CONFIG_RTL8723BS is not set +# CONFIG_R8712U is not set +# CONFIG_R8188EU is not set +# CONFIG_RTS5208 is not set +# CONFIG_VT6655 is not set +# CONFIG_VT6656 is not set + +# +# IIO staging drivers +# + +# +# Accelerometers +# +# CONFIG_ADIS16203 is not set +# CONFIG_ADIS16240 is not set +# end of Accelerometers + +# +# Analog to digital converters +# +# CONFIG_AD7816 is not set +# end of Analog to digital converters + +# +# Analog digital bi-direction converters +# +# CONFIG_ADT7316 is not set +# end of Analog digital bi-direction converters + +# +# Direct Digital Synthesis +# +# CONFIG_AD9832 is not set +# CONFIG_AD9834 is not set +# end of Direct Digital Synthesis + +# +# Network Analyzer, Impedance Converters +# +# CONFIG_AD5933 is not set +# end of Network Analyzer, Impedance Converters + +# +# Active energy metering IC +# +# CONFIG_ADE7854 is not set +# end of Active energy metering IC + +# +# Resolver to digital converters +# +# CONFIG_AD2S1210 is not set +# end of Resolver to digital converters +# end of IIO staging drivers + +# CONFIG_FB_SM750 is not set +# CONFIG_STAGING_MEDIA is not set +# CONFIG_STAGING_BOARD is not set +# CONFIG_LTE_GDM724X is not set +CONFIG_FB_TFT=y +CONFIG_FB_TFT_AGM1264K_FL=m +CONFIG_FB_TFT_BD663474=m +CONFIG_FB_TFT_HX8340BN=m +CONFIG_FB_TFT_HX8347D=m +CONFIG_FB_TFT_HX8353D=m +CONFIG_FB_TFT_HX8357D=m +CONFIG_FB_TFT_ILI9163=m +CONFIG_FB_TFT_ILI9320=m +CONFIG_FB_TFT_ILI9325=m +CONFIG_FB_TFT_ILI9340=m +CONFIG_FB_TFT_ILI9341=m +CONFIG_FB_TFT_ILI9481=m +CONFIG_FB_TFT_ILI9486=m +CONFIG_FB_TFT_PCD8544=m +CONFIG_FB_TFT_RA8875=m +CONFIG_FB_TFT_S6D02A1=m +CONFIG_FB_TFT_S6D1121=m +CONFIG_FB_TFT_SEPS525=m +CONFIG_FB_TFT_SH1106=m +CONFIG_FB_TFT_SSD1289=m +CONFIG_FB_TFT_SSD1305=m +CONFIG_FB_TFT_SSD1306=m +CONFIG_FB_TFT_SSD1331=m +CONFIG_FB_TFT_SSD1351=m +CONFIG_FB_TFT_ST7735R=m +CONFIG_FB_TFT_ST7789V=m +CONFIG_FB_TFT_TINYLCD=m +CONFIG_FB_TFT_TLS8204=m +CONFIG_FB_TFT_UC1611=m +CONFIG_FB_TFT_UC1701=m +CONFIG_FB_TFT_UPD161704=m +# CONFIG_KS7010 is not set +# CONFIG_PI433 is not set +# CONFIG_XIL_AXIS_FIFO is not set +# CONFIG_FIELDBUS_DEV is not set +# CONFIG_QLGE is not set +# CONFIG_VME_BUS is not set +# CONFIG_GOLDFISH is not set +# CONFIG_CHROME_PLATFORMS is not set +# CONFIG_MELLANOX_PLATFORM is not set +CONFIG_SURFACE_PLATFORMS=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_CLK_PREPARE=y +CONFIG_COMMON_CLK=y +# CONFIG_COMMON_CLK_PROCFS is not set + +# +# Clock driver for ARM Reference designs +# +# CONFIG_CLK_ICST is not set +# CONFIG_CLK_SP810 is not set +# end of Clock driver for ARM Reference designs + +# CONFIG_LMK04832 is not set +# CONFIG_COMMON_CLK_MAX9485 is not set +CONFIG_COMMON_CLK_RK808=y +CONFIG_COMMON_CLK_SCMI=y +# CONFIG_COMMON_CLK_SI5341 is not set +# CONFIG_COMMON_CLK_SI5351 is not set +# CONFIG_COMMON_CLK_SI514 is not set +# CONFIG_COMMON_CLK_SI544 is not set +# CONFIG_COMMON_CLK_SI570 is not set +# CONFIG_COMMON_CLK_CDCE706 is not set +# CONFIG_COMMON_CLK_CDCE925 is not set +# CONFIG_COMMON_CLK_CS2000_CP is not set +# CONFIG_COMMON_CLK_AXI_CLKGEN is not set +# CONFIG_COMMON_CLK_XGENE is not set +CONFIG_COMMON_CLK_PWM=y +# CONFIG_COMMON_CLK_RS9_PCIE is not set +# CONFIG_COMMON_CLK_VC5 is not set +# CONFIG_COMMON_CLK_VC7 is not set +# CONFIG_COMMON_CLK_FIXED_MMIO is not set +CONFIG_COMMON_CLK_ROCKCHIP=y +CONFIG_CLK_PX30=y +CONFIG_CLK_RK1808=y +CONFIG_CLK_RK3328=y +CONFIG_CLK_RK3399=y +CONFIG_CLK_RK3528=y +CONFIG_CLK_RK3568=y +CONFIG_CLK_RK3576=y +CONFIG_CLK_RK3588=y +# CONFIG_ROCKCHIP_CLK_COMPENSATION is not set +CONFIG_ROCKCHIP_CLK_LINK=y +CONFIG_ROCKCHIP_CLK_BOOST=y +CONFIG_ROCKCHIP_CLK_INV=y +CONFIG_ROCKCHIP_CLK_OUT=y +CONFIG_ROCKCHIP_CLK_PVTM=y +CONFIG_ROCKCHIP_DDRCLK=y +CONFIG_ROCKCHIP_DDRCLK_SIP=y +CONFIG_ROCKCHIP_DDRCLK_SIP_V2=y +CONFIG_ROCKCHIP_PLL_RK3399=y +CONFIG_ROCKCHIP_PLL_RK3588=y +# CONFIG_XILINX_VCU is not set +# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set +# CONFIG_HWSPINLOCK is not set + +# +# Clock Source drivers +# +CONFIG_TIMER_OF=y +CONFIG_TIMER_PROBE=y +CONFIG_CLKSRC_MMIO=y +CONFIG_ROCKCHIP_TIMER=y +CONFIG_ARM_ARCH_TIMER=y +CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y +CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y +CONFIG_FSL_ERRATUM_A008585=y +CONFIG_HISILICON_ERRATUM_161010101=y +CONFIG_ARM64_ERRATUM_858921=y +# CONFIG_MICROCHIP_PIT64B is not set +# end of Clock Source drivers + +CONFIG_MAILBOX=y +# CONFIG_MAILBOX_POLL_PERIOD_US is not set +# CONFIG_ARM_MHU is not set +# CONFIG_ARM_MHU_V2 is not set +# CONFIG_PLATFORM_MHU is not set +# CONFIG_PL320_MBOX is not set +# CONFIG_ROCKCHIP_MBOX is not set +# CONFIG_ALTERA_MBOX is not set +# CONFIG_MAILBOX_TEST is not set +CONFIG_IOMMU_IOVA=y +CONFIG_IOMMU_API=y +CONFIG_IOMMU_SUPPORT=y + +# +# Generic IOMMU Pagetable Support +# +CONFIG_IOMMU_IO_PGTABLE=y +CONFIG_IOMMU_IO_PGTABLE_LPAE=y +# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set +# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set +# CONFIG_IOMMU_IO_PGTABLE_DART is not set +# end of Generic IOMMU Pagetable Support + +# CONFIG_IOMMU_DEBUGFS is not set +CONFIG_IOMMU_DEFAULT_DMA_STRICT=y +# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set +# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set +CONFIG_OF_IOMMU=y +CONFIG_IOMMU_DMA=y +CONFIG_ROCKCHIP_IOMMU=y +# CONFIG_ARM_SMMU is not set +CONFIG_ARM_SMMU_V3=y +# CONFIG_ARM_SMMU_V3_SVA is not set +# CONFIG_VIRTIO_IOMMU is not set + +# +# Remoteproc drivers +# +# CONFIG_REMOTEPROC is not set +# end of Remoteproc drivers + +# +# Rpmsg drivers +# +# CONFIG_RPMSG_QCOM_GLINK_RPM is not set +# CONFIG_RPMSG_ROCKCHIP_SOFTIRQ is not set +# CONFIG_RPMSG_VIRTIO is not set +# end of Rpmsg drivers + +# CONFIG_SOUNDWIRE is not set + +# +# SOC (System On Chip) specific Drivers +# + +# +# Amlogic SoC drivers +# +# end of Amlogic SoC drivers + +# +# Broadcom SoC drivers +# +# CONFIG_SOC_BRCMSTB is not set +# end of Broadcom SoC drivers + +# +# NXP/Freescale QorIQ SoC drivers +# +# CONFIG_QUICC_ENGINE is not set +# CONFIG_FSL_RCPM is not set +# end of NXP/Freescale QorIQ SoC drivers + +# +# fujitsu SoC drivers +# +# end of fujitsu SoC drivers + +# +# i.MX SoC drivers +# +# end of i.MX SoC drivers + +# +# Enable LiteX SoC Builder specific drivers +# +# CONFIG_LITEX_SOC_CONTROLLER is not set +# end of Enable LiteX SoC Builder specific drivers + +# +# Qualcomm SoC drivers +# +CONFIG_QCOM_QMI_HELPERS=m +# end of Qualcomm SoC drivers + +# +# Rockchip SoC drivers +# + +# +# Rockchip CPU selection +# +CONFIG_CPU_PX30=y +CONFIG_CPU_RK1808=y +# CONFIG_CPU_RK3308 is not set +CONFIG_CPU_RK3328=y +# CONFIG_CPU_RK3368 is not set +CONFIG_CPU_RK3399=y +CONFIG_CPU_RK3528=y +# CONFIG_CPU_RK3562 is not set +CONFIG_CPU_RK3568=y +CONFIG_CPU_RK3576=y +CONFIG_CPU_RK3588=y +# end of Rockchip CPU selection + +CONFIG_NO_GKI=y +# CONFIG_ROCKCHIP_DISABLE_UNUSED is not set +# CONFIG_ROCKCHIP_AMP is not set +# CONFIG_ROCKCHIP_ARM64_ALIGN_FAULT_FIX is not set +# CONFIG_ROCKCHIP_CSU is not set +CONFIG_ROCKCHIP_GRF=y +# CONFIG_ROCKCHIP_HW_DECOMPRESS is not set +# CONFIG_ROCKCHIP_HW_DECOMPRESS_USER is not set +CONFIG_ROCKCHIP_IODOMAIN=y +# CONFIG_ROCKCHIP_IOMUX is not set +CONFIG_ROCKCHIP_IPA=y +CONFIG_ROCKCHIP_OPP=y +# CONFIG_ROCKCHIP_OPTIMIZE_RT_PRIO is not set +# CONFIG_ROCKCHIP_PERFORMANCE is not set +CONFIG_ROCKCHIP_PM_DOMAINS=y +CONFIG_ROCKCHIP_PVTM=y +# CONFIG_ROCKCHIP_RAMDISK is not set +# CONFIG_ROCKCHIP_LITE_ULTRA_SUSPEND is not set +CONFIG_ROCKCHIP_SUSPEND_MODE=y +CONFIG_ROCKCHIP_SYSTEM_MONITOR=y +CONFIG_ROCKCHIP_VENDOR_STORAGE=y +CONFIG_ROCKCHIP_MMC_VENDOR_STORAGE=y +CONFIG_ROCKCHIP_MTD_VENDOR_STORAGE=y +# CONFIG_ROCKCHIP_RAM_VENDOR_STORAGE is not set +CONFIG_ROCKCHIP_VENDOR_STORAGE_UPDATE_LOADER=y + +# +# FIQ Debugger +# +CONFIG_FIQ_DEBUGGER=y +CONFIG_FIQ_DEBUGGER_NO_SLEEP=y +# CONFIG_FIQ_DEBUGGER_WAKEUP_IRQ_ALWAYS_ON is not set +CONFIG_FIQ_DEBUGGER_CONSOLE=y +CONFIG_FIQ_DEBUGGER_CONSOLE_DEFAULT_ENABLE=y +CONFIG_FIQ_DEBUGGER_TRUST_ZONE=y +# CONFIG_FIQ_DEBUGGER_UART_OVERLAY is not set +CONFIG_RK_CONSOLE_THREAD=y +CONFIG_ROCKCHIP_FIQ_DEBUGGER=y +# end of FIQ Debugger + +CONFIG_ROCKCHIP_DEBUG=y +# CONFIG_ROCKCHIP_MINI_KERNEL is not set +# CONFIG_ROCKCHIP_THUNDER_BOOT is not set +# CONFIG_ROCKCHIP_NPOR_POWERGOOD is not set +# CONFIG_RK_CMA_PROCFS is not set +CONFIG_RK_DMABUF_PROCFS=y +# CONFIG_RK_MEMBLOCK_PROCFS is not set + +# +# Rockchip Minidump drivers +# +# CONFIG_ROCKCHIP_MINIDUMP is not set +# end of Rockchip Minidump drivers +# end of Rockchip SoC drivers + +CONFIG_ROCKCHIP_FYDETAB_GRF=y +# CONFIG_SOC_TI is not set + +# +# Xilinx SoC drivers +# +# end of Xilinx SoC drivers +# end of SOC (System On Chip) specific Drivers + +CONFIG_PM_DEVFREQ=y + +# +# DEVFREQ Governors +# +CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y +CONFIG_DEVFREQ_GOV_PERFORMANCE=y +CONFIG_DEVFREQ_GOV_POWERSAVE=y +CONFIG_DEVFREQ_GOV_USERSPACE=y +# CONFIG_DEVFREQ_GOV_PASSIVE is not set + +# +# DEVFREQ Drivers +# +CONFIG_ARM_ROCKCHIP_BUS_DEVFREQ=y +CONFIG_ARM_ROCKCHIP_DMC_DEVFREQ=y +CONFIG_PM_DEVFREQ_EVENT=y +CONFIG_DEVFREQ_EVENT_ROCKCHIP_DFI=y +CONFIG_DEVFREQ_EVENT_ROCKCHIP_NOCP=y +CONFIG_EXTCON=y + +# +# Extcon Device Drivers +# +# CONFIG_EXTCON_ADC_JACK is not set +# CONFIG_EXTCON_FSA9480 is not set +# CONFIG_EXTCON_GPIO is not set +# CONFIG_EXTCON_MAX3355 is not set +# CONFIG_EXTCON_PTN5150 is not set +# CONFIG_EXTCON_RT8973A is not set +# CONFIG_EXTCON_SM5502 is not set +# CONFIG_EXTCON_USB_GPIO is not set +# CONFIG_EXTCON_USBC_TUSB320 is not set +CONFIG_EXTCON_USBC_VIRTUAL_PD=y +# CONFIG_MEMORY is not set +CONFIG_IIO=y +CONFIG_IIO_BUFFER=y +CONFIG_IIO_BUFFER_CB=m +# CONFIG_IIO_BUFFER_DMA is not set +# CONFIG_IIO_BUFFER_DMAENGINE is not set +# CONFIG_IIO_BUFFER_HW_CONSUMER is not set +CONFIG_IIO_KFIFO_BUF=y +CONFIG_IIO_TRIGGERED_BUFFER=y +# CONFIG_IIO_CONFIGFS is not set +CONFIG_IIO_TRIGGER=y +CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 +# CONFIG_IIO_SW_DEVICE is not set +# CONFIG_IIO_SW_TRIGGER is not set +# CONFIG_IIO_TRIGGERED_EVENT is not set + +# +# Accelerometers +# +CONFIG_ADIS16201=m +CONFIG_ADIS16209=m +CONFIG_ADXL313=m +CONFIG_ADXL313_I2C=m +CONFIG_ADXL313_SPI=m +CONFIG_ADXL345=m +CONFIG_ADXL345_I2C=m +CONFIG_ADXL345_SPI=m +CONFIG_ADXL355=m +CONFIG_ADXL355_I2C=m +CONFIG_ADXL355_SPI=m +CONFIG_ADXL367=m +CONFIG_ADXL367_SPI=m +CONFIG_ADXL367_I2C=m +CONFIG_ADXL372=m +CONFIG_ADXL372_SPI=m +CONFIG_ADXL372_I2C=m +CONFIG_BMA180=m +CONFIG_BMA220=m +CONFIG_BMA400=m +CONFIG_BMA400_I2C=m +CONFIG_BMA400_SPI=m +CONFIG_BMC150_ACCEL=m +CONFIG_BMC150_ACCEL_I2C=m +CONFIG_BMC150_ACCEL_SPI=m +CONFIG_BMI088_ACCEL=m +CONFIG_BMI088_ACCEL_SPI=m +CONFIG_DA280=m +CONFIG_DA311=m +CONFIG_FXLS8962AF=m +CONFIG_FXLS8962AF_I2C=m +CONFIG_FXLS8962AF_SPI=m +CONFIG_IIO_ST_ACCEL_3AXIS=m +CONFIG_IIO_ST_ACCEL_I2C_3AXIS=m +CONFIG_IIO_ST_ACCEL_SPI_3AXIS=m +CONFIG_KXSD9=m +CONFIG_KXSD9_SPI=m +CONFIG_KXSD9_I2C=m +CONFIG_KXCJK1013=m +CONFIG_MMA7455=m +CONFIG_MMA7455_I2C=m +CONFIG_MMA7455_SPI=m +CONFIG_MMA9551_CORE=m +CONFIG_MMA9551=m +CONFIG_MMA9553=m +CONFIG_MSA311=m +CONFIG_MXC4005=m +CONFIG_MXC6255=m +CONFIG_SCA3000=m +CONFIG_SCA3300=m +CONFIG_STK8312=m +CONFIG_STK8BA50=m +# end of Accelerometers + +# +# Analog to digital converters +# +# CONFIG_AD7091R5 is not set +# CONFIG_AD7124 is not set +# CONFIG_AD7192 is not set +# CONFIG_AD7266 is not set +# CONFIG_AD7280 is not set +# CONFIG_AD7291 is not set +# CONFIG_AD7292 is not set +# CONFIG_AD7298 is not set +# CONFIG_AD7476 is not set +# CONFIG_AD7606_IFACE_PARALLEL is not set +# CONFIG_AD7606_IFACE_SPI is not set +# CONFIG_AD7766 is not set +# CONFIG_AD7768_1 is not set +# CONFIG_AD7780 is not set +# CONFIG_AD7791 is not set +# CONFIG_AD7793 is not set +# CONFIG_AD7887 is not set +# CONFIG_AD7923 is not set +# CONFIG_AD7949 is not set +# CONFIG_AD799X is not set +# CONFIG_ADI_AXI_ADC is not set +# CONFIG_CC10001_ADC is not set +# CONFIG_ENVELOPE_DETECTOR is not set +# CONFIG_HI8435 is not set +# CONFIG_HX711 is not set +# CONFIG_INA2XX_ADC is not set +# CONFIG_LTC2471 is not set +# CONFIG_LTC2485 is not set +# CONFIG_LTC2496 is not set +# CONFIG_LTC2497 is not set +# CONFIG_MAX1027 is not set +# CONFIG_MAX11100 is not set +# CONFIG_MAX1118 is not set +# CONFIG_MAX11205 is not set +# CONFIG_MAX1241 is not set +# CONFIG_MAX1363 is not set +# CONFIG_MAX9611 is not set +# CONFIG_MCP320X is not set +# CONFIG_MCP3422 is not set +# CONFIG_MCP3911 is not set +# CONFIG_NAU7802 is not set +# CONFIG_QCOM_SPMI_IADC is not set +# CONFIG_QCOM_SPMI_VADC is not set +# CONFIG_QCOM_SPMI_ADC5 is not set +CONFIG_ROCKCHIP_SARADC=y +# CONFIG_ROCKCHIP_SARADC_TEST_CHN is not set +# CONFIG_RICHTEK_RTQ6056 is not set +# CONFIG_SD_ADC_MODULATOR is not set +# CONFIG_TI_ADC081C is not set +# CONFIG_TI_ADC0832 is not set +# CONFIG_TI_ADC084S021 is not set +# CONFIG_TI_ADC12138 is not set +# CONFIG_TI_ADC108S102 is not set +# CONFIG_TI_ADC128S052 is not set +# CONFIG_TI_ADC161S626 is not set +# CONFIG_TI_ADS1015 is not set +# CONFIG_TI_ADS7950 is not set +# CONFIG_TI_ADS8344 is not set +# CONFIG_TI_ADS8688 is not set +# CONFIG_TI_ADS124S08 is not set +# CONFIG_TI_ADS131E08 is not set +# CONFIG_TI_TLC4541 is not set +# CONFIG_TI_TSC2046 is not set +# CONFIG_VF610_ADC is not set +# CONFIG_XILINX_XADC is not set +# end of Analog to digital converters + +# +# Analog to digital and digital to analog converters +# +# CONFIG_AD74413R is not set +# end of Analog to digital and digital to analog converters + +# +# Analog Front Ends +# +# CONFIG_IIO_RESCALE is not set +# end of Analog Front Ends + +# +# Amplifiers +# +# CONFIG_AD8366 is not set +# CONFIG_ADA4250 is not set +# CONFIG_HMC425 is not set +# end of Amplifiers + +# +# Capacitance to digital converters +# +# CONFIG_AD7150 is not set +# CONFIG_AD7746 is not set +# end of Capacitance to digital converters + +# +# Chemical Sensors +# +# CONFIG_ATLAS_PH_SENSOR is not set +# CONFIG_ATLAS_EZO_SENSOR is not set +# CONFIG_BME680 is not set +# CONFIG_CCS811 is not set +# CONFIG_IAQCORE is not set +# CONFIG_PMS7003 is not set +# CONFIG_SCD30_CORE is not set +# CONFIG_SCD4X is not set +# CONFIG_SENSIRION_SGP30 is not set +# CONFIG_SENSIRION_SGP40 is not set +# CONFIG_SPS30_I2C is not set +# CONFIG_SPS30_SERIAL is not set +# CONFIG_SENSEAIR_SUNRISE_CO2 is not set +# CONFIG_VZ89X is not set +# end of Chemical Sensors + +# +# Hid Sensor IIO Common +# +# end of Hid Sensor IIO Common + +# +# IIO SCMI Sensors +# +# CONFIG_IIO_SCMI is not set +# end of IIO SCMI Sensors + +# +# SSP Sensor Common +# +# CONFIG_IIO_SSP_SENSORHUB is not set +# end of SSP Sensor Common + +CONFIG_IIO_ST_SENSORS_I2C=m +CONFIG_IIO_ST_SENSORS_SPI=m +CONFIG_IIO_ST_SENSORS_CORE=m + +# +# Digital to analog converters +# +# CONFIG_AD3552R is not set +# CONFIG_AD5064 is not set +# CONFIG_AD5360 is not set +# CONFIG_AD5380 is not set +# CONFIG_AD5421 is not set +# CONFIG_AD5446 is not set +# CONFIG_AD5449 is not set +# CONFIG_AD5592R is not set +# CONFIG_AD5593R is not set +# CONFIG_AD5504 is not set +# CONFIG_AD5624R_SPI is not set +# CONFIG_LTC2688 is not set +# CONFIG_AD5686_SPI is not set +# CONFIG_AD5696_I2C is not set +# CONFIG_AD5755 is not set +# CONFIG_AD5758 is not set +# CONFIG_AD5761 is not set +# CONFIG_AD5764 is not set +# CONFIG_AD5766 is not set +# CONFIG_AD5770R is not set +# CONFIG_AD5791 is not set +# CONFIG_AD7293 is not set +# CONFIG_AD7303 is not set +# CONFIG_AD8801 is not set +# CONFIG_DPOT_DAC is not set +# CONFIG_DS4424 is not set +# CONFIG_LTC1660 is not set +# CONFIG_LTC2632 is not set +# CONFIG_M62332 is not set +# CONFIG_MAX517 is not set +# CONFIG_MAX5821 is not set +# CONFIG_MCP4725 is not set +# CONFIG_MCP4922 is not set +# CONFIG_TI_DAC082S085 is not set +# CONFIG_TI_DAC5571 is not set +# CONFIG_TI_DAC7311 is not set +# CONFIG_TI_DAC7612 is not set +# CONFIG_VF610_DAC is not set +# end of Digital to analog converters + +# +# IIO dummy driver +# +# end of IIO dummy driver + +# +# Filters +# +# CONFIG_ADMV8818 is not set +# end of Filters + +# +# Frequency Synthesizers DDS/PLL +# + +# +# Clock Generator/Distribution +# +# CONFIG_AD9523 is not set +# end of Clock Generator/Distribution + +# +# Phase-Locked Loop (PLL) frequency synthesizers +# +# CONFIG_ADF4350 is not set +# CONFIG_ADF4371 is not set +# CONFIG_ADMV1013 is not set +# CONFIG_ADMV1014 is not set +# CONFIG_ADMV4420 is not set +# CONFIG_ADRF6780 is not set +# end of Phase-Locked Loop (PLL) frequency synthesizers +# end of Frequency Synthesizers DDS/PLL + +# +# Digital gyroscope sensors +# +# CONFIG_ADIS16080 is not set +# CONFIG_ADIS16130 is not set +# CONFIG_ADIS16136 is not set +# CONFIG_ADIS16260 is not set +# CONFIG_ADXRS290 is not set +# CONFIG_ADXRS450 is not set +# CONFIG_BMG160 is not set +# CONFIG_FXAS21002C is not set +# CONFIG_MPU3050_I2C is not set +# CONFIG_IIO_ST_GYRO_3AXIS is not set +# CONFIG_ITG3200 is not set +# end of Digital gyroscope sensors + +# +# Health Sensors +# + +# +# Heart Rate Monitors +# +# CONFIG_AFE4403 is not set +# CONFIG_AFE4404 is not set +# CONFIG_MAX30100 is not set +# CONFIG_MAX30102 is not set +# end of Heart Rate Monitors +# end of Health Sensors + +# +# Humidity sensors +# +# CONFIG_AM2315 is not set +# CONFIG_DHT11 is not set +# CONFIG_HDC100X is not set +# CONFIG_HDC2010 is not set +# CONFIG_HTS221 is not set +# CONFIG_HTU21 is not set +# CONFIG_SI7005 is not set +# CONFIG_SI7020 is not set +# end of Humidity sensors + +# +# Inertial measurement units +# +# CONFIG_ADIS16400 is not set +# CONFIG_ADIS16460 is not set +# CONFIG_ADIS16475 is not set +# CONFIG_ADIS16480 is not set +# CONFIG_BMI160_I2C is not set +# CONFIG_BMI160_SPI is not set +# CONFIG_BOSCH_BNO055_SERIAL is not set +# CONFIG_BOSCH_BNO055_I2C is not set +# CONFIG_FXOS8700_I2C is not set +# CONFIG_FXOS8700_SPI is not set +# CONFIG_KMX61 is not set +CONFIG_INV_ICM42600=y +CONFIG_INV_ICM42600_I2C=y +CONFIG_INV_ICM42600_SPI=y +# CONFIG_INV_MPU6050_I2C is not set +# CONFIG_INV_MPU6050_SPI is not set +# CONFIG_IIO_ST_LSM6DSR is not set +# CONFIG_IIO_ST_LSM6DSX is not set +# CONFIG_IIO_ST_LSM9DS0 is not set +# end of Inertial measurement units + +CONFIG_IIO_ADIS_LIB=m +CONFIG_IIO_ADIS_LIB_BUFFER=y + +# +# Light sensors +# +# CONFIG_ADJD_S311 is not set +# CONFIG_ADUX1020 is not set +# CONFIG_AL3010 is not set +# CONFIG_AL3320A is not set +# CONFIG_APDS9300 is not set +# CONFIG_APDS9960 is not set +# CONFIG_AS73211 is not set +# CONFIG_BH1750 is not set +# CONFIG_BH1780 is not set +# CONFIG_CM32181 is not set +# CONFIG_CM3232 is not set +# CONFIG_CM3323 is not set +# CONFIG_CM3605 is not set +# CONFIG_CM36651 is not set +# CONFIG_GP2AP002 is not set +# CONFIG_GP2AP020A00F is not set +CONFIG_SENSORS_ISL29018=y +# CONFIG_SENSORS_ISL29028 is not set +# CONFIG_ISL29125 is not set +# CONFIG_JSA1212 is not set +# CONFIG_RPR0521 is not set +# CONFIG_LTR501 is not set +# CONFIG_LTRF216A is not set +# CONFIG_LV0104CS is not set +# CONFIG_MAX44000 is not set +# CONFIG_MAX44009 is not set +# CONFIG_NOA1305 is not set +# CONFIG_OPT3001 is not set +# CONFIG_PA12203001 is not set +# CONFIG_SI1133 is not set +# CONFIG_SI1145 is not set +# CONFIG_STK3310 is not set +# CONFIG_ST_UVIS25 is not set +# CONFIG_TCS3414 is not set +# CONFIG_TCS3472 is not set +CONFIG_SENSORS_TSL2563=y +CONFIG_TSL2583=y +# CONFIG_TSL2591 is not set +# CONFIG_TSL2772 is not set +# CONFIG_TSL4531 is not set +# CONFIG_UCS12CM0 is not set +# CONFIG_US5182D is not set +# CONFIG_VCNL4000 is not set +# CONFIG_VCNL4035 is not set +# CONFIG_VEML6030 is not set +# CONFIG_VEML6070 is not set +# CONFIG_VL6180 is not set +# CONFIG_ZOPT2201 is not set +# end of Light sensors + +# +# Magnetometer sensors +# +# CONFIG_AK8974 is not set +# CONFIG_AK8975 is not set +# CONFIG_AK09911 is not set +# CONFIG_BMC150_MAGN_I2C is not set +# CONFIG_BMC150_MAGN_SPI is not set +# CONFIG_MAG3110 is not set +# CONFIG_MMC35240 is not set +# CONFIG_IIO_ST_MAGN_3AXIS is not set +# CONFIG_SENSORS_HMC5843_I2C is not set +# CONFIG_SENSORS_HMC5843_SPI is not set +# CONFIG_SENSORS_RM3100_I2C is not set +# CONFIG_SENSORS_RM3100_SPI is not set +# CONFIG_YAMAHA_YAS530 is not set +# end of Magnetometer sensors + +# +# Multiplexers +# +# CONFIG_IIO_MUX is not set +# end of Multiplexers + +# +# Inclinometer sensors +# +# end of Inclinometer sensors + +# +# Triggers - standalone +# +# CONFIG_IIO_INTERRUPT_TRIGGER is not set +CONFIG_IIO_SYSFS_TRIGGER=y +# end of Triggers - standalone + +# +# Linear and angular position sensors +# +# end of Linear and angular position sensors + +# +# Digital potentiometers +# +# CONFIG_AD5110 is not set +# CONFIG_AD5272 is not set +# CONFIG_DS1803 is not set +# CONFIG_MAX5432 is not set +# CONFIG_MAX5481 is not set +# CONFIG_MAX5487 is not set +# CONFIG_MCP4018 is not set +# CONFIG_MCP4131 is not set +# CONFIG_MCP4531 is not set +# CONFIG_MCP41010 is not set +# CONFIG_TPL0102 is not set +# end of Digital potentiometers + +# +# Digital potentiostats +# +# CONFIG_LMP91000 is not set +# end of Digital potentiostats + +# +# Pressure sensors +# +# CONFIG_ABP060MG is not set +# CONFIG_BMP280 is not set +# CONFIG_DLHL60D is not set +# CONFIG_DPS310 is not set +# CONFIG_HP03 is not set +# CONFIG_ICP10100 is not set +# CONFIG_MPL115_I2C is not set +# CONFIG_MPL115_SPI is not set +# CONFIG_MPL3115 is not set +# CONFIG_MS5611 is not set +# CONFIG_MS5637 is not set +# CONFIG_IIO_ST_PRESS is not set +# CONFIG_T5403 is not set +# CONFIG_HP206C is not set +# CONFIG_ZPA2326 is not set +# end of Pressure sensors + +# +# Lightning sensors +# +# CONFIG_AS3935 is not set +# end of Lightning sensors + +# +# Proximity and distance sensors +# +# CONFIG_ISL29501 is not set +# CONFIG_LIDAR_LITE_V2 is not set +# CONFIG_MB1232 is not set +# CONFIG_PING is not set +# CONFIG_RFD77402 is not set +# CONFIG_SRF04 is not set +# CONFIG_SX9310 is not set +# CONFIG_SX9324 is not set +# CONFIG_SX9360 is not set +# CONFIG_SX9500 is not set +# CONFIG_SRF08 is not set +# CONFIG_VCNL3020 is not set +# CONFIG_VL53L0X_I2C is not set +# end of Proximity and distance sensors + +# +# Resolver to digital converters +# +# CONFIG_AD2S90 is not set +# CONFIG_AD2S1200 is not set +# end of Resolver to digital converters + +# +# Temperature sensors +# +# CONFIG_LTC2983 is not set +# CONFIG_MAXIM_THERMOCOUPLE is not set +# CONFIG_MLX90614 is not set +# CONFIG_MLX90632 is not set +# CONFIG_TMP006 is not set +# CONFIG_TMP007 is not set +# CONFIG_TMP117 is not set +# CONFIG_TSYS01 is not set +# CONFIG_TSYS02D is not set +# CONFIG_MAX31856 is not set +# CONFIG_MAX31865 is not set +# end of Temperature sensors + +# CONFIG_NTB is not set +CONFIG_PWM=y +CONFIG_PWM_SYSFS=y +# CONFIG_PWM_DEBUG is not set +# CONFIG_PWM_ATMEL_TCB is not set +# CONFIG_PWM_CLK is not set +# CONFIG_PWM_DWC is not set +# CONFIG_PWM_FSL_FTM is not set +# CONFIG_PWM_GPIO is not set +# CONFIG_PWM_PCA9685 is not set +CONFIG_PWM_ROCKCHIP=y +# CONFIG_PWM_ROCKCHIP_ONESHOT is not set +# CONFIG_PWM_ROCKCHIP_TEST is not set +# CONFIG_PWM_XILINX is not set + +# +# IRQ chip support +# +CONFIG_IRQCHIP=y +CONFIG_ARM_GIC=y +CONFIG_ARM_GIC_MAX_NR=1 +CONFIG_ARM_GIC_V2M=y +CONFIG_ARM_GIC_V3=y +CONFIG_ARM_GIC_V3_ITS=y +CONFIG_ARM_GIC_V3_ITS_PCI=y +# CONFIG_AL_FIC is not set +# CONFIG_XILINX_INTC is not set +CONFIG_PARTITION_PERCPU=y +# end of IRQ chip support + +# CONFIG_IPACK_BUS is not set +CONFIG_ARCH_HAS_RESET_CONTROLLER=y +CONFIG_RESET_CONTROLLER=y +CONFIG_RESET_SCMI=y +# CONFIG_RESET_SIMPLE is not set +# CONFIG_RESET_TI_SYSCON is not set +# CONFIG_RESET_TI_TPS380X is not set + +# +# PHY Subsystem +# +CONFIG_GENERIC_PHY=y +CONFIG_GENERIC_PHY_MIPI_DPHY=y +# CONFIG_PHY_XGENE is not set +# CONFIG_PHY_CAN_TRANSCEIVER is not set + +# +# PHY drivers for Broadcom platforms +# +# CONFIG_BCM_KONA_USB2_PHY is not set +# end of PHY drivers for Broadcom platforms + +# CONFIG_PHY_CADENCE_TORRENT is not set +# CONFIG_PHY_CADENCE_DPHY is not set +# CONFIG_PHY_CADENCE_DPHY_RX is not set +# CONFIG_PHY_CADENCE_SIERRA is not set +# CONFIG_PHY_CADENCE_SALVO is not set +# CONFIG_PHY_PXA_28NM_HSIC is not set +# CONFIG_PHY_PXA_28NM_USB2 is not set +# CONFIG_PHY_LAN966X_SERDES is not set +# CONFIG_PHY_CPCAP_USB is not set +# CONFIG_PHY_MAPPHONE_MDM6600 is not set +# CONFIG_PHY_OCELOT_SERDES is not set +# CONFIG_PHY_QCOM_USB_HS is not set +# CONFIG_PHY_QCOM_USB_HSIC is not set +CONFIG_PHY_ROCKCHIP_CSI2_DPHY=y +CONFIG_PHY_ROCKCHIP_DP=y +# CONFIG_PHY_ROCKCHIP_DPHY_RX0 is not set +CONFIG_PHY_ROCKCHIP_EMMC=y +# CONFIG_PHY_ROCKCHIP_INNO_COMBPHY is not set +CONFIG_PHY_ROCKCHIP_INNO_HDMI=y +CONFIG_PHY_ROCKCHIP_INNO_USB2=y +CONFIG_PHY_ROCKCHIP_INNO_USB3=y +# CONFIG_PHY_ROCKCHIP_INNO_CSIDPHY is not set +CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY=y +CONFIG_PHY_ROCKCHIP_MIPI_RX=y +CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY=y +CONFIG_PHY_ROCKCHIP_NANENG_EDP=y +# CONFIG_PHY_ROCKCHIP_NANENG_USB2 is not set +CONFIG_PHY_ROCKCHIP_PCIE=y +CONFIG_PHY_ROCKCHIP_SAMSUNG_DCPHY=y +CONFIG_PHY_ROCKCHIP_SAMSUNG_HDPTX=y +CONFIG_PHY_ROCKCHIP_SAMSUNG_HDPTX_HDMI=y +CONFIG_PHY_ROCKCHIP_SNPS_PCIE3=y +CONFIG_PHY_ROCKCHIP_TYPEC=y +CONFIG_PHY_ROCKCHIP_USB=y +CONFIG_PHY_ROCKCHIP_USBDP=y +# CONFIG_PHY_SAMSUNG_USB2 is not set +# CONFIG_PHY_TUSB1210 is not set +# end of PHY Subsystem + +# CONFIG_POWERCAP is not set +# CONFIG_MCB is not set + +# +# Performance monitor support +# +# CONFIG_ARM_CCI_PMU is not set +# CONFIG_ARM_CCN is not set +# CONFIG_ARM_CMN is not set +CONFIG_ARM_PMU=y +# CONFIG_ARM_DSU_PMU is not set +# CONFIG_ARM_SPE_PMU is not set +# CONFIG_HISI_PCIE_PMU is not set +# CONFIG_HNS3_PMU is not set +# end of Performance monitor support + +# CONFIG_RAS is not set +# CONFIG_USB4 is not set + +# +# Android +# +CONFIG_ANDROID_BINDER_IPC=y +CONFIG_ANDROID_BINDERFS=y +CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder,anbox-binder,anbox-hwbinder,anbox-vndbinder" +# CONFIG_ANDROID_BINDER_IPC_SELFTEST is not set +# end of Android + +# CONFIG_LIBNVDIMM is not set +# CONFIG_DAX is not set +CONFIG_NVMEM=y +CONFIG_NVMEM_SYSFS=y +# CONFIG_NVMEM_RMEM is not set +# CONFIG_NVMEM_ROCKCHIP_EFUSE is not set +# CONFIG_NVMEM_ROCKCHIP_OTP is not set +# CONFIG_NVMEM_ROCKCHIP_SEC_OTP is not set +# CONFIG_NVMEM_SPMI_SDAM is not set +CONFIG_NVMEM_U_BOOT_ENV=y + +# +# HW tracing support +# +# CONFIG_STM is not set +# CONFIG_INTEL_TH is not set +# CONFIG_HISI_PTT is not set +# end of HW tracing support + +# CONFIG_FPGA is not set +# CONFIG_FSI is not set +CONFIG_TEE=y +CONFIG_OPTEE=y +CONFIG_MULTIPLEXER=m + +# +# Multiplexer drivers +# +# CONFIG_MUX_ADG792A is not set +# CONFIG_MUX_ADGS1408 is not set +# CONFIG_MUX_GPIO is not set +# CONFIG_MUX_MMIO is not set +# end of Multiplexer drivers + +CONFIG_PM_OPP=y +# CONFIG_SIOX is not set +# CONFIG_SLIMBUS is not set +# CONFIG_INTERCONNECT is not set +# CONFIG_COUNTER is not set +# CONFIG_MOST is not set +# CONFIG_PECI is not set +# CONFIG_HTE is not set +# CONFIG_RK_FLASH is not set +# CONFIG_RK_NAND is not set + +# +# Headset device support +# +CONFIG_RK_HEADSET=y +# end of Headset device support + +# +# RKNPU +# +CONFIG_ROCKCHIP_RKNPU=y +CONFIG_ROCKCHIP_RKNPU_DEBUG_FS=y +# CONFIG_ROCKCHIP_RKNPU_PROC_FS is not set +# CONFIG_ROCKCHIP_RKNPU_FENCE is not set +# CONFIG_ROCKCHIP_RKNPU_SRAM is not set +CONFIG_ROCKCHIP_RKNPU_DRM_GEM=y +# end of RKNPU +# end of Device Drivers + +# +# File systems +# +CONFIG_DCACHE_WORD_ACCESS=y +# CONFIG_VALIDATE_FS_PARSER is not set +CONFIG_FS_IOMAP=y +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_USE_FOR_EXT2=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +# CONFIG_EXT4_DEBUG is not set +CONFIG_JBD2=y +# CONFIG_JBD2_DEBUG is not set +CONFIG_FS_MBCACHE=y +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y +CONFIG_JFS_FS=m +CONFIG_JFS_POSIX_ACL=y +CONFIG_JFS_SECURITY=y +# CONFIG_JFS_DEBUG is not set +CONFIG_JFS_STATISTICS=y +CONFIG_XFS_FS=m +CONFIG_XFS_SUPPORT_V4=y +CONFIG_XFS_QUOTA=y +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_RT=y +# CONFIG_XFS_ONLINE_SCRUB is not set +CONFIG_XFS_WARN=y +# CONFIG_XFS_DEBUG is not set +CONFIG_GFS2_FS=m +CONFIG_OCFS2_FS=m +CONFIG_OCFS2_FS_O2CB=m +CONFIG_OCFS2_FS_STATS=y +CONFIG_OCFS2_DEBUG_MASKLOG=y +# CONFIG_OCFS2_DEBUG_FS is not set +CONFIG_BTRFS_FS=y +CONFIG_BTRFS_FS_POSIX_ACL=y +# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set +# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set +# CONFIG_BTRFS_DEBUG is not set +# CONFIG_BTRFS_ASSERT is not set +# CONFIG_BTRFS_FS_REF_VERIFY is not set +CONFIG_NILFS2_FS=m +CONFIG_F2FS_FS=y +CONFIG_F2FS_STAT_FS=y +CONFIG_F2FS_FS_XATTR=y +CONFIG_F2FS_FS_POSIX_ACL=y +CONFIG_F2FS_FS_SECURITY=y +# CONFIG_F2FS_CHECK_FS is not set +# CONFIG_F2FS_FAULT_INJECTION is not set +# CONFIG_F2FS_FS_COMPRESSION is not set +CONFIG_F2FS_IOSTAT=y +# CONFIG_F2FS_UNFAIR_RWSEM is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_EXPORTFS=y +# CONFIG_EXPORTFS_BLOCK_OPS is not set +CONFIG_FILE_LOCKING=y +# CONFIG_FS_ENCRYPTION is not set +# CONFIG_FS_VERITY is not set +CONFIG_FSNOTIFY=y +# CONFIG_DNOTIFY is not set +CONFIG_INOTIFY_USER=y +CONFIG_FANOTIFY=y +# CONFIG_FANOTIFY_ACCESS_PERMISSIONS is not set +CONFIG_QUOTA=y +CONFIG_QUOTA_NETLINK_INTERFACE=y +CONFIG_PRINT_QUOTA_WARNING=y +CONFIG_QUOTA_DEBUG=y +CONFIG_QUOTA_TREE=m +CONFIG_QFMT_V1=m +CONFIG_QFMT_V2=m +CONFIG_QUOTACTL=y +CONFIG_AUTOFS4_FS=y +CONFIG_AUTOFS_FS=y +CONFIG_FUSE_FS=m +CONFIG_CUSE=m +CONFIG_VIRTIO_FS=m +CONFIG_OVERLAY_FS=m +# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set +CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y +# CONFIG_OVERLAY_FS_INDEX is not set +# CONFIG_OVERLAY_FS_XINO_AUTO is not set +# CONFIG_OVERLAY_FS_METACOPY is not set + +# +# Caches +# +CONFIG_NETFS_SUPPORT=m +# CONFIG_NETFS_STATS is not set +# CONFIG_FSCACHE is not set +# end of Caches + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +# end of CD-ROM/DVD Filesystems + +# +# DOS/FAT/EXFAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_FAT_DEFAULT_UTF8 is not set +CONFIG_EXFAT_FS=m +CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8" +CONFIG_NTFS_FS=m +# CONFIG_NTFS_DEBUG is not set +CONFIG_NTFS_RW=y +CONFIG_NTFS3_FS=m +# CONFIG_NTFS3_64BIT_CLUSTER is not set +CONFIG_NTFS3_LZX_XPRESS=y +CONFIG_NTFS3_FS_POSIX_ACL=y +# end of DOS/FAT/EXFAT/NT Filesystems + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +# CONFIG_PROC_KCORE is not set +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_PROC_CHILDREN=y +CONFIG_KERNFS=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_TMPFS_XATTR=y +# CONFIG_TMPFS_INODE64 is not set +CONFIG_ARCH_SUPPORTS_HUGETLBFS=y +CONFIG_HUGETLBFS=y +CONFIG_HUGETLB_PAGE=y +CONFIG_MEMFD_CREATE=y +CONFIG_ARCH_HAS_GIGANTIC_PAGE=y +CONFIG_CONFIGFS_FS=y +CONFIG_EFIVAR_FS=y +# end of Pseudo filesystems + +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ORANGEFS_FS is not set +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +CONFIG_ECRYPT_FS=m +# CONFIG_ECRYPT_FS_MESSAGING is not set +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_JFFS2_FS=m +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set +CONFIG_JFFS2_SUMMARY=y +# CONFIG_JFFS2_FS_XATTR is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +CONFIG_UBIFS_FS=m +CONFIG_UBIFS_FS_ADVANCED_COMPR=y +CONFIG_UBIFS_FS_LZO=y +CONFIG_UBIFS_FS_ZLIB=y +CONFIG_UBIFS_FS_ZSTD=y +# CONFIG_UBIFS_ATIME_SUPPORT is not set +CONFIG_UBIFS_FS_XATTR=y +CONFIG_UBIFS_FS_SECURITY=y +# CONFIG_UBIFS_FS_AUTHENTICATION is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=m +CONFIG_SQUASHFS_FILE_CACHE=y +# CONFIG_SQUASHFS_FILE_DIRECT is not set +CONFIG_SQUASHFS_DECOMP_SINGLE=y +# CONFIG_SQUASHFS_DECOMP_MULTI is not set +# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set +CONFIG_SQUASHFS_XATTR=y +CONFIG_SQUASHFS_ZLIB=y +CONFIG_SQUASHFS_LZ4=y +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=y +CONFIG_SQUASHFS_ZSTD=y +CONFIG_SQUASHFS_4K_DEVBLK_SIZE=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX6FS_FS is not set +# CONFIG_ROMFS_FS is not set +CONFIG_PSTORE=y +CONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240 +CONFIG_PSTORE_DEFLATE_COMPRESS=y +# CONFIG_PSTORE_LZO_COMPRESS is not set +# CONFIG_PSTORE_LZ4_COMPRESS is not set +# CONFIG_PSTORE_LZ4HC_COMPRESS is not set +# CONFIG_PSTORE_842_COMPRESS is not set +# CONFIG_PSTORE_ZSTD_COMPRESS is not set +CONFIG_PSTORE_COMPRESS=y +CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y +CONFIG_PSTORE_COMPRESS_DEFAULT="deflate" +CONFIG_PSTORE_CONSOLE=y +# CONFIG_PSTORE_PMSG is not set +# CONFIG_PSTORE_FTRACE is not set +CONFIG_PSTORE_RAM=y +# CONFIG_PSTORE_BLK is not set +# CONFIG_PSTORE_BOOT_LOG is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +# CONFIG_EROFS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V2=y +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NFS_SWAP=y +CONFIG_NFS_V4_1=y +CONFIG_NFS_V4_2=y +CONFIG_PNFS_FILE_LAYOUT=y +CONFIG_PNFS_BLOCK=m +CONFIG_PNFS_FLEXFILE_LAYOUT=y +CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" +CONFIG_NFS_V4_1_MIGRATION=y +CONFIG_NFS_V4_SECURITY_LABEL=y +CONFIG_ROOT_NFS=y +# CONFIG_NFS_USE_LEGACY_DNS is not set +CONFIG_NFS_USE_KERNEL_DNS=y +CONFIG_NFS_DISABLE_UDP_SUPPORT=y +# CONFIG_NFS_V4_2_READ_PLUS is not set +CONFIG_NFSD=m +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +# CONFIG_NFSD_BLOCKLAYOUT is not set +# CONFIG_NFSD_SCSILAYOUT is not set +# CONFIG_NFSD_FLEXFILELAYOUT is not set +# CONFIG_NFSD_V4_2_INTER_SSC is not set +# CONFIG_NFSD_V4_SECURITY_LABEL is not set +CONFIG_GRACE_PERIOD=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_ACL_SUPPORT=y +CONFIG_NFS_COMMON=y +CONFIG_NFS_V4_2_SSC_HELPER=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_SUNRPC_BACKCHANNEL=y +CONFIG_SUNRPC_SWAP=y +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_SUNRPC_DISABLE_INSECURE_ENCTYPES is not set +# CONFIG_SUNRPC_DEBUG is not set +CONFIG_CEPH_FS=m +CONFIG_CEPH_FS_POSIX_ACL=y +CONFIG_CEPH_FS_SECURITY_LABEL=y +CONFIG_CIFS=m +CONFIG_CIFS_STATS2=y +CONFIG_CIFS_ALLOW_INSECURE_LEGACY=y +CONFIG_CIFS_UPCALL=y +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +# CONFIG_CIFS_DEBUG is not set +CONFIG_CIFS_DFS_UPCALL=y +# CONFIG_CIFS_SWN_UPCALL is not set +# CONFIG_SMB_SERVER is not set +CONFIG_SMBFS=m +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +CONFIG_NLS_CODEPAGE_936=y +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_MAC_ROMAN is not set +# CONFIG_NLS_MAC_CELTIC is not set +# CONFIG_NLS_MAC_CENTEURO is not set +# CONFIG_NLS_MAC_CROATIAN is not set +# CONFIG_NLS_MAC_CYRILLIC is not set +# CONFIG_NLS_MAC_GAELIC is not set +# CONFIG_NLS_MAC_GREEK is not set +# CONFIG_NLS_MAC_ICELAND is not set +# CONFIG_NLS_MAC_INUIT is not set +# CONFIG_NLS_MAC_ROMANIAN is not set +# CONFIG_NLS_MAC_TURKISH is not set +CONFIG_NLS_UTF8=y +# CONFIG_DLM is not set +CONFIG_UNICODE=y +# CONFIG_UNICODE_NORMALIZATION_SELFTEST is not set +CONFIG_IO_WQ=y +# end of File systems + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_KEYS_REQUEST_CACHE is not set +# CONFIG_PERSISTENT_KEYRINGS is not set +CONFIG_TRUSTED_KEYS=m +CONFIG_TRUSTED_KEYS_TPM=y +CONFIG_TRUSTED_KEYS_TEE=y +CONFIG_ENCRYPTED_KEYS=m +# CONFIG_USER_DECRYPTED_DATA is not set +# CONFIG_KEY_DH_OPERATIONS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +CONFIG_SECURITY=y +CONFIG_SECURITYFS=y +CONFIG_SECURITY_NETWORK=y +CONFIG_SECURITY_NETWORK_XFRM=y +CONFIG_SECURITY_PATH=y +CONFIG_LSM_MMAP_MIN_ADDR=32768 +CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y +# CONFIG_HARDENED_USERCOPY is not set +# CONFIG_FORTIFY_SOURCE is not set +# CONFIG_STATIC_USERMODEHELPER is not set +CONFIG_SECURITY_SELINUX=y +# CONFIG_SECURITY_SELINUX_BOOTPARAM is not set +# CONFIG_SECURITY_SELINUX_DISABLE is not set +CONFIG_SECURITY_SELINUX_DEVELOP=y +CONFIG_SECURITY_SELINUX_AVC_STATS=y +CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=0 +CONFIG_SECURITY_SELINUX_SIDTAB_HASH_BITS=9 +CONFIG_SECURITY_SELINUX_SID2STR_CACHE_SIZE=256 +# CONFIG_SECURITY_SMACK is not set +# CONFIG_SECURITY_TOMOYO is not set +CONFIG_SECURITY_APPARMOR=y +# CONFIG_SECURITY_APPARMOR_DEBUG is not set +CONFIG_SECURITY_APPARMOR_INTROSPECT_POLICY=y +CONFIG_SECURITY_APPARMOR_HASH=y +CONFIG_SECURITY_APPARMOR_HASH_DEFAULT=y +CONFIG_SECURITY_APPARMOR_EXPORT_BINARY=y +CONFIG_SECURITY_APPARMOR_PARANOID_LOAD=y +# CONFIG_SECURITY_LOADPIN is not set +# CONFIG_SECURITY_YAMA is not set +# CONFIG_SECURITY_SAFESETID is not set +# CONFIG_SECURITY_LOCKDOWN_LSM is not set +# CONFIG_SECURITY_LANDLOCK is not set +CONFIG_INTEGRITY=y +# CONFIG_INTEGRITY_SIGNATURE is not set +CONFIG_INTEGRITY_AUDIT=y +# CONFIG_IMA is not set +# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set +# CONFIG_EVM is not set +# CONFIG_DEFAULT_SECURITY_SELINUX is not set +# CONFIG_DEFAULT_SECURITY_APPARMOR is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf" + +# +# Kernel hardening options +# + +# +# Memory initialization +# +CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y +CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y +CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y +CONFIG_INIT_STACK_NONE=y +# CONFIG_INIT_STACK_ALL_PATTERN is not set +# CONFIG_INIT_STACK_ALL_ZERO is not set +# CONFIG_GCC_PLUGIN_STACKLEAK is not set +# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set +# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set +CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y +# CONFIG_ZERO_CALL_USED_REGS is not set +# end of Memory initialization + +CONFIG_RANDSTRUCT_NONE=y +# CONFIG_RANDSTRUCT_FULL is not set +# CONFIG_RANDSTRUCT_PERFORMANCE is not set +# end of Kernel hardening options +# end of Security options + +CONFIG_XOR_BLOCKS=y +CONFIG_ASYNC_CORE=m +CONFIG_ASYNC_MEMCPY=m +CONFIG_ASYNC_XOR=m +CONFIG_ASYNC_PQ=m +CONFIG_ASYNC_RAID6_RECOV=m +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_SKCIPHER=y +CONFIG_CRYPTO_SKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_RNG_DEFAULT=y +CONFIG_CRYPTO_AKCIPHER2=y +CONFIG_CRYPTO_AKCIPHER=y +CONFIG_CRYPTO_KPP2=y +CONFIG_CRYPTO_KPP=y +CONFIG_CRYPTO_ACOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +# CONFIG_CRYPTO_USER is not set +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +CONFIG_CRYPTO_GF128MUL=y +CONFIG_CRYPTO_NULL=y +CONFIG_CRYPTO_NULL2=y +# CONFIG_CRYPTO_PCRYPT is not set +# CONFIG_CRYPTO_CRYPTD is not set +CONFIG_CRYPTO_AUTHENC=m +# CONFIG_CRYPTO_TEST is not set +CONFIG_CRYPTO_ENGINE=y +# end of Crypto core or helper + +# +# Public-key cryptography +# +CONFIG_CRYPTO_RSA=y +CONFIG_CRYPTO_DH=y +CONFIG_CRYPTO_DH_RFC7919_GROUPS=y +CONFIG_CRYPTO_ECC=y +CONFIG_CRYPTO_ECDH=y +# CONFIG_CRYPTO_ECDSA is not set +# CONFIG_CRYPTO_ECRDSA is not set +# CONFIG_CRYPTO_SM2 is not set +# CONFIG_CRYPTO_CURVE25519 is not set +# end of Public-key cryptography + +# +# Block ciphers +# +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_AES_TI is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_ARIA is not set +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +CONFIG_CRYPTO_SM4=y +# CONFIG_CRYPTO_SM4_GENERIC is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_TWOFISH_COMMON=y +# end of Block ciphers + +# +# Length-preserving ciphers and modes +# +# CONFIG_CRYPTO_ADIANTUM is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_CHACHA20 is not set +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CFB=y +CONFIG_CRYPTO_CTR=y +CONFIG_CRYPTO_CTS=y +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_HCTR2 is not set +# CONFIG_CRYPTO_KEYWRAP is not set +# CONFIG_CRYPTO_LRW is not set +CONFIG_CRYPTO_OFB=y +# CONFIG_CRYPTO_PCBC is not set +CONFIG_CRYPTO_XTS=y +# end of Length-preserving ciphers and modes + +# +# AEAD (authenticated encryption with associated data) ciphers +# +# CONFIG_CRYPTO_AEGIS128 is not set +# CONFIG_CRYPTO_CHACHA20POLY1305 is not set +CONFIG_CRYPTO_CCM=y +CONFIG_CRYPTO_GCM=y +CONFIG_CRYPTO_SEQIV=m +CONFIG_CRYPTO_ECHAINIV=m +CONFIG_CRYPTO_ESSIV=m +# end of AEAD (authenticated encryption with associated data) ciphers + +# +# Hashes, digests, and MACs +# +CONFIG_CRYPTO_BLAKE2B=y +CONFIG_CRYPTO_CMAC=y +CONFIG_CRYPTO_GHASH=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=m +# CONFIG_CRYPTO_POLY1305 is not set +# CONFIG_CRYPTO_RMD160 is not set +CONFIG_CRYPTO_SHA1=y +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_SHA512=y +# CONFIG_CRYPTO_SHA3 is not set +CONFIG_CRYPTO_SM3=y +# CONFIG_CRYPTO_SM3_GENERIC is not set +# CONFIG_CRYPTO_STREEBOG is not set +# CONFIG_CRYPTO_VMAC is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_XCBC is not set +CONFIG_CRYPTO_XXHASH=y +# end of Hashes, digests, and MACs + +# +# CRCs (cyclic redundancy checks) +# +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_CRC32=y +CONFIG_CRYPTO_CRCT10DIF=y +# CONFIG_CRYPTO_CRC64_ROCKSOFT is not set +# end of CRCs (cyclic redundancy checks) + +# +# Compression +# +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LZO=y +# CONFIG_CRYPTO_842 is not set +# CONFIG_CRYPTO_LZ4 is not set +# CONFIG_CRYPTO_LZ4HC is not set +CONFIG_CRYPTO_ZSTD=m +# end of Compression + +# +# Random number generation +# +CONFIG_CRYPTO_ANSI_CPRNG=y +CONFIG_CRYPTO_DRBG_MENU=y +CONFIG_CRYPTO_DRBG_HMAC=y +# CONFIG_CRYPTO_DRBG_HASH is not set +# CONFIG_CRYPTO_DRBG_CTR is not set +CONFIG_CRYPTO_DRBG=y +CONFIG_CRYPTO_JITTERENTROPY=y +# end of Random number generation + +# +# Userspace interface +# +CONFIG_CRYPTO_USER_API=y +CONFIG_CRYPTO_USER_API_HASH=y +CONFIG_CRYPTO_USER_API_SKCIPHER=y +# CONFIG_CRYPTO_USER_API_RNG is not set +# CONFIG_CRYPTO_USER_API_AEAD is not set +CONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y +# end of Userspace interface + +CONFIG_CRYPTO_HASH_INFO=y +# CONFIG_CRYPTO_NHPOLY1305_NEON is not set +CONFIG_CRYPTO_CHACHA20_NEON=m + +# +# Accelerated Cryptographic Algorithms for CPU (arm64) +# +CONFIG_CRYPTO_GHASH_ARM64_CE=y +CONFIG_CRYPTO_POLY1305_NEON=m +CONFIG_CRYPTO_SHA1_ARM64_CE=y +CONFIG_CRYPTO_SHA256_ARM64=y +CONFIG_CRYPTO_SHA2_ARM64_CE=y +# CONFIG_CRYPTO_SHA512_ARM64 is not set +# CONFIG_CRYPTO_SHA512_ARM64_CE is not set +# CONFIG_CRYPTO_SHA3_ARM64 is not set +# CONFIG_CRYPTO_SM3_NEON is not set +# CONFIG_CRYPTO_SM3_ARM64_CE is not set +# CONFIG_CRYPTO_POLYVAL_ARM64_CE is not set +# CONFIG_CRYPTO_AES_ARM64 is not set +CONFIG_CRYPTO_AES_ARM64_CE=y +CONFIG_CRYPTO_AES_ARM64_CE_BLK=y +# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set +# CONFIG_CRYPTO_AES_ARM64_BS is not set +# CONFIG_CRYPTO_SM4_ARM64_CE is not set +# CONFIG_CRYPTO_SM4_ARM64_CE_BLK is not set +# CONFIG_CRYPTO_SM4_ARM64_NEON_BLK is not set +CONFIG_CRYPTO_AES_ARM64_CE_CCM=y +# CONFIG_CRYPTO_CRCT10DIF_ARM64_CE is not set +# end of Accelerated Cryptographic Algorithms for CPU (arm64) + +CONFIG_CRYPTO_HW=y +# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set +# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set +# CONFIG_CRYPTO_DEV_CCP is not set +# CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set +# CONFIG_CRYPTO_DEV_QAT_C3XXX is not set +# CONFIG_CRYPTO_DEV_QAT_C62X is not set +# CONFIG_CRYPTO_DEV_QAT_4XXX is not set +# CONFIG_CRYPTO_DEV_QAT_DH895xCCVF is not set +# CONFIG_CRYPTO_DEV_QAT_C3XXXVF is not set +# CONFIG_CRYPTO_DEV_QAT_C62XVF is not set +# CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set +# CONFIG_CRYPTO_DEV_CAVIUM_ZIP is not set +CONFIG_CRYPTO_DEV_ROCKCHIP=y +CONFIG_CRYPTO_DEV_ROCKCHIP_V1=y +CONFIG_CRYPTO_DEV_ROCKCHIP_V2=y +# CONFIG_CRYPTO_DEV_ROCKCHIP_V3 is not set +CONFIG_CRYPTO_DEV_ROCKCHIP_DEV=y +# CONFIG_CRYPTO_DEV_VIRTIO is not set +# CONFIG_CRYPTO_DEV_SAFEXCEL is not set +# CONFIG_CRYPTO_DEV_CCREE is not set +# CONFIG_CRYPTO_DEV_HISI_SEC is not set +# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set +CONFIG_ASYMMETRIC_KEY_TYPE=y +CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y +CONFIG_X509_CERTIFICATE_PARSER=y +# CONFIG_PKCS8_PRIVATE_KEY_PARSER is not set +CONFIG_PKCS7_MESSAGE_PARSER=y +# CONFIG_PKCS7_TEST_KEY is not set +# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set +# CONFIG_FIPS_SIGNATURE_SELFTEST is not set + +# +# Certificates for signature checking +# +CONFIG_SYSTEM_TRUSTED_KEYRING=y +CONFIG_SYSTEM_TRUSTED_KEYS="" +# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set +# CONFIG_SECONDARY_TRUSTED_KEYRING is not set +# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set +# end of Certificates for signature checking + +CONFIG_BINARY_PRINTF=y + +# +# Library routines +# +CONFIG_RAID6_PQ=y +CONFIG_RAID6_PQ_BENCHMARK=y +CONFIG_LINEAR_RANGES=y +# CONFIG_PACKING is not set +CONFIG_BITREVERSE=y +CONFIG_HAVE_ARCH_BITREVERSE=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_NET_UTILS=y +CONFIG_CORDIC=m +# CONFIG_PRIME_NUMBERS is not set +CONFIG_RATIONAL=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y +CONFIG_ARCH_HAS_FAST_MULTIPLIER=y +CONFIG_ARCH_USE_SYM_ANNOTATIONS=y +# CONFIG_INDIRECT_PIO is not set +# CONFIG_TRACE_MMIO_ACCESS is not set + +# +# Crypto library routines +# +CONFIG_CRYPTO_LIB_UTILS=y +CONFIG_CRYPTO_LIB_AES=y +CONFIG_CRYPTO_LIB_ARC4=y +CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y +CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=m +CONFIG_CRYPTO_LIB_CHACHA_GENERIC=m +CONFIG_CRYPTO_LIB_CHACHA=m +CONFIG_CRYPTO_LIB_CURVE25519_GENERIC=m +CONFIG_CRYPTO_LIB_CURVE25519=m +CONFIG_CRYPTO_LIB_DES=y +CONFIG_CRYPTO_LIB_POLY1305_RSIZE=9 +CONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=m +CONFIG_CRYPTO_LIB_POLY1305=m +CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m +CONFIG_CRYPTO_LIB_SHA1=y +CONFIG_CRYPTO_LIB_SHA256=y +# end of Crypto library routines + +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +CONFIG_CRC_T10DIF=y +# CONFIG_CRC64_ROCKSOFT is not set +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +# CONFIG_CRC32_SELFTEST is not set +CONFIG_CRC32_SLICEBY8=y +# CONFIG_CRC32_SLICEBY4 is not set +# CONFIG_CRC32_SARWATE is not set +# CONFIG_CRC32_BIT is not set +CONFIG_CRC64=m +# CONFIG_CRC4 is not set +CONFIG_CRC7=y +CONFIG_LIBCRC32C=y +CONFIG_CRC8=m +CONFIG_XXHASH=y +CONFIG_AUDIT_GENERIC=y +CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y +CONFIG_AUDIT_COMPAT_GENERIC=y +# CONFIG_RANDOM32_SELFTEST is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_LZ4_DECOMPRESS=y +CONFIG_ZSTD_COMMON=y +CONFIG_ZSTD_COMPRESS=y +CONFIG_ZSTD_DECOMPRESS=y +CONFIG_XZ_DEC=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +# CONFIG_XZ_DEC_MICROLZMA is not set +CONFIG_XZ_DEC_BCJ=y +# CONFIG_XZ_DEC_TEST is not set +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_BZIP2=y +CONFIG_DECOMPRESS_LZMA=y +CONFIG_DECOMPRESS_XZ=y +CONFIG_DECOMPRESS_LZO=y +CONFIG_DECOMPRESS_LZ4=y +CONFIG_DECOMPRESS_ZSTD=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_REED_SOLOMON=y +CONFIG_REED_SOLOMON_ENC8=y +CONFIG_REED_SOLOMON_DEC8=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +CONFIG_INTERVAL_TREE=y +CONFIG_XARRAY_MULTI=y +CONFIG_ASSOCIATIVE_ARRAY=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +CONFIG_HAS_DMA=y +CONFIG_DMA_OPS=y +CONFIG_NEED_SG_DMA_LENGTH=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_DMA_DECLARE_COHERENT=y +CONFIG_ARCH_HAS_SETUP_DMA_OPS=y +CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y +CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y +CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y +CONFIG_ARCH_HAS_DMA_PREP_COHERENT=y +CONFIG_SWIOTLB=y +# CONFIG_DMA_RESTRICTED_POOL is not set +CONFIG_DMA_NONCOHERENT_MMAP=y +CONFIG_DMA_COHERENT_POOL=y +CONFIG_DMA_DIRECT_REMAP=y +CONFIG_DMA_CMA=y +# CONFIG_DMA_PERNUMA_CMA is not set + +# +# Default contiguous memory area size: +# +CONFIG_CMA_SIZE_MBYTES=16 +CONFIG_CMA_SIZE_SEL_MBYTES=y +# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set +# CONFIG_CMA_SIZE_SEL_MIN is not set +# CONFIG_CMA_SIZE_SEL_MAX is not set +CONFIG_CMA_ALIGNMENT=8 +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_DMA_MAP_BENCHMARK is not set +CONFIG_SGL_ALLOC=y +# CONFIG_FORCE_NR_CPUS is not set +CONFIG_CPU_RMAP=y +CONFIG_DQL=y +CONFIG_GLOB=y +# CONFIG_GLOB_SELFTEST is not set +CONFIG_NLATTR=y +CONFIG_CLZ_TAB=y +# CONFIG_IRQ_POLL is not set +CONFIG_MPILIB=y +CONFIG_DIMLIB=y +CONFIG_LIBFDT=y +CONFIG_OID_REGISTRY=y +CONFIG_UCS2_STRING=y +CONFIG_HAVE_GENERIC_VDSO=y +CONFIG_GENERIC_GETTIMEOFDAY=y +CONFIG_GENERIC_VDSO_TIME_NS=y +CONFIG_FONT_SUPPORT=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +CONFIG_SG_POOL=y +CONFIG_ARCH_STACKWALK=y +CONFIG_STACKDEPOT=y +CONFIG_SBITMAP=y +# end of Library routines + +CONFIG_GENERIC_IOREMAP=y +CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y +CONFIG_ASN1_ENCODER=m + +# +# Kernel hacking +# + +# +# printk and dmesg options +# +CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_FROM_ARM_ARCH_TIMER=y +# CONFIG_PRINTK_CALLER is not set +# CONFIG_STACKTRACE_BUILD_ID is not set +CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=4 +CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 +# CONFIG_BOOT_PRINTK_DELAY is not set +CONFIG_DYNAMIC_DEBUG=y +CONFIG_DYNAMIC_DEBUG_CORE=y +CONFIG_SYMBOLIC_ERRNAME=y +CONFIG_DEBUG_BUGVERBOSE=y +# end of printk and dmesg options + +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_MISC=y + +# +# Compile-time checks and compiler options +# +CONFIG_AS_HAS_NON_CONST_LEB128=y +CONFIG_DEBUG_INFO_NONE=y +# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set +# CONFIG_DEBUG_INFO_DWARF4 is not set +# CONFIG_DEBUG_INFO_DWARF5 is not set +CONFIG_FRAME_WARN=2048 +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_READABLE_ASM is not set +# CONFIG_HEADERS_INSTALL is not set +# CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_SECTION_MISMATCH_WARN_ONLY=y +# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B is not set +CONFIG_ARCH_WANT_FRAME_POINTERS=y +CONFIG_FRAME_POINTER=y +# CONFIG_VMLINUX_MAP is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# end of Compile-time checks and compiler options + +# +# Generic Kernel Debugging Instruments +# +CONFIG_MAGIC_SYSRQ=y +CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0 +CONFIG_MAGIC_SYSRQ_SERIAL=y +CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE="" +CONFIG_DEBUG_FS=y +CONFIG_DEBUG_FS_ALLOW_ALL=y +# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set +# CONFIG_DEBUG_FS_ALLOW_NONE is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y +# CONFIG_UBSAN is not set +CONFIG_HAVE_ARCH_KCSAN=y +CONFIG_HAVE_KCSAN_COMPILER=y +# CONFIG_KCSAN is not set +# end of Generic Kernel Debugging Instruments + +# +# Networking Debugging +# +# CONFIG_NET_DEV_REFCNT_TRACKER is not set +# CONFIG_NET_NS_REFCNT_TRACKER is not set +# CONFIG_DEBUG_NET is not set +# end of Networking Debugging + +# +# Memory Debugging +# +# CONFIG_PAGE_EXTENSION is not set +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_SLUB_DEBUG=y +# CONFIG_SLUB_DEBUG_ON is not set +# CONFIG_PAGE_OWNER is not set +# CONFIG_PAGE_TABLE_CHECK is not set +# CONFIG_PAGE_POISONING is not set +# CONFIG_DEBUG_PAGE_REF is not set +# CONFIG_DEBUG_RODATA_TEST is not set +CONFIG_ARCH_HAS_DEBUG_WX=y +# CONFIG_DEBUG_WX is not set +CONFIG_GENERIC_PTDUMP=y +# CONFIG_PTDUMP_DEBUGFS is not set +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SHRINKER_DEBUG is not set +CONFIG_HAVE_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_SCHED_STACK_END_CHECK is not set +CONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_VM_PGTABLE is not set +CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y +# CONFIG_DEBUG_VIRTUAL is not set +CONFIG_DEBUG_MEMORY_INIT=y +# CONFIG_DEBUG_PER_CPU_MAPS is not set +CONFIG_HAVE_ARCH_KASAN=y +CONFIG_HAVE_ARCH_KASAN_SW_TAGS=y +CONFIG_HAVE_ARCH_KASAN_HW_TAGS=y +CONFIG_HAVE_ARCH_KASAN_VMALLOC=y +CONFIG_CC_HAS_KASAN_GENERIC=y +CONFIG_CC_HAS_KASAN_SW_TAGS=y +CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y +# CONFIG_KASAN is not set +CONFIG_HAVE_ARCH_KFENCE=y +# CONFIG_KFENCE is not set +# end of Memory Debugging + +# CONFIG_DEBUG_SHIRQ is not set + +# +# Debug Oops, Lockups and Hangs +# +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_PANIC_TIMEOUT=0 +# CONFIG_SOFTLOCKUP_DETECTOR is not set +CONFIG_HAVE_HARDLOCKUP_DETECTOR_OTHER_CPU=y +# CONFIG_HARDLOCKUP_DETECTOR is not set +# CONFIG_DETECT_HUNG_TASK is not set +# CONFIG_WQ_WATCHDOG is not set +# CONFIG_TEST_LOCKUP is not set +# end of Debug Oops, Lockups and Hangs + +# +# Scheduler Debugging +# +CONFIG_SCHED_DEBUG=y +CONFIG_SCHED_INFO=y +# CONFIG_SCHEDSTATS is not set +# end of Scheduler Debugging + +# CONFIG_DEBUG_TIMEKEEPING is not set + +# +# Lock Debugging (spinlocks, mutexes, etc...) +# +CONFIG_LOCK_DEBUGGING_SUPPORT=y +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set +# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_DEBUG_ATOMIC_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_LOCK_TORTURE_TEST is not set +# CONFIG_WW_MUTEX_SELFTEST is not set +# CONFIG_SCF_TORTURE_TEST is not set +# CONFIG_CSD_LOCK_WAIT_DEBUG is not set +# end of Lock Debugging (spinlocks, mutexes, etc...) + +# CONFIG_DEBUG_IRQFLAGS is not set +CONFIG_STACKTRACE=y +# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set +# CONFIG_DEBUG_KOBJECT is not set + +# +# Debug kernel data structures +# +# CONFIG_DEBUG_LIST is not set +# CONFIG_DEBUG_PLIST is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_BUG_ON_DATA_CORRUPTION is not set +# CONFIG_DEBUG_MAPLE_TREE is not set +# end of Debug kernel data structures + +# CONFIG_DEBUG_CREDENTIALS is not set + +# +# RCU Debugging +# +# CONFIG_RCU_SCALE_TEST is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_RCU_REF_SCALE_TEST is not set +CONFIG_RCU_CPU_STALL_TIMEOUT=60 +# CONFIG_BOOTPARAM_RCU_STALL_PANIC is not set +CONFIG_BOOTPARAM_RCU_STALL_PANIC_VALUE=0 +CONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0 +CONFIG_RCU_TRACE=y +# CONFIG_RCU_EQS_DEBUG is not set +# end of RCU Debugging + +# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set +# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set +# CONFIG_LATENCYTOP is not set +CONFIG_NOP_TRACER=y +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACE_CLOCK=y +CONFIG_RING_BUFFER=y +CONFIG_EVENT_TRACING=y +CONFIG_CONTEXT_SWITCH_TRACER=y +CONFIG_TRACING=y +CONFIG_GENERIC_TRACER=y +CONFIG_TRACING_SUPPORT=y +CONFIG_FTRACE=y +# CONFIG_BOOTTIME_TRACING is not set +CONFIG_FUNCTION_TRACER=y +CONFIG_FUNCTION_GRAPH_TRACER=y +CONFIG_DYNAMIC_FTRACE=y +CONFIG_DYNAMIC_FTRACE_WITH_REGS=y +# CONFIG_FUNCTION_PROFILER is not set +# CONFIG_STACK_TRACER is not set +# CONFIG_IRQSOFF_TRACER is not set +# CONFIG_SCHED_TRACER is not set +# CONFIG_HWLAT_TRACER is not set +# CONFIG_OSNOISE_TRACER is not set +# CONFIG_TIMERLAT_TRACER is not set +# CONFIG_FTRACE_SYSCALLS is not set +# CONFIG_TRACER_SNAPSHOT is not set +CONFIG_BRANCH_PROFILE_NONE=y +# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set +# CONFIG_PROFILE_ALL_BRANCHES is not set +CONFIG_BLK_DEV_IO_TRACE=y +CONFIG_UPROBE_EVENTS=y +CONFIG_BPF_EVENTS=y +CONFIG_DYNAMIC_EVENTS=y +CONFIG_PROBE_EVENTS=y +CONFIG_FTRACE_MCOUNT_RECORD=y +CONFIG_FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY=y +# CONFIG_SYNTH_EVENTS is not set +# CONFIG_HIST_TRIGGERS is not set +# CONFIG_TRACE_EVENT_INJECT is not set +# CONFIG_TRACEPOINT_BENCHMARK is not set +# CONFIG_RING_BUFFER_BENCHMARK is not set +# CONFIG_TRACE_EVAL_MAP_FILE is not set +# CONFIG_FTRACE_RECORD_RECURSION is not set +# CONFIG_FTRACE_STARTUP_TEST is not set +# CONFIG_RING_BUFFER_STARTUP_TEST is not set +# CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS is not set +# CONFIG_PREEMPTIRQ_DELAY_TEST is not set +# CONFIG_RV is not set +# CONFIG_SAMPLES is not set +CONFIG_STRICT_DEVMEM=y +# CONFIG_IO_STRICT_DEVMEM is not set + +# +# arm64 Debugging +# +# CONFIG_PID_IN_CONTEXTIDR is not set +# CONFIG_ARM64_RELOC_TEST is not set +# CONFIG_CORESIGHT is not set +# end of arm64 Debugging + +# +# Kernel Testing and Coverage +# +# CONFIG_KUNIT is not set +# CONFIG_NOTIFIER_ERROR_INJECTION is not set +# CONFIG_FAULT_INJECTION is not set +CONFIG_ARCH_HAS_KCOV=y +CONFIG_CC_HAS_SANCOV_TRACE_PC=y +# CONFIG_KCOV is not set +CONFIG_RUNTIME_TESTING_MENU=y +CONFIG_LKDTM=y +# CONFIG_TEST_MIN_HEAP is not set +# CONFIG_TEST_DIV64 is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_TEST_REF_TRACKER is not set +# CONFIG_RBTREE_TEST is not set +# CONFIG_REED_SOLOMON_TEST is not set +# CONFIG_INTERVAL_TREE_TEST is not set +# CONFIG_PERCPU_TEST is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_ASYNC_RAID6_TEST is not set +# CONFIG_TEST_HEXDUMP is not set +# CONFIG_STRING_SELFTEST is not set +# CONFIG_TEST_STRING_HELPERS is not set +# CONFIG_TEST_STRSCPY is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_TEST_PRINTF is not set +# CONFIG_TEST_SCANF is not set +# CONFIG_TEST_BITMAP is not set +# CONFIG_TEST_UUID is not set +# CONFIG_TEST_XARRAY is not set +# CONFIG_TEST_MAPLE_TREE is not set +# CONFIG_TEST_RHASHTABLE is not set +# CONFIG_TEST_SIPHASH is not set +# CONFIG_TEST_IDA is not set +# CONFIG_TEST_LKM is not set +# CONFIG_TEST_BITOPS is not set +# CONFIG_TEST_VMALLOC is not set +# CONFIG_TEST_USER_COPY is not set +# CONFIG_TEST_BPF is not set +# CONFIG_TEST_BLACKHOLE_DEV is not set +# CONFIG_FIND_BIT_BENCHMARK is not set +# CONFIG_TEST_FIRMWARE is not set +# CONFIG_TEST_SYSCTL is not set +# CONFIG_TEST_UDELAY is not set +# CONFIG_TEST_STATIC_KEYS is not set +# CONFIG_TEST_DYNAMIC_DEBUG is not set +# CONFIG_TEST_KMOD is not set +# CONFIG_TEST_MEMCAT_P is not set +# CONFIG_TEST_MEMINIT is not set +# CONFIG_TEST_FREE_PAGES is not set +CONFIG_ARCH_USE_MEMTEST=y +# CONFIG_MEMTEST is not set +# end of Kernel Testing and Coverage + +# +# Rust hacking +# +# end of Rust hacking +# end of Kernel hacking +CONFIG_ATA_PIIX=m diff --git a/fydetab/duo/config.nix b/fydetab/duo/config.nix new file mode 100644 index 00000000..049c0b9e --- /dev/null +++ b/fydetab/duo/config.nix @@ -0,0 +1,28 @@ +{ + CONFIG_DEVTMPFS = "y"; + CONFIG_CGROUPS = "y"; + CONFIG_INOTIFY_USER = "y"; + CONFIG_SIGNALFD = "y"; + CONFIG_TIMERFD = "y"; + CONFIG_EPOLL = "y"; + CONFIG_SYSFS = "y"; + CONFIG_PROC_FS = "y"; + CONFIG_FHANDLE = "y"; + CONFIG_CRYPTO_USER_API_HASH = "y"; + CONFIG_CRYPTO_HMAC = "y"; + CONFIG_CRYPTO_SHA256 = "y"; + CONFIG_DMIID = "y"; + CONFIG_AUTOFS_FS = "y"; + CONFIG_TMPFS_POSIX_ACL = "y"; + CONFIG_TMPFS_XATTR = "y"; + CONFIG_SECCOMP = "y"; + CONFIG_TMPFS = "y"; + CONFIG_BLK_DEV_INITRD = "y"; + CONFIG_EFI_STUB = "y"; + CONFIG_MODULES = "y"; + CONFIG_BINFMT_ELF = "y"; + CONFIG_UNIX = "y"; + CONFIG_NET = "y"; + CONFIG_IP_NF_MATCH_RPFILTER = "m"; + CONFIG_ATA_PIIX = "m"; +} diff --git a/fydetab/duo/default.nix b/fydetab/duo/default.nix new file mode 100644 index 00000000..ec6181b0 --- /dev/null +++ b/fydetab/duo/default.nix @@ -0,0 +1,129 @@ +{ + config, + pkgs, + lib, + ... +}: +let + ap6275pFirmware = pkgs.callPackage ./ap6275p.nix { }; +in +{ + imports = [ + ../../rockchip + ]; + + options.hardware.fydetab.duo = { + enablePanthor = lib.mkEnable "Panthor GPU driver"; + }; + + config = { + boot = lib.mkMerge [ + { + initrd.includeDefaultModules = false; + kernelPackages = pkgs.callPackage ./kernel.nix { }; + extraModprobeConfig = '' + options bcmdhd firmware_path=${ap6275pFirmware}/lib/firmware/ap6275p/fw_bcm43752a2_pcie_ag.bin nvram_path=${ap6275pFirmware}/lib/firmware/ap6275p/nvram_AP6275P.txt conf_path=${ap6275pFirmware}/lib/firmware/ap6275p/config.txt + ''; + kernelParams = [ + "console=ttyFIQ0" + "console=tty1" + "console=both" + "earlycon=uart8250,mmio32,0xfeb50000" + ]; + kernelModules = [ + "himax_tp" + "mh248-fyde" + "hci_uart" + ]; + } + (lib.mkIf config.hardware.bluetooth.enable { + kernelModules = [ + "bluetooth" + ]; + }) + ]; + + hardware = { + deviceTree = lib.mkMerge [ + { + name = "rockchip/rk3588s-fydetab-duo.dtb"; + } + (lib.mkIf config.hardware.fydetab.duo.enablePanthor { + overlays = [ + { + name = "fydetab-panthor-gpu"; + dtsText = '' + /dts-v1/; + /plugin/; + + #include + #include + #include + + / { + compatible = "rockchip,rk3588s-tablet-12c-linux"; + fragment@0 { + target = <&gpu>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@1 { + target = <&gpu_panthor>; + __overlay__ { + status = "okay"; + mali-supply = <&vdd_gpu_s0>; + }; + }; + }; + ''; + } + ]; + }) + ]; + rockchip = { + rk3588.enable = true; + platformFirmware = pkgs.callPackage ./u-boot.nix { }; + }; + firmware = lib.mkMerge [ + # Only iwd is supported by the interface + (lib.mkIf config.networking.wireless.iwd.enable ap6275pFirmware) + (lib.mkIf config.hardware.graphics.enable (pkgs.callPackage ./mali-g610.nix { })) + (lib.mkIf config.hardware.sensor.iio.enable (pkgs.callPackage ./himax.nix { })) + ]; + }; + + systemd.services.bluetooth-fydetab = lib.mkIf config.hardware.bluetooth.enable { + description = "FydeTab Duo Bluetooth fix"; + wantedBy = [ "multi-user.target" ]; + serviceConfig.Type = "simple"; + script = '' + ${lib.getExe' pkgs.util-linux "rfkill"} block 0 + ${lib.getExe' pkgs.util-linux "rfkill"} block bluetooth + sleep 2 + ${lib.getExe' pkgs.util-linux "rfkill"} unblock 0 + ${lib.getExe' pkgs.util-linux "rfkill"} unblock bluetooth + + sleep 1 + + ${ + lib.getExe (pkgs.callPackage ./brcm-patchram.nix { }) + } --enable_hci --no2bytes --use_baudrate_for_download --tosleep 200000 --baudrate 1500000 --patchram ${ap6275pFirmware}/lib/firmware/ap6275p/BCM4362A2.hcd /dev/ttyS9 + ''; + }; + + services.udev = { + extraHwdb = '' + # Fydetab + evdev:input:b0018v0000p0000e0000* + EVDEV_ABS_00=::265 + EVDEV_ABS_01=::166 + ''; + extraRules = '' + SUBSYSTEM=="iio" ATTR{name}=="lis2dw12" ENV{ACCEL_MOUNT_MATRIX}="1,0,0;0,-1,0;0,0,1" + SUBSYSTEM=="input", ENV{ID_INPUT_TABLET}=="1", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1 0 0 1" + ''; + }; + }; +} diff --git a/fydetab/duo/himax.nix b/fydetab/duo/himax.nix new file mode 100644 index 00000000..e499b3d1 --- /dev/null +++ b/fydetab/duo/himax.nix @@ -0,0 +1,34 @@ +{ + stdenv, + fetchurl, + lib, +}: +stdenv.mkDerivation (_finalAttrs: { + pname = "himax-firmware"; + version = "2024-11-09"; + + src = fetchurl { + url = "https://github.com/Linux-for-Fydetab-Duo/pkgbuilds/raw/f4c012bd42d87f677370f987f703982d53cd233d/fydetabduo-post-install/Himax_firmware.bin"; + }; + + compressFirmware = false; + + dontUnpack = true; + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/lib/firmware + cp --no-preserve=ownership,mode $src $out/lib/firmware/Himax_firmware.bin + ls -ahl $out/lib/firmware + + runHook postInstall + ''; + + meta = { + description = "Himax sensor firmware"; + license = lib.licenses.unfree; + }; +}) diff --git a/fydetab/duo/kernel.nix b/fydetab/duo/kernel.nix new file mode 100644 index 00000000..4517dd4b --- /dev/null +++ b/fydetab/duo/kernel.nix @@ -0,0 +1,18 @@ +{ + linuxPackagesFor, + linuxManualConfig, + fetchFromGitHub, +}: +linuxPackagesFor (linuxManualConfig rec { + version = "6.1.75"; + modDirVersion = version; + src = fetchFromGitHub { + owner = "Linux-for-Fydetab-Duo"; + repo = "linux-rockchip"; + rev = "74a1657bc526e336ff66add2fa83a0522957c4cb"; + hash = "sha256-Q0uCxebYw3c5Z/ZxCmTNyEfuYQQcPaw5qpvRTSWdtVo="; + }; + configfile = ./config; + config = import ./config.nix; + features.netfilterRPFilter = true; +}) diff --git a/fydetab/duo/mali-g610.nix b/fydetab/duo/mali-g610.nix new file mode 100644 index 00000000..34c31341 --- /dev/null +++ b/fydetab/duo/mali-g610.nix @@ -0,0 +1,35 @@ +{ + stdenv, + fetchurl, + lib, +}: +stdenv.mkDerivation (_finalAttrs: { + pname = "mali-g610-firmware"; + version = "2024-08-23"; + + src = fetchurl { + url = "https://github.com/Linux-for-Fydetab-Duo/pkgbuilds/raw/f4c012bd42d87f677370f987f703982d53cd233d/mali-G610-firmware-rkr4/mali_csffw.bin"; + hash = "sha256-Ei8ezBTS3g/pP8Al+Md+RTGr0AT6Fy/+aeQM19FdXGY="; + }; + + compressFirmware = false; + + dontUnpack = true; + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/lib/firmware + cp --no-preserve=ownership,mode $src $out/lib/firmware/mali_csffw.bin + ls -ahl $out/lib/firmware + + runHook postInstall + ''; + + meta = { + description = "Mali G610 firmware for Rockchip RK3588(S) using the rkr4 kernel or later"; + license = lib.licenses.unfree; + }; +}) diff --git a/fydetab/duo/u-boot.nix b/fydetab/duo/u-boot.nix new file mode 100644 index 00000000..dcaf80c0 --- /dev/null +++ b/fydetab/duo/u-boot.nix @@ -0,0 +1,98 @@ +{ + lib, + stdenv, + buildUboot, + armTrustedFirmwareRK3588, + rkbin, + fetchurl, + fetchFromGitHub, +}: +buildUBoot { + defconfig = "rk3588s_fydetab_duo_defconfig"; + extraMeta.platforms = [ "aarch64-linux" ]; + BL31 = "${armTrustedFirmwareRK3588}/bl31.elf"; + ROCKCHIP_TPL = rkbin.TPL_RK3588; + CROSS_COMPILE_ARM64 = "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}"; + INI_LOADER = fetchurl { + url = "https://github.com/rockchip-linux/rkbin/raw/${rkbin.src.rev}/RKBOOT/RK3588MINIALL.ini"; + hash = "sha256-87Vt6nXVt+jRrRatOlwGJXYqSj9nJz1LUfQnviIVb7I="; + }; + version = "5.10.0"; + filesToInstall = [ + "idbloader.img" + "u-boot.itb" + "rk3588_spl_loader_v1.18.113.bin" + "tools/resource_tool" + ]; + NIX_CFLAGS_COMPILE = "-Wno-error=enum-int-mismatch -Wno-error=maybe-uninitialized"; + extraMakeFlags = [ + "CROSS_COMPILE_ARM64=${stdenv.cc.targetPrefix}" + ]; + extraPatches = + lib.attrValues ( + lib.mapAttrs + ( + name: hash: + pkgs.fetchpatch { + url = "https://github.com/openFyde/overlay-fydetab_duo-openfyde/raw/fd84c5302908dea6a819c2dcd025a2bf93b5d4e8/sys-boot/rk-uboot/files/rk8/${name}"; + inherit hash; + } + ) + { + "001-add-avdd-avee-in-rockchip_panel.patch" = "sha256-qmBdmSejcDn4ulvOTLjfBsNh6nl12sbobtX4mhTMMKY="; + "002-add-fydetab-support.patch" = "sha256-QlnhdkoOQcGxRiIOx1jNqDLb/abB/+l+hAQ8vKCpwOw="; + "003-match-display-config-with-kernel.patch" = + "sha256-hmICiAgYjjBryJIuNXOffiYTssKSaV1cDeSgRTdq51k="; + "004-enable-sdcard-for-fydetab.patch" = "sha256-xrZ1kuije6X+huvarDIGFhMy2Puq0XvlKa1ZfgGcwlQ="; + "005-display-logo-on-loader-mode.patch" = "sha256-NMQHJMl8s1NUrDSnUX8gAmSNaurBU+m0xKd4TtEPmz4="; + "006-update-deconfig.patch" = "sha256-ZukJEZjEFaN6F4+3VnHfkfdaOTQmkw3fdClk8OeOYRw="; + "007-add-deinit-after-show-bmp-add-ums-mode.patch" = + "sha256-4pHV+qiXMNHcIlC1ciFQsejVZvdnEhfs7QBbge9kHoM="; + "008-add-charging-mode.patch" = "sha256-AToALdx5mwyQ875ZnrpqbuUE9oGonH76RaUq6757U1E="; + "009-set-lowpower-to-3.patch" = "sha256-CYYmY8vQcOIiA3QPvZt+AgI/BbkykoKGqLECim7kAyw="; + "010-fix-compiling-issue.patch" = "sha256-hmiFFe0JuxXMPgeQFWI8qZop+VPmldxgs0Wowchswbs="; + "011-fix-battery-temp.patch" = "sha256-MXe5FGzGETZ3wpW7ur5rBLysdNlDMwiq7/LNxdDpA0E="; + "012-fix-make.patch" = "sha256-/8ZfhB04R4zIddOXJEx8GcnYoljYsGolbt/oQYsm/Xk="; + "013-change-exit-charge-level.patch" = "sha256-84zy5yzoHyAutVmbCvvB5t4uJFQGsMt3jTUgVs5SIog="; + "014-fix-spl-sdcard-issue.patch" = "sha256-jIHybAm9XKDbWF3xG4E9K8x2j5nfpHOp6/2gWDlQ6aU="; + } + ) + ++ [ + ./uboot-remove-sig-req.patch + ]; + src = fetchFromGitHub { + owner = "rockchip-linux"; + repo = "u-boot"; + rev = "63c55618fbdc36333db4cf12f7d6a28f0a178017"; + hash = "sha256-OZmR6BLwCMK6lq9qmetIdrjSJJWcx7Po1OE9dBWL+Ew="; + }; + extraConfig = '' + CONFIG_FIT_SIGNATURE=n + CONFIG_TPL_BUILD=y + CONFIG_SPL_FIT_SIGNATURE=n + CONFIG_SPL_FIT_ROLLBACK_PROTECT=n + CONFIG_CMD_FDT=y + CONFIG_DEFAULT_FDT_FILE="rk3588s-fydetab-duo.dtb" + CONFIG_CMD_PXE=y + ''; + preBuild = '' + patchShebangs arch/arm/mach-rockchip/make_fit_atf.sh + patchShebangs arch/arm/mach-rockchip/decode_bl31.py + + # Needs write access to generate the spl + cp -r ${rkbin.src} rkbin + chmod -R u+rw rkbin + + export RKBIN_TOOLS=$(readlink -e rkbin/tools) + ln -s ${rkbin}/bin bin + + cp ${rkbin.src}/tools/boot_merger tools/ + cp ${rkbin.src}/tools/mkimage tools/ + ''; + postBuild = '' + sh ./make.sh --spl + sh ./make.sh --idblock + sh ./make.sh itb + mv idblock.bin idbloader.img + ''; +} diff --git a/fydetab/duo/uboot-remove-sig-req.patch b/fydetab/duo/uboot-remove-sig-req.patch new file mode 100644 index 00000000..73150aff --- /dev/null +++ b/fydetab/duo/uboot-remove-sig-req.patch @@ -0,0 +1,11 @@ +--- a/tools/Makefile 2025-08-17 22:31:27.653078358 -0700 ++++ b/tools/Makefile 2025-08-17 22:30:09.551827481 -0700 +@@ -54,7 +54,7 @@ + hostprogs-y += mkenvimage + mkenvimage-objs := mkenvimage.o os_support.o lib/crc32.o + +-hostprogs-y += dumpimage mkimage ++hostprogs-$(CONFIG_FIT_SIGNATURE) += dumpimage mkimage + hostprogs-$(CONFIG_FIT_SIGNATURE) += fit_info fit_check_sign + + # Rockchip pack tools From e9db02252a3bdccb1031ec0f7ecddadd0d308401 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Fri, 5 Sep 2025 08:31:44 -0700 Subject: [PATCH 1409/1476] fydetab/duo: fix typo with enable option --- fydetab/duo/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fydetab/duo/default.nix b/fydetab/duo/default.nix index ec6181b0..a3578eb4 100644 --- a/fydetab/duo/default.nix +++ b/fydetab/duo/default.nix @@ -13,7 +13,7 @@ in ]; options.hardware.fydetab.duo = { - enablePanthor = lib.mkEnable "Panthor GPU driver"; + enablePanthor = lib.mkEnableOption "Panthor GPU driver"; }; config = { From a6cc50d994a0fceca775cfb70dbe4a0dc1c8cadd Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Fri, 5 Sep 2025 11:16:21 -0700 Subject: [PATCH 1410/1476] fydetab/duo: fix hardware.firmware being applied --- fydetab/duo/default.nix | 104 ++++++++++++++++++++++------------------ 1 file changed, 58 insertions(+), 46 deletions(-) diff --git a/fydetab/duo/default.nix b/fydetab/duo/default.nix index a3578eb4..b19eb9ce 100644 --- a/fydetab/duo/default.nix +++ b/fydetab/duo/default.nix @@ -43,56 +43,68 @@ in }) ]; - hardware = { - deviceTree = lib.mkMerge [ - { - name = "rockchip/rk3588s-fydetab-duo.dtb"; - } - (lib.mkIf config.hardware.fydetab.duo.enablePanthor { - overlays = [ - { - name = "fydetab-panthor-gpu"; - dtsText = '' - /dts-v1/; - /plugin/; + hardware = lib.mkMerge [ + { + deviceTree = lib.mkMerge [ + { + name = "rockchip/rk3588s-fydetab-duo.dtb"; + } + (lib.mkIf config.hardware.fydetab.duo.enablePanthor { + overlays = [ + { + name = "fydetab-panthor-gpu"; + dtsText = '' + /dts-v1/; + /plugin/; - #include - #include - #include + #include + #include + #include - / { - compatible = "rockchip,rk3588s-tablet-12c-linux"; - fragment@0 { - target = <&gpu>; - __overlay__ { - status = "disabled"; + / { + compatible = "rockchip,rk3588s-tablet-12c-linux"; + fragment@0 { + target = <&gpu>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@1 { + target = <&gpu_panthor>; + __overlay__ { + status = "okay"; + mali-supply = <&vdd_gpu_s0>; + }; }; }; - - fragment@1 { - target = <&gpu_panthor>; - __overlay__ { - status = "okay"; - mali-supply = <&vdd_gpu_s0>; - }; - }; - }; - ''; - } - ]; - }) - ]; - rockchip = { - rk3588.enable = true; - platformFirmware = pkgs.callPackage ./u-boot.nix { }; - }; - firmware = lib.mkMerge [ - # Only iwd is supported by the interface - (lib.mkIf config.networking.wireless.iwd.enable ap6275pFirmware) - (lib.mkIf config.hardware.graphics.enable (pkgs.callPackage ./mali-g610.nix { })) - (lib.mkIf config.hardware.sensor.iio.enable (pkgs.callPackage ./himax.nix { })) - ]; - }; + ''; + } + ]; + }) + ]; + rockchip = { + rk3588.enable = true; + platformFirmware = pkgs.callPackage ./u-boot.nix { }; + }; + } + (lib.mkIf config.networking.wireless.iwd.enable { + firmware = [ + # Only iwd is supported by the interface + ap6275pFirmware + ]; + }) + (lib.mkIf config.hardware.graphics.enable { + firmware = [ + (pkgs.callPackage ./mali-g610.nix { }) + ]; + }) + (lib.mkIf config.hardware.sensor.iio.enable { + firmware = [ + (pkgs.callPackage ./himax.nix { }) + ]; + }) + ]; systemd.services.bluetooth-fydetab = lib.mkIf config.hardware.bluetooth.enable { description = "FydeTab Duo Bluetooth fix"; From 410a17733a70b9c103e60684aa30fc8f3249e285 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Fri, 5 Sep 2025 11:20:47 -0700 Subject: [PATCH 1411/1476] fydetab/duo: fix himax firmware source hash --- fydetab/duo/himax.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/fydetab/duo/himax.nix b/fydetab/duo/himax.nix index e499b3d1..ac1da125 100644 --- a/fydetab/duo/himax.nix +++ b/fydetab/duo/himax.nix @@ -9,6 +9,7 @@ stdenv.mkDerivation (_finalAttrs: { src = fetchurl { url = "https://github.com/Linux-for-Fydetab-Duo/pkgbuilds/raw/f4c012bd42d87f677370f987f703982d53cd233d/fydetabduo-post-install/Himax_firmware.bin"; + hash = "sha256-z0p/zXcNTBdhKCV6GmM2C8C02lu4Wkb2HP+Ir/nQJTc="; }; compressFirmware = false; From 295e0f92ff26b8260c78d141a4ee1210816c9ede Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Fri, 5 Sep 2025 11:22:25 -0700 Subject: [PATCH 1412/1476] fydetab/duo: clarify graphics support --- fydetab/duo/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fydetab/duo/README.md b/fydetab/duo/README.md index f96960d1..e5691236 100644 --- a/fydetab/duo/README.md +++ b/fydetab/duo/README.md @@ -5,6 +5,8 @@ The Fydetab Duo is an open source and hackable tablet by FydeOS. ## Features - Display: **works** + - X11: **untested** + - Wayland: **not working** (niri, sway, COSMIC) - GPU driver: **not working** - WiFi: **working** - Cellular: **untested** From 7e40faf569db5ecb30aa50a0df88fdd50fa74e6f Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Fri, 5 Sep 2025 11:49:13 -0700 Subject: [PATCH 1413/1476] fydetab/duo: enable hid sensor hub kernel module --- fydetab/duo/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fydetab/duo/config b/fydetab/duo/config index 2b343df4..d332555e 100644 --- a/fydetab/duo/config +++ b/fydetab/duo/config @@ -6540,7 +6540,7 @@ CONFIG_HID_WIIMOTE=m # CONFIG_HID_XINMO is not set # CONFIG_HID_ZEROPLUS is not set # CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set +CONFIG_HID_SENSOR_HUB=m # CONFIG_HID_ALPS is not set # CONFIG_HID_MCP2221 is not set # end of Special HID drivers From 0c55f0f776577c45cc9d05d2e0a38013b965d70b Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sun, 7 Sep 2025 01:15:31 +0200 Subject: [PATCH 1414/1476] tuxedo/pulse/15/gen2: load more internal modules --- tuxedo/pulse/15/gen2/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tuxedo/pulse/15/gen2/default.nix b/tuxedo/pulse/15/gen2/default.nix index 0afd6b3b..8ead6714 100644 --- a/tuxedo/pulse/15/gen2/default.nix +++ b/tuxedo/pulse/15/gen2/default.nix @@ -2,7 +2,12 @@ { imports = [ ../../../../common/cpu/amd + ../../../../common/cpu/amd/pstate.nix + ../../../../common/cpu/amd/zenpower.nix ../../../../common/gpu/amd + ../../../../common/hidpi.nix + ../../../../common/pc + ../../../../common/pc/laptop ../../../../common/pc/ssd ]; From 40dffd02e3fe00ad1a27fd1b8b0d059c253776da Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sun, 7 Sep 2025 21:38:07 +0000 Subject: [PATCH 1415/1476] tuxedo/pulse/15/gen2: defer amdgpu secure display warning to Stage 2 Defer the amdgpu secure display warning from Stage 1 to Stage 2, despite the initial decision [1] of reverting commit dd18dc771432 ("fix(tuxedo/pulse/15/gen2): prevent 'Secure display: Generic Failure' warning") with commit 80d98a7d55c6 ("feat(tuxedo/pulse/15/gen2): use default 'hardware.amdgpu.loadInInitrd'"). Since this noisy warning is an inherit property of this hardware, deferring it is the desired behavior. [1]: https://github.com/NixOS/nixos-hardware/pull/755#discussion_r1359669448 --- tuxedo/pulse/15/gen2/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tuxedo/pulse/15/gen2/default.nix b/tuxedo/pulse/15/gen2/default.nix index 8ead6714..edf3c363 100644 --- a/tuxedo/pulse/15/gen2/default.nix +++ b/tuxedo/pulse/15/gen2/default.nix @@ -11,6 +11,13 @@ ../../../../common/pc/ssd ]; + # Defer the following Stage 1 warning to Stage 2: + # + # loading module amdgpu... + # [...] amdgpu 0000:05:00.0: amdgpu: Secure display: Generic Failure. + # [...] amdgpu 0000:05:00.0: amdgpu: SECUREDISPLAY: query securedisplay TA failed. ret 0x0 + hardware.amdgpu.initrd.enable = false; + services.udev.extraRules = builtins.concatStringsSep "\n" ( [ "# Properly suspend the system." ] ++ (map From 536ac3ab4b6cf09aa4a831b25ce4fea94ae79740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 11 Sep 2025 23:56:14 +0200 Subject: [PATCH 1416/1476] common/cpu/intel/comet-lake: drop gpu option It is already set for the gpu --- common/cpu/intel/comet-lake/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/cpu/intel/comet-lake/default.nix b/common/cpu/intel/comet-lake/default.nix index 25af65fe..3c688f50 100644 --- a/common/cpu/intel/comet-lake/default.nix +++ b/common/cpu/intel/comet-lake/default.nix @@ -3,6 +3,4 @@ ./cpu-only.nix ../../../gpu/intel/comet-lake ]; - - hardware.intelgpu.vaapiDriver = "intel-media-driver"; } From a98f1a2b75cf5fc934db11a8818e266360234238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 11 Sep 2025 23:56:36 +0200 Subject: [PATCH 1417/1476] Drop some unused inputs --- common/gpu/intel/broadwell/default.nix | 2 -- common/gpu/intel/skylake/default.nix | 2 -- 2 files changed, 4 deletions(-) diff --git a/common/gpu/intel/broadwell/default.nix b/common/gpu/intel/broadwell/default.nix index 0b19cb78..6412c671 100644 --- a/common/gpu/intel/broadwell/default.nix +++ b/common/gpu/intel/broadwell/default.nix @@ -1,5 +1,3 @@ -{ lib, pkgs, ... }: - { imports = [ ../. ]; diff --git a/common/gpu/intel/skylake/default.nix b/common/gpu/intel/skylake/default.nix index e9c24279..7dd5a921 100644 --- a/common/gpu/intel/skylake/default.nix +++ b/common/gpu/intel/skylake/default.nix @@ -1,5 +1,3 @@ -{ pkgs, ... }: - { imports = [ ../. ]; From 4100cffdbee7980e18ab013dd709d155acec767d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 11 Sep 2025 23:57:40 +0200 Subject: [PATCH 1418/1476] common/gpu: add option to choose intel-compute-runtime variant --- common/gpu/intel/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index a8671d41..0c5e346b 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -23,6 +23,15 @@ default = true; }; + computeRuntime = lib.mkOption { + description = "intel-compute-runtime variant to use"; + type = lib.types.enum [ + "default" + "legacy" + ]; + default = "default"; + }; + vaapiDriver = lib.mkOption { description = "Intel VAAPI driver to use (use null to use both)"; type = lib.types.nullOr ( @@ -59,7 +68,11 @@ useIntelMediaDriver = cfg.vaapiDriver == "intel-media-driver" || cfg.vaapiDriver == null; intel-media-driver = pkgs.intel-media-driver; intel-media-driver-32 = pkgs.driversi686Linux.intel-media-driver; - intel-compute-runtime = pkgs.intel-compute-runtime; + intel-compute-runtime = + if cfg.computeRuntime == "legacy" then + pkgs.intel-compute-runtime-legacy1 + else + pkgs.intel-compute-runtime; vpl-gpu-rt = pkgs.vpl-gpu-rt or pkgs.onevpl-intel-gpu; in { From e049c10c3e9f9e48e6f984c7993c7bd447395fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 11 Sep 2025 23:58:40 +0200 Subject: [PATCH 1419/1476] treewide: set intel cpu variant to legacy where newer versions are not supported According to https://github.com/intel/compute-runtime#legacy-platforms --- common/gpu/intel/broadwell/default.nix | 1 + common/gpu/intel/coffee-lake/default.nix | 5 ++++- common/gpu/intel/comet-lake/default.nix | 5 ++++- common/gpu/intel/elkhart-lake/default.nix | 5 ++++- common/gpu/intel/kaby-lake/default.nix | 5 ++++- common/gpu/intel/skylake/default.nix | 1 + 6 files changed, 18 insertions(+), 4 deletions(-) diff --git a/common/gpu/intel/broadwell/default.nix b/common/gpu/intel/broadwell/default.nix index 6412c671..eb4d1cdf 100644 --- a/common/gpu/intel/broadwell/default.nix +++ b/common/gpu/intel/broadwell/default.nix @@ -2,6 +2,7 @@ imports = [ ../. ]; hardware.intelgpu = { + computeRuntime = "legacy"; vaapiDriver = "intel-vaapi-driver"; enableHybridCodec = true; }; diff --git a/common/gpu/intel/coffee-lake/default.nix b/common/gpu/intel/coffee-lake/default.nix index 55e71d21..49c683d8 100644 --- a/common/gpu/intel/coffee-lake/default.nix +++ b/common/gpu/intel/coffee-lake/default.nix @@ -7,5 +7,8 @@ "i915.enable_guc=2" ]; - hardware.intelgpu.vaapiDriver = "intel-media-driver"; + hardware.intelgpu = { + computeRuntime = "legacy"; + vaapiDriver = "intel-media-driver"; + }; } diff --git a/common/gpu/intel/comet-lake/default.nix b/common/gpu/intel/comet-lake/default.nix index 43ed1c46..200e34a3 100644 --- a/common/gpu/intel/comet-lake/default.nix +++ b/common/gpu/intel/comet-lake/default.nix @@ -3,5 +3,8 @@ boot.kernelParams = [ "i915.enable_guc=2" ]; - hardware.intelgpu.vaapiDriver = "intel-media-driver"; + hardware.intelgpu = { + computeRuntime = "legacy"; + vaapiDriver = "intel-media-driver"; + }; } diff --git a/common/gpu/intel/elkhart-lake/default.nix b/common/gpu/intel/elkhart-lake/default.nix index 43ed1c46..200e34a3 100644 --- a/common/gpu/intel/elkhart-lake/default.nix +++ b/common/gpu/intel/elkhart-lake/default.nix @@ -3,5 +3,8 @@ boot.kernelParams = [ "i915.enable_guc=2" ]; - hardware.intelgpu.vaapiDriver = "intel-media-driver"; + hardware.intelgpu = { + computeRuntime = "legacy"; + vaapiDriver = "intel-media-driver"; + }; } diff --git a/common/gpu/intel/kaby-lake/default.nix b/common/gpu/intel/kaby-lake/default.nix index a8386691..37a639d8 100644 --- a/common/gpu/intel/kaby-lake/default.nix +++ b/common/gpu/intel/kaby-lake/default.nix @@ -7,5 +7,8 @@ "i915.enable_psr=2" ]; - hardware.intelgpu.vaapiDriver = "intel-media-driver"; + hardware.intelgpu = { + computeRuntime = "legacy"; + vaapiDriver = "intel-media-driver"; + }; } diff --git a/common/gpu/intel/skylake/default.nix b/common/gpu/intel/skylake/default.nix index 7dd5a921..553cc836 100644 --- a/common/gpu/intel/skylake/default.nix +++ b/common/gpu/intel/skylake/default.nix @@ -10,6 +10,7 @@ # NixOS Wiki recommends using the legacy intel-vaapi-driver with the hybrid codec over that one for Skylake. # https://wiki.nixos.org/wiki/Accelerated_Video_Playback hardware.intelgpu = { + computeRuntime = "legacy"; vaapiDriver = "intel-vaapi-driver"; enableHybridCodec = true; }; From 82e5fcb58cf7d2b3f3bd2264a5acdc8816c38bf4 Mon Sep 17 00:00:00 2001 From: Sandro Date: Mon, 15 Sep 2025 00:39:45 +0200 Subject: [PATCH 1420/1476] Fix fydetab duo eval --- fydetab/duo/u-boot.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fydetab/duo/u-boot.nix b/fydetab/duo/u-boot.nix index dcaf80c0..4ce1b2b4 100644 --- a/fydetab/duo/u-boot.nix +++ b/fydetab/duo/u-boot.nix @@ -1,9 +1,10 @@ { lib, stdenv, - buildUboot, + buildUBoot, armTrustedFirmwareRK3588, rkbin, + fetchpatch, fetchurl, fetchFromGitHub, }: @@ -33,7 +34,7 @@ buildUBoot { lib.mapAttrs ( name: hash: - pkgs.fetchpatch { + fetchpatch { url = "https://github.com/openFyde/overlay-fydetab_duo-openfyde/raw/fd84c5302908dea6a819c2dcd025a2bf93b5d4e8/sys-boot/rk-uboot/files/rk8/${name}"; inherit hash; } From 0632a5e10fa0d4a81a59e9b084d4dc898f0e26ba Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Thu, 24 Jul 2025 13:49:05 +1000 Subject: [PATCH 1421/1476] MacBookAir6,x: fix wireless --- apple/macbook-air/6/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apple/macbook-air/6/default.nix b/apple/macbook-air/6/default.nix index 182511f3..3e927352 100644 --- a/apple/macbook-air/6/default.nix +++ b/apple/macbook-air/6/default.nix @@ -1,8 +1,12 @@ -{ lib, ... }: +{ config, lib, ... }: { imports = [ ../. ]; + boot.kernelModules = [ "wl" ]; + boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + boot.blacklistedKernelModules = [ "bcma" ]; + boot = { # Divides power consumption by two. kernelParams = [ "acpi_osi=" ]; From 3caaf86f9d7558cce864cfc929a2de619ecc0de2 Mon Sep 17 00:00:00 2001 From: Ameya Shenoy Date: Wed, 17 Sep 2025 01:19:01 +0530 Subject: [PATCH 1422/1476] feat: kernel params for x1 carbon Signed-off-by: Ameya Shenoy --- lenovo/thinkpad/x1/12th-gen/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lenovo/thinkpad/x1/12th-gen/default.nix b/lenovo/thinkpad/x1/12th-gen/default.nix index b13ea279..3350cad8 100644 --- a/lenovo/thinkpad/x1/12th-gen/default.nix +++ b/lenovo/thinkpad/x1/12th-gen/default.nix @@ -2,6 +2,12 @@ imports = [ ../. ../../../../common/pc/ssd + ../../../../common/cpu/intel/meteor-lake + ]; + + boot.kernelParams = [ + "i915.enable_guc=3" + "i915.force_probe=7d55" ]; hardware.trackpoint.device = "TPPS/2 Synaptics TrackPoint"; From 4ba28b48c8f1fb3c2dee6c7b4ee2e2e6b26ac2a0 Mon Sep 17 00:00:00 2001 From: kuwii Date: Sun, 21 Sep 2025 11:23:40 +0800 Subject: [PATCH 1423/1476] linglong/nova-studio: init --- README.md | 1 + flake.nix | 1 + linglong/nova-studio/default.nix | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 linglong/nova-studio/default.nix diff --git a/README.md b/README.md index c9b80cb9..59abb7ea 100644 --- a/README.md +++ b/README.md @@ -361,6 +361,7 @@ See code for all available configurations. | [Lenovo Yoga Slim 7i Pro X 14IAH7 (Hybrid)](lenovo/yoga/7/14IAH7/hybrid) | `` | `lenovo-yoga-7-14IAH7-hybrid` | | [Lenovo Yoga Slim 7 14ILL10](lenovo/yoga/7/14ILL10) | `` | `lenovo-yoga-7-14ILL10` | | [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `` | `lenovo-yoga-7-slim-gen8` | +| [Linglong Nova Studio](linglong/nova-studio) | `` | `linglong-nova-studio` | | [MSI B550-A PRO](msi/b550-a-pro) | `` | `msi-b550-a-pro` | | [MSI B350 TOMAHAWK](msi/b350-tomahawk) | `` | `msi-b350-tomahawk` | | [MSI GS60 2QE](msi/gs60) | `` | `msi-gs60` | diff --git a/flake.nix b/flake.nix index 7cfe53df..c57a5e5a 100644 --- a/flake.nix +++ b/flake.nix @@ -301,6 +301,7 @@ lenovo-yoga-7-14ILL10 = import ./lenovo/yoga/7/14ILL10; lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; + linglong-nova-studio = import ./linglong/nova-studio; malibal-aon-s1-intel = import ./malibal/aon/s1; mechrevo-gm5hg0a = import ./mechrevo/GM5HG0A; microchip-icicle-kit = import ./microchip/icicle-kit; diff --git a/linglong/nova-studio/default.nix b/linglong/nova-studio/default.nix new file mode 100644 index 00000000..b3632439 --- /dev/null +++ b/linglong/nova-studio/default.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ + ../../common/cpu/amd + ../../common/cpu/amd/pstate.nix + ../../common/cpu/amd/zenpower.nix + ../../common/gpu/amd + ../../common/pc/ssd + ]; + + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.14") ( + lib.mkDefault pkgs.linuxPackages_latest + ); + boot.kernelModules = [ "amdgpu" ]; + + hardware.enableRedistributableFirmware = lib.mkDefault true; + hardware.graphics.enable = lib.mkDefault true; + hardware.graphics.enable32Bit = lib.mkDefault true; + + hardware.amdgpu.opencl.enable = lib.mkDefault true; +} From 76a314765d46a41ff366d05d95d4654cc2b71672 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 11 Sep 2025 22:47:59 +0200 Subject: [PATCH 1424/1476] lenovo/t14-intel-gen1(-nvidia): init init configuration for t14 intel gen1 with and without nvidia dedicated graphics card ref: https://thinkwiki.de/T14_Gen_1_(Intel) --- README.md | 4 ++- flake.nix | 2 ++ lenovo/thinkpad/t14/intel/gen1/default.nix | 8 ++++++ .../t14/intel/gen1/nvidia/default.nix | 28 +++++++++++++++++++ 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 lenovo/thinkpad/t14/intel/gen1/default.nix create mode 100644 lenovo/thinkpad/t14/intel/gen1/nvidia/default.nix diff --git a/README.md b/README.md index c9b80cb9..6e9d9a92 100644 --- a/README.md +++ b/README.md @@ -298,7 +298,9 @@ See code for all available configurations. | [Lenovo ThinkPad T14 AMD Gen 4](lenovo/thinkpad/t14/amd/gen4) | `` | `lenovo-thinkpad-t14-amd-gen4` | | [Lenovo ThinkPad T14 AMD Gen 5](lenovo/thinkpad/t14/amd/gen5) | `` | `lenovo-thinkpad-t14-amd-gen5` | | [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | `lenovo-thinkpad-t14` | -| [Lenovo ThinkPad T14 Intel Gen 6](lenovo/thinkpad/t14/intel/gen6) | `` | `lenovo-thinkpad-t14-intel-gen6` | +| [Lenovo ThinkPad T14 Intel Gen 1](lenovo/thinkpad/t14/intel/gen1) | `` | `lenovo-thinkpad-t14-intel-gen1` | +| [Lenovo ThinkPad T14 Intel Gen 1 (Nvidia)](lenovo/thinkpad/t14/intel/gen1/nvidia) | ``| `lenovo-thinkpad-t14-intel-gen1-nvidia` | +| [Lenovo ThinkPad T14 Intel Gen 6](lenovo/thinkpad/t14/intel/gen6) | `` | `lenovo-thinkpad-t14-intel-gen6` | | [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | `lenovo-thinkpad-t14s-amd-gen1` | | [Lenovo ThinkPad T14s AMD Gen 4](lenovo/thinkpad/t14s/amd/gen4) | `` | `lenovo-thinkpad-t14s-amd-gen4` | | [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | `lenovo-thinkpad-t14s` | diff --git a/flake.nix b/flake.nix index 7cfe53df..d0c099c7 100644 --- a/flake.nix +++ b/flake.nix @@ -234,6 +234,8 @@ lenovo-thinkpad-t14-amd-gen3 = import ./lenovo/thinkpad/t14/amd/gen3; lenovo-thinkpad-t14-amd-gen4 = import ./lenovo/thinkpad/t14/amd/gen4; lenovo-thinkpad-t14-amd-gen5 = import ./lenovo/thinkpad/t14/amd/gen5; + lenovo-thinkpad-t14-intel-gen1 = import ./lenovo/thinkpad/t14/intel/gen1; + lenovo-thinkpad-t14-intel-gen1-nvidia = import ./lenovo/thinkpad/t14/intel/gen1/nvidia; lenovo-thinkpad-t14-intel-gen6 = import ./lenovo/thinkpad/t14/intel/gen6; lenovo-thinkpad-t14s = import ./lenovo/thinkpad/t14s; lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1; diff --git a/lenovo/thinkpad/t14/intel/gen1/default.nix b/lenovo/thinkpad/t14/intel/gen1/default.nix new file mode 100644 index 00000000..efe407d3 --- /dev/null +++ b/lenovo/thinkpad/t14/intel/gen1/default.nix @@ -0,0 +1,8 @@ +{ lib, config, ... }: +{ + imports = [ + ../../../../../common/cpu/intel/comet-lake + + ../. + ]; +} diff --git a/lenovo/thinkpad/t14/intel/gen1/nvidia/default.nix b/lenovo/thinkpad/t14/intel/gen1/nvidia/default.nix new file mode 100644 index 00000000..178b2254 --- /dev/null +++ b/lenovo/thinkpad/t14/intel/gen1/nvidia/default.nix @@ -0,0 +1,28 @@ +{ lib, config, ... }: +{ + imports = [ + ../../../../../../common/gpu/nvidia/pascal + ../../../../../../common/gpu/nvidia/prime-sync.nix + + ../. + ]; + hardware = { + graphics = { + enable = lib.mkDefault true; + enable32Bit = lib.mkDefault true; + }; + nvidia = { + powerManagement.enable = lib.mkDefault true; + modesetting.enable = lib.mkDefault true; + + dynamicBoost.enable = lib.mkForce false; # Dynamic boost is not supported on Pascal architeture + prime = { + # 00:02.0 VGA compatible controller: Intel Corporation CometLake-U GT2 [UHD Graphics] (rev 02) + intelBusId = lib.mkDefault "PCI:0:2:0"; + # 2d:00.0 3D controller: NVIDIA Corporation GP108M [GeForce MX330] (rev a1) + nvidiaBusId = lib.mkDefault "PCI:45:0:0"; + }; + }; + }; + services.thermald.enable = lib.mkDefault true; +} From 27581273c242efc4aa26cc0f92215aa8b3aaa78c Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Mon, 1 Sep 2025 11:01:28 +0200 Subject: [PATCH 1425/1476] panasonic: add Let's Note CF-LX3 configuration --- README.md | 1 + flake.nix | 1 + panasonic/letsnote/cf-lx3/default.nix | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 panasonic/letsnote/cf-lx3/default.nix diff --git a/README.md b/README.md index c9b80cb9..9caf3367 100644 --- a/README.md +++ b/README.md @@ -389,6 +389,7 @@ See code for all available configurations. | [Omen 15-en1007sa](omen/15-en1007sa) | `` | `omen-15-en1007sa` | | [Omen 15-en0002np](omen/15-en0002np) | `` | `omen-15-en0002np` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | `onenetbook-4` | +| [Panasonic Let's Note CF-LX3](panasonic/letsnote/cf-lx3) | `` | `panasonic-letsnote-cf-lx3` | | [Panasonic Let's Note CF-LX4](panasonic/letsnote/cf-lx4) | `` | `letsnote-cf-lx4` | | [PC Engines APU](pcengines/apu) | `` | `pcengines-apu` | | [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | `pine64-pinebook-pro` | diff --git a/flake.nix b/flake.nix index 7cfe53df..f8b2a3cd 100644 --- a/flake.nix +++ b/flake.nix @@ -300,6 +300,7 @@ lenovo-yoga-7-14IAH7-hybrid = import ./lenovo/yoga/7/14IAH7/hybrid; lenovo-yoga-7-14ILL10 = import ./lenovo/yoga/7/14ILL10; lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8; + letsnote-cf-lx3 = import ./panasonic/letsnote/cf-lx3; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; malibal-aon-s1-intel = import ./malibal/aon/s1; mechrevo-gm5hg0a = import ./mechrevo/GM5HG0A; diff --git a/panasonic/letsnote/cf-lx3/default.nix b/panasonic/letsnote/cf-lx3/default.nix new file mode 100644 index 00000000..6b965980 --- /dev/null +++ b/panasonic/letsnote/cf-lx3/default.nix @@ -0,0 +1,11 @@ +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + # Force use of the intel_backlight driver for backlight control. + # This allows the backlight save/load systemd service to work. + boot.kernelParams = [ "acpi_backlight=video" ]; +} From 0e9dc7cf611c900c2298054b1d93121478fbf9fa Mon Sep 17 00:00:00 2001 From: kuwii Date: Thu, 25 Sep 2025 22:42:51 +0800 Subject: [PATCH 1426/1476] linglong/nova-studio: remove opencl config and move it to readme --- linglong/nova-studio/README.md | 39 ++++++++++++++++++++++++++++++++ linglong/nova-studio/default.nix | 2 -- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 linglong/nova-studio/README.md diff --git a/linglong/nova-studio/README.md b/linglong/nova-studio/README.md new file mode 100644 index 00000000..ef35dc04 --- /dev/null +++ b/linglong/nova-studio/README.md @@ -0,0 +1,39 @@ +# Linglong Nova Studio + +This is a configuration for [Linglong Nova Studio (玲珑星核)](https://www.firstarpc.com/). + +## Configuration + +import `` (using configurations), or add `nixos-hardware.nixosModules.linglong-nova-studio` in modules (using Flakes). + +This configuration will force to use Linux kernel that >= 6.14, otherwise it will be updated to the latest version. This part follows [Framework Desktop](../../framework/desktop/amd-ai-max-300-series), which is also a desktop computer using Ryzen AI Max 300 series processor. + +## OpenCL and ROCm support + +To setup OpenCL and ROCm environment, please add the following configuration: + +``` +# Tell packages that supports ROCm to enable the related supports. +nixpkgs.config.rocmSupport = true; + +# Install ROCm and enable +hardware.amdgpu.opencl.enable = true; + +# These tools can show the info related to ROCm and OpenCL. +environment.systemPackages = with pkgs; [ + rocmPackages.rocminfo + clinfo +]; +``` + +After switching, to check whether the environment has been correctly setup, please run + +``` +clinfo +``` + +and + +``` +rocminfo +``` diff --git a/linglong/nova-studio/default.nix b/linglong/nova-studio/default.nix index b3632439..32aa0896 100644 --- a/linglong/nova-studio/default.nix +++ b/linglong/nova-studio/default.nix @@ -22,6 +22,4 @@ hardware.enableRedistributableFirmware = lib.mkDefault true; hardware.graphics.enable = lib.mkDefault true; hardware.graphics.enable32Bit = lib.mkDefault true; - - hardware.amdgpu.opencl.enable = lib.mkDefault true; } From 095a445675f0db39c1b42d62a7888df8670fe6b0 Mon Sep 17 00:00:00 2001 From: pancho horrillo Date: Sat, 27 Sep 2025 07:11:36 +0200 Subject: [PATCH 1427/1476] apple/macbook-air/5: init --- README.md | 1 + apple/macbook-air/5/default.nix | 9 +++++++++ flake.nix | 1 + 3 files changed, 11 insertions(+) create mode 100644 apple/macbook-air/5/default.nix diff --git a/README.md b/README.md index c9b80cb9..1891ec26 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ See code for all available configurations. | [Apple iMac 18.2](apple/imac/18-2) | `` | `apple-imac-18-2` | | [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | `apple-macbook-air-3` | | [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | `apple-macbook-air-4` | +| [Apple MacBook Air 5,X](apple/macbook-air/5) | `` | `apple-macbook-air-5` | | [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | `apple-macbook-air-6` | | [Apple MacBook Air 7,X](apple/macbook-air/7) | `` | `apple-macbook-air-7` | | [Apple MacBook Pro 8,1](apple/macbook-pro/8-1) | `` | `apple-macbook-pro-8-1` | diff --git a/apple/macbook-air/5/default.nix b/apple/macbook-air/5/default.nix new file mode 100644 index 00000000..afd7a0e0 --- /dev/null +++ b/apple/macbook-air/5/default.nix @@ -0,0 +1,9 @@ +{ + ... +}: + +{ + imports = [ + ../. + ]; +} diff --git a/flake.nix b/flake.nix index 7cfe53df..58e8a014 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,7 @@ apple-imac-18-2 = import ./apple/imac/18-2; apple-macbook-air-3 = import ./apple/macbook-air/3; apple-macbook-air-4 = import ./apple/macbook-air/4; + apple-macbook-air-5 = import ./apple/macbook-air/5; apple-macbook-air-6 = import ./apple/macbook-air/6; apple-macbook-air-7 = import ./apple/macbook-air/7; apple-macbook-pro = import ./apple/macbook-pro; From 5e57f28e6ad899725a9550b018693c01a049b411 Mon Sep 17 00:00:00 2001 From: Jakob Leifhelm Date: Mon, 9 Jun 2025 10:22:23 +0200 Subject: [PATCH 1428/1476] mnt/reform: init --- README.md | 1 + flake.nix | 1 + mnt/reform/default.nix | 10 + mnt/reform/dtsPatch.nix | 48 ++ mnt/reform/kernel.nix | 148 ++++++ mnt/reform/lpc.nix | 36 ++ mnt/reform/rk3588/README.md | 48 ++ mnt/reform/rk3588/default.nix | 35 ++ mnt/reform/rk3588/firmware.nix | 25 + mnt/reform/rk3588/initial-asound.state | 702 +++++++++++++++++++++++++ mnt/reform/rk3588/installer.nix | 238 +++++++++ mnt/reform/rk3588/uboot.nix | 54 ++ 12 files changed, 1346 insertions(+) create mode 100644 mnt/reform/default.nix create mode 100644 mnt/reform/dtsPatch.nix create mode 100644 mnt/reform/kernel.nix create mode 100644 mnt/reform/lpc.nix create mode 100644 mnt/reform/rk3588/README.md create mode 100644 mnt/reform/rk3588/default.nix create mode 100644 mnt/reform/rk3588/firmware.nix create mode 100644 mnt/reform/rk3588/initial-asound.state create mode 100644 mnt/reform/rk3588/installer.nix create mode 100644 mnt/reform/rk3588/uboot.nix diff --git a/README.md b/README.md index c9b80cb9..133a06e4 100644 --- a/README.md +++ b/README.md @@ -375,6 +375,7 @@ See code for all available configurations. | [Microsoft Surface Pro 9](microsoft/surface-pro/9) | `` | `microsoft-surface-pro-9` | | [Morefine M600](morefine/m600) | `` | `morefine-m600` | | [Minisforum V3](minisforum/v3) | `` | `minisforum-v3` | +| [MNT Reform with RK3588 module](mnt/reform/rk3588) | `` | `mechrevo-gm5hg0a` | | [NXP iMX8 MPlus Evaluation Kit](nxp/imx8mp-evk) | `` | `nxp-imx8mp-evk` | | [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | `nxp-imx8mq-evk` | diff --git a/flake.nix b/flake.nix index 7cfe53df..cc71ee36 100644 --- a/flake.nix +++ b/flake.nix @@ -312,6 +312,7 @@ microsoft-surface-pro-9 = import ./microsoft/surface-pro/9; milkv-pioneer = import ./milkv/pioneer; minisforum-v3 = import ./minisforum/v3; + mnt-reform-rk3588 = import ./mnt/reform/rk3588; morefine-m600 = import ./morefine/m600; msi-b350-tomahawk = import ./msi/b350-tomahawk; msi-b550-a-pro = import ./msi/b550-a-pro; diff --git a/mnt/reform/default.nix b/mnt/reform/default.nix new file mode 100644 index 00000000..6681a968 --- /dev/null +++ b/mnt/reform/default.nix @@ -0,0 +1,10 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + boot.kernelPackages = pkgs.callPackage ./kernel.nix { }; + boot.extraModulePackages = [ (config.boot.kernelPackages.callPackage ./lpc.nix { }) ]; +} diff --git a/mnt/reform/dtsPatch.nix b/mnt/reform/dtsPatch.nix new file mode 100644 index 00000000..3cb77cb7 --- /dev/null +++ b/mnt/reform/dtsPatch.nix @@ -0,0 +1,48 @@ +{ + stdenv, + reformDebianPackages, + kernelSource, + quilt, +}: +stdenv.mkDerivation { + name = "mnt-dts-patch"; + nativeBuildInputs = [ quilt ]; + buildCommand = '' + cp -r --reflink=auto ${reformDebianPackages}/linux/* . + mkdir -p linux/debian/patches/reform + cp -r --reflink=auto ${kernelSource}/* linux + chmod +w -R . + env --chdir=linux QUILT_PATCHES=debian/patches quilt new reform/dts.patch + env --chdir=linux QUILT_PATCHES=debian/patches quilt add arch/arm64/boot/dts/freescale/fsl-ls1028a-mnt-reform2.dts + cp fsl-ls1028a-mnt-reform2.dts linux/arch/arm64/boot/dts/freescale/fsl-ls1028a-mnt-reform2.dts + env --chdir=linux QUILT_PATCHES=debian/patches quilt add arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2-hdmi.dts + cp imx8mq-mnt-reform2-hdmi.dts linux/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2-hdmi.dts + env --chdir=linux QUILT_PATCHES=debian/patches quilt add arch/arm64/boot/dts/freescale/Makefile + sed -i '/fsl-ls1028a-rdb.dtb/a dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1028a-mnt-reform2.dtb' linux/arch/arm64/boot/dts/freescale/Makefile + sed -i '/imx8mq-mnt-reform2.dtb/a dtb-$(CONFIG_ARCH_MXC) += imx8mq-mnt-reform2-hdmi.dtb' linux/arch/arm64/boot/dts/freescale/Makefile + env --chdir=linux QUILT_PATCHES=debian/patches quilt add arch/arm64/boot/dts/freescale/imx8mp-mnt-pocket-reform.dts + cp imx8mp-mnt-pocket-reform.dts linux/arch/arm64/boot/dts/freescale/imx8mp-mnt-pocket-reform.dts + env --chdir=linux QUILT_PATCHES=debian/patches quilt add arch/arm64/boot/dts/freescale/imx8mp-mnt-reform2.dts + cp imx8mp-mnt-reform2.dts linux/arch/arm64/boot/dts/freescale/imx8mp-mnt-reform2.dts + sed -i '/imx8mq-mnt-reform2.dtb/a dtb-$(CONFIG_ARCH_MXC) += imx8mp-mnt-pocket-reform.dtb' linux/arch/arm64/boot/dts/freescale/Makefile + sed -i '/imx8mq-mnt-reform2.dtb/a dtb-$(CONFIG_ARCH_MXC) += imx8mp-mnt-reform2.dtb' linux/arch/arm64/boot/dts/freescale/Makefile + env --chdir=linux QUILT_PATCHES=debian/patches quilt add arch/arm64/boot/dts/amlogic/meson-g12b-bananapi-cm4-mnt-pocket-reform.dts + cp meson-g12b-bananapi-cm4-mnt-pocket-reform.dts linux/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi-cm4-mnt-pocket-reform.dts + env --chdir=linux QUILT_PATCHES=debian/patches quilt add arch/arm64/boot/dts/amlogic/Makefile + sed -i '/meson-g12b-bananapi-cm4-mnt-reform2.dtb/a dtb-$(CONFIG_ARCH_MESON) += meson-g12b-bananapi-cm4-mnt-pocket-reform.dtb' linux/arch/arm64/boot/dts/amlogic/Makefile + env --chdir=linux QUILT_PATCHES=debian/patches quilt add arch/arm64/boot/dts/rockchip/rk3588-mnt-reform2.dts + cp rk3588-mnt-reform2.dts linux/arch/arm64/boot/dts/rockchip/rk3588-mnt-reform2.dts + env --chdir=linux QUILT_PATCHES=debian/patches quilt add arch/arm64/boot/dts/rockchip/rk3588-mnt-reform2-dsi.dts + cp rk3588-mnt-reform2-dsi.dts linux/arch/arm64/boot/dts/rockchip/rk3588-mnt-reform2-dsi.dts + env --chdir=linux QUILT_PATCHES=debian/patches quilt add arch/arm64/boot/dts/rockchip/rk3588-mnt-pocket-reform.dts + cp rk3588-mnt-pocket-reform.dts linux/arch/arm64/boot/dts/rockchip/rk3588-mnt-pocket-reform.dts + env --chdir=linux QUILT_PATCHES=debian/patches quilt add arch/arm64/boot/dts/rockchip/rk3588-mnt-reform-next.dts + cp rk3588-mnt-reform-next.dts linux/arch/arm64/boot/dts/rockchip/rk3588-mnt-reform-next.dts + env --chdir=linux QUILT_PATCHES=debian/patches quilt add arch/arm64/boot/dts/rockchip/Makefile + sed -i '/rk3588-mnt-reform2.dtb/a dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-mnt-reform2-dsi.dtb' linux/arch/arm64/boot/dts/rockchip/Makefile + sed -i '/rk3588-mnt-reform2-dsi.dtb/a dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-mnt-reform-next.dtb' linux/arch/arm64/boot/dts/rockchip/Makefile + sed -i '/rk3588-mnt-reform-next.dtb/a dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-mnt-pocket-reform.dtb' linux/arch/arm64/boot/dts/rockchip/Makefile + env --chdir=linux QUILT_PATCHES=debian/patches quilt refresh + cp linux/debian/patches/reform/dts.patch $out + ''; +} diff --git a/mnt/reform/kernel.nix b/mnt/reform/kernel.nix new file mode 100644 index 00000000..7b742b23 --- /dev/null +++ b/mnt/reform/kernel.nix @@ -0,0 +1,148 @@ +{ + lib, + callPackage, + linuxPackagesFor, + kernelPatches, + fetchFromGitLab, + ... +}: +let + modDirVersion = "6.16.5"; + reformDebianPackages = fetchFromGitLab { + domain = "source.mnt.re"; + owner = "reform"; + repo = "reform-debian-packages"; + rev = "830c94db42beef876dc58ea56711659ae7bd415d"; + hash = "sha256-mdORgTOM7RJnEjY5G/iWMHf69wQkql11yRpQ/DrQKb4="; + }; + linuxPkg = + { + lib, + fetchzip, + buildLinux, + callPackage, + ... + }@args: + buildLinux ( + args + // rec { + version = "${modDirVersion}-mnt-reform"; + inherit modDirVersion; + + src = fetchzip { + url = "mirror://kernel/linux/kernel/v${lib.versions.major modDirVersion}.x/linux-${modDirVersion}.tar.xz"; + hash = "sha256-XiTuH40b3VJqzwygZzU0FcvMDj41Rq6IsMbm+3+QxDY="; + }; + + kernelPatches = + (map (patch: { inherit patch; }) ( + lib.filesystem.listFilesRecursive "${reformDebianPackages}/linux/patches${lib.versions.majorMinor modDirVersion}" + )) + ++ [ + { + patch = callPackage ./dtsPatch.nix { + inherit reformDebianPackages; + kernelSource = src; + }; + } + ]; + + structuredExtraConfig = with lib.kernel; { + # configuration options from https://source.mnt.re/reform/reform-debian-packages/-/blob/7f31ba3a6742d60d8d502c1d86e63ef5df3916bf/linux/config + DRM_LVDS_CODEC = module; + DRM_CDNS_MHDP8546 = module; + DRM_CDNS_HDMI_CEC = module; + DRM_IMX_CDNS_MHDP = module; + DRM_IMX_DCSS = module; + # PHY_FSL_IMX8MQ_HDPTX = module; # configuration option does not exist + DRM_PANEL_LVDS = module; + I2C_IMX_LPI2C = module; + I2C_MUX_REG = module; + INTERCONNECT_IMX = yes; + INTERCONNECT_IMX8MQ = yes; + MFD_WM8994 = module; + MUX_GPIO = module; + MUX_MMIO = module; + RTC_DRV_PCF8523 = module; + USB_EHCI_FSL = module; + # NO_HZ_IDLE = yes; # conflicts with NO_HZ_FULL + SND_SOC_FSL_MICFIL = module; + SND_IMX_SOC = module; + SND_SOC_FSL_ASOC_CARD = module; + SND_SOC_IMX_AUDMIX = module; + SND_SOC_IMX_HDMI = module; + INPUT_JOYSTICK = yes; + JOYSTICK_XPAD = module; + JOYSTICK_XPAD_FF = yes; + JOYSTICK_XPAD_LEDS = yes; + + INTERCONNECT_IMX8MP = yes; + SND_SOC_FSL_ASRC = yes; + DRM_IMX_LCDIF = yes; + DRM_IMX8MP_DW_HDMI_BRIDGE = yes; + DRM_IMX8MP_HDMI_PVI = yes; + IMX8MM_THERMAL = yes; + IMX2_WDT = yes; + DRM_SAMSUNG_DSIM = yes; + PHY_FSL_SAMSUNG_HDMI_PHY = yes; + DRM = yes; + DRM_PANEL_MNT_POCKET_REFORM = module; + IMX8M_BLK_CTRL = yes; + IMX_GPCV2_PM_DOMAINS = yes; + DRM_DISPLAY_CONNECTOR = yes; + DRM_FSL_LDB = yes; + BACKLIGHT_CLASS_DEVICE = yes; + BACKLIGHT_PWM = yes; + BACKLIGHT_GPIO = yes; + BACKLIGHT_LED = yes; + CPU_FREQ_GOV_PERFORMANCE = yes; + CPU_FREQ_GOV_POWERSAVE = yes; + CPU_FREQ_GOV_USERSPACE = yes; + CPU_FREQ_GOV_ONDEMAND = yes; + CPU_FREQ_GOV_CONSERVATIVE = yes; + CPU_FREQ_GOV_SCHEDUTIL = yes; + ARM_IMX_CPUFREQ_DT = yes; + ARM_IMX_BUS_DEVFREQ = yes; + IMX_IRQSTEER = yes; + + PCI_MESON = yes; + DWMAC_MESON = module; + MDIO_BUS_MUX_MESON_G12A = yes; + I2C_MESON = yes; + PWM_MESON = yes; + USB_DWC3_MESON_G12A = yes; + MMC_MESON_GX = yes; + MMC_MESON_MX_SDIO = yes; + MESON_DDR_PMU = yes; + RTW88_8822CS = module; + + PWM_FSL_FTM = yes; + FSL_RCPM = yes; + + ARCH_ROCKCHIP = yes; + # ARM_ROCKCHIP_CPUFREQ = module; # configuration option does not exist + DRM_PANTHOR = module; + NVMEM_ROCKCHIP_OTP = yes; + PHY_ROCKCHIP_SAMSUNG_HDPTX = module; + PHY_ROCKCHIP_USBDP = module; + REGULATOR = yes; + # ROCKCHIP_REGULATOR_COUPLER = yes; # configuration option does not exist + SPI_ROCKCHIP = yes; + SPI_ROCKCHIP_SFC = module; + ARM_SCMI_CPUFREQ = module; + VIDEO_ROCKCHIP_VDEC2 = module; + ROCKCHIP_DW_HDMI_QP = yes; + ROCKCHIP_DW_MIPI_DSI2 = yes; + PHY_ROCKCHIP_SAMSUNG_DCPHY = yes; + REGULATOR_FIXED_VOLTAGE = yes; + GPIO_ROCKCHIP = yes; + PL330_DMA = yes; + + DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW = no; # patches for 6.16 break this driver + }; + } + // (args.argsOverride or { }) + ); + +in +lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg { })) diff --git a/mnt/reform/lpc.nix b/mnt/reform/lpc.nix new file mode 100644 index 00000000..ad1ef3d8 --- /dev/null +++ b/mnt/reform/lpc.nix @@ -0,0 +1,36 @@ +{ + stdenv, + lib, + fetchFromGitLab, + kernel, + kernelModuleMakeFlags, + kmod, +}: + +stdenv.mkDerivation rec { + name = "lpc"; + + src = fetchFromGitLab { + domain = "source.mnt.re"; + owner = "reform"; + repo = "reform-tools"; + rev = "45f930403492aa2156522bfe30edb02e33494b69"; + hash = "sha256-no33CsV69nu1TR0cqxQDd1bFXqhjqOW9IUDxds0fyxE="; + }; + + sourceRoot = "source/lpc"; + hardeningDisable = [ + "pic" + "format" + ]; + nativeBuildInputs = kernel.moduleBuildDependencies; + + installPhase = '' + make -C "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" M="$(pwd)" INSTALL_MOD_PATH=$out modules_install $makeFlags + ''; + + makeFlags = kernelModuleMakeFlags ++ [ + "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "INSTALL_MOD_PATH=${placeholder "out"}" + ]; +} diff --git a/mnt/reform/rk3588/README.md b/mnt/reform/rk3588/README.md new file mode 100644 index 00000000..ec6da6b6 --- /dev/null +++ b/mnt/reform/rk3588/README.md @@ -0,0 +1,48 @@ +# MNT Reform Laptop with RK3588 CPU module + +## Creating an installer SD-Image + +Create and configure the `flake.nix` file: +``` nix +{ + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + inputs.nixos-hardware.url = "github:nixos/nixos-hardware"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, nixos-hardware, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem (system: + rec { + packages.default = packages.installer; + packages.installer = (import "${nixpkgs}/nixos" { + configuration = + { config, ... }: { + imports = [ + "${nixos-hardware}/mnt/reform/rk3588/installer.nix" + ]; + + # If you want to use ssh set a password + # users.users.nixos.password = "super secure password"; + # OR add your public ssh key + # users.users.nixos.openssh.authorizedKeys.keys = [ "ssh-rsa ..." ]; + + # Additional configuration goes here + + # Only used when cross compiling + nixpkgs.crossSystem = { + config = "aarch64-unknown-linux-gnu"; + system = "aarch64-linux"; + }; + + system.stateVersion = "23.05"; + }; + inherit system; + }).config.system.build.image;; + }); +} +``` + +Build the installer image. + +``` sh +nix build .# +``` diff --git a/mnt/reform/rk3588/default.nix b/mnt/reform/rk3588/default.nix new file mode 100644 index 00000000..f0bea6d4 --- /dev/null +++ b/mnt/reform/rk3588/default.nix @@ -0,0 +1,35 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + imports = [ ../. ]; + boot = { + # kernelParams = [ "console=ttyS2,1500000n8" ]; + kernelParams = [ + "no_console_suspend" + "console=tty1" + ]; + # kernel modules needed for the virtual console + initrd.availableKernelModules = [ + "panel-edp" + "phy-rockchip-samsung-hdptx" + "rockchipdrm" + "ti-sn65dsi86" + ]; + + }; + boot.loader = { + grub.enable = false; + generic-extlinux-compatible.enable = true; + }; + hardware.alsa.enablePersistence = true; + system.activationScripts.asound = '' + if [ ! -e "/var/lib/alsa/asound.state" ]; then + mkdir -p /var/lib/alsa + cp ${./initial-asound.state} /var/lib/alsa/asound.state + fi + ''; +} diff --git a/mnt/reform/rk3588/firmware.nix b/mnt/reform/rk3588/firmware.nix new file mode 100644 index 00000000..6d97991f --- /dev/null +++ b/mnt/reform/rk3588/firmware.nix @@ -0,0 +1,25 @@ +{ + runCommand, + uboot, + fetchFromGitHub, +}: +# script from https://source.mnt.re/reform/reform-rk3588-uboot/-/blob/b530d65f4a878c0329a594fa248ba8da59d2e05f/build.sh +runCommand "mnt-reform-firmware-rk3855${uboot.variant}" { } '' + mkdir $out + cp -r ${uboot} u-boot + cp -r ${uboot.rkbin} rkbin + chmod -R +rw u-boot + chmod -R +rw rkbin + cd u-boot + mkdir spl + mv u-boot-spl.bin spl + ../rkbin/tools/boot_merger rock5b-rk3588.ini + cd .. + # rkbin stuff + cd rkbin + ./tools/boot_merger RKBOOT/RK3588MINIALL.ini + # concatenate + cd .. + cp u-boot/idbloader.img $out/mnt-reform2-rk3588${uboot.variant}-flash.bin + dd if=u-boot/u-boot.itb of=$out/mnt-reform2-rk3588${uboot.variant}-flash.bin seek=16320 +'' diff --git a/mnt/reform/rk3588/initial-asound.state b/mnt/reform/rk3588/initial-asound.state new file mode 100644 index 00000000..2f595a82 --- /dev/null +++ b/mnt/reform/rk3588/initial-asound.state @@ -0,0 +1,702 @@ +state.rk3588wm8960 { + control.1 { + iface MIXER + name 'Capture Volume' + value.0 39 + value.1 39 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 63' + dbmin -1725 + dbmax 3000 + dbvalue.0 1200 + dbvalue.1 1200 + } + } + control.2 { + iface MIXER + name 'Capture Volume ZC Switch' + value.0 false + value.1 false + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.3 { + iface MIXER + name 'Capture Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.4 { + iface MIXER + name 'Left Input Boost Mixer LINPUT3 Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -9999999 + dbmax 600 + dbvalue.0 -9999999 + } + } + control.5 { + iface MIXER + name 'Left Input Boost Mixer LINPUT2 Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -9999999 + dbmax 600 + dbvalue.0 -9999999 + } + } + control.6 { + iface MIXER + name 'Right Input Boost Mixer RINPUT3 Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -9999999 + dbmax 600 + dbvalue.0 -9999999 + } + } + control.7 { + iface MIXER + name 'Right Input Boost Mixer RINPUT2 Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -9999999 + dbmax 600 + dbvalue.0 -9999999 + } + } + control.8 { + iface MIXER + name 'Right Input Boost Mixer RINPUT1 Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 3' + dbmin 0 + dbmax 2900 + dbvalue.0 0 + } + } + control.9 { + iface MIXER + name 'Left Input Boost Mixer LINPUT1 Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 3' + dbmin 0 + dbmax 2900 + dbvalue.0 0 + } + } + control.10 { + iface MIXER + name 'Playback Volume' + value.0 215 + value.1 215 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 255' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2000 + dbvalue.1 -2000 + } + } + control.11 { + iface MIXER + name 'Headphone Playback Volume' + value.0 0 + value.1 0 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 127' + dbmin -9999999 + dbmax 600 + dbvalue.0 -9999999 + dbvalue.1 -9999999 + } + } + control.12 { + iface MIXER + name 'Headphone Playback ZC Switch' + value.0 false + value.1 false + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.13 { + iface MIXER + name 'Speaker Playback Volume' + value.0 109 + value.1 109 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 127' + dbmin -9999999 + dbmax 600 + dbvalue.0 -1200 + dbvalue.1 -1200 + } + } + control.14 { + iface MIXER + name 'Speaker Playback ZC Switch' + value.0 false + value.1 false + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.15 { + iface MIXER + name 'Speaker DC Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 5' + } + } + control.16 { + iface MIXER + name 'Speaker AC Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 5' + } + } + control.17 { + iface MIXER + name 'PCM Playback -6dB Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.18 { + iface MIXER + name 'ADC Polarity' + value 'No Inversion' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 'No Inversion' + item.1 'Left Inverted' + item.2 'Right Inverted' + item.3 'Stereo Inversion' + } + } + control.19 { + iface MIXER + name 'ADC High Pass Filter Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.20 { + iface MIXER + name 'DAC Polarity' + value 'No Inversion' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 'No Inversion' + item.1 'Left Inverted' + item.2 'Right Inverted' + item.3 'Stereo Inversion' + } + } + control.21 { + iface MIXER + name 'DAC Deemphasis Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.22 { + iface MIXER + name '3D Filter Upper Cut-Off' + value High + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 High + item.1 Low + } + } + control.23 { + iface MIXER + name '3D Filter Lower Cut-Off' + value Low + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Low + item.1 High + } + } + control.24 { + iface MIXER + name '3D Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 15' + } + } + control.25 { + iface MIXER + name '3D Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.26 { + iface MIXER + name 'ALC Function' + value Off + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Off + item.1 Right + item.2 Left + item.3 Stereo + } + } + control.27 { + iface MIXER + name 'ALC Max Gain' + value 7 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + } + } + control.28 { + iface MIXER + name 'ALC Target' + value 4 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 15' + } + } + control.29 { + iface MIXER + name 'ALC Min Gain' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + } + } + control.30 { + iface MIXER + name 'ALC Hold Time' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 15' + } + } + control.31 { + iface MIXER + name 'ALC Mode' + value ALC + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 ALC + item.1 Limiter + } + } + control.32 { + iface MIXER + name 'ALC Decay' + value 3 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 15' + } + } + control.33 { + iface MIXER + name 'ALC Attack' + value 2 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 15' + } + } + control.34 { + iface MIXER + name 'Noise Gate Threshold' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + } + } + control.35 { + iface MIXER + name 'Noise Gate Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.36 { + iface MIXER + name 'ADC PCM Capture Volume' + value.0 195 + value.1 195 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 255' + dbmin -9999999 + dbmax 3000 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.37 { + iface MIXER + name 'Left Output Mixer Boost Bypass Volume' + value 2 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 -1500 + } + } + control.38 { + iface MIXER + name 'Left Output Mixer LINPUT3 Volume' + value 2 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 -1500 + } + } + control.39 { + iface MIXER + name 'Right Output Mixer Boost Bypass Volume' + value 2 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 -1500 + } + } + control.40 { + iface MIXER + name 'Right Output Mixer RINPUT3 Volume' + value 2 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -2100 + dbmax 0 + dbvalue.0 -1500 + } + } + control.41 { + iface MIXER + name 'ADC Data Output Select' + value 'Left Data = Left ADC; Right Data = Right ADC' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 'Left Data = Left ADC; Right Data = Right ADC' + item.1 'Left Data = Left ADC; Right Data = Left ADC' + item.2 'Left Data = Right ADC; Right Data = Right ADC' + item.3 'Left Data = Right ADC; Right Data = Left ADC' + } + } + control.42 { + iface MIXER + name 'DAC Mono Mix' + value Stereo + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Stereo + item.1 Mono + } + } + control.43 { + iface MIXER + name 'DAC Filter Characteristics' + value Normal + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Normal + item.1 Sloping + } + } + control.44 { + iface MIXER + name 'Left Boost Mixer LINPUT2 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.45 { + iface MIXER + name 'Left Boost Mixer LINPUT3 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.46 { + iface MIXER + name 'Left Boost Mixer LINPUT1 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.47 { + iface MIXER + name 'Right Boost Mixer RINPUT2 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.48 { + iface MIXER + name 'Right Boost Mixer RINPUT3 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.49 { + iface MIXER + name 'Right Boost Mixer RINPUT1 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.50 { + iface MIXER + name 'Left Input Mixer Boost Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.51 { + iface MIXER + name 'Right Input Mixer Boost Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.52 { + iface MIXER + name 'Left Output Mixer PCM Playback Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.53 { + iface MIXER + name 'Left Output Mixer LINPUT3 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.54 { + iface MIXER + name 'Left Output Mixer Boost Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.55 { + iface MIXER + name 'Right Output Mixer PCM Playback Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.56 { + iface MIXER + name 'Right Output Mixer RINPUT3 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.57 { + iface MIXER + name 'Right Output Mixer Boost Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.58 { + iface MIXER + name 'Mono Output Mixer Left Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.59 { + iface MIXER + name 'Mono Output Mixer Right Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } +} diff --git a/mnt/reform/rk3588/installer.nix b/mnt/reform/rk3588/installer.nix new file mode 100644 index 00000000..af7c5580 --- /dev/null +++ b/mnt/reform/rk3588/installer.nix @@ -0,0 +1,238 @@ +{ + config, + lib, + pkgs, + modulesPath, + ... +}: +{ + imports = [ + "${modulesPath}/image/file-options.nix" + "${modulesPath}/profiles/installation-device.nix" + ./. + ]; + + options.installerImage = { + compressImage = lib.mkOption { + default = false; + type = lib.types.bool; + description = '' + Whether the installer image should be compressed using + {command}`zstd`. + ''; + }; + squashfsCompression = lib.mkOption { + default = "zstd -Xcompression-level 19"; + type = lib.types.nullOr lib.types.str; + description = '' + Compression settings to use for the squashfs nix store. + `null` disables compression. + ''; + example = "zstd -Xcompression-level 6"; + }; + storeContents = lib.mkOption { + example = lib.literalExpression "[ pkgs.stdenv ]"; + description = '' + This option lists additional derivations to be included in the + Nix store in the generated installer image. + ''; + }; + }; + config = + let + squashfs = pkgs.callPackage "${modulesPath}/../lib/make-squashfs.nix" { + storeContents = config.installerImage.storeContents; + comp = config.installerImage.squashfsCompression; + }; + uboot = pkgs.callPackage ./uboot.nix { }; + firmware = pkgs.callPackage ./firmware.nix { inherit uboot; }; + content = pkgs.callPackage ( + { + stdenv, + e2fsprogs, + libfaketime, + fakeroot, + }: + stdenv.mkDerivation { + name = "ext4-fs.img"; + nativeBuildInputs = [ + e2fsprogs.bin + libfaketime + fakeroot + ]; + buildCommand = '' + img=$out + mkdir -p ./files + ${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d ./rootImage/boot + ( + GLOBIGNORE=".:.." + shopt -u dotglob + + for f in ./files/*; do + cp -a --reflink=auto -t ./rootImage/ "$f" + done + ) + cp -a --reflink=auto ${squashfs} ./rootImage/nix-store.squashfs + + + # Make a crude approximation of the size of the target image. + # If the script starts failing, increase the fudge factors here. + numInodes=$(find ./rootImage | wc -l) + numDataBlocks=$(du -s -c -B 4096 --apparent-size ./rootImage | tail -1 | awk '{ print int($1 * 1.20) }') + bytes=$((2 * 4096 * $numInodes + 4096 * $numDataBlocks)) + echo "Creating an EXT4 image of $bytes bytes (numInodes=$numInodes, numDataBlocks=$numDataBlocks)" + + mebibyte=$(( 1024 * 1024 )) + # Round up to the nearest mebibyte. + # This ensures whole 512 bytes sector sizes in the disk image + # and helps towards aligning partitions optimally. + if (( bytes % mebibyte )); then + bytes=$(( ( bytes / mebibyte + 1) * mebibyte )) + fi + + truncate -s $bytes $img + + faketime -f "1970-01-01 00:00:01" fakeroot mkfs.ext4 -L NIXOS_ROOT -U 44444444-4444-4444-8888-888888888888 -d ./rootImage $img + + export EXT2FS_NO_MTAB_OK=yes + # I have ended up with corrupted images sometimes, I suspect that happens when the build machine's disk gets full during the build. + if ! fsck.ext4 -n -f $img; then + echo "--- Fsck failed for EXT4 image of $bytes bytes (numInodes=$numInodes, numDataBlocks=$numDataBlocks) ---" + cat errorlog + return 1 + fi + + # We may want to shrink the file system and resize the image to + # get rid of the unnecessary slack here--but see + # https://github.com/NixOS/nixpkgs/issues/125121 for caveats. + + # shrink to fit + resize2fs -M $img + + # Add 16 MebiByte to the current_size + new_size=$(dumpe2fs -h $img | awk -F: \ + '/Block count/{count=$2} /Block size/{size=$2} END{print (count*size+16*2**20)/size}') + + resize2fs $img $new_size + ''; + } + ) { }; + in + { + fileSystems = { + "/" = lib.mkImageMediaOverride { + fsType = "tmpfs"; + options = [ "mode=0755" ]; + }; + + "/iso" = lib.mkImageMediaOverride { + device = "/dev/disk/by-label/NIXOS_ROOT"; + neededForBoot = true; + noCheck = true; + options = [ "ro" ]; + }; + + # In stage 1, mount a tmpfs on top of /nix/store (the squashfs + # image) to make this a live CD. + "/nix/.ro-store" = lib.mkImageMediaOverride { + fsType = "squashfs"; + device = "/iso/nix-store.squashfs"; + options = [ + "loop" + ] ++ lib.optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2") "threads=multi"; + neededForBoot = true; + }; + + "/nix/.rw-store" = lib.mkImageMediaOverride { + fsType = "tmpfs"; + options = [ "mode=0755" ]; + neededForBoot = true; + }; + + "/nix/store" = lib.mkImageMediaOverride { + fsType = "overlay"; + device = "overlay"; + options = [ + "lowerdir=/nix/.ro-store" + "upperdir=/nix/.rw-store/store" + "workdir=/nix/.rw-store/work" + ]; + depends = [ + "/nix/.ro-store" + "/nix/.rw-store/store" + "/nix/.rw-store/work" + ]; + }; + }; + + boot = { + initrd.availableKernelModules = [ + "squashfs" + "uas" + "overlay" + ]; + initrd.kernelModules = [ + "loop" + "overlay" + ]; + loader.timeout = 0; + }; + + image.extension = if config.installerImage.compressImage then "img.zst" else "img"; + image.filePath = "installer-image/${config.image.fileName}"; + + installerImage.storeContents = [ config.system.build.toplevel ]; + + system.build.image = pkgs.callPackage ( + { stdenv, util-linux }: + stdenv.mkDerivation { + name = config.image.fileName; + nativeBuildInputs = [ util-linux ]; + inherit (config.installerImage) compressImage; + buildCommand = '' + mkdir -p $out/nix-support $out/installer-image + img=$out/installer-image/${config.image.baseName}.img + + echo "${stdenv.buildPlatform.system}" > $out/nix-support/system + if test -n "$compressImage"; then + echo "file installer-image $img.zst" >> $out/nix-support/hydra-build-products + else + echo "file installer-image $img" >> $out/nix-support/hydra-build-products + fi + + sectors=$((($(stat -c '%s' ${content})+511)/512)) + # create disk image + truncate -s $((($sectors + 32768 + 2048)*512)) $img + sfdisk $img < Date: Tue, 23 Sep 2025 22:17:26 +0500 Subject: [PATCH 1429/1476] msi/b550-tomahawk: init --- README.md | 1 + flake.nix | 1 + msi/b550-tomahawk/default.nix | 14 ++++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 msi/b550-tomahawk/default.nix diff --git a/README.md b/README.md index c9b80cb9..7872295e 100644 --- a/README.md +++ b/README.md @@ -363,6 +363,7 @@ See code for all available configurations. | [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `` | `lenovo-yoga-7-slim-gen8` | | [MSI B550-A PRO](msi/b550-a-pro) | `` | `msi-b550-a-pro` | | [MSI B350 TOMAHAWK](msi/b350-tomahawk) | `` | `msi-b350-tomahawk` | +| [MSI B550 TOMAHAWK](msi/b550-tomahawk) | `` | `msi-b550-tomahawk` | | [MSI GS60 2QE](msi/gs60) | `` | `msi-gs60` | | [MSI GL62/CX62](msi/gl62) | `` | `msi-gl62` | | [MSI GL65 10SDR-492](msi/gl65/10SDR-492) | `` | `msi-gl65-10SDR-492` | diff --git a/flake.nix b/flake.nix index 7cfe53df..a8d00f57 100644 --- a/flake.nix +++ b/flake.nix @@ -315,6 +315,7 @@ morefine-m600 = import ./morefine/m600; msi-b350-tomahawk = import ./msi/b350-tomahawk; msi-b550-a-pro = import ./msi/b550-a-pro; + msi-b550-tomahawk = import ./msi/b550-tomahawk; msi-gs60 = import ./msi/gs60; msi-gl62 = import ./msi/gl62; msi-gl65-10SDR-492 = import ./msi/gl65/10SDR-492; diff --git a/msi/b550-tomahawk/default.nix b/msi/b550-tomahawk/default.nix new file mode 100644 index 00000000..e2925b90 --- /dev/null +++ b/msi/b550-tomahawk/default.nix @@ -0,0 +1,14 @@ +{ config, ... }: +{ + imports = [ + ../../common/cpu/amd + ../../common/pc/ssd + ../../common/pc + ]; + + boot.extraModulePackages = with config.boot.kernelPackages; [ + nct6687d + ]; + + boot.kernelModules = [ "nct6687d" ]; +} From ba70d20716fa5a658840074cc5285c85c337127b Mon Sep 17 00:00:00 2001 From: Borja Rojo Ilvento Date: Tue, 30 Sep 2025 21:28:37 +0200 Subject: [PATCH 1430/1476] Add Lenovo ThinkPad P14s Intel Gen 2 profile Adds hardware profile for Lenovo ThinkPad P14s Intel Gen 2 with: - Intel Tiger Lake CPU support - NVIDIA Turing GPU with PRIME configuration - Suspend-to-RAM S3 sleep state configuration --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/p14s/intel/gen2/README | 7 +++++++ lenovo/thinkpad/p14s/intel/gen2/default.nix | 18 ++++++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 lenovo/thinkpad/p14s/intel/gen2/README create mode 100644 lenovo/thinkpad/p14s/intel/gen2/default.nix diff --git a/README.md b/README.md index c9b80cb9..d8604029 100644 --- a/README.md +++ b/README.md @@ -280,6 +280,7 @@ See code for all available configurations. | [Lenovo ThinkPad P14s AMD Gen 3](lenovo/thinkpad/p14s/amd/gen3) | `` | `lenovo-thinkpad-p14s-amd-gen3` | | [Lenovo ThinkPad P14s AMD Gen 4](lenovo/thinkpad/p14s/amd/gen4) | `` | `lenovo-thinkpad-p14s-amd-gen4` | | [Lenovo ThinkPad P14s AMD Gen 5](lenovo/thinkpad/p14s/amd/gen5) | `` | `lenovo-thinkpad-p14s-amd-gen5` | +| [Lenovo ThinkPad P14s Intel Gen 2](lenovo/thinkpad/p14s/intel/gen2) | `` | `lenovo-thinkpad-p14s-intel-gen2`| | [Lenovo ThinkPad P14s Intel Gen 3](lenovo/thinkpad/p14s/intel/gen3) | `` | `lenovo-thinkpad-p14s-intel-gen3`| | [Lenovo ThinkPad P14s Intel Gen 5](lenovo/thinkpad/p14s/intel/gen5) | `` | `lenovo-thinkpad-p14s-intel-gen5`| | [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | `lenovo-thinkpad-p16s-amd-gen1` | diff --git a/flake.nix b/flake.nix index 7cfe53df..e4373ca4 100644 --- a/flake.nix +++ b/flake.nix @@ -217,6 +217,7 @@ lenovo-thinkpad-p14s-amd-gen3 = import ./lenovo/thinkpad/p14s/amd/gen3; lenovo-thinkpad-p14s-amd-gen4 = import ./lenovo/thinkpad/p14s/amd/gen4; lenovo-thinkpad-p14s-amd-gen5 = import ./lenovo/thinkpad/p14s/amd/gen5; + lenovo-thinkpad-p14s-intel-gen2 = import ./lenovo/thinkpad/p14s/intel/gen2; lenovo-thinkpad-p14s-intel-gen3 = import ./lenovo/thinkpad/p14s/intel/gen3; lenovo-thinkpad-p14s-intel-gen5 = import ./lenovo/thinkpad/p14s/intel/gen5; lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1; diff --git a/lenovo/thinkpad/p14s/intel/gen2/README b/lenovo/thinkpad/p14s/intel/gen2/README new file mode 100644 index 00000000..5de0e5da --- /dev/null +++ b/lenovo/thinkpad/p14s/intel/gen2/README @@ -0,0 +1,7 @@ +# Lenovo ThinkPad P14s Intel Gen 2 + +Much of the extraneous settings are filled out using the [wiki](https://wiki.nixos.org/wiki/NVIDIA#Hybrid_graphics_with_PRIME), which gives guidance on how to determine the correct PCI bus IDs to assign, aswell as the note to include the `modesetting` driver in `services.xserver.videoDrivers`. + +## BIOS Settings to adjust + +For suspending to RAM to work, set Config -> Power -> Sleep State to "Linux S3" in EFI. diff --git a/lenovo/thinkpad/p14s/intel/gen2/default.nix b/lenovo/thinkpad/p14s/intel/gen2/default.nix new file mode 100644 index 00000000..c1037c27 --- /dev/null +++ b/lenovo/thinkpad/p14s/intel/gen2/default.nix @@ -0,0 +1,18 @@ +{ + imports = [ + ../../../../../common/gpu/nvidia/prime.nix + ../../../../../common/gpu/nvidia/turing + ../../../../../common/cpu/intel/tiger-lake + ../../../../../common/pc/laptop + ../../../../../common/pc/ssd + ../../../../../common/pc + ../. + ]; + + hardware.nvidia.prime = { + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + + services.xserver.videoDrivers = [ "modesetting" ]; +} From 0257a0aa583f73e3d3abff60789a598b31ce9276 Mon Sep 17 00:00:00 2001 From: fidgetingbits Date: Wed, 1 Oct 2025 17:10:20 +0800 Subject: [PATCH 1431/1476] Add missing README entries and re-align columns --- README.md | 713 +++++++++++++++++++++++++++--------------------------- 1 file changed, 360 insertions(+), 353 deletions(-) diff --git a/README.md b/README.md index 2945de17..b1aa4fa7 100644 --- a/README.md +++ b/README.md @@ -84,358 +84,365 @@ All contributors and users are welcome to join! See code for all available configurations. -| Model | Path | Flake Module | -| --------------------------------------------------------------------------------- | ------------------------------------------------------- | ---------------------------------- | -| [Acer Aspire 4810T](acer/aspire/4810t) | `` | `acer-aspire-4810t` | -| [Airis N990](airis/n990) | `` | `airis-n990` | -| [Apple iMac 14.2](apple/imac/14-2) | `` | `apple-imac-14-2` | -| [Apple iMac 18.2](apple/imac/18-2) | `` | `apple-imac-18-2` | -| [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | `apple-macbook-air-3` | -| [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | `apple-macbook-air-4` | -| [Apple MacBook Air 5,X](apple/macbook-air/5) | `` | `apple-macbook-air-5` | -| [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | `apple-macbook-air-6` | -| [Apple MacBook Air 7,X](apple/macbook-air/7) | `` | `apple-macbook-air-7` | -| [Apple MacBook Pro 8,1](apple/macbook-pro/8-1) | `` | `apple-macbook-pro-8-1` | -| [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | `apple-macbook-pro-10-1` | -| [Apple MacBook Pro 11,1](apple/macbook-pro/11-1) | `` | `apple-macbook-pro-11-1` | -| [Apple MacBook Pro 11,4](apple/macbook-pro/11-4) | `` | `apple-macbook-pro-11-4` | -| [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | `apple-macbook-pro-11-5` | -| [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | `apple-macbook-pro-12-1` | -| [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | `apple-macbook-pro-14-1` | -| [Apple MacMini (2010, Intel, Nvidia)](apple/macmini/4) | `` | `apple-macmini-4-1` | -| [Apple Macs with a T2 Chip](apple/t2) | `` | `apple-t2` | -| [Aoostar R1 N100](aoostar/r1/n100) | `` | `aoostar-r1-n100` | -| [Asus Pro WS X570-ACE](asus/pro-ws-x570-ace) | `` | `asus-pro-ws-x570-ace` | -| [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | `asus-ally-rc71l` | -| [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/amdgpu) | `` | `asus-flow-gv302x-amdgpu` | -| [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/nvidia) | `` | `asus-flow-gv302x-nvidia` | -| [Asus ROG GL552VW](asus/rog-gl552vw) | `` | `asus-rog-gl552vw` | -| [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | `asus-rog-strix-g513im` | -| [Asus ROG Strix G533ZW](asus/rog-strix/g533zw) | `` | `asus-rog-strix-g533zw` | -| [Asus ROG Strix G533Q](asus/rog-strix/g533q) | `` | `asus-rog-strix-g533zw` | -| [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `` | `asus-rog-strix-g713ie` | -| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | `asus-rog-strix-g733qs` | -| [Asus ROG Strix X570-E GAMING](asus/rog-strix/x570e) | `` | `asus-rog-strix-x570e` | -| [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | `asus-zephyrus-ga401` | -| [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | `asus-zephyrus-ga402` | -| [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/amdgpu) | `` | `asus-zephyrus-ga402x-amdgpu` | -| [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/nvidia) | `` | `asus-zephyrus-ga402x-nvidia` | -| [Asus ROG Zephyrus G15 GA502](asus/zephyrus/ga502) | `` | `asus-zephyrus-ga502` | -| [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | `asus-zephyrus-ga503` | -| [Asus ROG Zephyrus G16 GU605MY](asus/zephyrus/gu605my) | `` | `asus-zephyrus-gu605my` | -| [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | `asus-zephyrus-gu603h` | -| [Asus TUF FX504GD](asus/fx504gd) | `` | `asus-fx504gd` | -| [Asus TUF FX506HM](asus/fx506hm) | `` | `asus-fx506hm` | -| [Asus TUF FA506IC](asus/fa506ic) | `` | `asus-fa506ic` | -| [Asus TUF FA507RM](asus/fa507rm) | `` | `asus-fa507rm` | -| [Asus TUF FA507NV](asus/fa507nv) | `` | `asus-fa507nv` | -| [Asus Zenbook Duo 14 UX481](asus/zenbook/ux481/intelgpu/) | `` | `asus-zenbook-ux481-intelgpu` | -| [Asus Zenbook Duo 14 UX481](asus/zenbook/ux481/nvidia/) | `` | `asus-zenbook-ux481-nvidia` | -| [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `` | `asus-zenbook-ux371` | -| [Asus Zenbook Pro 15 UX535](asus/zenbook/ux535/) | `` | `asus-zenbook-ux535` | -| [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | `beagleboard-pocketbeagle` | -| [Chuwi MiniBook X](chuwi/minibook-x) | `` | `chuwi-minibook-x` | -| [Deciso DEC series](deciso/dec) | `` | `deciso-dec` | -| [Dell G3 3779](dell/g3/3779) | `` | `dell-g3-3779` | -| [Dell G3 3579](dell/g3/3579) | `` | `dell-g3-3579` | -| [Dell Inspiron 3442](dell/inspiron/3442) | `` | `dell-inspiron-3442` | -| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | `dell-inspiron-14-5420` | -| [Dell Inspiron 5509](dell/inspiron/5509) | `` | `dell-inspiron-5509` | -| [Dell Inspiron 5515](dell/inspiron/5515) | `` | `dell-inspiron-5515` | -| [Dell Inspiron 7405](dell/inspiron/7405) | `` | `dell-inspiron-7405` | -| [Dell Inspiron 7460](dell/inspiron/7460) | `` | `dell-inspiron-7460` | -| [Dell Inspiron 7559](dell/inspiron/7559) | `` | `dell-inspiron-7559` | -| [Dell Latitude 3340](dell/latitude/3340) | `` | `dell-latitude-3340` | -| [Dell Latitude 3480](dell/latitude/3480) | `` | `dell-latitude-3480` | -| [Dell Latitude 5490](dell/latitude/5490) | `` | `dell-latitude-5490` | -| [Dell Latitude 5520](dell/latitude/5520) | `` | `dell-latitude-5520` | -| [Dell Latitude 7280](dell/latitude/7280) | `` | `dell-latitude-7280` | -| [Dell Latitude 7390](dell/latitude/7390) | `` | `dell-latitude-7390` | -| [Dell Latitude 7420](dell/latitude/7420) | `` | `dell-latitude-7420` | -| [Dell Latitude 7430](dell/latitude/7430) | `` | `dell-latitude-7430` | -| [Dell Latitude 7490](dell/latitude/7490) | `` | `dell-latitude-7490` | -| [Dell Latitude 9430](dell/latitude/9430) | `` | `dell-latitude-9430` | -| [Dell Latitude E7240](dell/latitude/e7240) | `` | `dell-latitude-e7240` | -| [Dell Optiplex 3050](dell/optiplex/3050) | `` | `dell-optiplex-3050` | -| [Dell Poweredge R7515](dell/poweredge/r7515) | `` | `dell-poweredge-r7515` | -| [Dell Precision 3490, nvidia](dell/precision/3490/nvidia) | `` | `dell-precision-3490-nvidia` | -| [Dell Precision 3490, intel](dell/precision/3490/intel) | `` | `dell-precision-3490-intel` | -| [Dell Precision 3541](dell/precision/3541) | `` | `dell-precision-3541` | -| [Dell Precision 5490](dell/precision/5490) | `` | `dell-precision-5490` | -| [Dell Precision 5530](dell/precision/5530) | `` | `dell-precision-5530` | -| [Dell Precision 5560](dell/precision/5560) | `` | `dell-precision-5560` | -| [Dell Precision 5570](dell/precision/5570) | `` | `dell-precision-5570` | -| [Dell Precision 7520](dell/precision/7520) | `` | `dell-precision-7520` | -| [Dell XPS 13 7390](dell/xps/13-7390) | `` | `dell-xps-13-7390` | -| [Dell XPS 13 9300](dell/xps/13-9300) | `` | `dell-xps-13-9300` | -| [Dell XPS 13 9310](dell/xps/13-9310) | `` | `dell-xps-13-9310` | -| [Dell XPS 13 9315](dell/xps/13-9315) | `` | `dell-xps-13-9315` | -| [Dell XPS 13 9333](dell/xps/13-9333) | `` | `dell-xps-13-9333` | -| [Dell XPS 13 9343](dell/xps/13-9343) | `` | `dell-xps-13-9343` | -| [Dell XPS 13 9350](dell/xps/13-9350) | `` | `dell-xps-13-9350` | -| [Dell XPS 13 9360](dell/xps/13-9360) | `` | `dell-xps-13-9360` | -| [Dell XPS 13 9370](dell/xps/13-9370) | `` | `dell-xps-13-9370` | -| [Dell XPS 13 9380](dell/xps/13-9380) | `` | `dell-xps-13-9380` | -| [Dell XPS 15 7590, nvidia](dell/xps/15-7590/nvidia) | `` | `dell-xps-15-7590-nvidia` | -| [Dell XPS 15 7590](dell/xps/15-7590) | `` | `dell-xps-15-7590` | -| [Dell XPS 15 9500, nvidia](dell/xps/15-9500/nvidia) | `` | `dell-xps-15-9500-nvidia` | -| [Dell XPS 15 9500](dell/xps/15-9500) | `` | `dell-xps-15-9500` | -| [Dell XPS 15 9510, nvidia](dell/xps/15-9510/nvidia) | `` | `dell-xps-15-9510-nvidia` | -| [Dell XPS 15 9510](dell/xps/15-9510) | `` | `dell-xps-15-9510` | -| [Dell XPS 15 9520, nvidia](dell/xps/15-9520/nvidia) | `` | `dell-xps-15-9520-nvidia` | -| [Dell XPS 15 9520](dell/xps/15-9520) | `` | `dell-xps-15-9520` | -| [Dell XPS 15 9530, nvidia](dell/xps/15-9530/nvidia) | `` | `dell-xps-15-9530-nvidia` | -| [Dell XPS 15 9530](dell/xps/15-9530) | `` | `dell-xps-15-9530` | -| [Dell XPS 15 9550, nvidia](dell/xps/15-9550/nvidia) | `` | `dell-xps-15-9550-nvidia` | -| [Dell XPS 15 9550](dell/xps/15-9550) | `` | `dell-xps-15-9550` | -| [Dell XPS 15 9560, intel only](dell/xps/15-9560/intel) | `` | `dell-xps-15-9560-intel` | -| [Dell XPS 15 9560, nvidia only](dell/xps/15-9560/nvidia) | `` | `dell-xps-15-9560-nvidia` | -| [Dell XPS 15 9560](dell/xps/15-9560) | `` | `dell-xps-15-9560` | -| [Dell XPS 15 9570, intel only](dell/xps/15-9570/intel) | `` | `dell-xps-15-9570-intel` | -| [Dell XPS 15 9570, nvidia](dell/xps/15-9570/nvidia) | `` | `dell-xps-15-9570-nvidia` | -| [Dell XPS 15 9570](dell/xps/15-9570) | `` | `dell-xps-15-9570` | -| [Dell XPS 17 9700, intel](dell/xps/17-9700/intel) | `` | `dell-xps-17-9700-nvidia` | -| [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | `dell-xps-17-9710-intel` | -| [Framework 11th Gen Intel Core](framework/13-inch/11th-gen-intel) | `` | `framework-11th-gen-intel` | -| [Framework 12th Gen Intel Core](framework/12-inch/13th-gen-intel) | `` | `framework-12th-gen-intel` | -| [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `` | `framework-13th-gen-intel` | +| Model | Path | Flake Module | +| --------------------------------------------------------------------------------- | ------------------------------------------------------- | -------------------------------------- | +| [Acer Aspire 4810T](acer/aspire/4810t) | `` | `acer-aspire-4810t` | +| [Airis N990](airis/n990) | `` | `airis-n990` | +| [Apple iMac 14.2](apple/imac/14-2) | `` | `apple-imac-14-2` | +| [Apple iMac 18.2](apple/imac/18-2) | `` | `apple-imac-18-2` | +| [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | `apple-macbook-air-3` | +| [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | `apple-macbook-air-4` | +| [Apple MacBook Air 5,X](apple/macbook-air/5) | `` | `apple-macbook-air-5` | +| [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | `apple-macbook-air-6` | +| [Apple MacBook Air 7,X](apple/macbook-air/7) | `` | `apple-macbook-air-7` | +| [Apple MacBook Pro 8,1](apple/macbook-pro/8-1) | `` | `apple-macbook-pro-8-1` | +| [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | `apple-macbook-pro-10-1` | +| [Apple MacBook Pro 11,1](apple/macbook-pro/11-1) | `` | `apple-macbook-pro-11-1` | +| [Apple MacBook Pro 11,4](apple/macbook-pro/11-4) | `` | `apple-macbook-pro-11-4` | +| [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | `apple-macbook-pro-11-5` | +| [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | `apple-macbook-pro-12-1` | +| [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | `apple-macbook-pro-14-1` | +| [Apple MacMini (2010, Intel, Nvidia)](apple/macmini/4) | `` | `apple-macmini-4-1` | +| [Apple Macs with a T2 Chip](apple/t2) | `` | `apple-t2` | +| [Aoostar R1 N100](aoostar/r1/n100) | `` | `aoostar-r1-n100` | +| [Asus Pro WS X570-ACE](asus/pro-ws-x570-ace) | `` | `asus-pro-ws-x570-ace` | +| [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | `asus-ally-rc71l` | +| [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/amdgpu) | `` | `asus-flow-gv302x-amdgpu` | +| [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/nvidia) | `` | `asus-flow-gv302x-nvidia` | +| [Asus ROG GL552VW](asus/rog-gl552vw) | `` | `asus-rog-gl552vw` | +| [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | `asus-rog-strix-g513im` | +| [Asus ROG Strix G533ZW](asus/rog-strix/g533zw) | `` | `asus-rog-strix-g533zw` | +| [Asus ROG Strix G533Q](asus/rog-strix/g533q) | `` | `asus-rog-strix-g533zw` | +| [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `` | `asus-rog-strix-g713ie` | +| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | `asus-rog-strix-g733qs` | +| [Asus ROG Strix X570-E GAMING](asus/rog-strix/x570e) | `` | `asus-rog-strix-x570e` | +| [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | `asus-zephyrus-ga401` | +| [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | `asus-zephyrus-ga402` | +| [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/amdgpu) | `` | `asus-zephyrus-ga402x-amdgpu` | +| [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/nvidia) | `` | `asus-zephyrus-ga402x-nvidia` | +| [Asus ROG Zephyrus G15 GA502](asus/zephyrus/ga502) | `` | `asus-zephyrus-ga502` | +| [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | `asus-zephyrus-ga503` | +| [Asus ROG Zephyrus G16 GU605MY](asus/zephyrus/gu605my) | `` | `asus-zephyrus-gu605my` | +| [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | `asus-zephyrus-gu603h` | +| [Asus TUF FX504GD](asus/fx504gd) | `` | `asus-fx504gd` | +| [Asus TUF FX506HM](asus/fx506hm) | `` | `asus-fx506hm` | +| [Asus TUF FA506IC](asus/fa506ic) | `` | `asus-fa506ic` | +| [Asus TUF FA507RM](asus/fa507rm) | `` | `asus-fa507rm` | +| [Asus TUF FA507NV](asus/fa507nv) | `` | `asus-fa507nv` | +| [Asus Zenbook Duo 14 UX481](asus/zenbook/ux481/intelgpu/) | `` | `asus-zenbook-ux481-intelgpu` | +| [Asus Zenbook Duo 14 UX481](asus/zenbook/ux481/nvidia/) | `` | `asus-zenbook-ux481-nvidia` | +| [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `` | `asus-zenbook-ux371` | +| [Asus Zenbook Pro 15 UX535](asus/zenbook/ux535/) | `` | `asus-zenbook-ux535` | +| [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | `beagleboard-pocketbeagle` | +| [Chuwi MiniBook X](chuwi/minibook-x) | `` | `chuwi-minibook-x` | +| [Deciso DEC series](deciso/dec) | `` | `deciso-dec` | +| [Dell G3 3779](dell/g3/3779) | `` | `dell-g3-3779` | +| [Dell G3 3579](dell/g3/3579) | `` | `dell-g3-3579` | +| [Dell Inspiron 3442](dell/inspiron/3442) | `` | `dell-inspiron-3442` | +| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | `dell-inspiron-14-5420` | +| [Dell Inspiron 5509](dell/inspiron/5509) | `` | `dell-inspiron-5509` | +| [Dell Inspiron 5515](dell/inspiron/5515) | `` | `dell-inspiron-5515` | +| [Dell Inspiron 7405](dell/inspiron/7405) | `` | `dell-inspiron-7405` | +| [Dell Inspiron 7460](dell/inspiron/7460) | `` | `dell-inspiron-7460` | +| [Dell Inspiron 7559](dell/inspiron/7559) | `` | `dell-inspiron-7559` | +| [Dell Latitude 3340](dell/latitude/3340) | `` | `dell-latitude-3340` | +| [Dell Latitude 3480](dell/latitude/3480) | `` | `dell-latitude-3480` | +| [Dell Latitude 5490](dell/latitude/5490) | `` | `dell-latitude-5490` | +| [Dell Latitude 5520](dell/latitude/5520) | `` | `dell-latitude-5520` | +| [Dell Latitude 7280](dell/latitude/7280) | `` | `dell-latitude-7280` | +| [Dell Latitude 7390](dell/latitude/7390) | `` | `dell-latitude-7390` | +| [Dell Latitude 7420](dell/latitude/7420) | `` | `dell-latitude-7420` | +| [Dell Latitude 7430](dell/latitude/7430) | `` | `dell-latitude-7430` | +| [Dell Latitude 7490](dell/latitude/7490) | `` | `dell-latitude-7490` | +| [Dell Latitude 9430](dell/latitude/9430) | `` | `dell-latitude-9430` | +| [Dell Latitude E7240](dell/latitude/e7240) | `` | `dell-latitude-e7240` | +| [Dell Optiplex 3050](dell/optiplex/3050) | `` | `dell-optiplex-3050` | +| [Dell Poweredge R7515](dell/poweredge/r7515) | `` | `dell-poweredge-r7515` | +| [Dell Precision 3490, nvidia](dell/precision/3490/nvidia) | `` | `dell-precision-3490-nvidia` | +| [Dell Precision 3490, intel](dell/precision/3490/intel) | `` | `dell-precision-3490-intel` | +| [Dell Precision 3541](dell/precision/3541) | `` | `dell-precision-3541` | +| [Dell Precision 5490](dell/precision/5490) | `` | `dell-precision-5490` | +| [Dell Precision 5530](dell/precision/5530) | `` | `dell-precision-5530` | +| [Dell Precision 5560](dell/precision/5560) | `` | `dell-precision-5560` | +| [Dell Precision 5570](dell/precision/5570) | `` | `dell-precision-5570` | +| [Dell Precision 7520](dell/precision/7520) | `` | `dell-precision-7520` | +| [Dell XPS 13 7390](dell/xps/13-7390) | `` | `dell-xps-13-7390` | +| [Dell XPS 13 9300](dell/xps/13-9300) | `` | `dell-xps-13-9300` | +| [Dell XPS 13 9310](dell/xps/13-9310) | `` | `dell-xps-13-9310` | +| [Dell XPS 13 9315](dell/xps/13-9315) | `` | `dell-xps-13-9315` | +| [Dell XPS 13 9333](dell/xps/13-9333) | `` | `dell-xps-13-9333` | +| [Dell XPS 13 9343](dell/xps/13-9343) | `` | `dell-xps-13-9343` | +| [Dell XPS 13 9350](dell/xps/13-9350) | `` | `dell-xps-13-9350` | +| [Dell XPS 13 9360](dell/xps/13-9360) | `` | `dell-xps-13-9360` | +| [Dell XPS 13 9370](dell/xps/13-9370) | `` | `dell-xps-13-9370` | +| [Dell XPS 13 9380](dell/xps/13-9380) | `` | `dell-xps-13-9380` | +| [Dell XPS 15 7590, nvidia](dell/xps/15-7590/nvidia) | `` | `dell-xps-15-7590-nvidia` | +| [Dell XPS 15 7590](dell/xps/15-7590) | `` | `dell-xps-15-7590` | +| [Dell XPS 15 9500, nvidia](dell/xps/15-9500/nvidia) | `` | `dell-xps-15-9500-nvidia` | +| [Dell XPS 15 9500](dell/xps/15-9500) | `` | `dell-xps-15-9500` | +| [Dell XPS 15 9510, nvidia](dell/xps/15-9510/nvidia) | `` | `dell-xps-15-9510-nvidia` | +| [Dell XPS 15 9510](dell/xps/15-9510) | `` | `dell-xps-15-9510` | +| [Dell XPS 15 9520, nvidia](dell/xps/15-9520/nvidia) | `` | `dell-xps-15-9520-nvidia` | +| [Dell XPS 15 9520](dell/xps/15-9520) | `` | `dell-xps-15-9520` | +| [Dell XPS 15 9530, nvidia](dell/xps/15-9530/nvidia) | `` | `dell-xps-15-9530-nvidia` | +| [Dell XPS 15 9530](dell/xps/15-9530) | `` | `dell-xps-15-9530` | +| [Dell XPS 15 9550, nvidia](dell/xps/15-9550/nvidia) | `` | `dell-xps-15-9550-nvidia` | +| [Dell XPS 15 9550](dell/xps/15-9550) | `` | `dell-xps-15-9550` | +| [Dell XPS 15 9560, intel only](dell/xps/15-9560/intel) | `` | `dell-xps-15-9560-intel` | +| [Dell XPS 15 9560, nvidia only](dell/xps/15-9560/nvidia) | `` | `dell-xps-15-9560-nvidia` | +| [Dell XPS 15 9560](dell/xps/15-9560) | `` | `dell-xps-15-9560` | +| [Dell XPS 15 9570, intel only](dell/xps/15-9570/intel) | `` | `dell-xps-15-9570-intel` | +| [Dell XPS 15 9570, nvidia](dell/xps/15-9570/nvidia) | `` | `dell-xps-15-9570-nvidia` | +| [Dell XPS 15 9570](dell/xps/15-9570) | `` | `dell-xps-15-9570` | +| [Dell XPS 17 9700, intel](dell/xps/17-9700/intel) | `` | `dell-xps-17-9700-nvidia` | +| [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | `dell-xps-17-9710-intel` | +| [Framework 11th Gen Intel Core](framework/13-inch/11th-gen-intel) | `` | `framework-11th-gen-intel` | +| [Framework 12th Gen Intel Core](framework/12-inch/12th-gen-intel) | `` | `framework-12th-gen-intel` | +| [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `` | `framework-13th-gen-intel` | | [Framework Intel Core Ultra Series 1](framework/13-inch/intel-core-ultra-series1) | `` | `framework-intel-core-ultra-series1` | -| [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | `framework-13-7040-amd` | -| [Framework 13 AMD AI 300 Series](framework/13-inch/amd-ai-300-series) | `` | `framework-amd-ai-300-series` | -| [Framework 12 13th Gen Intel Core](framework/12-inch/13th-gen-intel) | `` | `framework-12-13th-gen-intel` | -| [Framework 16 AMD Ryzen 7040 Series](framework/16-inch/7040-amd) | `` | `framework-16-7040-amd` | -| [Framework 16 AMD Ryzen AI 300 Series](framework/16-inch/amd-ai-300-series) | `` | `framework-16-amd-ai-300-series` | -| [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | `friendlyarm-nanopc-t4` | -| [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | `friendlyarm-nanopi-r5s` | -| [Focus M2 Gen 1](focus/m2/gen1) | `` | `focus-m2-gen1` | -| [Fydetab Duo](fydetab/duo) | `` | `fydetab-duo` | -| [Gigabyte B550](gigabyte/b550) | `` | `gigabyte-b550` | -| [Gigabyte B650](gigabyte/b650) | `` | `gigabyte-b650` | -| [GMKtec NucBox G3 Plus](gmktec/nucbox/g3-plus) | `` | `gmktec-nucbox-g3-plus` | -| [GPD MicroPC](gpd/micropc) | `` | `gpd-micropc` | -| [GPD P2 Max](gpd/p2-max) | `` | `gpd-p2-max` | -| [GPD Pocket 3](gpd/pocket-3) | `` | `gpd-pocket-3` | -| [GPD Pocket 4](gpd/pocket-4) | `` | `gpd-pocket-4` | -| [GPD WIN 2](gpd/win-2) | `` | `gpd-win-2` | -| [GPD WIN Max 2 2023](gpd/win-max-2/2023) | `` | `gpd-win-max-2-2023` | -| [GPD WIN Mini 2024](gpd/win-mini/2024) | `` | `gpd-win-mini-2024` | -| [Google Pixelbook](google/pixelbook) | `` | `google-pixelbook` | -| [HP Elitebook 2560p](hp/elitebook/2560p) | `` | `hp-elitebook-2560p` | -| [HP Elitebook 830g6](hp/elitebook/830/g6) | `` | `hp-elitebook-830g6` | -| [HP Elitebook 845g7](hp/elitebook/845/g7) | `` | `hp-elitebook-845g7` | -| [HP Elitebook 845g8](hp/elitebook/845/g8) | `` | `hp-elitebook-845g8` | -| [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | `hp-elitebook-845g9` | -| [HP Laptop 14s-dq2024nf](hp/laptop/14s-dq2024nf) | `` | `hp-laptop-14s-dq2024nf` | -| [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | `hp-notebook-14-df0023` | -| [HP Probook 440G5](hp/probook/440g5) | `` | `hp-probook-440G5` | -| [HP Probook 460G11](hp/probook/460g11) | `` | `hp-probook-46011` | -| [Huawei Matebook X Pro (2020)](huawei/machc-wa) | `` | `huawei-machc-wa` | -| [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | `nxp-imx8qm-mek` | -| [Intel NUC 5i5RYB](intel/nuc/5i5ryb/) | `` | `intel-nuc-5i5ryb` | -| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | `intel-nuc-8i7beh` | -| [Lenovo IdeaCentre K330](lenovo/ideacentre/k330) | `` | `lenovo-ideacentre-k330` | -| [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `` | `lenovo-ideapad-15alc6` | -| [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | `lenovo-ideapad-15arh05` | -| [Lenovo IdeaPad Gaming 3 15ach6](lenovo/ideapad/15ach6) | `` | `lenovo-ideapad-15ach6` | -| [Lenovo IdeaPad 5 Pro 14imh9](lenovo/ideapad/14imh9) | `` | `lenovo-ideapad-14imh9` | -| [Lenovo IdeaPad 5 Pro 16ach6](lenovo/ideapad/16ach6) | `` | `lenovo-ideapad-16ach6` | -| [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | `lenovo-ideapad-z510` | -| [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | `lenovo-ideapad-slim-5` | -| [Lenovo IdeaPad Slim 5 16iah8](lenovo/ideapad/16iah8) | `` | `lenovo-ideapad-16ahp9` | -| [Lenovo IdeaPad S145 15api](lenovo/ideapad/s145-15api) | `` | `lenovo-ideapad-s145-15api` | -| [Lenovo Legion 5 15ach6h](lenovo/legion/15ach6h) | `` | `lenovo-legion-15ach6h` | -| [Lenovo Legion 5 15ach6h (Hybrid)](lenovo/legion/15ach6h/hybrid) | `` | `lenovo-legion-15ach6h-hybrid` | -| [Lenovo Legion 5 15ach6h (Nvidia)](lenovo/legion/15ach6h/hybrid) | `` | `lenovo-legion-15ach6h-nvidia` | -| [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | `lenovo-legion-15arh05h` | -| [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | `lenovo-legion-15ach6` | -| [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | `lenovo-legion-16ach6h` | -| [Lenovo Legion 5 Pro 16ach6h (Hybrid)](lenovo/legion/16ach6h/hybrid) | `` | `lenovo-legion-16ach6h-hybrid` | -| [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia) | `` | `lenovo-legion-16ach6h-nvidia` | -| [Lenovo Legion 5 Pro 16arh7h (IGPU Only)](lenovo/legion/16arh7h/igpu-only) | `` | `lenovo-legion-16arh7h-igpu-only` | -| [Lenovo Legion 5 Pro 16arh7h (Hybrid)](lenovo/legion/16arh7h/hybrid) | `` | `lenovo-legion-16arh7h-hybrid` | -| [Lenovo Legion 5 Pro 16IAH7H (Intel)](lenovo/legion/16iah7h/) | `` | `lenovo-legion-16iah7h` | -| [Lenovo Legion 7 16achg6 (Hybrid)](lenovo/legion/16achg6/hybrid) | `` | `lenovo-legion-16achg6-hybrid` | -| [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `` | `lenovo-legion-16achg6-nvidia` | -| [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | `lenovo-legion-16irx8h` | -| [Lenovo Legion 7 Pro 16irx9h (Intel)](lenovo/legion/16irx9h) | `` | `lenovo-legion-16irx9h` | -| [Lenovo Legion Slim 7 Gen 7 (AMD)](lenovo/legion/16arha7/) | `` | `lenovo-legion-16arha7` | -| [Lenovo Legion T5 AMR5](lenovo/legion/t526amr5) | `` | `lenovo-legion-t526amr5` | +| [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | `framework-13-7040-amd` | +| [Framework 13 AMD AI 300 Series](framework/13-inch/amd-ai-300-series) | `` | `framework-amd-ai-300-series` | +| [Framework 12 13th Gen Intel Core](framework/12-inch/13th-gen-intel) | `` | `framework-12-13th-gen-intel` | +| [Framework 16 AMD Ryzen 7040 Series](framework/16-inch/7040-amd) | `` | `framework-16-7040-amd` | +| [Framework 16 AMD Ryzen AI 300 Series](framework/16-inch/amd-ai-300-series) | `` | `framework-16-amd-ai-300-series` | +| [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | `friendlyarm-nanopc-t4` | +| [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | `friendlyarm-nanopi-r5s` | +| [Focus M2 Gen 1](focus/m2/gen1) | `` | `focus-m2-gen1` | +| [Fydetab Duo](fydetab/duo) | `` | `fydetab-duo` | +| [Gigabyte B550](gigabyte/b550) | `` | `gigabyte-b550` | +| [Gigabyte B650](gigabyte/b650) | `` | `gigabyte-b650` | +| [GMKtec NucBox G3 Plus](gmktec/nucbox/g3-plus) | `` | `gmktec-nucbox-g3-plus` | +| [GPD MicroPC](gpd/micropc) | `` | `gpd-micropc` | +| [GPD P2 Max](gpd/p2-max) | `` | `gpd-p2-max` | +| [GPD Pocket 3](gpd/pocket-3) | `` | `gpd-pocket-3` | +| [GPD Pocket 4](gpd/pocket-4) | `` | `gpd-pocket-4` | +| [GPD WIN 2](gpd/win-2) | `` | `gpd-win-2` | +| [GPD WIN Max 2 2023](gpd/win-max-2/2023) | `` | `gpd-win-max-2-2023` | +| [GPD WIN Mini 2024](gpd/win-mini/2024) | `` | `gpd-win-mini-2024` | +| [Google Pixelbook](google/pixelbook) | `` | `google-pixelbook` | +| [HP Elitebook 2560p](hp/elitebook/2560p) | `` | `hp-elitebook-2560p` | +| [HP Elitebook 830g6](hp/elitebook/830/g6) | `` | `hp-elitebook-830g6` | +| [HP Elitebook 845g7](hp/elitebook/845/g7) | `` | `hp-elitebook-845g7` | +| [HP Elitebook 845g8](hp/elitebook/845/g8) | `` | `hp-elitebook-845g8` | +| [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | `hp-elitebook-845g9` | +| [HP Laptop 14s-dq2024nf](hp/laptop/14s-dq2024nf) | `` | `hp-laptop-14s-dq2024nf` | +| [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | `hp-notebook-14-df0023` | +| [HP Probook 440G5](hp/probook/440G5) | `` | `hp-probook-440G5` | +| [HP Laptop 14s-dq2024nf](hp/laptop/14s-dq2024nf) | `` | `hp-laptop-14s-dq2024nf` | +| [HP Probook 460G11](hp/probook/460g11) | `` | `hp-probook-46011` | +| [Huawei Matebook X Pro (2020)](huawei/machc-wa) | `` | `huawei-machc-wa` | +| [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | `nxp-imx8qm-mek` | +| [Intel NUC 5i5RYB](intel/nuc/5i5ryb/) | `` | `intel-nuc-5i5ryb` | +| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | `intel-nuc-8i7beh` | +| [Kobol Helios4](kobol/helios4) | `` | `kobol-helios-4` | +| [Lenovo IdeaCentre K330](lenovo/ideacentre/k330) | `` | `lenovo-ideacentre-k330` | +| [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `` | `lenovo-ideapad-15alc6` | +| [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | `lenovo-ideapad-15arh05` | +| [Lenovo IdeaPad Gaming 3 15ach6](lenovo/ideapad/15ach6) | `` | `lenovo-ideapad-15ach6` | +| [Lenovo IdeaPad 5 Pro 14imh9](lenovo/ideapad/14imh9) | `` | `lenovo-ideapad-14imh9` | +| [Lenovo IdeaPad 5 Pro 16ach6](lenovo/ideapad/16ach6) | `` | `lenovo-ideapad-16ach6` | +| [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | `lenovo-ideapad-z510` | +| [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | `lenovo-ideapad-slim-5` | +| [Lenovo IdeaPad Slim 5 16iah8](lenovo/ideapad/16iah8) | `` | `lenovo-ideapad-16ahp9` | +| [Lenovo IdeaPad S145 15api](lenovo/ideapad/s145-15api) | `` | `lenovo-ideapad-s145-15api` | +| [Lenovo Legion 5 15ach6h](lenovo/legion/15ach6h) | `` | `lenovo-legion-15ach6h` | +| [Lenovo Legion 5 15ach6h (Hybrid)](lenovo/legion/15ach6h/hybrid) | `` | `lenovo-legion-15ach6h-hybrid` | +| [Lenovo Legion 5 15ach6h (Nvidia)](lenovo/legion/15ach6h/hybrid) | `` | `lenovo-legion-15ach6h-nvidia` | +| [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | `lenovo-legion-15arh05h` | +| [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | `lenovo-legion-15ach6` | +| [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | `lenovo-legion-16ach6h` | +| [Lenovo Legion 5 Pro 16ach6h (Hybrid)](lenovo/legion/16ach6h/hybrid) | `` | `lenovo-legion-16ach6h-hybrid` | +| [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia) | `` | `lenovo-legion-16ach6h-nvidia` | +| [Lenovo Legion 5 Pro 16arh7h (IGPU Only)](lenovo/legion/16arh7h/igpu-only) | `` | `lenovo-legion-16arh7h-igpu-only` | +| [Lenovo Legion 5 Pro 16arh7h (Hybrid)](lenovo/legion/16arh7h/hybrid) | `` | `lenovo-legion-16arh7h-hybrid` | +| [Lenovo Legion 5 Pro 16IAH7H (Intel)](lenovo/legion/16iah7h/) | `` | `lenovo-legion-16iah7h` | +| [Lenovo Legion 7 16achg6 (Hybrid)](lenovo/legion/16achg6/hybrid) | `` | `lenovo-legion-16achg6-hybrid` | +| [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `` | `lenovo-legion-16achg6-nvidia` | +| [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | `lenovo-legion-16irx8h` | +| [Lenovo Legion 7 Pro 16irx9h (Intel)](lenovo/legion/16irx9h) | `` | `lenovo-legion-16irx9h` | +| [Lenovo Legion Slim 5](lenovo/legion/16aph8/) | `` | `lenovo-legion-16aph8` | +| [Lenovo Legion Slim 7 Gen 7 (AMD)](lenovo/legion/16arha7/) | `` | `lenovo-legion-16arha7` | +| [Lenovo Legion T5 AMR5](lenovo/legion/t526amr5) | `` | `lenovo-legion-t526amr5` | | [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | `lenovo-legion-y530-15ich` | -| [Lenovo ThinkPad A475](lenovo/thinkpad/a475) | `` | `lenovo-thinkpad-a475` | -| [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | `lenovo-thinkpad-e14-amd` | -| [Lenovo ThinkPad E14 (Intel - Gen 1)](lenovo/thinkpad/e14/intel) | `` | `lenovo-thinkpad-e14-intel` | -| [Lenovo ThinkPad E14 (Intel - Gen 4)](lenovo/thinkpad/e14/intel/gen4) | `` | `lenovo-thinkpad-e14-intel-gen4` | -| [Lenovo ThinkPad E14 (Intel - Gen 6)](lenovo/thinkpad/e14/intel/gen6) | `` | `lenovo-thinkpad-e14-intel-gen6` | -| [Lenovo ThinkPad E15 (Intel)](lenovo/thinkpad/e15/intel) | `` | `lenovo-thinkpad-e15-intel` | -| [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | `lenovo-thinkpad-e470` | -| [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | `lenovo-thinkpad-e495` | -| [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13/yoga) | `` | `lenovo-thinkpad-l13-yoga` | -| [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | `lenovo-thinkpad-l13` | -| [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | `lenovo-thinkpad-l14-amd` | -| [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | `lenovo-thinkpad-l14-intel` | -| [Lenovo ThinkPad L480](lenovo/thinkpad/l480) | `` | `lenovo-thinkpad-l480` | -| [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | `lenovo-thinkpad-p1-gen3` | -| [Lenovo ThinkPad P14s AMD Gen 1](lenovo/thinkpad/p14s/amd/gen1) | `` | `lenovo-thinkpad-p14s-amd-gen1` | -| [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | `lenovo-thinkpad-p14s-amd-gen2` | -| [Lenovo ThinkPad P14s AMD Gen 3](lenovo/thinkpad/p14s/amd/gen3) | `` | `lenovo-thinkpad-p14s-amd-gen3` | -| [Lenovo ThinkPad P14s AMD Gen 4](lenovo/thinkpad/p14s/amd/gen4) | `` | `lenovo-thinkpad-p14s-amd-gen4` | -| [Lenovo ThinkPad P14s AMD Gen 5](lenovo/thinkpad/p14s/amd/gen5) | `` | `lenovo-thinkpad-p14s-amd-gen5` | -| [Lenovo ThinkPad P14s Intel Gen 2](lenovo/thinkpad/p14s/intel/gen2) | `` | `lenovo-thinkpad-p14s-intel-gen2`| -| [Lenovo ThinkPad P14s Intel Gen 3](lenovo/thinkpad/p14s/intel/gen3) | `` | `lenovo-thinkpad-p14s-intel-gen3`| -| [Lenovo ThinkPad P14s Intel Gen 5](lenovo/thinkpad/p14s/intel/gen5) | `` | `lenovo-thinkpad-p14s-intel-gen5`| -| [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | `lenovo-thinkpad-p16s-amd-gen1` | -| [Lenovo ThinkPad P16s AMD Gen 2](lenovo/thinkpad/p16s/amd/gen2) | `` | `lenovo-thinkpad-p16s-amd-gen2` | -| [Lenovo ThinkPad P16s AMD Gen 4](lenovo/thinkpad/p16s/amd/gen4) | `` | `lenovo-thinkpad-p16s-amd-gen4` | -| [Lenovo ThinkPad P16s Intel Gen 2](lenovo/thinkpad/p16s/intel/gen2) | `` | `lenovo-thinkpad-p16s-intel-gen2`| -| [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | `lenovo-thinkpad-p1` | -| [Lenovo ThinkPad P43s](lenovo/thinkpad/p43s) | `` | `lenovo-thinkpad-p43s` | -| [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | `lenovo-thinkpad-p50` | -| [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `` | `lenovo-thinkpad-p51` | -| [Lenovo ThinkPad P52](lenovo/thinkpad/p52) | `` | `lenovo-thinkpad-p52` | -| [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | `lenovo-thinkpad-p53` | -| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | `lenovo-thinkpad-t14-amd-gen1` | -| [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | `lenovo-thinkpad-t14-amd-gen2` | -| [Lenovo ThinkPad T14 AMD Gen 3](lenovo/thinkpad/t14/amd/gen3) | `` | `lenovo-thinkpad-t14-amd-gen3` | -| [Lenovo ThinkPad T14 AMD Gen 4](lenovo/thinkpad/t14/amd/gen4) | `` | `lenovo-thinkpad-t14-amd-gen4` | -| [Lenovo ThinkPad T14 AMD Gen 5](lenovo/thinkpad/t14/amd/gen5) | `` | `lenovo-thinkpad-t14-amd-gen5` | -| [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | `lenovo-thinkpad-t14` | -| [Lenovo ThinkPad T14 Intel Gen 1](lenovo/thinkpad/t14/intel/gen1) | `` | `lenovo-thinkpad-t14-intel-gen1` | -| [Lenovo ThinkPad T14 Intel Gen 1 (Nvidia)](lenovo/thinkpad/t14/intel/gen1/nvidia) | ``| `lenovo-thinkpad-t14-intel-gen1-nvidia` | -| [Lenovo ThinkPad T14 Intel Gen 6](lenovo/thinkpad/t14/intel/gen6) | `` | `lenovo-thinkpad-t14-intel-gen6` | -| [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | `lenovo-thinkpad-t14s-amd-gen1` | -| [Lenovo ThinkPad T14s AMD Gen 4](lenovo/thinkpad/t14s/amd/gen4) | `` | `lenovo-thinkpad-t14s-amd-gen4` | -| [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | `lenovo-thinkpad-t14s` | -| [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `` | `lenovo-thinkpad-t410` | -| [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `` | `lenovo-thinkpad-t420` | -| [Lenovo ThinkPad T430](lenovo/thinkpad/t430) | `` | `lenovo-thinkpad-t430` | -| [Lenovo ThinkPad T440p](lenovo/thinkpad/t440p) | `` | `lenovo-thinkpad-t440p` | -| [Lenovo ThinkPad T440s](lenovo/thinkpad/t440s) | `` | `lenovo-thinkpad-t440s` | -| [Lenovo ThinkPad T450s](lenovo/thinkpad/t450s) | `` | `lenovo-thinkpad-t450s` | -| [Lenovo ThinkPad T460](lenovo/thinkpad/t460) | `` | `lenovo-thinkpad-t460` | -| [Lenovo ThinkPad T460p](lenovo/thinkpad/t460p) | `` | `lenovo-thinkpad-t460p` | -| [Lenovo ThinkPad T460s](lenovo/thinkpad/t460s) | `` | `lenovo-thinkpad-t460s` | -| [Lenovo ThinkPad T470s](lenovo/thinkpad/t470s) | `` | `lenovo-thinkpad-t470s` | -| [Lenovo ThinkPad T480](lenovo/thinkpad/t480) | `` | `lenovo-thinkpad-t480` | -| [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `` | `lenovo-thinkpad-t480s` | -| [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | `lenovo-thinkpad-t490` | -| [Lenovo ThinkPad T490s](lenovo/thinkpad/t490s) | `` | `lenovo-thinkpad-t490s` | -| [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | `lenovo-thinkpad-t495` | -| [Lenovo ThinkPad T520](lenovo/thinkpad/t520) | `` | `lenovo-thinkpad-t520` | -| [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | `lenovo-thinkpad-t550` | -| [Lenovo ThinkPad T590](lenovo/thinkpad/t590) | `` | `lenovo-thinkpad-t590` | -| [Lenovo ThinkPad W520](lenovo/thinkpad/w520) | `` | `lenovo-thinkpad-w520` | -| [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | `lenovo-thinkpad-x1-yoga` | -| [Lenovo ThinkPad X1 Yoga Gen 7](lenovo/thinkpad/x1/yoga/7th-gen/) | `` | `lenovo-thinkpad-x1-yoga-7th-gen` | -| [Lenovo ThinkPad X1 Yoga Gen 8](lenovo/thinkpad/x1/yoga/8th-gen/) | `` | `lenovo-thinkpad-x1-yoga-8th-gen` | -| [Lenovo ThinkPad X1 (2nd Gen)](lenovo/thinkpad/x1/2nd-gen) | `` | `lenovo-thinkpad-x1-2nd-gen` | -| [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | `lenovo-thinkpad-x1-6th-gen` | -| [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | `lenovo-thinkpad-x1-7th-gen` | -| [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | `lenovo-thinkpad-x1-9th-gen` | -| [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `` | `lenovo-thinkpad-x1-10th-gen` | -| [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `` | `lenovo-thinkpad-x1-11th-gen` | -| [Lenovo ThinkPad X1 (12th Gen)](lenovo/thinkpad/x1/12th-gen) | `` | `lenovo-thinkpad-x1-12th-gen` | -| [Lenovo ThinkPad X1 (13th Gen)](lenovo/thinkpad/x1/13th-gen) | `` | `lenovo-thinkpad-x1-13th-gen` | -| [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | `lenovo-thinkpad-x1-extreme-gen2` | -| [Lenovo ThinkPad X1 Extreme Gen 3](lenovo/thinkpad/x1-extreme/gen3) | `` | `lenovo-thinkpad-x1-extreme-gen3` | -| [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | `lenovo-thinkpad-x1-extreme-gen4` | -| [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | `lenovo-thinkpad-x1-nano-gen1` | -| [Lenovo ThinkPad X13s](lenovo/thinkpad/x13s) | `` | `lenovo-thinkpad-x13s` | -| [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | `lenovo-thinkpad-x13-yoga` | -| [Lenovo ThinkPad X13 Yoga (3th Gen)](lenovo/thinkpad/x13/yoga/3th-gen) | `` | `lenovo-thinkpad-x13-yoga-3th-gen` | -| [Lenovo ThinkPad X13 (Intel)](lenovo/thinkpad/x13/intel) | `` | `lenovo-thinkpad-x13-intel` | -| [Lenovo ThinkPad X13 (AMD)](lenovo/thinkpad/x13/amd) | `` | `lenovo-thinkpad-x13-amd` | -| [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | `lenovo-thinkpad-x140e` | -| [Lenovo ThinkPad X200s](lenovo/thinkpad/x200s) | `` | `lenovo-thinkpad-x200s` | -| [Lenovo ThinkPad X220](lenovo/thinkpad/x220) | `` | `lenovo-thinkpad-x220` | -| [Lenovo ThinkPad X230](lenovo/thinkpad/x230) | `` | `lenovo-thinkpad-x230` | -| [Lenovo ThinkPad X250](lenovo/thinkpad/x250) | `` | `lenovo-thinkpad-x250` | -| [Lenovo ThinkPad X260](lenovo/thinkpad/x260) | `` | `lenovo-thinkpad-x260` | -| [Lenovo ThinkPad X270](lenovo/thinkpad/x270) | `` | `lenovo-thinkpad-x270` | -| [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | `lenovo-thinkpad-x280` | -| [Lenovo ThinkPad X390](lenovo/thinkpad/x390) | `` | `lenovo-thinkpad-x390` | -| [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | `lenovo-thinkpad-z` | -| [Lenovo ThinkPad Z13 Gen 1](lenovo/thinkpad/z/gen1/z13) | `` | `lenovo-thinkpad-z13-gen1` | -| [Lenovo ThinkPad Z13 Gen 2](lenovo/thinkpad/z/gen2/z13) | `` | `lenovo-thinkpad-z13-gen2` | -| [Lenovo XiaoXin Pro 14imh9 2024](lenovo/ideapad/14imh9) | `` | `lenovo-ideapad-14imh9` | -| [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | `lenovo-yoga-6-13ALC6` | -| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/amdgpu) | `` | `lenovo-yoga-7-14ARH7-amdgpu` | -| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `` | `lenovo-yoga-7-14ARH7-nvidia` | -| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Integrated)](lenovo/yoga/7/14IAH7/integrated) | `` | `lenovo-yoga-7-14IAH7-integrated` | -| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Hybrid)](lenovo/yoga/7/14IAH7/hybrid) | `` | `lenovo-yoga-7-14IAH7-hybrid` | -| [Lenovo Yoga Slim 7 14ILL10](lenovo/yoga/7/14ILL10) | `` | `lenovo-yoga-7-14ILL10` | -| [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `` | `lenovo-yoga-7-slim-gen8` | -| [Linglong Nova Studio](linglong/nova-studio) | `` | `linglong-nova-studio` | -| [MSI B550-A PRO](msi/b550-a-pro) | `` | `msi-b550-a-pro` | -| [MSI B350 TOMAHAWK](msi/b350-tomahawk) | `` | `msi-b350-tomahawk` | -| [MSI B550 TOMAHAWK](msi/b550-tomahawk) | `` | `msi-b550-tomahawk` | -| [MSI GS60 2QE](msi/gs60) | `` | `msi-gs60` | -| [MSI GL62/CX62](msi/gl62) | `` | `msi-gl62` | -| [MSI GL65 10SDR-492](msi/gl65/10SDR-492) | `` | `msi-gl65-10SDR-492` | -| [Microchip Icicle Kit](microchip/icicle-kit) | `` | `microchip-icicle-kit` | -| [Microsoft Surface Go](microsoft/surface/surface-go) | `` | `microsoft-surface-go` | -| [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel) | `` | `microsoft-surface-pro-intel` | -| [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd) | `` | `microsoft-surface-laptop-amd` | -| [Microsoft Surface Range (Common Modules)](microsoft/surface/common) | `` | `microsoft-surface-common` | -| [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | `microsoft-surface-pro-3` | -| [Microsoft Surface Pro 9](microsoft/surface-pro/9) | `` | `microsoft-surface-pro-9` | -| [Morefine M600](morefine/m600) | `` | `morefine-m600` | -| [Minisforum V3](minisforum/v3) | `` | `minisforum-v3` | -| [MNT Reform with RK3588 module](mnt/reform/rk3588) | `` | `mechrevo-gm5hg0a` | -| [NXP iMX8 MPlus Evaluation Kit](nxp/imx8mp-evk) | `` | `nxp-imx8mp-evk` | -| [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | `nxp-imx8mq-evk` | -| [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | `hardkernel-odroid-hc4` | -| [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | `hardkernel-odroid-h3` | -| [Hardkernel Odroid H4](hardkernel/odroid-h4/default.nix) | `` | `hardkernel-odroid-h4` | -| [Omen 14-fb0798ng](omen/14-fb0798ng) | `` | `omen-14-fb0798ng` | -| [Omen 15-ce002ns](omen/15-ce002ns) | `` | `omen-15-ce002ns` | -| [Omen 15-en0010ca](omen/15-en0010ca) | `` | `omen-15-en0010ca` | -| [Omen 16-n0005ne](omen/16-n0005ne) | `` | `omen-16-n0005ne` | -| [Omen 16-n0280nd](/omen/16-n0280nd) | `` | `omen-16-n0280nd` | -| [Omen 15-en1007sa](omen/15-en1007sa) | `` | `omen-15-en1007sa` | -| [Omen 15-en0002np](omen/15-en0002np) | `` | `omen-15-en0002np` | -| [One-Netbook OneNetbook 4](onenetbook/4) | `` | `onenetbook-4` | -| [Panasonic Let's Note CF-LX3](panasonic/letsnote/cf-lx3) | `` | `panasonic-letsnote-cf-lx3` | -| [Panasonic Let's Note CF-LX4](panasonic/letsnote/cf-lx4) | `` | `letsnote-cf-lx4` | -| [PC Engines APU](pcengines/apu) | `` | `pcengines-apu` | -| [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | `pine64-pinebook-pro` | -| [PINE64 RockPro64](pine64/rockpro64/) | `` | `pine64-rockpro64` | -| [PINE64 STAR64](pine64/star64/) | `` | `pine64-star64` | -| [Protectli VP4670](protectli/vp4670/) | `` | `protectli-vp4670` | -| [Purism Librem 13v3](purism/librem/13v3) | `` | `purism-librem-13v3` | -| [Purism Librem 15v3](purism/librem/15v3) | `` | `purism-librem-15v3` | -| [Purism Librem 5r4](purism/librem/5r4) | `` | `purism-librem-5r4` | -| [Radxa ROCK 4C+](radxa/rock-4c-plus) | `` | `rock-4c-plus` | -| [Radxa ROCK 5 Model B](radxa/rock-5b) | `` | `rock-5b` | -| [Radxa ROCK Pi 4](radxa/rock-pi-4) | `` | `rock-pi-4` | -| [Radxa ROCK Pi E](radxa/rock-pi-e) | `` | `rock-pi-e`| -| [Raspberry Pi 2](raspberry-pi/2) | `` | `raspberry-pi-2`| -| [Raspberry Pi 3](raspberry-pi/3) | `` | `raspberry-pi-3`| -| [Raspberry Pi 4](raspberry-pi/4) | `` | `raspberry-pi-4`| -| [Raspberry Pi 5](raspberry-pi/5) | `` | `raspberry-pi-5`| -| [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | `samsung-np900x3c`| -| [Slimbook Hero RPL-RTX](slimbook/hero/rpl-rtx) | `` | `slimbook-hero-rpl-rtx`| -| [StarFive VisionFive v1](starfive/visionfive/v1) | `` | `starfive-visionfive-v1`| -| [StarFive VisionFive 2](starfive/visionfive/v2) | `` | `starfive-visionfive-2`| -| [StarLabs StarLite 5 (I5)](starlabs/starlite/i5) | `` | `starlabs-starlite-i5`| -| [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | `supermicro-a1sri-2758f`| -| [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | `supermicro-m11sdv-8c-ln4f`| -| [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | `supermicro-x10sll-f`| -| [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | `supermicro-x12scz-tln4f`| -| [System76 (generic)](system76) | `` | `system76`| -| [System76 Darter Pro 6](system76/darp6) | `` | `system76-darp6`| -| [System76 Gazelle 18](system76/gaze18) | `` | `system76-gaze18`| -| [System76 Galago Pro 5](system76/galp5-1650) | `` | `system76-galp5-1650`| -| [System76 Thelio Mega](system76/thelio-mega) | `` | `system76-thelio-mega`| -| [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | `toshiba-swanky`| -| [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | `tuxedo-infinitybook-v4`| -| [TUXEDO Aura 15 - Gen1](tuxedo/aura/15/gen1) | `` | `tuxedo-aura-15-gen1`| -| [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | `tuxedo-infinitybook-pro14-gen7`| -| [TUXEDO InfinityBook Pro 14 - Gen9 - AMD](tuxedo/infinitybook/pro14/gen9/amd) | `` | `tuxedo-infinitybook-pro14-gen9-amd`| -| [TUXEDO InfinityBook Pro 14 - Gen9 - INTEL](tuxedo/infinitybook/pro14/gen9/intel) | `` | `tuxedo-infinitybook-pro14-gen9-intel`| -| [TUXEDO Pulse 14 - Gen3](tuxedo/pulse/14/gen3) | `` | `tuxedo-pulse-14-gen3`| -| [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | `tuxedo-pulse-15-gen2`| -| [Xiaomi Redmibook 15 Pro 2021](xiaomi/redmibook/15-pro-2021) | `` | `xiaomi-redmibook-15-pro-2021`| -| [Xiaomi Redmibook 16 Pro 2024](xiaomi/redmibook/16-pro-2024) | `` | `xiaomi-redmibook-16-pro-2024`| +| [Lenovo ThinkPad A475](lenovo/thinkpad/a475) | `` | `lenovo-thinkpad-a475` | +| [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | `lenovo-thinkpad-e14-amd` | +| [Lenovo ThinkPad E14 (Intel - Gen 1)](lenovo/thinkpad/e14/intel) | `` | `lenovo-thinkpad-e14-intel` | +| [Lenovo ThinkPad E14 (Intel - Gen 4)](lenovo/thinkpad/e14/intel/gen4) | `` | `lenovo-thinkpad-e14-intel-gen4` | +| [Lenovo ThinkPad E14 (Intel - Gen 6)](lenovo/thinkpad/e14/intel/gen6) | `` | `lenovo-thinkpad-e14-intel-gen6` | +| [Lenovo ThinkPad E15 (Intel)](lenovo/thinkpad/e15/intel) | `` | `lenovo-thinkpad-e15-intel` | +| [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | `lenovo-thinkpad-e470` | +| [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | `lenovo-thinkpad-e495` | +| [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13/yoga) | `` | `lenovo-thinkpad-l13-yoga` | +| [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | `lenovo-thinkpad-l13` | +| [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | `lenovo-thinkpad-l14-amd` | +| [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | `lenovo-thinkpad-l14-intel` | +| [Lenovo ThinkPad L480](lenovo/thinkpad/l480) | `` | `lenovo-thinkpad-l480` | +| [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | `lenovo-thinkpad-p1-gen3` | +| [Lenovo ThinkPad P14s AMD Gen 1](lenovo/thinkpad/p14s/amd/gen1) | `` | `lenovo-thinkpad-p14s-amd-gen1` | +| [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | `lenovo-thinkpad-p14s-amd-gen2` | +| [Lenovo ThinkPad P14s AMD Gen 3](lenovo/thinkpad/p14s/amd/gen3) | `` | `lenovo-thinkpad-p14s-amd-gen3` | +| [Lenovo ThinkPad P14s AMD Gen 4](lenovo/thinkpad/p14s/amd/gen4) | `` | `lenovo-thinkpad-p14s-amd-gen4` | +| [Lenovo ThinkPad P14s AMD Gen 5](lenovo/thinkpad/p14s/amd/gen5) | `` | `lenovo-thinkpad-p14s-amd-gen5` | +| [Lenovo ThinkPad P14s Intel Gen 2](lenovo/thinkpad/p14s/intel/gen2) | `` | `lenovo-thinkpad-p14s-intel-gen2` | +| [Lenovo ThinkPad P14s Intel Gen 3](lenovo/thinkpad/p14s/intel/gen3) | `` | `lenovo-thinkpad-p14s-intel-gen3` | +| [Lenovo ThinkPad P14s Intel Gen 5](lenovo/thinkpad/p14s/intel/gen5) | `` | `lenovo-thinkpad-p14s-intel-gen5` | +| [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | `lenovo-thinkpad-p16s-amd-gen1` | +| [Lenovo ThinkPad P16s AMD Gen 2](lenovo/thinkpad/p16s/amd/gen2) | `` | `lenovo-thinkpad-p16s-amd-gen2` | +| [Lenovo ThinkPad P16s AMD Gen 4](lenovo/thinkpad/p16s/amd/gen4) | `` | `lenovo-thinkpad-p16s-amd-gen4` | +| [Lenovo ThinkPad P16s Intel Gen 2](lenovo/thinkpad/p16s/intel/gen2) | `` | `lenovo-thinkpad-p16s-intel-gen2` | +| [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | `lenovo-thinkpad-p1` | +| [Lenovo ThinkPad P43s](lenovo/thinkpad/p43s) | `` | `lenovo-thinkpad-p43s` | +| [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | `lenovo-thinkpad-p50` | +| [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `` | `lenovo-thinkpad-p51` | +| [Lenovo ThinkPad P52](lenovo/thinkpad/p52) | `` | `lenovo-thinkpad-p52` | +| [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | `lenovo-thinkpad-p53` | +| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | `lenovo-thinkpad-t14-amd-gen1` | +| [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | `lenovo-thinkpad-t14-amd-gen2` | +| [Lenovo ThinkPad T14 AMD Gen 3](lenovo/thinkpad/t14/amd/gen3) | `` | `lenovo-thinkpad-t14-amd-gen3` | +| [Lenovo ThinkPad T14 AMD Gen 4](lenovo/thinkpad/t14/amd/gen4) | `` | `lenovo-thinkpad-t14-amd-gen4` | +| [Lenovo ThinkPad T14 AMD Gen 5](lenovo/thinkpad/t14/amd/gen5) | `` | `lenovo-thinkpad-t14-amd-gen5` | +| [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | `lenovo-thinkpad-t14` | +| [Lenovo ThinkPad T14 Intel Gen 1](lenovo/thinkpad/t14/intel/gen1) | `` | `lenovo-thinkpad-t14-intel-gen1` | +| [Lenovo ThinkPad T14 Intel Gen 1 (Nvidia)](lenovo/thinkpad/t14/intel/gen1/nvidia) | ``| `lenovo-thinkpad-t14-intel-gen1-nvidia`| +| [Lenovo ThinkPad T14 Intel Gen 6](lenovo/thinkpad/t14/intel/gen6) | `` | `lenovo-thinkpad-t14-intel-gen6` | +| [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | `lenovo-thinkpad-t14s-amd-gen1` | +| [Lenovo ThinkPad T14s AMD Gen 4](lenovo/thinkpad/t14s/amd/gen4) | `` | `lenovo-thinkpad-t14s-amd-gen4` | +| [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | `lenovo-thinkpad-t14s` | +| [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `` | `lenovo-thinkpad-t410` | +| [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `` | `lenovo-thinkpad-t420` | +| [Lenovo ThinkPad T430](lenovo/thinkpad/t430) | `` | `lenovo-thinkpad-t430` | +| [Lenovo ThinkPad T440p](lenovo/thinkpad/t440p) | `` | `lenovo-thinkpad-t440p` | +| [Lenovo ThinkPad T440s](lenovo/thinkpad/t440s) | `` | `lenovo-thinkpad-t440s` | +| [Lenovo ThinkPad T450s](lenovo/thinkpad/t450s) | `` | `lenovo-thinkpad-t450s` | +| [Lenovo ThinkPad T460](lenovo/thinkpad/t460) | `` | `lenovo-thinkpad-t460` | +| [Lenovo ThinkPad T460p](lenovo/thinkpad/t460p) | `` | `lenovo-thinkpad-t460p` | +| [Lenovo ThinkPad T460s](lenovo/thinkpad/t460s) | `` | `lenovo-thinkpad-t460s` | +| [Lenovo ThinkPad T470s](lenovo/thinkpad/t470s) | `` | `lenovo-thinkpad-t470s` | +| [Lenovo ThinkPad T480](lenovo/thinkpad/t480) | `` | `lenovo-thinkpad-t480` | +| [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `` | `lenovo-thinkpad-t480s` | +| [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | `lenovo-thinkpad-t490` | +| [Lenovo ThinkPad T490s](lenovo/thinkpad/t490s) | `` | `lenovo-thinkpad-t490s` | +| [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | `lenovo-thinkpad-t495` | +| [Lenovo ThinkPad T520](lenovo/thinkpad/t520) | `` | `lenovo-thinkpad-t520` | +| [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | `lenovo-thinkpad-t550` | +| [Lenovo ThinkPad T590](lenovo/thinkpad/t590) | `` | `lenovo-thinkpad-t590` | +| [Lenovo ThinkPad W520](lenovo/thinkpad/w520) | `` | `lenovo-thinkpad-w520` | +| [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | `lenovo-thinkpad-x1-yoga` | +| [Lenovo ThinkPad X1 Yoga Gen 7](lenovo/thinkpad/x1/yoga/7th-gen/) | `` | `lenovo-thinkpad-x1-yoga-7th-gen` | +| [Lenovo ThinkPad X1 Yoga Gen 8](lenovo/thinkpad/x1/yoga/8th-gen/) | `` | `lenovo-thinkpad-x1-yoga-8th-gen` | +| [Lenovo ThinkPad X1 (2nd Gen)](lenovo/thinkpad/x1/2nd-gen) | `` | `lenovo-thinkpad-x1-2nd-gen` | +| [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | `lenovo-thinkpad-x1-6th-gen` | +| [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | `lenovo-thinkpad-x1-7th-gen` | +| [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | `lenovo-thinkpad-x1-9th-gen` | +| [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `` | `lenovo-thinkpad-x1-10th-gen` | +| [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `` | `lenovo-thinkpad-x1-11th-gen` | +| [Lenovo ThinkPad X1 (12th Gen)](lenovo/thinkpad/x1/12th-gen) | `` | `lenovo-thinkpad-x1-12th-gen` | +| [Lenovo ThinkPad X1 (13th Gen)](lenovo/thinkpad/x1/13th-gen) | `` | `lenovo-thinkpad-x1-13th-gen` | +| [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | `lenovo-thinkpad-x1-extreme-gen2` | +| [Lenovo ThinkPad X1 Extreme Gen 3](lenovo/thinkpad/x1-extreme/gen3) | `` | `lenovo-thinkpad-x1-extreme-gen3` | +| [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | `lenovo-thinkpad-x1-extreme-gen4` | +| [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | `lenovo-thinkpad-x1-nano-gen1` | +| [Lenovo ThinkPad X13s](lenovo/thinkpad/x13s) | `` | `lenovo-thinkpad-x13s` | +| [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | `lenovo-thinkpad-x13-yoga` | +| [Lenovo ThinkPad X13 Yoga (3th Gen)](lenovo/thinkpad/x13/yoga/3th-gen) | `` | `lenovo-thinkpad-x13-yoga-3th-gen` | +| [Lenovo ThinkPad X13 (Intel)](lenovo/thinkpad/x13/intel) | `` | `lenovo-thinkpad-x13-intel` | +| [Lenovo ThinkPad X13 (AMD)](lenovo/thinkpad/x13/amd) | `` | `lenovo-thinkpad-x13-amd` | +| [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | `lenovo-thinkpad-x140e` | +| [Lenovo ThinkPad X200s](lenovo/thinkpad/x200s) | `` | `lenovo-thinkpad-x200s` | +| [Lenovo ThinkPad X220](lenovo/thinkpad/x220) | `` | `lenovo-thinkpad-x220` | +| [Lenovo ThinkPad X230](lenovo/thinkpad/x230) | `` | `lenovo-thinkpad-x230` | +| [Lenovo ThinkPad X250](lenovo/thinkpad/x250) | `` | `lenovo-thinkpad-x250` | +| [Lenovo ThinkPad X260](lenovo/thinkpad/x260) | `` | `lenovo-thinkpad-x260` | +| [Lenovo ThinkPad X270](lenovo/thinkpad/x270) | `` | `lenovo-thinkpad-x270` | +| [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | `lenovo-thinkpad-x280` | +| [Lenovo ThinkPad X390](lenovo/thinkpad/x390) | `` | `lenovo-thinkpad-x390` | +| [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | `lenovo-thinkpad-z` | +| [Lenovo ThinkPad Z13 Gen 1](lenovo/thinkpad/z/gen1/z13) | `` | `lenovo-thinkpad-z13-gen1` | +| [Lenovo ThinkPad Z13 Gen 2](lenovo/thinkpad/z/gen2/z13) | `` | `lenovo-thinkpad-z13-gen2` | +| [Lenovo XiaoXin Pro 14imh9 2024](lenovo/ideapad/14imh9) | `` | `lenovo-ideapad-14imh9` | +| [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | `lenovo-yoga-6-13ALC6` | +| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/amdgpu) | `` | `lenovo-yoga-7-14ARH7-amdgpu` | +| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `` | `lenovo-yoga-7-14ARH7-nvidia` | +| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Integrated)](lenovo/yoga/7/14IAH7/integrated) | `` | `lenovo-yoga-7-14IAH7-integrated` | +| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Hybrid)](lenovo/yoga/7/14IAH7/hybrid) | `` | `lenovo-yoga-7-14IAH7-hybrid` | +| [Lenovo Yoga Slim 7 14ILL10](lenovo/yoga/7/14ILL10) | `` | `lenovo-yoga-7-14ILL10` | +| [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `` | `lenovo-yoga-7-slim-gen8` | +| [Linglong Nova Studio](linglong/nova-studio) | `` | `linglong-nova-studio` | +| [MSI B550-A PRO](msi/b550-a-pro) | `` | `msi-b550-a-pro` | +| [MSI B350 TOMAHAWK](msi/b350-tomahawk) | `` | `msi-b350-tomahawk` | +| [MSI B550 TOMAHAWK](msi/b550-tomahawk) | `` | `msi-b550-tomahawk` | +| [MSI GS60 2QE](msi/gs60) | `` | `msi-gs60` | +| [MSI GL62/CX62](msi/gl62) | `` | `msi-gl62` | +| [MSI GL65 10SDR-492](msi/gl65/10SDR-492) | `` | `msi-gl65-10SDR-492` | +| [Malibal Aon S1](malibal/aon/s1) | | `` | `malibal-aon-s1` | +| [Microchip Icicle Kit](microchip/icicle-kit) | `` | `microchip-icicle-kit` | +| [Microsoft Surface Go](microsoft/surface/surface-go) | `` | `microsoft-surface-go` | +| [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel) | `` | `microsoft-surface-pro-intel` | +| [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd) | `` | `microsoft-surface-laptop-amd` | +| [Microsoft Surface Range (Common Modules)](microsoft/surface/common) | `` | `microsoft-surface-common` | +| [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | `microsoft-surface-pro-3` | +| [Microsoft Surface Pro 9](microsoft/surface-pro/9) | `` | `microsoft-surface-pro-9` | +| [Milk-V Pioneer](milkv/pioneer) | `` | `milkv-pioneer` | +| [Morefine M600](morefine/m600) | `` | `morefine-m600` | +| [Minisforum V3](minisforum/v3) | `` | `minisforum-v3` | +| [MNT Reform with RK3588 module](mnt/reform/rk3588) | `` | `mechrevo-gm5hg0a` | +| [NXP iMX8 MPlus Evaluation Kit](nxp/imx8mp-evk) | `` | `nxp-imx8mp-evk` | +| [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | `nxp-imx8mq-evk` | +| [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | `hardkernel-odroid-hc4` | +| [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | `hardkernel-odroid-h3` | +| [Hardkernel Odroid H4](hardkernel/odroid-h4/default.nix) | `` | `hardkernel-odroid-h4` | +| [Olimex TERES-I](olimex/teres_i) | `` | `olimex-teres_i` | +| [Omen 14-fb0798ng](omen/14-fb0798ng) | `` | `omen-14-fb0798ng` | +| [Omen 15-ce002ns](omen/15-ce002ns) | `` | `omen-15-ce002ns` | +| [Omen 15-en0010ca](omen/15-en0010ca) | `` | `omen-15-en0010ca` | +| [Omen 16-n0005ne](omen/16-n0005ne) | `` | `omen-16-n0005ne` | +| [Omen 16-n0280nd](/omen/16-n0280nd) | `` | `omen-16-n0280nd` | +| [Omen 15-en1007sa](omen/15-en1007sa) | `` | `omen-15-en1007sa` | +| [Omen 15-en0002np](omen/15-en0002np) | `` | `omen-15-en0002np` | +| [One-Netbook OneNetbook 4](onenetbook/4) | `` | `onenetbook-4` | +| [Panasonic Let's Note CF-LX3](panasonic/letsnote/cf-lx3) | `` | `panasonic-letsnote-cf-lx3` | +| [Panasonic Let's Note CF-LX4](panasonic/letsnote/cf-lx4) | `` | `letsnote-cf-lx4` | +| [PC Engines APU](pcengines/apu) | `` | `pcengines-apu` | +| [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | `pine64-pinebook-pro` | +| [PINE64 RockPro64](pine64/rockpro64/) | `` | `pine64-rockpro64` | +| [PINE64 STAR64](pine64/star64/) | `` | `pine64-star64` | +| [Protectli VP4670](protectli/vp4670/) | `` | `protectli-vp4670` | +| [Purism Librem 13v3](purism/librem/13v3) | `` | `purism-librem-13v3` | +| [Purism Librem 15v3](purism/librem/15v3) | `` | `purism-librem-15v3` | +| [Purism Librem 5r4](purism/librem/5r4) | `` | `purism-librem-5r4` | +| [Radxa ROCK 4C+](radxa/rock-4c-plus) | `` | `rock-4c-plus` | +| [Radxa ROCK 5 Model B](radxa/rock-5b) | `` | `rock-5b` | +| [Radxa ROCK Pi 4](radxa/rock-pi-4) | `` | `rock-pi-4` | +| [Radxa ROCK Pi E](radxa/rock-pi-e) | `` | `rock-pi-e` | +| [Raspberry Pi 2](raspberry-pi/2) | `` | `raspberry-pi-2` | +| [Raspberry Pi 3](raspberry-pi/3) | `` | `raspberry-pi-3` | +| [Raspberry Pi 4](raspberry-pi/4) | `` | `raspberry-pi-4` | +| [Raspberry Pi 5](raspberry-pi/5) | `` | `raspberry-pi-5` | +| [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | `samsung-np900x3c` | +| [Slimbook Hero RPL-RTX](slimbook/hero/rpl-rtx) | `` | `slimbook-hero-rpl-rtx` | +| [StarFive VisionFive v1](starfive/visionfive/v1) | `` | `starfive-visionfive-v1` | +| [StarFive VisionFive 2](starfive/visionfive/v2) | `` | `starfive-visionfive-2` | +| [StarLabs StarLite 5 (I5)](starlabs/starlite/i5) | `` | `starlabs-starlite-i5` | +| [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | `supermicro-a1sri-2758f` | +| [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | `supermicro-m11sdv-8c-ln4f` | +| [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | `supermicro-x10sll-f` | +| [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | `supermicro-x12scz-tln4f` | +| [System76 (generic)](system76) | `` | `system76` | +| [System76 Darter Pro 6](system76/darp6) | `` | `system76-darp6` | +| [System76 Gazelle 18](system76/gaze18) | `` | `system76-gaze18` | +| [System76 Galago Pro 5](system76/galp5-1650) | `` | `system76-galp5-1650` | +| [System76 Thelio Mega](system76/thelio-mega) | `` | `system76-thelio-mega` | +| [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | `toshiba-swanky` | +| [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | `tuxedo-infinitybook-v4` | +| [TUXEDO Aura 15 - Gen1](tuxedo/aura/15/gen1) | `` | `tuxedo-aura-15-gen1` | +| [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | `tuxedo-infinitybook-pro14-gen7` | +| [TUXEDO InfinityBook Pro 14 - Gen9 - AMD](tuxedo/infinitybook/pro14/gen9/amd) | `` | `tuxedo-infinitybook-pro14-gen9-amd` | +| [TUXEDO InfinityBook Pro 14 - Gen9 - INTEL](tuxedo/infinitybook/pro14/gen9/intel) | `` | `tuxedo-infinitybook-pro14-gen9-intel` | +| [TUXEDO Pulse 14 - Gen3](tuxedo/pulse/14/gen3) | `` | `tuxedo-pulse-14-gen3` | +| [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | `tuxedo-pulse-15-gen2` | +| [Xiaomi Redmibook 15 Pro 2021](xiaomi/redmibook/15-pro-2021) | `` | `xiaomi-redmibook-15-pro-2021` | +| [Xiaomi Redmibook 16 Pro 2024](xiaomi/redmibook/16-pro-2024) | `` | `xiaomi-redmibook-16-pro-2024` | + From d0955d227d7c4c42ff8e0efe77d910061c5e303d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 7 Oct 2025 22:07:48 +0200 Subject: [PATCH 1432/1476] raspberry-pi/3: load usbhid and usb_storage --- raspberry-pi/3/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/raspberry-pi/3/default.nix b/raspberry-pi/3/default.nix index 00e052f6..9ac90082 100644 --- a/raspberry-pi/3/default.nix +++ b/raspberry-pi/3/default.nix @@ -5,7 +5,13 @@ }: { - boot.kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi3; + boot = { + kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi3; + initrd.availableKernelModules = [ + "usbhid" + "usb_storage" + ]; + }; # fix the following error : # modprobe: FATAL: Module ahci not found in directory From a8bbda89115038163102c3fb51e41c939f7e0434 Mon Sep 17 00:00:00 2001 From: Karun Sandhu <129101708+MrSom3body@users.noreply.github.com> Date: Sat, 26 Jul 2025 14:14:24 +0200 Subject: [PATCH 1433/1476] init: Asus Zenbook 17 Pro --- README.md | 2 +- asus/zenbook/um6702/default.nix | 36 +++++++++++++++++++++++++++++++++ flake.nix | 1 + 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 asus/zenbook/um6702/default.nix diff --git a/README.md b/README.md index b1aa4fa7..cb513494 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,7 @@ See code for all available configurations. | [Asus Zenbook Duo 14 UX481](asus/zenbook/ux481/nvidia/) | `` | `asus-zenbook-ux481-nvidia` | | [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `` | `asus-zenbook-ux371` | | [Asus Zenbook Pro 15 UX535](asus/zenbook/ux535/) | `` | `asus-zenbook-ux535` | +| [Asus Zenbook Pro 17 UM6702](asus/zenbook/um6702/) | `` | `asus-zenbook-um6702` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | `beagleboard-pocketbeagle` | | [Chuwi MiniBook X](chuwi/minibook-x) | `` | `chuwi-minibook-x` | | [Deciso DEC series](deciso/dec) | `` | `deciso-dec` | @@ -445,4 +446,3 @@ See code for all available configurations. | [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | `tuxedo-pulse-15-gen2` | | [Xiaomi Redmibook 15 Pro 2021](xiaomi/redmibook/15-pro-2021) | `` | `xiaomi-redmibook-15-pro-2021` | | [Xiaomi Redmibook 16 Pro 2024](xiaomi/redmibook/16-pro-2024) | `` | `xiaomi-redmibook-16-pro-2024` | - diff --git a/asus/zenbook/um6702/default.nix b/asus/zenbook/um6702/default.nix new file mode 100644 index 00000000..32c068f1 --- /dev/null +++ b/asus/zenbook/um6702/default.nix @@ -0,0 +1,36 @@ +{ lib, ... }: +let + inherit (lib) mkDefault; +in +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + + # iGPU + ../../../common/gpu/amd + + # dGPU + ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ampere + + ../../../common/pc/laptop + ../../../common/pc/ssd + + ../../battery.nix + ]; + + hardware.nvidia = { + dynamicBoost.enable = mkDefault true; + + powerManagement = { + enable = mkDefault true; + finegrained = mkDefault true; + }; + + prime = { + amdgpuBusId = "PCI:1:0:0"; + nvidiaBusId = "PCI:101:0:0"; + }; + }; +} diff --git a/flake.nix b/flake.nix index 407dea02..32fb1e0f 100644 --- a/flake.nix +++ b/flake.nix @@ -50,6 +50,7 @@ asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-rog-strix-x570e = import ./asus/rog-strix/x570e; + asus-zenbook-um6702 = import ./asus/zenbook/um6702; asus-zenbook-ux371 = import ./asus/zenbook/ux371; asus-zenbook-ux535 = import ./asus/zenbook/ux535; asus-zenbook-ux481-intelgpu = import ./asus/zenbook/ux481/intelgpu; From c52ea609012ae1b3259a5ece08d192bf38dc167e Mon Sep 17 00:00:00 2001 From: Karun Sandhu <129101708+MrSom3body@users.noreply.github.com> Date: Thu, 9 Oct 2025 22:17:40 +0200 Subject: [PATCH 1434/1476] asus/battery: fix battery threshold not being set after hibernation --- asus/battery.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/asus/battery.nix b/asus/battery.nix index 4639baa4..8492d878 100644 --- a/asus/battery.nix +++ b/asus/battery.nix @@ -31,10 +31,14 @@ in wantedBy = [ "local-fs.target" "suspend.target" + "suspend-then-hibernate.target" + "hibernate.target" ]; after = [ "local-fs.target" "suspend.target" + "suspend-then-hibernate.target" + "hibernate.target" ]; description = "Set the battery charge threshold to ${toString cfg.chargeUpto}%"; startLimitBurst = 5; From eb9e8e10ac733256bac2dc2af89a3075ce6111aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 8 Oct 2025 15:42:59 +0200 Subject: [PATCH 1435/1476] raspberrypi/4: fix many option rendering --- raspberry-pi/4/audio.nix | 4 +--- raspberry-pi/4/backlight.nix | 4 +--- raspberry-pi/4/bluetooth.nix | 4 +--- raspberry-pi/4/digi-amp-plus.nix | 6 ++---- raspberry-pi/4/dwc2.nix | 33 ++++++++++++++++++-------------- raspberry-pi/4/i2c.nix | 24 +++++++++++++---------- raspberry-pi/4/pkgs-overlays.nix | 10 ++++++---- raspberry-pi/4/poe-hat.nix | 4 +--- raspberry-pi/4/poe-plus-hat.nix | 4 +--- raspberry-pi/4/pwm0.nix | 4 +--- raspberry-pi/4/tc358743.nix | 24 +++++++++++++---------- raspberry-pi/4/touch-ft5406.nix | 18 +++++++++-------- raspberry-pi/4/tv-hat.nix | 6 ++---- raspberry-pi/4/xhci.nix | 4 +--- 14 files changed, 74 insertions(+), 75 deletions(-) diff --git a/raspberry-pi/4/audio.nix b/raspberry-pi/4/audio.nix index 08c0b921..7241b2cf 100644 --- a/raspberry-pi/4/audio.nix +++ b/raspberry-pi/4/audio.nix @@ -11,9 +11,7 @@ in { options.hardware = { raspberry-pi."4".audio = { - enable = lib.mkEnableOption '' - configuration for audio - ''; + enable = lib.mkEnableOption "configuration for audio"; }; }; diff --git a/raspberry-pi/4/backlight.nix b/raspberry-pi/4/backlight.nix index 31c0e906..e0ce8d56 100644 --- a/raspberry-pi/4/backlight.nix +++ b/raspberry-pi/4/backlight.nix @@ -6,9 +6,7 @@ in { options.hardware = { raspberry-pi."4".backlight = { - enable = lib.mkEnableOption '' - Enable the backlight support for the Raspberry Pi official Touch Display - ''; + enable = lib.mkEnableOption "the backlight support for the Raspberry Pi official Touch Display"; }; }; diff --git a/raspberry-pi/4/bluetooth.nix b/raspberry-pi/4/bluetooth.nix index 78619bcd..6a0f6323 100644 --- a/raspberry-pi/4/bluetooth.nix +++ b/raspberry-pi/4/bluetooth.nix @@ -6,9 +6,7 @@ in { options.hardware = { raspberry-pi."4".bluetooth = { - enable = lib.mkEnableOption '' - configuration for bluetooth - ''; + enable = lib.mkEnableOption "configuration for bluetooth"; }; }; diff --git a/raspberry-pi/4/digi-amp-plus.nix b/raspberry-pi/4/digi-amp-plus.nix index 3c19f3a8..f9a3a5b3 100644 --- a/raspberry-pi/4/digi-amp-plus.nix +++ b/raspberry-pi/4/digi-amp-plus.nix @@ -6,15 +6,13 @@ in { options.hardware = { raspberry-pi."4".digi-amp-plus = { - enable = lib.mkEnableOption '' - support for the IQaudIO DigiAMP+ Hat. - ''; + enable = lib.mkEnableOption "support for the IQaudIO DigiAMP+ Hat"; unmuteAmp = lib.mkOption { type = lib.types.bool; default = false; description = '' - "one-shot" unmute when kernel module first loads. + Whether to "one-shot" unmute when kernel module first loads. ''; }; diff --git a/raspberry-pi/4/dwc2.nix b/raspberry-pi/4/dwc2.nix index 874efa24..5d49f9a1 100644 --- a/raspberry-pi/4/dwc2.nix +++ b/raspberry-pi/4/dwc2.nix @@ -6,24 +6,29 @@ in { options.hardware = { raspberry-pi."4".dwc2 = { - enable = lib.mkEnableOption '' - Enable the UDC controller to support USB OTG gadget functions. + enable = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = '' + Enable the UDC controller to support USB OTG gadget functions. - In order to verify that this works, connect the Raspberry Pi with - another computer via the USB C cable, and then do one of: + In order to verify that this works, connect the Raspberry Pi with + another computer via the USB C cable, and then do one of: - - `modprobe g_serial` - - `modprobe g_mass_storage file=/path/to/some/iso-file.iso` + - `modprobe g_serial` + - `modprobe g_mass_storage file=/path/to/some/iso-file.iso` - On the Raspberry Pi, `dmesg` should then show success-indicating output - that is related to the dwc2 and g_serial/g_mass_storage modules. - On the other computer, a serial/mass-storage device should pop up in - the system logs. + On the Raspberry Pi, `dmesg` should then show success-indicating output + that is related to the dwc2 and g_serial/g_mass_storage modules. + On the other computer, a serial/mass-storage device should pop up in + the system logs. - For more information about what gadget functions exist along with handy - guides on how to test them, please refer to: - https://www.kernel.org/doc/Documentation/usb/gadget-testing.txt - ''; + For more information about what gadget functions exist along with handy + guides on how to test them, please refer to: + https://www.kernel.org/doc/Documentation/usb/gadget-testing.txt + ''; + }; dr_mode = lib.mkOption { type = lib.types.enum [ "host" diff --git a/raspberry-pi/4/i2c.nix b/raspberry-pi/4/i2c.nix index 5939a78a..a03eccd0 100644 --- a/raspberry-pi/4/i2c.nix +++ b/raspberry-pi/4/i2c.nix @@ -31,28 +31,32 @@ in { options.hardware.raspberry-pi."4" = { i2c0 = { - enable = lib.mkEnableOption '' - Turn on the VideoCore I2C bus (maps to /dev/i2c-22) and enable access from the i2c group. - After a reboot, i2c-tools (e.g. i2cdetect -F 22) should work for root or any user in i2c. - ''; + enable = lib.mkEnableOption "" // { + description = '' + Turn on the VideoCore I2C bus (maps to /dev/i2c-22) and enable access from the i2c group. + After a reboot, i2c-tools (e.g. i2cdetect -F 22) should work for root or any user in i2c. + ''; + }; frequency = lib.mkOption { type = lib.types.nullOr lib.types.int; default = null; description = '' - interface clock-frequency + The interface clock-frequency to configure. ''; }; }; i2c1 = { - enable = lib.mkEnableOption '' - Turn on the ARM I2C bus (/dev/i2c-1 on GPIO pins 3 and 5) and enable access from the i2c group. - After a reboot, i2c-tools (e.g. i2cdetect -F 1) should work for root or any user in i2c. - ''; + enable = lib.mkEnableOption "" // { + description = '' + Turn on the ARM I2C bus (/dev/i2c-1 on GPIO pins 3 and 5) and enable access from the i2c group. + After a reboot, i2c-tools (e.g. i2cdetect -F 1) should work for root or any user in i2c. + ''; + }; frequency = lib.mkOption { type = lib.types.nullOr lib.types.int; default = null; description = '' - interface clock-frequency + The interface clock-frequency to configure. ''; }; }; diff --git a/raspberry-pi/4/pkgs-overlays.nix b/raspberry-pi/4/pkgs-overlays.nix index 95109c21..f36577a5 100644 --- a/raspberry-pi/4/pkgs-overlays.nix +++ b/raspberry-pi/4/pkgs-overlays.nix @@ -10,10 +10,12 @@ in { options.hardware = { raspberry-pi."4".apply-overlays-dtmerge = { - enable = lib.mkEnableOption '' - replace deviceTree.applyOverlays implementation to use dtmerge from libraspberrypi. - this can resolve issues with applying dtbs for the pi. - ''; + enable = lib.mkEnableOption "" // { + description = '' + Whether replace deviceTree.applyOverlays implementation to use dtmerge from libraspberrypi. + This can resolve issues with applying dtbs for the pi. + ''; + }; }; }; diff --git a/raspberry-pi/4/poe-hat.nix b/raspberry-pi/4/poe-hat.nix index 0eb8d847..3ec29db3 100644 --- a/raspberry-pi/4/poe-hat.nix +++ b/raspberry-pi/4/poe-hat.nix @@ -6,9 +6,7 @@ in { options.hardware = { raspberry-pi."4".poe-hat = { - enable = lib.mkEnableOption '' - support for the Raspberry Pi POE Hat. - ''; + enable = lib.mkEnableOption "support for the Raspberry Pi POE Hat"; }; }; diff --git a/raspberry-pi/4/poe-plus-hat.nix b/raspberry-pi/4/poe-plus-hat.nix index 985971f3..b6d1fa3f 100644 --- a/raspberry-pi/4/poe-plus-hat.nix +++ b/raspberry-pi/4/poe-plus-hat.nix @@ -6,9 +6,7 @@ in { options.hardware = { raspberry-pi."4".poe-plus-hat = { - enable = lib.mkEnableOption '' - support for the Raspberry Pi PoE+ HAT. - ''; + enable = lib.mkEnableOption "support for the Raspberry Pi PoE+ HAT"; }; }; diff --git a/raspberry-pi/4/pwm0.nix b/raspberry-pi/4/pwm0.nix index 665f81be..da93a767 100644 --- a/raspberry-pi/4/pwm0.nix +++ b/raspberry-pi/4/pwm0.nix @@ -6,9 +6,7 @@ in { options.hardware = { raspberry-pi."4".pwm0 = { - enable = lib.mkEnableOption '' - Enable support for the hardware pwm0 channel on GPIO_18 - ''; + enable = lib.mkEnableOption "support for the hardware pwm0 channel on GPIO_18"; }; }; diff --git a/raspberry-pi/4/tc358743.nix b/raspberry-pi/4/tc358743.nix index 6dc9f76d..02015e73 100644 --- a/raspberry-pi/4/tc358743.nix +++ b/raspberry-pi/4/tc358743.nix @@ -6,13 +6,15 @@ in { options.hardware = { raspberry-pi."4".tc358743 = { - enable = lib.mkEnableOption '' - Enable support for the Toshiba TC358743 HDMI-to-CSI-2 converter. + enable = lib.mkEnableOption "" // { + description = '' + Enable support for the Toshiba TC358743 HDMI-to-CSI-2 converter. - This can be tested with a plugged in converter device and for example - running ustreamer (which starts webservice providing a camera stream): - ''${pkgs.ustreamer}/bin/ustreamer --persistent --dv-timings - ''; + This can be tested with a plugged in converter device and for example + running ustreamer (which starts webservice providing a camera stream): + ''${pkgs.ustreamer}/bin/ustreamer --persistent --dv-timings + ''; + }; lanes = lib.mkOption { type = lib.types.enum [ 2 @@ -23,11 +25,13 @@ in Number of CSI lanes available ''; }; - media-controller = lib.mkEnableOption '' - Enable support for the Media Controller API. + media-controller = lib.mkEnableOption "" // { + description = '' + Enable support for the Media Controller API. - See https://forums.raspberrypi.com/viewtopic.php?t=322076 for details - ''; + See https://forums.raspberrypi.com/viewtopic.php?t=322076 for details + ''; + }; }; }; diff --git a/raspberry-pi/4/touch-ft5406.nix b/raspberry-pi/4/touch-ft5406.nix index 5cc0a70f..3c8acdb2 100644 --- a/raspberry-pi/4/touch-ft5406.nix +++ b/raspberry-pi/4/touch-ft5406.nix @@ -6,16 +6,18 @@ in { options.hardware = { raspberry-pi."4".touch-ft5406 = { - enable = lib.mkEnableOption '' - Enable the touch controller of the official Raspberry Pi touch diplay. + enable = lib.mkEnableOption "" // { + description = '' + Enable the touch controller of the official Raspberry Pi touch diplay. - The overlay is taken from the official Raspberry Pi Linux fork, and - the `compatible` field is updated to match the target device tree. - https://github.com/raspberrypi/linux/blob/14b35093ca68bf2c81bbc90aace5007142b40b40/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts + The overlay is taken from the official Raspberry Pi Linux fork, and + the `compatible` field is updated to match the target device tree. + https://github.com/raspberrypi/linux/blob/14b35093ca68bf2c81bbc90aace5007142b40b40/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts - For more information about the touch display, please refer to: - https://www.raspberrypi.com/documentation/accessories/display.html - ''; + For more information about the touch display, please refer to: + https://www.raspberrypi.com/documentation/accessories/display.html + ''; + }; }; }; diff --git a/raspberry-pi/4/tv-hat.nix b/raspberry-pi/4/tv-hat.nix index 263d6fcf..5ff9ca93 100644 --- a/raspberry-pi/4/tv-hat.nix +++ b/raspberry-pi/4/tv-hat.nix @@ -6,9 +6,7 @@ in { options.hardware = { raspberry-pi."4".tv-hat = { - enable = lib.mkEnableOption '' - support for the Raspberry Pi TV Hat. - ''; + enable = lib.mkEnableOption "support for the Raspberry Pi TV Hat"; }; }; config = lib.mkIf cfg.enable { @@ -22,7 +20,7 @@ in dtsText = " /dts-v1/; /plugin/; - + /{ compatible = \"brcm,bcm2711\"; fragment@0 { diff --git a/raspberry-pi/4/xhci.nix b/raspberry-pi/4/xhci.nix index eb1d2ada..56503df3 100644 --- a/raspberry-pi/4/xhci.nix +++ b/raspberry-pi/4/xhci.nix @@ -9,9 +9,7 @@ in { options.hardware = { raspberry-pi."4".xhci = { - enable = lib.mkEnableOption '' - Enable builtin XHCI controller for USB with otg_mode=1 in config.txt - ''; + enable = lib.mkEnableOption "builtin XHCI controller for USB with otg_mode=1 in config.txt"; }; }; From c4fe135227fa4b00f5cf42d917e96191dd490249 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Mon, 6 Oct 2025 22:34:19 +0200 Subject: [PATCH 1436/1476] CODEOWNERS: remove trueNAHO from tuxedo-pulse-14-gen3 Remove trueNAHO from tuxedo-pulse-14-gen3 because I never owned this hardware. Fixes: caabc425565b ("feat: Update CODEOWNERS for Tuxedo Pulse Laptops") --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 367aaafa..3cfbdf4b 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -11,4 +11,4 @@ purism/librem/13v3 @yegortimoshenko system76/darp6 @khumba framework @emiller88 tuxedo/pulse/15/gen2 @trueNAHO -tuxedo/pulse/14/gen3 @gabyx @britter @trueNAHO +tuxedo/pulse/14/gen3 @gabyx @britter From b27995044c4387a889f22dfe26cc3ac5262f4a44 Mon Sep 17 00:00:00 2001 From: rti Date: Thu, 23 Oct 2025 15:18:06 +0000 Subject: [PATCH 1437/1476] fix: enable enableRedistributableFirmware on framework 13 intel core --- framework/13-inch/intel-core-ultra-series1/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/framework/13-inch/intel-core-ultra-series1/default.nix b/framework/13-inch/intel-core-ultra-series1/default.nix index 7553e687..29d94e07 100644 --- a/framework/13-inch/intel-core-ultra-series1/default.nix +++ b/framework/13-inch/intel-core-ultra-series1/default.nix @@ -20,6 +20,9 @@ lib.mkDefault pkgs.linuxPackages_latest ); + # NPU, GPU + hardware.enableRedistributableFirmware = lib.mkDefault true; + # Intel NPU Driver # https://discourse.nixos.org/t/new-installation-on-asus-zenbook-ux5406-intel-vpu-firmware-error-2/58732/2 hardware.firmware = lib.optionals (config.hardware.enableRedistributableFirmware) [ @@ -40,10 +43,6 @@ ) ]; - warnings = lib.mkIf (!config.hardware.enableRedistributableFirmware) [ - ''For Intel NPU support, set the option: hardware.enableRedistributableFirmware = true;'' - ]; - hardware.framework.laptop13.audioEnhancement.rawDeviceName = lib.mkDefault "alsa_output.pci-0000_00_1f.3.analog-stereo"; } From 7667e196787c527e520c9bc7ca985f7f8caa5968 Mon Sep 17 00:00:00 2001 From: Michael Vessia Date: Thu, 23 Oct 2025 20:20:44 -0400 Subject: [PATCH 1438/1476] Fix Framework 12th Gen Intel Core link path --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cb513494..bd4fd3c9 100644 --- a/README.md +++ b/README.md @@ -199,7 +199,7 @@ See code for all available configurations. | [Dell XPS 17 9700, nvidia](dell/xps/17-9700/nvidia) | `` | `dell-xps-17-9700-nvidia` | | [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | `dell-xps-17-9710-intel` | | [Framework 11th Gen Intel Core](framework/13-inch/11th-gen-intel) | `` | `framework-11th-gen-intel` | -| [Framework 12th Gen Intel Core](framework/12-inch/12th-gen-intel) | `` | `framework-12th-gen-intel` | +| [Framework 12th Gen Intel Core](framework/13-inch/12th-gen-intel) | `` | `framework-12th-gen-intel` | | [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `` | `framework-13th-gen-intel` | | [Framework Intel Core Ultra Series 1](framework/13-inch/intel-core-ultra-series1) | `` | `framework-intel-core-ultra-series1` | | [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | `framework-13-7040-amd` | From 34b7229b9588772e6d92cc875ba4e5fefa6e4133 Mon Sep 17 00:00:00 2001 From: Govind Singh Date: Tue, 21 Oct 2025 09:28:17 +0400 Subject: [PATCH 1439/1476] Add support for i.MX93-EVK platform The i.MX93 EVK provides a platform for comprehensive evaluation of the i.MX93 application processors. This change adds support in NixOS hardware to provide a template for customized i.MX93-based platforms. Signed-off-by: Govind Singh --- flake.nix | 1 + nxp/README.md | 7 +- nxp/imx93-evk/bsp/imx93-atf.nix | 50 ++++++++++++++ nxp/imx93-evk/bsp/imx93-boot.nix | 85 ++++++++++++++++++++++++ nxp/imx93-evk/bsp/imx93-firmware.nix | 47 +++++++++++++ nxp/imx93-evk/bsp/imx93-linux.nix | 62 +++++++++++++++++ nxp/imx93-evk/bsp/imx93-optee-os.nix | 75 +++++++++++++++++++++ nxp/imx93-evk/bsp/imx93-uboot.nix | 99 ++++++++++++++++++++++++++++ nxp/imx93-evk/default.nix | 19 ++++++ nxp/imx93-evk/modules.nix | 17 +++++ nxp/imx93-evk/overlay.nix | 3 + 11 files changed, 462 insertions(+), 3 deletions(-) create mode 100644 nxp/imx93-evk/bsp/imx93-atf.nix create mode 100644 nxp/imx93-evk/bsp/imx93-boot.nix create mode 100644 nxp/imx93-evk/bsp/imx93-firmware.nix create mode 100644 nxp/imx93-evk/bsp/imx93-linux.nix create mode 100644 nxp/imx93-evk/bsp/imx93-optee-os.nix create mode 100644 nxp/imx93-evk/bsp/imx93-uboot.nix create mode 100644 nxp/imx93-evk/default.nix create mode 100644 nxp/imx93-evk/modules.nix create mode 100644 nxp/imx93-evk/overlay.nix diff --git a/flake.nix b/flake.nix index 32fb1e0f..bc3a709e 100644 --- a/flake.nix +++ b/flake.nix @@ -331,6 +331,7 @@ nxp-imx8mp-evk = import ./nxp/imx8mp-evk; nxp-imx8mq-evk = import ./nxp/imx8mq-evk; nxp-imx8qm-mek = import ./nxp/imx8qm-mek; + nxp-imx93-evk = import ./nxp/imx93-evk; hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; hardkernel-odroid-h3 = import ./hardkernel/odroid-h3; hardkernel-odroid-h4 = import ./hardkernel/odroid-h4; diff --git a/nxp/README.md b/nxp/README.md index f8ccefa0..cf1f5d2a 100644 --- a/nxp/README.md +++ b/nxp/README.md @@ -21,17 +21,18 @@ Code snippet example that enables imx8qm configuration: } ``` -### 2.2 For imx8mq-evk/imx8mp-evk +### 2.2 For imx8mq-evk/imx8mp-evk/imx93-evk This NXP overlay is used for generating sdimage. -Current configuration uses uboot as a bootloader. It provides an options to use optee-os which is currently disabled. It can be enabled using `enable-tee` boolean argument avalable in `imx8m-boot.nix`, which is `false` by default. +Current configuration uses uboot as a bootloader. It provides an options to use optee-os which is currently disabled. It can be enabled using `enable-tee` boolean argument avalable in `imx8m-boot.nix`, which is `false` by default in imx8m platform. -Code snippet example that enables 'imx8mp-evk/emx8mq-evk' configuration: +Code snippet example that enables 'imx8mp-evk/imx8mq-evk/imx93-evk' configuration: ``` { nixos-hardware, }: { system = "aarch64-linux"; modules = [ nixos-hardware.nixosModules.imx8mp-evk #For imx8mp-evk + #nixos-hardware.nixosModules.imx93-evk #For imx93-evk #nixos-hardware.nixosModules.imx8mq-evk #For imx8mq-evk ]; } diff --git a/nxp/imx93-evk/bsp/imx93-atf.nix b/nxp/imx93-evk/bsp/imx93-atf.nix new file mode 100644 index 00000000..4180dde5 --- /dev/null +++ b/nxp/imx93-evk/bsp/imx93-atf.nix @@ -0,0 +1,50 @@ +{ lib, fetchgit, stdenv, buildPackages, pkgsCross, openssl }: + +let + target-board = "imx93"; +in stdenv.mkDerivation rec { + pname = "imx93-atf"; + version = "2.10.0"; + platform = target-board; + enableParallelBuilding = true; + + src = fetchgit { + url = "https://github.com/nxp-imx/imx-atf.git"; + rev = "28affcae957cb8194917b5246276630f9e6343e1"; + sha256 = "sha256-a8F+Lf8pwML+tCwawS0N/mrSXWPmFhlUeOg0MCRK3VE="; + }; + + # Compiler dependencies + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ pkgsCross.aarch64-embedded.stdenv.cc ]; + + buildInputs = [ openssl ]; + + makeFlags = [ + "HOSTCC=$(CC_FOR_BUILD)" + "CROSS_COMPILE=${pkgsCross.aarch64-embedded.stdenv.cc.targetPrefix}" + "PLAT=${platform}" + "SPD=opteed" + "bl31" + "LDFLAGS=-no-warn-rwx-segments" + ]; + + installPhase = '' + runHook preInstall + mkdir -p $out + cp build/${target-board}/release/bl31.bin $out + runHook postInstall + ''; + + hardeningDisable = [ "all" ]; + dontStrip = true; + + meta = with lib; { + homepage = "https://github.com/nxp-imx/imx-atf"; + description = "Reference implementation of secure world software for ARMv8-A"; + license = [ licenses.bsd3 ]; + maintainers = with maintainers; [ govindsi ]; + platforms = [ "aarch64-linux" ]; + }; +} + diff --git a/nxp/imx93-evk/bsp/imx93-boot.nix b/nxp/imx93-evk/bsp/imx93-boot.nix new file mode 100644 index 00000000..abc023e7 --- /dev/null +++ b/nxp/imx93-evk/bsp/imx93-boot.nix @@ -0,0 +1,85 @@ +{ + pkgs, +}: +with pkgs; +let + fw-ver = "202406"; + + imx93-atf = pkgs.callPackage ./imx93-atf.nix { }; + imx93-firmware = pkgs.callPackage ./imx93-firmware.nix { }; + imx93-uboot = pkgs.callPackage ./imx93-uboot.nix { }; + imx93-optee-os = pkgs.callPackage ./imx93-optee-os.nix { }; + src = pkgs.fetchgit { + url = "https://github.com/nxp-imx/imx-mkimage.git"; + #tag: lf-6.12.3 + rev = "4622115cbc037f79039c4522faeced4aabea986b"; + sha256 = "sha256-2gz0GxlB3jwy8PC6+cP3+MpyUzqE1vDTw8nuxK6vo3g="; + }; + shortRev = builtins.substring 0 8 src.rev; +in +{ + imx93-boot = pkgs.stdenv.mkDerivation rec { + inherit src; + name = "imx93-mkimage"; + version = "lf-6.12.3"; + + postPatch = '' + substituteInPlace Makefile \ + --replace 'git rev-parse --short=8 HEAD' 'echo ${shortRev}' + substituteInPlace Makefile \ + --replace 'CC = gcc' 'CC = clang' + substituteInPlace iMX93/soc.mak \ + --replace 'xxd' "${pkgs.vim.xxd}/bin/xxd" + substituteInPlace scripts/fspi_fcb_gen.sh \ + --replace 'xxd' "${pkgs.vim.xxd}/bin/xxd" + substituteInPlace scripts/fspi_packer.sh \ + --replace 'xxd' "${pkgs.vim.xxd}/bin/xxd" + patchShebangs scripts + ''; + + nativeBuildInputs = [ + clang + git + dtc + ]; + + buildInputs = [ + git + glibc.static + zlib + zlib.static + ]; + + buildPhase = '' + runHook preBuild + + make bin + # mkimage is common across imx8 and imx9 + make SOC=iMX8M mkimage_imx8 + + if [ -f ${imx93-uboot}/u-boot.bin ]; then + install -m 0644 ${imx93-uboot}/u-boot.bin ./iMX93/u-boot.bin + else + cat ${imx93-uboot}/u-boot-nodtb.bin ${imx93-uboot}/imx93-11x11-evk.dtb > ./iMX93/u-boot.bin + fi + install -m 0644 ${imx93-uboot}/u-boot-spl.bin ./iMX93/u-boot-spl.bin + install -m 0644 ${imx93-uboot}/u-boot-nodtb.bin ./iMX93/u-boot-nodtb.bin + install -m 0644 ${imx93-uboot}/imx93-11x11-evk.dtb ./iMX93/imx93-11x11-evk.dtb + install -m 0644 ${imx93-optee-os}/tee.bin ./iMX93/tee.bin + install -m 0644 ${imx93-atf}/bl31.bin ./iMX93/bl31.bin + install -m 0644 ${imx93-firmware}/ddr/lpddr4* ./iMX93/ + install -m 0644 ${imx93-firmware}/ahab/mx93a1-ahab-container.img ./iMX93/ + + make SOC=iMX9 flash_singleboot + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/image + install -m 0644 ./iMX93/flash.bin $out/image + runHook postInstall + ''; + }; +} diff --git a/nxp/imx93-evk/bsp/imx93-firmware.nix b/nxp/imx93-evk/bsp/imx93-firmware.nix new file mode 100644 index 00000000..b48e8a36 --- /dev/null +++ b/nxp/imx93-evk/bsp/imx93-firmware.nix @@ -0,0 +1,47 @@ +{ pkgs, ... }: + +with pkgs; +stdenv.mkDerivation rec { + pname = "nxp-firmware"; + version = "nxp-firmware-8.21-0.11"; + + # Fetch the two firmware installers from NXP + ddrFirmware = fetchurl { + url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.21.bin"; + sha256 = "sha256-w0R/D4E0FczqncLvEggMs6yLvAxnOSp0/H1ZIF61pnI="; + }; + + ahabFirmware = fetchurl { + url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-sentinel-0.11.bin"; + sha256 = "sha256-JpSAQXqK6apMxBAauUcof8M0VakxAh29xNm621ISvOs="; + }; + + nativeBuildInputs = [ coreutils bash ]; + + dontUnpack = true; + dontStrip = true; + + installPhase = '' + mkdir -p $out + + echo "Extracting DDR firmware..." + cp ${ddrFirmware} ./firmware-imx-8.21.bin + chmod +x firmware-imx-8.21.bin + ./firmware-imx-8.21.bin --auto-accept + + echo "Extracting AHAB firmware..." + cp ${ahabFirmware} ./firmware-sentinel-0.11.bin + chmod +x firmware-sentinel-0.11.bin + ./firmware-sentinel-0.11.bin --auto-accept + + echo "Copying DDR .bin files..." + mkdir -p $out/ddr + cp firmware-imx-8.21/firmware/ddr/synopsys/lpddr4*.bin $out/ddr/ + + echo "Copying AHAB container image..." + mkdir -p $out/ahab + cp firmware-sentinel-0.11/mx93a1-ahab-container.img $out/ahab/ + + ''; +} + diff --git a/nxp/imx93-evk/bsp/imx93-linux.nix b/nxp/imx93-evk/bsp/imx93-linux.nix new file mode 100644 index 00000000..1eabbf4e --- /dev/null +++ b/nxp/imx93-evk/bsp/imx93-linux.nix @@ -0,0 +1,62 @@ +{ lib, pkgs, ... }@args: +with pkgs; +buildLinux ( + args + // rec { + version = "6.12.3"; + name = "imx93-linux"; + + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = version; + + defconfig = "imx_v8_defconfig"; + + # https://github.com/NixOS/nixpkgs/pull/366004 + # introduced a breaking change that if a module is declared but it is not being used it will faill. + ignoreConfigErrors = true; + + kernelPatches = [ + ]; + + autoModules = false; + + extraConfig = '' + CRYPTO_TLS m + TLS 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 + ''; + + src = fetchFromGitHub { + owner = "nxp-imx"; + repo = "linux-imx"; + # tag: lf-6.12.3 + rev = "37d02f4dcbbe6677dc9f5fc17f386c05d6a7bd7a"; + sha256 = "sha256-1oJMbHR8Ho0zNritEJ+TMOAyYHCW0vwhPkDfLctrZa8="; + }; + meta = with lib; { + homepage = "https://github.com/nxp-imx/linux-imx"; + license = [ licenses.gpl2Only ]; + maintainers = with maintainers; [ govindsi ]; + platforms = [ "aarch64-linux" ]; + }; + } + // (args.argsOverride or { }) +) diff --git a/nxp/imx93-evk/bsp/imx93-optee-os.nix b/nxp/imx93-evk/bsp/imx93-optee-os.nix new file mode 100644 index 00000000..a7d82eb3 --- /dev/null +++ b/nxp/imx93-evk/bsp/imx93-optee-os.nix @@ -0,0 +1,75 @@ +{ + lib, + pkgs +}: +let + inherit (pkgs.buildPackages) python3; + toolchain = pkgs.gccStdenv.cc; + binutils = pkgs.gccStdenv.cc.bintools.bintools_bin; + cpp = pkgs.gcc; +in +pkgs.stdenv.mkDerivation rec { + pname = "imx93-optee-os"; + version = "lf-6.12.3_1.0.0"; + + nativeBuildInputs = [ + python3 + ]; + + enableParallelBuilding = true; + + propagatedBuildInputs = with python3.pkgs; [ + pycryptodomex + pyelftools + cryptography + ]; + + src = pkgs.fetchgit { + url = "https://github.com/nxp-imx/imx-optee-os.git"; + rev = "8dd180b6d149c1e1314b5869697179f665bd9ca3"; + sha256 = "sha256-PoolRscdyeGevrOa5YymPTQ36edVvReMM5WshRTz+uk="; + }; + meta = with lib; { + homepage = "https://github.com/nxp-imx/imx-optee-os"; + license = [ licenses.bsd2 ]; + maintainers = with maintainers; [ govindsi ]; + platforms = [ "aarch64-linux" ]; + }; + + postPatch = '' + substituteInPlace scripts/arm32_sysreg.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace scripts/gen_tee_bin.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace scripts/pem_to_pub_c.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ + --replace '/bin/bash' '${pkgs.bash}/bin/bash' + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp + ''; + + makeFlags = [ + "PLATFORM=imx-mx93evk" + "CFG_ARM64_core=y" + "CFG_TEE_TA_LOG_LEVEL=0" + "CFG_TEE_CORE_LOG_LEVEL=0" + "CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}" + "CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}" + ]; + + installPhase = '' + mkdir -p $out + cp ./out/arm-plat-imx/core/tee-raw.bin $out/tee.bin + ''; +} diff --git a/nxp/imx93-evk/bsp/imx93-uboot.nix b/nxp/imx93-evk/bsp/imx93-uboot.nix new file mode 100644 index 00000000..f0bb6265 --- /dev/null +++ b/nxp/imx93-evk/bsp/imx93-uboot.nix @@ -0,0 +1,99 @@ +{ + stdenv, + lib, + bison, + dtc, + fetchgit, + flex, + gnutls, + libuuid, + ncurses, + openssl, + which, + perl, + buildPackages, + efitools, +}: +let + ubsrc = fetchgit { + url = "https://github.com/nxp-imx/uboot-imx.git"; + #lf_v2024.04 + rev = "e3219a5a73445219df605d1492687918d488055c"; + sha256 = "sha256-6pXwgNzq4/XUUEmJ6sGC5pII4J5uMvlDPE9QJxjJJbQ="; + }; + meta = with lib; { + homepage = "https://github.com/nxp-imx/uboot-imx"; + license = [ licenses.gpl2Only ]; + maintainers = with maintainers; [ govindsi ]; + platforms = [ "aarch64-linux" ]; + }; +in +stdenv.mkDerivation { + pname = "imx93-uboot"; + version = "2024.04"; + src = ubsrc; + + postPatch = '' + patchShebangs tools + patchShebangs scripts + ''; + + nativeBuildInputs = [ + bison + flex + openssl + which + ncurses + libuuid + gnutls + openssl + perl + efitools + ]; + + depsBuildBuild = [ buildPackages.stdenv.cc ]; + hardeningDisable = [ "all" ]; + enableParallelBuilding = true; + + makeFlags = [ + "DTC=${lib.getExe buildPackages.dtc}" + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" + ]; + + extraConfig = '' + CONFIG_USE_BOOTCOMMAND=y + CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x85000000; setenv fdt_addr_r 0x84000000; run distro_bootcmd; " + CONFIG_CMD_BOOTEFI_SELFTEST=y + CONFIG_CMD_BOOTEFI=y + CONFIG_EFI_LOADER=y + CONFIG_BLK=y + CONFIG_PARTITIONS=y + CONFIG_DM_DEVICE_REMOVE=n + CONFIG_CMD_CACHE=y + ''; + + passAsFile = [ "extraConfig" ]; + + configurePhase = '' + runHook preConfigure + + make imx93_11x11_evk_defconfig + cat $extraConfigPath >> .config + + runHook postConfigure + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp ./u-boot-nodtb.bin $out + cp ./spl/u-boot-spl.bin $out + cp ./arch/arm/dts/imx93-11x11-evk.dtb $out + cp .config $out + + runHook postInstall + ''; + + dontStrip = true; +} diff --git a/nxp/imx93-evk/default.nix b/nxp/imx93-evk/default.nix new file mode 100644 index 00000000..892c6a64 --- /dev/null +++ b/nxp/imx93-evk/default.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: +{ + nixpkgs.overlays = [ + (import ./overlay.nix) + ]; + + imports = [ + ./modules.nix + ]; + + boot.loader.grub.extraFiles = { + "imx93-11x11-evk.dtb" = "${pkgs.callPackage ./bsp/imx93-linux.nix { }}/dtbs/freescale/imx93-11x11-evk.dtb"; + }; + + hardware.deviceTree = { + filter = "imx93-*.dtb"; + name = "imx93-11x11-evk.dtb"; + }; +} diff --git a/nxp/imx93-evk/modules.nix b/nxp/imx93-evk/modules.nix new file mode 100644 index 00000000..b8939684 --- /dev/null +++ b/nxp/imx93-evk/modules.nix @@ -0,0 +1,17 @@ +{ + pkgs, + lib, + ... +}: +{ + nixpkgs.hostPlatform = "aarch64-linux"; + + boot = { + kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/imx93-linux.nix { }); + initrd.includeDefaultModules = lib.mkForce false; + }; + + disabledModules = [ "profiles/all-hardware.nix" ]; + + hardware.deviceTree.enable = true; +} diff --git a/nxp/imx93-evk/overlay.nix b/nxp/imx93-evk/overlay.nix new file mode 100644 index 00000000..420e974a --- /dev/null +++ b/nxp/imx93-evk/overlay.nix @@ -0,0 +1,3 @@ +final: _prev: { + inherit (final.callPackage ./bsp/imx93-boot.nix { pkgs = final; }) imx93-boot; +} From 8b405e9c6ddab8bbc7c6dcae7d20415bd8f5ad76 Mon Sep 17 00:00:00 2001 From: Govind Singh Date: Tue, 21 Oct 2025 16:00:55 +0400 Subject: [PATCH 1440/1476] chore(fmt): apply nix formatting Signed-off-by: Govind Singh --- nxp/imx93-evk/bsp/imx93-atf.nix | 13 ++++++++++--- nxp/imx93-evk/bsp/imx93-boot.nix | 1 - nxp/imx93-evk/bsp/imx93-firmware.nix | 7 ++++--- nxp/imx93-evk/bsp/imx93-linux.nix | 14 +++++++------- nxp/imx93-evk/bsp/imx93-optee-os.nix | 6 +++--- nxp/imx93-evk/bsp/imx93-uboot.nix | 6 ------ nxp/imx93-evk/default.nix | 4 +++- 7 files changed, 27 insertions(+), 24 deletions(-) diff --git a/nxp/imx93-evk/bsp/imx93-atf.nix b/nxp/imx93-evk/bsp/imx93-atf.nix index 4180dde5..634cca19 100644 --- a/nxp/imx93-evk/bsp/imx93-atf.nix +++ b/nxp/imx93-evk/bsp/imx93-atf.nix @@ -1,8 +1,16 @@ -{ lib, fetchgit, stdenv, buildPackages, pkgsCross, openssl }: +{ + lib, + fetchgit, + stdenv, + buildPackages, + pkgsCross, + openssl, +}: let target-board = "imx93"; -in stdenv.mkDerivation rec { +in +stdenv.mkDerivation rec { pname = "imx93-atf"; version = "2.10.0"; platform = target-board; @@ -47,4 +55,3 @@ in stdenv.mkDerivation rec { platforms = [ "aarch64-linux" ]; }; } - diff --git a/nxp/imx93-evk/bsp/imx93-boot.nix b/nxp/imx93-evk/bsp/imx93-boot.nix index abc023e7..c11f31d5 100644 --- a/nxp/imx93-evk/bsp/imx93-boot.nix +++ b/nxp/imx93-evk/bsp/imx93-boot.nix @@ -3,7 +3,6 @@ }: with pkgs; let - fw-ver = "202406"; imx93-atf = pkgs.callPackage ./imx93-atf.nix { }; imx93-firmware = pkgs.callPackage ./imx93-firmware.nix { }; diff --git a/nxp/imx93-evk/bsp/imx93-firmware.nix b/nxp/imx93-evk/bsp/imx93-firmware.nix index b48e8a36..1caa2392 100644 --- a/nxp/imx93-evk/bsp/imx93-firmware.nix +++ b/nxp/imx93-evk/bsp/imx93-firmware.nix @@ -5,7 +5,6 @@ stdenv.mkDerivation rec { pname = "nxp-firmware"; version = "nxp-firmware-8.21-0.11"; - # Fetch the two firmware installers from NXP ddrFirmware = fetchurl { url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.21.bin"; sha256 = "sha256-w0R/D4E0FczqncLvEggMs6yLvAxnOSp0/H1ZIF61pnI="; @@ -16,7 +15,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-JpSAQXqK6apMxBAauUcof8M0VakxAh29xNm621ISvOs="; }; - nativeBuildInputs = [ coreutils bash ]; + nativeBuildInputs = [ + coreutils + bash + ]; dontUnpack = true; dontStrip = true; @@ -44,4 +46,3 @@ stdenv.mkDerivation rec { ''; } - diff --git a/nxp/imx93-evk/bsp/imx93-linux.nix b/nxp/imx93-evk/bsp/imx93-linux.nix index 1eabbf4e..6e4cc21f 100644 --- a/nxp/imx93-evk/bsp/imx93-linux.nix +++ b/nxp/imx93-evk/bsp/imx93-linux.nix @@ -51,12 +51,12 @@ buildLinux ( rev = "37d02f4dcbbe6677dc9f5fc17f386c05d6a7bd7a"; sha256 = "sha256-1oJMbHR8Ho0zNritEJ+TMOAyYHCW0vwhPkDfLctrZa8="; }; - meta = with lib; { - homepage = "https://github.com/nxp-imx/linux-imx"; - license = [ licenses.gpl2Only ]; - maintainers = with maintainers; [ govindsi ]; - platforms = [ "aarch64-linux" ]; - }; - } + meta = with lib; { + homepage = "https://github.com/nxp-imx/linux-imx"; + license = [ licenses.gpl2Only ]; + maintainers = with maintainers; [ govindsi ]; + platforms = [ "aarch64-linux" ]; + }; + } // (args.argsOverride or { }) ) diff --git a/nxp/imx93-evk/bsp/imx93-optee-os.nix b/nxp/imx93-evk/bsp/imx93-optee-os.nix index a7d82eb3..75e3dde7 100644 --- a/nxp/imx93-evk/bsp/imx93-optee-os.nix +++ b/nxp/imx93-evk/bsp/imx93-optee-os.nix @@ -1,6 +1,6 @@ -{ +{ lib, - pkgs + pkgs, }: let inherit (pkgs.buildPackages) python3; @@ -57,7 +57,7 @@ pkgs.stdenv.mkDerivation rec { --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar substituteInPlace mk/gcc.mk \ --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp - ''; + ''; makeFlags = [ "PLATFORM=imx-mx93evk" diff --git a/nxp/imx93-evk/bsp/imx93-uboot.nix b/nxp/imx93-evk/bsp/imx93-uboot.nix index f0bb6265..ce918381 100644 --- a/nxp/imx93-evk/bsp/imx93-uboot.nix +++ b/nxp/imx93-evk/bsp/imx93-uboot.nix @@ -21,12 +21,6 @@ let rev = "e3219a5a73445219df605d1492687918d488055c"; sha256 = "sha256-6pXwgNzq4/XUUEmJ6sGC5pII4J5uMvlDPE9QJxjJJbQ="; }; - meta = with lib; { - homepage = "https://github.com/nxp-imx/uboot-imx"; - license = [ licenses.gpl2Only ]; - maintainers = with maintainers; [ govindsi ]; - platforms = [ "aarch64-linux" ]; - }; in stdenv.mkDerivation { pname = "imx93-uboot"; diff --git a/nxp/imx93-evk/default.nix b/nxp/imx93-evk/default.nix index 892c6a64..fd375aa4 100644 --- a/nxp/imx93-evk/default.nix +++ b/nxp/imx93-evk/default.nix @@ -9,7 +9,9 @@ ]; boot.loader.grub.extraFiles = { - "imx93-11x11-evk.dtb" = "${pkgs.callPackage ./bsp/imx93-linux.nix { }}/dtbs/freescale/imx93-11x11-evk.dtb"; + "imx93-11x11-evk.dtb" = "${ + pkgs.callPackage ./bsp/imx93-linux.nix { } + }/dtbs/freescale/imx93-11x11-evk.dtb"; }; hardware.deviceTree = { From 688ee555decae8a61301c572c0f69d93f50a94dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 29 Oct 2025 16:03:39 +0100 Subject: [PATCH 1441/1476] refactor(nxp): parameterize i.MX platform builders to reduce duplication This refactoring reduces code duplication across i.MX93, i.MX8MP, and i.MX8MQ platforms by extracting common build logic into parameterized shared builders. This makes it easier to maintain and add new i.MX platforms while ensuring consistency across all platforms. --- nxp/common/bsp/imx-linux-builder.nix | 56 +++++++++++++++ nxp/common/bsp/imx-optee-builder.nix | 89 +++++++++++++++++++++++ nxp/common/bsp/imx-uboot-builder.nix | 97 ++++++++++++++++++++++++++ nxp/common/lib/kernel-config.nix | 29 ++++++++ nxp/common/lib/uboot-config.nix | 33 +++++++++ nxp/imx8mp-evk/bsp/imx8mp-linux.nix | 68 +++++------------- nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix | 60 +--------------- nxp/imx8mp-evk/bsp/imx8mp-uboot.nix | 96 +++---------------------- nxp/imx8mq-evk/bsp/imx8mq-linux.nix | 68 +++++------------- nxp/imx8mq-evk/bsp/imx8mq-optee-os.nix | 58 +-------------- nxp/imx8mq-evk/bsp/imx8mq-uboot.nix | 96 +++---------------------- nxp/imx93-evk/bsp/imx93-linux.nix | 78 ++++++--------------- nxp/imx93-evk/bsp/imx93-optee-os.nix | 72 ++----------------- nxp/imx93-evk/bsp/imx93-uboot.nix | 96 +++---------------------- 14 files changed, 398 insertions(+), 598 deletions(-) create mode 100644 nxp/common/bsp/imx-linux-builder.nix create mode 100644 nxp/common/bsp/imx-optee-builder.nix create mode 100644 nxp/common/bsp/imx-uboot-builder.nix create mode 100644 nxp/common/lib/kernel-config.nix create mode 100644 nxp/common/lib/uboot-config.nix diff --git a/nxp/common/bsp/imx-linux-builder.nix b/nxp/common/bsp/imx-linux-builder.nix new file mode 100644 index 00000000..cc8fb934 --- /dev/null +++ b/nxp/common/bsp/imx-linux-builder.nix @@ -0,0 +1,56 @@ +# Parameterized Linux kernel builder for i.MX platforms +# This builder is used across i.MX93, i.MX8MP, i.MX8MQ and similar platforms +{ lib, pkgs, ... }@args: +let + inherit (pkgs) buildLinux; + + # Import common kernel configuration + kernelConfig = import ../lib/kernel-config.nix; +in +# Platform-specific parameters +{ + pname, + version, + src, + defconfig ? "imx_v8_defconfig", + # Optional parameters + extraConfig ? "", + kernelPatches ? [ ], + autoModules ? false, + ignoreConfigErrors ? true, + extraMeta ? { }, +}: +let + # Combine common i.MX kernel config with platform-specific config + finalExtraConfig = kernelConfig.imxCommonKernelConfig + extraConfig; +in +buildLinux ( + args + // rec { + inherit + version + defconfig + kernelPatches + autoModules + ignoreConfigErrors + ; + name = pname; + + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = version; + + extraConfig = finalExtraConfig; + + inherit src; + + meta = + with lib; + { + homepage = "https://github.com/nxp-imx/linux-imx"; + license = [ licenses.gpl2Only ]; + platforms = [ "aarch64-linux" ]; + } + // extraMeta; + } + // (args.argsOverride or { }) +) diff --git a/nxp/common/bsp/imx-optee-builder.nix b/nxp/common/bsp/imx-optee-builder.nix new file mode 100644 index 00000000..c76024b9 --- /dev/null +++ b/nxp/common/bsp/imx-optee-builder.nix @@ -0,0 +1,89 @@ +# Parameterized OP-TEE OS builder for i.MX platforms +# This builder is used across i.MX93, i.MX8MP, i.MX8MQ and similar platforms +{ + lib, + pkgs, + # Platform-specific parameters + pname, + version, + platformFlavor, + src, + # Optional parameters + meta ? { }, +}: +let + inherit (pkgs.buildPackages) python3; + toolchain = pkgs.gccStdenv.cc; + binutils = pkgs.gccStdenv.cc.bintools.bintools_bin; + cpp = pkgs.gcc; + + # Determine PLATFORM and PLATFORM_FLAVOR from platformFlavor + # Format can be either "imx-mx93evk" (full platform string) or "mx8mpevk" (just flavor, platform is "imx") + # Check if it starts with "imx-" to determine if it's a full platform string or just a flavor + hasFullPlatform = lib.hasPrefix "imx-" platformFlavor; + platform = if hasFullPlatform then platformFlavor else "imx"; + flavor = if hasFullPlatform then null else platformFlavor; +in +pkgs.stdenv.mkDerivation { + inherit pname version src; + + nativeBuildInputs = [ + python3 + ]; + + enableParallelBuilding = true; + + propagatedBuildInputs = with python3.pkgs; [ + pycryptodomex + pyelftools + cryptography + ]; + + # Common postPatch for all i.MX platforms + # This is the major source of code duplication - ~60 lines of identical substitutions + postPatch = '' + # Patch all script shebangs automatically + patchShebangs scripts/ + patchShebangs ta/ + + # Patch toolchain paths in mk/gcc.mk + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp + ''; + + makeFlags = + [ + "PLATFORM=${platform}" + ] + ++ lib.optionals (!hasFullPlatform) [ + "PLATFORM_FLAVOR=${flavor}" + ] + ++ [ + "CFG_ARM64_core=y" + "CFG_TEE_TA_LOG_LEVEL=0" + "CFG_TEE_CORE_LOG_LEVEL=0" + "CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}" + "CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}" + ]; + + installPhase = '' + mkdir -p $out + cp ./out/arm-plat-imx/core/tee-raw.bin $out/tee.bin + ''; + + meta = { + homepage = "https://github.com/nxp-imx/imx-optee-os"; + license = [ lib.licenses.bsd2 ]; + platforms = [ "aarch64-linux" ]; + } // meta; +} diff --git a/nxp/common/bsp/imx-uboot-builder.nix b/nxp/common/bsp/imx-uboot-builder.nix new file mode 100644 index 00000000..6d8a5960 --- /dev/null +++ b/nxp/common/bsp/imx-uboot-builder.nix @@ -0,0 +1,97 @@ +# Parameterized U-Boot builder for i.MX platforms +# This builder is used across i.MX93, i.MX8MP, i.MX8MQ and similar platforms +{ + lib, + stdenv, + buildPackages, + # Required dependencies + bison, + dtc, + flex, + gnutls, + libuuid, + ncurses, + openssl, + perl, + efitools, + which, + # Platform-specific parameters + pname, + version, + src, + defconfig, + ramdiskAddr, + fdtAddr, + dtbPath, + # Optional parameters + extraConfig ? "", + extraNativeBuildInputs ? [ ], +}: +let + # Import common U-Boot configuration + ubootConfig = import ../lib/uboot-config.nix; + + # Generate the common config with platform-specific memory addresses + commonConfig = ubootConfig.imxCommonUbootConfig { + inherit ramdiskAddr fdtAddr; + }; + + # Combine common config with any platform-specific extra config + finalExtraConfig = commonConfig + extraConfig; +in +stdenv.mkDerivation { + inherit pname version src; + + postPatch = '' + patchShebangs tools + patchShebangs scripts + ''; + + nativeBuildInputs = [ + bison + flex + openssl + which + ncurses + libuuid + gnutls + perl + efitools + ] ++ extraNativeBuildInputs; + + depsBuildBuild = [ buildPackages.stdenv.cc ]; + hardeningDisable = [ "all" ]; + enableParallelBuilding = true; + + makeFlags = [ + "DTC=${lib.getExe buildPackages.dtc}" + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" + ]; + + extraConfig = finalExtraConfig; + + passAsFile = [ "extraConfig" ]; + + configurePhase = '' + runHook preConfigure + + make ${defconfig} + cat $extraConfigPath >> .config + + runHook postConfigure + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp ./u-boot-nodtb.bin $out + cp ./spl/u-boot-spl.bin $out + cp ${dtbPath} $out + cp .config $out + + runHook postInstall + ''; + + dontStrip = true; +} diff --git a/nxp/common/lib/kernel-config.nix b/nxp/common/lib/kernel-config.nix new file mode 100644 index 00000000..aca1e70c --- /dev/null +++ b/nxp/common/lib/kernel-config.nix @@ -0,0 +1,29 @@ +# Shared kernel configuration for i.MX platforms +# This configuration is used across i.MX93, i.MX8MP, i.MX8MQ and similar platforms +{ + # Common kernel extra configuration for i.MX platforms + # Includes: virtualization support, EFI boot, RAID, USB/IP, framebuffer settings + imxCommonKernelConfig = '' + CRYPTO_TLS m + TLS 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 + ''; +} diff --git a/nxp/common/lib/uboot-config.nix b/nxp/common/lib/uboot-config.nix new file mode 100644 index 00000000..401e81c7 --- /dev/null +++ b/nxp/common/lib/uboot-config.nix @@ -0,0 +1,33 @@ +# Shared U-Boot configuration for i.MX platforms +# This configuration is used across i.MX93, i.MX8MP, i.MX8MQ and similar platforms +{ + # Generate common U-Boot extra configuration for i.MX platforms + # ramdiskAddr and fdtAddr are platform-specific memory addresses + imxCommonUbootConfig = + { ramdiskAddr, fdtAddr }: + '' + CONFIG_USE_BOOTCOMMAND=y + CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r ${ramdiskAddr}; setenv fdt_addr_r ${fdtAddr}; run distro_bootcmd; " + CONFIG_CMD_BOOTEFI_SELFTEST=y + CONFIG_CMD_BOOTEFI=y + CONFIG_EFI_LOADER=y + CONFIG_BLK=y + CONFIG_PARTITIONS=y + CONFIG_DM_DEVICE_REMOVE=n + CONFIG_CMD_CACHE=y + ''; + + # Common U-Boot native build inputs for i.MX platforms + imxCommonUbootNativeBuildInputs = [ + "bison" + "flex" + "openssl" + "which" + "ncurses" + "libuuid" + "gnutls" + "openssl" + "perl" + "efitools" + ]; +} diff --git a/nxp/imx8mp-evk/bsp/imx8mp-linux.nix b/nxp/imx8mp-evk/bsp/imx8mp-linux.nix index 86025f2a..51522375 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-linux.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-linux.nix @@ -1,56 +1,20 @@ { pkgs, ... }@args: -with pkgs; -buildLinux ( - args - // rec { - version = "6.12.20"; - name = "imx8mp-linux"; +(pkgs.callPackage ../../common/bsp/imx-linux-builder.nix args) { + pname = "imx8mp-linux"; + version = "6.12.20"; - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = version; + src = pkgs.fetchFromGitHub { + owner = "nxp-imx"; + repo = "linux-imx"; + # tag: lf-6.12.20-2.0.0 + rev = "dfaf2136deb2af2e60b994421281ba42f1c087e0"; + sha256 = "sha256-ITrmj3a5YfXh/PSRTi+Rlto5uEBIAWFWtkTsO1ATXIo="; + }; - defconfig = "imx_v8_defconfig"; + # Platform-specific configuration (if any) + extraConfig = ""; - # https://github.com/NixOS/nixpkgs/pull/366004 - # introduced a breaking change that if a module is declared but it is not being used it will faill. - ignoreConfigErrors = true; - - kernelPatches = [ - ]; - - autoModules = false; - - extraConfig = '' - CRYPTO_TLS m - TLS 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 - ''; - - src = fetchFromGitHub { - owner = "nxp-imx"; - repo = "linux-imx"; - # tag: lf-6.12.20-2.0.0 - rev = "dfaf2136deb2af2e60b994421281ba42f1c087e0"; - sha256 = "sha256-ITrmj3a5YfXh/PSRTi+Rlto5uEBIAWFWtkTsO1ATXIo="; - }; - } - // (args.argsOverride or { }) -) + # https://github.com/NixOS/nixpkgs/pull/366004 + # introduced a breaking change that if a module is declared but it is not being used it will faill. + ignoreConfigErrors = true; +} diff --git a/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix b/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix index 4cdd5f5d..c409e6c9 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-optee-os.nix @@ -1,69 +1,13 @@ { pkgs }: -let - inherit (pkgs.buildPackages) python3; - toolchain = pkgs.gccStdenv.cc; - binutils = pkgs.gccStdenv.cc.bintools.bintools_bin; - cpp = pkgs.gcc; -in -pkgs.stdenv.mkDerivation rec { +pkgs.callPackage ../../common/bsp/imx-optee-builder.nix { pname = "imx8mp-optee-os"; version = "lf-6.12.20-2.0.0"; - nativeBuildInputs = [ - python3 - ]; - - enableParallelBuilding = true; - - propagatedBuildInputs = with python3.pkgs; [ - pycryptodomex - pyelftools - cryptography - ]; - src = pkgs.fetchgit { url = "https://github.com/nxp-imx/imx-optee-os.git"; rev = "87964807d80baf1dcfd89cafc66de34a1cf16bf3"; sha256 = "sha256-AMZUMgmmyi5l3BMT84uubwjU0lwNObs9XW6ZCbqfhmc="; }; - postPatch = '' - substituteInPlace scripts/arm32_sysreg.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' - substituteInPlace scripts/gen_tee_bin.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' - substituteInPlace scripts/pem_to_pub_c.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' - substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ - --replace '/usr/bin/env bash' '${pkgs.bash}/bin/bash' - substituteInPlace ta/pkcs11/scripts/dump_ec_curve_params.sh \ - --replace '/usr/bin/env bash' '${pkgs.bash}/bin/bash' - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp - ''; - - makeFlags = [ - "PLATFORM=imx" - "PLATFORM_FLAVOR=mx8mpevk" - "CFG_ARM64_core=y" - "CFG_TEE_TA_LOG_LEVEL=0" - "CFG_TEE_CORE_LOG_LEVEL=0" - "CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}" - "CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}" - ]; - - installPhase = '' - mkdir -p $out - cp ./out/arm-plat-imx/core/tee-raw.bin $out/tee.bin - ''; + platformFlavor = "mx8mpevk"; } diff --git a/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix b/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix index 582cb70b..70b9992e 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-uboot.nix @@ -1,93 +1,17 @@ -{ - stdenv, - lib, - bison, - dtc, - fetchgit, - flex, - gnutls, - libuuid, - ncurses, - openssl, - which, - perl, - buildPackages, - efitools, -}: -let - ubsrc = fetchgit { +{ pkgs, fetchgit }: +pkgs.callPackage ../../common/bsp/imx-uboot-builder.nix { + pname = "imx8mp-uboot"; + version = "2025.04"; + + src = fetchgit { url = "https://github.com/nxp-imx/uboot-imx.git"; # tag: lf-6.12.20-2.0.0 rev = "9383f8387dc76524524da69992db96c22195a57c"; sha256 = "sha256-httRSwN8NiKOdL7fZEvN/4AbypGQfegYtJgxKIea+Zg="; }; -in -stdenv.mkDerivation { - pname = "imx8mp-uboot"; - version = "2025.04"; - src = ubsrc; - postPatch = '' - patchShebangs tools - patchShebangs scripts - ''; - - nativeBuildInputs = [ - bison - flex - openssl - which - ncurses - libuuid - gnutls - openssl - perl - efitools - ]; - - depsBuildBuild = [ buildPackages.stdenv.cc ]; - hardeningDisable = [ "all" ]; - enableParallelBuilding = true; - - makeFlags = [ - "DTC=${lib.getExe buildPackages.dtc}" - "CROSS_COMPILE=${stdenv.cc.targetPrefix}" - ]; - - extraConfig = '' - CONFIG_USE_BOOTCOMMAND=y - CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x45000000; setenv fdt_addr_r 0x44000000; run distro_bootcmd; " - CONFIG_CMD_BOOTEFI_SELFTEST=y - CONFIG_CMD_BOOTEFI=y - CONFIG_EFI_LOADER=y - CONFIG_BLK=y - CONFIG_PARTITIONS=y - CONFIG_DM_DEVICE_REMOVE=n - CONFIG_CMD_CACHE=y - ''; - - passAsFile = [ "extraConfig" ]; - - configurePhase = '' - runHook preConfigure - - make imx8mp_evk_defconfig - cat $extraConfigPath >> .config - - runHook postConfigure - ''; - - installPhase = '' - runHook preInstall - - mkdir -p $out - cp ./u-boot-nodtb.bin $out - cp ./spl/u-boot-spl.bin $out - cp ./dts/upstream/src/arm64/freescale/imx8mp-evk.dtb $out - cp .config $out - - runHook postInstall - ''; - - dontStrip = true; + defconfig = "imx8mp_evk_defconfig"; + ramdiskAddr = "0x45000000"; + fdtAddr = "0x44000000"; + dtbPath = "./dts/upstream/src/arm64/freescale/imx8mp-evk.dtb"; } diff --git a/nxp/imx8mq-evk/bsp/imx8mq-linux.nix b/nxp/imx8mq-evk/bsp/imx8mq-linux.nix index 5c2fb535..68d5d973 100644 --- a/nxp/imx8mq-evk/bsp/imx8mq-linux.nix +++ b/nxp/imx8mq-evk/bsp/imx8mq-linux.nix @@ -1,56 +1,20 @@ { pkgs, ... }@args: -with pkgs; -buildLinux ( - args - // rec { - version = "6.1.55"; - name = "imx8mq-linux"; +(pkgs.callPackage ../../common/bsp/imx-linux-builder.nix args) { + pname = "imx8mq-linux"; + version = "6.1.55"; - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = version; + src = pkgs.fetchFromGitHub { + owner = "nxp-imx"; + repo = "linux-imx"; + # tag: lf-6.1.55-2.2.0 + rev = "770c5fe2c1d1529fae21b7043911cd50c6cf087e"; + sha256 = "sha256-tIWt75RUrjB6KmUuAYBVyAC1dmVGSUAgqV5ROJh3xU0="; + }; - defconfig = "imx_v8_defconfig"; + # Platform-specific configuration (if any) + extraConfig = ""; - # https://github.com/NixOS/nixpkgs/pull/366004 - # introduced a breaking change that if a module is declared but it is not being used it will faill. - ignoreConfigErrors = true; - - kernelPatches = [ - ]; - - autoModules = false; - - extraConfig = '' - CRYPTO_TLS m - TLS 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 - ''; - - src = fetchFromGitHub { - owner = "nxp-imx"; - repo = "linux-imx"; - # tag: lf-6.1.55-2.2.0 - rev = "770c5fe2c1d1529fae21b7043911cd50c6cf087e"; - sha256 = "sha256-tIWt75RUrjB6KmUuAYBVyAC1dmVGSUAgqV5ROJh3xU0="; - }; - } - // (args.argsOverride or { }) -) + # https://github.com/NixOS/nixpkgs/pull/366004 + # introduced a breaking change that if a module is declared but it is not being used it will faill. + ignoreConfigErrors = true; +} diff --git a/nxp/imx8mq-evk/bsp/imx8mq-optee-os.nix b/nxp/imx8mq-evk/bsp/imx8mq-optee-os.nix index 73b60a35..3762887c 100644 --- a/nxp/imx8mq-evk/bsp/imx8mq-optee-os.nix +++ b/nxp/imx8mq-evk/bsp/imx8mq-optee-os.nix @@ -1,67 +1,13 @@ { pkgs }: -let - python3 = pkgs.buildPackages.python3; - toolchain = pkgs.gcc9Stdenv.cc; - binutils = pkgs.gcc9Stdenv.cc.bintools.bintools_bin; - cpp = pkgs.gcc; -in -pkgs.stdenv.mkDerivation rec { +pkgs.callPackage ../../common/bsp/imx-optee-builder.nix { pname = "imx8mq-optee-os"; version = "lf-6.1.55-2.2.0"; - nativeBuildInputs = [ - python3 - ]; - - enableParallelBuilding = true; - - propagatedBuildInputs = with python3.pkgs; [ - pycryptodomex - pyelftools - cryptography - ]; - src = pkgs.fetchgit { url = "https://github.com/nxp-imx/imx-optee-os.git"; rev = "a303fc80f7c4bd713315687a1fa1d6ed136e78ee"; sha256 = "sha256-OpyG812DX0c06bRZPKWB2cNu6gtZCOvewDhsKgrGB+s="; }; - postPatch = '' - substituteInPlace scripts/arm32_sysreg.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' - substituteInPlace scripts/gen_tee_bin.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' - substituteInPlace scripts/pem_to_pub_c.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' - substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ - --replace '/bin/bash' '${pkgs.bash}/bin/bash' - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp - ''; - - makeFlags = [ - "PLATFORM=imx" - "PLATFORM_FLAVOR=mx8mqevk" - "CFG_ARM64_core=y" - "CFG_TEE_TA_LOG_LEVEL=0" - "CFG_TEE_CORE_LOG_LEVEL=0" - "CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}" - "CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}" - ]; - - installPhase = '' - mkdir -p $out - cp ./out/arm-plat-imx/core/tee-raw.bin $out/tee.bin - ''; + platformFlavor = "mx8mqevk"; } diff --git a/nxp/imx8mq-evk/bsp/imx8mq-uboot.nix b/nxp/imx8mq-evk/bsp/imx8mq-uboot.nix index 7bb9c2df..9acc1ee4 100644 --- a/nxp/imx8mq-evk/bsp/imx8mq-uboot.nix +++ b/nxp/imx8mq-evk/bsp/imx8mq-uboot.nix @@ -1,91 +1,17 @@ -{ - stdenv, - lib, - bison, - dtc, - fetchgit, - flex, - gnutls, - libuuid, - ncurses, - openssl, - which, - perl, - buildPackages, -}: -let - ubsrc = fetchgit { +{ pkgs, fetchgit }: +pkgs.callPackage ../../common/bsp/imx-uboot-builder.nix { + pname = "imx8mq-uboot"; + version = "2023.04"; + + src = fetchgit { url = "https://github.com/nxp-imx/uboot-imx.git"; # tag: "lf-6.1.55-2.2.0" rev = "49b102d98881fc28af6e0a8af5ea2186c1d90a5f"; sha256 = "sha256-1j6X82DqezEizeWoSS600XKPNwrQ4yT0vZuUImKAVVA="; }; -in -(stdenv.mkDerivation { - pname = "imx8mq-uboot"; - version = "2023.04"; - src = ubsrc; - postPatch = '' - patchShebangs tools - patchShebangs scripts - ''; - - nativeBuildInputs = [ - bison - flex - openssl - which - ncurses - libuuid - gnutls - openssl - perl - ]; - - depsBuildBuild = [ buildPackages.stdenv.cc ]; - hardeningDisable = [ "all" ]; - enableParallelBuilding = true; - - makeFlags = [ - "DTC=${lib.getExe buildPackages.dtc}" - "CROSS_COMPILE=${stdenv.cc.targetPrefix}" - ]; - - extraConfig = '' - CONFIG_USE_BOOTCOMMAND=y - CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x45000000; setenv fdt_addr_r 0x44000000; run distro_bootcmd; " - CONFIG_CMD_BOOTEFI_SELFTEST=y - CONFIG_CMD_BOOTEFI=y - CONFIG_EFI_LOADER=y - CONFIG_BLK=y - CONFIG_PARTITIONS=y - CONFIG_DM_DEVICE_REMOVE=n - CONFIG_CMD_CACHE=y - ''; - - passAsFile = [ "extraConfig" ]; - - configurePhase = '' - runHook preConfigure - - make imx8mq_evk_defconfig - cat $extraConfigPath >> .config - - runHook postConfigure - ''; - - installPhase = '' - runHook preInstall - - mkdir -p $out - cp ./u-boot-nodtb.bin $out - cp ./spl/u-boot-spl.bin $out - cp ./arch/arm/dts/imx8mq-evk.dtb $out - cp .config $out - - runHook postInstall - ''; - - dontStrip = true; -}) + defconfig = "imx8mq_evk_defconfig"; + ramdiskAddr = "0x45000000"; + fdtAddr = "0x44000000"; + dtbPath = "./arch/arm/dts/imx8mq-evk.dtb"; +} diff --git a/nxp/imx93-evk/bsp/imx93-linux.nix b/nxp/imx93-evk/bsp/imx93-linux.nix index 6e4cc21f..1bdb8332 100644 --- a/nxp/imx93-evk/bsp/imx93-linux.nix +++ b/nxp/imx93-evk/bsp/imx93-linux.nix @@ -1,62 +1,24 @@ -{ lib, pkgs, ... }@args: -with pkgs; -buildLinux ( - args - // rec { - version = "6.12.3"; - name = "imx93-linux"; +{ pkgs, ... }@args: +(pkgs.callPackage ../../common/bsp/imx-linux-builder.nix args) { + pname = "imx93-linux"; + version = "6.12.3"; - # modDirVersion needs to be x.y.z, will automatically add .0 if needed - modDirVersion = version; + src = pkgs.fetchFromGitHub { + owner = "nxp-imx"; + repo = "linux-imx"; + # tag: lf-6.12.3 + rev = "37d02f4dcbbe6677dc9f5fc17f386c05d6a7bd7a"; + sha256 = "sha256-1oJMbHR8Ho0zNritEJ+TMOAyYHCW0vwhPkDfLctrZa8="; + }; - defconfig = "imx_v8_defconfig"; + # Platform-specific configuration (if any) + extraConfig = ""; - # https://github.com/NixOS/nixpkgs/pull/366004 - # introduced a breaking change that if a module is declared but it is not being used it will faill. - ignoreConfigErrors = true; + # https://github.com/NixOS/nixpkgs/pull/366004 + # introduced a breaking change that if a module is declared but it is not being used it will faill. + ignoreConfigErrors = true; - kernelPatches = [ - ]; - - autoModules = false; - - extraConfig = '' - CRYPTO_TLS m - TLS 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 - ''; - - src = fetchFromGitHub { - owner = "nxp-imx"; - repo = "linux-imx"; - # tag: lf-6.12.3 - rev = "37d02f4dcbbe6677dc9f5fc17f386c05d6a7bd7a"; - sha256 = "sha256-1oJMbHR8Ho0zNritEJ+TMOAyYHCW0vwhPkDfLctrZa8="; - }; - meta = with lib; { - homepage = "https://github.com/nxp-imx/linux-imx"; - license = [ licenses.gpl2Only ]; - maintainers = with maintainers; [ govindsi ]; - platforms = [ "aarch64-linux" ]; - }; - } - // (args.argsOverride or { }) -) + extraMeta = { + maintainers = with pkgs.lib.maintainers; [ govindsi ]; + }; +} diff --git a/nxp/imx93-evk/bsp/imx93-optee-os.nix b/nxp/imx93-evk/bsp/imx93-optee-os.nix index 75e3dde7..a48a5bec 100644 --- a/nxp/imx93-evk/bsp/imx93-optee-os.nix +++ b/nxp/imx93-evk/bsp/imx93-optee-os.nix @@ -1,75 +1,17 @@ -{ - lib, - pkgs, -}: -let - inherit (pkgs.buildPackages) python3; - toolchain = pkgs.gccStdenv.cc; - binutils = pkgs.gccStdenv.cc.bintools.bintools_bin; - cpp = pkgs.gcc; -in -pkgs.stdenv.mkDerivation rec { +{ pkgs }: +pkgs.callPackage ../../common/bsp/imx-optee-builder.nix { pname = "imx93-optee-os"; version = "lf-6.12.3_1.0.0"; - nativeBuildInputs = [ - python3 - ]; - - enableParallelBuilding = true; - - propagatedBuildInputs = with python3.pkgs; [ - pycryptodomex - pyelftools - cryptography - ]; - src = pkgs.fetchgit { url = "https://github.com/nxp-imx/imx-optee-os.git"; rev = "8dd180b6d149c1e1314b5869697179f665bd9ca3"; sha256 = "sha256-PoolRscdyeGevrOa5YymPTQ36edVvReMM5WshRTz+uk="; }; - meta = with lib; { - homepage = "https://github.com/nxp-imx/imx-optee-os"; - license = [ licenses.bsd2 ]; - maintainers = with maintainers; [ govindsi ]; - platforms = [ "aarch64-linux" ]; + + platformFlavor = "imx-mx93evk"; + + meta = { + maintainers = with pkgs.lib.maintainers; [ govindsi ]; }; - - postPatch = '' - substituteInPlace scripts/arm32_sysreg.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' - substituteInPlace scripts/gen_tee_bin.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' - substituteInPlace scripts/pem_to_pub_c.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' - substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ - --replace '/bin/bash' '${pkgs.bash}/bin/bash' - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar - substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp - ''; - - makeFlags = [ - "PLATFORM=imx-mx93evk" - "CFG_ARM64_core=y" - "CFG_TEE_TA_LOG_LEVEL=0" - "CFG_TEE_CORE_LOG_LEVEL=0" - "CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}" - "CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}" - ]; - - installPhase = '' - mkdir -p $out - cp ./out/arm-plat-imx/core/tee-raw.bin $out/tee.bin - ''; } diff --git a/nxp/imx93-evk/bsp/imx93-uboot.nix b/nxp/imx93-evk/bsp/imx93-uboot.nix index ce918381..9c6f6f9f 100644 --- a/nxp/imx93-evk/bsp/imx93-uboot.nix +++ b/nxp/imx93-evk/bsp/imx93-uboot.nix @@ -1,93 +1,17 @@ -{ - stdenv, - lib, - bison, - dtc, - fetchgit, - flex, - gnutls, - libuuid, - ncurses, - openssl, - which, - perl, - buildPackages, - efitools, -}: -let - ubsrc = fetchgit { +{ pkgs, fetchgit }: +pkgs.callPackage ../../common/bsp/imx-uboot-builder.nix { + pname = "imx93-uboot"; + version = "2024.04"; + + src = fetchgit { url = "https://github.com/nxp-imx/uboot-imx.git"; #lf_v2024.04 rev = "e3219a5a73445219df605d1492687918d488055c"; sha256 = "sha256-6pXwgNzq4/XUUEmJ6sGC5pII4J5uMvlDPE9QJxjJJbQ="; }; -in -stdenv.mkDerivation { - pname = "imx93-uboot"; - version = "2024.04"; - src = ubsrc; - postPatch = '' - patchShebangs tools - patchShebangs scripts - ''; - - nativeBuildInputs = [ - bison - flex - openssl - which - ncurses - libuuid - gnutls - openssl - perl - efitools - ]; - - depsBuildBuild = [ buildPackages.stdenv.cc ]; - hardeningDisable = [ "all" ]; - enableParallelBuilding = true; - - makeFlags = [ - "DTC=${lib.getExe buildPackages.dtc}" - "CROSS_COMPILE=${stdenv.cc.targetPrefix}" - ]; - - extraConfig = '' - CONFIG_USE_BOOTCOMMAND=y - CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x85000000; setenv fdt_addr_r 0x84000000; run distro_bootcmd; " - CONFIG_CMD_BOOTEFI_SELFTEST=y - CONFIG_CMD_BOOTEFI=y - CONFIG_EFI_LOADER=y - CONFIG_BLK=y - CONFIG_PARTITIONS=y - CONFIG_DM_DEVICE_REMOVE=n - CONFIG_CMD_CACHE=y - ''; - - passAsFile = [ "extraConfig" ]; - - configurePhase = '' - runHook preConfigure - - make imx93_11x11_evk_defconfig - cat $extraConfigPath >> .config - - runHook postConfigure - ''; - - installPhase = '' - runHook preInstall - - mkdir -p $out - cp ./u-boot-nodtb.bin $out - cp ./spl/u-boot-spl.bin $out - cp ./arch/arm/dts/imx93-11x11-evk.dtb $out - cp .config $out - - runHook postInstall - ''; - - dontStrip = true; + defconfig = "imx93_11x11_evk_defconfig"; + ramdiskAddr = "0x85000000"; + fdtAddr = "0x84000000"; + dtbPath = "./arch/arm/dts/imx93-11x11-evk.dtb"; } From e11482075d60cb55e64d8488bbef062073262738 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Thu, 30 Oct 2025 10:54:55 +0100 Subject: [PATCH 1442/1476] framework/kmod: remove compatibility with Linux version < 6.10 Upstream changes broke the checks that we had. By now we have 6.12 as the LTS, and 24.05 went out of support, so I think we don't need to support this anymore. Anyone still on such old kernel versions, can apply the patch manually if needed. --- framework/kmod.nix | 61 +++++++++++++++------------------------------- 1 file changed, 20 insertions(+), 41 deletions(-) diff --git a/framework/kmod.nix b/framework/kmod.nix index 7cb53746..9d98a734 100644 --- a/framework/kmod.nix +++ b/framework/kmod.nix @@ -1,56 +1,35 @@ { config, lib, - pkgs, ... }: -let - kernel_version_compatible = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.10"; -in { options.hardware.framework.enableKmod = - (lib.mkEnableOption "Enable the community created Framework kernel module that allows interacting with the embedded controller from sysfs.") + (lib.mkEnableOption "the community-created Framework kernel module that allows interacting with the embedded controller from sysfs.") // { # enable by default on NixOS >= 24.05 and kernel >= 6.10 - default = lib.and (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05") kernel_version_compatible; - defaultText = "enabled by default on NixOS >= 24.05 and kernel >= 6.10"; + default = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.10"; + defaultText = "enabled by default if kernel >= 6.10"; }; - config.boot = lib.mkIf config.hardware.framework.enableKmod { - extraModulePackages = with config.boot.kernelPackages; [ - framework-laptop-kmod - ]; - - # https://github.com/DHowett/framework-laptop-kmod?tab=readme-ov-file#usage - kernelModules = [ - "cros_ec" - "cros_ec_lpcs" - ]; - - # add required patch if enabled on kernel <6.10 - kernelPatches = lib.mkIf (!kernel_version_compatible) [ - rec { - name = "platform/chrome: cros_ec_lpc: add support for AMD Framework Laptops"; - msgid = "20240403004713.130365-1-dustin@howett.net"; - version = "3"; - hash = "sha256-aQSyys8CMzlj9EdNhg8vtp76fg1qEwUVeJL0E+8w5HU="; - patch = - pkgs.runCommandLocal "patch-${msgid}" - { - nativeBuildInputs = with pkgs; [ - b4 - git - cacert - ]; - SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; - - outputHash = hash; - } - '' - export HOME="$TMP" - PYTHONHASHSEED=0 ${pkgs.b4}/bin/b4 -n am -C -T -v ${version} -o- "${msgid}" > "$out" - ''; + config = lib.mkIf config.hardware.framework.enableKmod { + assertions = [ + { + assertion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.10"; + message = "The framework laptop kernel module requires Linux 6.10 or above"; } ]; + + boot = { + extraModulePackages = with config.boot.kernelPackages; [ + framework-laptop-kmod + ]; + + # https://github.com/DHowett/framework-laptop-kmod?tab=readme-ov-file#usage + kernelModules = [ + "cros_ec" + "cros_ec_lpcs" + ]; + }; }; } From 4bafcc24545636a35e00500b6c3f7ea581b44340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 17 Aug 2025 11:20:09 +0200 Subject: [PATCH 1443/1476] Refactor tests to load flake inputs with flake-compat This makes `nix fmt` just works and we no longer have to override flake inputs. --- .github/workflows/test.yml | 4 +- CONTRIBUTING.md | 2 +- flake.nix | 65 +++++++- tests/flake-compat.nix | 299 +++++++++++++++++++++++++++++++++++++ tests/flake.lock | 75 +++------- tests/flake.nix | 123 +-------------- tests/nixos-tests.nix | 70 +++++++++ tests/run-tests.nix | 19 +++ tests/run.py | 13 +- tests/treefmt.nix | 11 ++ 10 files changed, 491 insertions(+), 190 deletions(-) create mode 100644 tests/flake-compat.nix create mode 100644 tests/nixos-tests.nix create mode 100644 tests/run-tests.nix create mode 100644 tests/treefmt.nix diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ac55dd2a..9999d49b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,11 +11,11 @@ jobs: steps: - uses: actions/checkout@v5 - uses: cachix/install-nix-action@v31 - - run: cd tests && nix fmt .. -- --fail-on-change + - run: nix build .#checks.x86_64-linux.formatting tests: needs: nixfmt runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - uses: cachix/install-nix-action@v31 - - run: nix run ./tests#run . \ No newline at end of file + - run: nix run .#run-tests diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 63a147a7..93564142 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,7 +42,7 @@ Link the profile in the table in README.md and in flake.nix. ## 3. Testing -Run `nix run ./tests#run .` to evaluate all hardware profiles. +Run `nix run .#run-tests` to evaluate all hardware profiles. Because profiles can only be tested with the appropriate hardware, quality assurance is up to *you*. diff --git a/flake.nix b/flake.nix index bc3a709e..c88aa593 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,35 @@ description = "nixos-hardware"; outputs = - { ... }: + { self, ... }: + let + # Import private inputs (for development) + privateInputs = + (import ./tests/flake-compat.nix { + src = ./tests; + }).defaultNix; + + systems = [ + "aarch64-linux" + "riscv64-linux" + "x86_64-linux" + ]; + + formatSystems = [ "aarch64-linux" "x86_64-linux" ]; + + # Helper to iterate over systems + eachSystem = + f: + privateInputs.nixos-unstable-small.lib.genAttrs systems ( + system: f privateInputs.nixos-unstable-small.legacyPackages.${system} system + ); + + eachSystemFormat = + f: + privateInputs.nixos-unstable-small.lib.genAttrs formatSystems ( + system: f privateInputs.nixos-unstable-small.legacyPackages.${system} system + ); + in { nixosModules = @@ -420,5 +448,40 @@ common-pc-laptop-ssd = import ./common/pc/ssd; common-pc-ssd = import ./common/pc/ssd; }; + + # Add formatter for `nix fmt` + formatter = eachSystemFormat ( + pkgs: _system: + (privateInputs.treefmt-nix.lib.evalModule pkgs ./tests/treefmt.nix).config.build.wrapper + ); + + # Add packages + packages = eachSystem ( + pkgs: _system: { + run-tests = pkgs.callPackage ./tests/run-tests.nix { + inherit self; + }; + } + ); + + # Add checks for `nix run .#run-tests` + checks = eachSystem ( + pkgs: system: + let + treefmtEval = privateInputs.treefmt-nix.lib.evalModule pkgs ./tests/treefmt.nix; + nixosTests = import ./tests/nixos-tests.nix { + inherit + self + privateInputs + system + pkgs + ; + }; + in + pkgs.lib.optionalAttrs (self.formatter ? ${system}) { + formatting = treefmtEval.config.build.check self; + } + // nixosTests + ); }; } diff --git a/tests/flake-compat.nix b/tests/flake-compat.nix new file mode 100644 index 00000000..ddc1cd0e --- /dev/null +++ b/tests/flake-compat.nix @@ -0,0 +1,299 @@ +# Compatibility function to allow flakes to be used by +# non-flake-enabled Nix versions. Given a source tree containing a +# 'flake.nix' and 'flake.lock' file, it fetches the flake inputs and +# calls the flake's 'outputs' function. It then returns an attrset +# containing 'defaultNix' (to be used in 'default.nix'), 'shellNix' +# (to be used in 'shell.nix'). + +{ + src, + system ? builtins.currentSystem or "unknown-system", +}: + +let + + lockFilePath = src + "/flake.lock"; + + lockFile = builtins.fromJSON (builtins.readFile lockFilePath); + + fetchTree = + builtins.fetchTree or ( + info: + if info.type == "github" then + { + outPath = fetchTarball ( + { + url = "https://api.${info.host or "github.com"}/repos/${info.owner}/${info.repo}/tarball/${info.rev}"; + } + // (if info ? narHash then { sha256 = info.narHash; } else { }) + ); + rev = info.rev; + shortRev = builtins.substring 0 7 info.rev; + lastModified = info.lastModified; + lastModifiedDate = formatSecondsSinceEpoch info.lastModified; + narHash = info.narHash; + } + else if info.type == "git" then + { + outPath = builtins.fetchGit ( + { + url = info.url; + } + // (if info ? rev then { inherit (info) rev; } else { }) + // (if info ? ref then { inherit (info) ref; } else { }) + // (if info ? submodules then { inherit (info) submodules; } else { }) + ); + lastModified = info.lastModified; + lastModifiedDate = formatSecondsSinceEpoch info.lastModified; + narHash = info.narHash; + revCount = info.revCount or 0; + } + // ( + if info ? rev then + { + rev = info.rev; + shortRev = builtins.substring 0 7 info.rev; + } + else + { } + ) + else if info.type == "path" then + { + outPath = builtins.path { + path = info.path; + sha256 = info.narHash; + }; + narHash = info.narHash; + } + else if info.type == "tarball" then + { + outPath = fetchTarball ( + { inherit (info) url; } // (if info ? narHash then { sha256 = info.narHash; } else { }) + ); + } + else if info.type == "gitlab" then + { + inherit (info) rev narHash lastModified; + outPath = fetchTarball ( + { + url = "https://${info.host or "gitlab.com"}/api/v4/projects/${info.owner}%2F${info.repo}/repository/archive.tar.gz?sha=${info.rev}"; + } + // (if info ? narHash then { sha256 = info.narHash; } else { }) + ); + shortRev = builtins.substring 0 7 info.rev; + } + else if info.type == "sourcehut" then + { + inherit (info) rev narHash lastModified; + outPath = fetchTarball ( + { + url = "https://${info.host or "git.sr.ht"}/${info.owner}/${info.repo}/archive/${info.rev}.tar.gz"; + } + // (if info ? narHash then { sha256 = info.narHash; } else { }) + ); + shortRev = builtins.substring 0 7 info.rev; + } + else + # FIXME: add Mercurial, tarball inputs. + throw "flake input has unsupported input type '${info.type}'" + ); + + callFlake4 = + flakeSrc: locks: + let + flake = import (flakeSrc + "/flake.nix"); + + inputs = builtins.mapAttrs ( + _n: v: + if v.flake or true then + callFlake4 (fetchTree (v.locked // v.info)) v.inputs + else + fetchTree (v.locked // v.info) + ) locks; + + outputs = flakeSrc // (flake.outputs (inputs // { self = outputs; })); + in + assert flake.edition == 201909; + outputs; + + callLocklessFlake = + flakeSrc: + let + flake = import (flakeSrc + "/flake.nix"); + outputs = flakeSrc // (flake.outputs ({ self = outputs; })); + in + outputs; + + rootSrc = + let + # Try to clean the source tree by using fetchGit, if this source + # tree is a valid git repository. + tryFetchGit = + src: + if isGit && !isShallow then + let + res = builtins.fetchGit src; + in + if res.rev == "0000000000000000000000000000000000000000" then + removeAttrs res [ + "rev" + "shortRev" + ] + else + res + else + { + outPath = + # Massage `src` into a store path. + if builtins.isPath src then + if + dirOf (toString src) == builtins.storeDir + # `builtins.storePath` is not available in pure-eval mode. + && builtins ? currentSystem + then + # If it's already a store path, don't copy it again. + builtins.storePath src + else + "${src}" + else + src; + }; + # NB git worktrees have a file for .git, so we don't check the type of .git + isGit = builtins.pathExists (src + "/.git"); + isShallow = builtins.pathExists (src + "/.git/shallow"); + + in + { + lastModified = 0; + lastModifiedDate = formatSecondsSinceEpoch 0; + } + // (if src ? outPath then src else tryFetchGit src); + + # Format number of seconds in the Unix epoch as %Y%m%d%H%M%S. + formatSecondsSinceEpoch = + t: + let + rem = x: y: x - x / y * y; + days = t / 86400; + secondsInDay = rem t 86400; + hours = secondsInDay / 3600; + minutes = (rem secondsInDay 3600) / 60; + seconds = rem t 60; + + # Courtesy of https://stackoverflow.com/a/32158604. + z = days + 719468; + era = (if z >= 0 then z else z - 146096) / 146097; + doe = z - era * 146097; + yoe = (doe - doe / 1460 + doe / 36524 - doe / 146096) / 365; + y = yoe + era * 400; + doy = doe - (365 * yoe + yoe / 4 - yoe / 100); + mp = (5 * doy + 2) / 153; + d = doy - (153 * mp + 2) / 5 + 1; + m = mp + (if mp < 10 then 3 else -9); + y' = y + (if m <= 2 then 1 else 0); + + pad = s: if builtins.stringLength s < 2 then "0" + s else s; + in + "${toString y'}${pad (toString m)}${pad (toString d)}${pad (toString hours)}${pad (toString minutes)}${pad (toString seconds)}"; + + allNodes = builtins.mapAttrs ( + key: node: + let + sourceInfo = + if key == lockFile.root then + rootSrc + else + fetchTree (node.info or { } // removeAttrs node.locked [ "dir" ]); + + subdir = if key == lockFile.root then "" else node.locked.dir or ""; + + outPath = sourceInfo + ((if subdir == "" then "" else "/") + subdir); + + flake = import (outPath + "/flake.nix"); + + inputs = builtins.mapAttrs (_inputName: inputSpec: allNodes.${resolveInput inputSpec}) ( + node.inputs or { } + ); + + # Resolve a input spec into a node name. An input spec is + # either a node name, or a 'follows' path from the root + # node. + resolveInput = + inputSpec: if builtins.isList inputSpec then getInputByPath lockFile.root inputSpec else inputSpec; + + # Follow an input path (e.g. ["dwarffs" "nixpkgs"]) from the + # root node, returning the final node. + getInputByPath = + nodeName: path: + if path == [ ] then + nodeName + else + getInputByPath + # Since this could be a 'follows' input, call resolveInput. + (resolveInput lockFile.nodes.${nodeName}.inputs.${builtins.head path}) + (builtins.tail path); + + outputs = flake.outputs (inputs // { self = result; }); + + result = + outputs + # We add the sourceInfo attribute for its metadata, as they are + # relevant metadata for the flake. However, the outPath of the + # sourceInfo does not necessarily match the outPath of the flake, + # as the flake may be in a subdirectory of a source. + # This is shadowed in the next // + // sourceInfo + // { + # This shadows the sourceInfo.outPath + inherit outPath; + + inherit inputs; + inherit outputs; + inherit sourceInfo; + _type = "flake"; + }; + + in + if node.flake or true then + assert builtins.isFunction flake.outputs; + result + else + sourceInfo + ) lockFile.nodes; + + result = + if !(builtins.pathExists lockFilePath) then + callLocklessFlake rootSrc + else if lockFile.version == 4 then + callFlake4 rootSrc (lockFile.inputs) + else if lockFile.version >= 5 && lockFile.version <= 7 then + allNodes.${lockFile.root} + else + throw "lock file '${lockFilePath}' has unsupported version ${toString lockFile.version}"; + +in +rec { + outputs = result; + + defaultNix = + builtins.removeAttrs result [ "__functor" ] + // ( + if result ? defaultPackage.${system} then { default = result.defaultPackage.${system}; } else { } + ) + // ( + if result ? packages.${system}.default then + { default = result.packages.${system}.default; } + else + { } + ); + + shellNix = + defaultNix + // (if result ? devShell.${system} then { default = result.devShell.${system}; } else { }) + // ( + if result ? devShells.${system}.default then + { default = result.devShells.${system}.default; } + else + { } + ); +} diff --git a/tests/flake.lock b/tests/flake.lock index 4363c6d1..da5ee417 100644 --- a/tests/flake.lock +++ b/tests/flake.lock @@ -1,78 +1,39 @@ { "nodes": { - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "nixos-unstable-small" - ] - }, - "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "nixos-hardware": { - "locked": { - "lastModified": 1747083103, - "narHash": "sha256-dMx20S2molwqJxbmMB4pGjNfgp5H1IOHNa1Eby6xL+0=", - "owner": "NixOS", - "repo": "nixos-hardware", - "rev": "d1d68fe8b00248caaa5b3bbe4984c12b47e0867d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixos-hardware", - "type": "github" - } - }, "nixos-stable": { "locked": { - "lastModified": 1751211869, - "narHash": "sha256-1Cu92i1KSPbhPCKxoiVG5qnoRiKTgR5CcGSRyLpOd7Y=", - "ref": "nixos-25.05", - "rev": "b43c397f6c213918d6cfe6e3550abfe79b5d1c51", - "shallow": true, - "type": "git", - "url": "https://github.com/NixOS/nixpkgs" + "lastModified": 1755274400, + "narHash": "sha256-rTInmnp/xYrfcMZyFMH3kc8oko5zYfxsowaLv1LVobY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ad7196ae55c295f53a7d1ec39e4a06d922f3b899", + "type": "github" }, "original": { + "owner": "NixOS", "ref": "nixos-25.05", - "shallow": true, - "type": "git", - "url": "https://github.com/NixOS/nixpkgs" + "repo": "nixpkgs", + "type": "github" } }, "nixos-unstable-small": { "locked": { - "lastModified": 1747040834, - "narHash": "sha256-iKQKoNlZmxQq+O2WfImm/jn97g5GZBVW5EZEoCTXZ3I=", - "ref": "nixos-unstable-small", - "rev": "e4f52f3ea82ddd3754b467e3fdc0d709685c9a05", - "shallow": true, - "type": "git", - "url": "https://github.com/NixOS/nixpkgs" + "lastModified": 1755375481, + "narHash": "sha256-43PgCQFgFD1nM/7dncytV0c5heNHe/gXrEud18ZWcZU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "35f1742e4f1470817ff8203185e2ce0359947f12", + "type": "github" }, "original": { + "owner": "NixOS", "ref": "nixos-unstable-small", - "shallow": true, - "type": "git", - "url": "https://github.com/NixOS/nixpkgs" + "repo": "nixpkgs", + "type": "github" } }, "root": { "inputs": { - "flake-parts": "flake-parts", - "nixos-hardware": "nixos-hardware", "nixos-stable": "nixos-stable", "nixos-unstable-small": "nixos-unstable-small", "treefmt-nix": "treefmt-nix" diff --git a/tests/flake.nix b/tests/flake.nix index 443bfbd7..242c07be 100644 --- a/tests/flake.nix +++ b/tests/flake.nix @@ -1,127 +1,12 @@ { - description = "Test flake for nixos-hardware"; + description = "Private dev inputs for nixos-hardware"; inputs = { - nixos-unstable-small.url = "git+https://github.com/NixOS/nixpkgs?shallow=1&ref=nixos-unstable-small"; - nixos-stable.url = "git+https://github.com/NixOS/nixpkgs?shallow=1&ref=nixos-25.05"; - # override in the test - nixos-hardware.url = "github:NixOS/nixos-hardware"; - flake-parts.url = "github:hercules-ci/flake-parts"; - flake-parts.inputs.nixpkgs-lib.follows = "nixos-unstable-small"; + nixos-unstable-small.url = "github:NixOS/nixpkgs/nixos-unstable-small"; + nixos-stable.url = "github:NixOS/nixpkgs/nixos-25.05"; treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.inputs.nixpkgs.follows = "nixos-unstable-small"; }; - outputs = - inputs@{ flake-parts, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - imports = [ - inputs.treefmt-nix.flakeModule - ]; - systems = [ - "aarch64-linux" - "x86_64-linux" - "riscv64-linux" - ]; - perSystem = - { - system, - lib, - pkgs, - ... - }: - let - blackList = [ - # does import-from-derivation - "toshiba-swanky" - # uses custom nixpkgs config - "raspberry-pi-2" - - # deprecated profiles - "framework" - "asus-zephyrus-ga402x" - "lenovo-yoga-7-14ARH7" - ]; - - # There are more, but for those we need to force it. - # In future we should probably already define it in our module. - aarch64Systems = [ - "raspberry-pi-3" - "raspberry-pi-4" - "raspberry-pi-5" - ]; - - matchArch = - moduleName: - if builtins.elem moduleName aarch64Systems then - pkgs.hostPlatform.system == "aarch64-linux" - else - # TODO also add riscv64 - pkgs.hostPlatform.system == "x86_64-linux"; - - modules = lib.filterAttrs ( - name: _: !(builtins.elem name blackList || lib.hasPrefix "common-" name) && matchArch name - ) inputs.nixos-hardware.nixosModules; - buildProfile = import ./build-profile.nix; - - unfreeNixpkgs = - importPath: - import importPath { - config = { - allowBroken = true; - allowUnfree = true; - nvidia.acceptLicense = true; - }; - overlays = [ ]; - inherit system; - }; - nixpkgsUnstable = unfreeNixpkgs inputs.nixos-unstable-small; - nixpkgsStable = unfreeNixpkgs inputs.nixos-stable; - - checksForNixpkgs = - channel: nixpkgs: - lib.mapAttrs' ( - name: module: - lib.nameValuePair "${channel}-${name}" (buildProfile { - pkgs = nixpkgs; - profile = module; - }) - ) modules; - in - { - _module.args.pkgs = nixpkgsUnstable; - - treefmt = { - flakeCheck = pkgs.hostPlatform.system != "riscv64-linux"; - projectRootFile = "COPYING"; - programs = { - deadnix = { - enable = true; - no-lambda-pattern-names = true; - }; - nixfmt = { - enable = true; - package = pkgs.nixfmt-rfc-style; - }; - }; - settings = { - on-unmatched = "info"; - }; - }; - - checks = - checksForNixpkgs "nixos-unstable" nixpkgsUnstable - // checksForNixpkgs "nixos-stable" nixpkgsStable; - packages.run = pkgs.writeShellScriptBin "run.py" '' - #!${pkgs.bash}/bin/bash - export PATH=${ - lib.makeBinPath [ - pkgs.nix-eval-jobs - pkgs.nix-eval-jobs.nix - ] - } - exec ${pkgs.python3.interpreter} ${./.}/run.py --nixos-hardware "$@" - ''; - }; - }; + outputs = inputs: inputs; } diff --git a/tests/nixos-tests.nix b/tests/nixos-tests.nix new file mode 100644 index 00000000..0fcf6ed9 --- /dev/null +++ b/tests/nixos-tests.nix @@ -0,0 +1,70 @@ +{ + self, + privateInputs, + system, + pkgs, +}: +let + # Hardware profile checks + blackList = [ + # does import-from-derivation + "toshiba-swanky" + # uses custom nixpkgs config + "raspberry-pi-2" + # deprecated profiles + "framework" + "asus-zephyrus-ga402x" + "lenovo-yoga-7-14ARH7" + ]; + + aarch64Systems = [ + "raspberry-pi-3" + "raspberry-pi-4" + "raspberry-pi-5" + ]; + + matchArch = + moduleName: + if builtins.elem moduleName aarch64Systems then + system == "aarch64-linux" + else + # TODO also add riscv64 + system == "x86_64-linux"; + + modules = pkgs.lib.filterAttrs ( + name: _: !(builtins.elem name blackList || pkgs.lib.hasPrefix "common-" name) && matchArch name + ) self.nixosModules; + + buildProfile = import ./build-profile.nix; + + unfreeNixpkgs = { + config = { + allowBroken = true; + allowUnfree = true; + nvidia.acceptLicense = true; + }; + overlays = [ ]; + inherit system; + }; + + nixpkgsUnstable = import privateInputs.nixos-unstable-small unfreeNixpkgs; + nixpkgsStable = import privateInputs.nixos-stable unfreeNixpkgs; + + # Build checks for both unstable and stable + unstableChecks = pkgs.lib.mapAttrs' ( + name: module: + pkgs.lib.nameValuePair "unstable-${name}" (buildProfile { + pkgs = nixpkgsUnstable; + profile = module; + }) + ) modules; + + stableChecks = pkgs.lib.mapAttrs' ( + name: module: + pkgs.lib.nameValuePair "stable-${name}" (buildProfile { + pkgs = nixpkgsStable; + profile = module; + }) + ) modules; +in +unstableChecks // stableChecks diff --git a/tests/run-tests.nix b/tests/run-tests.nix new file mode 100644 index 00000000..a2606bbc --- /dev/null +++ b/tests/run-tests.nix @@ -0,0 +1,19 @@ +{ + lib, + writeShellScriptBin, + bash, + python3, + nix-eval-jobs, + self, +}: + +writeShellScriptBin "run-tests" '' + #!${bash}/bin/bash + export PATH=${ + lib.makeBinPath [ + nix-eval-jobs + nix-eval-jobs.nix + ] + } + exec ${python3.interpreter} ${self}/tests/run.py +'' diff --git a/tests/run.py b/tests/run.py index efe76b52..6bb49e88 100755 --- a/tests/run.py +++ b/tests/run.py @@ -30,22 +30,15 @@ def parse_args() -> argparse.Namespace: action="store_true", help="Print evaluation commands executed", ) - parser.add_argument( - "--nixos-hardware", - help="Print evaluation commands executed", - ) return parser.parse_args() -def run_eval_test(nixos_hardware: str, gcroot_dir: Path, jobs: int) -> list[str]: +def run_eval_test(gcroot_dir: Path, jobs: int) -> list[str]: failed_profiles = [] cmd = [ "nix-eval-jobs", "--extra-experimental-features", "flakes", - "--override-input", - "nixos-hardware", - nixos_hardware, "--gc-roots-dir", str(gcroot_dir), "--max-memory-size", @@ -53,7 +46,7 @@ def run_eval_test(nixos_hardware: str, gcroot_dir: Path, jobs: int) -> list[str] "--workers", str(jobs), "--flake", - str(TEST_ROOT) + "#checks", + str(ROOT) + "#checks", "--force-recurse", ] print(" ".join(map(shlex.quote, cmd))) @@ -84,7 +77,7 @@ def main() -> None: with TemporaryDirectory() as tmpdir: gcroot_dir = Path(tmpdir) / "gcroot" - failed_profiles = run_eval_test(args.nixos_hardware, gcroot_dir, args.jobs) + failed_profiles = run_eval_test(gcroot_dir, args.jobs) if len(failed_profiles) > 0: print(f"\n{RED}The following {len(failed_profiles)} test(s) failed:{RESET}") diff --git a/tests/treefmt.nix b/tests/treefmt.nix new file mode 100644 index 00000000..46df7f2b --- /dev/null +++ b/tests/treefmt.nix @@ -0,0 +1,11 @@ +{ + projectRootFile = "flake.nix"; + programs = { + deadnix = { + enable = true; + no-lambda-pattern-names = true; + }; + nixfmt.enable = true; + }; + settings.on-unmatched = "info"; +} From 6ec1e821826ed890236a4a81ca6669cce769e9b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 17 Aug 2025 11:21:04 +0200 Subject: [PATCH 1444/1476] format nix code after nixfmt update --- framework/13-inch/common/amd.nix | 25 ++++++++-------- framework/13-inch/common/intel.nix | 19 ++++++------ framework/16-inch/common/amd.nix | 25 ++++++++-------- lenovo/legion/15ach6h/nvidia/default.nix | 15 +++++----- lenovo/legion/16ach6h/nvidia/default.nix | 15 +++++----- lenovo/legion/16achg6/nvidia/default.nix | 15 +++++----- lenovo/thinkpad/p14s/amd/gen2/default.nix | 7 +++-- .../surface/common/kernel/linux-package.nix | 25 ++++++++-------- mnt/reform/rk3588/installer.nix | 3 +- nxp/common/bsp/imx-firmware.nix | 29 +++++++++--------- nxp/common/bsp/imx-optee-builder.nix | 30 +++++++++---------- nxp/common/bsp/imx-uboot-builder.nix | 3 +- pine64/star64/linux-5.15.nix | 3 +- 13 files changed, 105 insertions(+), 109 deletions(-) diff --git a/framework/13-inch/common/amd.nix b/framework/13-inch/common/amd.nix index ae35fffe..4a89f8da 100644 --- a/framework/13-inch/common/amd.nix +++ b/framework/13-inch/common/amd.nix @@ -6,19 +6,18 @@ ../../../common/gpu/amd ]; - boot.kernelParams = - [ - # There seems to be an issue with panel self-refresh (PSR) that - # causes hangs for users. - # - # https://community.frame.work/t/fedora-kde-becomes-suddenly-slow/58459 - # https://gitlab.freedesktop.org/drm/amd/-/issues/3647 - "amdgpu.dcdebugmask=0x10" - ] - # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ - ++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") [ - "rtc_cmos.use_acpi_alarm=1" - ]; + boot.kernelParams = [ + # There seems to be an issue with panel self-refresh (PSR) that + # causes hangs for users. + # + # https://community.frame.work/t/fedora-kde-becomes-suddenly-slow/58459 + # https://gitlab.freedesktop.org/drm/amd/-/issues/3647 + "amdgpu.dcdebugmask=0x10" + ] + # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ + ++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") [ + "rtc_cmos.use_acpi_alarm=1" + ]; # AMD has better battery life with PPD over TLP: # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 diff --git a/framework/13-inch/common/intel.nix b/framework/13-inch/common/intel.nix index 6248e75f..c46652cb 100644 --- a/framework/13-inch/common/intel.nix +++ b/framework/13-inch/common/intel.nix @@ -9,16 +9,15 @@ ../../../common/cpu/intel ]; - boot.kernelParams = - [ - # For Power consumption - # https://community.frame.work/t/linux-battery-life-tuning/6665/156 - "nvme.noacpi=1" - ] - # Fixes a regression in s2idle, making it more power efficient than deep sleep - # Update 04/2024: It appears that s2idle-regression got fixed in newer kernel-versions (SebTM) - # (see: https://github.com/NixOS/nixos-hardware/pull/903#discussion_r1556096657) - ++ lib.lists.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") "acpi_osi=\"!Windows 2020\""; + boot.kernelParams = [ + # For Power consumption + # https://community.frame.work/t/linux-battery-life-tuning/6665/156 + "nvme.noacpi=1" + ] + # Fixes a regression in s2idle, making it more power efficient than deep sleep + # Update 04/2024: It appears that s2idle-regression got fixed in newer kernel-versions (SebTM) + # (see: https://github.com/NixOS/nixos-hardware/pull/903#discussion_r1556096657) + ++ lib.lists.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") "acpi_osi=\"!Windows 2020\""; # Requires at least 5.16 for working wi-fi and bluetooth. # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 diff --git a/framework/16-inch/common/amd.nix b/framework/16-inch/common/amd.nix index ae35fffe..4a89f8da 100644 --- a/framework/16-inch/common/amd.nix +++ b/framework/16-inch/common/amd.nix @@ -6,19 +6,18 @@ ../../../common/gpu/amd ]; - boot.kernelParams = - [ - # There seems to be an issue with panel self-refresh (PSR) that - # causes hangs for users. - # - # https://community.frame.work/t/fedora-kde-becomes-suddenly-slow/58459 - # https://gitlab.freedesktop.org/drm/amd/-/issues/3647 - "amdgpu.dcdebugmask=0x10" - ] - # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ - ++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") [ - "rtc_cmos.use_acpi_alarm=1" - ]; + boot.kernelParams = [ + # There seems to be an issue with panel self-refresh (PSR) that + # causes hangs for users. + # + # https://community.frame.work/t/fedora-kde-becomes-suddenly-slow/58459 + # https://gitlab.freedesktop.org/drm/amd/-/issues/3647 + "amdgpu.dcdebugmask=0x10" + ] + # Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/ + ++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") [ + "rtc_cmos.use_acpi_alarm=1" + ]; # AMD has better battery life with PPD over TLP: # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 diff --git a/lenovo/legion/15ach6h/nvidia/default.nix b/lenovo/legion/15ach6h/nvidia/default.nix index 37dd1148..25bf31bf 100644 --- a/lenovo/legion/15ach6h/nvidia/default.nix +++ b/lenovo/legion/15ach6h/nvidia/default.nix @@ -10,12 +10,11 @@ # remove all packages for amd igpu. I only removed amdgpu from # services.xserver.videoDrivers by overriding. This is because the specialization # of nix cannot implement such an operation as canceling an import. - hardware = - { - nvidia.prime.offload.enable = false; - } - // lib.optionalAttrs (options ? amdgpu.opencl.enable) { - # introduced in https://github.com/NixOS/nixpkgs/pull/319865 - amdgpu.opencl.enable = lib.mkDefault false; - }; + hardware = { + nvidia.prime.offload.enable = false; + } + // lib.optionalAttrs (options ? amdgpu.opencl.enable) { + # introduced in https://github.com/NixOS/nixpkgs/pull/319865 + amdgpu.opencl.enable = lib.mkDefault false; + }; } diff --git a/lenovo/legion/16ach6h/nvidia/default.nix b/lenovo/legion/16ach6h/nvidia/default.nix index 37dd1148..25bf31bf 100644 --- a/lenovo/legion/16ach6h/nvidia/default.nix +++ b/lenovo/legion/16ach6h/nvidia/default.nix @@ -10,12 +10,11 @@ # remove all packages for amd igpu. I only removed amdgpu from # services.xserver.videoDrivers by overriding. This is because the specialization # of nix cannot implement such an operation as canceling an import. - hardware = - { - nvidia.prime.offload.enable = false; - } - // lib.optionalAttrs (options ? amdgpu.opencl.enable) { - # introduced in https://github.com/NixOS/nixpkgs/pull/319865 - amdgpu.opencl.enable = lib.mkDefault false; - }; + hardware = { + nvidia.prime.offload.enable = false; + } + // lib.optionalAttrs (options ? amdgpu.opencl.enable) { + # introduced in https://github.com/NixOS/nixpkgs/pull/319865 + amdgpu.opencl.enable = lib.mkDefault false; + }; } diff --git a/lenovo/legion/16achg6/nvidia/default.nix b/lenovo/legion/16achg6/nvidia/default.nix index d279b6a2..58b7ad23 100644 --- a/lenovo/legion/16achg6/nvidia/default.nix +++ b/lenovo/legion/16achg6/nvidia/default.nix @@ -3,12 +3,11 @@ { imports = [ ../hybrid ]; services.xserver.videoDrivers = [ "nvidia" ]; - hardware = - { - nvidia.prime.offload.enable = false; - } - // lib.optionalAttrs (options ? amdgpu.opencl.enable) { - # introduced in https://github.com/NixOS/nixpkgs/pull/319865 - amdgpu.opencl.enable = lib.mkDefault false; - }; + hardware = { + nvidia.prime.offload.enable = false; + } + // lib.optionalAttrs (options ? amdgpu.opencl.enable) { + # introduced in https://github.com/NixOS/nixpkgs/pull/319865 + amdgpu.opencl.enable = lib.mkDefault false; + }; } diff --git a/lenovo/thinkpad/p14s/amd/gen2/default.nix b/lenovo/thinkpad/p14s/amd/gen2/default.nix index b79e1cf3..a1cd731c 100644 --- a/lenovo/thinkpad/p14s/amd/gen2/default.nix +++ b/lenovo/thinkpad/p14s/amd/gen2/default.nix @@ -14,9 +14,10 @@ # amdgpu.backlight=0 makes the backlight work # acpi_backlight=none allows the backlight save/load systemd service to work on older kernel versions - boot.kernelParams = - [ "amdgpu.backlight=0" ] - ++ lib.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.1.6") "acpi_backlight=none"; + boot.kernelParams = [ + "amdgpu.backlight=0" + ] + ++ lib.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.1.6") "acpi_backlight=none"; # For mainline support of rtw89 wireless networking boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; diff --git a/microsoft/surface/common/kernel/linux-package.nix b/microsoft/surface/common/kernel/linux-package.nix index a66aabc4..f9f96184 100644 --- a/microsoft/surface/common/kernel/linux-package.nix +++ b/microsoft/surface/common/kernel/linux-package.nix @@ -24,19 +24,18 @@ let let inherit (builtins) removeAttrs; - args' = - { - inherit - src - version - modDirVersion - kernelPatches - ; - } - // removeAttrs args [ - "url" - "sha256" - ]; + args' = { + inherit + src + version + modDirVersion + kernelPatches + ; + } + // removeAttrs args [ + "url" + "sha256" + ]; linuxPackage = buildLinux args'; linuxPackages' = recurseIntoAttrs (linuxPackagesFor linuxPackage); in diff --git a/mnt/reform/rk3588/installer.nix b/mnt/reform/rk3588/installer.nix index af7c5580..4e0c12c0 100644 --- a/mnt/reform/rk3588/installer.nix +++ b/mnt/reform/rk3588/installer.nix @@ -139,7 +139,8 @@ device = "/iso/nix-store.squashfs"; options = [ "loop" - ] ++ lib.optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2") "threads=multi"; + ] + ++ lib.optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2") "threads=multi"; neededForBoot = true; }; diff --git a/nxp/common/bsp/imx-firmware.nix b/nxp/common/bsp/imx-firmware.nix index 46e905f8..c2d6a8ed 100644 --- a/nxp/common/bsp/imx-firmware.nix +++ b/nxp/common/bsp/imx-firmware.nix @@ -47,21 +47,20 @@ pkgs.stdenv.mkDerivation rec { ${firmwareSeco} --auto-accept --force ''; - filesToInstall = - [ - "firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/dpfw.bin" - "firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/hdmi?xfw.bin" - ] - ++ pkgs.lib.optional (targetBoard == "imx8qm") ( - "imx-sc-firmware-${fwScVersion}/mx8qm-mek-scfw-tcm.bin" - + " " - + "imx-seco-${fwSecoVersion}/firmware/seco/mx8qmb0-ahab-container.img" - ) - ++ pkgs.lib.optional (targetBoard == "imx8qxp") ( - "imx-sc-firmware-${fwScVersion}/mx8qx-mek-scfw-tcm.bin" - + " " - + "imx-seco-${fwSecoVersion}/firmware/seco/mx8qxc0-ahab-container.img" - ); + filesToInstall = [ + "firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/dpfw.bin" + "firmware-imx-${fwHdmiVersion}/firmware/hdmi/cadence/hdmi?xfw.bin" + ] + ++ pkgs.lib.optional (targetBoard == "imx8qm") ( + "imx-sc-firmware-${fwScVersion}/mx8qm-mek-scfw-tcm.bin" + + " " + + "imx-seco-${fwSecoVersion}/firmware/seco/mx8qmb0-ahab-container.img" + ) + ++ pkgs.lib.optional (targetBoard == "imx8qxp") ( + "imx-sc-firmware-${fwScVersion}/mx8qx-mek-scfw-tcm.bin" + + " " + + "imx-seco-${fwSecoVersion}/firmware/seco/mx8qxc0-ahab-container.img" + ); installPhase = '' mkdir -p $out diff --git a/nxp/common/bsp/imx-optee-builder.nix b/nxp/common/bsp/imx-optee-builder.nix index c76024b9..7d506fbe 100644 --- a/nxp/common/bsp/imx-optee-builder.nix +++ b/nxp/common/bsp/imx-optee-builder.nix @@ -61,20 +61,19 @@ pkgs.stdenv.mkDerivation { --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp ''; - makeFlags = - [ - "PLATFORM=${platform}" - ] - ++ lib.optionals (!hasFullPlatform) [ - "PLATFORM_FLAVOR=${flavor}" - ] - ++ [ - "CFG_ARM64_core=y" - "CFG_TEE_TA_LOG_LEVEL=0" - "CFG_TEE_CORE_LOG_LEVEL=0" - "CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}" - "CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}" - ]; + makeFlags = [ + "PLATFORM=${platform}" + ] + ++ lib.optionals (!hasFullPlatform) [ + "PLATFORM_FLAVOR=${flavor}" + ] + ++ [ + "CFG_ARM64_core=y" + "CFG_TEE_TA_LOG_LEVEL=0" + "CFG_TEE_CORE_LOG_LEVEL=0" + "CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}" + "CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}" + ]; installPhase = '' mkdir -p $out @@ -85,5 +84,6 @@ pkgs.stdenv.mkDerivation { homepage = "https://github.com/nxp-imx/imx-optee-os"; license = [ lib.licenses.bsd2 ]; platforms = [ "aarch64-linux" ]; - } // meta; + } + // meta; } diff --git a/nxp/common/bsp/imx-uboot-builder.nix b/nxp/common/bsp/imx-uboot-builder.nix index 6d8a5960..87bb7c22 100644 --- a/nxp/common/bsp/imx-uboot-builder.nix +++ b/nxp/common/bsp/imx-uboot-builder.nix @@ -57,7 +57,8 @@ stdenv.mkDerivation { gnutls perl efitools - ] ++ extraNativeBuildInputs; + ] + ++ extraNativeBuildInputs; depsBuildBuild = [ buildPackages.stdenv.cc ]; hardeningDisable = [ "all" ]; diff --git a/pine64/star64/linux-5.15.nix b/pine64/star64/linux-5.15.nix index 28d9adbb..39d8cedc 100644 --- a/pine64/star64/linux-5.15.nix +++ b/pine64/star64/linux-5.15.nix @@ -45,7 +45,8 @@ let }; } { patch = ./irq-desc-to-data.patch; } - ] ++ kernelPatches; + ] + ++ kernelPatches; structuredExtraConfig = with lib.kernel; { # A ton of stuff just does not build. We disable it all. From 779c16f6042d35d57d931dbaac4aa3643c00dffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 17 Aug 2025 11:40:21 +0200 Subject: [PATCH 1445/1476] ci: show github errors nicer formatted --- tests/run.py | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/tests/run.py b/tests/run.py index 6bb49e88..86214756 100755 --- a/tests/run.py +++ b/tests/run.py @@ -3,6 +3,7 @@ import argparse import json import multiprocessing +import os import shlex import subprocess import sys @@ -16,6 +17,37 @@ GREEN = "\033[92m" RED = "\033[91m" RESET = "\033[0m" +def is_github_actions() -> bool: + """Check if running in GitHub Actions environment.""" + return os.getenv("GITHUB_ACTIONS") == "true" + +def github_error(message: str, title: str = "") -> None: + """Output GitHub Actions error annotation.""" + if title: + print(f"::error title={title}::{message}") + else: + print(f"::error::{message}") + +def github_warning(message: str, title: str = "") -> None: + """Output GitHub Actions warning annotation.""" + if title: + print(f"::warning title={title}::{message}") + else: + print(f"::warning::{message}") + +def format_nix_error(error_text: str) -> str: + """Format nix evaluation error for better readability.""" + lines = error_text.strip().split('\n') + # Try to extract the most relevant error line + for line in lines: + if 'error:' in line.lower(): + return line.strip() + # If no specific error line found, return first non-empty line + for line in lines: + if line.strip(): + return line.strip() + return error_text.strip() + def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser(description="Run hardware tests") parser.add_argument( @@ -63,8 +95,19 @@ def run_eval_test(gcroot_dir: Path, jobs: int) -> list[str]: attr = data.get("attr") if "error" in data: failed_profiles.append(attr) + error_msg = data['error'] + formatted_error = format_nix_error(error_msg) + + # Output for terminal print(f"{RED}FAIL {attr}:{RESET}", file=sys.stderr) - print(f"{RED}{data['error']}{RESET}", file=sys.stderr) + print(f"{RED}{error_msg}{RESET}", file=sys.stderr) + + # Output for GitHub Actions + if is_github_actions(): + github_error( + formatted_error, + title=f"Hardware profile evaluation failed: {attr}" + ) else: print(f"{GREEN}OK {attr}{RESET}") return failed_profiles @@ -80,9 +123,18 @@ def main() -> None: failed_profiles = run_eval_test(gcroot_dir, args.jobs) if len(failed_profiles) > 0: - print(f"\n{RED}The following {len(failed_profiles)} test(s) failed:{RESET}") + failure_msg = f"The following {len(failed_profiles)} test(s) failed:" + print(f"\n{RED}{failure_msg}{RESET}") for profile in failed_profiles: print(f" '{profile}'") + + # GitHub Actions summary + if is_github_actions(): + github_error( + f"{failure_msg} {', '.join(failed_profiles)}", + title="Hardware Profile Tests Failed" + ) + sys.exit(1) From e214e292a6489251ca7c8b5bbeda1ddd0eaade61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 30 Oct 2025 12:38:59 +0100 Subject: [PATCH 1446/1476] also enable formatter on macOS --- flake.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index c88aa593..ce7425b9 100644 --- a/flake.nix +++ b/flake.nix @@ -16,7 +16,11 @@ "x86_64-linux" ]; - formatSystems = [ "aarch64-linux" "x86_64-linux" ]; + formatSystems = [ + "aarch64-linux" + "x86_64-linux" + "aarch64-darwin" + ]; # Helper to iterate over systems eachSystem = From b09586b1011846db568c11f41c37c9b375321934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 30 Oct 2025 13:03:59 +0100 Subject: [PATCH 1447/1476] Remove insecure broadcom-sta driver from hardware profiles The broadcom-sta driver package is marked as insecure due to CVE-2019-9501 and CVE-2019-9502 (heap buffer overflow vulnerabilities allowing remote code execution). The driver is also unmaintained and incompatible with modern Linux kernel security mitigations. Removed broadcom_sta from extraModulePackages and the corresponding "wl" kernel module. This resolves test failures where Nixpkgs refuses to evaluate configurations containing this insecure package. --- apple/imac/14-2/default.nix | 1 - apple/macbook-air/6/default.nix | 2 -- apple/macbook-pro/11-1/default.nix | 4 ---- dell/inspiron/3442/default.nix | 6 ------ dell/xps/13-9343/default.nix | 3 --- 5 files changed, 16 deletions(-) diff --git a/apple/imac/14-2/default.nix b/apple/imac/14-2/default.nix index c20acfd7..5dd218c5 100644 --- a/apple/imac/14-2/default.nix +++ b/apple/imac/14-2/default.nix @@ -29,7 +29,6 @@ "bcma" ]; kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest; - extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; }; hardware = { diff --git a/apple/macbook-air/6/default.nix b/apple/macbook-air/6/default.nix index 3e927352..67f3a706 100644 --- a/apple/macbook-air/6/default.nix +++ b/apple/macbook-air/6/default.nix @@ -3,8 +3,6 @@ { imports = [ ../. ]; - boot.kernelModules = [ "wl" ]; - boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; boot.blacklistedKernelModules = [ "bcma" ]; boot = { diff --git a/apple/macbook-pro/11-1/default.nix b/apple/macbook-pro/11-1/default.nix index 6c9509b2..95f8c289 100644 --- a/apple/macbook-pro/11-1/default.nix +++ b/apple/macbook-pro/11-1/default.nix @@ -6,9 +6,5 @@ ../../../common/cpu/intel/haswell ]; - # broadcom-wl hardware.enableRedistributableFirmware = lib.mkDefault true; - # nixos-generate-config doesn't detect this automatically. - boot.extraModulePackages = with config.boot.kernelPackages; [ broadcom_sta ]; - boot.kernelModules = [ "wl" ]; } diff --git a/dell/inspiron/3442/default.nix b/dell/inspiron/3442/default.nix index 0d298ff3..6aefb56e 100644 --- a/dell/inspiron/3442/default.nix +++ b/dell/inspiron/3442/default.nix @@ -12,10 +12,4 @@ fwupd.enable = lib.mkDefault true; thermald.enable = lib.mkDefault true; }; - - boot = { - # needs to be explicitly loaded or else bluetooth/wifi won't work. - kernelModules = [ "wl" ]; - extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; - }; } diff --git a/dell/xps/13-9343/default.nix b/dell/xps/13-9343/default.nix index e98bb09b..28d6e22f 100644 --- a/dell/xps/13-9343/default.nix +++ b/dell/xps/13-9343/default.nix @@ -13,11 +13,8 @@ }; boot = { - # needs to be explicitly loaded or else bluetooth/wifi won't work kernelModules = [ "kvm-intel" - "wl" ]; - extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; }; } From 3beac2438b1d9159eb1d2038f01fae91308f5835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 30 Oct 2025 13:12:15 +0100 Subject: [PATCH 1448/1476] nix-eval-job: disable eval-cache in ci, there is no cache, so it's just overhead and prints warnings. --- tests/run.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/run.py b/tests/run.py index 86214756..786e99bd 100755 --- a/tests/run.py +++ b/tests/run.py @@ -69,8 +69,8 @@ def run_eval_test(gcroot_dir: Path, jobs: int) -> list[str]: failed_profiles = [] cmd = [ "nix-eval-jobs", - "--extra-experimental-features", - "flakes", + "--extra-experimental-features", "flakes", + "--option", "eval-cache", "false", "--gc-roots-dir", str(gcroot_dir), "--max-memory-size", @@ -97,11 +97,11 @@ def run_eval_test(gcroot_dir: Path, jobs: int) -> list[str]: failed_profiles.append(attr) error_msg = data['error'] formatted_error = format_nix_error(error_msg) - + # Output for terminal print(f"{RED}FAIL {attr}:{RESET}", file=sys.stderr) print(f"{RED}{error_msg}{RESET}", file=sys.stderr) - + # Output for GitHub Actions if is_github_actions(): github_error( @@ -127,14 +127,14 @@ def main() -> None: print(f"\n{RED}{failure_msg}{RESET}") for profile in failed_profiles: print(f" '{profile}'") - + # GitHub Actions summary if is_github_actions(): github_error( f"{failure_msg} {', '.join(failed_profiles)}", title="Hardware Profile Tests Failed" ) - + sys.exit(1) From caacab410f68fb620af6c7fe12f64564866271d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 30 Oct 2025 13:35:10 +0100 Subject: [PATCH 1449/1476] speed up ci: run nix-eval-jobs with no-instantiate --- tests/run.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/run.py b/tests/run.py index 786e99bd..477a3735 100755 --- a/tests/run.py +++ b/tests/run.py @@ -69,6 +69,7 @@ def run_eval_test(gcroot_dir: Path, jobs: int) -> list[str]: failed_profiles = [] cmd = [ "nix-eval-jobs", + "--no-instantiate", "--extra-experimental-features", "flakes", "--option", "eval-cache", "false", "--gc-roots-dir", From f6299de29d7815ad05676d7ae733e03a05bde073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 30 Oct 2025 14:29:33 +0100 Subject: [PATCH 1450/1476] bump nixpkgs --- tests/flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/flake.lock b/tests/flake.lock index da5ee417..558576bc 100644 --- a/tests/flake.lock +++ b/tests/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixos-stable": { "locked": { - "lastModified": 1755274400, - "narHash": "sha256-rTInmnp/xYrfcMZyFMH3kc8oko5zYfxsowaLv1LVobY=", + "lastModified": 1761597516, + "narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ad7196ae55c295f53a7d1ec39e4a06d922f3b899", + "rev": "daf6dc47aa4b44791372d6139ab7b25269184d55", "type": "github" }, "original": { @@ -18,11 +18,11 @@ }, "nixos-unstable-small": { "locked": { - "lastModified": 1755375481, - "narHash": "sha256-43PgCQFgFD1nM/7dncytV0c5heNHe/gXrEud18ZWcZU=", + "lastModified": 1761789293, + "narHash": "sha256-zwQKLaUgHSpY6SvB/MDgPYRPomWAmbkS3Xfo6JvFVOA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "35f1742e4f1470817ff8203185e2ce0359947f12", + "rev": "8d42228a0de7c23b012e2f7dd963425a372e1b0e", "type": "github" }, "original": { @@ -46,11 +46,11 @@ ] }, "locked": { - "lastModified": 1750931469, - "narHash": "sha256-0IEdQB1nS+uViQw4k3VGUXntjkDp7aAlqcxdewb/hAc=", + "lastModified": 1761311587, + "narHash": "sha256-Msq86cR5SjozQGCnC6H8C+0cD4rnx91BPltZ9KK613Y=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "ac8e6f32e11e9c7f153823abc3ab007f2a65d3e1", + "rev": "2eddae033e4e74bf581c2d1dfa101f9033dbd2dc", "type": "github" }, "original": { From fe21eda733108aaf2e12c7a37203b86f53350a3d Mon Sep 17 00:00:00 2001 From: Govind Singh Date: Thu, 23 Oct 2025 09:28:48 +0400 Subject: [PATCH 1451/1476] Add support for UCM-iMX95 Evaluation Kit platform The CompuLab UCM-iMX95 Evaluation Kit provides a platform for comprehensive evaluation of the NXP i.MX95 application processor. This change adds support in NixOS hardware to provide a template for customized i.MX95-based platforms. UCM-iMX95: https://www.compulab.com/products/som-evaluation-kits/ucm-imx95-evaluation-kit/ Signed-off-by: Govind Singh --- compulab/ucm-imx95/bsp/ucm-imx95-atf.nix | 57 ++++++++++++ compulab/ucm-imx95/bsp/ucm-imx95-boot.nix | 87 +++++++++++++++++ compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix | 24 +++++ compulab/ucm-imx95/bsp/ucm-imx95-linux.nix | 62 +++++++++++++ compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix | 63 +++++++++++++ compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix | 63 +++++++++++++ compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix | 75 +++++++++++++++ compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix | 79 ++++++++++++++++ compulab/ucm-imx95/bsp/ucm-imx95-uboot.nix | 93 +++++++++++++++++++ compulab/ucm-imx95/default.nix | 19 ++++ compulab/ucm-imx95/modules.nix | 17 ++++ compulab/ucm-imx95/overlay.nix | 3 + flake.nix | 1 + 13 files changed, 643 insertions(+) create mode 100644 compulab/ucm-imx95/bsp/ucm-imx95-atf.nix create mode 100644 compulab/ucm-imx95/bsp/ucm-imx95-boot.nix create mode 100644 compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix create mode 100644 compulab/ucm-imx95/bsp/ucm-imx95-linux.nix create mode 100644 compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix create mode 100644 compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix create mode 100644 compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix create mode 100644 compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix create mode 100644 compulab/ucm-imx95/bsp/ucm-imx95-uboot.nix create mode 100644 compulab/ucm-imx95/default.nix create mode 100644 compulab/ucm-imx95/modules.nix create mode 100644 compulab/ucm-imx95/overlay.nix diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-atf.nix b/compulab/ucm-imx95/bsp/ucm-imx95-atf.nix new file mode 100644 index 00000000..fea07f79 --- /dev/null +++ b/compulab/ucm-imx95/bsp/ucm-imx95-atf.nix @@ -0,0 +1,57 @@ +{ + lib, + fetchgit, + stdenv, + buildPackages, + pkgsCross, + openssl, +}: + +let + target-board = "imx95"; +in +stdenv.mkDerivation rec { + pname = "imx95-atf"; + version = "2.13.0"; + platform = target-board; + enableParallelBuilding = true; + + src = fetchgit { + url = "https://github.com/nxp-imx/imx-atf.git"; + rev = "28affcae957cb8194917b5246276630f9e6343e1"; + sha256 = "sha256-a8F+Lf8pwML+tCwawS0N/mrSXWPmFhlUeOg0MCRK3VE="; + }; + + # Compiler dependencies + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ pkgsCross.aarch64-embedded.stdenv.cc ]; + + buildInputs = [ openssl ]; + + makeFlags = [ + "HOSTCC=$(CC_FOR_BUILD)" + "CROSS_COMPILE=${pkgsCross.aarch64-embedded.stdenv.cc.targetPrefix}" + "PLAT=${platform}" + "SPD=opteed" + "bl31" + "LDFLAGS=-no-warn-rwx-segments" + ]; + + installPhase = '' + runHook preInstall + mkdir -p $out + cp build/${target-board}/release/bl31.bin $out + runHook postInstall + ''; + + hardeningDisable = [ "all" ]; + dontStrip = true; + + meta = with lib; { + homepage = "https://github.com/nxp-imx/imx-atf"; + description = "Reference implementation of secure world software for ARMv8-A"; + license = [ licenses.bsd3 ]; + maintainers = with maintainers; [ govindsi ]; + platforms = [ "aarch64-linux" ]; + }; +} diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix b/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix new file mode 100644 index 00000000..feedebaf --- /dev/null +++ b/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix @@ -0,0 +1,87 @@ +{ + pkgs, +}: +with pkgs; +let + + imx95-atf = pkgs.callPackage ./ucm-imx95-atf.nix { }; + imx95-firmware = pkgs.callPackage ./ucm-imx95-firmware.nix { }; + imx95-uboot = pkgs.callPackage ./ucm-imx95-uboot.nix { }; + imx95-optee-os = pkgs.callPackage ./ucm-imx95-optee-os.nix { }; + imx95-sm-fw = pkgs.callPackage ./ucm-imx95-sm-fw.nix { }; + imx95-oei-ddr = pkgs.callPackage ./ucm-imx95-oei-ddr.nix { }; + imx95-oei-tcm = pkgs.callPackage ./ucm-imx95-oei-tcm.nix { }; + src = pkgs.fetchgit { + url = "https://github.com/nxp-imx/imx-mkimage.git"; + #tag: lf-6.6.36 + rev = "4622115cbc037f79039c4522faeced4aabea986b"; + sha256 = "sha256-2gz0GxlB3jwy8PC6+cP3+MpyUzqE1vDTw8nuxK6vo3g="; + }; + shortRev = builtins.substring 0 8 src.rev; +in +{ + imx95-boot = pkgs.stdenv.mkDerivation rec { + inherit src; + name = "imx95-mkimage"; + version = "lf-6.6.36"; + + postPatch = '' + substituteInPlace Makefile \ + --replace 'git rev-parse --short=8 HEAD' 'echo ${shortRev}' + substituteInPlace Makefile \ + --replace 'CC = gcc' 'CC = clang' + substituteInPlace iMX95/soc.mak \ + --replace 'xxd' "${pkgs.vim.xxd}/bin/xxd" + substituteInPlace scripts/fspi_fcb_gen.sh \ + --replace 'xxd' "${pkgs.vim.xxd}/bin/xxd" + substituteInPlace scripts/fspi_packer.sh \ + --replace 'xxd' "${pkgs.vim.xxd}/bin/xxd" + patchShebangs scripts + ''; + + nativeBuildInputs = [ + clang + git + dtc + ]; + + buildInputs = [ + git + glibc.static + zlib + zlib.static + ]; + + buildPhase = '' + runHook preBuild + + if [ -f ${imx95-uboot}/u-boot.bin ]; then + install -m 0644 ${imx95-uboot}/u-boot.bin ./iMX95/u-boot.bin + else + cat ${imx95-uboot}/u-boot-nodtb.bin ${imx95-uboot}/ucm-imx95.dtb > ./iMX95/u-boot.bin + fi + install -m 0644 ${imx95-uboot}/u-boot-spl.bin ./iMX95/u-boot-spl.bin + install -m 0644 ${imx95-uboot}/u-boot-nodtb.bin ./iMX95/u-boot-nodtb.bin + install -m 0644 ${imx95-uboot}/ucm-imx95.dtb ./iMX95/ucm-imx95.dtb + install -m 0644 ${imx95-optee-os}/tee.bin ./iMX95/tee.bin + install -m 0644 ${imx95-atf}/bl31.bin ./iMX95/bl31.bin + install -m 0644 ${imx95-sm-fw}/m33_image.bin ./iMX95/m33_image.bin + install -m 0644 ${imx95-oei-ddr}/oei-m33-ddr.bin ./iMX95/oei-m33-ddr.bin + install -m 0644 ${imx95-oei-tcm}/oei-m33-tcm.bin ./iMX95/oei-m33-tcm.bin + install -m 0644 ${imx95-firmware}/ucm-imx95/lpddr5* ./iMX95/ + install -m 0644 ${imx95-firmware}/ucm-imx95/mx95a0-ahab-container.img ./iMX95/ + install -m 0644 ${imx95-firmware}/ucm-imx95/m7_image.bin ./iMX95/ + + make SOC=iMX95 REV=A0 OEI=YES LPDDR_TYPE=lpddr5 flash_all + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/image + install -m 0644 ./iMX95/flash.bin $out/image + runHook postInstall + ''; + }; +} diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix b/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix new file mode 100644 index 00000000..18f3aa7c --- /dev/null +++ b/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: +with pkgs; +stdenv.mkDerivation rec { + pname = "comms-sbc-firmware"; + version = "v0_6.36"; + + src = builtins.fetchGit { + url = "git@github.com:tiiuae/comms-sbc-firmware.git"; + rev = "06394d6d983955734257fdc7f719e454a3ce07f4"; + }; + + nativeBuildInputs = [ + pkgs.rsync + pkgs.coreutils + ]; + dontUnpack = true; + dontStrip = true; + + installPhase = '' + mkdir -p $out + # copy everything except .git + rsync -a --exclude='.git' $src/ $out/ + ''; +} diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-linux.nix b/compulab/ucm-imx95/bsp/ucm-imx95-linux.nix new file mode 100644 index 00000000..8aa94c22 --- /dev/null +++ b/compulab/ucm-imx95/bsp/ucm-imx95-linux.nix @@ -0,0 +1,62 @@ +{ lib, pkgs, ... }@args: +with pkgs; +buildLinux ( + args + // rec { + version = "6.6.36"; + name = "imx95-linux"; + + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = version; + + defconfig = "compulab-mx95_defconfig"; + + # https://github.com/NixOS/nixpkgs/pull/366004 + # introduced a breaking change that if a module is declared but it is not being used it will faill. + ignoreConfigErrors = true; + + kernelPatches = [ + ]; + + autoModules = false; + + extraConfig = '' + CRYPTO_TLS m + TLS 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 + ''; + + src = fetchFromGitHub { + owner = "compulab-yokneam"; + repo = "linux-compulab"; + # tag: linux-compulab_6.6.36 + rev = "b93daaad0807fb15d4f3f1a6e5be843ac7532ef7"; + sha256 = "sha256-wCeuGXBTz3H6OFWBA1M1/t/9WgxBVjQ8FU/wvAUVW2w="; + }; + meta = with lib; { + homepage = "https://github.com/compulab-yokneam/linux-compulab"; + license = [ licenses.gpl2Only ]; + maintainers = with maintainers; [ govindsi ]; + platforms = [ "aarch64-linux" ]; + }; + } + // (args.argsOverride or { }) +) diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix b/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix new file mode 100644 index 00000000..d7b8868a --- /dev/null +++ b/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix @@ -0,0 +1,63 @@ +{ + lib, + pkgs, +}: +pkgs.stdenv.mkDerivation rec { + pname = "imx95-imx-oei"; + version = "lf-6.6.36-2.1.0"; + + nativeBuildInputs = [ + pkgs.buildPackages.python3 + pkgs.gcc-arm-embedded + ]; + + src = pkgs.fetchgit { + url = "https://github.com/nxp-imx/imx-oei.git"; + rev = "5fca9f47544d03c52ca371eadfffbfd2454e6925"; + sha256 = "sha256-Sb6u1NlhJpDCOKBu3HqUb4BLEy0F8LYVnJE0tRSvzWc="; + }; + + patches = [ + (pkgs.fetchpatch { + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap/recipes-bsp/imx-oei/imx-oei/0001-Add-CompuLab-lpddr5_timing.c.patch"; + sha256 = "sha256-6ZpBOXw2aIhD2i9Wx368xfHq6NvdZghWHU9u8+gRTj8="; + }) + (pkgs.fetchpatch { + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap/recipes-bsp/imx-oei/imx-oei/0002-board-mx95lp5-Fix-default-DDR_CONFIG-timing-name.patch"; + sha256 = "sha256-WZ/vYaTC2iKIC+jnHtnPriCxK9gjRsOv2Uy13Ye4698="; + }) + (pkgs.fetchpatch { + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap/recipes-bsp/imx-oei/imx-oei/0003-Add-CompuLab-lpddr5_timing_4g.c.patch"; + sha256 = "sha256-yyierv2USZlM8Cuxf4FDj4+UtILvJQH9BJSj+fmayL8="; + }) + ]; + + postPatch = '' + substituteInPlace oei/makefiles/build_info.mak \ + --replace "/bin/echo" "echo" + substituteInPlace Makefile \ + --replace "/bin/echo" "echo" + ''; + + makeFlags = [ + "board=mx95lp5" + "CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-" + "OEI_CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-" + "ARCH=arm" + "DDR_CONFIG=lpddr5_timing" + "oei=ddr" + ]; + + installPhase = '' + mkdir -p $out + cp build/mx95lp5/ddr/oei-m33-ddr.bin $out/ + ''; + + meta = with lib; { + homepage = "https://github.com/nxp-imx/imx-oei"; + description = "Optional Executable Image assembler for i.MX95 processors"; + license = [ licenses.bsd3 ]; + maintainers = with maintainers; [ govindsi ]; + platforms = [ "aarch64-linux" ]; + }; +} diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix b/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix new file mode 100644 index 00000000..e698990a --- /dev/null +++ b/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix @@ -0,0 +1,63 @@ +{ + lib, + pkgs, +}: +pkgs.stdenv.mkDerivation rec { + pname = "imx95-imx-oei-tcm"; + version = "lf-6.6.36-2.1.0"; + + nativeBuildInputs = [ + pkgs.buildPackages.python3 + pkgs.gcc-arm-embedded + ]; + + src = pkgs.fetchgit { + url = "https://github.com/nxp-imx/imx-oei.git"; + rev = "5fca9f47544d03c52ca371eadfffbfd2454e6925"; + sha256 = "sha256-Sb6u1NlhJpDCOKBu3HqUb4BLEy0F8LYVnJE0tRSvzWc="; + }; + + patches = [ + (pkgs.fetchpatch { + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap/recipes-bsp/imx-oei/imx-oei/0001-Add-CompuLab-lpddr5_timing.c.patch"; + sha256 = "sha256-6ZpBOXw2aIhD2i9Wx368xfHq6NvdZghWHU9u8+gRTj8="; + }) + (pkgs.fetchpatch { + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap/recipes-bsp/imx-oei/imx-oei/0002-board-mx95lp5-Fix-default-DDR_CONFIG-timing-name.patch"; + sha256 = "sha256-WZ/vYaTC2iKIC+jnHtnPriCxK9gjRsOv2Uy13Ye4698="; + }) + (pkgs.fetchpatch { + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap/recipes-bsp/imx-oei/imx-oei/0003-Add-CompuLab-lpddr5_timing_4g.c.patch"; + sha256 = "sha256-yyierv2USZlM8Cuxf4FDj4+UtILvJQH9BJSj+fmayL8="; + }) + ]; + + postPatch = '' + substituteInPlace oei/makefiles/build_info.mak \ + --replace "/bin/echo" "echo" + substituteInPlace Makefile \ + --replace "/bin/echo" "echo" + ''; + + makeFlags = [ + "board=mx95lp5" + "CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-" + "OEI_CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-" + "ARCH=arm" + "DDR_CONFIG=lpddr5_timing" + "oei=tcm" + ]; + + installPhase = '' + mkdir -p $out + cp build/mx95lp5/tcm/oei-m33-tcm.bin $out/ + ''; + + meta = with lib; { + homepage = "https://github.com/nxp-imx/imx-oei"; + description = "Optional Executable Image assembler for i.MX95 processors"; + license = [ licenses.bsd3 ]; + maintainers = with maintainers; [ govindsi ]; + platforms = [ "aarch64-linux" ]; + }; +} diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix b/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix new file mode 100644 index 00000000..bf6806a4 --- /dev/null +++ b/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix @@ -0,0 +1,75 @@ +{ + lib, + pkgs, +}: +let + inherit (pkgs.buildPackages) python3; + toolchain = pkgs.gccStdenv.cc; + binutils = pkgs.gccStdenv.cc.bintools.bintools_bin; + cpp = pkgs.gcc; +in +pkgs.stdenv.mkDerivation rec { + pname = "imx95-optee-os"; + version = "lf-6.6.36_2.1.0"; + + nativeBuildInputs = [ + python3 + ]; + + enableParallelBuilding = true; + + propagatedBuildInputs = with python3.pkgs; [ + pycryptodomex + pyelftools + cryptography + ]; + + src = pkgs.fetchgit { + url = "https://github.com/nxp-imx/imx-optee-os.git"; + rev = "612bc5a642a4608d282abeee2349d86de996d7ee"; + sha256 = "sha256-A7p3KPijwipivs9Qw9Mr62RWwaMBGTz7J8WP5JYoSOs="; + }; + meta = with lib; { + homepage = "https://github.com/nxp-imx/imx-optee-os"; + license = [ licenses.bsd2 ]; + maintainers = with maintainers; [ govindsi ]; + platforms = [ "aarch64-linux" ]; + }; + + postPatch = '' + substituteInPlace scripts/arm32_sysreg.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace scripts/gen_tee_bin.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace scripts/pem_to_pub_c.py \ + --replace '/usr/bin/env python3' '${python3}/bin/python' + substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ + --replace '/bin/bash' '${pkgs.bash}/bin/bash' + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar + substituteInPlace mk/gcc.mk \ + --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp + ''; + + makeFlags = [ + "PLATFORM=imx-mx95evk" + "CFG_ARM64_core=y" + "CFG_TEE_TA_LOG_LEVEL=0" + "CFG_TEE_CORE_LOG_LEVEL=0" + "CROSS_COMPILE=${toolchain}/bin/${toolchain.targetPrefix}" + "CROSS_COMPILE64=${toolchain}/bin/${toolchain.targetPrefix}" + ]; + + installPhase = '' + mkdir -p $out + cp ./out/arm-plat-imx/core/tee-raw.bin $out/tee.bin + ''; +} diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix b/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix new file mode 100644 index 00000000..2628f151 --- /dev/null +++ b/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix @@ -0,0 +1,79 @@ +{ + lib, + pkgs, +}: +pkgs.stdenv.mkDerivation rec { + pname = "imx95-sm-fw"; + version = "lf-6.6.36-2.1.0"; + + nativeBuildInputs = [ + pkgs.buildPackages.python3 + pkgs.gcc-arm-embedded + ]; + + propagatedBuildInputs = with pkgs.buildPackages.python3.pkgs; [ + pycryptodomex + pyelftools + cryptography + ]; + + src = pkgs.fetchgit { + url = "https://github.com/nxp-imx/imx-sm.git"; + rev = "709deccd9338399eb39b5cf99a60eab4fa60d539"; + sha256 = "sha256-02Cl+XhWGSFswspdBJ/4B/mBm4XTs/qKotx0BXMQpJk="; + }; + + patches = [ + (pkgs.fetchpatch { + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap-6.6.36-EVAL-UCM-iMX95-1.0/recipes-bsp/imx-system-manager/imx-system-manager/0001-Add-mcimx95cust-board.patch"; + sha256 = "sha256-zvZ4bNew+yRPmaZQMrAH087KpCLRqz6zdElfe72Dtuc="; + }) + (pkgs.fetchpatch { + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap-6.6.36-EVAL-UCM-iMX95-1.0/recipes-bsp/imx-system-manager/imx-system-manager/0002-Fix-null-pionter-except.patch"; + sha256 = "sha256-q72VEvJqm2CmOxdWMqGibgXS5lY08mC4srEcy00QdrE="; + }) + (pkgs.fetchpatch { + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap-6.6.36-EVAL-UCM-iMX95-1.0/recipes-bsp/imx-system-manager/imx-system-manager/0001-update-for-yocto-6.6.36-compatibility.patch"; + sha256 = "sha256-JzHqDiD/ZOu6VQQI0JxY17RQ3bA2t1aP3O1sjLPguWs="; + }) + (pkgs.fetchpatch { + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap-6.6.36-EVAL-UCM-iMX95-1.0/recipes-bsp/imx-system-manager/imx-system-manager/0003-sm-Disable-GPIO1-10-interrupt.patch"; + sha256 = "sha256-dhcDv7Uq856+MBonczMPznk+tuqUFxTcHiKLX+myCVA="; + }) + (pkgs.fetchpatch { + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap-6.6.36-EVAL-UCM-iMX95-1.0/recipes-bsp/imx-system-manager/imx-system-manager/0004-configs-mx95cust-change-LPTPM1-ownership.patch"; + sha256 = "sha256-NcLu6+zXpiSz1bHKW14Zuf6F/4pzKsekb+zaRtKjSTY="; + }) + ]; + + postPatch = '' + substituteInPlace sm/makefiles/gcc_cross.mak \ + --replace "\$(SM_CROSS_COMPILE)objcopy" ${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-objcopy + substituteInPlace sm/makefiles/build_info.mak \ + --replace "/bin/echo" "echo" + substituteInPlace sm/makefiles/gcc_cross.mak \ + --replace 'SM_CROSS_COMPILE ?= $(TOOLS)/arm-gnu-toolchain-*-none-eabi/bin/arm-none-eabi-' \ + 'SM_CROSS_COMPILE ?= $(CROSS_COMPILE)' + ''; + + makeFlags = [ + "config=mx95cust" + "M=2" + "CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-" + "CROSS_COMPILE64=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-" + "ARCH=arm" + ]; + + installPhase = '' + mkdir -p $out + cp build/mx95cust/m33_image.bin $out/ + ''; + + meta = with lib; { + homepage = "https://github.com/nxp-imx/imx-sm"; + description = "System Manager firmware for i.MX processors"; + license = [ licenses.bsd3 ]; + maintainers = with maintainers; [ govindsi ]; + platforms = [ "aarch64-linux" ]; + }; +} diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-uboot.nix b/compulab/ucm-imx95/bsp/ucm-imx95-uboot.nix new file mode 100644 index 00000000..68434e57 --- /dev/null +++ b/compulab/ucm-imx95/bsp/ucm-imx95-uboot.nix @@ -0,0 +1,93 @@ +{ + stdenv, + lib, + bison, + dtc, + fetchgit, + flex, + gnutls, + libuuid, + ncurses, + openssl, + which, + perl, + buildPackages, + efitools, +}: +let + ubsrc = fetchgit { + url = "https://github.com/compulab-yokneam/u-boot-compulab.git"; + # tag: lf_v2024.04 + rev = "824401fe487d7d3cbcf251bd60270bd7fe8d21d0"; + sha256 = "sha256-m+YW7+XF/jcNKfyb5533LXGyOWvStqY+MCczAdcNGZI="; + }; +in +stdenv.mkDerivation { + pname = "imx95-uboot"; + version = "2024.04"; + src = ubsrc; + + postPatch = '' + patchShebangs tools + patchShebangs scripts + ''; + + nativeBuildInputs = [ + bison + flex + openssl + which + ncurses + libuuid + gnutls + openssl + perl + efitools + ]; + + depsBuildBuild = [ buildPackages.stdenv.cc ]; + hardeningDisable = [ "all" ]; + enableParallelBuilding = true; + + makeFlags = [ + "DTC=${lib.getExe buildPackages.dtc}" + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" + ]; + + extraConfig = '' + CONFIG_USE_BOOTCOMMAND=y + CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x97000000; setenv fdt_addr_r 0x96000000; run distro_bootcmd; " + CONFIG_CMD_BOOTEFI_SELFTEST=y + CONFIG_CMD_BOOTEFI=y + CONFIG_EFI_LOADER=y + CONFIG_BLK=y + CONFIG_PARTITIONS=y + CONFIG_DM_DEVICE_REMOVE=n + CONFIG_CMD_CACHE=y + ''; + + passAsFile = [ "extraConfig" ]; + + configurePhase = '' + runHook preConfigure + + make ucm-imx95_defconfig + cat $extraConfigPath >> .config + + runHook postConfigure + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp ./u-boot-nodtb.bin $out + cp ./spl/u-boot-spl.bin $out + cp ./arch/arm/dts/ucm-imx95.dtb $out + cp .config $out + + runHook postInstall + ''; + + dontStrip = true; +} diff --git a/compulab/ucm-imx95/default.nix b/compulab/ucm-imx95/default.nix new file mode 100644 index 00000000..81fcb392 --- /dev/null +++ b/compulab/ucm-imx95/default.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: +{ + nixpkgs.overlays = [ + (import ./overlay.nix) + ]; + + imports = [ + ./modules.nix + ]; + + boot.loader.grub.extraFiles = { + "ucm-imx95.dtb" = "${pkgs.callPackage ./bsp/ucm-imx95-linux.nix { }}/dtbs/compulab/ucm-imx95.dtb"; + }; + + hardware.deviceTree = { + filter = "ucm-imx95.dtb"; + name = "ucm-imx95.dtb"; + }; +} diff --git a/compulab/ucm-imx95/modules.nix b/compulab/ucm-imx95/modules.nix new file mode 100644 index 00000000..c0e8f266 --- /dev/null +++ b/compulab/ucm-imx95/modules.nix @@ -0,0 +1,17 @@ +{ + pkgs, + lib, + ... +}: +{ + nixpkgs.hostPlatform = "aarch64-linux"; + + boot = { + kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/ucm-imx95-linux.nix { }); + initrd.includeDefaultModules = lib.mkForce false; + }; + + disabledModules = [ "profiles/all-hardware.nix" ]; + + hardware.deviceTree.enable = true; +} diff --git a/compulab/ucm-imx95/overlay.nix b/compulab/ucm-imx95/overlay.nix new file mode 100644 index 00000000..942a3711 --- /dev/null +++ b/compulab/ucm-imx95/overlay.nix @@ -0,0 +1,3 @@ +final: _prev: { + inherit (final.callPackage ./bsp/ucm-imx95-boot.nix { pkgs = final; }) imx95-boot; +} diff --git a/flake.nix b/flake.nix index ce7425b9..8f32fbbf 100644 --- a/flake.nix +++ b/flake.nix @@ -364,6 +364,7 @@ nxp-imx8mq-evk = import ./nxp/imx8mq-evk; nxp-imx8qm-mek = import ./nxp/imx8qm-mek; nxp-imx93-evk = import ./nxp/imx93-evk; + ucm-imx95 = import ./compulab/ucm-imx95; hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4; hardkernel-odroid-h3 = import ./hardkernel/odroid-h3; hardkernel-odroid-h4 = import ./hardkernel/odroid-h4; From a3576f0f3c7c77799c7d99b1dd30a8b3a00ef56d Mon Sep 17 00:00:00 2001 From: Govind Singh Date: Wed, 29 Oct 2025 22:58:31 +0400 Subject: [PATCH 1452/1476] chore: Add README for UCM-iMX95 SOM support Added README.md for UCM-iMX95 SOM support. --- compulab/README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 compulab/README.md diff --git a/compulab/README.md b/compulab/README.md new file mode 100644 index 00000000..69e79e1e --- /dev/null +++ b/compulab/README.md @@ -0,0 +1,29 @@ +# UCM-iMX95 SOM support + +## Supported devices +- [UCM-iMX95 System-on-Module](https://www.compulab.com/products/som-evaluation-kits/ucm-imx95-evaluation-kit/) (**ucm-imx95**) – based on the NXP i.MX95 SoC (A0 silicon), with device-specific boot components(OEI, SM, ATF), U-Boot, and Linux kernel support, including a NixOS configuration example. + +## How to use +This overlay provides configuration and hardware support for the **CompuLab UCM-iMX95** platform, based on the **NXP i.MX95 A0 silicon**. It enables generating NixOS images suitable for booting via U-Boot, using the CompuLab UCM-iMX95 Evaluation Kit carrier board. + +### Boot flow +The boot flow for the UCM-iMX95 platform follows the standard NXP i.MX95 sequence: + +Boot ROM → OEI (initially in TCM, then DDR) → System Manager (SM) → ARM Trusted Firmware (ATF) → U-Boot → Linux kernel → NixOS userspace + +Boot ROM initializes the SoC and loads OEI, which runs in TCM to perform early setup, then configures DDR and loads the System Manager (SM). SM completes SoC initialization and passes control to ATF, which handles secure world setup and then transfers execution to U-Boot, eventually booting the Linux kernel and NixOS root filesystem. + +### Example NixOS configuration +```nix +{ nixos-hardware, }: { + system = "aarch64-linux"; + modules = [ + nixos-hardware.nixosModules.ucm-imx95 + ]; +} +``` + +### Notes +- The configuration includes device-tree, kernel, and bootloader components are optimized for the UCM-iMX95 SoM and evk. +- The generated NixOS image supports booting from SD card or eMMC, depending on the hardware configuration. +- The boot components (OEI in TCM/DDR, SM, ATF, U-Boot) follow the standard NXP release layout for i.MX95 platforms. From 11ea8b847772a94e335d7a17137d5fcf592f682e Mon Sep 17 00:00:00 2001 From: Govind Singh Date: Thu, 30 Oct 2025 16:08:04 +0400 Subject: [PATCH 1453/1476] ucm-imx95: firmware: fetch firmware files from NXP release Fetch AHAB container, M7 firmware, and DDR PHY firmware binaries from the NXP release packages. The derivation extracts the correct LPDDR5 PHY images and selects the appropriate AHAB container for A0 or B0 silicon revisions. Signed-off-by: Govind Singh --- compulab/ucm-imx95/bsp/ucm-imx95-atf.nix | 7 ++- compulab/ucm-imx95/bsp/ucm-imx95-boot.nix | 11 ++-- compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix | 59 +++++++++++++++---- compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix | 5 +- compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix | 5 +- compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix | 7 ++- compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix | 5 +- compulab/ucm-imx95/bsp/ucm-imx95-uboot.nix | 7 ++- 8 files changed, 76 insertions(+), 30 deletions(-) diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-atf.nix b/compulab/ucm-imx95/bsp/ucm-imx95-atf.nix index fea07f79..d08a2c8e 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-atf.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-atf.nix @@ -1,6 +1,6 @@ { lib, - fetchgit, + fetchFromGitHub, stdenv, buildPackages, pkgsCross, @@ -16,8 +16,9 @@ stdenv.mkDerivation rec { platform = target-board; enableParallelBuilding = true; - src = fetchgit { - url = "https://github.com/nxp-imx/imx-atf.git"; + src = fetchFromGitHub { + owner = "nxp-imx"; + repo = "imx-atf"; rev = "28affcae957cb8194917b5246276630f9e6343e1"; sha256 = "sha256-a8F+Lf8pwML+tCwawS0N/mrSXWPmFhlUeOg0MCRK3VE="; }; diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix b/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix index feedebaf..30087b21 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix @@ -11,8 +11,9 @@ let imx95-sm-fw = pkgs.callPackage ./ucm-imx95-sm-fw.nix { }; imx95-oei-ddr = pkgs.callPackage ./ucm-imx95-oei-ddr.nix { }; imx95-oei-tcm = pkgs.callPackage ./ucm-imx95-oei-tcm.nix { }; - src = pkgs.fetchgit { - url = "https://github.com/nxp-imx/imx-mkimage.git"; + src = pkgs.fetchFromGitHub { + owner = "nxp-imx"; + repo = "imx-mkimage"; #tag: lf-6.6.36 rev = "4622115cbc037f79039c4522faeced4aabea986b"; sha256 = "sha256-2gz0GxlB3jwy8PC6+cP3+MpyUzqE1vDTw8nuxK6vo3g="; @@ -68,9 +69,9 @@ in install -m 0644 ${imx95-sm-fw}/m33_image.bin ./iMX95/m33_image.bin install -m 0644 ${imx95-oei-ddr}/oei-m33-ddr.bin ./iMX95/oei-m33-ddr.bin install -m 0644 ${imx95-oei-tcm}/oei-m33-tcm.bin ./iMX95/oei-m33-tcm.bin - install -m 0644 ${imx95-firmware}/ucm-imx95/lpddr5* ./iMX95/ - install -m 0644 ${imx95-firmware}/ucm-imx95/mx95a0-ahab-container.img ./iMX95/ - install -m 0644 ${imx95-firmware}/ucm-imx95/m7_image.bin ./iMX95/ + install -m 0644 ${imx95-firmware}/ddr/lpddr5* ./iMX95/ + install -m 0644 ${imx95-firmware}/ahab/mx95a0-ahab-container.img ./iMX95/ + install -m 0644 ${imx95-firmware}/m7_image.bin ./iMX95/ make SOC=iMX95 REV=A0 OEI=YES LPDDR_TYPE=lpddr5 flash_all diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix b/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix index 18f3aa7c..84a81f34 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix @@ -1,24 +1,63 @@ -{ pkgs, ... }: +{ + pkgs, + silicon ? "A0", + ... +}: + with pkgs; stdenv.mkDerivation rec { - pname = "comms-sbc-firmware"; - version = "v0_6.36"; + pname = "nxp-firmware-imx95"; + version = "nxp-firmware-8.28-994fa14"; - src = builtins.fetchGit { - url = "git@github.com:tiiuae/comms-sbc-firmware.git"; - rev = "06394d6d983955734257fdc7f719e454a3ce07f4"; + m7Firmware = fetchurl { + url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx95-m7-demo-25.09.00.bin"; + sha256 = "sha256-3nA6uka6WPtXH5aZhaaKHKRM0tJ0pxHQdPEupNic1Ks="; + }; + + ddrFirmware = fetchurl { + url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.28-994fa14.bin"; + sha256 = "sha256-VZlvNA6HglaFoAzTCZARiQZuyVRe5gdzT5QsPN5Nadw="; + }; + + ahabFirmware = fetchurl { + url = "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-ele-imx-2.0.2-89161a8.bin"; + sha256 = "sha256-LSnwpN42YroV9qfZBpcC1OrtQV2WoX8p1bEn8sb91jQ="; }; nativeBuildInputs = [ - pkgs.rsync - pkgs.coreutils + coreutils + bash ]; + dontUnpack = true; dontStrip = true; installPhase = '' mkdir -p $out - # copy everything except .git - rsync -a --exclude='.git' $src/ $out/ + export SILICON=${silicon} + + # M7 firmware + echo "Copying M7 firmware..." + cp ${m7Firmware} $out/m7_image.bin + + # DDR firmware + cp ${ddrFirmware} ./firmware-imx-8.28-994fa14.bin + chmod +x firmware-imx-8.28-994fa14.bin + ./firmware-imx-8.28-994fa14.bin --auto-accept + + mkdir -p $out/ddr + cp firmware-imx-8.28-994fa14/firmware/ddr/synopsys/lpddr5*v202409.bin $out/ddr/ + + # AHAB container + cp ${ahabFirmware} ./firmware-ele-imx-2.0.2-89161a8.bin + chmod +x firmware-ele-imx-2.0.2-89161a8.bin + ./firmware-ele-imx-2.0.2-89161a8.bin --auto-accept + + mkdir -p $out/ahab + if [ "$SILICON" = "A0" ]; then + cp firmware-ele-imx-2.0.2-89161a8/mx95a0-ahab-container.img $out/ahab/ + else + cp firmware-ele-imx-2.0.2-89161a8/mx95b0-ahab-container.img $out/ahab/ + fi ''; } diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix b/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix index d7b8868a..46562832 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix @@ -11,8 +11,9 @@ pkgs.stdenv.mkDerivation rec { pkgs.gcc-arm-embedded ]; - src = pkgs.fetchgit { - url = "https://github.com/nxp-imx/imx-oei.git"; + src = pkgs.fetchFromGitHub { + owner = "nxp-imx"; + repo = "imx-oei"; rev = "5fca9f47544d03c52ca371eadfffbfd2454e6925"; sha256 = "sha256-Sb6u1NlhJpDCOKBu3HqUb4BLEy0F8LYVnJE0tRSvzWc="; }; diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix b/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix index e698990a..b75c43be 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix @@ -11,8 +11,9 @@ pkgs.stdenv.mkDerivation rec { pkgs.gcc-arm-embedded ]; - src = pkgs.fetchgit { - url = "https://github.com/nxp-imx/imx-oei.git"; + src = pkgs.fetchFromGitHub { + owner = "nxp-imx"; + repo = "imx-oei"; rev = "5fca9f47544d03c52ca371eadfffbfd2454e6925"; sha256 = "sha256-Sb6u1NlhJpDCOKBu3HqUb4BLEy0F8LYVnJE0tRSvzWc="; }; diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix b/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix index bf6806a4..3b377464 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix @@ -24,10 +24,11 @@ pkgs.stdenv.mkDerivation rec { cryptography ]; - src = pkgs.fetchgit { - url = "https://github.com/nxp-imx/imx-optee-os.git"; + src = pkgs.fetchFromGitHub { + owner = "nxp-imx"; + repo = "imx-optee-os"; rev = "612bc5a642a4608d282abeee2349d86de996d7ee"; - sha256 = "sha256-A7p3KPijwipivs9Qw9Mr62RWwaMBGTz7J8WP5JYoSOs="; + sha256 = "sha256-l8GKkrlBs5kgw6jrzGLT9WAeTSDqo8XWZDFT2+Fisv4="; }; meta = with lib; { homepage = "https://github.com/nxp-imx/imx-optee-os"; diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix b/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix index 2628f151..d28ccde1 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix @@ -17,8 +17,9 @@ pkgs.stdenv.mkDerivation rec { cryptography ]; - src = pkgs.fetchgit { - url = "https://github.com/nxp-imx/imx-sm.git"; + src = pkgs.fetchFromGitHub { + owner = "nxp-imx"; + repo = "imx-sm"; rev = "709deccd9338399eb39b5cf99a60eab4fa60d539"; sha256 = "sha256-02Cl+XhWGSFswspdBJ/4B/mBm4XTs/qKotx0BXMQpJk="; }; diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-uboot.nix b/compulab/ucm-imx95/bsp/ucm-imx95-uboot.nix index 68434e57..0d545cc4 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-uboot.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-uboot.nix @@ -3,7 +3,7 @@ lib, bison, dtc, - fetchgit, + fetchFromGitHub, flex, gnutls, libuuid, @@ -15,8 +15,9 @@ efitools, }: let - ubsrc = fetchgit { - url = "https://github.com/compulab-yokneam/u-boot-compulab.git"; + ubsrc = fetchFromGitHub { + owner = "compulab-yokneam"; + repo = "u-boot-compulab"; # tag: lf_v2024.04 rev = "824401fe487d7d3cbcf251bd60270bd7fe8d21d0"; sha256 = "sha256-m+YW7+XF/jcNKfyb5533LXGyOWvStqY+MCczAdcNGZI="; From 8650454db6c8250a39c0bcfe00d65a1d8201bfb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 30 Oct 2025 14:48:42 +0100 Subject: [PATCH 1454/1476] ucm-imx95: fix firmware parameter collision and update imx-mkimage Fixed parameter name collision in ucm-imx95-firmware.nix where the 'silicon' parameter conflicted with the nixpkgs silicon package, causing the wrong AHAB container to be selected. Renamed to 'siliconRev'. Updated imx-mkimage from lf-6.6.36 to lf-6.6.52-2.2.1 to match the firmware version expectations (v202409 instead of v202311). --- compulab/ucm-imx95/bsp/ucm-imx95-boot.nix | 6 +++--- compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix b/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix index 30087b21..4f30ae55 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix @@ -14,9 +14,9 @@ let src = pkgs.fetchFromGitHub { owner = "nxp-imx"; repo = "imx-mkimage"; - #tag: lf-6.6.36 - rev = "4622115cbc037f79039c4522faeced4aabea986b"; - sha256 = "sha256-2gz0GxlB3jwy8PC6+cP3+MpyUzqE1vDTw8nuxK6vo3g="; + #tag: lf-6.6.52-2.2.1 + rev = "f620fb8ef7a04c8dbed8119880f5eeffe3e69746"; + sha256 = "sha256-JZlX122uZntCIISI1H3Hw+tnk+N/gBJpFFDaZoY8W3c="; }; shortRev = builtins.substring 0 8 src.rev; in diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix b/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix index 84a81f34..f5dd7b51 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix @@ -1,6 +1,6 @@ { pkgs, - silicon ? "A0", + siliconRev ? "A0", ... }: @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out - export SILICON=${silicon} + export SILICON=${siliconRev} # M7 firmware echo "Copying M7 firmware..." From 86d9291cc3fad8b47b51cd2b55b37f14369c70ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 30 Oct 2025 14:52:19 +0100 Subject: [PATCH 1455/1476] ucm-imx95: use --replace-fail for substituteInPlace --- compulab/ucm-imx95/bsp/ucm-imx95-boot.nix | 10 +++++----- compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix | 4 ++-- compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix | 4 ++-- compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix | 20 +++++++++---------- compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix | 6 +++--- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix b/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix index 4f30ae55..46c23a8c 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix @@ -28,15 +28,15 @@ in postPatch = '' substituteInPlace Makefile \ - --replace 'git rev-parse --short=8 HEAD' 'echo ${shortRev}' + --replace-fail 'git rev-parse --short=8 HEAD' 'echo ${shortRev}' substituteInPlace Makefile \ - --replace 'CC = gcc' 'CC = clang' + --replace-fail 'CC = gcc' 'CC = clang' substituteInPlace iMX95/soc.mak \ - --replace 'xxd' "${pkgs.vim.xxd}/bin/xxd" + --replace-fail 'xxd' "${pkgs.vim.xxd}/bin/xxd" substituteInPlace scripts/fspi_fcb_gen.sh \ - --replace 'xxd' "${pkgs.vim.xxd}/bin/xxd" + --replace-fail 'xxd' "${pkgs.vim.xxd}/bin/xxd" substituteInPlace scripts/fspi_packer.sh \ - --replace 'xxd' "${pkgs.vim.xxd}/bin/xxd" + --replace-fail 'xxd' "${pkgs.vim.xxd}/bin/xxd" patchShebangs scripts ''; diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix b/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix index 46562832..82019f21 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix @@ -35,9 +35,9 @@ pkgs.stdenv.mkDerivation rec { postPatch = '' substituteInPlace oei/makefiles/build_info.mak \ - --replace "/bin/echo" "echo" + --replace-fail "/bin/echo" "echo" substituteInPlace Makefile \ - --replace "/bin/echo" "echo" + --replace-fail "/bin/echo" "echo" ''; makeFlags = [ diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix b/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix index b75c43be..331f1ae8 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix @@ -35,9 +35,9 @@ pkgs.stdenv.mkDerivation rec { postPatch = '' substituteInPlace oei/makefiles/build_info.mak \ - --replace "/bin/echo" "echo" + --replace-fail "/bin/echo" "echo" substituteInPlace Makefile \ - --replace "/bin/echo" "echo" + --replace-fail "/bin/echo" "echo" ''; makeFlags = [ diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix b/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix index 3b377464..7532a4f1 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix @@ -39,25 +39,25 @@ pkgs.stdenv.mkDerivation rec { postPatch = '' substituteInPlace scripts/arm32_sysreg.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' + --replace-fail '/usr/bin/env python3' '${python3}/bin/python' substituteInPlace scripts/gen_tee_bin.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' + --replace-fail '/usr/bin/env python3' '${python3}/bin/python' substituteInPlace scripts/pem_to_pub_c.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' + --replace-fail '/usr/bin/env python3' '${python3}/bin/python' substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ - --replace '/bin/bash' '${pkgs.bash}/bin/bash' + --replace-fail '/bin/bash' '${pkgs.bash}/bin/bash' substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy + --replace-fail "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump + --replace-fail "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm + --replace-fail "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf + --replace-fail "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar + --replace-fail "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp + --replace-fail "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp ''; makeFlags = [ diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix b/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix index d28ccde1..79dbe604 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix @@ -49,11 +49,11 @@ pkgs.stdenv.mkDerivation rec { postPatch = '' substituteInPlace sm/makefiles/gcc_cross.mak \ - --replace "\$(SM_CROSS_COMPILE)objcopy" ${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-objcopy + --replace-fail "\$(SM_CROSS_COMPILE)objcopy" ${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-objcopy substituteInPlace sm/makefiles/build_info.mak \ - --replace "/bin/echo" "echo" + --replace-fail "/bin/echo" "echo" substituteInPlace sm/makefiles/gcc_cross.mak \ - --replace 'SM_CROSS_COMPILE ?= $(TOOLS)/arm-gnu-toolchain-*-none-eabi/bin/arm-none-eabi-' \ + --replace-fail 'SM_CROSS_COMPILE ?= $(TOOLS)/arm-gnu-toolchain-*-none-eabi/bin/arm-none-eabi-' \ 'SM_CROSS_COMPILE ?= $(CROSS_COMPILE)' ''; From a2bc09823a3d6c9c2934d1dbd807ce8039a7d5d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 30 Oct 2025 15:17:53 +0100 Subject: [PATCH 1456/1476] ucm-imx95: various changes - Move openssl to nativeBuildInputs in ATF build for proper cross-compilation - Add explicit SILICON validation with clear error messages in firmware build - Fix fragile wildcard patterns in firmware DDR file copying - Replace mutable branch URLs with pinned commit hashes for patch stability - Add U-Boot config merge step (make olddefconfig) after extra config - Fix cross-compilation toolchain coherence (cpp in optee-os) - Standardize license format (single value instead of single-element list) - Update maintainer references with inline name/email format - Fix typos and grammar in documentation and comments --- compulab/README.md | 2 +- compulab/ucm-imx95/bsp/ucm-imx95-atf.nix | 16 +++++++++----- compulab/ucm-imx95/bsp/ucm-imx95-boot.nix | 3 +-- compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix | 13 +++++++++-- compulab/ucm-imx95/bsp/ucm-imx95-linux.nix | 11 +++++++--- compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix | 18 ++++++++++----- compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix | 18 ++++++++++----- compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix | 11 +++++++--- compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix | 22 +++++++++++++------ compulab/ucm-imx95/bsp/ucm-imx95-uboot.nix | 1 + 10 files changed, 82 insertions(+), 33 deletions(-) diff --git a/compulab/README.md b/compulab/README.md index 69e79e1e..aa3c253a 100644 --- a/compulab/README.md +++ b/compulab/README.md @@ -24,6 +24,6 @@ Boot ROM initializes the SoC and loads OEI, which runs in TCM to perform early s ``` ### Notes -- The configuration includes device-tree, kernel, and bootloader components are optimized for the UCM-iMX95 SoM and evk. +- The configuration, including device-tree, kernel, and bootloader components, is optimized for the UCM-iMX95 SoM and EVK. - The generated NixOS image supports booting from SD card or eMMC, depending on the hardware configuration. - The boot components (OEI in TCM/DDR, SM, ATF, U-Boot) follow the standard NXP release layout for i.MX95 platforms. diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-atf.nix b/compulab/ucm-imx95/bsp/ucm-imx95-atf.nix index d08a2c8e..cc853c83 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-atf.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-atf.nix @@ -25,9 +25,10 @@ stdenv.mkDerivation rec { # Compiler dependencies depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ pkgsCross.aarch64-embedded.stdenv.cc ]; - - buildInputs = [ openssl ]; + nativeBuildInputs = [ + pkgsCross.aarch64-embedded.stdenv.cc + openssl + ]; makeFlags = [ "HOSTCC=$(CC_FOR_BUILD)" @@ -51,8 +52,13 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://github.com/nxp-imx/imx-atf"; description = "Reference implementation of secure world software for ARMv8-A"; - license = [ licenses.bsd3 ]; - maintainers = with maintainers; [ govindsi ]; + license = licenses.bsd3; + maintainers = [ + { + name = "Govind Singh"; + email = "govind.singh@tii.ae"; + } + ]; platforms = [ "aarch64-linux" ]; }; } diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix b/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix index 46c23a8c..3554b73b 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix @@ -24,7 +24,7 @@ in imx95-boot = pkgs.stdenv.mkDerivation rec { inherit src; name = "imx95-mkimage"; - version = "lf-6.6.36"; + version = "lf-6.6.52-2.2.1"; postPatch = '' substituteInPlace Makefile \ @@ -47,7 +47,6 @@ in ]; buildInputs = [ - git glibc.static zlib zlib.static diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix b/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix index f5dd7b51..3de82670 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix @@ -46,7 +46,13 @@ stdenv.mkDerivation rec { ./firmware-imx-8.28-994fa14.bin --auto-accept mkdir -p $out/ddr - cp firmware-imx-8.28-994fa14/firmware/ddr/synopsys/lpddr5*v202409.bin $out/ddr/ + # Resolve wildcard and verify at least one file matches + lpddr5_files=(firmware-imx-8.28-994fa14/firmware/ddr/synopsys/lpddr5*v202409.bin) + if [ ''${#lpddr5_files[@]} -eq 0 ]; then + echo "ERROR: No lpddr5*v202409.bin file found in firmware/ddr/synopsys/" >&2 + exit 1 + fi + cp "''${lpddr5_files[@]}" $out/ddr/ # AHAB container cp ${ahabFirmware} ./firmware-ele-imx-2.0.2-89161a8.bin @@ -56,8 +62,11 @@ stdenv.mkDerivation rec { mkdir -p $out/ahab if [ "$SILICON" = "A0" ]; then cp firmware-ele-imx-2.0.2-89161a8/mx95a0-ahab-container.img $out/ahab/ - else + elif [ "$SILICON" = "B0" ]; then cp firmware-ele-imx-2.0.2-89161a8/mx95b0-ahab-container.img $out/ahab/ + else + echo "ERROR: Invalid SILICON value '$SILICON'. Must be 'A0' or 'B0'." >&2 + exit 1 fi ''; } diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-linux.nix b/compulab/ucm-imx95/bsp/ucm-imx95-linux.nix index 8aa94c22..76520a8c 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-linux.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-linux.nix @@ -12,7 +12,7 @@ buildLinux ( defconfig = "compulab-mx95_defconfig"; # https://github.com/NixOS/nixpkgs/pull/366004 - # introduced a breaking change that if a module is declared but it is not being used it will faill. + # introduced a breaking change that if a module is declared but it is not being used it will fail. ignoreConfigErrors = true; kernelPatches = [ @@ -53,8 +53,13 @@ buildLinux ( }; meta = with lib; { homepage = "https://github.com/compulab-yokneam/linux-compulab"; - license = [ licenses.gpl2Only ]; - maintainers = with maintainers; [ govindsi ]; + license = licenses.gpl2Only; + maintainers = [ + { + name = "Govind Singh"; + email = "govind.singh@tii.ae"; + } + ]; platforms = [ "aarch64-linux" ]; }; } diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix b/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix index 82019f21..612d0169 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix @@ -2,6 +2,9 @@ lib, pkgs, }: +let + metaBspImx95Rev = "5f4c7b5db846fa3a75055054e32215089d15a7b7"; # scarthgap +in pkgs.stdenv.mkDerivation rec { pname = "imx95-imx-oei"; version = "lf-6.6.36-2.1.0"; @@ -20,15 +23,15 @@ pkgs.stdenv.mkDerivation rec { patches = [ (pkgs.fetchpatch { - url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap/recipes-bsp/imx-oei/imx-oei/0001-Add-CompuLab-lpddr5_timing.c.patch"; + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0001-Add-CompuLab-lpddr5_timing.c.patch"; sha256 = "sha256-6ZpBOXw2aIhD2i9Wx368xfHq6NvdZghWHU9u8+gRTj8="; }) (pkgs.fetchpatch { - url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap/recipes-bsp/imx-oei/imx-oei/0002-board-mx95lp5-Fix-default-DDR_CONFIG-timing-name.patch"; + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0002-board-mx95lp5-Fix-default-DDR_CONFIG-timing-name.patch"; sha256 = "sha256-WZ/vYaTC2iKIC+jnHtnPriCxK9gjRsOv2Uy13Ye4698="; }) (pkgs.fetchpatch { - url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap/recipes-bsp/imx-oei/imx-oei/0003-Add-CompuLab-lpddr5_timing_4g.c.patch"; + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0003-Add-CompuLab-lpddr5_timing_4g.c.patch"; sha256 = "sha256-yyierv2USZlM8Cuxf4FDj4+UtILvJQH9BJSj+fmayL8="; }) ]; @@ -57,8 +60,13 @@ pkgs.stdenv.mkDerivation rec { meta = with lib; { homepage = "https://github.com/nxp-imx/imx-oei"; description = "Optional Executable Image assembler for i.MX95 processors"; - license = [ licenses.bsd3 ]; - maintainers = with maintainers; [ govindsi ]; + license = licenses.bsd3; + maintainers = [ + { + name = "Govind Singh"; + email = "govind.singh@tii.ae"; + } + ]; platforms = [ "aarch64-linux" ]; }; } diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix b/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix index 331f1ae8..9960cd50 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix @@ -2,6 +2,9 @@ lib, pkgs, }: +let + metaBspImx95Rev = "5f4c7b5db846fa3a75055054e32215089d15a7b7"; # scarthgap +in pkgs.stdenv.mkDerivation rec { pname = "imx95-imx-oei-tcm"; version = "lf-6.6.36-2.1.0"; @@ -20,15 +23,15 @@ pkgs.stdenv.mkDerivation rec { patches = [ (pkgs.fetchpatch { - url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap/recipes-bsp/imx-oei/imx-oei/0001-Add-CompuLab-lpddr5_timing.c.patch"; + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0001-Add-CompuLab-lpddr5_timing.c.patch"; sha256 = "sha256-6ZpBOXw2aIhD2i9Wx368xfHq6NvdZghWHU9u8+gRTj8="; }) (pkgs.fetchpatch { - url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap/recipes-bsp/imx-oei/imx-oei/0002-board-mx95lp5-Fix-default-DDR_CONFIG-timing-name.patch"; + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0002-board-mx95lp5-Fix-default-DDR_CONFIG-timing-name.patch"; sha256 = "sha256-WZ/vYaTC2iKIC+jnHtnPriCxK9gjRsOv2Uy13Ye4698="; }) (pkgs.fetchpatch { - url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap/recipes-bsp/imx-oei/imx-oei/0003-Add-CompuLab-lpddr5_timing_4g.c.patch"; + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0003-Add-CompuLab-lpddr5_timing_4g.c.patch"; sha256 = "sha256-yyierv2USZlM8Cuxf4FDj4+UtILvJQH9BJSj+fmayL8="; }) ]; @@ -57,8 +60,13 @@ pkgs.stdenv.mkDerivation rec { meta = with lib; { homepage = "https://github.com/nxp-imx/imx-oei"; description = "Optional Executable Image assembler for i.MX95 processors"; - license = [ licenses.bsd3 ]; - maintainers = with maintainers; [ govindsi ]; + license = licenses.bsd3; + maintainers = [ + { + name = "Govind Singh"; + email = "govind.singh@tii.ae"; + } + ]; platforms = [ "aarch64-linux" ]; }; } diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix b/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix index 7532a4f1..60ce490b 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix @@ -6,7 +6,7 @@ let inherit (pkgs.buildPackages) python3; toolchain = pkgs.gccStdenv.cc; binutils = pkgs.gccStdenv.cc.bintools.bintools_bin; - cpp = pkgs.gcc; + cpp = pkgs.gccStdenv.cc; in pkgs.stdenv.mkDerivation rec { pname = "imx95-optee-os"; @@ -32,8 +32,13 @@ pkgs.stdenv.mkDerivation rec { }; meta = with lib; { homepage = "https://github.com/nxp-imx/imx-optee-os"; - license = [ licenses.bsd2 ]; - maintainers = with maintainers; [ govindsi ]; + license = licenses.bsd2; + maintainers = [ + { + name = "Govind Singh"; + email = "govind.singh@tii.ae"; + } + ]; platforms = [ "aarch64-linux" ]; }; diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix b/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix index 79dbe604..c4f44831 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix @@ -2,6 +2,9 @@ lib, pkgs, }: +let + metaBspImx95Rev = "224eed17cddc573061150e9d2ce6f9acb39ea50e"; # scarthgap-6.6.36-EVAL-UCM-iMX95-1.0 +in pkgs.stdenv.mkDerivation rec { pname = "imx95-sm-fw"; version = "lf-6.6.36-2.1.0"; @@ -26,23 +29,23 @@ pkgs.stdenv.mkDerivation rec { patches = [ (pkgs.fetchpatch { - url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap-6.6.36-EVAL-UCM-iMX95-1.0/recipes-bsp/imx-system-manager/imx-system-manager/0001-Add-mcimx95cust-board.patch"; + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0001-Add-mcimx95cust-board.patch"; sha256 = "sha256-zvZ4bNew+yRPmaZQMrAH087KpCLRqz6zdElfe72Dtuc="; }) (pkgs.fetchpatch { - url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap-6.6.36-EVAL-UCM-iMX95-1.0/recipes-bsp/imx-system-manager/imx-system-manager/0002-Fix-null-pionter-except.patch"; + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0002-Fix-null-pionter-except.patch"; sha256 = "sha256-q72VEvJqm2CmOxdWMqGibgXS5lY08mC4srEcy00QdrE="; }) (pkgs.fetchpatch { - url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap-6.6.36-EVAL-UCM-iMX95-1.0/recipes-bsp/imx-system-manager/imx-system-manager/0001-update-for-yocto-6.6.36-compatibility.patch"; + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0001-update-for-yocto-6.6.36-compatibility.patch"; sha256 = "sha256-JzHqDiD/ZOu6VQQI0JxY17RQ3bA2t1aP3O1sjLPguWs="; }) (pkgs.fetchpatch { - url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap-6.6.36-EVAL-UCM-iMX95-1.0/recipes-bsp/imx-system-manager/imx-system-manager/0003-sm-Disable-GPIO1-10-interrupt.patch"; + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0003-sm-Disable-GPIO1-10-interrupt.patch"; sha256 = "sha256-dhcDv7Uq856+MBonczMPznk+tuqUFxTcHiKLX+myCVA="; }) (pkgs.fetchpatch { - url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/scarthgap-6.6.36-EVAL-UCM-iMX95-1.0/recipes-bsp/imx-system-manager/imx-system-manager/0004-configs-mx95cust-change-LPTPM1-ownership.patch"; + url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0004-configs-mx95cust-change-LPTPM1-ownership.patch"; sha256 = "sha256-NcLu6+zXpiSz1bHKW14Zuf6F/4pzKsekb+zaRtKjSTY="; }) ]; @@ -73,8 +76,13 @@ pkgs.stdenv.mkDerivation rec { meta = with lib; { homepage = "https://github.com/nxp-imx/imx-sm"; description = "System Manager firmware for i.MX processors"; - license = [ licenses.bsd3 ]; - maintainers = with maintainers; [ govindsi ]; + license = licenses.bsd3; + maintainers = [ + { + name = "Govind Singh"; + email = "govind.singh@tii.ae"; + } + ]; platforms = [ "aarch64-linux" ]; }; } diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-uboot.nix b/compulab/ucm-imx95/bsp/ucm-imx95-uboot.nix index 0d545cc4..81f2c1fc 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-uboot.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-uboot.nix @@ -74,6 +74,7 @@ stdenv.mkDerivation { make ucm-imx95_defconfig cat $extraConfigPath >> .config + make olddefconfig runHook postConfigure ''; From 13cc234e37c8340ecf81fe65f937bf83f2e164ae Mon Sep 17 00:00:00 2001 From: Hans Date: Fri, 31 Oct 2025 09:54:49 +0100 Subject: [PATCH 1457/1476] 'runCommandNoCC' has been renamed to/replaced by 'runCommand' --- lenovo/legion/16ach6h/edid/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/legion/16ach6h/edid/default.nix b/lenovo/legion/16ach6h/edid/default.nix index f536d90c..3dbba1cb 100644 --- a/lenovo/legion/16ach6h/edid/default.nix +++ b/lenovo/legion/16ach6h/edid/default.nix @@ -7,7 +7,7 @@ let # This file was obtained from the display while "DDG" mode was enabled. - chip_edid = pkgs.runCommandNoCC "chip_edid" { } '' + chip_edid = pkgs.runCommand "chip_edid" { } '' mkdir -p $out/lib/firmware/edid cp ${./16ach6h.bin} $out/lib/firmware/edid/16ach6h.bin ''; From 5e6ecb961a09225cade875fba07bb17bcff20acb Mon Sep 17 00:00:00 2001 From: Romana Date: Mon, 3 Nov 2025 03:45:34 +0100 Subject: [PATCH 1458/1476] asus-zephyrus-ga401iv: Add config for 2020 model of ga401 --- asus/zephyrus/ga401iv/default.nix | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 asus/zephyrus/ga401iv/default.nix diff --git a/asus/zephyrus/ga401iv/default.nix b/asus/zephyrus/ga401iv/default.nix new file mode 100644 index 00000000..32839501 --- /dev/null +++ b/asus/zephyrus/ga401iv/default.nix @@ -0,0 +1,38 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/turing + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; + + hardware.nvidia = { + # Enable DRM kernel mode setting + # This will also cause "PCI-Express Runtime D3 Power Management" to be enabled by default + modesetting.enable = lib.mkDefault true; + + # Dynamic boost is available on ampere GPUs and newer, not this laptop + dynamicBoost.enable = lib.mkDefault false; + + prime = { + amdgpuBusId = "PCI:4:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + + services = { + asusd.enable = lib.mkDefault true; + + udev.extraHwdb = '' + evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* + KEYBOARD_KEY_ff31007c=f20 # fixes mic mute button + KEYBOARD_KEY_ff3100b2=home # Set fn+LeftArrow as Home + KEYBOARD_KEY_ff3100b3=end # Set fn+RightArrow as End + ''; + }; +} From 5723dff2cdae75930fe929819f14b573534681c2 Mon Sep 17 00:00:00 2001 From: Romana Date: Mon, 3 Nov 2025 19:59:38 +0100 Subject: [PATCH 1459/1476] add ga401iv to readme and flake.nix --- README.md | 3 ++- flake.nix | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bd4fd3c9..b9940040 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,8 @@ See code for all available configurations. | [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `` | `asus-rog-strix-g713ie` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | `asus-rog-strix-g733qs` | | [Asus ROG Strix X570-E GAMING](asus/rog-strix/x570e) | `` | `asus-rog-strix-x570e` | -| [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | `asus-zephyrus-ga401` | +| [Asus ROG Zephyrus G14 GA401IV (2020)](asus/zephyrus/ga401iv) | `` | `asus-zephyrus-ga401iv` | +| [Asus ROG Zephyrus G14 GA401 (2021)](asus/zephyrus/ga401) | `` | `asus-zephyrus-ga401` | | [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | `asus-zephyrus-ga402` | | [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/amdgpu) | `` | `asus-zephyrus-ga402x-amdgpu` | | [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/nvidia) | `` | `asus-zephyrus-ga402x-nvidia` | diff --git a/flake.nix b/flake.nix index ce7425b9..78fcddf5 100644 --- a/flake.nix +++ b/flake.nix @@ -87,6 +87,7 @@ asus-zenbook-ux535 = import ./asus/zenbook/ux535; asus-zenbook-ux481-intelgpu = import ./asus/zenbook/ux481/intelgpu; asus-zenbook-ux481-nvidia = import ./asus/zenbook/ux481/nvidia; + asus-zephyrus-ga401iv = import ./asus/zephyrus/ga401iv; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; asus-zephyrus-ga402x = import ./asus/zephyrus/ga402x; From e598a4ca2ff00ee199bbf277da380bc4459687a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 4 Nov 2025 12:28:52 +0100 Subject: [PATCH 1460/1476] nxp: patch toolchain more consistent between different targets --- compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix | 4 ++-- nxp/common/bsp/imx-optee-builder.nix | 14 ++++++------ nxp/common/bsp/imx-optee-os.nix | 22 +++++++++---------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix b/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix index 60ce490b..81b56edb 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix @@ -8,7 +8,7 @@ let binutils = pkgs.gccStdenv.cc.bintools.bintools_bin; cpp = pkgs.gccStdenv.cc; in -pkgs.stdenv.mkDerivation rec { +pkgs.stdenv.mkDerivation { pname = "imx95-optee-os"; version = "lf-6.6.36_2.1.0"; @@ -62,7 +62,7 @@ pkgs.stdenv.mkDerivation rec { substituteInPlace mk/gcc.mk \ --replace-fail "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar substituteInPlace mk/gcc.mk \ - --replace-fail "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp + --replace-fail "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/${toolchain.targetPrefix}cpp ''; makeFlags = [ diff --git a/nxp/common/bsp/imx-optee-builder.nix b/nxp/common/bsp/imx-optee-builder.nix index 7d506fbe..6b6c229c 100644 --- a/nxp/common/bsp/imx-optee-builder.nix +++ b/nxp/common/bsp/imx-optee-builder.nix @@ -15,7 +15,7 @@ let inherit (pkgs.buildPackages) python3; toolchain = pkgs.gccStdenv.cc; binutils = pkgs.gccStdenv.cc.bintools.bintools_bin; - cpp = pkgs.gcc; + cpp = pkgs.gccStdenv.gcc; # Determine PLATFORM and PLATFORM_FLAVOR from platformFlavor # Format can be either "imx-mx93evk" (full platform string) or "mx8mpevk" (just flavor, platform is "imx") @@ -48,17 +48,17 @@ pkgs.stdenv.mkDerivation { # Patch toolchain paths in mk/gcc.mk substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy + --replace-fail "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump + --replace-fail "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm + --replace-fail "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf + --replace-fail "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar + --replace-fail "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp + --replace-fail "\$(CROSS_COMPILE_\$(sm))cpp"${cpp}/bin/${toolchain.targetPrefix}cpp ''; makeFlags = [ diff --git a/nxp/common/bsp/imx-optee-os.nix b/nxp/common/bsp/imx-optee-os.nix index 839d3dcd..f920e1d7 100644 --- a/nxp/common/bsp/imx-optee-os.nix +++ b/nxp/common/bsp/imx-optee-os.nix @@ -17,7 +17,7 @@ let cpp = pkgs.buildPackages.gcc; in -pkgs.stdenv.mkDerivation rec { +pkgs.stdenv.mkDerivation { pname = "imx-optee-os"; version = "5.15.32_2.0.0"; @@ -41,25 +41,25 @@ pkgs.stdenv.mkDerivation rec { postPatch = '' substituteInPlace scripts/arm32_sysreg.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' + --replace-fail '/usr/bin/env python3' '${python3}/bin/python' substituteInPlace scripts/gen_tee_bin.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' + --replace-fail '/usr/bin/env python3' '${python3}/bin/python' substituteInPlace scripts/pem_to_pub_c.py \ - --replace '/usr/bin/env python3' '${python3}/bin/python' + --replace-fail '/usr/bin/env python3' '${python3}/bin/python' substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ - --replace '/bin/bash' '${pkgs.bash}/bin/bash' + --replace-fail '/bin/bash' '${pkgs.bash}/bin/bash' substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy + --replace-fail "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump + --replace-fail "\$(CROSS_COMPILE_\$(sm))objdump" ${binutils}/bin/${toolchain.targetPrefix}objdump substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm + --replace-fail "\$(CROSS_COMPILE_\$(sm))nm" ${binutils}/bin/${toolchain.targetPrefix}nm substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf + --replace-fail "\$(CROSS_COMPILE_\$(sm))readelf" ${binutils}/bin/${toolchain.targetPrefix}readelf substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar + --replace-fail "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar substituteInPlace mk/gcc.mk \ - --replace "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/cpp + --replace-fail "\$(CROSS_COMPILE_\$(sm))cpp" "${cpp}/bin/${toolchain.targetPrefix}cpp" ''; makeFlags = [ From f2e49f279c3f7e95a64cae6397b14ed9254874e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 4 Nov 2025 12:34:11 +0100 Subject: [PATCH 1461/1476] optee-builder: use stdenv as opposed to gccStdenv should be the same in our use case, but stdenv is more standard. --- compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix | 6 +++--- nxp/common/bsp/imx-optee-builder.nix | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix b/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix index 81b56edb..6b66cf6c 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix @@ -4,9 +4,9 @@ }: let inherit (pkgs.buildPackages) python3; - toolchain = pkgs.gccStdenv.cc; - binutils = pkgs.gccStdenv.cc.bintools.bintools_bin; - cpp = pkgs.gccStdenv.cc; + toolchain = pkgs.stdenv.cc; + binutils = pkgs.stdenv.cc.bintools.bintools_bin; + cpp = pkgs.stdenv.cc; in pkgs.stdenv.mkDerivation { pname = "imx95-optee-os"; diff --git a/nxp/common/bsp/imx-optee-builder.nix b/nxp/common/bsp/imx-optee-builder.nix index 6b6c229c..ffd1e787 100644 --- a/nxp/common/bsp/imx-optee-builder.nix +++ b/nxp/common/bsp/imx-optee-builder.nix @@ -13,9 +13,9 @@ }: let inherit (pkgs.buildPackages) python3; - toolchain = pkgs.gccStdenv.cc; - binutils = pkgs.gccStdenv.cc.bintools.bintools_bin; - cpp = pkgs.gccStdenv.gcc; + toolchain = pkgs.stdenv.cc; + binutils = pkgs.stdenv.cc.bintools.bintools_bin; + cpp = pkgs.stdenv.gcc; # Determine PLATFORM and PLATFORM_FLAVOR from platformFlavor # Format can be either "imx-mx93evk" (full platform string) or "mx8mpevk" (just flavor, platform is "imx") From fad92f5f575cd056d4b1558d0e3c5da9098e8a94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 4 Nov 2025 12:48:26 +0100 Subject: [PATCH 1462/1476] ucm-imx95: expand pkgs in callPackage for overrides --- compulab/ucm-imx95/bsp/ucm-imx95-boot.nix | 35 +++++++++++-------- compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix | 6 ++-- compulab/ucm-imx95/bsp/ucm-imx95-linux.nix | 8 +++-- compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix | 24 +++++++------ compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix | 24 +++++++------ compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix | 19 +++++----- compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix | 32 +++++++++-------- compulab/ucm-imx95/overlay.nix | 2 +- 8 files changed, 89 insertions(+), 61 deletions(-) diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix b/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix index 3554b73b..e49ff90e 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix @@ -1,17 +1,24 @@ { - pkgs, + callPackage, + fetchFromGitHub, + stdenv, + clang, + git, + dtc, + glibc, + zlib, + vim, }: -with pkgs; let - imx95-atf = pkgs.callPackage ./ucm-imx95-atf.nix { }; - imx95-firmware = pkgs.callPackage ./ucm-imx95-firmware.nix { }; - imx95-uboot = pkgs.callPackage ./ucm-imx95-uboot.nix { }; - imx95-optee-os = pkgs.callPackage ./ucm-imx95-optee-os.nix { }; - imx95-sm-fw = pkgs.callPackage ./ucm-imx95-sm-fw.nix { }; - imx95-oei-ddr = pkgs.callPackage ./ucm-imx95-oei-ddr.nix { }; - imx95-oei-tcm = pkgs.callPackage ./ucm-imx95-oei-tcm.nix { }; - src = pkgs.fetchFromGitHub { + imx95-atf = callPackage ./ucm-imx95-atf.nix { }; + imx95-firmware = callPackage ./ucm-imx95-firmware.nix { }; + imx95-uboot = callPackage ./ucm-imx95-uboot.nix { }; + imx95-optee-os = callPackage ./ucm-imx95-optee-os.nix { }; + imx95-sm-fw = callPackage ./ucm-imx95-sm-fw.nix { }; + imx95-oei-ddr = callPackage ./ucm-imx95-oei-ddr.nix { }; + imx95-oei-tcm = callPackage ./ucm-imx95-oei-tcm.nix { }; + src = fetchFromGitHub { owner = "nxp-imx"; repo = "imx-mkimage"; #tag: lf-6.6.52-2.2.1 @@ -21,7 +28,7 @@ let shortRev = builtins.substring 0 8 src.rev; in { - imx95-boot = pkgs.stdenv.mkDerivation rec { + imx95-boot = stdenv.mkDerivation rec { inherit src; name = "imx95-mkimage"; version = "lf-6.6.52-2.2.1"; @@ -32,11 +39,11 @@ in substituteInPlace Makefile \ --replace-fail 'CC = gcc' 'CC = clang' substituteInPlace iMX95/soc.mak \ - --replace-fail 'xxd' "${pkgs.vim.xxd}/bin/xxd" + --replace-fail 'xxd' "${vim.xxd}/bin/xxd" substituteInPlace scripts/fspi_fcb_gen.sh \ - --replace-fail 'xxd' "${pkgs.vim.xxd}/bin/xxd" + --replace-fail 'xxd' "${vim.xxd}/bin/xxd" substituteInPlace scripts/fspi_packer.sh \ - --replace-fail 'xxd' "${pkgs.vim.xxd}/bin/xxd" + --replace-fail 'xxd' "${vim.xxd}/bin/xxd" patchShebangs scripts ''; diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix b/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix index 3de82670..e0fd5705 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-firmware.nix @@ -1,10 +1,12 @@ { - pkgs, + stdenv, + fetchurl, + coreutils, + bash, siliconRev ? "A0", ... }: -with pkgs; stdenv.mkDerivation rec { pname = "nxp-firmware-imx95"; version = "nxp-firmware-8.28-994fa14"; diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-linux.nix b/compulab/ucm-imx95/bsp/ucm-imx95-linux.nix index 76520a8c..db613d36 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-linux.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-linux.nix @@ -1,5 +1,9 @@ -{ lib, pkgs, ... }@args: -with pkgs; +{ + lib, + buildLinux, + fetchFromGitHub, + ... +}@args: buildLinux ( args // rec { diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix b/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix index 612d0169..e295f1bf 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-oei-ddr.nix @@ -1,20 +1,24 @@ { lib, - pkgs, + stdenv, + buildPackages, + gcc-arm-embedded, + fetchFromGitHub, + fetchpatch, }: let metaBspImx95Rev = "5f4c7b5db846fa3a75055054e32215089d15a7b7"; # scarthgap in -pkgs.stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "imx95-imx-oei"; version = "lf-6.6.36-2.1.0"; nativeBuildInputs = [ - pkgs.buildPackages.python3 - pkgs.gcc-arm-embedded + buildPackages.python3 + gcc-arm-embedded ]; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "nxp-imx"; repo = "imx-oei"; rev = "5fca9f47544d03c52ca371eadfffbfd2454e6925"; @@ -22,15 +26,15 @@ pkgs.stdenv.mkDerivation rec { }; patches = [ - (pkgs.fetchpatch { + (fetchpatch { url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0001-Add-CompuLab-lpddr5_timing.c.patch"; sha256 = "sha256-6ZpBOXw2aIhD2i9Wx368xfHq6NvdZghWHU9u8+gRTj8="; }) - (pkgs.fetchpatch { + (fetchpatch { url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0002-board-mx95lp5-Fix-default-DDR_CONFIG-timing-name.patch"; sha256 = "sha256-WZ/vYaTC2iKIC+jnHtnPriCxK9gjRsOv2Uy13Ye4698="; }) - (pkgs.fetchpatch { + (fetchpatch { url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0003-Add-CompuLab-lpddr5_timing_4g.c.patch"; sha256 = "sha256-yyierv2USZlM8Cuxf4FDj4+UtILvJQH9BJSj+fmayL8="; }) @@ -45,8 +49,8 @@ pkgs.stdenv.mkDerivation rec { makeFlags = [ "board=mx95lp5" - "CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-" - "OEI_CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-" + "CROSS_COMPILE=${gcc-arm-embedded}/bin/arm-none-eabi-" + "OEI_CROSS_COMPILE=${gcc-arm-embedded}/bin/arm-none-eabi-" "ARCH=arm" "DDR_CONFIG=lpddr5_timing" "oei=ddr" diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix b/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix index 9960cd50..a5d67da4 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-oei-tcm.nix @@ -1,20 +1,24 @@ { lib, - pkgs, + stdenv, + buildPackages, + gcc-arm-embedded, + fetchFromGitHub, + fetchpatch, }: let metaBspImx95Rev = "5f4c7b5db846fa3a75055054e32215089d15a7b7"; # scarthgap in -pkgs.stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "imx95-imx-oei-tcm"; version = "lf-6.6.36-2.1.0"; nativeBuildInputs = [ - pkgs.buildPackages.python3 - pkgs.gcc-arm-embedded + buildPackages.python3 + gcc-arm-embedded ]; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "nxp-imx"; repo = "imx-oei"; rev = "5fca9f47544d03c52ca371eadfffbfd2454e6925"; @@ -22,15 +26,15 @@ pkgs.stdenv.mkDerivation rec { }; patches = [ - (pkgs.fetchpatch { + (fetchpatch { url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0001-Add-CompuLab-lpddr5_timing.c.patch"; sha256 = "sha256-6ZpBOXw2aIhD2i9Wx368xfHq6NvdZghWHU9u8+gRTj8="; }) - (pkgs.fetchpatch { + (fetchpatch { url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0002-board-mx95lp5-Fix-default-DDR_CONFIG-timing-name.patch"; sha256 = "sha256-WZ/vYaTC2iKIC+jnHtnPriCxK9gjRsOv2Uy13Ye4698="; }) - (pkgs.fetchpatch { + (fetchpatch { url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0003-Add-CompuLab-lpddr5_timing_4g.c.patch"; sha256 = "sha256-yyierv2USZlM8Cuxf4FDj4+UtILvJQH9BJSj+fmayL8="; }) @@ -45,8 +49,8 @@ pkgs.stdenv.mkDerivation rec { makeFlags = [ "board=mx95lp5" - "CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-" - "OEI_CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-" + "CROSS_COMPILE=${gcc-arm-embedded}/bin/arm-none-eabi-" + "OEI_CROSS_COMPILE=${gcc-arm-embedded}/bin/arm-none-eabi-" "ARCH=arm" "DDR_CONFIG=lpddr5_timing" "oei=tcm" diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix b/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix index 6b66cf6c..9471e365 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-optee-os.nix @@ -1,14 +1,17 @@ { lib, - pkgs, + stdenv, + fetchFromGitHub, + buildPackages, + bash, }: let - inherit (pkgs.buildPackages) python3; - toolchain = pkgs.stdenv.cc; - binutils = pkgs.stdenv.cc.bintools.bintools_bin; - cpp = pkgs.stdenv.cc; + inherit (buildPackages) python3; + toolchain = stdenv.cc; + binutils = stdenv.cc.bintools.bintools_bin; + cpp = stdenv.cc; in -pkgs.stdenv.mkDerivation { +stdenv.mkDerivation { pname = "imx95-optee-os"; version = "lf-6.6.36_2.1.0"; @@ -24,7 +27,7 @@ pkgs.stdenv.mkDerivation { cryptography ]; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "nxp-imx"; repo = "imx-optee-os"; rev = "612bc5a642a4608d282abeee2349d86de996d7ee"; @@ -50,7 +53,7 @@ pkgs.stdenv.mkDerivation { substituteInPlace scripts/pem_to_pub_c.py \ --replace-fail '/usr/bin/env python3' '${python3}/bin/python' substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \ - --replace-fail '/bin/bash' '${pkgs.bash}/bin/bash' + --replace-fail '/bin/bash' '${bash}/bin/bash' substituteInPlace mk/gcc.mk \ --replace-fail "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy substituteInPlace mk/gcc.mk \ diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix b/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix index c4f44831..8baf5a43 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-sm-fw.nix @@ -1,26 +1,30 @@ { lib, - pkgs, + stdenv, + buildPackages, + gcc-arm-embedded, + fetchFromGitHub, + fetchpatch, }: let metaBspImx95Rev = "224eed17cddc573061150e9d2ce6f9acb39ea50e"; # scarthgap-6.6.36-EVAL-UCM-iMX95-1.0 in -pkgs.stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "imx95-sm-fw"; version = "lf-6.6.36-2.1.0"; nativeBuildInputs = [ - pkgs.buildPackages.python3 - pkgs.gcc-arm-embedded + buildPackages.python3 + gcc-arm-embedded ]; - propagatedBuildInputs = with pkgs.buildPackages.python3.pkgs; [ + propagatedBuildInputs = with buildPackages.python3.pkgs; [ pycryptodomex pyelftools cryptography ]; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "nxp-imx"; repo = "imx-sm"; rev = "709deccd9338399eb39b5cf99a60eab4fa60d539"; @@ -28,23 +32,23 @@ pkgs.stdenv.mkDerivation rec { }; patches = [ - (pkgs.fetchpatch { + (fetchpatch { url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0001-Add-mcimx95cust-board.patch"; sha256 = "sha256-zvZ4bNew+yRPmaZQMrAH087KpCLRqz6zdElfe72Dtuc="; }) - (pkgs.fetchpatch { + (fetchpatch { url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0002-Fix-null-pionter-except.patch"; sha256 = "sha256-q72VEvJqm2CmOxdWMqGibgXS5lY08mC4srEcy00QdrE="; }) - (pkgs.fetchpatch { + (fetchpatch { url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0001-update-for-yocto-6.6.36-compatibility.patch"; sha256 = "sha256-JzHqDiD/ZOu6VQQI0JxY17RQ3bA2t1aP3O1sjLPguWs="; }) - (pkgs.fetchpatch { + (fetchpatch { url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0003-sm-Disable-GPIO1-10-interrupt.patch"; sha256 = "sha256-dhcDv7Uq856+MBonczMPznk+tuqUFxTcHiKLX+myCVA="; }) - (pkgs.fetchpatch { + (fetchpatch { url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0004-configs-mx95cust-change-LPTPM1-ownership.patch"; sha256 = "sha256-NcLu6+zXpiSz1bHKW14Zuf6F/4pzKsekb+zaRtKjSTY="; }) @@ -52,7 +56,7 @@ pkgs.stdenv.mkDerivation rec { postPatch = '' substituteInPlace sm/makefiles/gcc_cross.mak \ - --replace-fail "\$(SM_CROSS_COMPILE)objcopy" ${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-objcopy + --replace-fail "\$(SM_CROSS_COMPILE)objcopy" ${gcc-arm-embedded}/bin/arm-none-eabi-objcopy substituteInPlace sm/makefiles/build_info.mak \ --replace-fail "/bin/echo" "echo" substituteInPlace sm/makefiles/gcc_cross.mak \ @@ -63,8 +67,8 @@ pkgs.stdenv.mkDerivation rec { makeFlags = [ "config=mx95cust" "M=2" - "CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-" - "CROSS_COMPILE64=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-" + "CROSS_COMPILE=${gcc-arm-embedded}/bin/arm-none-eabi-" + "CROSS_COMPILE64=${gcc-arm-embedded}/bin/arm-none-eabi-" "ARCH=arm" ]; diff --git a/compulab/ucm-imx95/overlay.nix b/compulab/ucm-imx95/overlay.nix index 942a3711..516f9e79 100644 --- a/compulab/ucm-imx95/overlay.nix +++ b/compulab/ucm-imx95/overlay.nix @@ -1,3 +1,3 @@ final: _prev: { - inherit (final.callPackage ./bsp/ucm-imx95-boot.nix { pkgs = final; }) imx95-boot; + inherit (final.callPackage ./bsp/ucm-imx95-boot.nix { }) imx95-boot; } From 5ad68c5dffcee747d960b227570e7b365054d18e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 4 Nov 2025 12:48:34 +0100 Subject: [PATCH 1463/1476] tests: add all aarch64 NXP boards to aarch64Systems list --- tests/nixos-tests.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/nixos-tests.nix b/tests/nixos-tests.nix index 0fcf6ed9..f4c2b423 100644 --- a/tests/nixos-tests.nix +++ b/tests/nixos-tests.nix @@ -21,6 +21,11 @@ let "raspberry-pi-3" "raspberry-pi-4" "raspberry-pi-5" + "nxp-imx8mp-evk" + "nxp-imx8mq-evk" + "nxp-imx8qm-mek" + "nxp-imx93-evk" + "ucm-imx95" ]; matchArch = From 01e8e18d9d15aa9a2eb59f4691ea6a45b15dd2ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 4 Nov 2025 13:03:14 +0100 Subject: [PATCH 1464/1476] format flake.nix after nixpkgs bump --- asus/flow/gv302x/shared.nix | 1 - flake.nix | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/asus/flow/gv302x/shared.nix b/asus/flow/gv302x/shared.nix index a556e7d0..ada7f65b 100644 --- a/asus/flow/gv302x/shared.nix +++ b/asus/flow/gv302x/shared.nix @@ -11,7 +11,6 @@ let mkEnableOption mkIf mkMerge - version versionAtLeast ; diff --git a/flake.nix b/flake.nix index ce7425b9..50043915 100644 --- a/flake.nix +++ b/flake.nix @@ -424,16 +424,16 @@ common-cpu-amd-zenpower = import ./common/cpu/amd/zenpower.nix; common-cpu-amd-raphael-igpu = import ./common/cpu/amd/raphael/igpu.nix; common-cpu-intel = import ./common/cpu/intel; - common-gpu-intel-comet-lake = - deprecated "992" "common-gpu-intel-comet-lake" - (import ./common/gpu/intel/comet-lake); + common-gpu-intel-comet-lake = deprecated "992" "common-gpu-intel-comet-lake" ( + import ./common/gpu/intel/comet-lake + ); common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix; - common-gpu-intel-kaby-lake = - deprecated "992" "common-gpu-intel-kaby-lake" - (import ./common/gpu/intel/kaby-lake); - common-gpu-intel-sandy-bridge = - deprecated "992" "common-gpu-intel-sandy-bridge" - (import ./common/gpu/intel/sandy-bridge); + common-gpu-intel-kaby-lake = deprecated "992" "common-gpu-intel-kaby-lake" ( + import ./common/gpu/intel/kaby-lake + ); + common-gpu-intel-sandy-bridge = deprecated "992" "common-gpu-intel-sandy-bridge" ( + import ./common/gpu/intel/sandy-bridge + ); common-gpu-amd = import ./common/gpu/amd; common-gpu-amd-sea-islands = import ./common/gpu/amd/sea-islands; common-gpu-amd-southern-islands = import ./common/gpu/amd/southern-islands; From 655a6da8a8cffe6270659938139e6192598e5e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 4 Nov 2025 13:31:19 +0100 Subject: [PATCH 1465/1476] nxp: document flash procedure and expose images in flake --- compulab/README.md | 31 +++++++++++++++++++++++++++++-- flake.nix | 10 +++++++++- nxp/README.md | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 3 deletions(-) diff --git a/compulab/README.md b/compulab/README.md index aa3c253a..d90e7b20 100644 --- a/compulab/README.md +++ b/compulab/README.md @@ -23,7 +23,34 @@ Boot ROM initializes the SoC and loads OEI, which runs in TCM to perform early s } ``` +### Building Boot Images + +The boot image for flashing to SD cards can be built directly from the flake: + +```bash +# Build boot image for UCM-iMX95 +nix build github:NixOS/nixos-hardware#packages.aarch64-linux.ucm-imx95-boot + +# Or from a local checkout +nix build .#packages.aarch64-linux.ucm-imx95-boot +``` + +The boot image will be available at `./result/image/flash.bin`. + +**Note:** These packages target `aarch64-linux`. If you're on a different architecture (e.g., x86_64-linux), you'll need remote builders configured for aarch64-linux. + +### Flashing to SD Card + +Once built, you can flash the boot image to an SD card: + +```bash +# Write boot image to SD card at 32KB offset (adjust /dev/sdX to your SD card device) +sudo dd if=./result/image/flash.bin of=/dev/sdX bs=1k seek=32 conv=fsync +``` + +**Warning:** Double-check the device path to avoid overwriting the wrong disk! + ### Notes -- The configuration, including device-tree, kernel, and bootloader components, is optimized for the UCM-iMX95 SoM and EVK. -- The generated NixOS image supports booting from SD card or eMMC, depending on the hardware configuration. +- The configuration, including device-tree, kernel, and bootloader components, is optimized for the UCM-iMX95 SoM and EVK. +- The generated NixOS image supports booting from SD card or eMMC, depending on the hardware configuration. - The boot components (OEI in TCM/DDR, SM, ATF, U-Boot) follow the standard NXP release layout for i.MX95 platforms. diff --git a/flake.nix b/flake.nix index 8f32fbbf..1fbed53c 100644 --- a/flake.nix +++ b/flake.nix @@ -462,11 +462,19 @@ # Add packages packages = eachSystem ( - pkgs: _system: { + pkgs: system: + { run-tests = pkgs.callPackage ./tests/run-tests.nix { inherit self; }; } + // pkgs.lib.optionalAttrs (system == "aarch64-linux") { + # Boot images for NXP i.MX boards (aarch64-linux only) + ucm-imx95-boot = (pkgs.callPackage ./compulab/ucm-imx95/bsp/ucm-imx95-boot.nix { }).imx95-boot; + imx93-boot = (pkgs.callPackage ./nxp/imx93-evk/bsp/imx93-boot.nix { }).imx93-boot; + imx8mp-boot = (pkgs.callPackage ./nxp/imx8mp-evk/bsp/imx8mp-boot.nix { }).imx8m-boot; + imx8mq-boot = (pkgs.callPackage ./nxp/imx8mq-evk/bsp/imx8mq-boot.nix { }).imx8m-boot; + } ); # Add checks for `nix run .#run-tests` diff --git a/nxp/README.md b/nxp/README.md index cf1f5d2a..fc8fac60 100644 --- a/nxp/README.md +++ b/nxp/README.md @@ -38,3 +38,41 @@ Code snippet example that enables 'imx8mp-evk/imx8mq-evk/imx93-evk' configuratio } ``` +### 2.3 Building Boot Images + +Boot images for flashing to SD cards can be built directly from the flake: + +```bash +# Build boot image for i.MX8MP EVK +nix build github:NixOS/nixos-hardware#packages.aarch64-linux.imx8mp-boot + +# Build boot image for i.MX8MQ EVK +nix build github:NixOS/nixos-hardware#packages.aarch64-linux.imx8mq-boot + +# Build boot image for i.MX93 EVK +nix build github:NixOS/nixos-hardware#packages.aarch64-linux.imx93-boot + +# Or from a local checkout +nix build .#packages.aarch64-linux.imx8mp-boot +``` + +The boot image will be available at `./result/image/flash.bin`. + +**Note:** These packages target `aarch64-linux`. If you're on a different architecture (e.g., x86_64-linux), you'll need remote builders configured for aarch64-linux. + +### 2.4 Flashing to SD Card + +Once built, you can flash the boot image to an SD card: + +```bash +# For i.MX8MP and i.MX93 (32KB offset): +sudo dd if=./result/image/flash.bin of=/dev/sdX bs=1k seek=32 conv=fsync + +# For i.MX8MQ (33KB offset): +sudo dd if=./result/image/flash.bin of=/dev/sdX bs=1k seek=33 conv=fsync +``` + +**Note:** Different i.MX processors require different offsets. i.MX8MP and i.MX93 use 32KB (seek=32), while i.MX8MQ uses 33KB (seek=33). + +**Warning:** Double-check the device path to avoid overwriting the wrong disk! + From 8b72f74d80a81ec17e4d17609614a298f384d00e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 4 Nov 2025 15:27:28 +0100 Subject: [PATCH 1466/1476] nxp: add upstream docs --- compulab/README.md | 7 ++++--- nxp/README.md | 11 +++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/compulab/README.md b/compulab/README.md index d90e7b20..eca6b6e1 100644 --- a/compulab/README.md +++ b/compulab/README.md @@ -30,9 +30,6 @@ The boot image for flashing to SD cards can be built directly from the flake: ```bash # Build boot image for UCM-iMX95 nix build github:NixOS/nixos-hardware#packages.aarch64-linux.ucm-imx95-boot - -# Or from a local checkout -nix build .#packages.aarch64-linux.ucm-imx95-boot ``` The boot image will be available at `./result/image/flash.bin`. @@ -54,3 +51,7 @@ sudo dd if=./result/image/flash.bin of=/dev/sdX bs=1k seek=32 conv=fsync - The configuration, including device-tree, kernel, and bootloader components, is optimized for the UCM-iMX95 SoM and EVK. - The generated NixOS image supports booting from SD card or eMMC, depending on the hardware configuration. - The boot components (OEI in TCM/DDR, SM, ATF, U-Boot) follow the standard NXP release layout for i.MX95 platforms. + +### Upstream Documentation +- [NXP i.MX95 EVK U-Boot Documentation](https://docs.u-boot.org/en/latest/board/nxp/imx95_evk.html) +- [CompuLab UCM-iMX95 Product Page](https://www.compulab.com/products/computer-on-modules/ucm-imx95-nxp-i-mx-95-som-system-on-module/) diff --git a/nxp/README.md b/nxp/README.md index fc8fac60..ac7804fd 100644 --- a/nxp/README.md +++ b/nxp/README.md @@ -76,3 +76,14 @@ sudo dd if=./result/image/flash.bin of=/dev/sdX bs=1k seek=33 conv=fsync **Warning:** Double-check the device path to avoid overwriting the wrong disk! +## 3. Upstream Documentation + +### U-Boot Board Documentation +- [NXP i.MX8MP EVK U-Boot Documentation](https://docs.u-boot.org/en/latest/board/nxp/imx8mp_evk.html) +- [NXP i.MX8MQ EVK U-Boot Documentation](https://docs.u-boot.org/en/latest/board/nxp/imx8mq_evk.html) +- [NXP i.MX93 11x11 EVK U-Boot Documentation](https://docs.u-boot.org/en/latest/board/nxp/imx93_11x11_evk.html) +- [NXP i.MX95 EVK U-Boot Documentation](https://docs.u-boot.org/en/latest/board/nxp/imx95_evk.html) + +### Additional Resources +- [NXP i.MX 8M Series TF-A Documentation](https://trustedfirmware-a.readthedocs.io/en/latest/plat/imx8m.html) + From 2a3a409ac57bbe31cc4e51a14799a34927066499 Mon Sep 17 00:00:00 2001 From: "Issam E. Maghni" Date: Tue, 4 Nov 2025 09:36:52 -0500 Subject: [PATCH 1467/1476] raspberry-pi/4: add only wireless firmwares --- raspberry-pi/4/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index d862a2e7..1f908673 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -55,6 +55,5 @@ } ]; - # Required for the Wireless firmware - hardware.enableRedistributableFirmware = true; + hardware.firmware = [ pkgs.raspberrypiWirelessFirmware ]; } From eea20ba3b08ad00ec2513bc31fce8f94ee15793a Mon Sep 17 00:00:00 2001 From: Brian McGillion Date: Wed, 5 Nov 2025 13:20:53 +0400 Subject: [PATCH 1468/1476] system: fix the system setting for nixpkgs https://github.com/NixOS/nixpkgs/commit/90cb7876446bf1684ffe40ab7832de0ec1b92991 Signed-off-by: Brian McGillion --- compulab/ucm-imx95/modules.nix | 2 +- kobol/helios4/default.nix | 2 +- nxp/common/modules.nix | 2 +- nxp/imx8mp-evk/modules.nix | 2 +- nxp/imx8mq-evk/modules.nix | 2 +- nxp/imx93-evk/modules.nix | 2 +- olimex/teres_i/default.nix | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/compulab/ucm-imx95/modules.nix b/compulab/ucm-imx95/modules.nix index c0e8f266..9d55d0e8 100644 --- a/compulab/ucm-imx95/modules.nix +++ b/compulab/ucm-imx95/modules.nix @@ -4,7 +4,7 @@ ... }: { - nixpkgs.hostPlatform = "aarch64-linux"; + nixpkgs.hostPlatform.system = "aarch64-linux"; boot = { kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/ucm-imx95-linux.nix { }); diff --git a/kobol/helios4/default.nix b/kobol/helios4/default.nix index 5b4207fe..b2b67c1a 100644 --- a/kobol/helios4/default.nix +++ b/kobol/helios4/default.nix @@ -36,7 +36,7 @@ in nixpkgs.overlays = [ (import ./overlay.nix) ]; - nixpkgs.hostPlatform = "armv7l-linux"; + nixpkgs.hostPlatform.system = "armv7l-linux"; boot.initrd.availableKernelModules = [ "ahci_mvebu" ]; diff --git a/nxp/common/modules.nix b/nxp/common/modules.nix index e35eb405..2f5123fe 100644 --- a/nxp/common/modules.nix +++ b/nxp/common/modules.nix @@ -1,6 +1,6 @@ { pkgs, lib, ... }: { - nixpkgs.hostPlatform = "aarch64-linux"; + nixpkgs.hostPlatform.system = "aarch64-linux"; boot = { kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/linux-imx8.nix { }); diff --git a/nxp/imx8mp-evk/modules.nix b/nxp/imx8mp-evk/modules.nix index ec4e28f7..1ba039fb 100644 --- a/nxp/imx8mp-evk/modules.nix +++ b/nxp/imx8mp-evk/modules.nix @@ -4,7 +4,7 @@ ... }: { - nixpkgs.hostPlatform = "aarch64-linux"; + nixpkgs.hostPlatform.system = "aarch64-linux"; boot = { kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/imx8mp-linux.nix { }); diff --git a/nxp/imx8mq-evk/modules.nix b/nxp/imx8mq-evk/modules.nix index 0307d133..594eebdc 100644 --- a/nxp/imx8mq-evk/modules.nix +++ b/nxp/imx8mq-evk/modules.nix @@ -4,7 +4,7 @@ ... }: { - nixpkgs.hostPlatform = "aarch64-linux"; + nixpkgs.hostPlatform.system = "aarch64-linux"; boot = { kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/imx8mq-linux.nix { }); diff --git a/nxp/imx93-evk/modules.nix b/nxp/imx93-evk/modules.nix index b8939684..90fbfd83 100644 --- a/nxp/imx93-evk/modules.nix +++ b/nxp/imx93-evk/modules.nix @@ -4,7 +4,7 @@ ... }: { - nixpkgs.hostPlatform = "aarch64-linux"; + nixpkgs.hostPlatform.system = "aarch64-linux"; boot = { kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/imx93-linux.nix { }); diff --git a/olimex/teres_i/default.nix b/olimex/teres_i/default.nix index 4f2c97d5..eefae9a5 100644 --- a/olimex/teres_i/default.nix +++ b/olimex/teres_i/default.nix @@ -24,7 +24,7 @@ }; }; - nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; + nixpkgs.hostPlatform.system = lib.mkDefault "aarch64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; } From ae91411396f37d84850e07e7310f251b83fd3a93 Mon Sep 17 00:00:00 2001 From: Brian McGillion Date: Wed, 5 Nov 2025 16:35:23 +0400 Subject: [PATCH 1469/1476] imx8-evk: fix cross-compiled builds update just to fix the cross compilation. Signed-off-by: Brian McGillion --- nxp/common/bsp/imx-mkimage.nix | 8 ++++---- nxp/common/bsp/imx-optee-builder.nix | 4 ++-- nxp/imx8mp-evk/bsp/imx8mp-boot.nix | 23 ++++++++--------------- nxp/imx8mp-evk/bsp/imx8mp-firmware.nix | 2 +- 4 files changed, 15 insertions(+), 22 deletions(-) diff --git a/nxp/common/bsp/imx-mkimage.nix b/nxp/common/bsp/imx-mkimage.nix index a928b92c..1c9d8d40 100644 --- a/nxp/common/bsp/imx-mkimage.nix +++ b/nxp/common/bsp/imx-mkimage.nix @@ -16,12 +16,12 @@ pkgs.stdenv.mkDerivation rec { --replace 'CC = gcc' 'CC = clang' ''; - nativeBuildInputs = [ - clang - git + depsBuildBuild = [ + pkgs.buildPackages.stdenv.cc ]; - buildInputs = [ + nativeBuildInputs = [ + clang git glibc.static ]; diff --git a/nxp/common/bsp/imx-optee-builder.nix b/nxp/common/bsp/imx-optee-builder.nix index ffd1e787..9436b6fa 100644 --- a/nxp/common/bsp/imx-optee-builder.nix +++ b/nxp/common/bsp/imx-optee-builder.nix @@ -15,7 +15,7 @@ let inherit (pkgs.buildPackages) python3; toolchain = pkgs.stdenv.cc; binutils = pkgs.stdenv.cc.bintools.bintools_bin; - cpp = pkgs.stdenv.gcc; + cpp = pkgs.stdenv.cc; # Determine PLATFORM and PLATFORM_FLAVOR from platformFlavor # Format can be either "imx-mx93evk" (full platform string) or "mx8mpevk" (just flavor, platform is "imx") @@ -58,7 +58,7 @@ pkgs.stdenv.mkDerivation { substituteInPlace mk/gcc.mk \ --replace-fail "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar substituteInPlace mk/gcc.mk \ - --replace-fail "\$(CROSS_COMPILE_\$(sm))cpp"${cpp}/bin/${toolchain.targetPrefix}cpp + --replace-fail "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/${toolchain.targetPrefix}cpp ''; makeFlags = [ diff --git a/nxp/imx8mp-evk/bsp/imx8mp-boot.nix b/nxp/imx8mp-evk/bsp/imx8mp-boot.nix index a53600b9..e2005e15 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-boot.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-boot.nix @@ -2,7 +2,6 @@ pkgs, enable-tee ? true, }: -with pkgs; let fw-ver = "202006"; cp-tee = if enable-tee then "install -m 0644 ${imx8mp-optee-os}/tee.bin ./iMX8M/tee.bin" else ""; @@ -22,7 +21,7 @@ let shortRev = builtins.substring 0 8 src.rev; in { - imx8m-boot = pkgs.stdenv.mkDerivation rec { + imx8m-boot = pkgs.buildPackages.stdenv.mkDerivation { inherit src; name = "imx8mp-mkimage"; version = "lf-6.1.55-2.2.0"; @@ -30,22 +29,16 @@ in postPatch = '' substituteInPlace Makefile \ --replace 'git rev-parse --short=8 HEAD' 'echo ${shortRev}' - substituteInPlace Makefile \ - --replace 'CC = gcc' 'CC = clang' patchShebangs scripts ''; nativeBuildInputs = [ - clang - git - dtc - ]; - - buildInputs = [ - git - glibc.static - zlib - zlib.static + pkgs.buildPackages.stdenv.cc + pkgs.buildPackages.git + pkgs.buildPackages.dtc + pkgs.buildPackages.glibc.static + pkgs.buildPackages.zlib + pkgs.buildPackages.zlib.static ]; buildPhase = '' @@ -54,7 +47,7 @@ in make bin make SOC=iMX8MP mkimage_imx8 - cp -v ${pkgs.ubootTools}/bin/mkimage ./iMX8M/mkimage_uboot + cp -v ${pkgs.buildPackages.ubootTools}/bin/mkimage ./iMX8M/mkimage_uboot install -m 0644 ${imx8mp-uboot}/u-boot-spl.bin ./iMX8M/u-boot-spl.bin install -m 0644 ${imx8mp-uboot}/u-boot-nodtb.bin ./iMX8M/u-boot-nodtb.bin diff --git a/nxp/imx8mp-evk/bsp/imx8mp-firmware.nix b/nxp/imx8mp-evk/bsp/imx8mp-firmware.nix index c763d8cf..31e383e2 100644 --- a/nxp/imx8mp-evk/bsp/imx8mp-firmware.nix +++ b/nxp/imx8mp-evk/bsp/imx8mp-firmware.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { dontStrip = true; installPhase = '' - ${pkgs.bash}/bin/bash $src --auto-accept --force + ${pkgs.buildPackages.bash}/bin/bash $src --auto-accept --force mv firmware-imx-${version} $out ''; } From ec135126c1ed79be84f2abd13b0981b5d4bc89ff Mon Sep 17 00:00:00 2001 From: "Issam E. Maghni" Date: Tue, 4 Nov 2025 10:05:41 -0500 Subject: [PATCH 1470/1476] raspberry-pi/4: add genet module to initrd if netboot This module is required to have Ethernet in initial RAM disk. It solves the issue encountered in this thread: https://discourse.nixos.org/t/netboot-into-nfs-root-instead-of-the-fat-netboot-ramdisk/8556/2 --- raspberry-pi/4/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index d862a2e7..46f8d58c 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -35,7 +35,8 @@ "vc4" "pcie_brcmstb" # required for the pcie bus to work "reset-raspberrypi" # required for vl805 firmware to load - ]; + ] + ++ lib.optional config.boot.initrd.network.enable "genet"; # Allow building kernel initrd.systemd.tpm2.enable = false; From d1ad892e3b7f3251a055a1de07a52302bdbd7233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 6 Nov 2025 11:14:03 +0100 Subject: [PATCH 1471/1476] helios4: add missing names to kernel patches --- kobol/helios4/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kobol/helios4/default.nix b/kobol/helios4/default.nix index 5b4207fe..5fc1e891 100644 --- a/kobol/helios4/default.nix +++ b/kobol/helios4/default.nix @@ -5,6 +5,7 @@ let # A patch to get both PWM fans working # the patch has been successfully applied to 5.15 and 5.19 { + name = "mvebu-gpio-remove-hardcoded-timer-assignment"; patch = pkgs.fetchpatch { url = "https://raw.githubusercontent.com/armbian/build/bd3466eef2106ea13e85e821f5d852ff97465e6c/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch"; sha256 = "sha256-eQqMp0+MZd30zkl8DE89oB7czvyqCkfwF2k0EZ69jr0="; @@ -12,12 +13,14 @@ let } # support for Wake-On-Lan { + name = "mvebu-gpio-add-wake-on-gpio-support"; patch = pkgs.fetchpatch { url = "https://raw.githubusercontent.com/armbian/build/bd3466eef2106ea13e85e821f5d852ff97465e6c/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-add_wake_on_gpio_support.patch"; sha256 = "sha256-OrvnVCU55P0U78jdoxGRJvl29i+Rvq8AdEGSCCpxa2I="; }; } { + name = "helios4-dts-add-wake-on-lan-support"; patch = pkgs.fetchpatch { url = "https://raw.githubusercontent.com/armbian/build/bd3466eef2106ea13e85e821f5d852ff97465e6c/patch/kernel/archive/mvebu-5.15/94-helios4-dts-add-wake-on-lan-support.patch"; sha256 = "sha256-ai4161bTC22023eaVVWsvbk6fQKjkv0P4DQ4DA1Zgow="; From 64269645d4ba9822d0d9ffe157b71c98b7eedd93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 6 Nov 2025 11:14:48 +0100 Subject: [PATCH 1472/1476] star64: add missing names to kernel patches --- pine64/star64/linux-5.15.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pine64/star64/linux-5.15.nix b/pine64/star64/linux-5.15.nix index 39d8cedc..0eb664bc 100644 --- a/pine64/star64/linux-5.15.nix +++ b/pine64/star64/linux-5.15.nix @@ -32,6 +32,7 @@ let defconfig = "pine64_star64_defconfig"; kernelPatches = [ { + name = "keys-dh-fix"; patch = fetchpatch { url = "https://github.com/torvalds/linux/commit/215bebc8c6ac438c382a6a56bd2764a2d4e1da72.diff"; hash = "sha256-1ZqmVOkgcDBRkHvVRPH8I5G1STIS1R/l/63PzQQ0z0I="; @@ -39,12 +40,16 @@ let }; } { + name = "starfive-vin-sensor-fix"; patch = fetchpatch { url = "https://github.com/starfive-tech/linux/pull/108/commits/9ae8cb751c4d1fd2146b279a8e67887590e9d07a.diff"; hash = "sha256-EY0lno+HkY5mradBUPII3qqu0xh+BVQRzveCQcaht0M="; }; } - { patch = ./irq-desc-to-data.patch; } + { + name = "irq-desc-to-data"; + patch = ./irq-desc-to-data.patch; + } ] ++ kernelPatches; From ec18896955a310c4c9371392a0f84a62edbee63e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 6 Nov 2025 11:21:15 +0100 Subject: [PATCH 1473/1476] librem/5r4/u-boot: update and use newer compiler --- purism/librem/5r4/u-boot/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/purism/librem/5r4/u-boot/default.nix b/purism/librem/5r4/u-boot/default.nix index 43dcee43..9cb4d4c4 100644 --- a/purism/librem/5r4/u-boot/default.nix +++ b/purism/librem/5r4/u-boot/default.nix @@ -1,6 +1,5 @@ { stdenv, - gcc11Stdenv, buildUBoot, fetchurl, fetchFromGitLab, @@ -28,7 +27,7 @@ let meta.license = lib.licenses.unfree; }); - arm-trusted-firmware-imx8mq = gcc11Stdenv.mkDerivation (_fa: { + arm-trusted-firmware-imx8mq = stdenv.mkDerivation (_fa: { pname = "arm-trusted-firmware-bl31"; version = "unstable-2020-07-08"; src = fetchFromGitLab { @@ -40,6 +39,7 @@ let }; enableParallelBuilding = true; hardeningDisable = [ "all" ]; + NIX_CFLAGS_COMPILE = "-Wno-error=array-bounds"; NIX_LDFLAGS = "--no-warn-rwx-segments"; buildFlags = [ "PLAT=imx8mq" @@ -53,14 +53,14 @@ let }); ubootLibrem5 = buildUBoot { - version = "unstable-2022-12-15"; + version = "unstable-2025-03-25"; defconfig = "librem5_defconfig"; src = fetchFromGitLab { domain = "source.puri.sm"; owner = "Librem5"; repo = "uboot-imx"; - rev = "956aa590c93977992743b41c45d3c7ee5a024915"; # this is the latest commit on the upstream/librem5 branch - hash = "sha256-MsIIlarN+WFFEzc0ptLAgS7BwJ6Cosy42xo0EwPn1AU="; + rev = "72fcd4ee36e0874daac734c1195263cd9ce9d981"; # this is the latest commit on the upstream/librem5 branch + hash = "sha256-ymqZPuyyZoFTaCMQIJnuNs1fV0uVwJhyQdnGwv9m9lE="; }; patches = [ ]; BL31 = "${arm-trusted-firmware-imx8mq}/bl31.bin"; From f34ca8045a21e00bc3c49f53c1d58264ee3d15b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 6 Nov 2025 11:27:57 +0100 Subject: [PATCH 1474/1476] mnt/reform: stop doing ifd --- mnt/reform/kernel.nix | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/mnt/reform/kernel.nix b/mnt/reform/kernel.nix index 7b742b23..b67dad7a 100644 --- a/mnt/reform/kernel.nix +++ b/mnt/reform/kernel.nix @@ -34,18 +34,23 @@ let hash = "sha256-XiTuH40b3VJqzwygZzU0FcvMDj41Rq6IsMbm+3+QxDY="; }; - kernelPatches = - (map (patch: { inherit patch; }) ( - lib.filesystem.listFilesRecursive "${reformDebianPackages}/linux/patches${lib.versions.majorMinor modDirVersion}" - )) - ++ [ - { - patch = callPackage ./dtsPatch.nix { - inherit reformDebianPackages; - kernelSource = src; - }; - } - ]; + # Use postPatch to apply patches from a directory without IFD + postPatch = '' + for patch in ${reformDebianPackages}/linux/patches${lib.versions.majorMinor modDirVersion}/*/*.patch; do + echo "Applying patch: $patch" + patch -p1 < "$patch" + done + ''; + + kernelPatches = [ + { + name = "reform-dts"; + patch = callPackage ./dtsPatch.nix { + inherit reformDebianPackages; + kernelSource = src; + }; + } + ]; structuredExtraConfig = with lib.kernel; { # configuration options from https://source.mnt.re/reform/reform-debian-packages/-/blob/7f31ba3a6742d60d8d502c1d86e63ef5df3916bf/linux/config From 744975050f8c527d6e4a50403ba102930749e513 Mon Sep 17 00:00:00 2001 From: "Issam E. Maghni" Date: Tue, 4 Nov 2025 09:55:53 -0500 Subject: [PATCH 1475/1476] meta: rename module to usb-storage https://github.com/torvalds/linux/blob/v6.17/drivers/usb/storage/Kconfig#L23-L24 > To compile this driver as a module, choose M here: the > module will be called usb-storage. --- dell/precision/7520/default.nix | 2 +- focus/m2/gen1/default.nix | 2 +- purism/librem/5r4/initrd.nix | 4 ++-- raspberry-pi/3/default.nix | 2 +- raspberry-pi/4/default.nix | 2 +- raspberry-pi/5/default.nix | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dell/precision/7520/default.nix b/dell/precision/7520/default.nix index 8ddc312e..b9f23f34 100644 --- a/dell/precision/7520/default.nix +++ b/dell/precision/7520/default.nix @@ -15,7 +15,7 @@ boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" - "usb_storage" + "usb-storage" "sd_mod" "rtsx_pci_sdmmc" ]; diff --git a/focus/m2/gen1/default.nix b/focus/m2/gen1/default.nix index 34996510..0b3eafeb 100644 --- a/focus/m2/gen1/default.nix +++ b/focus/m2/gen1/default.nix @@ -13,7 +13,7 @@ "xhci_pci" "ahci" "nvme" - "usb_storage" + "usb-storage" "sd_mod" "rtsx_pci_sdmmc" ]; diff --git a/purism/librem/5r4/initrd.nix b/purism/librem/5r4/initrd.nix index e82d5cff..864afffe 100644 --- a/purism/librem/5r4/initrd.nix +++ b/purism/librem/5r4/initrd.nix @@ -14,7 +14,7 @@ lib.mkIf config.hardware.librem5.customInitrdModules { "tps6598x" "xhci_hcd" "usbcore" - "usb_storage" + "usb-storage" "uas" "xhci_plat_hcd" ]; @@ -56,7 +56,7 @@ lib.mkIf config.hardware.librem5.customInitrdModules { "tps6598x" "xhci_hcd" "usbcore" - "usb_storage" + "usb-storage" "uas" "xhci_plat_hcd" ]; diff --git a/raspberry-pi/3/default.nix b/raspberry-pi/3/default.nix index 9ac90082..e7d7c4cc 100644 --- a/raspberry-pi/3/default.nix +++ b/raspberry-pi/3/default.nix @@ -9,7 +9,7 @@ kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi3; initrd.availableKernelModules = [ "usbhid" - "usb_storage" + "usb-storage" ]; }; diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index d390a330..b45856ab 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -31,7 +31,7 @@ kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi4; initrd.availableKernelModules = [ "usbhid" - "usb_storage" + "usb-storage" "vc4" "pcie_brcmstb" # required for the pcie bus to work "reset-raspberrypi" # required for vl805 firmware to load diff --git a/raspberry-pi/5/default.nix b/raspberry-pi/5/default.nix index 12d51b4d..020dc973 100644 --- a/raspberry-pi/5/default.nix +++ b/raspberry-pi/5/default.nix @@ -16,7 +16,7 @@ in initrd.availableKernelModules = [ "nvme" "usbhid" - "usb_storage" + "usb-storage" ]; }; From fc4c7c6ec7c29bd70c433cf529681f754e7397c0 Mon Sep 17 00:00:00 2001 From: "Issam E. Maghni" Date: Tue, 4 Nov 2025 09:59:03 -0500 Subject: [PATCH 1476/1476] meta: rename module to pcie-brcmstb https://github.com/torvalds/linux/blob/v6.17/drivers/pci/controller/Makefile#L37 --- raspberry-pi/4/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index b45856ab..29f62dba 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -33,7 +33,7 @@ "usbhid" "usb-storage" "vc4" - "pcie_brcmstb" # required for the pcie bus to work + "pcie-brcmstb" # required for the pcie bus to work "reset-raspberrypi" # required for vl805 firmware to load ] ++ lib.optional config.boot.initrd.network.enable "genet";