WiFi on Macbook Air 5-2 (13", 2012) not working

119 réponses [Dernière contribution]
mYself
Hors ligne
A rejoint: 01/18/2012

Sorry, but the link I provided isn't displaying the way it should be. This is the correct one:

https://trisquel.info/en/forum/trisquel-6-officially-out-yes-really-time#comment-31950

EDIT: Fixed!

matt
Hors ligne
A rejoint: 06/24/2013

When building the firmware, the script needs to download packages from the internet. So, I couldn't continue from there as the downloads failed. ;(

mYself
Hors ligne
A rejoint: 01/18/2012

You does not need to build the firmware yourself! Just run

sh install.sh

within the extracted folder and you're done.

matt
Hors ligne
A rejoint: 06/24/2013

The installation of this script worked without an error, but the Wi-Fi still does not work with the adapter. I have tried both USB ports. I will try it a second time - just in case.

mYself
Hors ligne
A rejoint: 01/18/2012

Can you paste here the output of the "lsb_release -a", "uname -r", "arch", and "lsusb" commands?

matt
Hors ligne
A rejoint: 06/24/2013

I don't have write access to my external HDD. :P Therefore I had to take a picture with my phone...

Here's all the information that you required:
http://cl.ly/image/0N2K2T3E442B

mYself
Hors ligne
A rejoint: 01/18/2012

Your computer does not see the TP-Link adapter for some reason. The lsusb command should output a line like this

Bus 001 Device 003: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n

Try to connect the adapter to one USB connector at a time, then run the lsusb command and check whether it the adapter appear in the output or not.

matt
Hors ligne
A rejoint: 06/24/2013

Both ports are dual USB 2.0/3.0 supported natively by an Ivy Bridge Processor.

mYself
Hors ligne
A rejoint: 01/18/2012

I have the previously mentioned TPE-N150USB device, and both on my ThinkPad R60 and Sony VAIO VPCZ1 it is absolutely essential to connect it to the right USB port. On R60, "only" the right-side two USB connectors recognize the adapter, while on the VPCZ1, only by using the the one right-side connector, the adapter is working properly.

Chris

I am a member!

Hors ligne
A rejoint: 04/23/2011

Are the ones it isn't working on USB 3.0 ports?

In the latest kernel the problem is fixed.

mYself
Hors ligne
A rejoint: 01/18/2012

Nah, USB 2.0 all of them (on both computers). If I connect your TPE-N150USB adapter on my VAIO VPCZ1 laptop to either of the left-side USB ports, the wireless connection is dropping randomly, and sometime fails to reconnect (the same behaviour as on my sisters Toshiba Satellite L40-14F laptop, which have an internal Realtek RTL8187L card). I figured out that if I slightly move the the adapter while it's connected, it drops the connection. Sometimes I get an

[NNNNNN-NNNNNN] ath: Failed to wakeup in 500us

error. When this happens, the only way to fix it is to restart the computer.

Note: One interesting behaviour on the Toshiba computer is that sometimes the only way to fix the connection issue is to reset the BIOS settings to its default state. I am wondering how this can be possible.

EDIT: Some of the ThinkPad R60 USB connectors can be in fact USB1.1, but I cannot tell precisely which ones.

mYself
Hors ligne
A rejoint: 01/18/2012

Also, which kernel version do you mean? 3.2 or 3.5?

Chris

I am a member!

Hors ligne
A rejoint: 04/23/2011

Actually 3.8+ fixed this issue on the systems we have tested. I had assumed it was due to the USB controller and not the actual wifi card as I don't think all USB 3.0 ports we tested with had this issue.

matt
Hors ligne
A rejoint: 06/24/2013

Here's the full lsusb output when connecting left/right/none: http://cl.ly/image/0N373u100R1w

mYself
Hors ligne
A rejoint: 01/18/2012

Okay, I feared that your system is not detecting the wireless adapter, but it seems this isn't the case. Can you paste the output of the following two commands here?

md5sum /lib/modules/3.2.0-38-generic/kernel/drivers/net/wireless/ath/ath9k/ath9k_htc.ko
ls /lib/firmware
matt
Hors ligne
A rejoint: 06/24/2013

I'll do that in as soon as I have finished this reply :D (I'm booted in to OSX).

Beforehand, I thought you might like these two photos. I have noticed that the Asus adapter (WL-167g) is recognized. Unlike the TP-Link adapter this one does show up in the tray at least. But it's still "device not working".

