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)
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:
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)
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:
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 ;)
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
sudo apt-get install build-essential linux-headers-$(uname -r)
mkdir compat-drivers
cd compat-drivers
wget http://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.8.3/compat-drivers-3.8.3-2-snpu.tar.bz2
tar -xjvvf compat-drivers-3.8.3-2-snpu.tar.bz2
cd compat-drivers-3.8.3-2-snpu
./scripts/driver-select alx
make
-- probably not required as DKMS below should do this stepThis 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.
sudo cp -R compat-drivers-3.8.3-2-snpu /usr/src
cd /usr/src/compat-drivers-3.8.3-2-snpu
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:sudo nano dkms.conf
within this file, place the following:Save the file using Ctrl+O
sudo dkms add -m compat-drivers -v 3.8.3-2-snpu
sudo dkms build -m compat-drivers -v 3.8.3-2-snpu
sudo dkms install -m compat-drivers -v 3.8.3-2-snpu