Can't get monitor connected to dGPU to show with GDM3 when modeset is 1 but is fixed after running startx in Ubuntu 17.10

I’ve been trying to get PRIME sync to work on my desktop where I have two monitors, one connected directly to the Titan Xp and the other to the iGPU of the 8700K on Ubuntu 17.10. GDM seems to not be working and is only able to display the monitor connected to the iGPU however after logging out and stopping the GDM service and manually running startx, both monitors now appear and PRIME sync is enabled.

Interestingly, after killing the startx xsession, and restarting GDM, GDM is now showing on both monitors and PRIME sync is enabled.

I wonder if this might be a bug with the systemd service starting up initially? Lightdm doesn’t appear to suffer from this problem.

Tried to disable Wayland?
In /etc/gdm3/custom.conf uncomment the line
#WaylandEnable=false

Yes, Wayland is disabled for me.

Hi @honrie3x, this is very interesting. I don’t think it’s an nvidia bug, but this will be very helpful to add to the Ubutnu & gdm bug reports.

We know for sure that it requires both gdm3 and modeset=1 to trigger the bug, and disabling wayland in custom.conf makes no difference. In Optimus mode, it gets to the greeter thanks to the intel card; the nvidia card is DOA (so no external monitors). It’s worse when you use discrete mode: no greeter at all. Logically it must be something that gdm3 is doing which lightdm is not doing. The experts who respond to the bug reports seem to guess that it’s wayland activating for the gdm3 greeter, yet disabling wayland makes no difference. There is no progress on any of my bug reports for this.

I haven’t actually found anyone who can get gdm3 and modesetting to work on an Optimus laptop, until now (with your workaround).

So thanks for your discovery, maybe it will help.

Hey Tim, given that you’ve opened a couple of bug reports with the Ubuntu and Gnome folks, can you update the bug reports with this new information?

Thanks