Thinkpad T14 G1 AMD Thinkfan?

It seems to me that this new (to me) laptop is running hotter than I'd like but I'm kind of getting lost trying to figure out the configurations for Thinkfan and I'm honestly not even sure if I'm looking at the right thing in the lmsensors applet.

Could someone tell me what I should even be looking at here? And please offer me configuration advice on the fans to make sure that they're running as they should be?

Have already confirmed I am on the latest bios for this model (there were some issues early on.) Have also made sure I set the operating system to Linux in the bios too.

What is the output of

sensors

This should give you the temperature of your CPU temperatures. On my multi-CPU machine, this is my output

coretemp-isa-0000
Adapter: ISA adapter
Core 0: +33.0°C (high = +80.0°C, crit = +96.0°C)
Core 1: +32.0°C (high = +80.0°C, crit = +96.0°C)
Core 2: +35.0°C (high = +80.0°C, crit = +96.0°C)
Core 8: +37.0°C (high = +80.0°C, crit = +96.0°C)
Core 9: +31.0°C (high = +80.0°C, crit = +96.0°C)
Core 10: +37.0°C (high = +80.0°C, crit = +96.0°C)

coretemp-isa-0001
Adapter: ISA adapter
Core 0: +19.0°C (high = +80.0°C, crit = +96.0°C)
Core 1: +38.0°C (high = +80.0°C, crit = +96.0°C)
Core 2: +38.0°C (high = +80.0°C, crit = +96.0°C)
Core 8: +34.0°C (high = +80.0°C, crit = +96.0°C)
Core 9: +39.0°C (high = +80.0°C, crit = +96.0°C)
Core 10: +41.0°C (high = +80.0°C, crit = +96.0°C)

