1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-12-11 12:19:44 +01:00
nixos-hardware/common/cpu/amd/raphael/igpu.nix
Luflosi a377fb23dc 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.
2024-02-16 13:49:10 +00:00

19 lines
659 B
Nix

{ 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)
imports = [ ../. ];
boot = lib.mkMerge [
(lib.mkIf (lib.versionOlder pkgs.linux.version "6.1") {
kernelPackages = pkgs.linuxPackages_latest;
})
(lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2") {
kernelParams = ["amdgpu.sg_display=0"];
})
];
}