qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: lagarcia@br.ibm.com, Lei Li <lilei@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Support for VNC LED state extension proposal
Date: Mon, 15 Apr 2013 11:23:02 -0500	[thread overview]
Message-ID: <87vc7nlq55.fsf@codemonkey.ws> (raw)
In-Reply-To: <516C1F06.10909@redhat.com>

Gerd Hoffmann <kraxel@redhat.com> writes:

> On 04/15/13 16:41, Anthony Liguori wrote:
>> Gerd Hoffmann <kraxel@redhat.com> writes:
>> 
>>>   Hi,
>>>
>>>> When access a guest by console through VNC, there might be
>>>> mismatch between the lock keys notification LED on the computer
>>>> running the VNC client session and the current status of the lock
>>>> keys on the guest machine. This happens because the VNC protocol
>>>> does not have any support to deal with setting led state.
>>>
>>> What is the exact issue you are trying to fix here?
>>>
>>> The vnc server code in qemu already tracks the keyboard led state and
>>> will insert synthetic key events if needed to make sure vnc client and
>>> guest machine stay in sync.
>> 
>> If the guest changes LED state, we want to the client to update the
>> physical keyboard LED state.
>
> Guests usually change the LED state in response to a keyboard event, in
> which case the physical keyboard LEDs already have the correct state.

Ack.

> There are exceptions of course.  Guest linux kernel panic-ing, then
> blinking capslock.  Multiple vnc clients connected at the same time.

Ack.

>> Think thin client without an X server.
>
> Should be even less an issue there.
>
> With X & multiple windows guest+host capslock/numlock state go out of
> sync because of sequences like move-kbd-focus-away-from-vncclient-window
> + press-{caps,num}lock + move-focus-back (and thats why we have the
> logic to insert synthetic key events to resync in the first place).
>
> What is your vnc client?  Does it support VNC_ENCODING_EXT_KEY_EVENT?

It's uses gvnc as a protocol library and renders via fbdev.  It reads
keyboard events by putting /dev/tty into mediumraw mode and uses ext key
events exclusively.  It has no knowledge of the guest keymap.

It is possible to attempt to keep the LED state in sync by tracking the
lock key state in the client.  However, there are drawbacks to this.

Since the client isn't aware of the guest keymap, it technically doesn't
know which keys are the lock keys.  Admittedly, this is a solvable
problem but the solution is certainly not elegant.

There's also the problem with guest initiated LED changes that don't
correspond to lock key presses.  Admittedly not a huge problem but still
there nonetheless.

I believe VMware already has a VNC extension for passing LED state
changes and I think having an open extension for this is a Good Thing.
It's a pretty obvious missing piece in the VNC protocol.

Regards,

Anthony Liguori

>
> cheers,
>   Gerd

  reply	other threads:[~2013-04-15 16:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08 13:07 [Qemu-devel] Support for VNC LED state extension proposal Lei Li
2013-04-15 12:40 ` Gerd Hoffmann
2013-04-15 14:41   ` Anthony Liguori
2013-04-15 15:38     ` Gerd Hoffmann
2013-04-15 16:23       ` Anthony Liguori [this message]
2013-04-16  6:45         ` Gerd Hoffmann
2013-04-22 19:32           ` Anthony Liguori

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=87vc7nlq55.fsf@codemonkey.ws \
    --to=aliguori@us.ibm.com \
    --cc=kraxel@redhat.com \
    --cc=lagarcia@br.ibm.com \
    --cc=lilei@linux.vnet.ibm.com \
    --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 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).