All times are UTC-06:00




Post new topic  Reply to topic  [ 28 posts ] 
Author Message
PostPosted: Wed Jul 04, 2007 7:36 am 
Offline

Joined: Mon Jan 30, 2006 7:24 am
Posts: 43
Location: Budapest, Hungary
Image

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.


Top
   
 Post subject:
PostPosted: Wed Jul 04, 2007 10:40 am 
Interesting tutorial !

I will try it on my Efika, and maybe will add it to the next Efika book version in the Debian section (If you agree of course).


Top
   
 Post subject:
PostPosted: Wed Jul 04, 2007 11:26 am 
Offline

Joined: Mon Jan 30, 2006 7:24 am
Posts: 43
Location: Budapest, Hungary
Quote:
I will try it on my Efika, and maybe will add it to the next Efika book version in the Debian section (If you agree of course).
Sure. Feel free to add it. Anyway, i wrote it from memory, because i setup the system a few weeks ago. So if you found something missing, or something extra settings needed, please report.


Top
   
 Post subject:
PostPosted: Thu Jul 05, 2007 3:23 am 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
Quote:
I will try it on my Efika, and maybe will add it to the next Efika book version in the Debian section (If you agree of course).
Sure. Feel free to add it. Anyway, i wrote it from memory, because i setup the system a few weeks ago. So if you found something missing, or something extra settings needed, please report.
You could remove the "int10" and "vbe" drivers from the modules section; they are completely irrelevant on PowerPC as there is no "int 10" and you can't access the VBE BIOS on the graphics card without a seperate emulation package. There is no point for either on Radeon anyway, as all the functionality and more is provided in the real Radeon driver.

It doesn't make much difference but with a slow disk and the Efika CPU, why burden it with loading 2 drivers it will just throw away again? Speed up your X.org startup time by a good half a second!

For performance you may want to enable
Code:
Option "EnablePageFlip" "true"
Option "ColorTiling" "true"
Option "BackingStore" "true"
Option "RenderAccel" "true"
I always like to make people set Option "DDCMode" "on" as it makes monitor usage so much easier (no modelines required, if your monitor works) but not many people seem to agree. Setting Option "UseFBDev" "false" may also put some peoples' minds at ease, even if it is the default :)

EnablePageFlip might be faster, might be slower on some systems. ColorTiling is on by default but it never hurts to force it. RenderAccel will speed up things like antialiased font rendering. BackingStore is like SmartRefresh for Amiga/MorphOS - it uses video memory to remember the damaged contents of windows. It may not be so necessary in a 3D desktop where Composite and the OpenGL stack is handling all of that stuff.. but everybody turns it on. Why not, eh? :)

_________________
Matt Sealey


Top
   
 Post subject:
PostPosted: Thu Jul 05, 2007 12:23 pm 
Offline

Joined: Sun May 08, 2005 8:46 pm
Posts: 559
Location: Paris
well i'll try all of these once i'll manage to get direct rendering, i got the same radeon card as you have but rendering is indirect.


Top
   
 Post subject:
PostPosted: Thu Jul 05, 2007 12:53 pm 
Offline

Joined: Wed Apr 04, 2007 12:35 pm
Posts: 33
Location: Houston, TX
Quote:
well i'll try all of these once i'll manage to get direct rendering, i got the same radeon card as you have but rendering is indirect.
I'd offer some advice, but I don't remember what voodoo I performed to get DRI working properly on mine, either :/ Have you had DRI working before? Maybe paste what you've got and someone might have a tip.

_________________
I <3 tiny computers.


Top
   
 Post subject:
PostPosted: Thu Jul 05, 2007 1:56 pm 
Offline

Joined: Sun May 08, 2005 8:46 pm
Posts: 559
Location: Paris
Quote:
I'd offer some advice, but I don't remember what voodoo I performed to get DRI working properly on mine, either :/ Have you had DRI working before? Maybe paste what you've got and someone might have a tip.
hey James !

well i never got DRI to work here, but i'll work on that this weekend. I may ask for help if it gets on my nerves :) thx !


Top
   
 Post subject:
PostPosted: Thu Jul 05, 2007 6:12 pm 
Offline

Joined: Mon Jan 30, 2006 7:24 am
Posts: 43
Location: Budapest, Hungary
Quote:
You could remove the "int10" and "vbe" drivers from the modules section; they are completely irrelevant on PowerPC as there is no "int 10" and you can't access the VBE BIOS on the graphics card without a seperate emulation package. There is no point for either on Radeon anyway, as all the functionality and more is provided in the real Radeon driver.
True. I just didn't care enough to remove them till now. :)
Quote:
For performance you may want to enable
Code:
Option "EnablePageFlip" "true"
Option "ColorTiling" "true"
Option "BackingStore" "true"
Option "RenderAccel" "true"
My tutorial also has three of these enabled, and according to XOrg docs, RenderAccel is enabled by default. That's why i omitted it.
Quote:
I always like to make people set Option "DDCMode" "on" as it makes monitor usage so much easier (no modelines required, if your monitor works) but not many people seem to agree. Setting Option "UseFBDev" "false" may also put some peoples' minds at ease, even if it is the default :)
Indeed... :) But i guess these are default settings anyway? At least my monitor's DDC info is detected, and i have no modelines, nor this option...


