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

Wifi card turn off -> thinkfan gives error and exits #39

Closed
ilkerhk opened this issue May 26, 2017 · 7 comments
Closed

Wifi card turn off -> thinkfan gives error and exits #39

ilkerhk opened this issue May 26, 2017 · 7 comments
Labels
enhancement Idea for an improvement or a new feature feedback wanted
Milestone

Comments

@ilkerhk
Copy link

ilkerhk commented May 26, 2017

I observe the following error in two scenarios :
1- If I disable wifi manually to save battery
2- Thinkpad bios has option to disable wifi card hardware if ethernet connected

Then the hwmon file becomes unreadable and therefore thinkfan gives the following error and exits:

thinkfan[19319]: /sys/devices/virtual/hwmon/hwmon4/temp1_input: Input/output error
thinkfan[19319]: A sensor has vanished! Exiting since there's no safe way of handling this.

I wanted to exclude wifi temperature sensor from the .conf file but the virtual hwmonXX changes in every boot.

One nice solution to this (and also to changing hwmonX folders) would be to replace the sensors with device-names in conf file. The conf file would use something like :
device pch_skylake-virtual-0
instead of
hwmon /sys/devices/virtual/hwmon/hwmon4/temp1_input

I have no idea if that is possible or easy to develop...

@ilkerhk
Copy link
Author

ilkerhk commented May 27, 2017

I worked on an ugly workaround. Now autostart of thinkfan service is disabled and it is started after user logs in, by a script called thinkfanLauncher.sh. It creates the conf file first (coppied below). In my machine this workaround solves following issues:

1- locate the hwmon folders (they change after each boot)
2- excluding a device by its name. (I exclude wifi card so that auto or manual disabling of it doesn't stop thinkfan)

code is here with extension changed to txt
thinkfanLauncher.txt
. Hopefully there will be a permanent solution of these in thinkfan...

@vmatare
Copy link
Owner

vmatare commented Jul 3, 2017

Well, I'm not sure whether I just want to ignore whether a sensor has disappeared because I can imagine situations where that might lead to damage. On the other hand, if you enable it via a commandline option, it's fine...

@vmatare vmatare added the enhancement Idea for an improvement or a new feature label Jan 12, 2018
@vmatare vmatare added this to the 1.1 milestone Jan 27, 2019
@ploth
Copy link

ploth commented Mar 3, 2019

I encounter the same problem and need the option for optional sensors. That would be so great! Thank you!

@vmatare vmatare modified the milestones: 1.1, 1.2 Apr 4, 2020
@vmatare
Copy link
Owner

vmatare commented Apr 8, 2020

anyone who wants this, please try out the optional-sensors branch. I need some feedback on how that is working for you so I can make it part of the next release.

@vmatare
Copy link
Owner

vmatare commented Apr 8, 2020

It's merged in the master branch now to give it some more exposition. Hoping for feedback ;-)

@mustaphazorgati
Copy link

mustaphazorgati commented Apr 26, 2020

Hey there!
Unfortunately thinkfan breaks on my system (Thinkpad T470p) when I turn of the wifi card.

$ sudo thinkfan -n -c /etc/thinkfan.conf.yaml 
Temperatures(bias): 41(0), 41(0), 40(0), 41(0), 40(0), 40(0), 29(0), 29(0), 33(0), 35(0), 32(0) -> level 0
ERROR: read_temps: Failed to read temperature(s) from /sys/devices/virtual/thermal/thermal_zone3/hwmon7/temp1_input: No data available

thinkfan.conf.yaml

sensors:
  - hwmon: /sys/devices/platform/thinkpad_hwmon
    indices: [1]
  - hwmon: /sys/devices/platform/coretemp.0
    indices: [1, 2, 3, 4, 5]
  - hwmon: /sys/devices/pci0000:00/0000:00:1d.0/0000:05:00.0/nvme/nvme0/hwmon1
    indices: [1, 2, 3]
  - hwmon: /sys/devices/virtual/thermal
    name: pch_skylake
    indices: [1]
  - hwmon: /sys/devices/virtual/thermal
    name: iwlwifi_1
    indices: [1]
    optional: true
fans:
  - tpacpi: /proc/acpi/ibm/fan
levels:
  - [  0,  0,    42]
  - [  1, 40,    47]
  - [  2, 45,    52]
  - [  3, 50,    57]
  - [  4, 55,    62]
  - [  5, 60,    77]
  - [  7, 73,    93]
  - [127, 85, 32767] 

@vmatare
Copy link
Owner

vmatare commented Jun 5, 2020

Has been implemented in master for a while now, and will be part of upcoming release.

@vmatare vmatare closed this as completed Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Idea for an improvement or a new feature feedback wanted
Projects
None yet
Development

No branches or pull requests

4 participants