brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.17k stars 615 forks source link

Yet another flicker issue #775

Closed feuGeneA closed 5 years ago

feuGeneA commented 5 years ago

Issue

Conky is flickering.

Information

As you can see below, my config has own_window = true and double_buffer = yes.

And my Xorg.0.log says:

[  1041.399] (**) Extension "DOUBLE-BUFFER" is enabled

And conky seems to be compiled with double buffer support:

$ conky --version
conky 1.10.6 compiled Fri Dec  9 09:25:23 UTC 2016 for Linux 3.16.0-4-amd64 x86_64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky

 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * Curl
  * RSS
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * eve-online
  * builtin default configuration
  * old configuration syntax
  * Imlib2
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support
  * PulseAudio

 Lua bindings:
  * Cairo
  * Imlib2
  * RSVG
 X11:
  * Xdamage extension
  * Xinerama extension (virtual display)
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Music detection:
  * Audacious
  * MPD
  * MOC
  * XMMS2

 Default values:
  * Netdevice: eth0
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/share/locale
  * Maximum netdevices: 64
  * Maximum text size: 16384
  * Size text buffer: 256

~/.conkyrc:

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:size=10',
    gap_x = 5,
    gap_y = 60,
    minimum_height = 5,
    minimum_width = 239,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'dock',
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false,
    double_buffer = yes
}

conky.text = [[
RAM:$color $memperc% ${membar 4}
${memgraph}
CPU:$color $cpu% ${cpubar 4}
${cpugraph -t -l}
    Temps: ${platform coretemp.0/hwmon/hwmon3 temp 1 1.8 32.0}, ${platform coretemp.0/hwmon/hwmon3 temp 2 1.8 32.0}, ${platform coretemp.0/hwmon/hwmon3 temp 3 1.8 32.0}, ${platform coretemp.0/hwmon/hwmon3 temp 4 1.8 32.0}, ${platform coretemp.0/hwmon/hwmon3 temp 5 1.8 32.0}
]]
lasers commented 5 years ago

Your config isn't flickering for me. You can try this dbe FAQ. No idea if it is still relevant today.

I see you're on Conky 1.10.6 (compiled in 2016). Can you try again on current git version? The older versions are not trustworthy due to too many drastic changes that can be hard to track. Thank you.

feuGeneA commented 5 years ago

Thanks for the response. Are there build instructions anywhere? I couldn't find any. If there aren't any, maybe we can start a doc based on my experience. So far I've resolved dependencies by installing Debian Stretch packages cmake, libncurses5-dev, libxdamage-dev, libxext-dev, libxft-dev, libcurl-dev, libcurl-4-gnutls-dev, libxinerama-dev, lua5.3, and libimlib2-dev. Now I'm getting the following error:

gene@precision5510:~/Downloads/conky-1.11.2/build$ cmake ..
-- CMAKE_C_FLAGS: -std=c99
-- CMAKE_CXX_FLAGS: -std=c++17
-- CMAKE_C_FLAGS_DEBUG: -g
-- CMAKE_CXX_FLAGS_DEBUG: -g
-- CMAKE_C_FLAGS_MINSIZEREL: -Os -DNDEBUG
-- CMAKE_CXX_FLAGS_MINSIZEREL: -Os -DNDEBUG
-- CMAKE_C_FLAGS_RELEASE: -O3 -DNDEBUG
-- CMAKE_CXX_FLAGS_RELEASE: -O3 -DNDEBUG
-- CMAKE_C_FLAGS_RELWITHDEBINFO: -O2 -g -DNDEBUG
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO: -O2 -g -DNDEBUG
-- CMAKE_BUILD_TYPE: RelWithDebInfo
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Checking for one of the modules 'lua>=5.3;lua5.3;lua-5.3;lua53;lua5.2;lua-5.2;lua52'
CMake Error at /usr/share/cmake-3.7/Modules/FindPkgConfig.cmake:637 (message):
  None of the required 'lua>=5.3;lua5.3;lua-5.3;lua53;lua5.2;lua-5.2;lua52'
  found
Call Stack (most recent call first):
  cmake/ConkyPlatformChecks.cmake:359 (pkg_search_module)
  CMakeLists.txt:35 (include)

-- Checking for one of the modules 'lua>=5.3;lua5.3;lua-5.3;lua53;lua5.2;lua-5.2;lua52'
CMake Error at /usr/share/cmake-3.7/Modules/FindPkgConfig.cmake:637 (message):
  None of the required 'lua>=5.3;lua5.3;lua-5.3;lua53;lua5.2;lua-5.2;lua52'
  found
Call Stack (most recent call first):
  3rdparty/toluapp/CMakeLists.txt:14 (pkg_search_module)

Configuration for target conky
-- SOURCE_DIR = /home/gene/Downloads/conky-1.11.2/src
-- BINARY_DIR = /home/gene/Downloads/conky-1.11.2/build/src
-- INCLUDE_DIRECTORIES = /home/gene/Downloads/conky-1.11.2/3rdparty/toluapp/include;/home/gene/Downloads/conky-1.11.2/build;/usr/include;/usr/include;/usr/include/freetype2;/usr/include/x86_64-linux-gnu;/home/gene/Downloads/conky-1.11.2/build/data
-- LINK_LIBRARIES = -lpthread;-lm;/usr/lib/x86_64-linux-gnu/libcurses.so;/usr/lib/x86_64-linux-gnu/libform.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so;/usr/lib/x86_64-linux-gnu/libXdamage.so;/usr/lib/x86_64-linux-gnu/libXfixes.so;/usr/lib/x86_64-linux-gnu/libXft.so;/usr/lib/x86_64-linux-gnu/libXext.so;-lImlib2;curl;toluapp_lib_static;tcp-portmon;/usr/lib/x86_64-linux-gnu/libXinerama.so
-- Configuring incomplete, errors occurred!
See also "/home/gene/Downloads/conky-1.11.2/build/CMakeFiles/CMakeOutput.log".
See also "/home/gene/Downloads/conky-1.11.2/build/CMakeFiles/CMakeError.log".

However, lua is there and waiting:

gene@precision5510:~/Downloads/conky-1.11.2/build$ lua5.3
Lua 5.3.3  Copyright (C) 1994-2016 Lua.org, PUC-Rio
> 

I even went ahead and created a symlink lua that points to lua5.3, hoping that might fix it, but it didn't.

I've had a touch of cmake experience, and I've experienced trouble with it finding things (Boost, if i remember correctly). Lest I delve into a rabbit hole trying to figure out how to help cmake find lua, can you give any advice? Here is my CMakeOutput.log, and here is my CMakeError.log. Strangely, neither one mentions lua!

Thanks again.

brndnmtthws commented 5 years ago

@feuGeneA looks like you're missing liblua5.3-dev.

feuGeneA commented 5 years ago

@brndnmtthws Thank you, that did the trick for me. I've successfully rebuilt it, and I went ahead and updated the wiki page to add in the dependencies I encountered.

Unfortunately, conky is still flickering :(

What else can I try/investigate?

feuGeneA commented 5 years ago

I just noticed that there is a --double-buffer command-line argument. If I use it, I get a stdout message that wasn't being emitted before, conky: drawing to double buffer, and, the flickering seems to be gone! Further, this seems to be a solution not just for my build of the latest sources, but also for my old package-manager-installed 1.10.6 version as well.

Should this command-line argument really be necessary even when the config requests double_buffer = yes?


(Also, FYI, while diagnosing, I happened to notice this: if I use command-line argument -DD, it reveals what appears to be an infinite loop of these messages, repeating about twice a second:

DEBUG(1) [/home/gene/Downloads/conky-1.11.2/src/fonts.cc:149]: loading fonts
DEBUG(1) [/home/gene/Downloads/conky-1.11.2/src/fonts.cc:94]: setting up fonts

Is there any problem that should be reported there?)

lasers commented 5 years ago

Should this command-line argument really be necessary even when the config requests double_buffer = yes?

Replace yes with true and you'll get your conky: drawing to double buffer. :+1:

npyl commented 5 years ago

@lasers Probably we should add support for keywords like YES/NO/yes/no/TRUE/FALSE/true/false

lasers commented 5 years ago

@npyl I think the newer config is literally a Lua script. The yes/no is from 1.9 and earlier.

feuGeneA commented 5 years ago

Replace yes with true and you'll get your conky: drawing to double buffer.

Yes, indeed! :tada:

npyl commented 5 years ago

@npyl I think the newer config is literally a Lua script. The yes/no is from 1.9 and earlier.

Yep, just confirmed it.