얼마 전에 데스크탑 게시판에 lightdm 해상도 문제에 대한 질문을 올리면서 함께 hdmi 로 출력된 화면 사이드 부분이 조금씩 짤리는 문제에 대해서도 질문을 했었는데요 더 검색을 하다 보니까 xrandr 의 transfomr 옵션으로 해결한 사례가 있는 것 같던데 이것은 이쪽 게시판의 성격에 더 맞는 것 같아서 별도로 질문을 드립니다.
해결한 사람은 아래의 명령어를 주었다는데요…
xrandr –output HDMI1 –transform 1.05,0,-35,0,1.05,-19,0,0,1
그래서 저도 그대로 따라하려고 하니 두 가지 문제가 발생했습니다.
하나는 man xrandr 을 해 보니까 output 옵션은 사라졌고, 그것이 display 옵션으로 바뀐 것 같아서 그렇게 대치하고 명령을 주면 이제는 transform 옵션을 인식하지 못하겠다고 하며 실행이 되지 않네요. 어떤 식으로 명령을 주어야 하는지 알았으면 하고요.
다른 하나는 뒤의 파라미터 값이 무려 9개가 있는데 man의 설명을 아무리 봐도 수식이 들어간 설명이다 보니 도통 무슨 소리인지 모르겠습니다. 그래서 혹시 능력자분이 계신다면 아래 설명을 보시고 각 파라미터에 어떤 값을 입력해야 하는지 알려주신다면 대단히 고맙겠습니다. (아마도 a 부터 f 까지만 알면 될 것 같은데요.)
–transform a,b,c,d,e,f,g,h,i
Specifies a transformation matrix to apply on the output. Auto‐
matically a bilinear filter is selected. The mathematical form
corresponds 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 coordi‐
nate and multiplied against the matrix. The final device coordi‐
nates of the pixel are then calculated with the so-called
homogenic division by the transformed w coordinate. 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) .
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 rotation. 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).