summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoromega <omega@omg.(none)>2008-12-01 20:53:01 +0100
committeromega <omega@omg.(none)>2008-12-01 20:53:01 +0100
commit8987b25af7ceedda4d6477071a1bad440fb7d8ee (patch)
tree3537fefd4e8d03ee03d3c7d22903f2d56dbbd59f /scripts
parent1b1839907666b0bfc93420c666dcbcbb3c71e4c3 (diff)
downloadscripts-8987b25af7ceedda4d6477071a1bad440fb7d8ee.tar.gz
scripts-8987b25af7ceedda4d6477071a1bad440fb7d8ee.tar.bz2
Fixed code relative to compiz-check (autoupdate supported)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/compiz-check43
1 files changed, 30 insertions, 13 deletions
diff --git a/scripts/compiz-check b/scripts/compiz-check
index a0ea152..4b8ee81 100755
--- a/scripts/compiz-check
+++ b/scripts/compiz-check
@@ -12,7 +12,7 @@
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
-VERSION="0.4.4"
+VERSION="0.4.5"
usage()
{
@@ -249,12 +249,13 @@ detect_driver()
# nv driver blocks AIGLX
case $DRV in
vesa | vga | nv | openchrome)
- CHECKS=$SKIP
- SKIP_MESSAGE="$DRV driver in use"
- ERROR_MESSAGE="The $DRV driver is not capable of running Compiz, you need to install the\n proper driver for your graphics card."
- if [ "$DISTRIB_ID" = Ubuntu ]; then
- detect_driver_manager
- fi
+ CHECKS=$SKIP
+ SKIP_MESSAGE="$DRV driver in use"
+ ERROR_MESSAGE="The $DRV driver is not capable of running Compiz, you need to install the\n proper driver for your graphics card."
+ if [ "$DISTRIB_ID" = Ubuntu ]; then
+ detect_driver_manager
+ fi
+ ;;
esac
}
@@ -275,10 +276,12 @@ detect_rendering()
return 0
fi
+ AIGLX_STAT="AIGLX enabled\|AIGLX disabled"
+
if [ -z $XORG_LOG ] || [ ! -r $XORG_LOG ]; then
RENDER=$SKIPPING
return 1
- elif grep -q "AIGLX enabled" $XORG_LOG && ! grep -q "AIGLX disabled" $XORG_LOG ; then
+ elif grep "$AIGLX_STAT" $XORG_LOG | tail -1 | grep -q "AIGLX enabled" ; then
RENDER=AIGLX
return 0
fi
@@ -575,6 +578,7 @@ check_cmpst_xorg()
;;
Xfce)
EDITOR=mousepad
+ ;;
esac
if [ ! -z $COMPST_STAT ]; then
@@ -594,6 +598,17 @@ check_cmpst_xorg()
return 1
}
+# Check for Software Rasterizer
+check_rasterizer()
+{
+ if glxinfo 2>/dev/null | grep -q 'OpenGL renderer string: Software Rasterizer' ; then
+ ERROR="Software Rasterizer in use" #TODO add $ERROR_MESSAGE
+ return 0
+ else
+ return 1
+ fi
+}
+
DISCLAIMER="You can skip this blacklist -- but keep in mind that you did so.\n Do not complain if you encounter any problems with Compiz afterwards."
# Check if driver in use is on the whitelist
@@ -641,9 +656,11 @@ check_whitelist()
# PCI IDs that may be blacklist on certain distributions
# List taken from Gutsy
-BLACKLISTED_PCIIDS="1002:5954 1002:5854 1002:5955 1002:4153 8086:2982
- 8086:2992 8086:29a2 8086:2a02 8086:2a12 8086:2972
- 1002:3152 1002:3150 1002:5462 1002:5653"
+GUTSY_BLACKLIST="1002:5954 1002:5854 1002:5955 1002:4153 8086:2982 8086:2992
+ 8086:29a2 8086:2a02 8086:2a12 8086:2972 1002:3152 1002:3150
+ 1002:5462 1002:5653"
+# Blacklisted IDs on Intrepid
+BLACKLISTED_PCIIDS="$GUTSY_BLACKLIST 8086:1132 8086:2e02 8086:3577 8086:2562"
# My own private PCI IDs (added for testing reasons)
# Please let me know if I really was that stupid to let those in here.
@@ -683,7 +700,7 @@ check_xdg()
else
STATUS=$WARN
WARNING="No path to Compiz found."
- ERROR_MESSAGE="In case you did not compile Compiz manually, this will result in Compiz\n failing to run. The problem is presumably a result of you installing the\n proprietary fglrx driver manually or by script, which changed a certain\n config file to get itself on the whitelist."
+ ERROR_MESSAGE="In case you did not compile Compiz manually, this will result in Compiz\n failing to run."
if [ -d $XDG_COMPIZ ]; then
BACKUP=$(echo $(ls $XDG_COMPIZ | grep "compiz-manager\.") | awk '{print $1}')
fi
@@ -898,7 +915,7 @@ fi
printf " Checking for hardware/setup problems..."
if [ "$CHECKS" = yes ]; then
printf "%11s[${SKIPPING}]\n\n"
-elif check_compositor || check_laptop_ati || check_cmpst_xorg ; then
+elif check_compositor || check_laptop_ati || check_cmpst_xorg || check_rasterizer ; then
printf "%11s[${FAIL}]\n\n"
elif check_fglrx || check_whitelist || check_resolution || check_xdg || check_pciid || check_nvidia_mem ; then
printf "%11s[${STATUS}]\n\n"