all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Does Linux 4.16.1 blast out battery time? (9h+ -> 3h+)
@ 2018-04-13  6:06 Pierre Neidhardt
  2018-04-13  6:50 ` Tomáš Čech
  0 siblings, 1 reply; 10+ messages in thread
From: Pierre Neidhardt @ 2018-04-13  6:06 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 800 bytes --]


I just ran a `guix system reconfigure` yesterday and Guix pulled Linux
4.16.1.  Upon reboot, my laptop's battery time had changed from 9h+ to
3h+!  Quite a dramatic regression indeed...

General usage (startup time, etc.) seems to be somewhat slower as well.

As a test, I ran another system reconfigure, changing only the kernel
version: now on 4.14.33, I'm back to 9h+.

Does anyone know something about this or should I reach out for the
Linux mailing list?

Note that before installing GuixSD, I was running Void Linux with kernel
~4.14.5 (off the top of my head) and battery time was 12h+.  This might
be due to the discrete Nvidia card which was completely shut off by
default, while it's now running with nouveau on GuixSD but I don't know
how to turn it off.

Insights?

--
Pierre Neidhardt

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Does Linux 4.16.1 blast out battery time? (9h+ -> 3h+)
  2018-04-13  6:06 Does Linux 4.16.1 blast out battery time? (9h+ -> 3h+) Pierre Neidhardt
@ 2018-04-13  6:50 ` Tomáš Čech
  2018-04-13  7:33   ` Pierre Neidhardt
  0 siblings, 1 reply; 10+ messages in thread
From: Tomáš Čech @ 2018-04-13  6:50 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]

On Fri, Apr 13, 2018 at 11:36:03AM +0530, Pierre Neidhardt wrote:
>
>I just ran a `guix system reconfigure` yesterday and Guix pulled Linux
>4.16.1.  Upon reboot, my laptop's battery time had changed from 9h+ to
>3h+!  Quite a dramatic regression indeed...
>
>General usage (startup time, etc.) seems to be somewhat slower as well.
>
>As a test, I ran another system reconfigure, changing only the kernel
>version: now on 4.14.33, I'm back to 9h+.
>
>Does anyone know something about this or should I reach out for the
>Linux mailing list?
>
>Note that before installing GuixSD, I was running Void Linux with kernel
>~4.14.5 (off the top of my head) and battery time was 12h+.  This might
>be due to the discrete Nvidia card which was completely shut off by
>default, while it's now running with nouveau on GuixSD but I don't know
>how to turn it off.
>
>Insights?

I'm not aware of any regression but I'd recommend to install powertop
and check, which processes are preventing CPU from switching to power
saving modes.

Sometimes it provides interesting results - I usually can spend like
40% more time on battery by closing Icecat and Pavucontrol.

It also can help you with tuning common power management controls.

Best regards,

S_W

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Does Linux 4.16.1 blast out battery time? (9h+ -> 3h+)
  2018-04-13  6:50 ` Tomáš Čech
@ 2018-04-13  7:33   ` Pierre Neidhardt
  2018-04-13 10:14     ` Pierre Neidhardt
  0 siblings, 1 reply; 10+ messages in thread
From: Pierre Neidhardt @ 2018-04-13  7:33 UTC (permalink / raw)
  To: Tomáš Čech; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]


I ran two powertop reports comparing 4.14.33 and 4.16.1.

The most obvious difference is this on 4.16.1:

--8<---------------cut here---------------start------------->8---
 *  *  *   Top 10 Power Consumers   *  *  *

Usage;Events/s;Category;Description
100.0%;;Device;Audio codec hwC0D0: Realtek
  0.0%; 47.0;Timer;tick_sched_timer
  0.2%; 38.0;Process;[PID 1258] xterm 
  0.0%; 34.3;Process;[PID 539] dzen2 -p -dock -ta l -fn DejaVu Sans Mono 
  0.7%; 21.3;Process;[PID 568] /gnu/store/07g1rwvrj7wn4sw6hx10hbvcs1v2adyf-emacs-prerelease-26.1-rc1/bin/emacs-26.1 --daemon -f exwm-enable 
  0.1%; 22.3;Interrupt;[0] HI_SOFTIRQ
  0.3%; 12.9;Process;[PID 538] conky 
  0.0%; 13.1;Process;[PID 8] [rcu_sched]
  0.0%;  8.6;Process;[PID 428] /gnu/store/183jf5g6qsql1i8zrgnziz5psvms68pc-xorg-server-1.19.6/bin/X -xkbdir /gnu/store/fpgz8f64dnz7szskjybrwkz4l9yl1
  0.0%;  6.0;Timer;intel_uncore_fw_release_timer
--8<---------------cut here---------------end--------------->8---

That Realtek audio codec looks awfully suspicious.

