From 5142021197af17e8a625c2b98d071b3512c1e3c0 Mon Sep 17 00:00:00 2001 From: velvettear Date: Tue, 1 Oct 2024 16:49:48 +0200 Subject: [PATCH] add powertop script --- scripts/powertop/j5040.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 scripts/powertop/j5040.sh diff --git a/scripts/powertop/j5040.sh b/scripts/powertop/j5040.sh new file mode 100755 index 0000000..7fe9e39 --- /dev/null +++ b/scripts/powertop/j5040.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env zsh + +# author: Daniel Sommer +# license: MIt + +echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs'; +echo 'med_power_with_dipm' > '/sys/class/scsi_host/host5/link_power_management_policy'; +echo 'med_power_with_dipm' > '/sys/class/scsi_host/host3/link_power_management_policy'; +echo 'med_power_with_dipm' > '/sys/class/scsi_host/host1/link_power_management_policy'; +echo 'med_power_with_dipm' > '/sys/class/scsi_host/host4/link_power_management_policy'; +echo 'med_power_with_dipm' > '/sys/class/scsi_host/host2/link_power_management_policy'; +echo 'med_power_with_dipm' > '/sys/class/scsi_host/host0/link_power_management_policy'; +echo '0' > '/proc/sys/kernel/nmi_watchdog'; +echo 'auto' > '/sys/bus/pci/devices/0000:01:00.0/power/control'; +echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.0/power/control'; +echo 'auto' > '/sys/bus/pci/devices/0000:00:00.1/power/control'; +echo 'auto' > '/sys/block/sde/device/power/control'; +echo 'auto' > '/sys/block/sdf/device/power/control'; +echo 'auto' > '/sys/block/sdc/device/power/control'; +echo 'auto' > '/sys/block/sdd/device/power/control'; +echo 'auto' > '/sys/block/sda/device/power/control'; +echo 'auto' > '/sys/block/sdb/device/power/control'; +echo 'auto' > '/sys/bus/pci/devices/0000:03:00.0/power/control'; +echo 'auto' > '/sys/bus/pci/devices/0000:01:00.0/ata3/power/control'; +echo 'auto' > '/sys/bus/pci/devices/0000:04:00.0/ata6/power/control'; +echo 'auto' > '/sys/bus/pci/devices/0000:00:00.0/power/control'; +echo 'auto' > '/sys/bus/pci/devices/0000:00:12.0/power/control'; +echo 'auto' > '/sys/bus/pci/devices/0000:00:12.0/ata1/power/control'; +echo 'auto' > '/sys/bus/pci/devices/0000:00:12.0/ata2/power/control'; +echo 'auto' > '/sys/bus/pci/devices/0000:04:00.0/ata5/power/control'; +echo 'auto' > '/sys/bus/pci/devices/0000:00:15.0/power/control'; +echo 'auto' > '/sys/bus/pci/devices/0000:04:00.0/power/control'; +echo 'auto' > '/sys/bus/pci/devices/0000:01:00.0/ata4/power/control';