From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Date: Tue, 3 Jan 2017 17:59:18 +0100 (CET) From: Kilian Singer To: Lukas Wunner Cc: Bjorn Helgaas , linux-pci , Mika Westerberg , "Rafael J. Wysocki" Message-ID: <1204573191.9.1483462758094.JavaMail.zimbra@quantumtechnology.info> In-Reply-To: <20170102114040.GA20127@wunner.de> References: <20161227235737.GB24366@bhelgaas-glaptop.roam.corp.google.com> <521048803.418.1483027350066.JavaMail.zimbra@quantumtechnology.info> <472708904.419.1483028422817.JavaMail.zimbra@quantumtechnology.info> <20161229175028.GA18510@wunner.de> <52715138.511.1483053634089.JavaMail.zimbra@quantumtechnology.info> <20161230000731.GB18700@wunner.de> <1180505121.522.1483056977880.JavaMail.zimbra@quantumtechnology.info> <20170102114040.GA20127@wunner.de> Subject: Re: PCI: Revert "PCI: Add runtime PM support for PCIe ports" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 List-ID: I tried the 4.9.0 kernel and the patch fixes both the screen lock and firefox issue. ----- Original Message ----- From: "Lukas Wunner" To: "Kilian Singer" Cc: "Bjorn Helgaas" , "linux-pci" , "Mika Westerberg" , "Rafael J. Wysocki" Sent: Monday, January 2, 2017 12:40:40 PM Subject: Re: PCI: Revert "PCI: Add runtime PM support for PCIe ports" On Fri, Dec 30, 2016 at 01:16:17AM +0100, Kilian Singer wrote: > I did the debug message on the 4.10-rc1 for now. I could go back to 4.9 > if that helps but needs some time again to compile. > The debug messages from the first rpm_... to the crash are: [...] > [ 24.831417] nouveau 0000:01:00.0: rpm_suspend > [ 24.831427] nouveau 0000:01:00.0: DRM: suspending console... > [ 24.831432] nouveau 0000:01:00.0: DRM: suspending display... > [ 24.831477] nouveau 0000:01:00.0: DRM: evicting buffers... > [ 24.865243] nouveau 0000:01:00.0: DRM: waiting for kernel channels to go idle... > [ 24.865269] nouveau 0000:01:00.0: DRM: suspending client object trees... > [ 24.870724] nouveau 0000:01:00.0: DRM: suspending kernel object tree... > [ 26.080300] thinkpad_acpi: EC reports that Thermal Table has changed > [ 26.207691] pcieport 0000:00:01.0: rpm_idle > [ 26.207693] pcieport 0000:00:01.0: rpm_suspend > [ 28.927640] snd_hda_codec_hdmi hdaudioC0D0: rpm_suspend > SYSTEM IS NOW NOT RESPONSIVE So two seconds before the system became unresponsive, the root port above the discrete GPU suspended, suggesting that's the culprit. Could you test either of the attached patches to confirm this theory? They disable runtime PM on this specific root port but allow it on all the others. You've got an Optimus laptop, i.e. power to the discrete GPU can be cut. Traditionally this is achieved by invoking an ACPI _DSM (Device Specific Method). That's what we did up until v4.7. However on newer laptops Windows no longer cuts power to the discrete GPU by invoking the _DSM, but rather by suspending the root port above the GPU. (More specifically by turning off Power Resources required for D3 of the root port, those are specified in a _PR3 object.) We started supporting this with v4.8. If the above theory is correct, we need to involve Optimus experts because this is not an issue then with powering down root ports in general, but rather specific to this Optimus use case. Thanks, Lukas