you can alternatively try this.
set up autologin with some user into Xserver.
then log in via ssh with the same user as is logged in Xserver. do not use -X
run any OpenCL/OpenGL application. any GUI windows should appear on screen.
IMHO this is the easyest way.
I logged in remotley and did:
sudo service gdm stop
sudo /usr/bin/Xorg -br -ac -audit 0
And it works. So it is a problem with the gdm custom.conf file.
Here is my solution:
1. Disable gdm via grub (I don't need gdm on a remote machine)
In /etc/default/grub set
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash text",
than run update-grub
2. In /etc/X11/Xwrapper.config set
3. In /usr/bin/startx set
Login with ssh and run:
startx &and everything should be fine.