GNOME Bugzilla – Bug 152749
Make gnome-volume-control respond to PowerMate events
Last modified: 2006-07-04 09:52:05 UTC
Please make gnome-volume-control respond to the Griffin PowerMate (www.griffintechnology.com) Command-line basic tools to support the PowerMate are here http://sowerbutts.com/powermate/ http://www.graflex.org/klotz/software/griffin/ Code to enable XMMS to respond to the PowerMate wheel events is available here http://groomlakelabs.com/grandamp/code/ More generally there should be some work on the event interface in GNOME. I'd like to be able to use this device with rhythmbox, totem, whatever. Gimp should be getting support soon.
Doesn't it respond to scroll events? GtkScales should work with that... If you want generic support, you really want to assign this bug to gtk. I can only do g-v-c, obviously. ;).
Well I was thinking more along the lines of a means of changing volume across the desktop... in theory without opening the volume applet, the assumption would be that default behaviour for the left/right scroll events would be to control volume; maybe with a press muting it, which is what the PowerMate software does on Windows. Now I'm wondering. You're right that it would be cool for gtk widgets to respond, but I guess I want something less specific and more application/functionality focussed. When a specific app has focus, if it knows how to consume the PowerMate events then it could respond in its particular way. Maybe I'm wrong to take the approach of building it into apps. More thought may be required. All I know is that I like the way that it can be hooked into XMMS, but that's a GTK1 app. I can port the plugin to beep (probably will in fact, at some point), but that doesn't help me when beep / XMMS isn't running. Not sure of the way forward on this.
Well, the thing is that you need actual software running to respond to such events. So you can add a listener in your X with a default desktop-wide action to control volume using some commandline tool. But applications aren't supposed to grab control of your hardware without asking for it. I know that the multimedia keyboard add-ons (you know, for keyboards like Creative) have some Linux-people using them and they specify some X keymapping server settings, where a key runs a commandline application. So the volume-up key launches some commandline tool to increase volume, whereas the browser button launches mozilla/firefox/galeon/epiphany. You probably want something similar to that. Integrating this into g-v-c seems kind of, dunno, far-fetched. ;).
OK, I take your point but I'm now struggling to see how to move forward. So far I know of a few apps which do support PowerMate events: Mixxxer, a couple of XMMS plugins, Gimp 2.1, and Kino. They all appear to do so by listening on /dev/input/event0 Unfortunately, if they are all running, they all grab and attempt to respond to PowerMate events. This is a mess. I almost certainly don't know enough about how X works in this respect to fix it. On Windows and Mac, you can either 1) use it as a volume control, or 2) if an app which has mappings defined in the PM Preferences has focus control e.g. shuttle/jog in a video editor or something. So I thought that adding support to g-v-c would be the way of implementing 1). I don't really know how to progress this as my understanding of the innards of X is not sufficient :-(
Is there a mailinglist for powermate-linux users or something like that? You could ask there and see if there's anyone knowledgeable on X and wants to spend some time on integrating it in the desktop.
So there is now a powermated project http://powermated.sourceforge.net/ This lets me adjust the ALSA volume using the PowerMate. However, I get weird behaviour from g-v-c and the mixer. Basically they do not stay in step with the changes that are happening via powermated. If I mute or unmute the volume by pressing the knob, the applet still shows the volume as muted. Also I can change the volume but the applet does not respond to the fact that it has changed. Similarly I just noticed that if I change or mute/unmute the volume using the applet while the Volume Control mixer window is open, the window does not respond.
Which version of applet/g-v-c?
2.8.0 of both gnome-volume-control and mixer_applet2 packaged in gnome-media-2.8.0-3.FC3.1 and gnome-applets-2.8.0-5 RPMs from FC3.
The author of powermated has the following to say: "Hey btw I was just reading your blog and I noticed you had a post on there about powermated, and part of it talked about it not working quite right with the gnome mixer applet? You suggested DBUS a possible remedy? What exactly happens? The mixer applet just doesn't get updated when the volume changes? This doesn't require DBUS, all it requires is that the mixer applet places a callback into the alsa mixer api so it can be notified when the volume changes. powermated does this, if you notice, you can change the volume with another program and the LED level changes accordingly (along with the XOSD)." Using powermated-0.3.1 (latest release) and the same version of gnome-v-c/mixer-applet listed above, this still happens. When I adjust the volume using the external tool i.e. the Powermate via powermated, the GUI of the mixer applet does not update in response to the volume changes. So maybe these alsa callbacks are needed, I don't know.
The 2.10 version already does that.
Excellent. Thank you very much. I'll give it a whirl when I upgrade (probably at FC4 time).
In the mean time, I'll reassign this bug to control-center since that is the place for this stuff (gnome-settings-daemon).
So Andy, I've looked into the keybindings lately, and there's keybindings properties (gnome-keybinding-properties); doesn't it do this already? Have you tried and been successful in setting up your powermate events using this?
do you still have that issue? could you reply to the previous comment?
Closing this bug report as no further information has been provided. Andy, please feel free to reopen this bug if you can provide the information Ronald and Sebastien asked for. Thanks!
I'm sorry, I haven't had a working environment for some time, if and when I do and this is still a problem, I'll reopen. Thanks Andre, Sebastian, Ronald.