Bug 2172291

Summary: Wayland is not accessible by UEFI VMs
Product: [Fedora] Fedora Reporter: Scott Beamer <scott.beamer>
Component: gdmAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 38CC: awilliam, gnome-sig, kparal, mclasen, philip.wyett, rstrode, scott.beamer
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: AcceptedFreezeException
Fixed In Version: gdm-43.0-6.fc38 gdm-43.0-7.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-05 23:46:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2083911    
Attachments:
Description Flags
GDM Logon screen with options displayed
none
SDDM Login screen with options displayed
none
Output of journalctl-b
none
Output of lspci -nn none

Description Scott Beamer 2023-02-21 21:08:00 UTC
Created attachment 1945601 [details]
GDM Logon screen with options displayed

I did a fresh installation of Fedora 38 Workstation in a VM today from the latest Live image. GDM lists no Wayland or X11 option -- just "GNOME" -- and logging with that puts me in an X11 session.

So, I installed the "KDE Plasma Workspaces" group. GDM then also isted Plasma as an option, but only under X11.  

I then switched from GDM to SDDM, and SDDM shows options for both KDE and GNOME under either X11 or Wayland.

If I select GNOME (Wayland) in SDDM and log in, I'm indeed logged into a GNOME session under Wayland.  If I select just plain “GNOME” it logs me in to an X11 session, like GDM did.

I did the reverse in the KDE Spin.   SDDM recognized both Wayland and X11. Then switching to GDM only gave me X11 as an option under either GNOME or KDE.

Screenshots attached.

Comment 1 Scott Beamer 2023-02-21 21:11:14 UTC
Created attachment 1945603 [details]
SDDM Login screen with options displayed

Comment 2 Scott Beamer 2023-02-23 01:02:35 UTC
I tried installing again, but this time in a VM on Windows 11 in Hyper-V and oddly enough, Wayland was the default but again it's nowhere to be found running in GNOME-boxes (QEMU) in Fedora 37.

Comment 3 Scott Beamer 2023-02-24 21:27:03 UTC
Created attachment 1946258 [details]
Output of journalctl-b

Comment 4 Scott Beamer 2023-02-24 21:28:08 UTC
Created attachment 1946259 [details]
Output of lspci -nn

Comment 5 Scott Beamer 2023-02-24 21:31:20 UTC
Per info provided here: 

https://lists.fedoraproject.org/archives/list/test@lists.fedoraproject.org/message/WDFFMPJBV5L5I7FO6TTJYI2DPZYEDB7I/

..I have attached the output of journalctl -b and "lspci -nn".

Comment 6 Scott Beamer 2023-02-24 21:33:24 UTC
Let me know if you need anything else.

Thanks.

Scott

Comment 7 Kamil Páral 2023-02-27 09:55:39 UTC
I wonder if this can be affected by the host hardware? I tested Boxes with Fedora-Workstation-Live-x86_64-38-20230226.n.0.iso and both the Live image and the installed system boot into Wayland by default (and all the expected GDM options are there). I have Thinkpad P1 Gen 3 with an Intel GPU. In Boxes, I left the defaults, which means 3D acceleration disabled and EFI disabled.

