v86d - daemon to run x86 code in an emulated environment

hwinfo - Hardware identification system

sudo apt-get install v86d hwinfo


sudo hwinfo --framebuffer


    02: None 00.0: 11001 VESA Framebuffer
      [Created at bios.464]
      Unique ID: rdCR.sbqupgMqM7F
      Hardware Class: framebuffer
      Model: "NVIDIA G96 Board - kl1_n10p"
      Vendor: "NVIDIA Corporation"
      Device: "G96 Board - kl1_n10p"
      SubVendor: "NVIDIA"
      Revision: "Chip Rev"
      Memory Size: 14 MB
      Memory Range: 0xcd000000-0xcddfffff (rw)
      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 0x0366: 1600x900 (+3200), 16 bits
      Mode 0x0367: 1600x900 (+6400), 24 bits
      Mode 0x0368: 1680x1050 (+1680), 8 bits
      Mode 0x0369: 1680x1050 (+6720), 24 bits
      Mode 0x0370: 1600x900 (+1600), 8 bits
      Mode 0x037b: 1280x720 (+5120), 24 bits
      Mode 0x037c: 1920x1200 (+1920), 8 bits
      Mode 0x037d: 1920x1200 (+7680), 24 bits
      Config Status: cfg=new, avail=yes, need=no, active=unknown




GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1366x768-24,mtrr=3,scroll=ywrap"


其最终结果如下(不同的机器不一定相同,我的是Lenovo Y450):

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1366x768-24,mtrr=3,scroll=ywrap"
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
# Uncomment to disable graphical terminal (grub-pc only)
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
# Uncomment to disable generation of recovery mode menu entries
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"



uvesafb mode_option=1366x768-24 mtrr=3 scroll=ywrap添加上去。


# List of modules that you want to include in your initramfs.
# Syntax:  module_name [args ...]
# You must run update-initramfs(8) to effect this change.
# Examples:
# raid1
# sd_mod
uvesafb mode_option=1366x768-24 mtrr=3 scroll=ywrap


sudo update-grub2
sudo update-initramfs -u


linux Framebuffer分类(uvesafb、vesafb、sisfb)



A framebuffer enables the kernel to display graphics on an otherwise text only console. These drivers can also be used for other things, such as running a non-accelerated X server or playing video in media players with framebuffer support. Framebuffer support is a requirement for applications like Fbsplash and Qingy.


Some tinkering is involved to get the uvesafb driver working. You will need to enable Connector - unified userspace <-> kernelspace linker and Userspace VESA VGA graphics support.

Rebuild the kernel, but don't install it just yet. The reason we first needed to build the kernel is that we need klibc to compile against a kernel withConnector - unified userspace <-> kernelspace linker and Userspace VESA VGA graphics support enabled. Next we need the sys-apps/v86d userspace helper, emerge -av v86d

Now, read the initramfs kernel configuration chapter for instruction on enabling initramfs support, which is needed to include bits of sys-apps/v86d in the kernel. Set the Initramfs source file(s) to /usr/share/v86d/initramfs,

Note: If you need to add v86d to an already existing initramfs source directory, look in /usr/share/v86d/initramfsand copy the files listed there.

Rebuild the kernel yet again and finally install it.


The vesafb driver is a generic VESA driver that works with most VESA compatible cards.


For users with a SiS card, you want the sisfb driver.

This driver supports the following SiS cards:

    SiS 300 series: SiS 300/305, 540, 630(S), 730(S)
    SiS 315 series: SiS 315/H/PRO, 55x, (M)65x, 740, (M)661(F/M)X, (M)741(GX)
    SiS 330 series: SiS 330 ("Xabre"), (M)760

Kernel Command Line Options

The kernel will only use the framebuffer if it is specifically told to do so. The required kernel command line option here is video= followed by the desired driver, a set of options, resolution, color depth and refresh rate.


Add to the kernel line of your /boot/grub/grub.conf, substituting the options to your liking,


