You are not logged in.

#1 2013-10-19 08:17:45

sheomualjy
Member
Registered: 2011-12-23
Posts: 37

linux upgrading before linux-headers, cannot recompile nvidia modules

Hi,

I have set up my nvidia proprietary graphics driver to have its kernel modules rebuilt each time the kernel is upgraded, using the nvidia-hook package from the AUR. This means that when I do a system upgrade via pacman the kernel modules are detected and rebuilt when the "linux" package is being upgraded. However, I have hit a slight problem (more of an annoyance than anything).

The "linux-headers" package corresponding to the current "linux" is needed to rebuild the modules. However, pacman upgrades the "linux" package before the "linux-headers" package, meaning that at the time of rebuilding the modules for the nvidia driver, the "linux-headers" package is older (hasn't been upgraded yet) and so the nvidia modules cannot be rebuilt.

Here is a section of the terminal output when running "pacman -Syu", where you can see an error when running the build hook [nvidia], and then the "linux-headers" package upgraded after the "linux" package.

(30/43) upgrading linux                                                                                                                       [#######################################################################################] 100%
>>> Updating module dependencies. Please wait ...
>>> Generating initial ramdisk, using mkinitcpio.  Please wait...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 3.11.5-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [nvidia]
Building nvidia modules for 3.11.5-1-ARCH kernel...
Error! echo
Your kernel headers for kernel 3.11.5-1-ARCH cannot be found at
/usr/lib/modules/3.11.5-1-ARCH/build or /usr/lib/modules/3.11.5-1-ARCH/source.
Ok.
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 3.11.5-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [nvidia]
Building nvidia modules for 3.11.5-1-ARCH kernel...
Error! echo
Your kernel headers for kernel 3.11.5-1-ARCH cannot be found at
/usr/lib/modules/3.11.5-1-ARCH/build or /usr/lib/modules/3.11.5-1-ARCH/source.
Ok.
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: smsmdtv
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful
(31/43) upgrading linux-headers

I currently work around this issue by manually doing a reinstall of the "linux" package, which builds the nvidia modules successfully (because the linux-headers package can be found). Is there a way to force "linux-headers" to be upgraded before "linux"?

Thanks,
James

Offline

#2 2013-10-19 13:49:51

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: linux upgrading before linux-headers, cannot recompile nvidia modules

No great solutions exist yet. See also this thread.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB