Vous êtes sur la page 1sur 10

Saving laptop power with powertop - Fedora Mag... https://fedoramagazine.org/saving-laptop-power-...

Saving laptop power with powertop


By Paul W. Frields

If theres one thing youwant from alaptop, itslong battery life. You want every
drop of power you can gettowork, read, or just be entertained on a long jaunt. So
its good to know where your power is going.

You can use thepowertop utility to see whats drawing power when your systems
not plugged in. This utilityonly runs on theTerminal, so youll need to open a
Terminal to get it. Then run this command:

sudo dnf install powertop

powertopneeds access to hardware tomeasure power usage. So you have to run


itwith special privileges too:

sudo powertop

Thepowertop displaylooks similar to this screenshot. Power usage on your

1 of 10 02/21/2017 03:29 PM
Saving laptop power with powertop - Fedora Mag... https://fedoramagazine.org/saving-laptop-power-...

system will likelybe different:

The utility has several screens. You can switch between them using theTab
andShift+Tab keys. To quit, hit the Esc key.The shortcuts are also listed at the
bottom of the screen for your convenience.

The utility shows you power usage for various hardware and drivers. But it also
displays interestingnumbers like how many times your system wakes up each
second. (Processors are so fast that they often sleep for the majority of a second
of uptime.)

If you want to maximize battery power, you want to minimize wakeups. One way
to do this is to use powertops Tunables page. Bad indicates a setting thats not
saving power, although it might be good for performance. Good indicates a
power saving setting is in effect. You can hitEnter on any tunable to switch it to
the other setting.

Thepowertop package also provides a service that automatically setsall


tunables to Good for optimal power saving. To use it, run this command:

sudo systemctl start powertop.service

If youd like the service to runautomatically when you boot, run this command:

sudo systemctl enable powertop.service

2 of 10 02/21/2017 03:29 PM
Saving laptop power with powertop - Fedora Mag... https://fedoramagazine.org/saving-laptop-power-...

Caveat about this service and tunables: Certain tunables mayrisk your data, or (on
some oddhardware) may cause your system to behave erratically. For instance,
the VM writeback timeout setting affects how long the system waitsbefore
writingchanged data to storage. This meansa power saving settingtrades
offdata security. If the system loses all power for some reason, you could lose up
to 15 seconds of changed data, rather than the default 5. However, for most
laptop users this isnt an issue, since your system shouldwarn you about low
battery.

Share:

Email Print Facebook 169 Google Twitter Reddit


Telegram More

Like this:

Loading...

Paul W. Frields February 17, 2017

Paul W. Frields has been a Linux user and Using Software


enthusiast since 1997, and joined the Fedora
Project in 2003, shortly after launch. He was a
founding member of the Fedora Project Board,
Previous post
and has worked on documentation, website
publishing, advocacy, toolchain development, and Next post
maintaining software. He joined Red Hat as
Fedora Project Leader from February 2008 to July
2010, and remains with Red Hat as an engineering
manager. He currently lives with his wife and two
children in Virginia.

3 of 10 02/21/2017 03:29 PM
Saving laptop power with powertop - Fedora Mag... https://fedoramagazine.org/saving-laptop-power-...

13 Comments ADD YOURS

Heiko
June 11, 2015 at 18:29

Activating AutoSuspend for USB is a bad idea if youre using an


USB-mouse like most notebook users would do.

Paul W. Frields
June 11, 2015 at 19:21

Thats quite true, although its debatable whether most notebook


users use an external mouse. Many do not. Thats why I advised
trying different settings rst. Thanks for the example!

Dmitri
June 12, 2015 at 02:49

TLP and the like allow to whitelist USB devices by ID or by type to


avoid this type of behaviour. So Id still recommend powertop and
monitoring tool and TLP or laptop tools as power-saving tool,
since they allow for much more granularity.

Jeremy Newton
June 12, 2015 at 09:11

Agreed, TLP is much better, especially because you can tweak


both battery and AC power modes.

Martijn
February 18, 2017 at 14:27

TLP even whitelists all input devices by default, so its plug

4 of 10 02/21/2017 03:29 PM
Saving laptop power with powertop - Fedora Mag... https://fedoramagazine.org/saving-laptop-power-...

and play for most people.

Ernesto Manrquez
June 11, 2015 at 20:05

powertop2tuned is way more effective. Also, with powertop2tuned I can


uncomment at will, after testing what works and what doesnt work with
powertop.

Sandro Mathys
June 12, 2015 at 00:01

Im with Heiko here. Even people who dont use external mice or
keyboards when on the road, most plug it in when in the ofce. Really
wished powertop had a way to tell it to remember my good/bad
settings and re-apply that during bootup (i.e. with autotune) instead of
setting everything to good.

Of course, powertop tells you which commands its using to tune things,
so you can automate it

medeoTL
June 12, 2015 at 02:32

Would love to have also an easy way to switch from performance mode
to save power mode.
Also, are this settings active also when computer is plugged with power
cable?

I mean, sometimes is good to have power save, but sometimes I just


want performance from the peaces of hardware that Ive payed so
much for
And make easy to switch the setting from one way to another would be
fantastic

Megh
June 12, 2015 at 03:40

5 of 10 02/21/2017 03:29 PM
Saving laptop power with powertop - Fedora Mag... https://fedoramagazine.org/saving-laptop-power-...

Does this clash with TLP?

Paul W. Frields
June 12, 2015 at 09:45

Since both are twiddling kernel settings similarly to /proc,


presumably one would overwrite the others settings when run.
Since service ordering may not be fully deterministic in systemd,
you might get different results per boot. So I wouldnt recommend
using both. Note also that TLP is more complex and congurable.
For many users this is unwanted. Others prefer it.

Mike Simms
June 12, 2015 at 07:33

Interesting utility. I tend to use a USB Logitech TrackMan Wheel rather


than a mouse with my notebook. I nd it easier than the touchpad
which I hardly ever use because I have better control over the pointer
that way.

I might give it a go though plus the alternatives mentioned in


comments, at present my notebook gives about 3 hours on battery life
under Fedora 22 which is not great compared to what it will do using
the manufacturers power prole in W8.1 (almost a full working day).
The notebook was purchased new in February and has an Intel Core
i3-3110m processor and an HM75 chipset. No discrete GPU, just the
onchip Intel HD graphics.

Generally, though I have the power adaptor to hand and can plug in as
needed.

Lus Nabais
June 23, 2015 at 03:55

Hello guys.

Bad Enable Audio codec power management


Bad NMI watchdog should be turned off
Bad Enable SATA link power management for host4
Bad Enable SATA link power management for host5

6 of 10 02/21/2017 03:29 PM
Saving laptop power with powertop - Fedora Mag... https://fedoramagazine.org/saving-laptop-power-...

Bad Enable SATA link power management for host2


Bad Enable SATA link power management for host3
Bad Enable SATA link power management for host0
Bad Enable SATA link power management for host1
Bad VM writeback timeout
Bad Autosuspend for USB device HP Integrated Module
[Broadcom Corp]
Bad Autosuspend for USB device USB Receiver
[Logitech]
Bad Runtime PM for PCI Device Intel Corporation 6
Series/C200 Series Chipset Family 6 port SATA AHCI
Controller
Bad Runtime PM for PCI Device Intel Corporation 2nd
Generation Core Processor Family DRAM Controller
Bad Runtime PM for PCI Device Intel Corporation 2nd
Generation Core Processor Family Integrated Graphics
Controller
Bad Runtime PM for PCI Device Intel Corporation
82579V Gigabit Network Connection
Bad Runtime PM for PCI Device Intel Corporation 6
Series/C200 Series Chipset Family USB Enhanced Host
Controller #2
Bad Runtime PM for PCI Device Broadcom Corporation
BCM43224 802.11a/b/g/n
Bad Runtime PM for PCI Device Intel Corporation HM65
Express Chipset Family LPC Controller
Bad Runtime PM for PCI Device Intel Corporation 6
Series/C200 Series Chipset Family USB Enhanced Host
Controller #1
Bad Runtime PM for PCI Device Intel Corporation 6
Series/C200 Series Chipset Family PCI Express Root
Port 3
Bad Runtime PM for PCI Device Intel Corporation 6
Series/C200 Series Chipset Family PCI Express Root
Port 4
Bad Runtime PM for PCI Device Intel Corporation 6
Series/C200 Series Chipset Family MEI Controller #1
Bad Runtime PM for PCI Device Intel Corporation 6
Series/C200 Series Chipset Family PCI Express Root
Port 1
Bad Runtime PM for PCI Device Intel Corporation 6
Series/C200 Series Chipset Family PCI Express Root
Port 2
Bad Runtime PM for PCI Device JMicron Technology
Corp. Standard SD Host Controller
Bad Runtime PM for PCI Device JMicron Technology
Corp. SD/MMC Host Controller
Bad Runtime PM for PCI Device JMicron Technology
Corp. IEEE 1394 Host Controller
Bad Wake-on-lan status for device enp0s25
Good Bluetooth device interface status

7 of 10 02/21/2017 03:29 PM
Saving laptop power with powertop - Fedora Mag... https://fedoramagazine.org/saving-laptop-power-...

Good Autosuspend for USB device HP HD Webcam


[Fixed] [Chicony Electronics Co., Ltd.]
Good Autosuspend for USB device EHCI Host Controller
[usb1]
Good Autosuspend for USB device EHCI Host Controller
[usb2]
Good Autosuspend for unknown USB device 1-1
(8087:0024)
Good Autosuspend for unknown USB device 2-1
(8087:0024)
Good Runtime PM for PCI Device Intel Corporation 6
Series/C200 Series Chipset Family High Denition Audio
Controller
Good Wake-on-lan status for device wlp36s0b1

In this case, which options would you change too Good?

Could we start listing some options we should usually change, too get
better battery life, which I think is the worst thing Linux has in laptops?

Thanks a lot

nill
February 21, 2017 at 07:46

I use powertop service and have to re-plug the external mouse after
booting so that the power saving setting is not applied to it. The rest
just works ne.

Leave a Reply
Your email address will not be published.

8 of 10 02/21/2017 03:29 PM
Saving laptop power with powertop - Fedora Mag... https://fedoramagazine.org/saving-laptop-power-...

Name

Email

Website

Post Comment

Notify me of follow-up comments by email.

Notify me of new posts by email.

S U B S C R I B E TO F E D O R A Read about how you can submit


M AG A Z I N E V I A E M A I L
an idea or even write an article Search form
for Fedora Magazine.
Enter your email address to
subscribe to this blog and receive
notications of new posts by
email.
Join 2,750 other subscribers

9 of 10 02/21/2017 03:29 PM
Saving laptop power with powertop - Fedora Mag... https://fedoramagazine.org/saving-laptop-power-...

Email Address

Subscribe

The opinions expressed on this website are those of each author, not of the author's employer or of Red Hat. Fedora
Magazine aspires to publish all content under a Creative Commons license but may not be able to do so in all cases.
You are responsible for ensuring that you have the necessary permission to reuse any work on this site. The Fedora
logo is a trademark of Red Hat, Inc. Terms and Conditions

10 of 10 02/21/2017 03:29 PM

Vous aimerez peut-être aussi