PDA

View Full Version : [ubuntu] Maximum Texture Size Error - Compiz



neonitron
April 3rd, 2009, 08:51 PM
Hey guys / girls,

Just wondering if anyone has come up for a fix for the Compiz Desktop Effects Maximum Texture Size Issue. Here is my configuration:

- 2 Monitors, Left one set at 1280 x 800, Right one set at 1280 x 1024
- Ubuntu Intrepid 8.10
- Latest Compiz and (I believe all required dependencies)

Problem that's happening is if I try to enable Desktop effects it fails and says that my Maximum Texture Size is 2048 therefore it fails to start. Now I can modify the compiz wrapper to skip past the failure and start compiz, but if I do that then the right hand side of my screen appears as if it is all wonky and doesn't display anything properly. It just appears that after the 2048 pixel width on the right the screen won't display properly.

I know this can be done because I've done it with Windows XP, so there is no hardware issues. Just wondering what else I can try.

Laptop - IBM T61, with Intel 965GM Video .

I've tried a couple suggestions of modifying my compiz wrapper, changing my display settings, modifying my xorg.conf but nothing seems to work properly.

If I use my displays without desktop effects then it works fine. But how can I live without desktop effects! Also, if I lower my screen resolution so that the max width is less than 2048 for both screens then it works fine. But c'mon now, I want my appropriate screen resolutions! lol

-Neil

neonitron
April 3rd, 2009, 08:55 PM
Xorg.Conf File:
==================

# xorg.conf (X.Org 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.
#
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
#
# 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 "Monitor"
Identifier "Configured Monitor"
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Virtual 2560 1024
Depth 24
EndSubSection
EndSection

Section "Device"
Identifier "Configured Video Device"
EndSection


Compiz Wrapper
================

#!/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.
#

#SKIP_CHECKS="yes"

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:4153" # ATI Rv350
#T="$T 1002:3152 1002:3150 1002:5462 1002:5653 " # ati X300 X600,X600 X700
T="8086:1132" # intel i815 (LP: #221920)
T="$T 8086:2e02 " # Intel Eaglelake
T="$T 8086:3577 8086:2562" # Intel 830MG, 845G (LP: #259385)
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 if we run with the Software Rasterizer, this happens e.g.
# when a second screen session is opened via f-u-a on intel
check_software_rasterizer()
{
verbose "Checking for Software Rasterizer: "
if glxinfo 2> /dev/null | egrep -q '^OpenGL renderer string: Software Rasterizer' ; then
verbose "present. \n";
return 0;
else
verbose "Not present. \n"
return 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 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 ${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
OLD_IFS=$IFS
IFS=:
for CONFIG_DIR in $XDG_CONFIG_DIRS
do
test -f $CONFIG_DIR/compiz/compiz-manager && . $CONFIG_DIR/compiz/compiz-manager
done
IFS=$OLD_IFS
unset OLD_IFS
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

# check if we run with software rasterizer and if so, bail out
if check_software_rasterizer; then
verbose "Software rasterizer detected, aborting"
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

neonitron
April 3rd, 2009, 08:58 PM
And when I try to run Compiz this is the error that I get:
================================================== =========


Checking for Xgl: not present.
Detected PCI ID for VGA: 01:00.0 0300: 10de:0193 (rev a2) (prog-if 00 [VGA])
Checking for texture_from_pixmap: present.
Checking for non power of two support: present.
Checking for Composite extension: present.
Comparing resolution (2560x1024) to maximum 3D texture size (2048): Failed.
aborting and using fallback: /usr/bin/metacity


How can I increase my Maximum 3D Texture Size?

zoldiel
April 4th, 2009, 08:00 AM
I have the same set up as you and have had this issue as long as I've used compiz. Since compiz renders the entire desktop as one texture you are limited by your video adapter's texture size, and as far as I know there isn't much you can do about that aside from upgrading your video adapter.

However, as a somewhat awkward workaround you could set your display settings so that one is above the other, rather than to the left or right. This will give you a total desktop size of 1280x1824, thus within your hardware's limits. I tried this for a little while but just couldn't get used to moving things up or down to get them to the monitor on the left or right.

I don't really foresee a solution to this problem any time soon. I tested dual monitor support for the Jaunty Beta tonight, and while support does seem a bit better since the last time I've used it (I actually didn't have to manually configure xorg this time), the compiz texture size issue still remains. I suppose it may be possible to develop a way to use a different texture for each display, but I don't know how much effort that would take, it could be a significant rewrite of compiz or perhaps not even possible at all. It may not even be worth the effort since newer hardware will continue to support higher texture resolutions.

Seems we are stuck for the time being.

Sergiu Bivol
April 29th, 2009, 10:07 AM
I have exactly the same setup as the first post says, but I can use dual-head with Compiz, with the commands


xrandr --output LVDS --mode 1280x800
xrandr --output VGA --mode 1280x1024
xrandr --output VGA --right-of LVDS

Graphics: Intel Corporation Mobile GM965/GL960
Everything works well, but only if Compiz is started before setting up dual-head. If I try to start Compiz after that, it complains:

Checking screen 1Comparing resolution (2560x1024) to maximum 3D texture size (2048): Failed.

Does anybody have any idea why? I am pretty sure that Compiz is broken (stupid, I mean). There is no such limit ( 2048 ) on GM965. It used to be on older Intel boards, but not on this one.

zoldiel
April 29th, 2009, 11:17 AM
Looks to be a bug in mesa actually, see this bug report:

https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/146298

Sergiu Bivol
April 29th, 2009, 04:30 PM
It is a bug in mesa, indeed. However, Compiz does work perfectly if dual-head is configured after starting Compiz (my current setup is 2560x1024).
This proves that it's possible to have Compiz working above 2048, and I actually have two different cubes (one on each screen), rain effects, and Expo spanning on both screens.
Compiz coupled with KDE 4.2 is stunning...
I think it would be possible to edit the compiz script, so that it skips this check. I'll try that and report back.

Sergiu Bivol
April 30th, 2009, 02:39 PM
Yep, it works :)

Edit /usr/bin/compiz, find the function "check_texture_size()" and comment out the line that says "return 1;".

Now, I have dual-head set up in xorg.conf and Compiz starts normally.

zoldiel
April 30th, 2009, 06:22 PM
Yep, also you can add SKIP_CHECKS=yes to ~/.config/compiz/compiz-manager to bypass the error, however with GNOME the desktop will only extend to the 2048 point, leaving a black area on the second screen. I haven't tried it with KDE, I suppose it handles the desktop differently so that isn't an issue.

PePas
May 4th, 2009, 10:50 AM
No, Gnome can display it fine. I upgraded my mesa package from here:
https://edge.launchpad.net/~cavedon/+archive/ppa
No I have compiz working with a proper desktop background and a full functioning desktop with icons on a virtual screen bigger than 2048.

bobince
May 4th, 2009, 02:19 PM
Great! Ludovico's fix also works fine on my GMA X4500HD.

drewsus
April 20th, 2010, 12:47 PM
Anyone know what to do in Lucid? That PPA only goes up to Jaunty.

This is the message I am getting:

compiz (core) - Warn: Exceeded max texture size

Launching fallback window manager

SmSpillaz
April 25th, 2010, 11:23 AM
Anyone know what to do in Lucid? That PPA only goes up to Jaunty.

This is the message I am getting:

Use fewer screens or a lower screen resolution.

We have a plugin in 0.9.0 which fixes this btw.

drewsus
April 25th, 2010, 03:25 PM
Use fewer screens or a lower screen resolution.

We have a plugin in 0.9.0 which fixes this btw.

its not that I am requesting to use a large screen resolution. This is the default. When I run 'xrandr -q' (which means query) then it not only polls my hardware, but also sets up the dualscreen with default settings. How should I go about changing my external monitors preferred resolution permanently?

Furthermore, who is 'we' and version 0.9.0 of what? Where can I get this plugin? What does it do?

[edit]
just found your wordpress blog and as I suspected v0.9.0 is in reference to compiz++. So, how can I go about getting version 0.9.0? Is there a ppa? This fix would make my life loads easier haha

SmSpillaz
April 26th, 2010, 03:10 AM
its not that I am requesting to use a large screen resolution. This is the default. When I run 'xrandr -q' (which means query) then it not only polls my hardware, but also sets up the dualscreen with default settings. How should I go about changing my external monitors preferred resolution permanently?

Furthermore, who is 'we' and version 0.9.0 of what? Where can I get this plugin? What does it do?

[edit]
just found your wordpress blog and as I suspected v0.9.0 is in reference to compiz++. So, how can I go about getting version 0.9.0? Is there a ppa? This fix would make my life loads easier haha

In about a week - number of assignments pending.

drewsus
April 26th, 2010, 03:16 AM
I can understand! Sounds great, and I cannot wait!

thewump
April 29th, 2010, 05:22 PM
I'm not understanding this all clearly. I had things working fine on 9.10 with dual 2048x1152 displays with nvidia GeForce 7600 GS. I've upgraded do Lucid and get

compiz (core) - Warn: Exceeded max texture size

As it worked on 9.10 I'm assuming that it can work again? I haven't been able to apply the work arounds that I see here like telling compiz not to do checks..

Thanks in advance.

K

SmSpillaz
May 2nd, 2010, 09:08 AM
I'm not understanding this all clearly. I had things working fine on 9.10 with dual 2048x1152 displays with nvidia GeForce 7600 GS. I've upgraded do Lucid and get

compiz (core) - Warn: Exceeded max texture size

As it worked on 9.10 I'm assuming that it can work again? I haven't been able to apply the work arounds that I see here like telling compiz not to do checks..

Thanks in advance.

K


SKIP_CHECKS=yes only relates to skipping checks done by the ubuntu compiz wrapper script. This is only useful if your hardware has been blacklisted or is not on the whitelist (like nouveau).

That error comes from the compiz executable itself (to which checks cannot be skipped, since if any one of them fails, it would be impossible for compiz to continue, since it would not be able to create textures of that size).

Just wait for 0.9.0 - I am just finishing the code cleanup and buildsystem changes, but I just installed it on fedora 13 with nouveau and it works great. There are a few administration things to get through (like packaging, release announcements, documentation, etc) that we need to get through, but all of this is rather trivial. I predict next week (hopefully)

thewump
May 11th, 2010, 04:15 PM
When you say "wait for 0.9.0" should I just wait for updates to find it, or can I find it elsewhere?

Thanks

K

aussieoddsocks
May 23rd, 2010, 09:27 AM
Just wondering what the status is on compiz 0.90 packages being available for Lucid? I'm happy to test it out on an ATI setup with dual screens that currently hits the maximum texture size error regardless of screen position. (i.e. two screens side by side or two screens top and bottom).
Currently my screen res are both set to what they natively support (1280*1024). Reducing the res enables me to run compiz plus dual screens as long as I am running a virtual screen > 2048*2048.

illmatic
June 30th, 2010, 08:00 PM
i got exactly the same problem :).
Will the next compiz version surly solve this problem?

dernsber
August 12th, 2010, 09:33 PM
Agreed.

I'm having this issue on a fresh install of Ubuntu 10.04 (Dell Optiplex 755, default video) Basically, Compiz works fine single monitor, but not dual. I want dual monitors and pretty effects. (mainly true transparent Terminal window)

Is this new Compiz++ being released soon?

Can I get it added to my repository's?

Or is their a configuration file i can change to ignore this error?


Intel G31/G33/Q33/Q35 video... not sure anymore than that.


Edit: Found the installer for 0.9.0, trying now. Will update if works.

Marceau
September 14th, 2010, 06:02 PM
Edit: Found the installer for 0.9.0, trying now. Will update if works.

Any word on progress?