How to run googleearth with compiz or how to enable direct rendering

Asked by Daniel Castro

Hello,

I have a problem when I run googleearth and compiz together. Basically GE will look very bad, like constant refreshing and the images are not rendered properly, they look like bad pixeled...
After a lot of googleing I was able to narrow this to be a problem with compiz and GE. If I turn visual effects off then GE runs fine. I think this might be because direct rendering is not on.

daniel@BlackBeauty:~$ glxinfo | grep direct
direct rendering: No (LIBGL_ALWAYS_INDIRECT set)

I am on Ubuntu 8.10 and my video card is:

daniel@BlackBeauty:~$ lspci | grep -i vga
lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)

Is there a fix for this?
A way of running GE without using desktop effects just for that application?
Or could I somehow enable direct rendering, and will that fix the problem?

My only workaround at the moment is to turn off visual effect whenever I want to run GE, but I hate this because it brings all my opened windows to the first workspace.
I remember in the days of Ubuntu 7.10 and 8.04 GE used to worked fine, so I assume direct rendering used to work fine as well.

Any help or pointers on how to fix this are much appreciated.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu compiz Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Ufuk (ufukkilicaslan) said :
#1

Regardless the desktop effects or GE, you should have direct rendering on. It shows that the drivers for your graphic card is correctly installed. Run:

gksudo jockey-gtk

to enable restricted drivers for you card. If it doesn't work, you should try envyng program to install correct drivers. So if you have correct drivers installed and xorg.conf file correctly configured, you get direct rendering on.

So I suggest you to focus on a working graphic card drivers before this GE/Compiz conflict.

Revision history for this message
Daniel Castro (castromd) said :
#2

Thanks Ufuk. But....
The jockey-gtk tool only shows me restricted drivers for my wireless card. How can I make it show restricted drivers for my video card? I didn't even know there where restricted drivers for intel video cards.
I have no idea of what envyng is, never used it, but having a quick look it seems to be used to install ATI and Nvidia drivers, how would this be relevant for me?
You say I should focus on getting the graphic card drivers working, but mine are working. Everything else works fine, visual effects works.
Any other suggestions?

Revision history for this message
Ufuk (ufukkilicaslan) said :
#3

Hello,
Apparently you have an Intel Graphics card. You can not use envyng and jockey-gtk. So you have to use synaptic to find and install correct driver for your card. In this case, you have to install:

xserver-xorg-video-intel

package if it is not. And also install libgl1-mesa-dri package if it is not. These packages are needed for direct rendering.

After installing these, do not forget to reboot.

Revision history for this message
Daniel Castro (castromd) said :
#4

Hi,

I had checked this already, both installed.

Revision history for this message
Ufuk (ufukkilicaslan) said :
#5

Section "Device"
 Identifier "Configured Video Device"
 Driver "intel"
 Option "UseFBDev" "true"
EndSection

How is your device section of /etc/X11/xorg.conf ? Can you paste the content of xorg.conf to http://paste.ubuntu.com and send the address?

Revision history for this message
Daniel Castro (castromd) said :
#6

Here you go: http://paste.ubuntu.com/136187/

Thanks!

Revision history for this message
Ufuk (ufukkilicaslan) said :
#7

Could you please try the device options that I wrote in my message? Open xorg.conf with:

gksudo gedit /etc/X11/xorg.conf

and add the driver and option lines like this, save it and re-login.

Section "Device"
 Identifier "Configured Video Device"
 Driver "intel"
 Option "UseFBDev" "true"
EndSection

Revision history for this message
Daniel Castro (castromd) said :
#8

Ok. So my xorg.conf file now looks like: http://paste.ubuntu.com/136236/

Is that what you meant?

After changing that I ctrl+alt+backspace, logged in and visual effects where still on but things looked a bit different, different icons and stuff. So I tried to go into gnome-appearance-properties but it said that the deamon was not running. So I then rebooted and after that things looked normal but direct rendering is still off.

Revision history for this message
Ufuk (ufukkilicaslan) said :
#9

Hello,

Something is weird with this:

Section "Screen"
 Identifier "Default Screen"
 Monitor "Configured Monitor"
 Device "Configured Video Device"
 SubSection "Display"
  Virtual 2880 900
 EndSubSection

--Did you add the "Virtual" line by yourself? It looks wrong. Change this according to your resolution like this:

Section "Screen"
 Identifier "Default Screen"
 Monitor "Configured Monitor"
 Device "Configured Video Device"
 DefaultDepth 24
 SubSection "Display"
  Depth 24
  Modes "1680x1050" "1280x1024" "1440x900" "1024x768" "800x600"
 EndSubSection
EndSection

This is mine. I use my screen with 1680x1050. You should change these modes according to your resolution. If you don't use 1680x1050 delete it. Change them carefully according to what resolutions you can use. And then save it. Then open up a terminal and execute these commands:

sudo rm -R ~/.config/compiz

mkdir -p ~/.config/compiz/ && echo SKIP_CHECKS=yes >> ~/.config/compiz/compiz-manager

Reboot and try again.

Revision history for this message
Daniel Castro (castromd) said :
#10

Hi,

So now my xorg.conf looks like: http://paste.ubuntu.com/136275/

But direct rendering still not working. In case it matters, this is on a Thinkpad T61, on a docking station, laptop closed and and external monitor.

Revision history for this message
Daniel Castro (castromd) said :
#11

Yes... still
direct rendering: No (LIBGL_ALWAYS_INDIRECT set)

So how does this work? Will having a "perfect" xorg.conf file make direct rendering work? Or do I need to do something else to turn it on?

Revision history for this message
Ufuk (ufukkilicaslan) said :
#12

Yes, it matters because of the specifi monitor and resolution settings. But I still don't understand the direct rendering problem. I think we should research more about your card and find some topics about it. We should focus on the problem and google for possible solutions and xorg.conf workarounds.

Revision history for this message
Daniel Castro (castromd) said :
#13

So this is the computer: http://www.thinkwiki.org/wiki/Category:T61
This the graphics card: http://www.thinkwiki.org/wiki/Intel_Graphics_Media_Accelerator_X3100
Ans this Ubuntu specific stuff:
http://www.thinkwiki.org/wiki/Installing_Ubuntu_8.04_(Hardy_Heron)_on_a_ThinkPad_T61
http://www.thinkwiki.org/wiki/Installing_Ubuntu_8.10_(Intrepid_Ibex)_on_a_ThinkPad_T61

There it says "The driver supports hardware accelerated 3D via the Direct Rendering Infrastructure (DRI), but only in depths 16 and 24. "

Revision history for this message
Daniel Castro (castromd) said :
#14

Hi,

I did a test. I booted up from the 8.10 Live CD and:

ubuntu@ubuntu:~$ glxinfo | grep direct
direct rendering: Yes

xserver-xorg-video-intel 2:2.4.1-1ubuntu10.3 (Same version as the one I have installed)
libgl1-mesa-dri 7.2-1ubuntu2 (Same version as the one I have installed)

And the xorg.conf looked like:

Section "Device"
 Identifier "Configured Video Device"
EndSection

Section "Monitor"
 Identifier "Configured Monitor"
EndSection

Section "Screen"
 Identifier "Default Screen"
 Monitor "Configured Monitor"
 Device "Configured Video Device"
EndSection

So I'm guessing somewhere along the line (updates or some installation) things got broken.
Does this help in any way?

Thanks!

Revision history for this message
Ufuk (ufukkilicaslan) said :
#15

Hello,
Could you please try this command and reboot after doing this and try again?

sudo dpkg-reconfigure -phigh xserver-xorg

Revision history for this message
Daniel Castro (castromd) said :
#16

Hi,

Tried the command you gave me and direct rendering is still not on. I also tried the command:

unset LIBGL_ALWAYS_INDIRECT

and that seemed to turn it on, but I don't think it is working properly. googleearth still looks bad.

Revision history for this message
Daniel Castro (castromd) said :
#17

Have a look at this thread I started on the linux thinkpad mailer: http://www.nabble.com/xorg.conf-and-direct-rendering-on-a-T61-td22671184.html
It might give you some ideas.

Thanks!

Revision history for this message
Daniel Castro (castromd) said :
#18

I was thinking about this and the command

unset LIBGL_ALWAYS_INDIRECT

seems to turn direct rendering on, but I think this should be done before or during X is started or something like that. Maybe starting it at a later stage as I tried will not work.
What do you think?
You think running that command at an earlier stage would fix the problem?

At some point there must me an entry saying "set LIBGL_ALWAYS_INDIRECT" right? Changing that "set" to "unset" is what I'm thinking....

Revision history for this message
Daniel Castro (castromd) said :
#19

Any new ideas on how to go about this?

Thanks.

Revision history for this message
Ufuk (ufukkilicaslan) said :
#20

Is unset LIBGL_ALWAYS_INDIRECT command solving your direct rendering problem? If so, do you think that it should be added to system startup scripts to start with boot? I have not encountered this kind of problem but you can make rc.local script to add it to the boot. Let me research more.

Revision history for this message
Daniel Castro (castromd) said :
#21

The unset LIBGL_ALWAYS_INDIRECT command is NOT solving my problem. I just thought that running it at boot would make a difference. I will try this in a few hours and come back with the results. Let me know if you have any other ideas.

Revision history for this message
Daniel Castro (castromd) said :
#22

Running the unset LIBGL_ALWAYS_INDIRECT command on a rc.local script did not work either.

Revision history for this message
Nathanael Dale (ndale) said :
#23

This little issue has annoyed me for a very long time, it is not a problem with your direct rendering. Unfortunately i have never found a way to make windowed direct rendering work with compiz enabled with any AIGLX drivers. The reason that it worked in the past was most likely because the older driver did not support AIGLX and was using Xgl. You might try to track down an old driver that does not support AIGLX and install the xserver-xgl package. Otherwise wait on DRI2 to be released which should solve the problem for good, the unfortunate thing is that the driver has to be written for DRI2 as well so who knows how long it will take for any of the proprietary drivers to support it. Many ATI and Intel cards are effected by this issue, basically any whose drivers use the Xorg DRI. Nvidia is not effected because they have their own direct rendering infrastructure implementation.

Potential partial solution:
in CompizConfig go to "general" and check "disable input redirection"
then in GoogleEarth make it full screen with F11 (may have to toggle it twice in Gnome because the panels try to stay on top the first time) there is still some flickering in the menus as you search and so forth but for me the actual 3D view works great this way, you may want to setup all the fullscreen preferences with compiz disabled first.

Related issue, Video flicker on about any kind of video:
this one is easy to fix, in xorg add the below three options under your "device" section
 Option "TexturedVideo" "off"
 Option "VideoOverlay" "off"
 Option "OpenGLOverlay" "on"

This article is great for explaining AIGLX and Xgl, i would not exactly call it a quick read but i would highly recommend you check it out. http://www.vis.uni-stuttgart.de/~hopf/pub/LinuxTag2007_compiz_NextGenerationDesktop_Paper.pdf

Revision history for this message
Nathanael Dale (ndale) said :
#24

Minor edit. The option in compiz that need to be checked is "Unredirect Fullscreen Windows" if you want to try that option

Revision history for this message
Daniel Castro (castromd) said :
#25

Hi Nathanael,

Thanks for your recommendation. Unfortunately it didn't work. Trying to do the full screen thing actually made X die, with Compiz off I was able to do full screen but as soon as I try to turn Compiz on problems came back. So no workaround yet. I suppose it's on of those things that, as you said, will get fixed eventually.

Revision history for this message
Launchpad Janitor (janitor) said :
#26

This question was expired because it remained in the 'Open' state without activity for the last 15 days.