Skip to content

Commit

Permalink
LQX kernel is shit
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRTitor committed Mar 6, 2024
1 parent 62273fe commit 5b40b57
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
3 changes: 1 addition & 2 deletions system/boot-kernel.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# };
# });

boot.kernelPackages = pkgs-unstable.linuxPackages_lqx;
boot.kernelPackages = pkgs-unstable.linuxPackages_zen;
# zenpower is used for reading temperature, voltage, current and power
boot.extraModulePackages = with config.boot.kernelPackages; [
zenpower
Expand Down Expand Up @@ -74,7 +74,6 @@
}
];


# Also load amdgpu at boot
boot.kernelModules = [ "amdgpu" ];
# boot.consoleLogLevel = 0; # configure silent boot
Expand Down
45 changes: 45 additions & 0 deletions testl
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

boot.kernelPatches = [
# Kernel lockdown patch
{
name = "kernel-lockdown";
patch = null;
extraStructuredConfig = with lib.kernel; {
SECURITY_LOCKDOWN_LSM = lib.mkForce yes;
MODULE_SIG = lib.mkForce yes;
};
}
{
# recompiling the kernel with this option is needed for OpenRGB
name = "NCT6775 driver";
patch = null; # no patch needed if zen-kernel is enabled
extraStructuredConfig = with lib.kernel; {
I2C_NCT6775 = lib.mkForce yes;
};
}
{
# Recompiling the kernel with optimization
name = "AMD Patches";
patch = null; # no patch is needed, just apply the options
# enable only support for upto 20 CPU threads in the kernel
extraConfig = ''
NR_CPUS 20
'';
extraStructuredConfig = with lib.kernel; {
# enable compiler optimizations for AMD
MNATIVE_AMD = lib.mkForce yes;
X86_USE_PPRO_CHECKSUM = lib.mkForce yes;

X86_EXTENDED_PLATFORM = lib.mkForce no; # disable support for other x86 platforms

X86_MCE_INTEL = lib.mkForce no; # disable support for intel mce

# Optimized for performance
CC_OPTIMIZE_FOR_PERFORMANCE_O3 = lib.mkForce yes;

# Multigen LRU
LRU_GEN = lib.mkForce yes;
LRU_GEN_ENABLED = lib.mkForce yes;
};
}
];

0 comments on commit 5b40b57

Please sign in to comment.