Accepting request 586753 from GNOME:Next
- Add gdm-xwayland-xauth.patch (bsc#1084737): Creates an Xauthority file and exports XAUTHORITY for Xwayland. - Add gdm-disable-wayland-on-mgag200-chipsets.patch: by falling back GNOME to X, the patch targets to provide a better user experiences for servers with mgag200 graphic chips, which suffer the sluggish keyboard/mouse issues running GNOME on wayland With the complexity of the problem, Wayland probably needs further track to get the specific hardware adapted. At the same time the issue itself is tracked in upstream (glgo#GNOME/mutter/issues/59), the better way for now to make SLE-15 working smoothly is to disable the chipset on Wayland OBS-URL: https://build.opensuse.org/request/show/586753 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdm?expand=0&rev=386
This commit is contained in:
parent
2f7c3b1398
commit
c8f08d7752
@ -1,14 +0,0 @@
|
||||
Index: gdm-3.19.92/libgdm/gdm-sessions.c
|
||||
===================================================================
|
||||
--- gdm-3.19.92.orig/libgdm/gdm-sessions.c
|
||||
+++ gdm-3.19.92/libgdm/gdm-sessions.c
|
||||
@@ -171,6 +171,9 @@ collect_sessions_from_directory (const c
|
||||
if (! g_str_has_suffix (filename, ".desktop")) {
|
||||
continue;
|
||||
}
|
||||
+ if (! g_strcmp0 (filename, "xsession.desktop")) {
|
||||
+ continue;
|
||||
+ }
|
||||
id = g_strndup (filename, strlen (filename) - strlen (".desktop"));
|
||||
|
||||
full_path = g_build_filename (dirname, filename, NULL);
|
161
gdm-xwayland-xauth.patch
Normal file
161
gdm-xwayland-xauth.patch
Normal file
@ -0,0 +1,161 @@
|
||||
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
|
||||
index 5e9eb5e..80cce87 100644
|
||||
--- a/daemon/Makefile.am
|
||||
+++ b/daemon/Makefile.am
|
||||
@@ -147,11 +147,13 @@ nodist_gdm_session_worker_SOURCES = \
|
||||
gdm-session-enum-types.h \
|
||||
$(NULL)
|
||||
|
||||
+## We need XLIB_LIBS for Xauth.
|
||||
gdm_wayland_session_LDADD = \
|
||||
$(top_builddir)/common/libgdmcommon.la \
|
||||
$(GTK_LIBS) \
|
||||
$(COMMON_LIBS) \
|
||||
$(SYSTEMD_LIBS) \
|
||||
+ $(XLIB_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
gdm_wayland_session_SOURCES = \
|
||||
diff --git a/daemon/gdm-wayland-session.c b/daemon/gdm-wayland-session.c
|
||||
index b648e9d..bfadf9b 100644
|
||||
--- a/daemon/gdm-wayland-session.c
|
||||
+++ b/daemon/gdm-wayland-session.c
|
||||
@@ -36,6 +36,8 @@
|
||||
|
||||
#include <gio/gunixinputstream.h>
|
||||
|
||||
+#include <X11/Xauth.h>
|
||||
+
|
||||
#define BUS_ADDRESS_FILENO (STDERR_FILENO + 1)
|
||||
|
||||
typedef struct
|
||||
@@ -47,6 +49,8 @@ typedef struct
|
||||
GDBusConnection *bus_connection;
|
||||
char *bus_address;
|
||||
|
||||
+ char *x_auth_file;
|
||||
+
|
||||
char **environment;
|
||||
|
||||
GSubprocess *session_subprocess;
|
||||
@@ -58,6 +62,102 @@ typedef struct
|
||||
guint32 debug_enabled : 1;
|
||||
} State;
|
||||
|
||||
+static FILE *
|
||||
+create_auth_file (char **filename)
|
||||
+{
|
||||
+ char *auth_dir = NULL;
|
||||
+ char *auth_file = NULL;
|
||||
+ int fd;
|
||||
+ FILE *fp = NULL;
|
||||
+
|
||||
+ auth_dir = g_build_filename (g_get_user_runtime_dir (),
|
||||
+ "gdm",
|
||||
+ NULL);
|
||||
+
|
||||
+ g_mkdir_with_parents (auth_dir, 0711);
|
||||
+ auth_file = g_build_filename (auth_dir, "Xauthority", NULL);
|
||||
+ g_clear_pointer (&auth_dir, g_free);
|
||||
+
|
||||
+ fd = g_open (auth_file, O_RDWR | O_CREAT | O_TRUNC, 0700);
|
||||
+
|
||||
+ if (fd < 0) {
|
||||
+ g_debug ("could not open %s to store auth cookie: %m",
|
||||
+ auth_file);
|
||||
+ g_clear_pointer (&auth_file, g_free);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ fp = fdopen (fd, "w+");
|
||||
+
|
||||
+ if (fp == NULL) {
|
||||
+ g_debug ("could not set up stream for auth cookie file: %m");
|
||||
+ g_clear_pointer (&auth_file, g_free);
|
||||
+ close (fd);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ *filename = auth_file;
|
||||
+out:
|
||||
+ return fp;
|
||||
+}
|
||||
+
|
||||
+static char *
|
||||
+prepare_auth_file (void)
|
||||
+{
|
||||
+ FILE *fp = NULL;
|
||||
+ char *filename = NULL;
|
||||
+ GError *error = NULL;
|
||||
+ gboolean prepared = FALSE;
|
||||
+ Xauth auth_entry = { 0 };
|
||||
+ char localhost[HOST_NAME_MAX + 1] = "";
|
||||
+
|
||||
+ g_debug ("Preparing auth file for X server");
|
||||
+
|
||||
+ fp = create_auth_file (&filename);
|
||||
+
|
||||
+ if (fp == NULL) {
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (gethostname (localhost, HOST_NAME_MAX) < 0) {
|
||||
+ strncpy (localhost, "localhost", sizeof (localhost) - 1);
|
||||
+ }
|
||||
+
|
||||
+ auth_entry.family = FamilyLocal;
|
||||
+ auth_entry.address = localhost;
|
||||
+ auth_entry.address_length = strlen (auth_entry.address);
|
||||
+ auth_entry.name = "MIT-MAGIC-COOKIE-1";
|
||||
+ auth_entry.name_length = strlen (auth_entry.name);
|
||||
+
|
||||
+ auth_entry.data_length = 16;
|
||||
+ auth_entry.data = gdm_generate_random_bytes (auth_entry.data_length, &error);
|
||||
+
|
||||
+ if (error != NULL) {
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ if (!XauWriteAuth (fp, &auth_entry) || fflush (fp) == EOF) {
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ auth_entry.family = FamilyWild;
|
||||
+ if (!XauWriteAuth (fp, &auth_entry) || fflush (fp) == EOF) {
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ prepared = TRUE;
|
||||
+
|
||||
+out:
|
||||
+ g_clear_pointer (&auth_entry.data, g_free);
|
||||
+ g_clear_pointer (&fp, fclose);
|
||||
+
|
||||
+ if (!prepared) {
|
||||
+ g_clear_pointer (&filename, g_free);
|
||||
+ }
|
||||
+
|
||||
+ return filename;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
on_bus_finished (GSubprocess *subprocess,
|
||||
GAsyncResult *result,
|
||||
@@ -333,6 +433,8 @@ spawn_session (State *state,
|
||||
g_subprocess_launcher_setenv (launcher, "DBUS_SESSION_BUS_ADDRESS", state->bus_address, TRUE);
|
||||
}
|
||||
|
||||
+ g_subprocess_launcher_setenv (launcher, "XAUTHORITY", state->x_auth_file, TRUE);
|
||||
+
|
||||
subprocess = g_subprocess_launcher_spawnv (launcher,
|
||||
(const char * const *) argv,
|
||||
&error);
|
||||
@@ -510,6 +612,8 @@ main (int argc,
|
||||
|
||||
g_unix_signal_add (SIGTERM, (GSourceFunc) on_sigterm, state);
|
||||
|
||||
+ state->x_auth_file = prepare_auth_file ();
|
||||
+
|
||||
ret = spawn_bus (state, state->cancellable);
|
||||
|
||||
if (!ret) {
|
24
gdm.changes
24
gdm.changes
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 14 01:59:30 CET 2018 - hpj@suse.com
|
||||
|
||||
- Add gdm-xwayland-xauth.patch (bsc#1084737): Creates an Xauthority
|
||||
file and exports XAUTHORITY for Xwayland.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 13 14:29:24 UTC 2018 - dimstar@opensuse.org
|
||||
|
||||
@ -7,18 +13,18 @@ Tue Mar 13 14:29:24 UTC 2018 - dimstar@opensuse.org
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 12 04:46:37 UTC 2018 - yfjiang@suse.com
|
||||
|
||||
- Add gdm-disable-wayland-on-mgag200-chipsets.patch: by falling
|
||||
back GNOME to X, the patch targets to provide a better user
|
||||
experiences for servers with mgag200 graphic chips, which suffer
|
||||
the sluggish keyboard/mouse issues running GNOME on wayland
|
||||
- Add gdm-disable-wayland-on-mgag200-chipsets.patch: by falling
|
||||
back GNOME to X, the patch targets to provide a better user
|
||||
experiences for servers with mgag200 graphic chips, which suffer
|
||||
the sluggish keyboard/mouse issues running GNOME on wayland
|
||||
(bsc#1073550 bsc#1077802). Some of the servers could not
|
||||
initiate GNOME in a similar context (bsc#1070933).
|
||||
|
||||
With the complexity of the problem, Wayland probably needs
|
||||
further track to get the specific hardware adapted. At the
|
||||
same time the issue itself is tracked in upstream
|
||||
(glgo#GNOME/mutter/issues/59), the better way for now to make
|
||||
SLE-15 working smoothly is to disable the chipset on Wayland
|
||||
With the complexity of the problem, Wayland probably needs
|
||||
further track to get the specific hardware adapted. At the
|
||||
same time the issue itself is tracked in upstream
|
||||
(glgo#GNOME/mutter/issues/59), the better way for now to make
|
||||
SLE-15 working smoothly is to disable the chipset on Wayland
|
||||
(bsc#1083609, bgo#794106).
|
||||
|
||||
In addition, the patch updates the comments section in
|
||||
|
7
gdm.spec
7
gdm.spec
@ -27,7 +27,7 @@ Release: 0
|
||||
Summary: The GNOME Display Manager
|
||||
License: GPL-2.0-or-later
|
||||
Group: System/GUI/GNOME
|
||||
Url: https://wiki.gnome.org/Projects/GDM
|
||||
URL: https://wiki.gnome.org/Projects/GDM
|
||||
Source: http://download.gnome.org/sources/gdm/3.28/%{name}-%{version}.tar.xz
|
||||
Source1: gdm.pamd
|
||||
Source2: gdm-autologin.pamd
|
||||
@ -40,8 +40,6 @@ Source6: gdmflexiserver-wrapper
|
||||
Source7: X11-displaymanager-gdm
|
||||
# GDM does not boostrap using gnome-autogen.sh, but has it's own bootstrap script
|
||||
Source8: autogen.sh
|
||||
# PATCH-FEATURE-OPENSUSE gdm-workaround-boo971852.patch zaitor@opensuse.org -- Work around boo971852 - xsessions is just not going to happen for a gdm user - Those users ALL have gnome-shell installed (which is mandatory for gdm to operate) - openSUSE only
|
||||
Patch0: gdm-workaround-boo971852.patch
|
||||
# PATCH-FIX-UPSTREAM gdm-disable-wayland-on-mgag200-chipsets.patch bgo#794106 bsc#1083609 yfjiang@suse.com -- Disable Wayland on mgag200 chipsets
|
||||
Patch1: gdm-disable-wayland-on-mgag200-chipsets.patch
|
||||
# WARNING: do not remove/significantly change patch3 without updating the relevant patch in accountsservice too
|
||||
@ -61,6 +59,8 @@ Patch41: gdm-plymouth-vt1.patch
|
||||
Patch42: gdm-fails-to-restart-gnome-shell.patch
|
||||
# PATCH-FIX-UPSTREAM gdm-add-runtime-option-to-disable-starting-X-server-as-u.patch bnc#1075805 bgo#793255 msrb@suse.com -- Add runtime option to start X under root instead of regular user. Necessary if no DRI drivers are present.
|
||||
Patch43: gdm-add-runtime-option-to-disable-starting-X-server-as-u.patch
|
||||
# PATCH-FIX-OPENSUSE gdm-xwayland-xauth.patch hpj@suse.com bsc#1084737 -- Create Xauthority file and export XAUTHORITY for Xwayland
|
||||
Patch44: gdm-xwayland-xauth.patch
|
||||
### NOTE: Keep please SLE-only patches at bottom (starting on 1000).
|
||||
# PATCH-FIX-SLE gdm-disable-gnome-initial-setup.patch bnc#1067976 qzhao@suse.com -- Disable gnome-initial-setup runs before gdm, g-i-s will only serve for CJK people to choose the input-method after login.
|
||||
Patch1002: gdm-disable-gnome-initial-setup.patch
|
||||
@ -203,6 +203,7 @@ cp %{SOURCE8} .
|
||||
%patch41 -p1
|
||||
%patch42 -p1
|
||||
%patch43 -p1
|
||||
%patch44 -p1
|
||||
# SLE-only patches start at 1000
|
||||
%if !0%{?is_opensuse}
|
||||
%patch1002 -p1
|
||||
|
Loading…
x
Reference in New Issue
Block a user