This article applies to NoMachine v. 6 and 7.
Many recent Linux operating systems (e.g. Fedora 31, OpenSUSE 15, Ubuntu 19.10 or later) provide support for desktop environments relying on Wayland compositor.
These Wayland-based desktops operate also when the Operating System runs on a bare-metal virtual machine or in virtual machine on a hosted hypervisor like VMware Workstation Player, VirtualBox, KVM, VMware ESX.
The same applies to the NoMachine software, that can be installed on a physical or virtual host to provide access to its desktop. In case of a Wayland-based desktop, NoMachine adopts a variety of methods to interact with it, but at the moment these methods are effective only when the Operating System is running on a physical host. Note that even in this case, some issues can still occur when the proprietary drivers of the video card are installed. A possible solution for both cases is to disable Wayland, or when this is not possible, to try any of the options explained below.
How to identify the problem
When connecting to the Wayland-based desktop, the user gets a blank screen. The client window is however responsive: open the NoMachine menu by ctrl+alt+0 , enter the Display -> Change settings panel and check at the bottom left: it should show 'codec Unknown'.
The session log reports errors similar to:
20982 21009 12:22:25 117.174 DrmGrabber: ERROR! Failed to get fb info.
20982 21009 12:22:25 117.248 DrmGrabber: ERROR! FbInfo init failed.
20982 21009 12:22:25 117.262 WaylandPoller: Init failed.
20982 21009 12:22:25 126.971 WaylandPoller: WARNING! Failed to restore screen info without having
DBus connection. nxagentShadowInit: ERROR! Failed to initialize the shadow display.
How to solve the problem
It's possible to change the server-side setup to fix such situation, two alternative ways are available.
Option #1: PipeWire desktop sharing provided by the desktop compositor
NoMachine is able to use PipeWire to get access to the desktop sharing service, where available (only GNOME is currently supported). To force using it, set 'compositor' as first method in the 'WaylandModes' key in the NoMachine node configuration file (/usr/NX/etc/node.cfg), for example:
In this way, NoMachine will try PipeWire (compositor) and in case it will fall back to DRM (Direct Rendering Manager) framebuffer.
Option #2: Use EGL capture
Since the Wayland desktop is composed by using the EGL library, NoMachine can grab the screen content through EGL. Such method requires modification of the desktop startup scripts.
These changes can be applied automatically by running the following command:
sudo /etc/NX/nxserver --egl-capture yes
Then, modify the 'WaylandModes' key in /usr/NX/etc/node.cfg in order to enable the EGL method. Set it as first item:
Finally, restart the display manager and the NoMachine server to make changes effective:
systemctl restart display-manager
sudo /etc/NX/nxserver --restart
To turn EGL capture off, run command:
/etc/NX/nxserver --egl-capture no
Then remove "egl" from the 'WaylandModes' keys and restart both the display manager and the NoMachine server.
EGL support is available since NoMachine v. 6.10.12, related Feature Requests are: