Difference between revisions of "Talk:Fglrx"

From ThinkWiki
Jump to: navigation, search
(update script)
Line 39: Line 39:
  
 
if [ x"$XAUTHORITY" != x"" ]; then
 
if [ x"$XAUTHORITY" != x"" ]; then
         CURRENT=`aticonfig --query-monitor | grep Enabled | cut -b 21-`
+
 
        case $CURRENT in
+
         CURRENT=`aticonfig --query-monitor | grep Enabled | cut -b 21- | \
                lvds)
+
                        sed -e 's/lvds/LCD/g' -e 's/crt1/CRT/g' -e 's/tv/TV-Out/g' -e 's/,/ and/g'`
                        CURRENT="LCD only"
+
                        ;;
+
                crt1)
+
                        CURRENT="CRT only"
+
                        ;;
+
                lvds,\ crt1)
+
                        CURRENT="LCD and CRT"
+
                        ;;
+
                tv)
+
                        CURRENT="TV-Out only"
+
                        ;;
+
                lvds,\ tv)
+
                        CURRENT="LCD and TV-Out"
+
                        ;;
+
                crt1,\ tv)
+
                        CURRENT="CRT and TV-Out"
+
                        ;;
+
        esac
+
  
 
         CHOICE=`su $user -c "zenity --width=300 --height=350 --window-icon=/usr/share/pixmaps/ati.xpm \
 
         CHOICE=`su $user -c "zenity --width=300 --height=350 --window-icon=/usr/share/pixmaps/ati.xpm \
        --title 'Video output switcher' \
+
                --title 'Video output switcher' \
        --text='Choose the video output\n\nCurrent setting: $CURRENT\n' \
+
                --text='Choose the video output\n\nCurrent setting: $CURRENT\n' \
        --list --radiolist --column 'x' --column 'video output' \
+
                --list --radiolist --column 'x' --column 'video output' \
        true 'LCD only' \
+
                true 'LCD' \
        false 'CRT only' \
+
                false 'CRT' \
        false 'LCD and CRT' \
+
                false 'TV-Out' \
        false 'TV-Out only' \
+
                false 'LCD and CRT' \
        false 'LCD and TV-Out' \
+
                false 'LCD and TV-Out' \
        false 'CRT and TV-Out'"`
+
                false 'CRT and TV-Out'"`
 +
 
 
fi
 
fi
  
 
case $CHOICE in
 
case $CHOICE in
         LCD\ only)
+
         LCD)
 
                 change_monitor lvds
 
                 change_monitor lvds
 
                 change_resolution 1400 1050
 
                 change_resolution 1400 1050
 
                 ;;
 
                 ;;
         CRT\ only)
+
         CRT)
 
                 change_monitor crt1
 
                 change_monitor crt1
 
                 change_resolution 1280 1024
 
                 change_resolution 1280 1024
 +
                ;;
 +
        TV-Out)
 +
                change_monitor tv
 +
                change_resolution 1024 768
 
                 ;;
 
                 ;;
 
         LCD\ and\ CRT)
 
         LCD\ and\ CRT)
 
                 change_monitor lvds,crt1
 
                 change_monitor lvds,crt1
 
                 change_resolution 1280 1024
 
                 change_resolution 1280 1024
                ;;
 
        TV-Out\ only)
 
                change_monitor tv
 
                change_resolution 1024 768
 
 
                 ;;
 
                 ;;
 
         LCD\ and\ TV-Out)
 
         LCD\ and\ TV-Out)

Revision as of 16:48, 29 May 2006

So, I'm searching up and down and there seems to be no way to enable the TV output without an ad-hoc xorg.conf. So my question is, what is fireglcontrolpanel useful for?

--Micampe 21:39, 14 Dec 2005 (CET)

Hi, I wrote a shell script for display switching. I use it under Ubuntu Dapper Drake. As I don't have a CRT, any feedback is welcome.

Create /etc/acpi/events/ibm-videobtn:

# /etc/acpi/events/ibm-videobtn
# This is called when the user presses the video button.

event=ibm/hotkey HKEY 00000080 00001007
action=/etc/acpi/ibm-video.sh

Create /etc/acpi/ibm-video.sh with permissions 755:

#!/bin/sh

. /etc/default/acpi-support
. /usr/share/acpi-support/power-funcs

getXconsole;

change_resolution() {
        if [ x"$XAUTHORITY" != x"" ]; then
                if [ x"`xrandr -q | grep $1[[:space:]]x[[:space:]]$2 | cut -b -1`" != x"*" ]; then
                        xrandr -d $DISPLAY -s $1x$2
                fi
        fi
}

change_monitor() {
        if [ x"$XAUTHORITY" != x"" ]; then
                su $user -c "aticonfig --enable-monitor=$1" &>/dev/null
        fi
}

if [ x"$XAUTHORITY" != x"" ]; then

        CURRENT=`aticonfig --query-monitor | grep Enabled | cut -b 21- | \
                        sed -e 's/lvds/LCD/g' -e 's/crt1/CRT/g' -e 's/tv/TV-Out/g' -e 's/,/ and/g'`

        CHOICE=`su $user -c "zenity --width=300 --height=350 --window-icon=/usr/share/pixmaps/ati.xpm \
                --title 'Video output switcher' \
                --text='Choose the video output\n\nCurrent setting: $CURRENT\n' \
                --list --radiolist --column 'x' --column 'video output' \
                true 'LCD' \
                false 'CRT' \
                false 'TV-Out' \
                false 'LCD and CRT' \
                false 'LCD and TV-Out' \
                false 'CRT and TV-Out'"`

fi

case $CHOICE in
        LCD)
                change_monitor lvds
                change_resolution 1400 1050
                ;;
        CRT)
                change_monitor crt1
                change_resolution 1280 1024
                ;;
        TV-Out)
                change_monitor tv
                change_resolution 1024 768
                ;;
        LCD\ and\ CRT)
                change_monitor lvds,crt1
                change_resolution 1280 1024
                ;;
        LCD\ and\ TV-Out)
                change_monitor lvds,tv
                change_resolution 1024 768
                ;;
        CRT\ and\ TV-Out)
                change_monitor crt1,tv
                change_resolution 1024 768
                ;;
esac

--Whoopie 16:28, 25 May 2006 (CEST)


Finally! With 8.25.18 stopping gdm no longer oopses my kernel and I can reboot cleanly. sus2ram runs smoothly as well. All hail!

--igorr Thu May 25 18:19:30 CEST 2006