Fedora Post-Install Guide for NVIDIA Laptops

Despite my expectations, Fedora didn't run very well on my laptop with a NVIDIA GPU out of the box. Use these steps to fix issues with your monitor or display and battery life – I'll update the blog post should I make further optimisations.

Installing propietary graphics drivers

By default, Fedora comes with the Nouveau drivers which causes all sorts of issues – for me the battery life was < 1 hour and my external monitor didn't work with it.

RPM Fusion has documented the installation well. If you're running a modern laptop you should only need to run this command – note that you should have enabled propietary repositories during installation for this to work.

sudo dnf update
sudo dnf install akmod-nvidia

This made my external display work and brought battery life up to 4 hours, but we can still do better...

Manually switching between integrated and dedicated GPU with envycontrol

On windows, your graphics run in hybrid mode, where windows will decide wether to run a task on the dedicated (NVIDIA) GPU or the integrated GPU (that ships with your CPU). On Linux this also happens, but unfortunately doesn't work well in my experience.

Unless you do graphics intensive tasks on the go, I recommend manually switching to integrated graphics by default and only switching to your NVIDIA GPU when connected to power/at home as the dedicated GPU consumes a lot more energy. Envycontrol is a useful tool that let's you do just that – note that the downside is that switching takes about 30 seconds and requires a reboot.

The installation is straightforward and only requires you to activate their repository:

sudo dnf copr enable sunwire/envycontrol
sudo dnf install python3-envycontrol

After it is installed switch between the GPUs like this:

sudo envycontrol -s integrated # switch to integrated
sudo envycontrol -s nvidia # switch to nvidia

Don't forget to reboot after switching.

This got me up to 8 or 9 hours of battery life and a power draw of only 6W when doing office work (LibreOffice, Xournal++ and Firefox open)

Monitor your power usage with powertop

Fedora unfortunately doesn't really show you detailed information about your power usage, but powertop is easily installed and shows you your current wattage, which component is responsible (CPU/GPU) and which processes are responsible allowing you to monitor your battery much more effectively. You can install it by running it:

powertop

Fedora will prompt you to install it, should it not already be installed.