Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fglrx ati-drivers dirty hack for xorg x11
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
coreutils
n00b
n00b


Joined: 16 Oct 2003
Posts: 25

PostPosted: Thu Apr 15, 2004 4:44 pm    Post subject: fglrx ati-drivers dirty hack for xorg x11 Reply with quote

I'm taking no credit for this tip.
I saw it somewhere else but thought I'd post it here since a lot of folks seem to have trouble with it.
After following this tip you should get decent frame-rates with glxgears/fgl_glxgears and no more "fbconfig" errors.

Here is what to do:

1. Backup the old file - just in case.
Code:
su -
cd /usr/lib/opengl/xorg-x11/lib
mkdir backup
mv libGL.so.1.2 ./backup

2. Create a symlink to the ati opengl file.
Code:
ln -s ../../ati/libGL.so.1.2 .

3. Make sure you are using the xorg-x11 opengl interface.
Code:
opengl-update xorg-x11

4. Log out of X and restart xdm if you use it.
Code:
/etc/init.d/xdm restart


Last edited by coreutils on Thu Apr 15, 2004 7:17 pm; edited 3 times in total
Back to top
View user's profile Send private message
frenkel
Veteran
Veteran


Joined: 13 May 2003
Posts: 1034
Location: .nl

PostPosted: Thu Apr 15, 2004 5:21 pm    Post subject: Reply with quote

Great! Thanks!
One thing -> you say "cd /usr/lib/opengl/xorg-x11" but it must be "cd /usr/lib/opengl/xorg-x11/lib"

Greets,
Frank
Back to top
View user's profile Send private message
coreutils
n00b
n00b


Joined: 16 Oct 2003
Posts: 25

PostPosted: Thu Apr 15, 2004 5:34 pm    Post subject: Correction Reply with quote

Thanks for pointing that out, Frank. I've corrected it.
Back to top
View user's profile Send private message
Twist
Guru
Guru


Joined: 03 Jan 2003
Posts: 414
Location: San Diego

PostPosted: Sat Apr 24, 2004 5:55 am    Post subject: Reply with quote

Don't know about anybody else, but this does not work for me (on two machines).

I am unable, with any amount of tweaking, to get Xorg running on an ATI card with hardware acceleration. This is very annoying. Is anybody running Xorg with an ATI card and getting hardware acceleration? If so which driver, the internal Xorg one or the fglrx?

-Twist
Back to top
View user's profile Send private message
UgolinoII
Tux's lil' helper
Tux's lil' helper


Joined: 25 Apr 2004
Posts: 119

PostPosted: Sun Apr 25, 2004 1:33 pm    Post subject: Reply with quote

I am.

Radeon 9700 pro / VIA KT400 chipset

I was having trouble until i spotted i was using ati-drivers-3.2.8-r1

so i tried

ACCEPT_KEYWORDS="~x86" emerge ati-drivers

which dropped ati-drivers-3.7.6-r1 on my box, then switched to the ati driver with opengl-update

here's of information which may or may not be of use !

CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
USE="-kde -qt gnome gtk gtk2 mmx 3dnow cjk nls canna kinput alsa"

%make menuconfig

Device Drivers --->
Character devices --->
<*> /dev/agpgart (AGP Support)
<*> VIA chipset support
[ ] Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)

% uname -a
Linux sarah 2.6.6-rc1 #3 SMP Tue Apr 20 20:51:32 GMT 2004 i686 AMD Athlon(tm) XP 2800+ AuthenticAMD GNU/Linux

% lsmod
Module Size Used by
fglrx 215076 7

% glxinfo
<snip>
direct rendering: Yes
<snip>
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON 9700 PRO Generic
OpenGL version string: 1.3 (X4.3.0-3.7.6)
<snip>

