Hi, I met with the same problem when I run a very simple opencv program. When I run it on the console, no warning, but when I run it on my vnc window, I have this QXcbConnection: Failed to initialize XRandr, Qt: XKEYBOARD extension not present on the X server warning. (program runs still correctly).
Xinitrc With Xrandr. You’re now ready to manage your monitors and provide specific detail straight to the X Server. It’s important to note that Xrandr is highly scriptable, and you can run it as a startup script. You can also include Xrandr statements in your.xinitrc file or run it as a script in your window manager’s startup.