Gentoo: Ethernet Atheros AR8161/AR8162 using compat-wireless module alx

Update 2: Info for non-Gentoo users

If you’re not using Gentoo … start using it ;-)

Otherwise you’re probably looking for the driver to Atheros AR8161/AR8162, which is the alx module.
Get it from Atheros alx Ethernet driver and follow the instructions.

Gentoo users get the driver with compat-wireless-3.5 from the pentoo overlay!

Update: Fixed in pentoo overlay (compat-wireless-3.5)

The guys at pentoo overlay were really responsive. – Just a talk on IRC and proposing some patches was all it took!

  1. alx module is now always included in compat-wireless
  2. Warnings from access violations in the sandbox are also fixed – the kernels Makefile was being called to get kernelversion

Just add the pentoo overlay – update it with layman -s pentoo if you already have it – and emerge -av =compat-wireless-3.5.

Note: Only 3.5 is “fixed” at the moment, 3.5-r3 is not!


Update: This laptop has an AR8161, this should also work for AR8162.

I finally managed to put the pieces together, maybe this helps someone.

Hardware

Wireless:
Intel Corporation Centrino Wireless-N 2230 (rev c4)
Ethernet:
Atheros Communications Inc. AR8161 Gigabit Ethernet (rev 08)

Problem

Getting both to work!
First I had wlan running with kernel module iwlwifi and the 2030-ucode (net-wireless/iwl2030-ucode).
The ethernet card seems to require module alx, which still is not in the kernel.

Some sites recommend using compat-wireless for ethernet … after a while of disbelief I loosely followed AR8161 ethernet using compat-wireless and eth0 worked after a nightly session.
Sadly installing compat-wireless also came with some “updates” to iwlwifi – which killed my working wlan0.

Finally today I got sick of using eth0 and looked into it.

Solution

Short description

  1. iwlwifi with compat-wireless needed CONFIG_LIBIPW in the kernel.
  2. Module alx is only available when you manually configure compat-wireless during installation.
    cd /var/lib/layman/pentoo/net-wireless/compat-wireless
    ebuild compat-wireless-3.5_rc3.ebuild prepare
    pushd /var/tmp/portage/net-wireless/compat-wireless-3.5_rc3/work/compat-wireless-3.5-rc3-2-snpc/
    ./scripts/driver-select alx
    popd
    ebuild compat-wireless-3.5_rc3.ebuild merge
    modprobe alx

For details see below.

Long description for module alx

  1. Uninstall 2030-ucode
  2. Add Pentoo overlay for compat-wireless
    Set the subversion flag for layman (pentoo uses svn)!
    emerge -av layman
    layman -a pentoo
    eix-update
  3. Install net-wireless/compat-wireless: Part 1
    cd /var/lib/layman/pentoo/net-wireless/compat-wireless
    ebuild compat-wireless-3.5_rc3.ebuild prepare

    This unpacks and patches the package, then stops (see man ebuild)
  4. Manual configuration
    From Atheros alx Ethernet driver homepage: Run ./scripts/driver-select alx – we need to cd to the unpacked source to do that.
    pushd /var/tmp/portage/net-wireless/compat-wireless-3.5_rc3/work/compat-wireless-3.5-rc3-2-snpc/
    ./scripts/driver-select alx
    popd
  5. Install net-wireless/compat-wireless: Part 2
    Run the rest of the installation process:
    ebuild compat-wireless-3.5_rc3.ebuild merge
  6. Load the module with modprobe alx

Notes

Update: The stuff below is historical ;-)
Thanks to the responsive pentoo overlay (and my patches) – the warnings are gone and alx module is now always included. Cool!

I don’t like using compat-wireless.

  1. Installs a bunch of modules when I only need one.
  2. Displays ugly messages during installation (sandbox access violations?)

So maybe one could just download compat-wireless from the alx homepage, unpack and manually configure it, then run make && make install.
I did not feel like looking at the Makefile and this installation bypasses
portage. – But compat-wireless does not uninstall its modules anyway so I
might try one day.

Advertisements

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: