ansible-desktop/roles/laptop/files/usr/local/sbin/power-saver-mode

27 lines
709 B
Plaintext
Raw Normal View History

2022-10-25 23:18:13 +00:00
#!/usr/bin/env sh
2022-10-26 13:00:52 +00:00
# Limit 8C/16T CPU to 2C/4T
echo 0 | tee /sys/devices/system/cpu/cpu[2-7]/online
echo 0 | tee /sys/devices/system/cpu/cpu1[0-5]/online
2022-10-25 23:18:13 +00:00
# Set CPU to governor to powersave
2022-10-26 13:00:52 +00:00
cpupower frequency-set --governor powersave
2022-10-25 23:18:13 +00:00
# Set brightness to 120 / 255
2022-10-26 13:00:52 +00:00
echo 120 | tee /sys/class/backlight/amdgpu_bl0/brightness
2022-10-25 23:18:13 +00:00
2022-10-26 13:00:52 +00:00
# Disable bluetooth
rfkill block bluetooth
# TODO disable some services
# systemctl disable containerd.service
# systemctl disable docker.service
# systemctl disable bluetooth.service
# systemctl disable libvirtd.service
# systemctl disable winbind.service
# systemctl disable snapd.service
# systemctl disable cups.service
# systemctl disable avahi-daemon.service
# TODO exit steam