pyrestone / jetson-fan-ctl Goto Github PK
View Code? Open in Web Editor NEWAutomagic fan control for the Nvidia Jetson Nano
License: MIT License
Automagic fan control for the Nvidia Jetson Nano
License: MIT License
I've recompiled the kernel because I wanted to enable kvm. The commands that I have issued are :
git clone https://github.com/OE4T/linux-tegra-4.9.git
cd linux-tegra-4.9
git checkout oe4t-patches-l4t-r32.7.3
cp /proc/config.gz .
gunzip config.gz
mv config .config
make menuconfig —> (enable kvm)
make -j4
make -j4 modules_install
make -j4 Image
mv /boot/Image-kvm Image2-kvm
cp arch/arm64/boot/Image /boot/Image
the dtb file to use is called : tegra210-p3448-0000-p3449-0000-a02.dtb
and the extlinux.conf is something like this :
TIMEOUT 30
DEFAULT primary
MENU TITLE L4T boot options
LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
INITRD /boot/initrd
FDT /boot/tegra210-p3448-0000-p3449-0000-a02.dtb
APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0
Unfortunately Xfce freezes a second before to be fully loaded and I suspect that the cause is your script. Is it supposed to work on the scenario that I have explained ? Yes,I've removed your script,giving these commands :
systemctl disable automagic-fan
mv /usr/local/bin/automagic-fan /usr/local/bin/automagic-fan_
mv /lib/systemd/system/automagic-fan.service /lib/systemd/system/automagic-fan.service_
mv /etc/automagic-fan /etc/automagic-fan_
but the problem still there. xfce won't fully load. But i still suspect that the cause is your script. I would like to know your opinion.
I installed this package on my AGX Xavier. It works! I love it.
But after a while, the system starts to automatically reboot sporadically.
I wonder why and investigate a little bit:
Setup: AGX Xavier is running at MAXN power mode, historically I would manually run "sudo jetson_clocks" to turn on the fan to 255 (maximal speed). But just once to change the fan speed.
Potential root cause of sporatical reset:
Now after install automagic-fan, every 2 secs, the fanctl.py will write fanspeed to /sys/devices/pwm-fan/target_pwm.
Hypothesis: while AGX is running at MAXN and it is known issue that in this mode AGX is very voltage/current sensitive. Every time when set_speed(spd) occurs, it might potentially create the voltage swing that might upset AGX to trigger the reset.
Avoiding unnecessary set_speed(spd) strategy:
I modify the code to do following to reduce the frequency of set_speed(spd) while meets my need of thermal management yet still enjoy the silent when the unit is idle:
I tested it with my AGX Xavier running MAXN power mode and the result is very stable now.
If you like to review my code and please provide me permission to push (branch: watermark) changes to you. Please let me know ; ))
Thank you again for your code. It helps a lot.
Hi. First of all, thanks for publishing this software. However, I can't force it to run. When I'm trying to manually restart the service it says, that the service is masked. When I'm trying to unmask it, nothing happens.
Any ideas how to fix that?
jetson@nano:~$ sudo service automagic-fan restart
Failed to restart automagic-fan.service: Unit automagic-fan.service is masked.
jetson@nano:~$ sudo systemctl unmask automagic-fan.service
jetson@nano:~$ sudo service automagic-fan restart
Failed to restart automagic-fan.service: Unit automagic-fan.service is masked.
jetson@nano:~$ sudo systemctl status automagic-fan.service
● automagic-fan.service
Loaded: masked (Reason: Unit automagic-fan.service is masked.)
Active: inactive (dead)
I have jetson_stats on my machine and it has a service that controls when jetson_clocks is run... Will jetson-fan-ctl upset that given the config files has a MAX_PERF value which causes jetson_clocks to be run?
Hi!
Great work with the fan, it works for me fine but I always get these errors on startup:
ubuntu python3[4733]: Maximizing clock speeds with jetson_clocks
ubuntu python3[4733]: /usr/bin/jetson_clocks: line 316: : No such file or directory
ubuntu python3[4733]: /usr/bin/jetson_clocks: line 317: : No such file or directory
ubuntu python3[4733]: Error: Failed to max GPU frequency!
ubuntu python3[4733]: Setup complete.
ubuntu python3[4733]: Running normally.
Would you have any advice on how to resolve them?
Cheers!
The development package is not required by this pure-python script. You should adjust the recommendation to offer just python3
as a dependency.
The automagic-fan service is active and running on boot but the fan doesn't start spinning unless the service gets restarted.
I was able to fix it by adding this line to the service file.
ExecStartPre=/bin/sleep 5
I get the following when running the script.
=>sudo service automagic-fan status
● automagic-fan.service - Automagic fan control
Loaded: loaded (/lib/systemd/system/automagic-fan.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2020-05-10 19:35:19 CEST; 13h ago
Main PID: 2579 (python3)
Tasks: 1 (limit: 4163)
CGroup: /system.slice/automagic-fan.service
└─2579 /usr/bin/python3 -u /usr/local/bin/automagic-fan/fanctl.pyMay 10 19:35:19 nano systemd[1]: Started Automagic fan control.
May 10 19:35:24 nano python3[2579]: Maximizing clock speeds with jetson_clocks
May 10 19:35:24 nano python3[2579]: /usr/bin/jetson_clocks: line 269: : No such file or directory
May 10 19:35:24 nano python3[2579]: /usr/bin/jetson_clocks: line 270: : No such file or directory
May 10 19:35:24 nano python3[2579]: Error: Failed to max GPU frequency!
May 10 19:35:24 nano python3[2579]: Setup complete.
May 10 19:35:24 nano python3[2579]: Running normally.
Lines 269/270
echo 0 > "${GPU_RAIL_GATE}" cat "${GPU_MAX_FREQ}" > "${GPU_MIN_FREQ}"
Getting this error when trying to install.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.