Skip to content

How to install NBFC on Ubuntu 18.04

Demetrio92 edited this page Mar 14, 2021 · 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
sudo apt install mono-complete

2. Clone repository anywhere

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

# use latest stable version
cd nbfc
git pull origin stable 
git checkout origin/stable

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 Linux/bin/Release/ /opt/nbfc/

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

sudo cp Linux/nbfc.service /etc/systemd/system/
sudo cp 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 /opt/nbfc/nbfc.exe config --recommend

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

mono /opt/nbfc/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:

sudo mono /opt/nbfc/nbfc.exe config --apply 'Your config'

e.g.:

sudo mono /opt/nbfc/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.

If you get a "Could not acquire EC lock" error, try disabling secure boot in the bios.

10. Check if NBFC is working properly

mono /opt/nbfc/nbfc.exe status -a
Clone this wiki locally