% dmesg
<snip>
Fire GL built-in AGP-support
Based on agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 816M
agpgart: Detected a Via Apollo KT400 chipset in AGP v2 compat mode at 0000:00:00.0
agpgart: Detected Via Apollo KT400 chipset
agpgart: unable to determine aperture size.
[fglrx] AGP detected, AgpState = 0x1f000a1b (hardware caps of chipset)
agpgart: Found an AGP 3.5 compliant device at 0000:00:00.0.
agpgart: Putting AGP V3 device at 0000:00:00.0 into 8x mode
agpgart: Putting AGP V3 device at 0000:01:00.0 into 8x mode
[fglrx] AGP enabled, AgpCommand = 0x1f000312 (selected caps)
[fglrx] free AGP = 121909248
[fglrx] max AGP = 121909248
[fglrx] free LFB = 122683392
[fglrx] max LFB = 122683392
[fglrx] free Inv = 0
[fglrx] max Inv = 0
[fglrx] total Inv = 0
[fglrx] total TIM = 0
[fglrx] total FB = 0
[fglrx] total AGP = 32768
<snip>

% fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON 9700 PRO Generic
OpenGL version string: 1.3 (X4.3.0-3.7.6)

%cat /proc/pci
PCI devices found:
Bus 0, device 0, function 0:
Host bridge: VIA Technologies, Inc. VT8377 [KT400 AGP] Host Bridge (rev 0).
Master Capable. Latency=8.
Prefetchable 32 bit memory at 0xd0000000 [0xd7ffffff].
Bus 0, device 1, function 0:
PCI bridge: VIA Technologies, Inc. VT8235 PCI Bridge (rev 0).
Master Capable. No bursts. Min Gnt=12.
Bus 0, device 8, function 0:
Unknown mass storage controller: CMD Technology Inc Silicon Image SiI 3112 SATARaid Controller (rev 2).
IRQ 17.
Master Capable. Latency=32.
I/O at 0xb000 [0xb007].
I/O at 0xb400 [0xb403].
I/O at 0xb800 [0xb807].
I/O at 0xbc00 [0xbc03].
I/O at 0xc000 [0xc00f].
Non-prefetchable 32 bit memory at 0xeb000000 [0xeb0001ff].
Bus 0, device 11, function 0:
Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller (rev 0).
IRQ 19.
Master Capable. Latency=32. Min Gnt=11.Max Lat=52.
I/O at 0xc400 [0xc4ff].
Non-prefetchable 32 bit memory at 0xeb001000 [0xeb001fff].
Bus 0, device 16, function 0:
USB Controller: VIA Technologies, Inc. USB (rev 128).
IRQ 21.
Master Capable. Latency=32.
I/O at 0xc800 [0xc81f].
Bus 0, device 16, function 1:
USB Controller: VIA Technologies, Inc. USB (#2) (rev 128).
IRQ 21.
Master Capable. Latency=32.
I/O at 0xcc00 [0xcc1f].
Bus 0, device 16, function 2:
USB Controller: VIA Technologies, Inc. USB (#3) (rev 128).
IRQ 21.
Master Capable. Latency=32.
I/O at 0xd000 [0xd01f].
Bus 0, device 16, function 3:
USB Controller: VIA Technologies, Inc. USB 2.0 (rev 130).
IRQ 21.
Master Capable. Latency=32.
Non-prefetchable 32 bit memory at 0xeb002000 [0xeb0020ff].
Bus 0, device 17, function 0:
ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge (rev 0).
Bus 0, device 17, function 1:
IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE (rev 6).
IRQ 20.
Master Capable. Latency=32.
I/O at 0xd400 [0xd40f].
Bus 0, device 17, function 5:
Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235 AC97 Audio Controller (rev 80).
IRQ 22.
I/O at 0xd800 [0xd8ff].
Bus 0, device 19, function 0:
Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 16).
IRQ 18.
Master Capable. Latency=32. Min Gnt=32.Max Lat=64.
I/O at 0xdc00 [0xdcff].
Non-prefetchable 32 bit memory at 0xeb003000 [0xeb0030ff].
Bus 0, device 20, function 0:
FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 70).
IRQ 16.
Master Capable. Latency=32. Max Lat=32.
Non-prefetchable 32 bit memory at 0xeb004000 [0xeb0047ff].
I/O at 0xe000 [0xe07f].
Bus 1, device 0, function 0:
VGA compatible controller: ATI Technologies Inc Radeon R300 ND [Radeon 9700 Pro] (rev 0).
IRQ 16.
Master Capable. Latency=255. Min Gnt=8.
Prefetchable 32 bit memory at 0xd8000000 [0xdfffffff].
I/O at 0xa000 [0xa0ff].
Non-prefetchable 32 bit memory at 0xe9000000 [0xe900ffff].
Bus 1, device 0, function 1:
Display controller: ATI Technologies Inc Radeon R300 [Radeon 9700 Pro] (Secondary) (rev 0).
Master Capable. Latency=32. Min Gnt=8.
Prefetchable 32 bit memory at 0xe0000000 [0xe7ffffff].
Non-prefetchable 32 bit memory at 0xe9010000 [0xe901ffff].

