Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a 1920x1200 monitor, and have some situations where I want to force the output to the more common 1920x1080. However, I don't want to distort the output, and would prefer a "cropping" black bar at the bottom.

Using xrandr --output DP1 --mode 1920x1200 --fb 1920x1080 doesn't work correctly. The bottom 120 pixels are indeed removed, but the KDE panel at the bottom of the screen is missing. Then, after alt-tabbing, my windows become vertically squashed, and my mouse-clicks correspond to different (unsquashed) positions.

Some have suggested using xrandr fb and transform in the general case, but I cannot understand how transform works. Is this approach suitable for my case, and if so, what command would I use?

From man xrandr

   --transform a,b,c,d,e,f,g,h,i
          Specifies a transformation matrix to apply on the  output.  Automati‐
          cally  a  bilinear  filter is selected.  The mathematical form corre‐
          sponds to:
                 a b c
                 d e f
                 g h i
          The transformation is based on homogeneous  coordinates.  The  matrix
          multiplied  by  the  coordinate vector of a pixel of the output gives
          the transformed coordinate vector of a pixel in the  graphic  buffer.
          More precisely, the vector (x y) of the output pixel is extended to 3
          values (x y w), with 1 as the w coordinate and multiplied against the
          matrix. The final device coordinates of the pixel are then calculated
          with the so-called homogenic division by the  transformed  w  coordi‐
          nate.   In  other words, the device coordinates (x' y') of the trans‐
          formed pixel are:
                 x' = (ax + by + c) / w'   and
                 y' = (dx + ey + f) / w'   ,
                 with  w' = (gx + hy + i)  .
          Typically, a and e corresponds to the scaling on the X and Y axes,  c
          and  f  corresponds to the translation on those axes, and g, h, and i
          are respectively 0, 0 and 1. The matrix can also be used  to  express
          more  complex  transformations  such as keystone correction, or rota‐
          tion.  For a rotation of an angle T, this formula can be used:
                 cos T  -sin T   0
                 sin T   cos T   0
                  0       0      1
          As a special argument, instead of passing a matrix, one can pass  the
          string none, in which case the default values are used (a unit matrix
          without filter).

N.B. I have asked this previously at Unix & Linux StackExchange, but received no answer. I'll remove the dupe if I get an answer at either site.

share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.