Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to make a PCMCIA tuner card work in my headless home server, running Debian Squeeze. Now, as I have very big troubles finding the correct command line to capture, transcode end stream the video to the network using VLC, I decided to go step by step, and work first on local output.

That's where the problem comes in: there seems to be no framebuffer device (/dev/fb0) to access for displaying graphics on the attached screen! And indeed I noticed I don't have the Linux penguin image at boot (didn't pay attention before as screen is attached, but always off, and anyway computer is always on).

As I'm not very familiar with Linux graphics, I would like to understand:

  • Is this related to my particular hardware (see below)? Or is it specific to Debian Squeeze/ a kernel version/... ?
  • Is there some driver I need to manually install/load?

Now some general information:

  • The computer has no dedicated graphic card, but an embedded graphic chipset (Intel G31 Express), embedded on the motherboard (Gigabyte G31M-ES2L)
  • I don't want to install a full featured X server, just have a framebuffer device for this particular test

Any ideas/comments on the issue?

share|improve this question

migrated from serverfault.com Mar 6 '12 at 18:51

This question came from our site for professional system and network administrators.

    
Once you get your /dev/fb0 up and running, please be sure to accept my answer. Rarely do people with actual experience on a less common topic, get around to give a HQ answer. They do exist on UNIX-SE, its a relatively uncommon subject so less experts exist. –  TechZilla Mar 6 '12 at 20:36
add comment

4 Answers 4

up vote 16 down vote accepted

I can address your question, having previously worked with the Linux FB.

How Linux Does Its FB.

  1. First you need to have FrameBuffer support in your kernel, corresponding to your hardware. Most modern distributions have support via kernel modules. It does not matter if your distro comes preconfigured with a boot logo, I don't use one and have FB support.

  2. It does not matter if you have a dedicated graphics card, integrated will work as long as the Hardware Framebuffer is supported.

  3. You don't need X, which is the the most enticing aspect of having the FrameBuffer. Some people don't know better, so they advocated some form of X to workaround their misunderstandings.

  4. You don't need to work with the FB directly, which many people incorrectly assume. A very awesome library for developing with FrameBuffer is DirectFB it even has some basic acceleration support. I always suggest at least checking it out, if you are starting a full-featured FB based project (Web Browser, Game, GUI ...)

Specific To Your Hardware

  1. Use the Vesa Generic FrameBuffer, its modules is called vesafb. You can load it, if you have it available, with the commands modprobe vesafb. many distributions preconfigure it disabled, you can check in /etc/modprobe.d/. blacklist vesafb might need to be commented out with a #, in a blacklist-framebuffer.conf or other blacklist file.

  2. The Best option, is a Hardware specific KMS driver. The main one for Intel is Intel GMA, not sure what its modules are named. You will need to read up about it from your distro documents. This is the best performing FB option, I personally would always go KMS first if possible.

  3. Use the Legacy Hardware specific FB Drivers, Not recommended as they are sometimes buggy. I would avoid this option, unless last-resort necessary.

I believe this covers all your questions, and should provide the information to get that /dev/fb0 device available. Anything more specific would need distribution details, and if you are somewhat experienced, RTFM should be all you need. (after reading this).

I hope I have helped, Your lucky your asking about one of my topics! This is a neglected subject on UNIX-SE, as not everybody (knowingly) uses the Linux FrameBuffer.

NOTE: UvesaFB Or VesaFB?

You may have read people use uvesafb over vesafb, as it had better performance. This WAS generally true, but not in a modern distro with modern Hardware. If your Graphics Hardware supports protected mode VESA (VESA >= 2.0 ), and you have a somewhat recent kernel vesafb is now a better choice.

share|improve this answer
1  
Many many thanks for your answer!!! It's way beyond what I was expecting in terms of depth and quality!! I really appreciate when I can find post/answers like yours because not only do they give solutions on the specific issue, but more importantly they give general information on the inner working which can be helpful to others for the same or related situations!! –  Federico Mar 6 '12 at 23:03
1  
Regarding my issue, I will look into it based on your input and report back here as soon as I obtain satisfying results... –  Federico Mar 6 '12 at 23:05
1  
So I tried modprobe vesa (which I remember having tried before asking the question here) which fails because the module doesn't exist on my system (FATAL: Module vesafb not found.) --> will have to understand if this is related to my hardware or my Linux distribution (Debian Squeeze). Good news is that modprobe uvesafb works and creates the /dev/fb0 device. However, now that I have read your answer, I will try to setup things the proper way and find the KMS driver... –  Federico Mar 6 '12 at 23:42
    
So, after some more googling and testing, and if my understanding is right: the integrated chipset Intel G31 Express (PCI ID: 8086:29c2) makes the kernel load module i915 which does not create the fb device (I wonder what it does exactly). According to Debian wiki, this PCI device is not supported by a Debian Kernel module, but via Xorg driver intel, which would be nice to know if I wanted to install X, but which is unhelpful in this case. So I guess solution 2 is ruled out and I'll stick with uvesafb ... –  Federico Mar 7 '12 at 0:45
    
I up voted your comments, I'm excited I could be of help!. To address your last comment, you are incorrect about solution 2. You can ABSOLUTELY get a KMS without X, but like I said real answers are literally drowning in garbage. The name of the correct hardware module, is called inteldrmfb, I found it out doing some quick research. I always have ATI, so Intel GPU related support is not my strongest point. You may need to install a package for it, but I'll see if I can find out. –  TechZilla Mar 8 '12 at 3:08
show 2 more comments

I've finally found the solution to my problem!!

First of all, many many thanks to all who contributed and in particular TechZilla and the detailed explanation he provided without which I think I would have given up long ago!

So basically all that needs to be done is enable modesetting (modeset=1) when the i915 kernel module loads. This can be done the usual ways:

  • through GRUB's kernel parameter,
  • via a config file in /etc/modprobe.d
  • or at the command line:

    # rmmod i915
    # modprobe i915 modeset=1
    

In fact, you don't need to do anything if you install package xserver-xorg-video-intel, which creates /etc/modprobe.d/i915-kms.conf containing options i915 modeset=1. However, if someone doesn't want to install X (like in my case), then KMS is not automatically enabled, which explains why the FrameBuffer device wasn't created ...

share|improve this answer
    
You should still accept my answer, because "how do I turn on KMS with squeeze" was not your initial question. I believe I did answer your initial one, and point you on your intended path. The other reason, you only get points for awarding answers 'other' people. Even though its good to self-award if nobody comes close, in this case it doesn't make sense. Your fine keeping your answer posted though, or integrate info in question. Either way would be fine. really glad I helped though! I'm really happy you got the KMS solution working, as it should be faster than plain VESA. –  TechZilla Mar 9 '12 at 4:09
    
I just changed back the accepted answer to yours! Being kind of new here, I didn't know precisely what to do: put the solution in the question itself, in a comment to your accepted answer, or post as a new answer. I figured that by creating a new accepted answer, people would read first the question, then your answer which comes at the top since it has more upvotes and then my answer... –  Federico Mar 9 '12 at 10:47
add comment

You may try a virtual framebuffer like Xvfb (X virtual framebuffer).

Description of the xvfb package in squeeze

share|improve this answer
    
1. this is a 'virtual' FrameBuffer, not an actual direct Hardware FrameBuffer. 2. Its an X server, and specifically the question requested no X. –  TechZilla Mar 6 '12 at 20:18
add comment

As long as this is a standard debian install with nothing fancy and a standard kernel you should be able to get a hires VGA console that uses the framebuffer device with a kernel parameter such as "vga=792" (which is 24 bits 1024×768). Sure the kernel reports it as deprecated, but it works.

See http://www.kernel.org/doc/Documentation/kernel-parameters.txt for kernel parameters. Interestingly there the "vga=" paremeter does not show as deprecated.

Make sure to re-run update-grub(2) and the likes after the change.

Also take a look at http://packages.debian.org/squeeze/svgalib-bin it's not perfect but it allows you to do some fancy graphics stuff on a console.

share|improve this answer
2  
No it does not work anymore, in MANY circumstances. This is the answer aping i'm always talking about. If you use GRUB2 this only works when booting with the legacy 16 decelerations. It's also deprecated, which at least you acknowledge, pragmatically that means DON'T DO NEW SETUPS WITH IT. The old vga= garbage will fail to boot, if you have your hardware modules disabled in /etc/modprobe.d/ and many distro's come preconfigured as such. –  TechZilla Mar 6 '12 at 20:12
    
So next problem, svgalib-bin is a library not a '/dev/fb0' device. Anything that wants svgalib, needs to be developed with svgalib. It can be used to replace a FB, but it does not 'literally' replace the FB. I actually made a error last comment, when I said "fail to boot', I meant "fail to load FB, likely will fallback to standard vga" –  TechZilla Mar 6 '12 at 20:20
    
This really is not even your fault, our community leaves up horribly outdated documentation. Everyone apes old answers all over the internet, making a modern understanding difficult at beast. A lot of people even simply give up, because the real answer is new and buried under years of aping deprecated solutions. –  TechZilla Mar 6 '12 at 20:25
    
The "vga=" parameter works when using squeeze. I merely suggested it since it's an easy quick fix, instead of researching what it's replaced with. kernel.org/doc/Documentation/kernel-parameters.txt does not show "vga=" as deprecated. The only reason I know is due to a quick barely readable boot message by the kernel... confusion ensues... so according to the text at kernel.org "vga=" is NOT deprecated. What are we to believe? –  aseq Mar 6 '12 at 20:41
1  
By the way my suggestion to use svgalib is becsause the user doesn't want to use X. I understand the culprits of svgalib, but there are few other options. –  aseq Mar 6 '12 at 20:45
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.