% grep -v "#" /etc/X11/xorg.conf

Section "dri"
Mode 0666
EndSection

Section "Module"
SubSection "extmod"
EndSubSection
Load "type1"
Load "freetype"
EndSection

Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "/usr/X11R6/lib/X11/fonts/local/"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
FontPath "/usr/share/fonts/jisx0213"
EndSection

Section "ServerFlags"
EndSection

Section "InputDevice"

Identifier "Keyboard1"
Driver "Keyboard"
Option "AutoRepeat" "500 30"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc101"
Option "XkbLayout" "gb"
EndSection

Section "InputDevice"

Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/mouse"
Option "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
Identifier "Monitor0"
HorizSync 31.5 - 48.4
VertRefresh 50 - 90
Option "DPMS"
EndSection

Section "Device"
Identifier "Standard VGA"
VendorName "Unknown"
BoardName "Unknown"
Driver "vga"
EndSection


Section "Device"
Identifier "ATI Graphics Adapter"
Driver "fglrx"
Option "no_accel" "no"
Option "no_dri" "no"
Option "DesktopSetup" "0x00000000"
Option "MonitorLayout" "AUTO, AUTO"
Option "IgnoreEDID" "off"
Option "HSync2" "unspecified"
Option "VRefresh2" "unspecified"
Option "ScreenOverlap" "0"
Option "NoTV" "yes"
Option "TVStandard" "NTSC-M"
Option "TVHSizeAdj" "0"
Option "TVVSizeAdj" "0"
Option "TVHPosAdj" "0"
Option "TVVPosAdj" "0"
Option "TVHStartAdj" "0"
Option "TVColorAdj" "0"
Option "GammaCorrectionI" "0x00000000"
Option "GammaCorrectionII" "0x00000000"
Option "Capabilities" "0x00000000"
Option "VideoOverlay" "on"
Option "OpenGLOverlay" "off"
Option "CenterMode" "off"
Option "PseudoColorVisuals" "off"
Option "Stereo" "off"
Option "StereoSyncEnable" "1"
Option "FSAAScale" "1"
Option "FSAADisableGamma" "no"
Option "FSAACustomizeMSPos" "no"
Option "FSAAMSPosX0" "0.000000"
Option "FSAAMSPosY0" "0.000000"
Option "FSAAMSPosX1" "0.000000"
Option "FSAAMSPosY1" "0.000000"
Option "FSAAMSPosX2" "0.000000"
Option "FSAAMSPosY2" "0.000000"
Option "FSAAMSPosX3" "0.000000"
Option "FSAAMSPosY3" "0.000000"
Option "FSAAMSPosX4" "0.000000"
Option "FSAAMSPosY4" "0.000000"
Option "FSAAMSPosX5" "0.000000"
Option "FSAAMSPosY5" "0.000000"
Option "UseFastTLS" "0"
Option "BlockSignalsOnLock" "on"
Option "UseInternalAGPGART" "yes"
Option "ForceGenericCPU" "no"
Screen 0
EndSection

Section "Screen"
Identifier "Screen0"
Device "ATI Graphics Adapter"
Monitor "Monitor0"
DefaultDepth 24

Subsection "Display"
Depth 8
Modes "1280x1024" "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection

Subsection "Display"
Depth 16
Modes "1280x1024" "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection

Subsection "Display"
Depth 24
Modes "1280x1024" "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection

EndSection

Section "ServerLayout"

Identifier "Server Layout"
Screen "Screen0"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"

EndSection
Back to top
View user's profile Send private message
ohoiza
n00b
n00b


Joined: 31 Aug 2003
Posts: 45
Location: l0wer bavaria

PostPosted: Mon Apr 26, 2004 4:52 pm    Post subject: Reply with quote

this hack doesn't work for me either... i've got an ati radeon 9800 in my box running on a 2.6.5-love5 kernel, dri had been working until the update to xorg, now fgl_glxgears reports:
Code:
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  144 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  31
  Current serial number in output stream:  31

output of fglrxinfo:
Code:
display: :0.0  screen: 0
OpenGL vendor string: Mesa project: www.mesa3d.org
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.2 (1.4 Mesa 5.0.2)

unreal tournament is just a plain slideshow, glxgears only brings up ~300fps :?

a part of my /var/log/Xorg.0.log:
Code:

(...)
(II) fglrx(0): [drm] created "fglrx" driver at busid "PCI:2:0:0"
(II) fglrx(0): [drm] added 8192 byte SAREA at 0xe0982000
(II) fglrx(0): [drm] mapped SAREA 0xe0982000 to 0x402bb000
(II) fglrx(0): [drm] framebuffer handle = 0xd8000000
(II) fglrx(0): [drm] added 1 reserved context for kernel
(II) fglrx(0): DRIScreenInit done
(II) fglrx(0): Kernel Module Version Information:
(II) fglrx(0):     Name: fglrx
(II) fglrx(0):     Version: 3.2.8
(II) fglrx(0):     Date: Sep 21 2003
(II) fglrx(0):     Desc: ATI Fire GL DRM kernel module
(WW) fglrx(0): Kernel Module version does *not* match driver.
(EE) fglrx(0): incompatible kernel module detected - HW accelerated OpenGL will not work
(II) fglrx(0): [drm] removed 1 reserved context for kernel
(II) fglrx(0): [drm] unmapping 8192 bytes of SAREA 0xe0982000 at 0x402bb000
(WW) fglrx(0): ***********************************************
(WW) fglrx(0): * DRI initialization failed!                  *
(WW) fglrx(0): * (maybe driver kernel module missing or bad) *
(WW) fglrx(0): * 2D acceleraton available (MMIO)             *
(WW) fglrx(0): * no 3D acceleration available                *
(WW) fglrx(0): ********************************************* *
(...)

the (EE) line seems to be the main troublemaker - although i have recompiled ati-drivers several times it still complains about "incompatible" modules...
it's also quite strange that it reports the version of the kernel module as 3.2.8 - i'm pretty sure that the module in /lib/modules/2.6.5-love5/video is the one i just compiled a minute ago:
Code:
-rw-r--r--    1 root     root       271707 2004-04-26 18:50 /lib/modules/2.6.5-love5/video/fglrx.ko

does someone experience similar behaviour?
EDIT: hmm, i just had to "rmmod fglrx" and restart xorg, it seems like there was still an old version of fglrx.ko in memory... now it works fine. shame on me :oops:
Back to top
View user's profile Send private message
Nate_S
Guru
Guru


Joined: 18 Mar 2004
Posts: 414

PostPosted: Mon Apr 26, 2004 5:28 pm    Post subject: Reply with quote

Did ati just release an xorg compatible driver? All I had to do was emerge the latest ~x86 ati-drivers and opengl-update ati and it worked. I can't yet comment on the glxgears score as I am compiling xscreensaver, but it even now gives like 2300 or so. I'd think that means it is working and it spits out no error messages.
Back to top
View user's profile Send private message
Sastraxi
Apprentice
Apprentice


Joined: 25 Feb 2003
Posts: 258

PostPosted: Mon Apr 26, 2004 10:40 pm    Post subject: Reply with quote

