You are not logged in.

#1 2011-11-17 19:18:14

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Nvidia custom kernel module failing since last abs version

It appears that the new nvidia module, version 285.05.09-3 upgraded on my system around 11/08/2011. I have always used the wiki instructions for nvidia on a custom kernel, but these instructions are out of date as of the last nvidia update. For example, here is some of the new PKGBUILD:

_extramodules=extramodules-3.1.1-bigBang
_kernver="$(cat /lib/modules/${_extramodules}/version)"
...
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
    gzip "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"

So, it's no longer just a KERNEL_VERSION variable, but this extramodules directory. I checked the default install and noted the new structure:

$ ls /lib/modules/extramodules-3.1-ARCH/
nvidia.ko.gz  version

$ cat /lib/modules/extramodules-3.1-ARCH/version 
3.1.1-1-ARCH

So, I created a directory for my own custom kernel: /lib/modules/extramodules-3.1.1-bigBang

And a similar `version` file with the text: 3.1.1-bigBang

I updated the PKGBUILD as shown above and my nvidia.install is like so:

$ cat nvidia.install 
post_install() {
    EXTRAMODULES='extramodules-3.1.1-bigBang'
    depmod $(cat /lib/modules/$EXTRAMODULES/version)
    echo 'In order to use nvidia module, reboot the system.'
}

post_upgrade() {
    EXTRAMODULES='extramodules-3.1.1-bigBang'
    depmod $(cat /lib/modules/$EXTRAMODULES/version)
    rmmod nvidia || echo 'In order to use the new nvidia module, exit Xserver and unload it manually.'
}

post_remove() {
    EXTRAMODULES='extramodules-3.1.1-bigBang'
    depmod $(cat /lib/modules/$EXTRAMODULES/version)
}

After the successful build and installation, I get the message:

ERROR: Module nvidia does not exist in /proc/modules
In order to use the new nvidia module, exit Xserver and unload it manually.

This is typical, whether it's a custom module or the default one, installed with `pacman -S nvidia`. No problem. So I attempt to modprobe it as usual and get `NVIDIA: error. module not found` or something to this effect. I've checked and it is present in /lib/extramodules/3.1.1-bigBang, but for some reason the system isn't finding it.

What am I doing wrong? I'll update the wiki with new instructions when I solve the issue.

Offline

#2 2011-11-18 16:55:31

matse
Member
Registered: 2011-04-27
Posts: 299

Re: Nvidia custom kernel module failing since last abs version

Hi,
I don't use a nvidia card but I guess you installed a custom kernel without setting a symlink from /lib/modules/$uname -r$/ to "extramodules" so your system doesn't find your nvidia module. Either install your nvidia module directly do /lib/modulse/$uname -r$ or set a simlink, e.g. for your kernel it would be (assuming uname -r results in "3.1.1-1-bigBang")

ln -s /lib/modules/extramodules-3.1.1-bigBang /lib/modules/3.1.1-1-bigBang/extramodules

Greetings
matse

//Edit: and you should update your PKGBUILD of your selfmade kernel so that it creates the extramodules directory and the symlink to it automatically like here.

Last edited by matse (2011-11-18 20:19:08)

Offline

#3 2011-11-18 18:04:56

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: Nvidia custom kernel module failing since last abs version

@matse... wait, the dir /lib/modules/extramodules-### is a *symlink*? I'm booted into Windows now, but I didn't see that. The only contents of the extramodules directory were the version file and the nvidia module. If extramodules was a symlink to the regular modules dir, it should have shown all the same contents, shouldn't it? Maybe I'm still not understanding.

Offline

#4 2011-11-18 18:10:10

matse
Member
Registered: 2011-04-27
Posts: 299

Re: Nvidia custom kernel module failing since last abs version

No, the directory

/lib/modules/extramodules-###

is not a symlink, it really exists. But modprobe looks just in /lib/modules/'uname -r' - so you have to set a symlink from /lib/modules/'uname -r' to your extramodules directory. That's what is done in line 152-155 in the official kernel PKGBUILD.

Offline

#5 2011-11-19 00:03:55

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: Nvidia custom kernel module failing since last abs version

Ah. Perfect. I read what you wrote backwards and thought it was from /lib/modules/extramodules-uname --> /lib/modules/uname.

So you're saying I need a symlink at /lib/modules/uname/extramodules-uname -> /lib/modules/extramodules-uname?

Offline

#6 2011-11-19 00:11:11

matse
Member
Registered: 2011-04-27
Posts: 299

Re: Nvidia custom kernel module failing since last abs version

Yes exactly, even if in the official kernel the symlink is just calles "extramodules" without the uname:
/lib/modules/uname/extramodules -> /lib/modules/extramodules-uname
but this should not make any difference.

Offline

Board footer

Powered by FluxBB