How-to Install Nvidia Driver on 2.6.25-2 Debian Kernel (with Xen)

Another big surprise rolled out from the Debian Unstable repository when today I updated my kernel from 2.6.25-1 to 2.6.25-2 – the maintainers have enabled Xen in the non-Xen kernel (linux-image-2.6.25-2-686). The result from this is that Nvidia drivers don’t compile throwing error about Xen enabled kernel.

The solution (if you don’t want to recompile your own kernel) :

As usual backup before executing any of these :)

  1. cd /lib/modules/2.6.25-2-686 (or wherever are your modules)
  2. grep CONFIG_XEN . -Rl | xargs -i sed -i -e ‘s/CONFIG_XEN/CONFIG_LUPO/g’ {}
  4. sh (or you can use patched 169.12 – )

Source: linux-image-2.6.25-2-686: nVidia driver fails to compile due to active Xen support

21 Replies to “How-to Install Nvidia Driver on 2.6.25-2 Debian Kernel (with Xen)”

  1. Thank you, Peter You are my frickin’ hero :) Although it’s really a dirty hack at least it does what it should do :)

    Oh shall I say worked on Debian Sid with 2.6.25-2-686

  2. Worked for me using linux-image-2.6.25-2-686-bigmem on a core duo. Card is a 9600GT and I used

    Thanks for the info.

  3. I implemented this in our debian sid/testing nvidia/fglrx installer script, sgfxi, for the lazy among you.

    Must be run from /usr/local/bin
    cd /usr/local/bin;wget -Nc; chmod +x sgfxi

    sgfxi installs all current nvidia drivers, patches them, detects your card version to install correct driver version, or lets you override it to install some other driver, applies patches if needed, see: sgfxi -h for currently supported drivers.

    It also updates itself automatically every time you run it after you install it.

    sgfxi home page:

    To install latest current, just do: sgfxi -c

    Currently the patch is in testing mode, that’s what the -T is for, normally it would all be automatic.

    This is the graphics installer for sidux/smxi

  4. oh, and it undoes the patch right after the nvidia driver install is done, so your /lib/modules stuff is set back to normal after the nvidia driver is installed.

  5. ah, sorry, needs: sgfxi -T -c
    to install current latest driver, with composite.

    The -T will probably be not required in a few days after I do some more testing on this.

  6. Thank you for your article!
    I have install nvidia driver.
    I use Nvidia Geforce MX 4000, install, patch a diff file from
    and set IGNORE_XEN_PRESENCE=1. Then it is installed successful.

  7. Everything is debugged now and working fine, no further need for -T option in sgfxi for this issue, just start it with regular arguments now. Thanks for this fix, the method was nicely done, I hadn’t seen that use of grep -Rl before, very useful.

    sgfxi is currently now supporting all current kernels and drivers again, including ati stuff, which won’t be of interest to people in this thread.

  8. @sgfxi

    Thanks mate. Why don’t you start a thread on to popularize a bit.

    I will comment there too.

  9. Hi!!! Where can I find the diff file that you are talking Cun Zhang???
    I have the same problem, and a MX 4000

    Sorry if my English is bad

  10. Thank you!!. Worked for me using debian lenny (testing), linux image 2.6.25-2-686, nvidia 8600GT with, pentium D CPU and intel d945 motherboard.

  11. Ahh sweet accelerated graphics, How I briefly missed you. Thanks a lot:

    Lenny 2.6.25-2-686, nvidia 8600GT, Dell Inspiron 1720

  12. This patch for 173.14.05 works great for me:

    It’s based on a similar idea to your solution, but does not require to rubbish your system.
    You just have to generate a patched version of nVidia installer, and then run it as usual :)

    All bug reports are very welcome – please replay in the above topic (in English or Polish).

  13. Well “require to rubbish your system” are strong words after all
    apt-get install –reinstall linux-headers-2.6.25-2-686 fixes reverts back
    and since I have not reviewed your patch I’m sticking with this fix.

    However I suggest posting this patch in and hope it will be merged.

  14. I have just used this technique with kernel 2.6.26-1-686-bigmem and nvidia driver and did not have any problems.

    Please try again and post more information about the error


Comments are closed.