I'm running two X servers on my desktop, say :0 and :1, they can be switched with ctrl+alt+f7 and ctrl+alt+f8. When I'm on the :0 and run xwd -display :0 -root -out 1.xwd it works correctly. However, if I try to capture an image from :1, I only get a garbage. The same is true if I'm running on :1 and trying to capture :0. The same test works correctly if the second server is Xnest of Xvfb.
This is expected. When the X server switches away from the VT, it loses the framebuffer; there's no storage for the screen, at all.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.