Does fgl_glxgears give "error: fbconfig not found" or some malarky like that? If not, then maybe they have :lol: Even though I just installed and I did this little hack (https://forums.gentoo.org/viewtopic.php?t=158911&start=50 ... last post).

Last edited by Sastraxi on Fri Jul 02, 2004 3:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
SkidSoft
n00b
n00b


Joined: 24 Jul 2003
Posts: 48

PostPosted: Wed May 05, 2004 5:26 pm    Post subject: Reply with quote

Man I still get problems with X and glx. I'm using a Radeon 9500 on an A7N8X-E Deluxe under Xorg and have so many issues. I've tried all of these workarounds and to no avail.
_________________
--------------------------------------------------
Skid

And he got his head sent home in a freezerbag!
--Bill Murray in The Man Who Knows Too Little
Back to top
View user's profile Send private message
MasterMind
Tux's lil' helper
Tux's lil' helper


Joined: 16 Sep 2003
Posts: 84
Location: Ljubljana, Kozarje

PostPosted: Sat May 08, 2004 4:08 pm    Post subject: Reply with quote

Me too. When I first compiled xorg. It worked ok. But when I recompiled my kernel... No more OpenGL. What to do now? Recompile X.Org drivers?
Back to top
View user's profile Send private message
MasterMind
Tux's lil' helper
Tux's lil' helper


Joined: 16 Sep 2003
Posts: 84
Location: Ljubljana, Kozarje

PostPosted: Sun May 09, 2004 9:41 pm    Post subject: Reply with quote

I found the problem!! How to fix it? Into kernel compile DRM support (radeon as module). And when kernel finish its compile, type emerge /usr/portage/media-video/ati-drivers/ati-drivers<latest-version>.ebuild.

Why do you need compiled DRM support? Becouse ATI drivers use there own DRM, thats uses Kernel ones... So you need to compile radeon drivers as module. (you don't have to load the modules...) :D That worked for me...

(O. And when did I found about this? When my network drivers died, so I recompiled the kernel. And reemerged ati-drivers and I suspected something...) :D

Hope this will work for you too.. (I have Radeon 9500 PRO)
Back to top
View user's profile Send private message
Anusko
n00b
n00b


Joined: 19 May 2004
Posts: 1

PostPosted: Wed May 19, 2004 11:19 pm    Post subject: Reply with quote

I've done this "hack" and know when I run glxgears I get this:

glxgears: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory.

I think that it's because I've done the trick and only instaled ati-drivers-3.7.6-r1 after doing the trick...
help pls :wink:
Back to top
View user's profile Send private message
Realmaker
l33t
l33t


Joined: 17 Sep 2003
Posts: 683
Location: Bremen, Germany

PostPosted: Sat May 22, 2004 5:19 pm    Post subject: Reply with quote

Anusko wrote:
glxgears: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory.

I get the same with the 3.2.8-r1-drivers :?
_________________
Athlon 2600+ Barton, Asus A7N8x-X, nForce2, Asus Geforce FX5700 256mb, TwinMos 512ddr-sdram cl 2.5

Wer andern eine Bratwurst brät, der hat ein Bratwurstbratgerät.
Back to top
View user's profile Send private message
Richy
n00b
n00b


Joined: 28 Mar 2004
Posts: 65
Location: Berlin

PostPosted: Sat Jun 05, 2004 11:34 am    Post subject: Reply with quote

I got the same mistake until i switched bak with
opengl-update ati
now i have twice fps :)

Thank you
Back to top
View user's profile Send private message
Sastraxi
Apprentice
Apprentice


Joined: 25 Feb 2003
Posts: 258

PostPosted: Sun Jun 13, 2004 7:48 pm    Post subject: Reply with quote

Thought I'd finalise this thread by saying the 3.9.0 drivers no longer need this. opengl-update xorg-x11 works a charm, now.
Back to top
View user's profile Send private message
0ctane
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2003
Posts: 115
Location: Cincinnati, OH

PostPosted: Fri Jul 02, 2004 1:24 pm    Post subject: Re: fglrx ati-drivers dirty hack for xorg x11 Reply with quote

coreutils wrote:

Code:
ln -s ../../ati/libGL.so.1.2 .

another error. this should be
Code:
ln -s ../../ati/lib/libGL.so.1.2 .

Although this still does not help me out.

EDIT: oops, I had removed my DRI section from xorg.conf. everything is peachy now.
_________________
<signature></signature>
-----------------------------
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum