[RV620] No power management with ati driver

Bug #373669 reported by António Lima on 2009-05-08
58
This bug affects 9 people
Affects Status Importance Assigned to Milestone
xserver-xorg-driver-ati
Fix Released
Medium
xserver-xorg-video-ati (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-ati

With my hardware - Mobility Radeon 3400 (RV620) - I have no power management with the opensource drivers, both ati and radeonhd. The system fans keep spining at high speed constantly even when the temperatures (cores and CPU) are very low.

Using fglrx I have power management. The fans increase and decrease speed as needed by the system.

Please contact me for more info if needed.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
MediaBuild: Ubuntu 9.04 "Jaunty Jackalope" - Release i386 (20090420.1)
Package: xserver-xorg-video-ati 1:6.12.1-0ubuntu2
ProcEnviron:
 LANG=pt_PT.UTF-8
 SHELL=/bin/bash
ProcVersion: Linux version 2.6.28-11-generic (buildd@palmer) (gcc version 4.3.3 (Ubuntu 4.3.3-5hostname4) ) #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009
SourcePackage: xserver-xorg-video-ati
Uname: Linux 2.6.28-11-generic i686

[lspci]
00:00.0 Host bridge [0600]: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub [8086:2a00] (rev 03)
     Subsystem: Toshiba America Info Systems Device [1179:ff50]
01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Mobility Radeon HD 3400 Series [1002:95c4]
     Subsystem: Toshiba America Info Systems Device [1179:ff50]

António Lima (amrlima) wrote :
Martin Olsson (mnemo) on 2009-05-08
Changed in xserver-xorg-video-ati (Ubuntu):
status: New → Confirmed
marmuta (marmuta) wrote :

This may not immediately help, but the upstream radeon driver already has some new power management features that aren't included in Jaunty. There are new xorg.conf options ClockGating, ForceLowPowerMode and DynamicPM.
http://www.phoronix.com/scan.php?page=news_item&px=NzIwNg
Installation instructions are here
http://www.botchco.com/agd5f/?page_id=2

IMO the clocks don't go down far enough by default though, only to half of my cards 750MHz, whereas fglrx goes down to 165MHz and the card can still handle 80MHz. When I patched the source for lower clocks it came within 3W of the power draw with fglrx.

Some numbers from my HD4670 in a desktop system
93W with Jaunty xserver-xorg-video-radeon 1:6.12.1-0ubuntu2, 750/873
83W with upstream radeon, ClockGating and ForceLowPowerMode, 375/435?
77W with upstream radeon, ClockGating and patched clocks, 165/250
74W with Jaunty fglrx, 165/250 (engine/memory)

António Lima (amrlima) wrote :

Good news, at least it's improving. I'll check it out when I can, but probably will gt back to fglrx in the meanwhile.Thanks!

I'm filing this bug upstream on behalf of another Ubuntu user.
The original downstream bug report is here:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/373669

It seems that several Ubuntu users are unable to use the -ati
driver because (even they accept not having 3D at the moment)
there is no power management for modern ATI cards and so basically
their GPU fans run all 100% speed all the time (very noisy).

One AMD/ATI card affected by this problem is for example:
01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Mobility Radeon HD 3400 Series [1002:95c4]
...using the driver that the user had was 6.12.1 (shipped in ubuntu 9.04)

Download full text (3.8 KiB)

Here is a very informative e-mail from Alex Deucher that clarifies the situation:

Deucher, Alexander wrote:
> The problem with power management is that it's involved with just
> about every aspect of the driver, as such it's not a simple
> implementation. To do it properly, it really has to be done in the new
> kernel modesetting enabled (kms) drm since that would know the state of
> not only the command stream but also the displays.
>
> The current driver architecture it not well suited to power management
> and most of what we do now would be a hack and would have to be re-done
> properly once the kms drm is ready. example, if you want to scale the
> memory clocks, you need to make sure you still provide enough bandwidth
> for the displays (single vs. multi-head, etc.) and enough bandwidth for
> the drawing engine (texture fetches, vertex buffers, command buffers,
> etc.). Or if you are playing back a video, you'll want to scale the
> memory clock and pcie lanes enough to provide enough bandwidth for the
> video playback, but also reduce power usage if possible; same for engine
> clock. You'll want to reduce that to save power, but still leave it
> high enough to render the frame without raising the latency too much.
> Adjusting the voltage has similar requirements. The problem with the
> current driver setup is that that X driver is only aware of the displays
> and 2D (EXA, XV), but not 3D. To be done right, the driver would need
> insight into the incoming command stream and the displays which is
> currently only possible in the kms enabled drm.
>
> In addition to the above requirement, X lacks a generic driver attribute
> system that can be changed dynamically. There are interfaces like
> xrandr and Xv attributes, but they for displays and Xv respectively, not
> general driver attributes. In order to change the power profile on the
> fly you'd need some sort of dynamic interface. The drm could expose it
> via sysfs for example. Then applications like gnome-power-manager could
> dynamically change the power profile (AC/DC transition, user selected
> power profile, etc.).
>
> The information to implement most power management features is already
> available. The radeon driver in git has code to change the engine and
> memory clocks of both atombios-based (r4xx-r7xx) and pre-atom-based
> cards (r1xx-r3xx) as well as adjusting the number of pcie lanes
> (r3xx-r7xx).
>
> Things like fan control and temperature readings (if available) are
> implemented via third party chips controlled via i2c at least for
> pre-r6xx chips. The power mode data table information in atombios.h in
> the radeon/radeonhd drivers have everything you'd need to implement
> support for these chips (other than documentation on the third party
> chips themselves which in most cases is available from the third party).
> The data table will tell you what chips are present and the gpio info
> needed to access the chips via i2c. In many cases there may already be
> i2c chip drivers for some of the third party chips in the kernel as part
> of lmsensors, etc. Integrating properly with lmsensors is another
> reason this should be done in the drm rather than ...

Read more...

The first round of improvements will come when the post-16.12 branch (current master) is rolled out as stable, this includes the clockgating etc described above. The full power management will only come later once radeon KMS has stablized though. For detailed information about progress, see: https://lists.ubuntu.com/archives/ubuntu-x/2009-May/000556.html

Changed in xserver-xorg-driver-ati:
status: Unknown → Confirmed

On Mon, May 11, 2009 at 04:10:23PM -0000, Martin Olsson wrote:
> The first round of improvements will come when the post-16.12 branch
> (current master) is rolled out as stable, this includes the clockgating
> etc described above. The full power management will only come later once
> radeon KMS has stablized though. For detailed information about
> progress, see:
> https://lists.ubuntu.com/archives/ubuntu-x/2009-May/000556.html

Thanks for investigating this Martin!

I'm planning on pulling in an -ati snapshot here at some point soon,
probably after alpha1 is done.

Bryce Harrington (bryce) on 2009-05-13
summary: - No power management with ati driver
+ [RV620] No power management with ati driver
Bryce Harrington (bryce) on 2009-05-17
description: updated
Bryce Harrington (bryce) on 2009-06-26
summary: - [RV620] No power management with ati driver
+ [HD 3400] [RV620] No power management with ati driver
Bryce Harrington (bryce) on 2009-06-26
summary: - [HD 3400] [RV620] No power management with ati driver
+ [RV620 HD 3400] No power management with ati driver
Bryce Harrington (bryce) on 2009-08-13
tags: added: jaunty

Presumably this should be sorted out now; mind retesting current Karmic?

Changed in xserver-xorg-video-ati (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
António Lima (amrlima) wrote :

Sure. I can't install karminc in this laptop (need a stable system) but I'll give the latest alpha livecd a go and report back here.

António Lima (amrlima) wrote :

With karminc alpha4 there is big improvements. The fan is much quieter then with the older driver. Is there a way I can have real numbers testing the two drivers?

Anyway, my fan is much much quieter now. The system is usable with the radeon driver finally :).

marmuta (marmuta) wrote :

António, for measuring power draw on a notebook try 'powertop' or right click the power icon in the notification area for 'Power History'. 'cat /proc/acpi/battery/BAT0/state' could work too, but the path might have changed since I last used it (can't test).
Desktops usually require an external meter to measure the power draw.

I would do some testing too but I'm on dial-up currently. Will do it next week when I'm back to fast internet access.

António Lima (amrlima) wrote :

Sure, powertop. I'll check it out. Thanks!

marmuta (marmuta) wrote :

Testing HD4670/RV730XT on current Karmic with xserver-xorg-video-radeon 1:6.12.99+git20090629.f39cafc5-0ubuntu6).
I had a hard time starting X, probably because of Bug #419126. It would freeze until I created an xorg.conf with Option DRI 0 and bypassed gdm with startx.

This what I found with an external power meter for the idle system:
93W with empty device section in xorg.conf, 750/873
86W with manually added ClockGating and ForceLowPowerMode, 375/435

and for comparison:
74W with Jaunty fglrx, 165/250 (engine/memory [MHz])
65W without the card, running with intel onboard graphics

Can't say anything about fan speed as this is a passively cooled card.

Seems the first round of improvements has arrived and once manually enabled they do have an effect.
Unfortunately the best I could do without touching source was 12W more than with fglrx on Jaunty.
ForceLowPowerMode still only halfes both engine and mem clock.

The Linux kernel 2.6.34-rc1 has recently been released. It contains support for Radeon KMS (kernel mode-setting) power management. More details on this kernel are available at http://www.phoronix.com/scan.php?page=news_item&px=ODA0OQ

An Ubuntu PPA of this kernel is available at http://kernel.ubuntu.com/~kernel-ppa/mainline/

For other distributions the kernel page is at http://www.kernel.org/

The Linux kernel 2.6.34-rc1 has recently been released. It contains support for Radeon KMS (kernel mode-setting) power management. More details on this kernel are available at http://www.phoronix.com/scan.php?page=news_item&px=ODA0OQ

A PPA of this kernel is available at http://kernel.ubuntu.com/~kernel-ppa/mainline/

madbiologist (me-again) wrote :

Further work on Radeon KMS (kernel mode-setting) power management is occurring, and will hopefully be ready to go in the mainline kernel by the Linux 2.6.35 kernel this summer.

See http://www.phoronix.com/scan.php?page=news_item&px=ODA3Mw for details.

Robert Hooker (sarvatt) on 2010-03-22
summary: - [RV620 HD 3400] No power management with ati driver
+ [RV620] [RV620 HD 3400] No power management with ati driver
Robert Hooker (sarvatt) on 2010-03-22
summary: - [RV620] [RV620 HD 3400] No power management with ati driver
+ [RV620] No power management with ati driver
cryolithic (cryolithic) wrote :

I'm seeing a similar issue with RV600 in Lucid, however, my fan is *not* turning on, leading to an eventual overheat and system freeze. Basically rendering Lucid unusable for further testing.

I'm having this problem in Lucid. In Karmic using fglrx, my laptop normally runs at a rate of around 18W giving much more efficint battery usage. In Lucid with the included driver my laptop runs hotter, the fan runs continuously and at around 25W even with the brightness turned down. This is nearly a 50% increase in power usage by using the free driver.

I have compiz active in Karmic and Lucid.

madbiologist (me-again) wrote :

@notoriousdbp - if you disable KMS you can use the xorg.conf options described in comments 2 and 11. If you want power management with KMS you will need a 2.6.34 or later kernel, as described in comments 12 and 13.

madbiologist (me-again) wrote :

Sorry, I should have said that KMS stands for kernel mode-setting.

Patrick T. (p1703) wrote :

This problem seems to affect me on Lucid Beta, too. But I had no problems using the Radeon driver on Karmic. Maybe 3D effects of KDE overheat my GPU, even if there are no effects rendered for a long time! My temperature sensors report temperatures up to 95 degrees celsius and one time my notebook switched to emergency off, after the fan raced at full throttle for some minutes.

Maybe, the following is another critical bug, but I noticed xorg to consume up to 40% CPU load (2x2,4GHz AMD ZM-86) for several minutes. Often that was initiated by watching some long videos on YouTube in Firefox, while Kaffeine runs showing live TV advertisements. Ok, Kaffeine and npviewer consume much CPU (25% each), too - but when the problem starts, the YT video is only shown @~1-2 fps and even after killing firefox (and so npviewer is closed), kwin and xorg show a very high CPU usage (~40% for each) with "top". That makes my Notebook unusable with Lucid and I have to reboot or wait several miniutes, until I can do simple things at a normal speed...

I can not understand why this bug is on medium importance, when hardware is potentially damaged and when it makes the whole system unusable...

Worth mentioning here that my laptop runs a lot hotter in Lucid than in Karmic too. The fan is constantly running. I haven't tried using fglrx instead as I feel that Lucid needs to be tested as it will be delivered. With regards to the suggestions from madbiologist, I could do that but, again, Lucid is really being aimed at the home user and corporate markets so I look at it from the 'will the average user be able to do that' aspect

Bryce Harrington (bryce) wrote :

[This is an automatic notification.]

Hi António,

This bug was reported against an earlier version of Ubuntu, can you
test if it still occurs on Lucid?

Please note we also provide technical support for older versions of
Ubuntu, but not in the bug tracker. Instead, to raise the issue through
normal support channels, please see:

    http://www.ubuntu.com/support

If you are the original reporter and can still reproduce the issue on
Lucid, please run the following command to refresh the report:

  apport-collect 373669

If you are not the original reporter, please file a new bug report, so
we can work with you as the original reporter instead (you can reference
bug 373669 in your report if you think it may be related):

  ubuntu-bug xorg

If by chance you can no longer reproduce the issue on Lucid or if you
feel it is no longer relevant, please mark the bug report 'Fix Released'
or 'Invalid' as appropriate, at the following URL:

  https://bugs.launchpad.net/ubuntu/+bug/373669

Changed in xserver-xorg-video-ati (Ubuntu):
status: Triaged → Incomplete
tags: added: needs-retested-on-lucid-by-june
Flavio Capobianco (norkov) wrote :

I've posted this bug: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/595335, which seems very related to this one. I also have no power management with the ati open source drivers. The difference is that in my case my fans are turned off and the computer shuts itself down due to overheating.

Changed in xserver-xorg-video-ati (Ubuntu):
status: Incomplete → Fix Released
Chris Halse Rogers (raof) wrote :

This is fixed in Maverick. The new 2.6.35 kernels have power management, both dynamic and profile-based. You can switch between dynamic and profile-based management by writing “dynpm” or “profile” to /sys/class/drm/card0/device/power_method, and switch profile (options are “auto”, “low”, “high”, “default”) by writing to /sys/class/drm/card0/device/power_profile

(Depending on your configuration, “card0” might be different)

Changed in xserver-xorg-driver-ati:
importance: Unknown → Medium

I have the same problem with my Acer Aspire 5542 Ubuntu 10.10. The same problem with the open source driver as fglrx. I tried dynpm and various other profiles in /sys/class/drm/card0/device/power_method & /sys/class/drm/card0/device/power_profile but it keeps happening.

The worst part is that I keep losing data after restarting!

I want to confirm that I still have this problem after a fresh 10.10 RC install.

Changed in xserver-xorg-driver-ati:
importance: Medium → Unknown
status: Confirmed → Fix Released
Changed in xserver-xorg-driver-ati:
importance: Unknown → Medium
madbiologist (me-again) on 2013-07-25
tags: added: lucid maverick
madbiologist (me-again) wrote :

Better power management (than that mentioned in comment #25) for AMD/ATI Radeon R600 and newer hardware is finally available in the upstream 3.11 linux kernel. The first release candidate (3.11-rc1) of the 3.11 kernel is available at http://kernel.ubuntu.com/~kernel-ppa/mainline/ and instructions on how to install and uninstall it are available at https://wiki.ubuntu.com/Kernel/MainlineBuilds

To use this power management for the AMD/ATI Radeon you will need to select it at boot by adding radeon.dpm=1 to your GRUB kernel boot options as described at https://help.ubuntu.com/community/Grub2/Troubleshooting#Editing_the_GRUB_2_Menu_During_Boot

On R700 and newer hardware (other than APUs) you will also need to install the latest AMD graphics microcode (ucode) files to /lib/firmware/radeon
These are available at http://people.freedesktop.org/~agd5f/radeon_ucode/
Get the version ending in "smc".

R700 basically means Radeon HD 4000 series and newer. However note that according to Wikipedia and http://xorg.freedesktop.org/wiki/RadeonFeature/#index5h2 the Mobility Radeon HD 4225/4250 is a RV620 chip, so anyone with one of those shouldn't need the updated firmware files.

See the blog post at http://www.botchco.com/agd5f/?p=57 for further information.

Unlike the older dynpm method, the new DPM mehod works with multiple monitors and there shouldn't be any flickering as the performance level changes are handled by dedicated hardware rather than the driver.

madbiologist (me-again) wrote :

Oops, I should have said that the second release candidate (3.11-rc2) of the 3.11 kernel is available at http://kernel.ubuntu.com/~kernel-ppa/mainline/

It would be better to use that than 3.11-rc1.

madbiologist (me-again) wrote :

Kernel 3.11.0-1.4 (based on the upstream 3.11-rc4 kernel) is now available in Ubuntu 13.10 "Saucy Salamander". Also, kernel 3.11.0-2.5 is in Saucy-proposed, which is based on the upstream 3.11-rc5 kernel, which has some bugfixes for the new DPM method.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.