Use of /sys/class/tty/console/active breaks OLPC splash

Ray Strode halfline at gmail.com
Mon Apr 9 11:41:45 PDT 2012


Hi,

On Mon, Apr 9, 2012 at 12:40 PM, Daniel Drake <dsd at laptop.org> wrote:
> Hi,
>
> Due to recent fixes in git and also packaged in Fedora, plymouth is
> now reading from /sys/class/tty/console/active instead of using the
> kernel command line.
> This has broken splash for OLPC.
>
> On OLPC, this file has contents: ttyS0 tty0
That's why.  We force "details" if we think there's a serial console.

> If I'm reading add_consoles_from_file() correctly, if
> /sys/class/tty/console/active has any contents at all, the graphical
> splash will be disabled due to the following line:
>      state->should_force_details = true;
Yea there's a bug there. We used to say "if there's any console= lines
on kernel command line force details".
When I copied that code over to read /sys/class/tty/console/active I
didn't update the logic to account for
/sys/class/tty/console/active always being available.

> Also, there is a bug in the loop here:
>
>      console_length = strlen (console);
>      ...
>      remaining_command_line += console_length;
>
>
> As strlen doesn't include the null-byte, remaining_command_line is not
> fast-forwarded enough, meaning that the "tty0" console above is never
> read.
Interesting. It's more like we aren't skipping over the spaces between
consoles.  But this whole fucntion suffers from being copy-and-pasted
from the kernel command line reading function and not being properly
fixed up afterward.

I've pushed a few fixes, but...

> However things are still not right - no graphical splash appears.
> The fact that 2 text displays have been registered means that when we get here:
>
>  if (should_add_displays && ply_list_get_length (state->text_displays) == 0)
>    add_default_displays_and_keyboard (state);
>
> since we have 2  text_displays we dont bother calling
> add_default_displays_and_keyboard, which means that we never add any
> pixel displays --> no splash.
> Bit lost in the logic here; how is this supposed to work?
That's a problem. You basically want this bug fixed:

https://bugs.freedesktop.org/show_bug.cgi?id=22239

Which you filed :-)  Comment 2:

> I guess what we need to do at this point is detect the kind of console that's
> specified in the console argument.  If it's a normal tty then use a normal
> splash and if it's a serial device use a detailed splash.
>
> Unfortuantely right now we can only have "details" or a graphical splash loaded
> at any given time, not both.
>
> We'll need to restructure the code to support having both loaded at the same
> time.

is the part we don't support and you need.

--Ray


More information about the plymouth mailing list