need settle before modprobe $FB for uvesafb

Bug #437871 reported by Richard Hansen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
Medium
Scott James Remnant (Canonical)

Bug Description

Binary package hint: initramfs-tools

initramfs-tools version 0.92bubuntu50 removed mknods for /dev/mem and /dev/zero, but they are not created by the time the framebuffer script runs. uvesafb (actually v86d) requires these devices (see bug #285970).

To verify, I modified /usr/share/initramfs-tools/scripts/init-top/framebuffer as follows:

--- /usr/share/initramfs-tools/scripts/init-top/framebuffer~ 2009-09-22 21:47:10.000000000 -0400
+++ /usr/share/initramfs-tools/scripts/init-top/framebuffer 2009-09-27 18:04:57.936614976 -0400
@@ -81,7 +81,17 @@
 esac

 if [ -n "${FB}" ]; then
+ echo "checking if /dev/mem and /dev/zero are present" >&2
+ for i in /dev/mem /dev/zero; do
+ if [ -e $i ]; then
+ echo " $i is present" >&2
+ else
+ echo " $i MISSING" >&2
+ fi
+ done
+ echo "about to run modprobe -q ${FB} ${OPTS}" >&2
  MODPROBE_OPTIONS=-q modprobe ${FB} ${OPTS}
+ echo "done running modprobe -q ${FB} ${OPTS}" >&2
 else
  # If we have no graphics devices, wait for udev to settle;
  # if we still don't have a graphics device, load vesafb

The following is the output I saw after running sudo update-initramfs -u and rebooting:

checking if /dev/mem and /dev/zero are present
  /dev/mem MISSING
  /dev/zero MISSING
about to run modprobe -q uvesafb mode_option=1400x1050
[ 1.474357] uvesafb: Getting VBE info block failed (eax=0x4f00, err=-3)
[ 1.474408] uvesafb: vbe_init() failed with -22
done running modprobe -q uvesafb mode_option=1400x1050

Revision history for this message
Richard Hansen (rhansen) wrote :

I added back the mknod lines and uvesafb started working again.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

These are created by udev, which is a pre-req of that script - are you saying that they aren't already there?

Revision history for this message
Richard Hansen (rhansen) wrote :

Correct -- /dev/mem and /dev/zero are not there by the time modprobe is invoked. Is it possible that this is a race condition? I noticed "udevadm settle" is run at the end of the script -- think it might help to also run "udevadm settle" before running modprobe?

Revision history for this message
Richard Hansen (rhansen) wrote :

I tried adding "udevadm settle" before modprobe and that fixed it.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 437871] Re: (regression) uvesafb needs missing /dev/mem, /dev/zero

On Thu, 2009-10-01 at 03:50 +0000, a7x wrote:

> I tried adding "udevadm settle" before modprobe and that fixed it.
>
Aha! Yes, looking at the script that should fix it.

Thanks for the debugging!

Scott
--
Scott James Remnant
<email address hidden>

Changed in initramfs-tools (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Scott James Remnant (scott)
milestone: none → ubuntu-9.10
summary: - (regression) uvesafb needs missing /dev/mem, /dev/zero
+ need settle before modprobe $FB for uvesafb
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.92bubuntu51

---------------
initramfs-tools (0.92bubuntu51) karmic; urgency=low

  * scripts/init-top/framebuffer: wait for udev to settle before loading
    command-line specified framebuffer driver to ensure that any needed
    device nodes are available. LP: #437871.

 -- Scott James Remnant <email address hidden> Sat, 03 Oct 2009 07:55:35 +0100

Changed in initramfs-tools (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Steven Shiau (stevenshiau) wrote :

One thing I noticed related to initramfs-tools - 0.92bubuntu51 is that if I put
video=uvesafb:1400x1050
in the boot parameter,
in /usr/share/initramfs-tools/scripts/init-top/framebuffer, it runs:
modprobe -q uvesafb mode=1400x1050
instead of
modprobe -q uvesafb mode_option=1400x1050

i.e. it actually uses "mode=" instead of "mode_options".
The kernel module "uvesafb" from 2.6.31-11-generic in the Karmic actually uses the option "mode_option" insetad of "mode"
$ modinfo -F parm uvesafb |grep "video mode"
mode_option:Specify initial video mode as "<xres>x<yres>[-<bpp>][@<refresh>]"

Where am I wrong or is this a bug that the function parse_video_opts in /usr/share/initramfs-tools/scripts/init-top/framebuffer should be fixed?

Thanks.

Revision history for this message
Richard Hansen (rhansen) wrote :

It's possibly a bug, but not this one -- I'd recommend filing a new bug report. In the meantime, I think you can work around it by doing "video=uvesafb:mode_option=1400x1050".

Revision history for this message
Steven Shiau (stevenshiau) wrote :

Thanks! "video=uvesafb:mode_option=1400x1050". works great here.

Revision history for this message
Richard Hansen (rhansen) wrote :

Looks like I already filed bug #366343 about the mode_option issue a while back.

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

Other bug subscribers

Remote bug watches

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