Conky: High CPU usage on window focus

Created on 28 Nov 2017  路  7Comments  路  Source: brndnmtthws/conky

I'm using Conky 1.10.6_pre on Arch Linux 4.13.12-1 with xmonad 0.13-9 on a laptop with 4 CPUs. When I start Conky as a window it runs fine until I focus it with my keyboard or mouse. Then the CPU usage jumps to about 22% and stays that way until I close the application. If the window is already focused when it starts, unfocusing and refocusing the window triggers the behavior. There is no unusual output in the console. Here is my conky.conf:

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 = 10,
    minimum_width = 10,
    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 = 'desktop',
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false,
    double_buffer = true,
    maximum_width = 400,
    format_human_readable = true
}

conky.text = [[
Conky version: ${goto 176} $conky_version
Hostname: ${goto 176} $nodename
Kernel: ${goto 176} $sysname $kernel
CPU Architecture: ${goto 176} $machine
$hr
$alignc$time
$hr
${color grey}RAM Usage:
${membar 4}
$alignc$mem/$memmax - $memperc%
${color grey}Swap Usage:
${swapbar 4}
$alignc$swap/$swapmax - $swapperc%
${color grey}CPU Usage:
${cpubar 4}
$alignc$cpu%
$hr
${color grey}File systems:
 / $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
${color grey}Networking:
Up:$color ${upspeed eth0} ${color grey} - Down:$color ${downspeed eth0}
$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}
]]

Edit: This also happens when unfocusing the window.
Edit: This does not happen when using noBorders in xmonad.

cpu

Most helpful comment

That's good news.

@lasers 8 months and 13 days passed. Can you determine if you're still having this problem today on 1.10.9 or preferably 1.10.10_pre (git)? The older versions are not trustworthy due to too many changes that can be hard to track. Thank you.

Interesting thing is that we asked several users to confirm again if their stale issues is still happening on current master. Many issues had been closed and/or solved by simply upgrading to current master.

Because Conky might have been stale for a long time, we newcomers can't tell which commits are solving which issue and current master might already have several commits, fixes, revisions, and/or reverts between older versions and current master that we don't know anything about.

We just need to ask users to test their issues again on current master and to do a release soon enough.

Thank you for confirming this. I'll be closing this. \o/

All 7 comments

Hm, That's strange behavior. I just wanted to chime in on this thread and report that I could not reproduce the issue. (If it is at all useful to someone else who is scrolling through looking for issues to tackle.)

  • I used a mouse to give focus to the conky window.
  • sidenote: I don't use Xmonad,
  • But we do use the same Conky 1.10.6.

Screenshot

bildschirmfoto zu 2018-03-22_22-06-25

8 months and 13 days passed. Can you determine if you're still having this problem today on 1.10.9 or preferably 1.10.10_pre (git)? The older versions are not trustworthy due to too many changes that can be hard to track. Thank you.

@lasers I'm using xmonad and have no such issue.

You're not @brainwave0. You're @su8 with a number 8! Either way, we'll see what he have to say. :-)

@brainwave0, @reprise5 on 1.10.6 have this problem.
@su8 on current master does not have this problem.

@brainwave0, @reprise5, can you try the current master? Thank you.

git clone https://github.com/brndnmtthws/conky
cd conky
mkdir -p build
cd build
cmake ..
make -j4  # 4 cores to run in parallel
src/conky -c ~/conky.conf # <-- your config goes here

I just tried the current master as @lasers said. CPU usage looks fine now.

That's good news.

@lasers 8 months and 13 days passed. Can you determine if you're still having this problem today on 1.10.9 or preferably 1.10.10_pre (git)? The older versions are not trustworthy due to too many changes that can be hard to track. Thank you.

Interesting thing is that we asked several users to confirm again if their stale issues is still happening on current master. Many issues had been closed and/or solved by simply upgrading to current master.

Because Conky might have been stale for a long time, we newcomers can't tell which commits are solving which issue and current master might already have several commits, fixes, revisions, and/or reverts between older versions and current master that we don't know anything about.

We just need to ask users to test their issues again on current master and to do a release soon enough.

Thank you for confirming this. I'll be closing this. \o/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sdban picture sdban  路  4Comments

LeoIannacone picture LeoIannacone  路  3Comments

mreinhardt picture mreinhardt  路  3Comments

Dimerbone picture Dimerbone  路  4Comments

moyamo picture moyamo  路  3Comments