Autopilot input device has invalid X & Y axis on maguro

Bug #1234956 reported by Thomi Richards
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-upa
Fix Committed
Critical
Unassigned
python-ubuntu-platform-api (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Mir reports that the autopilot created input device does not support the X and Y axis, and therefore will not be usable. However, autopilot creates a device with *exactly* the same capabilities across all platforms, and this works on the mako.

To reproduce:

0) Flash a maguro:

phablet-flash ubuntu-system --channel devel-proposed

1) Enable mir on the device:

adb shell touch ~phablet/.display-mir

2) Shell into the device, and switch to the phablet user. Enable extra mir logging for the input stack:

initctl set-env MIR_SERVER_INPUT_REPORT=log
initctl set-env MIR_SERVER_LEGACY_INPUT_REPORT=log

3) stop unity8:

stop unity8

4) Clear the old unity8 log:

> .cache/upstart/unity8.log

5) Make sure the screen is not blanked, then start unity8:

start unity8

6) Follow the unity8 shell log:

tail -f .cache/upstart/unity8.log

7) In another terminal, run 'python', and enter the following:

from autopilot.input import Touch; t = Touch.create()

8) In the unity8 log, you will see:

"""
[EE, android-input] [EventHub]could not open /dev/input/event7, Permission denied
[II, android-input] [EventHub]Retry opening device file /dev/input/event7
[EE, android-input] [EventHub]could not open /dev/input/event7, Permission denied
[II, android-input] [EventHub]Retry opening device file /dev/input/event7
[EE, android-input] [EventHub]could not open /dev/input/event7, Permission denied
[II, android-input] [EventHub]Retry opening device file /dev/input/event7
[II, android-input] [EventHub]New device: id=8, fd=77, path='/dev/input/event7', name='autopilot-finger', classes=0x14, configuration='/system/usr/idc/autopilot-finger.idc', keyLayout='', keyCharacterMap='', builtinKeyboard=false, usingSuspendBlockIoctl=true, usingClockIoctl=false
[WW, android-input] [InputReader] Touch device 'autopilot-finger' did not report support for X or Y axis! The device will be inoperable.
[II, android-input] [InputReader]Device added: id=8, name='autopilot-finger', sources=0x00001002
"""

I'm fairly sure this is a but in mir, since evdev seems to report the correct capabilities (again, this is a python session):

>>> from evdev import InputDevice
>>> i = InputDevice('/dev/input/event7')
>>> i.capabilities(verbose=True)
{('EV_KEY', 1L): [('BTN_TOOL_FINGER', 325L)], ('EV_ABS', 3L): [(('ABS_X', 0L), AbsInfo(value=0, min=0, max=0, fuzz=0, flat=0, resolution=0)), (('ABS_Y', 1L), AbsInfo(value=0, min=0, max=0, fuzz=0, flat=0, resolution=0)), (('ABS_PRESSURE', 24L), AbsInfo(value=0, min=0, max=65535, fuzz=0, flat=0, resolution=0)), (('ABS_MT_SLOT', 47L), AbsInfo(value=0, min=0, max=9, fuzz=0, flat=0, resolution=0)), (('ABS_MT_TOUCH_MAJOR', 48L), AbsInfo(value=0, min=0, max=30, fuzz=0, flat=0, resolution=0)), (('ABS_MT_POSITION_X', 53L), AbsInfo(value=0, min=0, max=0, fuzz=0, flat=0, resolution=0)), (('ABS_MT_POSITION_Y', 54L), AbsInfo(value=0, min=0, max=0, fuzz=0, flat=0, resolution=0)), (('ABS_MT_TRACKING_ID', 57L), AbsInfo(value=0, min=0, max=65535, fuzz=0, flat=0, resolution=0)), (('ABS_MT_PRESSURE', 58L), AbsInfo(value=0, min=0, max=255, fuzz=0, flat=0, resolution=0))], ('EV_SYN', 0L): [('SYN_REPORT', 0L), ('SYN_CONFIG', 1L), ('SYN_DROPPED', 3L), ('?', 760L)]}

That last bit, printed nicely:

{('EV_ABS', 3L): [(('ABS_X', 0L),
                   AbsInfo(value=0, min=0, max=0, fuzz=0, flat=0, resolution=0)),
                  (('ABS_Y', 1L),
                   AbsInfo(value=0, min=0, max=0, fuzz=0, flat=0, resolution=0)),
                  (('ABS_PRESSURE', 24L),
                   AbsInfo(value=0, min=0, max=65535, fuzz=0, flat=0, resolution=0)),
                  (('ABS_MT_SLOT', 47L),
                   AbsInfo(value=0, min=0, max=9, fuzz=0, flat=0, resolution=0)),
                  (('ABS_MT_TOUCH_MAJOR', 48L),
                   AbsInfo(value=0, min=0, max=30, fuzz=0, flat=0, resolution=0)),
                  (('ABS_MT_POSITION_X', 53L),
                   AbsInfo(value=0, min=0, max=0, fuzz=0, flat=0, resolution=0)),
                  (('ABS_MT_POSITION_Y', 54L),
                   AbsInfo(value=0, min=0, max=0, fuzz=0, flat=0, resolution=0)),
                  (('ABS_MT_TRACKING_ID', 57L),
                   AbsInfo(value=0, min=0, max=65535, fuzz=0, flat=0, resolution=0)),
                  (('ABS_MT_PRESSURE', 58L),
                   AbsInfo(value=0, min=0, max=255, fuzz=0, flat=0, resolution=0))],
 ('EV_KEY', 1L): [('BTN_TOOL_FINGER', 325L)],
 ('EV_SYN', 0L): [('SYN_REPORT', 0L),
                  ('SYN_CONFIG', 1L),
                  ('SYN_DROPPED', 3L),
                  ('?', 760L)]}

So it looks to me like autopilot correctly configures the device to support both absolute X and Y axis, as well as multi-touch X and Y.

Related branches

kevin gunn (kgunn72)
Changed in mir:
assignee: nobody → Robert Carr (robertcarr)
importance: Undecided → Critical
status: New → Confirmed
milestone: none → phone-v1-freeze
no longer affects: mir
Changed in python-ubuntu-platform-api:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Thomi Richards (thomir)
summary: - mir does not recognise autopilot autopilot input device on maguro
+ Autopilot input device has invalid X & Y axis on maguro
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:python-ubuntu-platform-api at revision 18, scheduled for release in python-ubuntu-platform-api, milestone Unknown

Changed in python-ubuntu-platform-api:
status: Confirmed → Fix Committed
Revision history for this message
Para Siva (psivaa) wrote :

The autopilot tests on with 1.1+13.10.20131004-0ubuntu1 are still failing. Please see http://pastebin.ubuntu.com/6192198/ and http://pastebin.ubuntu.com/6192127/

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-ubuntu-platform-api - 1.1+13.10.20131004.1-0ubuntu1

---------------
python-ubuntu-platform-api (1.1+13.10.20131004.1-0ubuntu1) saucy; urgency=low

  [ Thomi Richards ]
  * Make the python-upa module return the correct values on a maguro.
    (LP: #1234956)

  [ Michael Zanetti ]
  * fix screen sizes for devices other than mako.

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 19
 -- Ubuntu daily release <email address hidden> Fri, 04 Oct 2013 14:44:54 +0000

Changed in python-ubuntu-platform-api (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.