Unity8 default mouse wheel increment seen by Mir clients is 7.0 (it should be 1.0)

Bug #1607240 reported by dinamic on 2016-07-28
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Undecided
Daniel van Vugt
gsettings-ubuntu-touch-schemas (Ubuntu)
High
Daniel van Vugt
qtmir (Ubuntu)
High
Daniel van Vugt
qtubuntu (Ubuntu)
High
Daniel van Vugt
ubuntu-system-settings (Ubuntu)
High
Daniel van Vugt
unity8 (Ubuntu)
Undecided
Unassigned
xorg-server (Ubuntu)
Undecided
Unassigned

Bug Description

Ubuntu 16.10 + proposed
Xmir 2:1.18.4-1ubuntu4

wheel mouse scrolling is too fast, tried with firefox and geany.

run firefox on mir scroll up/down some random long page using the mouse wheel

TEST CASE:

  1. env MIR_CLIENT_INPUT_RECEIVER_REPORT=log mir_demo_client_egltriangle -- --desktop_file_hint=unity8
  2. Roll your mouse wheel over it and watch the log

Expected: vscroll values of +1/-1
Observed: vscroll values of +7/-7

WORKAROUND:

System Settings > Mouse & Touchpad >
Slide the second (unlabelled) slider all the way left, and then one notch right.

Turns out that unlabelled slider is the wheel scroll speed. Setting it one notch from the left correctly reduces the wheel speed from 7.0 to 1.0 as Mir clients expect.

Related branches