Comment 8 Scott Beamer 2023-02-27 16:35:04 UTC
(In reply to Kamil Páral from comment #7)
> I wonder if this can be affected by the host hardware? I tested Boxes with
> Fedora-Workstation-Live-x86_64-38-20230226.n.0.iso and both the Live image
> and the installed system boot into Wayland by default (and all the expected
> GDM options are there). I have Thinkpad P1 Gen 3 with an Intel GPU. In
> Boxes, I left the defaults, which means 3D acceleration disabled and EFI
> disabled.

I used the same host hardware (Dell Inspiron 5502 Laptop) for both.  I dual boot Fedora 37 and Windows 11 Pro.   Wayland showed up in GDM in Hyper-V (Windows) but not in GNOME Boxes.

However, I tried this again today with the same Live Image as you, and found that if I leave the default settings "as is" in GNOME Boxes, then I do get a Wayland session.

HOWEVER, if I start over and enable EFI in the GNOME Boxes settings, then I end up with X11.

I find this odd.  I always enable EFI if it's available.

I've never had this happen in the past with any other guest OS (including Fedora 37 and 36 alphas and betas).

Comment 9 Kamil Páral 2023-02-28 08:55:38 UTC
I can confirm this with both gnome-boxes and virt-manager. Enabling UEFI causes Wayland to be inaccessible, and therefore X11 is used. The guest VM (Fedora-Workstation-Live-x86_64-38-20230226.n.0.iso) contains:
gnome-shell-44~beta-2.fc38.x86_64
gdm-43.0-4.fc38.x86_64term

The same behavior is with Fedora 37 Workstation Live, so this is not a recent regression.

At the same time, booting F38 Workstation on bare metal through UEFI uses Wayland as expected (I tested 3 different machines).

Scott, would you be willing to report this problem upstream [1] and link it here? Thanks a lot!

[1] https://gitlab.gnome.org/GNOME/gnome-shell/

Comment 10 Scott Beamer 2023-03-01 18:18:20 UTC
I'm unclear as to where the problem lies.  GNOME Boxes, GDM, or GNOME Shell.

I further tested this yesterday with other Linux distros in GNOME Boxes.

Wayland was enabled on the GDM login screen in both Ubuntu 23.04 and Debian 12.  The default on the GDM login screen put me in a GNOME Wayland session on both

However, it was NOT there in openSUSE Tumbleweed.  I had the same problem as I did with a Fedora 38 guest.

The GNOME version on all of these is 43.3.

Also, as I mentioned earlier, the workaround for this problem is to use a different display manager.  In my case I switched from GDM to SDDM in the guest and a GNOME Wayland session was among the options to choose from.  I then can log into GNOME and indeed it's a Wayland session.

I may be wrong, but this sounds like a GDM-specific bug.

Comment 11 Kamil Páral 2023-03-01 19:05:12 UTC
Gnome Shell in upstream is the best place to report it, they can move it if needed. They have some heuristics when to hide the Wayland session and it doesn't seem to work well with UEFI VMs.

Comment 12 Ray Strode [halfline] 2023-03-01 21:15:07 UTC
it's actually probably an issue with the gdm udev rules.  can you post the output of ls -l /run/udev/ ?

Comment 13 Scott Beamer 2023-03-02 02:27:00 UTC
(In reply to Ray Strode [halfline] from comment #12)
> it's actually probably an issue with the gdm udev rules.  can you post the
> output of ls -l /run/udev/



$ ls -l /run/udev/
total 0
srw-------.  1 root root    0 Mar  1 10:17 control
drwxr-xr-x.  2 root root 5960 Mar  1 18:17 data
-rw-r--r--.  1 root root    0 Mar  1 10:17 gdm-machine-has-hardware-gpu
-rw-r--r--.  1 root root    0 Mar  1 10:17 gdm-machine-has-hybrid-graphics
-rw-r--r--.  1 root root    0 Mar  1 10:17 gdm-machine-has-virtual-gpu
drwxr-xr-x. 41 root root  820 Mar  1 10:17 links
drwxr-xr-x.  3 root root   60 Mar  1 10:17 static_node-tags
drwxr-xr-x.  8 root root  160 Mar  1 10:17 tags
drwxr-xr-x.  2 root root  200 Mar  1 10:17 watch

Comment 14 Ray Strode [halfline] 2023-03-02 04:02:28 UTC
i'm doing a build now that i think should fix it

Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=98177720

Comment 15 Fedora Update System 2023-03-02 04:13:50 UTC
FEDORA-2023-de02da0171 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-de02da0171

Comment 16 Kamil Páral 2023-03-02 08:36:57 UTC
Thanks, Ray! I can confirm this allows EFI VMs to run Wayland, both in virt-manager and gnome-boxes.

I'm going to propose this for a freeze exception, so that we can have this in Beta. I believe we try to default to Wayland everywhere possible these days, so it would make sense to publish Beta with this fix included. I haven't noticed any regressions in my testing.

Comment 17 Scott Beamer 2023-03-02 14:20:07 UTC
(In reply to Kamil Páral from comment #16)
> Thanks, Ray! I can confirm this allows EFI VMs to run Wayland, both in
> virt-manager and gnome-boxes.
> 
> I'm going to propose this for a freeze exception, so that we can have this
> in Beta. I believe we try to default to Wayland everywhere possible these
> days, so it would make sense to publish Beta with this fix included. I
> haven't noticed any regressions in my testing. 

I just tested it here, and Wayland is indeed back.  Thank you all.

Should this still be reported upstream?  You previously mentioned testing it with a Fedora 37 VM and having the same issue there as well.

Also, I previously mentioned it was a problem in at least one other Linux distro running in VMs in GNOME Boxes.

Comment 18 Ray Strode [halfline] 2023-03-02 14:28:27 UTC
it's upstream here: https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/198

Comment 19 Ray Strode [halfline] 2023-03-02 14:30:32 UTC
I guess we could put the same fix in f37...

Comment 20 Ray Strode [halfline] 2023-03-02 14:44:04 UTC
Fedora 37 update is here:  https://bodhi.fedoraproject.org/updates/FEDORA-2023-58e808cc4b

Comment 21 Scott Beamer 2023-03-02 14:47:41 UTC
Wonderful. Thanks Ray.

Comment 22 Adam Williamson 2023-03-02 22:21:11 UTC
+5 in https://pagure.io/fedora-qa/blocker-review/issue/1063 , marking accepted.

Comment 23 Fedora Update System 2023-03-03 02:21:55 UTC
FEDORA-2023-de02da0171 has been pushed to the Fedora 38 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-de02da0171

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 24 Fedora Update System 2023-03-04 02:34:25 UTC
FEDORA-2023-de02da0171 has been pushed to the Fedora 38 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-de02da0171

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 25 Fedora Update System 2023-03-05 23:46:13 UTC
FEDORA-2023-de02da0171 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.