6

I have three monitors of varying resolutions, especially in the height dimension where they sit side by side. My main monitor is 4K (2160h) in the middle and I have two smaller monitors either side: 1200h on one side and 768h on the other.

The problem is the 4K monitor is beautiful and tight, but the others are larger old monitors but they each serve their purpose. The 1900x1200 monitor is physically the same size as the 4K monitor but pixel for pixel the 4K is almost double the height.

This means for half of the 4K screen my mouse cursor "bumps" the edge and I have to move up or down to get into the smaller monitor. It's worse on the other side.

Given the main and second monitors are the same height I would like for the mouse cursor to translate some Y coordinate so that going off the bottom of one monitor equalled the same position on the other monitor and the same on return.

Is it possible to have monitors of two different pixel heights, side-by-side but have their bottoms and tops align on the desktop?

Mathematically, as the mouse moved from 1>2 the Y coordinate would halve so that it "appeared" to be at the correct position, and would again double on the way back.

edit: This is the situation as it appears on my system below. I could make the screens align to the top (making the "break" at the bottom of the screens), or move them to the middle where the mouse would catch every time at both the top and the bottom (most un-ideal).

Reading over the solutions that have been presented recently, I have played extensively with the GUI settings and no amount of what I have available to me allows me to achieve "alignment".

Utilising the scale option affects ALL monitors and does the reverse of what I'd like. Going to 200% (which if applied to a single monitor, I could handle), blows up all screens to 200%. If I could blow up JUST the side monitors, I'd be happy. YES, they'd be grainy and ginormous, but I would have specific things on that screen that suit what's being displayed there.

I'd like to be proven wrong, but I have been searching for a solution for this for years. I do not believe it is possible.

I did just mention in a comment that I have achieved something similar in another product called "synergy". I haven't used this in a number of years, but it's use case is particular to a virtualised KVM network of computers running together. In the synergy system, you could align the exit and entry points of one monitor to the next regardless of height mismatch. I do not know if this is still the case, I have not used the product in over a decade (and surviving buy outs and takeovers), AND it's usage is grossly different to what I use now. THEN I used synergy to remote desktop one computer across a network of 4 and all the screens touched each other. It WAS a sweet solution. However, the main difference is applications were always restricted to their own desktops. You couldn't have an application spanning remote desktops. Hence the mouse movement was a lot simpler. you can see the side-by-side discrepancy

  • 1
    I have the same issue, would love to see a mthod to do this. – Denny Apr 25 '19 at 11:22
  • I have 1920x1080 + 3480x2160 + 1920x1080 screens as of two days ago. Also dealing with this and other issues. – WinEunuuchs2Unix Apr 25 '19 at 11:52
  • Interesting question. Would need a background proc to watch if mouse is at (0, whatever-y), then jump to left monitor (x-resolution, relative-y) and vice-versa. Could be done. – Jacob Vlijm Apr 25 '19 at 12:22
  • Mind though that if a window spans multiple screens, the mouse will make a weird jump in your case. – Jacob Vlijm Apr 26 '19 at 6:51
  • I don't have two monitors with different resolutions available to test but you can fix this with xrandr. I'm not certain but this might be answered in this question: askubuntu.com/questions/393400/… – Jarad Downing May 1 '19 at 19:56
3
+50

You can adjust the position of your screen, either using the GUI (In xubuntu, using xfce4-display-settings, but I'm sure gnome has a equivalent) or using xrandr.

This is something that you have to do manually, because the computer has no way of knowing the relative physical location between both monitors. They might be top aligned, one might be in the middle, etc. As long as you tell the computer where the second is, you can properly align them based on where they physically are. With a bit of experimentation, you can get something that works very well.

Using the GUI, it is as simple as dragging and dropping. As you can see on the image below, the screen on the right is aligned to the top left of the other one. You can simply click it and drag it, moving it upwards or downwards depending on your preference.

enter image description here

Using xrandr, the relevant setting is --pos.

   --pos xxy                                                 
          Position  the  output within the screen using pixel coordinates. In
          case reflection or rotation is applied, the translation is  applied
          after the effects.

The position 0x0 is the top left corner of all the screens. For example, assuming you have two monitors, a main one, on the left, with a resolution of 1920x1080 and a second one positioned on the right, with the resolution of 1280x960. If their top pixel was physically aligned, you would want to use a command similar to this: xrandr --output SCREENNAME --auto --pos 1920x0. This indicates that you want it shifted 1920 pixels on the x axis (horizontal) and placed at the pixel 0 on the y axis (vertical). If, instead it was bottom aligned you would instead use: xrandr --output SCREENNAME --auto --pos 1920x120, which is 1080 minus 960.

Something to help you visualize it.

(virtual screen coordinates)           The x margin is 3200 pixels
     0                                 The y margin is 1080 pixels
   0 A-----------------------          A position is 0x0
     |                      |          B position is 1920x120
     |                      |B---------------
     |                      |               |
     |         MAIN         |      SEC      |
     |                      |               |
     |       1920x1080      |    1280x960   |
     |                      |               |
1080 ----------------------------------------

For your setup you probably also want to use --scale, since the pixel sizes are very different. You'll have to play with the values to get something to your liking, but it's a big trade off. You might be able to get something good looking if you maintain sane proportions.

   --scale xxy
          Changes the dimensions of the output picture. Values superior to  1
          will  lead to a compressed screen (screen dimension bigger than the
          dimension of the output mode), and values below 1 leads to  a  zoom
          in on the output. This option is actually a shortcut version of the
          --transform option.

   --scale-from wxh
          Specifies the size in pixels of the area of the framebuffer  to  be
          displayed  on this output.  This option is actually a shortcut 
          version of the --transform option.

With this information in mind, and knowing the other basics of using xrandr, like the name of each screen, choosing their resolution, refresh rate, flipping, or any other special settings that you want to use in your setup, you can easily align all of your monitors, so that their physical location match their virtual one. Check man xrandr for plenty of useful commands.

| improve this answer | |
  • Aligning screens is the most practical solution, hence why I like this. – Sergiy Kolodyazhnyy May 2 '19 at 19:43
  • It does not answer the question 100% though. Aligning the screens with GUI or with terminal doesn't matter, they are not acting like two screens with the same resolution. We want the physcal position of the mouse to exit-->enter the screens at the same height, given that the panels are the same size (but different res) If I understood the answer correctly, it's allignment and not much else. If not, I am very sorry and I am open for eye-openers. Although I want to provide you with the bounty as the answer was well written and well explained, which i appreciate. – Denny May 3 '19 at 11:36
  • Hey guys, I've only just seen there's been a discussion on this question recently. This is still a problem that plagues me and I'll add some screenshots to the original question shortly. I am running a 4K and HD monitor side-by-side and this problem is a real PITA for me. Many years ago I use to use a solution (synergy??) and by all recollections, it use to scale screen boundaries perfectly. Running different resolutions weren't a problem, but that was in a use case where you did not have application windows spanning boundaries. It was one KVM of one machine virtualized against another. – Madivad May 3 '19 at 13:44
  • I have re-read this a number of times and I think you have missed the point. --scale doesn't change the scale of one monitor compared to another, it changes all monitors with respect to everything. ALL pixels become 200/300/400%.. If only the outside monitors increased at 200% I'd be happy. I then wouldn't get the horrible trapping of the cursor. I am happy to post snippets of any config file you need, my resolutions are 3840x2160 and 1920x1200. I need the 2160 and 1200 edges to align (I don't mind a small trap in the corner, but at the moment it is almost 1000px high!). – Madivad May 3 '19 at 14:21
  • Hi @Madivad - did you get your issue resolved yet? As this thread did not really solve my problem, and I suppose we both have the same issue.. – Denny Jun 20 '19 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.