This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Feature: Graphics & Multimedia

Nouveau project hacks away at free Nvidia drivers

By Bruce Byfield on September 04, 2007 (9:00:00 AM)

Share    Print    Comments   

Currently, GNU/Linux users with Nvidia graphics cards have two choices: Either use the proprietary drivers and violate their free software principles, or use the free nv driver and do without 3-D acceleration. The Nouveau project is working to overcome this dilemma by producing its own set of fully functional free Nvidia drivers. We talked to Stephane Marchesin and Ben Skeggs, two of the active developers in Nouveau, about the history of the project and the current status of its work.

Like several others working on video drivers, both Marchesin and Skeggs got their start in the field in the R300 project, a discontinued project whose members attempted to understand 3-D acceleration on a family of ATI Radeon cards. Skeggs worked largely on fragment shaders, a graphics function that calculates and renders effects pixel by pixel, but says that, at the time, "I really had no idea how all the various bits of a full graphics driver fit together." By contrast, Marchesin was more deeply involved, reverse-engineering Hyperz, a processing technique that improved rendering speed, and tiling, a standard rendering technique, as well as porting 3-D functionality to the Itanium platform. "It was surely fun to see the Quake 3 frame rate go up as changes were made," Marchesin recalls.

Marchesin started working on Nouveau as a private project in June 2005. For nearly eight months, Marchesin worked on cleaning up the nv driver, and writing REnouveau, a reverse engineering tool for collecting information while the proprietary Nvidia drivers are running on a machine. "A lot of time was also spent understanding the inner workings of Nvidia cards, which are quite different from anything else in the graphics hardware field," he says. "The project was mainly motivated by my interest in low-level programming. That, and not being able to fix the binary Nvidia driver on my at-the-time work machine (either the drivers didn't like my chipset, or it was buggy. In any case a workaround was not possible due to the binary nature of the Nvidia drivers)."

In February 2006, Marchesin announced the project at the Free and Open Source Software Developer's European Meeting (FOSDEM). Skeggs' interest was sparked after he spent a couple of hours using REnouveau to learn about rendering on one line of Nvidia chips. He joined the #nouveau IC channel, he says, "with the intention of handing over what I'd learned and leaving it at that. Somehow, I ended up sticking around."

Nouveau's 2-D functions are a fork of the nv driver. However, according to Skeggs, "the code has changed quite a bit. We've had to move a sizeable amount of code into the kernel module, and rewrite significant portions of the engine setup in order to support multiple clients accessing the card at the same time."

At this point, much of the 2-D work is finished, and, according to Marchesin, "For day to day use, nouveau could pretty much replace nv now, both feature-wise and performance-wise." And, in fact, the nouveau driver has been included in several distributions, including Fedora 7 -- although, due to some limits in functionality, Fedora chose not to use it by default.

Currently, 3-D features are less advanced. "We only have basic working 3-D on a number of NV4x chips. Aside from getting the other chipsets up to speed, we need to implement texturing in the 3-D driver. As you can imagine, a 3-D driver lacking texturing isn't terribly useful!" However, he adds that the project has the basic knowledge to implement 3-D features -- it simply needs to write and test the code.

Work methods

For the rest of the intended features, work continues. Most of the work involves reverse engineering, often using such tools as REnouveau, and a Valgrind plugin for 2-D work.

The project also uses MmioTrace, a tool specifically designed for reverse-engineering video cards, which traces memory-mapped I/O access within the kernel. "Nvidia actually does most of the hard work in its kernel module," Skeggs explains, "and, at the beginning of Nouveau, there wasn't any tools available that'd allow us to see what happened inside Nvidia.ko. Without a tool like MmioTrace, we'd likely not be as far as we are currently."

In addition, Nouveau also pools information with other projects working with Nvidia cards, such as Utah-GLX and NVClock. The project is also sharing information with programmers working to develop drivers for Nvidia cards for Haiku, the BeOS-descended operating system. However, Marchesin says, "The existing 3-D-enabled drivers only work on older cards; for new cards, no information is available."

For other parts of the project, the teams' previous experience with free graphics drivers has been invaluable. "We've been making a number of global design choices motivated by both the Nvidia hardware design and our previous experience in the free software graphics diver field," Marchesin says. "As far as I know, we were the first free software driver to require the use of a kernel module even for basic 2-D. This helps us moving more parts of the code to the kernel, which in turn makes sharing the card between multiple applications more efficient."

Nouveau was approached by the Free Software Foundation, which asked whether its members wanted to be listed as a high-priority project, a move that helped to raise the profile of such projects as Gnash, the free Flash replacement, and LinuxBIOS. However, according to Skeggs, "We turned down the offer mainly to avoid too much attention, as Nouveau's still very much a developer's project, and not something that users would find too useful." Of course, Marchesin adds, "We got Slashdotted shortly after ..."

One source that Nouveau has not received any information from is Nvidia itself. Early in the project, Skeggs did ask Nvidia for documentation to enable multiple display support, "but was met with a reply that no documentation is currently available -- which is better than completely ignoring the request, I guess."

Nor is any future help from Nvidia likely. In an interview with ABCLinuxU, a Czech Web site, Andy Ritger, Nvidia's director of Unix software, is quoted as saying, "Nvidia's stance is to neither help nor hinder Nouveau." Ritger adds that Nvidia's GNU/Linux support will continue to be limited to the nv driver and the existing proprietary drivers.

However, this lack of support from Nvidia doesn't disturb Marchesin. "We have to show that it is possible to write a driver without vendor help," he says. "Through this project I'm trying to make that point."

Helping out and looking ahead

Nouveau remains a developer's project, but Skeggs says that average users can help the project by running REnouveau and MmioTrace on their own machines and submitting the output. Although Nouveau already has considerable information from a variety of cards, Skeggs says that "even between chipsets of the same card family, things can differ slightly."

Marchesin adds, "We're always looking for new developers. If you have some fair programming skills and are interested in learning graphics driver programming, our IRC channel is a friendly place, and just sitting there idling could bring most of the needed information [to you]."

Ultimately, Nouveau's goal, Skeggs says, "is to provide functional open source 2-D/3-D drivers for Nvidia chips from NV04 onwards."

And once that goal is reached? "Well, there's always things to improve [and] bugs to fix," Skeggs says. "Aside from that, I'm sure Nvidia will keep pumping out new chips for us to play with."

"I also expect people will benchmark our driver against the binary one," Marchesin says. "Which means we'll have to focus more on the performance aspects of the driver." Meanwhile, an army of potential users is waiting.

Bruce Byfield is a computer journalist who writes regularly for Linux.com.

Share    Print    Comments   

Comments

on Nouveau project hacks away at free Nvidia drivers

Note: Comments are owned by the poster. We are not responsible for their content.

Sad waste of talent and time

Posted by: Anonymous [ip: 198.240.213.26] on September 04, 2007 12:20 PM
Of course these programmers are doing a good job. But what a pity that they have to. Nvidia could save them a huge amount of time - which they could spend writing more great software for us - simply by publishing the specification for the programming interface of their chips. Just like all graphics-chip companies used to do, in the days before Microsoft started to twist their arms.

#

Re: Sad waste of talent and time

Posted by: Anonymous [ip: 85.140.109.29] on September 09, 2007 04:21 PM
AMD did announced project to release specs and to create open Linux drivers... so, I guess it is now just matter of time for NVidia as well.Or else growing Linux market will choose ATI ;)

#

r300 is not discontinued, it just moved

Posted by: Anonymous [ip: 217.228.141.46] on September 04, 2007 10:27 PM

Nouveau project hacks away at free Nvidia drivers

Posted by: Anonymous [ip: 81.159.9.21] on September 05, 2007 09:59 AM
Marchesin says. "As far as I know, we were the first free software driver to require the use of a kernel module even for basic 2-D. This helps us moving more parts of the code to the kernel, which in turn makes sharing the card between multiple applications more efficient."

- there goes kernel' stability. Don't expect many ppl to use these... even kernel maintainers were against that - it's the Windows way, remember ?

