The nvidia_modeset
error that causes your computer to freeze just before login is typically related to issues with the NVIDIA graphics driver on Fedora 31. RTX 2070 can happen due to incompatible drivers, kernel module issues, or configuration problems.
Steps to Fix the nvidia_modeset
Error on Fedora 31:
- Boot into Recovery or Emergency Mode:
- Restart your computer and, during boot, hold the Shift key (or press Esc on some systems) to enter the GRUB menu.
- Select the Advanced options for Fedora.
- Choose a kernel entry with recovery mode or emergency mode (often labeled as “Rescue”).
- This mode will boot your system with minimal drivers and should avoid loading the problematic NVIDIA driver.
2. Remove Existing NVIDIA Drivers:
- Once in recovery mode, open a terminal or switch to a text console (
Ctrl + Alt + F3
). - Remove the existing NVIDIA drivers using the following command:
bash sudo dnf remove "*nvidia*"
- This will remove any installed NVIDIA drivers and related packages that might be causing conflicts.
3. Disable Nouveau Driver:
- The Nouveau driver is the open-source NVIDIA driver that can cause conflicts with the proprietary NVIDIA driver. Blacklist it by editing the GRUB configuration:
bash sudo nano /etc/default/grub
- Find the line starting with
GRUB_CMDLINE_LINUX
and addnouveau.modeset=0
to the parameters. It should look like:bash GRUB_CMDLINE_LINUX="... nouveau.modeset=0"
- Update the GRUB configuration:
bash sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg # For UEFI systems sudo grub2-mkconfig -o /boot/grub2/grub.cfg # For BIOS systems
4. Install the Latest NVIDIA Drivers:
- Add the RPM Fusion repository, which provides the latest NVIDIA drivers for Fedora:
bash sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
- Install the NVIDIA drivers:
bash sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
- This command installs the
akmod-nvidia
package, which automatically rebuilds the kernel module for your installed kernel, and thexorg-x11-drv-nvidia-cuda
package, which provides CUDA support.
5. Reboot Your System:
- Restart your computer with:
bash sudo reboot
- If the drivers were installed correctly, your system should now boot without freezing, and you should be able to log in successfully.
Additional Tips:
- Kernel Compatibility: Ensure that your kernel version is compatible with the NVIDIA driver version you are installing. Check for kernel updates (
sudo dnf update
) and make sure theakmod
package matches your kernel. - Secure Boot: If your system has Secure Boot enabled, you may need to disable it in the BIOS/UEFI settings, as the NVIDIA drivers require unsigned kernel modules.
- Check for Errors: Monitor the system logs for any additional errors that might provide more clues:
journalctl -xe | grep -i nvidia
Conclusion
The nvidia_modeset error that constantly lets your computer freeze simply before login is the main problem, which is associated with the NVIDIA graphics driver on Fedora 31. On RTX 2070, it can occur just because of outdated drivers, kernel module problems, or configuration issues. To resolve this issue, you must ensure that you have the best GPU dedicated server.