Skip to content

Wrong PixelFormat if Server only Supports 8bit #2000

@kieferei

Description

@kieferei

I am using noVnc 1.5.0. The VNC Server is inside a B&R PLC.

The VNC Server send the following information:

websock.js:304 >> WebSock.onopen
rfb.js:703 Starting VNC handshake
websock.js:309 << WebSock.onopen
rfb.js:1446 Server ProtocolVersion: 003.003
rfb.js:1487 Sent ProtocolVersion: 003.003
rfb.js:1551 Authenticating using scheme: 1
rfb.js:2182 Screen: 1024x768, bpp: 8, depth: 8, bigEndian: 0, trueColor: 0, redMax: 7, greenMax: 7, blueMax: 3, redShift: 0, greenShift: 3, blueShift: 6
display.js:150 Setting viewport to full display region

Based on this information noVnc is setting Pixelformat to the Server.
I didn't recive any Display data.

I see a "unknown pixelformat"-Error in the logging of the B&R PLC.

Suggestion:
When I look at the code (rfb.js line 2190) I see:

  this._fbDepth = 24;
  if (this._fbName === "Intel(r) AMT KVM") {
    Log.Warn("Intel AMT KVM only supports 8/16 bit depths. Using low color mode.");
    this._fbDepth = 8;
  }
  RFB.messages.pixelFormat(this._sock, this._fbDepth, true);

In my understanding it should be:

  this._fbDepth = depth

because than the pixelFormat is calculated based on the values from the server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions