![]() # Set base temp if we got nothing in stdout, this mean we are asleep Temperature=$(hddtemp -n /dev/sdc 2>/dev/null) This has been stable for me: FILE=/tmp/Hddtemp I found Mathew Wai's answer really good, but I ran into some issues with drives sleeping and temperature data corruption. Note that "HDD_temp" and "Hddtemp" are the script file and output file respectively. Then, the fan controlled by “ hwmon1/pwm1” will respond to “ /Fancontrol/Hddtemp”, the hard disk temperature. Save the file and run the following command to restart Fancontrol. Replace it with “ /Fancontrol/Hddtemp”, and the line will become: the chipset temperature) currently read by Fancontrol. On that line, “ hwmon1/temp1_input” is the temperature (e.g. (7) Run the following command to edit “ fancontrol”, the configuration file.įind the line that begins with “ FCTEMPS”. Then, the script “ HDD_temp” will be run as a system service at Linux startup. Sudo chmod 664 /lib/systemd/system/HDD_rvice (6) Run the following commands one by one: (5) Copy the following lines into the file and save it. (4) Run the following command to create a service file. (3) Run the following command to make it executable. (2) Copy the following script into the file and save it. Sudo mkdir -p "/Fancontrol/" & sudo xed /Fancontrol/HDD_temp (1) Run the following command to create a script file. If you have not yet configured Fancontrol, see this page, this page, and this page and run the following commands one by one (restart Linux after running the first one): Replace “ /dev/sda” with the correct one in the script if necessary. Use only the one supported by Hddtemp, which will display the temperature rather than “S.M.A.R.T. Press Ctrl + Alt + T to open Terminal and run the following command to check whether “ /dev/sda” is the correct one: In the following script, “ /dev/sda” is the hard disk to be monitored, and “ /Fancontrol/Hddtemp” is the output file to be read by Fancontrol. That was it! fancontrol works perfectly now and starts at boot time.I finally found a simple script to control fan speed according to hard drive temperature via Fancontrol, Hddtemp, and Lm-sensors. # echo "Configuration is too old, please run pwmconfig again" >&2 Its just a simple configuration change detector! since, I had specified the absolute paths for my sensors, not only was this not necessary, it was actually causing the error. I found the cause at lines 302-307: # Check for configuration changeĮcho "Configuration is too old, please run pwmconfig again" >&2 So I decided to take a look at /usr/sbin/fancontrol to see why. This causes the error Configuration is too old, please run pwmconfig again Due to motherboard limitations, my sensors are defined as absolute paths. When starting fancontrol via #service fancontrol start or #fancontrol, the errors of /usr/sbin/fancontrol are not printed. Also, many thanks to for advice and pointing me in the right direction. Here is the answer just incase I mess this up or anyone else has the same problem. I feel silly, should've investigated more. Start-stop-daemon -stop -quiet -pidfile $PIDFILE -oknodo -startas $DAEMON Log_warning_msg "Not starting fancontrol run pwmconfig first." Log_failure_msg "Not starting fancontrol, broken configuration file please re-run pwmconfig." ![]() Start-stop-daemon -start -quiet -background -pidfile $PIDFILE -startas $DAEMON If $DAEMON -check 1>/dev/null 2>/dev/null then What is the difference between starting fancontrol as a service vs manually that would cause it to fail? Starting fan speed regulator: fancontrol. However when starting fancontrol as a service (at or after boot), it fails. Settings for /sys/devices/platform/it87.656/hwmon/hwmon]*/device/pwm3:Ĭontrols /sys/devices/platform/it87.656/hwmon/hwmon]*/device/fan2_input Loading configuration from /etc/fancontrol. When fancontrol is started from the terminal it works fine # fancontrol
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |