-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set a fixed fan PWM as transitional mode at service startup and terminate #34
Comments
Sounds reasonable. I think the failsafe value should be loaded at startup time and at shutdown time, as you mentioned. I can see how this might introduce an unwanted spike in fan speed during a normal startup, however. Perhaps have the option of using a different fixed PWM value for startup/shutdown than failsafe? |
Hi @Krellan, Also, phosphor-pid-control does not knows any fan's information until configuration is loaded, so It looks hard to come out a general mechanism that works across all platforms. So far I wrote a customized .conf fife and adding lots of Just wondering any good ideas can achieve this feature in a more general way. |
I've added the following line to my builds' phosphor-pid-control.service.in template:
The big issue here was making sure that fans went to, and stayed at, 100% through a BMC reboot or firmware upgrade. I'd rather run fans at 100% for these short, uncontrolled periods than run the risk of overheating. |
It would be nice to set the fans to a fixed safe speed (like failsafe mode) when the service is stopped, or is otherwise not running. If service is just started = can do this within phosphor-pid-control If service is stopped gracefully = can do this within phosphor-pid-control If service crashes or is forced to stop = need to do this outside. The most likely place should be the systemd service file for the phosphor-pid-control service. If BMC reboots or is running before the service is started = need to do this outside. The most likely place should be as soon in userspace as possible, just after the fan sensors appear. This should probably also be a systemd service file. Alternatively, earlier userspace can be achieved by writing directly to the kernel hwmon files, which would be done similarly from startup, but have no dependency on starting the fan sensors first. |
There was some discussion in Discord about adding this to the Device Tree. Then, kernel drivers could read this setting while they initialize, and apply it to fan hardware ASAP. This would take effect before userspace. https://discord.com/channels/775381525260664832/775381525260664836/1153785687749963776 Seems like a good idea to me, as long as it is applied consistently across all of the different fan drivers. |
In current implementation, phosphor-pid-control needs to build sensors and zones from configuration first, then start calculating the PWM outout value. Any error during build sensors will causes phosphor-pid-control delay 10 seconds and then rebuild sensors again. In this case, phosphor-pid-control will never calculate and update PWM output value. (This issue also mentioned in #33)
I would to propose a new feature to apply a fixed fan PWM as transitional mode at below two time points.
At service startup, before loading configuration.
This can ensure fan start working immediately to avoid any problem of wrong configuration or bad sensor.
At service terminate.
From the point of view of keeping the system safe, It is much safer to set a fixed PWM value when service stop then keeping last calculated value.
The text was updated successfully, but these errors were encountered: