LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 831|回复: 0

Getting higher refresh rates using vesafb driver

[复制链接]
发表于 2003-11-4 12:34:20 | 显示全部楼层 |阅读模式
大家是一下吧!
我这里有点问题,

patch

原贴在:(这点英文就不翻译了,)
http://forums.gentoo.org/viewtop ... 84db5cdec56f40c1ea4

For quite some time I have seen people posting questions about getting higher-than-standard refresh rates on their vesafb consoles. The usual answer was: 'this is impossible'. While I was installing Gentoo during the last few days, I started to get really angry with my 1024x756@60Hz. It was at this time that I realized 'impossible' isn't exactly the right word here. I came up with a solution - a kernel patch that allows you to change the refresh rate of any VESA graphic mode.

Here is what you will need to get your console up and running at a high refresh rate:
a VBE 3.0 compliant graphic card (most modern cards seem to be VBE 3.0 compatible - my GeForce 2 MX 400 is, and other nVidia cards are too, AFAIK)

Linux Kernel v2.4.x source tree located at /usr/src/linux

some data about your monitor - its maximal vertical/horizontal refresh rate and its bandwidth (pixel clock)

a few minutes to setup everything

and of course the patch itself..

And here is what to do:
Download the patch.

Unpack it somewhere and make sure you have a look at the README file.
Code:
tar -zxvf patch-2.4.x-vesafb-rrc.tar.gz


Copy the actual patchfile to /usr/src/linux.
Code:
cp patch-2.4.x-vesafb-rrc.bz2 /usr/src/linux


Patch your kernel tree.
Code:
cd /usr/src/linux
bzip2 -dc patch-2.4.x-vesafb-rrc.bz2 | patch -p1


Run a script to set the CRTC data (this an equivalent of XFree86 Modelines).
Code:
chmod u+x /usr/src/linux/scripts/vesa_modeline_gen.pl
/usr/src/linux/scripts/vesa_modeline_gen.pl


Enter the data you are asked for (maximum vertical and horizontal refresh rate and monitor/graphic card max bandwidth). You should be able to find these values in your monitor and graphic card documentation or in the Internet [remember: Google is your best friend! ]. If you do everything properly, you will be informed that the generated data has been written to /usr/src/linux/arch/i386/boot/vesafb_modes.h


Recompile your kernel now. If you have everything else configured, you will only need to make bzImage. When the recompilation is finished, move the kernel image to your /boot partition.
Code:
make bzImage
mount /boot
mv /boot/bzImage /boot/bzImage.old
cp /usr/src/linux/arch/i386/boot/bzImage /boot


Find a new mode number. You can use the following table:
Code:
    | 320x200  640x480  800x600  1024x768  1280x1024
----+-----------------------------------------------
256 |   N/A     0x501    0x503    0x505      0x507
32k |  0x50D    0x510    0x513    0x516      0x519
64k |  0x50E    0x511    0x514    0x517      0x51A
16M |  0x50F    0x512    0x515    0x518      0x51B

Modify your /boot/grub/grub.conf by putting your chosen mode number as the vga= kernel parameter. Here is an example:
Code:
title=Gentoo Linux 1.4
root=(hd0,0)
kernel=(hd0,0)/boot/bzImage root=/dev/hda3 vga=0x518


Note: You can still use all these modes with their standard refresh rates - just change the leading '5' to '3' in the mode number.


Unmount /boot, reboot and enjoy your framebuffer console at a high refresh rate. Mine is running perfectly in 1024x756 @ 85Hz  


Note that so far I haven't had the opportunity to test it on boxes other than my own. Your feedback will be welcomed. Have fun!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表