Fixing black screen with Nvidia graphics card on fedora

On my fedora system I found that after upgrading the kernel the graphics drivers wouldnt work. My machine would boot into the operating system perfectly fine but would have no image on the screen. This post describes how I fixed this issue.

The symptoms of the black screen on Fedora

Initially I installed fedora and the graphics worked fine. Later I then upgraded the operating system which upgraded the kernel. Then after selecting the kernel on the bootloader it would fail to display any graphics.

I knew that the operating system was working because I was able to both ping and ssh into the machine using:

ping -t deathstar
ssh deathstar

Both ping and SSH would give me confirmation that the machine was online and working. I found that by booting into the old kernel the graphics would load. I performed this by selecting the older kernel in the bootloader.

However since I didnt want to just stay on an old kernel version I wanted to find a solution

Fixing the black screen issue

To fix it I found I needed to install the Nvidia drivers. To do this I was able to use SSH but if this isn’t accessible you can enter recovery text only mode. The Nvidia drivers are available in the RPM Fusion repositories. To install RPM Fusion repo’s I ran:

sudo dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

These two commands install the free and non free repositories for RPM fusion. We use `rpm -E %fedora` to get the current version of Fedora. This ensures that I always install the right version of the repository for the Fedora release. Now that I have installed the repositories I can install the drivers by running the following command

dnf install akmod-nvidia "kernel-devel-uname-r == $(uname -r)"
dnf update

The first command installs the required driver and sets it up to be used. Once this has been done I then run dnf update to update Fedora so it has all the latest kernel and graphics drivers.

Now I have configured my system to run the Nvidea drivers I then restart the machine to reload the settings.

Once restarted the Nvidea graphics drivers were able to show the screen again. This information was taken from an old Fedora Forum post I used to resolve my problem.

Add a Comment

Your email address will not be published. Required fields are marked *