Smart Systems for Home

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

How to Check Graphics Card on Linux

· 5 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

To check your graphics card on Linux, you can use a few simple terminal commands: lspci for the hardware ID, glxinfo for the active driver, and nvidia-smi or radeontop for GPU usage. No extra software is needed for basic checks, but installing mesa-utils helps with OpenGL details.

What You'll Need

  • A Linux system with a terminal (Ctrl+Alt+T usually opens it).
  • Root or sudo access only if you want to install packages (not required for basic checks).
  • Internet connection if you need to install mesa-utils or lshw.

Step-by-Step

  1. Open a terminal. Press Ctrl+Alt+T or search for "Terminal" in your applications menu.
  2. List PCI devices to find your GPU. Run: lspci | grep -i vga. This shows the vendor and model, e.g., VGA compatible controller: NVIDIA Corporation GA106 [GeForce RTX 3060]. If nothing appears, try lspci | grep -i '3d' for integrated or newer cards.
  3. Get detailed hardware info with lshw (optional). If lshw is installed, run sudo lshw -C display to see the driver in use, memory, and bus address. If not, install it with sudo apt install lshw (Debian/Ubuntu) or sudo dnf install lshw (Fedora).
  4. Check the active kernel driver. Run lsmod | grep -E 'nvidia|amdgpu|i915'. This shows which driver module is loaded. For NVIDIA, you'll see nvidia; for AMD, amdgpu; for Intel, i915.
  5. For NVIDIA cards, use nvidia-smi. If you have the proprietary driver, run nvidia-smi. It shows GPU name, driver version, CUDA version, and current usage. If it says "command not found", the driver isn't installed.
  6. For AMD cards, use radeontop or glxinfo. Install radeontop via your package manager, then run radeontop --help to see usage. Alternatively, install mesa-utils and run glxinfo -B to see the renderer string (e.g., AMD Radeon RX 6700 XT (NAVY_FLOUNDER)).
  7. For Intel integrated graphics, use glxinfo. Install mesa-utils if needed, then run glxinfo -B. The renderer will show something like Mesa Intel(R) UHD Graphics 630.
  8. Check GPU usage in real time. For NVIDIA, nvidia-smi shows usage. For AMD, radeontop shows usage. For Intel, use intel_gpu_top (install intel-gpu-tools).

Common Mistakes

  • Using lspci without grep – output is long; always filter with grep -i vga or grep -i 3d.
  • Assuming nvidia-smi works with open-source drivers – it only works with proprietary NVIDIA drivers. If you use nouveau, it won't be there.
  • Confusing VGA controller with other PCI devices – some systems have multiple display adapters (e.g., a discrete GPU and an integrated one). lspci lists both; check which one is actually in use via glxinfo.
  • Running glxinfo without installing mesa-utils – it's not always preinstalled. If you get "command not found", install it.
  • Using sudo unnecessarily – lspci and glxinfo work without root. Only lshw needs sudo for full detail.

Tips

  • If you have a hybrid graphics setup (e.g., Intel + NVIDIA), you can check which GPU is active for a specific program using __NV_PRIME_RENDER_OFFLOAD=1 with the command, but for general info, glxinfo shows the default.
  • Use lspci -v -s $(lspci | grep -i vga | cut -d' ' -f1) to see detailed info about your GPU's kernel driver and memory.
  • For a quick one-liner, lspci -k | grep -A 2 -i vga shows the device and the kernel driver in use.
  • If you're on a laptop with switchable graphics, check cat /proc/driver/nvidia/gpus/*/information for NVIDIA, or use prime-select query to see which GPU is active.

Troubleshooting

  • No output from lspci | grep -i vga: Try lspci | grep -i display or lspci | grep -i '3d'. Some cards are listed as "3D controller" instead of "VGA".
  • glxinfo not found: Install mesa-utils: sudo apt install mesa-utils (Debian/Ubuntu), sudo dnf install mesa-utils (Fedora), or sudo pacman -S mesa-utils (Arch).
  • NVIDIA card shows as "VGA compatible controller" but nvidia-smi fails: The proprietary driver isn't installed. You're using the open-source nouveau driver. Install the proprietary driver from your distribution's repository or NVIDIA's website (but be aware of kernel compatibility).
  • AMD card shows as "VGA compatible controller" but no amdgpu in lsmod: The older radeon driver might be in use. Check with lsmod | grep radeon. This is common for older AMD GPUs.
  • Multiple GPUs, but you want to know which one is being used: Run glxinfo -B and look at the "OpenGL renderer string". That's the GPU actually rendering.
  • Permission denied when running nvidia-smi: Some systems restrict it to root. Try sudo nvidia-smi.

Frequently Asked Questions

How can I see my graphics card model without installing anything?

Run lspci | grep -i vga – it shows the vendor and model name directly, no installation needed.

What's the difference between lspci and glxinfo?

lspci shows the hardware ID from the PCI bus, while glxinfo shows the actual driver and OpenGL renderer in use. They can differ if the hardware is present but not active.

How do I check if my NVIDIA driver is working?

Run nvidia-smi. If it shows the driver version and GPU temp/usage, it's working. If it says "command not found", the driver isn't installed.

Can I check my GPU temperature on Linux?

Yes. For NVIDIA, nvidia-smi shows temperature. For AMD, use sensors (install lm-sensors) or radeontop with the -t flag. For Intel, intel_gpu_top shows temperature.

Why does lspci show my GPU but glxinfo shows a different one?

This happens on systems with both integrated and discrete GPUs. The one listed in lspci is the hardware, but glxinfo shows which one is actually driving the display. You can switch using your graphics driver settings (e.g., NVIDIA Prime).

Is there a GUI way to check my graphics card?

Yes. Most desktop environments have a "Details" or "System Info" tool. For example, GNOME's Settings > About shows the graphics card. For more detail, install hardinfo or cpu-x.