forked from pool/xorg-x11-server
Accepting request 311306 from home:1Antoine1:branches:X11:XOrg
- Fix GNOME X Session for some hybrid graphics (rh#1209347): + add U_systemd-logind-filter-out-non-signal-messages-from.patch + add U_systemd-logind-dont-second-guess-D-Bus-default-tim.patch OBS-URL: https://build.opensuse.org/request/show/311306 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=573
This commit is contained in:
parent
ac77ba8596
commit
88f56f77ff
96
U_systemd-logind-dont-second-guess-D-Bus-default-tim.patch
Normal file
96
U_systemd-logind-dont-second-guess-D-Bus-default-tim.patch
Normal file
@ -0,0 +1,96 @@
|
||||
From b1029716e41e252f149b82124a149da180607c96 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Thu, 16 Apr 2015 11:28:16 -0400
|
||||
Subject: systemd-logind: don't second guess D-Bus default timeout
|
||||
|
||||
At the moment, the X server uses a non-default timeout for D-Bus
|
||||
messages to systemd-logind. The only timeouts normally used with
|
||||
D-Bus are:
|
||||
|
||||
1) Infinite
|
||||
2) Default
|
||||
|
||||
Anything else is just as arbitrary as Default, and so rarely makes
|
||||
sense to use instead of Default.
|
||||
|
||||
Put another way, there's little reason to be fault tolerant against
|
||||
a local root running daemon (logind), that in some configurations, the
|
||||
X server already depends on for proper functionality.
|
||||
|
||||
This commit changes systemd-logind to just use the default timeouts.
|
||||
|
||||
Downstream-bug: https://bugzilla.redhat.com/show_bug.cgi?id=1209347
|
||||
Signed-off-by: Ray Strode <rstrode@redhat.com>
|
||||
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
|
||||
diff --git a/hw/xfree86/os-support/linux/systemd-logind.c b/hw/xfree86/os-support/linux/systemd-logind.c
|
||||
index 57c87c0..4ad41a3 100644
|
||||
--- a/hw/xfree86/os-support/linux/systemd-logind.c
|
||||
+++ b/hw/xfree86/os-support/linux/systemd-logind.c
|
||||
@@ -40,8 +40,6 @@
|
||||
|
||||
#include "systemd-logind.h"
|
||||
|
||||
-#define DBUS_TIMEOUT 500 /* Wait max 0.5 seconds */
|
||||
-
|
||||
struct systemd_logind_info {
|
||||
DBusConnection *conn;
|
||||
char *session;
|
||||
@@ -130,7 +128,7 @@ systemd_logind_take_fd(int _major, int _minor, const char *path,
|
||||
}
|
||||
|
||||
reply = dbus_connection_send_with_reply_and_block(info->conn, msg,
|
||||
- DBUS_TIMEOUT, &error);
|
||||
+ DBUS_TIMEOUT_USE_DEFAULT, &error);
|
||||
if (!reply) {
|
||||
LogMessage(X_ERROR, "systemd-logind: failed to take device %s: %s\n",
|
||||
path, error.message);
|
||||
@@ -207,7 +205,7 @@ systemd_logind_release_fd(int _major, int _minor, int fd)
|
||||
}
|
||||
|
||||
reply = dbus_connection_send_with_reply_and_block(info->conn, msg,
|
||||
- DBUS_TIMEOUT, &error);
|
||||
+ DBUS_TIMEOUT_USE_DEFAULT, &error);
|
||||
if (!reply)
|
||||
LogMessage(X_ERROR, "systemd-logind: failed to release device: %s\n",
|
||||
error.message);
|
||||
@@ -289,7 +287,7 @@ systemd_logind_ack_pause(struct systemd_logind_info *info,
|
||||
}
|
||||
|
||||
reply = dbus_connection_send_with_reply_and_block(info->conn, msg,
|
||||
- DBUS_TIMEOUT, &error);
|
||||
+ DBUS_TIMEOUT_USE_DEFAULT, &error);
|
||||
if (!reply)
|
||||
LogMessage(X_ERROR, "systemd-logind: failed to ack pause: %s\n",
|
||||
error.message);
|
||||
@@ -457,7 +455,7 @@ connect_hook(DBusConnection *connection, void *data)
|
||||
}
|
||||
|
||||
reply = dbus_connection_send_with_reply_and_block(connection, msg,
|
||||
- DBUS_TIMEOUT, &error);
|
||||
+ DBUS_TIMEOUT_USE_DEFAULT, &error);
|
||||
if (!reply) {
|
||||
LogMessage(X_ERROR, "systemd-logind: failed to get session: %s\n",
|
||||
error.message);
|
||||
@@ -492,7 +490,7 @@ connect_hook(DBusConnection *connection, void *data)
|
||||
}
|
||||
|
||||
reply = dbus_connection_send_with_reply_and_block(connection, msg,
|
||||
- DBUS_TIMEOUT, &error);
|
||||
+ DBUS_TIMEOUT_USE_DEFAULT, &error);
|
||||
if (!reply) {
|
||||
LogMessage(X_ERROR, "systemd-logind: TakeControl failed: %s\n",
|
||||
error.message);
|
||||
@@ -564,7 +562,7 @@ systemd_logind_release_control(struct systemd_logind_info *info)
|
||||
}
|
||||
|
||||
reply = dbus_connection_send_with_reply_and_block(info->conn, msg,
|
||||
- DBUS_TIMEOUT, &error);
|
||||
+ DBUS_TIMEOUT_USE_DEFAULT, &error);
|
||||
if (!reply) {
|
||||
LogMessage(X_ERROR, "systemd-logind: ReleaseControl failed: %s\n",
|
||||
error.message);
|
||||
--
|
||||
cgit v0.10.2
|
||||
|
36
U_systemd-logind-filter-out-non-signal-messages-from.patch
Normal file
36
U_systemd-logind-filter-out-non-signal-messages-from.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From 792e9251670ce94210df5c6d354059bbb97f4478 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Thu, 16 Apr 2015 11:28:15 -0400
|
||||
Subject: systemd-logind: filter out non-signal messages from message filter
|
||||
|
||||
It's possible to receive a message reply in the message filter if a
|
||||
previous message call timed out locally before the reply arrived.
|
||||
|
||||
The message_filter function only handles signals, at the moment, and
|
||||
does not properly handle message replies.
|
||||
|
||||
This commit changes the message_filter function to filter out all
|
||||
non-signal messages, including spurious message replies.
|
||||
|
||||
Downstream-bug: https://bugzilla.redhat.com/show_bug.cgi?id=1209347
|
||||
Signed-off-by: Ray Strode <rstrode@redhat.com>
|
||||
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
|
||||
diff --git a/hw/xfree86/os-support/linux/systemd-logind.c b/hw/xfree86/os-support/linux/systemd-logind.c
|
||||
index 49758f4..57c87c0 100644
|
||||
--- a/hw/xfree86/os-support/linux/systemd-logind.c
|
||||
+++ b/hw/xfree86/os-support/linux/systemd-logind.c
|
||||
@@ -313,6 +313,9 @@ message_filter(DBusConnection * connection, DBusMessage * message, void *data)
|
||||
dbus_int32_t major, minor;
|
||||
char *pause_str;
|
||||
|
||||
+ if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_SIGNAL)
|
||||
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
+
|
||||
dbus_error_init(&error);
|
||||
|
||||
if (dbus_message_is_signal(message,
|
||||
--
|
||||
cgit v0.10.2
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 8 15:21:18 UTC 2015 - antoine.belvire@laposte.net
|
||||
|
||||
- Fix GNOME X Session for some hybrid graphics (rh#1209347):
|
||||
+ add U_systemd-logind-filter-out-non-signal-messages-from.patch
|
||||
+ add U_systemd-logind-dont-second-guess-D-Bus-default-tim.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 3 15:36:00 UTC 2015 - msrb@suse.com
|
||||
|
||||
|
@ -175,6 +175,10 @@ Patch1162: b_cache-xkbcomp-output-for-fast-start-up.patch
|
||||
Patch1211: b_0001-Prevent-XSync-Alarms-from-senslessly-calling-CheckTr.patch
|
||||
Patch1222: b_sync-fix.patch
|
||||
|
||||
# PATCH-FIX-UPSTREAM U_systemd-logind-* rh#1209347 antoine.belvire@laposte.net -- Fix Gnome X session for some hybrid graphics
|
||||
Patch2000: U_systemd-logind-filter-out-non-signal-messages-from.patch
|
||||
Patch2001: U_systemd-logind-dont-second-guess-D-Bus-default-tim.patch
|
||||
|
||||
%description
|
||||
This package contains the X.Org Server.
|
||||
|
||||
@ -264,6 +268,9 @@ cp %{SOURCE90} .
|
||||
|
||||
%patch1000 -p1
|
||||
|
||||
%patch2000 -p1
|
||||
%patch2001 -p1
|
||||
|
||||
### disabled for now
|
||||
#%patch1162 -p1
|
||||
### disabled for now
|
||||
|
Loading…
Reference in New Issue
Block a user