Sepehr
Sepehr

Reputation: 2111

Writing a driver to fool Linux systems about having a GPU

I'm into something about writing a "Mock GPU driver" for Linux based systems. What I mean is that, simply I want to write a driver (Behind X-server obviously) to answer X's API calls with some debugging messages.

In other words I want to fool Linux about having an actual GPU. So I can make a test-bed for GUI-accelerated packages in console based systems.

Right now, if I execute a GUI-accelerated package in Linux console based systems; it'll simply dies due to lack of a real GPU (or a GPU driver better I'd say).

So I want to know:

PS: I'm an experienced ANSI-C programmer but I don't have any clue in real Kernel/Driver development under *nix (read some tutorials about USB driver development though), so any resources about these areas will be really appreciated as well. Thanks in advance.

Upvotes: 2

Views: 864

Answers (2)

Michał Górny
Michał Górny

Reputation: 19233

What you are looking for is actually part of Xorg server suite, and it is called Xvfb (virtual framebuffer).

If you're not afraid of a bit complex bash, you can take a look at Gentoo's virtualx.eclass for an use example (we use it to run tests which require X11).

Upvotes: 4

DreemKiller
DreemKiller

Reputation: 114

A good place to start is the Mesa project - it implements OpenGL in software. It has a way to trick the OS into thinking that it is the OpenGL driver.

Upvotes: 2

Related Questions