linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lyude Paul <lyude@redhat.com>
To: David Airlie <airlied@redhat.com>, Peter Jones <pjones@redhat.com>
Cc: Lukas Wunner <lukas@wunner.de>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Peter Wu <peter@lekensteyn.nl>,
	Bjorn Helgaas <helgaas@kernel.org>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Kilian Singer <kilian.singer@quantumtechnology.info>,
	linux-pci <linux-pci@vger.kernel.org>,
	Alex Deucher <alexander.deucher@amd.com>,
	Hans de Goede <hdegoede@redhat.com>, Lyude <cpaul@redhat.com>
Subject: Re: PCI: Revert "PCI: Add runtime PM support for PCIe ports"
Date: Mon, 09 Jan 2017 10:11:26 -0500	[thread overview]
Message-ID: <1483974686.28993.3.camel@redhat.com> (raw)
In-Reply-To: <1931628154.8613274.1483644995907.JavaMail.zimbra@redhat.com>

fwiw, I just tried on the W541 I have 4.8.15-300.fc25.x86_64 running on
here and so far it seems to suspend/resume just fine using firmware
version 2.19

On Thu, 2017-01-05 at 14:36 -0500, David Airlie wrote:
> (cc'ing Lyude, who has the hw also I think).
> 
> ----- Original Message -----
> > From: "Peter Jones" <pjones@redhat.com>
> > To: "Lukas Wunner" <lukas@wunner.de>
> > Cc: "David Airlie" <airlied@redhat.com>, "Rafael J. Wysocki" <rjw@r
> > jwysocki.net>, "Peter Wu" <peter@lekensteyn.nl>,
> > "Bjorn Helgaas" <helgaas@kernel.org>, "Mika Westerberg" <mika.weste
> > rberg@linux.intel.com>, "Kilian Singer"
> > <kilian.singer@quantumtechnology.info>, "linux-pci" <linux-pci@vger
> > .kernel.org>, "Alex Deucher"
> > <alexander.deucher@amd.com>, "Hans de Goede" <hdegoede@redhat.com>
> > Sent: Friday, 6 January, 2017 4:13:23 AM
> > Subject: Re: PCI: Revert "PCI: Add runtime PM support for PCIe
> > ports"
> > 
> > On Thu, Jan 05, 2017 at 04:06:46PM +0100, Lukas Wunner wrote:
> > > On Wed, Jan 04, 2017 at 06:21:14PM -0500, David Airlie wrote:
> > > > > On Wednesday, January 04, 2017 10:09:54 PM Peter Wu wrote:
> > > > > > On Wed, Jan 04, 2017 at 09:16:39AM +0100, Lukas Wunner
> > > > > > wrote:
> > > > > > > On Tue, Jan 03, 2017 at 06:05:57PM -0600, Bjorn Helgaas
> > > > > > > wrote:
> > > > > > > > I don't *want* to apply the revert.  It's on my for-
> > > > > > > > linus branch
> > > > > > > > as a
> > > > > > > > worst-case scenario change if we can't figure out a
> > > > > > > > better fix.
> > > > > > > > 
> > > > > > > > The patch below is preferable, but I'd rather not take
> > > > > > > > even it,
> > > > > > > > because it takes away functionality and forces people
> > > > > > > > to use a
> > > > > > > > boot
> > > > > > > > parameter to restore it.  I expect that somebody will
> > > > > > > > figure out
> > > > > > > > how
> > > > > > > > to fix the regression Kilian found and also keep the
> > > > > > > > new
> > > > > > > > functionality
> > > > > > > > (without requiring boot parameters) before v4.10.
> > > > > > > 
> > > > > > > The issue is constrained to hybrid graphics laptops with
> > > > > > > Nvidia
> > > > > > > discrete
> > > > > > > GPU using nouveau.  Hence it needs to be fixed in
> > > > > > > nouveau, not in
> > > > > > > the
> > > > > > > PCI core.
> > > > > > 
> > > > > > The problem is not necessarily in the nouveau driver, the
> > > > > > same
> > > > > > problem
> > > > > > occurs when you enable RPM without loading nouveau. The
> > > > > > issue is
> > > > > > limited
> > > > > > though to some newer hybrid graphics laptops with Nvidia
> > > > > > GPUs. While
> > > > > > a
> > > > > > quirk can be added to nouveau, I think that a (temporary)
> > > > > > quirk in
> > > > > > core
> > > > > > would also be reasonable (since it also occurs without
> > > > > > nouveau).
> > > > > > 
> > > > > > > (AFAIUI, laptops with AMD discrete GPU are not affected
> > > > > > > as it is
> > > > > > > known
> > > > > > > when and how to call an ACPI method versus using PR3.)
> > > > > > > 
> > > > > > > (Neither are laptops using the Nvidia proprietary driver
> > > > > > > as it
> > > > > > > doesn't
> > > > > > > runtime suspend the card.  But battery life will be
> > > > > > > terrible then.)
> > > > > > > 
> > > > > > > We're at rc2 so the time frame for coming up with a fix
> > > > > > > is probably
> > > > > > > 4 weeks.  Peter and others have tried for months to
> > > > > > > reverse-engineer
> > > > > > > how to handle runtime PM on newer Nvidia cards.  It seems
> > > > > > > likely
> > > > > > > that
> > > > > > > we'll not find the ultimate solution to the problem
> > > > > > > within 4 weeks.
> > > > > > 
> > > > > > Yep, a quick proper fix seems unlikely.
> > > > > > [ Help/ideas are welcome, I suspect that these failures to
> > > > > > restore
> > > > > > power
> > > > > > on laptops designed for Win8+ all have the same cause,
> > > > > > related to
> > > > > > some
> > > > > > unknown interaction between ACPI and PCI. Some links:
> > > > > > https://bugzilla.kernel.org/show_bug.cgi?id=190861
> > > > > > https://bugzilla.kernel.org/show_bug.cgi?id=156341 ]
> > > > > > 
> > > > > > > The way it is now, i.e. defaulting to PR3 when available,
> > > > > > > regresses
> > > > > > > certain laptops such as Kilian's.  If on the other hand
> > > > > > > we default
> > > > > > > to
> > > > > > > DSM when available, we'll regress certain other laptops,
> > > > > > > as Peter
> > > > > > > has
> > > > > > > pointed out.  Whitelisting or blacklisting laptops
> > > > > > > doesn't seem a
> > > > > > > good
> > > > > > > approach either, ideally we'd want to use PR3 as Windows
> > > > > > > does.
> > > > > > > 
> > > > > > > As said, the only short-term solution I see is to add an
> > > > > > > "optimus"
> > > > > > > module_param to nouveau to allow users to select which
> > > > > > > method to
> > > > > > > use.
> > > > > > > So in Kilian's case an additional command line parameter
> > > > > > > would be
> > > > > > > necessary to fix the issue.
> > > > > > > 
> > > > > > > Does anyone see a better solution or can we agree on this
> > > > > > > one?  If
> > > > > > > so
> > > > > > > I can come up with a patch.  This could go in via Dave
> > > > > > > Airlie's
> > > > > > > tree.
> > > > > > 
> > > > > > As pcie_port_pm=off already reverts to DSM, I do not think
> > > > > > that an
> > > > > > additional (temporary) nouveau module parameter is going to
> > > > > > help. I
> > > > > > instead propose a (hopefully temporary) quirk in pci core
> > > > > > that
> > > > > > disables
> > > > > > D3cold RPM for just Kilians Lenovo laptop (basically
> > > > > > defaulting to
> > > > > > pcie_port_pm=off). Then the option pcie_port_pm=force can
> > > > > > still be
> > > > > > used
> > > > > > to test possible solutions in the future.
> > > > > 
> > > > > I would rather add a quirk to the ACPI core to prevent the
> > > > > power
> > > > > resources in
> > > > > question from being enumerated.  Or even to prevent ACPI PM
> > > > > from being
> > > > > used for the port in question.
> > > > 
> > > > I do have a W541 in a cupboard in the office somewhere, but I
> > > > won't be
> > > > close to
> > > > it for a couple of weeks. The W541 was the first place I tested
> > > > the pm
> > > > patches
> > > > so I'm kinda wondering whether it's all W541's or just some
> > > > specific
> > > > model/bios
> > > > combo.
> > 
> > They seem to all ship with the 1.10 firmware, and 2.80 is current
> > (there
> > are a bunch of intermediate 2.xx versions).  Somewhere along the
> > line
> > they introduced some bugs in the UEFI stuff, so it wouldn't be
> > surprising if there's bugs introduced elsewhere as well.
> > 
> > > > However I'm pretty much unavailable to do anything much until
> > > > late Jan on
> > > > this.
> > > 
> > > Is there anyone else at Red Hat who might be able to look into
> > > this?
> > > 
> > > ISTR that Hans de Goede is working on improving laptop support in
> > > Fedora,
> > > and Peter Jones recently got a patch merged for the W541 with the
> > > exact
> > > same firmware Kilian is using to work around a botched EFI memory
> > > map.
> > > Adding them to cc: in the hope that they may be able to help.
> > > 
> > > @Peter, have you noticed issues with the discrete Nvidia GPU on
> > > your W541
> > > related to runtime suspend and system sleep?
> > 
> > I was using a borrowed one (I can certainly find it again, but I'm
> > not
> > working on graphics/pm really), but yeah - shutdown and lspci both
> > broke
> > sometime after pci_pm_runtime_resume().  Here's the traceback from
> > SYS_reboot(): https://goo.gl/photos/T1fr1bksHQb9RSU67
> > 
> > Dave, if you know who in Westford should have a look at this, I can
> > see
> > about getting them hardware.  I am more or less surrounded by that
> > team.
> > 
> > --
> >         Peter
> > 

  reply	other threads:[~2017-01-09 15:11 UTC|newest]

Thread overview: 115+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-27 23:57 PCI: Revert "PCI: Add runtime PM support for PCIe ports" Bjorn Helgaas
2016-12-28  9:17 ` Mika Westerberg
2016-12-28 11:29 ` Lukas Wunner
2016-12-28 16:18   ` Bjorn Helgaas
2016-12-29  9:58     ` Kilian Singer
2016-12-29 16:02       ` Kilian Singer
2016-12-29 16:20         ` Kilian Singer
2016-12-29 17:50           ` Lukas Wunner
2016-12-29 22:52             ` Kilian Singer
2016-12-29 23:02               ` Kilian Singer
2016-12-29 23:05                 ` Kilian Singer
2016-12-29 23:48               ` Lukas Wunner
2016-12-29 23:20             ` Kilian Singer
2016-12-30  0:07               ` Lukas Wunner
2016-12-30  0:16                 ` Kilian Singer
2016-12-30  0:24                   ` Kilian Singer
2016-12-30  0:22                     ` Rafael J. Wysocki
2016-12-30  0:39                       ` Kilian Singer
2016-12-30  0:41                         ` Rafael J. Wysocki
2016-12-30  0:45                       ` Kilian Singer
2016-12-30  1:40                         ` Rafael J. Wysocki
2016-12-30  1:50                           ` Rafael J. Wysocki
2016-12-30  1:52                             ` Rafael J. Wysocki
2016-12-30 13:37                               ` Kilian Singer
2016-12-30 13:59                                 ` Kilian Singer
2016-12-30 14:44                                   ` Rafael J. Wysocki
2016-12-30 14:47                                 ` Rafael J. Wysocki
2017-01-02 12:22                                   ` Mika Westerberg
2017-01-03 17:12                                     ` Kilian Singer
2017-01-02 11:40                   ` Lukas Wunner
2017-01-02 12:10                     ` Mika Westerberg
2017-01-02 13:53                       ` Mika Westerberg
2017-01-02 14:48                       ` Mika Westerberg
2017-01-02 21:31                         ` Rafael J. Wysocki
2017-01-03  9:51                           ` Mika Westerberg
2017-01-03 15:15                             ` Peter Wu
2017-01-03 16:11                               ` Lukas Wunner
2017-01-03 16:31                                 ` Peter Wu
2017-01-03 16:44                                   ` Deucher, Alexander
2017-01-03 18:09                                   ` Lukas Wunner
2017-01-03 18:12                                   ` Bjorn Helgaas
2017-01-03 21:38                                     ` Rafael J. Wysocki
2017-01-03 21:52                                       ` Kilian Singer
2017-01-03 22:07                                         ` Rafael J. Wysocki
2017-01-03 22:25                                           ` Kilian Singer
2017-01-03 22:25                                       ` Bjorn Helgaas
2017-01-03 23:13                                         ` Rafael J. Wysocki
2017-01-04  0:05                                           ` Bjorn Helgaas
2017-01-04  1:09                                             ` Rafael J. Wysocki
2017-01-04  8:16                                             ` Lukas Wunner
2017-01-04 10:33                                               ` Kilian Singer
2017-01-04 12:29                                                 ` Mika Westerberg
2017-01-04 15:50                                               ` Deucher, Alexander
2017-01-04 21:09                                               ` Peter Wu
2017-01-04 21:58                                                 ` Rafael J. Wysocki
2017-01-04 23:21                                                   ` David Airlie
2017-01-05 15:06                                                     ` Lukas Wunner
2017-01-05 18:13                                                       ` Peter Jones
2017-01-05 19:36                                                         ` David Airlie
2017-01-09 15:11                                                           ` Lyude Paul [this message]
2017-01-09 15:21                                                             ` Hans de Goede
2017-01-09 18:48                                                               ` Kilian Singer
2017-01-10  0:33                                                                 ` David Airlie
2017-01-10  9:17                                                                   ` Kilian Singer
2017-01-12 18:10                                                                     ` Lyude Paul
2017-01-24  4:59                                                                       ` Lukas Wunner
2017-01-24 19:09                                                                         ` Lyude Paul
2017-01-11 20:40                                                               ` Lyude Paul
2017-01-12  1:13                                                                 ` Lyude Paul
2017-01-12  2:04                                                                   ` Lyude Paul
2017-01-12  2:12                                                                     ` Lukas Wunner
2017-01-17 15:55                                                                       ` Mika Westerberg
2017-01-17 18:06                                                                         ` Lyude Paul
2017-01-17 19:10                                                                           ` Bjorn Helgaas
2017-01-17 19:49                                                                             ` Lyude Paul
2017-01-07 11:45                                                       ` Hans de Goede
2017-01-07 12:16                                                         ` Lukas Wunner
2017-01-09 23:00                                                         ` Peter Jones
2017-01-10  0:17                                                           ` David Airlie
2017-01-10  1:24                                                             ` Lukas Wunner
2017-01-10  2:15                                                               ` David Airlie
2017-01-11 11:04                                                       ` Hans de Goede
2017-01-11 13:24                                                         ` Kilian Singer
2017-01-11 13:26                                                           ` Hans de Goede
2017-01-11 16:24                                                             ` Peter Jones
2017-01-11 19:20                                                               ` Kilian Singer
2017-01-05 10:49                                                   ` Mika Westerberg
2017-01-05 14:19                                                     ` Rafael J. Wysocki
2017-01-05 14:20                                                     ` Mika Westerberg
2017-01-05 14:23                                                       ` Rafael J. Wysocki
2017-01-05 14:42                                                 ` Lukas Wunner
2017-01-06  1:21                                                   ` Rafael J. Wysocki
2017-01-07  6:50                                                     ` Mika Westerberg
2017-01-07 11:35                                                   ` Peter Wu
2017-01-07 12:19                                                     ` Lukas Wunner
2017-01-07 12:36                                                       ` Peter Wu
2017-01-08 14:05                                                         ` Lukas Wunner
2017-01-04 21:55                                               ` Rafael J. Wysocki
2017-01-03 21:26                                 ` Rafael J. Wysocki
2017-01-03 17:37                               ` Kilian Singer
2017-01-03 17:10                       ` Kilian Singer
2017-01-03 16:59                     ` Kilian Singer
2017-01-03 17:08                     ` Kilian Singer
2016-12-30  0:19     ` Rafael J. Wysocki
2016-12-30 14:48       ` Rafael J. Wysocki
2017-01-17 14:56 ` Bjorn Helgaas
2017-01-17 15:49   ` Kilian Singer
2017-01-23 20:33   ` Bjorn Helgaas
2017-01-23 21:12     ` Mika Westerberg
2017-01-24  4:53       ` Lukas Wunner
2017-01-24 20:01       ` Bjorn Helgaas
2017-01-25  9:48         ` Mika Westerberg
2017-01-25 16:05           ` Kilian Singer
2017-01-25 16:31             ` Mika Westerberg
2017-01-25 17:58 ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1483974686.28993.3.camel@redhat.com \
    --to=lyude@redhat.com \
    --cc=airlied@redhat.com \
    --cc=alexander.deucher@amd.com \
    --cc=cpaul@redhat.com \
    --cc=hdegoede@redhat.com \
    --cc=helgaas@kernel.org \
    --cc=kilian.singer@quantumtechnology.info \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mika.westerberg@linux.intel.com \
    --cc=peter@lekensteyn.nl \
    --cc=pjones@redhat.com \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).