About how to adjust the update rate in Linux

Source: Internet
Author: User
Article Title: About how to adjust the update rate in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

I have been in touch with Linux for more than a year. Linux gives me an elegant and decent feeling. Working in Linux is different from working in MS Windows.

However, the update rate of X Window has always been a pain point in my heart. I don't know how many times xf86config has been set. I can back up the xf86config option, but the X Window still has a flickering effect. I think the setting of X is so conservative. therefore, I like the character mode of Linux. internet access is only available in MS Windows. A few days ago, I made up my mind to fix the update rate and start reading documents about X. I have misunderstood that XF86's goal is to make full use of hardware. What is conservative. I did not read the document myself. the following are some of the articles that I think are most worth reading:

/Usr/X11R6/lib/X11/doc/README. Config
/Usr/X11R6/lib/X11/doc/QuickStart.doc
/Usr/X11R6/lib/X11/doc/VideoMode.doc

In particular, the last article completely solved the problem of refresh rate. Now I will talk about some experiences. If you have any questions, please read the original article.

First, we will introduce some terms:

HSF: the horizontal scanning frequency of the monitor, measured in kHz.
VSF: vertical refresh rate, in Hz
The "dot-clock" of the video card, officially named driving clock frequency (DCF), which indicates that
Prime Number of the image sent to the screen, in MHz
RR: refresh rate)
HR: horizontal resolution
VR: vertical resolution
Frame: frame. Because the scanner of the monitor cannot return immediately when scanning to the edge of the screen, there will be a tune
The whole time, at this time it is still
Scan, but it is invisible to us. Therefore, the frame is slightly larger than HRxVR.
HFL: frame width, slightly larger than HR. Experience: HFL = 1.25HR
VFL: frame length, slightly larger than VR, experience VFL = 1.05VR

The following is an important formula:

RR = DCF/(HFL * VFL)

HFL = DCF/HSF

Or HSF = DCF/HFL

Our problem is: what is the DCF of the video card when the resolution and refresh rate are given? What is the horizontal scan frequency (HSF) and whether it exceeds

What is the maximum horizontal scan frequency allowed by the monitor?

We can see that the DCF of the video card is not a problem here, that is, the most common S3 Trio64V + DCF also has 135 MHz, and the bottleneck is the maximum horizontal scan frequency allowed by the display. when we start X, we will see that many modes are not available, because after calculation, the horizontal scan frequency exceeds the maximum horizontal scan frequency allowed by the display.

The task is not completed yet:

There are many such rows in the XF86Config file:
Mode "800x600" 55.2 800 832 1064 1096 600 602

It may be easier to see the following:
Mode "800x600" 55.2 800 832 1064
600 602 610 630

Mode is a keyword, and "800x600" in quotation marks is a name. 55.2 is DCF, 800 and 600 are resolution, and 1096 and 630 are frame width and frame length (HFL, VFL ). what does the two numbers mean? They determine the start and end positions of the synchronization pulse.

800 832 1064 1096 the number of groups can be understood as follows:

The horizontal resolution is 800. When the scanner scans 800th pixels, it will continue to scan forward. When it reaches 832nd pixels, it will send a synchronous pulse, which lasts for a period of time, it ends at 1,064th pixels. scan the scanner and continue to scan forward. When the frame width is reached, return to the leftmost side and scan the next line.

600 602 610 630 is vertical and can be understood in this way. This is the meaning of this set of secret numbers.

It is quite troublesome to generate a group of such numbers from scratch. My approach is to modify the current mode. For example, I use the 800x600 mode automatically generated by xf86config, but the update rate is low. I will find the corresponding row in the XF86Config file, directly increase the value of DCF, and then calculate the horizontal Scan Frequency HSF = DCF/HFL. as long as the horizontal Scan Frequency does not exceed the maximum horizontal scan frequency allowed by the monitor. in the X Window, use xvidtune to fine tune it.

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.