LIBGL_ALWAYS_INDIRECT set when it shouldn't be

Bug #137388 reported by Craig
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
desktop-effects (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Start with Appearance panel Desktop Effects preference set to "No effects."
Start a terminal and enter: "glxinfo | grep direct"
Result: direct rendering: Yes
Now go back into the Appearance panel's Desktop Effects and set it to "Normal Effects".
Run "glxinfo | grep direct" again
Result: direct rendering: Yes

Looks good - everything works, performance is great.

Now, log out, and log back in.
Run "glxinfo | grep direct" again
Result: direct rendering: No (LIBGL_ALWAYS_INDIRECT set)
Also, performance isn't as good (display feels laggy)

I cannot figure out where LIBGL_ALWAYS_INDIRECT is set. It should not be set on this configuration.

I'm using an r300 card, and the radeon driver on Gutsy.

Thanks!

Revision history for this message
Rodrigo Virote Kassick (kassick) wrote :

Same here, except that usually LIBGL_ALWAYS_INDIRECT desapears after logging out and in again (once or twice ...)

The variable is set in /usr/bin/compiz when glxinfo does not report GLX_EXT_texture_from_pixmap twice. Weird thing is, openning a shell, unsetting the ALWAYS_INDIRECT thing and running the same test, it works .... texture from pixmap is reported twice as expected ...

I'll comment out this check and see what happens on the long run.

Revision history for this message
jokker (david-las-solanas) wrote :

I have the same problem. I do have the cube working using compiz-fusion, but glxgears is really choppy ... How can we fix this ???

Revision history for this message
Alexei Colin (alexei.colin) wrote :

Same problem on Ubuntu Gutsy (Kernel 2.6.24-4) on Thinkpad T60 with ATI Radeon X1400
and ATI's fglrx v8.01, and Compiz.

When LIBGL_ALWAYS_INDIRECT is set (default, unfortunately):
- glxgears: a bit choppy at fps=3500
- fgl_glxgears: Segmentation fault

When LIBGL_ALWAYS_INDIRECT is unset (manually in a terminal):
- glxgears: works at fps=4200
- fgl_glxgears: works at fps=900 (without window decoration, though)

Compiz works smoothly; suspend/resume works also.

A separate fix would be to fix the "segmentation fault" in fgl_glxgears and replace it with
an informative error message about LIBGL_ALWAYS_INDIRECT

Revision history for this message
Adrien Robin (ninoaderri) wrote :

In fact, that's not a real bug : compiz indeed sets LIBGL_ALWAYS_INDIRECT for its own process and for his child processes only. compiz needs that to work properly.
It means that if you start a terminal from the Gnome/KDE menu, you'll get "direct rendering: Yes". On the other hand, if you start gnome-terminal for instance via compiz using a key binding for example, you will get "direct rendering: No (LIBGL_ALWAYS_INDIRECT set)".

The problem is in fact a bit more complex : when I start gnome-terminal from the gnome menu, I get "direct rendering: No (LIBGL_ALWAYS_INDIRECT set)" : as I activated transparency for the background of gnome-terminal, it starts as child process of compiz. So, all is all right : xterm, which is very spartan and doesn't support transparency, prints "direct rendering: Yes" when started from the gnome menu.

Revision history for this message
Adrien Robin (ninoaderri) wrote :

In fact, that's not a real bug : compiz indeed sets LIBGL_ALWAYS_INDIRECT for its own process and for his child processes only. compiz needs that to work properly.
It means that if you start a terminal from the Gnome/KDE menu, you'll get "direct rendering: Yes". On the other hand, if you start gnome-terminal for instance via compiz using a key binding for example, you will get "direct rendering: No (LIBGL_ALWAYS_INDIRECT set)".

The problem is in fact a bit more complex : when I start gnome-terminal from the gnome menu, I get "direct rendering: No (LIBGL_ALWAYS_INDIRECT set)" : as I activated transparency for the background of gnome-terminal, it starts as child process of compiz. So, all is all right : xterm, which is very spartan and doesn't support transparency, prints "direct rendering: Yes" when started from the gnome menu.

Changed in desktop-effects:
status: New → Invalid
Revision history for this message
Alexei Colin (alexei.colin) wrote :

Yes, confirmed:
- if I start 'konsole' from gnome menu: "Direct rendering: Yes" and fgl_glxgears works (w/ out window decoration).
- if I start a 'gnome-termina'l using a key binding: "Direct redering: No" and fgl_glxgears segfaults.
Thanks for this information, never would have known!

DeadVirus (amfcosta13)
Changed in desktop-effects (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
lavinog (lavinog) wrote :

I just noticed this in a qemu vm with lucid. Desktop effects is not enabled, but launching the terminal with ctrl-alt-T I get direct rendering: No (LIBGL_ALWAYS_INDIRECT set)
If I launch from the menu or alt-f2 then gnome-terminal I get yes.

I am trying to troubleshoot some other weirdness and thinking the I didn't have direct rendering really threw me off track.
Why is this the normal behavior?

Revision history for this message
Phillip Susi (psusi) wrote :

This package has been removed from Ubuntu. Closing all related bugs.

Changed in desktop-effects (Ubuntu):
status: Confirmed → Invalid
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.