Skip to content

How to install NBFC on Ubuntu 18.04

Stefan Hirschmann edited this page Mar 8, 2020 · 8 revisions

Currently, installing NBFC on Linux is not straight forward. This example shows you how to build and install NBFC on Ubuntu 18.04.

1. Install mono

sudo apt install gnupg ca-certificates
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

2. Clone repository anywhere

git clone https://github.com/hirschmann/nbfc.git

3. Manually download nuget.exe and paste to nbfc (latest stable)

NUGET

and run:

sudo mono nuget.exe restore

4. Build NBFC

xbuild /t:Build /p:Configuration=ReleaseLinux NoteBookFanControl.sln

5. Copy the build output files from nbfc/Linux/bin/Release/ to /opt/nbfc/

sudo cp -rf nbfc/Linux/bin/Release/ /opt/nbfc/

6. Copy nbfc/Linux/nbfc.service and nbfc/Linux/nbfc-sleep.service into /etc/systemd/system/

sudo cp nbfc/Linux/nbfc.service /etc/systemd/system/
sudo cp nbfc/Linux/nbfc-sleep.service /etc/systemd/system/

7. Enable and start the service

sudo systemctl enable nbfc --now

8. Find a config for your notebook

You can either let NBFC recommend configs for you:

mono nbfc.exe config --recommend

Or get a list of all the configs and find one by yourself:

mono nbfc.exe config --list

If that doesn't work for some reason, you can instead check the NBFC Configs folder in and choose a file for your laptop:

cd /opt/nbfc/Configs
ls

9. Select a config

Go back to /opt/nbfc/ and run:

mono nbfc.exe config --apply 'Your config'

e.g.:

mono nbfc.exe config --apply 'Asus ROG G751JL'

Note that the nbfc.exe config command expects the name of an available config, not the path to a file. Looking through the Config directory in step 11 is just a way to see the available configs.

10. Check if NBFC is working properly

mono nbfc.exe status -a