diff options
author | Ray Strode <rstrode@redhat.com> | 2022-02-14 17:03:09 -0500 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2022-02-15 09:06:44 -0500 |
commit | b2d6ccee16df921af515efd559dcf59d5b2d0d99 (patch) | |
tree | 17fd29e1fec56733f83df1cb9729c9a25cc2527c /data/61-gdm.rules.in | |
parent | 7661ffceaa8e0e19d129d5376546438af56f7750 (diff) | |
download | gdm-b2d6ccee16df921af515efd559dcf59d5b2d0d99.tar.gz |
data: Don't race with vendor nvidia driver at startup
The vendor nvidia driver has two modules loaded
at startup.
It's not uncommon for the second module to still
be loading when GDM starts.
Our udev rule relies on the second module to set
up GDM's boot configuration.
This commit adds some synchronization to stall
GDM a bit if the vendor driver is still coming
up.
https://gitlab.gnome.org/GNOME/gdm/-/issues/763
Diffstat (limited to 'data/61-gdm.rules.in')
-rw-r--r-- | data/61-gdm.rules.in | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in index e9c72697..9451c12e 100644 --- a/data/61-gdm.rules.in +++ b/data/61-gdm.rules.in @@ -9,6 +9,15 @@ DRIVERS=="simple-framebuffer", GOTO="gdm_nomodeset_end" IMPORT{cmdline}="nomodeset", GOTO="gdm_disable_wayland" LABEL="gdm_nomodeset_end" +# The vendor nvidia driver has mutiple 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. +KERNEL!="nvidia", GOTO="gdm_nvidia_end" +SUBSYSTEM!="module", GOTO="gdm_nvidia_end" +ACTION!="add", GOTO="gdm_nvidia_end" +RUN+="@bindir@/touch /run/udev/gdm-waiting-on-udev" +LABEL="gdm_nvidia_end" + # Disable wayland when nvidia modeset is disabled or when drivers are a lower # version than 470, # For versions above 470 but lower than 510 prefer Xorg, @@ -30,10 +39,14 @@ GOTO="gdm_end" LABEL="gdm_prefer_xorg" RUN+="@libexecdir@/gdm-runtime-config set daemon PreferredDisplayServer xorg" -GOTO="gdm_end" +GOTO="gdm_stop_waiting_on_udev" LABEL="gdm_disable_wayland" RUN+="@libexecdir@/gdm-runtime-config set daemon WaylandEnable false" +GOTO="gdm_stop_waiting_on_udev" + +LABEL="gdm_stop_waiting_on_udev" +RUN+="@bindir@/rm -f /run/udev/gdm-waiting-on-udev" GOTO="gdm_end" LABEL="gdm_end" |