Date: Tue, 23 Apr 2002 08:14:50 -0600 From: "John Nielsen" <oniblerz@attbi.com> To: "Vladislav V. Zhuk" <admin@dru.dn.ua>, <freebsd-stable@freebsd.org> Subject: Re: screen refresh rate Message-ID: <001301c1ead1$3b6ce020$0900a8c0@max> References: <20020423060700.GD8644@dru.dn.ua> <031f01c1eabe$9dc984c0$0900a8c0@max>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ----- From: "John Nielsen" <oniblerz@attbi.com> To: "Vladislav V. Zhuk" <admin@dru.dn.ua>; <freebsd-stable@freebsd.org> Sent: Tuesday, April 23, 2002 6:01 AM Subject: Re: screen refresh rate > ----- Original Message ----- > From: "Vladislav V. Zhuk" <admin@dru.dn.ua> > To: <freebsd-stable@freebsd.org> > Sent: Tuesday, April 23, 2002 12:07 AM > Subject: screen refresh rate > > Hi! > > > > I'm work at the computer up to 12 hours per day. The refresh > > rate of textmodes in FreeBSD is too low (60-70 Hz). But i want > > to safe my eyes. > > > > How I can to raise refresh rate to (for example) 85-90 Hz > > on text modes (80x25, 80x30, 80x43, 80x50 and other) ?? > > > > FreeBSD 4.5-STABLE #0: Tue Apr 9 16:24:26 EEST 2002 > > Vanilla FreeBSD does not offer this functionality. I seem to recall seeing > a link to a patch that would do this a while back, but I can't find it now. > I did find a patch here, > http://www.opennet.ru/base/patch/100x37-800x600-100Hz.txt.html > but I haven't tried it and can't vouch for its usability. Be aware that if > your hardware doesn't support the new defaults set by this patch that your > system may become unusable even in single-user mode. I love talking to myself on public forums. :) I applied the patch below to one of my systems here (with a Radeon all-in-wonder card and a generic 19" monitor) and it works fine. At least, I assume it's working (I'm not as sensitive to refresh rates in console mode as some). There weren't any errors, anyway. vidcontrol.c has been cleaned up a bit since the patch at the URL above was produced, so I had to modify that part of the patch to accomodate for the changes. According to the webpage, the default mode is supposed to change to 100x37, but I didn't see a change in that regard (and in fact couldn't change to that mode). Anyway, here's what I used. Once again, use at your own risk. JN --- src,orig/sys/i386/isa/vesa.c Sat Jan 29 18:08:40 2000 +++ src/sys/i386/isa/vesa.c Thu Mar 16 11:44:31 2000 @@ -1016,7 +1016,25 @@ if (!(info.vi_flags & V_INFO_GRAPHICS)) info.vi_flags &= ~V_INFO_LINEAR; - if (vesa_bios_set_mode(mode | ((info.vi_flags & V_INFO_LINEAR) ? 0x4000 : 0))) + if (mode == M_VESA_800x600) { /* XXX ignores V_INFO_LINEAR */ + unsigned char crtc[0x19]; + unsigned char reg; + if (vesa_bios_set_mode(mode)) + return 1; + for (reg=0;reg<0x19;++reg) { + outb(0x3d4,reg); + crtc[reg]=inb(0x3d5); + } + if (!vesa_bios_set_mode(M_VESA_1024x768)) { + outb(0x3d4,0x11); + outb(0x3d5,crtc[0x11]&0x7f); + for (reg=0;reg<0x19;++reg) { + outb(0x3d4,reg); + outb(0x3d5,crtc[reg]); + } + } + } else + if (vesa_bios_set_mode(mode | ((info.vi_flags & V_INFO_LINEAR) ? 0x4000 : 0))) return 1; if (adp->va_info.vi_flags & V_INFO_LINEAR) --- /usr/src/usr.sbin/vidcontrol/vidcontrol.c.orig Tue Apr 23 07:02:22 2002 +++ /usr/src/usr.sbin/vidcontrol/vidcontrol.c Tue Apr 23 07:09:43 2002 @@ -46,8 +46,13 @@ #include "path.h" #include "decode.h" +/* Pre-patch defaults: #define _VESA_800x600_DFL_COLS 80 #define _VESA_800x600_DFL_ROWS 25 +#define _VESA_800x600_DFL_FNSZ 16 +*/ +#define _VESA_800x600_DFL_COLS 100 +#define _VESA_800x600_DFL_ROWS 37 #define _VESA_800x600_DFL_FNSZ 16 #define DUMP_RAW 0 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001301c1ead1$3b6ce020$0900a8c0>