mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
sensors: add more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
b32ad4fba0
commit
80acecae17
Binary file not shown.
@ -16,10 +16,14 @@ if [[ ! -x $(which perl) ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
modprobe -q it87
|
||||||
|
modprobe -q adt7470
|
||||||
|
modprobe -q adt7475
|
||||||
|
modprobe -q nct6683
|
||||||
|
modprobe -q nct6775
|
||||||
modprobe -q coretemp
|
modprobe -q coretemp
|
||||||
modprobe -q k10temp
|
modprobe -q k10temp
|
||||||
modprobe -q it87
|
|
||||||
modprobe -q adt7475
|
|
||||||
echo 'Y' | sensors-detect --auto >/tmp/sensors.log
|
echo 'Y' | sensors-detect --auto >/tmp/sensors.log
|
||||||
cat /tmp/sensors.log | grep Driver | awk '{print $2}'
|
cat /tmp/sensors.log | grep Driver | awk '{print $2}'
|
||||||
|
|
||||||
@ -36,14 +40,14 @@ if [ ! -f /etc/fancontrol ]; then
|
|||||||
MAXTEMP=""
|
MAXTEMP=""
|
||||||
MINSTART=""
|
MINSTART=""
|
||||||
MINSTOP=""
|
MINSTOP=""
|
||||||
CORETEMP=$(find /sys/devices/platform/ -name temp1_input | grep -E 'coretemp|k10temp' | sed -n -e 's|.*/\(hwmon.*\/temp1_input\).*|\1|p')
|
CORETEMP="$(find /sys/devices/platform/ -name temp1_input | grep -E 'coretemp|k10temp' | sed -n -e 's|.*/\(hwmon.*\/temp1_input\).*|\1|p')"
|
||||||
for P in $(find /sys/devices/platform/ -name temp1_input); do
|
for P in $(find /sys/devices/platform/ -name temp1_input); do
|
||||||
D=$(echo ${P} | sed -n -e 's|.*/\(devices/platform/[^/]*\)/.*|\1|p')
|
D="$(echo ${P} | sed -n -e 's|.*/\(devices/platform/[^/]*\)/.*|\1|p')"
|
||||||
I=$(echo ${P} | sed -n -e 's|.*hwmon\([0-9]\).*|\1|p')
|
I="$(echo ${P} | sed -n -e 's|.*hwmon\([0-9]\).*|\1|p')"
|
||||||
DEVPATH="${DEVPATH} hwmon${I}=${D}"
|
DEVPATH="${DEVPATH} hwmon${I}=${D}"
|
||||||
DEVNAME="${DEVNAME} hwmon${I}=$(cat /sys/${D}/*/*/name)"
|
DEVNAME="${DEVNAME} hwmon${I}=$(cat /sys/${D}/*/*/name)"
|
||||||
for F in $(find "/sys/${D}" -name "fan[0-9]_input"); do
|
for F in $(find "/sys/${D}" -name "fan[0-9]_input"); do
|
||||||
IDX=$(echo ${F} | sed -n -e 's|.*fan\([0-9]\)_input|\1|p')
|
IDX="$(echo ${F} | sed -n -e 's|.*fan\([0-9]\)_input|\1|p')"
|
||||||
FCTEMPS="${FCTEMPS} hwmon${I}/pwm${IDX}=${CORETEMP}"
|
FCTEMPS="${FCTEMPS} hwmon${I}/pwm${IDX}=${CORETEMP}"
|
||||||
FCFANS="${FCFANS} hwmon${I}/pwm${IDX}=hwmon${I}/fan${IDX}_input"
|
FCFANS="${FCFANS} hwmon${I}/pwm${IDX}=hwmon${I}/fan${IDX}_input"
|
||||||
MINTEMP="${MINTEMP} hwmon${I}/pwm${IDX}=30"
|
MINTEMP="${MINTEMP} hwmon${I}/pwm${IDX}=30"
|
||||||
@ -70,4 +74,4 @@ fi
|
|||||||
killall fancontrol
|
killall fancontrol
|
||||||
fancontrol &
|
fancontrol &
|
||||||
|
|
||||||
exit 0
|
exit 0
|
Loading…
Reference in New Issue
Block a user