Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I got a Lenovo Y500 and installed 3.5.0-27-generic #46-Ubuntu SMP Mon Mar 25 19:58:17 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux. The Problem: LAN does not work after sleep. Just WiFi. And WiFi does not work properly. I am already using alx driver How can I get the LAN Interface up and running?

lspci -nnk | grep -iEA3 "(wireless|network|wifi)"
03:00.0 Network controller [0280]: Intel Corporation Centrino Wireless-N 2230 [8086:0888] (rev c4)
        Subsystem: Intel Corporation Centrino Wireless-N 2230 BGN [8086:4262]
        Kernel driver in use: iwlwifi
        Kernel modules: iwlwifi
04:00.0 System peripheral [0880]: JMicron Technology Corp. SD/MMC Host Controller [197b:2392] (rev 30)
        Subsystem: Lenovo Device [17aa:3977]
        Kernel driver in use: sdhci-pci

Only when i restart laptop with lan cable plugged in the ethernet controller is available:

02:00.0 Ethernet controller: Atheros Communications Inc. AR8161 Gigabit Ethernet (rev 10)
share|improve this question
    
Your lscpi output does not show the Ethernet controller. Could you try to run lspci | grep Ethernet and add that to your output? –  Githlar May 5 '13 at 0:46
    
02:00.0 Ethernet controller: Atheros Communications Inc. AR8161 Gigabit Ethernet (rev 10) –  axaluss May 5 '13 at 11:40

2 Answers 2

This question is actually a duplicate of Question 165192, so I'm just going to repeat the answer:

The Atheros AR8161 is a new Bluetooth/Ethernet controller that does not yet have mainline kernel support. So, in order to build the driver you have to do the following:

sudo apt-get install build-essential linux-headers-generic linux-headers-`uname -r`
wget -O- http://linuxwireless.org/download/compat-wireless-2.6/compat-wireless-2012-07-03-pc.tar.bz2 | tar -xj
cd compat-wireless-2012-07-03-pc
./scripts/driver-select alx
make
sudo make install

Now, the answer to the other questions says you have to load it up at system startup, but we should be able to automate this by adding it as a rule to modprobe. (FYI, I'm running 12.04 still, but I don't think anything has changed modprobe-wise in recent releases -- somebody correct me if I'm wrong)

echo "alx" | sudo tee /etc/modprobe.d/alx.conf

You didn't ask this specifically, but out of my curiosity (since I'll get getting a new Y500 someday -- Lenovo's really jerking me around with the ship date) I did find an answer to your wireless problems as well:

echo "options iwlwifi 11n_disable=1" | sudo tee /etc/modprobe.d/iwlwifi.conf
sudo modprobe -rfv iwlwifi
sudo modprobe -v iwlwifi

This disables N mode for the wireless (apparently it has some issues in Linux, sorry no better answer out there as of yet) for the current session and adds yet another rule to modprobe to get it to stay like this for future reboots.

On a sidenote, I see a lot of people having problems with their Centrino Wireless-N 2230. Just did a little browsing on the Intel forums and saw that a lot of Windows users are actually having the same problem amazingly. According to the Intel rep and the documents linked on the post, if your router is set up to use WEP or TKIP-based WPA then the card drops to b/g mode @ 54Mbps. The 802.11n draft specification forbids clients using TKIP or WEP from exceeding the 54Mbps for some reason. So, to get the best speed out of the card, you'll want to make sure your access point it set to use WPA AES (not AES+TKIP if you can). Now, whether this tidbit of information will help us Linux users, I'm not so sure. But, it doesn't hurt to learn something ;)

share|improve this answer
    
i am already using alx driver –  axaluss May 7 '13 at 16:44
    
I may be insulting you here, but I have to ask: is it loaded? lsmod | grep alx –  Githlar May 8 '13 at 0:31
    
lsmod | grep alx alx 68107 0 compat 19553 1 alx mdio 13770 1 alx –  axaluss May 8 '13 at 14:00
    
OK, that's good. Now, does an 'eth0' show either in NetworkManager or with ifconfig? –  Githlar May 8 '13 at 17:18
    
And does lspci -nn show that the NIC is using alx? –  Githlar May 8 '13 at 17:28

After researching this a little more in-depth, I've read that the alx driver that ships with newer Ubuntu versions still doesn't do the trick for the AR8161. So, in order to fix this you have a couple of options: you could build from source or enable the "proposed" repository.

Enabling the Proposed Repository

Open the Software & Updates application (making the assumption you are running 13.04 Raring. Go to the updates tab and check the box that says "Pre-release updates (Raring-proposed)". Click close and you should be presented with a Software Updater window so that you can begin the installation of the new software.

The drawback to this method is that you get the proposed updates for all software. If you want just the compat-wireless package, you should go the PPA route. There is also no guarantee that this method will work for you.

Building from source

  1. Open a terminal
  2. sudo apt-get install build-essential linux-headers-$(uname -r)
  3. mkdir compat-drivers
  4. cd compat-drivers
  5. wget http://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.8.3/compat-drivers-3.8.3-2-snpu.tar.bz2
  6. tar -xjvvf compat-drivers-3.8.3-2-snpu.tar.bz2
  7. cd compat-drivers-3.8.3-2-snpu
  8. ./scripts/driver-select alx
  9. make -- probably not required as DKMS below should do this step

This should at least get you off to the races for now. However, next time you install a new kernel, the modules has to be rebuilt. So, in order to do that we're going to register the module with DKMS so that it gets re-built every time we get a kernel update.

  1. sudo cp -R compat-drivers-3.8.3-2-snpu /usr/src
  2. cd /usr/src/compat-drivers-3.8.3-2-snpu
  3. EDIT: I'm sure this is an easier way to do this, but the way I solved it was to make a wrapper script to call the make function to avoid the build failure of my previous dkms.conf. So, to do that we must first create the script file. nano make.sh. Within this file, put the following:

    #!/bin/sh
    . scripts/driver-select alx
    make
    
  4. sudo nano dkms.conf within this file, place the following:

    PACKAGE_NAME="compat-drivers"
    PACKAGE_VERSION="3.8.3-2-snpu"
    MAKE[0]="cd ${dmks_tree}/compat-drivers/3.8.3-2-snpu/build; sh make.sh"
    BUILT_MODULE_NAME[0]="alx"
    BUILT_MODULE_LOCATION[0]="drivers/net/ethernet/atheros/alx"
    DEST_MODULE_LOCATION[0]="/kernel/drivers/net/ethernet/atheros"
    AUTOINSTALL="yes"
    
  5. Save the file using Ctrl+O

  6. sudo dkms add -m compat-drivers -v 3.8.3-2-snpu
  7. sudo dkms build -m compat-drivers -v 3.8.3-2-snpu
  8. sudo dkms install -m compat-drivers -v 3.8.3-2-snpu
share|improve this answer
    
Thank you very much for these detailed instructions! –  axaluss May 12 '13 at 21:56
    
I got an error: kms.conf: Error! Directive 'DEST_MODULE_LOCATION' does not begin with '/kernel', '/updates', or '/extra' in record #0. Error! Bad conf file. File: /usr/src/compat-drivers-3.8.3-2-snpu/dkms.conf does not represent a valid dkms.conf file. –  axaluss May 12 '13 at 23:12
    
Heh, I guess I should have mentioned that the DKMS part was untested untested (I don't have the hardware for this driver). Hmm... Did 'proposed' backports not work? –  Githlar May 13 '13 at 7:46
    
Change the line DEST_MODULE_LOCATION[0] to read DEST_MODULE_LOCATION[0]="/kernel/drivers/net/ethernet/atheros". Also, make sure you add the (new) line BUILT_MODULE_LOCATION[0] –  Githlar May 13 '13 at 7:48
1  
Success! I updated my answer to reflect what you need to do (it involves making a short script file). Also, make sure you add the new "MAKE[0]" line to your dkms.conf and you'll be off to the races! -- Of course, this still isn't a guarantee it will work. Actually, DKMS doesn't have to be successful to actually see if it works. A sudo make install;sudo modprobe alx as a step 10 after building the source should do the trick. If that fails, there's not use to even get DKMS working. –  Githlar May 16 '13 at 6:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.