Volume buttons no longer function correctly since #238 mako/flo/manta

Bug #1293478 reported by Alan Pope 🍺🐧🐱 🦄
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
qmenumodel (Ubuntu)
Fix Released
Undecided
Nick Dedekind
unity8 (Ubuntu)
Fix Released
High
Michał Sawicz

Bug Description

The hardware vol+ button works on mako #238 but vol- does nothing.

Steps to reproduce
Put music on the device
Start music playing
Bring down the Sound indicator
Try to adjust the volume with the indicator (this works)
Try to adjust the volume with the hardware vol+ and vol- keys.
Note Vol+ works, Vol- does not.

Related branches

Revision history for this message
Oliver Grawert (ogra) wrote :

on flo neither of the vol keys work

summary: - Volume buttons no longer function correctly since #238 mako
+ Volume buttons no longer function correctly since #238 mako/flo
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Volume buttons no longer function correctly since #238 mako/flo

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

Changed in android (Ubuntu):
status: New → Confirmed
Revision history for this message
Dave Morley (davmor2) wrote :

Same issue on manta

summary: - Volume buttons no longer function correctly since #238 mako/flo
+ Volume buttons no longer function correctly since #238 mako/flo/manta
Alexander Sack (asac)
Changed in android (Ubuntu):
assignee: nobody → Ricardo Salveti (rsalveti)
importance: Undecided → High
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

This doesn't seem to be an android issue, this is flo:

root@ubuntu-phablet:/# /system/bin/getevent -l
could not open /dev/input/by-path, Is a directory
add device 1: /dev/input/event5
  name: "gpio-keys"
add device 2: /dev/input/event4
  name: "h2w button"
add device 3: /dev/input/event3
  name: "apq8064-tabla-snd-card Headset Jack"
add device 4: /dev/input/event2
  name: "apq8064-tabla-snd-card Button Jack"
add device 5: /dev/input/event1
  name: "lid_input"
add device 6: /dev/input/event0
  name: "elan-touchscreen"
could not get driver version for /dev/input/mice, Not a typewriter
/dev/input/event5: EV_KEY KEY_VOLUMEUP DOWN
/dev/input/event5: EV_SYN SYN_REPORT 00000000
/dev/input/event5: EV_KEY KEY_VOLUMEUP UP
/dev/input/event5: EV_SYN SYN_REPORT 00000000
/dev/input/event5: EV_KEY KEY_VOLUMEDOWN DOWN
/dev/input/event5: EV_SYN SYN_REPORT 00000000
/dev/input/event5: EV_KEY KEY_VOLUMEDOWN UP
/dev/input/event5: EV_SYN SYN_REPORT 00000000
^C

affects: android (Ubuntu) → unity8 (Ubuntu)
Changed in unity8 (Ubuntu):
assignee: Ricardo Salveti (rsalveti) → nobody
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

I noticed that the var type used by dbus changed since we moved to qt5.2 (int->double), which broke volume down:

Before:
method call sender=:1.20 -> dest=com.canonical.indicator.sound serial=178 path=/com/canonical/indicator/sound; interface=org.gtk.Actions; member=Activate
   string "volume"
   array [
      variant int32 -1
   ]
   array [
   ]

After:
method call sender=:1.51 -> dest=com.canonical.indicator.sound serial=176 path=/com/canonical/indicator/sound; interface=org.gtk.Actions; member=Activate
   string "volume"
   array [
      variant double -1
   ]
   array [
   ]

Looking at the qml file (qml/Components/VolumeControl.qml), it seems Qt is now assuming -1 is double by default, which is what is probably causing the issue.

A simple patch to force the value to be an integer fixes the volume up/down when using hw keys, but there are still some other issues with the volume indicator.

Once you manually select a volume value by touching the indicator, the hw key behavor changes (it sends the same dbus message, but the value doesn't move correctly anymore at the volume bar). If you also play a bit with the volume indicator (e.g. changing volume when using the camera app), it can easily get to a point where unity8 stops sending the dbus messages, breaking the indicator.

$ bzr diff
=== modified file 'qml/Components/VolumeControl.qml'
--- qml/Components/VolumeControl.qml 2013-10-10 03:39:40 +0000
+++ qml/Components/VolumeControl.qml 2014-03-18 20:41:22 +0000
@@ -22,6 +22,9 @@
     objectName: "volumeControl"
     visible: false

+ property int stepUp: 1
+ property int stepDown: -1
+
     QDBusActionGroup {
         id: actionGroup
         busType: 1
@@ -32,11 +35,11 @@
     }

     function volumeUp() {
- actionGroup.actionObject.activate(1);
+ actionGroup.actionObject.activate(stepUp);
     }

     function volumeDown() {
- actionGroup.actionObject.activate(-1);
+ actionGroup.actionObject.activate(stepDown);
     }

     Component.onCompleted: actionGroup.start()

Revision history for this message
Michał Sawicz (saviq) wrote :

IMO the int vs. double should be handled in qmenumodel, we can't rely on JS doing anything sane with types. The "I played with the slider..." issues should be sorted in silo 13 already (bug #1283191).

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

With the patch posted in comment #5 + unity8 from silo 13 it seems the volume indicator is behaving properly again.

The only issue I noticed is that after you change the volume in the indicator, the vol up/down can't necessarily reach 0/100 anymore, probably because it goes lower/higher than what the scale permits.

Michał Sawicz (saviq)
Changed in unity8 (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Michał Sawicz (saviq)
Revision history for this message
Michał Sawicz (saviq) wrote :

The last issue you mentioned was introduced by the fix, need to improve there.

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

This bug was fixed in the package unity8 - 7.84+14.04.20140319.1-0ubuntu1

---------------
unity8 (7.84+14.04.20140319.1-0ubuntu1) trusty; urgency=low

  [ Michał Sawicz ]
  * Work around bug #1293478 - make sure to send ints, not doubles for
    volume control. (LP: #1293478)

  [ Nick Dedekind ]
  * Fixed binding being cleared when manually changing slider value
    (lp#1283191). (LP: #1283191)

  [ Albert Astals ]
  * Fix indicators highlight position on 5.2 We need to take into
    account the list originX if we're using the list delegates x outside
    the list itself
  * LVWPH: Make sure m_firstVisibleIndex is correctly set on
    removeNonVisibleItems
 -- Ubuntu daily release <email address hidden> Wed, 19 Mar 2014 16:40:20 +0000

Changed in unity8 (Ubuntu):
status: In Progress → Fix Released
Changed in qmenumodel (Ubuntu):
assignee: nobody → Nick Dedekind (nick-dedekind)
Changed in qmenumodel (Ubuntu):
status: New → In Progress
Dave Morley (davmor2)
Changed in qmenumodel (Ubuntu):
status: In Progress → 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.