- tray when TL-WN722N connected: http://cl.ly/image/3h2I1R3a3r29
- tray when ASUS WL-167g connected: http://cl.ly/image/0v1u202I3H30

mYself
Hors ligne
A rejoint: 01/18/2012

Absolutely unexpected to see this. The ASUS WL-167g was produced in three different revisions (v1/v2/v3), all of them using chips/chipsets that are free software incompatible. My advice is to get rid of it since it only supports the old IEEE 802.11g standard, whose maximum theoretical speed is about 54Mbps (and also because of the aforementioned fact), and keep the TL-WN722N model. If you want something better, my recent comparison shows, that the best in latest generation free software compatible wireless adapters can be achieved with the TP-Link's TL-WN822N model.

OT: Can I ask you to make a photo of the front and back side of your ASUS WL-167G adapter so I can attach those pictures to their respective WikiDevi page (of course only with your permission to do so)?

P.S.: I have some more ideas what you can do in order to force the adapter to work. Hold on for some time, I'll let you know.

matt
Hors ligne
A rejoint: 06/24/2013

You're right, I should use a faster wireless adapter. My router supports 5GHz with up to 300 MBit/s and my current internet subscription offers me 50/2.5 MBit of bandwidth. So the real word bandwith of g networking is would be insufficient.

Here are three pictures of the Asus WL-167G (V2) wireless USB adapter:

Specification: http://cl.ly/image/1N0y2v1C0x2L (MAC address removed)
Back: http://cl.ly/image/0l1Q0d2b2b42
Front: http://cl.ly/image/3c0Z2R2U072K

mYself
Hors ligne
A rejoint: 01/18/2012

Thank you! I'll attach those pictures to the device WikiDevi page later. You may also consider buying a fully free software compatible wireless router. The only 100% pure FLOSS compatible one, that doesn't rely on any proprietary binary blobs, is currently the Buffalo WZR-HP-G300NH v1 (only the first revision is supported by LibreWRT, so make sure not to buy anything other). Look up on eBay to find one that's cheap, and in a good shape.

matt
Hors ligne
A rejoint: 06/24/2013

In fact, I have considered in the past to use a fully free software compatible router. But getting this done is very difficult:

1) Limited availability of providers which also have very different pricing.
2) Some providers nowadays require you to use their router etc. This makes it easier for them to update software and troubleshoot errors.
3) My current provider is really awesome when it comes to service and pricing (Unitymedia). But their router receives automatic firmware updates and I cannot interfere with that. This is a router where TV/phone/Internet are transferred via one and the same cable. If I were to change my provider the way I connect to the internet would probably require a whole different technology. If I stay with my current provider, the libre router would not support the proprietary technology that is build into my house. (Yeah, this is the dark cooperate world at it's best... Making me fully dependent on them.)

The best workable solution would probably be to use a libre router to connect to the proprietary router via LAN but encrypt all internet traffic beforehand to ensure full integrity of my internet traffic. If this is the case, the router would not require much extended functionalities.

andrew
Hors ligne
A rejoint: 04/19/2012

On 14/07/13 20:31, fourfreedom wrote:
> 2) Some providers nowadays require you to use their router etc. This
> makes it easier for them to update software and troubleshoot errors.

I know someone whose provider required this. When I set up their network
I just found the settings online. I imagine it's the same for nearly all
ISPs. ISP routers are often just rebranded models anyway.

Andrew.

mYself
Hors ligne
A rejoint: 01/18/2012

> I'll attach those pictures to the device WikiDevi page later.

Done.

matt
Hors ligne
A rejoint: 06/24/2013

I have looked at OpenWTR and LibreWTR, but man - setting up something like this is really difficult for several reasons:

- the documentation is horrible, maybe even incomplete
- not all routers work, some only work partially
- advanced IT skills required, due to the lack of documentation
- some hardware fiddling may apply

These are good reasons for me to not do it - even though I'd really like to. I'll see if maybe I can get some help at an upcoming crypto party.

mYself
Hors ligne
A rejoint: 01/18/2012

Can you please also upload here the output files of the following commands? I would like to attach them into the WikiDevi device pages, if it's not a problem.

Thank you in advance!

matt
Hors ligne
A rejoint: 06/24/2013

The output is always empty. :/

Edit: Never mind. The output was in the home folder. :P

