linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Power management - HP 15-ds0502na
@ 2019-11-04 11:21 Tom Cook
  2019-11-04 13:51 ` Theodore Y. Ts'o
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Cook @ 2019-11-04 11:21 UTC (permalink / raw)
  To: linux-kernel

Hi all,

I've recently purchased an HP 2-in-1 laptop, model 15-ds0502na.  This
is a Ryzen 7 3700U processor.  There seems to be some difficulty
between HP's firmware ACPI tables and the kernel.  It's not clear (to
me, at least) whether this is poor ACPI implementation from HP or poor
handling of valid ACPI tables by the kernel.  The most obvious
symptoms are:

* Pre-5.3 kernels don't boot at all.  This appears to be because the
FADT table declares the hardware_reduced flag and this was not very
well supported.  5.3 kernels boot okay (I'm using the one that comes
with Ubuntu 15.10).
* Power management doesn't work very well.  The most obvious symptom
of this is that /sys/power/mem_sleep contains only "[s2idle]" and so
there is no suspend-to-RAM available.  Setting
"mem_sleep_default=deep" on the command line doesn't change this.
* There are a few devices that appear to be on I2C buses and declared
in the ACPI tables (eg the fingerprint sensor) which don't show up
under Linux.  They did under Windows, until I blew the Windows
installation away to install Linux, and I'm assuming that Windows
found them through the ACPI DSDT.  Now thinking it may have been handy
to keep Windows around for debugging, but that's regrets for you.

Is this the right place to raise this?  If there's some other place
that Linux ACPI issues are dealt with, please point me there as I've
not had any luck googling.

What are my next steps debugging this?  I've decompiled the firmware
ACPi tables but I don't have much idea what I'm looking at.

Thanks,
Tom Cook

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

* Re: Power management - HP 15-ds0502na
  2019-11-04 11:21 Power management - HP 15-ds0502na Tom Cook
@ 2019-11-04 13:51 ` Theodore Y. Ts'o
  2019-11-04 14:32   ` Tom Cook
  0 siblings, 1 reply; 5+ messages in thread
From: Theodore Y. Ts'o @ 2019-11-04 13:51 UTC (permalink / raw)
  To: Tom Cook; +Cc: linux-kernel

On Mon, Nov 04, 2019 at 11:21:24AM +0000, Tom Cook wrote:
> * Power management doesn't work very well.  The most obvious symptom
> of this is that /sys/power/mem_sleep contains only "[s2idle]" and so
> there is no suspend-to-RAM available.  Setting
> "mem_sleep_default=deep" on the command line doesn't change this.

This is actually the laptop's ACPI and/or EC not supporting
suspend-to-ram at all.  Suspend to idle is the new hotness, because it
gives the OS much more control (but also gives the OS much more
opportunity to screw up).  The Dell XPS 13 (models 9370 and 9380)
supports both s2idle and s2ram, but s2idle doesn't work well at all on
Linux.  (Well, at least not the upstream kernels; the official Dell
Ubuntu kernel and userspace apparently has enough tweaks that it works
well.)

I tried for a bit to see if I could get s2idle working well on the
upstream Dell XPS 13, but bits of hardware would randomly fail to come
back from a s2idle resume --- or in some cases, the laptop wouldn't
come back at all, that I decided, "life's too short", and gave up on
it.  Hopefully Dell or other folks will get s2idle working well on the
XPS 13... at least before suspend2ram gets dropped entirely.  :-/


> * There are a few devices that appear to be on I2C buses and declared
> in the ACPI tables (eg the fingerprint sensor) which don't show up
> under Linux.  They did under Windows, until I blew the Windows
> installation away to install Linux, and I'm assuming that Windows
> found them through the ACPI DSDT.  Now thinking it may have been handy
> to keep Windows around for debugging, but that's regrets for you.

Even if they showed up, it's unclear the device driver would exist for
Linux.  Most fingerprint readers have proprietary interfaces and
aren't well supported by Linux in general.

> Is this the right place to raise this?  If there's some other place
> that Linux ACPI issues are dealt with, please point me there as I've
> not had any luck googling.

There is the linux-acpi@vger.kernel.org mailing list and the
linux-pm@vger.kernel.org (pm --> "power management") where you might
try asking about the s2idle.  A lot of the issues with s2idle appear
to be very device driver specific, and not about the power management
core, so it's unclear folks on those lists will be able to help.  But
it's worth a try...

					- Ted

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

* Re: Power management - HP 15-ds0502na
  2019-11-04 13:51 ` Theodore Y. Ts'o
@ 2019-11-04 14:32   ` Tom Cook
  2019-11-04 15:06     ` Theodore Y. Ts'o
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Cook @ 2019-11-04 14:32 UTC (permalink / raw)
  To: linux-kernel

On Mon, Nov 4, 2019 at 1:51 PM Theodore Y. Ts'o <tytso@mit.edu> wrote:
> This is actually the laptop's ACPI and/or EC not supporting
> suspend-to-ram at all.  Suspend to idle is the new hotness, because it
> gives the OS much more control (but also gives the OS much more
> opportunity to screw up).  The Dell XPS 13 (models 9370 and 9380)
> supports both s2idle and s2ram, but s2idle doesn't work well at all on
> Linux.  (Well, at least not the upstream kernels; the official Dell
> Ubuntu kernel and userspace apparently has enough tweaks that it works
> well.)

