From owner-freebsd-hackers Thu Mar 11 18: 4: 6 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from outmail.utsunomiya-u.ac.jp (outmail.utsunomiya-u.ac.jp [160.12.196.3]) by hub.freebsd.org (Postfix) with ESMTP id 7E50E15020 for ; Thu, 11 Mar 1999 18:03:57 -0800 (PST) (envelope-from yokota@zodiac.mech.utsunomiya-u.ac.jp) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:LZurN9ddulKBND8LLDugcstoP+8xlnIS@zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by outmail.utsunomiya-u.ac.jp (8.9.1/8.9.1) with ESMTP id LAA05281; Fri, 12 Mar 1999 11:03:34 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by zodiac.mech.utsunomiya-u.ac.jp (8.7.6+2.6Wbeta7/3.4W/zodiac-May96) with ESMTP id LAA23975; Fri, 12 Mar 1999 11:06:46 +0900 (JST) Message-Id: <199903120206.LAA23975@zodiac.mech.utsunomiya-u.ac.jp> To: Jonathan Walther Cc: freebsd-hackers@freebsd.org, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: /dev/vesa usage In-reply-to: Your message of "Thu, 11 Mar 1999 15:55:35 PST." References: Date: Fri, 12 Mar 1999 11:06:45 +0900 From: Kazutaka YOKOTA Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >On Mon, 1 Mar 1999, Kazutaka YOKOTA wrote: >> There is no such thing as /dev/vesa. If you want to set a video mode >> of your VESA-compliant VGA card, just issue ioctl to stdin. > >The explanation was very clear, and I was happy to receive it. However, I >am getting mysterious errors. > >> /* obtain mode information */ >> mode_info.vi_mode = M_VESA_CG1024x768; >> ioctl(0, CONS_MODEINFO, &mode_info); > >Right here, the ioctl fails with errno 19, saying, "operation not supported >by device". Woops, guess I forgot to insert the vesa.ko module. Just to >be safe, I went into /usr/src/sys/modules and rebuilt and reinstalled it. >Ok. But wait! The error may mean: 1. You are not running the program in one of vtys. Issuing this ioctl from a serial terminal or pty (such as xterm in the X session) generates this error. 2. The VESA BIOS support is not linked to the kernel nor loaded as a KLD module. 3. Your VESA ROM BIOS does not support this particular video mode. Your video "card" may support it, but its "ROM BIOS" may not. This may sound strange, but it is permissible in the VESA BIOS extension standard; the ROM BIOS includes minimal "stub" for the VESA extension and a DOS TSR (oh, good-old DOS TSR!) implements the full VESA BIOS services. Because video ROM space is limited, the vendor may find it difficult to implement full VESA BIOS specification in ROM... (I don't know if we can support the VESA TSR in vm86...) To find out exactly which video modes are supported by the VESA BIOS (ROM) and detected by the VESA support in FreeBSD, run vidcontrol in a vty: vidcontrol -i mode The list of video modes will be printed to stdout. (The list includes standard VGA modes as well.) It is also a good idea to consult with your card's manual. It may describe state of VESA support on your card. ># kldload /modules/vesa.ko >module_register_init: module_register(vesa, f099a0c0, 0) error 6 > >Device not configured? I compiled my kernel with vm86 and vesa options and >rebooted into it... What am I doing wrong? Please read the man page for vga(4). The VESA support can be either statically included in the kernel by defining "options VESA", OR by loading the vesa module. You don't need to load the vesa module if the VESA support is statically linked into the kernel. You are attempting to load the vesa module to the kernel which already has the statically-linked VESA BIOS support. >Is there perhaps a /dev/vesa >after all and I have to use mknod? Please forget about this non-existent device node. It does NOT exist. Where did you get this idea? Is there any doc or man page talking about it? If there is one, I have to correct it! >My video card is an ATI Rage 3d, and on >bootup it clearly says VESA 2.0 compliant. Is our vesa support for 1.2 >only, or for 2.0? Had this same error with 3.0, 3.1, and now 4.0 VESA BIOS Extension 1.2 or later, including 2.0, is supported. Kazu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message