SO, from running sudo powertop
I have
18.3 W 1,0 pkts/s Network interface: enp2s0 (r8169)
9.07 W 21,9% CPU misc
5.23 W 0,0 pkts/s Network interface: wlan0 (iwlwifi)
...
The above from a system consumin ~33W.
I’ve already tried the followinf config:
{ config, pkgs, ... }: {
services = {
acpid.enable = true;
acpid.handlers.ac-power = {
action = ''
vals=($1) # space separated string to array of multiple values
case ''${vals[3]} in
00000000) # unplugged
#${pkgs.systemd}/bin/systemctl stop 'beesd@*' 'borgbackup-job-*' boinc
${pkgs.systemd}/bin/systemctl start auto-cpufreq
echo 2 > /sys/devices/platform/asus-nb-wmi/throttle_thermal_policy # silent fans
rfkill block 0
rfkill block 1
;;
00000001)#plugged
#${pkgs.systemd}/bin/systemctl start --all 'beesd@*' boinc
echo 0 > /sys/devices/platform/asus-nb-wmi/throttle_thermal_policy #balanced fans
rfkill unblock 0
rfkill unblock 1
;;
*)#boh
;;
esac
'';
event = "ac_adapter/*";
};
auto-cpufreq.enable = true;
smartd.enable = true;
power-profiles-daemon.enable = true;
switcherooControl.enable = true;
tlp = {
enable = true;
settings = {
TLP_DEFAULT_MODE = "BAT";
# CPU_BOOST_ON_AC = 1;
# CPU_BOOST_ON_BAT = 0;
RUNTIME_PM_ON_AC = "auto";
RESTORE_THRESHOLDS_ON_BAT = 1;
SATA_LINKPWR_ON_BAT = "min_power";
RADEON_POWER_PROFILE_ON_AC = "auto";
RADEON_POWER_PROFILE_ON_BAT = "low";
RADEON_DPM_PERF_LEVEL_ON_BAT = "low";
DEVICES_TO_DISABLE_ON_BAT = "bluetooth wifi wwan";
DEVICES_TO_DISABLE_ON_LAN_CONNECT = "wifi wwan";
DEVICES_TO_ENABLE_ON_LAN_DISCONNECT = "wifi wwan";
DEVICES_TO_DISABLE_ON_WIFI_CONNECT = "wwan";
DEVICES_TO_DISABLE_ON_WWAN_CONNECT = "wifi";
# DEVICES_TO_ENABLE_ON_LAN_DISCONNECT = "wifi wwan";
RUNTIME_PM_DRIVER_BLACKLIST = "mei_me";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_SCALING_GOVERNOR_ON_AC = "schedutil";
RESTORE_DEVICE_STATE_ON_STARTUP = 1;
PCIE_ASPM_ON_BAT = "powersupersave";
USB_BLACKLIST_BTUSB = 0;
};
};
};
environment.systemPackages = with config.boot.kernelPackages;[ turbostat ];
networking.networkmanager = {
wifi = {
powersave = true;
macAddress = "random";
backend = "iwd";
};
ethernet = {
macAddress = "random";
};
};
hardware.cpu.amd.updateMicrocode = true;
boot.kernel.sysctl = {
"vm.laptop_mode" = "5";
"vm.swappiness" = 1;
"vm.vfs_cache_pressure" = 30;
"vm.dirty_ratio" = 30;
"vm.dirty_backgound_ratio" = 10;
"vm.dirty_writeback_centisecs" = 6000;
"kernel.nmi_watchdog" = 0;
};
boot.kernelParams = [
"quiet"
"splash"
"i915.i915_enable_fbc=1"
"btusb.enable_autosuspend=y"
];
boot.extraModprobeConfig = ''
options v4l2loopback exclusive_caps=1 video_nr=1
options snd_hda_intel power_save=1
options usbcore autosuspend=1
'';
fileSystems."/boot".options = [ "noauto" "x-systemd.automount" ];
}
Also in my experience virtual network link like the one created by Virtualbox consume a disproportionate amount of power on idle.
How do I reduce the power consumption of network links?