VNC Pixel format does not match

1,528 views
Skip to first unread message

james maddison

unread,
Jul 13, 2021, 7:37:59 AM7/13/21
to noVNC
Hi,

I've had an issue where on connecting to a server using noVNC, it will connect initially then the server will drop the connection with the error:
'VNC pixel format does not match'

I am able to connect to the server using tightVNC and UltraVNC.

Picture1.png

I'm unsure where best to start debugging. Setting UltraVNC to any setting less than full colour triggers the same fault, however, noVNC is set to full colour as above.

Any help or suggestions would be greatly appreciated.
James

james maddison

unread,
Jul 13, 2021, 7:59:10 AM7/13/21
to noVNC
This is my wireshark trace for the connecting / disconnecting event
wireshark.png

Many thanks again
James

Pierre Ossman

unread,
Jul 13, 2021, 8:11:01 AM7/13/21
to no...@googlegroups.com
On 13/07/2021 13:37, 'james maddison' via noVNC wrote:
> Hi,
>
> I've had an issue where on connecting to a server using noVNC, it will
> connect initially then the server will drop the connection with the error:
> 'VNC pixel format does not match'
>

I'm afraid it looks like your server only support certain pixel formats.
VNC normally requires a server to support any pixel format the client
needs. Hence there is no way to change this in noVNC.

What server is this? Something embedded?

Regards
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46-13-214600

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

james maddison

unread,
Jul 13, 2021, 8:13:55 AM7/13/21
to noVNC
It's an embedded VNC server, so I couldn't say exactly which implementation it is unfortunately.

I can connect using both UltraVNC and TightVNC - so I'm hopeful there's a way to get this working - is there a way to find the correct pixel format and modify noVNC to serve the correct information to the server?

Many thanks
James

Pierre Ossman

unread,
Jul 13, 2021, 8:28:08 AM7/13/21
to no...@googlegroups.com
On 13/07/2021 14:13, 'james maddison' via noVNC wrote:
> It's an embedded VNC server, so I couldn't say exactly which implementation
> it is unfortunately.
>
> I can connect using both UltraVNC and TightVNC - so I'm hopeful there's a
> way to get this working - is there a way to find the correct pixel format
> and modify noVNC to serve the correct information to the server?
>

You can examine what UltraVNC and TightVNC sends. But then you'd have to
modify noVNC's encoding stack to handle that pixel format as well. So
it's not trivial work.

james maddison

unread,
Jul 13, 2021, 9:31:02 AM7/13/21
to noVNC
Analysing what TightVNC sends, I've manually modified the pixel format that noVNC sends to the server to match. This is shown below
.diff.png

This results in a working (in that it remains connected) connection, but it is laggy and colours are wrong. Shown below.
Picture1.png

Would you have any thoughts on how to get this working? My next step I believe is to modify the encoding settings to match those of tightVNC, however I'm really feeling my way through the dark here.

Any other help would be fantastic.

Many thanks,
James

james maddison

unread,
Jul 13, 2021, 11:58:50 AM7/13/21
to no...@googlegroups.com
I was able to get it working well with no lag, by forcing hextiles encoding. The colours are still incorrect as a result of my fixed RGB shift values in rfb.js. 

All a bit of a hacky solution but it seems to work. I now need to figure out how to shift the colours to the correct values on the encoding side?

Many thanks,
James

--
You received this message because you are subscribed to a topic in the Google Groups "noVNC" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/novnc/hLoptGo2xBk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to novnc+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/novnc/a1c86894-eb09-4b8a-a8eb-c25a32e31c1bn%40googlegroups.com.

Pierre Ossman

unread,
Jul 14, 2021, 6:56:58 AM7/14/21
to no...@googlegroups.com
On 13/07/2021 17:58, 'james maddison' via noVNC wrote:
> I was able to get it working well with no lag, by forcing hextiles
> encoding. The colours are still incorrect as a result of my fixed RGB shift
> values in rfb.js.
>
> All a bit of a hacky solution but it seems to work. I now need to figure
> out how to shift the colours to the correct values on the encoding side?
>

I'm afraid I don't have any clear directions for you. You'd need to look
at the code under core/decoders/ and make sure those shift the bytes
around to the format expected by the browser.
Reply all
Reply to author
Forward
0 new messages