Bug 91408 - Lenovo T440s alternate way to turn off discrete GPU
Summary: Lenovo T440s alternate way to turn off discrete GPU
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-20 20:52 UTC by Sylvain Munaut
Modified: 2016-08-24 14:03 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
DSDT of T440s (575.70 KB, text/plain)
2015-07-20 20:55 UTC, Sylvain Munaut
no flags Details

Description Sylvain Munaut 2015-07-20 20:52:40 UTC
The lenovo T440s BIOS handles the discret NVIDIA card power managemement differently when the kernel advertise "Windows 2013" (since 3.15) or "Windows 2015" (since 4.2) OSI strings.

Calling the HSM then setting the device to D3 doesn't cause any errors and it _does_ lower the power usage, but not as much as it should. (about 1W vs 2.5W before 3.15). This means user might not notice the issue ...

Using acpi_osi="!Windows 2013" acpi_osi="!Windows 2015" in the kernel command line does allow the old method to work, however the user needs to manually do this and also new OSI strings keep being added in the kernel and so this might silently re-break in the future.

The dump of the DSDT tables in the latest (as of today) BIOS of the T440s is available there : http://pastebin.com/raw.php?i=C6Q3A8aa

The important changes to note when "Windows 2013" is in the osi string:
 - OSYS is set to 0x07DD.
 - This in turn cause VMSH to be set to 1.
 - This in turn causes _SB_.PCI0.PEG_.VID_.PS3 to _NOT call GPOF when the device is set to D3.
 - and so the card is never really turned off completely

Now if you look at how GPOF can be called, you can see it will be called as part of NVP3 power resource which is PR3 ... but on the node _SB.PCI0.PEG_ and not _SB_.PCI0.PEG_.VID_ !

So this means that the parent PCIe root port the card is connected to needs to be put in D3.

I did a quick hack using bumblebee (easier to try stuff out) to test and this indeed seems to work. I was able to observe the 2.5W power drop as expected and freely able to turn the card on & off.
Comment 1 Sylvain Munaut 2015-07-20 20:55:11 UTC
Created attachment 117267 [details]
DSDT of T440s
Comment 2 Peter Wu 2016-08-24 14:03:07 UTC
Fixed in Linux v4.8-rc1

commit 692a17dcc2922a91c6bcf11b3321503a3377b1b1
Author: Peter Wu <peter@lekensteyn.nl>
Date:   Fri Jul 15 15:12:18 2016 +0200

    drm/nouveau/acpi: fix lockup with PCIe runtime PM

Can you validate this?


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.