Skip to content

Commit

Permalink
tetra-zw: update power limits. enable opencl
Browse files Browse the repository at this point in the history
  • Loading branch information
marenz2569 committed Aug 22, 2024
1 parent e31febc commit 027a0ef
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
26 changes: 26 additions & 0 deletions hardware/tetra-zw.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,32 @@
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;

# Enable OpenCL
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};

hardware.amdgpu.opencl = true;
hardware.amdgpu.loadInInitrd = true;
nixpkgs.config.rocmSupport = true;

# Adjust power limits of the processor
systemd.services."adjust-power-limits" = {
enable = true;
wantedBy = [ "multi-user.target" ];

script = ''
exec ${pkgs.ryzenadj}/bin/ryzenadj --stapm-limit=30000 --fast-limit=30000 --slow-limit=30000 --tctl-temp=100 --max-performance --apu-skin-temp=100 --skin-temp-limit=100
'';

serviceConfig = {
Type = "oneshot";
User = config.users.users.root.name;
};
};

boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_6;

swapDevices = [ ];
Expand Down
4 changes: 2 additions & 2 deletions hosts/tetra-zw/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
deployment-TLMS.monitoring.enable = registry.monitoring;

powerManagement.enable = true;
powerManagement.cpuFreqGovernor = "ondemand";
}
powerManagement.cpuFreqGovernor = "schedutil";
}

0 comments on commit 027a0ef

Please sign in to comment.