Open-Source NVIDIA Driver Goes Stable On Linux
An anonymous reader writes "The open source Nouveau driver, a reverse-engineered incarnation of NVIDIA's official proprietary driver for Linux, has reached its biggest milestone. The Nouveau driver is now being considered stable within the Linux kernel and leaving the staging area, with the pledge of a stable ABI. Phoronix has summarized the state of the Nouveau driver, which works fine if you don't care about performance or are fine with running hardware that's a few generations old."
http://nouveau.freedesktop.org/wiki/Development
I'm no engineer, not even a reverse engineer, but I'd probably start with a bus analyzer, gdb, and follow some kernel/driver debugging lists.
Dear reader, feel free to tell me how wrong this approach is.
Umm, IDA is available on Linux.
Way to go guys.. you've now given Nvidia massive disincentive to continue to do more work with their MODERN drivers.
Competition is usually a motivation to improve rather than stagnate.
Wouldn't be at all surprised to see things like VDPAU and CUDA recieve even more attention from Nvidia. Maybe even features like KMS might happen now...
We don't reverse engineer the code, we reverse engineer what is sent to the card. Linux can dump everything going through the PCIE bus, that's the so-called mmiotrace.
We only reverse engineer by taking the binary driver as a blackbox, sending commands and seeing what comes out.
Martin Peres - Nouveau developper
It's amazing to me that there is so much flame out there for this. None of you could do this, Not a single one of you have tried, and yet, this small group of dedicated people have actually figured out a piece of proprietary hardware to the point of having their code included in the Linux kernel? Way to go guys.
"On the Internet, nobody can hear you being subtle." -Linus Torvalds
Software freedom is important for its own sake. You're better off with a less functional free implementation than a more powerful and reliable proprietary implementation in numerous practical ways programmers and users have known for decades.
If the proprietor stops supporting something and they're all you've got to depend on, you're out of luck left with an ugly choice to run increasingly obsolete code or (apparently needlessly) do without that functionality at all. Proprietors control your computer and tell you what you can do with it. Free software gives you the freedom to control your own computer. One can learn to program and understand the Nouveau source code: maintain the code to work on more OSes and work with more hardware, free from the fear of DRM (digital restrictions management). If you're not a programmer, like most computer users aren't, you can still help the effort by giving programmers what they need to help you in return. Often that's money, equipment, good bug reports, documentation translations, and writing documentation for the software.
We're better off relying on each other in freedom than we are depending on a proprietor. Socially, we can't build a better future for ourselves by relying on secret software. We should be allowed to fully own and control our computers and we'll get there with software freedom.
Nvidia should have told their customers how to fully use the equipment they sold. Nouveau hackers are remedying that deficiency. I'm grateful for the valuable work Nouveau hackers are doing for all of us.
Digital Citizen
2) buy someone elses (likely)
And this is what NVIDIA has done. NVIDIA bought a license for ARM's CPU and built the Tegra SoC around it.
The last time someone came up with a replacement for an Nvidia driver was for the ethernet drivers and Nvdia ended up discontinuing their own and contributing to the open source driver instead. If this happens again we are all better off.
Seriously guys why all the hate? Sure it doesn't work for everyone, it works on old hardware. But here's the deal, it works and is sufficient for day to day use. Here's the amazing and nerdy part of it too, they REVERSE ENGINEERED IT. Something as complicated as a video card. That's no small feat and they should be congratulated for their efforts to make linux just that much better. Start hating when you contribute something with any significance at all. BTW I'm not a kernel developer, just a nerd that appreciates a feat such as this.
They realize their top notch drivers are a big selling point of their hardware. You'll find more than a couple people who have the opinion that AMD has good graphics hardware, crippled by poor drivers.
nVidia will only discontinue Linux drivers if the market shrinks to such a size that it is no longer worth it. If Linux becomes an "embedded only" OS or something they'll stop. However so long as it is being used a reasonable amount, they'll keep making drivers for it (they also have FreeBSD and Solaris drivers to give you an idea).
Particularly since it is a big market for their GPGPU stuff. When people get a big multi-card Tesla system, they sometimes want to run Linux on it. That is only doable with first flight drivers that have all the features supported, work with the latest hardware, and give up nothing in terms of speed.
Besides spotty hardware supprt, AFAIK it is also missing VDPAU (HD video decoding) support, which is the main reason a lot of HTPC types use Nvidia cards in their linux machines. It is also fairly hard to remove. I think it took me 1/2 hour of re-booting before I finally purged nouveau from my system to clear the way so that the Nvidia driver could attach.
As a Linux (and other *nix) driver guy, I have tons of respect for how Nvidia deals with the constant, gratuitous changes in the Linux kernel APIs.
I'm using this driver (well, probably a slightly older version of it) with my desktop now, and so far I've been pleasently surprised. I don't need blazing fast performance on 3D for most things. FlightGear/OpenArena level games are about as far as I'm likely to push, since I'm not into the latest and greatest FPS anymore. Given that, the prospect of an integrated driver that "just works" without having to do anything extra is awesome.
My last Gentoo re-install I ended up trying the Nouveau driver after my attempt at enabling the binary NVIDIA driver didn't go well - had to flip on a couple kernel options to get acceleration, but after doing so and for my uses the results are "fast enough." I'll be sticking with Nouveau from now on unless I hit a major show-stopper. Well done, Nouveau team!
"I object to doing things that computers can do." -- Olin Shivers, lispers.org
One thing which you cannot do with the official NVIDIA driver for GNU/Linux is have mixed rotation monitors. (I would like to be proven wrong - have even tried to prove myself wrong, but given up).
I currently have one monitor in portrait and one monitor in landscape and one monitor in landscape, with the ability to drag windows from one to the other. I have some acceleration, which allows me to see through terminal windows.
Nouveau works, official one does not work. Simple choice.
kers at the wrong moment What happens when you catch stock tic
The comments on this story really do illustrate how the readership of Slashdot really has changed over the past few years.
This is a real "News for Nerds" story, a story about open source development and how we're still not really past the bad old days of winmodems when it comes to (real, not binary blob) hardware support by manufacturers.
A full half of the comments I can see above seem to be troll posts along the lines of "LOL M8 DOESNT RUN UNREAL TOURNAMENT 27".
Oh dear.
Point being: this shit is hard, and the current milestone represents a huge achievement. If everybody had the attitude that "well it sucks compared to [something else] right now, why bother", nothing hard would ever be attempted.
Uhhh...If you are Mr Peres, why don't you have an account instead of posting AC? After all both Eric Raymond and even Linus Torvalds has accounts, even if Linus naturally hasn't got the time to use his much.
Now for my other question, since you are basically snatching the data from a binary blob which i'm sure is full of proprietary code, after all if it wasn't they could just FOSS the thing, do you worry about DMCA? i know that AMD can't release full specs on their GPUs because protected path isn't theirs and would break DMCA and since Nvidia cards i'm sure have protected path as well do you have to worry about legal ramifications? or have you set up the project in some place that doesn't recognize software patents?
If you ARE Mr Peres I would like to say I admire your guts, frankly I wouldn't want to go within 100 yards of anything to do with video as long as all these crazy patents and lawsuits are going on. And how about hardware acceleration of video? How can you do that without ending up in the whole H.26x patent minefield?
Frankly I think its a shame that such questions even have to be asked as while i have no problems with proprietary software and use both FOSS and proprietary software every day i do NOT support software patents but as long as that minefield exists I am curious how you intend to approach feature parity with the blob driver without stepping into the whole patent mess since one of the big uses of GPUs is video processing and that's patented up the wazoo.
ACs don't waste your time replying, your posts are never seen by me.
For one thing, DMCA only fits if they actually implemented some type of protection scheme which may or may not be the case. In either case, this does not apply at all as the DRM isn't being broken. The blackbox driver is working as intended and not taken apart in any way, it's like trying to see how a car works without actually taking it apart by systematically doing what you normally would do anyways and recording it's response.
Instead of running a program that sends a large set of commands to the driver and having it returns random responses, you send 1 specific command at a time and recording each response so you are able to reproduce it in their own driver.
What they are doing, is basically mapping the interface (doorway as you will) to the blackbox driver. An interface can not be copyrighted (this has some precedence in court rulings and is done often like emulators). It's only illegal once you start copying either parts of the source code or machine code. If you copy the outside, the inside really doesn't matter in the greater scheme (though of course there are issues of performances and driver specific bugs)
Yes, this is an insane amount of work and these people should be respected greatly especially if they are not being paid to help improve linux.
(Different Anon)
> If the proprietor stops supporting something and they're all you've got to depend on, you're out of luck left with an ugly choice to run increasingly obsolete code or (apparently needlessly) do without that functionality at all.
And nVidia does exactly this, they drop old models from their drivers (it isn't that bad, the last time it happened to me, it was really old, and the machine stopped being relevant for desktop usage a long time before). Still, I like the tranquility of mind; that's why I switched to ATI cards everywhere. It's good to have choice again. The work of Nouveau developers is impressive, considering the competing open source ati drivers got a lot of help from AMD.
Kill all hipsters.
Now for my other question, since you are basically snatching the data from a binary blob which i'm sure is full of proprietary code, after all if it wasn't they could just FOSS the thing, do you worry about DMCA? i know that AMD can't release full specs on their GPUs because protected path isn't theirs and would break DMCA and since Nvidia cards i'm sure have protected path as well do you have to worry about legal ramifications? or have you set up the project in some place that doesn't recognize software patents?
What nouveau development does is feed data through the API and look at the I/O ports and what data they get. The developers are feeding data they "own" [e.g. the address of a frame buffer they created] and then retrieving it after it is transmuted. Virtually all devices in a system (e.g. disk controllers, etc.) have a port list so just having that is not novel (i.e. not patentable). Since nVidia isn't publishing a document on the port list, no copyright either. Might be claimed as a proprietary trade secret, but it's okay to reverse engineer in this manner [reverse engineer is a protected activity under the right "clean room" circumstances].
The "clean room" methodology has been court tested many times. In this instance, we have three groups that do not communicate, except in controlled ways. Group A does the above "port probing" and writes a document of their findings. Group B writes an API document using only Group A's report. Group C uses the API document generated by Group B to write the device driver code.
If you ARE Mr Peres I would like to say I admire your guts, frankly I wouldn't want to go within 100 yards of anything to do with video as long as all these crazy patents and lawsuits are going on. And how about hardware acceleration of video? How can you do that without ending up in the whole H.26x patent minefield?
No doubt nVidia has a license to H.264 patents. Under the exhaustion doctrine, anyone can benefit from using the API to output H.264 video. If that were not the case, any end user [even using nVidia's proprietary driver], would be required to pay H.264 patent licensing fees. Likewise for the use of one's home entertainment system.
However, that doesn't mean some folks don't try. Lodsys [a patent troll] licensed a patent to Apple. Apple incorporated the technology under an API that software developers can use. Lodsys has been trying to extract license fees from all software developers that use the Apple API. Apple is intervening in court to stop Lodsys using the exhaustion doctrine as the basis for their challenge against Lodsys in defense of the developers.
Frankly I think its a shame that such questions even have to be asked as while i have no problems with proprietary software and use both FOSS and proprietary software every day i do NOT support software patents but as long as that minefield exists I am curious how you intend to approach feature parity with the blob driver without stepping into the whole patent mess since one of the big uses of GPUs is video processing and that's patented up the wazoo.
It's not so much the patent mess (as I mentioned above), but rather the difficulty of deducing the port list, API doc, etc. using the clean room method. The 2D case is [relatively] easy enough. The 3D case [with a large number of acceleration modes, etc.] is a lot more work, many more test cases, etc. Sheer scope of such an undertaking is the biggest limiting factor.
Like a good neighbor, fsck is there
Summary is wrong. The nouveau driver is several orders of magnitude FASTER than the proprietary driver.. Well, for 2D acceleration. It is quite slower for 3D, but I don't really play games on Linux, so 2D is more important to me.
The nouveau driver really solves he Achilles heel of NVidia on Linux. 2D performance.
Ok, I created an account. It will be simpler for others to follow. Comparing me to Linus or Eric Raymond is really over-the-top. I'm just a PhD student who has been working on power management in nouveau for little more than 1.5 years.
Anyway, the answers to your post are right, clean-room REing is legal. The shady part is for the firmwares that you have to decode in order to re-implement them. Fortunately, we know nvidia used a compiler to compile them. As we write them in asm only and don't use the same interface, I guess we are pretty covered.
As for video decoding, nVidia though about us and added a "safe" for the encryption keys. So yes, we can re-implement video decoding (it is an on-going work, but it's ugly) but the compliance with hdcp will never come.
As for software patents, we do our best not to do things covered by them but sometimes we have to. In this case, we think about the sane countries that could benefit our code (most of them are "sane" ;)).
Lastly, nVidia said they would neither help nor hinder the project. If there is something they don't like, I'm sure they will let us know before going to court. If they wanted to go to the court, that would be one hell of a pain since they would have to sue individuals from many countries, mostly european. :D
Most of us are students, that would be bad PR to sue us
Congratulations, you are an idiot!
On Linux, you have a small piece of proprietary software running on an open source system entirely controlled by the developer. Most of reverse engineering is non-interactive, by running a driver/hardware combination while its interactions are watched by other software.
On Windows, everything but your own code is proprietary, including reverse-engineering tools themselves, and you have no way to modify most of the environment or include any kind of automated logging. You are pretty much forced to single-step through giant blobs while watching disassembled code in a multitude of little windows.
Contrary to the popular belief, there indeed is no God.
Shut up, hairyfeet, you are supposed to write pages and pages about horrors of not having a single unchanging ABI for kernel drivers, so poor proprietary drivers developers can write shit drivers.
Contrary to the popular belief, there indeed is no God.