Choose style:

Author Topic: Ath5K "fix" for a problematic AR2413 chip.  (Read 1175 times)

0 Members and 1 Guest are viewing this topic.

Offline DOSfan

  • nOOb
  • *
  • Posts: 17
  • Karma: 5
  • New Forum User
    • View Profile
  • Peppermint version(s): PeppermintOS 7
Ath5K "fix" for a problematic AR2413 chip.
« on: September 05, 2016, 11:08:03 am »
First off, if your Wi-Fi is working fine, or better, don't mess with it! ;-) And you should probably stop following this guide (although you are welcome to read it).

Now, let's see if you are running ath5k, and if so, which chip you have.  (Or, at least, which chip ath5k thinks you have.)

In a terminal, run the following:
Code: [Select]
dmesg | grep "ath5.*chip"

If you don't get any output, you aren't even using ath5k, and should probably stop following this guide.
If the output doesn't look like the following, you're not using a AR2413 chip, and should probably stop following this guide. (Although, it might still work for you, I make no promises, or even suggestions, that it will.)
Quote
[   18.172696] ath5k: phy0: Atheros AR2413 chip found (MAC: 0x78, PHY: 0x45)

If you are ready to proceed, run the following script (or the resulting commands) just once to apply this "fix." (You do not need to run it each time at boot, or anything.)

Copy and paste into a file with the ".sh" extension, remember to change permissions to make it executable, and run.
Code: [Select]
#!/bin/bash

echo "options ath5k nohwcrypt=1" | sudo tee /etc/modprobe.d/ath5k.conf
sudo modprobe -rfv ath5k
sudo modprobe -v ath5k

If you want to run the commands individually, I'll break them down here - with a description of what each one does.

Code: [Select]
echo "options ath5k nohwcrypt=1" | sudo tee /etc/modprobe.d/ath5k.conf
Appends "options ath5k nphwcrypt=1" to the file /etc/modprobe.d/ath5k.conf (or creates the file, if it doesn't exist). This disables the hardware encryption of the AR2413 chip because it doesn't really play nice.  It does NOT disable encryption, simply tells ath5k to not even let the AR2413 chip to try and let software handle it.

Code: [Select]
sudo modprobe -rfv ath5k
Disables (temporarily) ath5k.  NOTE: You will be disconnected from Wi-Fi after running this.  We will fix that in a moment, but you should be aware.

Code: [Select]
sudo modprobe -v ath5k
Re-enables ath5k, allowing it to load the new options command.

Hopefully, your Wi-Fi will work great from here on.

If you want to revert the changes, edit the /etc/modprobe.d/ath5k.conf file to delete the "options ath5k nphwcrypt=1" line (or, alternatively, if it is the only line in the file, you can just delete the file).
Disable (temporarily) ath5k, and re-enable it again to load the changed .conf file.


Why would you want to do this?

Well, if your Wi-Fi has intermittent hangs, disconnects, or connection resets, even to local resources, and you are running an AR2413 chip, it could be that the hardware encryption doesn't work well - as in my case.

I know it can be truly frustrating trying to fix it.  When I tried switching my old Toshiba Satellite A105 (O.K., really old...  Alright, really, really old) to Linux years ago it frustrated me to no end.  I tried many things, switching to MadWiFi drivers (yes, this was back before they were discontinued), installing NDISWrapper to try and use Toshibas Windows drivers...  And other things I don't remember anymore.  Then I stumbled on this fix.  I didn't note where I found it, and I can't remember, so I can't even credit the soul that saved my sanity.  But, luckily, I kept the notes.  For the past few years I have been running Linux Mint on this laptop and not had any issues (I don't know if they add the nohwcrypt option, or what they do).  It wasn't until I tried PeppermintOS 7 (because even Linux Mint XFCE is getting too bloated for this laptop - and truthfully PeppermintOS isn't far enough behind. Pretty soon I will have to forgo GUI all together if I want to keep running this laptop) that I was reintroduced to this frustrating situation.

While I doubt anyone but me is still dealing with this, if there are any others, hopefully this will save them the frustrations I went through.

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26291
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Ath5K "fix" for a problematic AR2413 chip.
« Reply #1 on: September 05, 2016, 01:12:00 pm »
Thanks for that, I'm sure it'll come in handy or people in the same boat....

Oh, and welcome to the forum DOSfan :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec