hybrid-graphics-linux team mailing list archive
-
hybrid-graphics-linux team
-
Mailing list archive
-
Message #00647
Re: acpi_call on Lenovo IdeaPad Z360 - solved
Hi all,
I've repeated on my Lenovo Z360 the test Daniel did. The results are below.
I have just one question:
after I turn NVIDIA off, I can type something in Terminal but I can't move the mouse - everything becomes frozen :( how I can deal with it?
Thank you!
Cherep
alex@Berlin:~/Downloads/acpi_call$ cat /proc/acpi/battery/BAT1/state
present: yes
capacity state: ok
charging state: discharging
present rate: 1740 mA
remaining capacity: 1440 mAh
present voltage: 10439 mV
alex@Berlin:~/Downloads/acpi_call$ acpi -V
Battery 0: Discharging, 31%, 00:48:38 remaining
Battery 0: design capacity 4752 mAh, last full capacity 4561 mAh = 95%
Adapter 0: off-line
Thermal 0: ok, 39.0 degrees C
Thermal 0: trip point 0 switches to mode critical at temperature 105.0 degrees C
Thermal 0: trip point 1 switches to mode passive at temperature 103.0 degrees C
Cooling 0: Processor 0 of 10
Cooling 1: Processor 0 of 10
Cooling 2: Processor 0 of 10
Cooling 3: Processor 0 of 10
alex@Berlin:~/Downloads/acpi_call$ ./lenovoZ360.sh
Usage: ./lenovoZ360.sh [on|off]
P3MO 0x0
DGPS 0x0
_PSC 0x0
Lenovo Z360 Optimus appears to be on
alex@Berlin:~/Downloads/acpi_call$ ./lenovoZ360.sh off
_DSM {0x19, 0x00, 0x00, 0x01}
_PS3 0x3
P3MO 0x0
DGPS 0x1
_PSC 0x3
Lenovo Z360 Optimus appears to be off
alex@Berlin:~/Downloads/acpi_call$ cat /proc/acpi/battery/BAT1/state
present: yes
capacity state: ok
charging state: discharging
present rate: 1412 mA
remaining capacity: 1424 mAh
present voltage: 10501 mV
alex@Berlin:~/Downloads/acpi_call$ acpi -V
Battery 0: Discharging, 31%, 01:01:30 remaining
Battery 0: design capacity 4752 mAh, last full capacity 4561 mAh = 95%
Adapter 0: off-line
Thermal 0: ok, 39.0 degrees C
Thermal 0: trip point 0 switches to mode critical at temperature 105.0 degrees C
Thermal 0: trip point 1 switches to mode passive at temperature 103.0 degrees C
Cooling 0: Processor 0 of 10
Cooling 1: Processor 0 of 10
Cooling 2: Processor 0 of 10
Cooling 3: Processor 0 of 10
alex@Berlin:~/Downloads/acpi_call$ ./lenovoZ360.sh on
_PS0 0x0
P3MO 0x0
DGPS 0x0
_PSC 0x0
Lenovo Z360 Optimus appears to be on
alex@Berlin:~/Downloads/acpi_call$ cat /proc/acpi/battery/BAT1/state
present: yes
capacity state: ok
charging state: discharging
present rate: 1725 mA
remaining capacity: 1398 mAh
present voltage: 10417 mV
alex@Berlin:~/Downloads/acpi_call$ acpi -V
Battery 0: Discharging, 30%, 00:47:45 remaining
Battery 0: design capacity 4752 mAh, last full capacity 4561 mAh = 95%
Adapter 0: off-line
Thermal 0: ok, 39.0 degrees C
Thermal 0: trip point 0 switches to mode critical at temperature 105.0 degrees C
Thermal 0: trip point 1 switches to mode passive at temperature 103.0 degrees C
Cooling 0: Processor 0 of 10
Cooling 1: Processor 0 of 10
Cooling 2: Processor 0 of 10
Cooling 3: Processor 0 of 10
lenovoZ360.sh is as follows (basically it is "asus1215n.sh" with parameters from Daniel):
if ! lsmod | grep -q acpi_call; then
echo "Error: acpi_call module not loaded"
exit
fi
acpi_call () {
echo "$*" > /proc/acpi/call
cat /proc/acpi/call
}
case "$1" in
off)
echo _DSM $(acpi_call "\_SB.PCI0.P0P2.PEGP._DSM" \
"{0xF8,0xD8,0x86,0xA4,0xDA,0x0B,0x1B,0x47," \
"0xA7,0x2B,0x60,0x42,0xA6,0xB5,0xBE,0xE0}" \
"0x0100 0x1A {0x1,0x0,0x0,0x3}")
# ok to turn off: Buffer {0x59 0x0 0x0 0x11}
# is already off: Buffer {0x41 0x0 0x0 0x11}
echo _PS3 $(acpi_call "\_SB.PCI0.P0P2.PEGP._PS3")
;;
on)
echo _PS0 $(acpi_call "\_SB.PCI0.P0P2.PEGP._PS0")
;;
*)
echo "Usage: $0 [on|off]"
esac
echo P3MO $(acpi_call "\_SB.PCI0.P0P2.PEGP.P3MO")
echo DGPS $(acpi_call "\_SB.PCI0.P0P2.PEGP.DGPS")
PSC=$(acpi_call "\_SB.PCI0.P0P2.PEGP._PSC")
echo _PSC ${PSC}
case "$PSC" in
0x0)
PSC="on"
;;
0x3)
PSC="off"
;;
esac
echo "Lenovo Z360 Optimus appears to be ${PSC}"
Fri, 18 Feb 2011 21:41:15 +0100 письмо от Daniel <daniel@xxxxxxxxxxxxx>:
> Hello
>
> After some fiddling around with parameters in my DSDT and trying to
> understand what peberlein did to get it working with a Asus eeepc 1215n
> ( ==>
> http://linux-hybrid-graphics.blogspot.com/2010/10/calling-acpicall-with-parameters.html
> THANKS! ) I think that I have finally managed to switch off the Optimus
> Graphics on my Lenovo Z360.
>
> As with the 1215n, acpi_call needs to be called twice:
>
> The first call is to \_SB.PCI0.P0P2.PEGP._DSM with 4 arguments:
>
> arg0: {0xF8,0xD8,0x86,0xA4,0xDA,0x0B,0x1B,0x47,0xA7,
> 0x2B,0x60,0x42,0xA6,0xB5,0xBE,0xE0}
> arg1: 0x0100
> arg2: 0x1A
> arg3: {0x1,0x0,0x0,0x3}
>
> I don't know if it is really necessary for arg3 to have exactly these
> four values. Looking at the DSDT it seems as if any values could be
> passed to arg3, they aren't even checked in the code (I think...). But
> who cares, it works for me with those values.
>
> The second call is to \_SB.PCI0.P0P2.PEGP._PS3 and doesn't need any
> arguments. This will switch off the Optimus part.
> If one wants to restart the discrete graphics chip, one has to call
> \_SB.PCI0.P0P2.PEGP._PS0.
>
> Ok, short form - switch off your Optimus graphics like this:
>
> echo "\_SB.PCI0.P0P2.PEGP._DSM
> {0xF8,0xD8,0x86,0xA4,0xDA,0x0B,0x1B,0x47,0xA7,0x2B,0x60,0x42,0xA6,0xB5,0xBE,0xE0}
> 0x0100 0x1A {0x1,0x0,0x0,0x3}" > /proc/acpi/call
>
> echo "\_SB.PCI0.P0P2.PEGP._PS3" > proc/acpi/call
>
> And back on like this:
>
> echo "\_SB.PCI0.P0P2.PEGP._PS0" > /proc/acpi/call
>
> By the way, the Z360 does not have a hardware switch built in, so
> no nvidia graphics on linux. But at least power management is
> optimized...
>
> good luck,
> Daniel
>
> _______________________________________________
> Mailing list: https://launchpad.net/~hybrid-graphics-linux
> Post to : hybrid-graphics-linux@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~hybrid-graphics-linux
> More help : https://help.launchpad.net/ListHelp
References