Results 1 to 5 of 5

Thread: Compiz on Hardy don't want to start(have AiGLX)

  1. #1
    Join Date
    Jun 2007
    Location
    Sofia,Bulgaria
    Beans
    56
    Distro
    Ubuntu 11.04 Natty Narwhal

    Question Compiz on Hardy don't want to start(have AiGLX)

    Hi!
    As i've written in the title i can't compiz on hardy.
    Here is the total story:
    Yesterday around 20 or 21 O'clock Bulgarian time I decided to update my gutsy to hardy.I've followed the instructions here,the update manager started,updated the distro and rebooted the PC and the only problems were gcc-3.3-doc and gcc-3.4-doc,but they have nothing to do.
    When the PC started up i was with Hardy,not Gutsy.
    I checked the ATi driver and saw it was 8-3 which means 8.47.x.
    When i saw that it has AiGLX support i decided to fire up the compiz.
    So in terminal:
    Code:
    chichovoto6@tototo6:~$ compiz --replace
    and it gave:
    Checking for Xgl: not present.
    Detected PCI ID for VGA: 01:00.0 0300: 1002:4153 (prog-if 00 [VGA controller])
    Checking for texture_from_pixmap: not present.
    Trying again with indirect rendering:
    Checking for texture_from_pixmap: present.
    Checking for non power of two support: present.
    Checking for Composite extension: present.
    Comparing resolution (1280x1024) to maximum 3D texture size (2048): Passed.
    Checking for nVidia: not present.
    Checking for FBConfig: present.
    Checking for Xgl: not present.
    /usr/bin/compiz: 406: /usr/local/bin/compiz: not found

    I decided to remove compiz and install it again.
    I opened Synaptic and remove all compiz with configuration files,rebooted,installed it and rebooted again.
    When I logged in I fired
    Code:
    chichovoto6@tototo6:~$ compiz --replace
    and it gave the same thing again:
    Checking for Xgl: not present.
    Detected PCI ID for VGA: 01:00.0 0300: 1002:4153 (prog-if 00 [VGA controller])
    Checking for texture_from_pixmap: not present.
    Trying again with indirect rendering:
    Checking for texture_from_pixmap: present.
    Checking for non power of two support: present.
    Checking for Composite extension: present.
    Comparing resolution (1280x1024) to maximum 3D texture size (2048): Passed.
    Checking for nVidia: not present.
    Checking for FBConfig: present.
    Checking for Xgl: not present.
    /usr/bin/compiz: 406: /usr/local/bin/compiz: not found

    Here is my xorg.conf
    Code:
    # xorg.conf (xorg X Window System server configuration file)
    #
    # This file was generated by dexconf, the Debian X Configuration tool, using
    # values from the debconf database.
    #
    # Edit this file with caution, and see the xorg.conf manual page.
    # (Type "man xorg.conf" at the shell prompt.)
    #
    # This file is automatically updated on xserver-xorg package upgrades *only*
    # if it has not been modified since the last upgrade of the xserver-xorg
    # package.
    #
    # If you have edited this file but would like it to be automatically updated
    # again, run the following command:
    #   sudo dpkg-reconfigure -phigh xserver-xorg
    
    Section "Files"
    EndSection
    
    Section "InputDevice"
    	Identifier	"Generic Keyboard"
    	Driver		"kbd"
    	Option		"CoreKeyboard"
    	Option		"XkbRules"	"xorg"
    	Option		"XkbModel"	"pc105"
    	Option		"XkbLayout"	"us"
    EndSection
    
    Section "InputDevice"
    	Identifier	"Configured Mouse"
    	Driver		"mouse"
    	Option		"CorePointer"
    	Option		"Device"		"/dev/input/mice"
    	Option		"Protocol"		"ImPS/2"
    	Option		"ZAxisMapping"		"4 5"
    	Option		"Emulate3Buttons"	"true"
    EndSection
    
    Section "InputDevice"
    	Driver		"wacom"
    	Identifier	"stylus"
    	Option		"Device"	"/dev/input/wacom"
    	Option		"Type"		"stylus"
    	Option		"ForceDevice"	"ISDV4"		# Tablet PC ONLY
    EndSection
    
    Section "InputDevice"
    	Driver		"wacom"
    	Identifier	"eraser"
    	Option		"Device"	"/dev/input/wacom"
    	Option		"Type"		"eraser"
    	Option		"ForceDevice"	"ISDV4"		# Tablet PC ONLY
    EndSection
    
    Section "InputDevice"
    	Driver		"wacom"
    	Identifier	"cursor"
    	Option		"Device"	"/dev/input/wacom"
    	Option		"Type"		"cursor"
    	Option		"ForceDevice"	"ISDV4"		# Tablet PC ONLY
    EndSection
    
    Section "Device"
    	Identifier	"ATI Technologies Inc RV350 AS [Radeon 9550]"
    	Driver		"fglrx"
    	BusID		"PCI:1:0:0"
    	VideoRam	262144
    	Option		"UseFBDev"		"false"
    EndSection
    
    Section "Extensions"
    	Option		"Composite"	"1"
    EndSection
    
    Section "Monitor"
    	Identifier	"L1918S"
    	Option		"DPMS"
    	HorizSync	30-83
    	VertRefresh	56-75
    EndSection
    
    Section "Screen"
    	Identifier	"Default Screen"
    	Device		"ATI Technologies Inc RV350 AS [Radeon 9550]"
    	Monitor		"L1918S"
    	DefaultDepth	24
    	SubSection "Display"
    		Modes		"1280x1024" "1024x768" "800x600" "640x480"
    	EndSubSection
    EndSection
    
    Section "ServerLayout"
    	Identifier	"Default Layout"
    	Screen		"Default Screen"
    	InputDevice	"Generic Keyboard"
    	InputDevice	"Configured Mouse"
    
    # Uncomment if you have a wacom tablet
    #	InputDevice     "stylus"	"SendCoreEvents"
    #	InputDevice     "cursor"	"SendCoreEvents"
    #	InputDevice     "eraser"	"SendCoreEvents"
    EndSection
    
    If you have any ideas,please tell them to me.
    The greatest discovery ever:
    Harmonic resonance!
    Why?
    Because everything - from the smallest particle to the entire multiverse resonates!

  2. #2
    Join Date
    Oct 2006
    Beans
    15

    Re: Compiz on Hardy don't want to start(have AiGLX)

    Run

    Code:
    sudo ln -s /usr/bin/compiz.real /usr/local/bin/compiz
    in a shell.

    You could also edit /usr/bin/compiz but the above way is easier plus if one day you want to install your own compiled version of compiz you don't have to change it back.

  3. #3
    Join Date
    Jun 2007
    Location
    Sofia,Bulgaria
    Beans
    56
    Distro
    Ubuntu 11.04 Natty Narwhal

    Question Re: Compiz on Hardy don't want to start(have AiGLX)

    That did the trick,but now when I start:
    Code:
    chichovoto6@tototo6:~$ compiz --replace
    it gives:
    compiz (core) - Fatal: GLX_EXT_texture_from_pixmap is missing
    compiz (core) - Error: Failed to manage screen: 0
    compiz (core) - Fatal: No manageable screens found on display :0.0

    Here is usr/bin/compiz
    #!/bin/sh
    # Compiz Manager wrapper script
    #
    # Copyright (c) 2007 Kristian Lyngstøl <kristian@bohemians.org>
    #
    # 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) <trevi55@gmail.com>, 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.
    #


    COMPIZ_BIN_PATH="/usr/local/bin/" # For window decorators and compiz
    PLUGIN_PATH="/usr/local/lib/compiz/"
    GLXINFO="/usr/bin/glxinfo"
    KWIN="/usr/bin/kwin"
    METACITY="/usr/bin/metacity"
    COMPIZ_NAME="compiz" # Final name for compiz (compiz.real)

    # For Xgl LD_PRELOAD
    LIBGL_NVIDIA="/usr/lib/nvidia/libGL.so.1.2.xlibmesa"
    LIBGL_FGLRX="/usr/lib/fglrx/libGL.so.1.2.xlibmesa"

    # 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 [ -x $METACITY ]; then
    FALLBACKWM="${METACITY}"
    elif [ -x $KWIN ]; then
    FALLBACKWM="${KWIN}"
    else
    FALLBACKWM=true
    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:3152 1002:3150 1002:5462 1002:5653 " # ati X300 X600,X600 X700
    T=""
    BLACKLIST_PCIIDS="$T"
    unset T

    COMPIZ_OPTIONS="--ignore-desktop-hints --replace"
    COMPIZ_PLUGINS="core"
    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

    if [ "x$CM_DRY" = "xyes" ]; then
    verbose "Dry run failed: Problems detected with 3D support.'n"
    exit 1;
    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_re ctangle|GL_EXT_texture_rectangle|GL_ARB_texture_re ctangle)' ; 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()
    {
    if [ ! -x "$NVIDIA_SETTINGS" ]; then
    return 0
    fi

    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

    #don't run on laptops using ati driver
    if laptop-detect; then
    for DRV in ati radeon; do
    if egrep -q "Loading ${XORG_DRIVER_PATH}${DRV}_drv\.so" $LOG &&
    ! egrep -q "Unloading ${XORG_DRIVER_PATH}${DRV}_drv\.so" $LOG;
    then
    verbose "Found laptop using ${DRV} driver. \n"
    return 1
    fi
    done
    fi

    for DRV in ${WHITELIST}; do
    if egrep -q "Loading ${XORG_DRIVER_PATH}${DRV}_drv\.so" $LOG &&
    ! egrep -q "Unloading ${XORG_DRIVER_PATH}${DRV}_drv\.so" $LOG;
    then
    return 0
    fi
    done
    verbose "No whitelisted driver found\n"
    return 1
    }

    # check pciid blacklist
    have_blacklisted_pciid()
    {
    OUTPUT=$(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=$(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 [ "x$INDIRECT" = "xyes" ]; then
    COMPIZ_OPTIONS="$COMPIZ_OPTIONS --indirect-rendering "
    fi
    if check_nvidia; then
    if [ "x$INDIRECT" != "xyes" ]; then
    COMPIZ_OPTIONS="$COMPIZ_OPTIONS --loose-binding"
    fi
    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 [ "x$CM_DRY" = "xyes" ]; then
    verbose "Dry run finished: everything should work with regards to Compiz and 3D.\n"
    exit 0;
    fi

    ${COMPIZ_BIN_PATH}${COMPIZ_NAME} $COMPIZ_OPTIONS "$@" $COMPIZ_PLUGINS || exec $FALLBACKWM $FALLBACKWM_OPTIONS

    Any Ideas?
    The greatest discovery ever:
    Harmonic resonance!
    Why?
    Because everything - from the smallest particle to the entire multiverse resonates!

  4. #4
    Join Date
    Apr 2006
    Beans
    370

    Re: Compiz on Hardy don't want to start(have AiGLX)

    Quote Originally Posted by justmoon View Post
    Run

    Code:
    sudo ln -s /usr/bin/compiz.real /usr/local/bin/compiz
    in a shell.
    This is a very bad idea. The shell will attempt to run /usr/local/bin/compiz directly instead of the wrapper script at /usr/bin/compiz, so none of the magic that happens there will work. It appears to work initially because the shell has already cached the lookup of 'compiz' to /usr/bin/compiz.

    This problem is actually caused by the file /etc/xdg/compiz/compiz-manager being missing, due to brokenness in the ATI installer from their website.

    Run:
    Code:
    sudo dpkg-divert --rename --remove /etc/xdg/compiz/compiz-manager
    taken from http://www.realistanew.com/2008/04/2...grades-to-804/

    If, for some reason, you still don't have an /etc/xdg/compiz/compiz-manager after that, you can manually move /etc/xdg/compiz/compiz-manager.SOME_SUFFIX to compiz-manager

    Also, make sure you delete the symlink at /usr/local/bin/compiz if you did that already and open a new shell to test compiz again if you get an error about /usr/local/bin/compiz not existing (because of the aformentioned caching issues)

  5. #5
    Join Date
    Jan 2005
    Location
    Los Angeles, CA
    Beans
    89
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Question Re: Compiz on Hardy don't want to start(have AiGLX)

    crdlb:

    I tried your dpkg-divert command and I get this error:
    Code:
    Removing `diversion of /etc/xdg/compiz/compiz-manager to /etc/xdg/compiz/compiz-manager.ubuntu by xorg-driver-fglrx'
    dpkg-divert: rename involves overwriting `/etc/xdg/compiz/compiz-manager' with
      different file `/etc/xdg/compiz/compiz-manager.ubuntu', not allowed
    I also get the:
    Code:
    /usr/bin/compiz: 406: /usr/local/bin/compiz: not found
    error.

    Any ideas/advice?
    Bikes not bombs

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •