Just for the record, it seems I got it working again. Below is what I did.
!!! Beware this might not be safe !!!
Because it seems the device name is created by the kernel, I added a small
patch to the hid driver which sets a generic name whenever it would be an
empty string.
This is the patch for jxself's kernel 3.12.0 (It works the same with 3.11.7,
although the line numbers are slightly off. I did not try to patch Trisquel's
generic kernel, which has the same problem with my mouse.):
diff -ruN linux-source-3.12.0-gnu.orig/drivers/hid/hid-core.c
linux-source-3.12.0-gnu/drivers/hid/hid-core.c
--- linux-source-3.12.0-gnu.orig/drivers/hid/hid-core.c 2013-11-04
00:41:51.000000000 +0100
+++ linux-source-3.12.0-gnu/drivers/hid/hid-core.c 2013-11-16
14:14:14.936673567 +0100
@@ -1490,6 +1490,8 @@
int hid_connect(struct hid_device *hdev, unsigned int connect_mask)
{
+ if(strlen(hdev->name)==0)
+ sprintf(hdev->name, "empty");
static const char *types[] = { "Device", "Pointer", "Mouse",
"Device",
"Joystick", "Gamepad", "Keyboard", "Keypad",
"Multi-Axis Controller"
What is possibly unsafe: I am not sure, if the memory for storing the name
must be allocated and how that would be done. However, until now it didn't do
any (noticable) bad.
Compiling the kernel
Download the sources and copy, extract at some other place
# apt-get install linux-source-3.12.0-gnu
cp /usr/src/linux-source-3.12.0-gnu.tar.bz2 some/place
cd some/place
tar -xjf linux-source-3.12.0-gnu.tar.bz2
Patch it
cd some/place/linux-source-3.12.0-gnu
patch -p1 -i path/to/patch
Copy original kernel config and build it
cat /boot/config-3.12.0-gnu >.config
make oldconfig
make-kpkg clean
fakeroot make-kpkg -j1 --initrd kernel_image
Install it
# dpkg -i some/place/linux-image-3.12.0-gnu_3.12.0-gnu-10.00.Custom_amd64.deb
Funny
On the same machine booting Parabola which to my understanding uses the same
kernel sources as Trisquel and jxself do, the kernel names the mouse "Apple
Magic Mouse". Well, this seems to say: there should be a smarter way of
setting the mouse name, than ugly patching the kernel. I am not sure, if it
is the kernel config file, or some other software involved (maybe systemd vs
upstart)?