<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Weston called from weston-launch loses permission to uaccess fb devices on tty switch back"
href="https://bugs.freedesktop.org/show_bug.cgi?id=73782#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Weston called from weston-launch loses permission to uaccess fb devices on tty switch back"
href="https://bugs.freedesktop.org/show_bug.cgi?id=73782">bug 73782</a>
from <span class="vcard"><a class="email" href="mailto:nerdopolis1@verizon.net" title="nerdopolis1@verizon.net">nerdopolis1@verizon.net</a>
</span></b>
<pre>This is the best workaround I can come up with.
I have it loop, because if fbdev_output_reenable is being called, and it's
failing to open the framebuffer device, it's probably because it's waiting for
udev to put permissions on the file again, assuming permissions to the
framebuffer device is granted with
SUBSYSTEM=="graphics", KERNEL=="fb*", TAG+="uaccess"
in a udev rules file
It's probably not merge worthy though?
diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
index 138aaab..7ebbe92 100644
--- a/src/compositor-fbdev.c
+++ b/src/compositor-fbdev.c
@@ -726,11 +726,14 @@ fbdev_output_reenable(struct fbdev_compositor
*compositor,
weston_log("Re-enabling fbdev output.\n");
/* Create the frame buffer. */
- fb_fd = fbdev_frame_buffer_open(output, output->device,
+ fb_fd = -1;
+ while (fb_fd < 0) {
+ usleep(10000);
+ fb_fd = fbdev_frame_buffer_open(output, output->device,
&new_screen_info);
- if (fb_fd < 0) {
- weston_log("Creating frame buffer failed.\n");
- goto err;
+ if (fb_fd < 0) {
+ weston_log("Creating frame buffer failed.\n");
+ }
}
/* Check whether the frame buffer details have changed since we were</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>