Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Conky window does not appear on second monitor #1364

Closed
tecnosegugio opened this issue Jan 7, 2023 · 13 comments · Fixed by #1408
Closed

[Bug]: Conky window does not appear on second monitor #1364

tecnosegugio opened this issue Jan 7, 2023 · 13 comments · Fixed by #1408
Labels
bug Bug report or bug fix PR

Comments

@tecnosegugio
Copy link

What happened?

Conky 1.17.0 does not place the conky window on the correct monitor.

I have two monitor, the second one is placed above the main monitor and I have
configured GNOME to extend screen on two monitors.
I'm used to place conky window on the second monitor, the one above the main
monitor, on the top right corner.

Using conky 1.12.2 the conky window is placed in the top right corner on the second monitor, using:
gap_x = 6,
gap_y = 0,

Using v 1.17.0, with the same settigns, the conky window appear on the first monitor on its top right corner.

Tried to edit xinerama_head value in .conkyrc file but nothing works.

Tried to edit the alignment_* values but every changes seems related to the
main monitor and not on the whole logical screen.

As a workaround I've changed:
gap_x = -780,
gap_y = -1440,

to place the conky window on the second monitor.

Version

1.17.0

Which OS/distro are you seeing the problem on?

Debian

Conky config

-- versione per doppio monitor conky 1.17.0
conky.config = {
-- Use Xft?
	use_xft = true,
    font = 'DejaVu Sans Mono:size=14', 
-- font = 'VL PGothic:size=10',
-- font = 'Liberation Mono:size=10',
-- font = 'Bitstream Vera San Monos:size=10',
-- font = 'Noto Mono Regular:size=10',
-- xftfont = 'Cantarell:size=10',

	xftalpha = 1,
	text_buffer_size = 4092,

-- Update interval in seconds
	update_interval = 1,
	update_interval_on_battery = 10,

-- 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 = true,
	own_window_class = 'Conky',
	own_window_transparent = false,
	own_window_type = 'desktop',
	own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
	own_window_colour = '000000',
	own_window_argb_visual = true,
	own_window_argb_value = 200,

-- Use double buffering (reduces flicker, may not work for everyone)
	double_buffer = true,

-- Minimum size of text area
	minimum_width = 300,
	maximum_width = 300,
    minimum_height = 1440,

-- Draw shades?
	draw_shades = false,

-- Draw outlines?
	draw_outline = false,

-- Draw borders around text
	draw_borders = false,

-- Stippled borders?
	stippled_borders = 0,

-- border margins
	border_outer_margin = 2,

-- border width
	border_width = 1,

-- Default colors and also border colors
	default_color = 'grey',
-- default_shade_color = 'black',
-- default_outline_color white

-- bar size
	default_bar_width = 260, default_bar_height = 20,

-- colori 
	color0 = 'grey',
-- bar color
	color1 = '#2222AA',
-- data color
	color2 = 'green',
-- alternative data color
	color3 = 'red',

-- Text alignment, other possible values are commented
-- alignment = 'top_left',
   alignment = 'top_right',
-- alignment = 'bottom_left',
-- alignment = 'bottom_right',

-- Gap between borders of screen and text
-- same thing as passing -x at command line
   gap_x = 6,
-- Xorg
   gap_y = 0,    
-- Wayland
-- gap_y = 1108,

-- define xinerama display
   xinerama_head = 2,

-- Subtract file system buffers from used memory?
	no_buffers = false,

-- set to yes if you want all text to be in uppercase
	uppercase = false,

-- number of cpu samples to average
-- set to 1 to disable averaging
	cpu_avg_samples = 1,

-- number of net samples to average
-- set to 1 to disable averaging
	net_avg_samples = 1,

-- Force UTF8? note that UTF8 support required XFT
	override_utf8_locale = true,

-- Add spaces to keep things from moving about?  This only affects certain objects.
	use_spacer = 'none',

-- load lua scripts
	lua_load = '~/.conky/scripts/cpufreq.lua',

-- image cache
	imlib_cache_size = 0,
    -- imlib_cache_flush_interval = 300,

-- width for top name
    top_name_width = 10,

};