You can also create an entry disabling uvesafb using the following,


One reason for disabling UVesaFB, is to avoid known conflicts when using the binary NVidia driver with hibernate/suspend feature.

A uvesafb example is shown below, but keep in mind that how the kernel is told to use the framebuffer differs from driver to driver.

File: /boot/grub/grub.conf

title=Gentoo Linux
kernel /boot/bzImage root=/dev/hda3 video=uvesafb:ywrap,mtrr:3,1024x768-32@70

Here we told the kernel to use the uvesafb driver with the ywrap and mtrr:3 options, set the resolution to 1024x768 with a color depth of 32 bits and a refresh rate of 70Hz.


If you use the vesafb driver you will need to omit the resolution, color depth and refresh rate from the video= and follow with a vga= parameter. The vga= takes a decimal value (with no preceding 0x), or ask. Setting vga=ask is a good idea if you are unsure what to use, as the kernel will stop and ask you for the desired resolution and color depth. The Linux video mode numbers can be found here, but you should be aware that these number might not work on your particular hardware. A better way to see the modes you can set is to run:

hwinfo --vbe|grep Mode

So a vesafb example would be,

video=vesafb:mtrr:3,ywrap vga=792

which would be equivalent to a uvesafb of:


To create a profile for disabling framebuffer, use either vga=normal or vga=nofb, or just omit vga= entirely.


The video= parameter differs from other drivers.

The uvesafb driver entry,


would, using sisfb be,


Make sure you set the memory size of your card in KiB using the mem: option.

Other Options


The mtrr option defaults to mtrr:0, meaning that MTRR will be disabled — equivalent to the nomtrr option.

The safest option is probably to use mtrr:1 and the most optimal option is most likely mtrr:3. The values represent:

0 - Disabled (equivalent to nomtrr) (default)
1 - Uncacheable
2 - Write-back
3 - Write-combining
4 - Write-through

Review the kernel documentation for more information.

ypan, ywrap and redraw

The ypan, ywrap and redraw are scrolling options. They set the way the kernel will handle the scrolling and panning of the framebuffer. If none of these are specified, the redraw option will be used, this is the safest but slowest option. Most modern hardware can handle ywrap, so this is most likely the option you want to use. If that fails you could try ypan, expect flickering using this though.

To clarify, a complete kernel command line in /boot/grub/grub.conf, using the uvesafb driver, with the mtrr:3 and ywrap options using a resolution of 1600x1200, a color depth of 32 bits and a refresh rate of 70 Hz would be:

File: /boot/grub/grub.conf

kernel /boot/bzImage root=/dev/hda3 video=uvesafb:1600x1200-32@70,mtrr:3,ywrap

Review the Kernel Documentation for more information.

Ubuntu 10.10启动进入命令行模式

  1. 运行 sudo gedit /etc/default/grub
  2. 找到 GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
  3. 改为 GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash text”
  4. 运行 sudo update-grub
  5. 重启 over


另外 中文locale下在命令行界面显示中文可以非常简单的安装zhcon即可 还自带命令行下的中文输入法

sudo aptitude install zhcon
zhcon --utf8

注意 一定要以 --utf8参数启动,zhcon默认是gb2312编码

如果控制台下没有输入中文的需要 ,那么可以使用jfbterm ,显示速度更快,也漂亮一点

sudo aptitude install jfbterm
jfbterm -q -c other,UTF-8,iconv,UTF-8

由于参数较长 可以写入文件并加上执行权限来运行

另外 ,为了开启framebuffer ,以提升zhcon或者jfbterm的性能,还需要修改 /etc/default/grub 文件, 将GRUB_GFXMODE前面的注释(#号)去掉,后面的根据你的机器修改为 800x600或者1024x768,注意不要修改为宽屏分辨率,除非你用vbeinfo这个命令测试出显卡支持宽屏分辨率下的framebuffer