Skip to content

Kernel & Performance

Kernel Package

The laptop runs the CachyOS kernel from the Chaotic-Nyx repository:

nix
boot.kernelPackages = inputs.chaotic.legacyPackages."x86_64-linux".linuxPackages_cachyos;

An alternative Zen kernel option is commented out:

nix
# boot.kernelPackages = pkgs.linuxKernel.packages.linux_zen;

The CachyOS kernel includes scheduler optimisations (BORE scheduler), improved desktop responsiveness, and additional hardware support. Binary packages are provided by the Chaotic-Nyx cache, avoiding local compilation.

Kernel Parameters

nix
boot.kernelParams = [
  # Power saving
  "acpi=force"
  "pcie_aspm=force"
  "nowatchdog"
  "nmi_watchdog=0"
  "amd_pstate=active"
  "rcutree.enable_rcu_lazy=1"

  # Catppuccin Mocha TTY colours
  "vt.default_red=..."
  "vt.default_grn=..."
  "vt.default_blu=..."
];
ParameterEffect
amd_pstate=activeUse the AMD P-State EPP driver for CPU frequency scaling
pcie_aspm=forceForce Active State Power Management on PCIe links
nowatchdog + nmi_watchdog=0Disable hardware and NMI watchdogs (power saving)
rcutree.enable_rcu_lazy=1Lazy RCU callbacks to reduce wakeups
acpi=forceForce ACPI even if firmware reports issues
vt.default_*Set Catppuccin Mocha colour scheme for Linux virtual terminals

Blacklisted Modules

nix
boot.blacklistedKernelModules = [ "sp5100_tco" ];

The sp5100_tco watchdog timer module is blacklisted as it is not needed and can cause unnecessary wakeups.

sysctl Tuning

nix
boot.kernel.sysctl = {
  "kernel.kexec_load_disabled" = 1;
  "vm.swappiness" = 0;
  "vm.vfs_cache_pressure" = 50;
  "vm.dirty_bytes" = 268435456;          # 256 MB
  "vm.dirty_writeback_centisecs" = 1500; # 15 seconds
  "vm.dirty_background_bytes" = 67108864; # 64 MB
};
sysctlValueRationale
kexec_load_disabled1Prevent kexec after boot (security)
vm.swappiness0No swap is configured
vm.vfs_cache_pressure50Prefer keeping VFS caches over reclaiming memory
vm.dirty_bytes256 MBMaximum dirty memory before synchronous writeback
vm.dirty_background_bytes64 MBBackground writeback threshold
vm.dirty_writeback_centisecs1500Flush dirty pages every 15 seconds

These VM tunables reduce write frequency to the NVMe SSD, which helps with both SSD longevity and battery life.

Power Management (TLP)

TLP is configured in tlp.nix with separate profiles for AC and battery:

CPU

SettingACBattery
Driver modeactiveactive
Scaling governorperformancepowersave
Energy/perf policyperformancebalance_power
CPU boostEnabledDisabled
Platform profileperformancelow-power

GPU (Radeon)

SettingACBattery
Power profiledefaultlow
DPM stateperformancebattery
ABM level00

Power States

SettingACBattery
Memory sleepdeepdeep
PCIe ASPMdefaultpowersupersave

Disabling CPU boost on battery is an aggressive but effective measure -- it significantly reduces power consumption at the cost of peak single-thread performance.

Audio

PipeWire is the audio stack, configured in pipewire.nix:

nix
services.pipewire = {
  enable = true;
  alsa.enable = true;
  jack.enable = true;
  pulse.enable = true;
  wireplumber.enable = true;
};

The camera is explicitly disabled in WirePlumber:

nix
wireplumber.extraConfig."10-disable-camera" = {
  "wireplumber.profiles".main."monitor.libcamera" = "disabled";
};

Bluetooth

nix
hardware.bluetooth = {
  enable = true;
  powerOnBoot = false;  # Don't power on at boot to save energy
};

Bluetooth hardware is available but not powered on at boot. Use bluetui to manage connections.

Graphics

nix
hardware.graphics.enable = true;

This enables Mesa and the AMD Radeon driver stack for hardware-accelerated graphics under Wayland.