All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vnc: Set default kbd delay to 10ms
@ 2017-07-05  5:59 Alexander Graf
  2017-07-05  8:42 ` Markus Armbruster
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Graf @ 2017-07-05  5:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

The default keyboard delay time in the input layer is 10ms. I don't know
how that number came to be, but empirical tests on some OpenQA driven ARM
systems show that 10ms really is a reasonable default number for the delay.

With the current 1ms we're constantly typing faster than the guest receives
keyboard events from our XHCI attached USB HID device.

This patch moves the delay to 10ms. That way our default is much safer (good!)
and also consistent with the input layer default (also good!).

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 qemu-options.hx | 2 +-
 ui/vnc.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qemu-options.hx b/qemu-options.hx
index 896ff17..64806f0 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1730,7 +1730,7 @@ spec but is traditional QEMU behavior.
 @item key-delay-ms
 
 Set keyboard delay, for key down and key up events, in milliseconds.
-Default is 1.  Keyboards are low-bandwidth devices, so this slowdown
+Default is 10.  Keyboards are low-bandwidth devices, so this slowdown
 can help the device and guest to keep up and not lose events in case
 events are arriving in bulk.  Possible causes for the latter are flaky
 network connections, or scripts for automated testing.
diff --git a/ui/vnc.c b/ui/vnc.c
index 26136f5..eb91559 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3808,7 +3808,7 @@ void vnc_display_open(const char *id, Error **errp)
     }
 
     lock_key_sync = qemu_opt_get_bool(opts, "lock-key-sync", true);
-    key_delay_ms = qemu_opt_get_number(opts, "key-delay-ms", 1);
+    key_delay_ms = qemu_opt_get_number(opts, "key-delay-ms", 10);
     sasl = qemu_opt_get_bool(opts, "sasl", false);
 #ifndef CONFIG_VNC_SASL
     if (sasl) {
-- 
1.8.5.6

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] vnc: Set default kbd delay to 10ms
  2017-07-05  5:59 [Qemu-devel] [PATCH] vnc: Set default kbd delay to 10ms Alexander Graf
@ 2017-07-05  8:42 ` Markus Armbruster
  2017-07-06  7:08   ` Alexander Graf
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Armbruster @ 2017-07-05  8:42 UTC (permalink / raw)
  To: Alexander Graf; +Cc: qemu-devel, Gerd Hoffmann

Alexander Graf <agraf@suse.de> writes:

> The default keyboard delay time in the input layer is 10ms. I don't know

Do you mean "is 1ms"?

> how that number came to be, but empirical tests on some OpenQA driven ARM
> systems show that 10ms really is a reasonable default number for the delay.
>
> With the current 1ms we're constantly typing faster than the guest receives
> keyboard events from our XHCI attached USB HID device.
>
> This patch moves the delay to 10ms. That way our default is much safer (good!)
> and also consistent with the input layer default (also good!).
>
> Signed-off-by: Alexander Graf <agraf@suse.de>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] vnc: Set default kbd delay to 10ms
  2017-07-05  8:42 ` Markus Armbruster
@ 2017-07-06  7:08   ` Alexander Graf
  2017-07-10  7:20     ` Gerd Hoffmann
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Graf @ 2017-07-06  7:08 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel, Gerd Hoffmann



On 05.07.17 10:42, Markus Armbruster wrote:
> Alexander Graf <agraf@suse.de> writes:
> 
>> The default keyboard delay time in the input layer is 10ms. I don't know
> 
> Do you mean "is 1ms"?

Yes, of course :). Sorry.


Alex

> 
>> how that number came to be, but empirical tests on some OpenQA driven ARM
>> systems show that 10ms really is a reasonable default number for the delay.
>>
>> With the current 1ms we're constantly typing faster than the guest receives
>> keyboard events from our XHCI attached USB HID device.
>>
>> This patch moves the delay to 10ms. That way our default is much safer (good!)
>> and also consistent with the input layer default (also good!).
>>
>> Signed-off-by: Alexander Graf <agraf@suse.de>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] vnc: Set default kbd delay to 10ms
  2017-07-06  7:08   ` Alexander Graf
@ 2017-07-10  7:20     ` Gerd Hoffmann
  2017-07-10  8:20       ` Alexander Graf
  0 siblings, 1 reply; 5+ messages in thread
From: Gerd Hoffmann @ 2017-07-10  7:20 UTC (permalink / raw)
  To: Alexander Graf, Markus Armbruster; +Cc: qemu-devel

On Thu, 2017-07-06 at 09:08 +0200, Alexander Graf wrote:
> 
> On 05.07.17 10:42, Markus Armbruster wrote:
> > Alexander Graf <agraf@suse.de> writes:
> > 
> > > The default keyboard delay time in the input layer is 10ms. I
> > > don't know
> > 
> > Do you mean "is 1ms"?
> 
> Yes, of course :). Sorry.

Given the last paragraph of the commit message 10ms looks correct.  If
you change it to 1ms you also want to change "input layer" to "vnc
server" ...

Or, better, move the last paragraph (which points out the inconsistency
 between input layer and vnc server defaults) to the top, then it's
easier to read I guess.

cheers,
  Gerd

> 
> Alex
> 
> > 
> > > how that number came to be, but empirical tests on some OpenQA
> > > driven ARM
> > > systems show that 10ms really is a reasonable default number for
> > > the delay.
> > > 
> > > With the current 1ms we're constantly typing faster than the
> > > guest receives
> > > keyboard events from our XHCI attached USB HID device.
> > > 
> > > This patch moves the delay to 10ms. That way our default is much
> > > safer (good!)
> > > and also consistent with the input layer default (also good!).
> > > 
> > > Signed-off-by: Alexander Graf <agraf@suse.de>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] vnc: Set default kbd delay to 10ms
  2017-07-10  7:20     ` Gerd Hoffmann
@ 2017-07-10  8:20       ` Alexander Graf
  0 siblings, 0 replies; 5+ messages in thread
From: Alexander Graf @ 2017-07-10  8:20 UTC (permalink / raw)
  To: Gerd Hoffmann, Markus Armbruster; +Cc: qemu-devel

On 07/10/2017 09:20 AM, Gerd Hoffmann wrote:
> On Thu, 2017-07-06 at 09:08 +0200, Alexander Graf wrote:
>> On 05.07.17 10:42, Markus Armbruster wrote:
>>> Alexander Graf <agraf@suse.de> writes:
>>>
>>>> The default keyboard delay time in the input layer is 10ms. I
>>>> don't know
>>> Do you mean "is 1ms"?
>> Yes, of course :). Sorry.
> Given the last paragraph of the commit message 10ms looks correct.  If

Wow, I guess I wrote the message so confusingly that I even confused 
myself. Yes, of course 10ms is correct. There is an "input layer" delay 
and a "vnc" delay. Today "input layer" delay defaults to 10ms while 
"vnc" delay defaults to 1ms.

> you change it to 1ms you also want to change "input layer" to "vnc
> server" ...
>
> Or, better, move the last paragraph (which points out the inconsistency
>   between input layer and vnc server defaults) to the top, then it's
> easier to read I guess.

Yeah, I agree.


Alex

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-10  8:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-05  5:59 [Qemu-devel] [PATCH] vnc: Set default kbd delay to 10ms Alexander Graf
2017-07-05  8:42 ` Markus Armbruster
2017-07-06  7:08   ` Alexander Graf
2017-07-10  7:20     ` Gerd Hoffmann
2017-07-10  8:20       ` Alexander Graf

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.