Tuesday, March 15, 2011

Ubuntu Maverick on Lenovo X120e Fusion Laptop

UPDATE 3/23/11: Natty seems to work much better with these systems, so I recommend skipping Maverick and going straight for 11.04, even thought it's still in Alpha stage at the time of this writing. Check out my post about it here.

Original Post:
Due to a wonderful pricing error at Lenovo, I got a really sweet deal on a Thinkpad X120e laptop, featuring AMD's new Zacate Fusion chipset.

When trying to install Ubuntu 10.10 Maverick on it, though, the Ubiquity installer kept failing with this error:
grub-install efi-dummy failed. This is a fatal error.
To fix this, you need to go into the computer's BIOS and, under the boot tab, change the uEFI settings to try 'legacy' first. This will allow Ubuntu to install grub successfully.

After you make that change, installation should be able to complete and you can reboot into your new system.

That's as far as I've gotten so far, so I'll update this post as I find out more.

Update (3/15/11): I ran into a few more issues that I had to muddle through: wireless networking and waking up after closing the lid of the computer.

First, we'll fix the suspend issue, since it's the easier of the two.

Update 3/23/11: Actually, this doesn't fix anything. It still has problems after a few seconds of having the lid closed (i.e., when it actually goes to sleep). Sorry for any inconvenience. I'll add a real solution if/when I find one.

Open up a terminal and type:
gconf-editor
It will bring up a window with lots of configuration items. Navigate to apps > gnome-power-manager > actions, then change the default entry for sleep_type_battery from 'hibernate' to 'suspend.'

This should get you fixed up.


Now for the tedious one...wireless.

If you have the default Ralink wireless card, for now you'll have to get the driver from the manufacturer's website, build it and install it (download it here). However, the driver *should* work out-of-the-box in Natty.

UPDATE 3/21/11: annoyingly, my system keeps deactivating the driver. I give up on Maverick and have to recommend skipping to Natty instead.
On the recommendation of others, I purchased my machine with the optional Broadcom 802.11 a/b/g/n wireless card instead of the default Ralink card. Unfortunately, the Broadcom card isn't much better. It uses the 802.11 Linux STA driver, but the device isn't supported by the version available in the official Ubuntu repos. Instead, we'll have to download and install it directly from Broadcom.

To get it going, first you want to download the driver from this page. The drivers are specific to your CPU architecture, so make sure you get the right one. After that, we need to install some prerequisites to build the driver:
sudo apt-get install build-essential linux-headers-`uname -r`
Now, we'll navigate to wherever you downloaded the driver (I'm going to assume it's located in the default ~/Downloads directory):
cd ~/Downloads
Decompress the archive:
tar -xvf hybrid-portsrc_x86_64-v5_100_82_38.tar.gz
and then build and install the driver:
make && sudo make install
The driver is now installed, but we need to activate it and tie up some loose ends. So, still in a terminal, type:
sudo depmod -a
This will fetch all of the dependencies for drivers located in /lib/modules (including our newly installed driver).

Now, we'll make sure no conflicting drivers are in use by typing:
sudo rmmod bcm43xx
sudo rmmod b43
sudo rmmod b43legacy
and then try our new driver out by typing:
sudo modprobe lib80211_crypt_tkip && sudo insmod wl.ko
At this point, your wireless should start working. If it does, we need to make sure conflicting drivers don't start bothering us again by typing:
sudo gedit /etc/modprobe.d/blacklist
and adding these lines:
blacklist b43
blacklist b43legacy
blacklist bcm43xx
Save and exit. Then, back in the terminal, type:
sudo gedit /etc/modules
and add:
ieee80211_crypt_tkip
at the bottom. Then, type:
sudo gedit /etc/rc.local
and add this:
sudo insmod /lib/modules/[whatever your kernel revision is]/wlan/wl.ko
to the end of the file, but before it says "exit 0."

You should be all set at that point. If you need to reverse these steps for whatever reason, just go back through these steps and delete the lines we added.

Last, we'll talk a bit about graphics drivers. The open source drivers do not support our fancy new APU graphics, so we'll have to use the proprietary fglrx driver binary blob from AMD, which you can install through the 'Additional Drivers' applet, located under the System > Administration menus. However, after rebooting, you'll see (at the time of this writing) a translucent black square in the bottom-right corner of your screen that shows an AMD logo and says 'Unsupported hardware.'

This can be avoided by manually installing a newer fglrx driver directly from AMD instead of using the package from the official repos, but that adds its own hassles that I didn't feel like dealing with, such as needing to manually reinstall the driver after every kernel update. If you would rather go that route, you can find detailed instructions here.

Cari Farmasi

Farmasi Di Kuala Lumpur dan Selangor Selangor / KL Area NO SHOPS NAMES ...