How to Check Graphics Card on Linux
In this article
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-utilsorlshw.
Step-by-Step
- Open a terminal. Press
Ctrl+Alt+Tor search for "Terminal" in your applications menu. - 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, trylspci | grep -i '3d'for integrated or newer cards. - Get detailed hardware info with lshw (optional). If
lshwis installed, runsudo lshw -C displayto see the driver in use, memory, and bus address. If not, install it withsudo apt install lshw(Debian/Ubuntu) orsudo dnf install lshw(Fedora). - Check the active kernel driver. Run
lsmod | grep -E 'nvidia|amdgpu|i915'. This shows which driver module is loaded. For NVIDIA, you'll seenvidia; for AMD,amdgpu; for Intel,i915. - 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. - For AMD cards, use radeontop or glxinfo. Install
radeontopvia your package manager, then runradeontop --helpto see usage. Alternatively, installmesa-utilsand runglxinfo -Bto see the renderer string (e.g.,AMD Radeon RX 6700 XT (NAVY_FLOUNDER)). - For Intel integrated graphics, use glxinfo. Install
mesa-utilsif needed, then runglxinfo -B. The renderer will show something likeMesa Intel(R) UHD Graphics 630. - Check GPU usage in real time. For NVIDIA,
nvidia-smishows usage. For AMD,radeontopshows usage. For Intel, useintel_gpu_top(installintel-gpu-tools).
Common Mistakes
- Using
lspciwithout grep – output is long; always filter withgrep -i vgaorgrep -i 3d. - Assuming
nvidia-smiworks 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).
lspcilists both; check which one is actually in use viaglxinfo. - Running
glxinfowithout installing mesa-utils – it's not always preinstalled. If you get "command not found", install it. - Using
sudounnecessarily –lspciandglxinfowork without root. Onlylshwneeds 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=1with the command, but for general info,glxinfoshows 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 vgashows the device and the kernel driver in use. - If you're on a laptop with switchable graphics, check
cat /proc/driver/nvidia/gpus/*/informationfor NVIDIA, or useprime-select queryto see which GPU is active.
Troubleshooting
- No output from
lspci | grep -i vga: Trylspci | grep -i displayorlspci | grep -i '3d'. Some cards are listed as "3D controller" instead of "VGA". glxinfonot found: Install mesa-utils:sudo apt install mesa-utils(Debian/Ubuntu),sudo dnf install mesa-utils(Fedora), orsudo pacman -S mesa-utils(Arch).- NVIDIA card shows as "VGA compatible controller" but
nvidia-smifails: 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
amdgpuin lsmod: The older radeon driver might be in use. Check withlsmod | grep radeon. This is common for older AMD GPUs. - Multiple GPUs, but you want to know which one is being used: Run
glxinfo -Band look at the "OpenGL renderer string". That's the GPU actually rendering. - Permission denied when running
nvidia-smi: Some systems restrict it to root. Trysudo 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.