Difference between revisions of "Uvesafb"

(Bootloader configuration)
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== ''How to'' : Framebuffer: Userspace VESA VGA graphics support ==
 
== ''How to'' : Framebuffer: Userspace VESA VGA graphics support ==
Uvesafb is an improved framebuffer driver for Linux systems with some enhancements compared to vesa.  
+
Uvesafb is an improved framebuffer driver for Linux systems with some enhancements compared to vesa. Uvesafb can allow you to get a full-resolution console, even if you have installed a graphics driver that does not support full-resolution consoles. Examples of drivers like these: [[Package:AMD_Catalyst_Video_Drivers| ati-drivers]] and NVidia-drivers.
=Kernel configuration=
+
  
 +
== Kernel configuration ==
 +
Before we emerge the required packages for uvesafb functionality, we have to configure the kernel properly.
 +
{{SectionNeedsUpdates}}
 +
<br>
 
{{Kernelop
 
{{Kernelop
| <br> |<pre>
+
|title=
 +
|desc=
 
Device Drivers ->
 
Device Drivers ->
 
     <*> Connector - unified userspace <-> kernelspace linker  --->
 
     <*> Connector - unified userspace <-> kernelspace linker  --->
Line 15: Line 19:
 
             Frame buffer hardware drivers
 
             Frame buffer hardware drivers
 
             [*] Userspace VESA VGA graphics support
 
             [*] Userspace VESA VGA graphics support
</pre>}}
+
}}
  
Build the kernel, do not install the kernel and modules. Note, that you can choose uvesafb as module, unlike vesa.
+
{{fancynote| Build the kernel (<tt>make</tt>), do not install the kernel and modules (<tt> make install modules_install</tt>). You can choose uvesafb as a module, unlike vesa.}}
  
 
== Klibc ==
 
== Klibc ==
  
Next, we emerge {{Package|dev-libs/klibc}}:
+
Next, we emerge {{Package|dev-libs/klibc}}. Klibc has to be compiled against a kernel that includes uvesafb support. This only has to be done once:
 
<console>
 
<console>
###i## emerge -av klibc
+
###i## emerge klibc
 
</console>
 
</console>
This step is necessary because klibc has to be compiled against a kernel that includes uvesafb. You need to do it only once.
 
  
 
== v86d ==
 
== v86d ==
 
{{Package|sys-apps/v86d}} is the userspace helper that runs x86 code in emulated environment. Uvesafb will not work without v86d. Now, we emerge <code>v86d</code>:
 
{{Package|sys-apps/v86d}} is the userspace helper that runs x86 code in emulated environment. Uvesafb will not work without v86d. Now, we emerge <code>v86d</code>:
 
<console>
 
<console>
###i## emerge -av v86d
+
###i## emerge v86d
 
</console>
 
</console>
  
 
== Back to kernel configuration ==
 
== Back to kernel configuration ==
Reconfigure the kernel:
+
Reconfigure the kernel to include <tt>/usr/share/v86d/initramfs</tt> as an initramfs source file:
 
{{Kernelop
 
{{Kernelop
| <br> |<pre>
+
|title=
 +
|desc=
 
General Setup->
 
General Setup->
(*)Initial RAM filesystem and RAM disk (initramfs/initrd) support
+
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
</pre>}}
+
(/usr/share/v86d/initramfs)    Initramfs source file(s)
 +
}}
 
Rebuild the kernel: make and install it, install the modules
 
Rebuild the kernel: make and install it, install the modules
  
=Bootloader configuration=
+
== Bootloader configuration ==
add <code>video=uvesafb:1440x900-32,mtrr:3,ywrap</code> (or similar) to your kernel command line, like in example <code>boot.conf</code>
+
If you compiled uvesafb into the kernel (not as a module), you can configure its behavior by editing the '<tt>params += </tt>' line in <tt>/etc/boot.conf</tt>. Below, some of the more common switches used with uvesafb are explained.
 +
* <tt>video=uvesafb:<screen y-res>x<screen x-res>-<color depth></tt>: Tells the kernel that you want to use the uvesafb driver for console output. Also specifies that you will be using uvesafb at a set x-screen resolution, y screen-resolution, and color depth. Set the first part to the size of your screen (in pixels). For example, if I had a 1920x1080 screen and wanted a color depth of 32, I would add the following: <tt>video=uvesafb:1920x1080-32</tt>
  