I also wrote a script to return the ambient temperature from the IPMI tool (you may not have this; I'm using a Dell server)

#!/bin/bash
if [ "$EUID" -ne 0 ]
  then echo "Please run as root"
  exit
fi
TEMP=$(ipmitool sdr type temperature | grep Ambient | grep degrees | grep -Po '\d{2}' | tail -1)
echo "Ambient temperature on the server is ($TEMP C)"
# sdr = sensor data repository
# Notes:  the grep -Po '\d{2}' uses an experimental feature of grep: a perl
# expression which resolves to only (the -o) 2 digits of the previous greps.

Output as just run:

Ambient temperature on the server is (23 C)

1 Like

If I'm not mistaken you are searching for a way to control your fan, right ?

I also use AMD graphics (Radeon RX 570/16G) so I can show you what I did to keep temperatures within my preferred range.

Keep in mind though that since your GPU (Radeon RX Vega 6) and CPU (AMD Ryzen 5) are integrated in one chip (APU) you probably only have a CPU fan and not a separate GPU fan like I have.

Also, know that the Ryzen family of CPUs and GPUs can stand temperatures of up to 94°C ( 200°F )
(although I myself would not let the chip exceed the 85°C by much)

I don't have any Ryzen APU at hand so I can not test it for you, so I hope the following text will be of any help to discover the things you're looking for.

This is what I did on my system to discover how I could influence the thermals:

$ for line in /sys/class/hwmon/hwmon* ; do echo $line ; cat $line/name ; done

/sys/class/hwmon/hwmon0
nvme
/sys/class/hwmon/hwmon1
amdgpu
/sys/class/hwmon/hwmon2
nct6797
/sys/class/hwmon/hwmon3
k10temp
/sys/class/hwmon/hwmon4
hidpp_battery_0

which tells me that values under /sys/class/hwmon/hwmon1 are considering the GPU

further invoking

$ ls -1 /sys/class/hwmon/hwmon1 |grep fan

fan1_enable
fan1_input
fan1_max
fan1_min
fan1_target

tells me that fan1 is the GPU fan.

The current rpm of the fan is made visible by invoking:

cat /sys/class/hwmon/hwmon1/fan1_input

To control the fan, you need to write values to its pwm input
First find out which controls you have:

ls -1 /sys/class/hwmon/hwmon1 |grep pwm

pwm1
pwm1_enable
pwm1_max
pwm1_min

If you succeeded so far you might take a look at this AMD documentation

And since I use my own script to regulate the speed of the fan, the following post might be interesting for you:

Or you might try another piece of software for controlling your fan:

3 Likes
iwlwifi_1-virtual-0
Adapter: Virtual device
temp1:        +55.0°C  

thinkpad-isa-0000
Adapter: ISA adapter
fan1:        2900 RPM
fan2:        2900 RPM
CPU:          +49.0°C  
GPU:           +0.0°C  
temp3:         +0.0°C  
temp4:         +0.0°C  
temp5:         +0.0°C  
temp6:         +0.0°C  
temp7:         +0.0°C  
temp8:            N/A  

BAT0-acpi-0
Adapter: ACPI interface
in0:          12.88 V  
power1:        0.00 W  

k10temp-pci-00c3
Adapter: PCI adapter
Tctl:         +48.8°C  

nvme-pci-0100
Adapter: PCI adapter
Composite:    +41.9°C  (low  =  -5.2°C, high = +79.8°C)
                       (crit = +84.8°C)

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +49.0°C

Bear in mind it's on powersaving mode now and not too hot at the moment.

/sys/class/hwmon/hwmon0
AC
/sys/class/hwmon/hwmon1
acpitz
/sys/class/hwmon/hwmon2
BAT0
/sys/class/hwmon/hwmon3
nvme
/sys/class/hwmon/hwmon4
thinkpad
/sys/class/hwmon/hwmon5
k10temp
/sys/class/hwmon/hwmon6
iwlwifi_1
ls -1 /sys/class/hwmon/hwmon4 |grep fan
fan1_input
fan2_input
cat /sys/class/hwmon/hwmon4/fan1_input
2900
cat /sys/class/hwmon/hwmon4/fan2_input
2900
ls -1 /sys/class/hwmon/hwmon4 |grep pwm
pwm1
pwm1_enable

Not sure if that is useful or not?

I did discover something called Thinkfan which has a GUI but I don't really understand the documentation that well. Also heard that tlp would be useful here so I installed it and I don't know if it's helping or not?

Both of these are interesting, "k10temp" is your APU (CPU+GPU)
I don't know what "thinkpad" is supposed to be. Casefans perhaps ? Or a master controller for everything ?

You might also want to try this:

ls -1 /sys/class/hwmon/hwmon5 |grep 'pwm\|fan'

You mean this one ?:

It might work on your laptop if you have a file or directory called /proc/acpi/ibm/fan
You can check this by issuing this command:

cat /proc/acpi/ibm/fan

If such a file or directory exists on your system, you can download the .deb and install it, create the /etc/modprobe.d/thinkpad_acpi.conf as explained in the description (if it isn't enabled yet) and it is supposed to work probably after a reboot.

If it doesn't, look here: [SOLVED] Thinkfan and sensors simple problem / Newbie Corner / Arch Linux Forums

tlp has a lot of tricks to minimize energy consumption and maximize batterylife, the more or less unintended sideeffect is ofcourse: lower temperatures. So I think it is reasonable to expect tlp to help in this regard unless you run heavy loads :slight_smile:

2 Likes

First command does nothing, second one:

Am checking out the thread now..

What is "service unit" mentioned there? A subsection? A file? I don't know what to edit.

A service unit is the systemd equivalent of a start/stop/reload script for a system daemon in sysv init. Unit files reside in the directory /usr/lib/systemd/ and they have names ending in ".service"
the command "systemctl" uses unit files to start/stop/disable/mask a service.

example:
sudo systemctl stop NetworkManager.service

You don't neet to edit anything at the moment.

You are ready to install this software for your needs:

2 Likes

Hi @bornagainpenguin

I installed the formentioned app on my Thinkpad T420 without any further tinkering or editing things and besides the fact that it is very simple to use, it works like a charm.

2 Likes

I have it installed now. Is there a way to get it to display in Fahrenheit? Or to launch without needing to have a password entered? Asking because I'd like to be able to get it to be part of the startup applications. I just don't know how to set the permissions.

Not that I know of. The API of the driver works with °C values, but you might ask the author of the software on github (see link above) if he wants to add extra code to do the conversion for you (or you hack the code yourself).

No, fancontrol is kerneldomain, you can't bypass that.

Since it is kerneldomain you can't do that from startup-applications.
However , you can use the init system to do that.

If you have the file /etc/rc.local you can add a line to it (just above the exit 0 line):

echo 'level full-speed' >  /proc/acpi/ibm/fan

If you don't have an /etc/rc.local, you could copy the following in a terminal and press enter:

cat<<RCLOCAL |sudo tee /etc/rc.local
#!/bin/sh -e
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

echo 'level full-speed' >  /proc/acpi/ibm/fan

exit 0
RCLOCAL

sudo chmod a+x /etc/rc.local

You can replace full-speed with a value 0 to 7 or auto for different fanspeeds

I have to say here that rc.local is the old way to "autostart" things systemwide.
One day it might even be deprecated.
The official way is to create a systemd unitfile which is a tad more complicated.

( paste codeblock below in a terminal and press enter )

cat<<FANCTL | sudo tee /lib/systemd/system/fanctl.service
[Unit]
Description=Thinkpad Fancontrol
Documentation="https://www.kernel.org/doc/html/latest/admin-guide/laptops/thinkpad-acpi.html"
ConditionPathExists=/proc/acpi/ibm/fan
After=multi-user.target

[Service]
ExecStart=/usr/bin/sh -c "echo 'level full-speed' > /proc/acpi/ibm/fan"

[Install]
WantedBy=multi-user.target
FANCTL

sudo ln -s /lib/systemd/system/fanctl.service /etc/systemd/system/multi-user.target.wants/fanctl.service

I haven't tested this yet, although this unitfile is a derivative of the one that I created for my own fancontrol which works.
Same for the rc.local version.

You can choose which one you like more.
Just don't do both.

2 Likes

This is a chart you could save for easy reference. I struggle with the conversions too. Centrigrade covers a bigger range for each one degree of temp than F does.

2 Likes

Nice table :slight_smile:
I usually use the mate-calculator in advanced mode, it has a build-in unit conversion. Not only °C to °F (or vice versa) but also all conversions from local units like inch, foot, mile, ounce, pound, gallon etc. to international standard units like meter, liter and kilogram. :+1:

Even conversion from parsecs to lightyears :joy:

3 Likes

I learned the following rule-of-thumb while traveling around Europe. It's not exact, but close. And easy to remember:

To quickly convert Centigrade to Fahrenheit, double the temperature and add 30. Thus 10C is 50F and 20C is 70F. To convert from F to C, you subtract 30 from the F value and divide by 2. The exact formula is F= 9/5 C + 32.

1 Like

My memory allows me to remember double the temp, after that I forget the rest of the equation.

1 Like

Well, I know that the generally accepted "comfort zone" is roughly 72F or 21C, so if I'm attempting to calculate a conversion lower or higher, I balance the result mentally against my "baseline." The quick mnemonic for me is "twice + 30" or "minus 30 & half." I always stumbled on the "nine-fifths, five-ninths plus-or-minus 32," so this is much quicker for me.

1 Like