Installation of -pae kernel happens after jockey -C, causing removal of built DKMS modules

Bug #759804 reported by Marc Deslauriers on 2011-04-13
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
jockey (Ubuntu)
High
Martin Pitt
Natty
High
Martin Pitt
ubiquity (Ubuntu)
High
Evan
Natty
High
Evan

Bug Description

After fresh installing today's natty ISO, jockey things the NVIDIA proprietary driver is installed and in use, when in fact nouveau is the one that is running. This persists even after a reboot.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: jockey-gtk 0.9.2-0ubuntu4
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic-pae 2.6.38.2
Uname: Linux 2.6.38-8-generic-pae i686
Architecture: i386
Date: Wed Apr 13 09:29:48 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta i386 (20110413)
MachineType: LENOVO 6459CTO
PackageArchitecture: all
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcEnviron:
 LANGUAGE=en_CA:en
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic-pae root=UUID=9b6362ec-d106-409a-aafd-4782660fe3fb ro quiet splash vt.handoff=7
SourcePackage: jockey
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 11/14/2008
dmi.bios.vendor: LENOVO
dmi.bios.version: 7LETC5WW (2.25 )
dmi.board.name: 6459CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr7LETC5WW(2.25):bd11/14/2008:svnLENOVO:pn6459CTO:pvrThinkPadT61:rvnLENOVO:rn6459CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 6459CTO
dmi.product.version: ThinkPad T61
dmi.sys.vendor: LENOVO

Marc Deslauriers (mdeslaur) wrote :
Marc Deslauriers (mdeslaur) wrote :
Marc Deslauriers (mdeslaur) wrote :
Marc Deslauriers (mdeslaur) wrote :
Marc Deslauriers (mdeslaur) wrote :

running "dkms status" doesn't return anything.

Marc Deslauriers (mdeslaur) wrote :

running dpkg-reconfigure nvidia-current manually gives me:
Error! There are no instances of module: nvidia-current 270.30 located in the DKMS tree.

Marc Deslauriers (mdeslaur) wrote :

After rebooting it would appear -nvidia is being used...but...jockey now says "This driver is activated but not currently in use". See screenshot.

Marc Deslauriers (mdeslaur) wrote :
Marc Deslauriers (mdeslaur) wrote :
Marc Deslauriers (mdeslaur) wrote :

I have totally reinstalled the laptop, and have hit the issue again.
Right after installation, and after the first subsequent reboot, there is no dkms log in /var/lib/dkms...(only a "dkms_dbversion" file).

Marc Deslauriers (mdeslaur) wrote :

Looks like we have two different issues here:

issue #1: modules built by dkms are not copied to the installed system.
issue #2: Jockey doesn't detect the driver as activated and in use in some cases

Evan (ev) wrote :

Odd, it basically does chroot /target jockey-text -C --no-dbus, so any module building should occur inside the chroot.

Marc Deslauriers (mdeslaur) wrote :

I can confirm this bug is caused by checking the "Install 3rd party" checkbox in the installer.

tags: added: iso-testing
Martin Pitt (pitti) wrote :
Download full text (4.7 KiB)

Relevant part of install syslog:

Apr 13 15:17:47 ubuntu ubiquity: Setting up nvidia-current (270.30-0ubuntu3) ...
Apr 13 15:17:47 ubuntu ubiquity: update-alternatives: using /usr/lib/nvidia-current/ld.so.conf to provide /etc/ld.so.conf.d/GL.conf (gl_conf) in auto mode.
Apr 13 15:17:47 ubuntu ubiquity: update-alternatives: warning: skip creation of /usr/lib32/vdpau/libvdpau_nvidia.so.1 because associated file /usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so.1 (of link group gl_conf) doesn't exist.
Apr 13 15:17:47 ubuntu ubiquity: update-alternatives: warning: skip creation of /usr/lib32/libvdpau_nvidia.so because associated file /usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so (of link group gl_conf) doesn't exist.
Apr 13 15:17:47 ubuntu ubiquity: update-initramfs: deferring update (trigger activated)
Apr 13 15:17:47 ubuntu ubiquity: Loading new nvidia-current-270.30 DKMS files...
Apr 13 15:17:47 ubuntu ubiquity: First Installation: checking all kernels...
Apr 13 15:17:47 ubuntu ubiquity: Building only for 2.6.38-8-generic
Apr 13 15:17:47 ubuntu ubiquity: Building for architecture i686
Apr 13 15:17:47 ubuntu ubiquity: Building initial module for 2.6.38-8-generic
Apr 13 15:18:06 ubuntu ubiquity: Done.
Apr 13 15:18:06 ubuntu ubiquity:
Apr 13 15:18:06 ubuntu ubiquity: nvidia-current.ko:
Apr 13 15:18:06 ubuntu ubiquity: Running module version sanity check.
Apr 13 15:18:06 ubuntu ubiquity: - Original module
Apr 13 15:18:06 ubuntu ubiquity: - No original module exists within this kernel
Apr 13 15:18:06 ubuntu ubiquity: - Installation
Apr 13 15:18:06 ubuntu ubiquity: - Installing to /lib/modules/2.6.38-8-generic/updates/dkms/
Apr 13 15:18:06 ubuntu ubiquity:
Apr 13 15:18:06 ubuntu ubiquity: depmod...
Apr 13 15:18:09 ubuntu ubiquity: .
Apr 13 15:18:15 ubuntu ubiquity: last message repeated 2 times
Apr 13 15:18:15 ubuntu ubiquity:
Apr 13 15:18:15 ubuntu ubiquity:
Apr 13 15:18:15 ubuntu ubiquity: DKMS: install Completed.

Looks fine until here. But later..

Apr 13 15:18:34 ubuntu ubiquity: Removing linux-generic ...
Apr 13 15:18:35 ubuntu ubiquity: Removing linux-headers-generic ...
Apr 13 15:18:36 ubuntu ubiquity: Removing linux-headers-2.6.38-8-generic ...
Apr 13 15:18:36 ubuntu ubiquity: Removing linux-image-generic ...
Apr 13 15:18:37 ubuntu ubiquity: Removing linux-image-2.6.38-8-generic ...
Apr 13 15:18:37 ubuntu ubiquity: WARN: Proceeding with removing running kernel image.
Apr 13 15:18:37 ubuntu ubiquity: Examining /etc/kernel/prerm.d.
Apr 13 15:18:37 ubuntu ubiquity: run-parts: executing /etc/kernel/prerm.d/dkms 2.6.38-8-generic /boot/vmlinuz-2.6.38-8-generic
Apr 13 15:18:37 ubuntu ubiquity: dkms: removing: nvidia-current 270.30 (2.6.38-8-generic) (i686)
Apr 13 15:18:37 ubuntu ubiquity:
Apr 13 15:18:37 ubuntu ubiquity: -------- Uninstall Beginning --------
Apr 13 15:18:37 ubuntu ubiquity: Module: nvidia-current
Apr 13 15:18:37 ubuntu ubiquity: Version: 270.30
Apr 13 15:18:37 ubuntu ubiquity: Kernel: 2.6.38-8-generic (i686)
Apr 13 15:18:37 ubuntu ubiquity: -------------------------------------
Apr 13 15:18:37 ubuntu ubiquity:
Apr 13 15:18:37 ubuntu ubiquity: Status: Before uninstall, this module version was ACTIVE on this k...

Read more...

Martin Pitt (pitti) wrote :

I fixed the jockey part (shows "in use" although it isn't) in bzr, will upload after beta-2.

Changed in jockey (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Low
status: New → Fix Committed
Martin Pitt (pitti) wrote :

I took the liberty of copying the installer syslog from Marc's machine.

summary: - after fresh install, jockey thinks nvidia binary driver is in use
+ Installation of -pae kernel happens after jockey -C, causing removal of
+ built DKMS modules
Changed in ubiquity (Ubuntu):
importance: Undecided → High
Martin Pitt (pitti) wrote :

Retitled for the main issue in this bug.

Evan (ev) wrote :

This should fix the bug by moving nvidia driver installation to just after the point whereby ubiquity removes unneeded kernels. Apply to /usr/share/ubiquity/plugininstall.py

Changed in ubiquity (Ubuntu):
assignee: nobody → Evan Dandrea (ev)
tags: added: patch
Evan (ev) wrote :

The above patch doesn't go far enough to address the issue, I'm afraid. I'm close to having this sorted, but it's currently stalled on what seems to be some bad debconf interaction.

Alberto Milone (albertomilone) wrote :

@Evan
DKMS builds the module using the headers in /lib/modules/ and the kernel module is installed there. Also, the driver chooses the current kernel (i.e. the one on the livecd).

If you tell me where DKMS should look for the kernel and install the module (i.e. the path to the kernel and to its headers of the installed system), I can add some code to make sure that things work correctly on the livecd.

Evan (ev) wrote :

The attached patch allows ubiquity to tell jockey what kernel version to use, rather than assuming the running kernel. It also disconnects from debconf before installing packages.

Martin, could you please review this? Feel free to implement it in a different way if it doesn't adequately conform to your coding style.

Thanks!

Evan (ev) wrote :

The following is an updated patch to ubiquity to move the nvidia installation to after the removal of unneeded kernels, divert update-initramfs, and use the aforementioned -k parameter to jockey. I'll merge this in once I have approval from pitti on the jockey change.

Martin Pitt (pitti) wrote :

Evan,

I'll change some details in the patch, but in general this looks fine. We can definitively agree on the -k <version> interface.

Thanks!

Evan (ev) on 2011-04-15
Changed in ubiquity (Ubuntu):
status: New → Fix Committed
Martin Pitt (pitti) on 2011-04-17
Changed in jockey (Ubuntu Natty):
importance: Low → High
status: Fix Committed → In Progress
Martin Pitt (pitti) on 2011-04-18
Changed in jockey (Ubuntu Natty):
milestone: none → ubuntu-11.04
Changed in ubiquity (Ubuntu Natty):
milestone: none → ubuntu-11.04
Martin Pitt (pitti) wrote :

I adapted Evan's patch a bit (separate commits, some code cleanup, split between trunk/ubuntu), and committed to the Ubuntu branch. I tested this with

  sudo jockey-text --no-dbus -k 2.6.38-8-server -e kmod:wl

(when running 2.6.38-8-generic).

This now correctly installs linux-headers-server (and linux-headers-2.6.38-8-server), so the jockey side of the patch works. But as there currently is no way to tell the bcmwl package "please build for that other kernel", just doing this command only builds for the current kernel:

$ dkms status
bcmwl, 5.100.82.38+bdcom, 2.6.38-8-generic, x86_64: installed

DKMS does not have an init script any more, so booting the -pae kernel after installation won't automatically build the module for the new flavour. This would now work if ubiquity would install the -pae kernel after calling jockey -C, or if it would trigger a rebuild of the dkms modules if it installs the kernel before jockey -C.

Perhaps this test is flawed because I don't actually have the -server kernel installed. DKMS might already be clever enough to build modules for all installed kernels.

Evan, did you test this end-to-end and are sure that this is sufficient now?

Thanks!

Changed in jockey (Ubuntu Natty):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package jockey - 0.9.2-0ubuntu5

---------------
jockey (0.9.2-0ubuntu5) natty; urgency=low

  [ Martin Pitt ]
  * data/handlers/nvidia.py: Fix broken condition in used(), which would be
    True already if the package was merely installed. (LP: #759804)
  * jockey/oslib.py, ignored_modules(): Drop linux-ubuntu-modules, gone long
    ago.
  * Cherry-pick r720 from trunk to support a new --kernel option on the
    backend and frontend with --no-dbus. This allows ubiquity to install a PAE
    kernel on the target system and tell jockey to install kernel headers for
    that one instead for the running one. Based on a patch from Evan Dandrea,
    thanks! (LP: #759804)
  * Cherry-pick r721 from trunk: OpenPrintingDriverDB: Use the actual package
    version as "version" attribute instead of the driver name. This was a bit
    of a thinko back then. Update test cases accordingly. (LP: #744751)

  [ Evan Dandrea ]
  * jockey/oslib.py: Disconnect from Debconf before installing packages.
    (LP: #759804)
 -- Martin Pitt <email address hidden> Tue, 19 Apr 2011 10:43:43 +0200

Changed in jockey (Ubuntu Natty):
status: Fix Committed → Fix Released
Evan (ev) wrote :

I've just checked and the code as it exists does in fact install the nvidia ko to /lib/modules/2.6.38-8-generic-pae/updates/dkms

Evan (ev) wrote :

As mentioned on IRC, I've also tested that the right kernel gets installed (PAE) and that the dpkg installation of nvidia-current completes successfully.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.6.6

---------------
ubiquity (2.6.6) natty; urgency=low

  [ Jonathan Riddell ]
  * bin/ubiquity-dm: use correct KDE wallpaper path

  [ Colin Watson ]
  * Don't copy keyboard-configuration questions to /target in OEM mode, and
    reset any values that come from the live filesystem build. oem-config
    will ask them later, and copying these confuses it (LP: #741304).
  * GTK frontend:
    - Avoid a crash if the automatic partitioning page is never displayed.

  [ Evan Dandrea ]
  * Remove the 'Bootloader device' line. See LP #726740.
  * Do not reset the bootloader choice unless it's absolutely necessary
    (LP: #756920). Thanks Stéphane Graber!
  * Move installation of the nvidia driver to after the removal of
    unneeded kernels. Divert update-initramfs for the duration and
    trigger it afterwards (LP: #759804).
  * Make the 'name already exists on the network' warning message not
    block the user from moving forward (LP: #760884).
  * Briefly shut down the debconf database to flush any changes before
    starting the parallel database (LP: #761094).
  * Fix removal of slideshow packages for non-GTK frontends
    (LP: #745607).
  * Set the locale again after the timezone page so that the slideshow
    can have country-specific translations (LP: #758658).
  * Automatic update of included source packages: base-installer
    1.116ubuntu2, choose-mirror 2.37ubuntu2, console-setup 1.57ubuntu19,
    flash-kernel 2.28ubuntu19, user-setup 1.28ubuntu15.
  * Update translations from Launchpad.

  [ Mario Limonciello ]
  * Show the oem-config slideshow in oem-config rather than the ubuntu one.
  * Uninstall the oem-config slideshow after install is done (LP: #759935).

  [ Julien Lavergne ]
  * Disable ubiquity panel for openbox session.

  [ Mackenzie Morgan ]
  * Make radio buttons use label wording for screen reader (LP: #749653)
 -- Evan Dandrea <email address hidden> Tue, 19 Apr 2011 11:45:53 +0100

Changed in ubiquity (Ubuntu Natty):
status: Fix Committed → Fix Released
To post a comment you must log in.