I'm looking for a command that would give me the same info as:

cat /proc/cpuinfo 

Except for the GPU (type of the chip and memory, frequency).

share|improve this question

12 Answers 12

up vote 35 down vote accepted

That type of information is non-standard, and the tools you will use to gather it vary widely.

The command glxinfo will give you all available OpenGL information for the graphics processor, including its vendor name, if the drivers are correctly installed.

To get clock speed information, there is no standard tool.

  • For ATI/AMD GPUs, aticonfig --odgc will fetch the clock rates, and aticonfig --odgt will fetch the temperature data.
  • For NVIDIA GPUs, the nvclock program will fetch the same information.

I am not aware of an equivalent tool for the open source drivers or for Intel or other GPUs.

Other information on the hardware can be fetched from the lspci and lshw tools.

share|improve this answer
1  
How to install glxinfo? – stiv Mar 13 '15 at 13:40
4  
@stiv: It's part of the Mesa library, and comes with the package mesa-utils on Ubuntu. – greyfade Mar 13 '15 at 18:20
2  
aticonfig doesn't appear to be available since the retirement of fglrx. nvclock also appears to have been abandoned since the last version was for trusty. Do you have any updated solutions? Here's what I have so far.. – Elder Geek Dec 14 '17 at 23:16

This is really not that complex For model and memory, here's a 1 liner that works for every video card I've tested it on regardless of manufacturer (Intel, AMD, NVIDIA):

GPU=$(lspci | grep VGA | cut -d ":" -f3);RAM=$(cardid=$(lspci | grep VGA |cut -d " " -f1);lspci -v -s $cardid | grep " prefetchable"| cut -d "=" -f2);echo $GPU $RAM

GPU= All this bit does is grab the 3rd field from 'lspci' output filtered via 'grep' for VGA which corresponds to the video chip.

