summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-drivers/ati-drivers/files')
-rw-r--r--x11-drivers/ati-drivers/files/ati-powermode-opt-path-2.patch42
-rw-r--r--x11-drivers/ati-drivers/files/atieventsd.init20
-rw-r--r--x11-drivers/ati-drivers/files/switchlibGL61
3 files changed, 123 insertions, 0 deletions
diff --git a/x11-drivers/ati-drivers/files/ati-powermode-opt-path-2.patch b/x11-drivers/ati-drivers/files/ati-powermode-opt-path-2.patch
new file mode 100644
index 0000000..f5a35a3
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-powermode-opt-path-2.patch
@@ -0,0 +1,42 @@
+diff -ur common.orig/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh
+--- common.orig/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2006-07-28 04:22:36.000000000 +0100
++++ common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh 2006-08-04 12:19:42.000000000 +0100
+@@ -4,6 +4,8 @@
+ # Control script for ACPI lid state and AC adapter state
+ #
+
++aticonfig='/opt/bin/aticonfig'
++
+ getXuser() {
+ user=`finger| grep -m1 ":$displaynum " | awk '{print $1}'`
+ if [ x"$user" = x"" ]; then
+@@ -47,7 +49,7 @@
+ done
+
+ #If PPLIB is enabled
+-su $user -c '/usr/bin/aticonfig --pplib-cmd="get version"' | grep PPLIB
++su $user -c '$aticonfig --pplib-cmd="get version"' | grep PPLIB
+ if [ $? = 0 ]; then
+ echo "Has PPLIB"
+ has_pplib=1
+@@ -61,15 +63,15 @@
+ if [ ${lid_closed} -eq 1 -o ${on_dc} -eq 1 ]; then
+ echo "Low power"
+ if [ ${has_pplib} -eq 1 ]; then
+- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc dc"'
++ su $user -c '$aticonfig --pplib-cmd="notify psrc dc"'
+ else
+- su $user -c "/usr/bin/aticonfig --set-powerstate=1 --effective=now"
++ su $user -c "$aticonfig --set-powerstate=1"
+ fi
+ else
+ echo "high power"
+ if [ ${has_pplib} -eq 1 ]; then
+- su $user -c '/usr/bin/aticonfig --pplib-cmd="notify psrc ac"'
++ su $user -c '$aticonfig --pplib-cmd="notify psrc ac"'
+ else
+- su $user -c "/usr/bin/aticonfig --set-powerstate=3 --effective=now"
++ su $user -c "$aticonfig --set-powerstate=$($aticonfig --lsp | grep 'default state' | cut -c 3)"
+ fi
+ fi
+
diff --git a/x11-drivers/ati-drivers/files/atieventsd.init b/x11-drivers/ati-drivers/files/atieventsd.init
new file mode 100644
index 0000000..73139ce
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/atieventsd.init
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/files/atieventsd.init,v 1.3 2007/05/18 23:58:01 marienz Exp $
+
+depend() {
+ need acpid
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /opt/sbin/atieventsd -- ${ATIEVENTSDOPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --exec /opt/sbin/atieventsd
+ eend $?
+} \ No newline at end of file
diff --git a/x11-drivers/ati-drivers/files/switchlibGL b/x11-drivers/ati-drivers/files/switchlibGL
new file mode 100644
index 0000000..a6aa4fc
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/switchlibGL
@@ -0,0 +1,61 @@
+#!/bin/bash
+# switchlibGL
+#
+# Copyright (c) 2011 Advanced Micro Devices, Inc.
+#
+# Purpose:
+# For switch between AMD and Intel graphic driver library.
+#
+# Usage:
+# switchlibGL amd|intel|query
+# amd: switches to the AMD version of libGL.
+# intel: switches to the open-source version of libGL .
+# query: checks, which version is currently active and prints either "amd"
+# or "intel" or "unknown" on the standard output.
+# must be root to execute this script
+
+ARCH=`uname -m`
+E_ERR=1
+
+# Check if root
+if [ "`whoami`" != "root" ]; then
+ echo "Must be root to run this script." 1>&2
+ exit $E_ERR
+fi
+
+# One parameter
+if [ $# -ne 1 ]; then
+ echo "Usage: `basename $0` amd|intel|query " 1>&2
+ echo "Please choose one parameter " 1>&2
+ exit $E_ERR
+fi
+
+current=$(eselect opengl show)
+# Switch to right mode
+case "$1" in
+ "amd" )
+ if [ $current != ati ] ; then
+ eselect opengl set ati || return 1
+ fi
+ ;;
+ "intel" )
+ if [ $current != xorg-x11 ] ; then
+ eselect opengl set xorg-x11 || return 1
+ fi
+ ;;
+ "query" )
+ case "$current" in
+ "ati" )
+ echo "amd"
+ ;;
+ "xorg-x11" )
+ echo "intel"
+ ;;
+ esac
+ ;;
+ * ) echo "Usage: `basename $0` amd|intel|query" 1>&2; exit $E_ERR;;
+ # other than amd|intel|query parameter report an error
+esac
+
+# A zero return value from the script upon exit indicates success.
+exit 0