TomTheGeek

All the geeky stuff that gets me hot.

Wednesday, May 02, 2007

Griffin Powermate working with Ubuntu Feisty Fawn

There are lots of linux programs that will interface with the Griffin Powermate. Since I want to customize the buttons on my keyboard and mouse as well as the Powermate I choose to use evrouter. Installing evrouter in Ubuntu can be done with apt-get or the synaptic package manager.

The kernel modules are already loaded in Ubuntu 7.04 to support the powermate so I didn't have to mess around with that. Run "evrouter -d /dev/input/event*" to make sure the powermate events are being received properly.

The first problem that needs to be solved is to assign a static name to the powermate with udev so it will always come up under the same device name. Normally it will come up under different device names depending on how it was plugged in.

Create the file /etc/udev/rules.d/10-local.rules and add this all on one line:
SUBSYSTEMS=="usb", ATTRS{product}=="Griffin PowerMate", KERNEL=="event?", NAME="input/powermate"
That will force the powermate to come up under /dev/input/powermate every time it's plugged in. Now we need to set permissions.

Create a group called "powermate" and add the correct users. Now edit /etc/udev/rules.d/40-permissions.rules and add this line at the bottom:
ATTRS{product}=="Griffin PowerMate" GROUP="powermate", MODE="0666"
Now the group powermate will have read permissions to the /dev/input/powermate device. Next we need to create the evrouter rules file. Create a file called .evrouterrc in your home directory and add this:
Window ""
"Griffin PowerMate" "" any key/256 "XKey/XF86AudioMute"
"Griffin PowerMate" "" any rel/7/1 "XKey/XF86AudioRaiseVolume"
"Griffin PowerMate" "" any rel/7/-1 "XKey/XF86AudioLowerVolume"
This is a very simple rules file that can be expanded to do other actions once you've got the powermate working. I'm adjusting the volume using Xserve commands since I want the powermate to control system volume but there are specific actions to control XMMS if you use that. The XF86 volume commands only work if they have been mapped to keys on your keyboard.

The last step is to configure evrouter to load at boot time. This is done in Ubuntu under preferences > sessions. Click new and give it a name of "EvRouter" and for the command enter "evrouter /dev/input/powermate". That will launch evrouter and tell it to listen to the powermate for events.

That's it, restart and you should have a functioning volume knob.

7 Comments:

  • Thanks for that Tom. Seeing as I have one of these twiddly turny things with a blue light underneath it, I will give this a go. =)

    Andrew S.

    By Blogger Andrew S, at 5:05 AM CDT  

  • Thanks, Tom.

    I had tried several times to get my PowerMate to work with Ubuntu.

    This did the trick.

    Thanks,

    Jamie

    By Anonymous Anonymous, at 2:14 PM CDT  

  • Hi Tom,

    Have you ever go a gyration remote working with evroute?

    By Anonymous Anonymous, at 2:52 PM CDT  

  • Thanks for providing this. While your instructions were close for F17 && kernel 3.8.12, some mods were needed.

    1) I couldn't get your 10-local.rules to work. I needed to remove 'KERNEL=="event?"' to get it to fire. Then, I had to change "NAME" to "SYMLINK+" else udev crabbed 'NAME="input/powermate" ignored, kernel device nodes can not be renamed'

    2) While #1 got the desired /dev/input/powermate name, it was linked to /dev/bus/usb/xxx/yyy". Sadly, the ioctl( fd, EVIOCGNAME(), name) call then got EPERM. As a result, I had to start evrouter with /dev/input/event6 instead of the invariant /dev/input/powermate.

    In any event, I now have a functioning PowerMate, and I'm much happier. Thanks for providing the cluebat :)

    --
    dnl

    By Anonymous Anonymous, at 5:27 PM CDT  

  • Found a better fix!

    Changed 10-local.rules to:
    SUBSYSTEM=="input", ATTRS{product}=="Griffin PowerMate", KERNEL=="event?", SYMLINK+="input/powermate"
    and this allows the /dev/input/powermate link to work exactly as needed!

    Thanks again!
    --
    dnl

    By Anonymous Anonymous, at 5:57 PM CDT  

  • On Debian 9 chrome apps knob https://github.com/googlearchive/chrome-app-samples/tree/master/samples/usb/knob
    for Griffin PowerMate knob don't work?

    App was granted the "usbDevices" permission.
    knob.js:79 Found device: 44
    knob.js:21 Error: undefined
    knob.html:1 Unchecked runtime.lastError while running usb.interruptTransfer: Transfer failed.
    at Object.callback (chrome-extension://mnalfnaijcghkjlgehlcgiganpcmdnna/knob.js:81:20)

    in log is message
    USBUser[2017/10/11 13:03:50.468647] usb_device_handle_usbfs.cc:770 Endpoint address 129 is not part of a claimed interface.

    Does anyone have any idea what this is all about?


    By Anonymous johnt246@yahoo.com, at 11:45 AM CDT  

  • Hi great reading yoour post

    By Anonymous Keaton S, at 3:41 AM CDT  

Post a Comment

<< Home