Bug#350510: loads ohci-hcd; breaks resume from software suspend
On Sun, 29 Jan 2006, Joey Hess wrote:
> On my laptop, a Fujutsu P-2110 lifebook, if I use softwre suspend
> (version 1; to disk), when resuming the initramfs loads ohci_hcd before
> starting the resume process.
yes your root could be on an usb disc,
that reminds to fix the usb/scsi timing issues.
> When the hibernate program then tries to
> load ohci_hcd (which does not show as loaded in lsmod anymore due to the
> software suspend resume having happened), it fails to load like this:
i don't know hibernate, whatfor is it needed?
does suspend to disk work without it by
# echo disk > /sys/power/state
please post the output of cat /etc/modules
> ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
> ACPI: PCI Interrupt 0000:00:02.0[A] -> Link [LNKU] -> GSI 11 (level, low) -> IRQ 11
> ohci_hcd 0000:00:02.0: OHCI Host Controller
> ohci_hcd 0000:00:02.0: USB HC takeover failed! (BIOS/SMM bug)
> ohci_hcd 0000:00:02.0: can't reset
> ACPI: PCI interrupt for device 0000:00:02.0 disabled
> ohci_hcd 0000:00:02.0: init 0000:00:02.0 fail, -16
> ohci_hcd: probe of 0000:00:02.0 failed with error -16
>
> And usb stops working.
irc correctly that was an bios bug that affected hp notebooks too,
what is your bios revision?
also for documentation please post complete dmesg
> I discovered a simple workaround for this; I modified hook-functions to not
> include the ohci_hcd module in my initramfs, so it is not loaded before the
> reume. Then the module loads ok. So I suppose that the kernel is getting
> confused with this module being loaded essentially twice in a row w/o
> being unloaded.
> At a minimum, there should be some way to drop the usb modules from the
> initramfs, if they're not needed to mount the root filesystem, so I don't
> need to edit files in /usr to work around this problem.
>
> A slightly better fix is to modify local-premount/suspend to
> rmmod all unused kernel modules before resuming the system. Here's
> something I came up with that works for me:
>
> for module in $(cat /proc/modules |awk '{ print $1}'); do
> rmmod $module 2>/dev/null || true
> done
> echo $major_minor >/sys/power/resume
uuh
> [Even more optimal would be for the initramfs to avoid loading any kernel
> modules when doing a resume, since none of the modules really need to be
> loaded and loading unnecessary modules leads to unnecessry delay during
> resume.
sure but we don't knwo that we are doing a resume early on.
> For example, on my latop, loading the ethernet module takes 3
> seconds and this happens unneccessarily before every resume.
hmm the ubuntu udev hook has such more finegrained loading,
they use udevplug, haven't seen it in debian yet.
> Of course,
> this is difficult given the current code since it relys on udev to make
> the devide node that is then examined to get the major and minor numbers
> to use when resuming.]
--
maks
Reply to: