Skip to content

NVIDIA graphics fails after Arch update

A ghost crab in seaweed

Picture this. I update a system running Arch Linux then restart. Now, I can only see a black screen, sometimes with some error, sometimes without. In my case, it's often due to the latest NVIDIA driver not supporting my graphics card. Let's run through the steps that fix my issue.

Steps

  1. Switch to TTY mode (from the black screen).
    Ctrl + Alt + F2

  2. View error logs.

    journalctl -b -p err | less

    The following information was retrieved from the logs.
    NVRM: The GPU installed in this system is supported through the NVIDIA 123.xx Legacy drivers. The 124.56.78 NVIDIA driver will ignore this GPU.

  3. Check the installed NVIDIA driver version.

    pacman -Qs nvidia

    The output had a bunch of logs with 124.56.78-9, i.e. the installed version.

  4. Search for nvidia-123 packages available to install.
    The following command didn't return anything.

    pacman -Ss nvidia-123

    The following command returned opencl-nvidia-123xx, lib32-opencl-nvida-123xx, nvidia-123xx-utils, lib32-nvidia-123xx-utils, nvidia-123xx-settings, nvidia-123xx-dkms.

    pamac search nvidia-123

    nvidia-123xx-dkms, nvidia-123xx-utils & lib32-nvidia-123xx-utils are the packages we should install.

  5. Remove the incompatible NVIDIA driver.

    sudo mhwd -r pci video-nvidia

    The following error occurred after running the above command.
    Failed to prepare transaction (could not satisfy dependencies)
    Removing linux321-nvidia breaks dependency 'linux321-nvidia' required by linux-nvidia-meta
    removing nvidia-utils breaks dependency 'vulkan-driver' required by steam-native-runtime
    removing lib32-nvidia-utils breaks dependency 'lib32-vulkan-driver' required by steam-native-runtime
    Error: pacman failed!*
    linux-nvidia-meta & steam-native-runtime are preventing the removal of the incompatible NVIDIA driver.

  6. Remove the conflicting packages.

    sudo pacman -Rdd linux-nvidia-meta steam-native-runtime
  7. Install 123.xx legacy driver from AUR.

    pamac build nvidia-123xx-dkms nvidia-123xx-utils lib32-nvidia-123xx-utils
  8. Restart the system. It should boot back to the GUI.

    sudo reboot
  9. Reinstall steam-native-runtime (linux-nvidia-meta is automatically reinstalled in step 7).

    pamac install steam-native-runtime

Useful commands

  • Check errors at boot

    journalctl -b -p err
  • List available drivers

    mhwd -l -d --pci
  • List installed drivers

    mhwd -li
  • Search AUR packages

    pamac search PACKAGE_NAME
  • Scroll through command outputs in TTY.

    COMMAND | less