Use nbfc to control your fan
I use an Acer Aspire E5-573G 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
Also I edit the default profile to turn the fan policy more aggressive.
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, 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 .
# 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.
Good luck.