我有以下代码,其中我的 VGA 输出总是显示超出范围。我该如何解决?
$ cvt 1024 768
$ xrandr --newmode shvga 74.50 1024 1072 1176 1328 768 771 775 798
$ xrandr --addmode VGA-1 shvga
$ xrandr --output VGA-1 --mode shvga
我还应用了 xrandr --output VGA-1 --mode shvga --rate 60 或 70,但都无济于事。有永久的解决方案吗?
跟进:(参考:http://grenage.com/xorg.html)
答案1
$ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GeForce GT 620 (rev a1)
$ apt-get install xresprobe
$ sudo ddcprobe
vbe: VESA 3.0 detected.
oem: NVIDIA
vendor: NVIDIA Corporation
product: GF108 Board - 1071v008 Chip Rev
memory: 14336kb
mode: 640x400x256
mode: 640x480x256
mode: 800x600x16
mode: 800x600x256
mode: 1024x768x16
mode: 1024x768x256
mode: 1280x1024x16
mode: 1280x1024x256
mode: 320x200x64k
mode: 320x200x16m
mode: 640x480x64k
mode: 640x480x16m
mode: 800x600x64k
mode: 800x600x16m
mode: 1024x768x64k
mode: 1024x768x16m
mode: 1280x1024x64k
mode: 1280x1024x16m
edid:
edidfail
$ gtf 1024 768 60
# 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
Modeline "1024x768_60.00" 64.11 1024 1080 1184 1344 768 769 772 795 -HSync +Vsync
$ vim /etc/X11/xorg.conf
$ cat /etc/X11/xorg.conf
Section "Monitor"
Identifier "Monitor0"
VendorName "NVIDIA Corporation"
ModelName "GF108"
HorizSync 24 - 82
VertRefresh 50 - 75
# 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
Modeline "1024x768_60.00" 64.11 1024 1080 1184 1344 768 769 772 795 -HSync +Vsync
EndSection
Section "Device"
Identifier "Device0"
Driver "nv"
VendorName "NVIDIA Corporation"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768"
EndSubSection
EndSection
另一方面我还有另一个屏幕
echo "[resolution]: trying 720p"
export DISPLAY=:0.0 && cvt 1280 720 70
export DISPLAY=:0.0 && xrandr --newmode legend 74.50 1280 1344 1472 1664 720 723 728 748
export DISPLAY=:0.0 && xrandr --addmode HDMI-1 legend
export DISPLAY=:0.0 && xrandr --output HDMI-1 --mode legend
export DISPLAY=:0.0 && xrandr --addmode HDMI-2 legend
export DISPLAY=:0.0 && xrandr --output HDMI-2 --mode legend
这给了我:
$ export DISPLAY=:0.0 && xrandr
Screen 0: minimum 320 x 200, current 2304 x 768, maximum 8192 x 8192
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected 1280x720+0+0 (normal left inverted right x axis y axis) 708mm x 398mm
1024x768 75.0 + 70.1 60.0
1280x720 60.0 + 50.0
1920x1080 50.0 60.0 25.0 30.0
1680x1050 59.9
1680x945 60.0
1400x1050 74.9 59.9
1600x900 60.0
1280x1024 75.0 60.0
1440x900 75.0 59.9
1280x960 60.0
1360x768 59.8 60.0
1280x800 74.9 59.9
1152x864 75.0
1280x768 74.9 60.0
1440x576 25.0
1440x480 30.0
1024x576 60.0
800x600 72.2 75.0 60.3 56.2
720x576 50.0
848x480 60.0
720x480 59.9
640x480 75.0 72.8 60.0 59.9
legend 59.9*
VGA-1 connected 1024x768+1280+0 (normal left inverted right x axis y axis) 304mm x 228mm
1024x768 60.0*+ 75.1 70.1 60.0
1024x576 60.0
800x600 72.2 75.0 60.3 56.2
848x480 60.0
640x480 72.8 75.0 60.0
720x400 70.1