Skip to content

Commit 9750915

Browse files
committed
added cpu to default monit_device; support for Kernel 5.x
1 parent 26edd4d commit 9750915

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pwm-fan.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ thermal_meter () {
310310

311311
thermal_monit () {
312312
if [[ -z $MONIT_DEVICE ]]; then
313-
MONIT_DEVICE='soc'
313+
# soc for legacy Kernel or cpu for latest Kernel
314+
MONIT_DEVICE='(soc|cpu)'
314315
fi
315316
local THERMAL_FOLDER='/sys/class/thermal/'
316317
if [[ -d $THERMAL_FOLDER && -z $SKIP_THERMAL ]]; then
@@ -364,7 +365,7 @@ usage() {
364365
echo ' -F int TIME (in seconds) to run the fan at full speed during STARTUP. Default: 60'
365366
echo ' -h Show this HELP message.'
366367
echo ' -l int TIME (in seconds) to LOOP thermal reads. Lower means higher resolution but uses ever more resources. Default: 10'
367-
echo ' -m str Name of the DEVICE to MONITOR the temperature in the thermal sysfs interface. Default: soc'
368+
echo ' -m str Name of the DEVICE to MONITOR the temperature in the thermal sysfs interface. Default: (soc|cpu)'
368369
echo ' -p int The fan PERIOD (in nanoseconds). Default (25kHz): 25000000.'
369370
echo ' -s int The MAX SIZE of the TEMPERATURE ARRAY. Interval between data points is set by -l. Default (store last 1min data): 6.'
370371
echo ' -t int Lowest TEMPERATURE threshold (in Celsius). Lower temps set the fan speed to min. Default: 25'

0 commit comments

Comments
 (0)