"BottomEdge" component does not support automatic mouse detection

Bug #1536669 reported by Renato Araujo Oliveira Filho on 2016-01-21
60
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Critical
Zoltan Balogh
Mir
Fix Released
Undecided
Andreas Pokorny
mir (Ubuntu)
Critical
Andreas Pokorny
qtsystems-opensource-src (Ubuntu)
Undecided
Timo Jyrinki
qtsystems-opensource-src (Ubuntu RTM)
Undecided
Unassigned
ubuntu-ui-toolkit (Ubuntu)
High
Zsombor Egri

Bug Description

BottomEdge component does not work property with mouse unless you set the:

QuickUtils.mouseAttached = true

This should be done automatically by SDK.

Related branches

Zsombor Egri (zsombi) on 2016-01-21
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Zsombor Egri (zsombi)
importance: Undecided → Critical
status: New → Confirmed
Bill Filler (bfiller) on 2016-01-21
Changed in canonical-devices-system-image:
milestone: none → ww08-2016
assignee: nobody → Zoltan Balogh (bzoltan)
importance: Undecided → Critical
Zsombor Egri (zsombi) wrote :

To fix this we need the QInputDeviceInfo to be cherrypicked from Qt5.6 to Qt5.4. If that won't happen during OTA10 timeframe we must mirror it ourselves.

https://codereview.qt-project.org/#/c/101049/8

Bill Filler (bfiller) wrote :

@zsombi
agreed. There is code in unity8-private that does this detection (we import that in address book and messaging - yuck!) that in worse case could be used in sdk if the Qt code is not ready.

Changed in canonical-devices-system-image:
status: New → Confirmed
Zsombor Egri (zsombi) on 2016-01-28
Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → In Progress
Changed in canonical-devices-system-image:
status: Confirmed → In Progress
Zsombor Egri (zsombi) wrote :

In order to get this working we need to drill holes in apparmor to the following:
  /sys/devices/**/input*/ rk,
  /sys/devices/**/input*/** rk,
  /sys/class/ r,
  /sys/class/input/ r,
  /run/udev/data/** r,

From these the last one especially is the biggest problem, because all apps will have access to the device data, which is bad. So security is alerted and they disagree on opening those holes, which is understandable.

The solution seems to be Mir to expose these somehow in a more secure way, to which we would need some adaptation.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

affects: mir → mir (Ubuntu)
Changed in mir (Ubuntu):
status: New → Confirmed
Changed in mir (Ubuntu):
status: New → Confirmed
Bill Filler (bfiller) on 2016-03-14
Changed in canonical-devices-system-image:
assignee: Zoltan Balogh (bzoltan) → kevin gunn (kgunn72)
Changed in mir (Ubuntu):
importance: Undecided → Critical
Zoltan Balogh (bzoltan) on 2016-03-15
Changed in mir (Ubuntu):
assignee: nobody → Andreas Pokorny (andreas-pokorny)
Changed in mir (Ubuntu):
status: Confirmed → In Progress

our ci is still out of step due to the problems on outage today. The API is already in lp:mir available you can get an example here:

http://bazaar.launchpad.net/~mir-team/mir/development-branch/view/head:/src/utils/in.cpp

The last branch linked to this bug# handles the forwarding in a nested session. Without it the example code above will not get any input devices when connected to a session compositor. We plan to get that MP out in the next mir release.

kevin gunn (kgunn72) wrote :

moving to ota11, apps team have gone to the pain of using a workaround, but let's land this early into ota11 after ota10 is cut/frozen

Changed in canonical-devices-system-image:
milestone: ww08-2016 → 11

qtsystems also needs to be updated to use the mir-0.21 API. I added a change of the current QInputInfo class of but the qmake stuff I had to change seem to be fishy. Also the

The attachment "0001-Input-Device-Info-base-on-Mir-API.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch

QInputInfo API exposes the device path - an information mir does not offer yet (and might not be able to on grouped devices) and exposes evdev properties for axes that clients will never see - like touchpad ABS_MT_*... I hope that nobody relies on that information..

Timo Jyrinki (timo-jyrinki) wrote :

The patch does not apply at least when added to apply as the last patch on top of lp:~kubuntu-packagers/kubuntu-packaging/qtsystems-opensource-src

I tried also with the upstream patch set 23 from https://codereview.qt-project.org/#/c/101049/ instead of the 20 currently in use.

I wasn't pinged about landing this or anything so maybe I'm just too early anyway trying it out :) Please ping me whenever you need it. It'd be useful information also if the inputinfo patch itself should be upgraded to the version 23 as mentioned.

Oh seems like I pulled in the wrong version.. will redo the patch..

ok this time on top of version 23.

Lorn Potter (lorn-potter) wrote :

LGTM, just a few style changes needed for upstream. Updated upstream with patchset 24

kevin gunn (kgunn72) wrote :

just coming back to this, looks like the mir patch is landed and in stable-phoine-overlay for some time.
i'm guessing sdk is just the remaining bit?
handing over to zoltan

Changed in mir (Ubuntu):
status: In Progress → Fix Committed
Changed in canonical-devices-system-image:
assignee: kevin gunn (kgunn72) → Zoltan Balogh (bzoltan)
Changed in mir (Ubuntu):
status: Fix Committed → Fix Released
Timo Jyrinki (timo-jyrinki) wrote :

We'd need the upstream to merge the patch and a new Mir API patch to qtsystems based on top of the newest upstream InputInfo patch version.

An older Mir API patch was posted in comment #8 but it would need rebasing. I think that could come from Andreas still?

Lorn Potter (lorn-potter) wrote :

I'll make a task for myself to upstream that to qtsystems.

Pat McGowan (pat-mcgowan) wrote :

can we proceed with this now?

Changed in canonical-devices-system-image:
milestone: 11 → 12
Changed in mir:
milestone: none → 0.21.0
status: New → Fix Released
assignee: nobody → Andreas Pokorny (andreas-pokorny)
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qtsystems-opensource-src (Ubuntu):
status: New → Confirmed
Changed in canonical-devices-system-image:
milestone: 12 → 13
Andrea Bernabei (faenil) wrote :

any update?

Timo Jyrinki (timo-jyrinki) wrote :

The upstream was just updated with another revision. It's still not merged to upstream trunk, but I can update test silo with that.

Changed in qtsystems-opensource-src (Ubuntu):
assignee: nobody → Timo Jyrinki (timo-jyrinki)
status: Confirmed → In Progress
Timo Jyrinki (timo-jyrinki) wrote :

Now patch set 26 replaced patch set 25, and the Mir patch no longer applies. The attached patch is a rebased version to 26, but we just heard patch set 27 and 28 are upcoming soon... so this will continue still.

Timo Jyrinki (timo-jyrinki) wrote :

For the record, it seems the we will want Mir backend with the naming more like qinputdeviceinfo_mir.cpp/h, to match patch set 26 and what Unity 8's internal copy of the _linux backend currently, instead of the current patch's qinputmanager/_udev/_mir. So the Mir patch would need redoing.

Timo Jyrinki (timo-jyrinki) wrote :

Ok, patch set 31 that now includes the Mir backend is in the silo 038 https://requests.ci-train.ubuntu.com/#/ticket/1723

The UITK branch is however outdated. As Unity 8 is already using an internal copy of this, the main benefit from the landing would come via UITK. Unity 8 would also switch to use the qtsystems version instead.

If the patch set 31 is not complete enough or the UITK branch won't be ready to be tested by next Friday, this'd be OTA-14 instead of 13.

Timo Jyrinki (timo-jyrinki) wrote :

Patch set #43 in upstream was finally merged together with the Mir integration. The silo is up-to-date for vivid/xenial/yakkety, and includes also the switch to the upstream version of the screen blanking prevention patch.

However when trying to run eg the qml-inputinfo.qml (from command line, any desktop hint is ok, qmlscene --desktop_file_hint=/usr/share/applications/mediaplayer-app.desktop qml-inputinfo.qml) I just get a blank screen, and running the inputinfo non-qml executable I get segfault.

Tested both on vivid (rc-proposed) and xenial (staging).

Lorn Potter (lorn-potter) wrote :

Odd. The first time I built this package on my xenial laptop, inputinfo crashed, but other builds (clean) it ran fine.

Lorn Potter (lorn-potter) wrote :

comment in #26 was my fault, wrong library path used when it ran fine.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7fa0e30 in QInputInfoManagerPrivate::instance () at qinputinfo.cpp:68
68 if (QGuiApplication::platformNativeInterface()->nativeResourceForIntegration("mirconnection"))
(gdb) bt
#0 0x00007ffff7fa0e30 in QInputInfoManagerPrivate::instance () at qinputinfo.cpp:68
#1 0x00007ffff7fa10fc in QInputInfoManager::QInputInfoManager (this=0x423a50, parent=<optimised out>) at qinputinfo.cpp:260
#2 0x0000000000402ec6 in Inputtest::Inputtest (this=0x7fffffffd4a0, parent=<optimised out>) at inputtest.cpp:42
#3 0x0000000000402096 in main (argc=1, argv=<optimised out>) at main.cpp:41

Lorn Potter (lorn-potter) wrote :

Weird thing is when I load the source into qtcreator and build with same qmake line (and building mirclient stuff), I don't get segfaults.

I did have to edit source to even get it compiling.
In qscreensaver_mir_p.h there is int m_keepDisplayOnRequest
but it is m_keepDisplayOnRequestId in qscreensaver_mir.cpp
I don't see how that would even compile when mirclient is enabled

Lorn Potter (lorn-potter) wrote :

--- qtsystems-opensource-src-5.0~git20141206~44f70d99.orig/src/systeminfo/linux/qscreensaver_mir_p.h
+++ qtsystems-opensource-src-5.0~git20141206~44f70d99/src/systeminfo/linux/qscreensaver_mir_p.h
@@ -63,7 +63,7 @@ private:
     QScreenSaver * const q_ptr;
     Q_DECLARE_PUBLIC(QScreenSaver)

- int m_keepDisplayOnRequest;
+ int m_keepDisplayOnRequestId;
     QDBusInterface m_iface;
 };

--- qtsystems-opensource-src-5.0~git20141206~44f70d99.orig/src/systeminfo/systeminfo.pro
+++ qtsystems-opensource-src-5.0~git20141206~44f70d99/src/systeminfo/systeminfo.pro
@@ -67,7 +67,7 @@ linux-*: !simulator: {
          qinputinfo.h \
          linux/qinputinfomanager_p.h

- contains(QT_CONFIG, mirclient) {
+ config_mir {
         DEFINES += QT_UNITY8
         PRIVATE_HEADERS += linux/qscreensaver_mir_p.h
         SOURCES += linux/qscreensaver_mir.cpp

Lorn Potter (lorn-potter) wrote :

Got a patch from Andreas Pokorny to fix mir crash. Upstreamed at:
https://codereview.qt-project.org/#/c/169262/

Timo Jyrinki (timo-jyrinki) wrote :

My builds were missing this which explains the Id mismatch: https://codereview.qt-project.org/#/c/145358/

https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/landing-038/+packages is now updated with all of these.

Currently I'm getting:

$ ./inputinfo
0
Aborted (core dumped)

and:

$ QT_QPA_PLATFORM=ubuntumirclient qmlscene --desktop_file_hint=/usr/share/applications/mediaplayer-app.desktop qml-inputinfo.qml
Loading module: 'libubuntu_application_api_touch_mirclient.so.3.0.0'
ubuntumirclient: Got invalid serialized mime data. Ignoring it.
qml: number of mouse and keyboard devices: 0
qml: row count 0

So no devices for some reason but also at least more output and less crashes.

Right now tested on xenial (staging channels) only.

Timo Jyrinki (timo-jyrinki) wrote :

Here's a backtrace of ./inputinfo on Unity8 yakkety desktop: http://pastebin.ubuntu.com/23110601/

On that yakkety desktop qml-inputinfo.qml does give one device:
qml: new count of filtered devices: 1
qml: AT Translated Set 2 keyboard QVariant(::QInputDevice::InputTypeFlags) 2
qml: number of mouse and keyboard devices: 1
qml: row count 1
qml: Button, Keyboard,

But Mir's mirin tool gives 6:
1:Power Button:-event3-0-1n keys
2:Power Button:-event2-0-1n keys
3:HD WebCam:-event6-3034-22479 keys
4:Elan Touchscreen:-event4-0-0creen touchscreen
5:Elan Touchpad:-event5-1267-42 touchpad
6:AT Translated Set 2 keyboard:-event0-1-1ed Set 2 keyboard full keyboard

and mirin on krillin gives 3 devices.

Daniel van Vugt (vanvugt) wrote :

Also your Mir server log will list input devices.

Timo Jyrinki (timo-jyrinki) wrote :

With patch set 3 ./inputinfo now works, gives 1 device on krillin (touchscreen) and 2 input devices on Chromebook (keyboard, and touchscreen).

qml-inputinfo.qml gives 0 devices on krillin (as there are no mouse or keyboard connected which the example checks) and 1 device (keyboard) on Chromebook (no mouse, only touchpad).

I guess this is all correct now regarding what those example applications should be doing? And there is no crash anymore.

Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Changed in canonical-devices-system-image:
status: Fix Committed → In Progress
Timo Jyrinki (timo-jyrinki) wrote :

qtsystems-opensource-src (5.0~git20141206~44f70d99-0ubuntu9~xenialoverlay1~9) xenial; urgency=medium

  * debian/patches/Add-support-for-disabling-enabling-the-screen-saver-.patch:
    - Replace former unity-screen.diff with the upstream version of it.
  * debian/patches/Add-QInputDeviceInfo.patch:
    - Update to upstream patch set 43 (LP: #1536669)
  * Add build dependency on libmirclient-dev
  * debian/patches/Fix-crash-on-mir-based-systems.patch:
    - Fix a crasher with inputdeviceinfo, patch set 3.
  * debian/patches/Fix-name-mismatch.patch:
    - Fix FTBFS in Add-support-for-... patch.

---

qtsystems-opensource-src (5.0~git20141206~44f70d99-0ubuntu2.2~overlay2~19) vivid; urgency=medium

  * debian/patches/Add-support-for-disabling-enabling-the-screen-saver-.patch:
    - Replace former unity-screen.diff with the upstream version of it.
  * debian/patches/Add-QInputDeviceInfo.patch:
    - Update to upstream patch set 43 (LP: #1536669)
  * debian/patches/add-input-events.patch:
    - Add input events header not available on vivid
  * Add build dependency on libmirclient-dev
  * debian/patches/Fix-crash-on-mir-based-systems.patch:
    - Fix a crasher with inputdeviceinfo, patch set 3.
  * debian/patches/Fix-name-mismatch.patch:
    - Fix FTBFS in Add-support-for-... patch.

Changed in qtsystems-opensource-src (Ubuntu RTM):
status: New → Fix Released
Changed in qtsystems-opensource-src (Ubuntu):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtsystems-opensource-src - 5.0~git20141206~44f70d99-0ubuntu10~13

---------------
qtsystems-opensource-src (5.0~git20141206~44f70d99-0ubuntu10~13) yakkety; urgency=medium

  * debian/patches/Add-support-for-disabling-enabling-the-screen-saver-.patch:
    - Replace former unity-screen.diff with the upstream version of it.
  * debian/patches/Add-QInputDeviceInfo.patch:
    - Update to upstream patch set 43 (LP: #1536669)
  * Add build dependency on libmirclient-dev
  * debian/patches/Fix-crash-on-mir-based-systems.patch:
    - Fix a crasher with inputdeviceinfo, patch set 3.
  * debian/patches/Fix-name-mismatch.patch:
    - Fix FTBFS in Add-support-for-... patch.

 -- Timo Jyrinki <email address hidden> Wed, 27 Jul 2016 09:41:33 +0000

Changed in qtsystems-opensource-src (Ubuntu):
status: Fix Committed → Fix Released
Zsombor Egri (zsombi) on 2016-09-20
Changed in ubuntu-ui-toolkit (Ubuntu):
importance: Critical → High
Changed in canonical-devices-system-image:
milestone: 13 → backlog
Bill Filler (bfiller) on 2016-11-29
Changed in canonical-devices-system-image:
milestone: backlog → p1
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-ui-toolkit - 1.3.2151+17.04.20161223

---------------
ubuntu-ui-toolkit (1.3.2151+17.04.20161223) zesty; urgency=medium

  [ Zsombor Egri ]
  * Enable mouse, touchpad and keyboard detection in UITK. Fixes LP: #1536669
  * Colors revisited.
  * Qt5.7 related fix for theming - by Glen Whitney.

  [ Timo Jyrinki ]
  * parent = Q_NULLPTR instead of 0. Fixes LP: #1642617
  * More blank lines. Fixes LP: #1642622
  * Drop tst_pickerpanel.11.qml (deprecated).

  [ Christian Dywan ]
  * Include OSK input in TextArea.displayText. Fixes LP: #1595910

  * Drop questionable color tests from tst_textarea.11.qml. Fixes LP: #1624342

  [ Lukáš Tinkl ]
  * Fix slider progress rect with RTL languages.

 -- Marco Trevisan (Treviño) <mail@3v1n0.net> Fri, 23 Dec 2016 14:52:55 +0000

Changed in ubuntu-ui-toolkit (Ubuntu):
status: In Progress → Fix Released
Changed in canonical-devices-system-image:
milestone: p1 → p2
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers