Bug 280984 - bhyve VNC color issue with noVNC
Summary: bhyve VNC color issue with noVNC
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bhyve (show other bugs)
Version: 15.0-CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Mark Peek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-21 17:57 UTC by Mark Peek
Modified: 2024-11-25 05:25 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Peek freebsd_committer freebsd_triage 2024-08-21 17:57:26 UTC
The colors are incorrect when connecting noVNC client to the bhyve VNC server. This came up in the bhyve weekly call and here is a Google group link that describes it further:

https://groups.google.com/g/novnc/c/zzF5Yw4UgqY

The bhyve VNC server only outputs RGB 32-bit values but noVNC is requesting (and only supports) BGR ordering via the SetPixelFormat message (https://datatracker.ietf.org/doc/html/rfc6143#section-7.5.1). Thus, the red and blue colors end up reversed.
Comment 1 Mark Peek freebsd_committer freebsd_triage 2024-08-22 16:16:36 UTC
FYI...review link:

https://reviews.freebsd.org/D46402
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-09-09 17:28:12 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=dda0f9837b1c4049079aeaefb35076aef5f06a6c

commit dda0f9837b1c4049079aeaefb35076aef5f06a6c
Author:     Mark Peek <mp@FreeBSD.org>
AuthorDate: 2024-09-09 17:21:17 +0000
Commit:     Mark Peek <mp@FreeBSD.org>
CommitDate: 2024-09-09 17:21:17 +0000

    bhyve: support noVNC SetPixelFormat request

    The bhyve VNC server would ignore the SetPixelFormat message from the
    VNC client. This change supports a limited implementation to detect
    and reorder the colors such as requested from the noVNC client.

    PR:             280984
    Reviewed by:    corvink
    Differential Revision:  https://reviews.freebsd.org/D46402
    MFC after:      3 weeks

 usr.sbin/bhyve/rfb.c | 143 ++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 136 insertions(+), 7 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-10-31 14:43:24 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=f9e09dc5b1d593a239d170a975ff60114030b471

commit f9e09dc5b1d593a239d170a975ff60114030b471
Author:     Mark Peek <mp@FreeBSD.org>
AuthorDate: 2024-09-09 17:21:17 +0000
Commit:     Mark Peek <mp@FreeBSD.org>
CommitDate: 2024-10-31 14:41:17 +0000

    bhyve: support noVNC SetPixelFormat request

    The bhyve VNC server would ignore the SetPixelFormat message from the
    VNC client. This change supports a limited implementation to detect
    and reorder the colors such as requested from the noVNC client.

    PR:             280984
    Reviewed by:    corvink
    Differential Revision:  https://reviews.freebsd.org/D46402
    MFC after:      3 weeks

    (cherry picked from commit dda0f9837b1c4049079aeaefb35076aef5f06a6c)

 usr.sbin/bhyve/rfb.c | 143 ++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 136 insertions(+), 7 deletions(-)