About the display mode update rate in Linux

Source: Internet
Author: User
Article Title: About the display mode 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 often see some new users on bbs asking how to change the update rate. It is actually very simple.

In XFree86, A modeline concept is required. Although HorizSync and VertRefresh can be configured to automatically refresh XFree86, it is still impossible to adjust it in detail, for example, the display can be up to Hz under 800x600, but the automatic configuration of XFree86 is only 85Hz.

So you need to add an image to the Monitor Section of your XF86Config-4 File

ModeLine "800x600 @ 102" 73.61 800 832 1104 1136 600 610 620 631

To tell X that the display has such a mode. the specific number is different from B for each reality. However, most monitors only provide two parameters: Horizontal Sync Rate and Refresh Rate (line frequency and field frequency in Chinese, if you want to convert it by yourself, you will have a page such as http://xtiming.sourceforge.net/cgi-bin/xtiming.pl. you can fill in your desired settings (dotclock does not know) to help you make the conversion. be sure not to be greedy. It will burn your Monitor.

OK, the Refresh under X has been solved, and it's time to go to FrameBuffer. I just want to talk about other vesa models. the parameters used by FrameBuffer and X are different (really troublesome). However, there is still a conversion formula for (Linux Kernel Code Path)/Docmentation/fb/framebuffer.txt, and the values below cannot be calculated.

Pixclock left_margin right_margin hsync_len upper_margin lower_margin

Vsync_len

Then, use the numbers (Linux Kernel Code Path)/drivers/video/vesafb. c

There is another struct:

Static struct fb_var_screeninfo vesafb_defined _ initdata = {

. Activate = FB_ACTIVATE_NOW,

. Height =-1,

. Width =-1,

. Right_margin = 32,

. Upper_margin = 16,

. Lower_margin = 4,

. Vsync_len = 4,

. Vmode = FB_VMODE_NONINTERLACED,

};

Then:

Vesafb_defined.pixclock = 10000000/vesafb_defined.xres * 1000/vesafb_defined.yres;

Vesafb_defined.left_margin = (vesafb_defined.xres/8) & 0xf8;

Vesafb_defined.hsync_len = (vesafb_defined.xres/8) & 0xf8;

.

Change the corresponding variables (we recommend that you comment out the original ones). Of course, compile kernel. Reboot, haha, all OK now.

Related Article

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.