[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 1.1.0-beta.1-25-gffd4101
Darren Salt
linux at youmustbejoking.demon.co.uk
Mon Jun 15 22:39:17 UTC 2009
The following commit has been merged in the master branch:
commit 17725af45e40cf5c1c836c0c76eb540a2e83b3c1
Author: Santi Béjar <santi at agolina.net>
Date: Sun Jun 14 00:20:11 2009 +0200
When KMS (kernel mode setting) is used the output names have
a number in the end (VGA1 and LVDS1).
diff --git a/debian/changelog b/debian/changelog
index 08b96be..9f1099f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,6 +24,10 @@ eeepc-acpi-scripts (1.1.1) unstable; urgency=low
[ Tanguy Ortolo ]
* Fix "[ -e $foo ]" where foo may be empty. (Closes: #532631)
+ [ Santi Béjar]
+ * Add support for KMS in vga-toggle: when KMS (kernel mode setting) is
+ used the output names have a number in the end (VGA1 and LVDS1).
+
-- Darren Salt <linux at youmustbejoking.demon.co.uk> Mon, 25 May 2009 11:25:50 +0100
eeepc-acpi-scripts (1.1.0) unstable; urgency=low
diff --git a/etc/acpi/actions/vga-toggle.sh b/etc/acpi/actions/vga-toggle.sh
index 4321520..cf34456 100755
--- a/etc/acpi/actions/vga-toggle.sh
+++ b/etc/acpi/actions/vga-toggle.sh
@@ -10,8 +10,14 @@ if [ -e "$DEFAULT" ]; then . "$DEFAULT"; fi
. $FUNC_LIB
# return: 0 on disconnect, 1 on connected vga, 2 else
+# set VGA (and LVDS) to the output name, VGA or VGA1 (LVDS or LVDS1)
getvga_status(){
- STATUS=$( xrandr -q | grep VGA | cut -d ' ' -f 2,3 )
+ STATUSLINE=$( xrandr -q | grep VGA)
+ STATUS=$( echo $STATUSLINE | cut -d ' ' -f 2,3 )
+ VGA=$( echo $STATUSLINE | cut -d ' ' -f 1 )
+ # To not call xrandr again
+ NUM=${VGA##VGA}
+ LVDS=LVDS$NUM
case "$STATUS" in
disconnected*)
return 0
@@ -30,9 +36,9 @@ getvga_status;
# handle return value
case $? in
1)
- xrandr --output VGA ${VGA_ON:---auto} --output LVDS ${LVDS_OFF:---off}
+ xrandr --output $VGA ${VGA_ON:---auto} --output $LVDS ${LVDS_OFF:---off}
;;
*)
- xrandr --output VGA --off --output LVDS --auto
+ xrandr --output $VGA --off --output $LVDS --auto
esac
--
Maintenance of eeepc-acpi-scripts debian package
More information about the Debian-eeepc-commits
mailing list