compiz starts with a blank screen on a 2048x1152 monitor due to hw limit with textures > 2048

Bug #428769 reported by Alan Bell
64
This bug affects 11 people
Affects Status Importance Assigned to Milestone
xf86-video-intel
Fix Released
Critical
compiz (Ubuntu)
Fix Released
High
Unassigned
Lucid
Fix Released
High
Unassigned

Bug Description

[Problem]
When using dual-head or other situation where the screen has an X or Y dimension larger than (or maybe equal to) the max texture size, the hardware is unable to cope.

A patch that supposedly fixes this was introduced in mesa 7.7 but it seems the issue persists. It's a tough thing to fix in X and unlikely to get patched with lucid, so as a workaround it's suggested that compiz should check if the current resolution has a dimension equal to or larger than the max texture size, and not start up in this case.

[Original Report]
Binary package hint: xserver-xorg-video-intel

I have an intel Atom motherboard with a 945 graphics chip

00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02)

the max texture size is 2048 and I have a Samsung 2048x1152 monitor. Works just fine with compiz in Jaunty but in Karmic I get a black (or sometimes corrupted) screen except for the column of the first pixel 1x1152. The mouse cursor looks fine over all the screen and I can see in the first pixel that the panels and so on are there. It is as if there is a big black overlay sitting on top of the other 2047x1152 pixels. The first test Compiz does is compare the screen resolution to see if it less than or equal to the max texture size. Mine is equal, and should work. I can do alt+F2 and type metacity --replace to get back to a 2d window manager.

ProblemType: Bug
Architecture: i386
Date: Sun Sep 13 09:25:49 2009
DistroRelease: Ubuntu 9.10
Package: xserver-xorg-video-intel 2:2.8.1-1ubuntu1
PccardctlIdent:

PccardctlStatus:

ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.31-10-generic root=UUID=24d62e43-8f3d-4021-90f3-eb189cd294e3 ro quiet splash
ProcEnviron:
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-10.30-generic
RelatedPackageVersions:
 xserver-xorg 1:7.4+3ubuntu5
 libgl1-mesa-glx 7.6.0~git20090817.7c422387-0ubuntu3
 libdrm2 2.4.13-1ubuntu1
 xserver-xorg-video-intel 2:2.8.1-1ubuntu1
 xserver-xorg-video-ati 1:6.12.99+git20090825.fc74e119-0ubuntu1
SourcePackage: xserver-xorg-video-intel
Uname: Linux 2.6.31-10-generic i686
XorgConf: Error: [Errno 2] No such file or directory: '/etc/X11/xorg.conf'
dmi.bios.date: 06/19/2008
dmi.bios.vendor: Intel Corp.
dmi.bios.version: LF94510J.86A.0067.2008.0619.1959
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: D945GCLF
dmi.board.vendor: Intel Corporation
dmi.board.version: AAE27042-305
dmi.chassis.type: 2
dmi.modalias: dmi:bvnIntelCorp.:bvrLF94510J.86A.0067.2008.0619.1959:bd06/19/2008:svn:pn:pvr:rvnIntelCorporation:rnD945GCLF:rvrAAE27042-305:cvn:ct2:cvr:
fglrx: Not loaded
system:
 distro: Ubuntu
 architecture: i686kernel: 2.6.31-10-generic

Revision history for this message
Alan Bell (alanbell) wrote :
Revision history for this message
Alan Bell (alanbell) wrote :

forgot to say, with a different monitor with 1024x768 resolution it works just perfectly in Karmic.

Bryce Harrington (bryce)
Changed in xserver-xorg-video-intel (Ubuntu):
status: New → Confirmed
Revision history for this message
Fernando Abramowitz (ferabra) wrote :

Same to me with composite in kubuntu in 2048x1152. With 1024x768 resolution works fine.

Bryce Harrington (bryce)
tags: added: karmic
Revision history for this message
ju (clemenzi-santo-gmail) wrote :

Same thing on Ubuntu Karmic Koala with a Dell 23" 2048x1152.

Using metacity it works.

Revision history for this message
Sebastian (sebastian-kroop) wrote :

For me reconfigures the screen size lower than the maximum 3D texture size 2048 helps.

# xrandr --fb 2046x1152

Running glxgears with window width greater then 2048 there is an black window...

Revision history for this message
Alan Bell (alanbell) wrote :

good tip Sebastian, I can now resize the screen with "xrandr --fb 2040x1152" (it prefers an 8 pixel boundary) followed by restarting compiz with "compiz --replace" to get a working system with just 8 pixels of corruption on the far right.

Revision history for this message
Alan Bell (alanbell) wrote :

Trouble is that even if you sacrifice some pixels to get it working, if you maximise a window it tries to make the window 2048 wide, exceeds the max texture size and screen size and compiz collapses in a heap.

