linux/Documentation/svga.txt
<<
.9.8opt/spa opt/form opta .9.8op href="../linux+v3.7.3/Documentan> /svga.txt">.9.8optimg src="../.stan>c/gfx/right.png" alt=">>">.9t/spa .9tspa class="lxr_search">.9.8 ="+search" method="post" onsubmit="return do_search(this);">.9.8optinput typv3.hidden" namv3.navtarget" ue="v3.">.9.8optinput typv3.text" namv3.search" id3.search">.9.8optbuttvaltypv3.submit">Search.9.8opPrefs opt/a>.9t/spa .8op pt/div .8op ptform acn> ="ajax+*" method="post" onsubmit="return false;">.9tinput typv3.hidden" namv3.ajax_lookup" id3.ajax_lookup" ue="v3.">..8op pt/form ..8op ptdiv class="headingbottvm">
p p1t/a> Video Mode Select valSupport 7p p2t/a> (c) 1995--1999 Martin Mares, <mj@ucw.cz> p p3t/a>-------------------------------------------------------------------------------- p p4t/a>.p p5t/a>1. Intro.p p6t/a>~~~~~~~~.p p7t/a> This small document describes the "Video Mode Select va" feature which.p p8t/a>allows the use of uerious special video modes supported by the video BIOS. Due.p p9t/a>to usage of the BIOS, the select valis limited to boot time (before the.p /opta>kernel decompress valstarts) and works only on 80X86 machines..p 11t/a>.p 12t/a> ** Short intro for the impan>ent: Just use vga=ask for the first time,.p 13t/a> ** enter `scan' on the video mode prompt, pick the mode you want to use,.p 14t/a> ** remember its mode ID (the four-digit hexadecimal number) and then.p 15t/a> ** set the vga paramvter to this number (converted to decimal first)..p 16t/a>.p 17t/a> The video mode to be usedlis selected by a kernel paramvter which can be.p 18t/a>specifiedlin the kernel Makefile (the SVGA_MODE=... line) or by the "vga=...".p 19t/a>ion valof LILO (or some other boot loader you use) or by the "vidmode" utility p 2opta>(present ialstandard Linux utility packages). You can use the following ue="vs p 21t/a>of this paramvter: p 22t/a>.p 23t/a> NORMAL_VGA - Standard 80x25 mode available valall display adapters..p 24t/a>.p 25t/a> EXTENDED_VGA - Standard 8-pixel font mode: 80x43 valEGA, 80x50 valVGA..p 26t/a>.p 27t/a> ASK_VGA - Display a video mode menu upvalstartup (see below)..p 28t/a>.p 29t/a> 0..35 - Menu item number (when you have usedlthe menu to viewlthe list of p 30t/a> modes available valyour adapter, you can specifylthe menu item you want p 31t/a> to use). 0..9 correspvad to "0".."9", /o..35 to "a".."z". Warning: the.p 32t/a> mode list displayedlmay uery as the kernel vers valchanges, because the.p 33t/a> modes are listedlin a "first dvtected -- first displayed" manner. It's p 34t/a> better to use absolute mode numberslinstead..p 35t/a>.p 36t/a> 0x.... - Hexadecimal video mode ID (also displayedlon the menu, see below.p 37t/a> for exact meaning of the ID). Warning: rdev and LILO don't support.p 38t/a> hexadecimal numbers -- you have to convert it to decimal manually..p 39t/a>.p 40t/a>2. Menu.p 41t/a>~~~~~~~.p 42t/a> The ASK_VGA mode causes the kernel to offer a video mode menu upva.p 43t/a>bootup. It displays a "Press <RETURN> to see video modes available, <SPACE> p 44t/a>to continue or wait 30 secs" message. If you press <RETURN>, you enter the.p 45t/a>menu, if you press <SPACE> or wait 30 secvads, the kernel will boot up ia.p 46t/a>the standard 80x25 mode..p 47t/a>.p 48t/a> The menu looks like: p 49t/a>.p 50t/a>Video adapter: <namv-of-dvtected-video-adapter> p 51t/a>Mode: COLSxROWS: p 52t/a>0 0F00 80x25 p 53t/a>1 0F01 80x50 p 54t/a>2 0F02 80x43 p 55t/a>3 0F03 80x26 p 56t/a>.... p 57t/a>Enter mode number or `scan': <flashing-cursor-here> p 58t/a>.p 59t/a> <namv-of-dvtected-video-adapter> tells what video adapter did Linux dvtect.p 60t/a>-- it's either a generic adapter namv (MDA, CGA, HGC,lEGA, VGA, VESA VGA [a VGA.p 61t/a>with VESA-compliant BIOS]) or alchipset namv (e.g., Trident). Direct dvtectiva.p 62t/a>of chipsetslis turnedloff by default (see CONFIG_VIDEO_SVGAlin chapter 4 to see.p 63t/a>how to enable it if you really want) as it's inherently unreliable due to.p 64t/a>absolutely insane PC design. p 65t/a>.p 66t/a> "0 0F00 80x25" means that the first menu item (the menu items are numbered.p 67t/a>from "0" to "9" and from "a" to "z")lis a 80x25 mode with ID=0x0f00 (see the.p 68t/a>next secn valfor aldescrion valof mode IDs)..p 69t/a>.p 70t/a> <flashing-cursor-here> encourages you to enter the item number or mode ID.p 71t/a>you wish to set and press <RETURN>. If the computer complains something about.p 72t/a>"Unknown mode ID", it is trying to tell you that it isn't possible to set such.p 73t/a>a mode. It's also possible to press only <RETURN> which leaves the current mode..p 74t/a>.p 75t/a> The mode list usually contains a few basic modes and some VESA modes. Ia.p 76t/a>caselyour chipset has been dvtected, some chipset-specific modes are shown as p 77t/a>well (some of theselmight be missing or unusable valyour machine as different p 78t/a>BIOSes are often shippedlwith the samv card and the mode numbersldepend purely p 79t/a>in the VGAlBIOS)..p 80t/a>.p 81t/a> The modes displayedlon the menu are partially sorted: The list startslwith.p 82t/a>the standard modes (80x25 and 80x50) followed by "special" modes (80x28 and.p 83t/a>80x43), local modes (if the local modes feature is enabled), VESA modes and.p 84t/a>finally SVGA modes for the auto-dvtected adapter..p 85t/a>.p 86t/a> If you are not happylwith the mode list offered (e.g., if you thinklyour card.p 87t/a>is able to do more), you can enter "scan" instead of item number / mode ID. The.p 88t/a>program will try to ask the BIOSlfor all possible video mode numbersland test p 89t/a>what happens then. The screen will be probably flashing wildly for some time and.p 90t/a>strange noises will be heard from inside the monitor and so valand then, really.p 91t/a>all consistent video modes supported by your BIOSlwill appear (pluslmaybe some.p 92t/a>`ghost modes'). If you are afraid this could damage your monitor, don't use this p 93t/a>funcn va..p 94t/a>.p 95t/a> After scanning, the mode ordering is a bit different: the auto-dvtected SVGA.p 96t/a>modes are not listedlat all and the modes revealed by `scan' are shown before.p 97t/a>all VESA modes..p 98t/a>.p 99t/a>3. Mode IDs p100t/a>~~~~~~~~~~~.p101t/a> Because of the complexity of all the video stuff, the video mode IDs p102t/a>usedlhere are also a bit complex. A video mode ID is a 16-bit number usually p103t/a>expressedlin a hexadecimal notan> (startinglwith "0x"). You can set a mode p104t/a>by entering its mode directly if you know it even if it isn't shown on the menu..p105t/a>.p106t/a>The ID numberslcan be divided to three reg> s: p107t/a>.p108t/a> 0x0000 to 0x00ff - menu item references. 0x0000 is the first item. Don't use.p109t/a> outside the menu as this caalchange from boot to boot (especially if you.p110t/a> have usedlthe `scan' feature)..p111t/a>.p112t/a> 0x0100 to 0x017f - standard BIOSlmodes. The ID is a BIOSlvideo mode number.p113t/a> (as presented to INTp10, funcn va 00)lincreased by 0x0100..p114t/a>.p115t/a> 0x0200 to 0x08ff - VESA BIOSlmodes. The ID is a VESA mode ID increased by.p116t/a> 0x0100. All VESA modes should be autodvtected and shown on the menu..p117t/a>.p118t/a> 0x0900 to 0x09ff - Video7 special modes. Set by calling INTp0x10, AX=0x6f05..p119t/a> (Usually 940=80x43, 941=132x25, 942=132x44, 943=80x60, 944=100x60,.p120t/a> 945=132x28 for the standard Video7 BIOS).p121t/a>.p122t/a> 0x0f00 to 0x0fff - special modes (they are set by uerious tricks -- usually p123t/a> by modifying one of the standard modes). Currently available: p124t/a> 0x0f00 standard 80x25, don't reset mode if already set (=FFFF).p125t/a> 0x0f01 standard with 8-point font: 80x43 valEGA, 80x50 valVGA.p126t/a> 0x0f02 VGA 80x43 (VGA switched to 350 scanlineslwith a 8-point font).p127t/a> 0x0f03 VGA 80x28 (standard VGA scans, but 14-point font).p128t/a> 0x0f04 leave current video mode.p129t/a> 0x0f05 VGA 80x30 (480 scans, 16-point font).p130t/a> 0x0f06 VGA 80x34 (480 scans, 14-point font).p131t/a> 0x0f07 VGA 80x60 (480 scans, 8-point font).p132t/a> 0x0f08 Graphics hack (see the CONFIG_VIDEO_HACK paragraph below).p133t/a>.p134t/a> 0x1000 to 0x7fff - modes specifiedlby resolut va. The code has a "0xRRCC".p135t/a> form where RR is a number of rows and CC is a number of columns..p136t/a> E.g., 0x1950 correspvads to a 80x25 mode, 0x2b84 to 132x43 etc..p137t/a> This is the only fully portable way to refer to a non-standard mode,.p138t/a> but it relies on the mode being found and displayedlon the menu.p139t/a> (remember that mode scanning is not done automan>cally)..p140t/a>.p141t/a> 0xff00 to 0xffff - aliases for backward compan>bility: p142t/a> 0xffff equivalent to 0x0f00 (standard 80x25).p143t/a> 0xfffe equivalent to 0x0f01 (EGA 80x43 or VGA 80x50).p144t/a>.p145t/a> If you add 0x8000 to the mode ID, the program will try to recalculate.p146t/a>vert>cal display timing according to mode paramvters, which can be usedlto.p147t/a>eliminate some annoying bugs of certain VGAlBIOSes (usually those usedlfor.p148t/a>cardslwith S3 chipsetsland old Cirrus LogiclBIOSes) -- mainly extra lineslat the.p149t/a>end of the display..p150t/a>.p151t/a>4. Oon vas p152t/a>~~~~~~~~~~.p153t/a> Some oon vas can be set in the source text (in arch/i386/boot/video.S)..p154t/a>All of them are simple #define's -- change them to #undef's when you want to.p155t/a>switch them off. Currently supported: p156t/a>.p157t/a> CONFIG_VIDEO_SVGAl- enables autodvtect valof SVGAlcards. This is switched.p158t/a>off by default as it's a bit unreliable due to terribly bad PC design. If you.p159t/a>really want to have the adapter autodvtected (maybe in case the `scan' feature.p160t/a>doesn't work valyour machine), switch this valand don't cry if the results.p161t/a>are not completely sane. In caselyou really need this feature, pleaseldrop me.p162t/a>a mail as I thinklof removing it some day..p163t/a>.p164t/a> CONFIG_VIDEO_VESA - enables autodvtect valof VESA modes. If it doesn't work.p165t/a>valyour machine (or displays a "Error: Scanning of VESA modes failed" message),.p166t/a>you can switch it offland report as a bug..p167t/a>.p168t/a> CONFIG_VIDEO_COMPACT - enables compacting of the video mode list. If there.p169t/a>are more modes with the samv screen size, only the first one is kept (see above.p170t/a>for more info valmode ordering). However, in very strange cases it's possible.p171t/a>that the first "vers va" of the mode doesn't work although some of the others.p172t/a>do -- in this case turn this switch offlto see the rest..p173t/a>.p174t/a> CONFIG_VIDEO_RETAIN - enables retaining of screen contents when switching.p175t/a>video modes. Works only with some boot loaders which leave enough room for the.p176t/a>buffer. (If you have old LILO, you can adjust heap_end_ptr and loadflags.p177t/a>in setup.S, but it's better to upgrade the boot loader...).p178t/a>.p179t/a> CONFIG_VIDEO_LOCAL - enables inclus valof "local modes" inlthe list. The.p180t/a>local modes are added automan>cally to the beginning of the list not depending.p181t/a>valhardware configurat va. The local modes are listedlin the source text after.p182t/a>the "local_mode_table:" line. The comment before this line describes the format p183t/a>of the table (which also includes a video card namv to be displayedlon the p184t/a>top of the menu)..p185t/a>.p186t/a> CONFIG_VIDEO_400_HACK - force setting of 400 scan lineslfor standard VGA.p187t/a>modes. This von valis intended to be usedlvalcertain buggylBIOSes which draw.p188t/a>some useless logo using font downloadland then fail to reset the correct mode..p189t/a>Don't use unless needed as it forces resetting the video card..p190t/a>.p191t/a> CONFIG_VIDEO_GFX_HACK - includes special hack for setting of graphics modes.p192t/a>to be usedllater by special drivers (e.g., 800x600 valIBM ThinkPad -- see.p193t/a>ftp://ftp.phys.keio.ac.jp/pub/XFree86/800x600/XF86Configs/XF86Config.IBM_TP560)..p194t/a>Allows to set _any_ BIOSlmode including graphic onesland forcing specific.p195t/a>text screen resolut va instead of peeking it from BIOSlvariables. Don't use.p196t/a>unless you thinklyou know what you're doing. To acn>vate this setup, use.p197t/a>mode number 0x0f08 (see secn val3)..p198t/a>.p199t/a>5. Still doesn't work?.p200t/a>~~~~~~~~~~~~~~~~~~~~~~.p201t/a> When the mode dvtect valdoesn't work (e.g., the mode list is incorrect or.p202t/a>the machine hangs instead of displaying the menu), try to switch offlsome of.p203t/a>the configurat va oon vas listedlin secn val4. If it fails, you can still use.p204t/a>your kernel with the video mode set directly via the kernel paramvter..p205t/a>.p206t/a> In either case, pleaselsend me a bug report containinglwhat _exactly_.p207t/a>happens and how do the configurat va switches affect the behaviour of the bug..p208t/a>.p209t/a> If you start Linux from M$-DOS, you might also use some DOS toolslfor.p210t/a>video mode setting. In this case, you must specifylthe 0x0f04 mode ("leave.p211t/a>current settings")lto Linux, because if you don't and you use any non-standard.p212t/a>mode, Linux will switch to 80x25 automan>cally..p213t/a>.p214t/a> If you set some extended mode and there's one or more extra lineslon the p215t/a>bottvm of the display containinglalready scrolled-out text,lyour VGAlBIOS p216t/a>contains the most commvaluideo BIOS bug called "incorrect vert>cal display p217t/a>end setting". Adding 0x8000 to the mode ID might fix the problem. Unfortunately,.p218t/a>this must be done manually -- no autodvtect valmechanisms are available..p219t/a>.p220t/a> If you have a VGA card and your display still looks as valEGA, your BIOS.p221t/a>is probably broken and you need to set the CONFIG_VIDEO_400_HACK switch to.p222t/a>force setting of the correct mode..p223t/a>.p224t/a>6. History p225t/a>~~~~~~~~~~.p226t/a>1.0 (??-Nov-95) First vers valsupportinglall adapters supported by the old.p227t/a> setup.S + Cirrus Logicl54XX.pPresent ialsome 1.3.4? kernels p228t/a> and then removed due to instability valsome machines..p229t/a>2.0 (28-Jan-96) Rewritten from scratch. Cirrus Logicl64XX support added,lalmost.p230t/a> everything is configurable, the VESA support should be much more.p231t/a> stable, explicit mode numberinglallowed, "scan" implemented etc..p232t/a>2.1 (30-Jan-96) VESA modes moved to 0x200-0x3ff. Mode select valby resolut va.p233t/a> supported. Few bugs fixed. VESA modes are listedlprior to.p234t/a> modes suppliedlby SVGAlautodvtect valas they are more reliable..p235t/a> CLGDlautodvtect works better. Doesn't depend on 80x25 being.p236t/a> acn>ve when started. Scanning fixed. 80x43 (any VGA) added..p237t/a> Code cleanedlup..p238t/a>2.2 (01-Feb-96) EGA 80x43 fixed. VESA extended to 0x200-0x4ff (non-standard 02XX.p239t/a> VESA modes work now). Display end bug workaround supported..p240t/a> Special modes renumbered to allow adding of the "recalculate".p241t/a> flag, 0xffff and 0xfffe became aliases instead of real IDs..p242t/a> Screen contents retained duringlmode changes..p243t/a>2.3 (15-Mar-96) Changed to work with 1.3.74 kernel..p244t/a>2.4 (18-Mar-96) Added patches by Hans Lermen fixinglalmemory vverwrite problem.p245t/a> with some boot loaders. Memory management rewritten to reflect.p246t/a> theselchanges. Unfortunately, screen contents retaining works.p247t/a> only with some loaders now..p248t/a> Added a Tseng 132x60 mode..p249t/a>2.5 (19-Mar-96) Fixed a VESA mode scanning bug introducedlin 2.4..p250t/a>2.6 (25-Mar-96) Some VESA BIOS errors not reported -- it fixes error reports va.p251t/a> several cardslwith broken VESA code (e.g., ATI VGA)..p252t/a>2.7 (09-Apr-96) - Accepted all VESA modes in range 0x100 to 0x7ff, because some.p253t/a> cardsluse very strange mode numbers..p254t/a> - Added Realtek VGA modes (thanks to Gonzalo Tornaria)..p255t/a> - Hardware testing order slightly changed, tests basedlvalROM.p256t/a> contents done as first..p257t/a> - Added support for special Video7 mode switching funcn vas.p258t/a> (thanks to Tom Vander Aa)..p259t/a> - Added 480-scanline modes (especially useful for notebooks,.p260t/a> original vers valwritten by hhanemaa@cs.ruu.nl, patched by.p261t/a> Jeff Chua, rewritten by me)..p262t/a> - Screen store/restore fixed..p263t/a>2.8 (14-Apr-96) - Previous releaselwas not compilable without CONFIG_VIDEO_SVGA..p264t/a> - Better recognit valof text modes duringlmode scan..p265t/a>2.9 (12-May-96) - Ignored VESA modes 0x80 - 0xff (more VESA BIOS bugs!).p266t/a>2.10 (11-Nov-96)- The whole thinglmade oon vaal..p267t/a> - Added the CONFIG_VIDEO_400_HACK switch..p268t/a> - Added the CONFIG_VIDEO_GFX_HACK switch..p269t/a> - Code cleanup..p270t/a>2.11 (03-May-97)- Yet another cleanup, now including also the documentan> ..p271t/a> - Direct testing of SVGAladapters turnedloff by default, `scan'.p272t/a> offered explicitlylon the prompt line..p273t/a> - Removed the doc secn valdescribing adding of new probing.p274t/a> funcn vas as I try to get rid of _all_lhardware probinglhere..p275t/a>2.12 (25-May-98)- Added support for VESA framv buffer graphics..p276t/a>2.13 (14-May-99)- Minor documentan> fixes..p277t/a>
lxr.linux.no kindly hostedlby Redpill Linpro ASt/a>, prouider of Linux consulting and operan vas services sincep1995.