Top
   
 Post subject:
PostPosted: Sun Jul 22, 2007 4:49 am 
Offline

Joined: Sat Jul 21, 2007 5:21 pm
Posts: 46
Any chance someone could post those steps to get DRI working..? I have an Asus AGP Radeon 9250 that should be compatible, but directacceleration doesn't seem to be enabled and I *really* want to try this out.


Top
   
 Post subject:
PostPosted: Sun Jul 22, 2007 4:53 am 
Offline

Joined: Mon Jan 30, 2006 7:24 am
Posts: 43
Location: Budapest, Hungary
Quote:
Any chance someone could post those steps to get DRI working..?
I don't get your problem. The description INCLUDES steps to get DRI working...


Top
   
 Post subject:
PostPosted: Sun Jul 22, 2007 6:54 am 
Offline

Joined: Sat Jul 21, 2007 5:21 pm
Posts: 46
Following those instructions, direct rendering is still listed as "no" when I run the glxinfo | grep direct command. I'm assuming I should be getting a "yes" there instead.
I'm still fairly new to Linux generally and trying to learn things as I go.


Top
   
 Post subject:
PostPosted: Mon Jul 23, 2007 6:55 am 
Offline

Joined: Mon Jan 30, 2006 7:24 am
Posts: 43
Location: Budapest, Hungary
Quote:
Following those instructions, direct rendering is still listed as "no" when I run the glxinfo | grep direct command.
You obviously missed something then, i guess.
Quote:
I'm assuming I should be getting a "yes" there instead.
Sure.
Quote:
I'm still fairly new to Linux generally and trying to learn things as I go.
Post the contents of your xorg.conf, and /var/log/Xorg.0.log files here, then we might be able to see what's wrong with your setup.


Top
   
 Post subject:
PostPosted: Mon Jul 23, 2007 8:16 am 
Offline

Joined: Sat Jul 21, 2007 5:21 pm
Posts: 46
Having just reinstalled Debian and xfce4 I'm back to the default xorg.conf file now. The section for the Radeon card (Asus A9250 AGP8x 128MB for the record - it was recommended by Matt) currently just reads:
Code:
Section "Device"
Identifier "ATI Technologies Inc RV280 [Radeon 9200 Pro]"
Driver "ati"
BusID "PCI:0:16:0"
Option "UseFBDev" "true"
EndSection
(And as you said, the default installer does add the `Section "DRI"` lines btw)

iirc the way I had it before the reinstall i had edited it to read:
Code:
Section "Device"
Identifier "ATI Technologies Inc RV280 [Radeon 9200 Pro]"
Driver "radeon"
BusID "PCI:0:16:0"
Option "AccelMethod" "XAA"
Option "XAANoOffscreenPixmaps" "true"

Option "EnablePageFlip" "1"
Option "ColorTiling" "1"

Option "UseFBDev" "false"
EndSection
Doing so and restarting X11 seemed to result in the glxinfo command returning "direct rendering: No"

More than likely I'm doing something basic wrong here... but hey, we all have to start learning somewhere. ;)


Top
   
 Post subject:
PostPosted: Mon Jul 23, 2007 8:32 am 
Offline

Joined: Fri Sep 24, 2004 1:39 am
Posts: 429
Location: Secure Networks / Sweden
Make sure you only use 'radeon' as driver.


Top
   
 Post subject:
PostPosted: Mon Jul 23, 2007 11:08 am 
Offline

Joined: Mon Jan 30, 2006 7:24 am
Posts: 43
Location: Budapest, Hungary
Quote:
More than likely I'm doing something basic wrong here... but hey, we all have to start learning somewhere. ;)
Sure you do something wrong... The most important option is missing from your configuration :
Code:
Option "BusType" "PCI"
You NEED and again: you ***NEED*** this, even if your Radeon is an AGP one. Because it doesn't work in AGP mode, but PCI mode, in the Efika, and in a Pegasos II. Practically the AGP riser of the Efika, and the AGP slot on a Pegasos II is just a PCI slot, with an AGP-compatible layout. But you have to tell this to the XOrg driver, because it detects the AGP chip, and tries to use the AGP extensions - which is impossible on Efika and Pegasos. Add this line below the "driver" line in your "device" section, restart X, and report back your results here.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 28 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
PowerDeveloper.org: Copyright © 2004-2012, Genesi USA, Inc. The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org.
All other names and trademarks used are property of their respective owners. Privacy Policy
Powered by phpBB® Forum Software © phpBB Group