Xrandr

Xrandr 的 –size 參數有什麼作用?

  • May 28, 2016

通過 VGA 連接輔助顯示器後,我嘗試更改該顯示器的解析度,使其更接近我的主(筆記型電腦)顯示器的尺寸。為此,我想嘗試使用--sizexrandr 的選項:

-s <size>/<width>x<height> or --size <size>/<width>x<height>

所以我嘗試了這兩個命令,但其中任何一個都沒有改變。因為這可能意味著我用--size錯了,我的問題是:--size做什麼?

命令和輸出:

[Me ~]$ xrandr --output LVDS  --auto --primary --output VGA-0 --size 1366x768 --left-of LVDS
[Me ~]$ xrandr -q
Screen 0: minimum 320 x 200, current 2966 x 1200, maximum 8192 x 8192
LVDS connected primary 1366x768+1600+0 (normal left inverted right x axis y axis) 344mm x 194mm
  1366x768      59.97*+
  1280x720      59.86  
  1152x768      59.78  
  1024x768      59.92  
  800x600       59.86  
  848x480       59.66  
  720x480       59.71  
  640x480       59.38  
VGA-0 connected 1600x1200+0+0 (normal left inverted right x axis y axis) 367mm x 275mm
  1600x1200     60.00*+
  1280x1024     75.02    60.02  
  1152x864      75.00  
  1024x768      75.08    60.00  
  800x600       75.00    60.32  
  640x480       75.00    60.00  
  720x400       70.08  
HDMI-0 disconnected (normal left inverted right x axis y axis)
[Me ~]$ xrandr --output LVDS  --auto --primary --output VGA-0 --size 1280x1024 --left-of LVDS
[Me ~]$ xrandr -q
Screen 0: minimum 320 x 200, current 2966 x 1200, maximum 8192 x 8192
LVDS connected primary 1366x768+1600+0 (normal left inverted right x axis y axis) 344mm x 194mm
  1366x768      59.97*+
  1280x720      59.86  
  1152x768      59.78  
  1024x768      59.92  
  800x600       59.86  
  848x480       59.66  
  720x480       59.71  
  640x480       59.38  
VGA-0 connected 1600x1200+0+0 (normal left inverted right x axis y axis) 367mm x 275mm
  1600x1200     60.00*+
  1280x1024     75.02    60.02  
  1152x864      75.00  
  1024x768      75.08    60.00  
  800x600       75.00    60.32  
  640x480       75.00    60.00  
  720x400       70.08  
HDMI-0 disconnected (normal left inverted right x axis y axis)
[Me ~]$ lspci | grep VGA
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV730/M96 [Mobility Radeon HD 4650/5165]

您需要為所需的解析度創建一個新模式。

使用cvt 1366 768,輸出是這樣的:

# 1368x768 59.88 Hz (CVT) hsync: 47.79 kHz; pclk: 85.25 MHz
Modeline "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync

然後使用:

> xrandr --newmode "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync
> xrandr --addmode VGA-0 "1368x768_60.00"

最後你可以設置它:

xrandr --output VGA-0 --mode "1368x768_60.00"

引用自:https://unix.stackexchange.com/questions/286084