Skip to content
This repository
Browse code

Added Asus 1215n files by Pete Eberlein forgotten in manual merge.

  • Loading branch information...
commit fda3afe87f434cf1611ed1fe5b2fe26b554319e5 1 parent 9da5be8
Michal Kottman authored March 03, 2011

Showing 2 changed files with 75 additions and 0 deletions. Show diff stats Hide diff stats

  1. 48  asus1215n.sh
  2. 27  m11xr2.sh
48  asus1215n.sh
... ...
@@ -0,0 +1,48 @@
  1
+#!/bin/sh
  2
+# Power control for Asus 1215N Optimus
  3
+# by Pete Eberlein
  4
+
  5
+if ! lsmod | grep -q acpi_call; then
  6
+    echo "Error: acpi_call module not loaded"
  7
+    exit
  8
+fi
  9
+
  10
+acpi_call () {
  11
+    echo "$*" > /proc/acpi/call
  12
+    cat /proc/acpi/call
  13
+}
  14
+
  15
+
  16
+case "$1" in
  17
+off)
  18
+    echo _DSM $(acpi_call "\_SB.PCI0.P0P4.GFX0._DSM" \
  19
+	"{0xF8,0xD8,0x86,0xA4,0xDA,0x0B,0x1B,0x47," \
  20
+	 "0xA7,0x2B,0x60,0x42,0xA6,0xB5,0xBE,0xE0}" \
  21
+	 "0x100 0x1A {0x1,0x0,0x0,0x3}")
  22
+	# ok to turn off: Buffer {0x59 0x0 0x0 0x11}
  23
+	# is already off: Buffer {0x41 0x0 0x0 0x11}
  24
+    echo _PS3 $(acpi_call "\_SB.PCI0.P0P4.GFX0._PS3")
  25
+;;
  26
+on)
  27
+    echo _PS0 $(acpi_call "\_SB.PCI0.P0P4.GFX0._PS0")
  28
+;;
  29
+*)
  30
+    echo "Usage: $0 [on|off]"
  31
+esac
  32
+
  33
+
  34
+echo P3MO $(acpi_call "\_SB.PCI0.P0P4.GFX0.P3MO")
  35
+echo DGPS $(acpi_call "\_SB.PCI0.P0P4.GFX0.DGPS")
  36
+PSC=$(acpi_call "\_SB.PCI0.P0P4.GFX0._PSC")
  37
+echo _PSC ${PSC}
  38
+case "$PSC" in
  39
+0x0)
  40
+    PSC="on"
  41
+;;
  42
+0x3)
  43
+    PSC="off"
  44
+;;
  45
+esac
  46
+echo "Asus 1215N Optimus appears to be ${PSC}"
  47
+
  48
+
27  m11xr2.sh
... ...
@@ -0,0 +1,27 @@
  1
+#!/bin/sh
  2
+# Based on m11xr2hack by George Shearer
  3
+
  4
+if ! lsmod | grep -q acpi_call; then
  5
+    echo "Error: acpi_call module not loaded"
  6
+    exit
  7
+fi
  8
+
  9
+acpi_call () {
  10
+    echo "$*" > /proc/acpi/call
  11
+    cat /proc/acpi/call
  12
+}
  13
+
  14
+
  15
+case "$1" in
  16
+off)
  17
+    echo NVOP $(acpi_call "\_SB.PCI0.P0P2.PEGP.NVOP 0 0x100 0x1A {255,255,255,255}")
  18
+    echo _PS3 $(acpi_call "\_SB.PCI0.P0P2.PEGP._PS3")
  19
+;;
  20
+on)
  21
+    echo _PS0 $(acpi_call "\_SB.PCI0.P0P2.PEGP._PS0")
  22
+;;
  23
+*)
  24
+    echo "Usage: $0 [on|off]"
  25
+;;
  26
+esac
  27
+

0 notes on commit fda3afe

Please sign in to comment.
Something went wrong with that request. Please try again.