更改unbuntu9.10 分辨率

原文链接: http://www.cnblogs.com/binterminator/articles/1603225.html

http://www.linuxreaders.com/2009/11/04/change-ubuntu-9-10-resolution/

By default Ubuntu 9.10 supports 1024×768 resolution, which is not enough for me. I needed to increase it to 1240×1024. To achive my desired resolution I run through few commands. Its easy, take a look.
Here I am trying to get 1240×1024 resolution, if you are trying to achive any other change it with 1240×1024

Use xrandr to find current mode used & output name.
e.g here VGA1 is used, it is easy to use current output name.

  1. xrandr  
  2. Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192  
  3. VGA1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 310mm x 230mm  
  4.    1024x768       85.0*+   75.1  
  5.    800x600        75.0  
  6.    640x480        75.0     60.0  
  7.    720x400        70.1  
xrandr Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192 VGA1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 310mm x 230mm    1024x768       85.0*+   75.1    800x600        75.0    640x480        75.0     60.0    720x400        70.1 

Run following command to find modeline details for resolution 1240×1024. Modeline is required for xrandr.

  1. cvt 1240 1024  
  2. # 1240x1024 59.93 Hz (CVT) hsync: 63.71 kHz; pclk: 105.50 MHz  
  3. Modeline "1240x1024_60.00"  105.50  1240 1320 1448 1656  1024 1027 1037 1063 -hsync +vsync  
cvt 1240 1024 # 1240x1024 59.93 Hz (CVT) hsync: 63.71 kHz; pclk: 105.50 MHz Modeline "1240x1024_60.00"  105.50  1240 1320 1448 1656  1024 1027 1037 1063 -hsync +vsync 

Use modeline config with xrandr to add resolution mode.

  1. xrandr --newmode "1240x1024_60.00"  105.50  1240 1320 1448 1656  1024 1027 1037 1063 -hsync +vsync  
xrandr --newmode "1240x1024_60.00"  105.50  1240 1320 1448 1656  1024 1027 1037 1063 -hsync +vsync 

e.g output of command xrandr with new resolution

  1.  xrandr  
  2. Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192  
  3. VGA1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 310mm x 230mm  
  4.    1024x768       85.0*+   75.1  
  5.    800x600        75.0  
  6.    640x480        75.0     60.0  
  7.    720x400        70.1  
  8.   1240x1024_60.00 (0x102)  105.5MHz  
  9.         h: width  1240 start 1320 end 1448 total 1656 skew    0 clock   63.7KHz  
  10.         v: height 1024 start 1027 end 1037 total 1063           clock   59  
 xrandr Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192 VGA1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 310mm x 230mm    1024x768       85.0*+   75.1    800x600        75.0    640x480        75.0     60.0    720x400        70.1   1240x1024_60.00 (0x102)  105.5MHz         h: width  1240 start 1320 end 1448 total 1656 skew    0 clock   63.7KHz         v: height 1024 start 1027 end 1037 total 1063           clock   59 

Use following command to add new mode

  1. xrandr --addmode VGA1 1240x1024_60.00  
xrandr --addmode VGA1 1240x1024_60.00 

Use following to change output imidiately Or use System–> Preferenses –> Display

  1. xrandr --output VGA1 --mode 1240x1024_60.00  
xrandr --output VGA1 --mode 1240x1024_60.00 

Since above command is not permanent sollution to add new resolution, you need to edit /etc/gdm/PreSession/Default
Enter followings at the end of file /etc/gdm/PreSession/Default

  1. xrandr --newmode "1240x1024_60.00"  105.50  1240 1320 1448 1656  1024 1027 1037 1063 -hsync +vsync  
  2. xrandr --addmode VGA1 1240x1024_60.00  
xrandr --newmode "1240x1024_60.00"  105.50  1240 1320 1448 1656  1024 1027 1037 1063 -hsync +vsync xrandr --addmode VGA1 1240x1024_60.00 

After reboot this will enable one more resolution mode in System–> Preferenses –> Display
all you need to do is to select desired mode once.

if you wish to remove any mode

  1. xrandr --rmmode 1240x1024_60.00  
xrandr --rmmode 1240x1024_60.00 

Refer

转载于:https://www.cnblogs.com/binterminator/articles/1603225.html

猜你喜欢

转载自blog.csdn.net/weixin_30319153/article/details/94805591
今日推荐