Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have two outputs that I'd like to use on my laptop:

LVDS1 - 1366x768
HDMI1 - 1920x1080

I set my monitors up like so:

xrandr --output LVDS1 --auto --output HDMI1 --auto --right-of LVDS1

This is all well and good, but my laptop sits considerably lower than my external monitor, and with the top edges of the screens being aligned, it makes the jump from one screen to the other rather unintuitive. Is there a way I can align the bottom edges instead? I thought I could use the --pos flag to do this, but I have tried and not seen any difference (perhaps I do not know how to use it properly).

EDIT: Solved. Thanks to tink's link, I deconstructed the Python script and discovered the way to do this is as follows:

xrandr --output LVDS1 --pos 0x312   # 312 = 1280 - 768
xrandr --output HDMI1 --pos 1366x0

Not sure I understand exactly what the --pos flags are doing here, but it at least works!

share|improve this question

2 Answers 2

up vote 7 down vote accepted
 xrandr --output LVDS1 --auto --pos 0x312 --output HDMI1 --auto --pos 1366x0

Basically, --pos specifies the position of the upper left corner of the screen in the virtual screen space. The virtual screen is a screen that spans your entire physical screens. This is a very generic way of specifying screen positions.

You want this configuration:

(virtual screen coordinates)
     0       1366                 1366+1920

   0           A-----------------------
               |                      |
               |                      |
               |                      |
  x? B---------|         HDMI         |
     |         |                      |
     |  LVDS   |       1920x1080      |
     |1366x768 |                      |
1080 ----------------------------------

And you need the coordinates of A and B to use in the --pos option. x is easily solved as 1080 - 768 = 312, so A is at (1366,0) and B is at (0,312).

Therefore, the appropriate --pos options are --pos 1366x0 for HDMI and --pos 0,312 for LVDS. You don't have to specify the virtual screen size (anymore), it is resized automatically.

Note that --pos can be abused, for exemple to create a hole between your two screens, or create overlapping. Most (all?) WM will not be able to handle that through.

EDIT: oh, you want the other way around, fixed that.

share|improve this answer
    
Heh, figured this out right before you posted. Would you be able to explain how the --pos flag works? –  denaje Oct 8 '12 at 20:11
    
Thanks, this makes a lot of sense! I think you want to replace 1600 with 1080 in your example, though. –  denaje Oct 9 '12 at 7:37
    
@denaje: Fixed. –  BatchyX Oct 9 '12 at 17:50
    
Is there no way to do it within xrandr without using magic values? I'd like to have a script that works regardless of the resolution of the screen I plug in. If not I guess I could extract the values from xrandr's output, but that sounds a little tedious… –  Khaur 2 days ago

Someone managed ... hope this helps?

Dual Screens with aligned bottom edges

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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