PDA

View Full Version : 4870 Xorg.conf


zhark
09-02-2008, 08:00 PM
Hello!

Can someone help me with what settings should be present in the Device section (or otherwise) in Xorg.conf to make this card behave the best it possibly can?

MSI 4870 OC edition, Fglrx 8.8, Ubuntu Hardy 32-bit, Compix disabled.

The issues I'm currently experiencing is (in decreasing importance to me):

1. Random crashes. Sometimes my computer hangs instantly when loading Xorg from a fresh boot, most times not. One time it crashed when I just dragged a Nautilus window.
2. Tearing 2D and video (Mplayer with XV output, tried TexturedVideoSync, makes no difference)
3. Slow 3D performance (Quake4 feels more sluggish than on my previous 7800GT, playable though)

I've played a couple of hours of Crysis in Windows, where it runs absolutely beautifully, 1920x1200@HIGH settings (lag-free) is nothing short of stunning :-)
I'm really hoping that atleast the random crashes and video playback in Linux is fixed soon.

I'm patiently awaiting for new fglrx realeses, but in the meantime; anyone got some quick-fixes I could try?

Zhick
09-03-2008, 12:50 PM
2: That's known. The only way to get vsync on video is to use the opengl-output and to enable vsync in amdcccle for everything.

Don't know about the others. But Quake4 realy shouldn't be sluggish with that monster. Maybe you could post your glxgears numbers to see if 3d is generally to slow or if it's specific to quake4? Also maybe try EXA instead of XAA or the other way around. I'm not sure what's the better choice currently.

zhark
09-03-2008, 08:16 PM
2: That's known. The only way to get vsync on video is to use the opengl-output and to enable vsync in amdcccle for everything.

Don't know about the others. But Quake4 realy shouldn't be sluggish with that monster. Maybe you could post your glxgears numbers to see if 3d is generally to slow or if it's specific to quake4? Also maybe try EXA instead of XAA or the other way around. I'm not sure what's the better choice currently.

Thanks for the tip, I'll try out the stuff you mentioned tomorrow.

I tested glxgears now, I get 7500 fps with the 4870, with the 7800gt I get 12000 fps. The 4870 should be immensely more powerful than the 7800gt. But I guess glxgears can't be trusted?

deanjo
09-03-2008, 08:53 PM
Thanks for the tip, I'll try out the stuff you mentioned tomorrow.

I tested glxgears now, I get 7500 fps with the 4870, with the 7800gt I get 12000 fps. The 4870 should be immensely more powerful than the 7800gt. But I guess glxgears can't be trusted?


glxgears is not a benchmark.

as mention on the unofficial ati driver wiki:

http://wiki.cchtml.com/index.php/Glxgears_is_not_a_Benchmark

glxgears is an OpenGL program that reports FPS (frames per second) numbers. However, it is a very limited 'test'. Unlike most modern 3D games glxgears:


has an extremely low vertex/polygon count
does no texturing at all
only simple, flat shading is used (except inside the hole in each gear is simple smooth shading)
all vertex data is stored in a display list, so almost nothing passes between host CPU and video card once rendering is started. This mostly implies video card fill rate is limited. But, see next point.
the default window size is 300x300, a large part of which is not even rendered into, so it's not even a good fill rate test
the entire render step consists of only 21 OpenGL functions calls, of which only 6 are unique. This is not a very good OpenGL API stress test. Something like glean would be better.

So to summarize, glxgears only tests a small part of what you typically see in a 3D game. You could have glxgears FPS performance increase, but your 3D game performance decrease. Likewise, you could have glxgears performance decrease and your 3D game performance increase.



This is one of the reasons why the Phoronix Test Suite came about, to provide a reliable *nix benchmarking standards.

zhark
09-03-2008, 09:27 PM
Hehe, I'll run benchmarks on both cards with the Phoronix test suite tomorrow. ;)

Zhick
09-04-2008, 12:10 AM
@deanjo: While you're right that glxgears is not a real benchmark, it's still precise enough to show you if somethings realy f*cked up.
And 7500 glxgears is way to less for a 4870. As mentioned in my first post, try switching from XAA to EXA or vice-versa.

zhark
09-04-2008, 08:34 PM
Ok.
Heres what I got so far, 7800GT vs HD4870:
glxgears-> 7800:~12000fps 4870:~9000fps
PTS UT2004-Demo (ONS-Torlan, 1680x1050)-> 7800: 67fps 4870: 57fps
Lightsmark (1680x1050)-> 7800:~60fps 4870:~290fps
Quake4 (1920x1200,HIGH/ULTRA)-> 4870:~100fps (capped?)
Tremulous (1680x1050)-> 7800: 110fps 4870: 120fps

The only test the 4870 excels at are the Lightsmark test.

Do some have other suggestions for good tests that could really bring to light the benefits of the HD4870?

PS: Option "AccelMethod" "EXA" gives:
(WW) fglrx(0): Option "AccelMethod" is not used

EDIT: Linux Mint 5 32-bit, Core 2 Duo E4400@3GHz, MSI Radeon HD4870 (OC Edition), 4GB DDR2 @900MHz

ivanovic
09-05-2008, 05:55 AM
Sorry to tell you, but please leave glxgears completely out of the list. It is *only* usable to see if you got "hardware accelerated DRI" at all. You will see how much fps change when you just change the windows size.

UT2004 is just CPU bound. That is: as long as you are always above something like 6ofps on average it should be fine and very playable. That is you will probably not see a change in fps when reducing or upping the resolution.

Are you sure that in Lightsmark no vsync was active for the 7800? Those numbers look strange to me, but yeah, there the 4870 should be a lot stronger.

What are your fps with Quake4 and teh nvidia card? Yes, it might be that there is a cap somewhere.

Tremulous sounds like it is perfectly playable with both cards.

Yes, fglrx does not have exa as render method, they use their own stuff (Textured2D).

What you should do to test the speed of the graphics card is activate AntiAliasing at max level in all tests. There you will reach them being graphics bound. That is at least you will get closer to it being graphics and not CPU bound. And it would be nice to get some info which CPU you were using for this comparison since it does make a difference. Nvidia seems to be better in CPU bound scenarios where ATI seems better in graphics bound ones. Don't ask me why this is the case, I don't know.

bridgman
09-05-2008, 07:47 AM
One reason is probably that the ATI chips are 5-way superscalar while competing chips are scalar. It means the ATI driver has to do more work to make best use of the 5-operation instruction words, but we only need (sortakinda) 1/5th the control logic and we can use that space for more processing power.

If you look at die shots of recent ATI GPUs you see a big honkin' shader core and not much else.

zhark
09-05-2008, 08:00 AM
Thank you for your input. I'll do some more testing. Yeah the numbers in lightsmark for the 7800GT was weird, vsync was not enabled in Nvidia Settings (or amdcccle) for any of the tests.
Anyways, I'm sure the Quake4 sluggishness i mentioned in my first post was a figment of my imagination. The CPU used was an E4400 clocked at 3GHz.

When vsync (xv) is fixed and it stops randomly crashing (1-2 times day) I'll be a happy camper.:)

Sidenote: Can someone confirm the random crashes happening, preferably with a standard HD4870 (not OC'ed)?

mtippett
09-05-2008, 09:38 PM
Ok.
Heres what I got so far, 7800GT vs HD4870:
glxgears-> 7800:~12000fps 4870:~9000fps
PTS UT2004-Demo (ONS-Torlan, 1680x1050)-> 7800: 67fps 4870: 57fps
Lightsmark (1680x1050)-> 7800:~60fps 4870:~290fps
Quake4 (1920x1200,HIGH/ULTRA)-> 4870:~100fps (capped?)
Tremulous (1680x1050)-> 7800: 110fps 4870: 120fps

The only test the 4870 excels at are the Lightsmark test.

Do some have other suggestions for good tests that could really bring to light the benefits of the HD4870?


I won't start on glxgears and it's relative value.

Almost all of those are CPU, not GPU limited. Increase your CPU and you get more FPS. As Michael hsa shown on some of his PTS tests, you can drop down to a 3870 or 2600 before you start getting GPU limited in some of these tests.

What you are actually measuring is the efficiency of some aspects of the driver, not the GPU itself.

There are very few GPU limited benchmarks under Linux - ETQW and the Unigine tech demos are really the only two that I have seen that are GPU limited.

You can run "watch aticonfig --odgc" to see the GPU utilization while an application is running windowed. You will see that most tests don't make the 4870 get anywhere near 100%.

If you are interested in working out how to detect a GPU limited application, you can look at how the application responds to increasing resolutions. See the example PTS plot at

http://www.phoronix-test-suite.com/screenshots/unigine-1.png

Regards,

Matthew

energyman
09-05-2008, 10:03 PM
a) check with glxinfo that 3d works correctly at all
b) which driver are you using?

