How can I run a Qt applicaton on ivi-shell?

Johan Helsing johan.helsing at qt.io
Fri Dec 8 05:02:13 EST 2017


If your compositor only tells some of your clients about the ivi_application extension, something very weird is going on. I have no other suggestion than to maybe try another compositor...


Br,

Johan Helsing

________________________________
From: Yang Zhonghua <happy2discover at gmail.com>
Sent: Thursday, December 7, 2017 11:40:12 AM
To: Johan Helsing
Cc: zhangyang; genivi-ivi-layer-management at lists.genivi.org
Subject: Re: Re:How can I run a Qt applicaton on ivi-shell?

Hi

Thanks again!

After launching Weston(ivi-shell), I tried to launch weston-flower via serial port, which ran correctly. Here are the logs:

[2555529.654]  -> wl_display at 1.get_registry(new id wl_registry at 2)
[2555529.948]  -> wl_display at 1.sync(new id wl_callback at 3)
[2555534.082] wl_display at 1.delete_id(3)
[2555534.215] wl_registry at 2.global(1, "wl_compositor", 3)
[2555534.404]  -> wl_registry at 2.bind(1, "wl_compositor", 3, new id [unknown]@4)
[2555534.579] wl_registry at 2.global(2, "wl_subcompositor", 1)
[2555534.777]  -> wl_registry at 2.bind(2, "wl_subcompositor", 1, new id [unknown]@5)
[2555534.936] wl_registry at 2.global(3, "wl_scaler", 2)
[2555535.058] wl_registry at 2.global(4, "presentation", 1)
[2555535.179] wl_registry at 2.global(5, "wl_data_device_manager", 2)
[2555535.300]  -> wl_registry at 2.bind(5, "wl_data_device_manager", 2, new id [unknown]@6)
[2555535.471] wl_registry at 2.global(6, "wl_shm", 1)
[2555535.588]  -> wl_registry at 2.bind(6, "wl_shm", 1, new id [unknown]@7)
[2555535.738] wl_registry at 2.global(7, "wl_viv", 1)
[2555535.855] wl_registry at 2.global(8, "wl_viv", 1)
[2555535.970] wl_registry at 2.global(9, "wl_output", 2)
[2555536.091]  -> wl_registry at 2.bind(9, "wl_output", 2, new id [unknown]@8)
[2555536.238] wl_registry at 2.global(10, "wl_seat", 4)
[2555536.362]  -> wl_registry at 2.bind(10, "wl_seat", 4, new id [unknown]@9)
[2555536.525]  -> wl_data_device_manager at 6.get_data_device(new id wl_data_device at 10, wl_seat at 9)
[2555536.642]  -> wl_compositor at 4.create_surface(new id wl_surface at 11)
[2555536.791] wl_registry at 2.global(11, "wl_input_panel", 1)
[2555536.919] wl_registry at 2.global(12, "wl_input_method", 1)
[2555537.040] wl_registry at 2.global(13, "wl_text_input_manager", 1)
[2555537.158] wl_registry at 2.global(14, "ivi_application", 1)
[2555537.278]  -> wl_registry at 2.bind(14, "ivi_application", 1, new id [unknown]@12)
[2555537.427] wl_registry at 2.global(15, "ivi_hmi_controller", 1)
[2555537.543] wl_callback at 3.done(1)
[2555558.387]  -> wl_display at 1.get_registry(new id wl_registry at 3)
[2555558.572]  -> wl_display at 1.sync(new id wl_callback at 13)
[2555566.792] wl_display at 1.delete_id(13)
[2555566.893] wl_registry at 3.global(1, "wl_compositor", 3)
[2555567.044] wl_registry at 3.global(2, "wl_subcompositor", 1)
[2555567.173] wl_registry at 3.global(3, "wl_scaler", 2)
[2555567.296] wl_registry at 3.global(4, "presentation", 1)
[2555567.416] wl_registry at 3.global(5, "wl_data_device_manager", 2)
[2555567.538] wl_registry at 3.global(6, "wl_shm", 1)
[2555567.657] wl_registry at 3.global(7, "wl_viv", 1)
[2555567.783]  -> wl_registry at 3.bind(7, "wl_viv", 1, new id [unknown]@14)
[2555567.950] wl_registry at 3.global(8, "wl_viv", 1)
[2555568.076]  -> wl_registry at 3.bind(8, "wl_viv", 1, new id [unknown]@15)
[2555568.239] wl_registry at 3.global(9, "wl_output", 2)
[2555568.359] wl_registry at 3.global(10, "wl_seat", 4)
[2555568.478] wl_registry at 3.global(11, "wl_input_panel", 1)
[2555568.598] wl_registry at 3.global(12, "wl_input_method", 1)
[2555568.740] wl_registry at 3.global(13, "wl_text_input_manager", 1)
[2555568.859] wl_registry at 3.global(14, "ivi_application", 1)
[2555568.978] wl_registry at 3.global(15, "ivi_hmi_controller", 1)
[2555569.095] wl_callback at 13.done(1)
[2555639.915]  -> wl_shm at 7.create_pool(new id wl_shm_pool at 13, fd 10, 4096)
[2555640.539]  -> wl_shm_pool at 13.resize(8832)
[2555640.820]  -> wl_shm_pool at 13.resize(18624)
[2555692.105]  -> wl_compositor at 4.create_surface(new id wl_surface at 16)
[2555692.188]  -> ivi_application at 12.surface_create(9866, wl_surface at 16, new id ivi_surface at 17)
[2555692.265]  -> wl_compositor at 4.create_region(new id wl_region at 18)
[2555692.666]  -> wl_surface at 16.frame(new id wl_callback at 19)
[2555715.153]  -> wl_surface at 16.set_opaque_region(wl_region at 18)
[2555715.238]  -> wl_region at 18.destroy()
[2555715.622]  -> wl_viv at 15.create_buffer(new id wl_buffer at 20, 200, 200, 832, 212, 6, 10, 6)
[2555716.029] wl_shm at 7.format(0)
[2555716.065]  -> wl_surface at 16.frame(new id wl_callback at 21)
[2555716.163]  -> wl_surface at 16.attach(wl_buffer at 20, 0, 0)
[2555716.224]  -> wl_surface at 16.damage(0, 0, 200, 200)
[2555716.290]  -> wl_surface at 16.commit()
[2555716.398] wl_shm at 7.format(1)
[2555716.446] wl_shm at 7.format(909199186)
[2555716.481] wl_output at 8.geometry(0, 0, -1, -1, 0, "unknown", "DISP4 BG", 0)
[2555716.585] wl_output at 8.scale(1)
[2555716.618] wl_output at 8.mode(3, 1280, 800, 64216)
[2555716.680] wl_output at 8.done()
[2555716.707] wl_seat at 9.capabilities(6)
[2555716.742]  -> wl_seat at 9.get_keyboard(new id wl_keyboard at 22)
[2555716.784]  -> wl_seat at 9.get_touch(new id wl_touch at 23)
[2555716.825] wl_seat at 9.name<mailto:wl_seat at 9.name>("default")
[2555718.621] wl_display at 1.delete_id(18)
[2555718.665] wl_keyboard at 22.repeat_info(40, 400)
[2555718.732] wl_keyboard at 22.keymap(1, fd 10, 45094)
[2555732.262] wl_display at 1.delete_id(19)
[2555732.322] wl_display at 1.delete_id(21)
[2555732.356] wl_surface at 16.enter(wl_output at 8)
[2555732.391] wl_callback at 19.done(114213)
[2556050.266] ivi_surface at 17.configure(319, 364)
[2556050.413] ivi_surface at 17.configure(320, 365)
[2556050.524]  -> wl_compositor at 4.create_region(new id wl_region at 19)
[2556050.631]  -> wl_surface at 16.frame(new id wl_callback at 18)
[2556070.337]  -> wl_surface at 16.set_opaque_region(wl_region at 19)
[2556070.485]  -> wl_region at 19.destroy()
[2556070.938]  -> wl_viv at 15.create_buffer(new id wl_buffer at 24, 200, 200, 832, 212, 6, 11, 6)
[2556071.636] wl_callback at 21.done(114213)
[2556071.772]  -> wl_surface at 16.frame(new id wl_callback at 21)
[2556071.898]  -> wl_surface at 16.attach(wl_buffer at 24, 0, 0)
[2556072.040]  -> wl_surface at 16.damage(0, 0, 200, 200)
[2556072.194]  -> wl_surface at 16.commit()
[2556084.959] wl_display at 1.delete_id(19)
[2556085.073] wl_display at 1.delete_id(18)
[2556085.154] wl_display at 1.delete_id(21)
[2556085.228] wl_callback at 18.done(114570)

On Thu, Dec 7, 2017 at 5:38 PM, Johan Helsing <johan.helsing at qt.io<mailto:johan.helsing at qt.io>> wrote:

There's no wl_registry.global event for ivi-application in your log. This means the compositor didn't tell the client that it could use the ivi-application protocol, so it's probably not implemented or enabled in your compositor, hence the line:

Failed to load shell integration ivi-shell

I have no idea how you got other demos to work... Are you really sure they are running on ivi-shell. You could find out by running them with WAYLAND_DEBUG=1 as well and look for a wl_registry.bind request to ivi-application.

br,
Johan Helsing


________________________________
From: Yang Zhonghua <happy2discover at gmail.com<mailto:happy2discover at gmail.com>>
Sent: Thursday, December 7, 2017 4:21:46 AM
To: Johan Helsing
Cc: zhangyang; genivi-ivi-layer-management at lists.genivi.org<mailto:genivi-ivi-layer-management at lists.genivi.org>
Subject: Re: Re:How can I run a Qt applicaton on ivi-shell?

Hi Helsing,

First of all, thank you for your time.

I followed your advice with WAYLAND_DEBUG=1, here are the logs after executing "./hello-qt-quick2 -platform wayland":

[2068056.617]  -> wl_display at 1.get_registry(new id wl_registry at 2)
[2068057.204]  -> wl_display at 1.sync(new id wl_callback at 3)
[2068057.911] wl_display at 1.delete_id(3)
[2068058.083] wl_registry at 2.global(1, "wl_compositor", 3)
[2068058.286]  -> wl_registry at 2.bind(1, "wl_compositor", 3, new id [unknown]@4)
[2068058.481] wl_registry at 2.global(2, "wl_subcompositor", 1)
[2068058.638] wl_registry at 2.global(3, "wl_scaler", 2)
[2068058.782] wl_registry at 2.global(4, "presentation", 1)
[2068058.918] wl_registry at 2.global(5, "wl_data_device_manager", 2)
[2068059.099]  -> wl_registry at 2.bind(5, "wl_data_device_manager", 1, new id [unknown]@5)
[2068059.284] wl_registry at 2.global(6, "wl_shm", 1)
[2068059.421]  -> wl_registry at 2.bind(6, "wl_shm", 1, new id [unknown]@6)
[2068059.593] wl_registry at 2.global(7, "wl_viv", 1)
[2068059.731] wl_registry at 2.global(8, "wl_viv", 1)
[2068059.866] wl_registry at 2.global(9, "wl_output", 2)
[2068060.052]  -> wl_registry at 2.bind(9, "wl_output", 2, new id [unknown]@7)
[2068060.285]  -> wl_display at 1.sync(new id wl_callback at 8)
[2068060.386] wl_registry at 2.global(10, "wl_seat", 4)
[2068060.587]  -> wl_registry at 2.bind(10, "wl_seat", 3, new id [unknown]@9)
[2068060.814]  -> wl_data_device_manager at 5.get_data_device(new id wl_data_device at 10, wl_seat at 9)
[2068061.061] wl_registry at 2.global(11, "wl_input_panel", 1)
[2068061.215] wl_registry at 2.global(12, "wl_input_method", 1)
[2068061.353] wl_registry at 2.global(13, "wl_text_input_manager", 1)
[2068061.528]  -> wl_registry at 2.bind(13, "wl_text_input_manager", 1, new id [unknown]@11)
[2068061.709] wl_registry at 2.global(14, "wl_shell", 1)
[2068061.882]  -> wl_registry at 2.bind(14, "wl_shell", 1, new id [unknown]@12)
[2068062.060] wl_registry at 2.global(15, "xdg_shell", 1)
[2068062.210] wl_registry at 2.global(16, "desktop_shell", 3)
[2068062.351] wl_registry at 2.global(17, "workspace_manager", 1)
[2068062.490] wl_registry at 2.global(18, "screenshooter", 1)
[2068062.630] wl_callback at 3.done(3)
[2068063.154] wl_display at 1.delete_id(8)
[2068063.263] wl_output at 7.geometry(0, 0, -1, -1, 0, "unknown", "DISP4 BG", 0)
[2068063.519] wl_output at 7.scale(1)
[2068063.599] wl_output at 7.mode(3, 1280, 800, 64216)
[2068063.743] wl_output at 7.done()
[2068063.875] wl_callback at 8.done(3)
[2068063.957] wl_seat at 9.capabilities(0)
[2068064.034] wl_seat at 9.name<mailto:wl_seat at 9.name>("default")
[2068064.654]  -> wl_shm at 6.create_pool(new id wl_shm_pool at 8, fd 6, 4096)
[2068065.240]  -> wl_shm_pool at 8.resize(8832)
[2068065.527]  -> wl_shm_pool at 8.resize(18624)
Using Wayland-EGL
[2068132.476]  -> wl_display at 1.get_registry(new id wl_registry at 3)
[2068132.606]  -> wl_display at 1.sync(new id wl_callback at 13)
[2068133.003] wl_display at 1.delete_id(13)
[2068133.058] wl_registry at 3.global(1, "wl_compositor", 3)
[2068133.123] wl_registry at 3.global(2, "wl_subcompositor", 1)
[2068133.178] wl_registry at 3.global(3, "wl_scaler", 2)
[2068133.231] wl_registry at 3.global(4, "presentation", 1)
[2068133.282] wl_registry at 3.global(5, "wl_data_device_manager", 2)
[2068133.334] wl_registry at 3.global(6, "wl_shm", 1)
[2068133.384] wl_registry at 3.global(7, "wl_viv", 1)
[2068133.438]  -> wl_registry at 3.bind(7, "wl_viv", 1, new id [unknown]@14)
[2068133.508] wl_registry at 3.global(8, "wl_viv", 1)
[2068133.561]  -> wl_registry at 3.bind(8, "wl_viv", 1, new id [unknown]@15)
[2068133.629] wl_registry at 3.global(9, "wl_output", 2)
[2068133.681] wl_registry at 3.global(10, "wl_seat", 4)
[2068133.730] wl_registry at 3.global(11, "wl_input_panel", 1)
[2068133.780] wl_registry at 3.global(12, "wl_input_method", 1)
[2068133.830] wl_registry at 3.global(13, "wl_text_input_manager", 1)
[2068133.880] wl_registry at 3.global(14, "wl_shell", 1)
[2068133.929] wl_registry at 3.global(15, "xdg_shell", 1)
[2068133.978] wl_registry at 3.global(16, "desktop_shell", 3)
[2068134.028] wl_registry at 3.global(17, "workspace_manager", 1)
[2068134.078] wl_registry at 3.global(18, "screenshooter", 1)
[2068134.127] wl_callback at 13.done(3)
[2068326.444]  -> wl_compositor at 4.create_surface(new id wl_surface at 13)
Failed to load shell integration ivi-shell
[2068326.781]  -> wl_shell at 12.get_shell_surface(new id wl_shell_surface at 16, wl_surface at 13)
[2068326.911]  -> wl_shell_surface at 16.set_title("")
[2068326.996]  -> wl_shell_surface at 16.set_class("hello-qt-quick2")
[2068327.068]  -> wl_shell_surface at 16.set_toplevel()
[2068327.127]  -> wl_surface at 13.set_buffer_scale(1)
[2068327.272]  -> wl_surface at 13.set_buffer_transform(0)
[2068327.327]  -> wl_surface at 13.commit()
[2068341.556]  -> wl_compositor at 4.create_surface(new id wl_surface at 17)
[2068352.679]  -> wl_surface at 17.destroy()
[2068429.359]  -> wl_viv at 15.create_buffer(new id wl_buffer at 18, 326, 273, 1344, 212, 6, 25, 6)
[2068430.427]  -> wl_surface at 13.frame(new id wl_callback at 19)
[2068430.499]  -> wl_surface at 13.attach(wl_buffer at 18, 0, 0)
[2068430.559]  -> wl_surface at 13.damage(0, 0, 326, 273)
[2068430.619]  -> wl_surface at 13.commit()
[2068431.009] wl_display at 1.delete_id(17)
[2068431.061] wl_surface at 13.enter(wl_output at 7)

It is complicated for me to analyze the logs so far. Could you give me some hints?

B.R.&Thanks,

Yang Zhonghua
happy2discover at gmail.com<mailto:happy2discover at gmail.com>


On Wed, Dec 6, 2017 at 6:41 PM, Johan Helsing <johan.helsing at qt.io<mailto:johan.helsing at qt.io>> wrote:

Also, it's a good idea to post the application output, and also the output with WAYLAND_DEBUG=1, and perhaps a stack trace if appropriate.


It's hard to give meaningful advice when all we now is "couldn't run".


Br,

Johan Helsing

________________________________
From: genivi-ivi-layer-management <genivi-ivi-layer-management-bounces at lists.genivi.org<mailto:genivi-ivi-layer-management-bounces at lists.genivi.org>> on behalf of zhangyang <zhangyang-0206 at 163.com<mailto:zhangyang-0206 at 163.com>>
Sent: Wednesday, December 6, 2017 10:34:06 AM
To: Yang Zhonghua
Cc: genivi-ivi-layer-management at lists.genivi.org<mailto:genivi-ivi-layer-management at lists.genivi.org>
Subject: Re:How can I run a Qt applicaton on ivi-shell?

Hi yang:
1. If you want your qt application run with ivi-shell, you should export QT_WAYLAND_SHELL_INTEGRATION=ivi-shell first.

