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 windows shows twice with offset on Ubuntu 19 #828

Closed jbrepogmailcom closed 1 year ago

jbrepogmailcom commented 5 years ago

Hello, this is more an information for others than a bug. Or it may be a bug.

I upgraded from Ubuntu 18.10 to 19.04. After I launched conky, after a second or two anothed set of objects appeared on top of conky window, but with offset of about 3 pixels. So all texts and objects look very fuzzy. It may be related to new version of GNOME that Ubuntu 19 is using. Also the conky window completely lost transparency. I tried to change few settings in .conkyrc, but it did not help.

Launching conky as root worked fine but it just shows default configuration.

Does anyone experienced same behaviour?

Jan

lasers commented 5 years ago

Hi there. I don't recall seeing this issue before. It looks like Ubuntu 19.04 came out just few days ago so maybe we will have more people chiming in with similar issues soon enough.

Can you share screenshots / config? Run pgrep -l conky too to make sure you're not running multiple instances at startup? Hopefully, it is something like duplicate startup entries caused by dist-upgrading. I think it would be in ~/.config/autostart if that's the case.

I don't know how people usually start conky so I'm asking all this just in case.

Also the conky window completely lost transparency.

You can try things - https://wiki.archlinux.org/index.php/conky#Transparency. I'm guessing new Ubuntu does things differently with their background so pseudo-transparency does not work. You should try that feh command in the link too.

ilaziness commented 5 years ago

@lasers after upgrade to ubuntu 19.04

img

plikhari commented 5 years ago

This is very very similar to an xfce thing where 2 instances of conky are launched.

  1. First is launched by the system - where you would have something like Automatically save session on logout. You would need to check in the new Ubuntu if they have this on in the configs.
  2. Second would be a user script.

You avoid such a situation by disabling the session saving thing.

jbrepogmailcom commented 5 years ago

Hello the issue still persists. I took care that no other conky process is running and then when I run conky, it shows correctly and after a second or two another one is layered over with small offset. This is the problematic script:

cat .conkyrc

Conky sample configuration

#

the list of variables has been removed from this file in favour

of keeping the documentation more maintainable.

Check http://conky.sf.net for an up-to-date-list.

set to yes if you want Conky to be forked in the background

background yes

X font when Xft is disabled, you can pick one with program xfontsel

font 5x7

font 6x10

font 7x13

font 8x13

font 9x15

font mintsmild.se

font -------34-------*

Use Xft?

use_xft yes

Xft font when Xft is enabled

xftfont Bitstream Vera Sans Mono:size=8

Text alpha when using Xft

xftalpha 0.8

Print everything to stdout?

out_to_console no

MPD host/port

mpd_host localhost

mpd_port 6600

mpd_password tinker_bell

Print everything to console?

out_to_console no

mail spool

mail_spool $MAIL

Update interval in seconds

update_interval 5.0

This is the number of times Conky will update before quitting.

Set to zero to run forever.

total_run_times 0

Create own window instead of using desktop (required in nautilus)

own_window no

If own_window is yes, you may use type normal, desktop or override

own_window_type desktop

Use pseudo transparency with own_window?

own_window_transparent true

190915

own_window_class "Conky"

If own_window_transparent is set to no, you can set the background colour here

own_window_colour hotpink

If own_window is yes, these window manager hints may be used

own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

Use double buffering (reduces flicker, may not work for everyone)

double_buffer yes

Minimum size of text area

minimum_size 280 5

Draw shades?

190915

draw_shades no

Draw outlines?

draw_outline no

Draw borders around text

draw_borders yes

Draw borders around graphs

draw_graph_borders yes

Stippled borders?

stippled_borders 8

border margins

border_margin 4

border width

border_width 0

Default colors and also border colors

default_color white default_shade_color black default_outline_color black

Text alignment, other possible values are commented

alignment top_left

alignment top_right

alignment bottom_left

alignment bottom_right

alignment none

Gap between borders of screen and text

same thing as passing -x at command line

gap_x 80 gap_y 40

Subtract file system buffers from used memory?

no_buffers yes

set to yes if you want all text to be in uppercase

uppercase no

number of cpu samples to average

set to 1 to disable averaging

cpu_avg_samples 2

number of net samples to average

set to 1 to disable averaging

net_avg_samples 2

Force UTF8? note that UTF8 support required XFT

override_utf8_locale no

Add spaces to keep things from moving about? This only affects certain objects.

use_spacer none

Allow each port monitor to track at most this many connections (if 0 or not set, default is 256)

max_port_monitor_connections 256

Maximum number of special things, e.g. fonts, offsets, aligns, etc.

max_specials 512

Maximum size of buffer for user text, i.e. below TEXT line.

max_user_text 16384

Timing interval for music player thread, e.g. mpd, audacious

music_player_interval (update_interval is default)

variable is given either in format $variable or in ${variable}. Latter

allows characters right after the variable and must be used in network

stuff because of an argument

stuff after 'TEXT' will be formatted on screen

TEXT $nodename - $sysname $kernel on $machine $stippled_hr ${color lightgrey}Uptime:$color $uptime ${color lightgrey}- Load:$color $loadavg

${color lightgrey}CPU Usage:${color #cc2222} $cpu% ${cpubar}

${color lightgrey}CPU Usage:$color ${cpu} ${if_match ${cpu}<50}${color dimgrey}${else}${if_match ${cpu}<70}${color0}${else}${if_match ${cpu}<89}${color1}${else}${color2}${endif}${endif} ${endif}${goto 0}${offset 90}${cpubar}${color dimgrey}

${color red}${cpugraph 0000ff ff0000} ${color lightgrey}RAM Usage:$color $mem/$memmax - $memperc% ${membar} ${color lightgrey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar} ${color lightgrey}Processes:$color $processes ${color grey}Running:$color $running_processes $color$stippled_hr ${color lightgrey}Networking: Down:${color #8844ee} ${downspeed wlp4s0} k/s${color lightgrey} ${offset 80}Up:${color #22ccff} ${upspeed wlp4s0} k/s ${color #0000ff}${downspeedgraph wlp4s0 32,150 ff0000 0000ff} ${color #22ccff}${upspeedgraph wlp4s0 32,150 0000ff ff0000} ${color lightgrey}File systems: / $color${fs_used /}/${fs_size /} ${fs_bar /} ${color}Name PID CPU% MEM% ${color #ddaa00} ${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} ${color}Mem usage ${color #ddaa00} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1} ${color lightgrey} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2} ${color lightgrey} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3} $stippled_hr ${color #ddaa00}Port(s)${alignr}#Connections
$color Inbound: ${tcp_portmon 1 32767 count} Outbound: ${tcp_portmon 32768 61000 count}${alignr}ALL: ${tcp_portmon 1 65535 count} ${color #ddaa00}Inbound Connection ${alignr} Local Service/Port$color ${tcp_portmon 1 32767 rhost 0} ${alignr} ${tcp_portmon 1 32767 lservice 0} ${tcp_portmon 1 32767 rhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1} ${tcp_portmon 1 32767 rhost 2} ${alignr} ${tcp_portmon 1 32767 lservice 2} ${tcp_portmon 1 32767 rhost 3} ${alignr} ${tcp_portmon 1 32767 lservice 3} ${tcp_portmon 1 32767 rhost 4} ${alignr} ${tcp_portmon 1 32767 lservice 4} ${tcp_portmon 1 32767 rhost 5} ${alignr} ${tcp_portmon 1 32767 lservice 5} ${color #ddaa00}Outbound Connection ${alignr} Remote Service/Port$color ${tcp_portmon 32768 61000 rhost 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0} ${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1} ${tcp_portmon 32768 61000 rhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2} ${tcp_portmon 32768 61000 rhost 3} ${alignr} ${tcp_portmon 32768 61000 rservice 3} ${tcp_portmon 32768 61000 rhost 4} ${alignr} ${tcp_portmon 32768 61000 rservice 4} ${tcp_portmon 32768 61000 rhost 5} ${alignr} ${tcp_portmon 32768 61000 rservice 5}

jimcrilly commented 4 years ago

I've been seeing the same thing for at least a few months using XFCE on Debian sid. It is definitely a drawing issue, I do not have multiple instances running and it redraws just fine for a random amount of time after starting.

buddhi1980 commented 4 years ago

I have very similar issue since converted to 1.11.16. Everything is doubled. I'm sure that there are no two conky processes. It happens on Debian Testing with KDE. image

My settings:

conky.config = {
gap_x = 2340,
gap_y = 10,
background = false,

maximum_width = 250,

-- Use Xft?
use_xft = true,

-- xftfont Bitstream Vera Sans Mono:size=8
xftfont = 'Sans:size=9',
xftalpha = 0.9,

update_interval = 5.0,

total_run_times = 0,

own_window = true,
own_window_transparent = true,
own_window_argb_visual = true,
own_window_argb_value  = 0,
--- own_window_type normal
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_colour = '#000000',

--- Use double buffering (reduces flicker, may not work for everyone)
double_buffer = true,
draw_shades = true,
draw_outline = false,
draw_borders = false,
stippled_borders = 8,
border_width = 1,

default_color = 'yellow',
default_shade_color = 'black',
default_outline_color = 'white',
default_graph_size = '64 200',

alignment = 'top_left',
uppercase = false,

cpu_avg_samples = 2,
net_avg_samples = 2,

override_utf8_locale = false,

use_spacer = 'right',
}

conky.text = [[

${color slate grey}UpTime:
$alignc${color }$uptime
${color slate grey}Load:
$alignc${color }$loadavg

${color }${color slate grey}CPU:    $color%${color #ddaa00}$cpu$alignr$color$running_processes/ $processes
${color slate grey}${cpugraph 25,200 000000 ffffff}
${font :size=8}${color #ddaa00}${top name 1}$alignr${top cpu 1}
${color lightgrey}${top name 2}$alignr${top cpu 2}
${color lightgrey}${top name 3}$alignr${top cpu 3}
${color lightgrey}${top name 4}$alignr${top cpu 4}
${font :size=9}
${color slate grey}RAM:   $color%$memperc ${alignr}$mem
${membar 5,200}
${color slate grey}${memgraph 100,200 000000 00ff00}
${color slate grey}SWAP: $color%$swapperc ${alignr}$swap
${swapbar 5,200}
${font :size=8}${color #ddaa00}${top_mem name 1}$alignr${top_mem mem 1}
${color lightgrey}${top_mem name 2}$alignr${top_mem mem 2}
${color lightgrey}${top_mem name 3}$alignr${top_mem mem 3}
${color lightgrey}${top_mem name 4}$alignr${top_mem mem 4}
${font :size=9}
${color slate grey}TWARDZIEL odczyt: $color$alignr$diskio_read
${color slate grey}${diskiograph_read 64,200 000000 00ff00}
${color slate grey}TWARDZIEL zapis: $color$alignr$diskio_write
${color slate grey}${diskiograph_write 64,200 000000 ff0000}
${color slate grey} /:${alignr}${color }${fs_free /}
${fs_bar 5,200 /}
${color slate grey} /home:${alignr}${color }${fs_free /home}
${fs_bar 5,200 /home}
${color slate grey} /dane:${alignr}${color }${fs_free /media/dane}
${fs_bar 5,200 /media/dane}

${color slate grey}INTERNET:
${color}DL:${color #ddaa00}${downspeed eno1}${color}UP:${color #ddaa00}${upspeed eno1}${color}${alignr}KiB/s
${color}Total:
DL: ${color white}${totaldown eno1}  ${color}UP: ${color white}${totalup eno1}
  ${color #00ff00}downstream:
${color slate grey}${downspeedgraph eno1 50,200 000000 00ff00 32000}
  ${color #ff0000}upstream:
${color slate grey}${upspeedgraph eno1 50,200 000000 0000ff 10000}

${color slate grey}HARDWARE:
${font :size=8}
${color}CPU temp: ${color white}${hwmon 1 temp 1}C, ${hwmon 1 temp 2}C, ${hwmon 1 temp 3}C, ${hwmon 1 temp 4}C
${color}inside temp: ${color white}${execi 10 echo $(($(cat /sys/module/it87/drivers/platform:it87/it87.2608/hwmon/hwmon2/temp1_input)/1000))}C
${color}MB temp: ${color white}${execi 10 echo $(($(cat /sys/module/it87/drivers/platform:it87/it87.2608/hwmon/hwmon2/temp2_input)/1000))}C
${color}GPU: ${color white}${nvidia temp} C
${color}CPU fan: ${color white}${execi 10 cat /sys/module/it87/drivers/platform\:it87/it87.2608/hwmon/hwmon2/fan1_input} rpm
${color}Top fan: ${color white}${execi 10 cat /sys/module/it87/drivers/platform\:it87/it87.2608/hwmon/hwmon2/fan3_input} rpm
${color}Back fan: ${color white}${execi 10 cat /sys/module/it87/drivers/platform\:it87/it87.2608/hwmon/hwmon2/fan5_input} rpm
${color}/dev/sda temp: ${color white}${hddtemp /dev/sda}C
${color}/dev/sdb temp: ${color white}${hddtemp /dev/sdb}C
${color}/dev/sdc temp: ${color white}${hddtemp /dev/sdc}C
${color}/dev/sdd temp: ${color white}${hddtemp /dev/sdd}C
${font :size=9}
]]
buddhi1980 commented 4 years ago

I just found that this problem happens when there are used different font sizes. It leads to wrong rendering of font shadows.

virse commented 3 years ago

Same issue here. The black shadow of the fonts text is about 50 pixels apart. Any hints on that?

Alliegaytor commented 1 year ago

The issue seems to occur when draw_shades=true and when there are multiple fonts

What my conky looks like without draw_shades draw_shades=false What it looks like with draw_shades draw_shades=true What it looks like with draw_shades and only one font draw_shades=true one font

My conky configuration

conky.config = {

  background = true,
  use_xft = true,
  font = 'Noto Sans:bold:size=10',
  xftalpha = 1,

  own_window = true,
  own_window_type = 'normal',
  own_window_transparent = true,
  own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
  own_window_argb_visual = true,

  double_buffer = true,
  draw_shades = true,
  draw_outline = false,
  draw_borders = false,

  stippled_borders = 0,
  border_width = 0,
  draw_graph_borders = true,

  default_color = '9B469B',
  color0 = '1C6AA2',

  alignment = 'top_right',
  no_buffers = true,

  uppercase = false,

  cpu_avg_samples = 1,
  net_avg_samples = 1,
  override_utf8_locale = true,

  use_spacer = 'right',
  text_buffer_size = 2048,

  gap_x = 0,
  gap_y = 0,

  minimum_width = 350,
  minimum_height = 0,
  maximum_width = 350,

  update_interval = 5
}

conky.text = [[
${color0}RAM & CPU usage  ${hr 2}
$color0 Total${goto 75}Free${goto 145}Buffers${goto 215}Cached${goto 290}Used
$color$memmax${goto 75}$memfree${goto 145}$buffers${goto 215}$cached${goto 290}$mem

${execpi 5 python ./scripts/sensors.py -cpu}
${execpi 5 python ./scripts/sensors.py -gpu}

${execpi 5 python ./scripts/cpu.py}
${color0}Name${goto 190}PID${goto 230}CPU%${goto 295}MEM

Cpu$color${font Liberation Mono:bold:size=9}
${execpi 10 python ./scripts/cpuTop.py}
${color0}${font Liberation Mono:bold:size=9}

Mem$color${font Liberation Mono:bold:size=9}
${execpi 10 python ./scripts/memTop.py}
]]
conky --version
conky 1.13.1_pre compiled 2022-09-27 for Linux x86_64
mmuman commented 1 year ago

Using the last config (removed the python calls), I found a workaround with resetting the fond at the end of the last line with a ${font Noto Sans:bold:size=10}: Screenshot_20221001_214105 Screenshot_20221001_214113

So I suspect the font is not reset properly after drawing the shadow. I'll see if I can come up with a fix.

mmuman commented 1 year ago

And… it's a one-liner :-D

mmuman commented 1 year ago

Please test and reopen if it still does it with the current HEAD.

Alliegaytor commented 1 year ago

Please test and reopen if it still does it with the current HEAD.

Can confirm that it works now! Thanks