diNovo Mini and Linux

The Logitech diNovo Mini is just what the doctor ordered for use with my 42 inch HD monitor connected to my totally silent computer, zooty. It allows me to kick back in easy chair across the room and still have access to all functions of my home theatre PC.

Linux

My only question was, "Will it work with Linux?" (specifically the Fedora 8 distribution I am primarily using). The answer is (as always with Linux), "Yes, but...".

The short story is you need to add this kernel boot option:

usbhid.quirks=0x046d:0xc71f:0x00080000

NOTE: That 0x00080000 bit mask above corresponds to the macro HID_QUIRK_DUPLICATE_USAGES in my linux source code. Attila Vass sent me some email saying he discovered the DUPLICATE_USAGE flag in his linux was bit 0x00200000, so be aware that different versions of the usbhid driver may have different values for the bit you need to set. You may have to obtain the source to find out for sure.

Another Note: Apparently the usbhid quirks option did not appear until kernel 2.6.22, so releases such as CentOS that use older kernels will need more drastic measures to support this keyboard (like patching and rebuilding the kernel - something that is beyond the scope of this web page).

The long story is longer :-).

The keyboard part works right off the bat. Plug in the Logitech provided USB dongle, and start typing. Your computer thinks you have a USB keyboard connected and doesn't know anything about it really using bluetooth (a good thing I think, since the USB keyboard will work at boot time in the BIOS screens, etc).

However, the mouse function of the touchpad does not work right off the bat under linux. The standard /dev/input/mice interface doesn't see anything coming in that looks like mouse movement.

I tried switching to evdev for input events in xorg.conf, and I was indeed able to get events, but if I look at them when running xev, it looks like I get a bunch of button press events spewed out when I move my finger in the touchpad. Not exactly helpful.

The next step is a google search, but since the diNovo Mini is brand new, there isn't a lot of information out there yet. There were hits on the older diNovo Edge keyboard, and many of them said that using a real bluetooth adapter worked when the USB dongle didn't work.

I tried a D-Link DBT-120 (rev C1) adapter I was able to pick up locally in one of the surviving Comp-USA stores, and it does indeed work. If I connect the keyboard via bluetooth I can see keyboard and mouse events with no problems.

Actually, I should say no problems other than connecting :-). Bluetooth on Linux is apparently a whole separate adventure, and I had the good fortune to try this as Linux is attempting to move from the old hidd code to the new bluetooth input service code. After many adventures (including kdebluetooth getting my system in a state where no input devices of any kind worked at all), I finally decided linux needs another few years of bluetooth experience. I could make the Mini work, but I constantly had to manually connect, which sort of put a crimp in the kicking back across the room experience.

Back to USB I decided - I like my keyboard working at boot time. This time, I delved into the kernel source code (another adventure if you have absolutely no idea what is going on with USB). After much poking around, I eventually found the drivers/hid/usbhid/hid-quirks.c file where all the nonstandard USB input devices go to get smacked into conformity.

After several side trips into enabling kernel debug code, I finally noticed the quirk entry for the diNovo Edge keyboard. On the theory that the Mini probably uses the same protocol (being in the same product family from the same manufacturer), I set off on a quest to figure out how to add a quirk for a new device.

This thread on the linux-usb mailing list was most helpful, and as the conclusion of the thread shows, there is now a patch queued up that will eventually make it into the kernel so I will no longer need the boot parameter and the keyboard will just work out of the box.

Note: The boot parameter is needed on Fedora because the fedora kernel has the usbhid linked in. No doubt the same trick would work on a different linux distribution where usbhid is a module if you add a line like this to /etc/modprobe.conf

options usbhid quirks=0x046d:0xc71f:0x00080000

Review

OK, it now works, how do I like it?

The backlight is great for use in a dark room, but it is as difficult to type on as I expected it would be. The "thumb typing generation" will probably have fewer problems (but it is somewhat larger than most of the keyboards on handheld devices, so that might cause some thumb muscle memory problems). I don't consider this a big deal. I want the keyboard to work, but I'm not planning on using it heavily, it is just nice to have when I do need to type something.

Now that the touchpad is working, I wish I could teach X11 to apply different mouse accelerations to different mice (maybe I can, but I don't know how). It isn't bad, but it can take a little time to traverse a 1920x1080 screen.

News on the separate mouse front: The newest versions of X11 have the ability to specify acceleration parameters in the InputDevice section, so if you separate out your mice into separate devices in xorg.conf, you can specify separate acceleration. Even more promising is this patch, which will make acceleration work ever so much better when it finally shows up in the distributed versions of X. This thread in the xorg mailing list pointed me to the patch info.

One flaw, which may be a general problem with the product (because I have seen other people mention it on the web): With the touchpad in cursor movement mode, sometimes the down arrow button press simply does not work (I noticed this happen a couple of times when I had low level usbhid kernel debug code turned on, and there were absolutely no events coming in, so either the keyboard itself didn't send them, or they got lost inside the USB dongle). If you press it enough (especially if you press a different direction first), it starts working.

News on the down arrow front: If you press the pad around the 7:30 position rather than the 6:00 position, you get a reliable down arrow. See this thread in the avsforum.

A less serious flaw (though still a bit irritating) is the lack of function keys. Seems like they could easily have provided at least F1 through F9 via a FN shift of the number keys, but for some reason they didn't do that. I suppose if I really need them I can do some trickery with xmodmap the windows key (which shows up in X as a meta prefix key) and the number keys. You definitely wouldn't want it as your only keyboard - one of the first things you need to do when installing Windows (XP anyway) is press F8 to accept the license - can't be done with this keyboard.

AAUGH! I just noticed there is no veritcal bar | character on the thing. Makes it very irritating to use if you are in a shell and trying to pipe output to something. I had to bring up the "ascii" man page in another window and cut and paste the vertical bar :-).

Conclusion: I'm moderately happy with it, and I'm sure glad I got the touchpad working with the USB dongle so I don't have to fool with a bluetooth connection (but why they didn't provide all the normal keys I don't understand).

Update on missing keys. I got mail from “Justin” with a list of several of the missing keys, and also some feedback on the logitech forums.

In the latest info from the forums there is a pointer to this logitech knowledge base article, and now we know where backtick is:

To type Use FN with
| N
| SHIFT M
[ L
] ;
{ J
} K
~ W
` Q

Yikes! The adventure continues... I just found the keyboard not working. Nothing I tried would make it function, even switching back to the bluetooth connection mode, pressing the connect button, etc. Finally power cycled by taking out the battery and putting it back in, now it is working again. I guess the microcode crashed :-). This happens to my monitor sometimes as well, hopefully it won't be too frequent. (Fortunately, it hasn't been. I've had it for a while now, and this has only happened once, maybe because I'm not fooling with the bluetooth receiver anymore).

Links

Logitech diNovo Mini product page.

linux-usb mailing list thread on getting touchpad working.

xorg mailing list thread on multiple mouse acceleration.

xorg bugzilla with patch for better mouse acceleration.

avsforum thread with info on getting down arrow working.

Logitech forum thread on down arrow problem.

Logitech forum thread on missing characters.

Ubuntu Forums thread on getting the mini working.

My home page.

Page last modified Sat Oct 11 14:21:24 2008