- UCLA M.S. Computer Science
- Android Developer
- Freelance IT
or, thoughts from a random graduate student
Finally found the need to have a real laptop available, so I went out and picked up a MacBook Air over the Thanksgiving break. Since I’ve gotten so used to XMonad for day to day use, it would have to be running Ubuntu. Turns out that there is an Ubuntu community wiki page available detailing what is necessary to get things going.
A script available on almostsure creates a bootable USB drive to install off of, and the almostsure post-install script takes care of installing most of the drivers and configuration you’d want. For reference, the important things (as of Nov 30, 2011) are the following:
The one thing NOT covered by the Ubuntu community wiki is the wireless driver. The MacBook Air 4,1 has a Broadcom BCM43224 chip, which is actually covered by several different drivers, b43 (if you hack around a bit), brcmsmac, and the wl Broadcom STA driver (closed source). Poking around seems to suggest that the best option is the brcmsmac module, as it is based off the open-sourced driver that Broadcom released late 2010, however owing to it’s immaturity, it still lives in the staging drivers section of the Linux kernel. It also seems to lack some features supported by the Broadcom STA drivers, namely power management, which is the main reason why I chose to use the closed source (the horror) Broadcom STA drivers available from the Ubuntu “restricted” repository under the brcmwl-kernel-source package.
The one item to note with this module is that the brcmwl-kernel-source package actually doesn’t have an updated blacklist file in /etc/modprobe.d, and will fail to blacklist the brcmsmac module available by default, potentially leading to problems. I had to add brcmsmac and bcma to the blacklist with the following:
sudo sh -c "echo 'blacklist brcmsmac' >> /etc/modprobe.d/blacklist-b43.conf" sudo sh -c "echo 'blacklist bcma' >> /etc/modprobe.d/blacklist-b43.conf"
This prevents the kernel from loading both drivers. Most of this information was found on the ArchLinux Broadcom wireless wiki page. And that concludes all the laptop configuration I had to do. All that remains is reconfiguring my XMonad settings for laptop use!
I took the plunge and upgraded my main machine to 11.10 from 11.04 today. Altogether not too bad since underneath the much maligned Unity lies compiz and ccsm still configures everything I actually care about. The one thing that did break on upgrade however was my sound. I happen to have a Sound Blaster X-Fi Titanium HD (etc etc), which according to Google searches, seems to be the source of quite a few people’s headaches. Specifically, the X-Fi Titanium HD is recognized by the snd_ctxfi driver, but prior to approximately 6/14/2011, it was recognized as an older model, which caused improper behavior, and if you were quick on the kernel logging, yielded messages similar to these:
[ 4881.961765] SB-XFi 0000:02:00.0: setting latency timer to 64 [ 4918.787949] SB-XFi 0000:02:00.0: PCI INT A disabled [ 4918.787955] ctxfi: Something wrong!!! [ 4918.787969] SB-XFi: probe of 0000:02:00.0 failed with error -1
Quick check on gmane.linux.alsa.devel shows that this fellow Harry Butterworth has put a lot of effort into patching up the driver to support the new card in these messages. The ALSA project’s git repositories show that these three patches are required to make things work:
Now that I have the requisite background info, it’s time to get to solving the problem. At the time of this writing (10/14/2011), the version of the Linux kernel package Oneiric uses is 3.0.0-12.20 (full package: linux-image-3.0.0-12-generic). Let’s start off by fetching the source for the kernel with:
sudo apt-get install linux-source
This places the Ubuntu kernel source at /usr/src. We need to go there and unpack it somewhere useful.
mkdir ctxfi-module cd ctxfi-module cp /usr/src/linux-source-3.0.0.tar.bz2 . tar xfj linux-source-3.0.0.tar.bz2
We now need to patch the unpacked kernel source with the proper patches from above. In this version of the source (linux-source-3.0.0-12.20), patch 1 has already been included.
patch -p1 < /path/to/patch2 patch -p1 < /path/to/patch3
We need to now build our new kernel module. I found useful directions at the Ubuntu wiki page on custom kernel builds. Before doing that however, I noticed my current linux-headers package didn’t have the PCI_ID for the X-Fi Ti HD, so I added this line:
#define PCI_SUBDEVICE_ID_CREATIVE_SB1270 0x0062to
/usr/src/linux-headers-`uname -r`/include/linux/pci_ids.h
file at line 1308, as in patch 1. Then I followed the make directions in from the Ubuntu wiki.
make -C /usr/src/linux-headers-`uname -r` M=`pwd` KBUILD_SRC=`pwd`/../../.. modules sudo make -C /usr/src/linux-headers-`uname -r` M=`pwd` KBUILD_SRC=`pwd`/../../.. modules_install sudo depmod -a sudo update-initramfs -u
This installed the snd_ctxfi.ko module to:
/lib/modules/`uname -r`/extra/snd_ctxfi.ko
From there it’s a simple matter to rmmod snd_ctxfi and insmod your newly patched one. This got sound working for me again.
I used the following to get set up in Ubuntu. Connecting to IPSEC VPN requires installing network-manager-vpnc-gnome, which will pull in the required packages. Let’s do that by running sudo apt-get install network-manager-vpnc-gnome Next we need the settings, which can be pulled from the PCF file, or the PDF on the BOL website. (Requires login) NetworkManager requires the following:
Gateway: vpn.ucla.edu Group name: <group> User password: <your BOL user password> Group password: <decrypted group password> User name: <your BOL user name> Domain: blank Encryption: Secure NAT Traversal: Cisco UDP IKE DH Group: DH Group 2
I used the pcf2vpnc program to obtain the relevant group info from the PCF. The pcf2vpnc program should have been installed by the vpnc package, and can be found on Ubuntu at:
/usr/share/vpnc/pcf2vpnc
Lastly it’s important to allow IPSEC passthrough on your router should that not already be enabled.
In short, I'm back at school, where the objective is to read lots, but not to write as much.
Someone mentioned to me while I was working at Google that it's more interesting to build things than measure things, which was one of the most notable things I took away from the internship.
As for the MS thesis/project, the hardest part is still starting, and I still lack a good idea in the partitioned global address space topic area to build upon yet.
I've been working at Google this summer as an intern, which is part of the reason why there haven't been any updates to any of my things. (This blog, MicDroid, etc) They say Google is a place that engineers disappear into, and are not heard from again, and that seems somewhat true for me this summer. The other part of it is simply that my life has become busy, and I've had to make some sacrifices in what I spend my time on.
If there's one thing that's happened fairly frequently, it's that people are interested in what goes on at Google. Today I'll attempt to talk about some of the things I found interesting.
Please note: these are my personal views, they are not meant to be official announcements of any sort, nor are they in any way endorsed by Google.
Let's begin with what I've learned this summer at Google.
Next let's talk about how things are done at Google.
As expected of the engineering-driven culture at Google, the toolchain for working in the main Google source tree is pretty heavily developed.
Infrastructure at Google is actually quite interesting too. Having to deal with a lot of machines also equates to having a good amount of tools to deal with them as well.
In addition to being known for engineering prowess, Google is also known for being an interesting place to work.
I'm definitely going to miss working at Google (and not just for the free food!).
There are a few things that I did find irritating while working at Google though. Here are some.
Overall, Google has been great to me this summer, and I really think I would enjoy working there in the future (provided this post doesn't disqualify me, oops).