Skip to contentSkip to conversation

weston: fix fbdev backend.

PATCH New Eric Le Bihan 2 participants 2 messages Jan 16, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 weston: fix fbdev backend.

The compilation of the program weston-launcher is currently disabled, so the only way to launch Weston (on framebuffer) is to execute (as root):

  $ openvt -c 2 -s -- weston \
  	--backend=/usr/lib/weston/fbdev-backend.so \
	--tty=2 \
	--log=/tmp/weston.log

Unfortunately you will only end up with a black screen. The reason is given in the log file:

/dev/tty2 is already in graphics mode, is another display server running?

Here is the fix from upcoming version 1.4.

---
 ...weston-0004-fbdev-open-launcher-only-once.patch |   46 ++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 package/weston/weston-0004-fbdev-open-launcher-only-once.patch
package/weston/weston-0004-fbdev-open-launcher-only-once.patch new file +46 -0
new file mode 100644
index 0000000..eaf7e31
@@ -0,0 +1,46 @@
+From 1641d14b824df487bba23597aa128219c057df88 Mon Sep 17 00:00:00 2001
+From: David Herrmann <[email protected]>
+Date: Tue, 15 Oct 2013 14:29:57 +0200
+Subject: [PATCH] fbdev: open launcher only once
+
+We currently call launcher_connect() twice, which is redundant and
+amazingly works (ugh?). Fix this and connect only once to the launcher.
+
+Signed-off-by: Eric Le Bihan <[email protected]>
+---
+ src/compositor-fbdev.c |   12 ++----------
+ 1 file changed, 2 insertions(+), 10 deletions(-)
+
+diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
+index 002ce0b..4376345 100644
+--- a/src/compositor-fbdev.c
++++ b/src/compositor-fbdev.c
+@@ -883,15 +883,6 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[],
+ 	                           config) < 0)
+ 		goto out_free;
+
+-	/* Check if we run fbdev-backend using weston-launch */
+-	compositor->base.launcher =
+-		weston_launcher_connect(&compositor->base, param->tty);
+-	if (compositor->base.launcher == NULL && geteuid() != 0) {
+-		weston_log("fatal: fbdev backend should be run "
+-			   "using weston-launch binary or as root\n");
+-		goto out_compositor;
+-	}
+-
+ 	compositor->udev = udev_new();
+ 	if (compositor->udev == NULL) {
+ 		weston_log("Failed to initialize udev context.\n");
+@@ -905,7 +896,8 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[],
+ 	compositor->base.launcher =
+ 		weston_launcher_connect(&compositor->base, param->tty);
+ 	if (!compositor->base.launcher) {
+-		weston_log("Failed to set up launcher.\n");
++		weston_log("fatal: fbdev backend should be run "
++			   "using weston-launch binary or as root\n");
+ 		goto out_udev;
+ 	}
+
+--
+1.7.9.5
+
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 weston: fix fbdev backend.

Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Eric" == Eric Le Bihan <[email protected]> writes:

The compilation of the program weston-launcher is currently disabled, so the only way to launch Weston (on framebuffer) is to execute (as root):

  $ openvt -c 2 -s -- weston \
  	--backend=/usr/lib/weston/fbdev-backend.so \
	--tty=2 \
	--log=/tmp/weston.log
Quoted 8 lines

Unfortunately you will only end up with a black screen. The reason is given in the log file:

/dev/tty2 is already in graphics mode, is another display server running?

Here is the fix from upcoming version 1.4.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard