mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
[Hardware] Fix crashes on AMD Zen 1 CPUs
Caused my Opcache issue. Only real fix is to RMA the processor, but that is no longer an option for me.
This commit is contained in:
parent
a8f78f35db
commit
7e9048b5a1
1 changed files with 8 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.aviallon.hardware;
|
cfg = config.aviallon.hardware;
|
||||||
desktopCfg = config.aviallon.desktop;
|
desktopCfg = config.aviallon.desktop;
|
||||||
|
generalCfg = config.aviallon.general;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.aviallon.hardware = { };
|
options.aviallon.hardware = { };
|
||||||
|
|
@ -19,6 +20,13 @@ in
|
||||||
++ optional cfg.nvidia.enable pkgs.nvtop-nvidia
|
++ optional cfg.nvidia.enable pkgs.nvtop-nvidia
|
||||||
;
|
;
|
||||||
|
|
||||||
|
boot.kernel.sysctl = {
|
||||||
|
|
||||||
|
# Why: https://www.phoronix.com/news/Ryzen-Segv-Response
|
||||||
|
# Workaround: https://forums.gentoo.org/viewtopic-p-2605135.html#2605135
|
||||||
|
"kernel.randomize_va_space" = mkIf (generalCfg.cpuVendor == "amd" && generalCfg.cpuArch == "znver1" ) (warn "Disable Adress Space Layout Randomization on Ryzen 1 CPU" 0);
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue