On 28.09.2020 16:15, Tomasz Zyjewski wrote:
Hello,

I am using Weston with screen-share module. When a desktop shell is used the screen-share module works fine. In that scenario, the weston.ini file looks like
follow

```
[core]
shell=desktop-shell.so
modules=screen-share.so
backend=drm-backend.so

[screen-share]
command=/usr/bin/weston --backend=vnc-backend.so --shell=fullscreen-shell.so
output-id=0
```

The problem occurs when I try to use screen-share module with ivi-shell and
ivi-controller module from wayland-ivi-extension [1]. In that case, the
weston.ini file looks like that

```
[core]
shell=ivi-shell.so
modules=ivi-controller.so,ivi-output-controller.so,screen-share.so
require-input=false

[ivi-shell]
ivi-input-module=ivi-input-controller.so
ivi-client-name=/usr/bin/simple-weston-client
bkgnd-surface-id=1
bkgnd-color=0xFF000000

[screen-share]
command=/usr/bin/weston --backend=vnc-backend.so --shell=fullscreen-shell.so
output-id=0
```

and the screen share module loading fails with `No wl_shm found` error

```
[13:51:38.094] Screen share failed: No wl_shm found
```

In screen-share I use vnc-backend module [2] which is not merged yet, but the
same results can be obtained when rdp-backend is used.

It looks like screen-share module cannot find globals like `wl_compositor` and `wl_shm` when `wl_registry_add_listener` is called [3]. I can tell that none of the conditional statements are checked inside `registry_handle_global` function
[4].

What's more, if ivi-control module is not loaded and I just use ivi-shell then screen-share module loads successfully and `registry_handle_global` function is
executed.

Any suggestions on how to further debug why the globals are not available from
screen-share module in that scenario are highly appreciated.


It looks like the main issue is that the second weston instance is using the same config and tries to load the ivi modules (especially the ivi-controller module) as well. The solution would be to pass the --config switch in the command in the screen-share section, to
a different weston config (could likely be even an empty one).


Thank you

[1] https://github.com/GENIVI/wayland-ivi-extension/tree/9acdaa1a9c79558691b1513cc4917f2ced91af8a
[2] https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/362
[3] https://github.com/3mdeb/weston/blob/use_GL_RGBA/compositor/screen-share.c#L955 [4] https://github.com/3mdeb/weston/blob/use_GL_RGBA/compositor/screen-share.c#L711

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

--
Maciej Pijanowski
Embedded Systems Engineer
GPG: 9963C36AAC3B2B46
https://3mdeb.com | @3mdeb_com

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to