当然我知道ubnutu有图形用户界面可以设置分辨率,但是此文将的是自己手动设置。
Ubuntu 9.04 did not detect the native resolution of my new LCD monitor which was 1440 x 900.
Fix :
1. Get the modeline for the required resolution + refresh rate using the gtf command.
1 |
desktop:~$ gtf 1440 900 75 |
3 |
# 1440x900 @ 75.00 Hz (GTF) hsync: 70.50 kHz; pclk: 136.49 MHz |
4 |
Modeline "1440x900_75.00" 136.49 1440 1536 1688 1936 900 901 904940 -HSync +Vsync |
The modeline is to be added to the xorg.conf file at /etc/X11/xorg.conf
Take a backup of the file before editing it.
On a fresh Ubuntu installation the file may look small like this :
3 |
Identifier "Configured Monitor" |
7 |
Identifier "Default Screen" |
8 |
Monitor "Configured Monitor" |
9 |
Device "Configured Video Device" |
13 |
Identifier "Configured Video Device" |
17 |
Option "DontZap" "True" |
Simply add the modeline to the monitor section like this :
2 |
Identifier "Configured Monitor" |
3 |
Modeline "1440x900_75.00" 136.49 1440 1536 1688 1936 900 901 904 940 -HSync +Vsync |
4 |
Option "PreferredMode" "1440x900_75.00" |
8 |
Identifier "Default Screen" |
9 |
Monitor "Configured Monitor" |
10 |
Device "Configured Video Device" |
14 |
Identifier "Configured Video Device" |
18 |
Option "DontZap" "True" |
The option “PreferredMode” “1440x900_75.00″ is used so that it becomes the default resolution on gnome, KDE desktops and GDM and KDM i.e. the login screen. If this option is not used then there may be issues such that resolution after reboot or relogin reverts to a default like 1280 x 1200 as discussed here Bug.
Another fix could to be reconfigure X like : sudo dpkg-reconfigure xserver-xorg.
References :
1. Ubuntu Resolution Configuration
2. Forum