Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 24 lines (22 sloc) 0.592 kb
259b699 @awilliam asus-switcher: push suspend/resume script out to it's own file
authored
1 #!/bin/sh
2 #
3 # When we wakeup from suspend, both devices are turned on. This causes
4 # unexpected power draw and confusines switcheroo. Turn the unused device
5 # back on before suspend and off after resume some everyone is in sync.
6
7 case "$1" in
8 suspend|hibernate)
9 if [ -e /sys/kernel/debug/vgaswitcheroo/switch ]; then
10 echo ON > /sys/kernel/debug/vgaswitcheroo/switch
11 fi
12 exit 0
13 ;;
14 resume|thaw)
15 if [ -e /sys/kernel/debug/vgaswitcheroo/switch ]; then
16 echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
17 fi
18 exit 0
19 ;;
20 *)
21 echo "Usage $0 {suspend|hibernate|resume|thaw}"
22 exit 1
23 esac
Something went wrong with that request. Please try again.