nvidia kernel module fails to build on 3.4.x kernel [fatal error: asm/system.h: No such file or directory]

Bug #993506 reported by Bowmore on 2012-05-02
442
This bug affects 59 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers (Ubuntu)
Critical
Alberto Milone
nvidia-graphics-drivers-updates (Ubuntu)
Critical
Alberto Milone

Bug Description

Installing the kernel 3.4.0-1.2 fails to build the nvidia-current module due to missing kernel header files.

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

Workaround:
Copy the missing header files from arm

cd /usr/src/linux-headers-3.4.0-1/arch
sudo cp arm/include/asm/system.h x86/include/asm/
sudo cp arm/include/asm/compiler.h x86/include/asm/
sudo cp arm/include/asm/system_info.h x86/include/asm/
sudo cp arm/include/asm/system_misc.h x86/include/asm/

and then reinstall the kernel.

Those header files are missing from all but the arm arch.

ProblemType: Package
DistroRelease: Ubuntu 12.10
Package: nvidia-current 295.40-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
Uname: Linux 3.2.0-24-generic x86_64
NonfreeKernelModules: nvidia
.proc.driver.nvidia.gpus.0: Error: [Errno 21] Är en katalog: '/proc/driver/nvidia/gpus/0'
.proc.driver.nvidia.registry: Binary: ""
.proc.driver.nvidia.version:
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 295.40 Thu Apr 5 21:37:00 PDT 2012
 GCC version: gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
.tmp.unity.support.test.0:

ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
CompizPlugins: [core,composite,opengl,compiztoolbox,decor,vpswitch,snap,mousepoll,resize,place,move,wall,grid,regex,imgpng,session,gnomecompat,animation,fade,unitymtgrabhandles,workarounds,scale,expo,ezoom,unityshell]
CompositorRunning: compiz
CurrentDmesg:
 [ 30.885876] vboxdrv: fAsync=0 offMin=0x217 offMax=0x19a1
 [ 30.885956] vboxdrv: TSC mode is 'synchronous', kernel timer mode is 'normal'.
 [ 30.885959] vboxdrv: Successfully loaded version 4.1.14 (interface 0x00190000).
 [ 31.134421] vboxpci: IOMMU not found (not registered)
 [ 34.610424] wlan0: no IPv6 routers present
DKMSKernelVersion: 3.4.0-1-generic
Date: Wed May 2 21:45:18 2012
DistUpgraded: Fresh install
DistroCodename: quantal
DistroVariant: ubuntu
DkmsStatus:
 nvidia-current, 295.40, 3.2.0-23-generic, x86_64: installed
 nvidia-current, 295.40, 3.2.0-24-generic, x86_64: installed
 vboxhost, 4.1.14, 3.2.0-24-generic, x86_64: installed
 vboxhost, 4.1.14, 3.4.0-1-generic, x86_64: installed
GraphicsCard:
 NVIDIA Corporation GT216 [GeForce GT 330M] [10de:0a29] (rev a2) (prog-if 00 [VGA controller])
   Subsystem: Samsung Electronics Co Ltd Device [144d:c06a]
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120421)
JockeyStatus:
 xorg:nvidia_current - NVIDIA accelerated graphics driver (Proprietary, Enabled, In use)
 xorg:nvidia_current_updates - NVIDIA accelerated graphics driver (post-release updates) (Proprietary, Disabled, Not in use)
MachineType: SAMSUNG ELECTRONICS CO., LTD. R580/R590
PackageVersion: 295.40-0ubuntu1
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-24-generic root=UUID=d290b749-dff5-4155-936a-23e3effc21a8 ro quiet splash
SourcePackage: nvidia-graphics-drivers
Title: nvidia-current 295.40-0ubuntu1: nvidia-current kernel module failed to build
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 06/22/2010
dmi.bios.vendor: Phoenix Technologies Ltd.
dmi.bios.version: 11JB.M044.20100622.hkk
dmi.board.asset.tag: Tag 12345
dmi.board.name: R580/R590
dmi.board.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.board.version: Not Applicable
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 9
dmi.chassis.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLtd.:bvr11JB.M044.20100622.hkk:bd06/22/2010:svnSAMSUNGELECTRONICSCO.,LTD.:pnR580/R590:pvrNotApplicable:rvnSAMSUNGELECTRONICSCO.,LTD.:rnR580/R590:rvrNotApplicable:cvnSAMSUNGELECTRONICSCO.,LTD.:ct9:cvrN/A:
dmi.product.name: R580/R590
dmi.product.version: Not Applicable
dmi.sys.vendor: SAMSUNG ELECTRONICS CO., LTD.
version.compiz: compiz 1:0.9.7.8-0ubuntu1
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.32-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 8.0.2-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 8.0.2-0ubuntu3
version.nvidia-graphics-drivers: nvidia-graphics-drivers N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.11.4-0ubuntu10.1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.0-0ubuntu1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20111219.aacbd629-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.17.0-1ubuntu4
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20111201+b5534a1-1build2

