Home | News | Download | Packages | Forum | Wiki | Github

Advance power saving, some help needed


#1

Sooo… I have been wanting to create this topic for a very long time. There is no reason it has to be here in the Void community, however, most of the readers are quite good with Linux in general, so it may be better here.

So, for the introduction. I would like to increase the battery life of my laptop, that easy. And if some good tips and tricks are explained here, then a Wiki entry would honor this forum entry for the shake of everyone else, since I haven’t found any good and complete article on this topic. First I will name some basic tweaks about power saving that I already know and should not be the main point for the discussion. Then I will introduce my case and ask the questions.

Some basic information regarding basic powersaving that should not be included, since they are quite obvious changes and this thread will be more about advance tricks.

  • TLP: Linux advance power management. Or laptop-mode-tools as an alternative. Actually, which one do you think is better?
  • Powertop to set the power consumption to good in some instances.
  • Obvious hardware changes: display brightness, using the integrated GPU, killing bluetooth and wifi, etc.
  • Evade power intensive tasks, like compiling. Or use tools that use less CPU Gnome->*wm.

Okay, so onward with my situation. I have a Windows partition and a Linux installation in the same laptop. With Windows I can get up to 6 and a half hours of battery when powersaving is activated, display brightness is very low and I am using it for some light work (more on that later). With vanilla Linux (without even basic powersaving utilities) I would be lucky if I got an hour without doing anything. With the changes mentioned above, which is in the current state I am in, I can get up to 4h of battery in a light workload, however, I should not play any videos, since they drain waaaay to much battery, but this is not the behavior Windows has, there videos are not an issue with the battery.


So this is the main part of the thread, though the shortest.

I have seen this quite old video which talks about getting the most of your battery and they talk specially about hard drives, since they are usually the ones that drain most of the battery.

  • Is mounting most of the temporary files as tmpfs the right thing to do?
  • In TLP, what would be a good setting for the hd to stay asleep? (more on this latter)
  • How to make hardware acceleration run the way it should? They talk about completely disabling the external GPU from the BIOS since not having the drivers does not save battery. I personally cannot do that, my BIOS does not allow it. So, is it better for me if I install the proprietary NVIDIA drivers and tell the GPU to always stay asleep? Currently I have uninstalled nouveau so that I may only use Intel graphics.
  • What about kernel tweaking? There is this custom kernel created to gain as much performance as possible. But they do warn about power usage, like lowering the writing interval which keeps the drive spinning continuously, draining a lot of power. Maybe the same could be achieved but to save some watts?

To end this array of questions I must clarify that the is a very noticeable performance drop when windows is running on battery power, yet I get nearly three hours more using it, and playing videos barely has any impact. I would like to achieve similar level with linux, but the basic tips are not enough.

Thank you!!


#2

This might be an obvious one, but set your cpu governor to powersave or conservative with a tool like cpupower.


#3

This is the default option when TLP is enabled when using the battery.


#4

The amount of battery life you get on Linux depends almost entirely on how well your hardware is supported on Linux, some devices have much longer battery life on Linux than they do on Windows, it just depends.


Anyway here’s some powersaving options:


Adding either nmi_watchdog=0 or nowatchdog (They should do the same thing) to the kernel commandline to disable the NMI watchdog can reduce the number of CPU interupts. You will lose a powerful debugging tool, but on a laptop it will probably never be used.


I’m not sure if this works in Void but you could try enabling ‘laptop-mode’ by adding: vm.laptop_mode = 5 to /etc/sysctl.d/laptop.conf this causes the kernel to flush dirty blocks while the hdd is spinning to avoid having to spin it up later. This could reduce the lifespan of your hdd due to possibly spinning down more often. It might not though, I haven’t actually tested it.

This document goes into crazy detail about it: https://www.kernel.org/doc/Documentation/laptops/laptop-mode.txt


Some sound cards have power saving settings you can use.
(This may cause a pop sound when the card wakes up)

To see if your sound card supports powersaving look for a file called powersave in:
/sys/module/soundcard_name/parameters

For an Intel card add: options snd_hda_intel power_save=1
to /etc/modprobe.d/audio_powersave.conf


You can disable your discrete GPU without installing proprietary drivers. By using /usr/share/acpi_call/examples/turn_off_gpu.sh provided by the acpi_call-dkms package. This script will try to find what bus your GPU is on and turn it off, only one line needs to say works! for it to of worked successfully. This will turn off the GPU until you reboot.

As far as I know Nvidia GPUs don’t have the best powersaving under Linux.

EDIT: The laptop-mode package, provides a way of controlling almost all these options and more.

This was supposed to be small post, but I got carried away :sweat_smile: