Ubuntu 20.04에는 4K(3840x2160) TV와 1080p 모니터라는 2개의 화면이 있습니다. TV를 기본 화면으로, 1080p를 백업으로 미러링하고 싶습니다. 그리고 이미지가 두 화면 모두에서 4k로 렌더링되어 정확히 동일하게 표시되기를 원합니다. 디스플레이 설정을 통해 둘 다 최대 1080p까지만 선택할 수 있으므로 를 사용하려고 했지만 xrandr
성공하지 못했습니다. 내가 달성할 수 있는 최대치는 두 화면 모두에서 4k를 렌더링하는 것이지만 1080p 화면에서는 이미지가 자르고 이미지의 1/4만 표시됩니다.
xrandr --prop
:
HDMI-0 connected (normal left inverted right x axis y axis)
CTM: 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0
0 1
CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0
EDID:
00ffffffffffff0061a4e20001000000
0a1d0103806f3e780acf74a3574cb023
09484c21080081804540614095000101
010101010101023a801871382d40582c
4500c48e2100001e662150b051001b30
40703600c48e2100001e000000fc004d
692054560a20202020202020000000fd
00324b1e5017000a2020202020200150
02033df251010304050790121314161f
5d5e5f6263642f097f07150750570600
3d06c05f7e01830100006e030c001000
b83c20008001020304e3060501011d00
bc52d01e20b8285540c48e2100001e01
1d80d0721c1620102c2580c48e210000
9e000000000000000000000000000000
000000000000000000000000000000bc
BorderDimensions: 4
supported: 4
Border: 0 0 0 0
range: (0, 65535)
SignalFormat: TMDS
supported: TMDS
ConnectorType: HDMI
ConnectorNumber: 1
_ConnectorLocation: 1
non-desktop: 0
supported: 0, 1
1920x1080 60.00 + 59.94 50.00 60.00 50.04
4096x2160 29.97 25.00 24.00 23.98
3840x2160 29.97 25.00 23.98 23.98
1440x900 59.89
1360x768 60.02
1280x1024 60.02
1280x720 59.94 50.00
1024x768 60.00
800x600 60.32
720x576 50.00
720x480 59.94
640x480 59.94 59.93
HDMI-1-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
_MUTTER_PRESENTATION_OUTPUT: 0
EDID:
00ffffffffffff0010acdad042394435
2b1d010380351e78ea0565a756529c27
0f5054a54b00714f8180a9c0d1c00101
010101010101023a801871382d40582c
45000f282100001e000000ff00484c36
593159320a2020202020000000fc0044
454c4c205032343139480a20000000fd
00384c1e5311000a20202020202001fb
020317b14c9005040302071601141f12
1365030c001000023a801871382d4058
2c45000f282100001e011d8018711c16
20582c25000f282100009e011d007251
d01e206e2855000f282100001e8c0ad0
8a20e02d10103e96000f282100001800
00000000000000000000000000000000
0000000000000000000000000000003d
PRIME Synchronization: 0
supported: 0, 1
HDCP Content Type: HDCP Type0
supported: HDCP Type0, HDCP Type1
Content Protection: Undesired
supported: Undesired, Desired, Enabled
max bpc: 12
range: (8, 12)
content type: No Data
supported: No Data, Graphics, Photo, Cinema, Game
Colorspace: Default
supported: Default, SMPTE_170M_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, DCI-P3_RGB_Theater
aspect ratio: Automatic
supported: Automatic, 4:3, 16:9
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
link-status: Good
supported: Good, Bad
CONNECTOR_ID: 74
supported: 74
non-desktop: 0
range: (0, 1)
1920x1080 60.00*+ 50.00 59.94
1920x1080i 60.00 50.00 59.94
1600x900 60.00
1280x1024 75.02 60.02
1152x864 75.00
1280x720 60.00 50.00 59.94
1024x768 75.03 60.00
800x600 75.00 60.32
720x576 50.00
720x576i 50.00
720x480 60.00 59.94
720x480i 60.00 59.94
640x480 75.00 60.00 59.94
720x400 70.08
3840x2160_60.00 60.00
3840x2160_29.97 29.97
나는 시도했다:
xrandr --fb 3840x2160 --output HDMI-0 --rate 29.97 --mode 3840x2160 --output HDMI-1-1 --rate 29.97 --mode 1920x1080 --panning 0x0 --scale 2x2
게다가:
xrandr --fb 3840x2160 --output HDMI-0 --rate 29.97 --mode 3840x2160 --output HDMI-1-1 --rate 29.97 --mode "3840x2160_29.97" --panning 0x0
"3840x2160_29.97"은 다음의 결과입니다 gtf
.
gtf 3840 2160 29.97
내 목표가 로도 달성될 수 있나요 xrandr
? 어떻게 해야 하나요? 그리고 로 불가능하다면 xrandr
다른 방법은 없나요?
답변1
#!/bin/bash
mode="3840x2160_60.00"
screen="HDMI1"
cvt_res="712.75 3840 4160 4576 5312 2160 2163 2168 2237 -hsync +vsync"
if [[ "$(xrandr|grep $mode)" ="" ]];
then
xrandr --newmode $mode $cvt_res &&
xrandr --addmode $screen $mode
fi
xrandr --output HDMI-0 --mode "3840x2160" --output $screen --mode "1920x1080" --scale 2.0x2.0 --panning 3840x2160
위 작업을 실행하면 UHD 화면의 콘텐츠 크기가 조정되지만 화면의 3/4이 검은색으로 표시됩니다. 그런 다음 수동으로 디스플레이 설정으로 이동하여 두 디스플레이를 모두 3840x2160 미러링으로 변경하면 원하는 결과를 얻을 수 있습니다. 그러나 불행하게도 이 작업은 시작할 때마다 수행되어야 합니다.
추신: 다음은원천나는 사용했다.
편집: Nvidia에 의해 자동 생성된 파일이 xorg.conf
문제를 일으키는 것 같습니다!