Bug 194966

Summary: Radeon KMS driver lack power and clocks management support
Product: Base System Reporter: zuborg
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Overcome By Events    
Severity: Affects Many People CC: dumbbell, emaste, james122333, sasamotikomi, uzsolt, x11, zeising
Priority: ---    
Version: 10.1-STABLE   
Hardware: Any   
OS: Any   
Description Flags
Patch /sys/dev/drm2/. radeonkms driver change device sclk and mclk when initializing according to drm.force_sclk and drm.force_mclk loader.conf tuneables none

Description zuborg 2014-11-12 12:35:07 UTC
Created attachment 149319 [details]
Patch /sys/dev/drm2/. radeonkms driver change device sclk and mclk when initializing according to drm.force_sclk and drm.force_mclk loader.conf tuneables

Radeon KMS driver initialize hardware in default 'performance' mode, which cause significant noise and power consumption.

Following patch adds rudimentary support of engine/memory clocks management.

Immediately after initialization driver looks at value of drm.force_sclk and drm.force_mclk variables (tuneable via loader.conf). If non-zero value specified driver call radeon_set_engine_clock()/radeon_set_memory_clock() to adjust clocks setting.

Boundary checks are not performed, it should be used with care!

Actually it would be significantly better to add direct support of clocks/voltage values by `sysctl` on the fly, not only via loader.conf as in proposed patch.

Patch was tested, values (in MHz)
reduce noise of card fan very noticeable.
Comment 1 Marcus von Appen freebsd_committer freebsd_triage 2015-02-18 11:54:21 UTC
Updated 10.1-BETA and 10.1-RC versioned bugs to 10.1-STABLE.
Comment 2 Glen Barber freebsd_committer 2015-07-07 15:59:27 UTC
Can you verify if this problem persists on 10.2-PRERELEASE?
Comment 3 zuborg 2015-07-14 07:36:46 UTC
(In reply to Glen Barber from comment #2)
Yes, the problem with overheating still persist in 10.2-PRERELEASE r285308.
Comment 5 James Lin 2016-08-14 07:13:06 UTC
a10-5700(apu) not work(not show real temperature:1 degree)...
Comment 6 Zsolt Udvari 2017-01-08 16:31:36 UTC
Is there any news about this issue?
Comment 7 Niclas Zeising freebsd_committer 2018-01-12 22:14:34 UTC
Is this an issue with an updated driver from drm-kmod-next?
Comment 8 Zsolt Udvari 2018-01-13 08:58:45 UTC
(In reply to Niclas Zeising from comment #7)
I can't test it because my old laptop (with radeon card) went awry and I bought a new one (with intel).
Comment 9 Niclas Zeising freebsd_committer 2018-01-13 21:53:52 UTC
Closing this, since the original hardware is not around any more, and it was a long time ago.  Please re-open this or create a new PR if the issue occurs again.
Comment 10 James Lin 2018-02-21 16:59:17 UTC
(In reply to Niclas Zeising from comment #9)
My PC was broken before...so I rebought it few days ago...
Is there a "dynpm" feature(radeon) in drm-kmod-next?
If so...I'll give it a try later...