From: Kilian Singer <kilian.singer@quantumtechnology.info>
To: Peter Wu <peter@lekensteyn.nl>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Lukas Wunner <lukas@wunner.de>,
Bjorn Helgaas <helgaas@kernel.org>,
linux-pci <linux-pci@vger.kernel.org>
Subject: Re: PCI: Revert "PCI: Add runtime PM support for PCIe ports"
Date: Tue, 3 Jan 2017 18:37:35 +0100 (CET) [thread overview]
Message-ID: <1845011148.21.1483465055644.JavaMail.zimbra@quantumtechnology.info> (raw)
In-Reply-To: <20170103151547.GB9763@al>
Iapplied the patch to noveau_acpi.c with the additional
pci_d3cold_disable(pdev);
right after
// *has_pr3 = nouveau_pr3_present(pdev);
and both firefox and screen lock issue are resolved.
----- Original Message -----
From: "Peter Wu" <peter@lekensteyn.nl>
To: "Mika Westerberg" <mika.westerberg@linux.intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>, "Lukas Wunner" <lukas@wunner.de>, "Kilian Singer" <kilian.singer@quantumtechnology.info>, "Bjorn Helgaas" <helgaas@kernel.org>, "linux-pci" <linux-pci@vger.kernel.org>
Sent: Tuesday, January 3, 2017 4:15:47 PM
Subject: Re: PCI: Revert "PCI: Add runtime PM support for PCIe ports"
(replying to earlier comments in the thread:)
Changing (lowering?) the cut-off date would not help as the laptop has
DMI year 2016. (For the long-term, it would probably be desirable to
lower the date or otherwise add detection of _PR3, see
https://bugs.freedesktop.org/show_bug.cgi?id=98505#c23).
Reverting the patch is not a good idea either, it would reintroduce the
memory corruption that have plagued some Lenovo models
(https://bugs.freedesktop.org/show_bug.cgi?id=78530).
On Tue, Jan 03, 2017 at 11:51:58AM +0200, Mika Westerberg wrote:
> On Mon, Jan 02, 2017 at 10:31:07PM +0100, Rafael J. Wysocki wrote:
> > On Monday, January 02, 2017 04:48:52 PM Mika Westerberg wrote:
> > > On Mon, Jan 02, 2017 at 02:10:19PM +0200, Mika Westerberg wrote:
> > > > I've checked the acpidump of this machine and it does not seem to be a
> > > > traditional Optimus machine. At least this one is missing the magic _DSM
> > > > which is used to gather capabilities of the graphics device.
> > > >
> > > > However, it does have _PR3 and it is attached to the device
> > > > (_SB.PCI0.PEG) itself, not the root port.
> > >
> > > Nah, actually PEG is the root port. So it certainly looks like
> > > a traditional Optimus machine.
> >
> > So can we quirk that thing somehow and see if that helps (for debugging
> > purposes at least)?
>
> I was kind of hoping disabling D3cold would do that (prevent it from
> turning off power resources). But we can also just force it to use _DSM
> instead and see if it makes a difference.
Disabling d3cold that way might be too late due to the short RPM suspend
delay. You would need a udev rule to activate this ASAP. E.g., create
/etc/udev/rules.d/42-nvidia-rpm.rules with:
SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", ATTR{power/d3cold_allowed}="0"
This disables D3cold on the child device (which should also prevent the
parent PCIe port from using D3cold).
Alternatively, can you try to boot with nouveau.runpm=0 and see if it
makes any difference? When runpm is disabled, then the PCIe port and
Nvidia device should not be suspended and therefore prevent the issue
from being triggered.
> I guess the reason why keyboard and mouse become unresponsive is because
> the driver tries to resume the device and hogs the CPU. At least it
> looks like so from the dmesg in comment 27 (of the bugzilla bug) where
> NMI watchdog is triggered.
>
> Since this might be related to nouveau, adding Peter Wu to the loop.
> Peter the bug in question is https://bugzilla.kernel.org/show_bug.cgi?id=190861.
Kilian, in the bug you had the issue with Firefox. The trace suggests
that runtime resume was triggered, so you should have this problem too
when using lspci. Can you try:
1. Switch to a text console (e.g. Ctrl-Alt-F2).
2. sleep 5; lspci
If that command does not return immediately, you likely have triggered
the same issue.
The acpidump from the bug does not show known issues, it *looks* fine.
There have been other issues related to resuming power on newer Nvidia
hardware (https://bugs.freedesktop.org/show_bug.cgi?id=94725,
https://bugzilla.kernel.org/show_bug.cgi?id=156341) but there is not
much progress here. (The last time I traced the PCIe register accesses
(via kprobes) and tried to disable some of those, it still did not help
with preventing the power issue.)
> Kilian, can you try the following hack as well?
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
> index 193573d191e5..50482d5c8072 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
> @@ -282,7 +282,7 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out
> (result & OPTIMUS_DYNAMIC_PWR_CAP) ? "dynamic power, " : "",
> (result & OPTIMUS_HDA_CODEC_MASK) ? "hda bios codec supported" : "");
>
> - *has_pr3 = nouveau_pr3_present(pdev);
> +// *has_pr3 = nouveau_pr3_present(pdev);
> }
> }
>
This would not disable D3cold support and as a result both PR3 and DSM
would be active. Try the above with this line added to force DSM:
pci_d3cold_disable(pdev);
(This should have the same effect as setting d3cold_allowed=0.)
--
Kind regards,
Peter Wu
https://lekensteyn.nl
next prev parent reply other threads:[~2017-01-03 17:37 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
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 [this message]
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=1845011148.21.1483465055644.JavaMail.zimbra@quantumtechnology.info \
--to=kilian.singer@quantumtechnology.info \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mika.westerberg@linux.intel.com \
--cc=peter@lekensteyn.nl \
--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 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.