Log in
07
January

Me and my Logitech MediaPlay mousie and Linux

Written by Jason 'vanRijn' Kasper. 9 comments Posted in: Life in General

One word seems to fit… WAHOO!!! A couple of weeks ago, I bought this incredibly cool Logitech MediaPlay mousie. Now, I run Linux by choice, and have for the last 10 years, and most probably will for the next 20 or so. This means that there are certain things you resign yourself to having to figure out yourself.

This mousie was one of them. I mean, the smooth scrolling, and etcetera worked fine, as did the 3 other buttons (X sees 5 buttons for a normal 3 button mouse with a scroll-wheel–3 regular and buttons 4 and 5 are the scroll-wheel’s up and down). So, that much worked fine out of the box. But this cute little mousie has 10 other buttons!! It has side-to-side scroll, universal back/next, media launcher, media play/pause, media volume up/down, and media back/next. 15 buttons altogether!! =:) And after a bit of work, they all work PERFECTLY from within Linux!! From the reviews I’ve read about this mousie on Amazon, that’s saying more than what people are saying about this mouse in that other popular operating system. But anyway, I digress…

First, it’s possible to do no complex hackery at all and get buttons 6 and 7 working. Firefox and Opera both understand these buttons as back and next, so by just doing this to your XF86Config (or xorg.conf):

Section “InputDevice”
Identifier “Mouse0″
Driver “mouse”
#Option “Protocol” “IMPS/2″
Option “Protocol” “ExplorerPS/2″
Option “Device” “/dev/input/mice”
#Option “ZAxisMapping” “4 5″
Option “ZAxisMapping” “6 7″
Option “ButtonNumber” “7″
Option “Buttons” “7″
EndSection

… and this on your command line:

xmodmap -e “pointer = 1 2 3 6 7 4 5″

… you can have that working. But that wasn’t enough for me, and it shouldn’t be for you either. =:)

Enter this sweet little project by David Oliveira. I have posted on that page in great detail all that I’ve done to get things working perfectly for me, so I’ll leave it up to the reader to follow that far for the detailed directions. It’s quite easy, though, thanks to the work that David has done on the kernel module.

Anyway, again, WAHOO!!! My cute little mousie is now fully integrated into KDE. The media button launches amarok (which fully rocks in stereo), volume up and volume down do just that, and KDE displays a nice OSD showing what it’s doing. I have the play/pause and media next/previous buttons controlling amarok’s playlists.

This is by far the best “fuzzy” feeling that I’ve had in Linux in a while, and it feels quite good and satisfying, I must say. =:)

Long live the revolution. =;)

