<!DOCTYPE html>
<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>vesafb - Generic graphic framebuffer driver — The Linux Kernel documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=3918102e" />
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../_static/doctools.js?v=9bcbadda"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="VIA Integration Graphic Chip Console Framebuffer Driver" href="viafb.html" />
<link rel="prev" title="uvesafb - A Generic Driver for VBE2+ compliant video cards" href="uvesafb.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
</head><body>
<div class="document">
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/logo.svg" alt="Logo of The Linux Kernel"/>
</a></p>
<h1 class="logo"><a href="../index.html">The Linux Kernel</a></h1>
<p class="blurb">6.18.50</p>
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
<p>
<h3 class="kernel-toc-contents">Contents</h3>
<input type="checkbox" class="kernel-toc-toggle" id = "kernel-toc-toggle" checked>
<label class="kernel-toc-title" for="kernel-toc-toggle"></label>
<div class="kerneltoc" id="kerneltoc">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../process/development-process.html">Development process</a></li>
<li class="toctree-l1"><a class="reference internal" href="../process/submitting-patches.html">Submitting patches</a></li>
<li class="toctree-l1"><a class="reference internal" href="../process/code-of-conduct.html">Code of conduct</a></li>
<li class="toctree-l1"><a class="reference internal" href="../maintainer/index.html">Maintainer handbook</a></li>
<li class="toctree-l1"><a class="reference internal" href="../process/index.html">All development-process docs</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../core-api/index.html">Core API</a></li>
<li class="toctree-l1"><a class="reference internal" href="../driver-api/index.html">Driver APIs</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../subsystem-apis.html">Subsystems</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../subsystem-apis.html#core-subsystems">Core subsystems</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../subsystem-apis.html#human-interfaces">Human interfaces</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../input/index.html">Input Documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../hid/index.html">Human Interface Devices (HID)</a></li>
<li class="toctree-l3"><a class="reference internal" href="../sound/index.html">Sound Subsystem Documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../gpu/index.html">GPU Driver Developer’s Guide</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="index.html">Frame Buffer</a></li>
<li class="toctree-l3"><a class="reference internal" href="../leds/index.html">LEDs</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../subsystem-apis.html#networking-interfaces">Networking interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="../subsystem-apis.html#storage-interfaces">Storage interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="../subsystem-apis.html#other-subsystems">Other subsystems</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../locking/index.html">Locking</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../process/license-rules.html">Licensing rules</a></li>
<li class="toctree-l1"><a class="reference internal" href="../doc-guide/index.html">Writing documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dev-tools/index.html">Development tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dev-tools/testing-overview.html">Testing guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../kernel-hacking/index.html">Hacking guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../trace/index.html">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../fault-injection/index.html">Fault injection</a></li>
<li class="toctree-l1"><a class="reference internal" href="../livepatch/index.html">Livepatching</a></li>
<li class="toctree-l1"><a class="reference internal" href="../rust/index.html">Rust</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../admin-guide/index.html">Administration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../kbuild/index.html">Build system</a></li>
<li class="toctree-l1"><a class="reference internal" href="../admin-guide/reporting-issues.html">Reporting issues</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tools/index.html">Userspace tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../userspace-api/index.html">Userspace API</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../firmware-guide/index.html">Firmware</a></li>
<li class="toctree-l1"><a class="reference internal" href="../devicetree/index.html">Firmware and Devicetree</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../arch/index.html">CPU architectures</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../staging/index.html">Unsorted documentation</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../translations/index.html">Translations</a></li>
</ul>
</div>
<script type="text/javascript"> <!--
var sbar = document.getElementsByClassName("sphinxsidebar")[0];
let currents = document.getElementsByClassName("current")
if (currents.length) {
sbar.scrollTop = currents[currents.length - 1].offsetTop;
}
--> </script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/fb/vesafb.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="vesafb-generic-graphic-framebuffer-driver">
<h1>vesafb - Generic graphic framebuffer driver<a class="headerlink" href="#vesafb-generic-graphic-framebuffer-driver" title="Link to this heading">¶</a></h1>
<p>This is a generic driver for a graphic framebuffer on intel boxes.</p>
<p>The idea is simple: Turn on graphics mode at boot time with the help
of the BIOS, and use this as framebuffer device /dev/fb0, like the m68k
(and other) ports do.</p>
<p>This means we decide at boot time whenever we want to run in text or
graphics mode. Switching mode later on (in protected mode) is
impossible; BIOS calls work in real mode only. VESA BIOS Extensions
Version 2.0 are required, because we need a linear frame buffer.</p>
<p>Advantages:</p>
<blockquote>
<div><ul class="simple">
<li><p>It provides a nice large console (128 cols + 48 lines with 1024x768)
without using tiny, unreadable fonts.</p></li>
<li><p>You can run XF68_FBDev on top of /dev/fb0 (=> non-accelerated X11
support for every VBE 2.0 compliant graphics board).</p></li>
<li><p>Most important: boot logo :-)</p></li>
</ul>
</div></blockquote>
<p>Disadvantages:</p>
<blockquote>
<div><ul class="simple">
<li><p>graphic mode is slower than text mode...</p></li>
</ul>
</div></blockquote>
<section id="how-to-use-it">
<h2>How to use it?<a class="headerlink" href="#how-to-use-it" title="Link to this heading">¶</a></h2>
<p>Switching modes is done using the vga=... boot parameter. Read
<a class="reference internal" href="../admin-guide/svga.html"><span class="doc">Video Mode Selection Support 2.13</span></a> for details.</p>
<p>You should compile in both vgacon (for text mode) and vesafb (for
graphics mode). Which of them takes over the console depends on
whenever the specified mode is text or graphics.</p>
<p>The graphic modes are NOT in the list which you get if you boot with
vga=ask and hit return. The mode you wish to use is derived from the
VESA mode number. Here are those VESA mode numbers:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>colors</p></th>
<th class="head"><p>640x480</p></th>
<th class="head"><p>800x600</p></th>
<th class="head"><p>1024x768</p></th>
<th class="head"><p>1280x1024</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>256</p></td>
<td><p>0x101</p></td>
<td><p>0x103</p></td>
<td><p>0x105</p></td>
<td><p>0x107</p></td>
</tr>
<tr class="row-odd"><td><p>32k</p></td>
<td><p>0x110</p></td>
<td><p>0x113</p></td>
<td><p>0x116</p></td>
<td><p>0x119</p></td>
</tr>
<tr class="row-even"><td><p>64k</p></td>
<td><p>0x111</p></td>
<td><p>0x114</p></td>
<td><p>0x117</p></td>
<td><p>0x11A</p></td>
</tr>
<tr class="row-odd"><td><p>16M</p></td>
<td><p>0x112</p></td>
<td><p>0x115</p></td>
<td><p>0x118</p></td>
<td><p>0x11B</p></td>
</tr>
</tbody>
</table>
<p>The video mode number of the Linux kernel is the VESA mode number plus
0x200:</p>
<blockquote>
<div><p>Linux_kernel_mode_number = VESA_mode_number + 0x200</p>
</div></blockquote>
<p>So the table for the Kernel mode numbers are:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>colors</p></th>
<th class="head"><p>640x480</p></th>
<th class="head"><p>800x600</p></th>
<th class="head"><p>1024x768</p></th>
<th class="head"><p>1280x1024</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>256</p></td>
<td><p>0x301</p></td>
<td><p>0x303</p></td>
<td><p>0x305</p></td>
<td><p>0x307</p></td>
</tr>
<tr class="row-odd"><td><p>32k</p></td>
<td><p>0x310</p></td>
<td><p>0x313</p></td>
<td><p>0x316</p></td>
<td><p>0x319</p></td>
</tr>
<tr class="row-even"><td><p>64k</p></td>
<td><p>0x311</p></td>
<td><p>0x314</p></td>
<td><p>0x317</p></td>
<td><p>0x31A</p></td>
</tr>
<tr class="row-odd"><td><p>16M</p></td>
<td><p>0x312</p></td>
<td><p>0x315</p></td>
<td><p>0x318</p></td>
<td><p>0x31B</p></td>
</tr>
</tbody>
</table>
<p>To enable one of those modes you have to specify “vga=ask” in the
lilo.conf file and rerun LILO. Then you can type in the desired
mode at the “vga=ask” prompt. For example if you like to use
1024x768x256 colors you have to say “305” at this prompt.</p>
<p>If this does not work, this might be because your BIOS does not support
linear framebuffers or because it does not support this mode at all.
Even if your board does, it might be the BIOS which does not. VESA BIOS
Extensions v2.0 are required, 1.2 is NOT sufficient. You will get a
“bad mode number” message if something goes wrong.</p>
<ol class="arabic simple">
<li><p>Note: LILO cannot handle hex, for booting directly with
“vga=mode-number” you have to transform the numbers to decimal.</p></li>
<li><p>Note: Some newer versions of LILO appear to work with those hex values,
if you set the 0x in front of the numbers.</p></li>
</ol>
</section>
<section id="x11">
<h2>X11<a class="headerlink" href="#x11" title="Link to this heading">¶</a></h2>
<p>XF68_FBDev should work just fine, but it is non-accelerated. Running
another (accelerated) X-Server like XF86_SVGA might or might not work.
It depends on X-Server and graphics board.</p>
<p>The X-Server must restore the video mode correctly, else you end up
with a broken console (and vesafb cannot do anything about this).</p>
</section>
<section id="refresh-rates">
<h2>Refresh rates<a class="headerlink" href="#refresh-rates" title="Link to this heading">¶</a></h2>
<p>There is no way to change the vesafb video mode and/or timings after
booting linux. If you are not happy with the 60 Hz refresh rate, you
have these options:</p>
<blockquote>
<div><ul class="simple">
<li><p>configure and load the DOS-Tools for the graphics board (if
available) and boot linux with loadlin.</p></li>
<li><p>use a native driver (matroxfb/atyfb) instead if vesafb. If none
is available, write a new one!</p></li>
<li><p>VBE 3.0 might work too. I have neither a gfx board with VBE 3.0
support nor the specs, so I have not checked this yet.</p></li>
</ul>
</div></blockquote>
</section>
<section id="configuration">
<h2>Configuration<a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2>
<p>The VESA BIOS provides protected mode interface for changing
some parameters. vesafb can use it for palette changes and
to pan the display. It is turned off by default because it
seems not to work with some BIOS versions, but there are options
to turn it on.</p>
<p>You can pass options to vesafb using “video=vesafb:option” on
the kernel command line. Multiple options should be separated
by comma, like this: “video=vesafb:ypan,inverse”</p>
<p>Accepted options:</p>
<p>inverse use inverse color map</p>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>ypan</p></td>
<td><p>enable display panning using the VESA protected mode
interface. The visible screen is just a window of the
video memory, console scrolling is done by changing the
start of the window.</p>
<p>pro:</p>
<blockquote>
<div><ul class="simple">
<li><p>scrolling (fullscreen) is fast, because there is
no need to copy around data.</p></li>
</ul>
</div></blockquote>
<p>kontra:</p>
<blockquote>
<div><ul class="simple">
<li><p>scrolling only parts of the screen causes some
ugly flicker effects (boot logo flickers for
example).</p></li>
</ul>
</div></blockquote>
</td>
</tr>
<tr class="row-even"><td><p>ywrap</p></td>
<td><p>Same as ypan, but assumes your gfx board can wrap-around
the video memory (i.e. starts reading from top if it
reaches the end of video memory). Faster than ypan.</p></td>
</tr>
<tr class="row-odd"><td><p>redraw</p></td>
<td><p>Scroll by redrawing the affected part of the screen, this
is the safe (and slow) default.</p></td>
</tr>
<tr class="row-even"><td><p>vgapal</p></td>
<td><p>Use the standard vga registers for palette changes.
This is the default.</p></td>
</tr>
<tr class="row-odd"><td><p>pmipal</p></td>
<td><p>Use the protected mode interface for palette changes.</p></td>
</tr>
<tr class="row-even"><td><p>mtrr:n</p></td>
<td><p>Setup memory type range registers for the vesafb framebuffer
where n:</p>
<blockquote>
<div><ul class="simple">
<li><p>0 - disabled (equivalent to nomtrr) (default)</p></li>
<li><p>1 - uncachable</p></li>
<li><p>2 - write-back</p></li>
<li><p>3 - write-combining</p></li>
<li><p>4 - write-through</p></li>
</ul>
</div></blockquote>
<p>If you see the following in dmesg, choose the type that matches the
old one. In this example, use “mtrr:2”.</p>
</td>
</tr>
<tr class="row-odd"><td><p>...</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>mtrr:</p></td>
<td><p>type mismatch for e0000000,8000000 old: write-back new:
write-combining</p></td>
</tr>
<tr class="row-odd"><td><p>...</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>nomtrr</p></td>
<td><p>disable mtrr</p></td>
</tr>
<tr class="row-odd"><td><p>vremap:n</p></td>
<td><p>Remap ‘n’ MiB of video RAM. If 0 or not specified, remap memory
according to video mode. (2.5.66 patch/idea by Antonino Daplas
reversed to give override possibility (allocate more fb memory
than the kernel would) to 2.4 by <a class="reference external" href="mailto:tmb%40iki.fi">tmb<span>@</span>iki<span>.</span>fi</a>)</p></td>
</tr>
<tr class="row-even"><td><p>vtotal:n</p></td>
<td><p>If the video BIOS of your card incorrectly determines the total
amount of video RAM, use this option to override the BIOS (in MiB).</p></td>
</tr>
</tbody>
</table>
<p>Have fun!</p>
<p>Gerd Knorr <<a class="reference external" href="mailto:kraxel%40goldbach.in-berlin.de">kraxel<span>@</span>goldbach<span>.</span>in-berlin<span>.</span>de</a>></p>
<p>Minor (mostly typo) changes
by Nico Schmoigl <<a class="reference external" href="mailto:schmoigl%40rumms.uni-mannheim.de">schmoigl<span>@</span>rumms<span>.</span>uni-mannheim<span>.</span>de</a>></p>
</section>
</section>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©The kernel development community.
|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 8.1.3</a>
& <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
|
<a href="../_sources/fb/vesafb.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>