Bowmore (bowmore) wrote :
tags: removed: need-duplicate-check
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-graphics-drivers (Ubuntu):
status: New → Confirmed
Anders Kaseorg (andersk) wrote :

asm/system.h was intentionally dropped upstream in v3.4-rc1~54:
http://git.kernel.org/linus/0195c002
So nvidia will need to be updated to deal with this.

The other three headers (asm/compiler.h, asm/system_info.h, asm/system_misc.h) are ARM-specific and have never been part of x86.

Bowmore (bowmore) wrote :

Thanks for the link confirming it's an nvidia bug. Maybe it's doable to port the xorg-edgers nvidia patch to quantal.

You're right about the headers and a more "correct" workaround would have been to copy system.h from a 3.2 kernel, Anyway this proposed workaround works too.

description: updated
Changed in nvidia-graphics-drivers (Ubuntu):
importance: Undecided → High
summary: nvidia-current 295.40-0ubuntu1: nvidia-current kernel module failed to
- build
+ build [fatal error: asm/system.h: Filen eller katalogen finns inte]
summary: - nvidia-current 295.40-0ubuntu1: nvidia-current kernel module failed to
- build [fatal error: asm/system.h: Filen eller katalogen finns inte]
+ nvidia kernel module fails to build on 3.4.x kernel [fatal error:
+ asm/system.h: No such file or directory]
Ryan Thompson (rct86) wrote :

There's no need to copy the header file into the 3.4 kernel. You just have the patch the nvidia driver to add a preprocessor directive that removes that line if the kernel version is 3.4 or higher.

Changed in nvidia-graphics-drivers-updates (Ubuntu):
status: New → Confirmed
Bryce Harrington (bryce) on 2012-05-16
Changed in nvidia-graphics-drivers-updates (Ubuntu):
status: Confirmed → Triaged
Changed in nvidia-graphics-drivers (Ubuntu):
status: Confirmed → Triaged
importance: High → Critical
Changed in nvidia-graphics-drivers-updates (Ubuntu):
importance: Undecided → Critical
Changed in nvidia-graphics-drivers (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
Changed in nvidia-graphics-drivers-updates (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)

If you patch this yourself, there seem to be two places that need it: nv-linux.h, and the pm_message_t section of conftest.sh. For the conftest.sh section I did this:

#include <linux/version.h>
#include <linux/utsname.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
#include <asm/system.h>
#endif

Jim Hanlon (j2m) wrote :

Ran into this this morning. Looking at latest nvidia driver code (NVIDIA-Linux-x86-295.53) this seems to have been dealt with in their source. Probably in "2012-03-22 version 295.33", but I didn't actually go dig into that.

Changed in nvidia-graphics-drivers (Ubuntu):
status: Triaged → In Progress
Changed in nvidia-graphics-drivers-updates (Ubuntu):
status: Triaged → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers - 295.53-0ubuntu1

---------------
nvidia-graphics-drivers (295.53-0ubuntu1) quantal; urgency=low

  * New upstream release:
    - Added support for the following GPU:
      o GeForce GTX 670
      o GeForce 605
      o GeForce GT 610
      o GeForce GT 630
      o GeForce GT 640
      o GeForce GT 645
    - Fixed a bug affecting some G-Sync configurations
      which could cause active stereo content to be
      inverted on some display devices.
    - Add support for linux 3.4 (LP: #993506).
 -- Alberto Milone <email address hidden> Tue, 22 May 2012 11:31:25 +0200

Changed in nvidia-graphics-drivers (Ubuntu):
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-updates - 295.53-0ubuntu1

---------------
nvidia-graphics-drivers-updates (295.53-0ubuntu1) quantal; urgency=low

  * New upstream release:
    - Added support for the following GPU:
      o GeForce GTX 670
      o GeForce 605
      o GeForce GT 610
      o GeForce GT 630
      o GeForce GT 640
      o GeForce GT 645
    - Fixed a bug affecting some G-Sync configurations
      which could cause active stereo content to be
      inverted on some display devices.
    - Add support for linux 3.4 (LP: #993506).
 -- Alberto Milone <email address hidden> Tue, 22 May 2012 11:59:03 +0200

Changed in nvidia-graphics-drivers-updates (Ubuntu):
status: In Progress → Fix Released
Graham Lucking (lucking) wrote :

I also am testing the 3.4.0-4 kernel on Precise as requested. It defaults to Nouveau (Unity 2D) and Additional drivers does not activate the Nvidia driver. I also notice that on Quantal 3.40-1 kernel the Nvidia driver cannot be activated either.

I have a GT 220 and the 295.40 driver works fine in Precise with kernel 3.2. In Quantal with kernel 3.4.0-1 Nouveau gives Unity 3D

Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu Package testing tracker.

A list of all reports related to this bug can be found here:
http://packages.qa.ubuntu.com/qatracker/reports/bugs/993506

tags: added: package-qa-testing
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers