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

Conky hangs for about a minute upon resumption from sleep #627

Closed ghost closed 6 years ago

ghost commented 6 years ago

This bug report is a revised version of #546, because I have discovered that the problem is wider, and thereby worse, that I had reported there. (I have closed that old bug report.)

The problem is that Conky hangs - seemingly totally - for about a minute (perhaps two minutes) upon resumption from sleep.

My setup:

$  conky --version
conky 1.11.0_pre compiled Tue 14 Aug 17:35:25 BST 2018 for Linux 4.17.13-041713-generic x86_64

Compiled in features:

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

 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * wireless
  * support for IBM/Lenovo notebooks
  * eve-online
  * builtin default configuration
  * old configuration syntax
  * Imlib2
  * OSS mixer support
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support
 X11:
  * Xdamage extension
  * Xinerama extension (virtual display)
  * Xshape extension (click through)
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Music detection:
  * CMUS
  * MPD
  * MOC

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

My computer: Lenovo ThinkPad X1 Carbon, 6th Generation. Kernel 4.18.1-041801-generic (and the problem occured on 4.17 kernels too and, I think, 4.15 kernels). Linux Mint 19 x64 Cinnamon.

The problem does not occur (on the same computer) with the version in Mint's repositories, viz., 1.10-8.1.

Conky does not hang at other times.

ghost commented 6 years ago

I can post my Conky, but it is fairly large and it runs about eight other program (a few C, mostly bash, and three lua).

EDIT: I can add that the problem seems to occur when there is no network. I add also that all the scripts Conky runs seems to run ok when run manually when there is no network. However, some of my file managers - pcmanfm, and, if run as root, nemo - stall as well when there is no network.

dbriba commented 6 years ago

You say that your Concy use three lua but in your conky version I don't see lua binding. I have

~$ conky --version
conky 1.10.8_pre compiled Mon Jun 11 14:16:29 CEST 2018 for Linux 4.16.14-300.fc28.x86_64 x86_64

Compiled in features:

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

 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * Curl
  * RSS
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * old configuration syntax
  * Imlib2
  * apcupsd
  * iostats
  * Internationalization support
  * Debugging extensions

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

 Music detection:
  * MPD

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

Well, thank you, but do I need those bindings? What do they do? I can't seem to manage to find documentation on that - though I will try compiling Conky with them enabled . .

ghost commented 6 years ago

The Conky build system complains:

 CMake Error at cmake/ConkyPlatformChecks.cmake:331 (message):
   Unable to find Lua 5.1.x
 Call Stack (most recent call first):
   CMakeLists.txt:36 (include)

But I have many lua5.1 packages installed (but lack the apt 'fu' to know how to list them in a terminal).

EDIT: also, my lua scripts do run.

lasers commented 6 years ago

This bug report is a revised version of #546.

In the future, please update issue #546 via editing or if it's new information, make new comments so it would be easier for everybody to track issues and/or conversations. Both looks too similar. :-)

lasers commented 6 years ago
326 # Check for Lua itself
327 if(WANT_TOLUA)
328   # If we need tolua++, we must compile against Lua 5.1
329   pkg_search_module(LUA REQUIRED lua5.1 lua-5.1 lua51 lua luajit)
330   if(NOT LUA_VERSION VERSION_LESS 5.2.0)
331     message(FATAL_ERROR "Unable to find Lua 5.1.x")
332   endif(NOT LUA_VERSION VERSION_LESS 5.2.0)
333 else(WANT_TOLUA)
dbriba commented 6 years ago

Have you the lua devel installed ? To see what lua packages are installed : sudo apt list --installed | grep -i lua

ghost commented 6 years ago

@dbriba

$ sudo apt list --installed | grep -i lua
liblua5.1-0/bionic,now 5.1.5-8.1build2 amd64 [installed,automatic]
liblua5.1-0-dev/bionic,now 5.1.5-8.1build2 amd64 [installed]
liblua5.2-0/bionic,now 5.2.4-1.1build1 amd64 [installed]
liblua5.2-dev/bionic,now 5.2.4-1.1build1 amd64 [installed,automatic]
liblua5.3-0/bionic,now 5.3.3-1 amd64 [installed,automatic]
libluajit-5.1-2/bionic,now 2.1.0~beta3+dfsg-5.1 amd64 [installed,automatic]
libluajit-5.1-common/bionic,bionic,now 2.1.0~beta3+dfsg-5.1 all [installed,automatic]
libtolua++5.1-dev/bionic,now 1.0.93+repack-0ubuntu1 amd64 [installed]
libtolua-dev/bionic,now 5.2.0-1build1 amd64 [installed]
lua5.1/bionic,now 5.1.5-8.1build2 amd64 [installed]
dbriba commented 6 years ago

I have that, with fedora

rpm -qa | grep -i lua lua-expat-1.3.0-12.fc28.x86_64 tolua++-1.0.93-22.fc28.x86_64 lua-devel-5.3.4-10.fc28.x86_64 lua-5.3.4-10.fc28.x86_64 lua-socket-3.0-0.17.rc1.fc28.x86_64 lua-lpeg-1.0.1-5.fc28.x86_64 lua-posix-33.3.1-8.fc28.x86_64 lua-libs-5.3.4-10.fc28.x86_64 compat-lua-devel-5.1.5-10.fc28.x86_64 tolua++-devel-1.0.93-22.fc28.x86_64 compat-lua-libs-5.1.5-10.fc28.x86_64 lua-json-1.3.2-9.fc28.noarch

ghost commented 6 years ago

Running conky with the debug flag does not reveal anything. For, all debug output just stops for the period when the network is offline - for, to repeat, the cause of the problem does seem to be lack of network.

Yet, let me be more specific than I have been in this thread hitherto.

Conky hangs for about a minute when, and always when, both of the following conditions obtain:

(1a) the computer resumes from sleep and (1b) immediately after that resumption, the network is temporarily down (because my computer is automatically, albeit via rather slow scripts, changing wifi networks).

Also, it seems that: (2) sometimes - but not always - Conky will hang, seemingly indefinitely, merely when the network is down, i.e. when the computer has not resumed.

and sometimes (but only sometimes, I think)

that causes the problem, though the problem can outlast the network outtage).

ghost commented 6 years ago

I think the problem might involve the bug reported on this page, viz., the network won't always reconnect after sleep. I have a script that restarts networkManager, in order to work around that problem. Even once the manager has restarted and the network is working, conky remains frozen, though.

ghost commented 6 years ago

@dbriba

So, our packages are slightly different? But anyway I am unconvinced this is a lua problem . .

ghost commented 6 years ago

I have just had conky hang for ten minutes. It would not even respond to 'killall'.

su8 commented 6 years ago

ps -A|grep conky; sudo kill -9 conky_pid ?

ghost commented 6 years ago

I can try that next time it happens. Hitherto I have tried sudo killall conky. I would rather have a fix than a workaround, though.

su8 commented 6 years ago

@CottonEaster Can you test other linux distro inside Live CD/qemu/virtualbox with your configuration and see whether this hang occurs ? Also can you post your config here or in https://gist.github.com ?

ghost commented 6 years ago

Thanks. However: the problem manifests itself with any constancy after a long period of the computer being suspended, and - perhaps - when I have moved to a different wifi network (or from ethernet to wifi). Would a virtual machine be a good test?

ghost commented 6 years ago

I think that the source of the problem is something other than Conky. I think that because I have changed some networking stuff on my computer and it seems to have solved the problem (though I remain unclear whether the cause is something peculiar to my computer or something in the/my Linux network stack). It does seem that there is something here Conky could handle better, but I will close the issue nonetheless.