diff --git a/common/cpu/amd/raphael/igpu.nix b/common/cpu/amd/raphael/igpu.nix new file mode 100644 index 0000000..82514c2 --- /dev/null +++ b/common/cpu/amd/raphael/igpu.nix @@ -0,0 +1,20 @@ +{ 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) + + imports = [ ../. ]; + + 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") { + kernelParams = ["amdgpu.sg_display=0"]; + }) + ]; +} diff --git a/flake.nix b/flake.nix index bd5ad10..8a2f54f 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;