10

The left side of my full hd monitor is broken, in order to use only the good part the resolution needs to be 1274x1080, aligned to the right.

A simple xrandr -s 1274x1080 will get the right resolution, but centered. Using --transform 1,0,-323,0,1,0,0,0,1 will move the screen but will not occupy the right side.

I already tried to play with modeline using the link given in this answer, but it does not move the screen no matter what I change.

0

1 Answer 1

11

You are not far wrong with that --transformation!

The point is that you not only want to shift the screen to the right, but also you need to shrink it by half in the horizontal axis. To do so lets refer to the xrandr manual where we read:

--transform a,b,c,d,e,f,g,h,i

(...)

In other words, the device coordinates (x' y') of the transformed pixel are:

                 x' = (ax + by + c) / w'   and
                 y' = (dx + ey + f) / w'   ,
                 with  w' = (gx + hy + i)  .

Hence, to shift output to the right, scale down X axis by 2, leave Y axis as is, and don't perform any other operations (rotation, inversion, etc) one should do

xrandr --output LVDS1 --transform 2,0,-1920,0,1,0,0,0,1

Above I assumed your normal resolution is 1920x1080 (you mentioned full hd, and this is how they call it). Obviously a change display name to yours.

If only small part of the monitor is broken (not half) then you need to do some calculation:

a = 1/(1-broken_fraction)
c = (1-a)*resolution

so if broken is 1/3 we have a=1.5, c=-960:

xrandr --output LVDS1 --transform 1.5,0,-960,0,1,0,0,0,1

Of course you can change resolution with the same command in which case some recalculation may be needed.

1
  • It's sad you never got any reply from the user. Well done, it's a nice calculation and explaination!
    – ReneFroger
    Aug 26, 2018 at 11:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .