eliminated the crazy chirp ...

Post Reply
User avatar
joerg
Posts: 1051
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 35 times
Been thanked: 74 times
Contact:

eliminated the crazy chirp ...

Post by joerg » Fri Feb 23, 2018 2:54 am

;)
cooling.jpg
cooling.jpg (531.25 KiB) Viewed 9513 times

elatllat
Posts: 1747
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 44 times
Been thanked: 112 times
Contact:

Re: eliminated the crazy chirp ...

Post by elatllat » Fri Feb 23, 2018 4:04 am

yah I was tempted to do that but went with the fan on all the time solution.
odroid said they would connect an oscilloscope, but no data posted from that yet.

User avatar
rooted
Posts: 7633
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 670 times
Been thanked: 180 times
Contact:

Re: eliminated the crazy chirp ...

Post by rooted » Fri Feb 23, 2018 5:34 am

I have an oscilloscope but I was also waiting for the results.

tkaiser
Posts: 672
Joined: Mon Nov 09, 2015 12:30 am
languages_spoken: english
ODROIDs: C1+, C2, XU4, HC1
Has thanked: 0
Been thanked: 2 times
Contact:

Re: eliminated the crazy chirp ...

Post by tkaiser » Fri Feb 23, 2018 7:27 am

I eliminated the fan by adding the following to /etc/rc.local:

Code: Select all

echo 70000 >/sys/devices/virtual/thermal/thermal_zone0/trip_point_0_temp
echo 80000 >/sys/devices/virtual/thermal/thermal_zone0/trip_point_1_temp
Besides that N1 is not an XU4. At same performance level both consumption and heat generation are laughable compared to XU4 :)

I ran heavy loads without any heatsink or fan at all and throttling simply does the job: https://forum.armbian.com/topic/6496-od ... ment=49471

User avatar
rooted
Posts: 7633
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 670 times
Been thanked: 180 times
Contact:

Re: eliminated the crazy chirp ...

Post by rooted » Fri Feb 23, 2018 7:52 am

If using two mechanical 2.5" drives in a small case you will want active cooling to help keep the drives cool.

I can certainly see the vast majority of users getting by with the XU4 passive heatsink without experiencing degraded performance due to throttling.

tkaiser
Posts: 672
Joined: Mon Nov 09, 2015 12:30 am
languages_spoken: english
ODROIDs: C1+, C2, XU4, HC1
Has thanked: 0
Been thanked: 2 times
Contact:

Re: eliminated the crazy chirp ...

Post by tkaiser » Fri Feb 23, 2018 8:00 am

rooted wrote:If using two mechanical 2.5" drives in a small case you will want active cooling to help keep the drives cool.
Me not :)

