1. DirectFB for Linux
- Posted by jmduro Apr 01, 2019
- 1444 views
My DirectFB library to draw graphics on Linux is available at http://jean-marc.duro.pagesperso-orange.fr/eufb_v0.2.1_2019-04-01.tar.gz.
An example is provided: pixel_color_32bpp.ex. Tested on x86_64 and ARM. On a Linux PC, you have to select a non-graphical terminal (as with CTRL-ALT-F2). Package fbset is mandatory:
sudo apt install fbsetYou need first to set the framebuffer a shell script is provided. Here is an example of usage 1920x1080, 32bpp:
sudo ./set_fb.sh 1920 1080 32
Jean-Marc
2. Re: DirectFB for Linux
- Posted by irv Apr 01, 2019
- 1374 views
I get:
open /dev/fb0: No such file or directory
This is with Linux Mint 18
Same message if I just type sudo fbset
3. Re: DirectFB for Linux
- Posted by jmduro Apr 02, 2019
- 1414 views
I get:
open /dev/fb0: No such file or directory
This is with Linux Mint 18
Same message if I just type sudo fbset
fbset is not installed by default. You have to install the package.
sudo apt install fbset
On Ubuntu, framebuffers seem to be deactivated by default: https://unix.stackexchange.com/questions/33596/no-framebuffer-device-how-to-enable-it
Look at available framebuffers
sudo ls /dev/fb*
Your framebuffer might be "/dev/fb1" instead of the default "/dev/fb0". If there is no framebuffer then your Linux misses an optional package or a driver. Try to install the following:
sudo apt install libdirectfb-devI hope it installs also the specific driver for your graphics card. Check for framebuffers after installing the package. If there is still none, than it might be a little more complicated as it will be hardware specific. In this case, install hwinfo.
sudo apt install hwinfoThen run it and provide specific hardware information. Here is what hwinfo reports for my PC (extract):
31: PCI 02.0: 0300 VGA compatible controller (VGA) ... Hardware Class: graphics card Device Name: "Intel(R) HD Graphics Device" Model: "Intel 2nd Generation Core Processor Family Integrated Graphics Controller" ... Driver: "i915" Driver Modules: "i915" ... Driver Info #0: Driver Status: i915 is active Driver Activation Cmd: "modprobe i915" Config Status: cfg=new, avail=yes, need=no, active=unknown
Jean-Marc
4. Re: DirectFB for Linux
- Posted by irv Apr 02, 2019
- 1359 views
Thanks, I had already installed libdirectfb-dev and fbset
Ubuntu won't install hwinfo for some reason, but that's not important, since there are no /dev/fb* at all.
I tried a couple of things from the stackexchange, with no luck. Considering the difficulty, I think I'll have to pass on trying this. Perhaps later I might try a different distro. What are you using?
5. Re: DirectFB for Linux
- Posted by jmduro Apr 02, 2019
- 1393 views
I'm using Debian 9 on either PC or RaspBerry Pi.
Jean-Marc
6. Re: DirectFB for Linux
- Posted by irv Apr 02, 2019
- 1340 views
Thanks, that makes it easier, I've got a couple of Pi's (Pies?) sitting around.