conky.text = [[
${color0}${font DejaVu Sans:style=Bold:size=14}System ${hr 2}${font}
Debian GNU/Linux ${color2}${execi 60000 grep ^VERSION_CODENAME /etc/os-release | cut -d'=' -f2-}${color0}
Kernel: ${alignr}${color2}${kernel}${color0}
Uptime: ${alignr}${color2}${uptime}${color0}
Load: ${alignr}${color2}${loadavg}${color0}
Procs: ${alignr}${color2}${processes} ($running_processes running)${color0}
RAM ${color1}${membar 16,180}${alignr}${color2}${memperc}%${color0}
SWP ${color1}${swapbar 16,180}${alignr}${color2}${swapperc}%${color0}
#BAT ${if_match ${battery_percent BAT1} <= 15}${color2}${else}${color1}${endif}\
#${battery_bar 16,180 BAT1}${alignr}${color2}${battery_percent BAT1}%${color0}
Webcam (Fn+F6): ${alignr}${if_existing /dev/video0}${color2}Enabled${else}Disabled${endif}${color0}
${font DejaVu Sans:style=Bold:size=14}CPU ${hr 2}${color0}${font}
% ${color2}${cpubar 16, 210 } ${color0}${alignr}${cpu cpu0}%
1 ${color1}${cpugraph cpu1 16,180 FFFF00 FFFF00 -l}${alignr}${color2}${lua cpu_freq_g 0}${color0} GHz
2 ${color1}${cpugraph cpu2 16,180 FFFF00 FFFF00 -l}${alignr}${color2}${lua cpu_freq_g 1}${color0} GHz
3 ${color1}${cpugraph cpu3 16,180 FFFF00 FFFF00 -l}${alignr}${color2}${lua cpu_freq_g 2}${color0} GHz
4 ${color1}${cpugraph cpu4 16,180 FFFF00 FFFF00 -l}${alignr}${color2}${lua cpu_freq_g 3}${color0} GHz
5 ${color1}${cpugraph cpu5 16,180 FFFF00 FFFF00 -l}${alignr}${color2}${lua cpu_freq_g 4}${color0} GHz
6 ${color1}${cpugraph cpu6 16,180 FFFF00 FFFF00 -l}${alignr}${color2}${lua cpu_freq_g 5}${color0} GHz
7 ${color1}${cpugraph cpu7 16,180 FFFF00 FFFF00 -l}${alignr}${color2}${lua cpu_freq_g 6}${color0} GHz
8 ${color1}${cpugraph cpu8 16,180 FFFF00 FFFF00 -l}${alignr}${color2}${lua cpu_freq_g 7}${color0} GHz
${font DejaVu Sans:style=Bold:size=14}Sensors ${hr 2}${font}
ACPI: ${color2}${acpitemp}${color0}°C${alignr}Physical:${color2}${hwmon 5 temp 1}${color0}°C
CPU:${alignr}${color2}${hwmon 5 temp 2}${color0}°C ${color2}${hwmon 5 temp 3}${color0}°C ${color2}${hwmon 5 temp 4}${color0}°C ${color2}${hwmon 5 temp 5}${color0}°C
Disk:${alignr}${color2}${hwmon 1 temp 1}${color0}°C ${color2}${hwmon 2 temp 1}${color0}°C ${color2}${hwmon 3 temp 1}${color0}°C ${color2}${hwmon 4 temp 1}${color0}°C
${font DejaVu Sans:style=Bold:size=14}Media ${hr 2}${font}
${image ~/.conky/img/current_cover.jpg -n -p 0,556 -s 150x150 -f 10}
${image ~/.conky/img/arpav_radar.jpg -n -p 150,556 -s 150x150 -f 10}
${voffset 90}
${execpi 10 ~/.conky/scripts/song-info.sh }${color0}
${font DejaVu Sans:style=Bold:size=14}Stock Quotes ${hr 2}${font}
${scroll 28 4 ${execpi 600 cat ~/.conky/tmp/ticker.txt }}${color0}
${font DejaVu Sans:style=Bold:size=14}Processes ${hr 2}${font}
${top name 1}${alignr}${color2}${top cpu 1}${color0}%
${top name 2}${alignr}${color2}${top cpu 2}${color0}%
${top name 3}${alignr}${color2}${top cpu 3}${color0}%
${top name 4}${alignr}${color2}${top cpu 4}${color0}%
${top name 5}${alignr}${color2}${top cpu 5}${color0}%
${font DejaVu Sans:style=Bold:size=14}Free Disk Space ${hr 2}${font}
#b ${color1}${fs_bar_free 16,180 /boot}${alignr}${color2}${fs_free /boot}${color0}
/ ${color1}${fs_bar_free 16,180 /}${alignr}${color2}${fs_free /}${color0}
/opt ${color1}${fs_bar_free 16,180 /opt/home}${alignr}${color2}${fs_free /opt/home/}${color0}${if_existing /dev/sde1}
/usr ${color1}${fs_bar_free 16,180 /media/tecnosegugio/musica}${alignr}${color2}${fs_free /media/tecnosegugio/musica}${color0}${endif}
${font DejaVu Sans:style=Bold:size=14}Device Activity ${hr 2}${font}
sdc ${color1}${diskiograph /dev/sdc 16,180 FFFF00 FFFF00 -l}${alignr}${color2}${diskio /dev/sdc}${color0}
sdd ${color1}${diskiograph /dev/sdd 16,180 FFFF00 FFFF00 -l}${alignr}${color2}${diskio /dev/sdd}${color0}${if_existing /dev/sde1}
sde ${color1}${diskiograph /dev/sde 16,180 FFFF00 FFFF00 -l}${alignr}${color2}${diskio /dev/sdd}${color0}${endif}
${font DejaVu Sans:style=Bold:size=14}Network ${hr 2}${font}
${if_existing /proc/net/route enp3s0}Nome: ${color2}enp3s0${color0}
${color1}${downspeedgraph enp3s0 16,180 00FF00 00FF00 -l}${alignr}${color2}${downspeedf enp3s0 }${color0}D
${color1}${upspeedgraph enp3s0 16,180 FF0000 FF0000 -l}${alignr}${color2}${upspeedf enp3s0 }${color0}U
U: ${color2}${totalup enp3s0}${color0}${alignr}${voffset -2} D: ${color2}${totaldown enp3s0 }${color0}
${execpi 3600 ~/.conky/scripts/enp3s0.sh}${endif}${if_existing /proc/net/route wlp4s0}Nome: ${color2}wlp4s0${color0}
${color1}${downspeedgraph wlp4s0 16,180 00FF00 00FF00 -l}${alignr}${color2}${downspeedf wlp4s0 }${color0}D
${color1}${upspeedgraph wlp4s0 16,180 FF0000 FF0000 -l}${alignr}${color2}${upspeedf wlp4s0 }${color0}U
U: ${color2}${totalup wlp4s0}${color0}${alignr}${voffset -2} D: ${color2}${totaldown wlp4s0 }${color0}
${execpi 3600 ~/.conky/scripts/wlp4s0.sh}${endif}${if_existing /proc/net/route usb0}Nome: ${color2}usb0${color0}
${color1}${downspeedgraph usb0 16,180 00FF00 00FF00 -l}${alignr}${color2}${downspeedf usb0 }${color0}D
${color1}${upspeedgraph usb0 16,180 FF0000 FF0000 -l}${alignr}${color2}${upspeedf usb0 }${color0}U
U: ${color2}${totalup usb0}${color0}${alignr}${voffset -2} D: ${color2}${totaldown usb0 }${color0}
${execpi 3600 ~/.conky/scripts/usb0.sh}${endif}
# Samples
#${font StyleBats:size=16}ABCDEFGHIJM${font}
#${font StyleBats:size=16}NOPQRSTUVWX${font}
#${font StyleBats:size=16}YZ${font}
#${font StyleBats:size=16}0123456789${font}
#
#${font PizzaDude Bullets:size=16}ABCDEFGHIJKLM${font}
#${font PizzaDude Bullets:size=16}NOPQRSTUVWX${font}
#${font PizzaDude Bullets:size=16}YZ${font}
#${font PizzaDude Bullets:size=16}0123456789${font}
]];

