# /.../ # SaX generated X11 config file # Created on: 2007-10-26T23:45:40+0700. # # Version: 8.1 # Contact: Marcus Schaefer , 2005 # Contact: SaX-User list # # Automatically generated by [ISaX] (8.1) # PLEASE DO NOT EDIT THIS FILE! # Section "Files" InputDevices "/dev/gpmdata" InputDevices "/dev/input/mice" FontPath "/usr/share/fonts/misc:unscaled" FontPath "/usr/share/fonts/75dpi:unscaled" FontPath "/usr/share/fonts/100dpi:unscaled" FontPath "/usr/share/fonts/Type1" FontPath "/usr/share/fonts/URW" FontPath "/usr/share/fonts/Speedo" FontPath "/usr/share/fonts/cyrillic" FontPath "/usr/share/fonts/truetype" FontPath "/usr/share/fonts/uni:unscaled" FontPath "/usr/share/fonts/misc/sgi:unscaled" FontPath "/opt/kde3/share/fonts" FontPath "/usr/local/share/fonts" EndSection Section "ServerFlags" Option "AllowMouseOpenFail" "on" Option "IgnoreABI" "on" Option "AIGLX" "true" EndSection Section "Module" Load "dbe" Load "type1" Load "freetype" Load "extmod" Load "glx" Load "v4l" Load "dri" EndSection Section "InputDevice" Driver "kbd" Identifier "Keyboard[0]" Option "Protocol" "Standard" Option "XkbLayout" "us" Option "XkbModel" "microsoftpro" Option "XkbRules" "xfree86" EndSection Section "InputDevice" Driver "mouse" Identifier "Mouse[1]" Option "Buttons" "5" Option "Device" "/dev/input/mice" Option "Name" "ImPS/2 Logitech Wheel Mouse" Option "Protocol" "explorerps/2" Option "Vendor" "Sysp" Option "ZAxisMapping" "4 5" EndSection Section "Monitor" Option "CalcAlgorithm" "XServerPool" DisplaySize 710 265 HorizSync 30-96 Identifier "Monitor[0]" ModelName "M991" Option "DPMS" VendorName "DELL" VertRefresh 50-160 UseModes "Modes[0]" EndSection Section "Modes" Identifier "Modes[0]" # Modeline "1024x768" 94 1024 1072 1168 1376 768 769 772 808 -hsync -vsync EndSection Section "Screen" DefaultDepth 24 SubSection "Display" Depth 15 Modes "1024x768" "800x600" EndSubSection SubSection "Display" Depth 16 Modes "1024x768" "800x600" EndSubSection SubSection "Display" Depth 24 Modes "1024x768" "800x600" EndSubSection SubSection "Display" Depth 8 Modes "1024x768" "800x600" EndSubSection Device "Device[0]" Identifier "Screen[0]" Monitor "Monitor[0]" EndSection Section "Device" BoardName "RV350 AS" BusID "2:0:0" Driver "fglrx" Identifier "Device[0]" Option "SaXDualHead" Option "FSAADisableGamma" "no" Option "Capabilities" "0x00000000" Option "ScreenOverlap" "0" Option "FSAAMSPosX4" "0.000000" Option "FSAAMSPosY1" "0.000000" Option "mtrr" "off" Option "ForceGenericCPU" "no" Option "FSAAMSPosX5" "0.000000" Option "FSAAMSPosY2" "0.000000" Option "FSAAScale" "0" Option "FSAAMSPosY3" "0.000000" Option "GammaCorrectionI" "0x00000000" Option "FSAAMSPosX0" "0.000000" Option "FSAAMSPosY4" "0.000000" Option "no_accel" "no" Option "FSAACustomizeMSPos" "no" Option "FSAAMSPosY5" "0.000000" Option "UseFastTLS" "0" Option "BlockSignalsOnLock" "on" Option "FSAAEnable" "off" Option "GammaCorrectionII" "0x00000000" Option "no_dri" "no" Option "VideoOverlay" "on" Option "FSAAMSPosX1" "0.000000" Option "PseudoColorVisuals" "off" Option "StereoSyncEnable" "1" Option "UseInternalAGPGART" "no" Option "SaXDualMonitorVendor" "DELL" Option "HSync2" "30-96" Option "DesktopSetup" "Horizontal" Option "SaXDualResolution" "1024x768" Option "SaXDualOrientation" "LeftOf" Option "SaXDualMode" "Xinerama" Option "ForceMonitors" "auto,crt1" Option "FSAAMSPosX2" "0.000000" Option "SaXDualHSync" "30-96" Option "SaXDualMonitorModel" "M991" Option "SaXDualVSync" "50-160" Option "VRefresh2" "50-160" Option "Mode2" "1024x768,1024x600,800x600,768x576,640x480" Option "OpenGLOverlay" "off" Option "Stereo" "off" Option "CenterMode" "off" Option "FSAAMSPosX3" "0.000000" Option "FSAAMSPosY0" "0.000000" Option "XAANoOffscreenPixmaps" "true" VendorName "ATI" EndSection Section "ServerLayout" Identifier "Layout[all]" InputDevice "Keyboard[0]" "CoreKeyboard" InputDevice "Mouse[1]" "CorePointer" Option "Clone" "off" Option "Xinerama" "off" Screen "Screen[0]" EndSection Section "DRI" Group "video" Mode 0660 EndSection Section "Extensions" Option "DAMAGE" "true" Option "Composite" "true" EndSection ====================== compiz-manager: #!/bin/sh # Compiz Manager wrapper script # # Copyright (c) 2007 Kristian Lyngstøl # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # Contributions by: Treviño (3v1n0) , Ubuntu Packages # # Much of this code is based on Beryl code, also licensed under the GPL. # This script will detect what options we need to pass to compiz to get it # started, and start a default plugin and possibly window decorator. # ARCH=`arch` if [ $ARCH == "x86_64" ]; then LIB=lib64 else LIB=lib fi BIN_PATH=`which compiz` # For window decorators and compiz if [ x$BIN_PATH = "x/usr/bin/compiz" ] ; then COMPIZ_BIN_PATH="/usr/bin/" PLUGIN_PATH="/usr/$LIB/compiz/" else COMPIZ_BIN_PATH="/usr/local/bin" PLUGIN_PATH="/usr/local/$LIB/compiz/" fi GLXINFO="/usr/bin/glxinfo" KWIN=`which kwin` METACITY="/usr/bin/metacity" COMPIZ_NAME="compiz" # Final name for compiz (compiz.real) FUSION_ICON=`which fusion-icon` # For Xgl LD_PRELOAD LIBGL_NVIDIA="" LIBGL_FGLRX="" # Minimum amount of memory (in kilo bytes) that nVidia cards need # to be allowed to start # Set to 262144 to require 256MB NVIDIA_MEMORY="65536" # 64MB NVIDIA_SETTINGS="nvidia-settings" # Assume it's in the path by default # For detecting what driver is in use, the + is for one or more /'s XORG_DRIVER_PATH="/usr/$LIB/xorg/modules/drivers/+" if [ $DESKTOP_SESSION == "kde" ]; then FALLBACKWM="${KWIN}" else FALLBACKWM="${METACITY}" fi FALLBACKWM_OPTIONS="--replace $@" # Driver whitelist WHITELIST="nvidia intel ati radeon i810 fglrx" # blacklist based on the pci ids # See http://wiki.compiz-fusion.org/Hardware/Blacklist for details T=" 1002:5954 1002:5854 1002:5955" # ati rs480 #T="$T 1002:4153" # ATI Rv350 T="$T 8086:2982 8086:2992 8086:29a2 8086:2a02 8086:2a12" # intel 965 BLACKLIST_PCIIDS="$T" unset T COMPIZ_OPTIONS="--no-libgl-fallback --ignore-desktop-hints --replace" COMPIZ_PLUGINS="" ENV="" # Use emerald by default if it exist USE_EMERALD="yes" # No indirect by default INDIRECT="no" # Default X.org log if xset q doesn't reveal it XORG_DEFAULT_LOG="/var/log/Xorg.0.log" # Set to yes to enable verbose VERBOSE="yes" # Echos the arguments if verbose verbose() { if [ "x$VERBOSE" = "xyes" ]; then printf "$*" fi } # abort script and run fallback windowmanager abort_with_fallback_wm() { if [ "x$SKIP_CHECKS" = "xyes" ]; then verbose "SKIP_CHECKS is yes, so continuing despite problems.\n" return 0; fi verbose "aborting and using fallback: $FALLBACKWM \n" if [ -x $FALLBACKWM ]; then exec $FALLBACKWM $FALLBACKWM_OPTIONS else printf "no $FALLBACKWM found, exiting\n" exit 1 fi } # Check for non power of two texture support check_npot_texture() { verbose "Checking for non power of two support: " if glxinfo 2> /dev/null | egrep -q '(GL_ARB_texture_non_power_of_two|GL_NV_texture_rectangle|GL_EXT_texture_rectangle|GL_ARB_texture_rectangle)' ; then verbose "present. \n"; return 0; else verbose "Not present. \n" return 1; fi } # Check for presence of FBConfig check_fbconfig() { verbose "Checking for FBConfig: " if [ "$INDIRECT" = "yes" ]; then $GLXINFO -i | grep -q GLX.*fbconfig FB=$? else $GLXINFO | grep -q GLX.*fbconfig FB=$? fi if [ $FB = "0" ]; then unset FB verbose "present. \n" return 0; else unset FB verbose "not present. \n" return 1; fi } # Check for TFP check_tfp() { verbose "Checking for texture_from_pixmap: " if [ $($GLXINFO 2>/dev/null | grep GLX_EXT_texture_from_pixmap -c) -gt 2 ] ; then verbose "present. \n" return 0; else verbose "not present. \n" if [ "$INDIRECT" = "yes" ]; then unset LIBGL_ALWAYS_INDIRECT INDIRECT="no" return 1; else verbose "Trying again with indirect rendering:\n"; INDIRECT="yes" export LIBGL_ALWAYS_INDIRECT=1 check_tfp; return $? fi fi } # Check wether the composite extension is present check_composite() { verbose "Checking for Composite extension: " if xdpyinfo -queryExtensions | grep -q Composite ; then verbose "present. \n"; return 0; else verbose "not present. \n"; return 1; fi } # Detects if Xgl is running check_xgl() { verbose "Checking for Xgl: " if xvinfo | grep -q Xgl ; then verbose "present. \n" return 0; else verbose "not present. \n" return 1; fi } # Check if the nVidia card has enough video ram to make sense check_nvidia_memory() { MEM=$(${NVIDIA_SETTINGS} -q VideoRam | egrep Attribute\ \'VideoRam\'\ .*: | cut -d: -f3 | sed 's/[^0-9]//g') if [ $MEM -lt $NVIDIA_MEMORY ]; then verbose "Less than ${NVIDIA_MEMORY}kb of memory and nVidia"; return 1; fi return 0; } # Check for existence if NV-GLX check_nvidia() { if [ ! -z $NVIDIA_INTERNAL_TEST ]; then return $NVIDIA_INTERNAL_TEST; fi verbose "Checking for nVidia: " if xdpyinfo | grep -q NV-GLX ; then verbose "present. \n" NVIDIA_INTERNAL_TEST=0 return 0; else verbose "not present. \n" NVIDIA_INTERNAL_TEST=1 return 1; fi } # Check if the max texture size is large enough compared to the resolution check_texture_size() { TEXTURE_LIMIT=$(glxinfo -l | grep GL_MAX_TEXTURE_SIZE | sed 's/.*=[^0-9]//g') RESOLUTION=$(xdpyinfo | grep -i dimensions: | sed 's/[^0-9]*pixels.*(.*).*//' | sed 's/[^0-9x]*//') VRES=$(echo $RESOLUTION | sed 's/.*x//') HRES=$(echo $RESOLUTION | sed 's/x.*//') verbose "Comparing resolution ($RESOLUTION) to maximum 3D texture size ($TEXTURE_LIMIT): "; if [ $VRES -gt $TEXTURE_LIMIT ] || [ $HRES -gt $TEXTURE_LIMIT ]; then verbose "Failed.\n" return 1; fi verbose "Passed.\n" return 0 } # check driver whitelist running_under_whitelisted_driver() { LOG=$(xset q|grep "Log file"|awk '{print $3}') if [ "$LOG" = "" ]; then verbose "xset q doesn't reveal the location of the log file. Using fallback $XORG_DEFAULT_LOG \n" LOG=$XORG_DEFAULT_LOG; fi if [ -z "$LOG" ];then verbose "AIEEEEH, no Log file found \n" verbose "$(xset q) \n" return 0 fi for DRV in ${WHITELIST}; do if egrep -q "Loading .*${DRV}_drv\.so" $LOG && ! egrep -q "Unloading .*${DRV}_drv\.so" $LOG; then return 0 fi done verbose "No whitelisted driver found\n" return 1 } # check pciid blacklist have_blacklisted_pciid() { OUTPUT=$(/sbin/lspci -n) for ID in ${BLACKLIST_PCIIDS}; do if echo "$OUTPUT" | egrep -q "$ID"; then verbose "Blacklisted PCIID '$ID' found \n" return 0 fi done OUTPUT=$(/sbin/lspci -vn | grep -i VGA) verbose "Detected PCI ID for VGA: $OUTPUT\n" return 1 } build_env() { if check_nvidia; then ENV="__GL_YIELD=NOTHING " fi if [ "$INDIRECT" = "yes" ]; then ENV="$ENV LIBGL_ALWAYS_INDIRECT=1 " fi if check_xgl; then if [ -f ${LIBGL_NVIDIA} ]; then ENV="$ENV LD_PRELOAD=${LIBGL_NVIDIA}" verbose "Enabling Xgl with nVidia drivers...\n" fi if [ -f ${LIBGL_FGLRX} ]; then ENV="$ENV LD_PRELOAD=${LIBGL_FGLRX}" verbose "Enabling Xgl with fglrx ATi drivers...\n" fi fi ENV="$ENV FROM_WRAPPER=yes" if [ -n "$ENV" ]; then export $ENV fi } build_args() { if [ $INDIRECT = "yes" ]; then COMPIZ_OPTIONS="$COMPIZ_OPTIONS --indirect-rendering " fi if check_nvidia; then COMPIZ_OPTIONS="$COMPIZ_OPTIONS --loose-binding" fi } #################### # Execution begins here. # Read configuration from XDG paths if [ -z "$XDG_CONFIG_DIRS" ]; then test -f /etc/xdg/compiz/compiz-manager && . /etc/xdg/compiz/compiz-manager else test -f $XDG_CONFIG_DIRS/compiz/compiz-manager && . $XDG_CONFIG_DIRS/compiz/compiz-manager fi if [ -z "$XDG_CONFIG_HOME" ]; then test -f $HOME/.config/compiz/compiz-manager && . $HOME/.config/compiz/compiz-manager else test -f $XDG_CONFIG_HOME/compiz/compiz-manager && . $XDG_CONFIG_HOME/compiz/compiz-manager fi # Don't use compiz when running the failsafe session if [ "x$GNOME_DESKTOP_SESSION_ID" = "xFailsafe" ]; then abort_with_fallback_wm fi if [ "x$LIBGL_ALWAYS_INDIRECT" = "x1" ]; then INDIRECT="yes"; fi # if we run under Xgl, we can skip some tests here if ! check_xgl; then # if vesa or vga are in use, do not even try glxinfo (LP#119341) if ! running_under_whitelisted_driver || have_blacklisted_pciid; then abort_with_fallback_wm fi # check if we have the required bits to run compiz and if not, # fallback if ! check_tfp || ! check_npot_texture || ! check_composite || ! check_texture_size; then abort_with_fallback_wm fi if check_nvidia && ! check_nvidia_memory; then abort_with_fallback_wm fi if ! check_fbconfig; then abort_with_fallback_wm fi fi # load the ccp plugin if present and fallback to plain gconf if not if [ -f ${PLUGIN_PATH}libccp.so ]; then COMPIZ_PLUGINS="$COMPIZ_PLUGINS ccp" elif [ -f ${PLUGIN_PATH}libgconf.so ]; then COMPIZ_PLUGINS="$COMPIZ_PLUGINS glib gconf" fi # get environment build_env build_args if [ -f $HOME/.config/compiz/disable-compiz ]; then abort_with_fallback_wm fi # start the gtk-window-decorator if present if [ -x ${COMPIZ_BIN_PATH}emerald ] && [ "$USE_EMERALD" = "yes" ]; then verbose "Starting emerald\n" ${COMPIZ_BIN_PATH}emerald --replace & elif [ -x ${COMPIZ_BIN_PATH}gtk-window-decorator ] && [ -n "$GNOME_DESKTOP_SESSION_ID" ]; then verbose "Starting gtk-window-decorator\n" ${COMPIZ_BIN_PATH}gtk-window-decorator --replace & FALLBACKWM="${METACITY}" elif [ -x ${COMPIZ_BIN_PATH}kde-window-decorator ] && [ -n "$KDE_FULL_SESSION" ]; then verbose "Starting kde-window-decorator\n" ${COMPIZ_BIN_PATH}kde-window-decorator --replace & FALLBACKWM="${KWIN}" fi if [ x$FUSION_ICON = "x/usr/bin/fusion-icon" ] ; then ${FUSION_ICON} -n & fi if [ -z "$SMID" ]; then ${COMPIZ_BIN_PATH}${COMPIZ_NAME} $COMPIZ_OPTIONS --sm-disable "$@" $COMPIZ_PLUGINS || exec $FALLBACKWM $FALLBACKWM_OPTIONS else ${COMPIZ_BIN_PATH}${COMPIZ_NAME} $COMPIZ_OPTIONS --sm-client-id $SMID "$@" $COMPIZ_PLUGINS || exec $FALLBACKWM $FALLBACKWM_OPTIONS fi