The reason being x11 not working with remote machine is that x11 requires an active X session. x11 is not suitable for headless operation and the only case where one should use X11 option is for local rendering, but this is not well tested or optimized since the focus is on server use cases. So it is best to use drm samples in general scenarios.
So far I have seen few cases where this error shows up -
I believe you are not doing any of the above scenarios. Can you please download the R5 samples package(https://software.intel.com/en-us/intel-media-server-studio-support/code-samples) & verify if you are able to run the samples.
Also, can you explain what you mean by this - "And the envriment is old envriment."