From patchwork Mon Feb 27 09:04:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bugzilla-daemon@bugzilla.kernel.org X-Patchwork-Id: 9592857 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A03FE604AB for ; Mon, 27 Feb 2017 09:04:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88D37283C2 for ; Mon, 27 Feb 2017 09:04:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D89F28498; Mon, 27 Feb 2017 09:04:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F010B283C2 for ; Mon, 27 Feb 2017 09:04:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 35BA96E2FB; Mon, 27 Feb 2017 09:04:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.wl.linuxfoundation.org (mail.wl.linuxfoundation.org [198.145.29.98]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6E7776E2FB for ; Mon, 27 Feb 2017 09:04:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3605B2842F for ; Mon, 27 Feb 2017 09:04:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2ABBC28499; Mon, 27 Feb 2017 09:04:15 +0000 (UTC) Received: from pdx-korg-bugzilla-1.web.codeaurora.org (unknown [172.30.200.120]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6DD628498 for ; Mon, 27 Feb 2017 09:04:12 +0000 (UTC) Received: by pdx-korg-bugzilla-1.web.codeaurora.org (Postfix, from userid 48) id DC41A858A8; Mon, 27 Feb 2017 09:04:12 +0000 (UTC) From: bugzilla-daemon@bugzilla.kernel.org To: dri-devel@lists.freedesktop.org Subject: [Bug 194721] New: Reading /sys/bus/pci/devices/0000:01:00.0/config wakes up Radeon dGPU Date: Mon, 27 Feb 2017 09:04:12 +0000 X-Bugzilla-Reason: None X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: AssignedTo drivers_video-dri@kernel-bugs.osdl.org X-Bugzilla-Product: Drivers X-Bugzilla-Component: Video(DRI - non Intel) X-Bugzilla-Version: 2.5 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eugene.shalygin@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: drivers_video-dri@kernel-bugs.osdl.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version cf_kernel_version rep_platform op_sys cf_tree bug_status bug_severity priority component assigned_to reporter cf_regression attachments.created Message-ID: X-Bugzilla-URL: https://bugzilla.kernel.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP https://bugzilla.kernel.org/show_bug.cgi?id=194721 Bug ID: 194721 Summary: Reading /sys/bus/pci/devices/0000:01:00.0/config wakes up Radeon dGPU Product: Drivers Version: 2.5 Kernel Version: 4.8 and newer Hardware: All OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: Video(DRI - non Intel) Assignee: drivers_video-dri@kernel-bugs.osdl.org Reporter: eugene.shalygin@gmail.com Regression: No Created attachment 254957 --> https://bugzilla.kernel.org/attachment.cgi?id=254957&action=edit dmesg In ArchLinux with kernel 4.8 and newer accessing file /sys/bus/pci/devices/0000:01:00.0/config wakes up dGPU (like DRI_PRIME=1 glxinfo would do). Since many program read that file at startup, this is highly annoying. $ lspci 00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06) 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06) 00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06) 00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06) 00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05) 00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04) 00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05) 00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05) 00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5) 00:1c.1 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #2 (rev d5) 00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5) 00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d5) 00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05) 00:1f.0 ISA bridge: Intel Corporation HM87 Express LPC Controller (rev 05) 00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05) 00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05) 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Neptune XT [Radeon HD 8970M] 03:00.0 PCI bridge: Texas Instruments XIO2213A/B/XIO2221 PCI Express to PCI Bridge [Cheetah Express] (rev 01) 04:00.0 FireWire (IEEE 1394): Texas Instruments XIO2213A/B/XIO2221 IEEE-1394b OHCI Controller [Cheetah Express] (rev 01) 05:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTL8411 PCI Express Card Reader (rev 01) 05:00.2 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0a) 06:00.0 Network controller: Intel Corporation Wireless 7260 (rev bb) At the same time on the almost identical machine running Gentoo: $ diff -U 1 lspci.txt lspci.txt.gentoo +01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Neptune XT [Radeon HD 8970M] (rev ff) 03:00.0 PCI bridge: Texas Instruments XIO2213A/B/XIO2221 PCI Express to PCI Bridge [Cheetah Express] (rev 01) @@ -21,2 +21,2 @@ 05:00.2 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0a) -06:00.0 Network controller: Intel Corporation Wireless 7260 (rev bb) +06:00.0 Network controller: Intel Corporation Wireless 7260 (rev 73) this does not happen. Rebuilding kernel with copied from the Gentoo machine config changed nothing. The attached dmesg output contains several such events at the end of the file. When the dGPU is disabled using acpi_call and its example turn_off_gpu.sh script, accessing the /sys/bus/pci/devices/0000:01:00.0/config hangs a process (it does not react to SIGKILL). --- lspci.txt 2017-02-27 09:55:03.885457274 +0100 +++ lspci.txt.gentoo 2017-02-27 09:55:21.978499749 +0100 @@ -16,3 +16,3 @@ 00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05) -01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Neptune XT [Radeon HD 8970M]