Enable framebuffer in Linux

Source: Internet
Author: User

Fb0, FB, and other devices cannot be found in the/dev/directory of Debian. You can change the/boot/GRUB/menu. LST file.

Add a VGA = 0x0317 to the kernel sentence.

title           Debian GNU/Linux, kernel 2.6.26-2-686
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/hda1 ro quiet vga=0x0317
initrd /boot/initrd.img-2.6.26-2-686

title Debian GNU/Linux, kernel 2.6.26-2-686 (single-user mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/hda1 ro single
initrd /boot/initrd.img-2.6.26-2-686

After reboot, the/dev/fb0 device is available.

For other Linux versions, see the following method:

From :( jyj_block_science and Technology)

Http://blog.csdn.net/yeqishi/archive/2010/05/09/5573097.aspx

Linux-Lilo mode startup

Make sure that your Linux kernel includes framebuffer support and the VESA framebuffer driver. This driver is included in the kernel of the RedHat Linux 6.x and later releases. If you use a self-compiled kernel, check your Kernel configuration. If you use the Lilo boot loader, You need to modify/etc/Lilo. CONF file. In the kernel option section you are using, add the following line (for grub users, go to step 1): VGA = 0 x 6th

In this way, when the Linux kernel is started, the display mode is set to 1024x768x16bpp. If your monitor cannot reach this display resolution, you can set VGA to 0x0314, which corresponds to the 800x600x16bpp display mode. The modified/etc/Lilo. conf file is similar to the following:

Boot =/dev/hda
Map =/boot/Map
Install =/boot. B
Prompt
Timeout = 50
Linear
Default = Linux
Image =/boot/vmlinuz-2.4.2
VGA = 0x0317; this line sets the display mode.
Label = Linux
Read-Only
Root =/dev/hda6
Other =/dev/hda1
Label = DoS

Run the Lilo command to make the modification take effect and restart the system:
# Lilo
# Reboot
If everything works properly, you will see the cute Linux mascot Penguin or RedHat Linux blue sky and white cloud product logo in the upper left corner of the screen during the Linux kernel boot process, the display mode of the system has changed.

Linux-grub mode startup

If you are using Red Hat 7.x or later, and you have installed red hat With grub
Instead of using lilo as the boot loader, the method for setting framebuffer is somewhat different:

First, to activate the VESA framebuffer driver, you need to modify the/boot/GRUB/menu. LST file and add VGA = 0x0317 to the line in the kernel header. You can also copy existing boot options and modify the copied options, for example:

# Grub. conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# Notice: you do not have a/boot partition. This means that
# All kernel and initrd paths are relative to/, eg.
# Root (hd0, 0)
# Kernel/boot/vmlinuz-version ro root =/dev/hda1
# Initrd/boot/initrd-version.img
# Boot =/dev/hda

Default = 0
Timeout = 10
Splashimage = (hd0, 0)/boot/grub/splash.xpm.gz
Title Red Hat Linux (2.4.18-3, FrameBuffer)
Root (hd0, 0)
Kernel/boot/vmlinuz-2.4.18-3 ro root =/dev/hda1 vga = 0x0317
Initrd/boot/initrd-2.4.18-3.img
Title Red Hat Linux (2.4.18-3)
Root (hd0, 0)
Kernel/boot/vmlinuz-2.4.18-3 ro root =/dev/hda1
Initrd/boot/initrd-2.4.18-3.img

Here, Red Hat Linux (2.4.18-3, FrameBuffer) sets the guiding option for VESA FrameBuffer.

Second, modify the/boot/grub/menu. lst file and restart the system without executing commands similar to lilo.

VGA parameter table

Hwinfo -- framebuffer | grep Mode
Model: "NVIDIA GW-P/N @ PM898486GTQ14P: 0"
Mode 0x0300: 640x400 (+ 640), 8 bits
Mode 0x0301: 640x480 (+ 640), 8 bits
Mode 0x0303: 800x600 (+ 800), 8 bits
Mode 0x0305: 1024x768 (+ 1024), 8 bits
Mode 0x0307: 1280x1024 (+ 1280), 8 bits
Mode 0x030e: 320x200 (+ 640), 16 bits
Mode 0x030f: 320x200 (+ 1280), 24 bits
Mode 0x0311: 640x480 (+ 1280), 16 bits
Mode 0x0312: 640x480 (+ 2560), 24 bits
Mode 0x0314: 800x600 (+ 1600), 16 bits
Mode 0x0315: 800x600 (+ 3200), 24 bits
Mode 0x0317: 1024x768 (+ 2048), 16 bits
Mode 0x0318: 1024x768 (+ 4096), 24 bits
Mode 0x031a: 1280x1024 (+ 2560), 16 bits
Mode 0x031b: 1280x1024 (+ 5120), 24 bits
Mode 0x0330: 320x200 (+ 320), 8 bits
Mode 0x0331: 320x400 (+ 320), 8 bits
Mode 0x0332: 320x400 (+ 640), 16 bits
Mode 0x0333: 320x400 (+ 1280), 24 bits
Mode 0x0334: 320x240 (+ 320), 8 bits
Mode 0x0335: 320x240 (+ 640), 16 bits
Mode 0x0336: 320x240 (+ 1280), 24 bits
Mode 0x033d: 640x400 (+ 1280), 16 bits
Mode 0x033e: 640x400 (+ 2560), 24 bits
Mode 0x0345: 1600x1200 (+ 1600), 8 bits
Mode 0x0346: 1600x1200 (+ 3200), 16 bits
Mode 0x0347: 1400x1050 (+ 1400), 8 bits
Mode 0x0348: 1400x1050 (+ 2800), 16 bits
Mode 0x0349: 1400x1050 (+ 5600), 24 bits
Mode 0x034a: 1600x1200 (+ 6400), 24 bits
Mode 0x0352: 2048x1536 (+ 8192), 24 bits
Mode 0x0360: 1280x800 (+ 1280), 8 bits
Mode 0x0361: 1280x800 (+ 5120), 24 bits
Mode 0x0362: 768x480 (+ 768), 8 bits
Mode 0x0364: 1440x900 (+ 1440), 8 bits
Mode 0x0365: 1440x900 (+ 5760), 24 bits
Mode 0x0368: 1680x1050 (+ 1680), 8 bits
Mode 0x0369: 1680x1050 (+ 6720), 24 bits
Mode 0x037c: 1920x1200 (+ 1920), 8 bits
Mode 0x037d: 1920x1200 (+ 7680), 24 bits

Enable another Ubuntu

In Ubuntu, you cannot directly add vga = xxx to the kernel parameters of/boot/grub/menu. lst to enable Ubuntu FrameBuffer. You need to do some additional work.

1. edit/etc/initramfs-tools/modules and add:

Fbcon
Vesafb
Vga16fb

2. edit/etc/modprobe. d/blacklist-Ubuntu FrameBuffer and comment out the following two lines:

Blacklist vesafb
Blacklist vga16fb

3. Modify menu. lst of grub and add the fb resolution parameter at the end of the kernel line:

Vga = 0x317
In this way, the console is 1024x768, 16 bits.

4. Refresh and restart

Sudo update-initramfs-u

5. Install and set zhcon

Sudo apt-get install zhcon
You can add it to/etc/bash. bashrc.
Alias zhcon = 'zhcon -- utf8 -- drv = fb'

Now Ubuntu FrameBuffer is available. Open mplayer and enjoy watching movies in the following console.
Mplayer needs to specify the output video device as fbdev when watching videos in the console. As normal users cannot directly access the video, I can only use sudo here.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.