compiz check_texture_size does not deal with multiple displays

Bug #207770 reported by Emil Sit on 2008-03-27
Affects Status Importance Assigned to Milestone
compiz (Ubuntu)
Michael Vogt

Bug Description

Binary package hint: compiz

Compiz during startup reports:

Checking for Xgl: not present.
Detected PCI ID for VGA: 00:02.0 0300: 8086:3582 (rev 02) (prog-if 00 [VGA contr
Checking for texture_from_pixmap: present.
Checking for non power of two support: present.
Checking for Composite extension: present.
Comparing resolution (1024x768
1280x1024) to maximum 3D texture size (2048
2048): [: 388: 2048: unexpected operator
[: 388: 2048: unexpected operator
Checking for nVidia: not present.
Checking for FBConfig: present.
Checking for Xgl: not present.

This X configuration has two heads that I have manually configured to be non-Xinerama.
The various sed commands for HRES, VRES, and TEXTURE_LIMIT don't seem to deal
properly with multiple displays.

One approach to fix this might be to add head -1 or tail -1 to the pipes for TEXTURE_LIMIT
and RESOLUTION. Not sure if that'd be correct or if compiz can/should be configured to
behave differently for different displays.

Dyno (dyno-fu) wrote :

i can confirm this bug.

compiz-core => /usr/bin/compiz => check_texture_size()

mettle (s031877) wrote :

Short summary: I experienced this bug as well and wrote a patch for it. I submitted it to <email address hidden> - but apparantly nothing happened. I got a mail from Søren Hansen (at Ubuntu) to submit a bug in here. I stumbled over this bug report, so here's a replacement for the check_texture_size() in /usr/bin/compiz.

# Check if the max texture size is large enough compared to the resolution
       # Check how many screens we've got and iterate over them
       N=$(xdpyinfo | grep "number of screens" | sed 's/.*[^0-9]//g')
       for i in $(seq 1 $N); do
               TEXTURE_LIMIT=$(glxinfo -l | grep GL_MAX_TEXTURE_SIZE | sed 's/.*=[^0-9]//g' | awk NR==$i)
               RESOLUTION=$(xdpyinfo | grep -i dimensions: | sed 's/[^0-9]*pixels.*(.*).*//' | sed 's/[^0-9x]*//' | awk NR==$i)
               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;
               verbose "Passed.\n"
       return 0

Daniel T Chen (crimsun) on 2008-12-05
Changed in compiz:
importance: Undecided → Low
status: New → Confirmed
TJ (tj) wrote :

This still affects the Jaunty release.

mettle, I've modified your patch slightly (to avoid the need for awk) and removed some of the indent (so that the debdiff only shows the lines we've actually changed - not indents) and am attaching it here.

Michael Vogt (mvo) wrote :

Thanks for the bugreport and the patch, commited to bzr and it will be part of the next upload.

Changed in compiz:
assignee: nobody → mvo
status: Confirmed → Fix Committed
Changed in compiz:
status: Unknown → New
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.7.9+git20090211-0ubuntu5

compiz (1:0.7.9+git20090211-0ubuntu5) jaunty; urgency=low

  [ Dave Walker ]
  * Changed Maintainer field to Ubuntu Core Dev, (LP: #301474)

  [ Michael Vogt ]
  * debian/patches/071_fix_window_move:
    - fix window movement via g-w-d (LP: #330854)

  [ TJ ]
  * debian/patches/030_compiz_manager_multi_display:
    - check_texture_size() Support multiple X screens (LP: #207770)
      Thanks to: TJ <ubuntu (at)> and mettle

 -- Michael Vogt <email address hidden> Mon, 23 Feb 2009 16:32:21 +0100

Changed in compiz:
status: Fix Committed → Fix Released
Stephen M. Webb (bregma) wrote :

upstream bugtracker is no longer valid

Changed in compiz:
importance: Unknown → Undecided
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.