s2idle sort of works - the thing appears to go to sleep and wake up
okay - but the power savings are not really enough to make it
worthwhile.  Putting it into s2idle state and putting it in a bag
results in a very hot laptop - and of course that makes battery life
not great.  I'm guessing this is the Ryzen 7 CPU idle states not being
very well supported?

> > * There are a few devices that appear to be on I2C buses and declared
> > in the ACPI tables (eg the fingerprint sensor) which don't show up
> > under Linux.  They did under Windows, until I blew the Windows
> > installation away to install Linux, and I'm assuming that Windows
> > found them through the ACPI DSDT.  Now thinking it may have been handy
> > to keep Windows around for debugging, but that's regrets for you.
>
> Even if they showed up, it's unclear the device driver would exist for
> Linux.  Most fingerprint readers have proprietary interfaces and
> aren't well supported by Linux in general.

Yes, understood.  But the first step would be enumerating them through
the ACPI tables (if indeed that is how they are announced).

> > Is this the right place to raise this?  If there's some other place
> > that Linux ACPI issues are dealt with, please point me there as I've
> > not had any luck googling.
>
> There is the linux-acpi@vger.kernel.org mailing list and the
> linux-pm@vger.kernel.org (pm --> "power management") where you might
> try asking about the s2idle.  A lot of the issues with s2idle appear
> to be very device driver specific, and not about the power management
> core, so it's unclear folks on those lists will be able to help.  But
> it's worth a try...

Thanks.

Tom

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

* Re: Power management - HP 15-ds0502na
  2019-11-04 14:32   ` Tom Cook
@ 2019-11-04 15:06     ` Theodore Y. Ts'o
  2019-11-04 15:45       ` Theodore Y. Ts'o
  0 siblings, 1 reply; 5+ messages in thread
From: Theodore Y. Ts'o @ 2019-11-04 15:06 UTC (permalink / raw)
  To: Tom Cook; +Cc: linux-kernel

On Mon, Nov 04, 2019 at 02:32:30PM +0000, Tom Cook wrote:
> s2idle sort of works - the thing appears to go to sleep and wake up
> okay - but the power savings are not really enough to make it
> worthwhile.  Putting it into s2idle state and putting it in a bag
> results in a very hot laptop - and of course that makes battery life
> not great.  I'm guessing this is the Ryzen 7 CPU idle states not being
> very well supported?

Actually, it's probably because one of the device drives isn't
properly putting that particular device into a low power state.  When
I was trying to make s2idle work on the XPS 13, there was needed patch
to make the SATA AHCI controller go into a lower power state.  This
was a patch which the Dell folks had gotten into their special
"Optimized for Dell laptops" Ubuntu kernel that was running into
resistance upstream.  I *think* that patch finally made it upstream,
but to be honest, I haven't been keeping track since I decided "life
was too short to fight and make s2idle work".

I probably should see if newer kernels have fixed some of these
issues, since the XPS13 is currently my preferred laptop, and I worry
that future models will drop suspend-to-ram, since Windows 10 is using
s2idle, and so the incentive for laptop manufacturers to support
suspend-to-ram is almost non-existent, especially now that Windows XP
and Windows 7 have moved to the great deprecation bitbucket in the
sky....  :-(

      	     	   	       		    - Ted

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

* Re: Power management - HP 15-ds0502na
  2019-11-04 15:06     ` Theodore Y. Ts'o
@ 2019-11-04 15:45       ` Theodore Y. Ts'o
  0 siblings, 0 replies; 5+ messages in thread
From: Theodore Y. Ts'o @ 2019-11-04 15:45 UTC (permalink / raw)
  To: Tom Cook; +Cc: linux-kernel

On Mon, Nov 04, 2019 at 10:06:48AM -0500, Theodore Y. Ts'o wrote:
> Actually, it's probably because one of the device drives isn't
> properly putting that particular device into a low power state.  When
> I was trying to make s2idle work on the XPS 13, there was needed patch
> to make the SATA AHCI controller go into a lower power state.  This
> was a patch which the Dell folks had gotten into their special
> "Optimized for Dell laptops" Ubuntu kernel that was running into
> resistance upstream.  I *think* that patch finally made it upstream,
> but to be honest, I haven't been keeping track since I decided "life
> was too short to fight and make s2idle work".

Oh, and I forgot; the other thing I had to do to get s2idle's power
consumption down to suspend-2-ram was to unload the SD card reader;
apparently that device driver didn't know how to do the low power
saving thing under OS control.  So I ultimately was able to get the
power while suspended of s2idle down to that of s2ram.  What I wasn't
able to solve for my laptop was the reliability of resuming after the
suspend....

						- Ted

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

end of thread, other threads:[~2019-11-04 15:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-04 11:21 Power management - HP 15-ds0502na Tom Cook
2019-11-04 13:51 ` Theodore Y. Ts'o
2019-11-04 14:32   ` Tom Cook
2019-11-04 15:06     ` Theodore Y. Ts'o
2019-11-04 15:45       ` Theodore Y. Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).