Atheros AR8161 Ethernet Controller Drivers

Don’t you just hate it when you buy a new motherboard and the onboard Ethernet controller isn’t natively supported by your Linux distribution? Tell me about it!

I recently scored myself a shiny new Gigabyte H77M-D3H motherboard for my new rig (photos to come!) and, as you probably know, it sports the very new AR8161 Gigabit Ethernet controller. Schwing! How do I know that’s what I’ve got?

$ lspci | grep Ethernet
03:00.0 Ethernet controller: Atheros Communications Inc. AR8161 Gigabit Ethernet (rev 10)

And I’m currently running Linux Mint 14 Nadia on a Linux 3.5.0-17-generic (x86_64) kernel. As far as I know, this distro doesn’t come with native drivers for this controller. What does that mean? No Internet. Quick, to the Googles!

Apparently, the AR8161 is a very new combined Ethernet/Bluetooth controller and its driver – alx – is still in the testing/QA process, so it’s not in the kernel yet. Great. So what’s a guy to do? Download it, install build dependencies, select the AR8161 module alx, build and install it!

First things first. Go to the official Linux Wireless wiki and download the latest linux-stable compat-drivers release (formerly “compat-wireless”).

“Wait a minute. I just told you I can’t connect to the Internet! How the heck am I supposed to download a driver?” Use a different computer and a USB stick. Or do like I did and use your phone to give your lame computer Internet access via USB tethering. Now stop whining and keep reading.

The compat-drivers release provides kernel backport support for all supported Linux kernel releases and includes the alx driver we’re looking for. At the moment, the most recent version available is v3.9-rc4. But when I navigated to this folder on the Linux Wireless site, I found three different versions: the vanilla version, the -s version (get and apply pending-stable/ from linux-next.git), and the -su version (apply the patches on the unified-drivers/ directory). I tried them all but only the -su version actually had the /drivers/net/ethernet/atheros/alx subdirectory that I was looking for. The others had folders like atlx, atl1e, or atl1c. What the heck are those? I have no idea. So I downloaded the “compat-drivers-3.9-rc4-2-su.tar.bz2″ (yes, you want the tar.bz2 tarball).

Next, open a Terminal window (Alt+Ctrl+T) and navigate to the folder where you downloaded the compat-drivers tarball and enter the following lines one-by-one (without the $, Einstein):
$ sudo apt-get install build-essential linux-headers-generic linux-headers-`uname -r`
$ tar -xvfj compat-drivers-3.9-rc4-2-su.tar.bz2
$ cd compat-drivers-3.9-rc4-2-su
$ ./scripts/driver-select alx
$ make
$ sudo make install

You can then reboot, or manually load the driver with:
$ sudo modprobe alx

Et voilĂ !

7 thoughts on “Atheros AR8161 Ethernet Controller Drivers

  1. I did the steps just as outlined with the one change to

    $ tar -xvfj compat-drivers-3.9-rc4-2-su.tar.bz2

    needs to be changed to

    $ tar -xvjf compat-drivers-3.9-rc4-2-su.tar.bz2

    and it worked like a charm!

    Thanks!

    1. I’m glad you got it to work, Nathan! I’m pretty sure I entered those tar tags in the order that I indicated in this post, but if listing them in a different order made the command execute properly for you, thanks for posting the hint in case anyone else has the same problem!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>