From 806767671388751da2581fd7aa0061ac9766afbe Mon Sep 17 00:00:00 2001 From: rope Date: Fri, 7 Aug 2026 14:20:54 +0100 Subject: [PATCH] macbook: fan control, thermald, earlyoom; cheaper compositor Co-Authored-By: Claude Opus 5 --- hosts/FredOS-Macbook.nix | 13 +++++++++++++ settings/hyprland.nix | 12 ++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/hosts/FredOS-Macbook.nix b/hosts/FredOS-Macbook.nix index 8d6b8b7..6e2a7e1 100644 --- a/hosts/FredOS-Macbook.nix +++ b/hosts/FredOS-Macbook.nix @@ -29,6 +29,19 @@ services.tlp.enable = false; services.power-profiles-daemon.enable = true; + + # Linux leaves the Apple SMC fans at their minimum RPM — nothing in-tree + # ramps them. The CPU therefore sits at its thermal limit under any real + # load and throttles instead of spinning up. mbpfan drives applesmc. + services.mbpfan.enable = true; + + # Haswell's own thermal management: throttle gradually via RAPL/P-states + # instead of waiting for the hardware's PROCHOT emergency brake. + services.thermald.enable = true; + + # Zen eats the 8GB before zram can save it; without this the box hard-locks + # swapping instead of killing the tab that did it. + services.earlyoom.enable = true; # Quickshell's battery widget reads org.freedesktop.UPower over DBus services.upower.enable = true; diff --git a/settings/hyprland.nix b/settings/hyprland.nix index 045f1b9..9b93940 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -125,7 +125,10 @@ in blur = { enabled = true; size = 1; - passes = 3; + # 3 passes is 3 full-screen shader round-trips per frame. Free + # on Navi 22, not on the Macbook's gen7.5 iGPU driving a 2x + # scaled panel. + passes = if isMacbook then 1 else 3; }; shadow.color = rgba c.base00 "99"; }; @@ -195,7 +198,12 @@ in # vfr moved from misc: to debug: in 0.55.0 debug = { - vfr = false; # keep compositor ticking, don't idle between frames + # vfr=false renders every refresh forever, idle or not. That was + # the pre-patch workaround for cursor lag; the aquamarine + # legacy-cursor patch now moves the cursor by ioctl, so the + # Macbook can idle its GPU between frames again. Gaming box keeps + # the constant tick (games/present timing). + vfr = isMacbook; disable_logs = false; }; };