OSK becomes unusable as taps are delayed by 1-2 seconds and vibration doesn't occur any more (although gestures continue to work)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
Critical
|
Pat McGowan | ||
platform-api (Ubuntu) |
In Progress
|
High
|
Thomas Voß | ||
usensord (Ubuntu) |
Fix Committed
|
High
|
Zhang Enwei |
Bug Description
Krillin, rc-proposed/
TEST CASE:
1. Create to alarms that'll trigger at the same time
2. Wait until they go off
3. Dismiss the alarms
4. Verify that there is still haptic feedback and OSK is still responsive
ACTUAL RESULT
Step 4 fails.
UPDATE: see comment #5, it turns out it's the haptics plugin doing SYNC dbus calls and blocking the UI thread when the dbus service does not reply or the replies come with a big delay
Description:
All at once taps have become incredibly delayed, by 1 or 2 secs.
Gestures still work ok, no delay there.
Swiping the greeter -> no delay. Tapping numbers to input code on the greeter --> 2 secs delay. Even though both are parts of unity8. So it doesn't seem to only be a problem of unity8 clients, but also unity8 itself.
I have no idea why horizontal/vertical swipes would be unaffected, though.
The virtual keyboard is also completely unusable because of the huge delay that each tap has.
Also noticed that the vibration is gone, taps don't trigger vibration anymore.
Webview also seemed to be unaffected by the delays (although I'm not entirely sure, the bug is now gone)
I also restarted unity8 and unity8-dash with Mir input logging enabled. That showed that the touch events were being delivered as expected, no delay.
restart unity8 MIR_CLIENT_
restart unity8-dash MIR_CLIENT_
Restarting lightdm (that forces the restart of unity-system-
Additional info: I had Mir touchspots visualization enabled, which are known to cause more stuttering, but I think they're unlikely to be the cause of this bug, I had them enabled for 2 weeks and haven't noticed any problem like this before.
This is the log from a tap on an icon in the shell:
[2016-09-06 10:52:51.876400] <DEBUG> input-receiver: Received event:touch_
[2016-09-06 10:52:51.953821] <DEBUG> input-receiver: Received event:touch_
[2016-09-06 10:52:51.954343] <DEBUG> input-receiver: Received event:touch_
SEE VIDEO ATTACHMENT BELOW
Related branches
- Ubuntu Phablet Team: Pending requested
-
Diff: 21 lines (+2/-2)1 file modifiedsrc/ubuntu/application/common/application/sensors/service.cpp (+2/-2)
- Pat McGowan (community): Approve
- Jonas G. Drange (community): Approve
- James Henstridge: Pending requested
- Samuele Pedroni: Pending requested
- Andrea Bernabei: Pending requested
-
Diff: 166 lines (+28/-28)2 files modifieddebian/changelog (+7/-0)
haptic/haptic.go (+21/-28)
affects: | unity8 (Ubuntu) → ubuntu-ui-toolkit (Ubuntu) |
Changed in platform-api (Ubuntu): | |
importance: | Undecided → Critical |
summary: |
- [Krillin] Taps are delayed by 1-2seconds, although gestures are not. - Keyboard is thus unusable + [Krillin] Haptics engine uses sync dbus calls. Was: "Taps are delayed by + 1-2seconds, although gestures are not. Keyboard is thus unusable" |
summary: |
- [Krillin] Haptics engine uses sync dbus calls. Was: "Taps are delayed by + Haptics engine uses sync dbus calls. Was: "Taps are delayed by 1-2seconds, although gestures are not. Keyboard is thus unusable" |
Changed in platform-api (Ubuntu): | |
importance: | Critical → High |
assignee: | nobody → Thomas Voß (thomas-voss) |
Changed in canonical-devices-system-image: | |
importance: | Undecided → Medium |
tags: | removed: regression-proposed |
tags: | added: performance |
tags: | added: lt-blocker |
description: | updated |
Changed in usensord (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in usensord (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in canonical-devices-system-image: | |
status: | In Progress → Fix Committed |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
I think I know that it could be!
I think it's the vibration handler!
After inputting the passcode in the greeter, unity8 prints the following lines *after* the 2 secs delay: .DBus.Error. NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. .DBus.Error. NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. .DBus.Error. NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. .DBus.Error. NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
org.freedesktop
org.freedesktop
org.freedesktop
org.freedesktop
And as noted in the bug description, one of the sympthoms was that vibration stopped working.
I think what happened is that the vibrator handler crashed, and on every tap that requires vibration the system is waiting some timeout for the vibrator to reply to the DBus call before timing out.
Those calls are probably synchronous, hence blocking the UI until a reply is received (do we really have to block the UI to vibrate?). But since the other end is probably dead, the phone stalls until the NoReply answer is received, and only then the UI thread gets back in control again.