framenix: patch kernel against grpahics flickering
only a temporary mitigation, should hopefully land upstream at some point
This commit is contained in:
parent
81c32881b3
commit
1e40e5fa9b
|
@ -16,8 +16,52 @@ in
|
|||
# use newer linux-firmware from unstable
|
||||
hardware.firmware = lib.mkBefore [ unstable.linux-firmware ];
|
||||
|
||||
# override tmpdir for daemon
|
||||
systemd.services.nix-daemon.environment.TMPDIR = "/var/tmp";
|
||||
|
||||
# try newer kernels
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux_latest.override {
|
||||
argsOverride = rec {
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
|
||||
hash = "sha256-LiNkYsgTJby9MctxxLWKUhsH1hNnGRJNDjyv+FwsXXU=";
|
||||
};
|
||||
version = "6.8-rc2";
|
||||
modDirVersion = "6.8.0-rc2";
|
||||
};
|
||||
});
|
||||
# revert some commits that introduced the clourful graphics artefacts flickering,
|
||||
# at least that's the current working hypothesis in https://gitlab.freedesktop.org/drm/amd/-/issues/3097
|
||||
boot.kernelPatches = [
|
||||
{name = "revert 9ae587f850a6702428273fcf4a2a9b392349b2a3";
|
||||
patch = (pkgs.fetchpatch {
|
||||
url = "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=9ae587f850a6702428273fcf4a2a9b392349b2a3";
|
||||
hash = "sha256-5Uu8zxRSQuqE8oymjwPMt/ylsItpkQVDhbrOSMj8g3I=";
|
||||
revert = true;
|
||||
});}
|
||||
{name = "revert 2eb412aa25ed2bf59f5ad5f7a09787d182d67934";
|
||||
patch = (pkgs.fetchpatch {
|
||||
url = "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=2eb412aa25ed2bf59f5ad5f7a09787d182d67934";
|
||||
hash = "sha256-VtsH6bmwaLxPZ+uXvVE6qVWD2/aIKf9GLuMTNKq6d8M=";
|
||||
revert = true;
|
||||
});}
|
||||
{name = "revert 0a1844bf0b532d84324453374ad6845f64066c28";
|
||||
patch = (pkgs.fetchpatch {
|
||||
url = "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=0a1844bf0b532d84324453374ad6845f64066c28";
|
||||
hash = "sha256-Zd2pcYiOmuuzcc7THNtJW/YTjPyzO7HmQYKJNzy9YPw=";
|
||||
revert = true;
|
||||
});
|
||||
# alternatively, 8569c3154538 can be reverted as well
|
||||
extraStructuredConfig = with lib.kernel; {
|
||||
DRM_I915 = no;
|
||||
DRM_I915_GVT = lib.mkForce unset;
|
||||
DRM_I915_GVT_KVMGT = lib.mkForce unset;
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
# temporary workaround for white flickering graphics artefacts
|
||||
boot.kernelParams = [ "amdgpu.sg_display=0" ];
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
|
@ -53,8 +97,5 @@ in
|
|||
pkgs.radeontop
|
||||
pkgs.framework-tool
|
||||
];
|
||||
|
||||
# temporary workaround for graphics flicker-artifact issues:
|
||||
boot.kernelParams = [ "amdgpu.sg_display=0" ];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue