[PATCH] compositor-fbdev: Wait and retry before failing on reconnect to the framebuffer

nerdopolis bluescreen_avenger at verizon.net
Wed May 13 19:19:23 PDT 2015


Resolving https://bugs.freedesktop.org/show_bug.cgi?id=73782
udev might be configured to set the permissions on framebuffer devices with the UACCESS attribute.
Weston currently attempts to reconnect to the framebuffer device before udev can set the permissions back.

It waits 3 times in case if the system is heavily paging, or slowed down, and prevents udev from working.
In my testing the delay is long enough where it works on the first try

This time with all the closing parenthesis
---
 man/weston.man       | 4 ++++
 src/compositor-drm.c | 5 ++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/man/weston.man b/man/weston.man
index c5dc2f2..fd12938 100644
--- a/man/weston.man
+++ b/man/weston.man
@@ -267,6 +267,10 @@ This allows launching Weston as a nested server.
 For Wayland clients, holds the file descriptor of an open local socket
 to a Wayland server.
 .TP
+.B WESTON_FORCE_SW_CURSORS
+Set this variable to force Weston to use software cursors when under the 
+compositor-drm backend
+.TP
 .B WESTON_CONFIG_FILE
 Weston sets this variable to the absolute path of the configuration file
 it loads, or to the empty string if no file is used. Programs that use
diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 0cdb8f4..4e5e2fc 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1641,7 +1641,10 @@ drm_output_init_egl(struct drm_output *output, struct drm_compositor *ec)
 		weston_log("cursor buffers unavailable, using gl cursors\n");
 		ec->cursors_are_broken = 1;
 	}
-
+	if (getenv("WESTON_FORCE_SW_CURSORS"))
+	{
+		ec->cursors_are_broken = 1;
+	}
 	return 0;
 }
 
-- 
2.1.0



More information about the wayland-devel mailing list