GNOME/GDM

From Gentoo Wiki
< GNOME
Jump to:navigation Jump to:search
This page is a translated version of the page GNOME/GDM and the translation is 87% complete.
Other languages:

GNOME デスクトップスイートの一部である GNOME ディスプレイマネージャー (GNOME Display Manager, GDM) は、Xorg ディスプレイサーバを利用して、または Wayland ディスプレイプロトコルを介して gnome-shell を利用して、グラフィカルなディスプレイセッションの起動を管理するデーモンです。

設定

デバッグ

デバッグを有効化するには、次の設定ファイルを編集してください:

ファイル /etc/gdm/custom.conf
[debug] 
# Uncomment the line below to turn on debugging
Enable=true

systemd を実行しているシステムでは、これによりジャーナルに詳細な出力を書き出すように GDM が設定されるでしょう。ジャーナルの容量を節約するために、問題の解決が終わったらデバッグを無効化するようにしてください。

GDM のデバッグに関するさらなる詳細については、デバッグに関する上流の文書も参照してください。

トラブルシューティング

GDM と Optimus

NVIDIA Optimus を利用するプラットフォーム上で GDM を使用する場合は、NVIDIA Optimus の記事の GDM に関する節を参照してください。

GDM が SSH エージェントをロードするのを止める

GDM はログイン時に SSH エージェントを呼び出そうとします。いくつかの状況では、この自動化が問題を引き起こすことがあります。

この挙動を無効化するには、以下に示す通りにユーザの ~/.pam_environment を作成または修正してください。

ファイル ~/.pam_environmentGDM に SSH エージェントをロードさせないようにする
# gnome-shell による SSH_AUTH_SOCK の上書きを無効化する
GSM_SKIP_SSH_AGENT_WORKAROUND DEFAULT=1
 
# ssh-agent として gpg-agent をロードする (省略可能、ssh-agent として gpg-agent を使いたい場合のみ使用してください)
SSH_AGENT_PID DEFAULT=
SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh"

GDM でタップによるクリックを有効化する

GDM の環境ではデフォルトでタップによるクリックが無効化されています。この機能を有効化するには、gdm ユーザに対して GNOME オプション org.gnome.desktop.peripherals.touchpad tap-to-click を設定する必要があります。

gdm が X サーバにアクセスするために権限を与えてください:

user $xhost +SI:localuser:gdm

次に gdm ユーザとしてタップによるクリックを有効化するための gsettings 設定値を設定してください:

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

新しい設定は GDM サービスを再起動した後から反映されます。

GNOME Wayland セッションを起動しようとすると GDM がクラッシュする

問題: GNOME Wayland セッションを起動しようとすると GDM がクラッシュする。gdm-3.32.0 以降が影響されることが知られています。

Cause: 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.

解決策: この問題にはいくつかの解決策があります:

  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 (GRUB, 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:
ファイル /lib/udev/rules.d/61-gdm.rules
# 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"

複数のビデオドライバがロードされていると GDM が真っ黒の画面を表示する

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 the secondary GPU driver at load-time:

ファイル /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. It will then be possible to switch back to GDM and start the WM, which if it can accept more than one GPU driver will utilize them.

GDM がキーボードレイアウトを無視している

GDM は通常、可能であればシステムのキーボード設定を取得するために systemd を使用します。できない場合は GDM X の設定を使用するでしょう。しかしながら、Gentoo の非 systemd GNOME プロファイルは OpenRC と Wayland をデフォルトとしているため、どちらも機能しないかもしれません。その場合 GDM はデフォルトの us キーボードを使用し、それが期待するレイアウトでないとパスワードを入力するのが難しくなるでしょう。

この場合は、gdm ユーザのキーボードレイアウトを設定してください。これは Gnome 設定 (gnome-control-center) を開いて行うことができます。gdm の言語を設定するために、地域と言語 (Region & Language) パネルの右上にログイン画面 (Login Screen) トグルボタンがあります。

残念ながら、このログイン画面 (Login Screen) ボタンはすべてのインストールで現れるとは限らないようです (なぜ?)。その場合は、コマンドラインから設定を変更してください。

例えばフランス語キーボードを使用したい場合は、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 $# ここで [('xkb', 'fr')] が表示されるはずです
gdm $exit

この解決策が機能しない場合は、Gnome shell がシステムのキーボードではなくセッション内で定義されたキーボードを使用するように、パッチを当ててください。次のファイルを作成するだけです:

ファイル /etc/portage/patches/gnome-base/gnome-shell/greeter-keyboard.patch
diff -Naur a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
--- a/js/ui/status/keyboard.js	2022-02-15 20:42:00.615129000 +0100
+++ b/js/ui/status/keyboard.js	2022-02-15 20:42:00.615129000 +0100
@@ -328,10 +328,7 @@
                                   Meta.KeyBindingFlags.IS_REVERSED,
                                   Shell.ActionMode.ALL,
                                   this._switchInputSource.bind(this));
-        if (Main.sessionMode.isGreeter)
-            this._settings = new InputSourceSystemSettings();
-        else
-            this._settings = new InputSourceSessionSettings();
+        this._settings = new InputSourceSessionSettings();
         this._settings.connect('input-sources-changed', this._inputSourcesChanged.bind(this));
         this._settings.connect('keyboard-options-changed', this._keyboardOptionsChanged.bind(this));

そして Gnome shell を再インストールしてください:

root #emerge -1 gnome-shell

関連項目

  • GNOME/Guide — インストール、設定、そして使用方法を含め、GNOME のすべての側面を記述することを試みます。

外部資料