mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-13 22:49:41 +01:00
0cd5621572
Scatter/gather was introduced in 6.2 kernel and caused flickering and various issues when running iGPU on Ryzen 7000-series CPUs. This issue is not observed in kernel 6.6 or newer versions so we can enable it for kernel 6.6 and newer versions.
26 lines
808 B
Nix
26 lines
808 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)
|
|
# This issue is not seen in kernel 6.6 or newer versions
|
|
|
|
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")
|
|
&& (lib.versionOlder config.boot.kernelPackages.kernel.version "6.6")
|
|
) { kernelParams = [ "amdgpu.sg_display=0" ]; })
|
|
];
|
|
}
|