2024-06-15 15:22:13 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
2023-03-26 23:53:18 +02:00
|
|
|
|
|
|
|
{
|
2023-03-29 11:32:52 +02:00
|
|
|
# Sets the kernel version to the latest kernel to make the usage of the iGPU possible if your kernel version is too old
|
2023-03-26 23:53:18 +02:00
|
|
|
# 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)
|
2024-06-15 15:22:13 +02:00
|
|
|
# This issue is not seen in kernel 6.6 or newer versions
|
2023-03-26 23:53:18 +02:00
|
|
|
|
|
|
|
imports = [ ../. ];
|
|
|
|
|
|
|
|
boot = lib.mkMerge [
|
|
|
|
(lib.mkIf (lib.versionOlder pkgs.linux.version "6.1") {
|
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
|
|
|
})
|
2023-03-29 11:32:52 +02:00
|
|
|
|
2024-06-15 15:22:13 +02:00
|
|
|
(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" ]; })
|
2023-03-26 23:53:18 +02:00
|
|
|
];
|
|
|
|
}
|