GDM Wayland 会话因 gnome-shell 错误而终止,未找到具有输出的 GPU(NVIDIA)

GDM Wayland 会话因 gnome-shell 错误而终止,未找到具有输出的 GPU(NVIDIA)

GDM 尝试启动 Wayland 会话,但 gnome-shell 因“未找到带输出的 GPU”而死机。因此,GDM 不提供 Wayland 会话的选择。

系统除了有另一块显卡外,还有 NVIDIA GPU。驱动程序:NVIDIA 535.154.05

  • /etc/gdm3/custom.conf:注释掉“WaylandEnable=false”行
  • 创建 /etc/modprobe.d/nvidia.conf 并添加“options nvidia-drm modeset=1”
  • 已移除/usr/lib/udev/rules.d/61-gdm.rules

lspci显示:

00:03.0 VGA compatible controller: ... Device 1111
00:1e.0 3D controller: NVIDIA Corporation TU104GL [Tesla T4] (rev a1)

摘录自journalctl -b

Feb 21 01:43:45 ord-pd-ldt04 gnome-shell[3872]: Device '/dev/dri/card0' prefers shadow buffer
Feb 21 01:43:45 ord-pd-ldt04 gnome-shell[3872]: Added device '/dev/dri/card0' (nvidia-drm) using non-atomic mode setting.
Feb 21 01:43:45 ord-pd-ldt04 dbus-daemon[3816]: [session uid=129 pid=3816] Successfully activated service 'org.gnome.Identity'
Feb 21 01:43:45 ord-pd-ldt04 dbus-daemon[729]: [system] Activating via systemd: service name='org.freedesktop.UPower' unit='upower.service' requested by ':1.54' (uid=129 pid=3870 comm="/usr/libexec/tracker-miner-fs-3 " label="unco>
Feb 21 01:43:45 ord-pd-ldt04 systemd[1]: Starting Daemon for power management...
Feb 21 01:43:45 ord-pd-ldt04 dbus-daemon[729]: [system] Successfully activated service 'org.freedesktop.UPower'
Feb 21 01:43:45 ord-pd-ldt04 systemd[1]: Started Daemon for power management.
Feb 21 01:43:45 ord-pd-ldt04 org.gnome.Shell.desktop[3872]: Failed to setup: No GPUs with outputs found
Feb 21 01:43:45 ord-pd-ldt04 gnome-session-binary[3847]: DEBUG(+): GsmAutostartApp: (pid:3872) done (status:1)
Feb 21 01:43:45 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[3847]: gnome-session-binary[3847]: DEBUG(+): GsmAutostartApp: (pid:3872) done (status:1)
Feb 21 01:43:45 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[3847]: gnome-session-binary[3847]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1
Feb 21 01:43:45 ord-pd-ldt04 gnome-session-binary[3847]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1

編輯:韦斯顿 尝试从 GDM 启动 Weston 会话。失败并显示“未找到 drm 设备”。

Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.071] weston 9.0.0
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]:                https://wayland.freedesktop.org
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]:                Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]:                Build: 9.0.0
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.071] Command line: weston
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.071] OS: Linux, 6.5.0-1014-aws, #14~22.04.1-Ubuntu SMP Thu Feb 15 15:27:06 UTC 2024, x86_64
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.071] Starting with no config file.
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.071] Output repaint window is 7 ms maximum.
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.072] Loading module '/usr/lib/x86_64-linux-gnu/libweston-9/drm-backend.so'
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.077] initializing drm backend
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.078] logind: session control granted
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.079] no drm device found
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.079] fatal: failed to create compositor backend

编辑:glxinfo glxinfo|grep vendor说:

server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation

编辑:未找到带输出的 GPU 这来自libmutter.so。函数是meta_monitor_manager_native_initable_init,产生错误消息的代码是

  if (manager_native->needs_outputs && !can_have_outputs)
    {
      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
                   "No GPUs with outputs found");
      return FALSE;
    }

构建了一个忽略错误的版本libmutter.so,但会产生空白屏幕。因此,无论它在寻找什么都是必要的。需要进一步深入挖掘才能找到根本原因。

答案1

让它工作了。我的问题可能是因为它是一个无头盒子。

  • 将 NVIDIA 驱动程序降级至 535.129.03。
  • Exec=将行更改/usr/share/wayland-sessions/gnome-wayland.desktopExec=gnome-shell --wayland --virtual-monitor 2056x1329

相关内容