You are not logged in.

#1 2017-08-23 15:28:43

IrvineHimself
Member
From: Scotland
Registered: 2016-08-21
Posts: 275

[Solved] Conky not recognising Nvidia gpu

I have installed the conky-nvidia package from the AUR, but when I try to run any of the commands, (with or without running GlxGears,) I get the following error

[stupidme@mine ~]$ conky -c ~/.config/conky/conky-networks.conf
conky: desktop window (1400003) is subwindow of root window (eb)
conky: window type - override
conky: drawing to created window (0x5c00001)
conky: drawing to double buffer
conky: check_nvidia_target_count:
          Trying to query Nvidia target failed (using the propietary drivers).
          Are you sure they are installed correctly and a Nvidia GPU is in use?
          (display: -458792304, target_id: 1, target_count: -1, attribute_id: 3)
[stupidme@mine ~]$ 

Running "nvidia-smi -q" I get the following difference file for GlxGears being on and off

*** /home/stupidme/Work/ConkyConfig/nvidia-smi-q-glxgears-off	2017-08-23 15:21:44.265880995 +0100
--- /home/stupidme/Work/ConkyConfig/nvidia-smi-q-glxgears-on	2017-08-23 15:22:07.579934115 +0100
***************
*** 1,6 ****
  ==============NVSMI LOG==============
  
! Timestamp                           : Wed Aug 23 15:02:52 2017
  Driver Version                      : 384.59
  
  Attached GPUs                       : 1
--- 1,6 ----
  ==============NVSMI LOG==============
  
! Timestamp                           : Wed Aug 23 15:01:27 2017
  Driver Version                      : 384.59
  
  Attached GPUs                       : 1
***************
*** 50,76 ****
              Type                    : N/A
              Firmware                : N/A
          Replays since reset         : 0
!         Tx Throughput               : 0 KB/s
!         Rx Throughput               : 0 KB/s
      Fan Speed                       : N/A
      Performance State               : P0
      Clocks Throttle Reasons
          Idle                        : Not Active
!         Applications Clocks Setting : Active
          SW Power Cap                : Not Active
          HW Slowdown                 : Not Active
          Sync Boost                  : Not Active
      FB Memory Usage
          Total                       : 2002 MiB
!         Used                        : 0 MiB
!         Free                        : 2002 MiB
      BAR1 Memory Usage
          Total                       : 256 MiB
          Used                        : 1 MiB
          Free                        : 255 MiB
      Compute Mode                    : Default
      Utilization
!         Gpu                         : 0 %
          Memory                      : 0 %
          Encoder                     : N/A
          Decoder                     : N/A
--- 50,76 ----
              Type                    : N/A
              Firmware                : N/A
          Replays since reset         : 0
!         Tx Throughput               : 1481000 KB/s
!         Rx Throughput               : 32000 KB/s
      Fan Speed                       : N/A
      Performance State               : P0
      Clocks Throttle Reasons
          Idle                        : Not Active
!         Applications Clocks Setting : Not Active
          SW Power Cap                : Not Active
          HW Slowdown                 : Not Active
          Sync Boost                  : Not Active
      FB Memory Usage
          Total                       : 2002 MiB
!         Used                        : 9 MiB
!         Free                        : 1993 MiB
      BAR1 Memory Usage
          Total                       : 256 MiB
          Used                        : 1 MiB
          Free                        : 255 MiB
      Compute Mode                    : Default
      Utilization
!         Gpu                         : 84 %
          Memory                      : 0 %
          Encoder                     : N/A
          Decoder                     : N/A
***************
*** 125,131 ****
          Double Bit ECC              : N/A
          Pending                     : N/A
      Temperature
!         GPU Current Temp            : 49 C
          GPU Shutdown Temp           : 99 C
          GPU Slowdown Temp           : 94 C
          Memory Temp                 : N/A
--- 125,131 ----
          Double Bit ECC              : N/A
          Pending                     : N/A
      Temperature
!         GPU Current Temp            : 51 C
          GPU Shutdown Temp           : 99 C
          GPU Slowdown Temp           : 94 C
          Memory Temp                 : N/A
***************
*** 138,147 ****
          Min Power Limit             : N/A
          Max Power Limit             : N/A
      Clocks
!         Graphics                    : 928 MHz
!         SM                          : 928 MHz
          Memory                      : 900 MHz
!         Video                       : 909 MHz
      Applications Clocks
          Graphics                    : 928 MHz
          Memory                      : 900 MHz
--- 138,147 ----
          Min Power Limit             : N/A
          Max Power Limit             : N/A
      Clocks
!         Graphics                    : 941 MHz
!         SM                          : 941 MHz
          Memory                      : 900 MHz
!         Video                       : 922 MHz
      Applications Clocks
          Graphics                    : 928 MHz
          Memory                      : 900 MHz
***************
*** 158,161 ****
      Clock Policy
          Auto Boost                  : N/A
          Auto Boost Default          : N/A
!     Processes                       : None
--- 158,169 ----
      Clock Policy
          Auto Boost                  : N/A
          Auto Boost Default          : N/A
!     Processes
!         Process ID                  : 1409
!             Type                    : G
!             Name                    : /usr/lib/xorg-server/Xorg
!             Used GPU Memory         : 6 MiB
!         Process ID                  : 1414
!             Type                    : G
!             Name                    : glxgears
!             Used GPU Memory         : 2 MiB

And my "conky.config" file is

conky.config = {
    alignment = 'top_left',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2,
	default_color = 'white',
    default_outline_color = 'white',
    default_shade_color = 'white',
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    use_xft = true,
    font = 'DejaVu Sans Mono:size=12',
    gap_x = 5,
    gap_y = 60,
    minimum_height = 5,
	minimum_width = 5,
    net_avg_samples = 2,
    double_buffer = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'override',
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false
}

conky.text = [[
${font LCDMono:size=16}${color #33FF00}Networking ${font}
${if_up wlp2s0}\
${font LCDMono:bold:size=16}${color #3333FF}Wifi ${font} ${goto 105}${color #09F0E2} ${wireless_link_bar 10,60 wlp2s0}$color ${goto 190}${wireless_link_qual_perc wlp2s0}%
${color grey}wlp2s0 : ${color}${addr wlp2s0}
${color grey}channel: ${color}${wireless_channel wlp2s0} ${goto 295} ${color grey}freq: ${color}${wireless_freq wlp2s0}
${color grey}Up speed:$color ${upspeed wlp2s0} ${color grey} ${goto 295} Down speed:$color ${downspeed wlp2s0}
${color}${upspeedgraph wlp2s0 32,290 00ffff 00ff00 -t -l} \
${color}${downspeedgraph wlp2s0 32,290 00ffff 00ff00 -t -l} \
${endif}\
${if_up tun0}
${font LCDMono:bold:size=16}${color #3333FF}Vpn ${font}
${color grey}Up speed:$color ${upspeed tun0} ${color grey} ${goto 295} Down speed:$color ${downspeed tun0}
${color}${upspeedgraph tun0 32,290 00ffff 00ff00 -t -l} \
${color}${downspeedgraph tun0 32,290 00ffff 00ff00 -t -l}\
${endif}
${font LCDMono:bold:size=16}${color #3333FF}Statistics${font}
${font DejaVu Sans Mono:bold:size=12}${color}Wifi    ${execi 60000 vnstat -w  | grep "rx" | cut -c -55 | cut -c 17-}${font}
${color grey}Today : ${execi 300 vnstat -d -i wlp2s0 | grep "`date +%d/%m/%y`" | cut -c -57 | cut -c 16-}
${color grey}Week  : ${execi 300 vnstat -w -i wlp2s0 | grep "current week" | cut -c -58 | cut -c 17-}
${color grey}Month : ${execi 300 vnstat -m -i wlp2s0 | grep "`date +%b`" | cut -c -55 | cut -c 15-}
$hr
${font DejaVu Sans Mono:bold:size=12}${color}Vpn     ${execi 60000 vnstat -w  | grep "rx" | cut -c -55 | cut -c 17-}${font}
${color grey}Today : ${execi 300 vnstat -d -i tun0 | grep "`date +%d/%m/%y`" | cut -c -57 | cut -c 16-}
${color grey}Week  : ${execi 300 vnstat -w -i tun0 | grep "current week" | cut -c -58 | cut -c 17-}
${color grey}Month : ${execi 300 vnstat -m -i tun0 | grep "`date +%b`" | cut -c -55 | cut -c 15-}

${font LCDMono:size=16}${color #33FF00}Nvidia ${font}
${color grey}Nvidia test Gpu Freq: ${color}${nvidia gpufreq}
]]

I tried setting "nvidia true" and "nvidia = true", flag as suggested  here, but conky reported it as "conky: Unknown setting 'nvidia'"

Additionally, I have confirmed that the "libxnvctrl" is installed.

Does anyone any idea about what is up, or, noting I only really use the Nvidia Gpu when rendering Blender animations, would I be better off just using something like "{execi 300 some-suitable-shell}" to parse the output from "nvidia-smi -q"?

I look forward to hearing your thoughts
Irvine

Last edited by IrvineHimself (2017-08-24 03:54:30)


Et voilà, elle arrive. La pièce, le sous, peut-être qu'il arrive avec vous!

Offline

#2 2017-08-24 03:52:31

IrvineHimself
Member
From: Scotland
Registered: 2016-08-21
Posts: 275

Re: [Solved] Conky not recognising Nvidia gpu

After sleeping on it and doing some further research, I am going to mark this as solved. I strongly recommend anyone trying to monitor Nvidia GPUs to have a look at this developer documentation on the nvidia-smi API. It is surprisingly easy to read, and very informative.

For reference, my chosen solution is as follows:

Firstly, uninstall conky-nvidia and just use the official package!

The nvidia-smi API, comes with a powerful process monitor, “nvidia-smi pmon”. See “nvidia-smi pmon -h” for full details, but “nvidia-smi pmon -c 1” calls the process monitor once. So it follows that “${execi 10 nvidia-smi pmon -c 1}” creates a nicely formatted Nvidia monitor for conky, which, in my example, is updated every 10 seconds.

The other main point of interest is of course the GPU temperature: Once again referring to the API doc, the “-q, --query option actually has additionally flags accessed using -d, making the temperature, (and many other parameters,) readily available.

Using a simple filter “${execi 10 nvidia-smi -q -d TEMPERATURE | grep "GPU" | grep "Temp"}” gives a fairly clean output inside conky. I actually passed it through a shell to get all the temperatures on one line, but that is a matter of personally choice.

One should note that not all of the API features are implemented in every Nvidia GPU, but since my own GPU is a fairly basic “GeForce 930M” for which this easily implemented solution works….

To anyone with a similar problem, good luck
Irvine

Last edited by IrvineHimself (2017-08-24 03:53:38)


Et voilà, elle arrive. La pièce, le sous, peut-être qu'il arrive avec vous!

Offline

Board footer

Powered by FluxBB