Hello.
From what I understand here, the problem is with NoMachine creating a virtual desktop on the machine that should have its own Xserver running, but since it is after operating system restart, the Xserver may be starting after the nxserver.service, so your first connection is either before the running Xserver detection, or the nxserver configuration is set to start the virtual desktop automatically.
Please check the server.cfg file for CreateDisplay key and make sure it is commented or set to 0.
This will ensure that NoMachine will not create the virtual session automatically in the case Xserver is not available at the time of startup.
After this change the only way the virtual session could be created is when attaching to the machine
while the Xserver is unavailable. Then there will be a prompt in the player application to make a choice of creating one or not.
Please also note that if the Xserver is not running at the time of nxserver service startup, there would be a growing delay for the check if one is actually running, so if the Xserver is started a few minutes after the nxserver service it may be recommended to restart the nxserver.service to make the check immediately.
/mth