Stack trace

No response

Relevant log output

No response

@tecnosegugio tecnosegugio added bug Bug report or bug fix PR triage Issue that hasn't been verified labels Jan 7, 2023
@belrus65
Copy link

belrus65 commented Jan 9, 2023

Conky-Debug.txt
Having the same problem on debian testing. Cnky not detecting the xinerama area correctly. Here's the debug info:

DEBUG(0) [./src/conky.cc:1953]: reading contents from config file '/home/russell.belair/.config/conky/dreamlan/cyan/panels/center/middle/panel-1'
DEBUG(0) [./src/x11.cc:230]: enter init_x11()
DEBUG(0) [./src/x11.cc:319]: Fixed xinerama area to: 1680 0 3600 1080
DEBUG(0) [./src/x11.cc:268]: leave init_x11()
DEBUG(0) [./src/x11.cc:482]: enter x11_init_window()
DEBUG(0) [./src/x11.cc:319]: Fixed xinerama area to: 1680 0 3600 1080
conky: desktop window (6bd) is root window
DEBUG(0) [./src/x11.cc:459]: Found ARGB Visual
conky: window type - desktop
conky: drawing to created window (0x1400002)
DEBUG(0) [./src/x11.cc:848]: leave x11_init_window()
conky: drawing to double buffer
DEBUG(1) [./src/core.cc:2106]: no templates to replace
conky: forked to background, pid is 4414
conky: desktop window (6bd) is root window
conky: desktop window (6bd) is root window
conky: window type - desktop
conky: window type - desktop
conky: drawing to created window (0x1800002)
conky: drawing to created window (0x1c00002)
conky: drawing to double buffer
conky: forked to background, pid is 4415

DEBUG(1) [./src/display-output.cc:128]: Testing display output 'wayland'...
DEBUG(1) [./src/display-output.cc:128]: Testing display output 'x11'...
DEBUG(1) [./src/display-x11.cc:212]: Display output 'x11' enabled in config.
DEBUG(1) [./src/display-output.cc:130]: Detected display output 'x11'...

It only seems to be able to detect my first monitor, but the other 2 are not!

Here's is my xrandr setup:

Screen 0: minimum 320 x 200, current 5280 x 1080, maximum 16384 x 16384
DisplayPort-0 connected primary 1920x1080+1680+0 (normal left inverted right x axis y axis) 597mm x 336mm
1920x1080 60.00*+
1600x1200 60.00
1680x1050 59.88
1400x1050 59.95
1280x1024 75.02 60.02
1440x900 59.90
1280x960 60.00
1280x800 60.00
1152x864 75.00
1280x720 60.00
1024x768 75.03 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
640x480 75.00 72.81 66.67 59.94
720x400 70.08
DisplayPort-1 connected 1680x1050+3600+0 (normal left inverted right x axis y axis) 474mm x 296mm
1680x1050 59.97*+
1280x1024 75.02 60.02
1440x900 59.90
1280x960 60.00
1280x800 59.91
1152x864 75.00
1280x720 60.00
1024x768 75.03 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
640x480 75.00 72.81 66.67 59.94
720x400 70.08
DisplayPort-2 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
1680x1050 59.97*+
1280x1024 75.02 60.02
1440x900 59.90
1280x960 60.00
1280x800 59.91
1152x864 75.00
1280x720 60.00
1024x768 75.03 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
640x480 75.00 72.81 66.67 59.94
720x400 70.08
DisplayPort-3 disconnected (normal left inverted right x axis y axis)

@dbenedb
Copy link

dbenedb commented Jan 11, 2023

I found the same problem in Debian unstable with XFCE 4.18.
Linux 6.1.0-1-amd64 SMP PREEMPT_DYNAMIC Debian 6.1.4-1 (2023-01-07) x86_64 GNU/Linux
conky version: 1.17.0

I have two monitors: 2560x1440 (primary) and 1280x1024 (secondary). Conky should be displayed on the secondary one, but right now its not.

relevant part of conky.conf:

conky.config = {
alignment = 'top_left',
border_width = 0,
cpu_avg_samples = 2,
double_buffer = true;
draw_borders = false,
draw_graph_borders = true,
draw_outline = false,
draw_shades = false,
use_xft = true,
xftalpha = 1,
font = 'DejaVu Sans Mono:size=9',
gap_x = 0,
gap_y = 0,
minimum_height = 1024,
minimum_width = 1280,
maximum_height = 1024,
maximum_width = 1280,
max_port_monitor_connections = 64,
net_avg_samples = 2,
no_buffers = true,
out_to_console = false,
out_to_stderr = false,
extra_newline = false,
own_window = true,
own_window_type = 'desktop',
own_window_hints = 'below',
own_window_argb_visual = true,
own_window_argb_value = 0,
own_window_transparent = false,
stippled_borders = 0,
update_interval = 0.5,
uppercase = false,
use_spacer = 'none',
show_graph_scale = false,
show_graph_range = false,
xinerama_head = 1
}

debug info: conky -DD

DEBUG(0) [./src/conky.cc:1953]: reading contents from config file '/home/me/.config/conky/conky.conf'
DEBUG(0) [./src/x11.cc:230]: enter init_x11()
DEBUG(0) [./src/x11.cc:319]: Fixed xinerama area to: 1280 0 3840 1440
DEBUG(0) [./src/x11.cc:268]: leave init_x11()
DEBUG(0) [./src/x11.cc:482]: enter x11_init_window()
DEBUG(0) [./src/x11.cc:319]: Fixed xinerama area to: 1280 0 3840 1440
conky: desktop window (160000d) is subwindow of root window (6f4)
DEBUG(0) [./src/x11.cc:459]: Found ARGB Visual
conky: window type - desktop
conky: drawing to created window (0x2800002)
DEBUG(0) [./src/x11.cc:848]: leave x11_init_window()
conky: drawing to double buffer
conky: Unknown setting 'maximum_height'
DEBUG(1) [./src/core.cc:2103]: replaced all templates in text: input is

