80

Is there a command (Via terminal) to see the temperature of any video card.

Already Tried sensors with the sensors-detect applied. Does not detect for example, Nvidia and ATI video card temperatures.

11 Answers 11

114

An alternative for nvidia cards is to use nvidia-smi: the "NVIDIA System Management Interface program".

user@box:~$ nvidia-smi -q -d temperature
GPU 0:
            Product Name            : GeForce 210
            PCI ID                  : a6510de
            Temperature             : 39 C

Or to output just the numeric value in Celsius:

user@box:~$ nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader
39
4
  • optirun nvidia-smi -q -d temperature
    – Gelldur
    Jun 17, 2016 at 18:25
  • 1
    In case anyone missed it, nvidia-settings -q gpucoretemp is another method. Apr 1, 2018 at 12:15
  • How do you handle when all GPU cores are at 100% and your nvidia-smi command hangs until a core is freed? Thus defeating the purpose of 'alarm on meltdown'? Am I reduced to an aftermarket temperature sensor? The 2080Ti GPU apparently won't read its own temperature on 100% usage, and doesn't know to turn on its own fan, nor halt because of >135C literal melting temperatures. Looks like it's time for unpacking their Propitiatory C binaries and do it like they do on blizzard gamedevs. Well played nvidia, angry noises. Dec 17, 2020 at 3:17
  • Memory Current Temp: N/A -> what to do?
    – gies0r
    Sep 11, 2021 at 22:29
65

Yes, there is a command.

Detecting sensors

First of all, you have to search for sensors:

sudo apt-get install lm-sensors
sudo sensors-detect

Since lucid lynx, you have to type:

sudo service module-init-tools start

If you're running another Ubuntu version type:

sudo /etc/init.d/module-init-tools start

To save the detection results.

Displaying sensor data

Now, to show the temperatures, type:

sensors

Now you should see something like that:

My sensors result

I don't have many sensors, btw :)

Displaying temperature of NVIDIA GPU

If you are using a NVIDIA GPU type:

sudo apt-get install nvclock

After installing it, type nvclock -T to display the temperature.

You can also type nvidia-settings -q gpucoretemp.

I hope this helped you,

10
  • 5
    Thank you Daniel but sensors does not detect the video temp for cases like ati and nvidia. i should have put it in the question but forgot. +1 for complete example. Apr 11, 2011 at 11:42
  • 1
    @CYREX After some researches I found out that it also shows GPU temp if you install libsensors3 BEFORE detecting sensors. Try: sudo apt-get install libsensors3 and then follow my steps again.
    – omnidan
    Apr 11, 2011 at 13:10
  • Nope no luck either. Only shows the CPU temp. Apr 11, 2011 at 13:27
  • Some programs made by nvidia/ati display the GPU temp.
    – omnidan
    Apr 11, 2011 at 13:35
  • 1
    For AMD GPU, in 16.04: apt install lm-sensors followed by sensors-detect
    – noobninja
    May 8, 2016 at 8:20
18

The already mentioned command for nvidia (on my OpenElec installation):

nvidia-smi

also gave additional information:

+------------------------------------------------------+                       
| NVIDIA-SMI 3.295.71   Driver Version: 295.71         |                       
|-------------------------------+----------------------+----------------------+
| Nb.  Name                     | Bus Id        Disp.  | Volatile ECC SB / DB |
| Fan   Temp   Power Usage /Cap | Memory Usage         | GPU Util. Compute M. |
|===============================+======================+======================|
| 0.  GeForce GT 520            | 0000:01:00.0  N/A    |       N/A        N/A |
|  N/A   52 C  N/A   N/A /  N/A |  17%  169MB / 1023MB |  N/A      Default    |
|-------------------------------+----------------------+----------------------|
| Compute processes:                                               GPU Memory |
|  GPU  PID     Process name                                       Usage      |
|=============================================================================|
|  0.           Not Supported                                                 |
+-----------------------------------------------------------------------------+
12

If you want to watch the temperature in your terminal for monitoring, you can use watch with the commands that were given in the other answers (e.g. @drgrog's). For instance, to refresh the temperature every 5 seconds:

watch -n 5 nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader
4

For nvidia there is an nvidia-settings package, which includes a gui to see the temperature. I don't recall if there is a text-mode tool in there.

Some Intel graphics adapters report their temperature through acpi and you can read it through the sensors command from the package of the same name.

2

I have recently found a cool extension for Gnome 3. So if you are using it - you can install this and see the temperature in the tray:

https://extensions.gnome.org/extension/541/nvidia-gpu-temperature-indicator/

2

I wanted a quick simple way to see the GPU and CPU temps on my computer. I also wanted to see the NVidia temp in fahrenheit. Assuming you already have the nvidia-smi and sensors utilities installed, configured and working already (see above for how), you can use the following script to display everything together:

#!/bin/bash
echo ""

echo "GPU Current Temp"
echo "Core 0:       +$(( $((`nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader` * 9/5)) + 32))°F"
# nvidia-smi --query --display=TEMPERATURE | grep "GPU Current Temp" --color=none | sed 's/        //g'

echo ""

echo "CPU Current Temp"
sensors coretemp-isa-0000 -f | sed 's/(high.*//g' | tail -n +4 | sed 's/\.[0-9]//g'

NOTE: you may need to change coretemp-isa-0000 to the identifier if your computer uses a different architecture than mine.

The output will look something like:


GPU Current Temp
Core 0:       +120°F

CPU Current Temp
Core 0:       +167°F  
Core 1:       +176°F  
Core 2:       +156°F  
Core 3:       +152°F  
Core 4:       +147°F  
Core 5:       +143°F  

0

This indicator also includes GPU temp (as well as CPU and HDD temps.)

https://launchpad.net/indicator-sensors

0

After installing nvclock, just running:

nvidia-settings

On a terminal worked well on GeForce 210 card on top of Ubuntu 14lts. You get a very nice GUI and can check the celsius temperature at GPU 0 > Thermal Settings.

0

GPU Temperature with Conky

Conky is a light weight (on resources, not features) system monitor popular in Linux. You can use it to constantly display GPU temperature along with other system elements you like to follow.

Most laptops with nVidia GPUs also include an Intel Integrated GPU (iGPU) for use when on battery power.

My Conky display changes depending on whether Intel or nVidia is selected.

Below are GIFs for nVidia and Intel before and running glxgears to tax the GPU. I'll try to find a more demanding graphics test than glxgears in the future.

Display for Laptop with NVIDIA active

Here's what my Conky looks like when prime-select nvidia is active:

gpu temp nvidia

Initially there is low load on nVidia GPU and it's running at 746 MHz and is 55 degrees Celsius. After running glxgears GPU speed spikes to max speed of 1037 MHz and temperature climbs to 58 degrees Celsius.

Display for Laptop with Intel Integrated GPU active

Here's what my Conky looks like when prime-select intel is active:

intel GPU

Initially there is low load on Intel Integrated GPU (iGPU) and temperature (of CPU) is 49 degrees Celsius. After running glxgears CPU temperature climbs to 73 degrees Celsius!

Conky code

Here is the relevant conky code for above:

#------------+
# Temperature|
#------------+
#${color1}All CPUs ${color green}${cpu}% ${goto 131}${color1}Temp: ${color green}${execpi .001 cat /sys/class/thermal/thermal_zone7/temp | cut -c1-2}°C ${alignr}${color1}Up: ${color green}$uptime
# Next line is for kernel >= 4.13.0-36-generic
${color1}All CPUs ${color green}${cpu}% ${goto 131}${color1}Temp: ${color green}${hwmon 1 temp 1}°C ${alignr}${color1}Up: ${color green}$uptime
# Next line is for temperature with Kerenel 4.4
#${color1}All CPUs ${color green}${cpu}% ${goto 131}${color1}Temp: ${color green}${hwmon 0 temp 1}°C ${alignr}${color1}Up: ${color green}$uptime
${color green}$running_processes ${color1}running of ${color green}$processes ${color1}loaded processes.
${color1}Load Average 1-5-15 minutes: ${alignr}${color green}${execpi .001 (awk '{printf "%s/", $1}' /proc/loadavg; grep -c processor /proc/cpuinfo;) | bc -l | cut -c1-4} ${execpi .001 (awk '{printf "%s/", $2}' /proc/loadavg; grep -c processor /proc/cpuinfo;) | bc -l | cut -c1-4} ${execpi .001 (awk '{printf "%s/", $3}' /proc/loadavg; grep -c processor /proc/cpuinfo;) | bc -l | cut -c1-4}
#------------+
# Intel iGPU |
#------------+
${color orange}${hr 1}${if_match "intel" == "${execpi 99999 prime-select query}"}
${color2}${voffset 5}Intel® Skylake GT2 HD 530 iGPU @${alignr}${color green}${execpi .001 (cat /sys/class/drm/card1/gt_cur_freq_mhz)} MHz
${color}${goto 13}Min. Freq:${goto 120}${color green}${execpi .001 (cat /sys/class/drm/card1/gt_min_freq_mhz)} MHz${color}${goto 210}Max. Freq:${alignr}${color green}${execpi .001 (cat /sys/class/drm/card1/gt_max_freq_mhz)} MHz
${color orange}${hr 1}${else}
#------------+
# Nvidia GPU |
#------------+
${color2}${voffset 5}${execpi .001 (nvidia-smi --query-gpu=gpu_name --format=csv,noheader)} ${color1}@ ${color green}${execpi .001 (nvidia-smi --query-gpu=clocks.sm --format=csv,noheader)} ${alignr}${color1}Temp: ${color green}${execpi .001 (nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader)}°C
${color1}${voffset 5}Ver: ${color green}${execpi .001 (nvidia-smi --query-gpu=driver_version --format=csv,noheader)} ${color1} P-State: ${color green}${execpi .001 (nvidia-smi --query-gpu=pstate --format=csv,noheader)} ${alignr}${color1}BIOS: ${color green}${execpi .001 (nvidia-smi --query-gpu=vbios_version --format=csv,noheader)}
${color1}${voffset 5}GPU:${color green}${execpi .001 (nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader)} ${color1}Ram:${color green}${execpi .001 (nvidia-smi --query-gpu=utilization.memory --format=csv,noheader)} ${color1}Pwr:${color green}${execpi .001 (nvidia-smi --query-gpu=power.draw --format=csv,noheader)} ${alignr}${color1}Freq: ${color green}${execpi .001 (nvidia-smi --query-gpu=clocks.mem --format=csv,noheader)}
${color orange}${hr 1}${endif}
3
  • I couldn't load this config file into $HOME/.conkyrc. I think this might be outdated
    – morhook
    Sep 5, 2021 at 16:44
  • @morhook It may have to be updated for the latest version of conky but I'm not sure. Sep 5, 2021 at 16:52
  • I'm using Ubuntu 21.04 if it helps. Installed package conky-all version 1.11.6-2
    – morhook
    Sep 6, 2021 at 3:25
0

For anybody in the year 2024 an above. There are 2 excellent tools in Gnome, for this.

Vitals - https://extensions.gnome.org/extension/1460/vitals/

This one has an option to show the Video card Temperature and other factors as well. It is the one I use. Here is a screenshot:

Freon - https://extensions.gnome.org/extension/841/freon/

This is another one that also offers similar features.

enter image description here

enter image description here

For Console cases, you could use nvidia-smi for Nvidia cards for example like this

nvidia-smi --query-gpu=timestamp,name,pci.bus_id,driver_version,pstate,pcie.link.gen.max,pcie.link.gen.current,temperature.gpu,utilization.gpu,utilization.memory,memory.total,memory.free,memory.used,power.draw,clocks.sm,clocks.mem,clocks.gr --format=csv -l 1

Which would return a very thorough and detailed analysis of the Nvidia card

enter image description here

2024/02/25 09:45:57.835, NVIDIA GeForce RTX 4090, 00000000:01:00.0, 550.40.07, P5, 4, 2, 45, 19 %, 19 %, 24564 MiB, 23129 MiB, 1047 MiB, 27.32 W, 405 MHz, 810 MHz, 405 MHz
2024/02/25 09:45:58.839, NVIDIA GeForce RTX 4090, 00000000:01:00.0, 550.40.07, P5, 4, 2, 45, 21 %, 21 %, 24564 MiB, 23130 MiB, 1046 MiB, 27.88 W, 405 MHz, 810 MHz, 405 MHz
2024/02/25 09:45:59.842, NVIDIA GeForce RTX 4090, 00000000:01:00.0, 550.40.07, P0, 4, 4, 45, 95 %, 81 %, 24564 MiB, 23130 MiB, 1046 MiB, 32.90 W, 2580 MHz, 10501 MHz, 2580 MHz
2024/02/25 09:46:00.845, NVIDIA GeForce RTX 4090, 00000000:01:00.0, 550.40.07, P0, 4, 4, 45, 1 %, 2 %, 24564 MiB, 23142 MiB, 1034 MiB, 62.90 W, 2580 MHz, 10501 MHz, 2580 MHz
2024/02/25 09:46:01.847, NVIDIA GeForce RTX 4090, 00000000:01:00.0, 550.40.07, P3, 4, 4, 45, 2 %, 4 %, 24564 MiB, 23146 MiB, 1030 MiB, 57.20 W, 600 MHz, 5001 MHz, 600 MHz
2024/02/25 09:46:02.850, NVIDIA GeForce RTX 4090, 00000000:01:00.0, 550.40.07, P3, 4, 4, 44, 4 %, 4 %, 24564 MiB, 23196 MiB, 980 MiB, 37.72 W, 420 MHz, 5001 MHz, 420 MHz
2024/02/25 09:46:03.853, NVIDIA GeForce RTX 4090, 00000000:01:00.0, 550.40.07, P3, 4, 4, 44, 5 %, 4 %, 24564 MiB, 23196 MiB, 980 MiB, 37.15 W, 345 MHz, 5001 MHz, 345 MHz
2024/02/25 09:46:04.855, NVIDIA GeForce RTX 4090, 00000000:01:00.0, 550.40.07, P3, 4, 4, 44, 5 %, 4 %, 24564 MiB, 23196 MiB, 980 MiB, 36.64 W, 285 MHz, 5001 MHz, 285 MHz
2024/02/25 09:46:05.858, NVIDIA GeForce RTX 4090, 00000000:01:00.0, 550.40.07, P5, 4, 2, 44, 17 %, 18 %, 24564 MiB, 23196 MiB, 980 MiB, 34.01 W, 330 MHz, 810 MHz, 330 MHz
2024/02/25 09:46:06.861, NVIDIA GeForce RTX 4090, 00000000:01:00.0, 550.40.07, P5, 4, 2, 44, 20 %, 20 %, 24564 MiB, 23196 MiB, 980 MiB, 26.49 W, 390 MHz, 810 MHz, 390 MHz
2024/02/25 09:46:07.865, NVIDIA GeForce RTX 4090, 00000000:01:00.0, 550.40.07, P5, 4, 2, 43, 20 %, 20 %, 24564 MiB, 23196 MiB, 980 MiB, 26.79 W, 390 MHz, 810 MHz, 390 MHz
2024/02/25 09:46:08.870, NVIDIA GeForce RTX 4090, 00000000:01:00.0, 550.40.07, P8, 4, 1, 43, 32 %, 32 %, 24564 MiB, 23196 MiB, 980 MiB, 26.56 W, 540 MHz, 405 MHz, 540 MHz
2024/02/25 09:46:09.876, NVIDIA GeForce RTX 4090, 00000000:01:00.0, 550.40.07, P5, 4, 2, 43, 19 %, 20 %, 24564 MiB, 23196 MiB, 980 MiB, 26.64 W, 705 MHz, 810 MHz, 705 MHz

For KDE, I need to wait for Plasma 6 to test which ones will work properly at the UI level.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .