Skip to content

Installing nVidia linux drivers in a xen enabled kernel

I have had a CentOS system for a while that is configured to be my mythtv system, however since it has so much resources I first ran a few VMWare servers on it, but being a young FOSS adept I decided to see if I could run xen on it as well.

One of the bottlenecks I stumbled upon was the fact that the NVidia linux kernel drivers do not run under a xen kernel, at least not with a little tweaking. I was succesful in compiling and loading them for the first time in 2008 following the advice found in the article Running Binary nVidia Drivers under Xen Host at legroom.net. My first successful result can be seen there as well.

Until now I am still able to able to do this trick on the latest CentOS kernel (2.6.18-128.2.1.el5xen) and one of the latest nVidia drivers (185.18.29).
Recently I discovered a far better and easier method:

  1. Boot into the XEN enabled kernel you would like to run your drivers in.
  2. Download the driver package from the website of nVidia.
  3. Make the package executable
    chmod +x NVIDIA-Linux-architecture-version-pkg2.run
  4. Now configure two variables, the first one to enable compilation under a XEN enabled environment:
    export IGNORE_XEN_PRESENCE=1

    The second one is the path to the current kernel source:

    export SYSRC=/lib/modules/`uname -r`/
  5. No we can start the installation of the drivers, just follow the instructions on screen after issuing the following:
    ./NVIDIA-Linux-architecture-version-pkg2.run
  6. Verify that it is installed…
    lsmod | grep nvidia

    … which should output something like this:

    [root@server ~]# lsmod | grep nvidia
    nvidia               7843368  38
    i2c_core               56129  8 nvidia,i2c_ec,wm8775,cx25840,tuner,ivtv,i2c_algo_bit,tveeprom
    [root@server ~]#

    To make sure we can do a second check…

    dmesg | grep -i nvidia

    … which should output something like this

    [root@server ~]# dmesg | grep -i nvidia
    ACPI: RSDP (v002 Nvidia                                ) @ 0x00000000000f7280
    ACPI: XSDT (v001 Nvidia ASUSACPI 0x42302e31 AWRD 0x00000000) @ 0x00000000cfee3100
    ACPI: FADT (v003 Nvidia ASUSACPI 0x42302e31 AWRD 0x00000000) @ 0x00000000cfeed400
    ACPI: HPET (v001 Nvidia ASUSACPI 0x42302e31 AWRD 0x00000098) @ 0x00000000cfeed8c0
    ACPI: MCFG (v001 Nvidia ASUSACPI 0x42302e31 AWRD 0x00000000) @ 0x00000000cfeed940
    ACPI: MADT (v001 Nvidia ASUSACPI 0x42302e31 AWRD 0x00000000) @ 0x00000000cfeed540
    ACPI: DSDT (v001 NVIDIA ASUSACPI 0x00001000 MSFT 0x03000000) @ 0x0000000000000000
    nvidia: disagrees about version of symbol struct_module
    nvidia: module license 'NVIDIA' taints kernel.
    NVRM: loading NVIDIA UNIX x86_64 Kernel Module  177.82  Tue Nov  4 16:50:05 PST 2008
    [root@server ~]#

{ 1 } Comments

  1. jonathan | May 16, 2010 at 10:06 | Permalink

    I currently build my XEN NVidia propriety drivers using the following command:

    IGNORE_XEN_PRESENCE=1 SYSSRC=/usr/src/kernels/`uname -r`/ ./NVIDIA-Linux-x86_64-195.36.24-pkg2.run -s -X

{ 1 } Trackback

  1. xentutorial.com | April 23, 2011 at 13:48 | Permalink

    Installing nVidia linux drivers in a xen enabled kernel…

    I have had a CentOS system for a while that is configured to be my mythtv system, however since it has so much resources I first ran a few VMWare servers on it, but being a young FOSS adept I decided to see if I could run xen on it as well. One of the …

Post a Comment

Your email is never published nor shared. Required fields are marked *