Fan issues with System76 Oryx Pro

I’ve been fan issues on my Oryx Pro model since a recent update and I sometimes need to run in “battery” profile to keep the fan from running at a pretty high speed all the time.

I’m getting the following error output from the system76-power daemon:

● system76-power.service - System76 Power Daemon
     Loaded: loaded (/etc/systemd/system/system76-power.service; enabled; preset: enabled)
     Active: active (running) since Sat 2022-12-10 09:48:26 EST; 2min 14s ago
   Main PID: 1007 (system76-power)
         IP: 0B in, 0B out
         IO: 3.9M read, 0B written
      Tasks: 1 (limit: 76974)
     Memory: 4.9M
        CPU: 74ms
     CGroup: /system.slice/system76-power.service
             └─1007 /nix/store/6b9ji4lrymczhhda0p067z0h427lfi9b-system76-power-1.1.23/bin/system76-power daemon

Dec 10 09:48:26 nixos system76-power[1007]: [WARN] failed to iterate SCSI Host device: No such file or directory (os error 2)
Dec 10 09:48:26 nixos system76-power[1007]: setting powersave with max 4600000
Dec 10 09:48:26 nixos system76-power[1007]: [INFO] Registering dbus name com.system76.PowerDaemon
Dec 10 09:48:26 nixos system76-power[1007]: [INFO] Adding dbus path /com/system76/PowerDaemon with interface com.system76.PowerDaemon
Dec 10 09:48:26 nixos systemd[1]: Started System76 Power Daemon.
Dec 10 09:48:26 nixos system76-power[1007]: [ERROR] fan daemon: platform hwmon not found
Dec 10 09:48:26 nixos system76-power[1007]: [INFO] Handling dbus requests
Dec 10 09:48:26 nixos system76-power[1007]: thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/hid_backlight.rs:80:71
Dec 10 09:48:26 nixos system76-power[1007]: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Dec 10 09:48:31 nixos system76-power[1007]: [INFO] Setting power management to auto

Here’s some other info:

> nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.0.11, NixOS, 23.05 (Stoat), 23.05pre433539.2787fc7d1e5`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.12.0`
 - channels(root): `"nixos"`
 - channels([my username]): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

> nix-channel --list
nixos https://nixos.org/channels/nixos-unstable

I’d appreciate any help getting this sorted as it’s been quite annoying. Thanks in advance.

Hi, I have been using my Galago Pro with no issues (granted, I did not realize there was a power daemon). What version of the Oryx is it? Namely, is it CoreBoot or proprietary firmware?

EDIT: I do not see an option for this daemon at all, how have you enabled it?

This is the option: hardware.system76.power-daemon.enable

You probably want to include the system76 nixos-hardware module instead, though, in case additional settings are required in the future and added upstream, so you don’t have to think about that manually: https://github.com/NixOS/nixos-hardware/blob/9d87bc030a0bf3f00e953dbf095a7d8e852dab6b/system76/default.nix

Also see about adding the device-specific modules in the system76 directory, in case there’s one for your specific device.

That said, GNOME 40+ setups will cause the daemon to fail even if you configure this. I’ll see about submitting a PR to fix that at some point, likely forcibly disabling the GNOME power daemon if the system-76 one is enabled. I can’t test it though, so feel free to submit your own :slight_smile:

As for @curriedFunctions, could you share your configuration as well?

Given things work on the other thread, would be nice if you could try NixOS stable as well, just in case this is a regression. Makes it easier to track down the problem.

An lsmod and dmesg would be nice too, your logs indicate kernel issues.

1 Like

Probably means fan settings aren’t working at all, by the way, and you setting the battery mode just makes whatever default settings the motherboard has happy by making the CPU use no energy at all or something.

Hello again,
I know this thread is quite old - I haven’t had the bandwidth to pursue this issue in the past year but the problem is still persisting. Any help you might offer would be much appreciated!

Here is my nixos configuration:

{ config, pkgs, lib, ... }:

let
  nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
    export __NV_PRIME_RENDER_OFFLOAD=1
    export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
    export __GLX_VENDOR_LIBRARY_NAME=nvidia
    export __VK_LAYER_NV_optimus=NVIDIA_only
    exec "$@"
    '';
in
{

  nix = {
    package = pkgs.nixUnstable; # or versioned attributes like nixVersions.nix_2_8
    gc = {
      automatic = true;
      dates = "weekly";
      options = "--delete-older-than 7d";
    };
    settings = {
      auto-optimise-store = true;
      keep-outputs = true;
      trusted-users = [ "root" "ian" ];
      experimental-features = [ "nix-command" "flakes" "ca-derivations" "auto-allocate-uids" "configurable-impure-env" ];
    }; 
  };

  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
      <nixos-hardware/system76>
      <home-manager/nixos>
    ];

  hardware = {
    pulseaudio.enable = true;
    bluetooth.enable = true;
    nvidia = {
      modesetting.enable = true;
      prime = {
        offload.enable = true;
        intelBusId = "PCI:0:2:0";
        nvidiaBusId = "PCI:1:0:0";
      };
    };
  };

  boot = {
    kernelPackages = pkgs.linuxPackages_latest;
    loader = {
      systemd-boot = {
      	enable = true;
	configurationLimit = 42;
	};
      efi.canTouchEfiVariables = true;
    };
  };

  networking = {
    hostName = "nixos";
    networkmanager.enable = true;
    useDHCP = false;
    interfaces = {
      enp36s0.useDHCP = true;
      wlp0s20f3.useDHCP = true;
    };
  # Configure network proxy if necessary
  # proxy.default = "http://user:password@proxy:port/";
  # proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  # Open ports in the firewall.
  # firewall.allowedTCPPorts = [ ... ];
  # firewall.allowedUDPPorts = [ ... ];
  # Or disable the firewall altogether.
  # firewall.enable = false;
  };
  
  sound.enable = true;
  time.timeZone = "America/New_York"; #"Asia/Jerusalem"
  # Select internationalisation properties.
  # i18n.defaultLocale = "en_US.UTF-8";

  console = {
  # font = "Lat2-Terminus16";
  # keyMap = "us";
    useXkbConfig = true;
  };

# Specialisation to boot with with system76-power nvidia mode (for external display or to run applications requiring GPU)
  specialisation = {
    external-display.configuration = {
      system.nixos.tags = [ "external-display" ];
    # Note: nvidia driver must be enabled for xserver to start when in nvidia mode
    #  services.xserver.videoDrivers = [ "nvidia" ];
    hardware.nvidia.prime.offload.enable = lib.mkForce false;
    hardware.nvidia.powerManagement.enable = lib.mkForce false;
    };
  };

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users.ian = {
    isNormalUser = true;
    initialPassword = "changeme";
    extraGroups = [ "networkmanager" "wheel" "video" "docker" ]; # Enable ‘sudo’ for the user.
    shell = pkgs.fish;
  };
  
  # Packages installed in system profile
  nixpkgs.config.allowUnfree = true;

  environment.systemPackages = [nvidia-offload] ++ (with pkgs; [
    
    # Drivers
    # pentablet-driver

    # Utils
    dconf
    direnv
    evtest
    nix-direnv
    wget
    freeglut
    gcc
    git
    git-credential-manager
    gmp
    efibootmgr
    gnutls
    httpie
    jq
    libsodium
    libsodium.dev
    libtool
    light
    lm_sensors
    monitor
    ncurses
    pciutils
    pkg-config
    scrot
    smartmontools
    systemd
    tree
    unixtools.xxd
    unzip
    usbutils
    xclip
    zlib

    # WM
    dmenu
    feh
    haskellPackages.xmobar
    lxappearance
    stalonetray
    # xfce.xfce4-power-manager
    xscreensaver

    # Editors
    emacs
    evince
    vscode
    firefox

    # Haskell stuff
    cabal-install
    ghc
    haskell-language-server
    hlint
    niv
    haskellPackages.apply-refact
    haskellPackages.hasktags
    haskellPackages.hindent
    haskellPackages.hoogle
    haskellPackages.zlib

    # Python stuff
    python311
    python311Packages.autopep8

    # JS stuff
    nodejs
    nodePackages.npm
    yarn

    # Deployment
    docker-compose
    heroku

    # Other languages
    kotlin
    openjdk17-bootstrap
    
    # Clojure
    # clj-kondo
    # clojure
    # clojure-lsp
    # leiningen

  ]);
  # environment.variables.EDITOR = "nvim";

  virtualisation.docker.enable = true;

  # Fonts
  fonts.packages = with pkgs; [
    mononoki
    fira-code
    inter
    nerdfonts
  ];

  # Some programs need SUID wrappers, can be configured further or are
  # started in user sessions.
  programs = {
    fish.enable = true;
    gnupg.agent = {
      enable = true;
      enableSSHSupport = true;
    };
    light.enable = true; # Enable brightness control
    mtr.enable = true;
    steam.enable = true;
  };
  
  services = {
    autorandr.enable = true;
    blueman.enable = true;
    gnome.gnome-keyring.enable = true;
    openssh.enable = true;

    picom = {
      enable = true;
      inactiveOpacity = 0.8;
      backend = "glx";
      vSync = true;
    # experimentalBackends = true;
    }; 
    
    # printing.enable = true; # Enable CUPS to print documents.
    
    # XP-Pen Tablet
    udev.extraHwdb = ''
      evdev:input:b0003v28BDp0905*
        KEYBOARD_KEY_70016=z
        KEYBOARD_KEY_700e2=leftctrl
        KEYBOARD_KEY_7001d=y
        KEYBOARD_KEY_7002c=p
        KEYBOARD_KEY_7000c=e
        KEYBOARD_KEY_70008=v
        KEYBOARD_KEY_70005=backspace
        KEYBOARD_KEY_d0044=0x14c
        KEYBOARD_KEY_d0045=0x14b
    '';
    
    xserver = {
      enable = true;
    # digimend.enable = true; # Enable digimend driver for XP Pen tablet
      windowManager = {
        xmonad = {
          enable = true;
      	  enableContribAndExtras = true;
	  extraPackages = haskellPackages : [
	    haskellPackages.xmonad-contrib
	    haskellPackages.xmonad-extras
	    haskellPackages.xmonad
	    ];
        };
      };
      displayManager.defaultSession = "none+xmonad";
      displayManager.xserverArgs = [ "-logfile" "/var/log/X.log" ];
      videoDrivers = ["nvidia"];
      xkbOptions = "caps:escape";
    
      # Enable touchpad support (enabled default in most desktopManager).
      libinput.enable = true;
    
      # XP-Pen Tablet
      inputClassSections = [
        ''
          Identifier "XP-Pen 10 inch PenTablet"
          MatchUSBID "28bd:0905"
          MatchIsTablet "on"
          MatchDevicePath "/dev/input/event*"
          Driver "wacom"
          Option "Rotate" "HALF"
          Option "Button3" "0"
        ''
        ''
          Identifier "XP-Pen 10 inch PenTablet"
          MatchUSBID "28bd:0905"
          MatchIsKeyboard "on"
          MatchDevicePath "/dev/input/event*"
          Driver "libinput"
        ''
      ];
    };
  };
  home-manager.useGlobalPkgs = true;
  home-manager.users.ian = { pkgs, ... }: {
    home = { 
      packages = with pkgs; [
        brave
        tdesktop
        (vscode-with-extensions.override {
          vscode = vscodium;
          vscodeExtensions = with vscode-extensions; [ 
            asvetliakov.vscode-neovim
            dracula-theme.theme-dracula
            haskell.haskell
            jnoortheen.nix-ide
            justusadam.language-haskell
            mkhl.direnv
	    ms-python.python
	    ms-python.vscode-pylance
          ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
	    {
	      name = "vscode-code-review";
	      publisher = "d-koppenhagen";
	      version = "1.33.1";
	      sha256 = "3ea15f3689b429a64f05d5935aa6437f8233ccc2c6df637f3306e999c67bae48";
	    }
	    {
	      name = "aiken";
	      publisher = "TxPipe";
	      version = "1.0.8";
	      sha256 = "sha256-mbAA0npxDXMT3SY5pP9W7J043Lu/Emw28lloMhejpvk=";
	    }
	  ];
        })
	nicotine-plus
	vlc
        zoom-us
      ];
      stateVersion = "22.11";
    };
    programs = {
      neovim = {
        enable = true;
	defaultEditor = true;
        viAlias = true;
        vimAlias = true;
	extraConfig = ''
          set number
        '';
      };
    };
  };

  system.autoUpgrade = {
    enable = true;
    channel = "https://nixos.org/channels/nixos-unstable";
  };

  # This value determines the NixOS release from which the default
  # settings for stateful data, like file locations and database versions
  # on your system were taken. It‘s perfectly fine and recommended to leave
  # this value at the release version of the first install of this system.
  # Before changing this value read the documentation for this option
  # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  system.stateVersion = "21.11"; # Did you read the comment?
}

Here is the result of lsmod:

Module                  Size  Used by
nft_chain_nat          12288  3
xt_MASQUERADE          16384  1
nf_conntrack_netlink    61440  0
xfrm_user              57344  1
xfrm_algo              16384  1 xfrm_user
xt_addrtype            12288  2
overlay               208896  0
rfcomm                102400  4
ccm                    20480  6
snd_hda_codec_realtek   200704  1
cmac                   12288  3
algif_hash             12288  1
snd_hda_codec_generic   114688  1 snd_hda_codec_realtek
algif_skcipher         12288  1
ledtrig_audio          12288  1 snd_hda_codec_generic
af_alg                 36864  6 algif_hash,algif_skcipher
af_packet              65536  8
bnep                   28672  2
xt_conntrack           12288  3
msr                    12288  0
ip6t_rpfilter          12288  1
8021q                  45056  0
ipt_rpfilter           12288  1
xt_pkttype             12288  2
xt_LOG                 16384  2
nf_log_syslog          24576  2
xt_tcpudp              16384  3
nft_compat             20480  15
nf_tables             368640  169 nft_compat,nft_chain_nat
nfnetlink              20480  4 nft_compat,nf_conntrack_netlink,nf_tables
sch_fq_codel           20480  2
uinput                 20480  0
system76_io            20480  0
i915                 3964928  24
snd_sof_pci_intel_tgl    12288  0
iwlmvm                602112  0
snd_sof_intel_hda_common   217088  1 snd_sof_pci_intel_tgl
snd_soc_hdac_hda       28672  1 snd_sof_intel_hda_common
soundwire_intel        73728  1 snd_sof_intel_hda_common
snd_sof_intel_hda_mlink    36864  2 soundwire_intel,snd_sof_intel_hda_common
soundwire_cadence      45056  1 soundwire_intel
snd_sof_intel_hda      20480  1 snd_sof_intel_hda_common
snd_sof_pci            24576  2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl
snd_sof_xtensa_dsp     16384  1 snd_sof_intel_hda_common
joydev                 24576  0
snd_sof               364544  3 snd_sof_pci,snd_sof_intel_hda_common,snd_sof_intel_hda
mac80211             1286144  1 iwlmvm
snd_sof_utils          16384  1 snd_sof
snd_hda_ext_core       36864  4 snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda_mlink,snd_sof_intel_hda
snd_soc_acpi_intel_match    98304  2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl
snd_soc_acpi           16384  2 snd_soc_acpi_intel_match,snd_sof_intel_hda_common
soundwire_generic_allocation    12288  1 soundwire_intel
soundwire_bus         114688  3 soundwire_intel,soundwire_generic_allocation,soundwire_cadence
snd_soc_core          430080  4 soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hda
intel_tcc_cooling      12288  0
snd_hda_codec_hdmi     94208  2
nvidia_drm            118784  5
snd_compress           28672  1 snd_soc_core
x86_pkg_temp_thermal    16384  0
ac97_bus               12288  1 snd_soc_core
intel_powerclamp       16384  0
snd_pcm_dmaengine      16384  1 snd_soc_core
ptp                    40960  1 iwlmvm
uvcvideo              147456  0
pps_core               28672  1 ptp
nvidia_modeset       1585152  3 nvidia_drm
snd_hda_intel          61440  4
libarc4                12288  1 mac80211
coretemp               16384  0
snd_intel_dspcfg       36864  3 snd_hda_intel,snd_sof,snd_sof_intel_hda_common
drm_buddy              20480  1 i915
crc32_pclmul           12288  0
polyval_clmulni        12288  0
snd_intel_sdw_acpi     16384  2 snd_sof_intel_hda_common,snd_intel_dspcfg
polyval_generic        12288  1 polyval_clmulni
ttm                   102400  1 i915
gf128mul               16384  1 polyval_generic
processor_thermal_device_pci_legacy    12288  0
videobuf2_vmalloc      16384  1 uvcvideo
processor_thermal_device    20480  1 processor_thermal_device_pci_legacy
ghash_clmulni_intel    16384  0
intel_rapl_msr         20480  0
uvc                    12288  1 uvcvideo
nvidia_uvm           1757184  2
hid_multitouch         32768  0
processor_thermal_wt_hint    16384  1 processor_thermal_device
snd_hda_codec         217088  6 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek,snd_soc_hdac_hda,snd_sof_intel_hda
drm_display_helper    217088  1 i915
sha512_ssse3           53248  0
processor_thermal_rfim    28672  1 processor_thermal_device
btusb                  86016  0
sha512_generic         16384  1 sha512_ssse3
videobuf2_memops       16384  1 videobuf2_vmalloc
iTCO_wdt               12288  0
processor_thermal_rapl    16384  1 processor_thermal_device
snd_hda_core          143360  9 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
sha256_ssse3           32768  0
videobuf2_v4l2         36864  1 uvcvideo
cec                    65536  1 i915
btrtl                  32768  1 btusb
intel_pmc_bxt          16384  1 iTCO_wdt
mei_pxp                16384  0
mei_hdcp               24576  0
iwlwifi               544768  1 iwlmvm
cmdlinepart            12288  0
nls_iso8859_1          12288  1
intel_rapl_common      36864  2 intel_rapl_msr,processor_thermal_rapl
snd_hwdep              16384  1 snd_hda_codec
ee1004                 16384  0
sha1_ssse3             32768  0
watchdog               40960  1 iTCO_wdt
btintel                57344  1 btusb
intel_gtt              24576  1 i915
videodev              356352  2 videobuf2_v4l2,uvcvideo
nls_cp437              16384  1
aesni_intel           360448  8
snd_pcm               192512  11 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_compress,snd_soc_core,snd_sof_utils,snd_hda_core,snd_pcm_dmaengine
r8169                 118784  0
spi_nor               163840  0
btbcm                  24576  1 btusb
agpgart                53248  2 intel_gtt,ttm
crypto_simd            16384  1 aesni_intel
processor_thermal_wt_req    12288  1 processor_thermal_device
cryptd                 28672  3 crypto_simd,ghash_clmulni_intel
vfat                   20480  1
btmtk                  12288  1 btusb
processor_thermal_power_floor    12288  1 processor_thermal_device
pmt_telemetry          12288  0
fat                    98304  1 vfat
cfg80211             1331200  3 iwlmvm,iwlwifi,mac80211
bluetooth            1089536  32 btrtl,btmtk,btintel,btbcm,bnep,btusb,rfcomm
snd_timer              53248  1 snd_pcm
8250_dw                24576  0
system76_acpi          20480  0
mtd                   102400  3 spi_nor,cmdlinepart
drm_kms_helper        253952  3 drm_display_helper,nvidia_drm,i915
rapl                   20480  0
pmt_class              12288  1 pmt_telemetry
evdev                  28672  35
input_leds             12288  0
intel_lpss_pci         24576  0
i2c_algo_bit           12288  1 i915
mei_me                 57344  2
ecdh_generic           16384  2 bluetooth
intel_lpss             12288  1 intel_lpss_pci
snd                   155648  19 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_sof,snd_timer,snd_compress,snd_soc_core,snd_pcm
mousedev               24576  0
realtek                40960  1
processor_thermal_mbox    12288  4 processor_thermal_power_floor,processor_thermal_wt_req,processor_thermal_rfim,processor_thermal_wt_hint
i2c_i801               40960  0
videobuf2_common       77824  4 videobuf2_vmalloc,videobuf2_v4l2,uvcvideo,videobuf2_memops
intel_cstate           20480  0
ecc                    40960  1 ecdh_generic
int340x_thermal_zone    16384  1 processor_thermal_device
video                  73728  2 i915,nvidia_modeset
i2c_hid_acpi           12288  0
idma64                 20480  0
spi_intel_pci          12288  0
mdio_devres            12288  1 r8169
tiny_power_button      12288  0
intel_uncore          258048  0
psmouse               192512  0
mc                     94208  4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common
libaes                 12288  2 bluetooth,aesni_intel
rfkill                 40960  7 iwlmvm,bluetooth,cfg80211
libphy                221184  3 r8169,mdio_devres,realtek
mei                   188416  5 mei_hdcp,mei_pxp,mei_me
intel_hid              28672  0
i2c_smbus              20480  1 i2c_i801
soundcore              16384  1 snd
spi_intel              32768  1 spi_intel_pci
mac_hid                12288  0
virt_dma               16384  1 idma64
i2c_hid                40960  1 i2c_hid_acpi
intel_soc_dts_iosf     16384  1 processor_thermal_device_pci_legacy
battery                28672  1 system76_acpi
intel_vsec             20480  0
intel_pmc_core         81920  0
wmi                    36864  1 video
pinctrl_tigerlake      28672  1
intel_scu_pltdrv       12288  0
ac                     16384  0
sparse_keymap          12288  1 intel_hid
led_class              24576  5 snd_hda_codec_generic,videodev,input_leds,iwlmvm,system76_acpi
button                 24576  0
serio_raw              16384  0
nvidia              62382080  44 nvidia_uvm,nvidia_modeset
ctr                    12288  2
loop                   36864  0
cpufreq_powersave      16384  0
xt_nat                 12288  0
nf_nat                 65536  3 xt_nat,nft_chain_nat,xt_MASQUERADE
nf_conntrack          196608  5 xt_conntrack,nf_nat,xt_nat,nf_conntrack_netlink,xt_MASQUERADE
nf_defrag_ipv6         24576  1 nf_conntrack
nf_defrag_ipv4         12288  1 nf_conntrack
libcrc32c              12288  3 nf_conntrack,nf_nat,nf_tables
br_netfilter           36864  0
veth                   40960  0
tun                    69632  0
tap                    32768  0
macvlan                36864  0
bridge                385024  1 br_netfilter
stp                    12288  1 bridge
llc                    16384  2 bridge,stp
kvm_intel             409600  0
kvm                  1347584  1 kvm_intel
drm                   749568  19 i2c_hid,drm_kms_helper,drm_display_helper,nvidia,drm_buddy,nvidia_drm,i915,ttm
irqbypass              12288  1 kvm
fuse                  188416  1
configfs               69632  1
backlight              28672  5 video,drm_display_helper,i915,drm,nvidia_modeset
efi_pstore             12288  0
efivarfs               24576  1
tpm                   102400  0
rng_core               20480  1 tpm
dmi_sysfs              20480  0
ip_tables              28672  0
x_tables               53248  11 xt_conntrack,ip6t_rpfilter,nft_compat,xt_LOG,xt_tcpudp,xt_addrtype,xt_nat,ipt_rpfilter,xt_pkttype,ip_tables,xt_MASQUERADE
autofs4                57344  0
ext4                 1122304  1
crc32c_generic         12288  0
crc16                  12288  2 bluetooth,ext4
mbcache                16384  1 ext4
jbd2                  196608  1 ext4
hid_generic            12288  0
usbhid                 77824  0
hid                   172032  4 i2c_hid,usbhid,hid_multitouch,hid_generic
xhci_pci               24576  0
xhci_pci_renesas       16384  1 xhci_pci
firmware_class         53248  16 r8169,btrtl,snd_hda_intel,xhci_pci_renesas,btmtk,snd_sof,drm_display_helper,nvidia,btintel,snd_soc_hdac_hda,btbcm,iwlwifi,btusb,i915,cfg80211,drm
xhci_hcd              356352  1 xhci_pci
nvme                   57344  2
nvme_core             184320  3 nvme
atkbd                  40960  0
thunderbolt           503808  0
libps2                 20480  2 atkbd,psmouse
vivaldi_fmap           12288  1 atkbd
usbcore               401408  6 xhci_hcd,usbhid,uvcvideo,system76_io,btusb,xhci_pci
t10_pi                 20480  1 nvme_core
crc32c_intel           16384  3
crc64_rocksoft         16384  1 t10_pi
crc64                  16384  1 crc64_rocksoft
i8042                  45056  0
crc_t10dif             16384  1 t10_pi
crct10dif_generic      12288  0
crct10dif_pclmul       12288  1
usb_common             16384  3 xhci_hcd,usbcore,uvcvideo
crct10dif_common       12288  3 crct10dif_generic,crc_t10dif,crct10dif_pclmul
rtc_cmos               28672  1
serio                  28672  6 serio_raw,atkbd,psmouse,i8042
dm_mod                192512  0
dax                    53248  1 dm_mod

I did some more research and it seems that the fan daemon in system76-power is only for desktop systems. For laptops I think you need to modify the fan curve manually and flash the firmware (https://github.com/system76/ec/blob/4b86176659a85eaba918e776ad74d75016a747a8/docs/flashing.md), which I attempted to do but building the firmware with cargo install fails because it can’t find the libudev dependency. I’m not sure how to complete this process successfully on NixOS so I’m giving up and will just have to deal with the erratic fan behavior.

building the firmware with cargo install fails because it can’t find the libudev dependency

The link to github says nothing about cargo install. Can you provide a bit more context? If you want to build some Rust binary, I’d suggest you do it in a nix shell that provides the dependencies.

I think the make flash_internal command is using cargo to do the build. I’d tried entering a nix shell to run the make command in there, but I can’t figure out which specific dependencies are needed (the error mentions libudev, which isn’t in nixpkgs). I think there is a deps.sh script somewhere in that repo that might list all the dependencies, so I may try including all of those in the nix shell, as long as they actually correspond to things in nixpkgs.