How to restore screen when plymouthd crash

fykcee1 at gmail.com fykcee1 at gmail.com
Mon Aug 1 18:17:06 PDT 2011


Hi,

Attachment is the fourth version of the patch, changes since V3:
 1. Don't force fb plug in shutdown mode.
 2. Add a missing close(fd) within on_crash().
 3. Remove tailing white space.

2011/7/18 fykcee1 at gmail.com <fykcee1 at gmail.com>
>
> Hi,
>
> Attachment is the third version of the patch, changes since V2:
>  1. Remove ply_boot_splash_reset.
>  2. Try to recover screen of state->default_tty (if open failed, then
> try /dev/tty1 and /dev/hvc0)
>  3. chvt to state->kernel_console_tty and adds WAITACTIVE ioctl after ACTIVATE.
>  4. on_crash is now the handler of SIGBUS, SIGTERM, SIGQUIT.
>  5. Not ignore SIGTERM in shutdown mode.
>  6. Adjust indent.
>
> Note for 4: SIGINT can't be handled here, since splash plugin will
> change the handler later.
>
> Note for 5: When reboot/poweroff/halt, systemd will sends SIGTERM and
> then SIGKILL to remaining processes, and then do the real
> reboot/poweroff/halt action. If the real action fails and plymouthd
> doesn't recover the screen, user may not know what's happening.
>
> 2011/7/15 Ray Strode <halfline at gmail.com>
> >
> > On Fri, Jul 15, 2011 at 12:33 AM, fykcee1 at gmail.com <fykcee1 at gmail.com> wrote:
> > > Thanks for the reply.
> > >
> > > Attachment is the second version of the patch, which will check for
> > > "/dev/" prefix for state->default_tty and state->kernel_console_tty.
> > You can't call snprintf from a signal handler.
> Hmm, why?
>
> >
> >  I also don't really
> > liike calling object methods from a signal handler either (i mean
> > ply_boot_splash_reset).  I'd say crashes are exceptional situations,
> > which means we can't really trust the state our objects are in,
> > and there is always the ambiguity of which methods are "signal safe".
> >
> > I agree that assuming /dev/tty1 is wrong though.  Maybe memcpy the tty
> > into a static buffer ?
> >
> > If you do change vts, I think you should call the WAITACTIVE ioctl
> > after ACTIVATE.
> Sorry, I'm not  familiar with terminal programming, could I ask why we
> need a WAITACTIVE ioctl follows ACTIVATE?
>
> BTW, what's the difference between terminal and console?
>
> Thanks.
>
>
>
> --
> Regards,
> - cee1



--
Regards,
- cee1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plymouthd-improve-screen-recover-when-crash-V4.patch
Type: text/x-patch
Size: 7026 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/plymouth/attachments/20110802/1da54450/attachment.bin>


More information about the plymouth mailing list