Conky question about GPU dispalys

Okay I’m confused, I have conky setup how I want it for the most part. But on my GPU section I have the exact same code for GPU 0 & GPU 1 and they appear differently.


and

As you can see GPU 1 doesn’t display like GPU 0. There isn’t any change in the GPU usage section in GPU 1 it shows 0 all the time and never changes. It also doesn’t display the graphs the same, GPU 0 has a Bit size (?) or whatever that number preceding the “B” in the graph for GPU 0.

Here’s the code I have currently:

${color green} GPU:${nvidia modelname} ${nvidia driverversion} 
${color orange}GPU0 Usage:       Temp:              Performance:
${nvidia gpuutil 0}                   ${nvidia gputemp}                      ${nvidia perflevelcur}
${nvidiagraph gpuutil 0 }
${color orchid}GPU1 Usage:        Temp:              Performance:
${nvidia gpuutil 1}                   ${nvidia gputemp}                       ${nvidia perflevelcur}
${nvidiagraph gpuutil 1 }

As per the Conky man page it states the format for the nvidiagraph function should be:

nvidiagraph argument (height),(width) (gradient color 1) (gradient color 2) (scale) (-t) (-l) (-x) (-y) (-m) GPU_ID
``` the parenthesis are optional with out them are required. The arguments are (it's a long list):

gputemp temp GPU temperature
gputempthresh- threshold Temperature threshold where the GPU will re-
old duce its clock speed
ambienttemp ambient Ambient temperature outside the graphics card
gpufreqcur gpufreq Current GPU clock speed
gpufreqmin Minimum GPU clock speed
gpufreqmax Maximum GPU clock speed
memfreqcur memfreq Current memory clock speed
memfreqmin Minimum memory clock speed
memfreqmax Maximum memory clock speed
mtrfreqcur mtrfreq Current memory transfer rate clock speed
mtrfreqmin Minimum memory transfer rate clock speed
mtrfreqmax Maximum memory transfer rate clock speed
perflevelcur perflevel Current performance level
perflevelmin Lowest performance level
perflevelmax Highest performance level
perfmode Performance mode
gpuutil GPU utilization %
membwutil Memory bandwidth utilization %
videoutil Video engine utilization %
pcieutil PCIe bandwidth utilization %
memused mem Amount of used memory
memfree memavail Amount of free memory
memmax memtotal Total amount of memory
memutil memperc Memory utilization %
fanspeed Fan speed
fanlevel Fan level %
imagequality Image quality
modelname Model name of the GPU card
driverversion Driver version

I've got the correct arguments or else GPU0 wouldn't display anything correctly just like GPU1. 
I'm open to suggestions.
1 Like

Looks like the issue isn’t your syntax but how Conky’s NVIDIA module is handling GPU 1. If the card’s idle, Conky will often just show 0 and won’t render the graph properly.

Try forcing the GPU ID at the end of the graph line:

${nvidiagraph gpuutil 0 40,200 00ff00 ff0000 100 -l -t 0}
${nvidiagraph gpuutil 1 40,200 00ff00 ff0000 100 -l -t 1}

If nvidia-smi also shows 0, the card really isn’t doing anything. If it does show activity, this tweak may fix the display mismatch.

Well it kinda works better? Conky looks like this now:


the number&“B” no longer shows in GPU0’s graph (orange)
The graph is moving but shows 0s for GPU 1’s usage & performance.
NVIDIA-SMI shows this:

So it’s sort of working better?
I changed the code to this:

${nvidiagraph gpuutil 0 40,200 8e59faef-cee9-258c-a5e4-0b525715b9d2 -l -t}
${nvidiagraph gpuutil 1 40,200 bfce9776-2218-66a3-2ae1-85b5e52077eb -l -t}

I guess I’ll just have to live with it for now. The graph shows GPU 1 is working and you would think that 0 changes with the graph, but apparently not.

I also ran nvidia-smi -q (with the query option) I’d post it but that’s a very long output.

1 Like

Hey @tmick,
thank you for your message.
unfortunately, I do not know any further here either.
Your code shows me nothing.

nvidia strikes again :sweat_smile:

2 Likes

doggone Nvidia. They couldn’t make a simple thing simple could they :face_with_symbols_on_mouth:

2 Likes

For anyone that cares, I finally figured out Conky is reading the bridge not the actual GPU’s. I wound up taking the code out for GPU1 altogether and the code for the utilization, temp, and performance for GPU0 as well, so now it just has the graph that monitors GPU0.
It now looks like
this:


and the code looks like this:

– Configuration settings: Conky – Config settings

conky.config = {
    alignment = 'bottom_right',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'purple',
    default_outline_color = 'green',
    default_shade_color = 'white',
    double_buffer = true,
    draw_borders = true,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    extra_newline = true,
    font = 'DejaVu Sans Mono:size=12',
    gap_x = 20,
    gap_y = 20,
    minimum_height = 600,
    minimum_width = 100,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_ncurses = false,
    out_to_stderr = false,
    out_to_wayland = false,
    out_to_x = true,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'normal',
    own_window_hints = 'undecorated,sticky,below,skip_taskbar,skip_pager',
    show_graph_range = true,
    show_graph_scale = true,
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    use_xft = true,
       }

– Variables: Conky – Variables

conky.text = [[
${color grey}Info:${color yellow} ${scroll 32 Conky $conky_version - $sysname $nodename $kernel $machine}
$hr
${color green}Uptime:${color yellow} $uptime
${color turquoise}Frequency (in MHz):$color $freq
${color red}Frequency (in GHz):$color $freq_g
${color pink}RAM Usage:${color pink} $mem/$memmax - $memperc% ${membar 4}
${color orange}Swap Usage:${color orange} $swap/$swapmax - $swapperc% ${swapbar 4}
${color maroon}CPU Usage:${color maroon} $cpu% ${cpubar 4}
${color green} GPU:${nvidia modelname} ${nvidia driverversion} 
${color orange}${nvidiagraph gpuutil 40,C8 -t -l -m GPU-8e59faef-cee9-258c-a5e4-0b525715b9d2 }
${color cyan}Processes:${color cyan} $processes ${color cyan}Running:${color cyan} $running_processes
$hr
${color red}File systems:
 $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
${color gold}Networking:
${color 00fc00}Upload:${color 00fc00}${upspeedf enp0s31f6} GiB/s - ${color af002a}Download ${color af002a}${alignr}${downspeedf enp0s31f6} GiB/s
${color af002a}${downspeedgraph enp0s31f6 28,C8 00ff00 ffff00 -m}
${color 00fc00}${upspeedgraph enp0s31f6 28,C8 00ff00 ffff00 -m}
$hr
${color grey}Name              PID     CPU%   MEM%
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
]]

It’s simple but shows mostly what I wanted.

2 Likes

Looks great @tmick Thanks for sharing this!

1 Like

Excuse me, but I’m not really a fan of UI meters.

In my opinion, they tend to overbloat the system — sometimes even adding up to ~1 second to simple requests and keeping the CPU busy doing almost nothing useful.
Those CPU cycles could be used for more important tasks instead of being wasted on constantly updating fancy stats on the screen.

I get that Conky is lightweight compared to some tools, but still, I prefer to keep my setup as lean as possible.

What are you thoughts?

2 Likes

Hi Ricky,
I understand your point of view but in this case I took out the variables that displayed the utilization, temperature and performance because I had no faith in their accuracy. So the graph is the only way left for me to see the output of the GPUs. The “bars” (as Conky calls them) for networking was just extra ‘Bling’ that I thought looked cool so I kept it. :grin:

1 Like

I missed your article when you first wrote it, but I like what you’ve been doing with conky. I don’t have any configurations where I’m looking at different GPU devices, but I look at mostly wireless network, disk, and RAM, and display the date and time at the top of my usual Conky display.

2 Likes

Do you have any ideas on how to get the GPU’s Utilization & Performance to display correctly?

Hi Ricky,
I’ve changed my set up, What do you think of this:

Here’s the code:

-- Conky, a system monitor https://github.com/brndnmtthws/conky

--
-- This configuration file is Lua code. You can write code in here, and it will
-- execute when Conky loads. You can use it to generate your own advanced
-- configurations.
--
-- Try this (remove the `--`):
--
--  print("Loading Conky config")
--
-- For more on Lua, see:
-- https://www.lua.org/pil/contents.html
--
-- Conky Lua API: https://conky.cc/lua

-- Configuration settings: https://conky.cc/config_settings
-- The Conky Window set up
conky.config = {
    alignment = 'bottom_right',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'purple',
    default_outline_color = 'green',
    default_shade_color = 'white',
    double_buffer = true,
    draw_borders = true,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    extra_newline = true,
    font = 'DejaVu Sans Mono:size=12',
    gap_x = 20,
    gap_y = 20,
    minimum_height = 999,
    minimum_width = 500,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_ncurses = false,
    out_to_stderr = false,
    out_to_wayland = false,
    out_to_x = true,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'normal',
    own_window_hints = 'undecorated,sticky,below,skip_taskbar,skip_pager',
    show_graph_range = true,
    show_graph_scale = true,
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    use_xft = true,
       }

-- Variables: https://conky.cc/variables
-- The body of Conky
conky.text = [[
${color grey}Info:${color yellow} ${scroll 32 Conky $conky_version - $sysname $nodename $kernel $machine}
${color purple}$hr
${color green}Uptime:${color yellow} $uptime 

${color red}Frequency (in GHz):$color $freq_g

${color pink}RAM Usage:${color pink} $mem/$memmax - $memperc% ${membar 4}

${color orange}Swap Usage:${color orange} $swap/$swapmax - $swapperc% ${swapbar 4}

${color maroon}CPU0 Usage:${color maroon} $cpu% 
${color maroon}CPU1 Usage:${color maroon} $cpu% 
${color maroon}CPU2 Usage:${color maroon} $cpu% 
${color maroon}CPU3 Usage:${color maroon} $cpu% 
${color maroon}CPU4 Usage:${color maroon} $cpu% 
${color maroon}CPU5 Usage:${color maroon} $cpu% 
${color maroon}CPU6 Usage:${color maroon} $cpu% 
${color maroon}CPU7 Usage:${color maroon} $cpu% 

${color green} GPUs:2 ${nvidia modelname} ${nvidia driverversion} 
${color orange}${nvidiagraph gpuutil 40,C8 -t -l -m GPU-8e59faef-cee9-258c-a5e4-0b525715b9d2 }

${color cyan}Processes:${color cyan} $processes ${color cyan}Running:${color cyan} $running_processes
${color purple}$hr
${color red}File systems:
${color red}${fs_used /}/${fs_size /} ${fs_bar 6 /}

${color gold}Networking: Up:${upspeed enp0s31f6} bytes Down: ${downspeed enp0s31f6} bytes

${color green}Virtual Networks:
${color gold}VIRBR0 Up:${upspeed virbr0} Down:${downspeed virbr0} (main virtual network)
${color yellow}VM's Networks 
${color yellow}VNET0 Up:${upspeed vnet0} Down: ${downspeed vnet0} 
${color yellow}VNET1 Up:${upspeed vnet1} Down: ${downspeed vnet1}
${color yellow}VNET2 Up:${upspeed vnet2} Down: ${downspeed vnet2} 
${color yellow}VNET3 Up:${upspeed vnet3} Down: ${downspeed vnet3} 
${color yellow}VNET4 Up:${upspeed vnet4} Down: ${downspeed vnet4} 
${color yellow}VNET5 Up:${upspeed vnet5} Down: ${downspeed vnet5} 
${color purple}$hr
${color grey}Name              PID     CPU%   MEM%
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
]]

Cool beans! I have two different Conky setups on a couple of my systems. The antiX and MX Linux distributions have a few nice ones. MX uses the modern Conky; antiX uses the older classic Conky.

1 Like

Cool beans!

LOL, nice to know someone else says that, :partying_face: just add Daddy-O and you’ve got my saying. You should post screenshots to show off a little :wink:

I’m not as cool as your beans, @tmick :face_with_medical_mask:

1 Like

Here is a standard antiX Linux Conky with time, disk, CPU, and network details:

# Standard antiX .conkyrc file
# For conky editing help and commands visit = Casey's Conky Reference with Examples {http://www.ifxgroup.net/conky.htm}

# set to yes if you want Conky to be forked in the background
background yes

short_units yes

cpu_avg_samples 1
net_avg_samples 1

out_to_console no

# X font when Xft is disabled, you can pick one with program xfontsel
#font 7x12
#font 6x10
#font 7x13
font 8x12
#font 7x12

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
#xftfont gentium:size=12
#xftfont DejaVu Sans:size=10
xftfont DejaVu Sans:bold:size=9
#xftfont DejaVu Sans:size=9

# Create own window instead of using desktop (required in nautilus, pcmanfm and rox desktops)
own_window yes
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar
own_window_type normal

# Text alpha when using Xft
xftalpha 1.0

#on_bottom no

# Update interval in seconds
update_interval 1

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
minimum_size 55
maximum_width 180

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
#border_margin 10

# border width
border_width 2

# Default colors and also border colors
default_color white
default_shade_color white
default_outline_color white

#color ffffff
color4 yellow
color8 77ccff
color9 5599cc

# Text alignment, other possible values are commented
# alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text

gap_x 20
gap_y 40

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer right

# Subtract file system buffers from used memory?
no_buffers yes

# if_up_strictness link:  up | link | address
if_up_strictness address

# set to yes if you want all text to be in uppercase
uppercase no

TEXT
${alignc}antiX
${alignc}${color8}${font DejaVu Sans:size=12}${time %r} ${font} ${color}
${alignc}${time %a %d %b}
${alignc}Uptime: $uptime
${alignc}${exec disp=${DISPLAY#:}; disp=${disp%.[0-9]}; cat $HOME/.desktop-session/desktop-code.$disp 2>/dev/null}
res:${alignr}${execi 60 xdpyinfo | sed -n -r "s/^\s*dimensions:.*\s([0-9]+x[0-9]+).*/\1/p"}
dpi:${alignr}${execi 60 sed -nr "s/^\s*Xft.dpi:\s*([0-9]+(x[0-9]+)?).*/\1/p" $HOME/.Xresources | grep "[0-9]" || echo 96}
Automount: ${alignr}${execi 60 grep -q "^automount=TRUE" $HOME/.desktop-session/automount.conf 2>/dev/null && echo "enabled" || echo "disabled"}
CPU:${alignr}${cpu}%
Freq:${alignr}${freq}
${color}Init:${alignr}${execi 60 detect-init.sh}
${alignr}${cpugraph cpu0 30,170 5599cc 5599cc}
Disk:${alignr}${diskio}
${alignr}${diskiograph 30,170 5599cc 5599cc}${if_up eth0}
eth0 up: $alignr ${upspeed eth0}
${alignr}${upspeedgraph   eth0 30,170 5599cc 5599cc}
eth0 down: $alignr ${downspeed eth0}
${alignr}${downspeedgraph eth0 30,170  5599cc 5599cc}${endif}${if_up eth1}
eth1 up: $alignr ${upspeed eth1}
${alignr}${upspeedgraph   eth1 30,170 5599cc 5599cc}
eth1 down: $alignr ${downspeed eth1}
${alignr}${downspeedgraph eth1 30,170  5599cc 5599cc}${endif}${if_up wlan0}
wlan0 up: $alignr ${upspeed wlan0}
${alignr}${upspeedgraph   wlan0 30,170 5599cc 5599cc}
wlan0 down: $alignr ${downspeed wlan0}
${alignr}${downspeedgraph wlan0 30,170 5599cc 5599cc}${endif}${if_up wlan1}
wlan1 up: $alignr ${upspeed wlan1}
${alignr} ${upspeedgraph   wlan1 30,170 5599cc 5599cc}
wlan1 down: $alignr ${downspeed wlan1}
${alignr}${downspeedgraph wlan1 30,170 5599cc 5599cc}${endif}
${alignr}${color8}Used / Total ${color}
RAM:${alignr}$mem / $memmax
Swap:${alignr}$swap / $swapmax
/ Disk:${alignr}${fs_used /} / ${fs_size /}
${alignc}${execi 1000 persist-enabled}
#Battery: ${battery_percent BAT0}% ${alignr}${color8}${battery_bar 8,70 BAT0} # You may need to change BAT0 to BAT1 or add the same line again if you have more then one battery. 
#${execi 1000 acpi 2>/dev/null | grep -q . && echo "Battery: "}${execi 10 acpi -b 2>/dev/null | cut -d" " -f3,4 | sed 's/,$//'}
2 Likes

I am sorry guys I’m not super fan of real time system monitoring and I am not using any of them on my main system, so I’m not experienced on configuring and testing.

Ah yes, I remember back in 2017 - 2018 I was using AIDA64 monitor on Windows 10, I had alot of fun using it lol

Nowdays I prefer more sober desktop.

2 Likes

From the Conky team:

Conky currently uses XNVCtl, which is somewhat dated and no longer maintained in favor of NVML. Nvidia-smi is essentially a cli frontend for NVML. This is likely the cause for incorrectly reported values which don’t match nvidia-smi.
Replacing XNVCtl with NVML is a bit tricky because the headers are provided in different packages in different distros, so just ensuring the headers and library path are consistent for builds is difficult. Using the library is probably not much more difficult though. The issue is stuck because it just takes a week of time to get it to build and I wasn’t too enthusiastic about doing that ig.

So they finally answered, it’s apparently a PIA to update that so I let him know I’m willing to test if he ever gets “enthusiastic” about doing that.

1 Like