Skip to content
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

Allow /sys/devices/platform/thinkpad_hwmon/hwmon/*/temp2_input #231

Open
Bryantdl7 opened this issue Aug 5, 2023 · 1 comment
Open

Allow /sys/devices/platform/thinkpad_hwmon/hwmon/*/temp2_input #231

Bryantdl7 opened this issue Aug 5, 2023 · 1 comment

Comments

@Bryantdl7
Copy link

My thinkpad t495 likes to swap between

/sys/devices/platform/thinkpad_hwmon/hwmon/hwmon5/temp2_input

and

/sys/devices/platform/thinkpad_hwmon/hwmon/hwmon6/temp2_input

as it feels like it, when this happens thinkfan decided to unalive and I have no fan control.

I tried making it /sys/devices/platform/thinkpad_hwmon/hwmon/*/temp2_input but that just errors out, can we get this as a feature in the future?

@Bryantdl7
Copy link
Author

Bryantdl7 commented Aug 6, 2023

Here's my work around for the time being for other poor souls on a Thinkpad T495:

/etc/thinkfan.conf

hwmon /dev/hacked-cpu-temperature/temp6_input
hwmon /dev/hacked-cpu-temperature/temp3_input
hwmon /dev/hacked-cpu-temperature/temp7_input
hwmon /dev/hacked-cpu-temperature/temp4_input
hwmon /dev/hacked-cpu-temperature/temp1_input
hwmon /dev/hacked-cpu-temperature/temp5_input
hwmon /dev/hacked-cpu-temperature/temp2_input


(0,     0,      5)
(1,     5,      47)
(2,     47,     60)
(3,     60,     62)
(4,     62,     65)
(5,     65,     67)
(6,     67,     72)
(7,     72,     77)
(127,   77,     32767)

/home/hwmon-fix.sh

#!/bin/bash
temp1=$(find /sys/devices/platform/thinkpad_hwmon/ -type f -name "temp1_input")
temp2=$(find /sys/devices/platform/thinkpad_hwmon/ -type f -name "temp2_input")
temp3=$(find /sys/devices/platform/thinkpad_hwmon/ -type f -name "temp3_input")
temp4=$(find /sys/devices/platform/thinkpad_hwmon/ -type f -name "temp4_input")
temp5=$(find /sys/devices/platform/thinkpad_hwmon/ -type f -name "temp5_input")
temp6=$(find /sys/devices/platform/thinkpad_hwmon/ -type f -name "temp6_input")
temp7=$(find /sys/devices/platform/thinkpad_hwmon/ -type f -name "temp7_input")
temp8=$(find /sys/devices/platform/thinkpad_hwmon/ -type f -name "temp8_input")
temp9=$(find /sys/devices/platform/thinkpad_hwmon/ -type f -name "temp9_input")
#temp1=$(find /sys/devices/platform/thinkpad_hwmon/ -type f -name "temp1_input")
mkdir /dev/hacked-cpu-temperature/

ln -s $temp1 /dev/hacked-cpu-temperature/
ln -s $temp2 /dev/hacked-cpu-temperature/
ln -s $temp3 /dev/hacked-cpu-temperature/
ln -s $temp4 /dev/hacked-cpu-temperature/
ln -s $temp5 /dev/hacked-cpu-temperature/
ln -s $temp6 /dev/hacked-cpu-temperature/
ln -s $temp7 /dev/hacked-cpu-temperature/
ln -s $temp8 /dev/hacked-cpu-temperature/
ln -s $temp9 /dev/hacked-cpu-temperature/
systemctl restart thinkfan

sudo crontab -e

@reboot sleep 1; /home/hwmon_fix.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant