lanefu changed the topic of #armbian-rockchip to: Armbian - Linux for ARM development boards | Rockchip SoC | www.armbian.com | This channel is relayed to the equivalent Discord channel | this channel is logged
<Armbian-Discord> <F​reAk> Sorry just got back from Costco. I got the same thing, what kernel are you on?
<Armbian-Discord> <F​reAk> `[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=6
<Armbian-Discord> <F​reAk> [ 2.223164] fan53555-regulator 0-0040: FAN53555 Option[8] Rev[1] Detected!
<Armbian-Discord> <F​reAk> [ 2.226149] fan53555-regulator 0-0041: FAN53555 Option[8] Rev[1] Detected!`
<Armbian-Discord> <F​reAk> confused missing dmidecode noises
<Armbian-Discord> <F​reAk> Oh right... wrong platform for dmidecode
<Armbian-Discord> <c​0rnelius> running a custom one, so I'm gonna assume if you also have that and it doesn't work then its probs not important. unless there is a trip point?
<Armbian-Discord> <F​reAk> "Woosh" factor is high on that question.
<Armbian-Discord> <F​reAk> Tiny bit of googling... thats quite the rabbit hole. Assuming kernel controlled fan thermals?
<Armbian-Discord> <c​0rnelius> i see a lot of them for temp and it may be they just need to be set with a service and script. I've never done so on this board, but I would think if it works its just like the rest ```
<Armbian-Discord> <c​0rnelius> nanopc: ~ $ ls /sys/devices/virtual/thermal/thermal_zone*
<Armbian-Discord> <c​0rnelius> /sys/devices/virtual/thermal/thermal_zone0:
<Armbian-Discord> <c​0rnelius> available_policies cdev3_weight policy trip_point_2_hyst
<Armbian-Discord> <c​0rnelius> cdev0 cdev4 power trip_point_2_temp
<Armbian-Discord> <c​0rnelius> cdev0_trip_point cdev4_trip_point slope trip_point_2_type
<Armbian-Discord> <c​0rnelius> cdev0_weight cdev4_weight subsystem trip_point_3_hyst
<Armbian-Discord> <c​0rnelius> cdev1 hwmon1 sustainable_power trip_point_3_temp
<Armbian-Discord> <c​0rnelius> cdev1_trip_point integral_cutoff temp trip_point_3_type
<Armbian-Discord> <c​0rnelius> cdev1_weight k_d trip_point_0_hyst trip_point_4_hyst
<Armbian-Discord> <c​0rnelius> cdev2 k_i trip_point_0_temp trip_point_4_temp
<Armbian-Discord> <c​0rnelius> cdev2_trip_point k_po trip_point_0_type trip_point_4_type
<Armbian-Discord> <c​0rnelius> cdev2_weight k_pu trip_point_1_hyst type
Armbian-Discord has quit [Remote host closed the connection]
Armbian-Discord has joined #armbian-rockchip
<Armbian-Discord> <c​0rnelius> do you have those trip_points?
<Armbian-Discord> <F​reAk> looks like
<Armbian-Discord> <F​reAk> yes those exactly
<Armbian-Discord> <c​0rnelius> the question then becomes which one triggers the fan..? On an odroid N2+ its 4, but on a XU4 its 0.
<Armbian-Discord> <F​reAk> do I echo something into a trip point?
<Armbian-Discord> <c​0rnelius> yes
<Armbian-Discord> <F​reAk> and how do I read the temp?
<Armbian-Discord> <c​0rnelius> `nanopc: ~ $ cat /sys/devices/virtual/thermal/thermal_zone0/trip_point_4_temp
<Armbian-Discord> <c​0rnelius> 65000
<Armbian-Discord> <c​0rnelius> `
<Armbian-Discord> <c​0rnelius> so thats the default trip point
<Armbian-Discord> <c​0rnelius> not sure if that the fan trigger though
<Armbian-Discord> <F​reAk> so I see symlinks of cdev0 through 4 to cooling_device0, 1, 2
<Armbian-Discord> <F​reAk> hmmm
<Armbian-Discord> <F​reAk> cdev0 -> cooling_device0, cdev1, cdev2 -> cooling_device1, cdev3 cdev4 -> cooling_device2
<Armbian-Discord> <F​reAk> then each of those have a trip point
<Armbian-Discord> <c​0rnelius> never done this with rockchip... only amlogic and samsung.
<Armbian-Discord> <c​0rnelius> but what I do is echo in my trip point during boot 'once I find what triggers the fan' and have a service run it. my script: https://github.com/pyavitz/scripts/blob/master/fan-ctrl#L8
<Armbian-Discord> <c​0rnelius> this will need to be edited I'm sure.
<Armbian-Discord> <F​reAk> I'm assuming it should be any of the writable trip_point attributes
<Armbian-Discord> <F​reAk> i.e. trip_point_0_hyst
<Armbian-Discord> <F​reAk> I miss /sys/class/pwm/pwmchip1/pwm0/duty_cycle
<Armbian-Discord> <c​0rnelius> its linux. very little is static.
<Armbian-Discord> <F​reAk> Oh I know.
<Armbian-Discord> <F​reAk> Management on one side: "don't update the OS, it costs 20k for the vendor to rebuild the kernel driver" customer on the other "if you don't update your rhel version you'll be in breach of contract"
<Armbian-Discord> <F​reAk> Read the requirements closely and it says that /etc/redhat-release must say 6.4...
<Armbian-Discord> <c​0rnelius> 20K to rebuild? I need to get a job there.
<Armbian-Discord> <F​reAk> 6.3 kernel, 6.4 rhel release, packages from 6.7, that job was a mess...
<Armbian-Discord> <F​reAk> echoed 50000 into all the trip points in thermal zone 0, nothing... moving onto the next dir
<Armbian-Discord> <c​0rnelius> echo something lower... my rk3399 idles around 39
<Armbian-Discord> <F​reAk> oh interesting
<Armbian-Discord> <F​reAk> thermal_zone1/trip_point1_temp is emergency shutdown
<Armbian-Discord> <c​0rnelius> well now we know... don't mess with that one. I think thats the same on N2.
<Armbian-Discord> <c​0rnelius> try 4
<Armbian-Discord> <F​reAk> The fan DID spin though... one sec its also my network's pihole, I should probably spin up a secondary when I play with it >.<
<Armbian-Discord> <F​reAk> `Message from syslogd@orthus at Dec 10 18:44:19 ...
<Armbian-Discord> <F​reAk> kernel:[67757.568131] thermal thermal_zone1: gpu-thermal: critical temperature reached, shutting down
<Armbian-Discord> <F​reAk> Message from syslogd@orthus at Dec 10 18:44:19 ...
<Armbian-Discord> <F​reAk> kernel:[67757.568913] reboot: HARDWARE PROTECTION shutdown (Temperature too high)`
<Armbian-Discord> <F​reAk> Ah ha! its the gpu
<Armbian-Discord> <F​reAk> Ok, back in thermal_zone0, trip_point types 0 & 1 are passive, 2 is critical and 3 and 4 are active.
<Armbian-Discord> <F​reAk> I'm thinking mess with the last two
<Armbian-Discord> <F​reAk> There it is! echo 30000 > /sys/devices/virtual/thermal/thermal_zone0/trip_point_4_temp
<Armbian-Discord> <F​reAk> fan spun right up
<Armbian-Discord> <F​reAk> Interesting... reset 4, then did the same with 3, but its spinning slower.
<Armbian-Discord> <F​reAk> I think I understand this now
<Armbian-Discord> <F​reAk> Thank you @c0rnelius your assistance has been enlightening!
<Armbian-Discord> <c​0rnelius> @FreAk you are very welcome.
<Armbian-Discord> <F​reAk> Would you like me to submit the modded script back to you for publishing? I don't have a github due to employer requirements, they get first stab at any code I write that I want to publish. BUT, I did find forking and submitting back to the OG author is a "blessed" way to get around it.
<Armbian-Discord> <c​0rnelius> if you want to, sure. I also took note of what you said worked. So its not really a game changer if you decide against it or don't have the time. I appreciate the ask.
<Armbian-Discord> <F​reAk> grumble its less adding support for the nanopc-t4 and more writing a whole new script since there are two configurable trip points.
<Armbian-Discord> <b​albes150> On T4, fan control is performed at the core level (all the necessary functionality is in the core). No manual scripts are needed. If you are not satisfied with the modes, change the temperature trigger points.
Armbian-Discord has quit [Remote host closed the connection]
Armbian-Discord has joined #armbian-rockchip