I don't care about HDD temperatures (and statistics gone wrong), I only care about vibrations. But that's not related to the fansink on RK3399 anyway (and I also don't care about letting the RK3399 run at 80°C since those chips are made for that even if energy efficiency is slightly degraded when running at higher temperatures)

elatllat
Posts: 1747
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 44 times
Been thanked: 112 times
Contact:

Re: eliminated the crazy chirp ...

Post by elatllat » Fri Feb 23, 2018 11:42 am

I was able to reproduce a noise on the XU4 with

Code: Select all

echo "40 120 180 240" > /sys/devices/platform/pwm-fan/hwmon/hwmon0/fan_speed
anything under 77(30%) makes an annoying sound.
anything under 39(15%) and the fan won't spin.

User avatar
odroid
Site Admin
Posts: 34153
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 678 times
Been thanked: 617 times
Contact:

Re: eliminated the crazy chirp ...

Post by odroid » Fri Feb 23, 2018 12:03 pm

Nice finding.
Do you think the minimal PWM duty ratio should be higher than 40%?

elatllat
Posts: 1747
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 44 times
Been thanked: 112 times
Contact:

Re: eliminated the crazy chirp ...

Post by elatllat » Fri Feb 23, 2018 12:38 pm

Likely.

Should merge the fan_speed patch to the N1 kernel and test it...

crashoverride
Posts: 4953
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 286 times
Contact:

Re: eliminated the crazy chirp ...

Post by crashoverride » Fri Feb 23, 2018 1:04 pm

I thought the sound was an issue with overcoming the inertia of the fan when starting it. For regular (not stepper) motors, you have to start them at full speed and then reduce down to the desired rate after they have "spun up". I do not know if the PWM driver currently does this or not. My theory is that sound is produced from vibration as the motor attempts to gain enough inertia to overcome its magnets.

User avatar
rooted
Posts: 7633
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 670 times
Been thanked: 180 times
Contact:

Re: eliminated the crazy chirp ...

Post by rooted » Fri Feb 23, 2018 1:16 pm

I haven't looked at the code but I don't think the XU4 fan spins up at 100% duty, it doesn't make this sound.

User avatar
odroid
Site Admin
Posts: 34153
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 678 times
Been thanked: 617 times
Contact:

Re: eliminated the crazy chirp ...

Post by odroid » Fri Feb 23, 2018 2:45 pm

Next update will fix the annoying chirp noise issue. It will be released early next week.

DarkBahamut
Posts: 332
Joined: Tue Jan 19, 2016 10:19 am
languages_spoken: english
ODROIDs: XU4, N1
Has thanked: 0
Been thanked: 0
Contact:

Re: eliminated the crazy chirp ...

Post by DarkBahamut » Fri Feb 23, 2018 7:21 pm

Yeah, the XU4 definitely doesn't go to 100% first. It will just start the fan at whatever pwm value is set. On mine pwm=65 is the lowest usable value that gives no other annoying sounds. I find that works well, but there will be some variation between units so it will need to be higher at the kernel level then users can just lower it later if they want to (and their cooler allows).

elatllat
Posts: 1747
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 44 times
Been thanked: 112 times
Contact:

Re: eliminated the crazy chirp ...

Post by elatllat » Fri Feb 23, 2018 10:44 pm

odroid wrote:Nice finding.
Do you think the minimal PWM duty ratio should be higher than 40%?
That should be an ok default min, but for those with upgraded fans let the user set any value.

User avatar
joerg
Posts: 1051
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 35 times
Been thanked: 74 times
Contact:

Re: eliminated the crazy chirp ...

Post by joerg » Sat Feb 24, 2018 1:17 am

For those who don't want to wait and control the fan from userland:

Modify rk3399-odroidn1-linux.dts

Code: Select all

/*
	fan0: pwm-fan {
		compatible = "pwm-fan";
		status = "okay";
		pwms = <&pwm0 0 40000 PWM_POLARITY_INVERTED>; // 25 kHz 

		cooling-min-state = <0>;
		cooling-max-state = <3>;
		#cooling-cells = <2>;
		cooling-levels = <255 125 102 51>; // PWM duty cycle
	};	
*/
...
	cooling-maps {
		/* fan cooling map */
/*
		map0 {
			trip = <&cpu_alert0>;
			cooling-device =
				<&fan0 0 1>;
		};
		map1 {
			trip = <&cpu_alert1>;
			cooling-device =
				<&fan0 1 2>;
		};
		map2 {
			trip = <&cpu_alert2>;
			cooling-device =
				<&fan0 2 3>;
		};
*/
Compile kernel, you will get new arch/arm64/boot/dts/rockchip/rk3399-odroidn1-linux.dtb, copy to /media/boot on N1.

Now pwm0 can be controlled from userland:

Code: Select all

echo 0 > /sys/class/pwm/pwmchip0/export
echo normal >  /sys/class/pwm/pwmchip0/pwm0/polarity
echo 40000 >  /sys/class/pwm/pwmchip0/pwm0/period  //should be 25kHz
echo 1 >  /sys/class/pwm/pwmchip0/pwm0/enable
echo 0 >  /sys/class/pwm/pwmchip0/pwm0/duty_cycle
echo <some value> >  /sys/class/pwm/pwmchip0/pwm0/duty_cycle
For some reason I get error if I try to put 40000 to duty_cycle, but 39990 works. I can't reproduce the chirp, I tried different frequencies and different duty cycles. Maybe because the fan with heatsink is loose and not mounted on the cpu.

Note that I was about to port my pwm fan prog that I use on C2 in my car, but I remembered that once I got this heatsink with a C1+. As my former miniITX board was also passive cooled and for the first time I have this NAS with N1 aside on my table I decided to mount the passive heatsink.

User avatar
rooted
Posts: 7633
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 670 times
Been thanked: 180 times
Contact:

Re: eliminated the crazy chirp ...

Post by rooted » Sat Feb 24, 2018 2:01 am

@joerg

Could you post your edited dts or create a patch, I put your edit in the dts but it wouldn't compile.

tkaiser
Posts: 672
Joined: Mon Nov 09, 2015 12:30 am
languages_spoken: english
ODROIDs: C1+, C2, XU4, HC1
Has thanked: 0
Been thanked: 2 times
Contact:

Re: eliminated the crazy chirp ...

Post by tkaiser » Sat Feb 24, 2018 2:06 am

joerg wrote:Modify rk3399-odroidn1-linux.dts
Shouldn't this be possible after installing 'device-tree-compiler' package using dtc command too?

Code: Select all

cd /media/boot
dtc -I dtb -O dts -o rk3399-odroidn1-linux.dts rk3399-odroidn1-linux.dtb
cp rk3399-odroidn1-linux.dts rk3399-odroidn1-linux-mod.dts # backup
vi rk3399-odroidn1-linux-mod.dts
dtc -I dts -O dtb -o rk3399-odroidn1-linux.dtb rk3399-odroidn1-linux-mod.dts
(Hint: will throw tons of warnings that look like this https://forum.armbian.com/topic/6496-od ... ment=49438 )

User avatar
joerg
Posts: 1051
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 35 times
Been thanked: 74 times
Contact:

Re: eliminated the crazy chirp ...

Post by joerg » Sat Feb 24, 2018 2:51 am

Surely. I never used it this way. Before I received the N1 mainly I used Android on my Odroids.

User avatar
joerg
Posts: 1051
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 35 times
Been thanked: 74 times
Contact:

Re: eliminated the crazy chirp ...

Post by joerg » Sat Feb 24, 2018 3:04 am

@rooted
Better patch as I have modified gpio-leds also and you only need fan pwm:
(look at the 25kHz and duty cycle comments, there I changed also because of compiling errors)

Code: Select all

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-odroidn1-linux.dts b/arch/arm64/boot/dts/rockchip/rk3399-odroidn1-linux.dts
index cc36c45..bf0c84d 100755
--- a/arch/arm64/boot/dts/rockchip/rk3399-odroidn1-linux.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-odroidn1-linux.dts
@@ -134,16 +142,18 @@
                status = "okay";
        };
 
+/*
        fan0: pwm-fan {
                compatible = "pwm-fan";
                status = "okay";
-               pwms = <&pwm0 0 40000 PWM_POLARITY_INVERTED>; /* 25 kHz */
+               pwms = <&pwm0 0 40000 PWM_POLARITY_INVERTED>; // 25 kHz 
 
                cooling-min-state = <0>;
                cooling-max-state = <3>;
                #cooling-cells = <2>;
-               cooling-levels = <255 125 102 51>; /* PWM duty cycle */
+               cooling-levels = <255 125 102 51>; // PWM duty cycle
        };      
+*/
 
        dw_hdmi_audio: dw-hdmi-audio {
                status = "disabled";
@@ -871,6 +881,7 @@
 
        cooling-maps {
                /* fan cooling map */
+/*
                map0 {
                        trip = <&cpu_alert0>;
                        cooling-device =
@@ -886,6 +897,7 @@
                        cooling-device =
                                <&fan0 2 3>;
                };
+*/
 
                /* cpu cooling map */
                /* big cluster */

elatllat
Posts: 1747
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 44 times
Been thanked: 112 times
Contact:

Re: eliminated the crazy chirp ...

Post by elatllat » Sat Feb 24, 2018 4:25 pm

what would be nice is

trip_point_up_0_temp
trip_point_down_0_temp

so we could turn on the fan at 50 and turn it off at 40 without using an extra script.

elatllat
Posts: 1747
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 44 times
Been thanked: 112 times
Contact:

Re: eliminated the crazy chirp ...

Post by elatllat » Tue Feb 27, 2018 7:18 am

odroid wrote:Next update will fix the annoying chirp noise issue. It will be released early next week.
There is still a chirp in 4.4.112-16

crashoverride
Posts: 4953
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 286 times
Contact:

Re: eliminated the crazy chirp ...

Post by crashoverride » Tue Feb 27, 2018 11:02 am

So there was this really annoying sound filling the room. Turned out to be the N1. As I watched it, it was very evident that the noise is produced when attempting to start the fan. I could see the fan trying to rotate but failing. This supports my theory that the issue is overcoming the inertia of the fan motor. I can see the fan move forward as it tries to start. Then returning to where it previously was after it fails.

DarkBahamut
Posts: 332
Joined: Tue Jan 19, 2016 10:19 am
languages_spoken: english
ODROIDs: XU4, N1
Has thanked: 0
Been thanked: 0
Contact:

Re: eliminated the crazy chirp ...

Post by DarkBahamut » Tue Feb 27, 2018 11:22 am

The fan is pretty bad. I tested lots of PWM values and 150 is the lowest you can go to get both a clean startup with no chirp/sequel, and smooth running with no lingering harsh noises from the fan. The DT fan trips likely need to go to something like 0 150 190 255 for optimal noise profile.

However the N1 still suffers the same issue as the XU4 in that when the temps hover around the trip points the fan tries to start and stop constantly and it ends up even more pronounced on the N1 as it able to holds it temp lower and stay closer to those trip points, plus it has this chirping noise at every attempted start at low PWM values. Increasing the values will help, but the fan will keep trying to start and stop regularly.

The manual control patch from the XU4 works fine on the N1 after merging into the 4.4 version of that file. It makes scripts usable which resolves a lot of issues and at least gives some options. Given the cooling performance on the N1 even just disabling the fan could be an option for many as you'll only encounter thermal throttling on fairly long loads. I bet you could get a passive NAS/Media player out of the stock 'active' cooler with excellent performance for example. I'll do some proper thermal tests on it soon with the fan off to see how it behaves but I believe it should work pretty well :)

I added a PR for the fan patch in the mean time for anyone interested in using fan scripts.

crashoverride
Posts: 4953
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 286 times
Contact:

Re: eliminated the crazy chirp ...

Post by crashoverride » Tue Feb 27, 2018 11:28 am

DarkBahamut wrote:when the temps hover around the trip points the fan tries to start and stop constantly
This is called "hysteresis". There should be a setting for it somewhere in DT. It determins how long after the fan starts it will run for before shutting off again despite whether the temp has gone below the trip point.

DarkBahamut
Posts: 332
Joined: Tue Jan 19, 2016 10:19 am
languages_spoken: english
ODROIDs: XU4, N1
Has thanked: 0
Been thanked: 0
Contact:

Re: eliminated the crazy chirp ...

Post by DarkBahamut » Tue Feb 27, 2018 11:39 am

There is, but the hysteresis value in the DT is ignored, just like it is on the XU4.

Its currently set to 10c on all the fan trips but the constant start/stop is observed. I spent a long time looking at it back then but I could never find a good solution for it in the kernel :(

elatllat
Posts: 1747
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 44 times
Been thanked: 112 times
Contact:

Re: eliminated the crazy chirp ...

Post by elatllat » Tue Feb 27, 2018 7:47 pm

DarkBahamut wrote:...cooling performance...
Yah odroid should probably offer the N1Q as the default configuration.
DarkBahamut wrote:...I added a PR for the fan patch in the mean time for anyone interested in using fan scripts.
Thanks for getting that merged.

User avatar
rooted
Posts: 7633
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 670 times
Been thanked: 180 times
Contact:

Re: eliminated the crazy chirp ...

Post by rooted » Tue Feb 27, 2018 9:41 pm

[quote="DarkBahamut]
I added a PR for the fan patch in the mean time for anyone interested in using fan scripts.[/quote]

Where is the control?

elatllat
Posts: 1747
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 44 times
Been thanked: 112 times
Contact:

Re: eliminated the crazy chirp ...

Post by elatllat » Tue Feb 27, 2018 11:16 pm

rooted wrote:Where is the control?
I assume it will be the same as XU4 4.14 ~

DarkBahamut
Posts: 332
Joined: Tue Jan 19, 2016 10:19 am
languages_spoken: english
ODROIDs: XU4, N1
Has thanked: 0
Been thanked: 0
Contact:

Re: eliminated the crazy chirp ...

Post by DarkBahamut » Wed Feb 28, 2018 5:21 am

Yeah, it's pretty much the same as the XU4.

In /sys/devices/platform/pwm-fan/hwmon/hwmon0/ there is a new file called 'automatic'. It's set to 1 by default which uses the DT trip points for fan control, the same as it was before. If you echo 0 at that file you then take manual control over the fan. The file pwm1 controls the speed and you can echo any value between 0 and 255 to set the fan speed of your choice. This will then persist until you either echo a new speed, go back to DT/automatic control or reboot the system. The behaviour is mostly the same as 3.10 on the XU4 was, though the files are in different locations.

You can then of course script the fan in the OS if you wish. I'm using a modified version of the 'xu3-fan-control' script edited with a new service and adjustments to the settings to point it at the right files and with proper hysteresis values on the fan trip points like this

Code: Select all

if (( ${current_max_temp} >= 75000 )); then
    new_fan_speed=255
  elif (( ${current_max_temp} >= 71000 && prev_fan_speed == 255 )); then
    new_fan_speed=255
  elif (( ${current_max_temp} >= 70000 )); then
    new_fan_speed=200
  elif (( ${current_max_temp} >= 61000 && prev_fan_speed == 200 )); then
    new_fan_speed=200
  elif (( ${current_max_temp} >= 60000 )); then
	new_fan_speed=150
  elif (( ${current_max_temp} >= 50000 && prev_fan_speed >= 150 )); then
    new_fan_speed=150
  else
    new_fan_speed=0
I've been running a similar setup on the XU4 for a while and it seem to work pretty well for taming the fan :)

elatllat
Posts: 1747
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 44 times
Been thanked: 112 times
Contact:

Re: eliminated the crazy chirp ...

Post by elatllat » Wed Feb 28, 2018 7:17 am

On my N1 starting the fan with anything less than

Code: Select all

echo 145 > /sys/devices/platform/pwm-fan/hwmon/hwmon0/pwm1
makes an annoying sound
running at less than 120 is also not good.

elatllat
Posts: 1747
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 44 times
Been thanked: 112 times
Contact:

Re: eliminated the crazy chirp ...

Post by elatllat » Sat Mar 17, 2018 3:20 am


User avatar
odroid
Site Admin
Posts: 34153
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 678 times
Been thanked: 617 times
Contact:

Re: eliminated the crazy chirp ...

Post by odroid » Mon Mar 19, 2018 11:50 am

@elatllat
Thank you for the patch. We've merged it.
https://github.com/hardkernel/linux/com ... 0c89f07969

We will test it with a noisy fan today.

User avatar
rooted
Posts: 7633
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 670 times
Been thanked: 180 times
Contact:

Re: eliminated the crazy chirp ...

Post by rooted » Mon Mar 19, 2018 11:50 pm

They aren't all noisy? Mine is insanely loud.

User avatar
OverSun
Posts: 1493
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 19 times
Contact:

Re: eliminated the crazy chirp ...

Post by OverSun » Tue Mar 20, 2018 12:15 am

Mine is quieter than any before, XU4 and others. And therefore it produces really strange noise, which is on a brink of hearing and that's why is really disturbing. you cannot tell what it is, is it a mouse in the wall? a bug between window blinds? a north korea spy in the sewers??? very strange side-effect, but it is there. it takes time to tie this quiet soft "wheee-e-e-e-rl" to the actual fan and get used to it.

User avatar
AreaScout
Posts: 1334
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell, Go2, C4
Has thanked: 54 times
Been thanked: 182 times
Contact:

Re: eliminated the crazy chirp ...

Post by AreaScout » Tue Mar 20, 2018 12:26 am

on my N1 it sound like a Seagull, listen to the first 2 seconds of the video :shock:

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 0 guests