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

I know the question is old, but I found a solution which I haven't found on any other topic.

Open a terminal and type

lspci -vnnn | perl -lne 'print if /^\d+\:.+(\[\S+\:\S+\])/' | grep VGA

Your output will be something like that:

00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller]) 

01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Chelsea LP [Radeon HD 7730M] [1002:682f] (rev ff) (prog-if ff)

Now look for the [VGA controller] at the end of each device. Whichever device has it, is the active GPU. In my case it's the i7 processor (HD 4000) that's handling the work.


I found this (if you have NVidia and intel graphic cards):

I think the following command should give you an indication of your active chip:

$ glxinfo|egrep "OpenGL vendor|OpenGL renderer*"

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile*

If you switched to NVidia card:

$ optirun glxinfo|egrep "OpenGL vendor|OpenGL renderer"

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GT 555M/PCIe/SSE2

nvidia-settings utility

On Ubuntu 15.10, after I installed nvidia-352 and the GPU seems to work (see e.g. these steps):

nvidia-settings

shows something like:

enter image description here

Note how it shows:

GPU 0 - (NVS 5400M)

where NVS 5400M is my GPU model. Also tested on a Quadro K1100M. This did not show up before I had installed the driver.

Also if I fire:

sudo apt-get install mesa-utils
__GL_SYNC_TO_VBLANK=0 vblank_mode=0 glxgears

the GPU usage goes to > 90%, further sign that it is working.

Those env vars are there to disable vsync: https://stackoverflow.com/questions/17196117/disable-vertical-sync-for-glxgears

But in the end, the only test that matters is to do a benchmark with / without GPU and see your FPS goes way up or not: How to perform a detailed and quick 3D performance test

nvidia-settings is open source by the way: https://github.com/NVIDIA/nvidia-settings

Similar on Launchpad: https://answers.launchpad.net/ubuntu/+question/233462


The easiest way to check is go to Settings -> Details -> About

Settings


Try this I think it'll work:

nvidia-smi

It will give you something like this

enter image description here