Subject: Status of ubuntumirclient platform plug-in

From: Darren Landoll <[email-masked]>
Date: Sun, 15 Nov 2015 08:09:58 -0500

What is the current status of keyboard and touch input for the Mir
server and Qt QPA ubuntumirclient plug-in on Snappy 15.04?

I can enable touch spots on the Mir server and verify that touches are
detected, but my Qt/QML application doesn't appear to be notified.

Keyboard input is also not working, so not sure if I'm missing some
configuration or env variables...

---

From: Gerry Boland <[email-masked]>
Date: Mon, 16 Nov 2015 23:29:06 +0000

> configuration or env variables...

Hi Darren,
the ubuntumirclient QPA has had working touch and keyboard input well
before 15.04. Mouse events however were only more recently wired up. How
exactly are you testing? mir_demo_server with a qml file?
-G

---

From: Darren Landoll <[email-masked]>
Date: Mon, 16 Nov 2015 21:38:05 -0500

> exactly are you testing? mir_demo_server with a qml file?

Yes, I'm testing with the mir_demo_server snap from the store (snap1.1
mvp-demo version). I am using a QML based application that implements
it's own main() and loads QML files as resources.

I have not tested with a QML file loaded by qmlscene in a snap though.

---

From: Darren Landoll <[email-masked]>
Date: Tue, 17 Nov 2015 18:09:05 -0500

> I have not tested with a QML file loaded by qmlscene in a snap though.

I have now tested with the qmldemo snapcraft example, which included
changes to the demo.qml file to accept keyboard input. I see no
keyboard or touch input with that example either.

I generated my own mir server snap against the latest binaries/libs on
my 15.04 machine and get this error thrown by the mir client code when
starting up (I've ran into this in the past and found no resolution,
only the mir.mvp-demo version ever works for me).

(amd64)ubuntu@localhost:~$ qmldemo.qmldemo
Loading module: 'libubuntu_application_api_desktop_mirclient.so.2.9.0'
[1447801020.353893] Loader: Loading modules from:
/apps/qmldemo.sideload/IFdgGKbPPACa/usr/lib/x86_64-linux-gnu/mir/client-platform
[1447801020.354474] Loader: Loading module:
/apps/qmldemo.sideload/IFdgGKbPPACa/usr/lib/x86_64-linux-gnu/mir/client-platform/mesa.so.2
UbuntuWindow - regular geometry
terminate called after throwing an instance of
'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error>
>'
  what():  Unexpectedly received fds
Aborted

---

From: Darren Landoll <[email-masked]>
Date: Thu, 19 Nov 2015 22:06:59 -0500

I set MIR_CLIENT_INPUT_RECEIVER_REPORT=log when running the qmldemo
example and observed the following...

1) After startup I tried pressing keys on the keyboard, no debug
output was shown.

2) Touches on the screen show output like the following, but are not
recognized by the application

[1447986965.586126] <DEBUG> input-receiver: Received event:
MirTouchInputEvent{
  type: touch
  device_id: 10
  modifiers: 1
  event_time: 1447986965585412000 (0.610806 ms ago)
  touch_count: 1
  touch[0]{
    id: 0
    x: 94.5
    y: 95.625
    touch_major: 0
    touch_minor: 0
    size: 0
    pressure: 1
    tool_type: 1
  }
}

3) Movement of the mouse shows no debug output until a mouse button is
pressed. After a mouse button is pressed however, there is no more
debug displayed for touches (even after restarting the application).

[1447986979.812611] <DEBUG> input-receiver: Received event:
MirPointerInputEvent {
  device_id: 7
  action: 1
  event_time: 1447986979812013000 (0.590834 ms ago)
}
[1447986979.924363] <DEBUG> input-receiver: Received event:
MirPointerInputEvent {
  device_id: 7
  action: 0
  event_time: 1447986979924006000 (0.344158 ms ago)
}
[1447986979.924469] <DEBUG> input-receiver: Received event:
MirPointerInputEvent {
  device_id: 7
  action: 2
  event_time: 1447986979924006000 (0.455595 ms ago)
}
[1447986979.939492] <DEBUG> input-receiver: Received event:
MirPointerInputEvent {
  device_id: 7
  action: 4
  event_time: 1447986979924006000 (15.472503 ms ago)
}

---

From: Darren Landoll <[email-masked]>
Date: Sat, 21 Nov 2015 10:05:53 -0500

After building a custom libqpa-ubuntumirclient.so with debug, I get
the following output but don't see any additional Qt debug output when
touching the screen or pressing keyboard keys...

(amd64)ubuntu@localhost:/apps/qmldemo.sideload/current/usr/lib/x86_64-linux-gnu$
qmldemo.qmldemo
Loading module: 'libubuntu_application_api_touch_mirclient.so.2.9.0'
[1448116913.845005] Loader: Loading modules from:
/apps/qmldemo.sideload/IFgMMfEGAQTY/usr/lib/x86_64-linux-gnu/mir/client-platform
[1448116913.853444] Loader: Loading module:
/apps/qmldemo.sideload/IFgMMfEGAQTY/usr/lib/x86_64-linux-gnu/mir/client-platform/mesa.so.2
EGL vendor: Mesa Project
EGL version: 1.4 (DRI2)
EGL extensions: EGL_MESA_drm_image EGL_MESA_configless_context
EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_image
EGL_KHR_get_all_proc_addresses EGL_KHR_gl_texture_2D_image
EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image
EGL_KHR_surfaceless_context EGL_KHR_create_context EGL_EXT_buffer_age
EGL_EXT_swap_buffers_with_damage EGL_EXT_image_dma_buf_import
EGL configuration attibutes:
  EGL_BUFFER_SIZE: 32
  EGL_ALPHA_SIZE: 8
  EGL_BLUE_SIZE: 8
  EGL_GREEN_SIZE: 8
  EGL_RED_SIZE: 8
  EGL_DEPTH_SIZE: 24
  EGL_STENCIL_SIZE: 8
  EGL_CONFIG_CAVEAT: 12344
  EGL_CONFIG_ID: 9
  EGL_LEVEL: 0
  EGL_MAX_PBUFFER_HEIGHT: 0
  EGL_MAX_PBUFFER_PIXELS: 0
  EGL_MAX_PBUFFER_WIDTH: 0
  EGL_NATIVE_RENDERABLE: 1
  EGL_NATIVE_VISUAL_ID: 0
  EGL_NATIVE_VISUAL_TYPE: 12344
  EGL_SAMPLES: 0
  EGL_SAMPLE_BUFFERS: 0
  EGL_SURFACE_TYPE: 4
  EGL_TRANSPARENT_TYPE: 12344
  EGL_TRANSPARENT_BLUE_VALUE: 0
  EGL_TRANSPARENT_GREEN_VALUE: 0
  EGL_TRANSPARENT_RED_VALUE: 0
  EGL_BIND_TO_TEXTURE_RGB: 0
  EGL_BIND_TO_TEXTURE_RGBA: 0
  EGL_MIN_SWAP_INTERVAL: 0
  EGL_MAX_SWAP_INTERVAL: 0
ubuntumirclient: setting swap interval to 1
ubuntumirclient: screen resolution: 1024x768
QUbuntuScreen::QUbuntuScreen (this=0xd31eb0)
UbuntuWindow::createWindow (this=0x15fdfb0)
panelHeight: '26'
role: '1'
flags: 'Opaque'
title: 'Window 1'
UbuntuWindow - regular geometry
[ubuntumirclient QPA] creating surface at (0, 26) with size (320, 454)
with title 'Window 1'

UbuntuWindowPrivate::createEGLSurface (this=0x15f43a0,
nativeWindow=0x7f3f6c001f90)
[ubuntumirclient QPA] created surface has size (1024, 768)
UbuntuWindow::UbuntuWindow (this=0x15fdfb0, w=0x15d74a0,
screen=0xd31eb0, input=0x11caee0)
UbuntuWindow::setVisible (this=0x15fdfb0, visible=true)
OpenGL ES vendor: Intel Open Source Technology Center
OpenGL ES renderer: Mesa DRI Intel(R) Bay Trail
OpenGL ES version: OpenGL ES 3.0 Mesa 10.5.9
OpenGL ES Shading Language version: OpenGL ES GLSL ES 3.00
OpenGL ES extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
GL_EXT_texture_filter_anisotropic GL_EXT_texture_compression_dxt1
GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture
GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap
GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives
GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_float
GL_OES_texture_float_linear GL_OES_texture_half_float
GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_EGL_image
GL_OES_depth_texture GL_OES_packed_depth_stencil
GL_EXT_texture_type_2_10_10_10_REV GL_OES_get_program_binary
GL_APPLE_texture_max_level GL_EXT_discard_framebuffer
GL_EXT_read_format_bgra GL_NV_fbo_color_attachments
GL_OES_EGL_image_external GL_OES_vertex_array_object
GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5
GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers
GL_NV_read_buffer GL_EXT_draw_buffers GL_EXT_map_buffer_range
GL_OES_depth_texture_cube_map GL_OES_surfaceless_context
GL_EXT_color_buffer_float GL_EXT_separate_shader_objects
GL_EXT_shader_integer_mix GL_INTEL_performance_query
GL_KHR_context_flush_control
UbuntuWindow::onBuffersSwapped_threadSafe [1] - buffer size
(1024,768). resizeCatchUpAttempts=0