From 22d70cd4186c4791f86941a017d2ed9ff22cc981 Mon Sep 17 00:00:00 2001 From: JohnMolotov Date: Fri, 20 Sep 2024 16:40:09 +1000 Subject: [PATCH] Add Intel Meteor Lake (Core Ultra) --- common/gpu/intel/meteor-lake/default.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 common/gpu/intel/meteor-lake/default.nix diff --git a/common/gpu/intel/meteor-lake/default.nix b/common/gpu/intel/meteor-lake/default.nix new file mode 100644 index 00000000..956d97e2 --- /dev/null +++ b/common/gpu/intel/meteor-lake/default.nix @@ -0,0 +1,17 @@ +{pkgs, lib, config, ...}: let inherit(lib) mkDefault mkIf; in { + imports = [ ../. ]; + + # only needed to support the i915 driver, can be found using `nix-shell -p pciutils --run "lspci -nn" | grep -oP "VGA.*:\K[0-9a-f]{4}"` + options.hardware.intelgpu.deviceID = lib.mkOption { description = "Intel GPU to probe"; }; + + config = { + # i915 is buggy on meteor lake, xe should be the default + hardware.intelgpu.driver = mkDefault "xe"; + + # xe driver requires newer kernel + boot.kernelPackages = mkIf(config.hardware.intelgpu.driver=="xe")( mkDefault pkgs.linuxPackages_latest ); + + # workaround that gets the i915 driver working, for those that wish to use it + boot.kernelParams = mkIf(config.hardware.intelgpu.driver=="i915")[ "i915.force_probe=${config.hardware.intelgpu.deviceID}" ]; + }; +}