xrandr:

Screen 0: minimum 320 x 200, current 3840 x 1440, maximum 16384 x 16384
DisplayPort-0 connected primary 2560x1440+1280+0 (normal left inverted right x axis y axis) 597mm x 336mm
2560x1440 59.95*+
1920x1200 59.95
1920x1080 60.00 60.00 50.00 59.94
1600x1200 59.95
1280x1440 59.91
1680x1050 59.95
1400x1050 59.98
1280x1024 75.02 60.02
1440x900 59.89
1280x960 60.00
1280x800 59.81
1152x864 75.00
1280x720 60.00 50.00 59.94
1024x768 75.03 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
720x576 50.00
720x480 60.00 59.94
640x480 75.00 72.81 66.67 60.00 59.94
720x400 70.08
DisplayPort-1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 375mm x 300mm
1280x1024 60.02*+ 75.02
1280x960 60.00
1280x800 60.02
1152x864 75.00
1280x720 60.00 50.00
1024x768 75.03 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
720x576 50.00
720x480 59.94
640x480 75.00 72.81 66.67 60.00 59.94
720x400 70.08
DisplayPort-2 disconnected (normal left inverted right x axis y axis)
HDMI-A-0 disconnected (normal left inverted right x axis y axis)

@LucasSymons
Copy link

Weirdly having the same issue but on an earlier version from OP
I am on 1.16.1

The only extra info I have to add is I get this output if I try to update the xinerama_head setting in my config file while conky is running.

conky: '/home/user/.conky/conky-grapes/conky_gen.conkyrc' modified, reloading...
DEBUG(0) [/usr/src/debug/conky-lua-nv/conky-1.16.1/src/x11.cc:272]: deinit_x11()
Segmentation fault (core dumped)

I did a test and can confirm I don't have this issue using 1.12.2
Sorry that was the only other version I could quickly find in the AUR

@eh
Copy link

eh commented Jan 12, 2023

Same issue on Arch + Cinnamon. I have fallen back to 1.15.0.

1.16.0 was giving me some sort of table error and 1.16.1 behaves the same as 1.17.0.

@b1337xyz
Copy link

1.17.0 ignoring xinerama_head = 1 on Arch (i3wm), downgrading to 1.50.0 solved too

@skunktrading
Copy link

skunktrading commented Jan 14, 2023

1.17.0 ignoring xinerama_head = 1 on Arch (xfce), downgrading to 1.15.0 solved too

@kewlfft
Copy link

kewlfft commented Jan 14, 2023

Same issue on a 2 monitors setup, I am using gap_x = -1908 to circumvent the problem

@derbetakevin
Copy link

Same issue on Arch GNOME on Wayland and xorg.

@ipaqmaster
Copy link

ipaqmaster commented Jan 22, 2023

Did my Arch updates this morning with a reboot and 1.17.0 is behaving correctly now, starting on the correct monitor.

(This was transient, apologies for the misleading comment!)

@karabaja4
Copy link

Same issue on Arch and conky 1.17.0, downgrading to 1.15.0 fixes it.

@lantorax
Copy link

another work around: You can change the monitor that is primary and load conky. It'll appear on that monitor, then you can switch the primary back to your normal primary.

@Tomasu
Copy link

Tomasu commented Feb 11, 2023

I have the same issue, and think I figured out the problem. The settings appear to be order dependent, and the xinerama_head config setting wasn't listed in the order dependent config setting list. So when the own_window config was "set" (which is where the x11 window appears to be created), the xinerama_head config item hadn't been loaded/processed yet so defaulted to 0.

The following appears to fix the problem.

index 24909c90..7b69683d 100644
--- a/src/setting.cc
+++ b/src/setting.cc
@@ -98,6 +98,7 @@ const std::vector<std::string> settings_ordering{
     "border_outer_margin",
     "border_width",
     "alignment",
+    "xinerama_head",
     "own_window_transparent",
     "own_window_class",
     "own_window_title",

@ipaqmaster
Copy link

Thanks for digging into this.

I built from source and experienced the issue just as to check. Then built again with your change there and it launched on the correct monitor. Looks like the right fix

brndnmtthws added a commit that referenced this issue Feb 18, 2023
brndnmtthws added a commit that referenced this issue Feb 18, 2023
simotek pushed a commit to simotek/conky that referenced this issue Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report or bug fix PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.