andreibiu / pi-fanctl

Kernel driver for pwm control of cooling fans targeting Raspberry Pi boards with 64-bit cpu architectures
GNU General Public License v3.0
2 stars 0 forks source link

Build fails due to missing 'build' folder & setup issues #1

Closed ghost closed 7 months ago

ghost commented 7 months ago

When installing it complains about missing pwm_fan module and can't apply stuff to dts

ghost commented 7 months ago

I have RPI4 with 2 5v 40mm Noctua fans

andreibiu commented 7 months ago

Hi,

The issue was most probably caused by the missing build directory. I've just integrated a quick fix that should fix the issue.

ghost commented 7 months ago

Ok, will try again soon

ghost commented 7 months ago

Hi,

The issue was most probably caused by the missing build directory. I've just integrated a quick fix that should fix the issue.

Hmm now it says pwm_fan is currently not loaded and failed to apply overlay 0_fanctl

ghost commented 7 months ago

Btw just to note it's 6.6 kernel

andreibiu commented 7 months ago

Hi, I was away for the last couple of days.

I've just tested the latest commit on a fresh image of Raspberry OS with kernel 6.6 on my pi4 and everything works as expected when running sudo ./fanctl -t. The message with the pwm_fan is harmless, you can ignore it. I'll try to add a fix for it though. Can you let me now what is the full output of the command above on your system?

ghost commented 7 months ago

Will do in a bit, I thought it was an issue since my fans wouldn't spin up no matter the temp

ghost commented 7 months ago

Ok the issues are gone, now the fan seems to just stay on all the time and won't turn off lol

andreibiu commented 7 months ago

The driver should print some debug information in the kernel log. You should be able to see it using the dmesg -w command. What temps & fan percentages are reported there?

ghost commented 7 months ago

Nothing seems the kernel module isn't starting

andreibiu commented 7 months ago

During the period in which the test is running, does lsmod | grep fanctl shows anything? If no, the driver clearly is not running.

ghost commented 7 months ago

Yeah it's there its running ig fanctl 12288 0

ghost commented 7 months ago

But when installed it doesn't run at all

andreibiu commented 7 months ago

Ok, tomorrow I'll try to understand why the kernel logs are missing.

After installing the driver, does the fans ramp up under a heavy load? You can see the temp of the soc using vcgencmd and determine if the fan should be active according with the config. For the load you can use the command also used in the fanctl script (the second stress-ng).

Next, do you use a custom config or the sample one? Some insights about the fan -board connections may also be useful. Mainly because if you have the pwm pin of the fan connected directly to the pwm pin of the board the sample config is not suitable for this use case. In addition, I'm not sure if the fan model you are currently using accepts 3v3 for pwm signal - rpi does not output 5v pwm.

ghost commented 7 months ago

Ok, tomorrow I'll try to understand why the kernel logs are missing.

After installing the driver, does the fans ramp up under a heavy load? You can see the temp of the soc using vcgencmd and determine if the fan should be active according with the config. For the load you can use the command also used in the fanctl script (the second stress-ng).

Next, do you use a custom config or the sample one? Some insights about the fan -board connections may also be useful. Mainly because if you have the pwm pin of the fan connected directly to the pwm pin of the board the sample config is not suitable for this use case. In addition, I'm not sure if the fan model you are currently using accepts 3v3 for pwm signal - rpi does not output 5v pwm.

Using sample config, and I got a pull up resistor setup, I used ar51an fan control which seems to work fine, the fan seems to run at max without any load temps are at 37c and it's just Maxing out the fans

andreibiu commented 7 months ago

Are you sure the pull-up resistor is for the pwm pin and not for tacho pin? Nevertheless if the pwm fan pin is connected directly to the pwm pin of the board you will need an inv polarity in the config.

ghost commented 7 months ago

Oh yeah your correct its for Tach my bad

ghost commented 7 months ago

Ok I'll try inv

andreibiu commented 7 months ago

Hi,

Did you manage to make it work on your side? If you didn't but you still want to give it another try my recommendation would be to clean everything and use the latest release in test mode.

ghost commented 7 months ago

Yeah got it to work thanks