{"action":"created","issue":{"url":"https://api.github.com/repos/Bumblebee-Project/bbswitch/issues/112","labels_url":"https://api.github.com/repos/Bumblebee-Project/bbswitch/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/Bumblebee-Project/bbswitch/issues/112/comments","events_url":"https://api.github.com/repos/Bumblebee-Project/bbswitch/issues/112/events","html_url":"https://github.com/Bumblebee-Project/bbswitch/issues/112","id":96151927,"number":112,"title":"T440s with kernel >= 3.15 doesn't power off properly  (Analysis and possible solution included !)","user":{"login":"smunaut","id":129013,"avatar_url":"https://avatars.githubusercontent.com/u/129013?v=3","gravatar_id":"","url":"https://api.github.com/users/smunaut","html_url":"https://github.com/smunaut","followers_url":"https://api.github.com/users/smunaut/followers","following_url":"https://api.github.com/users/smunaut/following{/other_user}","gists_url":"https://api.github.com/users/smunaut/gists{/gist_id}","starred_url":"https://api.github.com/users/smunaut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smunaut/subscriptions","organizations_url":"https://api.github.com/users/smunaut/orgs","repos_url":"https://api.github.com/users/smunaut/repos","events_url":"https://api.github.com/users/smunaut/events{/privacy}","received_events_url":"https://api.github.com/users/smunaut/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":33,"created_at":"2015-07-20T20:26:08Z","updated_at":"2015-10-08T10:44:24Z","closed_at":null,"body":"Hi,\r\n\r\nSo I'm using a T440s with a modern kernel that reports \"Windows 2013\" compatibility (and soon Windows 2015 with kernel 4.2). This breaks bbswitch because of some changes this triggers in the ACPI table. Manually overriding acpi_osi does fix the issue and allow the current bbswitch to work, but what I'm looking it here is how to make it work with the \"new\" Win 8.1 method of shutting down the card.\r\n\r\nSo the main symptoms of the issue are :\r\n\r\n * Using vanilla bbswith : Switching OFF does put it to D3, but it's not entirely off. The power usage is lower but not as low as it should be (in my case, about 1W lower than full power while it should be more like 2.5W). Also, bbswith reports the card as \"ON\" because lspci still works fine and you can still access the config space. There is no way to turn the card back ON and so loading nvidia driver will actually crash trying to access a card that's only half powered.\r\n\r\n * Using the bbswitch patched like in PR #102 . This is the same effect, power down is not complete and you only save 1W instead of 2.5W. But at least you can turn the card ON and OFF properly. But once nvidia has been loaded, then it won't switch off at all ....\r\n\r\nThis is the DSDT table from the T440s with the latest bios (which even has Windows 10 support) : \r\nhttp://pastebin.com/raw.php?i=C6Q3A8aa\r\n\r\nThe important thing to note is that when \"Windown 2013\" string is found, then 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 ... and so the card is never really turned off completely.\r\n\r\nNow 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_ !\r\n\r\nSo basically you need to put the PCIe root port (parent pci device) in D3 and not just the card.\r\n\r\nI tested this and it indeed triggered the proper expected power saving and seemed to behave exactly like if I tweaked acpi_osi.\r\n"},"comment":{"url":"https://api.github.com/repos/Bumblebee-Project/bbswitch/issues/comments/146497632","html_url":"https://github.com/Bumblebee-Project/bbswitch/issues/112#issuecomment-146497632","issue_url":"https://api.github.com/repos/Bumblebee-Project/bbswitch/issues/112","id":146497632,"user":{"login":"Lacrymology","id":766808,"avatar_url":"https://avatars.githubusercontent.com/u/766808?v=3","gravatar_id":"","url":"https://api.github.com/users/Lacrymology","html_url":"https://github.com/Lacrymology","followers_url":"https://api.github.com/users/Lacrymology/followers","following_url":"https://api.github.com/users/Lacrymology/following{/other_user}","gists_url":"https://api.github.com/users/Lacrymology/gists{/gist_id}","starred_url":"https://api.github.com/users/Lacrymology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lacrymology/subscriptions","organizations_url":"https://api.github.com/users/Lacrymology/orgs","repos_url":"https://api.github.com/users/Lacrymology/repos","events_url":"https://api.github.com/users/Lacrymology/events{/privacy}","received_events_url":"https://api.github.com/users/Lacrymology/received_events","type":"User","site_admin":false},"created_at":"2015-10-08T10:44:24Z","updated_at":"2015-10-08T10:44:24Z","body":"I know next to nothing about hardware handling, but isn't there a flag or\nid that can be read to make this if-able? I guess it'd come down to a\nwhitelist if it's to be automatable, but I'm thinking it could be made a\nmodule parameter\n"}}