* swsusp console change/userspace hang
@ 2005-08-29 0:26 Matthew Garrett
2005-08-29 0:50 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Garrett @ 2005-08-29 0:26 UTC (permalink / raw)
To: pavel; +Cc: linux-kernel
Hi!
I'm currently working on an entirely userspace bootsplash program. It
works quite happily, except in the case of resuming from hibernation.
The splash program is launched at the start of initramfs, and at the
end of initramfs (after the disk modules have been loaded) we attempt to
trigger resume from userspace.
The code registers a signal that's fired on VT change. If a console
change is requested when it's currently drawing, it disables drawing and
schedules an alarm to fire 0.1 seconds later in order to avoid switching
the console when part-way through a framebuffer operation.
The problem seems to be that swsusp tries to change the console and then
immediately freezes userspace. For reasons I don't entirely understand,
this freezes the machine. If I remove the pm_prepare_console call from
pm_prepare_processes, resume functions correctly.
For now I'll probably just work around this by removing the console
change from our kernels (we can do that in userspace scripting instead),
but this still seems to be a less than ideal situation - I'm guessing
that the same would happen if we were displaying the splash on suspend.
Any ideas what might be causing this, and how to rectify it?
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: swsusp console change/userspace hang
2005-08-29 0:26 swsusp console change/userspace hang Matthew Garrett
@ 2005-08-29 0:50 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2005-08-29 0:50 UTC (permalink / raw)
To: Matthew Garrett; +Cc: pavel, linux-kernel
On Mon, 2005-08-29 at 01:26 +0100, Matthew Garrett wrote:
> Hi!
>
> I'm currently working on an entirely userspace bootsplash program. It
> works quite happily, except in the case of resuming from hibernation.
> The splash program is launched at the start of initramfs, and at the
> end of initramfs (after the disk modules have been loaded) we attempt to
> trigger resume from userspace.
>
> The code registers a signal that's fired on VT change. If a console
> change is requested when it's currently drawing, it disables drawing and
> schedules an alarm to fire 0.1 seconds later in order to avoid switching
> the console when part-way through a framebuffer operation.
>
> The problem seems to be that swsusp tries to change the console and then
> immediately freezes userspace. For reasons I don't entirely understand,
> this freezes the machine. If I remove the pm_prepare_console call from
> pm_prepare_processes, resume functions correctly.
Hrm.. it uses pm_prepare_console(), which should wait for the console to
become active... However, it calls vt_waitactive without dealing with
-EINTR. You might be getting a signal or something, can you check what's
going on inside pm_prepare_console ?
> For now I'll probably just work around this by removing the console
> change from our kernels (we can do that in userspace scripting instead),
> but this still seems to be a less than ideal situation - I'm guessing
> that the same would happen if we were displaying the splash on suspend.
> Any ideas what might be causing this, and how to rectify it?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-08-29 0:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-29 0:26 swsusp console change/userspace hang Matthew Garrett
2005-08-29 0:50 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®