gdm 42.0-1ubuntu4 no longer shows Wayland option

Bug #1969243 reported by Kevin Keijzer
336
This bug affects 75 people
Affects Status Importance Assigned to Milestone
gdm3 (Ubuntu)
Fix Released
Critical
Jeremy Bícha
Jammy
Fix Released
Critical
Jeremy Bícha

Bug Description

Impact
------
Ubuntu Desktop 22.04 no longer offers Wayland

Test Case
---------
Install the update on a desktop or laptop without Nvidia or hybrid graphics that normally supports Wayland.

Restart the computer.

On the login screen, select your name.

A gear button should appear in the bottom right giving you the option for Ubuntu or Ubuntu on Xorg. Continue logging in to the Ubuntu session.

After log in, open the Settings app. Click at the bottom of the sidebar to open the About panel. The Windowing system should say Wayland.

Note
----
It is known that Wayland is not currently offered for Nvidia because the Nvidia drivers don't meet GNOME's standards for suspend and resuming from suspend. This issue is currently being tracked with LP: #1968929

How this was broken and fixed
-----------------------------
I took gdm 42.0-1ubuntu3 and removed the one cherrypicked patch we no longer needed. That required rebasing later patches. I made a mistake when rebasing.

To fix this, I returned to the known working 42.0-1ubuntu3, kept the patch but added a new patch at the end to revert the patch we don't need. This is a cleaner fix and will work better when we package the new GDM release where we will probably still need the revert patch.

Release Team, see the more minimal debdiff in comment 10.

Original Bug Report
-------------------

After updating gdm3 from 42.0-1ubuntu2 to 42.0-1ubuntu4 in jammy, it no longer shows any sessions in the bottom-right corner. When I log in, I am dropped into an X11 session, with no way to switch to Wayland.

Downgrading the gdm3, gir1.2-gdm-1.0 and libgdm1 packages to 42.0-1ubuntu2 or 42.0-1ubuntu3 restores the option to select sessions and defaults to Wayland again.

Looking at the changelog:

gdm3 (42.0-1ubuntu4) jammy; urgency=medium

  * Drop patch disabling Wayland on hybrid laptops using Nvidia's drivers.
    It's not needed for Ubuntu 22.04 LTS (LP: #1968809)

 -- Jeremy Bicha <email address hidden> Thu, 14 Apr 2022 14:29:35 -0400

However, all my machines are i915-only.

Tags: jammy patch
Kevin Keijzer (kkeijzer)
tags: added: jammy
Revision history for this message
Kevin Keijzer (kkeijzer) wrote :

When I outright delete /lib/udev/rules.d/61-gdm.rules it also works normally again with 42.0-1ubuntu4, so the problem is with one of the udev rules.

Revision history for this message
Jack Howarth (jwhowarth) wrote :

gdm3 (42.0-1ubuntu4) breaks using Wayland on a X570 UD v1.1 motherboard with 5600X processor and Nvidia GTX 1050 graphics card that worked perfectly under gdm3 (42.0-1ubuntu2). I filed a bug against gdm3 (42.0-1ubuntu4) while it was in proposed updates but the bug report was ignored and gdm3 (42.0-1ubuntu4) got pushed into the development release anyway.

42.0-1ubuntu4 blocks usage of Wayland on GTX 1050 graphics card
https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1969198

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gdm3 (Ubuntu):
status: New → Confirmed
Revision history for this message
Matthijs Kooijman (matthijskooijman) wrote :

I just reported https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1969250 which was marked as duplicate of this bug (which it is), but do check that bug for a bit more analysis on where the bug is. TL;DR: there are nvidia-specific checks in 61-gdm.rules that are no longer guarded by a check for nvidia hardware in the rules file (because the patch reversal in 42.0-1ubuntu4 removed that check).

As a workaround, you can edit /lib/udev/rules.d/61-gdm.rules and comment out or remove these lines:

## Check if suspend/resume services necessary for working wayland support is available
TEST{0711}!="/usr/bin/nvidia-sleep.sh", GOTO="gdm_disable_wayland"
TEST{0711}!="/usr/lib/systemd/system-sleep/nvidia", GOTO="gdm_disable_wayland"
IMPORT{program}="/bin/sh -c \"sed -e 's/: /=/g' -e 's/\([^[:upper:]]\)\([[:upper:]]\)/\1_\2/g' -e 's/[[:lower:]]/\U&/g' -e 's/^/NVIDIA_/' /proc/driver/nvidia/params\""
ENV{NVIDIA_PRESERVE_VIDEO_MEMORY_ALLOCATIONS}!="1", GOTO="gdm_disable_wayland"
IMPORT{program}="/bin/sh -c 'echo NVIDIA_HIBERNATE=`systemctl is-enabled nvidia-hibernate`'"
ENV{NVIDIA_HIBERNATE}!="enabled", GOTO="gdm_disable_wayland"
IMPORT{program}="/bin/sh -c 'echo NVIDIA_RESUME=`systemctl is-enabled nvidia-resume`'"
ENV{NVIDIA_RESUME}!="enabled", GOTO="gdm_disable_wayland"
IMPORT{program}="/bin/sh -c 'echo NVIDIA_SUSPEND=`systemctl is-enabled nvidia-suspend`'"
ENV{NVIDIA_SUSPEND}!="enabled", GOTO="gdm_disable_wayland"

Jeremy Bícha (jbicha)
Changed in gdm3 (Ubuntu):
importance: Undecided → Critical
status: Confirmed → Triaged
Jeremy Bícha (jbicha)
Changed in gdm3 (Ubuntu Jammy):
assignee: nobody → Jeremy Bicha (jbicha)
Jeremy Bícha (jbicha)
description: updated
Changed in gdm3 (Ubuntu Jammy):
status: Triaged → In Progress
description: updated
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Here is the minimal debdiff

description: updated
Revision history for this message
Jo-Erlend Schinstad (joerlend.schinstad-deactivatedaccount) wrote :

I have no session menu at all after upgrading to Jammy today. Is this the right bug report for it, or should I open a new one? It wasn't entirely clear to me from the description.

tags: added: patch
Revision history for this message
Matthijs Kooijman (matthijskooijman) wrote :

> I have no session menu at all after upgrading to Jammy today. Is this the right bug report for it, or should I open a new one? It wasn't entirely clear to me from the description.

Sounds like the same bug - if only one session is available, gdm hides the menu entirely I believe (I also have no menu anymore).

Revision history for this message
Matthijs Kooijman (matthijskooijman) wrote :

Jeremy, I'm not sure the fix is complete yet, did you test this? I believe our added patch still removes the nvidia-only guard block (leaving only the gdm_nvidia_end label, but no jump to it), so the nvidia suspend checks are still applied to other machines (which will not have e.g. /usr/bin/nvidia-sleep.sh and thus have wayland disabled).

I confirmed this by cloning ubuntu3 from salsa, applying your debdiff, applying all quilt patches, manually patching up data/61-gdm.rules.in (@libexec@ -> /usr/libexec) and installing that rules file. With that, I still see the problem - no wayland.

If I re-add the guard block (and reboot), I do get a wayland session as expected.

I've attached an updated debdiff against ubuntu3 that I succesfully tested with.

Note that in addition to the guard block, it also leaves in this comment and run line that I'm not sure is relevant anymore, but I'll leave that for you to judge:

# The vendor nvidia driver has multiple modules that need to be loaded before GDM can make an
# informed choice on which way to proceed, so force GDM to wait until NVidia's modules are
# loaded before starting up.
(...)
RUN+="/usr/bin/touch /run/udev/gdm-machine-has-vendor-nvidia-driver"

Revision history for this message
Eugene Savitsky (eugene-savitsky) wrote :

I am on an AMD A4-5400K, so it is not only some nvidia problem.

PS If you create a new user for the first login the gear with Wayland/X11 option is available. On the second login it disappears.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

I wasn't able to read the debdiff from Matthijs but I did read the comment so I've uploaded an updated version to the unapproved jammy queue. Here's the minimal debdiff from the working ubuntu3 version.

description: updated
Revision history for this message
Raymond Kimathi (rmkimathi) wrote :

Bug also affects basic intel Graphics also. Wayland completely disappeared.

CPU: Intel Pentium Silver N5000 (4) @ 2.700GHz
GPU: Intel GeminiLake [UHD Graphics 605]

Revision history for this message
Jack Howarth (jwhowarth) wrote :

Does the line...

IMPORT{program}="/bin/sh -c \"sed -e 's/: /=/g' -e 's/\([^[:upper:]]\)\([[:upper:]]\)/\1_\2/g' -e 's/[[:lower:]]/\U&/g' -e 's/^/NVIDIA_/' /proc/driver/nvidia/params\""

