Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.project > #9843 > unrolled thread

Power-Management

Started byismael.alsabea@gmail.com
First post2018-04-25 22:00 +0200
Last post2018-05-06 06:10 +0200
Articles 13 — 9 participants

Back to article view | Back to linux.debian.project


Contents

  Power-Management ismael.alsabea@gmail.com - 2018-04-25 22:00 +0200
    Re: Power-Management Chris Lamb <lamby@debian.org> - 2018-04-26 10:40 +0200
      Re: Power-Management Marc Haber <mh+debian-project@zugschlus.de> - 2018-04-26 11:10 +0200
        Re: Power-Management Geert Stappers <stappers@stappers.nl> - 2018-04-26 11:40 +0200
        Re: Power-Management Martin Steigerwald <martin@lichtvoll.de> - 2018-04-26 11:50 +0200
        Re: Power-Management Russell Stuart <russell-debian@stuart.id.au> - 2018-04-26 14:30 +0200
          Re: Power-Management Marc Haber <mh+debian-project@zugschlus.de> - 2018-04-26 15:20 +0200
            Re: Power-Management Martin Steigerwald <martin@lichtvoll.de> - 2018-04-26 16:40 +0200
              Re: Power-Management Marc Haber <mh+debian-project@zugschlus.de> - 2018-04-26 17:00 +0200
            Re: Power-Management Russell Stuart <russell-debian@stuart.id.au> - 2018-04-27 01:40 +0200
        Re: Power-Management Jeroen Dekkers <jeroen@dekkers.ch> - 2018-04-27 13:50 +0200
          Re: Power-Management Andrey Rahmatullin <wrar@debian.org> - 2018-04-27 14:00 +0200
    Re: Power-Management Hideki Yamane <henrich@iijmio-mail.jp> - 2018-05-06 06:10 +0200

#9843 — Power-Management

Fromismael.alsabea@gmail.com
Date2018-04-25 22:00 +0200
SubjectPower-Management
Message-ID<vIyK6-1PQ-5@gated-at.bofh.it>
Hello Debian Team,


I am using Debian 9 Stretch and love it. It is a great operating system
and I intend to use it as my main OS. However, there is one problem
which is Power Management. I was just Wondering if you have any
considerations for issuing an update or designing lets say Debian 10
with Power Management for laptops in mind.


My PC is Dell e7470 with an SSD and CPU SKYLAKE Core i7-6600U.
On Windows 10, I get almost 8 hours, but on Debian, I get almost 4.




Yours Sincerely,

Ismael Al-Sabea

[toc] | [next] | [standalone]


#9844

FromChris Lamb <lamby@debian.org>
Date2018-04-26 10:40 +0200
Message-ID<vIKBz-1Ic-7@gated-at.bofh.it>
In reply to#9843
Hi Ismael,

> I was just Wondering if you have any considerations for issuing an
> update or designing lets say Debian 10 with Power Management for
> laptops in mind.

Such modifications are typically (and best) made in a distribution-
agnostic manner, rather than being, say, Debian-specific. :)

However, may I take this opportunity to promote Jonathan Carter aka
highvoltage's "Debian Package of the Day" video series? As it
happens, yesterday's package was "powertop":

  https://www.youtube.com/watch?v=p3M_g3C15R4


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-

[toc] | [prev] | [next] | [standalone]


#9845

FromMarc Haber <mh+debian-project@zugschlus.de>
Date2018-04-26 11:10 +0200
Message-ID<vIL4B-28U-5@gated-at.bofh.it>
In reply to#9844
On Thu, Apr 26, 2018 at 09:35:45AM +0100, Chris Lamb wrote:
> > I was just Wondering if you have any considerations for issuing an
> > update or designing lets say Debian 10 with Power Management for
> > laptops in mind.
> 
> Such modifications are typically (and best) made in a distribution-
> agnostic manner, rather than being, say, Debian-specific. :)
> 
> However, may I take this opportunity to promote Jonathan Carter aka
> highvoltage's "Debian Package of the Day" video series? As it
> happens, yesterday's package was "powertop":
> 
>   https://www.youtube.com/watch?v=p3M_g3C15R4

Power Management is a general big issue in Linux on Laptops. I have also
made the experience that Windows achives vastly better battery run times
than any Linux I have ever encountered, even if powertop doesn't have
anything to complain.

Alas, I don't have the slightest idea why, maybe somebody can shed a
light on that.

Greetings
Marc


-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421

[toc] | [prev] | [next] | [standalone]


#9846