BCM943224PCIEBT2_lspci.log -> http://cl.ly/3s331j0Q1U0f
TL-WN722N_lsusb.log -> http://cl.ly/0E2I2U100q2P
WL-167g-v2_lsusb.log -> http://cl.ly/0Z1D2v202g1C

lembas
Hors ligne
A rejoint: 05/13/2010

The output is empty because it was redirected. https://en.wikipedia.org/wiki/Redirection_%28computing%29

mYself
Hors ligne
A rejoint: 01/18/2012

I forgot to tell you that the (default) output location is your home folder (/home/matthias). Sorry about that.

From which operating system you executed those commands (Ubuntu or Trisquel)? I am asking because the lspci command outputs slightly more information when executed on a system where the device is working correctly (lsusb makes no difference). From the output you provided I assume it was Ubuntu. Am I right?

matt
Hors ligne
A rejoint: 06/24/2013

Yes, these were run from within Ubuntu (12.04) ;)

mYself
Hors ligne
A rejoint: 01/18/2012

Ok, thanks! Just wanted a confirmation to be sure. Btw, what about your bluetooth mouse, is it working now? I also read that you have some battery life issues because of dual graphics setup.

matt
Hors ligne
A rejoint: 06/24/2013

The bluetooth mouse is working fine - no lag or other issues. In fact, it can work with the default installation!

But getting it to connect the first time is not very reliable. I had to try it several times. Several times I had to allow the device to talk to the computer (in some pop-up window) and several times I had to try to set it up using the bluetooth settings.

I guess it's experiences like this which make my try things over and over again even though there is no explainable rationale to do so :)

I do not have any battery issues in Trisquel. The question was about a Macbook Pro, which I also have. Trisquel is installed on my Macbook Air which has integrated Ivy Bridge graphics only.

However, the battery life is not optimal right from the start. I installed various packages to monitor and improve battery life. The following is copied from my Setup Guide:

********
Powertop (power usage monitoring)
sudo apt-add-repository ppa:izx/bleeding
sudo apt-get update && sudo apt-get install powertop

Powerstat (power usage monitoring)
sudo add-apt-repository ppa:colin-king/powermanagement
sudo apt-get update && sudo apt-get install powerstat

TLP Power optimizations (power optimization, this is magic)
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update && sudo apt-get install tlp tlp-rdw ethtool
More info: http://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html
********

(Yes, I'm in the process of writing a shell script for all my post-installation configurations.)

Using powerstat you can monitor the power drain in watts when the battery is discharging: powerstat -d 1

After having installed the TLP power optimization tools, the watt usage dropped from about 11 to 8 watts. This is with the wireless USB adapter and the bluetooth mouse connected! Since my Macbook Air has a 50 WHr battery, I get 4-5 hours of battery life in Trisquel. That is the same battery life that I get in OSX. (People that say they get 7 hours of battery life on a pre-Haswell Macbook Air are °lying°)

mYself
Hors ligne
A rejoint: 01/18/2012

Bluetooth mice have always suffered from poor stability of the connection, regardless what operating system was used on. I bought the A4Tech XL-750BF (wired) model many years ago, and it was replaced only once (the previous model had a defective sensor), but as far as I can tell, after that I never had any problems during its use. It's the perfect mouse one can dream about, the reaction time smooth as it can be, while there are no lags (one of the most frustrating thing about bluetooth mice). BT driven mice were always troublesome, mainly because of its technology, which is not reliable at all. Are you able to discern any difference between using it on Ubuntu and Trisquel (and possibly OSX).

I am certain, that the battery life problem is caused because of the older Linux-libre kernel, that doesn't have full support for Haswell. This is pretty common on bleeding-edge hardware, and there are ways to solve it, like installing the latest kernel through PPA (I does not recommend you to do so, because the LL-kernel does not contain Ubuntu-specific changes and while you may improve the overall battery life, you will eventually face many new problems), or installing the Ubuntu Linux-kernel from PPA (since Linux contain binary blobs, you will get them along with the kernel, and this will also broke some system functions, like the ability to upgrade). The best you can do for the time being is to stay with the 3.5 kernel series, and watch out when a new 3.8 version gets backported from Ubuntu 13.04 by jxself, and also to use some utilities you mentioned, which will optimize your battery usage. Between, do you also using GNU/Linux on the MacBook Pro?

P.S.: I am now also certain, that your previous issue with the TP-Link adapter, was exactly because of the incomplete support for Haswell in the older kernel, used in Trisquel 6.0.

mYself
Hors ligne
A rejoint: 01/18/2012

> I would like to attach them into the WikiDevi device pages

Done.

mYself
Hors ligne
A rejoint: 01/18/2012

Can you also attach a photo of the adapter (TL-WN722N) connected to the left USB port (it looks like the system doesn't recognize the connected adapter)?

EDIT: Forget about this, just focus on updating your kernel to the latest version as I proposed in my latest comment.

matt
Hors ligne
A rejoint: 06/24/2013

Here's the full output of the two commands:
http://cl.ly/image/2E460l3x0g0w

mYself
Hors ligne
A rejoint: 01/18/2012

Ok, everything (driver+firmware) is in place now, and it should just work. I have honestly no idea why it does not.

matt
Hors ligne
A rejoint: 06/24/2013

That's a pity. But thank you very much for your time and effort!

It's always good to know that there are people around that care to help :)

mYself
Hors ligne
A rejoint: 01/18/2012

Hey, are at least one of the USB connectors in version 3.0? That might be a problem. Can you also try to run the TP-Link adapter on Ubuntu 12.04 64-bit to see if it's working or not (booting into Live CD env. is sufficient)? Remember that your internal wireless card, and the ASUS adapter (AFAIK) require non-free firmware in order to get them work. Only the TP-Link one is free software compatible.

EDIT: Forgot about your previous comment. It looks like the problem can be in your USB3.0 connectors.

matt
Hors ligne
A rejoint: 06/24/2013

Yes, I was also fearing that this is an issue with the USB ports.

Now, I have created an ubuntu-12.04.2-desktop-amd64 live USB (not the alternate iso, because that one does not offer run without installing ubuntu first).

The TP-link adapter is working in this live ubuntu on my macbook air!
Picture as proof: http://cl.ly/image/0n3D271g1y1M

mYself
Hors ligne
A rejoint: 01/18/2012

Ha, the 12.04.2 version does use the 3.5 kernel series AFAIK, so that could be the reason.

EDIT: Can you also attach the output of the "uname -r" command to precisely know under which kernel version Ubuntu is running?

matt
Hors ligne
A rejoint: 06/24/2013

It's all in this new picture:
http://cl.ly/image/3S3q1F1P1n1f

12.04.2
$ uname -r
3.5.0-23-generic

mYself
Hors ligne
A rejoint: 01/18/2012

Also try to run the following command

sudo rmmod ath9k_htc;sudo modprobe ath9k_htc

and if that fails too, just restart the computer while leaving the wireless device connected to the right USB connector.

matt
Hors ligne
A rejoint: 06/24/2013

This command failed at first, but it executed without output after a restart with the adapter in the right USB port.

However, the adapter does not show up in the tray.

mYself
Hors ligne
A rejoint: 01/18/2012

Then it looks like the driver was not loaded at first. This can happen sometimes. I am wondering why the adapter refusing to work...

matt
Hors ligne
A rejoint: 06/24/2013

Second attempt did not work either. Nothing happens at all. No device shows up. No blinking lights.

I was actually wondering if the TP-Link adapter is broken, so I connected it to a friends Win7 installation. It worked there - so the adapter is fine.

mYself
Hors ligne
A rejoint: 01/18/2012

Ok, the first thing you should try is to download and install the latest LTS kernel by downloading this file, and installing it using the following command:

sudo dpkg -i linux-image-3.2.0-48-generic_*_amd64.deb

Then reboot and see what happens.

matt
Hors ligne
A rejoint: 06/24/2013

Installed and rebooted while attached. Still nothing happens on both USB ports. :(

Here's a picture for confirmation:
http://cl.ly/image/3P020y0j0m1a

mYself
Hors ligne
A rejoint: 01/18/2012

Ok, just to be sure, can you confirm this with the output of the uname -r command?

matt
Hors ligne
A rejoint: 06/24/2013

It's in the attached picture already:

$ uname -r
3.2.0-48-generic

mYself
Hors ligne
A rejoint: 01/18/2012

Ah, sorry. I overlooked that. Now try to download the 3.5 series kernel, install it, and see what happens. Also, do not forget to attach the output of the "uname -r" command.

matt
Hors ligne
A rejoint: 06/24/2013

It worked! Thanks @mYself!

Here's the proof: http://cl.ly/image/3L1p1p0a2X1Y