在运行dfb程序的时候,出现如下的提示错误:
(!) DirectFB/FBDev: No supported modes found in /etc/fb.modes and current mode not supported!
(!) DirectFB/FBDev: Current mode's pixelformat: rgba 6/0, 6/0, 6/0, 0/0 (4bit)
(!) DirectFB/Core/layers: Failed to initialize layer 0!
--> A general initialization error occured
(!) DirectFB/Core: Could not initialize 'layer_core' core!
--> A general initialization error occured
(#) DirectFBError [DirectFBCreate() failed]: A general initialization error occured
原因是framebuffer没有开启导致的。
在Ubuntu 10.04当中开启framebuffer的方法如下:
1.获取硬件支持的framebuffer模式,同时设置引导参数
$ sudo hwinfo --framebuffer
Mode 0x0317: 1024x768 (+2048), 16 bits
我这里挑选了一个比较常见的mode,然后追加到kernel的引导参数当中去。
$ vim /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vga=0x0317"
2.