Fix ON/OFF handling on recent ThinkPad t440p BIOS#102
Fix ON/OFF handling on recent ThinkPad t440p BIOS#102doudou wants to merge 2 commits intoBumblebee-Project:masterfrom
Conversation
This is very low noise, but helps a lot when things go wrong
|
You might want to read what I wrote in #112 because it might be that you're not getting all the power savings you should. |
|
@Lekensteyn Any thoughts on this patch? Maybe we could first ship it this way an tell people who want to that they can try it, and if no issue arise, either make it the default or mix it with current way of doing things (in case they are some corner cases for this new method). |
|
@Lekensteyn: as @smunaut noticed, my patch does fix the corruption issue, but the card is only put in D3 and not powered off, at least on recent Lenovo firmware versions. For that, one need to put the PCIe root in D3 (which Linux does not do automatically). @smunaut has a working hack that does it. |
|
Sorry for the delay, I could not give a meaningful response before. Now I looked into the details again and your (and @smunaut) observations are correct,
If I remember correctly, the |
|
Yes. This PR is obsolete now that we @smunaut found the real underlying issue. |
This pull request fixes the ON/OFF handling on Lenovo ThinkPad t440p with recent BIOSes. See the second half of the thread in #78 for the complete background.
The general idea is that with recent BIOSes, the call to _DSM does not switch the card OFF, the transition to D3 does. An end result is that the card's identity does not change in lspci and the current state detection method in bbswitch is broken (and the card cannot be turned back ON after it is OFF). This PR implements a different mode where the card state is inferred from the ACPI-reported power state. Set use_acpi_to_detect_card_state to 1 to use this new mode.