fan and thermal modules loaded in wrong order

Bug #9063 reported by Scott James Remnant (Canonical) on 2004-10-13
Affects Status Importance Assigned to Milestone
initrd-tools (Ubuntu)
Daniel Stone

Bug Description

mkinitrd ensures that the fan and thermal modules are loaded early on in the
boot process so that ACPI laptops don't overheat during the boot process and
die. The code that does this is:

    if [ -d "$MODULEDIR/kernel/drivers/acpi" ]; then
        echo 'thermal 2> /dev/null'
        echo 'fan 2> /dev/null'

Which causes two modprobe lines to be added to the "loadmodules" file in the
generated initrd.

However these are in the wrong order; on HP Compaq laptops the "fan" module has
to be loaded before the "thermal" module. Basically it looks like the thermal
module only controls the fans that are available at the time it is loaded, and
until the fan module is loaded none are available.

There's probably a kernel bug here as well, the thermal module should take
ownership of any fans that appear after it is loaded, but we can fix the
symptoms now and file a bug on the kernel later.

Swap those two lines around so fan is loaded first. We'll then need to
regenerate a linux-image package with the new initrd and new installed packages
(if they use this, Colin?)

I think this'll then allow warty to run on HP Compaqs.

(added blocks to the two bugs I've seen that I think are caused by this)

Colin Watson (cjwatson) wrote :

If your question to me is referring to the installer, rootskel has its own
script to load fan and thermal, and it already gets them the right way round; so
no installer change should be necessary.

You could try booting the installer on one of these systems to make sure.

I did, and the fans worked every time -- that's why I asked you on IRC what
kernel it was using because once the reboot happened the same kernel wasn't
working. And thus tracked it down to the order of those two module load lines,
which was the only thing different.

I was more thinking how the installer images choose which kernel they're going
to install? But I guess if the package name doesn't change, they're ok?

Colin Watson (cjwatson) wrote :

Right, exactly. In fact, nowadays we just install the "linux-386" etc.
metapackages and leave it up to dependencies.

Matt Zimmerman (mdz) wrote :

Does booting with acpi=off work around this issue?

Daniel Stone (daniels) wrote :

I'm working on this one -- my laptop is busy compiling new kernel packages so I
can upload for all you dudes to test.

Daniel Stone (daniels) wrote :

Does it work if, when in the installer, you:
chroot /target /bin/sh
cd /tmp
dpkg -i initrd-tools_0.1.70ubuntu10_all.deb
apt-get install --reinstall linux-image-

That should give you an initrd that loads the fan module before thermal.

Dude, booting with acpi=off means I'll get *no* power management whatsoever;
it's a modern laptop, it doesn't do that "APM" thing :o)

(Also if I boot with pci=noacpi then every single device shares one IRQ and
things just aren't happy)

Nope, your initrd script still loads the thermal driver before the fan driver;
what did you change? The lines you need to change were the ones I gave in the
first comment to this bug.

Daniel Stone (daniels) wrote :

Yes, I've uploaded a new version now, which actually fixes the issue. UNIX's
case-sensitivity extends to vim, where p vs P is significant when you're
attempting to reverse the order of two lines. :)

New version works, upload it dude

Daniel Stone (daniels) wrote :

I'd really like some more testing first.

Daniel Stone (daniels) wrote :

Fixed in 0.1.70ubuntu10.

Someone dropped this change :-(

Matt Zimmerman (mdz) wrote :

There isn't any 0.1.70ubuntu10 in the changelog at all. It's not there in either, nor is it
in Warty. I don't think it was ever accepted into the archive, if it was uploaded.

Daniel Stone (daniels) wrote :

initrd-tools (0.1.74ubuntu3) hoary; urgency=low

  * Swap load order of fan and thermal modules to keep crackful machines
    happy (closes: Ubuntu#2341).

 -- Daniel Stone <email address hidden> Wed, 10 Nov 2004 09:58:05 +0100

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.