If there is one thing every laptop user would desire is long battery life. Everyone wants to save a single drop of power they can acquire to be entertained, work or even read. Therefore, this subject matter is critical as it will aid users in knowing the best tips they can emulate to save power on their Fedora workstations using Powertop.
Powertop is a Linux application that aids in diagnosing power management and consumption-related issues. It is categorized as a diagnostic tool. Powertop contains an interactive mode that can experiment with power management preferences in circumstances where the settings have not been enabled on Linux distros. This powerful power management application was coded in C++. It was coded explicitly for Linux-based distributions.
The Powertop utility is crucial to aid users in monitoring their power usage whenever they are not plugged into a power source. If you want to explore more regarding this application, stick to this article guide as we shall illustrate how to use the Powertop utility to boost the laptop battery life of our Fedora workstations.
The primary importance of using the Powertop application is that it aids in generating detailed reports on which hardware and applications are consuming more power. Additionally, it aids in monitoring the system’s live processes.
Installing Powertop on Fedora
Powertop does not come pre-installed on Fedora; hence we need to install it using the command prompt.
Go to ‘Activities,’ search for ‘Terminal,’ and fire it up. Alternatively, if your keyboard is configured, you can use the Ctrl+Alt+T keyboard shortcut to launch the terminal application.
Once the terminal application has been fired up, copy and paste this command onto it and press ‘Enter’ to run it.
sudo dnf update -y
The above command will update the resources and packages of our Fedora system. It is vital to first update the packages and resources before installing the app as it aids avoid conflict in the system.
After it completes executing, run this command to install the Powertop utility:
sudo dnf install powertop
Be patient as the application installs on your Fedora system. Depending on your computer’s specifications and internet speed, it might take a while. Once it completes, you can launch it.
Note: Powertop requires root permission to access the hardware to monitor and provide detailed power usage statistics. Therefore, to permit it, you need to run it with root permission, as shown below:
After executing the above line of code, you will get a screen similar to the one displayed below. This command will also start the Powertop application in an interactive monitoring mode. To navigate between the pages, use the ‘Tab’ key plus the ‘Arrow’ keys to scroll. However, it is essential to note that the power usage statistics will differ depending on your system’s usage.
To generate a power usage report, you will need to execute the following line of code:
sudo powertop --html=report.html
Since the power usage report is given as a hypertext markup language (HTML), you can open it on any browser. The report will outline the processes and hardware using the most power when the command was run. This report also contains a ‘Tuning’ page with recommended settings for optimizing power usage.
Note: The recommended settings can either have desirable or undesirable side effects. Therefore, we can’t guarantee their safety, but we haven’t experienced any challenges while using the recommended settings to optimize our power usage. Besides, it is fundamental to note that the recommended settings are temporal and are reset every time you reboot your Fedora workstation. Therefore, if you want to try out the recommended settings, we suggest proceeding cautiously.
How to use Powertop to increase laptop battery life on Fedora
Now that we have the application installed on our Fedora workstation let us briefly discuss how to use it to increase the laptop battery life on our operating system. The Powertop utility contains several screens. As mentioned earlier, we shall use the ‘Tab, Shift-Tab, and Arrow’ keys to switch between the screens. If you want to quit the utility, you will use the ‘Esc’ key.
Note: For convenience, check out the bottom of the utility screen, which has all shortcuts highlighted.
The Powertop screen displays the power usage stats of your Fedora drivers and hardware. Besides, the screen also displays unique numbers, which show the times the system wakes up each second. You might be conjecturing why this happens, but it is because processors are extra fast that they often sleep most of the time during uptime.
To increase your laptop battery life, you need to minimize processor wakeups. One proficient method of doing this is using the Powertop utility. If you check out the ‘Tuning’ page, you will note that ‘Bad’ indicates a preference that does not aid in saving power, although it might be good in performance. On the other hand, ‘Good’ indicates a power preference that is in effect. To change the settings, hit ‘Enter’ on your keyboard for every tunable.
Being comprehensive power management and consumption tool, this utility provides a service that allows users to automatically set all tunables to ‘Good,’ which is an optimal power-saving mode. To activate this service, you will need to launch your terminal and execute the line of code provided herein:
sudo systemctl start powertop.service
Alternatively, if you intend to enable this service by default during boot up, then execute the following line of code:
sudo systemctl enable powertop.service
Caution about the tunables and service
Using certain tunables poses a risk to your data and might cause havoc on your system resulting in erratic behavior. For instance, one of the rampant erratic behaviors is the ‘VM writeback timeout,’ which affects the duration taken by the system before writing changed data to the storage location. This, in other words, implies that the power preference trades off data security.
For example, if your system loses all power for one reason or another, you could also lose up to 15 seconds of changed data rather than the primary 5 seconds. However, for most laptop users, this is not a major concern as the system warns about low battery, thus enabling the users to take action before losing important data. Despite this critical feature, it is still crucial to always proceed cautiously.
This article guide has briefly covered the Powertop tool and how it can be essential to increase our laptop battery life on Fedora workstations. It has covered the critical aspects you need to know to use this tool. I hope you enjoyed reading this tutorial guide.