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.