4

I am trying to run an application that uses framebuffer on 2.6.31-14-generic #48-Ubuntu.

All I need to do is to install a framebuffer device to get rid of the following error:

/dev/fb/0: No such file or directory
framebuffer not available.
FATAL: no framebuffer available

I searched Google and found some resources indicating to do that on Grub2 - I got nothing though I followed them seamlessly.

Any ideas?

Gareth
  • 19,080
Aleyna
  • 141
  • 1
  • 2
  • 3

2 Answers2

5

You need to activate the framebuffer drivers, which are always deactivated by default.

I configured these:

echo "fbcon" | sudo tee -a /etc/initramfs-tools/modules
echo "vesafb" | sudo tee -a /etc/initramfs-tools/modules

And then I commented out vesafb (this works for all cards I heard) in

/etc/modprobe.d/blacklist-framebuffer.conf

Then we update the config:

sudo update-initramfs -u -k all

We are almost there. Now we need to look for supported resolutions for our card in framebuffer. You probably will have to install hwinfo

sudo hwinfo --framebuffer

You can see the resolutions and its hexadecimal code.

Now you can either press the e key at boot time and add vga=[hexadecimalcode] (e.f. vga=0x346) or make the change permanent in /boot/grub/menu.lst after the defoptions word.

I found it more secure to try the e key before touching the grub configuration to be sure that it works.

Later, when you switch to tty with Alt+F1-6 it will be in the resolution you specified. You can use fbi and other utilities.

jefflunt
  • 277
0

I thought Ubuntu had /dev/fbX and not /dev/fb/X devices?

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"
$ ls -l /dev/fb/*
ls: cannot access 'fb/*': No such file or directory
$ ls -l /dev/fb*
crw-rw---- 1 root video 29, 0 авг 29 11:41 fb0

Try running the program with that other name, or, failing that, make a link to that file:

# mkdir /dev/fb
# ln /dev/fb0 /dev/fb/0

Running the tests:

# sudo dd if=/dev/urandom of=/dev/fb/0
dd: writing to '/dev/fb/0': No space left on device
15001+0 records in
15000+0 records out
7680000 bytes (7,7 MB, 7,3 MiB) copied, 0,501639 s, 15,3 MB/s
# sudo dd if=/dev/urandom of=/dev/fb0
dd: writing to '/dev/fb0': No space left on device
15001+0 records in
15000+0 records out
7680000 bytes (7,7 MB, 7,3 MiB) copied, 0,523867 s, 14,7 MB/s

It works on my box, but YMMV.

Danya02
  • 163