Solved Using acpi_ibm

I want to check the temperature and control the fan of my Lenovo ThinkPad X61, and believe I need to use acpi_ibm() to do this. Am I correct in thinking that I already have this driver in FreeBSD 13.1 and all I have to do is load it or do I need to install it?

And how do I actually switch off the fan in my device?
 
I wasn't quite sure how to use this but eventually found the required command namely sysctl dev.acpi_ibm.0.fan=0 thanks to this post:-

Thread 71634

Still not sure how to check temperature though...
 
According to acpi_ibm(4), it seems that some Thinkpads have a number of temperature sensor readings *other then the CPU* made available/readable through sysctl dev.acpi_ibm.0.thermal. If you cannot read the values of those other specific temp. sensors, I'd be very careful in controlling the fan speed manually or programmatically in order to control the temperature as a whole inside your Thinkpad; acpi_ibm(4):
Code:
SYSCTL VARIABLES
[...]
dev.acpi_ibm.0.fan
	     Indicates whether the fan is in automatic (1) or manual (0) mode.
	     Default is	automatic mode.	 This sysctl should be used with ex-
	     treme precaution, since disabling automatic fan control might
	     overheat the ThinkPad and lead to permanent damage	if the
	     fan_level is not set accordingly.

Additional information by vermaden: Sensors Information on FreeBSD; also: scripts/acpi-thinkpad-fan.sh

Perhaps, for other (Thinkpad) forum readers it would be helpful to tell why and with what specific goal you intend to take control of the fans by yourself.
 
I can't remember the sysctl off the top of my head but one of my X61 ThinkPads did tend to keep the fan on too long, even when it was cool.

Do a sysctl -a | grep temp and I am sure something will come up.

Also, it might not be your CPU fan and temp that is the direct issue. There should be a fan just below the palm rest (a bit of a hack but these things get notoriously hot). It could be that this fan is dead which is causing the sensor to keep the other fan on. This seemed to be the issue with mine. I only found it out a decade later ;)
 
I wasn't quite sure how to use this but eventually found the required command namely sysctl dev.acpi_ibm.0.fan=0 thanks to this post:-

Thread 71634

Setting dev.acpi_ibm.0.fan=0 is not to turn the fan off, but to turn Auto fan mode off.

Once you've done that, fan speed is set with
sysctl dev.acpi_ibm.0.fan_level=N
where N is 0 (off) to 7 (max).

dev.acpi_ibm.0.fan_speed shows speed for each level, after allowing some time to settle.

Please be aware that you stand a good chance of cooking your laptop if, by design or misadventure, you allow CPU or GPU temperatures to reach unsafe levels.

Still not sure how to check temperature though...

% sysctl -a | grep thermal
should show you which ACPI thermal zones your machine supports. Each zone should display a '.temperature' Different Thinkpads have different zones.

in loader.conf:
Code:
acpi_ibm_load="YES"
coretemp_load="YES"

coretemp should provide a .temperature for each CPU.

If you intend running a script to monitor and control fan/s, please run it by us - while composing I see two other helpful posts arriving. There are some real pitfalls, not least what happens on suspend/resume. Take care.
 
I can't remember the sysctl off the top of my head but one of my X61 ThinkPads did tend to keep the fan on too long, even when it was cool.

Do a sysctl -a | grep temp and I am sure something will come up.

root@EMTEC:~ # sysctl -a | grep temperature
hw.acpi.thermal.tz1.temperature: 44.1C
hw.acpi.thermal.tz0.temperature: 58.1C
dev.cpu.1.temperature: 53.0C
dev.cpu.0.temperature: 55.0C

This is without switching the fan off. I'll switch it off and see if it makes much of a difference.
 
This is without switching the fan off. I'll switch it off and see if it makes much of a difference.
I left it switched off for maybe 20 mins and when I looked again, the system powered off by itself so I guess it must have overheated...
Just wondered if it's possible to check a dmesg from the previous power on to see what had actually happened....
 
Eeek, I hope nothing was permanently damaged. The auto shutdown can often trigger too late.

Perhaps do it again but keep an eye on it manually to see what the temperature rises to. Even at 80 I would put the fan back on.

Are you sure the fan vent isn't clogged? If the X61 is working normally, I find the fan comes on for about 20 seconds every 30 mins or so.
 
Perhaps, for other (Thinkpad) forum readers it would be helpful to tell why and with what specific goal you intend to take control of the fans by yourself.

The fan is extremely noisy. I'm reluctant to replace it. I'm looking at what options I have to quieten the device. I leave it running most of the time but isn't in use much of the time. Maybe there is some way to put it to sleep after some period of inactivity...
 
Setting dev.acpi_ibm.0.fan=0 is not to turn the fan off, but to turn Auto fan mode off.

Once you've done that, fan speed is set with
sysctl
where N is 0 (off) to 7 (max).

dev.acpi_ibm.0.fan_speed shows speed for each level, after allowing some time to settle.
After setting dev.acpi_ibm.0.fan_level=7 the fan seems to run more consistently/evenly without the constant changes in noise levels which was the most annoying aspect of it's performance, so I think I can live that.

Many thanks for the suggestion.
 
After setting dev.acpi_ibm.0.fan_level=7 the fan seems to run more consistently/evenly without the constant changes in noise levels which was the most annoying aspect of it's performance, so I think I can live that.

Many thanks for the suggestion.

Above you said (can't get it to quote properly, zenforo is frustrating sometimes!):

> root@EMTEC:~ # sysctl -a | grep temperature
hw.acpi.thermal.tz1.temperature: 44.1C
hw.acpi.thermal.tz0.temperature: 58.1C
dev.cpu.1.temperature: 53.0C
dev.cpu.0.temperature: 55.0C

I hope that's busy doing something? If it's idle it's running about 10°C above where it should be already, especially tz0, almost certainly CPU & GPU, more usually cooler than CPUs.

I assume you'll have its Hardware Maintenance Manual? If not, get it from manualslib (ono) ASAP.

Investigate fan replacement, or at the very least replacing the old thermal paste, but better a new fan, Ebay etc.

I guess you've used canned compressed air to remove dust and fluff already?

Running an already noisy fan at 7 for long will accelerate its wearing out, whereas with a new fan and paste you can expect years more service, and a quieter life ...
 
Back
Top