From 569e0de59d86e098b92ce786dc0d5949e1464f52 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 00:31:49 +0000 Subject: [PATCH 1/2] Initial plan From c23ae5543da0e918b85234c872ec08aefabe0414 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 00:33:32 +0000 Subject: [PATCH 2/2] Remove Plymouth, add quiet boot params, add cpu-performance module Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/eda71495-cd38-4408-8d3b-b9d793f6445f Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- configuration.nix | 2 +- iso/branding.nix | 12 -------- iso/plymouth-theme.nix | 39 ------------------------ modules/core/cpu-performance.nix | 52 ++++++++++++++++++++++++++++++++ modules/modules.nix | 1 + 5 files changed, 54 insertions(+), 52 deletions(-) delete mode 100644 iso/branding.nix delete mode 100644 iso/plymouth-theme.nix create mode 100644 modules/core/cpu-performance.nix diff --git a/configuration.nix b/configuration.nix index 0e05a2d..9d26d6c 100644 --- a/configuration.nix +++ b/configuration.nix @@ -3,7 +3,6 @@ { imports = [ ./modules/modules.nix - ./iso/branding.nix ]; # ── Boot ──────────────────────────────────────────────────── @@ -11,6 +10,7 @@ boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.efiSysMountPoint = "/boot/efi"; boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelParams = [ "quiet" "loglevel=3" "rd.systemd.show_status=false" "udev.log_level=3" ]; # ── Filesystems ───────────────────────────────────────────── fileSystems."/run/media/Second_Drive" = { diff --git a/iso/branding.nix b/iso/branding.nix deleted file mode 100644 index e08e0ec..0000000 --- a/iso/branding.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, pkgs, lib, ... }: - -let - theme = pkgs.callPackage ./plymouth-theme.nix {}; -in -{ - boot.plymouth.enable = true; - boot.plymouth.theme = "sovran"; - boot.plymouth.themePackages = [ theme ]; - boot.kernelParams = [ "quiet" "splash" ]; - boot.initrd.systemd.enable = true; -} diff --git a/iso/plymouth-theme.nix b/iso/plymouth-theme.nix deleted file mode 100644 index 859fc1c..0000000 --- a/iso/plymouth-theme.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ pkgs, lib }: - -pkgs.stdenv.mkDerivation { - pname = "sovran-plymouth-theme"; - version = "1.0"; - - src = ./.; - - installPhase = '' - mkdir -p $out/share/plymouth/themes/sovran - cp ${./assets/splash-logo.png} $out/share/plymouth/themes/sovran/logo.png - - cat > $out/share/plymouth/themes/sovran/sovran.plymouth < $out/share/plymouth/themes/sovran/sovran.script <<'EOF' -# Background color: #CFFFD7 (RGB 207,255,215) -bg_r = 207/255.0 -bg_g = 255/255.0 -bg_b = 215/255.0 - -Window.SetBackgroundTopColor (bg_r, bg_g, bg_b); -Window.SetBackgroundBottomColor (bg_r, bg_g, bg_b); - -logo = Image("logo.png"); -logo_sprite = Sprite(logo); -logo_sprite.SetX((Window.GetWidth() - logo.GetWidth()) / 2); -logo_sprite.SetY((Window.GetHeight() - logo.GetHeight()) / 2); -EOF - ''; -} \ No newline at end of file diff --git a/modules/core/cpu-performance.nix b/modules/core/cpu-performance.nix new file mode 100644 index 0000000..f7fe7f3 --- /dev/null +++ b/modules/core/cpu-performance.nix @@ -0,0 +1,52 @@ +# ── modules/core/cpu-performance.nix ────────────────────────────────────────── +# Forces all CPU cores to run at maximum frequency on node and server_plus_desktop +# roles. Desktop-only installs retain normal OS power management behaviour. +# +# Three layers: +# 1. power-profiles-daemon disabled — removes the GNOME power profile picker; +# no user can switch profiles +# 2. cpufreq performance governor — pins every core to max frequency via +# kernel, enforced at boot by a oneshot unit +# 3. systemd oneshot enforcement — belt-and-suspenders; applies the governor +# after every boot even if module loads late +{ config, lib, pkgs, ... }: + +{ + config = lib.mkIf (!config.sovran_systemsOS.roles.desktop) { + + # ── Layer 1: disable power-profiles-daemon ─────────────────────────────── + # This removes the power-profile switcher from GNOME Settings entirely. + services.power-profiles-daemon.enable = false; + + # ── Layer 2: set cpufreq governor to performance ───────────────────────── + # Pins all cores to max frequency. Works on Intel (intel_pstate) and AMD + # (amd-pstate / acpi-cpufreq) alike. + powerManagement.cpuFreqGovernor = "performance"; + + # ── Layer 3: enforce at boot via systemd oneshot ───────────────────────── + # Belt-and-suspenders: ensures the governor is applied after every boot even + # if the kernel module loads late. + systemd.services.cpu-performance = { + description = "Set CPU governor to performance on all cores"; + wantedBy = [ "multi-user.target" ]; + after = [ "systemd-modules-load.service" ]; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + }; + script = '' + found=0 + for gov in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do + if [ -w "$gov" ]; then + echo performance > "$gov" + found=1 + fi + done + if [ "$found" -eq 0 ]; then + echo "cpu-performance: no writable cpufreq governors found (VM or unsupported hardware)" >&2 + fi + ''; + }; + + }; +} diff --git a/modules/modules.nix b/modules/modules.nix index 1323d87..09ef561 100755 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -15,6 +15,7 @@ ./core/legacy-cleanup.nix ./core/remote-deploy.nix ./core/no-sleep.nix + ./core/cpu-performance.nix # ── Always on (no flag) ─────────────────────────────────── ./php.nix