Ubuntu 9.04 upgrade quashes audio

The other night, as I usually do, I accepted a slew of Ubuntu updates.  My audio was gone afterwards.

After some searching, this thread proved helpful: http://ubuntuforums.org/showthread.php?t=205449  but I did need to figure out what an appropriate ASLA driver would be.

The soundcard list on the ASLA site showed two options; I went for the HDA one, since
lspci -v
showed HDA from the NVIDIA driver on my ASUS board, that is to say I needed the snd-hda-intel  driver.   Not intuitive, but it worked... sort of...

I followed the instructions on the ubuntuforums link to build from sources, compiling the snd-hda-intel driver with the help of module-assistant (building couldn't have been easier).

The volume control panel has trouble opening (I'm not sure if this is because of the debug build).   Basic sound works, but my Logitech headset is no longer seen, and so my skype is out of commission (does not make me happy - my phone of preference suddenly was made inoperable!).

UPDATE:
It appears that the generic 10de NVIDIA HDA (OSS mixer) sound device, if selected from the volume control hangs the volume control - and you can (?) never get back to it.  The applet is gnome-volume-control:  and when it hangs, you can't even select another window, do anything at all.  CTRL-ALT-F1 to get to a normal terminal login allows you to find and kill that process.  Then you can get back to the X-Win screens (CTRL-ALT-F7).

I tried installing from the Ubuntu distribution (as per the Ubuntu Forums);  I tried building from the alsa sources from Ubuntu;  I tried building from the ALSA latest sources (all drivers) from the ALSA-Project.   I tried both before, and after (repeatedly) removing pulseaudio.   I tested, looked thru the lsmod list on my netbook (Ubuntu 9.10) install.

As one last ditch, I'm going to try to remove what the Ubuntu Forums suggest, get it back to distro with apt-get, and then build the entire distro ASLA sources, and see what that gets me.
cd /usr/src; sudo tar xjvf alsa-driver.tar.bz2; cd modules/alsa-driver
sudo ./configure  --with-kernel=/usr/src/linux-headers-$(uname -r) --with-cards=all --with-isapnp=yes --with-sequencer=yes --with-oss=yes
sudo make
I thought about removing a little more than the Ubuntu Forums say - e.g. libasound2 and libasound2-plugins - but apt-get pulled far too many libraries into the mix with that - close to 300.   For now, I'll just try the standard thing the forum suggests:
 sudo apt-get --purge remove linux-sound-base alsa-base alsa-utils
 sudo apt-get install linux-sound-base alsa-base alsa-utils
 sudo apt-get install ubuntu-desktop
Next, I'll install the ASLA driver as I built it over this:
sudo make install
and reboot...

It looks like pulseaudio doesn't know what to do.  I have rhythmbox playing music through speakers, while I try a test call with skype.   I can initially succeed in having the outputs separate, but I get no input through the skype app from the headset microphone.  If I try, the music shifts into the headset (out of the speakers) and, on a song transition, back again.

Finally I'll try what I posted here in the first place about removing pulseaudio:
killall pulseaudio
sudo aptitude remove pulseaudio
sudo aptitude install esound
sudo rm /etc/X11/Xsession.d/70pulseaudio
It looks like this works.  There is a bit of a caveat: the pulseaudio server seems to be running;  I had to su (sudo was not sufficient) to stop it  (pulseaudio --kill).  It looks like I'd created a .asoundrc file which started up pulseaudio; if you have one, you will want to comment out any pulseaudio lines in it, or (as in my case) remove the file (pulse was the only stuff in it).  Everywhere in /etc  it is set to NOT start on startup, but it is there, and can run, for example, when fired by the menu item Applications->Sound & Video->PulseAudio Volume Control.  It may be useful to remove these applications

UPDATE:
Well, I have restored Skype (more fundamentally, usb Logitech headset recognition on this installation) - this seemed to be accomplished by building / installing _all_ the sound drivers.

For future fallbacks, I can (still) use skype on my netbook (Ubuntu 9.10), or my Fedora-11/64 install.

This was way more work than I would ever want a normal system update to cause me.  Perhaps its time to think of a simple mercurial versioning of update actions, perhaps limited to the last 10 revisions (or so) - a rollback system like, for example, Windows has.

Anybody up for designing this for the Linux community?

HP mini 311

I wanted long battery life (something I could write with on trips, the train), and something to run Linux on.  Most of the netbooks out this summer (2009) had screen resolutions which didn't suite them for making presentations at meetings, conferences, etc.  Even worse, they seemed to be most usable with so called "Netbook Remixes"  of Linux (e.g. Ubuntu, Fedora) which tried to make presentations more readable on the small, low resolution screens.

The 311 offered an NVidia chipset, an HDMI output port, and better resolution, while still holding reasonable battery life (and - at least for my preferences - the HP had a usable keyboard).

To save money, I got a basic, in-stock version from Amazon (no shipping costs, etc. made that the best cost option).

I had a Hitachi Travelstar 7200 320G drive, which happens to be conservative for standby power (better than the 160G drive that came with the 311).   I added 2G RAM, which brought the total RAM up to 3G.

Access to the drive and RAM areas couldn't be nicer - see http://www.mobiletechreview.com/notebooks/HP-Mini-311.htm for some nice pictures.

I started out with a clone of my Ubuntu 9.04 system (a dd copy) - it seemed to work and update fine, but the touchpad would not be recognized by the mouse driver.   What I mean is the touchpad worked fine, but there was no "touch" controls in Ubuntu, so that tap-to-click was always active, and made any typing a significant challenge (as the cursor would jump about quite readily... really, it's a great touchpad).   In Windows, I was able to disable the tap-to-click feature, and then could both navigate and type usefully.

I tried all the "regular" suggestion on the web to get the touchpad recognized, but to no avail.  On one trip, I let Ubuntu Jaunty (9.04) "upgrade" overnite, hoping this might help.  It made my system totally unusable (wouldn't even boot - no keyboard; a real disappointment on a meeting trip!).   When I got home, I did a "fresh" install of Ubuntu 9.10, and that is what I run now - it worked fine, but did not help with the touchpad.

Finally, I found a workaround here: http://ubuntuforums.org/showthread.php?t=1316361

I added these aliases:
alias touchoff='sudo modprobe -r psmouse'
alias touchon='sudo modprobe psmouse'
This successfully disables the touch-pad altogether, but leaves USB mice working fine.   I added a little IOGear Bluetooth 2.1 USB Micro Adapter (model GBU421; I got mine at CDW).  My favorite mouse worked right away.

The above mentioned thread seems to now have some working / hacked version of psmouse (with added hardware identifier), so no doubt there will be better solutions soon.   For now, the aliases give me the control I want, without any worries about upgrade conflicts or problems.

Skype on Ubuntu Jaunty

I wanted to get skype up on my box; more and more people from open source forums around the world are on skype, and sometimes it's just easier to talk than IM.

I picked a USB headset from Logitech (ClearChat Comfort USB), and downloaded the newest Skype Beta (2.1 - Sept. 2009) For Ubuntu 8.10+, 32 bit (I'm running a 32 bit Ubunty, a 64 bit Fedora).

I could not seem to get skype to send sound out to the USB headset, so after some stumbling around forums and various suggestions, here's what worked for me.

As per the Troubleshooting Skype section on ubuntu.com/community/skype, I followed the suggestion (for Intrepid/8.10 there) to remove pulseaudio and install esound.

killall pulseaudio
sudo aptitude remove pulseaudio
sudo aptitude install esound
sudo rm /etc/X11/Xsession.d/70pulseaudio


This seemed to work at first - I got menu choices in the skype options->sound devices page, and was able to get sound out of the headset, but getting recording to work (and trying all the device options) was not working.

I'd checked the volume control to make sure the record levels were set and not muted for the Logitech USB headset. I set System->Preferences->Sound to Sound Capture from the Logitech USB Headset (ALSA) - I left the rest of the device settings at Autodetect. I decided to try the gnome-sound-recorder (applications->sound & video->sound recorder), and that pointed me to which of the Logitech listed devices worked. I tried this in skype (no luck). I then tried recording with Audacity, and that gave me the needed hint: First, I had just one device (the same one) set for both playback and record in Audacity, yet it failed to record. Changing the settings from stereo to mono fixed that. The hint being - same device, same channel in skype - and that did the trick.

I made a test call, and then a test call to a "real" phone - report of sound was "better than any other phone in my home". Ok. Skype, here I come.

Firefox and Advertising sites...

I have noticed my browser becoming sluggish, bordering on inactive - this is Firefox 3.5.2 (mostly I notice it on Ubuntu's Firefox, but this is confirmed, definitely true for Fedora's Firefox too - worse: it seems to be doing lots of disk activity, slowing down the entire pc; killing intellicast.com site restores sanity...).

It's subtle - at first I thought it might be a memory leak, or a loop in Firefox, but I noticed that the weather page I usually keep open (intellicast.com) - if I kill the page, the responsiveness comes back, and the system monitor shows CPU cycles (pegged when this happens) fall immediately. It doesn't happen when you open intellicast; sometimes it happens in a few minutes (~15); sometimes after an afternoon. Because of this, I suspect it has something to do with javascript from an advertiser site (rather than something in the core intellicast site).

It's annoying. It's beyond annoying...

Humor: from Windows XP to Ubuntu



Be sure to watch the last 10 seconds of the video ;-)

Ubuntu Kernel Update & NVIDIA Driver

Earlier, I reported that Fedora failed miserably on booting w/ a new kernel with the NVIDIA graphics driver installed (which I want, for two-headed desktop).

I hadn't seen a problem with Ubuntu Kernel update, but that appears to only have been true for one update - but not the latest. The good news is Ubuntu detects and reports that NVIDIA complains, and nicely defaults to the default driver (and single-headed mode).

Since, effectively, Ubuntu (and it appears Debian in general) does not have a non-graphic multi-user mode akin to init 3, here's what I did:

  • Be sure to have _some_ nvidia driver available;
  • exit Gnome window manager:
  • sudo /etc/init.d/gdm stop
--------
UPDATE:
As of kernel 2.6.28.15, it doesn't appear that
gdm stop works (no terminal). This, however, seems to work for me:

  • sudo telinit 1
  • (login as root)
Alternately, if booting (Ubuntu, grub2), and you want to come up with the boot menu, then right-shift should get you there:  pick recovery mode, and boot into shell to accomplish the following.
--------

  • run the NVIDIA run script with the update option; this will get a newer driver from the NVIDIA ftp site if one is available:
  • sudo sh NVIDIA*.run --update
--------
UPDATE:
If running under telinit 1, NVIDIA driver will complain about potentially not being able to find files when searching in "init 1" - continue anyway (telinit 1 is not quite init 1 on other systems). When coming back up, you can telinit 3. I've found external USB hubs (e.g. printers, drives) are not re-initialized, so I prefer to reboot (but you can quickly telinit 3 to check video settings first, reboot later).
--------

If you came up graphical in Ubuntu before you discovered a problem w/ the kernel interface for the NVIDIA driver, then Ubuntu changed your config. When you come up (gdm start, or reboot if you like) then run the NVIDIA settings program to configure your monitors as you like as root:
  • sudo nvidia-settings

You need to do this as root to save the configuration for future boots.

VirtualBox for Smart Phones

There are more and more smart phones with linux kernels in their base. These are quickly going to become search / info / utility appliances and, I predict, replace a significant part of everyday personal computer use (you will still want a computer to do work, but for messaging, searching, simple connectivity that is / will be overkill, even in the face of netbooks).

It follows that the development process, then, of web applications (and other utility applications) will need to become less (not more) specialized. The good news - this will slowly come. The beginnings are starting to show up.

Android Phone "Live CD", usable in VirtualBox;
Palm PRE SDK (also using VirtualBox);

The Blackberry SDK - J2ME development (Eclipse); currently their tool say they require windows for their MDS RAD tool;

iPhone SDK - Requires Mac OS/X, and last I read approval from Apple before you can distribute your apps;

As you can see, this leaves you with 4 different development approaches, the last two providing their own emulators. The first three have plugins for Eclipse (so that is at least some common development feel). The first two can use Linux for a development environment (in fact, Android's "standard" development environment has been Ubuntu). The Blackberry development environment seems to be Windows only, but you _could_ run that under virtualbox on Linux, possibly with the Windows-7 Release Candidate.

So at the root, the common environment seems to be a small overlap of Palm-Pre & Android, although I don't think the development approaches are similar. In short, providing seemless services for the new "mobile pocket PC" (e.g., smartphones) is a steep hill. Clearly, this will have to change at some point. Right now, there seem to be 4 competitors for this space. A similar shootout is taking place for RIA client end, with Flex/Flash vs. JavaFX (?) vs. Json (is SVG anywhere in this mix?). That's a lot of choices for a developer of end-to-end solutions for this space.

One interesting item: Android has a native scripting environment, which (among other things) gives you access to phone facilities through a natively executed Python interpreter.

More on this later.