You are not logged in.
I'm trying to increase my laptop's battery life. I'm using Powertop to analyse power consumption. I've generated a HTML report, which shows the following suggestions:
Runtime PM for disk sda echo 'auto' > '/sys/block/sda/device/power/control';
Runtime PM for disk sdb echo 'auto' > '/sys/block/sdb/device/power/control';
Runtime PM for port ata1 of PCI device: Intel Corporation 82801 Mobile SATA Controller [RAID mode] echo 'auto' > '/sys/bus/pci/devices/0000:00:17.0/ata1/power/control';
sda is the internal HDD, and sdb is my external USB HDD. I have already enabled Runtime PM for all PCIe devices with this udev rule: https://wiki.archlinux.org/title/Power_ … Management
But how do I automatically enable PM for all SATA disks, and for all ports on the SATA controller? With a udev rule maybe? I don't want to use powertop --auto-tune as it requires calibration of Powertop and I want it to work out-of-the-box on newly installed systems.
Also, another weird thing is that /sys/block/sda/device/power/control is already "auto" after booting, but Powertop still shows "Bad Runtime PM for disk sda" until I manually run the command echo 'auto' > '/sys/block/sda/device/power/control'
Last edited by dankcuddlybear (2022-09-04 10:14:19)
Offline
The current kernel default should be safe for all usecases with minimal power gains from going explicitly for min_power, it's just that powertop hasn't been adjusted to recognize the current default and generally considered best option med_power_with_dipm
If you still hope for gains here and want to do it anyway, read a couple of blocks further down in the article: https://wiki.archlinux.org/title/Power_ … Management
Offline
I've seen your report, instead of me closing the thread, please share your solution and mark the thread as [SOLVED] yourself by editing the title: https://wiki.archlinux.org/title/Genera … way_street
Offline
It's a bit janky, but I wrote the following udev rule /etc/udev/rules.d/69-hdpm.rules
ACTION=="add|change", KERNEL=="sd[a-z]", RUN+="/opt/hdpm %k"
along with the following script /opt/hdpm
#!/bin/sh
echo auto > /sys/block/$1/device/power/control
echo auto > /sys/bus/pci/drivers/ahci/*/ata*/power/control
Last edited by dankcuddlybear (2022-09-04 09:55:00)
Offline