Just in case the integrated video ACPI handle cannot be found. This is a safety
net for those who try bbswitch on an incompatible machine. I do not know any of
such machinees, but it looks good.
Since the following commit, the device would not turn off because the power
state is unknown. Until a fix is released in Linux (or until I know what
better to do), I just assume the power state D0.
commit ddc150f7a33ae0c9cb16eaac3641abc00f56316f
Author: Lv Zheng <lv.zheng@intel.com>
Date: Fri Nov 16 02:46:28 2012 +0100
ACPI / PM: Add check preventing transitioning to non-D0 state from D3.
No power transitioning from D3 state up to a non-D0 state is allowed
so make acpi_device_set_power() fail and complain if such a transition
is attempted.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This should finally support machines like the Lenovo Y570. WMMX methods should
be more reliable than direct DSM probing so let's try that before calling DSM
directly.
This should support at least the Lenovo Ideapad Y470 and Y570. It probes the
WMMX method before calling the _DSM method directly since that method should
work for all machines that support the NVIDIA DSM.
Newer Optimus laptops seems to use a _DSM method which is quite standard. This
is referred to as "Optimus DSM" in some DSDT files and must be called before the
discrete nVidia graphics card is turned off. Other (older?) laptops use a
different UUID, revision ID and arguments which actually enables or disables a
device. The right _DSM arguments is detected during the module initialization.