The problem got sorted out for me.
I am running 16.04 on Macbook pro retina 2015
sudo add-apt-repository ppa:mactel-support
sudo apt-get update
sudo apt-get install macfanctld
After installing it, view its manual by running
it will show the config file path. Mostly it will be the below path
Open the config file and edit it according to your needs. I will post my config file here which is working perfectly fine for Macbook Pro 13 inch retina.
# Config file for macfanctl daemon
# Note: 0 < temp_X_floor < temp_X_ceiling
# 0 < fan_min < 6200
# Add sensors to be excluded here, separated by space, i.e.
# exclude: 1 7
# will disable reading of sensors temp1_input and temp7_input.
# log_level values:
# 0: Startup / Exit logging only
# 1: Basic temp / fan logging
# 2: Log all sensors
Save the config file and restart for safety.
This package seems to run like a daemon on the background and control the fan speed. I can hear fan speeds dynamically changing from the fan noise.