summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--parts/rpi-cpugovernor.bu18
-rw-r--r--rpi4.bu1
-rw-r--r--rpi4.ign4
3 files changed, 23 insertions, 0 deletions
diff --git a/parts/rpi-cpugovernor.bu b/parts/rpi-cpugovernor.bu
new file mode 100644
index 0000000..1348f51
--- /dev/null
+++ b/parts/rpi-cpugovernor.bu
@@ -0,0 +1,18 @@
+variant: fcos
+version: 1.5.0
+systemd:
+ units:
+ - name: cpu-governor.service
+ enable: true
+ contents: |
+ [Unit]
+ Description=Enable CPU power saving
+
+ [Service]
+ Type=oneshot
+ RemainAfterExit=yes
+ ExecStart=/usr/sbin/modprobe cpufreq_conservative
+ ExecStart=/usr/bin/sh -c '/usr/bin/echo "ondemand" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor'
+
+ [Install]
+ WantedBy=multi-user.target
diff --git a/rpi4.bu b/rpi4.bu
index fee1595..461c8aa 100644
--- a/rpi4.bu
+++ b/rpi4.bu
@@ -6,3 +6,4 @@ ignition:
- local: parts/users.bu
- local: parts/timezone.bu
- local: parts/rpi4-hostname.bu
+ - local: parts/rpi-cpugovernor.bu
diff --git a/rpi4.ign b/rpi4.ign
index e838c8b..1872c45 100644
--- a/rpi4.ign
+++ b/rpi4.ign
@@ -13,6 +13,10 @@
{
"compression": "gzip",
"source": "data:;base64,H4sIAAAAAAAC/yyNTarDMAyE9z7FXODlB/y60G2EqzSCRAqWyPmLS2Y1zPDx3dyVLQlb8yi39FA3wjr9T0uJ9M4foQJsekiMAvzh4twJs2Sbd480PuX3AKe/hbC8an2G5pZi+aAjaoeaEC6tw7mWbwAAAP//HoeGtoMAAAA="
+ },
+ {
+ "compression": "gzip",
+ "source": "data:;base64,H4sIAAAAAAAC/3SQPWvDMBCGd/+KI0ugYKsduhg89CNDt9I0dCglKPLFEdh37t3ZjSE/vjgfTpcOAt0rPTo913uJniyHbWBNehSNTDncZffZbaKDGjZlngB0FE3HDUAK5BvMIbRdWnGPQiyZovQx4PECAJLf1JiDSXeJApMhmeZwOCcAnyuK9jWVz6hBYmuRqVgcX4Cn1xW0/IMC6vtIVXJll6eOV/x9aLFgQt2xTeEbNj7Sw9ZQFvtoxYA6nS32GJbmxQrXqTjdRHINl63wBke7reD3OjCNbt5ij/+RI6g7SAPMpxrDjmHGVGLjqZzBAQwRnA7qShw/ru40Xhfablw37tzSafB1pGp9Ge78j/ULqfm6vlp/eDIsH4ei6WqLaacomXmp0JLfAAAA//8D64rP3AEAAA=="
}
]
},