Fan keeps spinning with a base installation of NixOS


#1

I’ve been installing NixOS on my Lenovo Thinkpad X1 Carbon (5th Gen), and half of the time when I wake it from sleep, the fan just keeps spinning (although the laptop itself doesn’t get hot), no matter whether I’m doing something or not. Is this a NixOS-specific problem (for example, the same didn’t happen when I installed Arch Linux on the same hardware), or is it my hardware?


#2

Oh yeah, for the record, the other times when i wake it from sleep, the fan is completely quiet (as it should be).


#3

I’ve had both software and hardware reasons for spinning fan on Lenovo Ideapd Z510. Eventually fan was replaced, but low-power mode is still nice to have. See my low-power module:

{ config, pkgs, lib, ... }:
{
  hardware.cpu.intel.updateMicrocode = true;
  hardware.enableAllFirmware = true;

  boot.kernelModules = [ "coretemp" ];

  powerManagement.cpuFreqGovernor = "powersave";
  powerManagement.powertop.enable = true;

  # uncomment to lower CPU frequeuncy (0 - lowest, 100 - highest)
  # if it spins even on lowest frequency, then this can be hardware problem

  # system.activationScripts.cpu-frequency-set = {
  #     text = ''
  #         echo 75 > /sys/devices/system/cpu/intel_pstate/max_perf_pct
  #         # check freq with    "sudo cpupower frequency-info"
  #     '';
  #     deps = [];
  # };

  services.thermald.enable = true;
  environment.etc."sysconfig/lm_sensors".text = ''
    # Generated by sensors-detect on Tue Aug  7 10:54:09 2018
    # This file is sourced by /etc/init.d/lm_sensors and defines the modules to
    # be loaded/unloaded.
    #
    # The format of this file is a shell script that simply defines variables:
    # HWMON_MODULES for hardware monitoring driver modules, and optionally
    # BUS_MODULES for any required bus driver module (for example for I2C or SPI).

    HWMON_MODULES="coretemp"
  '';
}

#4

This post was flagged by the community and is temporarily hidden.