Bug 16474 - Power management does not work for ATI radeon 4870
Summary: Power management does not work for ATI radeon 4870
Status: CLOSED CODE_FIX
Alias: None
Product: Power Management
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: power-management_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-27 20:28 UTC by Jimmy Berry
Modified: 2012-05-29 09:31 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.35-rc6
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Environment information from section 7 of reporting bugs guide. (36.58 KB, text/plain)
2010-07-27 20:28 UTC, Jimmy Berry
Details
vbio.rom (62.00 KB, application/octet-stream)
2010-08-01 01:57 UTC, Jimmy Berry
Details
add lower power mode for multi-head (715 bytes, patch)
2010-08-04 05:32 UTC, Alex Deucher
Details | Diff
updated patch (725 bytes, patch)
2010-08-04 05:34 UTC, Alex Deucher
Details | Diff

Description Jimmy Berry 2010-07-27 20:28:17 UTC
Created attachment 27277 [details]
Environment information from section 7 of reporting bugs guide.

I have read, been told, and confirmed with others in IRC that power management works for them so I can only assume it is a bug. Please keep in mind this is my first attempt of any kind to get involved in Linux development, albeit a very small one. Please let me know if I need to change anything in my report or if I should add any additional information. Mind my use of terminology as I am uncertain what to call things.

Environment (summary):
openSUSE 11.3 64 bit
KDE 4.5 RC 3
Radeon HD 4870
kernel-desktop-2.6.35-rc6.14.1.x86_64 (manually installed openSUSE built package from: http://download.opensuse.org/repositories/Kernel:/HEAD/openSUSE_11.3/x86_64/)

I have a radeon HD 4870 that I cannot seem to get the fan to slow down to what it should idle at. Previously, on openSUSE 11.2 I had the ATI proprietary driver installed and things were dandy. After installing 11.3 I decided to give the OSS driver a try since there was a lot of talk about how the graphics stack in 11.3 was great for ATI. Sure enough desktop effects run smoothly, very impressive, but I cannot seem to get the fan to slow down.

After asking around I was pointed to
http://www.h-online.com/open/features/Kernel-Log-Coming-in-2-6-35-Part-1-Graphics-1034168.html.
I installed a second kernel, version kernel-desktop-2.6.35-rc6.14.1.x86_64 (suse
package), and ran "echo auto > /sys/class/drm/card0/device/power_profile" as root. The person I talked to said this worked great for him on his 4750, but didn't work for me on my 4870.

# ls /sys/class/drm/
card0  card0-9-pin DIN-1  card0-DVI-I-1  card0-DVI-I-2  controlD64  ttm  version

So just for kicks I tried the others, but the only one to work was controlD64 and still nothing. The person I talked to, madigens in #suse on freenode.net, said his screen flashed when he set the power_profile and then his fan slowed, but mine did neither.

I am open to suggestions, or if this is simply a bug happy to test a fix. I am a developer myself, limited C/C++ experience I deal mostly with scripting languages, but I am fairly capable when it comes to compiling and what have you so I can test out source if necessary (may required some help of course :)).

Thanks in advance.
Comment 1 Jimmy Berry 2010-07-27 22:12:31 UTC
Correction the card that worked was a 4850.
Comment 2 Alex Deucher 2010-07-30 21:03:24 UTC
This isn't really a bug.  The power management support in the open source driver is not yet as advanced as the closed driver.  For more information about what is supported see this link:
http://lists.freedesktop.org/archives/dri-devel/2010-May/000492.html
The "auto" profile only changes power states when the machine switches to/from battery and when the displays are in the dpms off state.
Comment 3 Jimmy Berry 2010-07-31 07:21:54 UTC
Tried the following on rc6 kernel again with no luck. This definitely seems like a bug as it just refused to work.
Comment 4 Jimmy Berry 2010-07-31 07:22:33 UTC
Forgot to include the following. :)

echo low > /sys/class/drm/card0/device/power_profile

even tried high and dynpm
Comment 5 Jimmy Berry 2010-07-31 07:48:11 UTC
After some debugging with mcgreg in #radeon I still haven't gotten it to work, but I will present what was done for the record.

Looped over low, high, and default performing the following sequence of commands.

echo [low|high|default] > /sys/class/drm/card0/device/power_profile
dmesg | grep drm (looking for [drm:radeon_set_pm_profile] *ERROR* invalid power profile!)
cat /sys/kernel/debug/dri/0/radeon_pm_info

which always returned:

default engine clock: 750000 kHz
current engine clock: 750000 kHz
default memory clock: 900000 kHz
current memory clock: 900000 kHz
voltage: 1263 mV
PCIE lanes: 16
Comment 6 Alex Deucher 2010-07-31 14:58:46 UTC
Please attach a copy of your vbios.  To get a copy, do the following as root:
cd /sys/bus/pci/devices/<pci bus id>
echo 1 > rom
cat rom > /tmp/vbio.rom
echo 0 > rom

You can use lspci to get the bus id.
Comment 7 Jimmy Berry 2010-08-01 01:57:02 UTC
Created attachment 27308 [details]
vbio.rom
Comment 8 Alex Deucher 2010-08-04 05:01:29 UTC
How many monitors are you using?
Comment 9 Jimmy Berry 2010-08-04 05:02:20 UTC
Two monitors. Was two 19" but just switched to two 24".
Comment 10 Alex Deucher 2010-08-04 05:32:15 UTC
Created attachment 27336 [details]
add lower power mode for multi-head

The multi-head power state currently selected has the same clock for all modes. so it won't change the clocks when multiple heads are active.  This patch should provide a lower clock for multi-head modes.
Comment 11 Alex Deucher 2010-08-04 05:34:24 UTC
Created attachment 27337 [details]
updated patch

sorry typo in the last one.
Comment 12 Jimmy Berry 2010-08-04 08:26:08 UTC
I branched the suse kernel-desktop build and applied the patch during the build...installed...tested (http://download.opensuse.org/repositories/home:/boombatower:/branches:/Kernel:/HEAD/openSUSE_11.3/x86_64/).


echo high > /sys/class/drm/card0/device/power_profile
cat /sys/kernel/debug/dri/0/radeon_pm_info
default engine clock: 750000 kHz
current engine clock: 750000 kHz
default memory clock: 900000 kHz
current memory clock: 900000 kHz
voltage: 1263 mV
PCIE lanes: 16

echo low > /sys/class/drm/card0/device/power_profile
cat /sys/kernel/debug/dri/0/radeon_pm_info
default engine clock: 750000 kHz
current engine clock: 500000 kHz
default memory clock: 900000 kHz
current memory clock: 900000 kHz
voltage: 1263 mV
PCIE lanes: 16

My screen flickered when I changed the power_profile, just as madigens said it did for him, and my fan seems to be spinning slower!

Thanks!
Comment 13 Alex Deucher 2010-08-04 15:15:14 UTC
Patch sent to Dave.
Comment 14 Zhang Rui 2012-01-18 02:14:28 UTC
It's great that kernel bugzilla is back.

can you please verify if the problem still exists in the latest upstream
kernel?.
Comment 15 Zhang Rui 2012-05-24 07:37:51 UTC
bug closed as there is no response from the bug reporter.
please feel free to reopen it if the problem still exists in the latest upstream kernel.
Comment 16 Jimmy Berry 2012-05-29 09:31:25 UTC
I can verify that this works in kernel 3.4.0. That being I can change the fan speed manually as described in #12.

Note You need to log in before you can comment on or make changes to this bug.