After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 789081 - gdm should never try wayland on Cirrus chipset
gdm should never try wayland on Cirrus chipset
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
3.26.x
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2017-10-17 07:41 UTC by Felix Zhang
Modified: 2018-06-20 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A proposed patch (10.29 KB, patch)
2017-10-18 02:32 UTC, Felix Zhang
none Details | Review
A proposed patch, updated version (11.51 KB, patch)
2017-10-18 05:36 UTC, Felix Zhang
none Details | Review
A proposed patch, rev 3 (14.11 KB, patch)
2018-01-19 12:44 UTC, Felix Zhang
none Details | Review
Support runtime configurations. (13.37 KB, patch)
2018-01-22 09:17 UTC, Felix Zhang
none Details | Review
udev rules to disable Wayland on Cirrus chipsets. (1.38 KB, patch)
2018-01-22 09:18 UTC, Felix Zhang
committed Details | Review
Update: Support runtime configurations. (13.36 KB, patch)
2018-01-31 00:13 UTC, Yifan J
committed Details | Review

Description Felix Zhang 2017-10-17 07:41:52 UTC
The original bug was reported by Frederic Crozat on the SUSE bugzilla:

"Cirrus support in kernel / Mesa / Xorg is known to be broken when using wayland and we should ensure gdm will never try to start in wayland mode when this chipset is detected (it is often used in VM, for instance in openQA)

After discussing with upstream gdm, the suggestion to implement this is the following:

* implement in gdm a patch to check if /run/gdm/custom.conf exists (before /etc/gdm/custom.conf).
* ship a udev rules detecting Cirrus chipset which would create /run/gdm/custom.conf and write "WaylandEnable=false" in it"
Comment 1 Felix Zhang 2017-10-18 02:32:47 UTC
Created attachment 361775 [details] [review]
A proposed patch
Comment 2 Felix Zhang 2017-10-18 05:36:31 UTC
Created attachment 361778 [details] [review]
A proposed patch, updated version
Comment 3 Felix Zhang 2018-01-19 12:44:20 UTC
Created attachment 367078 [details] [review]
A proposed patch, rev 3
Comment 4 Ray Strode [halfline] 2018-01-19 15:51:55 UTC
Review of attachment 367078 [details] [review]:

::: configure.ac
@@ +1436,3 @@
+	GDM_RUNTIME_CONF="$withval"
+else
+	GDM_RUNTIME_CONF="$GDM_RUN_DIR/runtime.conf"

I think i'd rather it be called custom.conf (so we match the systemd style of having files of the same name in different directories cascade )

::: data/61-gdm.rules
@@ +2,3 @@
+ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", RUN+="/bin/sh -c '/bin/mkdir /run/gdm'"
+ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", RUN+="/bin/sh -c '/bin/echo [daemon] >> /run/gdm/runtime.conf'"
+ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", RUN+="/bin/sh -c '/bin/echo WaylandEnable=false >> /run/gdm/runtime.conf'"

This should be a separate commit.
Comment 5 Frederic Crozat 2018-01-19 15:56:32 UTC
(In reply to Ray Strode [halfline] from comment #4)
> Review of attachment 367078 [details] [review] [review]:

> ::: data/61-gdm.rules
> @@ +2,3 @@
> +ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8",
> ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100",
> RUN+="/bin/sh -c '/bin/mkdir /run/gdm'"
> +ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8",
> ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100",
> RUN+="/bin/sh -c '/bin/echo [daemon] >> /run/gdm/runtime.conf'"
> +ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8",
> ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100",
> RUN+="/bin/sh -c '/bin/echo WaylandEnable=false >> /run/gdm/runtime.conf'"
> 
> This should be a separate commit.

And the three shell calls can be combined into a single one:

"/bin/sh -c '/bin/mkdir /run/gdm ; /bin/echo [daemon]\nWaylandEnable=false >> /run/gdm/runtime.conf'" 

(to be tested)
Comment 6 Felix Zhang 2018-01-22 09:14:44 UTC
Ray, Frederic, thank you very much for your reviews. Fix it accordingly.
Comment 7 Felix Zhang 2018-01-22 09:17:46 UTC
Created attachment 367201 [details] [review]
Support runtime configurations.
Comment 8 Felix Zhang 2018-01-22 09:18:34 UTC
Created attachment 367202 [details] [review]
udev rules to disable Wayland on Cirrus chipsets.
Comment 9 Yifan J 2018-01-31 00:13:53 UTC
Created attachment 367669 [details] [review]
Update: Support runtime configurations.

While Felix has no constant working environment these days, after talking to him, I am helping on fixing a bug (typo) appeared in the patch Comment#7.

The issue will lead gdm skip GDM_CUSTOM_CONF at all for those chips not defined in udev rules:

--- 0001-common-Support-runtime-configurations.patch.ori        2018-01-31 08:13:08.528883787 +0800
+++ 0001-common-Support-runtime-configurations.patch    2018-01-31 08:04:30.151305304 +0800
@@ -185,7 +185,7 @@
          GObject *object;
  
 -        object = g_object_new (GDM_TYPE_SETTINGS_DESKTOP_BACKEND, NULL);
-+        if (!g_file_test (GDM_RUNTIME_CONF, G_FILE_TEST_IS_REGULAR))
++        if (!g_file_test (filename, G_FILE_TEST_IS_REGULAR))
 +                return NULL;
  
 +        object = g_object_new (GDM_TYPE_SETTINGS_DESKTOP_BACKEND,
Comment 10 Ray Strode [halfline] 2018-02-12 14:54:47 UTC
Thanks, pushed.
Comment 11 Debarshi Ray 2018-06-20 16:09:29 UTC
This might have led to https://gitlab.gnome.org/GNOME/gdm/issues/394