Skip to content
Snippets Groups Projects
Verified Commit bb4fe9fc authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

feat(system-upgrades): Disable agressive CPU overclocking

This patch installs a systemd unit, that will disable CPU overclocking
5 minutes after start of the system. The idea is to keep systems more
  quiet and stable from a temprature perspective.
parent 2f30af7f
No related branches found
No related tags found
No related merge requests found
......@@ -2,21 +2,48 @@
apiVersion: v1
kind: Secret
metadata:
name: fedora-install-temperature-monitoring
name: fedora-install-temperature-management
namespace: system-upgrade
type: Opaque
stringData:
cpu-boost-disable.service: |
[Unit]
Description=Disable overclocking on CPU
[Service]
Type=oneshot
WorkingDirectory=/opt/letsencrypt/
ExecStart=/bin/sh -c "echo 0 > /sys/devices/system/cpu/cpufreq/boost"
cpu-boost-disable.timer: |
[Unit]
Description=Disable overclocking on CPU on boot after 5 minutes
[Timer]
OnBootSec=5min
Unit=cpu-boost-disable.service
[Install]
WantedBy=basic.target
install.sh: |
#!/bin/sh
set -e
set -x
secrets="$(dirname $0)"
install -m 0644 -T "$secrets/cpu-boost-disable.service" /etc/systemd/system/cpu-boost-disable.service
install -m 0644 -T "$secrets/cpu-boost-disable.timer" /etc/systemd/system/cpu-boost-disable.timer
systemctl daemon-reload
systemctl start cpu-boost-disable.service
systemctl enable cpu-boost-disable.timer
systemd-run --same-dir --wait --collect --service-type=exec dnf install -y lm_sensors
sensors-detect --auto
---
apiVersion: upgrade.cattle.io/v1
kind: Plan
metadata:
name: fedora-temperature-monitoring
name: fedora-temperature-management
namespace: system-upgrade
spec:
concurrency: 1
......@@ -32,7 +59,7 @@ spec:
- "35"
serviceAccountName: system-upgrade
secrets:
- name: fedora-install-temperature-monitoring
- name: fedora-install-temperature-management
path: /host/run/system-upgrade/secrets/fedora
version: 1.0.0
upgrade:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment