How to enable indirect GLX contexts (+iglx) in Ubuntu 14.04 LTS with nvidia gfx-cards

I had a similar issue when running some GL applications via 'ssh -X' and solved it by adding "+iglx" to xserver-command in /usr/share/lightdm/lightdm.conf.d/50-xserver-command.conf.

[SeatDefaults]
# Dump core
xserver-command=X -core +iglx

After which you either reboot or Ctrl-Alt-F1, login, and 'sudo service lightdm restart'.

I hope this helps!


An alternative (and display-manager-independent) way to add the options is to add the following section to /etc/X11/xorg.conf:

Section "ServerFlags"
    Option "IndirectGLX" "on"
EndSection