Hi,
I get errors when loading conky v1.10.9_pre :
$ conky -d
conky: desktop window (1000003) is subwindow of root window (1e5)
conky: window type - desktop
conky: drawing to created window (0x4000001)
conky: unknown variable '$nvidia'
conky: unknown variable '$nvidiagraph'
conky: unknown variable '$nvidia'
conky: unknown variable '$nvidia'
conky: unknown variable '$nvidia'
conky: unknown variable '$nvidia'
conky: unknown variable '$nvidia'
Here is my conky.conf
Mostly likely related to #520. It does not work with 1.10.9_pre right now. It's off by default too.
You can downgrade to 1.10.8 and compile with BUILD_NVIDIA=ON.
$ git checkout v1.10.8
# --- same instruction ---
cmake -DBUILD_NVIDIA=ON ../
# --- same instruction ---
EDIT: Maybe not... Try it and see.
@lasers Here is what I get :
$ git checkout v1.10.8
Note: checking out 'v1.10.8'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 29a1688d Support multiple include paths for libbircclient (#462)
$ cmake -DBUILD_NVIDIA=ON ../
CMake Error: The source directory "/home/xxxyyyz/src" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
$ echo $?
1
cd ~/conky;
mkdir -p build;
cd build;
cmake -DBUILD_NVIDIA=ON ../
make -j4
@su8 Sorry, I had forgotten to cd build, now here is what I get :
$ cmake -DBUILD_NVIDIA=ON ../
CMake Warning (dev) at cmake/Conky.cmake:130 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_64473/fast"
/usr/bin/make -f CMakeFiles/cmTC_64473.dir/build.make CMakeFiles/cmTC_64473.dir/build
make[1]: Entering directory '/home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_64473.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTC_64473.dir/CheckSymbolExists.c.o -c /home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_64473
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_64473.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_64473.dir/CheckSymbolExists.c.o -o cmTC_64473
CMakeFiles/cmTC_64473.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_64473.dir/build.make:97: recipe for target 'cmTC_64473' failed
make[1]: *** [cmTC_64473] Error 1
make[1]: Leaving directory '/home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_64473/fast' failed
make: *** [cmTC_64473/fast] Error 2
File /home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
/home/mansfeld/src/conky/build/CMakeFiles/CMakeError.log
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_64473/fast"
/usr/bin/make -f CMakeFiles/cmTC_64473.dir/build.make CMakeFiles/cmTC_64473.dir/build
make[1]: Entering directory '/home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_64473.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTC_64473.dir/CheckSymbolExists.c.o -c /home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_64473
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_64473.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_64473.dir/CheckSymbolExists.c.o -o cmTC_64473
CMakeFiles/cmTC_64473.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_64473.dir/build.make:97: recipe for target 'cmTC_64473' failed
make[1]: *** [cmTC_64473] Error 1
make[1]: Leaving directory '/home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_64473/fast' failed
make: *** [cmTC_64473/fast] Error 2
File /home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
:...skipping...
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_64473/fast"
/usr/bin/make -f CMakeFiles/cmTC_64473.dir/build.make CMakeFiles/cmTC_64473.dir/build
make[1]: Entering directory '/home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_64473.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTC_64473.dir/CheckSymbolExists.c.o -c /home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_64473
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_64473.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_64473.dir/CheckSymbolExists.c.o -o cmTC_64473
CMakeFiles/cmTC_64473.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_64473.dir/build.make:97: recipe for target 'cmTC_64473' failed
make[1]: *** [cmTC_64473] Error 1
make[1]: Leaving directory '/home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_64473/fast' failed
make: *** [cmTC_64473/fast] Error 2
File /home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
:
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_64473/fast"
/usr/bin/make -f CMakeFiles/cmTC_64473.dir/build.make CMakeFiles/cmTC_64473.dir/build
make[1]: Entering directory '/home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_64473.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTC_64473.dir/CheckSymbolExists.c.o -c /home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_64473
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_64473.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_64473.dir/CheckSymbolExists.c.o -o cmTC_64473
CMakeFiles/cmTC_64473.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_64473.dir/build.make:97: recipe for target 'cmTC_64473' failed
make[1]: *** [cmTC_64473] Error 1
make[1]: Leaving directory '/home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_64473/fast' failed
make: *** [cmTC_64473/fast] Error 2
File /home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_58c98/fast"
/usr/bin/make -f CMakeFiles/cmTC_58c98.dir/build.make CMakeFiles/cmTC_58c98.dir/build
make[1]: Entering directory '/home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_58c98.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_58c98.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.9/Modules/CheckFunctionExists.c
Linking C executable cmTC_58c98
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_58c98.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_58c98.dir/CheckFunctionExists.c.o -o cmTC_58c98 -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_58c98.dir/build.make:97: recipe for target 'cmTC_58c98' failed
make[1]: *** [cmTC_58c98] Error 1
make[1]: Leaving directory '/home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_58c98/fast' failed
make: *** [cmTC_58c98/fast] Error 2
Determining if the pipe2 exist failed with the following output:
Change Dir: /home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_a5283/fast"
/usr/bin/make -f CMakeFiles/cmTC_a5283.dir/build.make CMakeFiles/cmTC_a5283.dir/build
make[1]: Entering directory '/home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a5283.dir/CheckSymbolExists.c.o
/usr/bin/cc -D_LARGEFILE64_SOURCE -D_POSIX_C_SOURCE=200809L -std=c99 -o CMakeFiles/cmTC_a5283.dir/CheckSymbolExists.c.o -c /home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function 'main':
/home/mansfeld/src/conky/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: 'pipe2' unde Quoted variables like "CLOCK_GETTIME_LIB" will no longer be dereferenced
when the policy is set to NEW. Since the policy is not set the OLD
behavior will be used.
Call Stack (most recent call first):
cmake/ConkyPlatformChecks.cmake:43 (AC_SEARCH_LIBS)
CMakeLists.txt:37 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at cmake/ConkyPlatformChecks.cmake:369 (message):
Unable to find XNVCtrl library
Call Stack (most recent call first):
CMakeLists.txt:37 (include)
-- Configuring incomplete, errors occurred!
See also "/home/mansfeld/src/conky/build/CMakeFiles/CMakeOutput.log".
See also "/home/mansfeld/src/conky/build/CMakeFiles/CMakeError.log".
$ echo $?
1
@su8 I have my doubts about nvidia working in 1.10.8 in first place. I never knew if it did, but I think what happened is that somebody made a patch to deal with this. See https://aur.archlinux.org/packages/conky-nvidia/. They expressed issues too. Maybe it's too old now to bisect where it last worked.
I compiled okay in 1.10.8, but segfaults.
#0 0x00007ffff701054d in XQueryExtension () from /usr/lib/libX11.so.6
No symbol table info available.
#1 0x00007ffff70040e2 in XInitExtension () from /usr/lib/libX11.so.6
No symbol table info available.
#2 0x00007ffff6dd318f in XextAddDisplay () from /usr/lib/libXext.so.6
No symbol table info available.
#3 0x00007ffff5fd4b0c in XNVCTRLQueryTargetCount () from /usr/lib/libXNVCtrl.so.0
No symbol table info available.
#4 0x00005555555d78e4 in get_nvidia_target_count (tid=TARGET_GPU, dpy=0x0)
at /home/chris/src/conky/src/nvidia.cc:677
num_tgts = 1
num_tgts = <optimized out>
__func__ = "get_nvidia_target_count"
#5 print_nvidia_value(text_object*, char*, int) () at /home/chris/src/conky/src/nvidia.cc:895
nvs = 0x5555558513b0
value = <optimized out>
temp1 = <optimized out>
temp2 = <optimized out>
str = 0x1 <error: Cannot access memory at address 0x1>
dpy = 0x0
num_GPU = 0
#6 0x000055555558bc03 in generate_text_internal (p=0x5555558513f8 "", p@entry=0x5555558513f0 "NVIDIA: ",
p_max_size=16376, root=...) at /home/chris/src/conky/src/conky.cc:872
obj = 0x555555851320
a = <optimized out>
#7 0x000055555558e5fd in generate_text () at /usr/include/c++/8.1.1/bits/unique_ptr.h:342
i = <optimized out>
k = <optimized out>
mw = <optimized out>
tbs = <optimized out>
ui = <optimized out>
p = 0x5555558513f0 "NVIDIA: "
j = <optimized out>
time = <optimized out>
p = <optimized out>
i = <optimized out>
j = <optimized out>
k = <optimized out>
mw = <optimized out>
tbs = <optimized out>
ui = <optimized out>
time = <optimized out>
tmp_p = <optimized out>
#8 update_text () at /home/chris/src/conky/src/conky.cc:2044
No locals.
#9 0x000055555559038b in main_loop () at /home/chris/src/conky/src/conky.cc:2453
terminate = 0
t = <optimized out>
inotify_config_wd = -1
inotify_buff = '\000' <repeats 224 times>...
#10 0x000055555558345f in main () at /home/chris/src/conky/src/conky.cc:3211
No locals.
#11 0x00007ffff521f06b in __libc_start_main () from /usr/lib/libc.so.6
No symbol table info available.
#12 0x0000555555586d0a in _start () at /home/chris/src/conky/src/conky.cc:3263
No symbol table info available.
@sebma Unable to find XNVCtrl library. You need to install this. NVIDIA NV-Control X extension.
EDIT: On Ubuntu, it's libxnvctrl-dev and/or libxnvctrl0.
@lasers On Ubuntu, I get this :
$ sudo apt install libxnvctrl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libxnvctrl-dev : Depends: libxnvctrl0 (= 390.30-0ubuntu1) but 390.48-0ubuntu0~gpu17.10.1 is to be installed
E: Unable to correct problems, you have held broken packages.
Hm, I'd ask Ubuntu forums for support. Can you live without {nvidia} variables for now?
Temporary solution. Use something like this...
[[
{execi 10 nvidia-smi --format=csv,noheader,nounits --query-gpu=name}
{execi 10 nvidia-smi --format=csv,noheader,nounits --query-gpu=memory.used} MIB
{execi 10 nvidia-smi --format=csv,noheader,nounits --query-gpu=temperature.gpu}掳C
]]
See nvidia-smi --help-query-gpu for list of variables, but it might hard to find out what you want and if that variable work (otherwise you get Not Supported). I listed three.
@lasers Sure. Thanks a lot. I'll post my question on the forums.
This issue is about unknown variable ${nvidia} which is caused by compiling conky without NVIDIA support (i.e. missing -DBUILD_NVIDIA=ON) and must be done in correct directory too.
We established this already so I'll close this one. The #520 issue still stands today. Thanks.