Since the release of Debian GNU/Linux 4.0 "Etch", it's possible to have a basic version of nowaday's Holy Grail on Efika, using
standard packages: a 3D desktop. To have it, you need DRI, AIGLX and compiz up and running. This description assumes that you already have some basic X11 desktop, with default software installed. I recommend XFCE4, for the Efika. Unfortunately, due to a bit older than possible graphics card drivers included in Etch, it won't be fast or really useable, but it's a good toy, if you want to show the capabilities of the machine. As far as i know, you can expect much better performance with recent drivers, but if you want to avoid building from sources, you have to wait a bit for that now. So please don't expect wonders, but i really think it worths a look. So here we go.
1., Direct Rendering
First, of all, you need DRI. If you have an ATI Radeon card, like me, it's quite easy. Unfortunately, as far as i know XGI owners still need some patching, and compiling stuff from scratch, which is beyond the scope of this description. So, to have DRI working on your Radeon, just make sure your /etc/X11/xorg.conf has a "Device" section similar to this:
Code:
Section "Device"
Identifier "Generic Video Card"
Driver "radeon"
Option "BusType" "PCI"
Option "AccelMethod" "XAA"
Option "XAANoOffscreenPixmaps" "true"
Option "EnablePageFlip" "1"
Option "ColorTiling" "1"
EndSection
Also, make sure that you don't have UseFBDev option, or you have it disabled. If you have a BusID option, make sure it's correct, or either disable it. You don't really need it, as auto detection really should work.
Also note, that to have working DRI, you need to have a section like this:
Code:
Section "DRI"
Mode 0666
EndSection
If i remember correctly, Debian installer added this to my xorg.conf, but if you don't have it, add it to the bottom of xorg.conf file.
After you made the changes, save the file (you need to login as root for this), restart X11, then login as normal user, and check if you have DRI working in an X terminal:
Code:
charlie@sajtreszelo:~$ glxinfo | grep direct
direct rendering: Yes
charlie@sajtreszelo:~$
If you don't have a glxinfo command, install mesa-utils package first, with the following command (as root):
Code:
sajtreszelo:~# apt-get install mesa-utils
If you got a libGL warning while running glxinfo, just
ignore it.
So, if you got the above "direct rendering: Yes" answer, you managed to have DRI enabled, which is required to have 3D acceleration. If it doesn't work, you might not have a supported card (i have an R9250), or you mistyped something. You might need to dig yourself into
/var/log/Xorg.0.log, to see what went wrong.
2., Composite Extension, and AIGLX
To have composite extension enabled, be sure to have another section in xorg.conf, like this:
Code:
Section "Extensions"
Option "Composite" "Enable"
EndSection
You also need "dbe" module loaded. You find "Module" section in the earlier part of
xorg.conf. I have the following modules loaded:
Code:
Section "Module"
Load "dbe"
Load "i2c"
Load "bitmap"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "vbe"
EndSection
Depending on your configuration, this list may vary. Just be sure "dbe" is included in it, before "dri" and "glx".
Again, save the changes, and restart X. If everything is ok, you should have similar results of the following tests:
Code:
charlie@sajtreszelo:~$ cat /var/log/Xorg.0.log | grep "AIGLX enabled"
(==) AIGLX enabled
charlie@sajtreszelo:~$ cat /var/log/Xorg.0.log | grep "Compo"
(**) Extension "Composite" is enabled
If you've done everything right, your system is now prepared to drive compiz window manager, which is responsible for all the eyecandy and effects on your 3D desktop. We're also done with the hardware configuration part, the followings are not Efika specific at all. But in fact, if you have a Pegasos II or ODW, even the hardware configuration is the same! The very same xorg.conf just works fine on my Pegasos II/G4 + ATI Radeon 9000 configuration as well.
3., Installing compiz and friends
First, you need to install compiz, of course. Log in as root, and use apt-get, or your favourite package manager.
Code:
sajtreszelo:~# apt-get install compiz gnome-themes
Gnome-themes is required to let compiz use a bit better look&feel than it's default. You can proceed without it as well.
4., compiz meets XFCE4
You really shouldn't be running anything more bloated on your Efika than XFCE4, so we don't care about Gnome or KDE now. If you still run one of them, you will find gadzillions of howto's on the net, because this part is not Efika specific at all. So, to force XFCE4 to use compiz instead of xfwm4, you need to change it's default configuration.
Edit the file
/usr/share/desktop-base/profiles/xdg-config/xfce4-session/xfce4-session.rc, search for the "Failsafe Session" section, and change it to look like this:
Code:
[Failsafe Session]
Count=4
# Client0_Command=xfwm4
Client0_Command=compiz,--fast-filter
Save it. Please notice the comma in the compiz line. That is no typo, you need that there. After this, log out, log in into a non-X console, and delete your
.cache directory, where xfce4 keeps some session-specific variables cached. If you don't delete this, the default settings you've just changed, might not get applied. Don't worry, you only delete temporary files, your configuration is not affected.
Code:
charlie@sajtreszelo:~$ rm -r ./.cache
That's it. If you've done everything right, after you log in to your X session you now should have the rotating cube, bouncy windows, and other goodies. Some screenshots of my Efika running compiz are available here:
teh almighty cube,
teh almighty cube again,
switching tasks,
switching desktops using the film view.
5., That's all folks!
There. I hope you found this tutorial useful. If you want to disable compiz later, you only need to revert the changes in
xfce4-session.rc file, and empty
.cache directory again, as described. The rest of the changes are not harmful at all, and can safely remain untouched, however you might be able to free up some memory, if you disable composite extension again in
xorg.conf file.
Good luck, you're going to need it... :)
I'd like to read your opinions about this tutorial, also if you're better in Xorg/compiz/etc internals than me, then you might have hints how to make it faster.
Please post them.