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

Dual monitor setup, alignment applies to main monitor, not the whole realestate #249

Closed DoTheEvo closed 6 months ago

DoTheEvo commented 8 years ago

arch linux, conky updated to 1.10.2

dual monitor setup here, main 24" large monitor center, smaller one 17" left of it

I use alignment = 'top_left' and it seems that the last update changed the [0, 0] coordinates from my top left point on my second monitor to top left point on my main one

Dual monitor setup I have done through xorg.conf and absolute positioning.

Dont really have any problem once I re-adjust, just that if that there was some intentional change to the way things get positioned, or this is some quirk that should be brought up...

bldewolf commented 8 years ago

I was having the same issue as you and found a new "xinerama_head" config option. If you set it to an integer (I found experimentally that the number I wanted was 3), you can change which monitor conky aligns itself on.

ghost commented 8 years ago

You can also use the -x command line option which specifies the X11 display to use. eg: conky -x [display] -c [config]

(did not test this myself)

DennisBusch commented 8 years ago

The "xinerama_head" option in ".conkyrc" works for me as well to solve this even though I have xinerama turned off in my "xorg.conf" (using nvidia TwinView and proprietary nvidia drivers).

bldewolf commented 8 years ago

Yeah, xinerama is a bit silly like that. "Xinerama" can actually refer to two different things:

1) A static multi-monitor config syntax in xorg.conf that's no longer used anymore 2) A protocol extension for clients to query the server about monitors and their locations

So, even though we don't use 1 anymore, 2 is alive and well and happily provides information from TwinView, xrandr, etc.

NoXPhasma commented 8 years ago

xinerama_head works for me too on my Nvidia dual monitor setup.

Vladimir-csp commented 8 years ago

Strange. I have three monitors like this:

------------          ------------
|          |----------|          |
|          ||        ||          |
|          ||        ||          |
----------------------------------

With alignment = 'middle_right' Using ximerama_head = 0, conky draws on left (primary) monitor. with ximerama_head = 1 it draws on the right monitor but at wrong heiht, as if height is for middle monitor. with ximerama_head = 2 it renders somewhere offscreen with ximerama_head = 3 it draws correctly on right monitor

Anyway, concept of static ximerama_head parameter is very limiting, especially on dynamic setups (my configuration is a laptop in a dock). Some positional/contextual values to choose monitor should be supported, like: primary, framebuffer, workarea, leftmost_middle, top_leftmost, milddle_leftmost, bottom_rightmost, middle_middle, etc.

Lahorde commented 8 years ago

Same issue on archlinux with conky 1.10.2 on dual screen with a dock. Before I used top_right alignment without any issue : conky was aligned on my main monitor, when I plugged / unplugged my second monitor (primary screen), conky moved to right place. Now it is out of screen, but top_left alignment is ok, center alignment is ko. I often unplug / plug from dock station and conky does not move.

After reading this post I added

xinerama_head = 2

It correctly aligns conky on my 2 monitors but adding / removing monitor does not move conky. I discovered saving conky config file after a monitor plug / unplug moves conky to right place. So I added this line in a script being run (from udev) when a monitor is plugged / unplugged to force conky update :

killall -SIGUSR1 conky
pgmillon commented 8 years ago

Some issue here too with alignement (conky 1.10.2), even when playing with xinerama_head. I'm trying to have something aligned middle_middle only on my primary screen while a second screen is attached and placed on the left.

JPvRiel commented 8 years ago

For others bumping into this or similar dual screen issues, the version on Ubuntu 16.04 LTS is sadly too old to incorporate the fix needed (https://github.com/Francesco149/conky/commit/162d9d13b7fe27ded15860e9ac311f4e07e7d40a) for https://github.com/brndnmtthws/conky/issues/172, which preceeds this issue.

$ conky --version
conky 1.10.1 compiled Wed Jan  6 17:11:44 UTC 2016 for Linux 3.19.0-43-generic x86_64

has the output

conky: Unknown setting 'ximerama_head'

when using the following in the conky.config = { ... } section

ximerama_head = 0,
ghost commented 8 years ago

Does your conky -v output contain ximera (under X11) ? If not you have to compile conky with the build flag BUILD_XINERAMA enabled.

JPvRiel commented 8 years ago

@Nooby4Ever, thanks it doesn't. I assume thats because v 1.10.1 packaged with the distro lacks the patches for xinerama anyhow?

ghost commented 8 years ago

The standard packages usually use only the "core/standard" build flags to make them compatible for anyone. Options like xinerama, most likely, require to enable them yourself (aka recompiling). Some distros have multiple conky packages with different build flags enabled (eg. arch linux) so you can choose.

I do not know exactly when xinerama support was added, but indeed possibly after 1.10.1.

plikhari commented 8 years ago

It was 1.10.2 ;-)

