Compile xorg. conf to solve the problem of unadjustable ubuntu resolution.

Source: Internet
Author: User

From http://blog.sina.com.cn/s/blog_49f914ab0100hd38.html

Compile Xorg. conf to solve the problem of unadjustable Ubuntu resolution.

Person in jingtian

I have been using ubuntu9.04 and have been using it well. Due to compilation, I had to reinstall the system because I had broken the system. Therefore, it is simply upgraded to 9.10. After the upgrade, the maximum resolution is 800x600.
Check whether the video card driver is installed and normal. The three-D desktop effect can be enabled normally.
I went to the Internet for help. Some netizens pointed out that the system may not be able to correctly identify the display and can compile the Xorg. conf file.

Ubuntu9.10 does not have/etc/X11/Xorg by default. CONF file. Without this file, the system can start successfully. However, if this file is wrong, the system may not start properly. That is to say, the file is now set by the user. If not, you do not need to set it. To understand this, we only need to manually create this file and add the required content in the file as needed.
I cannot set the resolution currently, so you only need to set the content in it. Other content can be ignored.

Open the terminal and enter:

========================================

CD/etc/X11
Sudo touch Xorg. conf
Sudo gedit Xorg. conf

========================================
The above command is to first create an empty Xorg. conf file and then open the file for writing.

I. general compiling rules for Xorg. conf:

The Xorg. conf file stores various information about X Windows. It consists of several sections/endsecion
   The format is as follows:
   Section "section name"
       Option name "Option value"
       Option name "Option value"
       ......
   Endsection

   That is to say, a block starts with section "section name", ends with endsection, and is an option in the middle.

2. Display Settings mainly include three blocks:
MonitorSet display
DeviceSet graphics card
ScreenSet the combination of the display and the video card, that is, the final display

In terms of display settings, these three blocks seem indispensable.
The following is an example:

==============================================
Section "device"
  Identifier "Configured video device"
Endsection

Section "Monitor"
  Identifier "Configured monitor"
EndSection

Section "Screen"
  Identifier "Default Screen"
  Monitor   "Configured Monitor"
  Device   "Configured Video Device"
EndSection
========================================================
In this example, identifier specifies the unique name of the video card in the section "device" block, the name must be the same as that in the device option in the section "screen" block. In the section "Monitor" block, identifier specifies the unique name of the monitor, which can be obtained at will, but must be the same as the name specified in the monitor option in the section "screen" block. The identifier option in the section "screen" Block specifies the unique name that this video card uses with the display. You can also use this name. This name must be used with section "serverlayout"The block name is the same. This section "serverlayout"We do not need to write blocks. We will not discuss them here.

From the above analysis, this example only specifies the association between the three names and the three names. No substantive settings. However, this provides us with a basic framework for setup.
We can copy the original text of this framework.
Then, if we need to add our options to the display block (section "Monitor"), we can add them directly. The same applies to the other two blocks.
The main problem is that the system cannot correctly identify the monitor. Therefore, we need to write the section "Monitor" block.

3. Write section "Monitor"
I checked a lot of information and tried it again and again. The key here is to correctly obtain the line frequency and field frequency parameters of the display without this parameter, other settings are hard to achieve the best.
Line frequency
Horizsync
Field Frequency
Vertrefresh
My display is Samsung 711N. There are various methods on the Internet to obtain the line frequency and field frequency parameters of the display, but I have not been able to succeed, finally, search for the detailed parameters of the display on the Internet and get the following information:

Line frequency
HorizSync30-81
Field Frequency
VertRefresh 56-75

If these two parameters are not set correctly, it is said that the monitor may burn out and be scared. If you are unsure, comment out the two options, that is, do not set them. You can use another method to make up for it. However, it is proved repeatedly that it is better to write this method directly for other methods.

The main remedy is to compile the Modeline option.

Enter the following command in the terminal:
Gtf 1024 768 60
This 1024 768 is the resolution you want to set, and this 60 is the refresh rate you want to set.
The command result is as follows:

$ Gtf 1024 768 60

 #1024x768 @ 60.00Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
 Modeline "1024x768_60.00"64.111024 1080 1184 1344768 769 772 795-HSync + Vsync

Copy the Modeline line in the Command result to the Section "Monitor" block.
You may want to try multiple resolutions, so you can use the gtf command to obtain the parameters under various resolutions and copy them to Section "Monitor.

For example:

Modeline "1024x768_60.00"64.111024 1080 1184 1344768 769 772 795-HSync + Vsync
Modeline "1024x768_70.00"76.161024 1080 1192 1360768 769 772 800-HSync + Vsync
Modeline "1152x768_60.00"71.741152 1208 1328 1504768 769 772 795-HSync + Vsync

In my opinion, after obtaining the correct line frequency HorizSync and field frequency VertRefresh, The Modeline option is meaningless and can be left empty.

4. Compile Section "Screen" Blocks
Restart the computer and enter the desktop. The resolution and refresh rate are both adjustable. The only drawback is that there is a prompt on the screen before entering the desktop:
Display non-optimal resolution Mode

One of the basic reasons for this is that the optimal resolution mode of my monitor is 1280x1024, but the video card does not support this high resolution. Therefore, I cannot use the 1280x1024 resolution.

This prompt is very annoying. As a result, write Section "Screen" or remove this annoying prompt. So I wrote the Section "Screen" module and finally removed this annoying prompt.

========================================================== =====
Section "Screen"
  Identifier "Default Screen"
  Monitor   "Configured Monitor"
  Device   "Configured Video Device"
  SubSection "Display"
  Modes "1152x864 @ 60"
  EndSubSection
EndSection
========================================
The Modes "1152x864 @ 60" specifies the resolution. Multiple resolutions can be specified here. The first choice is the first choice. For example:
Modes "1152x864 @ 60" "1024x768 @ 60"
You can specify one. @ 60 indicates the update rate, which can be removed and is not required here.

Note that the Modes "1152x864 @ 60" must be located between SubSection "Display" and EndSubSection. There is no need to explain it in detail. You only need to understand that the SubSection "Display" and EndSubSection are a subblock in the Section "Screen" block. The Modes option of the specified resolution must be located in this subblock. In this case.

V. The final form of xorg. conf

========================================================== =
Section "Device"
  Identifier "Configured Video Device"
EndSection

Section "Monitor"
  Identifier "Configured Monitor"
  Horizsync 30-81
  Vertrefresh 56-75
EndSection

Section "Screen"
  Identifier "Default Screen"
  Monitor   "Configured Monitor"
  Device   "Configured Video Device"
  SubSection "Display"
  Modes "1024x768" "1152x864"
  EndSubSection
EndSection
==============================================

In this file, there are only three substantive settings, and the others are in the format.

======================================
  Horizsync 30-81
  Vertrefresh 56-75
      Modes "1024x768" "1152x864"
======================================

The problem is solved perfectly.
Note that if you cannot obtain the line frequency HorizSync and field frequency VertRefresh of the monitor, do not write these two options to avoid damage to the monitor. The solution is to directly enter the Modeline option.

6. If your xorg. conf file is incorrectly written and cannot enter the desktop, select recovery mode when starting the system. log on to the text interface as the root user and enter:

Rm/etc/X11/xorg. conf

This command will delete the xorg. conf file.

Http://blog.sina.com.cn/s/blog_49f914ab0100hd38.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.