<pre>boot {
+
* <tt>mtrr:x</tt>: X represents the number 0 or 3. This option allows you to set up the memory type range registers for uvesafb. Setting x=0 disables mtrr and setting x=3 enables mtrr. x=3 is the default setting for this switch. mtrr:3 is recommended.
 +
 
 +
* <tt>ywrap</tt>: Add support for display panning. Recommended.
 +
 
 +
{{fancytip| For more information regarding these switches, check out http://www.mjmwired.net/kernel/Documentation/fb/uvesafb.txt}}
 +
 
 +
Now that you have a basic understanding of these different switches, configure your <tt>/etc/boot.conf</tt>:
 +
 
 +
{{file|name=/etc/boot.conf|desc= |body=
 +
boot {
 
         generate grub
 
         generate grub
         default "Funtoo Linux uvesafb"  
+
         default "Funtoo Linux: uvesafb"  
 
         timeout 3  
 
         timeout 3  
 
}
 
}
   "Funtoo Linux uvesafb" {  
+
   "Funtoo Linux: uvesafb" {  
         kernel bzImage-uvesafb[-v]
+
         kernel bzImage[-v]
         params += video=uvesafb:1440x900-32,mtrr:3,ywrap
+
         params += video=uvesafb:1920x1080-32,mtrr:3,ywrap
}</pre>
+
}
 +
}}
 +
{{fancynote| Realize that the configuration in the above file will not work on every computer. You must change the resolution (and possibly other switches) to best suite your needs.}}
  
Then run:
+
After you have finished editing your <tt>/etc/boot.conf</tt>, run the following:
 
<console>
 
<console>
 
###i## boot-update
 
###i## boot-update
 
</console>  
 
</console>  
and then run:  
+
finally, reboot your computer so that you can test out uvesafb:
 
<console>
 
<console>
 
###i## reboot
 
###i## reboot
 
</console>
 
</console>
and enjoy uvesafb!
 
 
  
 
[[Category:HOWTO]]
 
[[Category:HOWTO]]

Revision as of 17:42, July 12, 2014

How to : Framebuffer: Userspace VESA VGA graphics support

Uvesafb is an improved framebuffer driver for Linux systems with some enhancements compared to vesa. Uvesafb can allow you to get a full-resolution console, even if you have installed a graphics driver that does not support full-resolution consoles. Examples of drivers like these: ati-drivers and NVidia-drivers.

Kernel configuration

Before we emerge the required packages for uvesafb functionality, we have to configure the kernel properly.

Important

This section is in need of updates.


Device Drivers ->
    <*> Connector - unified userspace <-> kernelspace linker  --->
    Graphics support ->
        [*] Support for frame buffer devices  --->
            [*] Enable firmware EDID
            Console display driver support ->
                [*] Video mode selection support
                [*] Video mode handling helpers
            Frame buffer hardware drivers
            [*] Userspace VESA VGA graphics support

Note

Build the kernel (make), do not install the kernel and modules ( make install modules_install). You can choose uvesafb as a module, unlike vesa.

Klibc

Next, we emerge dev-libs/klibc (package not on wiki - please add). Klibc has to be compiled against a kernel that includes uvesafb support. This only has to be done once:

# emerge klibc

v86d

sys-apps/v86d (package not on wiki - please add) is the userspace helper that runs x86 code in emulated environment. Uvesafb will not work without v86d. Now, we emerge v86d:

# emerge v86d

Back to kernel configuration

Reconfigure the kernel to include /usr/share/v86d/initramfs as an initramfs source file:

General Setup->
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
(/usr/share/v86d/initramfs)    Initramfs source file(s)

Rebuild the kernel: make and install it, install the modules

Bootloader configuration

If you compiled uvesafb into the kernel (not as a module), you can configure its behavior by editing the 'params += ' line in /etc/boot.conf. Below, some of the more common switches used with uvesafb are explained.

  • video=uvesafb:<screen y-res>x<screen x-res>-<color depth>: Tells the kernel that you want to use the uvesafb driver for console output. Also specifies that you will be using uvesafb at a set x-screen resolution, y screen-resolution, and color depth. Set the first part to the size of your screen (in pixels). For example, if I had a 1920x1080 screen and wanted a color depth of 32, I would add the following: video=uvesafb:1920x1080-32
  • mtrr:x: X represents the number 0 or 3. This option allows you to set up the memory type range registers for uvesafb. Setting x=0 disables mtrr and setting x=3 enables mtrr. x=3 is the default setting for this switch. mtrr:3 is recommended.
  • ywrap: Add support for display panning. Recommended.

Tip

For more information regarding these switches, check out http://www.mjmwired.net/kernel/Documentation/fb/uvesafb.txt

Now that you have a basic understanding of these different switches, configure your /etc/boot.conf:

/etc/boot.conf
boot {
        generate grub
        default "Funtoo Linux: uvesafb" 
        timeout 3 
}
  "Funtoo Linux: uvesafb" { 
        kernel bzImage[-v]
        params += video=uvesafb:1920x1080-32,mtrr:3,ywrap
}

Note

Realize that the configuration in the above file will not work on every computer. You must change the resolution (and possibly other switches) to best suite your needs.

After you have finished editing your /etc/boot.conf, run the following:

# boot-update

finally, reboot your computer so that you can test out uvesafb:

# reboot