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:
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:
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.


Anonymous said...

I've also got a X120e, and I followed your instructions with respect to the standby when the screen is down. I find that with the setting done as you described it is only able to come back on after the battery is pulled (and with the AC adapter unplugged). What behavior do you find when you do this after the modification?

Hunter K. said...

I'm actually having the same problem. It wakes up if I only close the lid for a few seconds (which is as far as I got while writing this post), but if left unattended for a while, I have to pull the battery and unplug from the outlet, just like you. I haven't gotten to dig around and see what could be going on, but I'll update this post as soon as I find anything out. If you come across any solutions, plz let me know :)

Larry Hastings said...

I have an X120e and a Samsung Series 9 (a Sandy Bridge chipset). IIUC both are EFI machines. What Natty wants, but doesn't tell you, is for you to manually create a "/boot/efi" partition of partition type EFI. It must be at least 32MB and no more than 256MB. With that, Ubuntu 11.04 installed without a hitch on the Series 9; I'll try it on the X120e soon.

Hunter K. said...

Ah, thanks for the info Larry. Let me know how it goes.

If it works, I'll update the post accordingly. :)

Analytics Tracking Footer