After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 581039 - volume keys on different devices can't set different volume sliders
volume keys on different devices can't set different volume sliders
Status: RESOLVED DUPLICATE of bug 340720
Product: gnome-settings-daemon
Classification: Core
Component: plugins
2.26.x
Other All
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on: 575768
Blocks:
 
 
Reported: 2009-05-01 19:34 UTC by Bogdan Butnaru
Modified: 2010-10-13 14:36 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Bogdan Butnaru 2009-05-01 19:34:13 UTC
Please describe the problem:
I have a desktop computer that has an integrated sound card, and I bought recently a USB-connected wireless headset from Logitech. My keyboard has separate keys for volume control (volume up/down and mute) in a corner, and the USB headset has two buttons on one of the headphones for the same purpose. As far as I can tell, the headset registers itself as a Human Interface Device and simply sends key-presses like a USB keyboard would.

First of all, everything works more or less as expected: I can use Pulseaudio to route sound from any application to either my speakers or my headset (or both), and pavucontrol can individually control the volume of the sound card and the headset.

Also, both the volume keys on my keyboard and the buttons on the headset work. I have XF86Audio{Raise|Lower}Volume (which is what the keyboard and headset generate) set as "Shortcuts" for volume up/down in the Keyboard Shortcuts applet, and they both work. 

The problem is that they both work on the same volume control; as far as I know that's the "master volume slider" that is picked through one of the settings applets (I can't find it right now; I think something changed recently in Ubuntu's settings applets, unrelated to this report).

I'd like a way to have either pair of volume buttons control a different slider. Ideally, I'd like the keyboard to control the volume control of my sound card and the buttons on the headset to control the headset's volume.

It's not absolutely necessary to have a very pretty interface* for all this, I can handle a few config files, but I'm not aware of any reasonable way of getting the same keysym from two different input devices to do different things.**

(*: Although, if it were technically doable, my particular case could be very intuitively handled by a single check-box and a bit of logic: if there's any USB device that exposes both Audio and HID interfaces, watch them. Intercept any volume/mute key presses from their HID part and use them to control the Audio part's volume. Also add a single check-box for them that says "X controls master volume control" and leave it unchecked by default, in the eventuality that someone doesn't want this.)

(**: Actually, I'd like to be able to do this in general. For instance, I'd like to have two keyboards with two different layouts instead of switching layouts using the panel applet.)

Steps to reproduce:
1. Plug in two or more input devices that have volume control keys.
2. Make sure you have several different sound output devices.
3. Play sound on each sound device.
4. Use the various volume control keys.


Actual results:
The same volume slider is modified by all different volume control keys.

Expected results:
Different control keys should be able to control different volume sliders (i.e., the volume of different output devices).

In particular, volume control keys belonging to a USB device that also has sound output capability should control that device.

Does this happen every time?
Yes.

Other information:
I'm running up-to-date Ubuntu Jaunty, in case that matters.

Let me know if you need any hardware/other information for this. I'll attach this to gnome-settings-daemon because I think this actually controls the volume when the keys are pressed.
Comment 1 Marc-Andre Lureau 2009-05-02 21:51:37 UTC
I think this bug should be filled for g-s-d, moving it there
Comment 2 Bastien Nocera 2009-05-02 22:22:13 UTC
Here, the problem is that we don't know which device the button was pressed on. We should really be using XInput all over, but from the GDK docs, XInput isn't enabled by default because it's too expensive.

So:
- we don't know which input device created the event
- so we can't know which audio device is associated with the event
- so we change the default audio sink

I believe that a similar problem existed for Bluetooth headsets.
Comment 3 Viktor Ferenczi 2009-12-30 19:25:57 UTC
OS: Ubuntu 9.10 (up to date)
GNOME 2.28.1

I've the same problem with a Maxell MXL-1191-R USB wireless headset.

The volume control buttons on this headset (they are built into the right speaker's case) work out of the box, but controls the device last selected in the Output tab of the Sound Preferences dialog instead of the headset. So the problem is with the selection of the device to control. I can reproduce this problem, so you can contact me anytime if you have a proposed fix to test.

Is there a way to use XInput for this somehow? I don't think it'd be so expensive on a 4 core 3.2GHz machine with 12G RAM any more. :-)
Comment 4 Bastien Nocera 2010-10-13 14:36:21 UTC

*** This bug has been marked as a duplicate of bug 340720 ***