#34 Conky crashed when I disconnect the charger to my laptop


Hello everybody. The problem I have with Conky is very strange because it only works well when my laptop is connected to the charger, but to use my laptop with battery Conky collapses and then closes. This is the messages thrown when I run Conky from the terminal:

camilo@camilo-laptop:~$ conky -c /home/camilo/.conky/conkyrc
Conky: desktop window (12000b5) is subwindow of root window (a7)
Conky: window type - override
Conky: drawing to created window (0x5200001)
Conky: drawing to double buffer
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 91 (X_QueryColors)
Value in failed request: 0x8e6c9e8
Serial number of failed request: 147654
Current serial number in output stream: 147654

And this is my conkyrc file:

# Conky, a system monitor, based on torsmo
# Any original torsmo code is licensed under the BSD license
# All code written since the fork of torsmo is licensed under the GPL
# Please see COPYING for details
# Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
# Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
# All rights reserved.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

background no
use_xft yes
xftfont Bitstream Vera Sans Mono:size=10
xftalpha 0.8
update_interval 5.0
update_interval_on_battery 1.0
total_run_times 0
own_window yes
own_window_type override
own_window_transparent yes
#own_window_colour hotpink
#own_window_hints undecorated,below,skip_taskbar,sticky,skip_pager
double_buffer yes
#minimum_size 280 5
draw_shades yes
draw_outline no
draw_graph_borders yes
stippled_borders 8
border_inner_margin 4
border_width 1
maximum_width 200
default_color blue
default_shade_color black
default_outline_color black
alignment mr
gap_x 4
gap_y 4
#no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale no
use_spacer none
font xfontcel

${color red}${alignc}${nodename} ${uptime_short}

${color #FFFFFF}CPU temperature: ${color orange}${hwmon 1 temp 1} C
${color #FFFFFF}Core 1 usage: $color${cpu cpu1}%
${color #FFFFFF} ${cpugraph cpu1 16,190 000000 7f8ed3}
${color #FFFFFF}Core 2 usage: $color${cpu cpu2}%
${color #FFFFFF} ${cpugraph cpu2 16,190 000000 7f8ed3}

${color #FFFFFF}RAM: $color$mem/$memmax
${color #FFFFFF} ${membar 6,190}
${color #FFFFFF}Swap:$color$swap/$swapmax
${color #FFFFFF} ${swapbar 6,190}
${color #FFFFFF}Battery: $color$battery_short ${color orange}${hwmon temp 1} C
${color #FFFFFF} $battery_bar 6,190

${color #FFFFFF}ETH1 Down: $color${downspeed eth1}${alignr} k/s
${color #FFFFFF} ${downspeedgraph eth1 16,190 000000 7f8ed3 150}
${color #FFFFFF}ETH1 Up: $color${upspeed eth1}${alignr} k/s
${color #FFFFFF} ${upspeedgraph eth1 16,190 000000 7f8ed3 18}

${color #FFFFFF}File systems:
${color #FFFFFF}/ $color${fs_free /}
${color #FFFFFF} ${fs_bar 6,190 /}
${color #FFFFFF}Disk data: $color${fs_free /media/disk_data}
${color #FFFFFF} ${fs_bar 6,190 /media/disk_data}

${color #FFFFFF}Processes:$color $processes | $running_processes
${color} Cpu usage CPU
${color #ddaa00} ${top name 1}${offset 40} ${top cpu 1}
${color #FFFFFF} ${top name 2}${offset 40} ${top cpu 2}
${color #FFFFFF} ${top name 3}${offset 40} ${top cpu 3}
${color #FFFFFF} ${top name 4}${offset 40} ${top cpu 4}

${color} Mem usage MEM
${color #ddaa00} ${top_mem name 1}${offset 40} ${top_mem mem 1}
${color #FFFFFF} ${top_mem name 2}${offset 40} ${top_mem mem 2}
${color #FFFFFF} ${top_mem name 3}${offset 40} ${top_mem mem 3}
${color #FFFFFF} ${top_mem name 4}${offset 40} ${top_mem mem 4}

#${color #FFFFFF}# Connections
#$color In: ${tcp_portmon 1 32767 count} Out: ${tcp_portmon 32768 61000 count}${alignr}

I appreciate your kind help


  • Krzysztof Duchnowski

    Try to wrap "$battery_bar 6,190" in brackets.
    And you should do it for every Conky variable, even those without parameters.

  • pavelo

    pavelo - 2012-11-04

    could you try to get a backtrace of the crash? This means, you run it in a debugger (gdb) and type "bt" when it crashes. You may need to recompile conky with debug symbols to get a useful backtrace.


Log in to post a comment.