Revision history for this message
William Merriam (wmerriam) wrote :

quoted from the top of this page: "This bug affects you and 5 other people"

I'm going to go a little off topic and state the obvious, because this has to be fixed. This bug directly affects thousands of people. 6 of them have seen this page in 4 months. Nearly all affected users and would-be users have seen A BLANK SCREEN, and have given up on Ubuntu.

The real bug is that, with this increasingly common hardware configuration, Compiz is turned on by default, and nothing is ever displayed. No error report is generated. The installation process goes nowhere, or an upgrade results in an unusable computer.

This is from the point of view of a user. If you're trying out an alternative to Microsoft Windows (see Bug #1) and don't have expert help, the result is COMPLETE USABILITY FAILURE.

This rant continues here: http://technophobe.net/lucid_lynx/#compiz_bug_comment

I suggest posting further off-topic comments here: http://mnotes.spodcast.net/2010/01/ubuntu-2048x1152-blank-screen-bug-fix.html

Revision history for this message
Alan Bell (alanbell) wrote :

The scenario to trigger the bug is quite clear, intel graphics, max texture size 2048 and a monitor of exactly 2048 horizontal resolution. Any higher and Compiz won't start and it falls back to metacity, any lower and it works fine. Compiz tests to see if the resolution is <= max texture size.
It would be good to get some guidance as to where the bug is, and what should be done about it. If Compiz were adjusted to work only on resolutions strictly less than max texture it would avoid the black screen problem. As Compiz demonstrably works fine on Jaunty it would be great to have these monitors working on intel chipsets under Karmic/Lucid, but if that won't be supported at least lets make it not have the black screen failure mode.

Changed in xserver-xorg-video-intel:
status: Unknown → Confirmed
Revision history for this message
Alan Bell (alanbell) wrote :

better upstream bug - and it might have a fix!

Changed in xserver-xorg-video-intel:
status: Confirmed → Unknown
Changed in xserver-xorg-video-intel:
status: Unknown → Fix Released
Revision history for this message
Alan Bell (alanbell) wrote :

not fixed in Lucid daily CD AMD64 from yesterday.

Bryce Harrington (bryce)
tags: added: black-screen
Revision history for this message
Alan Bell (alanbell) wrote :

tried Lucid alpha 3 fully updated to today, still happens. Installed the xorg-edgers ppa and upgraded, still happens.

Revision history for this message
Alan Bell (alanbell) wrote :

can we just get compiz to not load and fall back to metacity if the resolution is equal to max texture size please. At the moment I think it runs if the resolution is less than or equal to max texture size lets change it to a strict less than to prevent the black screen.

Revision history for this message
Bryce Harrington (bryce) wrote :

Hmm, well the upstreamed bug is closed as believed fixed. Maybe you should reopen it and elaborate on the remaining problem?

Meanwhile, your recommendation to make compiz not start up if it detects this situation is a good one, I'll forward this to the compiz team.

affects: xserver-xorg-video-intel (Ubuntu) → compiz (Ubuntu)
Changed in compiz (Ubuntu):
status: Confirmed → New
summary: - compiz starts with a blank screen on a 2048x1152 monitor
+ compiz starts with a blank screen on a 2048x1152 monitor due to hw limit
+ with textures > 2048
Bryce Harrington (bryce)
description: updated
Revision history for this message
Bryce Harrington (bryce) wrote :

I took another look at this as part of handling bug #556631.

In Karmic, /usr/bin/compiz was a shell script, which included a check for max texture size:

check_texture_size()
{
        # Check how many screens we've got and iterate over them
        N=$(xdpyinfo | grep -i "number of screens" | sed 's/.*[^0-9]//g')
        for i in $(seq 1 $N); do
            verbose "Checking screen $i"
            TEXTURE_LIMIT=$(glxinfo -l | grep GL_MAX_TEXTURE_SIZE | sed -n "$i s/^.*=[^0-9]//g p")
            RESOLUTION=$(xdpyinfo | grep -i dimensions: | sed -n -e "$i s/^ *dimensions: *\([0-9]*x[0-9]*\) pixels.*/\1/ p")
            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"
        done
        return 0
}

It appears that as of 1:0.8.4-0ubuntu4 in lucid, the checks that the compiz wrapper had been doing have moved to the compiz binary itself:

bryce@blumonc:~$ cat /etc/lsb-release ; file /usr/bin/compiz
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu lucid (development branch)"
/usr/bin/compiz: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped

compiz (1:0.8.4-0ubuntu4) lucid; urgency=low
...
  [ Travis Watkins ]
  * debian/patches/060_move_checks_to_compiz.patch:
    - add all relevant checks from compiz-manager to compiz itself
      Compiz already checks for almost everything it needs so there is no
      need to check twice.

So the texture size check appears to be occurring in this chunk of the patch:

@@ -244,13 +246,21 @@
     CompFBConfig *config = &screen->glxPixmapFBConfigs[depth];
     int attribs[7], i = 0;

+ if (width > screen->maxTextureSize || height > screen->maxTextureSize)
+ {
+ compLogMessage ("core", CompLogLevelWarn,
+ "Exceeded max texture size");
+
+ launchFallbackWM ();
+ }
+
     if (!config->fbConfig)
     {
  compLogMessage ("core", CompLogLevelWarn,
    "No GLXFBConfig for depth %d",
    depth);

- return FALSE;
+ launchFallbackWM ();
     }

     attribs[i++] = GLX_TEXTURE_FORMAT_EXT;

So that all looks like it should work... You should get an error message "Exceeded max texture size" in your compiz log

Revision history for this message
Bryce Harrington (bryce) wrote :

While the tone of comment #8 is entirely inappropriate, I agree with its assessment that, if indeed this is a regression with compiz, it is quite serious and needs attention soon

Changed in compiz (Ubuntu Lucid):
importance: Undecided → Critical
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
Revision history for this message
Bryce Harrington (bryce) wrote :

I *think* the problem may be that this code:

+ if (width > screen->maxTextureSize || height > screen->maxTextureSize)

needs to be:

+ if (width >= screen->maxTextureSize || height >= screen->maxTextureSize)

Changed in compiz (Ubuntu Lucid):
assignee: Canonical Desktop Team (canonical-desktop-team) → nobody
milestone: none → ubuntu-10.04
Michael Vogt (mvo)
Changed in compiz (Ubuntu Lucid):
status: New → In Progress
Revision history for this message
Michael Vogt (mvo) wrote :

I uploaded a new compiz now with the change suggested in comment #17. I don't have the required hardware to test it myself, please let me know if it works and stops compiz from running.

Michael Vogt (mvo)
Changed in compiz (Ubuntu Lucid):
status: In Progress → Fix Committed
importance: Critical → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.8.4-0ubuntu15

---------------
compiz (1:0.8.4-0ubuntu15) lucid; urgency=low

  * debian/patches/060_move_checks_to_compiz.patch:
    - improve the maxTextureSize check to test for >= instead of
      just > (thanks to bryceh) LP: #428769
 -- Michael Vogt <email address hidden> Thu, 08 Apr 2010 09:22:03 +0200

Changed in compiz (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Alan Bell (alanbell) wrote :

fix confirmed using the Lucid RC desktop AMD64 cd. Compiz does not start and the desktop is displayed fine, with no desktop effects.

Revision history for this message
Leon Blakey (thelq) wrote :

Umm... I don't know about anyone else but I just installed 1:0.8.4-0ubuntu15.1 from lucid-proposed, and its not working. Same problem, except mine is with dual monitors. I max at 2048x2048, and I set my resolution to (total) 2048x768. Still getting "compiz (core) - Warn: Exceeded max texture size"

Here's the progression

lordquackstar@quackdesk-linux:~$ ./compiz-check

Gathering information about your system...

Distribution: Ubuntu 10.04
Desktop environment: GNOME
Graphics chip: ATI Technologies Inc RV410 [Radeon X700 (PCIE)]
Driver in use: radeon
Rendering method: AIGLX

Checking if it's possible to run Compiz on your system...

Checking for texture_from_pixmap... [ OK ]
Checking for non power of two support... [ OK ]
Checking for composite extension... [ OK ]
Checking for FBConfig... [ OK ]
Checking for hardware/setup problems... [ OK ]

lordquackstar@quackdesk-linux:~$ compiz --replace
WARNING: Application calling GLX 1.3 function "glXCreatePixmap" when GLX 1.3 is not supported! This is an application bug!
compiz (core) - Warn: Exceeded max texture size

Launching fallback window manager

Revision history for this message
Alan Bell (alanbell) wrote :

@Leon you have an ATI card, not an Intel card. I suggest you file a new bug.

Changed in xserver-xorg-video-intel:
importance: Unknown → Critical
Revision history for this message
Brian Starkey (bs00065) wrote :

This is not a bug fix (in my opinion) it is a workaround which is just covering up the real problem.
I am unable to start Compiz on a 945 with 2048*1152 resolution presumably because of this 'fix'.
As the max texture size is 2048*2048, Compiz should be able to run with this resolution, it does not exceed the max texture size. What is the real issue here, has the cause been identified?

Revision history for this message
Brian Starkey (bs00065) wrote :

OK Sorry about that, I just did a clean install of 10.10, and it works. Happy Days :)

Changed in xserver-xorg-video-intel:
importance: Critical → Unknown
Changed in xserver-xorg-video-intel:
importance: Unknown → Critical
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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