All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/6] Add GTK UI to enable basic accessibility
Date: Sat, 25 Feb 2012 22:15:33 +0100	[thread overview]
Message-ID: <4F494F75.7080802@weilnetz.de> (raw)
In-Reply-To: <4F494064.4070501@codemonkey.ws>

[-- Attachment #1: Type: text/plain, Size: 5409 bytes --]

Am 25.02.2012 21:11, schrieb Anthony Liguori:
> On 02/25/2012 11:02 AM, Stefan Weil wrote:
>> Am 20.02.2012 00:44, schrieb Anthony Liguori:
>>> Hi,
>>>
>>> I realize UIs are the third rail of QEMU development, but over the 
>>> years I've
>>> gotten a lot of feedback from users about our UI. I think everyone 
>>> struggles
>>> with the SDL interface and its lack of discoverability but it's 
>>> worse than I
>>> think most people realize for users that rely on accessibility tools.
>>>
>>> The two pieces of feedback I've gotten the most re: accessibility 
>>> are the lack
>>> of QEMU's enablement for screen readers and the lack of configurable
>>> accelerators.
>>>
>>> Since we render our own terminal using a fixed sized font, we don't 
>>> respect
>>> system font settings which means we ignore if the user has 
>>> configured large
>>> print.
>>>
>>> We also don't integrate at all with screen readers which means that 
>>> for blind
>>> users, the virtual consoles may as well not even exist.
>>>
>>> We also don't allow any type of configuration of accelerators. For 
>>> users with
>>> limited dexterity (this is actually more common than you would 
>>> think), they may
>>> use an input device that only inputs one key at a time. Holding down 
>>> two keys
>>> at once is not possible for these users.
>>>
>>> These are solved problems though and while we could reinvent all of 
>>> this
>>> ourselves with SDL, we would be crazy if we did. Modern toolkits, 
>>> like GTK,
>>> solve these problems.
>>>
>>> By using GTK, we can leverage VteTerminal for screen reader 
>>> integration and font
>>> configuration. We can also use GTK's accelerator support to make 
>>> accelerators
>>> configurable (Gnome provides a global accelerator configuration 
>>> interface).
>>>
>>> I'm not attempting to make a pretty desktop virtualization UI. Maybe 
>>> we'll go
>>> there eventually but that's not what this series is about.
>>>
>>> This is just attempting to use a richer toolkit such that we can 
>>> enable basic
>>> accessibility support. As a consequence, the UI is much more usable 
>>> even for a
>>> user without accessibility requirements so it's a win-win.
>>
>> This first version of the new GTK UI still shares some problems with
>> the SDL UI and adds new ones:
>>
>> It's quite common for the VGA code to set a very small size (e.g. 1 x 
>> 1 pixel)
>> during boot. MIPS Malta does (if no VGA module like cirrusfb is loaded,
>> it will never set a different size), and even the 386 / x86_64 emulation
>> has a (very short) time were the display size is unusually small.
>
> It doesn't.  It cycles through modes 640x480, 720x400, then VGA 
> modes.  It never resizes to 1x1.
>
> But..  GTK should handle this better.  Even if the drawing area sets 
> the size to 1x1, the window should maintain a size at least large 
> enough to render the menu bar properly. ss/ssssssssssssss/

Just run QEMU on a sufficiently slow host, for example QEMU in QEMU,
or slow down the execution of QEMU by other means, then you will see
which window sizes are then selected. Maybe you also need -singlestep.
You _will_ get a very small window!

I just got it using this call on a netbook running Ubuntu:

qemu-system-i386 -L pc-bios -singlestep -d in_asm,out_asm

Don't use KVM, of course - we want to slow down QEMU!
Adding strace is also a good way to reduce execution speed.

Cheers,

Stefan Weil

PS. qemu-system-i386 crashed like qemu-system-mipsel before
when it tried to switch from the small window to the normal size:

The program '<unknown>' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
   (Details: serial 351 error_code 11 request_code 53 minor_code 0)
   (Note to programmers: normally, X errors are reported asynchronously;
    that is, you will receive the error a while after causing it.
    To debug your program, run it with the --sync command line
    option to change this behavior. You can then get a meaningful
    backtrace from your debugger if you break on the gdk_x_error() 
function.)

Debugging X errors is a bit difficult, but I finally got this backtrace:

Breakpoint 3, 0x00438196 in _XError () from /usr/lib/libX11.so.6
(gdb) i s
#0  0x00438196 in _XError () from /usr/lib/libX11.so.6
#1  0x0043e92f in ?? () from /usr/lib/libX11.so.6
#2  0x0043f356 in _XEventsQueued () from /usr/lib/libX11.so.6
#3  0x0043f3e9 in _XFlush () from /usr/lib/libX11.so.6
#4  0x00417101 in XFlush () from /usr/lib/libX11.so.6
#5  0x00936cb4 in gdk_display_flush () from /usr/lib/libgdk-x11-2.0.so.0
#6  0x00928f7a in gdk_window_process_all_updates () from 
/usr/lib/libgdk-x11-2.0.so.0
#7  0x005c676f in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#8  0x00905358 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#9  0x00176661 in ?? () from /lib/libglib-2.0.so.0
#10 0x001785e5 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#11 0x8013d4a0 in glib_select_poll (rfds=0xbfffef04, wfds=0xbfffee84, 
xfds=0xbfffee04,
     err=false) at /home/stefan/src/qemu/qemu.org/qemu/main-loop.c:287
#12 0x8013d696 in main_loop_wait (nonblocking=0)
     at /home/stefan/src/qemu/qemu.org/qemu/main-loop.c:463
#13 0x80131b40 in main_loop () at 
/home/stefan/src/qemu/qemu.org/qemu/vl.c:1482
#14 0x80138985 in main (argc=6, argv=0xbffff344, envp=0xbffff360)
     at /home/stefan/src/qemu/qemu.org/qemu/vl.c:3541


[-- Attachment #2: Type: text/html, Size: 8198 bytes --]

  reply	other threads:[~2012-02-25 21:15 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-19 23:44 [Qemu-devel] [PATCH 0/6] Add GTK UI to enable basic accessibility Anthony Liguori
2012-02-19 23:44 ` [Qemu-devel] [PATCH 1/6] console: allow VCs to be overridden by UI Anthony Liguori
2012-02-20  9:17   ` Gerd Hoffmann
2012-02-20 13:45     ` Anthony Liguori
2012-02-20 13:59       ` Gerd Hoffmann
2012-02-20 14:11         ` Anthony Liguori
2012-02-20 14:27           ` Gerd Hoffmann
2012-02-20 15:10             ` Anthony Liguori
2012-02-19 23:45 ` [Qemu-devel] [PATCH 2/6] ui: add basic GTK gui Anthony Liguori
2012-02-20 20:45   ` Stefan Weil
2012-02-21  0:20     ` Anthony Liguori
2012-02-19 23:45 ` [Qemu-devel] [PATCH 3/6] gtk: add virtual console support Anthony Liguori
2012-02-20 21:13   ` Stefan Weil
2012-02-25 16:21   ` Stefan Weil
2012-02-25 19:49     ` Anthony Liguori
2012-02-25 20:22       ` Stefan Weil
2012-02-25 21:18         ` Anthony Liguori
2012-02-19 23:45 ` [Qemu-devel] [PATCH 4/6] gtk: add support for input grabbing Anthony Liguori
2012-02-20  0:09   ` Anthony Liguori
2012-02-19 23:45 ` [Qemu-devel] [PATCH 5/6] gtk: add support for screen scaling and full screen Anthony Liguori
2012-02-20  7:41   ` Paolo Bonzini
2012-02-20 13:45     ` Anthony Liguori
2012-02-25 15:49   ` Stefan Weil
2012-02-19 23:45 ` [Qemu-devel] [PATCH 6/6] gtk: make default UI Anthony Liguori
2012-02-20  0:15   ` Roy Tam
2012-02-20  1:10     ` Anthony Liguori
2012-02-20  1:50       ` Roy Tam
2012-02-20  2:22         ` Anthony Liguori
2012-02-20  2:24       ` Brad Smith
2012-02-20  2:44         ` Anthony Liguori
2012-02-20  2:50           ` Roy Tam
2012-02-20  2:52           ` Brad Smith
2012-02-20  3:04             ` Anthony Liguori
2012-02-20 14:06               ` Stefano Stabellini
2012-02-20 14:07                 ` Anthony Liguori
2012-02-20 14:44                   ` Stefano Stabellini
2012-02-20 14:46                     ` Roy Tam
2012-02-19 23:59 ` [Qemu-devel] [PATCH 0/6] Add GTK UI to enable basic accessibility Anthony Liguori
2012-02-20 12:17 ` Kevin Wolf
2012-02-20 12:47   ` Kevin Wolf
2012-02-20 14:08     ` Anthony Liguori
2012-02-20 14:04   ` Anthony Liguori
2012-02-20 14:33     ` Kevin Wolf
2012-02-25 17:02 ` Stefan Weil
2012-02-25 20:11   ` Anthony Liguori
2012-02-25 21:15     ` Stefan Weil [this message]
2012-02-25 21:47       ` [Qemu-devel] Very small VGA window sizes (was: Re: [PATCH 0/6] Add GTK UI to enable basic accessibility) Stefan Weil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F494F75.7080802@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.