FromGeert Stappers <stappers@stappers.nl>
Date2018-04-26 11:40 +0200
Message-ID<vILxE-2lv-19@gated-at.bofh.it>
In reply to#9845
On Thu, Apr 26, 2018 at 11:00:42AM +0200, Marc Haber wrote:
> On Thu, Apr 26, 2018 at 09:35:45AM +0100, Chris Lamb wrote:
> > > I was just Wondering if you have any considerations for issuing an
> > > update or designing lets say Debian 10 with Power Management for
> > > laptops in mind.
> > 
> > Such modifications are typically (and best) made in a distribution-
> > agnostic manner, rather than being, say, Debian-specific. :)
> > 
> > However, may I take this opportunity to promote Jonathan Carter aka
> > highvoltage's "Debian Package of the Day" video series? As it
> > happens, yesterday's package was "powertop":
> > 
> >   https://www.youtube.com/watch?v=p3M_g3C15R4
> 
> Power Management is a general big issue in Linux on Laptops. I have also
> made the experience that Windows achives vastly better battery run times
> than any Linux I have ever encountered, even if powertop doesn't have
> anything to complain.
> 
> Alas, I don't have the slightest idea why,
> maybe somebody can shed a light on that.

My guess is that a large amount of people have the same mindset
as fifteen years ago: "Buying hardware with Microsoft tax
without telling the hardware manufactor that they run Linux"

As long as people buy "windows" laptops for running Linux
is there no incentive for manufactors to care about powermangament
on Linux.


Groeten
Geert Stappers
-- 
Leven en laten leven

[toc] | [prev] | [next] | [standalone]


#9847

FromMartin Steigerwald <martin@lichtvoll.de>
Date2018-04-26 11:50 +0200
Message-ID<vILHj-2pl-5@gated-at.bofh.it>
In reply to#9845
Hi Marc.

Marc Haber - 26.04.18, 11:00:
> On Thu, Apr 26, 2018 at 09:35:45AM +0100, Chris Lamb wrote:
> > > I was just Wondering if you have any considerations for issuing an
> > > update or designing lets say Debian 10 with Power Management for
> > > laptops in mind.
> > 
> > Such modifications are typically (and best) made in a distribution-
> > agnostic manner, rather than being, say, Debian-specific. :)
> > 
> > However, may I take this opportunity to promote Jonathan Carter aka
> > highvoltage's "Debian Package of the Day" video series? As it
> > 
> > happens, yesterday's package was "powertop":
> >   https://www.youtube.com/watch?v=p3M_g3C15R4
> 
> Power Management is a general big issue in Linux on Laptops. I have
> also made the experience that Windows achives vastly better battery
> run times than any Linux I have ever encountered, even if powertop
> doesn't have anything to complain.
> 
> Alas, I don't have the slightest idea why, maybe somebody can shed a
> light on that.

I think I can only offer what may be a part of the answer to this 
question.

Part of the reason is SATA device link power management (LPM). In 
Windows as far as I concluded about what I read about Linux patches it 
has been enabled for a long time. However as kernel developers enabled 
it, some devices failed badly and AFAIR there even have been corrupted 
data. So kernel developers backed out. Only recently, the implemented 
another link power management mode, similar to what Windows does, and 
this appears to work. Except where it didn´t, like for example my 
Crucial m500 mSATA SSD in this ThinkPad T520, which meanwhile is 
blacklisted. If I remember LPM can make at a difference of a few watts, 
which is quite something. I don´t have links at hand, but I bet articles 
or mailing list posts about that are easy enough to find.

From what I read over the time I concluded that this could be part of a 
more generic reason: Power saving mechanism that work on most devices, 
do not work on all devices. Or need to be implemented in a way that is 
difficult to get right. And I think in part this is just due to badly 
implemented or even buggy firmware in hardware. And in part also due to 
firmwares being closed source blobs, which only the hardware 
manufacturer probably knowing what it really does. Like with 
optimization for SSDs, in part it is all just guess work.

I think what would be beneficial here, if some vendor starts to build 
laptops *from the ground up* for the usage with free software operating 
systems, by opening up all firmware, documenting their interfaces, 
especially for power management. But this would have to be for all 
devices in a laptop, and while there are open channel SSDs for special 
server / data center workloads which just expose their flash chips and 
let Linux do all the rest, there is still so much closed firmware just 
about everywhere. I recently researched how to obtain a laptop with as 
much free software firmware as I can get, put apart from the offers by 
puri.sm, it is a lot of manual work involved or paying someone to do 
that work.

Of cause all that said, I still believe that it is possible to improve 
things on the Linux side. But this does not only need kernel work, it 
also needs user space work. Desktop environments with many features like 
Plasma or GNOME IMO can still be optimized a lot to wake up less, do 
less I/O (especially KDEPIM + Akonadi), and use power saving features 
more aggressively. People with tiling window managers and minimal, 
mostly console tool based desktops may have an advantage here.

Thanks,
-- 
Martin

[toc] | [prev] | [next] | [standalone]


#9848

FromRussell Stuart <russell-debian@stuart.id.au>
Date2018-04-26 14:30 +0200
Message-ID<vIOc9-4cp-7@gated-at.bofh.it>
In reply to#9845

[Multipart message — attachments visible in raw view] — view raw

On Thu, 2018-04-26 at 11:00 +0200, Marc Haber wrote:
> Power Management is a general big issue in Linux on Laptops. I have
> also made the experience that Windows achives vastly better battery
> run times than any Linux I have ever encountered, even if powertop
> doesn't have anything to complain.
> 
> Alas, I don't have the slightest idea why, maybe somebody can shed a
> light on that.

My experience is a little different.  I have an XPS-15.  It seems to
get a similar run time under Debian as it does under Windows.

laptop-mod-mode tools seems to put the laptop into pretty optimal
settings without me having to touch anything, or so powertop says.  But
just as important is having working screen brightness buttons - which
is to say buttons that actually dim the backlight rather than asking X
to adjust the gamma.  When I'm on a plane, turning off the radios helps
too, as does the laptop going into suspect pretty quickly.  And I keep
the nvidia GPU powered off.

It all adds up.  I get 5 .. 6 hours out of the battery, which is much
the same as Windows.  Now that most hand held devices on the planet run
Linux I suspect the kernel is every bit as good at the NT kernel when
it comes to power consumption, so it's just a question of keeping an
eye on what processes are polling.

[toc] | [prev] | [next] | [standalone]


#9849

FromMarc Haber <mh+debian-project@zugschlus.de>
Date2018-04-26 15:20 +0200
Message-ID<vIOYy-4KO-15@gated-at.bofh.it>
In reply to#9848
On Thu, Apr 26, 2018 at 10:12:40PM +1000, Russell Stuart wrote:
> laptop-mod-mode tools seems to put the laptop into pretty optimal
> settings without me having to touch anything, or so powertop says.

Can Laptop-mode-tools in Thinkpads also limit charging of that battery
to 70 % or another non-100 percentage?

Unfortunately laptop-mode-tools conflicts tlp which is currently my tool
to implement the battery saving charge limit.

Greetings
Marc
-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421

[toc] | [prev] | [next] | [standalone]


#9850

FromMartin Steigerwald <martin@lichtvoll.de>
Date2018-04-26 16:40 +0200
Message-ID<vIQdX-5xT-1@gated-at.bofh.it>
In reply to#9849
Marc Haber - 26.04.18, 15:12:
> On Thu, Apr 26, 2018 at 10:12:40PM +1000, Russell Stuart wrote:
> > laptop-mod-mode tools seems to put the laptop into pretty optimal
> > settings without me having to touch anything, or so powertop says.
> 
> Can Laptop-mode-tools in Thinkpads also limit charging of that battery
> to 70 % or another non-100 percentage?
> 
> Unfortunately laptop-mode-tools conflicts tlp which is currently my
> tool to implement the battery saving charge limit.

tp-smapi can:

/sys/bus/platform/drivers/smapi/smapi/BAT0> ls -l st*_charge_thresh
-rw-r--r-- 1 root root 4096 Apr 26 16:21 start_charge_thresh
-rw-r--r-- 1 root root 4096 Apr 26 16:21 stop_charge_thresh
/sys/bus/platform/drivers/smapi/smapi/BAT0> echo "80" > stop_charge_thresh
/sys/bus/platform/drivers/smapi/smapi/BAT0> cat stop_charge_thresh 
80

Oh, it can even set the start charge threshold meanwhile, nice:

/sys/bus/platform/drivers/smapi/smapi/BAT0> echo 95 > stop_charge_thresh 
/sys/bus/platform/drivers/smapi/smapi/BAT0> LANG=C echo 90 > start_charge_thresh
/sys/bus/platform/drivers/smapi/smapi/BAT0>

I think I set just the start_charge_threshold, I am not sure of the benefit
of stopping charging at below the maximum capacity the battery can still
hold.

But charging for just a few percent of capacity having been used up does
not make sense.

You need tp-smapi-dkms debian package.

ThinkPad T520 with 4.16.3 self compiled kernel.

Its getting somewhat off-topic here as its not about what the project can do
anymore. Well it could provide some defaults, probably.

Thanks,
-- 
Martin

[toc] | [prev] | [next] | [standalone]


#9851

FromMarc Haber <mh+debian-project@zugschlus.de>
Date2018-04-26 17:00 +0200
Message-ID<vIQxj-5Fm-1@gated-at.bofh.it>
In reply to#9850
On Thu, Apr 26, 2018 at 04:30:06PM +0200, Martin Steigerwald wrote:
> Marc Haber - 26.04.18, 15:12:
> > On Thu, Apr 26, 2018 at 10:12:40PM +1000, Russell Stuart wrote:
> > > laptop-mod-mode tools seems to put the laptop into pretty optimal
> > > settings without me having to touch anything, or so powertop says.
> > 
> > Can Laptop-mode-tools in Thinkpads also limit charging of that battery
> > to 70 % or another non-100 percentage?
> > 
> > Unfortunately laptop-mode-tools conflicts tlp which is currently my
> > tool to implement the battery saving charge limit.
> 
> tp-smapi can:

Sure, and tlp is a nice front-end for that.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421

[toc] | [prev] | [next] | [standalone]


#9852

FromRussell Stuart <russell-debian@stuart.id.au>
Date2018-04-27 01:40 +0200
Message-ID<vIYEx-3qj-3@gated-at.bofh.it>
In reply to#9849

[Multipart message — attachments visible in raw view] — view raw

On Thu, 2018-04-26 at 15:12 +0200, Marc Haber wrote:
> On Thu, Apr 26, 2018 at 10:12:40PM +1000, Russell Stuart wrote:
> > laptop-mod-mode tools seems to put the laptop into pretty optimal
> > settings without me having to touch anything, or so powertop says.
> 
> Can Laptop-mode-tools in Thinkpads also limit charging of that
> battery to 70 % or another non-100 percentage?

I don't know.  Dell provides a command line tool for Linux that does it
for the XPS, so I've never investigated further.

[toc] | [prev] | [next] | [standalone]


#9853

FromJeroen Dekkers <jeroen@dekkers.ch>
Date2018-04-27 13:50 +0200
Message-ID<vJa30-6sL-3@gated-at.bofh.it>
In reply to#9845
On Thu, 26 Apr 2018 11:00:42 +0200,
Marc Haber wrote:
> 
> On Thu, Apr 26, 2018 at 09:35:45AM +0100, Chris Lamb wrote:
> > > I was just Wondering if you have any considerations for issuing an
> > > update or designing lets say Debian 10 with Power Management for
> > > laptops in mind.
> > 
> > Such modifications are typically (and best) made in a distribution-
> > agnostic manner, rather than being, say, Debian-specific. :)
> > 
> > However, may I take this opportunity to promote Jonathan Carter aka
> > highvoltage's "Debian Package of the Day" video series? As it
> > happens, yesterday's package was "powertop":
> > 
> >   https://www.youtube.com/watch?v=p3M_g3C15R4
> 
> Power Management is a general big issue in Linux on Laptops. I have also
> made the experience that Windows achives vastly better battery run times
> than any Linux I have ever encountered, even if powertop doesn't have
> anything to complain.
> 
> Alas, I don't have the slightest idea why, maybe somebody can shed a
> light on that.

This post of Matthew Garrett explains the challenges of getting power
management to work correctly on Skylake:

https://mjg59.dreamwidth.org/41713.html

Kind regards,

Jeroen Dekkers

[toc] | [prev] | [next] | [standalone]


#9854

FromAndrey Rahmatullin <wrar@debian.org>
Date2018-04-27 14:00 +0200
Message-ID<vJacF-6wu-3@gated-at.bofh.it>
In reply to#9853

[Multipart message — attachments visible in raw view] — view raw

On Fri, Apr 27, 2018 at 01:06:45PM +0200, Jeroen Dekkers wrote:
> This post of Matthew Garrett explains the challenges of getting power
> management to work correctly on Skylake:
> 
> https://mjg59.dreamwidth.org/41713.html
I wonder if it's still true.

-- 
WBR, wRAR

[toc] | [prev] | [next] | [standalone]


#9873

FromHideki Yamane <henrich@iijmio-mail.jp>
Date2018-05-06 06:10 +0200
Message-ID<vMj9L-6z5-3@gated-at.bofh.it>
In reply to#9843
Hi,

 Fedora28 introduced some changes in Linux kernel to improve battery life(*),
 and I'm considering to suggest to import those changes into Debian.
 
 *) https://fedoraproject.org/wiki/Changes/ImprovedLaptopBatteryLife


-- 
Regards,

 Hideki Yamane     henrich @ debian.org/iijmio-mail.jp

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.project


csiph-web