# Lenovo G580: setup ethernet and wireless

## WvR

I have recently bought a Lenovo G580 laptop and I am trying to install gentoo. This is not my first computer on which I install gentoo but this one is the most difficult until now.

The laptop has an Atheros Ethernet AR8162 and Broadcom wireless BCM4313. I downloaded the gentoo ISO but it does not support either of these network interfaces. So I downloaded an Ubuntu Live disk and installed gentoo from there.

Now I can boot into my new laptop but I still don't have any network. 

```
ifconfig -a
```

 only lists the lo interface.

I understand that both the Atheros ethernet and the Broadcom wireless BCM4313 are tricky. Would somebody be willing to write a step-by-step explanation how to get either of them working? The thing is, without internet it is difficult to emerge anything so I would really like to know which steps are needed.

What I already know:

- BCM4313 requires certain settings for the kernel. I have set these settings and recompiled the kernel 

```
genkernel --menuconfig all
```

- BCM4313 requires "linux-firmware" - how to get this firmware?

- The Atheros ethernet needs the "alx" driver.... where to get? Does the AR8162 work with compat-wireless, as I saw in one posting?

Thanks for your help   :Very Happy: 

----------

## ppurka

About BCM4313 - it is really problematic and a very frustrating piece of hardware. If you stick to kernel 3.2 and earlier you can probably use the broadcom-sta ebuild which installs the proprietary module called wl. For smooth functioning in this case you should disable mac80211 in the kernel.

With newer kernels you have to use the in-kernel brcmsmac module. The problem with this module is that it is very unstable and there are frequent disconnects. To top this, it doesn't have powermanagement support either.

There is a third in-kernel module called b43 which you will find cropping up in google searches. Unfortunately, b43 does not support just this particular version - BCM4313.

For more information look at the gentoo wiki page: http://en.gentoo-wiki.com/wiki/Broadcom_43xx

I have a G460, and the machine is not only an abomination on Linux but has really crappy hardware. Bad drivers, bad battery, really bad touchpad, and heat issues. Apparently, it is impossible to have a decent low cost hardware.

EDIT: There seems to be a glimmer of hope about using the broadcom-sta. See this thread: http://www.gossamer-threads.com/lists/gentoo/user/263716?page=last

----------

## WvR

Reading through the material, I summarize as follows:

- b43 driver: not for BCM4313 - cannot use for Lenovo G580

- broadcom-sta: maybe possible for kernel < 3.6. I will try this, because at present kernel 3.5.7 is the "default" kernel

- brcmsmac: should work but is not very reliable....

All in all a big mess as far as the wireless is concerned. Can anybody provide some more info about the Atheros Ethernet AR8162?

----------

## WvR

I would like to add that the BCM4313 card worked flawlessly on the Ubuntu Live ISO and also on PartedMagic. What is the easiest way to find out what drivers they use? I tried 

```
lsmod
```

 on Ubuntu but the list is endless....

----------

## ppurka

 *WvR wrote:*   

> I would like to add that the BCM4313 card worked flawlessly on the Ubuntu Live ISO and also on PartedMagic. What is the easiest way to find out what drivers they use? I tried 
> 
> ```
> lsmod
> ```
> ...

 You will need to use for a longer period of time, and perhaps after one or two suspend/resume cycle to see the problems. Try doing

```
lsmod | grep -E '(brcm|wl)'
```

in the livecd to see what they are using.

As for your ethernet, try doing

```
lspci -n
```

Then, copy-paste the output to http://kmuto.jp/debian/hcl/ That should help you figure out what module your ethernet uses.

----------

## PostChache

I have the same network card on a G560. I had a hard time getting the wireless to work as well. I followed the instructions here http://linuxwireless.org/en/users/Drivers/brcm80211#Broadcom_brcmsmac.28PCIe.29_and_brcmfmac.28SDIO.29_drivers under the "Get the code" section about what to select in the kernel for brcmsmac. It was a while ago, so I don't remember if I had to do anything else, but I do remember I got it working after reading that.

----------

## WvR

Ubuntu Live uses brcmsmac. I have recompiled my kernel (I will post the necessary settings later). After rebooting, I did 

```
modprobe brcmsmac
```

 and indeed, the wlan0 interface now shows up if I do 

```
ifconfig -a
```

. So at least one more (small) step along the way. I still have to emerge wpa_supplicant or something similar.

A friend has told me that he got his Atheros Ethernet AR8161 to work on gentoo, so I will follow his advice and see if I can get the AR8162 to work with the secretive ALX drivers.

----------

