SDB:NVIDIA using osc
Situation
Installing NVIDIA's proprietary driver using osc is desired.
Procedure
You can build the kernel package as an RPM and install it using RPM/Zypper based on repositories from X11:Drivers:Video. This project contains all the infrastructure needed to build an RPM, but does not build or publish anything.
The advantages of using this method are:
- unofficial patches for newer kernels are usually applied already
- nouveau is blacklisted
- dependencies automatically installed
First, you need to install the osc program
Then, checkout the driver project that supports your current graphics card (check for you card in the pci_id* files - when available - or the *.changes files of each package). We'll use nvidia-gfxG04 for the rest of this article.
The next step is to download the driver sources, since they are not available in OBS.
At this point you are ready to build the RPMs. Follow the instructions in the README file to do so.
Once that is done, install the resulting RPMs, and reboot.
The NVidia driver is now setup.
To upgrade to newer versions, you typically need to run
The first command brings in any changes done in OBS, while the second one downloads new driver versions.
Handling system upgrades
This page mentions that certain upgrades break the NVidia driver. The best example of those is a new major kernel version, e.g. upgrading from 4.6 to 4.7. The steps for an upgrade are the following:
- upgrade to a new version, in case you need patches or a newer driver version
- upgrade to the new kernel
- reboot in text mode
- rebuild and reinstall the driver using the instructions supplied above