How can I use the recent beta of the 302 version of the nvidia driver (which finally supports the RandR extension!) with a realtime kernel in Precise?
This question contains information on enabling the current 295 version for the 3.4 kernel with the RT patch. But I'm looking for an answer that installs the nvidia driver using the package manager rather than nvidia's installer (whose installations break every so often due to the package management system overwriting files).
Warning
The patch in this question is for kernel 3.4, and so is the one below; a realtime-patched kernel 3.4 is required.
The new nvidia 302 driver requires the video ABI that xorg-server 1.12 provides, and unfortunately Precise comes with xorg-server 1.11. The following instructions involve adding the xorg-edgers PPA as a software source to provide xorg-server 1.12, and this poses a certain risk of breakage. The uninstallation instructions are at the bottom, but read them through for possible hiccups there.
Instructions
Modifying the packaged nvidia driver
Create a temporary directory and change into it with:
Download the nvidia-current_302*.deb from the xorg-edgers PPA by browsing the packages for Precise under nvidia-graphics-driver_302* here. At the moment of this writing, a direct download can be performed with:
Extract the .deb with:
Add the patch to the
deb_contents/usr/src/nvidia-current*/patches
directory by pasting the following in a terminal:Add the patch to dkms.conf by pasting this in a terminal:
Modify the version number in deb_contents/DEBIAN/control by issuing:
Repackage the driver with:
Installing the PPA and the modified driver
Add the xorg-edgers PPA:
Install the locally-modified .deb with:
Keeping up to date
The xorg-edgers PPA will update with newer versions of the nvidia driver as they come out; you will need to repeat the re-packaging instructions above with each new release.
Uninstalling
You should be able to revert to the
nouveau
driver with the following:In my case, this process involved uninstalling
wine
along with some i386 packages (which should have been downgraded instead). Be wary ofppa-purge
if you are on amd64 since it does not get along well with multiarch (as indicated in the PPA warnings); in my case the outcome was a non-issue (I simply reinstalledwine
), but other people might end up with badly broken dependencies depending on what they have installed.