From owner-freebsd-virtualization@freebsd.org Thu May 28 22:27:54 2020 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB8BB2FFC34 for ; Thu, 28 May 2020 22:27:54 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from vito-vars.onthenet.com.au (vito-vars.OntheNet.com.au [203.13.68.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49Y2QL1nKKz4J11 for ; Thu, 28 May 2020 22:27:54 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto2.onthenet.com.au [203.13.68.14]) by vito-vars.onthenet.com.au (Postfix) with ESMTPS id 1E02E209F8C6 for ; Fri, 29 May 2020 08:27:43 +1000 (AEST) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [203.13.68.150]) by alto.onthenet.com.au (Postfix) with ESMTPS id 0749220AE960 for ; Fri, 29 May 2020 08:27:43 +1000 (AEST) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [127.0.0.1]) by iredmail.onthenet.com.au (Postfix) with ESMTP id 001AC2031D66 for ; Fri, 29 May 2020 08:27:42 +1000 (AEST) Received: from iredmail.onthenet.com.au ([127.0.0.1]) by iredmail.onthenet.com.au (iredmail.onthenet.com.au [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id xJh_i5aCYQFV for ; Fri, 29 May 2020 08:27:42 +1000 (AEST) Received: from MacBook-Air-4.local (CPE-120-29-58-131.dsl.OntheNet.net [120.29.58.131]) by iredmail.onthenet.com.au (Postfix) with ESMTPSA id 9AFA22031D65; Fri, 29 May 2020 08:27:42 +1000 (AEST) Subject: Re: [Bug 246121] [bhyve][PATCH] Append Keyboard Layout specified option for using VNC. To: Henrik Gulbrandsen Cc: FreeBSD Virtualization References: From: Peter Grehan Message-ID: <0f397482-9656-7fac-fc00-9d60efaa5954@freebsd.org> Date: Fri, 29 May 2020 08:27:42 +1000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=Dt7iB13+ c=1 sm=1 tr=0 a=A6CF0fG5TOl4vs6YHvqXgw==:117 a=h++7KPR4hXufxPb6yvHc6A==:17 a=IkcTkHD0fZMA:10 a=sTwFKg_x9MkA:10 a=kHpHeL9OAAAA:8 a=svYhE7Vcfe91Kb-OikEA:9 a=QEXdDO2ut3YA:10 a=lRXzOmhxo50hemBhyw8Q:22 a=pHzHmUro8NiASowvMSCR:22 a=nt3jZW36AmriUCFCBwmW:22 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=P5GOeRIu c=1 sm=1 tr=0 a=eF5wA05EhuPcU0j7PNT2Vg==:117 a=h++7KPR4hXufxPb6yvHc6A==:17 a=IkcTkHD0fZMA:10 a=sTwFKg_x9MkA:10 a=kHpHeL9OAAAA:8 a=svYhE7Vcfe91Kb-OikEA:9 a=QEXdDO2ut3YA:10 a=lRXzOmhxo50hemBhyw8Q:22 a=pHzHmUro8NiASowvMSCR:22 a=nt3jZW36AmriUCFCBwmW:22 X-Rspamd-Queue-Id: 49Y2QL1nKKz4J11 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:9313, ipnet:203.13.68.0/23, country:AU] X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2020 22:27:55 -0000 Hi Henrik, > When I wrote my Video BIOS code one year ago, I noticed that bhyve is > sending updates continuously from rfb_wr_thr(), without any requests. > On the other hand, the RFB protocol specification says that "an update > is only sent from the server to the client in response to an explicit > request from the client", so bhyve seems to technically break this. So do the clients that don't send any UpdateRequest messages at all. Spec compliance in the VNC world is a very loose definition :( > I tested my code with TigerVNC, and at one point I ended up with a very > long delay for keyboard events. From my diary at the time (2019-05-02): >=20 > =C2=A0=C2=A0=C2=A0 "In any case, I finally found the cause of the long= input queue. > =C2=A0=C2=A0=C2=A0=C2=A0 TigerVNC sends a new update request for each = display update it > =C2=A0=C2=A0=C2=A0=C2=A0 gets, and it only expects to get one, but bhy= ve sent a separate > =C2=A0=C2=A0=C2=A0=C2=A0 update for each rectangle, so as soon as disp= lay updates started, > =C2=A0=C2=A0=C2=A0=C2=A0 the input buffer filled up with update reques= ts." Ok, that's an optimization that could be done: I think there's enough=20 info to do that in an update. > By then, I had probably already changed the rfb.c code a lot, but any > delay for TigerVNC could be due to a similar issue. I guess different > VNC clients would react differently to unexpected update messages. And the majority do. > Anyway, I wanted to mention it before you rewrite the RFB code again. > My patch is still in limbo at https://www.gulbra.net/freebsd-bhyve/, > and the changes in rfb.c are those that are most likely to conflict > with other modifications. It would be better for me if I don't have to > do the same debugging all over again if I finally return to this code. Thanks; I 'll have a look at it. later, Peter.