How do I know my fan is working in Ubuntu

Solution 1:

Try using HardInfo which is very useful GUI application to know all information about system & hardware.

Install HardInfo by sudo apt-get install hardinfo

Here is screen-shot where fan info is displayed.

screen

Hope this helps.

Solution 2:

Use nbfc

My laptop is an Acer Aspire E5-573G and nothing else worked to control the CPU fan, but nbfc. I'm using Ubuntu 18.04. The exact profile for my model is missing, but nbfc worked fine with another similar profile (Acer Aspire E5-575G). If you don't know which profile to use, you can try: mono nbfc.exe config -r

You will need the latest mono version to build it on Ubuntu 18.04, so don't forget to read How to build NBFC on ubuntu.

Also I edit the default profile to turn the fan policy more agressive.

Build it on Ubuntu

You need the latest mono version, so update it, as required:

sudo apt remove mono-complete
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-complete

Clone the git repository and build

# git is needed, so install it
sudo apt install git

# clone the repository into /tmp/nbfc
git clone https://github.com/hirschmann/nbfc.git /tmp/nbfc
cd /tmp/nbfc

# Build NBFC
./build.sh

After the build, "install" nbfc as properly

sudo mkdir /opt/nbfc
sudo cp -r /tmp/nbfc/Linux/bin/Release /opt/nbfc/
sudo cp /tmp/nbfc/Linux/{nbfc.service,nbfc-sleep.service} /etc/systemd/system/
sudo systemctl enable nbfc --now

Now you need to discover a profile for your machine and tell nbfc to use it

# All profiles are into /opt/nbfc/Configs as XML files
cd /opt/nbfc

# Run the following to discover a similar profile to your machine
mono nbfc.exe config -r

# Use one profile from the suggest list the previous command  
mono nbfc.exe config --apply "Config file name without extension"

# Now start the service
mono nbfc.exe start

# To show what is happen with your fan/machine, run
mono nbfc.exe status --all

The nbfc project wiki is very rich and well documented. Take a look if you have some doubt.