Saturday, December 13, 2008

glxgears shows blank window

I am trying to get opengl working on my Fedora 10 macbook (2,1). glxgears seems to be a good check for that.

The video card is:

00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME,
943/940GML Express Integrated Graphics Controller (rev 03)
I had xorg-x11-drv-i810-2.5.0-4.fc10.x86_64 installed. Yet whenevever I ran glxgears I saw blank screen.

I had to do some changes to my /etc/X11/xorg.conf, now the relevant sections look like:

Section "Device"
Identifier "Videocard0"
Driver "intel"
Option "NoAccel" "True"
Option "DRI" "True"
EndSection


I restarted x-server by logging back in and glxgears started showing the rotating gears.

[Note: after doing above changes I started seeing that my display would not refresh after some intervals. The work around I am using so far is, either relogin or change to text console terminal (ctrl+alt+F2) and switch back to graphical console (ctrl+alt+F1)]

Update:

I now realize what I have done. By setting 'NoAccel' to 'True' I have turned off the acceleration in hardware. Although this makes my opengl programs work, it means all the acceraltion is done in software - as is evident from the 90+% CPU during running of these programs. It also proves that the graphics card driver fails to accelerate graphics in hardware.

This is not a big issue for me, because I am using this setup just to develop some basic opengl programs. So I can live with the CPU hog.

Also by not loading the 'intel' Driver I seem to have fixed the screen freeze problem I mentioned above. Now my xorg.conf entry looks like this:

Section "Device"
Identifier "Videocard0"
Option "NoAccel" "True"
EndSection