Add power saving settings.

This commit is contained in:
Tom Alexander 2024-05-26 23:46:05 -04:00
parent 967f7dac16
commit e469ed8b9a
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
10 changed files with 56 additions and 7 deletions

View File

@ -0,0 +1,2 @@
# Disable the hardware watchdog inside AMD 700 chipset series for power savings.
blacklist sp5100_tco

View File

@ -0,0 +1,5 @@
options iwlwifi power_save=1
options iwlwifi uapsd_disable=0
options iwlmvm power_scheme=3

View File

@ -0,0 +1,2 @@
# Sound power-saving was causing chat notifications to be inaudible.
# options snd_hda_intel power_save=1

View File

@ -18,3 +18,28 @@
group: wheel
loop:
- screen_brightness
- name: Install module config
copy:
src: "files/{{ item }}_modprobe.conf"
dest: "/etc/modprobe.d/{{ item }}.conf"
mode: 0644
owner: root
group: wheel
loop:
- iwlwifi
- snd_hda_intel
- disable_sp5100_watchdog
- name: Configure kernel command line
zfs:
name: "zroot/linux"
state: present
extra_zfs_properties:
# amdgpu.abmlevel=3 :: Automatically reduce screen brightness but tweak colors to compensate for power reduction.
# pcie_aspm=force pcie_aspm.policy=powersupersave :: Enable PCIe active state power management for power reduction.
# nowatchdog :: Disable watchdog for power savings (related to disable_sp5100_watchdog above).
# amd_pstate=passive :: Fully automated hardware pstate control.
# amd_pstate=active :: Same as passive except we can set the energy performance preference (EPP) to suggest how much we prefer performance or energy efficiency.
# amd_pstate=guided :: Same as passive except we can set upper and lower frequency bounds.
"org.zfsbootmenu:commandline": "rw quiet amdgpu.abmlevel=3 pcie_aspm=force pcie_aspm.policy=powersupersave nowatchdog amd_pstate=passive"

View File

@ -8,7 +8,7 @@ WITH_REPRODUCIBLE_BUILD=YES
# WITHOUT_GAMES=YES
# WITHOUT_KERBEROS=YES
# WITHOUT_LEGACY_CONSOLE=YES
# WITHOUT_LIB32=YES
WITHOUT_LIB32=YES
# WITHOUT_LOADER_GELI=YES
# WITHOUT_MLX5TOOL=YES
# WITHOUT_NDIS=YES

View File

@ -0,0 +1,2 @@
# disable bluetooth
SUBSYSTEM=="rfkill", ATTR{type}=="bluetooth", ATTR{state}="0"

View File

@ -1,4 +1,7 @@
# Steelseries Sensei Ten mouse
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1038", ATTR{idProduct}=="1832", TEST=="power/autosuspend" ATTR{power/autosuspend}="-1"
# I don't remember what this is
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="308f", ATTR{idProduct}=="0011", TEST=="power/autosuspend" ATTR{power/autosuspend}="-1"
# Launch keyboard
@ -7,3 +10,12 @@ ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="3384", ATTR{idProduct}=="0006"
# DFU Programmer on launch keyboard
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="03eb", ATTR{idProduct}=="2ff9", TEST=="power/autosuspend" ATTR{power/autosuspend}="-1"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="03eb", ATTR{idProduct}=="2ff9", TAG+="uaccess"
# blacklist for usb autosuspend
# ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", ATTR{idProduct}=="9205", GOTO="power_usb_rules_end"
# ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"
# LABEL="power_usb_rules_end"

View File

@ -0,0 +1,5 @@
# Disable power management for specific PCI devices. Find the IDs via lspci -nn
# SUBSYSTEM=="pci", ATTR{vendor}=="0x1234", ATTR{device}=="0x1234", ATTR{power/control}="on", GOTO="pci_pm_end"
SUBSYSTEM=="pci", ATTR{power/control}="auto"
LABEL="pci_pm_end"

View File

@ -1,9 +1,3 @@
# - name: Install packages
# package:
# name:
# - foo
# state: present
- name: Install loader.conf
copy:
src: "files/{{ item }}_loader.conf"

View File

@ -7,3 +7,5 @@
group: wheel
loop:
- dont_sleep_usb
- pci_power_management
- disable_bluetooth