Hey folks, John here from my ever-evolving home lab setup. If you’re like me, tinkering with older hardware to mimic enterprise-level computing without breaking the bank, you’ve probably run into driver headaches more than once. Today, I’m sharing a quick win from my recent battle with a Rocky Linux 9.6 install on some legacy gear sporting an NVIDIA Tesla V100 GPU. The symptom? A stubborn black screen right after boot—classic Nouveau driver interference when working with NVIDIA Volta architecture. Nouveau is the open-source driver that ships with many distros, but it often clashes with older cards or when you’re prepping for proprietary NVIDIA drivers.

In my case, the server was headless anyway, so I SSH’d in from another machine and sorted it out remotely. No big deal, but documentation can be spotty for these edge cases, especially on budget legacy setups. This guide walks you through disabling Nouveau step-by-step. It’s based on what worked for me on Rocky 9.6 (which mirrors RHEL 9 behaviors), and it’s perfect if you’re setting up for AI workloads, high-speed networking, or just getting a stable display/output. I’ll keep it straightforward—assume you’re logged in as root or using sudo.

Prerequisites

  • Rocky Linux 9.6 installed (or a similar version— this should work on 9.x).
  • SSH access to the server (since the local screen is black).
  • A backup of your system, just in case. Home labs are for experimenting, but let’s not brick anything!

Step 1: Update Your System

First, ensure your system’s packages are up to date to work with the latest kernel and tools.

Run the following command:

sudo dnf update -y

If a new kernel was installed, reboot to apply the changes (optional but recommended):

sudo reboot

After rebooting, reconnect via SSH to continue.

Step 2: Blacklist the Nouveau Driver

Create a configuration file to prevent the Nouveau driver from loading.

Execute this command to create and populate the file:

cat << EOF | sudo tee /etc/modprobe.d/blacklist-nouveau.conf
blacklist nouveau
options nouveau modeset=0
EOF

This configuration includes two lines:

  • blacklist nouveau: Instructs the system to avoid loading the Nouveau driver.
  • options nouveau modeset=0: Disables kernel mode setting, which often causes a black screen issue.

Step 3: Regenerate the Initramfs

Update the initial RAM filesystem (initramfs) to apply the blacklist early during the boot process.

First, identify your current kernel version:

uname -r

Then, regenerate the initramfs with the following command:

sudo dracut -f /boot/initramfs-$(uname -r).img $(uname -r)

Alternatively, for a simpler approach that forces regeneration for all kernels:

sudo dracut --force

This rebuilds the initramfs image, excluding the Nouveau driver.

Step 4: Update GRUB Bootloader

To ensure the blacklist persists across reboots, modify the GRUB configuration.

Edit the /etc/default/grub file and append rd.driver.blacklist=nouveau to the GRUB_CMDLINE_LINUX line. For example, the line might look like this:

GRUB_CMDLINE_LINUX="crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=UUID=your-uuid rd.lvm.lv=rl/root rd.lvm.lv=rl/swap rhgb quiet rd.driver.blacklist=nouveau"

Save the file, then regenerate the GRUB configuration:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Step 5: Reboot and Verify

Reboot the system to apply the changes:

sudo reboot

After rebooting, reconnect via SSH and verify that the Nouveau driver is disabled by running:

lsmod | grep nouveau

If the command returns no output, the blacklist was successful, and your screen should function properly (or at least avoid the black screen issue when connecting a monitor). If you plan to install proprietary NVIDIA drivers next (recommended for AI or compute tasks in a home lab), proceed using resources like the RPM Fusion repositories or NVIDIA’s official drivers.

Troubleshooting Tips from My Lab

  • If the black screen issue persists, verify the GRUB parameter. On older systems, rd.blacklist=nouveau may be required instead of rd.driver.blacklist=nouveau, though the latter is standard for RHEL 9-based distributions like Rocky Linux.
  • For legacy hardware, if SSH access fails, try booting into recovery mode, though this is uncommon.
  • For cost-effective enterprise-grade setups: After disabling Nouveau, install NVIDIA drivers and CUDA to enable AI training at home. I’ve successfully run this setup on a decade-old rig, handling basic machine learning workloads efficiently.

This guide resolved my weekend project woes. If it helps your home lab endeavors, feel free to share your feedback or custom tweaks in the comments. Stay curious!


Leave a Reply

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