首先,需要先执行xrandr

xrandr

  输出:

Screen 0: minimum 8 x 8, current 2646 x 1024, maximum 32767 x 32767
eDP1 connected primary 1366x768+0+256 (normal left inverted right x axis y axis) 344mm x 193mm
   1366x768      60.00*+
   1360x768      59.80    59.96  
   1280x720      60.00  
   1024x768      60.00  
   1024x576      60.00  
   960x540       60.00  
   800x600       60.32    56.25  
   864x486       60.00  
   640x480       59.94  
   720x405       60.00  
   680x384       60.00  
   640x360       60.00  
DP1 disconnected (normal left inverted right x axis y axis)
DP2 connected 1280x1024+1366+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1280x1024     59.89*+
   1024x768      60.00  
   800x600       60.32    56.25  
   848x480       60.00  
   640x480       59.94  
   1280x1024_60.00  59.89  
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

  之后,执行

cvt 1280 1024

  注意:这里的分辨率是你最适合的分辨率。
  输出:

# 1280x1024 59.89 Hz (CVT 1.31M4) hsync: 63.67 kHz; pclk: 109.00 MHz
Modeline "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync

  之后,执行

xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync

  这里没有输出
  继续执行

 xrandr --addmode DP2 "1280x1024_60.00"

  启用模式

xrandr --output DP2 --mode "1280x1024_60.00"  

  最后,为了之后不必每次都执行这些指令,我们需要把指令写入到.profile中,

vim /etc/profile

   在文件最后添加

xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
xrandr --addmode DP2 "1280x1024_60.00"
Logo

更多推荐