Many users want to boot straight into a graphical environment, rather than having to log on through a Linux console and then using the startx command to launch the graphical desktop environment (such as GNOME). Graphical display managers provide this service, and GNOME has one called the GNOME Display Manager, or GDM.
GDM can be installed from a separate system profile by manually emerging it:
emerge --ask gnome-base/gdm
To start gdm upon boot:
systemctl enable gdm.service
To start gdm immediately:
systemctl start gdm.service
If a GNOME system profile has been selected removing GDM is probably not the best idea, however it is possible. When migrating from GNOME to another desktop environment, it generally a good idea to simply remove GNOME altogether.
To manually remove GDM:
emerge --ask --unmerge gnome-base/gdm
GDM and Optimus
For GDM to work with Optimus, add the following two lines to the top of the /etc/gdm/Init/Default file:
xrandr --setprovideroutputsource modesetting NVIDIA-0 xrandr --auto
Unlike the previous major version of GDM, GDM 3 does not rely on the files in /etc/gdm and/or /etc/X11/gdm to manage which users appear on the greeter screen. Everything relies on AccountsService. First of all, AccountsService is forwarding to GDM 3 all the usernames with a user id above 1000. There is not way to force GDM to consider users with a user id less or equal to 1000 unless you customize yourself the ebuild as described here.
If you want to exclude users with user ids greater than 1000 from showing on the greeter screen, you have to drop a file after the name of the user in the /var/lib/AccountsService/users directory and include in this file the stanza SystemAccount=true.
On another hand, if you have a user with a user id greater than 1000 that does not show you should check for a file after his name in the above directory and if there is one, change the stanza SystemAccount from true to false.