From ArchWiki
Latest comment: 13 May 2021 by Olly1240 in topic These instructions do not work

These instructions do not work

I'm sorry, but there is a flaw here somewhere. I have followed these instructions to the letter multiple times, and they simply do not work.

I am not expecting support from anyone on here, but I do want to log this in case it helps someone else.

I am getting the error "unable to open display ":0"." unless the same user is logged in locally at the machine. Before anyone jumps down my throat:

  • Yes, I have seen the note about this error. I understand that it means that the display with hardware acceleration cannot be accessed
  • Yes, I have run the vglserver_config script (multiple times) as root, choosing all the "open to everyone" options to reduce the risk of that being my error
  • Yes, I shut down the display manager before doing so. The first time I ran it I got the error, and I followed the instructions it gave me. Even after shutting down the display manager, I could not remove nvidia, so I had to do this before the script ran without error:
    • rmmod nvidia_drm
    • rmmod nvidia_modeset
    • rmmod nvidia

Output from vglserver_config:

1) Configure server for use with VirtualGL
2) Unconfigure server for use with VirtualGL
X) Exit
Restrict 3D X server access to vglusers group (recommended)?
Restrict framebuffer device access to vglusers group (recommended)?
Disable XTEST extension (recommended)?
... Creating /etc/modprobe.d/virtualgl.conf to set requested permissions for
/dev/nvidia* ...
... Granting write permission to /dev/nvidia0 /dev/nvidiactl /dev/nvidia-modeset for all users ...
... Modifying /etc/X11/xorg.conf.d/99-virtualgl-dri to enable DRI permissions
for all users ...
... Adding xhost +LOCAL: to /usr/share/sddm/scripts/Xsetup script ...
Done. You must restart the display manager for the changes to take effect.

After all that, I restart the display manager and run the test like the page recommends and I get:

xdpyinfo:  unable to open display ":0".

I log in via x2go to a vlc session and try vglrun [command] and I get:

[VGL] ERROR: Could not open display :0.

I've done this several times. I've rebooted. I've Googled my heart out. It just doesn't work.

Lewis2e (talk) 16:13, 7 May 2020 (UTC)Reply[reply]

:That should be a forum question but i understand your frustration. With that said, Your display will probably not be :0 on a ssh connection with X-Forwarding.

Check with env your DISPLAY= variable and use the -d option with the correct display. Tested using vglrun
Since it also happened to me I opened an issue on the GitHub upstream.
Olly1240 (talk) 15:30, 13 May 2021 (UTC)Reply[reply]
I had a talk with the VirtualGL Dev and he kindly pointed out where I was wrong. The issue is with not having an X server configured and running on the remote machine.
The Wiki needs expanding or even a mention on this. The current release version depends on X. But 3.0 is on the way and implements its own EGL renderer so this step might not be needed anymore, at least not necessarily. If you want to try, pre-beta builds are available that don’t need X running Olly1240 (talk) 22:43, 13 May 2021 (UTC)Reply[reply]