Recently I switched from macos to linux on a mid 2014 8GB retina macbook pro. I noticed when I just edit text files in vi running in terminal, the battery runs out about twice as fast on linux.
- Top and powertop shows minimal CPU and no GPU usage.
- Radio devices are off
- Display brightness set to barely visible with auto brightness off, screensaver off
- No peripherials connected
- Power usage is measured running on battery, querying the internal battery for voltage, current, and charge left
- Tested with two version of macos: mavericks and big sur and 3 linux distros: antix, pop_os, fedora.
- Fan makes the same, almost inaudible noise
- Similar measurements on a 4GB 2015 macbook air.
On linux these did not or marginally lower power usage:
- powertop --auto-tune
- offline all cores but one
- wayland instead of X11
- not starting wayland or X11
- removing all pci (subsequently usb) devices via sysfs (except vga and host:dram)
Idle macos uses 3.2 Watts, while idle Linux uses 8-9 Watts.
What is going on?
edit: I understand that mac software and hardware is very closely tied and information on this is somewhat walled. On the other hand years passed and this inbalance towards macos should have been eroded. (It is indeed largely eroded as I can use all the devices in the laptop even though the out-of-the-box experience is close but do not reach what macos provided about 8 years ago). I am fine with this and ready to search, ask and make extra steps to achieve low idle power usage)
edit again, results of latest research: Here's my current powersave script that reduces idle power usage from 9 Watts to 7.0W. Measured on a fairly simplified debian system running sway displaying a terminal.
brightnessctl set 21
rfkill block wifi
powertop --auto-tune
echo powersupersave > /sys/module/pcie_aspm/parameters/policy
echo active > /sys/devices/system/cpu/intel_pstate/status
echo teo > /sys/devices/system/cpu/cpuidle/current_governor
echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo
echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo powersave > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo powersave > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo powersave > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo power > /sys/devices/system/cpu/cpu0/power/energy_perf_bias
echo power > /sys/devices/system/cpu/cpu1/power/energy_perf_bias
echo power > /sys/devices/system/cpu/cpu2/power/energy_perf_bias
echo power > /sys/devices/system/cpu/cpu3/power/energy_perf_bias
I've found intel_gpu_top what gives some insights about what is going on: GPU is almost idle consuming no energy, CPU is 99.7% idle consuming 3.0 Watts.
With the screen blanked total power usage goes down to 4.5 Watts; according to intel_gpu_top 2.3W of this is used by the CPU (and 0 Watts by the GPU).
To reiterate, it takes Linux 7.0 Watts to idle with the screen on, something that Macos can do for 3.2 Watts on the same computer.