0

Loose TL;DR: is the framebuffer device still used in Linux today? If so, does (for example) the X window system first write to, say, /dev/fb0, and then to GPU, or does it write to GPU directly, avoiding fb0 completely? What about ttys that I access with Ctrl-Alt-F* - are they text-mode and if so, can I write a single character to their cell without "painting" individual pixels?


I'm researching Linux graphics and it feels like good sources are quite hard to come across. I want to learn (for the sake of knowing) how to get a pixel to appear on a monitor on different "layers" of the graphics stack - be it with libraries, toolkits or something low-level. I'm going from the bottom up and I'd like to know how graphics work on the low-level.

I know that today frame buffers are inside of the graphics card's VRAM. Since the monitor is hooked to the GPU, all output data must pass through the GPU one way or another. However, on my Linux Mint system, /dev/fb* exists, and through some tricks, I can run the command sudo cat /dev/random >/dev/fb0. If I'm on my graphical interface that runs X, nothing happens. But if I switch to tty2, it works as expected. I'm guessing X prevents other programs from accessing the framebuffer. But then: doesn't X use the DRI to talk to the GPU directly and as such doesn't even need the fb0?

Furthermore: why does that work at all? I thought that TTYs are text-mode, meaning they consist of character cells, which would make such writing to the framebuffer pointless.

If someone can provide any citable sources It'd be greatly appreciated, since I don't think I have the time to dwell into the Linux kernel and analyze the source code...

PS. here are some questions / links from where I got my info up until now...

0

You must log in to answer this question.

Browse other questions tagged .