GNOME Bugzilla – Bug 789081
gdm should never try wayland on Cirrus chipset
Last modified: 2018-06-20 16:09:29 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"
Created attachment 361775 [details] [review] A proposed patch
Created attachment 361778 [details] [review] A proposed patch, updated version
Created attachment 367078 [details] [review] A proposed patch, rev 3
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.
(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)
Ray, Frederic, thank you very much for your reviews. Fix it accordingly.
Created attachment 367201 [details] [review] Support runtime configurations.
Created attachment 367202 [details] [review] udev rules to disable Wayland on Cirrus chipsets.
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,
Thanks, pushed.
This might have led to https://gitlab.gnome.org/GNOME/gdm/issues/394