Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Check GPU in Linux: Complete Hardware Guide

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Identifying your graphics processing unit (GPU) on a Linux system is a straightforward process that requires no additional software installation for most standard distributions. You can determine whether you are running an integrated or discrete card, view the specific model name, and verify driver status using built-in command-line tools. The most reliable method involves using the lspci utility combined with grep to filter results, while lshw provides detailed hardware specifications. For users with graphical interfaces, the System Settings or dedicated monitoring applications offer visual confirmation of the active display adapter.

What You'll Need

  • A Linux-based operating system (Ubuntu, Fedora, Arch, Debian, etc.)
  • Access to a terminal emulator (often found in the applications menu under "Terminal" or "Console")
  • Basic familiarity with navigating the file system and executing commands
  • Administrative privileges (sudo access) may be required for some detailed hardware queries

Step-by-Step

  1. Open your terminal application. Most desktop environments allow you to open a terminal by pressing Ctrl+Alt+T. If this shortcut does not work, search for "Terminal" in your application launcher.
  2. Run the PCI listing command. Type the following command and press Enter: lspci | grep -i vga. This command lists all Peripheral Component Interconnect (PCI) devices and filters the output to show only lines containing "vga," which typically represents the primary graphics controller.
  3. Analyze the output for discrete GPUs. If you have a dedicated graphics card from NVIDIA, AMD, or Intel, it will often appear as a separate entry labeled "3D controller" or "VGA compatible controller." To see both VGA and 3D controllers, use lspci | grep -iE 'vga|3d'.
  4. Verify the exact model details. The previous step shows the device ID. To get the human-readable model name, run lspci -vnn | grep -i vga -A 12. This displays verbose information including the kernel driver in use and the specific hardware identifier in brackets.
  5. Check for NVIDIA-specific cards. If you are using an NVIDIA GPU, the nvidia-smi command is the gold standard. Run nvidia-smi in the terminal. If the command is not found, the NVIDIA drivers may not be installed, or you might be using an open-source alternative like Nouveau. If successful, this tool displays the GPU name, temperature, memory usage, and driver version.
  6. Use lshw for comprehensive hardware info. For a broader overview, execute sudo lshw -C display. This provides detailed information about all display hardware components, including the vendor, product name, and current configuration settings.
  7. Confirm the active driver. Knowing the hardware is only half the battle; ensuring the correct driver is loaded is crucial for performance. Run glxinfo | grep "OpenGL renderer". If the command is missing, install the mesa-utils package via your distribution's package manager (e.g., sudo apt install mesa-utils on Debian/Ubuntu). The output will explicitly state which renderer is handling your graphics tasks.

Common Mistakes

One frequent error is assuming that seeing a "VGA compatible controller" means you lack a dedicated GPU. Many modern laptops list the integrated Intel or AMD graphics as the VGA controller while the discrete NVIDIA or AMD card appears separately as a "3D controller." Failing to check for the 3D controller leads to incorrect assumptions about hardware capabilities. Another common mistake is ignoring the driver status. A GPU might be physically present, but if the proprietary drivers are not installed or are conflicting with open-source alternatives, performance will be severely degraded. Users often overlook the need to install specific firmware packages, particularly for newer AMD or NVIDIA cards, leading to black screens or low-resolution outputs. Finally, relying solely on GUI tools can sometimes be misleading. Some system monitors default to showing CPU usage or general system stats rather than specific GPU metrics unless configured correctly. Always cross-reference GUI findings with terminal commands to ensure accuracy.

Tips

For users who frequently monitor hardware, consider installing htop or btop, which provide real-time visualizations of CPU, RAM, and disk usage, though they do not natively display GPU stats without plugins. Instead, specialized tools like nvtop (for NVIDIA) or radeontop (for AMD) offer excellent terminal-based monitoring dashboards that resemble task managers. If you are dual-booting Windows and Linux, remember that Windows Fast Startup can lock the GPU state, causing issues in Linux. Disable Fast Startup in Windows to ensure clean hardware initialization when switching to Linux. Always keep your kernel updated. Newer kernels include better support for recent GPU architectures. If you have a very new graphics card, you might need a mainline kernel or a backported kernel from your distribution to recognize it properly.

Troubleshooting

If lspci returns no results for VGA or 3D controllers, your system may not be detecting the hardware. First, ensure the GPU is physically seated correctly if it is a desktop component. In virtual machines, the GPU must be passed through via PCI passthrough configurations; otherwise, the VM will only see a virtualized display adapter. If nvidia-smi fails with "command not found," the proprietary drivers are likely missing. Install them using your distribution's software center or command line (e.g., ubuntu-drivers autoinstall). If the command runs but shows no data, the NVIDIA kernel module may not be loaded. Check for errors with dmesg | grep -i nvidia and ensure Secure Boot is disabled or properly signed modules are used. When glxinfo indicates "Software Renderer" instead of your GPU name, the OpenGL drivers are not installed. Install the appropriate Mesa libraries (e.g., libgl1-mesa-dri) and restart your session. For AMD cards, ensure the amdgpu driver is enabled in the kernel parameters.

Frequently Asked Questions

How do I know if my Linux system is using integrated or discrete graphics?

Run lspci | grep -iE 'vga|3d'. If you see two entries, one labeled "VGA compatible controller" (usually Intel/AMD iGPU) and another "3D controller" (NVIDIA/AMD dGPU), you have both. The system typically uses the iGPU for desktop compositing and switches to the dGPU for heavy tasks via technologies like Prime or Hybrid Graphics.

Why does my GPU show up as "Generic VGA" in some tools?

This usually indicates that the specific vendor drivers are not installed, and the system is falling back to basic VESA framebuffer drivers. Installing the correct proprietary or open-source drivers for your GPU will resolve this and reveal the actual model name.

Can I check GPU temperature in Linux?

Yes. For NVIDIA cards, use nvidia-smi. For AMD cards, read from sysfs using cat /sys/class/drm/card0/device/hwmon/hwmon0/temp1_input (path may vary) or use tools like radeontop. Universal monitoring tools like sensors (from lm-sensors) can also aggregate this data.

Is it safe to update my GPU drivers on Linux?

Generally, yes. Using your distribution's package manager to update drivers is the safest method. Manually installing drivers from manufacturer websites can sometimes break updates or conflict with system packages. Always create a backup or system restore point before major driver changes.

How do I find out which kernel version supports my new GPU?

Check the Linux Kernel release notes or the GPU manufacturer's documentation. Generally, newer GPUs require newer kernels. You can check your current kernel version with uname -r. If your GPU is not detected, upgrading the kernel is often the first troubleshooting step.