Bug 101653 - FAN speed is too high when displays are off
Summary: FAN speed is too high when displays are off
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/AMDgpu (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-29 23:32 UTC by Alexander Tsoy
Modified: 2017-07-24 00:13 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
kernel log (142.37 KB, text/plain)
2017-06-29 23:32 UTC, Alexander Tsoy
no flags Details
possible fix (1.35 KB, patch)
2017-06-30 14:02 UTC, Alex Deucher
no flags Details | Splinter Review

Description Alexander Tsoy 2017-06-29 23:32:50 UTC
Created attachment 132364 [details]
kernel log

While investigating bug #101528, I've noticed another issue: FAN speed is too high when display are off.

Display is off:
$ cat /sys/class/hwmon/hwmon6/fan1_input
1914

Display is on:
$ cat /sys/class/hwmon/hwmon6/fan1_input
941

In both cases sclk, mclk and pcie are in the same lowest state.


GPU:
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Tonga PRO [Radeon R9 285/380] [1002:6939] (rev f1) (prog-if 00 [VGA controller])
	Subsystem: PC Partner Limited / Sapphire Technology Tonga PRO [Radeon R9 285/380] [174b:e305]

kernel:
$ uname -r
4.11.7-gentoo
Comment 1 Alexander Tsoy 2017-06-30 00:25:30 UTC
It looks like actual FAN speed doesn't change. It's just reported differently.
Comment 2 Alexander Tsoy 2017-06-30 03:03:12 UTC
smu7_get_xclk() returns some crazy values when display is off. And this value depends on some state that changes every boot.

$ sudo journalctl -b -1 -o cat | grep reference_clock | sort | uniq -c
      4 amdgpu: reference_clock = 232169472, tmp = 0
      5 amdgpu: reference_clock = 2700, tmp = 0
$ sudo journalctl -b -o cat | grep reference_clock | sort | uniq -c
     16 amdgpu: reference_clock = 1305214976, tmp = 0
     12 amdgpu: reference_clock = 2700, tmp = 0


So now after reboot I get a different FAN speed when display is off:
$ cat /sys/class/hwmon/hwmon6/fan1_input
1057

When display is on, FAN speed is always consistent.
$ cat /sys/class/hwmon/hwmon6/fan1_input
937
Comment 3 Alex Deucher 2017-06-30 14:02:56 UTC
Created attachment 132374 [details] [review]
possible fix

Depends on attachment 132358 [details] [review].
Comment 4 Alexander Tsoy 2017-06-30 23:18:26 UTC
(In reply to Alex Deucher from comment #3)
> Created attachment 132374 [details] [review] [review]
> possible fix

It works. Thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.