Bug 1962049

Summary: [Hyper-V][RHEL8.5]gdm: Guest with 1 vcpu start GUI failed on Hyper-V
Product: Red Hat Enterprise Linux 8 Reporter: HuijingHei <hhei>
Component: gdmAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED ERRATA QA Contact: HuijingHei <hhei>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.5CC: hdegoede, hhei, huzhao, mboisver, xuli, yacao, yuxisun
Target Milestone: betaKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gdm-40.0-2.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 19:34:38 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:
Attachments:
Description Flags
gdm debug log none

Description HuijingHei 2021-05-19 09:02:40 UTC
Description of problem:
On Hyper-V host, start VM with graphical.target with 1 vcpu, GUI start failed, but ssh works. 
1) Only reproduce with 1 vcpu with Gen1/Gen2 VM, can not reproduce with 2 or more vcpus
2) If booting VM with multi-user.target, login and execute 'startx', can start GUI. 
Find the problem is introduced by gdm-40.0-1.el8.x86_64, can not reproduce the problem with gdm-3.28.3-39.el8.x86_64

Version-Release number of selected components (if applicable):
Host: Hyper-V 2019
Guest: Gen1/Gen2

RHEL Version:
RHEL-8.5.0-20210518.n.1
kernel-4.18.0-305.6.el8.x86_64
gdm-40.0-1.el8.x86_64

How reproducible:
90%

Steps to Reproduce:
1. Set Gen1 VM on Hyper-V host with 1 vcpu, 8G memory
2. Start VM with graphical.target

Actual results:
GUI start failed

Expected results:
GUI start successfully with 1 vcpu

Additional info:
N/A

Comment 1 Ray Strode [halfline] 2021-05-19 09:51:38 UTC
can you set Enable=true in the [debug] section of /etc/gdm/custom.conf then reboot and attach the unfiltered output of 

journalctl -b

to this bug?

Comment 2 HuijingHei 2021-05-19 11:33:34 UTC
Created attachment 1784793 [details]
gdm debug log

Hi, attach logs according to comment #1

Comment 3 Ray Strode [halfline] 2021-05-19 17:59:29 UTC
hmm,

This looks related:

May 19 19:27:25 vm-197-89.lab.eng.pek2.redhat.com gdm[962]: Gdm: GdmManager: trying to register new display
May 19 19:27:25 vm-197-89.lab.eng.pek2.redhat.com gdm[962]: Gdm: GdmCommon: Found session c2 for PID 1641, using
May 19 19:27:25 vm-197-89.lab.eng.pek2.redhat.com gdm-x-session[1641]: Gdm: Could not register display: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: No display available
May 19 19:27:25 vm-197-89.lab.eng.pek2.redhat.com /usr/libexec/gdm-x-session[1641]: Unable to register display with display manager

So it's failing to register the display. I wonder if we're hitting a failure in fallback logic.

Does putting WaylandEnable=false in the [daemon] section of /etc/gdm/custom.conf make things start working?

Comment 4 Ray Strode [halfline] 2021-05-19 19:40:44 UTC
ah I see the problem, the workaround I have in place until bug 1642460 is resolved got misapplied to the wrong branch of an if statement when I rebased GDM.

Comment 5 HuijingHei 2021-05-20 01:16:13 UTC
(In reply to Ray Strode [halfline] from comment #3)
> hmm,
> 
> This looks related:
> 
> May 19 19:27:25 vm-197-89.lab.eng.pek2.redhat.com gdm[962]: Gdm: GdmManager:
> trying to register new display
> May 19 19:27:25 vm-197-89.lab.eng.pek2.redhat.com gdm[962]: Gdm: GdmCommon:
> Found session c2 for PID 1641, using
> May 19 19:27:25 vm-197-89.lab.eng.pek2.redhat.com gdm-x-session[1641]: Gdm:
> Could not register display:
> GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: No display available
> May 19 19:27:25 vm-197-89.lab.eng.pek2.redhat.com
> /usr/libexec/gdm-x-session[1641]: Unable to register display with display
> manager
> 
> So it's failing to register the display. I wonder if we're hitting a failure
> in fallback logic.
> 
> Does putting WaylandEnable=false in the [daemon] section of
> /etc/gdm/custom.conf make things start working?

GUI works well if add 'WaylandEnable=false' in the [daemon] section of /etc/gdm/custom.conf. Thanks!

Comment 6 HuijingHei 2021-05-20 01:53:36 UTC
Can not reproduce the problem with gdm-40.0-2.el8.x86_64. Thanks for your quick fix!

Comment 9 HuijingHei 2021-05-24 01:18:05 UTC
Verify passed with compose RHEL-8.5.0-20210521.n.1 ( with gdm-40.0-2.el8.x86_64 ), can not reproduce the problem

Comment 11 errata-xmlrpc 2021-11-09 19:34:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: GNOME security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4381