9 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Russell Evans

    “I have posted on that page in great detail all that I’ve done to get things working perfectly for me, so I’ll leave it up to the reader to follow that far for the detailed directions.”

    I can not find your post on the lmpcm_usb site. I followed the standard directions posted on the page without success so was very glad to see someone using SuSE 10.0 had accomplished setting it up and might have documented it.

    Could you post your howto to me via email?

    Thank you
    Russell

    Sunday February 26, 2006 at 8:12 pm
  2. Jason 'vanRijn' Kasper

    Hi Russell,

    Sorry it has taken so long to get back to this…. =:/

    Here’s what I was referring to:

    Yep. SWEET!! I got it all working perfectly. A couple of caveats and several possibly-non-obvious bits for those who come after us…..

    1) I think it’s essential to use the pc105 keyboard layout. I’m not sure of this, but I’ve done, as David suggested, and combined with the below, it all Just Works now.

    2) mmkcd interferes with this, from what I saw. Either you can use mmkcd or the xmodmap approach. In other words, if I run xmodmap, xev shows the keycodes correctly, but if I then start mmkcd, xev no longer shows the events, nor does KDE/friends, until I kill mmkcd and re-run xmodmap on the file. I have ditched mmkcd entirely now and only use xmodmap. Once you do this, you can use the standard KDE/Gnome/bbkeys/whatever you want to configure the X keys, since they now can be seen by their mapped names.

    3) I don’t understand why, but the xmodmap file you used doesn’t work perfectly for me. So I’ve changed it to match the keycodes that I see through mmkc-wxWidgets and xev, as shown below…

    keycode 234 = XF86Back
    keycode 233 = XF86Forward
    keycode 174 = XF86AudioLowerVolume
    keycode 176 = XF86AudioRaiseVolume
    keycode 162 = XF86AudioPlay
    keycode 144 = XF86AudioPrev
    keycode 153 = XF86AudioNext
    keycode 168 = XF86AudioMedia
    pointer = 1 2 3 6 7 4 5

    Thanks again David!! If ever we meet, I owe you lunch or something. =:) May God’s face shine brightly on you. =:)

    In general, though, compile the lmpcm_usb module, do “make install” on it, add a line like this: “blacklist usbhid” to /etc/modprobe.conf.local, modprobe -r usbhid, then plug your mouse in. You should see it load into the kernel by running dmesg afterwards. Then it’s changing adding the above lines to your xorg.conf, and then the xmodmap magic above too. Um. Maybe if you post back here what you’ve tried and where you’re getting stuck, I could help more.

    Oh–by the way, SuSE 10 now has the mediaplay mouse shown as a device in the mouse configuration section of YaST, so instead of manually editting xorg.conf, you can select it. You’ll also want to click the “emulate wheel” checkbox and change the number to 7, iirc.

    Anyway, report back with what you’ve tried and found. =:)

    Thursday March 23, 2006 at 11:28 pm
  3. Pete C

    Hi Jason,

    I’ve also recently acquired myself a shinny new MediaPlay mouse and although I have a windows box as well as my Linux box I’m now trying to do all that I can in Linux. However I’m still rather new to it all so please bear with me if I seem a little clueless.

    I’m running SuSE 10 and am having a few problems following the instructions on David’s site, am I correct in thinking you have got it all working in SuSE, or have you used a different distro?

    Basically my problem is right at the start, I have got and unpacked the latest version of the driver but when I type ‘make’ in the unpacked directory (I assume this should trigger the compilation?) I get the following:

    linux:/home/pete/source/lmpcm_usb-0.5.4 # make

    make -C /lib/modules/2.6.13-15.8-default/build SUBDIRS=/home/pete/source/lmpcm_usb-0.5.4 modules
    make[1]: Entering directory `/usr/src/linux-2.6.13-15.8-obj/i386/default’
    make[1]: *** No rule to make target `modules’. Stop.
    make[1]: Leaving directory `/usr/src/linux-2.6.13-15.8-obj/i386/default’
    make: *** [default] Error 2

    I believe I have sufficient versions of the kernel (2.6.13-15.8), GCC (4.0.2), and GNU Make (3.8). I am running the command as su. I have checked the kernel support as specified however the file ‘/lib/modules/2.6.13-15.8-default/build/.config’ does not exist on my system, instead I believe the equivalent is ‘/boot/config-2.6.13-15.8-default’ which has all of the support he indicated with the possible exception of ‘CONFIG_USB_MOUSE’ for which the entry is commented out.

    Am I missing something very obvious? My best guess is that I have to edit the MakeFile to reflect the structure of the SuSE distro but I am not sure what to try to change. The makefile also confuses me slightly as I would have expected some calls to gcc/cc in it somewhere.

    Any help or pointers would be greatly appreciated, if I can provide you with any more info then please ask.

    Thanks,

    Pete

    Thursday April 13, 2006 at 8:33 pm
  4. Jason 'vanRijn' Kasper

    Hi there! =:) It looks like you need to fetch the kernel headers and/or kernel source. Um. And to answer your question, yes, I did have it working on a SuSE 10 machine. It’s been a while since I’ve had that machine, though, so I’m doing this from memory….

    I’d try installing the kernel-source RPM for the kernel you’re running and symlink it to /usr/src/linux. Then copy /boot/config- to /usr/src/linux/.config. Then run “make modules_prepare”. Then you should be ready to build the lmpcm modules.

    Friday April 14, 2006 at 12:06 am
  5. Pete C

    Hi Jason,

    I’m happy to report it’s all working now! Thanks for the pointers!

    For any others reading this, I installed the source using yast and followed the instructions at http://www.novell.com/coolsolutions/feature/16340.html then symlinked the source folder ‘/usr/src/linux-2.6.13-15/’ to ‘/lib/modules/2.6.13-15.8-default/build’ and it all worked fine.

    Thanks again and have a happy Easter,

    Pete

    Saturday April 15, 2006 at 12:14 pm
  6. Jason 'vanRijn' Kasper

    Ahh, glad to hear you got it working!! =:) Happy Easter to you too!! =:)

    Saturday April 15, 2006 at 12:36 pm
  7. Maarten Provo

    Ok, I’m down to the last step where I have to load the module typing ‘# modprobe lmpcm_usb’ and then I get the error ‘FATAL: Module lmpcm_usb not found.’.

    And this is what it gave while executing make and make install

    [root@localhost ~]# cd /tmp/lmpcm_usb-0.5.4
    [root@localhost lmpcm_usb-0.5.4]# make
    make -C /lib/modules/2.6.12-22mdk/build SUBDIRS=/tmp/lmpcm_usb-0.5.4 modules
    make[1]: Entering directory `/usr/src/linux-2.6.12-22mdk’

    WARNING: Symbol version dump /usr/src/linux-2.6.12-22mdk/Module.symvers
    is missing; modules will have no dependencies and modversions.

    Building modules, stage 2.
    MODPOST
    make[1]: Leaving directory `/usr/src/linux-2.6.12-22mdk’
    [root@localhost lmpcm_usb-0.5.4]# make install
    [root@localhost lmpcm_usb-0.5.4]#

    Tuesday June 27, 2006 at 4:52 am
  8. Jamesoswan

    Take a Look at this.. http://www.hidpoint.com. Seems they have done all the Job. Just download and use it

    Thursday May 8, 2008 at 4:41 pm

Continuing the Discussion

  1. Moving Parts of Kasper » Blog Archive » Hi, it’s me

    [...] 8221; to /etc/hotplug/blacklist so that hotplug doesn’t try to load usbhid (I have a funky mouse that has a special Linux usb driver), but that&#8217 [...]

    Friday September 23, 200510:44 pm

Some HTML is OK

or, reply to this post via trackback.