NeoBrain
09-06-2008, 01:58 AM
You can run "watch aticonfig --odgc" to see the GPU utilization while an application is running windowed. You will see that most tests don't make the 4870 get anywhere near 100%.


Heh, yet another undocumented function :D
Seriously though, for what cards does this command work?
(fails for me on an X1600, but I'm going to buy a 3850 soon)

energyman
09-06-2008, 03:15 AM
nope, it is documented.
aticonfig --help:
--odgc, --od-getclocks
Lists various information regarding current core and memory clock
settings.
Including: current and peak clocks
the theoretical range clocks can be set to
the current load on the GPU

and it works with my 3870

NeoBrain
09-06-2008, 03:47 AM
nope, it is documented.
aticonfig --help:
--odgc, --od-getclocks
Lists various information regarding current core and memory clock
settings.
Including: current and peak clocks
the theoretical range clocks can be set to
the current load on the GPU

and it works with my 3870

Ah yeah, I forgot that I had downgraded to 8.7 last monday :rolleyes:
So, thanks for the info.

mtippett
09-06-2008, 07:04 AM
Heh, yet another undocumented function :D
Seriously though, for what cards does this command work?
(fails for me on an X1600, but I'm going to buy a 3850 soon)

No.

Fully documented in aticonfig --help. Also noted in the release notes [http://www2.ati.com/drivers/linux/catalyst_88_linux.html#194695]. Finally also covered in a Phoronix article [http://www.phoronix.com/scan.php?page=article&item=amd_overdrive_linux&num=1]

I *never* talk about the undocumented capabilities. In general the "tunable" options in within the driver are visible in aticonfig and amdccle.

Regards,

Matthew

zhark
09-07-2008, 03:27 PM
UPDATE: Have recently run Quake 4 with everything in AMDCCLE at max. 8xFSAA with filter, edge-detect, 24 samples. Adaptive AA at quality. 16xAF. High quality mipmap.
Quake 4 in Phoronix Test Suite, 1920x1200 at ULTRA setting averages at a little above 70 fps. So this card is definately fast enough for Quake 4 :)

oblidor
09-07-2008, 06:08 PM
Hello!
1. Random crashes. Sometimes my computer hangs instantly when loading Xorg from a fresh boot, most times not. One time it crashed when I just dragged a Nautilus window.


What is your motherboard and powersupply?

zhark
09-08-2008, 05:39 AM
What is your motherboard and powersupply?

Mist 500W. GA-P35-DS3.

energyman
09-08-2008, 08:34 AM
try a different power supply. Something non-cheap. And a bit more powerfull. You are using a powerhungry card on a powerhungry board.

oblidor
09-08-2008, 09:59 AM
try a different power supply. Something non-cheap. And a bit more powerfull. You are using a powerhungry card on a powerhungry board.

Yes I would also have tried a bigger PSU. Do you notice more instabilities when you have a load on the card? Didn't you mention that playing Crysis in Windows worked nicely? If so maybe it is not the PSU after all... And you don't have a nForce motherboard so it is not that either. Also have you don't any changes to the fan setup? I mean flashed the cards BIOS in windows with better fan settings? I have heard that the stock cards run at 80C idle and some thinks that the stability problems during load is due to very high temperatures.

Anyway I guess flashing BIOS voids the warrenty. Stupid really when ATI cannot manage to get it right when designing the cards... I for sure, am going to flash mine. No way I'll have a 80C hot component in my computer to heat up my q9550 and other components...

Just hope my TX650W Corsair is good enough...

Some things you can test. Does the computer crash or only X? look at the log files in /var/log to see if anything is writen after the time of crash.

zhark
09-08-2008, 11:51 AM
Yes I would also have tried a bigger PSU.

The Mist is actually a very good (and expensive) power supply, it shouldn't be the cause of the problems, but you'll never know.
(Norwegian review: http://www.hardware.no/artikler/seks_stoysvake_stromforsyninger/25879/8 )

Does the computer crash or only X? look at the log files in /var/log to see if anything is writen after the time of crash.
It doesn't even respond to icmp echo requests :p

oblidor
09-08-2008, 11:57 AM
The Mist is actually a very good (and expensive) power supply, it shouldn't be the cause of the problems, but you'll never know.
(Norwegian review: http://www.hardware.no/artikler/seks_stoysvake_stromforsyninger/25879/8 )

It doesn't even respond to icmp echo requests :p

I see. Yes, the Mist are good and as you can play Crysis... You could of course get a power consumption reader to put in the socket of the wall and see how much watt the computer pulls. Clas Ohlson has them for some NOK.

Keep an eye on the Xorg logs in /var/log when you experience crashes too see if leading up to it there are some similarities... The machine is not OCed I presume?

About BIOS flashing: http://www.diskusjon.no/index.php?showtopic=969070&st=4434&start=4436 (in Norwegian)

zhark
10-30-2008, 04:04 PM
Yes, of course the cpu is overclocked :p
I found the source of the instability to be the card beeing defect. I reluctantly booted Windows, and used some tools to extract, modify, and flash the BIOS of the card with non-OC edition core and memory values (750/900MHz), which fixed the issue. The original core clock of 780MHz was the source of the problem. RMAing is to much work :rolleyes:
Its been stable ever since.

Aostrich
10-31-2008, 07:58 AM
zhark, I had some random hang-ups with black screen after I tried to flash ASUS HD4870 TOP bios into my card. With my native bios (I have a reference ASUS HD4870) and other bioses I tried I have no such issues.

zhark
10-31-2008, 08:03 AM
Ok. It seems some 4870's run at 780MHz gpu and some don't. My card was sold with 780MHz so it should be able to work at this frequency, it's probably MSI that haven't tested mine properly before selling it. I have a friend which have a "normal" 4870 which runs fine at 780MHz.

Aostrich
10-31-2008, 08:14 AM
zhark, the issue might be even not in a frequency itself. My card is rock-stable in all games/benchmarks/stability tests at 825Mhz (however it's watercooled), but with ASUS TOP bios it hangs up even at lower clocks almost each hour while just watching a movie with mplayer. So I assume that some bioses have bugs somewhere in firmware, etc...

So, if your problem is the same, I mean hang ups with black screen and one of the leds lighting, than it might be a hardware (firmware) related issue. If it is something else, than it is probably your software problem.

Mine is stable now, but I don't use compiz or any 3D hungry applications in linux. Just watching movies using mplayer -vo opengl.

Just for the refernce, I use Slamd64 (64-bit Slackware port) and Xserver 1.4.2.

zhark
10-31-2008, 08:53 AM
Interesting. When my card hang the symptom were just that everything just froze, mouse cursor not moving, not responding to ping, etc. (In Windows VPU-recover interfered and reset the card every time, so I could continue to use the computer. But before this, it was frozen, same as in Linux.)
As I said, underclocking the gpu solved the problem in my case. It's been stable over a month afterwards. Anyways the problem could of course still be firmware related. I contacted MSI about getting a new BIOS since they later changed the default clock frequencies on this card (mem down from 1000 to 900) a new BIOS should exist, right? According to the friendly staff at MSI support, a new BIOS didn't exist, yeah right.

Aostrich
10-31-2008, 09:28 AM
zhark, then your problem is really too high clocks. For me 1000MHz VRAM is not stable, may be it is your case as well. You can try to find a proper video bios hereTechPowerUp Video BIOS Collection (http://www.techpowerup.com/vgabios/index.php), or modify your original bios with RBE tool (http://www.techpowerup.com/downloads/Utilities/RBE/).

zhark
10-31-2008, 10:00 AM
Yeah, mine is rock stable at 750MHz/1000MHz (core/mem). I already used RBE tool to modify the BIOS with these settings.

Fixxer_Linux
10-31-2008, 10:01 AM
Thanks for the tip, I'll try out the stuff you mentioned tomorrow.

I tested glxgears now, I get 7500 fps with the 4870, with the 7800gt I get 12000 fps. The 4870 should be immensely more powerful than the 7800gt. But I guess glxgears can't be trusted?

you lucky guy !
With my HD4870 factory overclocked, 1 Gb RAM, glxgears runs at only 95 fps. yes, ninety-five fps ! There's no typo !
It seems that my ati drivers are all ok, but only 95 fps. Since I'm still installing my Gentoo -which is always a long step before feeling comfortable- I didn't take time as my screen resolution and refresh rate is ok, but I'll take some time to understand that.
Perhaps will UT2K4 and Quake Wars start nice at a high frame rate without doing nothing more ? After all, glxgears is not supposed to be a reliable benchmark...

zhark
10-31-2008, 10:11 AM
Weird, is DRI working?

I also have another problem now, which maybe someone knows how to fix:
As you all know, sync to vblank doesn't work with Xv output and fglrx.
Therefore I use GL output and forced opengl vsync in amdcccle.
This works as long as I'm just playing back material in SD. But when trying to view 720p or higher h.264 material, cpu usage is 100% and video lags and stutters.

DRI is working (Quake iv runs great in 1920x1200 with AA and AF at max).

System:
3GHz Intel Core 2, 4GB RAM, HD4870, Linux Mint 5 (Ubuntu 8.04), Fglrx 8.54.3.

Fixxer_Linux
10-31-2008, 10:43 AM
Weird, is DRI working?


Very good question. I wish I could answer but I don't know how to check. To be honnest, I didn't take time right now.
I think I have compiled everything in kernel that was talking about "ATI" or "Radeon"...

I think ATI could at least insert a splash screen on X startup (as nvidia is doing) so there's no doubt about the fact that the driver is running with it's full capacities...
I could have added that idea to the thread "Ask ATI devs", but the over-posting in that thread (more than 32 pages) makes me think that it's like a drop in the ocean...

zhark
10-31-2008, 10:47 AM
You can check this easily by running "glxinfo |grep direct"

EDIT: If it's not it's probably due to not having the (correct) fglrx kernel module loaded ("lsmod |grep fglrx"), or not using fglrx at all ("cat /var/log/Xorg.0.log |grep fglrx"). Reinstalling the fglrx driver, running "[I]aticonfig --initial -f" followed by " modprobe -r fglrx" and "modprobe fglrx" should in any case fix the problem.

legume
10-31-2008, 11:03 AM
I also have another problem now, which maybe someone knows how to fix:
As you all know, sync to vblank doesn't work with Xv output and fglrx.
Therefore I use GL output and forced opengl vsync in amdcccle.
This works as long as I'm just playing back material in SD. But when trying to view 720p or higher h.264 material, cpu usage is 100% and video lags and stutters.


Yea I've noticed that, and having recently put my R500 back I tested where it broke.

Using the old fglrx drivers mplayer gl barely uses more than xv, but since the new naming scheme drivers gl + h264 eats loads of CPU.

I haven't found any options that change this.

legume
10-31-2008, 11:10 AM
You can check this easily by running "glxinfo |grep direct"


With recent Xorg/mesa that alone is not enough as swrast uses direct rendering.

glxinfo | grep renderer

Should show which driver is being used.

forum1793
10-31-2008, 08:54 PM
Very good question. I wish I could answer but I don't know how to check. To be honnest, I didn't take time right now.
I think I have compiled everything in kernel that was talking about "ATI" or "Radeon"...



I think you probably don't want that stuff running.

Try going to your /lib/modules/<your kernel num>/kernel/drivers/char/drm
copy everything there, except fglrx.ko to somewhere else and then delete them here.

Try doing same thing at similar area but ...char/agp. Then reboot

After booting: do lsmod | grep fg. You should see fglrx. Then go into X, unless already there and see how acceleration works.

Fixxer_Linux
11-01-2008, 04:13 AM
I think you probably don't want that stuff running.

Try going to your /lib/modules/<your kernel num>/kernel/drivers/char/drm
copy everything there, except fglrx.ko to somewhere else and then delete them here.

Try doing same thing at similar area but ...char/agp. Then reboot

After booting: do lsmod | grep fg. You should see fglrx. Then go into X, unless already there and see how acceleration works.

My lsmod is giving me already only "radeonfb" and "fglrx" as loaded modules.
My DRI seems to be active ( -> I added Load "dri" in xorg.conf and a "dri" section to change the permissions to 0666) but I still get 90 fps with glxgears !

energyman
11-01-2008, 12:08 PM
>My DRI seems to be active ( -> I added Load "dri" in xorg.conf and a "dri" section to change the permissions to 0666) but I still get 90 fps with glxgears !

look into Xorg.0.log anf try glxinfo. Everything else is just guessing.

Fixxer_Linux
11-01-2008, 03:10 PM
glxinfo says "Direct Rendering : yes"

cat /var/log/Xorg.0.log | grep dri says "AIGLX: Loaded and initialized /usr/lib64/fglrx_dri.so".

This time, I'm sure ! Thanks a lot for those hints !

legume
11-01-2008, 04:18 PM
glxinfo says "Direct Rendering : yes"

cat /var/log/Xorg.0.log | grep dri says "AIGLX: Loaded and initialized /usr/lib64/fglrx_dri.so".

This time, I'm sure ! Thanks a lot for those hints !

You need to see the output of

glxinfo | grep renderer

to be really sure.

forum1793
11-01-2008, 04:40 PM
My lsmod is giving me already only "radeonfb" and "fglrx" as loaded modules.

I think you don't want radeonfb loaded.

As root:

Go to /lib area as I've discussed and rename this so it doesn't load.

rmmod radeonfb

As user: startx