You are not logged in.

#1 2010-09-26 22:36:20

gauthma
Member
Registered: 2010-02-16
Posts: 215
Website

[Solved] Nvidia after kernel update

The nvidia wiki clearly states that: "Every time the kernel26 package is updated, it is a requirement to reinstall the nvidia package and rebooting afterwards. "

But my question is, why? I mean, if the module was to be recompiled, that would make sense. But what does just reinstalling the driver accomplish? In my system, pacman -Ql nvidia shows:

$ pacman -Ql nvidia
nvidia /etc/
nvidia /etc/modprobe.d/
nvidia /etc/modprobe.d/nouveau_blacklist.conf
nvidia /lib/
nvidia /lib/modules/
nvidia /lib/modules/2.6.35-ARCH/
nvidia /lib/modules/2.6.35-ARCH/kernel/
nvidia /lib/modules/2.6.35-ARCH/kernel/drivers/
nvidia /lib/modules/2.6.35-ARCH/kernel/drivers/video/
nvidia /lib/modules/2.6.35-ARCH/kernel/drivers/video/nvidia.ko

From what I've read, I think the kernel update process copies the compiled modules into the proper folder (inside /lib) named by the kernel version. Should this not be the case with nvidia? If it is not, then is this why the reinstall is needed?

Thanks in advance (and my apologies if I've glossed over something that's patently obvious --- while I've searched for the answer before posting, I am still quite the novice at tinkering with the kernel)

EDIT: just after posting I've realized that maybe this post belongs in "Kernel and Hardware Issues" subforum. But the truth is this isn't really an "issue"... it's more a question from, well, a newbie :-)

Last edited by gauthma (2010-09-28 21:53:04)

Offline

#2 2010-09-26 22:44:03

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [Solved] Nvidia after kernel update

that should be removed from wiki. if that happens then is a bug


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2010-09-26 23:20:17

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Nvidia after kernel update

nouveau needs to be blacklisted. Reboot is simple enough.

Offline

#4 2010-09-27 00:11:17

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [Solved] Nvidia after kernel update

The nvidia module would need to be in step with the kernel. If you're using nvidia from [extra], this will always be the case. However you would still need to reboot (recommended) because even minor kernel updates can sometimes cause problems with the nvidia driver which would be a bit hard to debug (for example, if you run a 3D app a day after updating and not restarting and it fails with weird errors).

Of course, if you're using nvidia-beta or some other AUR nvidia driver, you need to reinstall it. That's what the wiki is referring to. Even if the kernel major version has not updated (for example 2.6.35.5 to 2.6.35.6 is only a minor version bump) the driver may need to be recompiled. Safer to just do it everytime and restart the machine.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#5 2010-09-28 01:28:16

gauthma
Member
Registered: 2010-02-16
Posts: 215
Website

Re: [Solved] Nvidia after kernel update

Thank you for the feedback.

ngoonee wrote:

Of course, if you're using nvidia-beta or some other AUR nvidia driver, you need to reinstall it.

Running the risk of asking what might be obvious to some, why?

ngoonee wrote:

That's what the wiki is referring to. Even if the kernel major version has not updated (for example 2.6.35.5 to 2.6.35.6 is only a minor version bump) the driver may need to be recompiled. Safer to just do it everytime and restart the machine.

Now I'm confused. Are you saying that the safest approach is to recompile and (re)install the nvidia module after each kernel update? And does this only apply to modules from beta & AUR, or [extra] as well? And shouldn't all this issue of recompiling modules also apply to every other module installed in the system?

Offline

#6 2010-09-28 02:03:04

jdarnold
Member
From: Medford MA USA
Registered: 2009-12-15
Posts: 485
Website

Re: [Solved] Nvidia after kernel update

FWIW, I've never done anything special with my nvidia drivers. Of course, I just use the vanilla, "official" nvidia drivers from the Extra repo. Not even sure they always get updated and I never even reboot after a kernel install. I do turn off my computer every night and thus it gets rebooted once a day, but that's all I do and it's always worked.

Now if I don't come back tomorrow after today's kernel update, and my drivers are hosed, I'm going to blame all you guys for making me bring it up !-)

Last edited by jdarnold (2010-09-28 02:04:10)

Offline

#7 2010-09-28 03:14:39

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [Solved] Nvidia after kernel update

gauthma wrote:

Thank you for the feedback.

ngoonee wrote:

Of course, if you're using nvidia-beta or some other AUR nvidia driver, you need to reinstall it.

Running the risk of asking what might be obvious to some, why?

The driver speaks to the kernel. When the kernel updates, the language used might have changed in various ways. Since nvidia is closed-source, its not always obvious whether what has changed affects it. The same applies to xorg-server, when it updates you should recompile your nvidia driver. Its SOMETIMES not needed, but when it is, would you rather be solving it from the tty?

quathma wrote:
ngoonee wrote:

That's what the wiki is referring to. Even if the kernel major version has not updated (for example 2.6.35.5 to 2.6.35.6 is only a minor version bump) the driver may need to be recompiled. Safer to just do it everytime and restart the machine.

Now I'm confused. Are you saying that the safest approach is to recompile and (re)install the nvidia module after each kernel update? And does this only apply to modules from beta & AUR, or [extra] as well? And shouldn't all this issue of recompiling modules also apply to every other module installed in the system?

Yes that's the safest approach. [extra] is taken care of by the devs, the simple way is to assume they'll bump it if needed (and you don't need to do anything).

The same thing applies to almost any kernel module (AFAIK). It applies to virtualbox's modules, for sure, as well as phc-intel (the only other 2 external modules I use). Most kernel modules are actually compiled in to the kernel26 package anyway, so its not very many. I just automatically recompile the ones I use whenever I notice a kernel/xorg update.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#8 2010-09-28 04:54:18

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

Re: [Solved] Nvidia after kernel update

no,
if API changes and external modules does not know about changes re-compiling will not help. Compilation will simply fail. So recompiling is needed if new API/updated external module is available and yo can replace old incompatible module. Other than that, there is no reason to re-compile external modules. Although you don't have to re-compile external modules but you need to install them for each new kernel (name does not matter as you have to populate kernel externl modules db).

There are tools than can fix this for you, however these tools are not default for Arch. Best known is DKMS which is also available from AUR. In short DKMS simply drops module (compiled earlier for previousl kernel version) for new kernel and updates kernel db. So it works accordind to the rule: one external module for many kernels.

In contrast to some revelations, minor kernel changes do not modify APIs unless some sort of emergency requires this (e.g. security, or kernel functionality failure). But this is rare.

Since nvidia is closed-source, its not always obvious whether what has changed affects it.

closed source has nothing to do with changes: in fact (irrelevant of closed/open source) kernel changes force changes in modules (kernel or external, though you will be only affected by changes that requires modifications in external modules).
Often changes are minor and you can unpack nvidia driver, edit whatever nvidia file, rebuild nvidia binary and install modified driver (ability to modify and recompile nvidia driver is in fact part of nvidia installer tool).

Offline

#9 2010-09-28 06:32:03

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [Solved] Nvidia after kernel update

ngoonee wrote:

The driver speaks to the kernel. When the kernel updates, the language used might have changed in various ways.

That is true - but only up to a certain level. The rule of thumb is: the API does not change when there's anything below a minor update (kernel numbering scheme being kernelversion.major.minor.patchlevel apparently, I thought it was major.minor.patchlevel.whateverthisis, but hey...). Additionally, if such an update (2.6.35.1 to 2.6.35.2) alters the module path (/lib/modules/$(uname -r)/), your package needs rebuilding regardless of an API change being present or not. If you don't bother with packaging, you should just be able to move the old module into the new module path (provided there is no API change). Since Arch only alters the module paths between minor updates (2.6.35 to 2.6.36) you shouldn't need to rebuild modules as long as they're only patchlevel updates.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#10 2010-09-28 15:55:10

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

Re: [Solved] Nvidia after kernel update

Additionally, if such an update (2.6.35.1 to 2.6.35.2) alters the module path (/lib/modules/$(uname -r)/), your package needs rebuilding regardless of an API change being present or not.

nope, no need to rebuild module, but need to copy/install that is why nvidia installer works so well and that is why DKMS is so convenient.

Offline

#11 2010-09-28 16:08:43

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [Solved] Nvidia after kernel update

You should read the line after it wink.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#12 2010-09-28 18:38:16

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

Re: [Solved] Nvidia after kernel update

hmm...
yes, I should. sorry. wink

Offline

#13 2010-09-28 21:52:42

gauthma
Member
Registered: 2010-02-16
Posts: 215
Website

Re: [Solved] Nvidia after kernel update

OK, thanks for all the feedback! It has been very helpful indeed, and it clears my doubts (well, at least for now tongue)

Marking as solved...

Offline

Board footer

Powered by FluxBB