How to install Realtek RTL8188CE WiFi drivers (ThinkPad Edge 13) on Ubuntu Natty 11.04

After a two-week long battle trying to get Realtek's RTL8188CE WiFi network card to work on Ubuntu Natty 11.04, countless reinstalls and email exchanges with Realtek's customer support, I finally managed to get Realtek's PCI Express Mini WiFi card to establish a stable connection. I figured I'd share my findings with the world and save other users some trouble.px.gif

Note: This guide was written for an older version of the Realtek driver and is now obsolete. Users have reported success using the most recent driver from Realtek's homepage (version 0004.0816.2011, 2011/8/23, for kernel 2.6.35 and up), and ThinkWiki reported that the propper drivers will be included in the 2.6.39 kernel. Nevertheless, I'll leave this guide here for reference purposes. Remember that the instructions only work with a specific driver version. Going through these instructions with a different driver and/or Ubuntu version may break your system.

Realtek's RTL8188CE card uses the RTL8192CE chipset, which can be found in different kinds of Lenovo ThinkPad Edge laptops. Although ThinkPad laptops are generally very Linux-friendly, the RealTek cards installed in the new Edge series can be a bit of a pain to set up. Realtek WiFi cards usually do a decent job once properly installed. But getting there is a long way. Luckily, apart from the WiFi card, most other components in the ThinkPad Edge 13 and 15 laptops work right out of the box and without problems with Natty's 2.6.38 kernel.

Although drivers for the RTL8192CE chipset are included in Natty's kernel, they don't work reliably with a number of chipsets, see Launchpad bugs #749871 and #773976. This shouldn't be a problem, since you can always just compile and install the official Realtek drivers yourself, right? Well, yes, you can. And in fact this worked quite well on Ubuntu Lucid (10.04) and Ubuntu Maverick (10.10). If you're on Natty, however, you can't simply install the original Realtek drivers over the ones already present. Also, Realtek offers two different versions of the 8192CE driver. Which is the right one to choose? Let's take a look.

Note: Only go through this tutorial if you are familiar with Linux, the CLI and your computer's hardware. Also, make sure you back up your data before you proceed. As usual, I can't take responsibility for any data loss or hardware damage. Please also note that this whole tutorial may become obsolte with the next Ubuntu release or the next Linux kernel, as configurations change and new drivers are included in the kernel.

  1. Open a terminal and find out which WiFi card you have installed in your system by typing: lspci Go through the list of PCI components and look for “network controller”. This should look something like this: 03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter (rev 01)

  2. Now find out which kernel version you have: uname -r This should be 2.6.38 on Ubuntu Natty.

  3. Head over to Realtek's website and look for your chipset here. Depending on your chipset, you may find two different driver versions. If you have the RTL8188CE chipset, for example, then you have to choose between a driver for kernel 2.6.34 and earlier, and a version for kernel 2.6.35 and later. Even though you now know your kernel version, this is not as easy as it looks. As of today (2011-06-14), the version for kernels 2.6.35 and later causes unpredictable crashes on Lenovo systems. When I compiled and installed this version on my system, I was greeted with a kernel panic error message on reboot. As long as this situation remains unchanged, you are stuck with the driver for kernel versions 2.6.34 and earlier. Realtek has been contacted about the problem, though, and I hope that this will be resolved in the near future. Check ThinkWiki to read more about the current status here.

  4. Download the appropriate driver for your WiFi card and unpack it to your home directory. You should now have a “rtl8192ce_*” folder in your home directory.

  5. Get the tools necessary to compile the driver: sudo apt-get update sudo apt-get install --reinstall linux-headers-generic build-essential

  6. Now we need to unload and block the original kernel modules/drivers from the Natty kernel. Otherwise they would destabilize the Realtek driver which we're going to install: sudo rmmod rtl8192ce

  7. To blacklist the original kernel drivers/modules, open gedit: gksu gedit /etc/modprobe.d/blacklist.conf Now insert the following two lines at the end of the file:

    blacklist rtl8192ce
    blacklist rtlwifi
  8. Finally, it's time to compile and install the official Realtek driver. Change to the directory of the driver you downloaded before: cd rtl8192ce_*/ Run the following commands in the order shown here: make clean sudo su make make install exit

  9. Reboot

To make sure you're using the correct driver, run lspci -v and scroll down to your Realtek WiFi card. The line “Kernel driver in use” should read “rtl8192CE” (note the two capitals at the end), and you should have a new kernel module “r8192ce_pci” installed.

That's it. This fixed all WiFi related problems for me, and I hope it works for you as well. If you have any comments or suggestions, or think there is anything about this short tutorial that needs improvement, feel free to post a comment below!