When the Ubuntu Sound Control Panel Doesn’t Show Up

After upgrading from Ubuntu 9.0 to 9.10 the other day, I suddenly got a very annoying beep every time I saved a file in NetBeans. Horrible stuff! Disabling it in NetBeans seems impossible (and Firefox makes the same sound when it encounters an error), so removing it in the Ubuntu Sound Configuration Panel sounded (!) like the best option.

One problem: The Sound Control Panel (when selecting System -> Preferences -> Sound) didn’t open. It attempts to load, but then disappears without a trace. I couldn’t find a notice in any of the logfiles either, so my only hope of a remedy was the global debugging power of teh intarwebs.

This was actually harder than I imagined, as I had to wade through large amounts of documentation of how to open the control panel at all. I had found the menu item, but it didn’t work.

Luckily someone had documented several issues at a page named “Sound Solutions for Ubuntu 9.04“, and while I didn’t have the exact problems listed there, they mentioned the required packages for pulseaudio and the GUIs.

Installing the padevchooser package should pull in all the dependencies:

root@ubuntu:~# apt-get install padevchooser

(Use sudo apt-get install padevchooser if you’re not root)

At the same split second the installer finished, the sound configuration dialog opened and I were able to switch to the NO SOUND scheme in Ubuntu. No beeps!

Fatal error: Undefined class constant ‘ATTR_DEFAULT_FETCH_MODE’

This is one of the common error messages that seems to appear after installing PHP – in particular under Ubuntu or Debian (where I experienced it). The reason for this is that the PDO version you’ve just installed is too old for the constant to exist, usually because you where naive enough to install the extension from PECL instead of using the default supplied by ubuntu. If you did the same as me:

apt-get install 
pecl install pdo
pecl install pdo_mysql

/etc/init.d/apache2 restart

And everything seems to work, except for that missing constant. What the fsck?!

The reason is that the PECL version of PDO is no longer maintained (I’d suggest to automagically push the newest version to PECL too, just so pecl install and pecl upgrade works as expected). The fact is that when you did pecl install pdo, you destroyed the more recent version provided by the default php5-common package (under Ubuntu, at least).

To solve the problem (and if you also did pecl install pdo_mysql, you’ll have to replace that one too…)

apt-get install --reinstall php5-common php5-mysql php5-mysqli

Restart. Relive. Re.. eh .. yeah. Rerere.

If you’re building from source, you’ll need to add:

--enable-pdo --with-pdo-mysql --with-pdo-pgsql (and any other driver you need)

Keyboard Not Working in Xorg After Booting Ubuntu

I’ve had a weird issue a couple of times on my work computer, where the keyboard and the mouse does not respond in Xorg after rebooting. As I only reboot my work computer every 80 days or so, I tend to forget the reason why it happens between each boot sequence.

The reason why the mouse and keyboard does not work after rebooting at my computer is that HAL or DBUS failed to start. I’ve not dug further into this issue, as it doesn’t happen very often. The solution:

(you can switch to a text console by pressing ctrl+alt+f1, your keyboard will work there)

/etc/init.d/dbus start
/etc/init.d/hal start

Restart X / GDM:

/etc/init.d/gdm restart

Switch back to the Xorg terminal (alt+f7) and hopefully your keyboard and mouse will yet again work!

Google Earth and Error Code 29

I finally installed Google Earth on my Ubuntu Intrepid installation at work today, but everything crapped out with a “Could not contact… Error code 29” error. Didn’t find any obvious solution at first, but deep inside a thread at the Ubuntu forums I stumbled across a post about how to fix Error Code 29 in Google Earth. The trick? Install lib32nss-mdns through apt-get, delete .googleearth and .config/Google/GoogleEarthPlus.conf, restart and be happy.

Worked great. Thanks Mr. / Ms. / Mrs. Melk79.

Mouse Stuck in Lower Right Corner in Ubuntu Intrepid under VMWare?

If your mouse pointer is stuck in the lower right corner after upgrading to the current alpha version of Ubuntu, Intrepid, the reason is that the vmmouse driver got borked somewhere between Hardy and the current version of Intrepid. This means that you’ll only see “Moving to desktop 2” (or whatever desktop you have in the lower right corner). The fix is to change the reference to ‘vmmouse‘ in /etc/X11/xorg.conf to ‘mouse‘. This is not as good (you’ll not be able to move your mouse pointer from your host to your vmware machine seamless any longer), but at least it works.

You can track the current progress over at trackpad: Ubuntu Bug #248521.