Where can I find the SW to make the Cloudshell 2 fan work? I have tried several of the forum solutions but they are not available.
Thanks
Does this work?
apt -y install i2c-tools
i2cset -y 0 0x60 0x05 0x00
And to stop:
i2cset -y 0 0x60 0x05 0x05
Wow Vielen Dank!!!
Yes both instructions work. will it work if I turn it off?
Just give it a try
No, this is not boot persistent. Simple way:
echo -e '#!/bin/dash\ni2cset -y 0 0x60 0x05 0x00' > /var/lib/dietpi/postboot.d/cloudshell2-fan.sh
A systemd service is also possible, and would be probably nicer if you want to control it easier. Currently, youâd need to run the stop command posted above, and to start it again the start command manually. With a systemd service you can instead do:
systemctl start cloudshell2-fan
systemctl status cloudshell2-fan
systemctl stop cloudshell2-fan
Let me know if you need that.
Do I need to Install something?
root@DietX:~# echo -e '#!/bin/dash\ni2cset -y 0 0x60 0x05 0x00' > /var/lib/dietpi/postboot.d/cloudshell2-fan.sh
root@DietX:~# systemctl start cloudshell2-fan
Failed to start cloudshell2-fan.service: Unit cloudshell2-fan.service not found.
Ah, the service controls were just an example what you can do IF you create a systemd service. The first command however added a simple script to be executed once at boot, no service.
I get it! I am not a good programmer, how can I implement it?
It has been done before but when I look for the examples the code is not there any more.
#!/bin/bash
REFRESH="1"
CPU_TEMP_THRESHOLD="50"
CPU_TEMP_THRESHOLD_LOW="40"
FAN_CHANGED="*"
get_cpu_temperature() {
for i in {0..4}
do
_t=$(($(</sys/class/thermal/thermal_zone${i}/temp) / 1000))
CPU_TEMP[$i]="$_t"
done
}
fan_on() {
i2cset -y 1 0x60 0x05 0x00
}
fan_off() {
i2cset -y 1 0x60 0x05 0x05
}
handle_fan() {
for i in "${!CPU_TEMP[@]}"
do
if (( "${CPU_TEMP[$i]}" > "${CPU_TEMP_THRESHOLD}" ))
then
fan_on
return
fi
done
for i in "${!CPU_TEMP[@]}"
do
if (( "${CPU_TEMP[$i]}" < "${CPU_TEMP_THRESHOLD_LOW}" ))
then
fan_off
return
fi
done
}
get_cpu_temperature
handle_fan
safe this as a bash script into
/etc/cron.minutely
Run âdietpi-cronâ to enable and configure this feature and make the file executable via chmod. I did chmod to 755, maybe to much rights but it works.
It will check every minute for the temps and if >= 50°C it starts the fan, <= 40°C stops the fan.
You can change the thresholds in the script is you like.
greets
Thank you, I ran the code and make the adjustments, Fan still runs but it does not stop. The boards temp is around 30°C and fan is still running even after rebooting.
Any tips?
-Scott
What do you mean by âyou ran the codeâ ?
It is not to be run but saved as a file (made executable by chmod) and the cron job handles the running of the file every minute if cron is configured correct.
Schnitzelbrain
Exactly! Followed all your steps!
I did an upgrade and the Cloudshell on XU4 screen wont turn on again.
When I boot the screen background leds flash.
I am on Dietpi V9.1
I tried all the above fixes and nothing!
From which to which version was the kernel upgraded (if at all)?
I do the automatic updates!
Linux DietXU4 6.1.63-current-odroidxu4 #1 SMP PREEMPT Tue Nov 7 20:10:43 UTC 20 23 armv7l GNU/Linux
Is this what you need?
When did you do the last DietPi or APT package upgrade? To test whether a kernel downgrade helps, we would need to know which kernel version was previously used.
Which automatic updates you mean that you do automatic daily APT package upgrades?
I do DietPi and APT package upgrades every week! This problem started a month ago.
How can I find out what version I was previously on?
Not sure either when RAM logging has not been disabled. Probably it works with the most recent kernel:
cd /tmp
wget https://dietpi.com/downloads/binaries/testing/linux-{dtb,image}-edge-odroidxu4.deb
dpkg -i linux-{dtb,image}-edge-odroidxu4.deb
rm linux-{dtb,image}-edge-odroidxu4.deb
reboot
Hej Michalng,
Nothing happened!