Bug 759 - nvidia-drivers can't be built with later kernels (3.5)
: nvidia-drivers can't be built with later kernels (3.5)
Status: RESOLVED WONTFIX
Product: Desktop Bugs
Classification: ROSA Desktop
Component: Main Packages
: Marathon
: All Linux
: Normal normal
: ---
Assigned To: ROSA Linux Bugs
: ROSA Linux Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-13 00:27 MSD by Pavel Shved
Modified: 2013-05-21 20:58 MSD (History)
1 user (show)

See Also:
RPM Package: dkms-nvidia-current-295.40-2-rosa.lts2012.0.x86_64
ISO-related:
Bad POT generating:
Upstream:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Shved 2012-09-13 00:27:57 MSD
Description of problem:

I tried to install a new 3.5 nrj kernel, but my nvidia drivers wouldn't rebuild.  I did install the correct kernel-devel package prior to installing the kernel, but it didn't work either.  I tried to rebuild it with DKMS manually, but...

# dkms build -m nvidia-current -v 295.40-2 -k 3.5.3-nrj-workstation-69rosa.lts

The build log was saying about asm/config.h:

In file included from /var/lib/dkms/nvidia-current/295.40-2/build/nv.c:13:0:
/var/lib/dkms/nvidia-current/295.40-2/build/nv-linux.h: At top level:
/var/lib/dkms/nvidia-current/295.40-2/build/nv-linux.h:114:75: fatal error: asm/system.h: No such file or directory


so the drivers won't build.


Version-Release number of selected component (if applicable):

I used dkms-nvidia-current-295.40-2,


Steps to Reproduce:
1.  Install a 3.5 kernel from nrj
2.  Try to build/reinstall proprietary nvidia-drivers


How to fix

https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/993506

This bug says that the new kernel has an incompatible API change (no asm/system.h), so that older nvidia drivers don't build with it.  


Here's what I did:

# cd /usr/src/nvidia-current-295.40-2/

Fix nv-linux.h around asm/system.h:

#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
#include <asm/system.h>             /* cli, sli, save_flags             */
#endig

Fix conftest.sh at pm_message_t:

        pm_message_t)
            #
            # Determine if the 'pm_message_t' data type is present
            # and if it as an 'event' member.
            #
            echo "$CONFTEST_PREAMBLE
            #include <linux/version.h>
            #include <linux/utsname.h>
            #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
            #include <asm/system.h>
            #endif
            #include <linux/pm.h>

now rebuild the drivers:

# dkms build -m nvidia-current -v 295.40-2 -k 3.5.3-nrj-workstation-69rosa.lts

It works well now, and the Desktop Manager boots well.
Comment 1 Pavel Shved 2012-09-13 00:34:41 MSD
Fixed the description.  The drivers don't build; they do work when they're built.
Comment 2 Denis Silakov 2013-05-21 20:58:24 MSD
We don't officially support 3.5 kernel for Marathon. We do build newer kernels for Marathon in personal repos, but there are no guarantees that everything works fine. If you want something newer, use Desktop Fresh.

But if we ever want to update kernel in Marathon, we'll definitely take care of nvidia drivers patching/update.