#

Re: Nouveau project hacks away at free Nvidia drivers

Posted by: Anonymous [ip: 98.203.150.239] on September 10, 2007 03:56 AM
well they dont care..remember its about 'them' not 'us'. I will CONTINUE to use nvidia and be GLAD we have what we have..your idiocy might endanger that someday.

#

Nouveau project hacks away at free Nvidia drivers

Posted by: Anonymous [ip: 195.70.93.15] on September 06, 2007 05:09 PM
we all should just ignore nvidia and use other linux friendly graphics controllers...

#

Re: Nouveau project hacks away at free Nvidia drivers

Posted by: Anonymous [ip: 98.203.150.239] on September 10, 2007 03:54 AM
that would be too easy...this way these pompous babies get to say look daddy and mommy what we did..we're kewl man.

yeah right.

#

Nouveau project hacks away at free Nvidia drivers

Posted by: Anonymous [ip: 81.105.50.7] on September 07, 2007 08:48 PM
i have never heard anything more pathetic in my entire life. I'm sure you could cope with nvidias drivers for linux for crying out loud, its a driver!! ur still using linux. I am using Ubuntu with a nvidia driver and it works great so dont bother with this rubbish. Also i could'nt live without Windows XP Linux is too new to me (installed it today using Wubi) and i need to use iTunes and Windows Live Messenger etc. Ubuntu is nice for web browsing and to play around with for a change! I can't wait to get my macbook however. Mac OS X just blows away Ubuntu, XP and Vista!

Guys.. come on though.... its a graphics driver and im sure its better to have the official driver then a bodged 3rd party one just because its bleedin open source.

#

Re: Nouveau project hacks away at free Nvidia drivers

Posted by: Anonymous [ip: 98.203.150.239] on September 10, 2007 03:55 AM
I agree 100%..they are doing it for the notariety, but in the end they will only look foolish because t he drivers will be second class and no one will use them; myself included.

#

Nouveau project hacks away at free Nvidia drivers

Posted by: Anonymous [ip: 98.203.150.239] on September 10, 2007 03:43 AM
I for one will not trust this 'open source 3d driver for nvidia' . I know there are some wonderful open source apps, but I will not trust some RE'd driver compared to the offiical one done by 'paid' developers who have the hardware specs..you guys are pathetic indeed when much more important things could be worked on, and just trying to force/scare nvidia to open source its drivers will of course fail as they are bound by contract not to; and well they are in competition with Ati atm no one should blame them for that right ?. Ati may open source some of its drivers but its also going to be under a NDA .

#

Nouveau project hacks away at free Nvidia drivers

Posted by: Anonymous [ip: 98.203.150.239] on September 10, 2007 03:52 AM
oh also btw: here ye all ye arrogant linux ego maniacs... so im violating MY OS using proprietary software huh...even 'linus' himself says NV proprietary is in NO VIOLATION, so get your collective heads out of your collective butts and grow up. Your all giving linux a bad name and for that you should hang your heads low in shame.

#

Nouveau project hacks away at free Nvidia drivers

Posted by: Anonymous [ip: 161.12.7.4] on September 10, 2007 05:49 PM
The replies to this feature is just sick.
We have windows users saying how much they suck at linux, we have others trying to put down intelligence, and we've got even more blaming the developers because they choose to develop for hardware without documentation.
Now I don't have too much of a problem with the proprietary drivers - but if there were comparable performance open-source drivers, you'd better be sure I'd choose the open source. I'd contribute bug reports to get problems solved quickly. I'd be on the 'leading edge' as they /WOULD/ have features developed with the X.org/OpenGL/beryl-compiz/etc crew.
Instead of having to wait many months for the proprietary driver release to come around, I'd have my drivers making many small incremental developments, with the eyes of ALOT of developers developing it because they want the driver to be BETTER ...
.. simply having a developer working on the code over time does not neccessarily mean, a) they are the best developer, or b) they will work to make the code better instead of simply working to get paid. (I wish I knew how to introduce new lines correctly..) == Paul_one ==

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya