File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -252,19 +252,26 @@ debug "Updated package list."
252252
253253install_if_missing curl
254254install_if_missing avahi-daemon
255- install_if_missing cpufrequtils
256255install_if_missing libatomic1
257256install_if_missing v4l-utils
258257install_if_missing sqlite3
259258install_if_missing openjdk-17-jre-headless
260259
261- debug " Setting cpufrequtils to performance mode "
260+ debug " Adding cpu governor service "
262261if [[ -z $TEST ]]; then
263- if [ -f /etc/default/cpufrequtils ]; then
264- sed -i -e ' s/^#\?GOVERNOR=.*$/GOVERNOR=performance/' /etc/default/cpufrequtils
265- else
266- echo ' GOVERNOR=performance' > /etc/default/cpufrequtils
267- fi
262+ cat > /etc/systemd/system/cpu_governor.service << EOF
263+ [Unit]
264+ Description=Service that sets the cpu frequency governor
265+
266+ [Service]
267+ Type=oneshot
268+ ExecStart=bash -c 'echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor'
269+
270+ [Install]
271+ WantedBy=multi-user.target
272+ EOF
273+ chmod 644 /etc/systemd/system/cpu_governor.service
274+ systemctl enable cpu_governor.service
268275fi
269276
270277if [[ " $INSTALL_NETWORK_MANAGER " == " yes" ]]; then
You can’t perform that action at this time.
0 commit comments