Ubuntu下使用Framebuffer–(jianingy’s blog)

fortruth posted @ 2007年5月26日 07:51 , 1041 阅读

Ubuntu比较怪,用自己编译的kernel直接向kernel传递vga=791开启1024×768的framebuffer不起作用。在EASYSOU.CN搜索了一段时间后终于搞定。简述一下ubuntu下开启framebuffer的步骤。

* 在kernel 中编入VESA Support & Framebuffer Console Support。这两个选项分别在Device Driver->Graphics Support 和 Device Driver->Graphics Support->Console Display Driver Support. 编入kernel也可以,编成module也可以(如果是module最好有initrd,不然开机会有很长一段时间的黑屏)
o 如果是编译成为modules, 需要在/etc/modules加入fbcon。
o 如果使用了initrd,需要在/etc/initramfs-tools/modules加入fbcon,然后再执行update-initramfs -k `uname-r` -u 更新initrd
* 编辑/boot/grub/menu.lst 在kernel后加入video=vesafb:1024×768-16@50 vga=0×317. 这个1024×768貌似没用,但是听说不加会失败. vga后的数值,听说必须是16进制的。关于vesafb的使用可以参考kernel source里的Documentation/fb/vesafb.txt
* reboot your system & enjoy

有了framebuffer之后,就可以在console下运行mplayer -vo fbdev了。在console下看电影真的是very cool阿~~。

来源:http://blog.jianingy.com/index.php?/archives/49-UbuntuFramebuffer.html

PS:默认zhcon不识别utf8.
需要稍微处理一下:
在 /etc/bash.bashrc 里作了个 alias
代码:
alias zhcon=’zhcon –utf8 –drv=vga’


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter