View RSS Feed

Knurpht Blogs

DKMS + NVIDIA on openSUSE

Rate this Entry
NOTE: This will only work if all other NVIDIA installs have been removed
NOTE: This was made up for the 331.20 driver. The package will update to newer versions of the driver, currently 331.38
The package is in fact no more than a spec file, that
  • pulls in the appropriate NVIDIA.....run from NVIDIA's ftp site. If a 32bit openSUSE is installed then NVIDIA-x86-331.20.run will be downloaded, in case of a 64bit openSUSE the NVIDIA-x86_64-331.20.run.
  • runs the installer in a non-gui mode with options
    • -no-x-check, installer should run even when X is detected
    • -no-nouveau-check, installer normally stops when nouveau can't be unloaded
    • --dkms, installer adds the kernel module to dkms, which means that on a kernel update the module will be automatically rebuilt.
    • -q to keep the installer quiet
    • -a to accept the license
    • --ui=none to keep the installer from trying to start the ncurses interface

  • blacklists the nouveau driver


Experiences


On a clean install, on an install with all NVIDIA traces removed and no nvidia kernel module loaded for an X session, this works great.
When the NVIDIA module is loaded on a running X session, the installer fails. Uninstall any NVIDIA instances installed, reboot and try again.

Disadvantage / Issues


  • Currently the procedure to work properly requires an install free of other NVIDIA packages/.run installed.
  • Dependencies: the kernel-source and some development tools get pulled in. Specially the kernel-source package can be an issue if multiple kernels are kept.
  • Currently only for driver 331.20
  • When NVIDIA driver is already present, it requires a couple of reboots.


One-clicks for dkms-nvidia




Disclaimer

Though this worked fine on the systems I had available to test on, the package may be far from perfect. First aim was to get the 331.20 driver installed "the automated hard way" and having to do this only once, letting dkms take care of the rest re. the kernel module.

Call for help / suggestions / contributing

Any comments applicable will be welcome. I'm trying to do something alike for Optimus cards, i.e. just passing the right options to the NVIDIA installer and adding the build of the kernel module to dkms.

Submit "DKMS + NVIDIA on openSUSE" to Digg Submit "DKMS + NVIDIA on openSUSE" to del.icio.us Submit "DKMS + NVIDIA on openSUSE" to StumbleUpon Submit "DKMS + NVIDIA on openSUSE" to Google Submit "DKMS + NVIDIA on openSUSE" to Facebook Submit "DKMS + NVIDIA on openSUSE" to Twitter

Updated 14-Jan-2014 at 16:20 by Knurpht

Categories
openSUSE

