How to change the display mode refresh rate under Linux operating system

Source: Internet
Author: User

Often in the BBS to see a novice asked to refresh rate how to change the method, in fact very simple.

Under the XFREE86, the need for a modeline concept, although through configuration Horizsync, and Vertrefresh can let XFree86 automatically refresh, but it is still impossible to adjust carefully, such as my monitor in 800x600 can be up to 108Hz but, The automatic configuration of the 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

Modeline parameter to tell x your monitor has such a pattern. Specific numbers, each reality is not the same as B, but most monitors only give horizontal Sync Rate and Refresh Rate (Chinese as if the line frequency and field frequency) two parameters, own conversion words trouble death, fortunately there is such a page http://xtiming.sourceforge.net/cgi-bin/xtiming.pl, you put the settings you want to fill (Dotclock do not know can not fill), I can help you with the conversion. Be careful not to be greedy, you'll burn down your monitor.

Ok,x under the Refresh solution, to framebuffer, I just said VESA mode of the other is also similar. Framebuffer and X parameters are different (real trouble) but there is also a formula for conversion (Linux Kernel Code Path) that is not calculated by the following number.

Pixclock left_margin right_margin Hsync_len upper_margin lower_margin

Vsync_len

Then, use those numbers to change (Linux Kernel Code Path)/DRIVERS/VIDEO/VESAFB.C

First again such a 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 it is:

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;

A few lines.

Corresponding variable to change them (suggest the original comment out), of course, to compile the kernel. Reboot,haha,all OK now.

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.