< GNOME

GNOME/GDM

As part of the GNOME desktop suite, the GNOME Display Manager (GDM) [[Article description::is the daemon responsible for launching graphical display sessions via the Xorg display server or the gnome-shell directly via Wayland display protocol.]]

Configuration

Debugging

To enable debugging, edit the following configuration file:

FILE /etc/gdm/custom.conf
<syntaxhighlight lang="ini">[debug] 
# Uncomment the line below to turn on debugging
Enable=true</syntaxhighlight>

On systems running systemd, this will configure GDM to write verbose output to the journal. Be sure to disable debugging when finished resolving any issues to save space in the journal.

See upstream's debug documentation for more details on debugging GDM.

Troubleshooting

GDM and Optimus

See the GDM section of the NVIDIA Optimus article when using GDM on platforms utilizing NVIDIA Optimus.

Enable tap to click in GDM

Tap to click is disabled by default in GDM's environment. Enabling this feature requires setting GNOME option org.gnome.desktop.peripherals.touchpad tap-to-click for the gdm user.

Grant permissions for gdm to access the X server:

user $xhost +SI:localuser:gdm

Then set the gsettings configuration value as the gdm user to enable tap to click:

user $sudo -u gdm gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true

The new setting will take effect after restarting the GDM service.

GDM crashes when attempting to launch a GNOME Wayland session

Problem: GDM is crashing when attempting to launch a GNOME Wayland session. Known to affect at least gdm-3.32.0.

Solution: This is most likely occurring because the NVIDIA kernel module is being loaded by the kernel and subsequently detected by udev - even if it not being used by the graphics stack. The udev rule (see /lib/udev/rules.d/61-gdm.rules) is shipped with GDM. Even if the system is not actively using the NVIDIA driver or NVIDIA hardware to render graphics, the rule will still trigger the /usr/libexec/gdm-disable-wayland" executable. This writes a configuration file to /run/gdm/custom.conf which is read by GDM at start time and disables support for Wayland sessions.

There are a few solutions to this problem:

  1. Uninstall the x11-drivers/nvidia-drivers package and remove the installed NVIDIA kernel modules. This is most likely the easiest solution, since it will remove the NVIDIA kernel module that triggers the udev rule (nvidia.ko) and prevent it from returning.
  2. Blacklist the NVIDIA kernel module from loading. This can is performed different ways: kernel command-line parameters via the secondary bootloader (GRUB2, systemd-boot, etc.) or adding a blacklist configuration file via modprobe.d.
  3. System administrators that want to keep the NVIDIA binary blob available for other desktop environments, but want to launch GNOME on Wayland and follow this last solution. It is simplest to manually editing the offending part of the udev rule so that gdm-disable-wayland cannot create the custom configuration file. To be safe, review Xorg's configuration files in the /etc/X11 directory to be sure NVIDIA is not being set as the primary Xorg driver. It is also a good idea to review the Xorg.0.log to double check. Simply comment out the last line:
FILE /lib/udev/rules.d/61-gdm.rules
<syntaxhighlight lang="udev"><pre>
# disable Wayland on Cirrus chipsets
ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", RUN+="/usr/libexec/gdm-disable-wayland"
# disable Wayland on Hi1710 chipsets
ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="/usr/libexec/gdm-disable-wayland"
# disable Wayland when using the proprietary nvidia driver
#DRIVER=="nvidia", RUN+="/usr/libexec/gdm-disable-wayland"
</pre></syntaxhighlight>

GDM produces an all-black screen when more than one video driver is loaded

One of the benefits of Wayland is the ability to run multi-GPU multi-head sessions. It is also possible on some compositors (e.g. Sway) for users to do this with multiple GPU drivers (e.g. running a modern AMDGPU card and an older radeon card in the same machine). GDM is not a fan of this, but it can be coerced into behaving.

If this happens, a workaround is to temporarily blacklist your second GPU driver at load-time:

FILE /etc/modprobe.d/blacklist.conf
# Force AMDGPU to load first
blacklist nvidia
blacklist nouveau
blacklist radeon

Then, after GDM launches, switch to another tty and load the secondary GPU's driver. You will be able to switch back to GDM and start your WM, which if it can accept more than one GPU driver will utilize them.

GDM ignores my keyboard layout

GDM normally use SystemD to get the system keyboard configuration. If not, GDM will use the X configuration. But if you are using the default Gnome profile on Gentoo, you will be using OpenRC and Wayland, so none of this may work. GDM will then use a default us keyboard, which will make it difficult to type a password if this is not your layout.

In this case, you have to configure the keyboard layout of the gdm user. This can be done opening Gnome settings (gnome-control-center). In the top right of the Region & Language panel, there is a Login Screen button which you can toggle to configure gdm language.

Unfortunately, this Login Screen button does not appear on every install (why?). If this is the case for you, you still can change settings through command line.

For example, for a french keyboard, type as root:

root #su -s /bin/bash gdm
gdm $dbus-run-session gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'fr')]"
gdm $gsettings get org.gnome.desktop.input-sources sources
gdm $# you should see [('xkb', 'fr')] now
gdm $exit

External resources

This article is issued from Gentoo. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.