in /lib/udev/rules.d/61-gdm.rules parse correctly?

Adding /etc/modprobe.d/nvidia-hack.conf containing 'options nvidia NVreg_PreserveVideoMemoryAllocations=1', doesn't seem to make NVIDIA_PRESERVE_VIDEO_MEMORY_ALLOCATIONS available as an environmental despite the fact that manually executing...

/bin/sh -c "sed -e 's/: /=/g' -e 's/\([^[:upper:]]\)\([[:upper:]]\)/\1_\2/g' -e 's/[[:lower:]]/\U&/g' -e 's/^/NVIDIA_/' /proc/driver/nvidia/params"

produces "NVIDIA_PRESERVE_VIDEO_MEMORY_ALLOCATIONS=1"

Revision history for this message
Rafal (rjtskolasinski) wrote :

Is there any safe and easy workaround for regular users?

Could I just remove "lib/udev/rules.d/61-gdm.rules" for now?
Or is there a way to downgrade easily to gdm3 (42.0-1ubuntu2)?

Revision history for this message
Kevin Keijzer (kkeijzer) wrote :

You can just remove 61-gdm.rules yes.

Revision history for this message
Jack Howarth (jwhowarth) wrote (last edit ):

Alternatively, you can add a /etc/modprobe.d/nvidia-hack.conf file containing the line...

options nvidia NVreg_PreserveVideoMemoryAllocations=1

and work around the apparently broken line...

IMPORT{program}="/bin/sh -c \"sed -e 's/: /=/g' -e 's/\([^[:upper:]]\)\([[:upper:]]\)/\1_\2/g' -e 's/[[:lower:]]/\U&/g' -e 's/^/NVIDIA_/' /proc/driver/nvidia/params\""

by adding...

ENV{NVIDIA_PRESERVE_VIDEO_MEMORY_ALLOCATIONS}="1"

after it in order to restore the use of Wayland under Nvidia.

Revision history for this message
DuckHook (duckhook) wrote :

The problem is not restricted to nVidia. As per the following reports in UbuntuForums: https://ubuntuforums.org/showthread.php?t=2473861&p=14090658#post14090658
…it is universal, effecting both Intel and AMD graphics too.

I worked around the bug using matthijskooijman's workaround in post 4 above.

Revision history for this message
Jack Howarth (jwhowarth) wrote :

So this isn't a single bug but multiple points of failure.

Revision history for this message
satmandu (satadru-umich) wrote :

Also seeing this issue on a Raspberry Pi 4B, so it isn't just limited to x86_64 arch...

Revision history for this message
Gone fishing (humpmihk-msn) wrote :

I have the same problem with an amdgpu. The problem goes away if I rename 61-gdm.rules.

Saeed (saeedp47)
Changed in gdm3 (Ubuntu Jammy):
status: In Progress → Confirmed
status: Confirmed → In Progress
status: In Progress → Confirmed
status: Confirmed → In Progress
status: In Progress → Confirmed
status: Confirmed → In Progress
Revision history for this message
Adam (obaidi2500) wrote :

I have the same problem that happened with Mesa Intel® Xe Graphics (TGL GT2)

Revision history for this message
Matthew M. Dean (fireculex) wrote :

Commenting out the Nvidia checks in 61-gdm.rules while only having an AMD card returned the wayland options in the login screen.

Changed in gdm3 (Ubuntu Jammy):
milestone: none → ubuntu-22.04
Revision history for this message
Umayr Saghir (nightmayr) wrote :

Same problem here using Intel Graphics:
Mesa Intel® Iris(R) Graphics 6100 (BDW GT3)

Relevant syslog portion?:
Apr 17 13:25:22 jammy systemd[3292]: Started GNOME Session Manager (session: ubuntu).
Apr 17 13:25:22 jammy systemd[3292]: Reached target GNOME Session Manager is ready.
Apr 17 13:25:22 jammy systemd[3292]: Starting GNOME Shell on Wayland...
Apr 17 13:25:22 jammy systemd[3292]: Starting GNOME Shell on X11...
Apr 17 13:25:22 jammy systemd[3292]: <email address hidden>: Skipped due to 'exec-condition'.
Apr 17 13:25:22 jammy systemd[3292]: Condition check resulted in GNOME Shell on Wayland being skipped.

Revision history for this message
exploder91 (d-cosner) wrote :

AMD graphics are also affected buy this bug, AMD RX 560. The workaround has corrected the issue and the system is back on Wayland as it should be.

Revision history for this message
Mokis (mokis22) wrote :

I have Intel UHD600 Mesa Driver. My Wayland back after modification in /lib/udev/rules.d/61-gdm.rules

LABEL="gdm_prefer_xorg"
#RUN+="/usr/libexec/gdm-runtime-config set daemon PreferredDisplayServer xorg"
#GOTO="gdm_end"

LABEL="gdm_disable_wayland"
RUN+="/usr/libexec/gdm-runtime-config set daemon WaylandEnable true"
GOTO="gdm_end"

LABEL="gdm_end"

Revision history for this message
Jeremy Bícha (jbicha) wrote (last edit ):

Yes, this bug disabled Wayland for everyone. So we don't need more reports confirming that it affects your Intel or AMD system. The bugfix is waiting for someone from the Ubuntu Release Team to accept it but it's a holiday weekend so it may take until tomorrow.

Revision history for this message
Dariusz Hildebrandt (dariusz.hildebrandt) wrote (last edit ):

I have a notebook ASUS ZenBook UM325SA KG076T with an AMD graphics card Renoir/Cezanne.
Since upgrading to gdm3 42.0-1ubuntu4, gdm no longer starts at all. All you see is a blinking cursor.
The file /var/lib/gdm3/.local/share/xorg/Xorg.0.log contains the following:
xf86OpenConsole: VT_ACTIVATE failed: Operation not permitted.
xf86CloseConsole: KDSETMODE failed: Operation not permitted
xf86CloseConsole: VT_SETMODE failed: Operation not permitted

Edit: deleting or renaming the file /lib/udev/rules.d/61-gdm.rules was the solution for me.

Jeremy Bícha (jbicha)
Changed in gdm3 (Ubuntu Jammy):
status: In Progress → Fix Committed
Revision history for this message
Jack Howarth (jwhowarth) wrote :

gdm3 42.0-1ubuntu6 is in proposed and Wayland is apparently going to be unavailable for the 22.04 LTS release. Cnet is going to have to rewrite its review.

Revision history for this message
Kevin Keijzer (kkeijzer) wrote :

Isn't this a release blocker? It most definitely should be in my opinion.

Revision history for this message
Jack Howarth (jwhowarth) wrote (last edit ):

Looks like Fedora 36 won't have this problem with Wayland on Nvidia because their associated rpmfusion packaging for xorg-x11-drv-nvidia adds a nvidia-power-management.conf with the following contents into /etc/modprobe.d...

#
# Save and restore all video memory allocations.
options nvidia NVreg_PreserveVideoMemoryAllocations=1
#
# The destination should not be using tmpfs, so we prefer
# /var/tmp instead of /tmp
options nvidia NVreg_TemporaryFilePath=/var/tmp

https://github.com/rpmfusion/xorg-x11-drv-nvidia/blob/master/nvidia-power-management.conf
https://github.com/rpmfusion/xorg-x11-drv-nvidia/blob/master/xorg-x11-drv-nvidia.spec

By comparison, Ubuntu hasn't even begun to package the nvidia power management support into their nvidia packaging. I suspect we aren't going to see this fixed until 22.10 ships and they can backport it.

Revision history for this message
David Forster (davegforster) wrote (last edit ):

I managed to get Wayland working on my Nvidia 3070 based machine by changing the below labels RUN command from 'false' to 'true' in "/lib/udev/rules.d/61-gdm.rules". This block is at the bottom of the file.

LABEL="gdm_disable_wayland"
RUN+="/usr/libexec/gdm-runtime-config set daemon WaylandEnable true"
# RUN+="/usr/libexec/gdm-runtime-config set daemon WaylandEnable false"
GOTO="gdm_end"

Patiently awaiting a proper fix :)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm3 - 42.0-1ubuntu6

---------------
gdm3 (42.0-1ubuntu6) jammy; urgency=medium

  * Fix Wayland no longer being available for everyone
    - Fix by adding a separate revert patch instead of trying to
      rebase the cherry-picked patches (LP: #1969243)
  * Please note that Wayland is not currently available for
    systems using the Nvidia graphics drivers because those drivers
    don't properly handle suspend and resuming from suspend. It is
    intended for those drivers to be fixed in a future stable release
    update for Ubuntu 22.04 LTS. See bug 1968929

 -- Jeremy Bicha <email address hidden> Fri, 15 Apr 2022 21:02:08 -0400

Changed in gdm3 (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
JF Lim (jflim) wrote :

After today's update of gdm3 to gdm3/jammy,now 42.0-1ubuntu6 arm64, on gdm3 greeter screen now have option of ubuntu, ubuntu on Xorg, gnome and gnome on xorg. Select "ubuntu" results in correct Wayland session.

Thank for resolving the bug.

Revision history for this message
Jack Howarth (jwhowarth) wrote :

What is Ubuntu's definition of a 'stable release update' in this case regarding Nvidia driver support for Wayland? Does this imply, as I fear, an update only after the fix has been deployed in another full Ubuntu release? If so, this would imply that we won't have Nvidia Wayland support until 22.10 is released.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Jeremy,

Suspend/resume has been broken for years on Nvidia and it's not specific to Wayland. See bug 1876632.

Or is there some other suspend/resume issue we're waiting on?

Revision history for this message
Jack Howarth (jwhowarth) wrote (last edit ):

As importantly, how can we even know whether the Nvidia power mananagement support is broken or working if the Ubuntu Nvidia packaging never starts nvidia-hibernate.service, nvidia-powerd.service, nvidia-resume.service and nvidia-suspend.service like rpmfusion on Fedora. Of course, we would need a /etc/modprobe.d/nvidia-power-management.conf to get NVreg_PreserveVideoMemoryAllocations=1. However, I'm still unconvinced that the current check for NVreg_PreserveVideoMemoryAllocations=1 in 61-gdm.rules is really functional. I looked at the Debian packaging for nvidia and I don't see any evidence that they have ever started those services.

Revision history for this message
Matthijs Kooijman (matthijskooijman) wrote :

@Jack, I'm not sure about nvidia support, but I do think that it is really unrelated to *this* particular bug (which is about a mistake in the rules file that caused the nvidia-specific rules to be applied to other systems, breaking wayland on non-nvidia systems, and which should be fixed now).

If you want to discuss wayland support for nvidia systems, maybe it would be good to do this in a separate bug report?

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Please use https://launchpad.net/bugs/1968929 as the tracker for Wayland not being an option for Ubuntu 22.04 with Nvidia graphics.

description: updated
Revision history for this message
Abdulrahman M. S. (saanina) wrote :

It's fixed now ..

Revision history for this message
Adam L (catfirmed) wrote :

Hi! Same problem here. Clean install, Nvidia-510 + new updates. GTX 960M
Still cannot login Wayland sessions on 22.04 after the updates. Missing Wayland login option.

Revision history for this message
Armando Bortoluso Moura (armandus) wrote :

Same problem here. Just made a clean Ubuntu 22.04 install and then ran the updater. No option to change to Wayland is given to me (the gear icon on the login screen). I have a hybrid Nvidia 1050 and a AMD Ryzen. This problem does not happen in Fedora 35/36.

Is the fixed published yet? If it is, it is NOT working and the bug IS NOT fixed.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Armando, you need gdm3 gdm3 42.0-1ubuntu7

That update is still being pushed out so it may not be available on your machine yet.

Once you have that version, you'll need to restart your computer.

Revision history for this message
Matthijs Kooijman (matthijskooijman) wrote :

Also, the bug that is described here is about things breaking on *non*-nvidia systems. If you have problems on nvidia systems, please do not add comments here, you are seeing another problem. See also https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1969243/comments/37, and if the bug referenced there does not match your problem, maybe consider opening a new bug report.

Revision history for this message
Armando Bortoluso Moura (armandus) wrote :

Jeremy, the update solved the issue for me. Thanks!

Revision history for this message
iGadget (igadget) wrote :

For anyone with supported (i.e. AMD) graphics who's not getting the option to use Wayland (in my case on Pop!_OS 22.04 upgraded from 21.04), this is how I got it working:
1. Edit /etc/gdm3/custom.conf and under [daemon] change WaylandEnable=false to WaylandEnable=true
2. Rename /lib/udev/rules.d/61-gdm.rules to 61-gdm.rules.DISABLED
3. Reboot your system.
Now, after(!) clicking the user you wish to use to log in, the cog appears on the lower right side, enabling you to choose the Wayland session.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Pop!_OS currently intentionally disables Wayland. Ubuntu doesn't have any control over that.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.