Comments

  1. nef131's Avatar
    I was slightly confused by your introduction. Does your script work for systems that are not Bumblebee / Optimus configurations?

    Assuming, as I do, that your script is not for Bumblebee / Optimus configurations, when there are updates/upgrades to OpenSUSE 13.1, will the normal update approach for the Nvidia driver also work, as if the Nvidia repository had initially been added to the system (which, at the moment, is not available to be added), or will it be necessary, once the Nvidia repository is available, to add the repository?
  2. Knurpht's Avatar
    This is for non-Optimus cards. There's another blogpost with one-clicks for Optimus cards, i.e. bumblebee

    DKMS = Dynamic Kernel Module Support. This means that in case of a kernel update dkms will take care of the building of the NVIDIA driver for the new kernel. Currently this requires an extra reboot after the kernel-update to allow dkms to build the new NVIDIA driver.
    Updated 04-Dec-2013 at 09:48 by Knurpht
  3. nef131's Avatar
    [QUOTE=Knurpht;bt976]This is for non-Optimus cards. There's another blogpost with one-clicks for Optimus cards, i.e. bumblebee

    DKMS = Dynamic Kernel Module Support. This means that in case of a kernel update dkms will take care of the building of the NVIDIA driver for the new kernel. Currently this requires an extra reboot after the kernel-update to allow dkms to build the new NVIDIA driver.[/QUOTE]

    Many thanks for responding.
  4. glacierstone's Avatar
    Just installed on 13.1 64 bit and it worked like a charm. Awesome stuff with DKMS. One question I have is what about when Nvidia updates their driver? Will you be updating the package as well?
  5. Knurpht's Avatar
    Quote Originally Posted by glacierstone
    Just installed on 13.1 64 bit and it worked like a charm. Awesome stuff with DKMS. One question I have is what about when Nvidia updates their driver? Will you be updating the package as well?
    That is the plan. I published the blog(s) and the packages since a lot of people were waiting for the kmp packages. Mind, there will always be some delay, since new NVIDIA blobs have to be tested first. But basically you could branch the package, change version number, uninstall the previously installed dkms-nvidia package (which returns the system to using nouveau !!!), install the newly built package.
    During the Xmas holidays I'll also have a dive into the NVIDIA packs for older cards.
  6. glacierstone's Avatar
    [QUOTE=Knurpht;bt980]That is the plan. I published the blog(s) and the packages since a lot of people were waiting for the kmp packages. Mind, there will always be some delay, since new NVIDIA blobs have to be tested first. But basically you could branch the package, change version number, uninstall the previously installed dkms-nvidia package (which returns the system to using nouveau !!!), install the newly built package.
    During the Xmas holidays I'll also have a dive into the NVIDIA packs for older cards.[/QUOTE]

    You get the most awesome person on the internet award for this! I for one will definitely be looking forward to your updates, some delay is expected, but in advance thank you very much for your time and work.
  7. Dwarfer99's Avatar
    Sorry, but doing this just killed my system dead. It was a clean install. On reboot it went to log in but wouldn't let me do anything. Reinstall required to get it back up. This lack of nVidia drivers is very disappointing as without them I have no sound either.
  8. jonathan28's Avatar
    Easy to install and works great for me. I appreciate the kernel module updating too.
  9. Janninger's Avatar
    [QUOTE=Knurpht;bt980]That is the plan. I published the blog(s) and the packages since a lot of people were waiting for the kmp packages. Mind, there will always be some delay, since new NVIDIA blobs have to be tested first. But basically you could branch the package, change version number, uninstall the previously installed dkms-nvidia package (which returns the system to using nouveau !!!), install the newly built package.
    During the Xmas holidays I'll also have a dive into the NVIDIA packs for older cards.[/QUOTE]

    Installation of dkms-nvidia package failed due to kernel headers could not be found
    Kernel source and the dev-package ist installed.

    [QUOTE]Driver file installation is complete.
    Installing DKMS kernel module:
    Adding to DKMS: [ ] 0%
    Adding to DKMS: [## ] 5%
    ERROR: Failed to run `/usr/sbin/dkms build -m nvidia -v 331.20 -k
    3.11.6-4-desktop`: Error! echo
    Your kernel headers for kernel 3.11.6-4-desktop cannot be found at
    /lib/modules/3.11.6-4-desktop/build or
    /lib/modules/3.11.6-4-desktop/source.


    Adding to DKMS: [##############################] 100%

    ERROR: Failed to install the kernel module through DKMS. No kernel module
    was installed; please try installing again without DKMS, or check
    the DKMS logs for more information.


    ERROR: Installation has failed. Please see the file
    '/var/log/nvidia-installer.log' for details. You may find
    suggestions on fixing installation problems in the README available
    on the Linux driver download page at www.nvidia.com.

    error: %pre(dkms-nvidia-331.20-28.1.i586) scriptlet failed, exit status 253
    error: dkms-nvidia-331.20-28.1.i586: install failed
    [/QUOTE]
  10. Knurpht's Avatar
    Quote Originally Posted by Janninger
    Installation of dkms-nvidia package failed due to kernel headers could not be found
    Kernel source and the dev-package ist installed.
    Install the "Linux Kernel Development" pattern. Looks like there's something missing. If you don't succeed, start a new thread in the forums section.
  11. Janninger's Avatar
    [QUOTE=Knurpht;bt986]Install the "Linux Kernel Development" pattern. Looks like there's something missing. If you don't succeed, start a new thread in the forums section.[/QUOTE]

    Thanks, but how can I get the "Linux Kernel Development" pattern?
  12. imabe's Avatar
    Now I can understand why the Opensuse devs have not yet enabled an Nvidia repository for 13.1
    I am convinced there is some serious issue with the 331.20 driver and the kernel shipped with 13.1
    It does not work with all hardware. I suspect a kernel update will be issued shortly.
    Please no pitch forks...

    Lifted from my lspci output: [1:00.0 VGA compatible controller: NVIDIA Corporation GF119M [GeForce GT 520M] (rev a1)]

    Checked the nvidia site and this driver is listed for my video card.
    I'll avoid blood sweat and tears and wait for a solution from Opensuse.

    Thanks for your hard work.
  13. Dwarfer99's Avatar
    331.20 is on on the nVidia ftp site 32 and 64 bit. ->ftp://download.nvidia.com/opensuse/13.1/x86_64/
  14. Dwarfer99's Avatar
    Having tried the original 'one click' in this thread, it killed my install. I found the 13.1 drivers on the Nvidia ftp yesterday and tried that - this also killed my system. I tried for about 4 hours to recover but finished up doing another clean install which got me back the nouveau drivers. I see that the nVidia drivers are now listed as able to add under community repos but I think I'll give this a miss. I suspect that imabe's comment above is correct:

    '...there is some serious issue with the 331.20 driver and the kernel shipped with 13.1
    It does not work with all hardware. I suspect a kernel update will be issued shortly.'

    I will be waiting to see if a kernal update is forthcoming before having another go.
  15. Knurpht's Avatar
    Quote Originally Posted by Dwarfer99
    Having tried the original 'one click' in this thread, it killed my install. I found the 13.1 drivers on the Nvidia ftp yesterday and tried that - this also killed my system. I tried for about 4 hours to recover but finished up doing another clean install which got me back the nouveau drivers. I see that the nVidia drivers are now listed as able to add under community repos but I think I'll give this a miss. I suspect that imabe's comment above is correct:

    '...there is some serious issue with the 331.20 driver and the kernel shipped with 13.1
    It does not work with all hardware. I suspect a kernel update will be issued shortly.'

    I will be waiting to see if a kernal update is forthcoming before having another go.
    No need to go through all this. If the package for some reason does not work, hit Ctrl-Alt-F1, login as root do
    Code:
    zypper rm dkms-nvidia
    reboot and you're back on the nouveau driver.
  16. promeneur's Avatar
    - if i use appert
    then
    error message :

    internal system error occurs
    unexpected pb occurs ...

    details

    installation aborted by users

    - if i use yast software management
    then
    error message :

    Subprocess failed. Error: Echec RPM:check sums and md5 sums are ok
    Verifying archive integrity... OK
    Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 331.38......................................................................................................................................................................................................................

    WARNING: Skipping the runlevel check (the utility `runlevel` failed to
    run).


    ERROR: An NVIDIA kernel module 'nvidia' appears to already be loaded in
    your kernel. This may be because it is in use (for example, by the
    X server), but may also happen if your kernel was configured without
    support for module unloading. Please be sure you have exited X
    before attempting to upgrade your driver. If you have exited X,
    know that your kernel supports module unloading, and still receive
    this message, then an error may have occured that has corrupted the
    NVIDIA kernel module's usage count; the simplest remedy is to reboot
    your computer.


    ERROR: Installation has failed. Please see the file
    '/var/log/nvidia-installer.log' for details. You may find
    suggestions on fixing installation problems in the README available
    on the Linux driver download page at www.nvidia.com.


    Welcome to the NVIDIA Software Installer for Unix/Linux

    The file '/tmp/.X0-lock' exists and appears to contain the process ID
    '2269' of a runnning X server.
    Continuing per the '--no-x-check' option.
    error: %pre(dkms-nvidia-331.38-11.1.x86_64) scriptlet failed, exit status 253
    error: dkms-nvidia-331.38-11.1.x86_64: install failed
    error: dkms-nvidia-331.20-29.1.x86_64: erase skipped
  17. promeneur's Avatar
    additional info :

    the 331.20 was installed with dkms technology
  18. promeneur's Avatar
    1 .

    if i uninstall dkms nvidia packet
    then
    nouveau is no more blacklisted
    but
    when i restart
    then
    nouveau is not loaded .

    a generic vga driver is loaded .

    nouveau uses kms .

    i assume your script forgets to set NO_KMS_IN_INITRD to "no" .



    2. i don't understand we can't update nvidia driver with your solution

    i use dkms technology with my mandriva .
    each time there is a new dkms packet for a new nvidia driver
    then
    the updating is executed during my kde session by the software manager
    and
    the new driver is loaded during next boot

    any way thanks for your usefull job
  19. Knurpht's Avatar
    Quote Originally Posted by promeneur
    1 .

    if i uninstall dkms nvidia packet
    then
    nouveau is no more blacklisted
    but
    when i restart
    then
    nouveau is not loaded .

    a generic vga driver is loaded .

    nouveau uses kms .

    i assume your script forgets to set NO_KMS_IN_INITRD to "no" .



    2. i don't understand we can't update nvidia driver with your solution

    i use dkms technology with my mandriva .
    each time there is a new dkms packet for a new nvidia driver
    then
    the updating is executed during my kde session by the software manager
    and
    the new driver is loaded during next boot

    any way thanks for your usefull job
    Sorry for the late reply. I don't want to start another debate here on how things should be.
    ATM the package faults on remains of the previous install. I have to look into that.

    For now, you should remove all traces of the NVIDIA driver ( a workaround would be to download the 331.20 driver and run it with the "-q --no-x-check --uninstall" option ), remove the currently installed package, reboot, then reinstall.
    The plan is to pack future driver packages with NVIDIA-version in the package name.

    Speaking only for me, this is the solution I've been wanting since NVIDIA supports dkms. But, recent info on the matter makes me think it could be more difficult than I think, even though these packages have worked on numerous machines.
  20. promeneur's Avatar
    since some days dkms-nvidia/openSUSE_13.1 has disappeared
    at
    http://download.opensuse.org/repositories/home:/Knurpht:/

    what happens ?

    thanks