From patchwork Wed Feb 19 08:11:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= X-Patchwork-Id: 3679101 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BBA5E9F35F for ; Wed, 19 Feb 2014 08:20:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B15F20166 for ; Wed, 19 Feb 2014 08:20:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B8C2F2016C for ; Wed, 19 Feb 2014 08:20:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF02CFA279; Wed, 19 Feb 2014 00:20:07 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 486 seconds by postgrey-1.32 at gabe; Wed, 19 Feb 2014 00:20:05 PST Received: from mail.cybertec.at (unknown [87.118.86.135]) by gabe.freedesktop.org (Postfix) with ESMTP id A0EF3FACBE for ; Wed, 19 Feb 2014 00:20:05 -0800 (PST) Received: from localhost.localdomain (unknown [87.242.12.103]) by mail.cybertec.at (Postfix) with ESMTPSA id D58E03900A95 for ; Wed, 19 Feb 2014 08:11:55 +0000 (UTC) Message-ID: <5304674C.6060604@pr.hu> Date: Wed, 19 Feb 2014 09:11:56 +0100 From: Boszormenyi Zoltan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Maling list - DRI developers Subject: AMD/AMD hybrid graphics X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, I just got a Lenovo Thinkpad Edge E545 notebook and I have installed Fedora 20/x86_64. The CPU is Richland A10-5750 (contains ARUBA graphics) and there is also a discrete HAINAN chip with 2GB dedicated memory on the mainboard. The problems started during installation, it looked like the machine was frozen when using KMS so I had to use VESA during installation. I was able to install from the network and the latest kernel upgrade is 3.13.3-201. So, I was happy at first when I removed "nomodeset" and it booted up properly in KMS mode and did so after the first few restarts. Initially lspci showed both cards. dmesg told me that HAINAN was not posted by the BIOS but the kernel did it and also loaded the firmware into both cards. Xorg used the integrated ARUBA chip only. Then I looked up info about PRIME and wanted to test it. However, "xrandr --listproviders" showed only one line and "DRI_PRIME=1 glxinfo64 | grep -i renderer" showed that Mesa is using the ARUBA chip regardless of the DRI_PRIME setting. I am sorry, I didn't save the xrandr output, so I can't prove it. Anyway, Xorg.0.log had only traces about the ARUBA, nothing about the discrete chip. Unfortunately, I didn't save neither dmesg nor Xorg.0.log at the time. The UEFI BIOS has a knob to switch between "Integrated Graphics" and "Switchable Graphics" and switchable was the default. There is another one for "OS detection for Switchable Graphics: enable/disable" I started playing with the BIOS settings and this was (or was it?) a mistake. (But this is how I discovered that the virtualization enabled/disabled setting in the BIOS is actually reversed and I also need KVM.) The result of changing to "Integrated Graphics" in the BIOS and changing back to "Switchable Graphics" and toggling the "OS detection" switch to disabled and back to enabled changed the system behavior. The symptom is that after systemd loaded all the services, the machine doesn't seem to do anything at first sight. The systemd messages are left on the screen but the X greeter (lightdm) doesn't show up. However, the system reacts to the power button and shuts down properly. This was encouraging and on the next boot I tried to ssh into the machine and successfully collect dmesg and Xorg logs. It turned out that now, when "Switchable Graphics" is active, regardless of the state of "OS detection for Switchable Graphics", Xorg initializes both cards and apparently wants to use the HAINAN to display the X screen but dies in the process: [zozo@localhost ~]$ ps auxw | grep Xorg root 626 0.0 0.0 209748 4320 ? Ss 08:51 0:00 /usr/bin/abrt-watch-log -F Backtrace /var/log/Xorg.0.log -- /usr/bin/abrt-dump-xorg -xD zozo 1245 0.0 0.0 112680 976 pts/0 S+ 08:56 0:00 grep --color=auto Xorg [zozo@localhost ~]$ ps auxw | grep dm zozo 1247 0.0 0.0 112676 976 pts/0 S+ 08:57 0:00 grep --color=auto dm Since this is a very new machine it seems footnote 5 from http://wiki.x.org/wiki/RadeonFeature/ applies and the HAINAN chip is not connected to the display output. So, currently I can only get it to display X when I use the "Integrated Graphics" setting in the BIOS. In this state, the discrete graphics chip doesn't even show up in lspci: [zozo@localhost ~]$ cat lspci-hainan-disabled 00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Root Complex 00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Richland [Radeon HD 8650G] 00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Trinity HDMI Audio Controller 00:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Root Port 00:05.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Root Port 00:07.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Root Port 00:10.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 09) 00:10.1 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 09) 00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 40) 00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11) 00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 11) 00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11) 00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 11) 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 16) 00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 01) 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 11) 00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] FCH PCI Bridge (rev 40) 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Function 0 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Function 1 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Function 2 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Function 3 00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Function 4 00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Function 5 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07) 02:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01) 03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01) [zozo@localhost ~]$ [zozo@localhost ~]$ diff -u lspci-hainan-disabled lspci-hainan-active 00:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Root Port 00:05.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Root Port 00:07.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Root Port @@ -21,6 +22,7 @@ 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Function 3 00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Function 4 00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Function 5 -01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07) -02:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01) -03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01) +01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun PRO [Radeon HD 8570A/8570M] +02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07) +03:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01) +04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01) [zozo@localhost ~]$ But I would like to have PRIME functional eventually. What xorg.conf magic should I add to achieve it? I have dmesg and Xorg logs from this new behavior, both with "Integrated" and "Switchable" states if you are interested. With the previous state after installation (which I didn't save logs from), dmesg matched the new dmesg with "Switchable" set in the BIOS, so both chips are initialized but the Xorg.0.log matched the log from the "Integrated" state, i.e. only RADEON(0) lines were found. Now, with the "Switchable" state, RADEON(0) lines (for ARUBA) and RADEON(G0) lines (for HAINAN) are present. On second thought, the usage of VESA for installation and then switching to KMS might have caused the mixed behaviour, i.e. that the kernel recognized and initialized both chips but X used only the integrated one. But I don't want to reinstall the system to test this theory. Let me ask again, in case you accidentally skipped the question above: I would like to have PRIME functional so I will need to set "Switchable Graphics" in the BIOS. What xorg.conf magic should I add to make it use the ARUBA chip for display but still keep HAINAN active for PRIME? Is it possible at this time with Fedora 20 at all? Can Mesa/Xorg use both r600g and radeonsi at the same time? [zozo@localhost ~]$ rpm -q kernel mesa-libGL xorg-x11-server-Xorg kernel-3.13.3-201.fc20.x86_64 mesa-libGL-9.2.5-1.20131220.fc20.x86_64 mesa-libGL-9.2.5-1.20131220.fc20.i686 xorg-x11-server-Xorg-1.14.4-6.fc20.x86_64 Thanks in advance, Zoltán Böszörményi --- lspci-hainan-disabled 2014-02-19 08:50:00.137888540 +0100 +++ lspci-hainan-active 2014-02-19 08:53:23.523601738 +0100 @@ -1,6 +1,7 @@ 00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Root Complex 00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Richland [Radeon HD 8650G] 00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Trinity HDMI Audio Controller +00:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-1fh) Processor Root Port