JPvRiel commented 8 years ago

@plikhari Thanks, used https://launchpad.net/~vincent-c/+archive/ubuntu/conky which has 1.10.3 and ximerama_head = 0, works as expected now :+1:

Of course, I'm not saying this fixes @DoTheEvo issue raised here, just that Ubuntu 16.04 users can work around the broader dual screen limitation by using the PPA.

lasers commented 6 years ago

2 years 3 months passed. Can you determine if you're still having this problem today on 1.10.8 or 1.10.9_pre? The older versions are not trustworthy. Thank you.

NoXPhasma commented 6 years ago

Yes, the problem still persists. Without xinerama_head = 1 conky will always start on the right monitor, instead of the left.

Here's my xrandr output, if that might help:

$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 32767 x 32767
DVI-D-0 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080     60.00*+
   1680x1050     59.95  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1152x864      75.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32    56.25  
   640x480       75.00    59.94  
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 518mm x 32mm
   1920x1080     59.93*+
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   640x480       75.00    72.81    59.94  
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)
jovanemarques commented 6 years ago

Hello people. As a hint, do not forget to check the minimum_size. In my case was configured with 2560 0 and was showing the conky out of the screen. Check it, just in case.

lasers commented 6 years ago

@NoXPhasma How about now on current git? We had a couple of xinerama PRs merged recently.

NoXPhasma commented 6 years ago

Still the same, without xinerama_head = 1 it starts on the right monitor.

germanfr commented 6 years ago

xinerama_head doesn't work. Is there any official way to run it on the primary monitor at startup? If I kill conky and start it again manually it runs in the primary monitor, but on autostart it runs on the second.

lasers commented 6 years ago

official way

This is probably it. Obviously we have a bug somewhere.

Did you try numbers outside of total number of monitors too? How are you autostarting it? See if you can try alternative autostart it via a manual script instead of whatever it is that you're currently autostarting.

Alternatively, you could try touch -m ~/.conkyrc first to force reload conky after a startup. See if that changes anything for you.

germanfr commented 6 years ago

@lasers it doesn't work because: conky: Unknown setting 'ximerama_head'.

I start it via Cinnamon settings, I don't know how does it do it. I just discovered that if I set a delay of ~30s it spawns ok in the primary monitor (but ximerama still fails).

And by an official way I mean a setting called "monitor" or something like that, that works out of the box without having to compile it myself. I just want to use what I can download from the distro servers.

lasers commented 6 years ago

Typo? xinerama_head with a n. Conky does not have a GUI for settings and/or other things.

Otherwise... If you want to, you can try current master. Among the fixes and new options, there are few relating to xinerama_head and alignment too... which you may find that interesting to know.

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

Your issue can be #218 which is why I suggested to try touch -m ~/.conkyrc to do a force reload and/or to start up differently instead of whatever it is that you're using to start up.

smac89 commented 5 years ago

You can also specify --xinmera-head=n on the command line which will allow you to launch conky on multiple displays using the same config.

This was exactly what I was searching for.

conky -v

➜ conky -v         
conky 1.11.3_pre compiled Thu May  2 13:25:17 CST 2019 for Linux 5.0.10-arch1-1-ARCH x86_64

Compiled in features:

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

 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * Curl
  * Weather (METAR)
  * wireless
  * nvidia
  * builtin default configuration
  * old configuration syntax
  * Imlib2
  * OSS mixer support
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support
  * PulseAudio

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

 Music detection:
  * CMUS

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

Strange. I have three monitors like this:

------------          ------------
|          |----------|          |
|          ||        ||          |
|          ||        ||          |
----------------------------------

With alignment = 'middle_right' Using ximerama_head = 0, conky draws on left (primary) monitor. with ximerama_head = 1 it draws on the right monitor but at wrong heiht, as if height is for middle monitor. with ximerama_head = 2 it renders somewhere offscreen with ximerama_head = 3 it draws correctly on right monitor

Anyway, concept of static ximerama_head parameter is very limiting, especially on dynamic setups (my configuration is a laptop in a dock). Some positional/contextual values to choose monitor should be supported, like: primary, framebuffer, workarea, leftmost_middle, top_leftmost, milddle_leftmost, bottom_rightmost, middle_middle, etc.

Hi, it is an old issue though... I just tried and found setting the para to 2 and using 'top_middle' make it work. Conky panel will appear on the right of the second screen(3 in total). Hope it helps...

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment, or this issue will be closed in 30 days.

github-actions[bot] commented 6 months ago

This issue was closed because it has been stalled for 30 days with no activity.