Categories
Ubuntu

Getting my bluetooth keyboard working again after an Ubuntu upgrade

I have a wireless bluetooth keyboard (a Logitech diNovo ultra-flat, about seven years old) that I love. Every time I update my Ubuntu installation there’s a ~50% chance that it’ll stop working, and on the update to 15.10 that I just did I got unlucky.

To get it working again I had to comment out the following two lines in /lib/udev/rules.d/97-hid2hci.rules and then reboot.

KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[3bc]", \
  RUN+="hid2hci --method=logitech-hid --devpath=%p"

I’ve had to do something similar on more than one previous occasion. The idea originated here, but note that the name of the rules file has changed since that was written.

(When I updated to 15.04 this problem did not manifest. However, I got unlucky and the batteries in the keyboard died while the update was occurring. Batteries in this keyboard typically last 4–5 months, and diagnosing dead batteries is normally easy — hey, the keyboard stopped working suddenly! — but because Ubuntu updates had caused troubles with this keyboard in the past I assumed the update was the cause. I didn’t think to try new batteries until I’d spent a couple of tedious hours deep in the bluetooth configuration weeds. Lesson learned.)

Categories
Firefox Ubuntu

Warning for Firefox devs planning to upgrade to Ubuntu 13.10

I just upgraded from Ubuntu 13.04 to Ubuntu 13.10, and Firefox wouldn’t build with either clang or GCC.

clang was initially failing during configure, complaining about not being able to find joystick.h, though the underlying failure was an inability to find stddef.h.  This Ubuntu bug describes a workaround, which is to do the following.

cd /usr/lib/clang/3.2/
sudo ln -s /usr/lib/llvm-3.2/lib/clang/3.2/include

With that in place, I clobbered and rebuilt, and clang complained about a problem in allocator.h relating to a name __allocator_base, and GCC complained about C++11 support being insufficient.

Both failures had the same underlying cause, which is that both compilers are hardwired to look for some GCC-4.7 headers (which they shouldn’t) as well as GCC-4.8 headers.  I filed a bug with Ubuntu about this.

I worked around the problem just by renaming /usr/include/c++/4.7/ and /usr/include/x86_64-linux-gnu/c++/4.7/.  There may be more elegant workarounds, but that was good enough for me.

Categories
Ubuntu

Upgrading Ubuntu (sigh)

I finally got around to upgrading my desktop from Ubuntu 9.10 to Ubuntu 10.04.

First of all, the bluetooth connection to my wireless Logitech keyboard broke. It’s always the first thing to break, so I did what I’ve done in the past: I repeated the “set up a new bluetooth device” steps about 30 times in a row, with minor variations, until it finally registered correctly. I may have rebooted once or twice along the way, I can’t remember now.

Second, my wired connection has been flaky, sometimes working and sometimes not.  (Wireless has been fine, however.)  Rebooting had fixed the problem until today. Eventually I found this thread which told me that I needed to not just reboot, but hard reboot: turn off my machine and disconnect it from all power sources for several minutes.  Apparently this causes the network card’s firmware to be reloaded.  Miraculously enough, this worked.  Fingers crossed it’ll continue to work next time I reboot or restart.

Unfortunately, the machine’s speaker still doesn’t beep when someone pings me in Chatzilla.  That stopped working when I upgraded to 9.10.  Actually, the machine’s speaker stopped working at all after that upgrade, so I investigated and modified some config file so that it worked again with the ‘beep’ command, but it still didn’t work in Chatzilla.  It’s the one time when I’d like any kind of sound to work in Linux (I can use my Mac laptop for watching videos and all that stuff).

Having used Ubuntu 8.10, 9.04, 9.10 and now 10.04, I’m glad 10.04 is an LTS release.  It’ll be good not having to go through these steps every 6 months.