Sounds a like a think to report on the kernel mailing list?

-- 
Pierre Neidhardt

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Does Linux 4.16.1 blast out battery time? (9h+ -> 3h+)
  2018-04-13  7:33   ` Pierre Neidhardt
@ 2018-04-13 10:14     ` Pierre Neidhardt
  2018-04-24  8:37       ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Pierre Neidhardt @ 2018-04-13 10:14 UTC (permalink / raw)
  To: Tomáš Čech; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]


With a bit of tweaking, I figured that enabling power management on
on "Audio codec":

	echo '1' > '/sys/module/snd_hda_intel/parameters/power_save';

helped a little bit.  But not that much.  Now on 4.14.33, I get 10h,
while on 4.16.1 I get 5h.

There is something else.

By the way, how do I make the above /sys/ tweak permanent on GuixSD?

-- 
Pierre Neidhardt

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Does Linux 4.16.1 blast out battery time? (9h+ -> 3h+)
  2018-04-13 10:14     ` Pierre Neidhardt
@ 2018-04-24  8:37       ` Ludovic Courtès
  2018-04-24 13:17         ` Pierre Neidhardt
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2018-04-24  8:37 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: help-guix

Hello,

Pierre Neidhardt <ambrevar@gmail.com> skribis:

> With a bit of tweaking, I figured that enabling power management on
> on "Audio codec":
>
> 	echo '1' > '/sys/module/snd_hda_intel/parameters/power_save';
>
> helped a little bit.  But not that much.  Now on 4.14.33, I get 10h,
> while on 4.16.1 I get 5h.
>
> There is something else.

That sounds worrying.  Could you report it upstream?

> By the way, how do I make the above /sys/ tweak permanent on GuixSD?

You could do something like:

  (simple-service 'my-/sys-tweaks activation-service-type
                  #~(call-with-output-file "/sys/…"
                      (lambda (port)
                        (display "1" port))))

That said, we should probably build a higher-level
‘/sys-tweaks-service-type’ where we could directly pass pairs of file
name/values.

Would you like to give it a try?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Does Linux 4.16.1 blast out battery time? (9h+ -> 3h+)
  2018-04-24  8:37       ` Ludovic Courtès
@ 2018-04-24 13:17         ` Pierre Neidhardt
  2018-05-03  6:45           ` Pierre Neidhardt
  0 siblings, 1 reply; 10+ messages in thread
From: Pierre Neidhardt @ 2018-04-24 13:17 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]


Ludovic Courtès <ludo@gnu.org> writes:

> That sounds worrying.  Could you report it upstream?

I'll will.  After further investigation, it turns out that nouveau keeps
crashing in loop, which overwhelms the kernel.  Everything is extremely
unresponsive, I suppose because the kernel scheduler cannot allocate
much time to the user land processes.

This explains the power drain.

`dmesg' shows a sequence of [nouveau] errors in loop, but I haven't
managed to capture it so far because the system freezes too soon.

>> By the way, how do I make the above /sys/ tweak permanent on GuixSD?
>
> You could do something like:
>
>   (simple-service 'my-/sys-tweaks activation-service-type
>                   #~(call-with-output-file "/sys/…"
>                       (lambda (port)
>                         (display "1" port))))

I just tried your suggestion and it results in a kernel panic (on Linux
4.15).
I get a "No such file or directory" error.  I suppose that is because
the service is run too early.

> That said, we should probably build a higher-level
> ‘/sys-tweaks-service-type’ where we could directly pass pairs of file
> name/values.
>
> Would you like to give it a try?

Sure, whenever I have some more free time (in a week or so).

--
Pierre Neidhardt

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Does Linux 4.16.1 blast out battery time? (9h+ -> 3h+)
  2018-04-24 13:17         ` Pierre Neidhardt
@ 2018-05-03  6:45           ` Pierre Neidhardt
  2018-05-08 21:11             ` Nils Gillmann
  0 siblings, 1 reply; 10+ messages in thread
From: Pierre Neidhardt @ 2018-05-03  6:45 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 446 bytes --]


I've re-tested with 4.16.6: still happening, the battery life is about
50% down.

If I blacklist the nouveau kernel module, then the module stops crashing
in loop, which improves battery time a little bit, but the difference
with 4.15 is still startling.

Note that blacklisting the nouveau kernel module has the side effect of
preventing the kernel from putting the video card to sleep, which drains
the battery even more.

--
Pierre Neidhardt

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Does Linux 4.16.1 blast out battery time? (9h+ -> 3h+)
  2018-05-03  6:45           ` Pierre Neidhardt
@ 2018-05-08 21:11             ` Nils Gillmann
  2018-05-09  7:20               ` Pierre Neidhardt
  0 siblings, 1 reply; 10+ messages in thread
From: Nils Gillmann @ 2018-05-08 21:11 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: help-guix

Pierre Neidhardt transcribed 1.0K bytes:
> 
> I've re-tested with 4.16.6: still happening, the battery life is about
> 50% down.
> 
> If I blacklist the nouveau kernel module, then the module stops crashing
> in loop, which improves battery time a little bit, but the difference
> with 4.15 is still startling.
> 
> Note that blacklisting the nouveau kernel module has the side effect of
> preventing the kernel from putting the video card to sleep, which drains
> the battery even more.
>
> --
> Pierre Neidhardt


Out of Guix suppport scope, but I have a mainboard (not with nouveau)
which showed problems with a certain 4.x version of Linux[1]. The debug
sugesstion by Intel is to configure and run the drm-tip branch[0] of
the kernel. I can't advocate how to package or do this here (which is
too bad), but for all things graphics related this will be suggested
by upstream most certainly.


0: branch as in the repository, not linux repository itself. In case you
   are unfamilar with linux development branching model.
1: Variants of https://bugs.freedesktop.org/buglist.cgi?quicksearch=i915%20intel_cpu_fifo_underrun_irq_handler&list_id=579081
   and this is still going on.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Does Linux 4.16.1 blast out battery time? (9h+ -> 3h+)
  2018-05-08 21:11             ` Nils Gillmann
@ 2018-05-09  7:20               ` Pierre Neidhardt
  2018-05-09  8:19                 ` Nils Gillmann
  0 siblings, 1 reply; 10+ messages in thread
From: Pierre Neidhardt @ 2018-05-09  7:20 UTC (permalink / raw)
  To: Nils Gillmann; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 834 bytes --]


Thanks for the tip! :)

> I can't advocate how to package or do this here (which is
> too bad),

Why not?  Is it non-free?  Custom kernel compilation is fine to discuss
on this mailing list if I'm not mistaken.  Only proprietary firmware
packaging isn't.  Correct me if I'm wrong.

> but for all things graphics related this will be suggested
> by upstream most certainly.
>
>
> 0: branch as in the repository, not linux repository itself. In case you
>    are unfamilar with linux development branching model.

Which repository?  Sorry, I didn't get this.

> 1: Variants of https://bugs.freedesktop.org/buglist.cgi?quicksearch=i915%20intel_cpu_fifo_underrun_irq_handler&list_id=579081
>    and this is still going on.

Indeed, I've seen this issue many times on a couple of machines.

-- 
Pierre Neidhardt

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Does Linux 4.16.1 blast out battery time? (9h+ -> 3h+)
  2018-05-09  7:20               ` Pierre Neidhardt
@ 2018-05-09  8:19                 ` Nils Gillmann
  0 siblings, 0 replies; 10+ messages in thread
From: Nils Gillmann @ 2018-05-09  8:19 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: help-guix, Nils Gillmann

[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]

Pierre Neidhardt transcribed 1.4K bytes:
> 
> Thanks for the tip! :)
> 
> > I can't advocate how to package or do this here (which is
> > too bad),
> 
> Why not?  Is it non-free?  Custom kernel compilation is fine to discuss
> on this mailing list if I'm not mistaken.  Only proprietary firmware
> packaging isn't.  Correct me if I'm wrong.

drm-tip is a branch of the Linux kernel, not the GNU variant linux-libre.

> > but for all things graphics related this will be suggested
> > by upstream most certainly.
> >
> >
> > 0: branch as in the repository, not linux repository itself. In case you
> >    are unfamilar with linux development branching model.
> 
> Which repository?  Sorry, I didn't get this.

Linux drm-tip. I didn't link to it for reasons, but "git kernel.org linux drm-tip"
should help.. if it helps in your case at all. I'm not sure.

> > 1: Variants of https://bugs.freedesktop.org/buglist.cgi?quicksearch=i915%20intel_cpu_fifo_underrun_irq_handler&list_id=579081
> >    and this is still going on.
> 
> Indeed, I've seen this issue many times on a couple of machines.
> 
> -- 
> Pierre Neidhardt



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-05-09  8:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-13  6:06 Does Linux 4.16.1 blast out battery time? (9h+ -> 3h+) Pierre Neidhardt
2018-04-13  6:50 ` Tomáš Čech
2018-04-13  7:33   ` Pierre Neidhardt
2018-04-13 10:14     ` Pierre Neidhardt
2018-04-24  8:37       ` Ludovic Courtès
2018-04-24 13:17         ` Pierre Neidhardt
2018-05-03  6:45           ` Pierre Neidhardt
2018-05-08 21:11             ` Nils Gillmann
2018-05-09  7:20               ` Pierre Neidhardt
2018-05-09  8:19                 ` Nils Gillmann

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.