nixos-hardware icon indicating copy to clipboard operation
nixos-hardware copied to clipboard

module request: smbios-thermal-ctl

Open colemickens opened this issue 3 years ago • 4 comments

see: https://wiki.archlinux.org/title/Dell_XPS_13_(9370)#Thermal_Modes_/_Fan_profiles

It would be nice to have a little module that sets this on boot to a pre-set value. (I use a screen-less XPS 9370 as a battery-backup unifi+home-assistant "server" and would like to always go into performance mode.)

colemickens avatar Jul 30 '22 19:07 colemickens

@colemickens

FYI:, As long as there isn't such a module: I install libsmbios and create a systemd service:

[…]
  environment.systemPackages = with pkgs; [
    libsmbios
  ];

  systemd = {
    services = {
      dell-thermal-mode = {
        after = [ "post-resume.target" ];
        serviceConfig = {
          Type = "oneshot";
          Restart = "no";
          ExecStart = "${pkgs.libsmbios}/bin/smbios-thermal-ctl --set-thermal-mode=quiet";
        };
        wantedBy = [ "multi-user.target" "post-resume.target" ];
      };
    };
  };
[…]

All creds are going to: https://github.com/jpas/etc-nixos/blob/88abdbf34bc2dc57c92a8f6fe26501156d9bc04e/profiles/hardware/laptop-dell-xps-13-9300.nix#L83-L98

sokai avatar Jan 15 '24 15:01 sokai

FYI, there is a soon to be mainlined module in the kernel for controlling this interface via platform_profiles.

Please see: https://www.phoronix.com/news/Dell-PC-Driver-For-Linux-6.11

https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/patch/?id=996ad412981024a9bb90991ab195685d37187bbd

Lyndeno avatar Jun 28 '24 15:06 Lyndeno

If you use software the changes platform_profile, such as power-profiles-demon, this will affect you.

This patch will also block smbios-thermal-ctl from working, as the kernel is now in control of the fan modes, via platform_profile.

Lyndeno avatar Jun 28 '24 15:06 Lyndeno

Huh, interesting. Better late than never, I suppose.

colemickens avatar Jun 28 '24 15:06 colemickens