User loginCMS by Drupal |
Mighty Mouse Returns!I recently complained about my troubles in getting my Apple Mighty Mouse to scroll horizontally on my Linux box. It works now! Nothing to it… Turns out there was a bug in the USB HID to Linux Input subsystem converter. As usual, I wasted a lot of time looking for some wacky thing the mouse was doing that the kernel didn't expect. Nope—just a plain ol' bug where some lines were in the wrong order. (The technical version is that it was setting capability bits for the REL inputs before it remapped those inputs in quirks mapping. After works much better.) [Update: I've put up a cleaner patch.] A patch that should work with at least kernel 2.6.15, and probably a lot further back than that, is attached. I'm in the process of submitting this to the appropriate folks, so hopefully it will be included everywhere sometime soon. The real problem is that input in Linux has become a gosh-awful undebuggable mess. Yeesh. For example, it turns out (thanks to Keithp for the tip!) that the ability to talk directly to /dev/psaux is just…gone. That device, by definition, now aggregates all mouse input events, and so you better hope that's what you wanted. You can get just the events for your PS/2 mouse off one of the /dev/input/event? or /dev/input/mouse? devices—if you can figure out which one. Good luck with that. BTW, the current X server will hang if you point it wrong, and there doesn't seem to be any way to ask it to check. Whee! I've only played with it for a few seconds, really, but the Mighty Mouse itself seems pretty nice. 2D scrolling in Firefox is great. 2D scrolling in the GIMP is awesome. Image editing is about 100 times easier now. Mostly it was fun to debug and repair a kernel problem. Sure could have used the Seat HOWTO, though.
|
BT Mighty Mouse scroll...
Hi friends,
I have read all your comments and cannot find if there is a solution to get the scroll working on the Wireless Mighty Mouse.
I am using Debian and the mouse works, the buttons work, but the scroll doesn-t
Will appreciate very much any help!
Thanks
Patience or industriousness
I am told by the kernel devs that the combination of decoupling the Linux HCI and USB subsystems in kernel 2.6.19 and a patch introduced in 2.6.20 should get you going. This blog seems like a confirmation.
Unfortunately, the Debian kernel packaging seems stuck at 2.6.18 for some reason. You can either wait for Debian to package a more recent kernel, or go build a kernel yourself using kernel-package or something.
I'm trying to get my own BT Mighty Mouse running as we speak. I'll post here if it works.
Actually, 2.6.20 may need patches
It looks like some kernel patches are needed for 2.6.20. I'm still working on this.
Difference Bluetooth and USB Mighty Mouse
Hello,
i have both mice now. The small evtest programm find you here: http://game-sat.com/~brian/Howtos/AppleMightyMouse.htm
here the output :
galla:/home/klaus/Desktop# ./evtest /dev/input/event3
Input driver version is 1.0.0
Input device ID: bus 0x3 vendor 0x5ac product 0x304 version 0x110
Input device name: "Mitsumi Electric Apple Optical USB Mouse"
Supported events:
Event type 0 (Sync)
Event type 1 (Key)
Event code 272 (LeftBtn)
Event code 273 (RightBtn)
Event code 274 (MiddleBtn)
Event code 275 (SideBtn)
Event type 2 (Relative)
Event code 0 (X)
Event code 1 (Y)
Event code 6 (HWheel)
Event code 8 (Wheel)
Event type 20 (Repeat)
Testing ... (interrupt to exit)
galla:/home/klaus/Desktop# ./evtest /dev/input/event0
Input driver version is 1.0.0
Input device ID: bus 0x5 vendor 0x5ac product 0x30c version 0x200
Input device name: "Bluetooth HID Boot Protocol Device"
Supported events:
Event type 0 (Sync)
Event type 1 (Key)
Event code 272 (LeftBtn)
Event code 273 (RightBtn)
Event code 274 (MiddleBtn)
Event code 275 (SideBtn)
Event code 276 (ExtraBtn)
Event type 2 (Relative)
Event code 0 (X)
Event code 1 (Y)
Event code 8 (Wheel)
Testing ... (interrupt to exit)
The USB mouse work correct.
It seems the bluetooth driver work not correct. I think event code 276 (ExtraBtn) is the Hwheel.
Any ideas ?
Best regards
klaus
Fascinating
Thanks hugely for this very clear report.
Offhand, I can't quite figure out what the device driver stack is looking like for the Bluetooth mouse. What distro are you running? Ubuntu?
I'll look into buying myself a Bluetooth Mighty Mouse next time I'm at the Apple store. I suspect I'll need to play with a device to figure out what's going on and fix it.
Linux kernel version ?
Is it known yet in which linux kernel version the patch it will incorporated ?
Patch is in 2.6.18
Patch is in 2.6.18 and later. I'm not sure about 2.6.17. No, I take that back—just checked, and 2.6.17.7 does not have it.
BT Mighty Mouse
I have the same problem. No vertical events with the ball. I use Debian testing. Kernel 2.6.18-3 evdev 1.2-6; testet with evtest.
Get anybody the ball from the bluetooth Mighty to work ?
Weird
Not sure what's up. I don't know "evtest". My Xorg evdev driver bits are older than yours, my kernel is also older.
Is it possible you just have your xorg.conf set up wrong? It's easy to do. Here's what works for me:
Section "InputDevice" Identifier "EvMightyMouse0" Driver "evdev" Option "Name" "Mitsumi Electric Apple Optical USB Mouse" EndSectionMake the device be CorePointer by
InputDevice "EvMightyMouse0" "CorePointer"in the ServerLayout section (with no other pointers).
Other than that, I'm out of ideas. You should have
on your system—if so, cat it and move the scroll ball vertically and see if characters come out.
Good luck.
more information
I'm the one who can't get vertical scrolling to generate any events. I just realized that I've got the new wireless (Bluetooth) model, and you have the wired one. Maybe that has something to do with it.
I dunno (about BT Mighty Mouse)
I've never seen the BT Mighty Mouse. What are you using for BT on the host end? If it's a standard BT dongle rather than some mouse-specific thing, there's every chance that it's following a different, still-buggy code path.
Probably the easiest debugging plan, if you can manage it, is to start by borrowing a non-BT Mighty Mouse from someone and seeing if it works differently. Let me know; don't be shy about sending me email and we'll try to figure it out.
I can't get this to work.
I'm inspired by your blog and want a Mighty Mouse too. I've got one connected to my Linux laptop, using the 2.6.18 kernel (which I believe has your patch, thank you). The mouse movement works fine, but the scrolling does not. Scrolling the ball left and right translates to up and down scrolling motion on the screen. Scrolling the ball up and down generates no evdev events at all. Any suggestions?
are we going to see this in Ubuntu....
I would love to see a nice howto.
Most of my mouse features work except for a few things.
Would you be willing to help me out?
Ubuntu Dapper
Current status
I'm told that my kernel patch has made it into Greg KH's tree, but I haven't seen it hit stable yet.
Drop me some email and between the two of us we'll figure out what to do about some kind of rodent HOWTO.
You're my hero
What, I let another of your birthday's go without even a stupid electronic greeting card? Sigh. Nice work diving under the hood and fixing your Mighty Happy Rodent! Speaking as one who did chuck it in for the Mac (on the desktop only of course), I'm really impressed by your ability to bend your OS of choice to your will. I should see if there's a way to get OS X to use the side buttons independently; as it stands, they're programmed as a single chord.
Good job, and Happy Belated Birthday!
Direct access to input ports
You might try using serio_raw, and devices are listed in sysfs.
Thanks!
After "modprobe serio_raw" I'm not actually finding a device inode or major/minor in sysfs, but I suspect that's my bad. Thanks much for the hint!
2D scrolling
Does tha mean 2D scrolling works to?
Yep, 2D
Vertical scrolling was working before.
Sadly, for now you'll need to use xmodmap to swap a few buttons around. Use the hideously ugly xmodmap expression
(i.e., swap buttons 2 and 3 to get the middle button in the right place, and swap buttons 6 and 7 to make horizontal scrolling go the right direction.)
If somebody can confirm that "PowerMouse" is an old name for the Mighty Mouse, I'll add a fix to this in the driver quirks. Otherwise, Apple has used the same USB vendor and product ID on two different mice, in which case it's much harder to fix in the kernel.
way to go!!
Great news. I am not sure I will be able to withstand the tempation not to buy one then next time I walk by an apple store. (And I pass by two apple shops every day on my way to work :)
What? The bug was in Linux
What? The bug was in Linux and not in the Apple product?! Unbelievable.
I strongly agree!!
I TOTTALY AGREE. It was clear that there could be NO BUG on an apple product, I mean a bug in an apple product?? THAT'S FRIGGIN IMPOSSIBLE!! That would cause the universe to collapse on itself !!!1111 ....
Sorry just couldn't hold myself. Get a grip zealots. Every OS has bugs, wooptiee-doo.
Much less a bug in completely repurposed hardware
Grandparent should try plugging a bunch of random PC hardware into a Mac and see how far they get.
My point was that on the
My point was that on the original "Mighty Sad Rodent" post, the Mighty Mouse was clearly fingered as the offending party. When, in fact, if you know Bart like I do, you've heard him say MANY TIMES that "Linux is for people who like to fix stuff". I found the original opprobrium funny in light of that mantra, and my comment was simply an "I told you so" for something I didn't bother telling you.
Of course every OS has bugs, here we are in The Land of Useless and Absurd Extremes. Which OS has MORE bugs, your favorite Linux distro or OS X.whatever? My simple claim, which is totally untestable and obviously won't create detente, is that, if there is a problem with Apple hardware and Linux software, the first and most obvious party to investigate is the Linux software.
"Linux is for people who like to fix stuff." Apple is "for the rest of them". Bart has expressed these sentiments multiple times, and was proven correct by the Might Sad Rodent.
I find your anonymity highly amusing, but...
I never, as far as I can tell, claimed that the Mighty Mouse was the offending party. What I actually said was
You'll surely admit that your interpretation of this is somewhat mystifying?I do agree with your claim: if there is a problem with hardware and software, the first and most obvious party to investigate is the software. If that's too general for you, I can be more specific: if there is a problem with hardware foreign to some piece of software, the first and most obvious party to investigate is the software.
I did "just want my cool new mouse to plug in and work right, the way The Rest of Them would expect." But fixing it was OK, too. At least I got a cool new toy to play with. I have no idea how I would have fixed a software bug like this on any proprietary OS.
Anyway, it's all in good fun. Hopefully there's no hard feelings. There are definitely days when I am tempted to just chuck it all and buy a Mac. If nothing else, I am dissuaded by the disturbingly insignificant weight of my wallet.
The post is called "Mighty
The post is called "Mighty Sad Rodent" - it's not called "Mighty Sad Operating System" or "Mighty Sad Device Driver". That was my cue for assigning blame, I hope you can see my point. It was not clear to me who produced the USB HID driver, but that's because I don't know hardly anything about the insides of Linux. I am, in the truest sense, "The rest of them".
There are definitely no hard feelings of any kind, but the anonymous guy who posted right after me seemed quite upset by comment, and I wanted to clear up the reason I made the comment. That's the only reason for my long post.
Yes, it's great being anonymous, I recommend it whenever possible. And, BTW, I was the guy who recommended the Mighty Mouse originally. I guess if I gave you fifty bucks, it could be my birthday present to you.
The rodent was sad...
because Linux wouldn't talk to it.
I often call mice rodents; it wasn't pejorative against the Mighty Mouse in particular. I'm not a big mouse fan in general.
The recommendation was birthday present enough. Thanks much!