* [Qemu-devel] Patch for SDL framebuffer console problem
@ 2007-04-24 6:23 Kitambi Leo
2007-05-02 20:12 ` Rob Landley
0 siblings, 1 reply; 4+ messages in thread
From: Kitambi Leo @ 2007-04-24 6:23 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1.1: Type: text/plain, Size: 623 bytes --]
I've been using qemu using the Linux framebuffer console, on a machine
that's a bit too slow to support X. There have been more than a few snags,
but perhaps the most irritating one was that if qemu crashed (and received a
SIGSEGV), it would leave the console in an unusable state. This would
require me to log into the machine via ssh and reboot it remotely. I'm
submitting a patch that installs a signal handler to call sdl_cleanup(),
then exit. This has alleviated my problem with the system being left in an
unusable state, however I suspect that the segfault problem lies somewhere
in SDL itself, and not in qemu.
[-- Attachment #1.2: Type: text/html, Size: 668 bytes --]
[-- Attachment #2: sdl.c.diff --]
[-- Type: application/octet-stream, Size: 883 bytes --]
? sdl.c.diff
Index: sdl.c
===================================================================
RCS file: /sources/qemu/qemu/sdl.c,v
retrieving revision 1.37
diff -u -r1.37 sdl.c
--- sdl.c 2 Apr 2007 01:10:46 -0000 1.37
+++ sdl.c 24 Apr 2007 06:15:19 -0000
@@ -563,10 +563,17 @@
SDL_Quit();
}
+static void segv_exit(void)
+{
+ sdl_cleanup();
+ exit(255);
+}
+
void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
{
int flags;
uint8_t data = 0;
+ struct sigaction act;
#if defined(__APPLE__)
/* always use generic keymaps */
@@ -582,6 +589,11 @@
if (no_frame)
gui_noframe = 1;
+ act.sa_flags = 0;
+ act.sa_handler = segv_exit;
+
+ sigaction(SIGSEGV, &act, NULL);
+
flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
if (SDL_Init (flags)) {
fprintf(stderr, "Could not initialize SDL - exiting\n");
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] Patch for SDL framebuffer console problem
2007-04-24 6:23 [Qemu-devel] Patch for SDL framebuffer console problem Kitambi Leo
@ 2007-05-02 20:12 ` Rob Landley
2007-05-03 22:11 ` kitambi
0 siblings, 1 reply; 4+ messages in thread
From: Rob Landley @ 2007-05-02 20:12 UTC (permalink / raw)
To: qemu-devel; +Cc: Kitambi Leo
On Tuesday 24 April 2007 2:23 am, Kitambi Leo wrote:
> I've been using qemu using the Linux framebuffer console, on a machine
> that's a bit too slow to support X. There have been more than a few snags,
> but perhaps the most irritating one was that if qemu crashed (and received a
> SIGSEGV), it would leave the console in an unusable state. This would
> require me to log into the machine via ssh and reboot it remotely.
Type "reset" and hit enter when this happens.
Rob
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] Patch for SDL framebuffer console problem
2007-05-02 20:12 ` Rob Landley
@ 2007-05-03 22:11 ` kitambi
2007-05-03 22:15 ` kitambi
0 siblings, 1 reply; 4+ messages in thread
From: kitambi @ 2007-05-03 22:11 UTC (permalink / raw)
To: Rob Landley; +Cc: qemu-devel
I did, of course, try this first. The keyboard doesn't work after
qemu crashes. The ways I tried to fix this were:
1. "reset" (didn't work)
2. log in remotely and reboot (always works)
3. log in remotely and try "vga_reset", and "fbset 800x600-56" (the normal mode
On 5/2/07, Rob Landley <rob@landley.net> wrote:
> On Tuesday 24 April 2007 2:23 am, Kitambi Leo wrote:
> > I've been using qemu using the Linux framebuffer console, on a machine
> > that's a bit too slow to support X. There have been more than a few
> snags,
> > but perhaps the most irritating one was that if qemu crashed (and received
> a
> > SIGSEGV), it would leave the console in an unusable state. This would
> > require me to log into the machine via ssh and reboot it remotely.
>
> Type "reset" and hit enter when this happens.
>
> Rob
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] Patch for SDL framebuffer console problem
2007-05-03 22:11 ` kitambi
@ 2007-05-03 22:15 ` kitambi
0 siblings, 0 replies; 4+ messages in thread
From: kitambi @ 2007-05-03 22:15 UTC (permalink / raw)
To: Rob Landley; +Cc: qemu-devel
I tried various combinations of fixing this problem before I wrote a
patch. The keyboard is somehow trashed and/or disabled when qemu
crashes in this manner. The methods I tried to fix it were:
1. "reset" - never works
2. log in remotely and reboot - always works
3. log in remotely and try various combinations of "vga_reset" and
"fbset 800x600-56" - always works after I figured out the right order
to run the commands in.
In the end, I couldn't find any acceptable solutions without a patch,
since this is a laptop and I don't always have it connected to a
network so I can bail myself out. I apologize for the duplicate
message too, I accidently sent the last email without finishing it.
On 5/3/07, kitambi@gmail.com <kitambi@gmail.com> wrote:
> I did, of course, try this first. The keyboard doesn't work after
> qemu crashes. The ways I tried to fix this were:
> 1. "reset" (didn't work)
> 2. log in remotely and reboot (always works)
> 3. log in remotely and try "vga_reset", and "fbset 800x600-56" (the normal
> mode
>
> On 5/2/07, Rob Landley <rob@landley.net> wrote:
> > On Tuesday 24 April 2007 2:23 am, Kitambi Leo wrote:
> > > I've been using qemu using the Linux framebuffer console, on a machine
> > > that's a bit too slow to support X. There have been more than a few
> > snags,
> > > but perhaps the most irritating one was that if qemu crashed (and
> received
> > a
> > > SIGSEGV), it would leave the console in an unusable state. This would
> > > require me to log into the machine via ssh and reboot it remotely.
> >
> > Type "reset" and hit enter when this happens.
> >
> > Rob
> >
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-05-03 22:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-24 6:23 [Qemu-devel] Patch for SDL framebuffer console problem Kitambi Leo
2007-05-02 20:12 ` Rob Landley
2007-05-03 22:11 ` kitambi
2007-05-03 22:15 ` kitambi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).