affects: mir → xorg-server
tags: added: xmir
affects: xorg-server → xorg-server (Ubuntu)
summary: - [Xmir] scrolling is too fast (mouse wheel)
+ [Xmir Firefox scrolling is too fast (mouse wheel) when run under Unity8
+ (since Xmir 2:1.18.4-1ubuntu4)

Good news: Confirmed I can reproduce the bug.

Bad news: The bug only happens in Unity8 and not in Mir demo servers.

What changed:
Xmir 2:1.18.4-1ubuntu4 adds accurate vscroll/touchpad support. So instead of synthesising vscroll changes of any magnitude into fake button 4/5 press/releases, it now passes the vscroll float value straight down to the app.

This works well in Mir demo servers (with high-resolution touchpads too), but in Unity8 Xmir ends up sending about 7 button 4/5 events per mouse wheel tick.

It appears the flaw is in Qt/Unity8 code where a vscroll value of 1.0 (which means one mouse wheel tick) is not correctly maintaining the vscroll value of 1.0 after it passes through Unity8.

So the Xmir change is correct, but this is at least the third Unity8/Qt scrolling bug I've seen today. See also bug 1607223 and bug 1605513.

Changed in xorg-server (Ubuntu):
status: New → Invalid
summary: - [Xmir Firefox scrolling is too fast (mouse wheel) when run under Unity8
+ Xmir Firefox scrolling is too fast (mouse wheel) when run under Unity8
(since Xmir 2:1.18.4-1ubuntu4)

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

Changed in qtmir (Ubuntu):
status: New → Confirmed
Changed in unity8 (Ubuntu):
status: New → Confirmed
Daniel van Vugt (vanvugt) wrote :

Confirmed the wheel vscroll value received by Xmir is exactly 7.0:
       vscroll = mir_pointer_event_axis_value(pev, mir_pointer_axis_vscroll);

So for each mouse wheel tick:
USC sends a vscroll value of +1/-1 to Unity8
Unity8 sends a vscroll value of +7/-7 to apps

In previous versions of Xmir, we would ignore the magnitude and convert the 7 into 1. But now Xmir does proper smooth scrolling we need to honour the magnitude. So a value of 7 from Unity8 now results in 7x more scrolling.

The Xmir change is correct and we need to fix some Untiy8/Qt code somewhere so that a mouse wheel tick is always vscroll=1.0.

Daniel van Vugt (vanvugt) wrote :

Test case:

env MIR_CLIENT_INPUT_RECEIVER_REPORT=log mir_demo_client_egltriangle -- --desktop_file_hint=unity8

And roll your mouse wheel over it.

Expected: vscroll values of +1/-1
Observed: vscroll values of +7/-7

Daniel van Vugt (vanvugt) wrote :

Found the solution!

System Settings > Mouse & Touchpad >
Slide the second (unlabelled) slider all the way left, and then one notch right.

Turns out that unlabelled slider is the wheel scroll speed. Setting it one notch from the left correctly reduces the wheel speed from 7.0 to 1.0 as Mir clients expect.

summary: - Xmir Firefox scrolling is too fast (mouse wheel) when run under Unity8
- (since Xmir 2:1.18.4-1ubuntu4)
+ Unity8 default mouse wheel speed is 7.0 (it should be 1.0)
Changed in ubuntu-system-settings (Ubuntu):
status: New → Confirmed

It appears we have flaws (incorrect multiplication) in both QtMir and our default System Settings:

1. QtMir is multiplying vscroll events by 15, and forgetting to un-multiply them before passing them down to clients.

2. Our default System Settings (the unlabelled second slider under Mouse & Touchpad) seems to have a default scale of around 0.5. So the vscroll values of 15 from QtMir get converted to +7/-7 and that's what Mir apps receive in Unity8 instead of the expected +1/-1.

description: updated
Changed in qtmir (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: Confirmed → In Progress
Changed in qtmir:
assignee: nobody → Daniel van Vugt (vanvugt)
status: New → In Progress
tags: added: unity8-desktop
Changed in qtmir:
importance: Undecided → High
Changed in qtmir (Ubuntu):
importance: Undecided → High
Changed in ubuntu-system-settings (Ubuntu):
importance: Undecided → High
Changed in qtubuntu:
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in qtubuntu (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in qtubuntu:
importance: Undecided → High
Changed in qtubuntu (Ubuntu):
importance: Undecided → High
Changed in qtubuntu:
status: New → In Progress
Changed in qtubuntu (Ubuntu):
status: New → In Progress
Lukáš Tinkl (lukas-kde) wrote :

gsettings-ubuntu-touch-schemas has the default values

Launchpad Janitor (janitor) wrote :

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

Changed in gsettings-ubuntu-touch-schemas (Ubuntu):
status: New → Confirmed
Changed in gsettings-ubuntu-touch-schemas (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: Confirmed → In Progress
importance: Undecided → High
Changed in ubuntu-system-settings (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: Confirmed → In Progress
Changed in unity8 (Ubuntu):
status: Confirmed → Invalid
Changed in canonical-devices-system-image:
status: New → In Progress
summary: - Unity8 default mouse wheel speed is 7.0 (it should be 1.0)
+ Unity8 default mouse wheel speed seen by Mir clients is 7.0 (it should
+ be 1.0)
Changed in qtmir:
status: In Progress → Fix Committed
Changed in qtubuntu:
status: In Progress → Fix Committed
Changed in qtubuntu (Ubuntu):
status: In Progress → Fix Committed
Changed in qtmir (Ubuntu):
status: In Progress → Fix Committed
Changed in gsettings-ubuntu-touch-schemas (Ubuntu):
status: In Progress → Fix Committed
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
assignee: nobody → Daniel van Vugt (vanvugt)
Michał Sawicz (saviq) on 2016-08-16
Changed in canonical-devices-system-image:
milestone: none → 13

This bug was fixed in the package gsettings-ubuntu-touch-schemas - 0.0.7+16.10.20160809-0ubuntu1

---------------
gsettings-ubuntu-touch-schemas (0.0.7+16.10.20160809-0ubuntu1) yakkety; urgency=medium

  [ Daniel van Vugt ]
  * Correct the default scroll speed multiplier which should be 1.0
    after (LP: #1607240)

 -- Michał Sawicz <email address hidden> Tue, 09 Aug 2016 23:00:26 +0000

Changed in gsettings-ubuntu-touch-schemas (Ubuntu):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtmir - 0.4.8+16.10.20160810-0ubuntu1

---------------
qtmir (0.4.8+16.10.20160810-0ubuntu1) yakkety; urgency=medium

  [ Alan Griffiths ]
  * Reduce MirServer to an implementation detail of QMirServer (nothing
    else needs to touch it).

  [ Albert Astals Cid ]
  * Improvements from running clazy over the code
  * Compile with clang

  [ Daniel d'Andrada ]
  * Remove Application.stage and RoleStage from ApplicationManager

  [ Daniel van Vugt ]
  * Fix incorrect mouse wheel/touchpad scrolling scale (LP: #1607240)
    (LP: #1607223, #1607240)

 -- Michał Sawicz <email address hidden> Wed, 10 Aug 2016 06:53:16 +0000

Changed in qtmir (Ubuntu):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtubuntu - 0.63+16.10.20160809-0ubuntu1

---------------
qtubuntu (0.63+16.10.20160809-0ubuntu1) yakkety; urgency=medium

  [ Daniel van Vugt ]
  * Use correct scrolling scale of 120 as documented: (LP: #1607223,
    #1607240)

  [ Gerry Boland ]
  * Reapply rev 324 plus fix: EGL convenience, plus workaround for
    hybris not supporting GLESv3. (LP: #1507817, #1594198)
  * Logging: separate graphics & cursor logging into their own logging
    categories

 -- Michał Sawicz <email address hidden> Tue, 09 Aug 2016 23:01:21 +0000

Changed in qtubuntu (Ubuntu):
status: Fix Committed → Fix Released
Changed in qtmir:
status: Fix Committed → Fix Released
Changed in qtubuntu:
status: Fix Committed → Fix Released
summary: - Unity8 default mouse wheel speed seen by Mir clients is 7.0 (it should
- be 1.0)
+ Unity8 default mouse wheel increment seen by Mir clients is 7.0 (it
+ should be 1.0)
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-system-settings - 0.4+17.04.20161109.1-0ubuntu1

---------------
ubuntu-system-settings (0.4+17.04.20161109.1-0ubuntu1) zesty; urgency=medium

  [ Daniel van Vugt ]
  * Allow scroll speed multipliers up to 3.0; since the default speed in
    (LP: #1607240, #1627567)

  [ Ken VanDine ]
  * Updated example plugin to work with current SDK
  * Fixed pep8 failure

  [ Timo Jyrinki ]
  * Stop depending on transitional packages. (LP: #1583079) (LP:
    #1583079)

  [ jonas-drange ]
  * Drop “at” from “Updated at <date>” string

 -- Ken VanDine <email address hidden> Wed, 09 Nov 2016 15:27:26 +0000

Changed in ubuntu-system-settings (Ubuntu):
status: In Progress → Fix Released
Michał Sawicz (saviq) on 2017-03-13
no longer affects: qtubuntu
Michał Sawicz (saviq) on 2017-03-13
no longer affects: qtmir
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers