Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1008296: gdm3: No option to choose between gnome 42 wayland or x11, always goes x11

829 views
Skip to first unread message

Sebastián Lacuesta

unread,
Mar 26, 2022, 2:20:04 AM3/26/22
to
Package: gdm3
Version: 42.0-1
Severity: important
X-Debbugs-Cc: sebastia...@gmail.com

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

* What led up to the situation?
* What exactly did you do (or not do) that was effective (or
ineffective)?
* What was the outcome of this action?
* What outcome did you expect instead?

*** End of the template - remove these template lines ***

When selecting Gnome session, there's no X11 nor Wayland option and always
starts an X11 session. I'm using an amd gpu with an nvidia discrete card.

nvidia-smi output:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.60.02 Driver Version: 510.60.02 CUDA Version: 11.6 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... On | 00000000:01:00.0 Off | N/A |
| N/A 43C P8 5W / N/A | 6MiB / 6144MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 5395 G /usr/lib/xorg/Xorg 4MiB |
+-----------------------------------------------------------------------------+

I'd like to use the amd gpu with a wayland session and use the discrete card
only with chosen apps only.


-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (700, 'testing'), (699, 'unstable'), (698, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.16.0-5-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=es_UY.UTF-8, LC_CTYPE=es_UY.UTF-8 (charmap=UTF-8), LANGUAGE=es_UY:es
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gdm3 depends on:
ii accountsservice 22.07.5-1
ii adduser 3.121
ii dbus [default-dbus-system-bus] 1.14.0-1
ii dbus-bin 1.14.0-1
ii dbus-daemon 1.14.0-1
ii dconf-cli 0.40.0-3
ii dconf-gsettings-backend 0.40.0-3
ii debconf [debconf-2.0] 1.5.79
ii gir1.2-gdm-1.0 42.0-1
ii gnome-session [x-session-manager] 42.0-1
ii gnome-session-bin 42.0-1
ii gnome-session-common 42.0-1
ii gnome-settings-daemon 42.1-1
ii gnome-shell 42.0-1
ii gnome-terminal [x-terminal-emulator] 3.43.90-1
ii gsettings-desktop-schemas 42.0-1
ii libaccountsservice0 22.07.5-1
ii libaudit1 1:3.0.7-1+b1
ii libc6 2.33-7
ii libcanberra-gtk3-0 0.30-8
ii libcanberra0 0.30-8
ii libgdk-pixbuf-2.0-0 2.42.6+dfsg-2
ii libgdm1 42.0-1
ii libglib2.0-0 2.72.0-1
ii libglib2.0-bin 2.72.0-1
ii libgtk-3-0 3.24.33-1
ii libgudev-1.0-0 237-2
ii libkeyutils1 1.6.1-3
ii libpam-modules 1.4.0-11
ii libpam-runtime 1.4.0-11
ii libpam-systemd [logind] 250.4-1
ii libpam0g 1.4.0-11
ii librsvg2-common 2.52.5+dfsg-3+b1
ii libselinux1 3.3-1+b2
ii libsystemd0 250.4-1
ii libx11-6 2:1.7.2-2+b1
ii libxau6 1:1.0.9-1
ii libxcb1 1.14-3
ii libxdmcp6 1:1.1.2-3
ii lsb-base 11.1.0
ii mutter [x-window-manager] 42.0-1
ii policykit-1 0.120-6
ii procps 2:3.3.17-7+b1
ii systemd-sysv 250.4-1
ii tilix [x-terminal-emulator] 1.9.5-1
ii ucf 3.0043
ii x11-common 1:7.7+23
ii x11-xserver-utils 7.7+9
ii xterm [x-terminal-emulator] 372-1

Versions of packages gdm3 recommends:
ii at-spi2-core 2.44.0-3
ii desktop-base 11.0.3
ii gnome-session [x-session-manager] 42.0-1
ii x11-xkb-utils 7.7+5
ii xserver-xephyr 2:21.1.3-2+b1
ii xserver-xorg 1:7.7+23
ii zenity 3.41.0-2

Versions of packages gdm3 suggests:
pn libpam-fprintd <none>
ii libpam-gnome-keyring 40.0-3
pn libpam-pkcs11 <none>
pn libpam-sss <none>
ii orca 42.0-1

-- debconf information:
* shared/default-x-display-manager: gdm3
gdm3/daemon_name: /usr/sbin/gdm3

Sebastián Lacuesta

unread,
Apr 8, 2022, 5:30:03 PM4/8/22
to
Overwritting 61-gdm.rules with

ln -s /dev/null /etc/udev/rules.d/61-gdm.rules

solves the issue for me.
Now I have X11 and Wayland options back, tested Wayland and works great. I also can use new optimus environment variables to choose between discrete and integrated cards. For vulkan apps, the Nvidia card is selected first, but nothing I can't override by setting VK_ICD_FILENAMES environment variables for radv.

Let me know if I can help testing new defaults so this can be solved.

Regards
Sebastián

alban.b...@gmail.com

unread,
Aug 27, 2022, 2:30:03 AM8/27/22
to
On Fri, 8 Apr 2022 18:19:06 -0300 =?UTF-8?Q?Sebasti=C3=A1n_Lacuesta?=
<sebastia...@gmail.com> wrote:
> Overwritting 61-gdm.rules with
>
> ln -s /dev/null /etc/udev/rules.d/61-gdm.rules
>
> solves the issue for me.

regarding this file disables wayland if nvidia driver below 510 (which
is not your case) or modesetting is disabled, could you confirm you
have the nvidia_drm driver with modesetting disabled ?

cat /sys/module/nvidia_drm/parameters/modeset

and

grep nomodeset /proc/cmdline

> Let me know if I can help testing new defaults so this can be solved.
>
> Regards
> Sebastián

Cheers,

Alban

Sebastián Lacuesta

unread,
Sep 8, 2022, 4:30:03 PM9/8/22
to
Hi Alban,

My nvidia driver version: 510.85.02-1

cat /sys/module/nvidia_drm/parameters/modeset
N

grep nomodeset /proc/cmdline
<Empty>

Cheers,

Sebastián

alban.b...@gmail.com

unread,
Sep 19, 2022, 1:20:03 PM9/19/22
to
On Thu, 8 Sep 2022 17:22:00 -0300 =?UTF-8?Q?Sebasti=C3=A1n_Lacuesta?=
<sebastia...@gmail.com> wrote:
> Hi Alban,
>
> My nvidia driver version: 510.85.02-1
>
> cat /sys/module/nvidia_drm/parameters/modeset
> N


the gdm udev rules work how they ought to, ie:
/lib/udev/rules.d/61-gdm.rules "
# disable wayland if nvidia-drm modeset is not enabled
ATTR{parameters/modeset}!="Y", GOTO="gdm_disable_wayland"
"

a way around is
https://wiki.archlinux.org/title/GDM#Wayland_and_the_proprietary_NVIDIA_driver
ie https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting,
that is, add in /etc/default/grub to "GRUB_CMDLINE_LINUX_DEFAULT":
"nvidia_drm.modeset=1"
the run update-grub as root.

>
> grep nomodeset /proc/cmdline
> <Empty>
>
> Cheers,
>
> Sebastián
>
> El sáb, 27 ago 2022 a las 3:20, <alban.b...@gmail.com> escribió:
>
> > On Fri, 8 Apr 2022 18:19:06 -0300 =?UTF-
8?Q?Sebasti=C3=A1n_Lacuesta?=
> > <sebastia...@gmail.com> wrote:
> > > Overwritting 61-gdm.rules with
> > >
> > > ln -s /dev/null /etc/udev/rules.d/61-gdm.rules
> > >
> > > solves the issue for me.
> >


About drm modeset
https://ubuntuforums.org/showthread.php?t=1613132 "
The newest kernels have moved the video mode setting into the kernel.
So all the programming of the hardware specific clock rates and
registers on the video card happen in the kernel rather than in the X
driver when the X server starts.. This makes it possible to have high
resolution nice looking splash (boot) screens and flicker free
transitions from boot splash to login screen. Unfortunately, on some
cards this doesnt work properly and you end up with a black screen.
Adding the nomodeset parameter instructs the kernel to not load video
drivers and use BIOS modes instead until X is loaded.
"
So enabling Kernel Mode Setting might lead to a black screen before the
nvidia driver is loaded (gdm start) if the nvidia driver is broken (or
not loaded).



From https://wiki.archlinux.org/title/Wayland#XWayland 5.1 tells
enabling DRM KMS is required (for XWayland application only ?, ie most
games).



For early loading (console with optional "high resolution nice looking
splash (boot) screens and flicker free transitions from boot splash to
login screen") add in /etc/initramfs-tools/modules:
"nvidia nvidia_modeset nvidia_uvm nvidia_drm"
then run:
update-initramfs -u
(this only update the latest installed kernel), or for all kernels:
update-initramfs -u -k all
This if you want o try plymouth or want to set "GRUB_GFXMODE=" in
/etc/default/grub.

https://wiki.archlinux.org/title/kernel_mode_setting 2.1 tells that
NVIDIA kms has to be manually enabled (what we saw above).

All in all I do not believe this is software gdm bug that you cannot
start gdm in wayland mode with nvidia modesetting disabled (even if it
is disabled by default).

Can you confirm that with nvidia modeset enabled you do not need any
hack to start GDM in wayland mode (ie as i GDM shows gnome xorg and
wayland options)?
This is still an issue but a note on
/usr/share/doc/gdm3/README.Debian might be enough to clarify that on
nvidia setups one has to enable modeset on grub?

Kind regards,

Alban


PS: I still do not know if current NVIDIA driver default to not enable
modeset is really an issue for gnome wayland or if only helps with
screen flickers when switching from wyaland to console and helps with
advanced graphics on boot console.
Maybe this requirement could be removed, and in this case this bug
should be forwarded upstream.

Alban Browaeys

unread,
Sep 19, 2022, 1:40:04 PM9/19/22
to
About modeset, ie Kernel Mode Setting being required or not I found
this about https://wiki.archlinux.org/title/Wayland#Requirements 5.1
that "Enabling DRM KMS is required.". THe next link points to
https://download.nvidia.com/XFree86/Linux-x86_64/515.48.07/README/xwayland.html
which tells that:
"
Requirements

The following are necessary to enable accelerated rendering on Xwayland
with the NVIDIA driver:

- DRM KMS must be enabled. See Chapter 36, Direct Rendering Manager
Kernel Modesetting (DRM KMS) for details.

- The installed copy of Xwayland should be a build from the master
branch of https://gitlab.freedesktop.org/xorg/xserver at least as
recent as commit c468d34c. Note that if this requirement is not
satisfied, the NVIDIA GPU can still be used for rendering, however it
will fall back to a suboptimal path for presentation resulting in
degraded performance.

- libxcb version 1.13 or later must be present.

- egl-wayland version 1.1.7 or later must be present (if installed
separately from the the NVIDIA driver).

- If using the GNOME desktop environment, kms-modifiers must be
enabled through gsettings. This can be done with the following command
gsettings set org.gnome.mutter experimental-features [\"kms-
modifiers\"]

"

So currently, once logged in gnome wayland without modeset enabled, you
should not have Xwayland application (most games) running hardware
accelerated.
To not end up on software acceleration you have to enable KMS (by the
settings I sent you previously) and also setting an experimental
feature in the gnome session:
gsettings set org.gnome.mutter experimental-features [\"kms-modifiers\"]

maybe you can check if you are on software acceleration on Xwayland
with glxgears/glxinfo . Maybe you can send your glxinfo output without
nvidia modeset set and logged in a wayland session?


Kind regards,

Alban

Sebastián Lacuesta

unread,
Oct 5, 2022, 11:10:04 PM10/5/22
to
Now added nvidia_drm.modeset=1 as a kernel parameter and doing cat /sys/module/nvidia_drm/parameters/modeset gives me: Y
Still need to have the `ln -s /dev/null /etc/udev/rules.d/61-gdm.rules` hack in order to have Wayland properly. I do have the kms-modifiers activated too.
Versions of libxcb, egl-wayland are 1.15 and 1.1.10 respectively.

Issue starts by not having wayland options in gdm and in turn, my gnome session later.
0 new messages