You are not logged in.

#1 2008-05-06 23:11:55

ManOnONeWheel
Member
Registered: 2008-01-11
Posts: 25

Custom kernel 2.6.25 and nvidia

I have compiled a custom kernel the 'traditional' way, that is, make and make modules_install and now I am having trouble getting the nvidia driver to work

I usually just install it through pacman, but that doesn't work with the custom kernel.

So my next step was to follow the wiki.

I changed the kernel names in the PKGBUILD and nvidia.install that i got from my abs tree, and when I install with makepkg -i -c everything goes well.

However, when I try to start X again, it crashes and says it cannot find the NVIDIA kernel module. I don't fully understand everything in the PKGBUILD and it is quite possible there is some other line or path that needs to be changed. Please, I am at my wit's end.

Here are my PKGBUILD and nvidia.install

# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
# Maintainer : Thomas Baechler <thomas@archlinux.org>

pkgname=nvidia-DarkTower
pkgver=169.12
_kernver='2.6.25-DarkTower'
pkgrel=2
pkgdesc="NVIDIA drivers for kernel26."
arch=('i686' 'x86_64')
[ "$CARCH" = "i686"   ] && ARCH=x86
[ "$CARCH" = "x86_64" ] && ARCH=x86_64
url="http://www.nvidia.com/"
depends=('kernel26>=2.6.24.3-4' 'kernel26<=2.6.25-0' 'nvidia-utils')
conflicts=('nvidia-96xx' 'nvidia-71xx' 'nvidia-legacy')
license=('custom')
install=nvidia.install
source=(http://us.download.nvidia.com/XFree86/Linux-$ARCH/${pkgver}/NVIDIA-Linux-$ARCH-${pkgver}-pkg0.run)
md5sums=('e7aaca79c846e34cfe8111040bfee2d0')
[ "$CARCH" = "x86_64" ] && md5sums=('843a1e8bc1923ba2e4b60f6fab31ad3b')

build()
{
  # Extract
  cd $startdir/src/
  sh NVIDIA-Linux-$ARCH-${pkgver}-pkg0.run --extract-only
  cd NVIDIA-Linux-$ARCH-${pkgver}-pkg0
  
  # Any extra patches are applied in here...

  cd usr/src/nv/
  ln -s Makefile.kbuild Makefile
  make SYSSRC=/lib/modules/${_kernver}/build module 
  
  # install kernel module
  mkdir -p $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/video/
  install -m644 nvidia.ko $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/video/

  sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install
}
# arg 1:  the new package version
post_install() {
  KERNEL_VERSION='2.6.25-DarkTower'
  depmod -v $KERNEL_VERSION  > /dev/null 2>&1         
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
  post_install $1
  rmmod nvidia || echo 'In order to use the new nvidia module, exit Xserver and unload it manually.'
}

# arg 1:  the old package version
post_remove() {
  KERNEL_VERSION='2.6.25-DarkTower'
  depmod -v $KERNEL_VERSION     > /dev/null 2>&1     
}

op=$1
shift
$op $*

Last edited by ManOnONeWheel (2008-05-07 00:41:50)

Offline

#2 2008-05-07 06:59:10

Kane
Member
Registered: 2006-10-08
Posts: 220

Re: Custom kernel 2.6.25 and nvidia

i've had this problem before, and after watching makepkg do its thing, it seemed to complete even though there was an error at the end.

for me it was simply a case of using the wrong kernel version, i thought the kernel would be 2.6.25-whatever but after running uname -r it turned out it was called 2.6.25.1-whatever

dont know if this will be of any help

Last edited by Kane (2008-05-07 06:59:24)

Offline

#3 2008-05-07 07:07:17

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: Custom kernel 2.6.25 and nvidia

I have compiled a custom kernel the 'traditional' way, that is, make and make modules_install and now I am having trouble getting the nvidia driver to work

I usually just install it through pacman, but that doesn't work with the custom kernel.

May I ask what doesn't work for you ?

Offline

#4 2008-05-07 08:19:30

attila
Member
Registered: 2006-11-14
Posts: 293

Re: Custom kernel 2.6.25 and nvidia

@ManOnONeWheel If you want to use nvidia 169.12 together with kernel 2.6.25 than you have to patch it:

http://www.nvnews.net/vbulletin/showthread.php?t=110088

Offline

#5 2008-05-07 10:23:29

Demind
Member
Registered: 2007-07-10
Posts: 111

Re: Custom kernel 2.6.25 and nvidia

I recommend the 173.08 nvidia driver with kernel 2.6.25

Offline

#6 2008-05-07 10:48:54

ST.x
Member
From: Sydney, Australia
Registered: 2008-01-25
Posts: 363
Website

Re: Custom kernel 2.6.25 and nvidia

Demind wrote:

I recommend the 173.08 nvidia driver with kernel 2.6.25

nvidia 169.12-3 from testing is working with 2.6.25 at the moment for me.

Last edited by ST.x (2008-05-07 10:49:09)

Offline

#7 2008-05-07 12:39:09

ManOnONeWheel
Member
Registered: 2008-01-11
Posts: 25

Re: Custom kernel 2.6.25 and nvidia

@Kane
I've checked and double checked that the kernel name/versions match, but I will check again.


@bangkok_manouel
Nvidia installs through pacman, but when I boot the custom kernel, X crashes saying it can't find the nvidia module.


@attilla
Thank you! I did not know this. I will try this out today and see what happens


Thanks for your help so far guys!

Offline

#8 2008-05-07 13:35:06

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Custom kernel 2.6.25 and nvidia

ManOnONeWheel wrote:

X crashes saying it can't find the nvidia module.

So investigate.

$ find /lib/modules/ -name nvidia.ko
/lib/modules/2.6.25/kernel/drivers/video/nvidia.ko

$ uname -r
2.6.25

Offline

#9 2008-05-07 13:45:36

ManOnONeWheel
Member
Registered: 2008-01-11
Posts: 25

Re: Custom kernel 2.6.25 and nvidia

Well, it looks like the 169 installer would always put nvidia.ko in the /lib/modules/2.6.24 directory, no matter if i was currentlyusing a different kernel or not so im not sure what is going on there.

But I just installed the 173.08 and it looks like everything went smooth. I am at school now and I only have an ssh shell, so i will have to wait to see if it really worked, but i'm pretty sure it did.

Thanks everyone for your help.

**UPDATE**
That is an affirmative on the new nvidia driver working.

Last edited by ManOnONeWheel (2008-05-07 22:25:00)

Offline

#10 2008-05-08 01:40:48

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: Custom kernel 2.6.25 and nvidia

I don't use Arch package for nvidia as script is unable to install modules on several kernels at the same time and I want to boot to X irrelevant of kernel loaded. I never had any problems with custom kernels 2.6.25 and nvidia 169 or 173

current status:
$ find /lib/modules/ -name nvidia.ko
/lib/modules/2.6.25-zen0-GIGUE/kernel/drivers/video/nvidia.ko
/lib/modules/2.6.25-zen1-preview3-FADO/kernel/drivers/video/nvidia.ko
/lib/modules/2.6.25-zen1-SARABANDE/kernel/drivers/video/nvidia.ko
/lib/modules/2.6.25-zen1-GAVOTTE/kernel/drivers/video/nvidia.ko

all boots fine, none crash/freeze. Never patched 169 or 173

Well, it looks like the 169 installer would always put nvidia.ko in the /lib/modules/2.6.24 directory, no matter if i was currentlyusing a different kernel or not so im not sure what is going on there.

must be some quirk on your box. Have not seen this.

Last edited by broch (2008-05-08 01:43:13)

Offline

Board footer

Powered by FluxBB