2. I don't know your qt version, if it is >= 5.7,  you can set QT_IVI_SURFACE_ID to specify ivi-surface-id for your qt app. follows this:

https://codereview.qt-project.org/#/c/121297/
else if it is <5.7, you should apply genivi-ivi patch here:   https://github.com/GENIVI/genivi-dev-platform/tree/master/meta-genivi-dev/meta-qt5


3. Be sure your ubuntu already have genivi-ivi-extension support



good luck!





At 2017-12-06 09:30:09, "Yang Zhonghua" <happy2discover at gmail.com<mailto:happy2discover at gmail.com>> wrote:
>Hi guys,
>
>I am new to wayland.
>
>[situation]
>The ivi-shell demo could run correctly on Ubuntu 17.10 so far.
>
>[goal]
>1. I made a hello-world Qt Quick2 application and tried to make it managed
>by ivi-shell.
>2. Two fullscreen applications could run on diffrent layers at the same
>time. The bottom one could show directly when the top one exits.
>
>[problem]
>I copied weston.ini in ivi-shell folder and added the following lines.
>
>[ivi-launcher]
>workspace-id=3
>icon-id=4010
>icon=/home/ubuntu/Downloads/weston/data/icon_ivi_hello-world-qt-quick2.png
>path=/home/ubuntu/Projects/hello-world-qt-quick2/hello-world-qt-quick2
>
>
>But the hello-world Qt Quick2 application couldn't run on ivi-shell.
>AFAIK, the Qt application should make a request to generate surface-id.
>Anybody knows how to do it? Thanks so much!
>
>I've been stuck for almost one month...
>_______________________________________________
>genivi-ivi-layer-management mailing list
>genivi-ivi-layer-management at lists.genivi.org<mailto:genivi-ivi-layer-management at lists.genivi.org>
>https://lists.genivi.org/mailman/listinfo/genivi-ivi-layer-management
_______________________________________________
genivi-ivi-layer-management mailing list
genivi-ivi-layer-management at lists.genivi.org<mailto:genivi-ivi-layer-management at lists.genivi.org>
https://lists.genivi.org/mailman/listinfo/genivi-ivi-layer-management





More information about the genivi-ivi-layer-management mailing list