From 9dbe8dea5fee7180991f4a65d1a5876422f33681 Mon Sep 17 00:00:00 2001 From: Steffen Weitz Date: Wed, 29 Mar 2023 11:32:52 +0200 Subject: [PATCH] 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 45d97d3..82514c2 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"]; + }) ]; }