View Full Version : Help building latest radeon driver
glock24
05-06-2009, 11:40 PM
I want to try the latest radeon driver, but don't know where to start. Is there a guide to build the driver? What are required steps and dependencies? I'm using Kubuntu 9.04 and a Mobility HD3650 if that matters.
Thanks.
agd5f
05-07-2009, 01:11 AM
basic guide:
http://www.botchco.com/agd5f/?page_id=2
glock24
05-07-2009, 02:40 AM
Thanks, that worked. I'm having some video corruption though, mostly in the cursor and icons.
"ForceLowPowerMode" seems to work, as the temperature is within normal. What does "ClockGating" do?
agd5f
05-07-2009, 02:53 AM
Thanks, that worked. I'm having some video corruption though, mostly in the cursor and icons.
Probably DFS related. Does:
Option "EXANoDownloadFromScreen"
fix it?
"ForceLowPowerMode" seems to work, as the temperature is within normal. What does "ClockGating" do?
Allows the chip to turn off the clock to blocks on the chip when they are not in use to save power.
glock24
05-07-2009, 03:57 AM
Yep,
Option "EXANoDownloadFromScreen"
fixed the video corruption.
glock24
05-07-2009, 06:58 PM
I was testing power consumption with fglrx and the radeon driver; with fglrx the power consumption is ~18W on battery, as reported by powertop.
Using the radeon driver with "ClockGating" and "ForceLowPowerMode" to "on", the power usage reported by powertop is ~23W. I think it's not bad, but could be much better.
BTW, is there any way to know the actual clock of the GPU?
agd5f
05-07-2009, 07:04 PM
I was testing power consumption with fglrx and the radeon driver; with fglrx the power consumption is ~18W on battery, as reported by powertop.
Using the radeon driver with "ClockGating" and "ForceLowPowerMode" to "on", the power usage reported by powertop is ~23W. I think it's not bad, but could be much better.
BTW, is there any way to know the actual clock of the GPU?
For ForceLowPower mode, it's half of your default clock which is printed in the xorg log. For the DynamicPM option, the clock is reduced to 1/4 of the default clock when DPMS is active. This patch will print the values when DynamicPM kicks in:
http://www.botchco.com/alex/xorg/print_clock_pm.diff
glock24
05-07-2009, 08:15 PM
I've managed to slash some 3-4W editing radeon_pm.c and lowering the clock from 1/2 to 1/4 with "ForceLowPowerMode". Have not seen any adverse consequences by doing so.
glock24
05-19-2009, 09:38 PM
Have been using the radeon driver for over a week, and I'm pleased, but I've noticed something that makes it almost unusable: while browsing with Firefox some web pages with flash, the scrolling performance is horrible, feels like using software rendering on a 386 to play nexuiz :P
This does not happen on all sites with flash though. I'm using Kubuntu 9.04 AMD64 with kernel 2.6.30-rc6 and latest radeon from git. Flash player is latest 64bit version from adobe.
bridgman
05-19-2009, 10:14 PM
Does putting the GPU back to full speed help with those pages ? Probably not the problem but easy to check...
glock24
05-19-2009, 11:08 PM
Does putting the GPU back to full speed help with those pages ? Probably not the problem but easy to check...
Already checked that, but did not help. Next time I find a slow site I'll post it so you can do some tests.
legume
05-20-2009, 07:03 AM
Already checked that, but did not help. Next time I find a slow site I'll post it so you can do some tests.
It's probably using EXANoDownloadFromScreen that causes it, I have an AGP card and DFS is disables to avoid corruption and as a result some web pages are slow and even an open seamonkey newsgroup thread (I guess because it has lots of dots linking the posts) loads up my CPU way too much - libc memcpy.
I'll have to open a new bug as I only reported as a comment in an different bug.
For me trying to scroll quickly with the scroll bar a non flash page like -
http://redbutton.svn.sourceforge.net/viewvc/redbutton/redbutton-browser/trunk/
chokes up, just switching metacity desktops to and from that page is way too slow.
glock24
05-20-2009, 10:30 AM
For me trying to scroll quickly with the scroll bar a non flash page like -
http://redbutton.svn.sourceforge.net/viewvc/redbutton/redbutton-browser/trunk/
chokes up, just switching metacity desktops to and from that page is way too slow.
That link did not feel slow at all, but this here does:
http://www.foxconnchannel.com/product/motherboards/chipset.aspx?socket_id=en-us0000002&chipset_id=en-us0000074&Socket=Socket+775&Chipset=Intel+G31
legume
05-20-2009, 10:45 AM
That link did not feel slow at all, but this here does:
http://www.foxconnchannel.com/product/motherboards/chipset.aspx?socket_id=en-us0000002&chipset_id=en-us0000074&Socket=Socket+775&Chipset=Intel+G31
Ah, we may be seeing different issues than. That page is OK for me, though the webserver was really slow so it took ages to load all the images, the page once loaded did not eat loads of CPU when switching away and back.
glock24
05-20-2009, 11:46 PM
On the good side, I can report that suspend seems to work without problems. With fglrx it works from time to time, as some times it locks up instead of resuming from sleep.
glock24
05-21-2009, 02:54 PM
The other thing I have noticed is that, sometimes when shutting down X the screen looks funny, as if it was melting from within, but does not cause a lockup. It is hard to describe what looks like, next time it happens I'll try to take a picture.
The other thing I have noticed is that, sometimes when shutting down X the screen looks funny, as if it was melting from within, but does not cause a lockup. It is hard to describe what looks like, next time it happens I'll try to take a picture.
That's a feature (random shutdown desktop effects), not a bug. :D
glock24
05-24-2009, 12:29 PM
Well, I changed "EXANoDownloadFromScreen" to "off" and the link I posted earlier is still slow, but does not bring firefox down to its knees, so maybe legume was right about that.
I am also seeing background image corruption in some websites using firefox, no matter what "EXANoDownloadFromScreen" is set to. When scrolling, I get a repeating ghosted color/pattern or image. One such site is this:
http://www.notebookreview.com/
Here I see light blue color lines appearing in the background while scrolling, and the thickness of the lines depends on the scrolling speed. Also, the background image is not visible. In konqueror everything seems right, but scrolling is slow.
Shinigami2057
05-24-2009, 03:08 PM
The other thing I have noticed is that, sometimes when shutting down X the screen looks funny, as if it was melting from within, but does not cause a lockup. It is hard to describe what looks like, next time it happens I'll try to take a picture.
I used to get that on my mobility radeon x700 a few years ago with the radeon driver. It scared the crap out of me the first time... what causes something like that?
bridgman
05-24-2009, 07:33 PM
One theory is that the GPU has stopped driving the panel and so all the LCD crystals are slowly returning to a random state.
glock24
05-24-2009, 09:51 PM
It scared the crap out of me the first time...\
:D Yeah, that got me the first time too.
agd5f
05-25-2009, 11:30 AM
There was an off by one in the exa code that led to an engine lock up with large images. It's fixed in git and the 6.12-branch:
http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=22e39392297fa11003df90c175db3c449d8f9853
glock24
05-25-2009, 12:31 PM
There was an off by one in the exa code that led to an engine lock up with large images. It's fixed in git and the 6.12-branch:
http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=22e39392297fa11003df90c175db3c449d8f9853
What issue was resolved? the X shutdown "special effects" or the background ghosting in firefox?
I have the latest git as of today, and the ghosting in firefox is still present. The other issue may have been resolved as I haven't seen again, but it was random, so it's hard to know.
tormod
05-25-2009, 02:22 PM
The other thing I have noticed is that, sometimes when shutting down X the screen looks funny, as if it was melting from within, but does not cause a lockup. It is hard to describe what looks like, next time it happens I'll try to take a picture.
This is called "blooming" and happens when the panel output (LVDS) is on, but the crtc is off or its timing is out of whack.
I've managed to slash some 3-4W editing radeon_pm.c and lowering the clock from 1/2 to 1/4 with "ForceLowPowerMode". Have not seen any adverse consequences by doing so.
Hi,
Any chance you could document how you did this? This would be very useful for me.
Thanks
glock24
06-03-2009, 10:45 AM
Noah, sure I will. I'll post the changes I did when I get home.
glock24
06-05-2009, 12:31 PM
Sorry for the delay, but here it is:
1- get latest master from git
2- open radeon_pm.c in src folder with a text editor
3- on line ~811 (this may be different), look for something that looks like this:
if (xf86ReturnOptValBool(info->Options, OPTION_FORCE_LOW_POWER, FALSE)) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Force Low Power Mode Enabled\n");
info->pm.force_low_power_enabled = TRUE;
if (info->pm.dynamic_mode_enabled) {
info->pm.mode[2].type = POWER_HIGH;
info->pm.mode[2].sclk = info->pm.mode[0].sclk / 2;
info->pm.mode[2].mclk = info->pm.mode[0].mclk / 2;
info->pm.mode[2].pcie_lanes = 4;
} else {
info->pm.mode[1].type = POWER_HIGH;
info->pm.mode[1].sclk = info->pm.mode[0].sclk / 2;
info->pm.mode[1].mclk = info->pm.mode[0].mclk / 2;
info->pm.mode[1].pcie_lanes = 4;
info->pm.num_modes += 1;
}
This sets the clock to 1/2 the original clock, in my case that would be 300MHz for the GPU core and 200MHz for the memory. I changed that so that the resulting frequency would be 200MHz for the core, and the result would be:
if (xf86ReturnOptValBool(info->Options, OPTION_FORCE_LOW_POWER, FALSE)) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Force Low Power Mode Enabled\n");
info->pm.force_low_power_enabled = TRUE;
if (info->pm.dynamic_mode_enabled) {
info->pm.mode[2].type = POWER_HIGH;
info->pm.mode[2].sclk = info->pm.mode[0].sclk / 3;
info->pm.mode[2].mclk = info->pm.mode[0].mclk / 2;
info->pm.mode[2].pcie_lanes = 4;
} else {
info->pm.mode[1].type = POWER_HIGH;
info->pm.mode[1].sclk = info->pm.mode[0].sclk / 3;
info->pm.mode[1].mclk = info->pm.mode[0].mclk / 2;
info->pm.mode[1].pcie_lanes = 4;
info->pm.num_modes += 1;
}
You can try what values work better for you. You have to set "ForceLowPowerMode" to "on" in xorg.conf.
My power consumption measurements were not very accurate I think, as I used powertop to do that, but still it syas the computer uses less power after changing those settings.
glock24
06-05-2009, 12:51 PM
The "blooming" is still present, I just saw it.
Sorry for the delay, but here it is:
1- get latest master from git
2- open radeon_pm.c in src folder with a text editor
3- on line ~811 (this may be different), look for something that looks like this:
Awesome :) Thanks!
If i'm to understand it right, the only thing the open-source driver doesn't do now in power management is undervolting?
glock24
06-12-2009, 09:12 PM
I just updated to the latest git master code, and the Firefox background image corruption I reported earlier seems to be fixed.
The performance on some sites that make use of flash is still very poor though.
agd5f
06-13-2009, 01:47 AM
I just updated to the latest git master code, and the Firefox background image corruption I reported earlier seems to be fixed.
The performance on some sites that make use of flash is still very poor though.
The adobe flash plugin uses GLSL for acceleration which is not yet supported by the open source drivers.
glock24
06-18-2009, 07:45 PM
I resumed the computer from suspend, and I felt the fan was running unusually fast, I fired up powertop and it was reporting 32W of power usage! I think the video card to be the culprit, as no other component makes so much difference in power consumption. I assume waking from sleep puts the video card in full clock speed, restarting X caused the "bloom" effect, so I had to restart the computer. After this, power usage was a more acceptable 18W-20W.
BTW, I did some power usage measurement with fglrx, and consumption was 15-16W.
glock24
07-12-2009, 04:02 PM
I have the latest git code as of yesterday, and now the "blooming" happens every time, not once in a while randomly as it did before.
When opening a terminal after X has been started results in the "blooming".
forum1793
07-12-2009, 05:13 PM
I don't think I've seen this blooming. I think you first mentioned it happened on shutting down X. Now it happens more often?
Is it permanent, or at least until you exit and restart X, or is it transient, i.e. only lasting a short time?
Can you provide a picture?
Considering you've altered the src to reduce power, is it possible you're not giving your card enough power and that might be what is causing the blooming.
Is it possible your card is overheating?
glock24
07-12-2009, 10:57 PM
Now it happens more often?
Yes, it happens most of the time now. Before it was very rare.
Is it permanent, or at least until you exit and restart X, or is it transient, i.e. only lasting a short time?
Switching to a console or shutting down X causes the blooming. It does not get fixed until I switch back to X (or restart the computer).
Can you provide a picture?
I'll post a picture as soon as I get a camera.
Considering you've altered the src to reduce power, is it possible you're not giving your card enough power and that might be what is causing the blooming.
Is it possible your card is overheating?
I reduced the clocks, so the card does not overheat. I did not touch anything about voltages.
EDIT: Here are some very bad cell phone pictures
http://rgb.com.ni/glock24/bloom1.jpg
http://rgb.com.ni/glock24/bloom2.jpg
forum1793
07-13-2009, 07:44 AM
I've never seen this. I'm using an hd3200 (780g integrated).
For a while (many months ago) I saw kind of reverse pixel (but in character blocks) when exiting X. It was either because I didn't adequately uninstall Catalyst (fglrx) or because they improved the radeonhd code (I was never sure which). I doubt your problem is purely the radeon driver and you might consider the age/type of your distribution, kernel, with how you installed drivers. Sorry not more help.
forum1793
07-13-2009, 07:49 AM
basic guide:
http://www.botchco.com/agd5f/?page_id=2
@Glock: btw, the above link (I can only see from google cache) is for the radeon driver (xf86-video-ati). You also probably need the mesa git and the 3d branch from drm git from agd5f. See here. (http://www.x.org/wiki/radeon) Devs will hopefully correct if this is wrong.
shartrec
07-15-2009, 11:33 PM
I followed the instructions at http://www.x.org/wiki/radeon as mentioned by forum1793 and everything compiled and installed OK. I then rebooted and restarted X, but could see no change. glxgears was still always on top of all other windows and didn't draw in the compiz cube. Everything worked, but it looked just the same as the old driver.
The xorg.0.log showed the ati driver being loaded from /local/xorg/lib/xorg/modules. Do I need to do extra things, e.g. xorg.conf changes, to make DRI2 work.
I am using mandriva 2009.1 with kernel 2.6.30-2mdv.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.