RAM= All this bit does is set variable cardid equal to the first field of output from lspci matching "VGA" and feeds that as a request for -v verbose output from lspci for that specific -s device, further filtering the output by grep for the string " prefetchable" as this contains the memory on the card itself (note the preceding space as we don't want to match "non-prefetchable" in our output.

For clock rate on Intel integrated graphics (Tested on I3 and I5)

execute the command sudo find /sys -type f -name gt_cur* -print0 | xargs -0 cat This dives into the /sys tree to locate the gt_cur_freq_mhz file which on my I3 is /sys/devices/pci0000:00/0000:00:02.0/drm/card0/gt_cur_freq_mhz and prints the content. which in my case under extremely light load is 350 as in 350 MHz which corresponds to the minimum frequency found in /sys/devices/pci0000:00/0000:00:02.0/drm/card0/gt_min_freq_mhz and when running glxgears and glmark2 results in 1050 as in 1050 MHz which corresponds to the maximum frequency found in /sys/devices/pci0000:00/0000:00:02.0/drm/card0/gt_max_freq_mhz

For clock rates on nvidia cards:

nvidia-smi -stats -d procClk corresponds to the GPU clock nvidia-smi -stats -d memClk corresponds to the memory clock.

Note: I am unable to test the above as my trusty GeForce 210 isn't supported and this works only on Kepler or newer GPUs as indicated by `nvidia-smi -stats --help'

I do not currently have any solutions for clock rate on AMD cards and do not have the hardware available for testing. I will however say that to the best of my knowledge the aticonfig mentioned in the accepted answer no longer exists and it appears that nvclock isn't available for anything since trusty.

share|improve this answer

I do believe the best option for this is neofetch.

# Get neofetch
sudo add-apt-repository ppa:dawidd0811/neofetch
sudo apt update
sudo apt get neofetch
# Run neofetch
neofetch

This gives an output like this:

share|improve this answer
1  
I'm not seeing the video card frequency and memory in this answer. There are far simpler methods to obtain the model of GPU which appears to be all you are giving us. I'm not sure what this adds to the existing answers. – Elder Geek Dec 10 '17 at 17:16

A blog post focussing on work done on the command-line is here:

http://www.cyberciti.biz/faq/howto-find-linux-vga-video-card-ram/

Find out the device ID:

 lspci | grep ' VGA ' | cut -d" " -f 1
03:00.0

You can then use this output with lspci again, forming two nested commands

lspci  -v -s  $(lspci | grep ' VGA ' | cut -d" " -f 1)

Output from my system:

03:00.0 VGA compatible controller: NVIDIA Corporation G98 [Quadro NVS 295] (rev a1) (prog-if 00 [VGA controller])
    Subsystem: NVIDIA Corporation Device 062e
    Flags: bus master, fast devsel, latency 0, IRQ 24
    Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
    Memory at ec000000 (64-bit, prefetchable) [size=64M]
    Memory at f4000000 (64-bit, non-prefetchable) [size=32M]
    I/O ports at dc80 [size=128]
    [virtual] Expansion ROM at f7e00000 [disabled] [size=128K]
    Capabilities: <access denied>
    Kernel driver in use: nvidia

EDIT: You can avoid the <access denied> by launching with sudo

So, (prefetchable) [size=64M) indicates that I have a 64-MB NVIDIA card. However, I don't, it's rather 256 MB. Why? see below.

To see how to get the most info+performance out of it, read an extremely comprehensive article on the Arch-Linux Wiki

https://wiki.archlinux.org/index.php/NVIDIA

For nvidia users, start with

nvidia-smi


Thu Dec 19 10:54:18 2013       
+------------------------------------------------------+                       
| NVIDIA-SMI 5.319.60   Driver Version: 319.60         |                       
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro NVS 295      Off  | 0000:03:00.0     N/A |                  N/A |
| N/A   73C  N/A     N/A /  N/A |      252MB /   255MB |     N/A      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Compute processes:                                               GPU Memory |
|  GPU       PID  Process name                                     Usage      |
|=============================================================================|
|    0            Not Supported                                               |
+-----------------------------------------------------------------------------+

This indicates that I have a 256 MB GDDR3 Graphics card.

At this time, I don't know how to get this for Intel and AMD/ATI GPUs.

share|improve this answer
5  
+1 for nvidia-smi (that should be highlighted a bit in my opinion) – Martin Thoma Sep 7 '14 at 15:23
    
If anyone have any idea: nvidia-smi hangs indefinitely: what could be the issue? – Franck Dernoncourt Aug 9 '16 at 15:50

clinfo

sudo apt-get install clinfo
clinfo

is the analogue of glxinfo but for OpenCL.

nvidia-settings

Mixes runtime with some static info.

enter image description here

More details: How do I check if Ubuntu is using my NVIDIA graphics card?

share|improve this answer

Just to find the basics, according to https://wiki.debian.org/NvidiaGraphicsDrivers#NVIDIA_Proprietary_Driver,

lspci | grep VGA

If you need more detail than that, see @knb's answer to this same question.

share|improve this answer

For Nvidia cards, type

nvidia-smi -q
share|improve this answer

If you're running Ubuntu on a Chromebook with crouton, the only one of the answers that will work is going to chrome://gpu in the Chrome browser.

share|improve this answer

Run google-chrome and navigate to the URL about:gpu. If chrome has figured out how to use OpenGL, you will get extremely detailing information about your GPU.

share|improve this answer
    
This also works in Chromium (chromium-browser). – Eliah Kagan Jul 2 '17 at 13:02

For Nvidia cards.

1st GPU

> cat /proc/driver/nvidia/gpus/0/information
Model:       GeForce GTX 680
IRQ:         24
GPU UUID:    GPU-71541068-cded-8a1b-1d7e-a093a09e9842
Video BIOS:      80.04.09.00.01
Bus Type:    PCIe
DMA Size:    40 bits
DMA Mask:    0xffffffffff
Bus Location:    0000:01.00.0

2nd GPU

> cat /proc/driver/nvidia/gpus/1/information
Model:       GeForce GTX 580
IRQ:         33
GPU UUID:    GPU-64b1235c-51fc-d6f1-0f0e-fa70320f7a47
Video BIOS:      70.10.20.00.01
Bus Type:    PCIe
DMA Size:    40 bits
DMA Mask:    0xffffffffff
Bus Location:    0000:08.00.0
share|improve this answer
1  
Thanks! (thoughcat /proc/driver/nvidia/gpus/0000\:01\:00.0/information for me) – matt wilkie Nov 24 '15 at 3:54

For the Intel GMA950 (comes with EeePC in particular) you can run:

setpci -s 00:02.0 f0.b

which will return '00' for 200MHz, '01' for 250MHz or '03' for 400MHz. You may be able to apply the same principle to other Intel cards.

share|improve this answer

I do not know of a direct equivalent, but lshw should give you the info you want, try:

sudo lshw -C display

(it also works without sudo but the info may be less complete/accurate)

You can also install the package lshw-gtk to get a GUI.

share|improve this answer
2  
Had to put gksu before the command in the menu to get lshw-gtk to work. – robin0800 Feb 15 '11 at 10:55
    
Any updates? I'm a fan of the command but the only clock rate (frequency) it seems to provide for me is the base bus clock 33MHz. I'm attempting to bring this Q&A up to date. Thank you! – Elder Geek Dec 14 '17 at 23:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.