Jetson Nano A02 fix - Сooler was not spin when overheated #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I came across an interesting feature of this truly cool and compact project.
In short, I needed to invert the feed value in /sys/devices/pwm-fan/target_pwm. 255 was to turn the cooler off and 0 was to turn it to maximum.
I wanted to play around with the desired processor temperatures and set the maximum temperature below that of my room to 35 degrees. To my deepest surprise, the cooler stopped spinning and wouldn't start, even when the hot even without overclocking the jetson warmed up to 45 degrees.
At first I thought that the value fed as pwm was out of range of 0 and 255, but your code already solved this problem perfectly. Then I tried setting the maximum desired temperatures much higher than adequate, and the cooler on the Jetson Nano started to take off. Then I realized that the control is inverted somehow, so I tried "flipping" the pwm control byte, and now it works adequately.
I don't know if it's only a difference between the Jetson Nano A2 and B1 boards, but it's definitely not OS related, as I've tried the latest versions of JetPack and the commuity version on Xubuntu. If you have a chance to check on the B1, that would be fine, for that I left a simple debug of the pwm feed. Although, you can also check it through the console by feeding 0 and 255 to /sys/devices/pwm-fan/target_pwm and see when the cooler is spinning.
If it is a bug, I don't want to leave it in such a cool project, and I want to make my own contribution to its development, however small.