Hardware nvidia troubleshooting - ulises-jeremias/dotfiles GitHub Wiki

NVIDIA Troubleshooting Guide (Arch Linux)

This guide provides comprehensive troubleshooting steps for NVIDIA-related issues on Arch Linux, including driver installation, hybrid GPU setups, and solutions for common problems such as black screens or GPU conflicts.


Table of Contents


Driver Installation

Blacklisting Nouveau

The open-source nouveau driver can conflict with the proprietary NVIDIA driver. To disable it:

  1. Create a modprobe blacklist file:

    sudo nano /etc/modprobe.d/blacklist-nouveau.conf
    
  2. Add the following lines:

    blacklist nouveau
    options nouveau modeset=0
    
  3. Regenerate the initramfs:

    sudo mkinitcpio -P
    
  4. Reboot:

    sudo reboot
    

Choosing Between nvidia and nvidia-dkms

Package Description Use When...
nvidia Precompiled for stock Arch kernel You're using the standard linux kernel
nvidia-dkms Builds driver per installed kernel (via DKMS) You're using linux-lts, zen, or custom kernels

Installation examples:

# For standard kernel
sudo pacman -S nvidia

# For DKMS version
sudo pacman -S nvidia-dkms

Common Issues

Black Screen After Login

  • Check NVIDIA modules:

    lsmod | grep nvidia
    
  • Check Xorg logs:

    cat /var/log/Xorg.0.log | grep nvidia
    
  • Confirm kernel parameters:

    cat /proc/cmdline
    
  • Ensure nvidia-drm.modeset=1 is passed:

    • For GRUB: edit /etc/default/grub and run sudo grub-mkconfig -o /boot/grub/grub.cfg
    • For systemd-boot with UKI: add --cmdline 'nvidia-drm.modeset=1' in your mkinitcpio.preset

Internal Display Not Detected (on Laptops)

  • Check current outputs:

    xrandr
    
  • Try enabling the internal panel:

    xrandr --output eDP-1 --auto
    
  • Open NVIDIA Settings GUI:

    nvidia-settings
    

[!TIP] This usually happens if the internal display is wired through the Intel iGPU and i915 was blacklisted.


GTK Apps Freezing or Blank

  • Check OpenGL status:

    glxinfo | grep "OpenGL renderer"
    
  • Ensure nvidia-utils and mesa are installed.

  • Disable compositing (especially in i3, bspwm, etc.)


No NVIDIA Processes Detected

  • Check:

    nvidia-smi
    lsmod | grep nvidia
    journalctl -b | grep -i nvidia
    
  • Ensure nvidia-persistenced is running if needed:

    systemctl status nvidia-persistenced
    

Diagnostic Commands

# Check which GPUs are present
lspci -k | grep -A 2 -E "(VGA|3D)"

# Verify modules
lsmod | grep -E 'nvidia|nouveau|i915'

# GPU renderer info
glxinfo | grep "OpenGL renderer"

# Display detection
xrandr

# NVIDIA status
nvidia-smi
nvidia-settings

# Kernel log
journalctl -b | grep -i nvidia

Hybrid GPU Setup (Intel + NVIDIA)

If your laptop uses both an integrated Intel GPU and a dedicated NVIDIA GPU:

  1. Install required packages:

    sudo pacman -S nvidia nvidia-utils nvidia-settings xf86-video-intel mesa
    
  2. Create /etc/modprobe.d/nvidia.conf:

    options nvidia-drm modeset=1
    
  3. For GRUB: edit /etc/default/grub:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet nvidia-drm.modeset=1"
    sudo grub-mkconfig -o /boot/grub/grub.cfg
    
  4. For systemd-boot with UKI:

    • Add --cmdline 'nvidia-drm.modeset=1' to your preset in /etc/mkinitcpio.d/linux.preset

    • Then regenerate:

      sudo mkinitcpio -p linux
      
  5. Optional Xorg config:

    sudo nano /etc/X11/xorg.conf.d/10-hybrid.conf
    
    Section "Device"
        Identifier "Intel Graphics"
        Driver "modesetting"
        BusID "PCI:0:2:0"
        Option "TearFree" "true"
    EndSection
    
    Section "Device"
        Identifier "NVIDIA"
        Driver "nvidia"
        BusID "PCI:1:0:0"
        Option "AllowEmptyInitialConfiguration"
    EndSection
    

Quick Recovery Checklist

If you're stuck on a black screen or SDDM doesn't appear:

# Switch to TTY
Ctrl + Alt + F2

# Check for blacklisted Intel
ls /etc/modprobe.d/

# Remove i915 blacklist if present
sudo rm /etc/modprobe.d/blacklist-intel.conf

# Rebuild initramfs
sudo mkinitcpio -P

# Reboot
sudo reboot

Useful Links


Additional Resources