Bug 102468

Summary: RX470 powerplay issues on hybrid laptop system (dGPU does not power down)
Product: DRI Reporter: taijian
Component: DRM/AMDgpuAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED NOTOURBUG QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
relevant dmesg output
none
dmesg output with kernel 4.13.3 none

Description taijian 2017-08-29 16:48:10 UTC
Created attachment 133866 [details]
relevant dmesg output

I have an Alienware 15R3 laptop with hybrid Intel (HD 630) / AMD (RX470) graphics. I run Arch Linux, up to date as of 2017-08-29.

My issue is that when booting the laptop with a 'normal' kernel command line, the dGPU *never* turns off, even when it is not normally needed in desktop operations. This is confirmed by running powertop, which reports a power drain of ~36 W even under basically zero load. This is accompanied by various [powerplay] error messages in dmesg. As a side effect, the CPU is blocked from going to power states below pc2.

If I blacklist amdgpu in the kcl and then force the dGPU to off with acpi_call, the reported power consumption in powertop drops to ~12 W, with a corresponding increase in battery time. The CPU is now able to reach pc3.

Booting into Windows 10 also gives me the same battery time as blacklisting amdgpu in Linux, but also the expected 'on-demand-switching' of the dGPU that I expect from such a setup. This is just to confirm that this is not a hardware issue - it is definitely possible to dynamically switch the dGPU on or off from the OS level, the implementation is just botched in amdgpu.
Comment 1 Alex Deucher 2017-08-29 16:51:48 UTC
(In reply to taijian from comment #0)
> If I blacklist amdgpu in the kcl and then force the dGPU to off with
> acpi_call, the reported power consumption in powertop drops to ~12 W, with a
> corresponding increase in battery time. The CPU is now able to reach pc3.

What acpi call did you use?
Comment 2 taijian 2017-08-29 18:21:54 UTC
I followed the recommendations of this page: https://wiki.archlinux.org/index.php/Hybrid_graphics

The call working on my system is: echo "\\_SB.PCI0.PEG0.PEGP._OFF" > /proc/acpi/call

If I use this command on a system that does not have amdgpu blacklisted, however, this will lead to unstable system behaviour and a certain crash within ~5 min.
Comment 3 taijian 2017-09-04 17:25:53 UTC
Also, this might be related: https://bugzilla.kernel.org/show_bug.cgi?id=156341#c65
Comment 4 taijian 2017-09-28 14:06:16 UTC
Created attachment 134540 [details]
dmesg output with kernel 4.13.3
Comment 5 taijian 2017-09-28 17:57:01 UTC
OK, so I finally summoned to courage to decompile my laptop's DSDT and look at that to debug my ACPI problems - turns out that "Linux" just gets plain shafted by the firmware. I rebootet with 'acpi_osi=!* acpi_osi="Windows 2015"' and the problem disappeared. 

So, I'm sorry if I wasted anybody's time. I'll direct the rest of the powerplay bugs to a different topic.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.