You are not logged in.

#1 2016-08-29 00:39:09

UnusuallyRegular
Member
Registered: 2016-08-25
Posts: 8

[Solved] WiFi Card Doesn't Always Work

I'm running Arch with the Linux-ck 4.7.2 kernel (Although this issue happened with the normal Linux kernel) and I have an Atheros AR9227 WiFi card. I'm having an issue where sometimes, Arch uses my wireless card and other times it doesn't.  Whether or not it works seems to be randomly decided on boot.

When the card is working, it shows up in lspci -v as

04:05.0 Network controller: Qualcomm Atheros AR9227 Wireless Network Adapter (rev 01)
	Subsystem: Qualcomm Atheros Device 0300
	Flags: bus master, 66MHz, medium devsel, latency 168, IRQ 20, NUMA node 0
	Memory at fe800000 (32-bit, non-prefetchable) [size=64K]
	Capabilities: [44] Power Management version 2
	Kernel driver in use: ath9k
	Kernel modules: ath9k

When it's not working, this is what lspci -v shows:

04:05.0 Ethernet controller: Qualcomm Atheros AR922x Wireless Network Adapter (rev 01)
	Subsystem: Qualcomm Atheros AR9220-AC1A [AVM Fritz!Box FON WLAN 7270 v3]
	Flags: 66MHz, medium devsel, IRQ 11, NUMA node 0
	Memory at fe800000 (32-bit, non-prefetchable) [disabled] [size=64K]
	Capabilities: [40] #80 [0000]
	Capabilities: [80] #00 [0000]

Any ideas how I can get the card to work consistently?

Last edited by UnusuallyRegular (2016-09-01 16:50:09)

Offline

#2 2016-08-29 02:52:14

promarbler14
Member
From: MD, U.S.
Registered: 2016-03-28
Posts: 40

Re: [Solved] WiFi Card Doesn't Always Work

Try "modprobe ath9k" (as root). If that doesn't work, investigate why the IRQ numbers are different between boots... A look at the system log (via sudo journalctl -b) may help.

Offline

#3 2016-08-29 09:45:49

Starfish
Member
From: Germany
Registered: 2015-10-21
Posts: 134

Re: [Solved] WiFi Card Doesn't Always Work

UnusuallyRegular wrote:
04:05.0 Ethernet controller: Qualcomm Atheros AR922x Wireless Network Adapter (rev 01)

Ethernet wireless card? Are you sure?


"Yesterday is history, tomorrow is a mystery, but today is a gift. That is why it is called the present." - Master Oogway

Offline

#4 2016-08-29 13:36:57

UnusuallyRegular
Member
Registered: 2016-08-25
Posts: 8

Re: [Solved] WiFi Card Doesn't Always Work

promarbler14 wrote:

Try "modprobe ath9k" (as root). If that doesn't work, investigate why the IRQ numbers are different between boots... A look at the system log (via sudo journalctl -b) may help.

"modprobe ath9k" doesn't work, but I'll check the logs for anything weird.

Starfish wrote:
UnusuallyRegular wrote:
04:05.0 Ethernet controller: Qualcomm Atheros AR922x Wireless Network Adapter (rev 01)

Ethernet wireless card? Are you sure?

Yes, I'm sure.

Offline

#5 2016-08-29 15:44:17

Starfish
Member
From: Germany
Registered: 2015-10-21
Posts: 134

Re: [Solved] WiFi Card Doesn't Always Work

UnusuallyRegular wrote:
Starfish wrote:
UnusuallyRegular wrote:
04:05.0 Ethernet controller: Qualcomm Atheros AR922x Wireless Network Adapter (rev 01)

Ethernet wireless card? Are you sure?

Yes, I'm sure.

How is that possible? Ethernet is a way to transmit data via cable, wireless is, well, wireless. I could imagine that this is connected to your problem.

Could you run

lshw -short | grep -i network

as root and post it with your full lspci?
Right after it stops working, you also might want to check dmesg.


"Yesterday is history, tomorrow is a mystery, but today is a gift. That is why it is called the present." - Master Oogway

Offline

#6 2016-08-29 16:16:33

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,690

Re: [Solved] WiFi Card Doesn't Always Work

While it is true that 801.11 is not "Ethernet", but rather is a standard for a wireless local area network, the expectation is that the 802.11 wlan is bridged to the Internet -- probably through something that is properly considered to be "Ethernet".  In all likelihood using some sort of RG45 connectored CAT 3/5 cable.  In this case, I wager that some marketing droid at Qualcom just got a bit confused.  In other words, that the card reports "Ethernet" and "Wireless" in the device name report is just a red herring.

Edit:  OTOH, maybe not.  That is not actually generated by the card.  hmm

Last edited by ewaller (2016-08-29 19:16:37)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#7 2016-08-29 16:21:00

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,690

Re: [Solved] WiFi Card Doesn't Always Work

Could you regenerate those lspci reports using the -nn switch as well?
The journal must contain different stories based on those two states; any chance of digging some of that information out?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#8 2016-08-29 19:08:30

UnusuallyRegular
Member
Registered: 2016-08-25
Posts: 8

Re: [Solved] WiFi Card Doesn't Always Work

Here is the output of "lshw -short | grep -i network" (The card is not currently working. Haven't been able to get it to work today)

/0/100/4/0       enp2s0       network        RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
/0/100/14.4/5                 network        AR922x Wireless Network Adapter
/1               wlan0        network        Wireless interface
/2               enp0s22f2u4  network        Ethernet interface

Here is the output of "lspci -nn"

00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (external gfx0 port B) [1002:5a14] (rev 02)
00:02.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port B) [1002:5a16]
00:04.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port D) [1002:5a18]
00:07.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port G) [1002:5a1b]
00:11.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] [1002:4391] (rev 40)
00:12.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller [1002:4397]
00:12.2 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller [1002:4396]
00:13.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller [1002:4397]
00:13.2 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller [1002:4396]
00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller [1002:4385] (rev 42)
00:14.2 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) [1002:4383] (rev 40)
00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller [1002:439d] (rev 40)
00:14.4 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge [1002:4384] (rev 40)
00:14.5 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller [1002:4399]
00:16.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller [1002:4397]
00:16.2 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller [1002:4396]
00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 0 [1022:1600]
00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 1 [1022:1601]
00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 2 [1022:1602]
00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 3 [1022:1603]
00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 4 [1022:1604]
00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 5 [1022:1605]
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn XT [Radeon HD 7870 GHz Edition] [1002:6818]
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] [1002:aab0]
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 09)
03:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller [1b21:1042]
04:05.0 Ethernet controller [0200]: Qualcomm Atheros AR922x Wireless Network Adapter [168c:ff1d] (rev 01)

And because it's really long, I put the full lspci -v on Pastebin.

I'll look into getting the journal comparison after I can get the card to work correctly one time.

Last edited by UnusuallyRegular (2016-08-29 19:11:39)

Offline

#9 2016-08-30 10:07:26

Starfish
Member
From: Germany
Registered: 2015-10-21
Posts: 134

Re: [Solved] WiFi Card Doesn't Always Work

UnusuallyRegular wrote:

Here is the output of "lshw -short | grep -i network" (The card is not currently working. Haven't been able to get it to work today)

/0/100/4/0       enp2s0       network        RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
/0/100/14.4/5                 network        AR922x Wireless Network Adapter
/1               wlan0        network        Wireless interface
/2               enp0s22f2u4  network        Ethernet interface

This may be a lead.
The upper two devices look like the two usable for ethernet and wireless, since they have a reasonable name and are embedded into the bus system (0/100/...).
I have no clue what the lower two are supposed to be, but I am pretty sure that the network interface "wlan0" being assigned to the lower one is the problem.

Try the following:
1.) Run the full lshw as root, find "AR922x Wireless Network Adapter" and note its MAC-address, printed after the keyword "serial".
2.) Assign a network interface name (not wlan0!), e.g. wifi0 to this MAC address (https://wiki.archlinux.org/index.php/Ne … evice_name)
     As you can see in the link's note at the bottom, wlan0 is a bad choice for an interface name.
3) Configure your network for this new interface name (netctl, wpa_supplicant, whatever) and disable everything connected to "wlan0"

Last edited by Starfish (2016-08-30 10:15:56)


"Yesterday is history, tomorrow is a mystery, but today is a gift. That is why it is called the present." - Master Oogway

Offline

#10 2016-08-30 13:05:24

UnusuallyRegular
Member
Registered: 2016-08-25
Posts: 8

Re: [Solved] WiFi Card Doesn't Always Work

Starfish wrote:
UnusuallyRegular wrote:

Here is the output of "lshw -short | grep -i network" (The card is not currently working. Haven't been able to get it to work today)

/0/100/4/0       enp2s0       network        RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
/0/100/14.4/5                 network        AR922x Wireless Network Adapter
/1               wlan0        network        Wireless interface
/2               enp0s22f2u4  network        Ethernet interface

This may be a lead.
The upper two devices look like the two usable for ethernet and wireless, since they have a reasonable name and are embedded into the bus system (0/100/...).
I have no clue what the lower two are supposed to be, but I am pretty sure that the network interface "wlan0" being assigned to the lower one is the problem.

Try the following:
1.) Run the full lshw as root, find "AR922x Wireless Network Adapter" and note its MAC-address, printed after the keyword "serial".
2.) Assign a network interface name (not wlan0!), e.g. wifi0 to this MAC address (https://wiki.archlinux.org/index.php/Ne … evice_name)
     As you can see in the link's note at the bottom, wlan0 is a bad choice for an interface name.
3) Configure your network for this new interface name (netctl, wpa_supplicant, whatever) and disable everything connected to "wlan0"

wlan0 is my USB WiFi adapter, but I'm having issues with it. (There are no official Linux drivers for it)
enp0s22f2u4 is my phone. I was using Android's tethering at the time to get access to the internet.

I tried to do what you said there, but the MAC address for the card doesn't show up in lshw. If I can find another way to get the MAC address, I'll try the next steps and post here again.

And not that it should matter too much, but I reinstalled Arch since I was having other issues, but the network card still isn't working. Also, this problem exists on the Arch USB stick I used for the install.

Offline

#11 2016-09-01 16:49:49

UnusuallyRegular
Member
Registered: 2016-08-25
Posts: 8

Re: [Solved] WiFi Card Doesn't Always Work

Update: It works. I have no clue why, but it seems to have started working again. The only thing I can think of is the BIOS update that I did to solve an unrelated issue (Related to IOMMU). So... Solved, I guess?

Offline

#12 2026-07-15 06:22:08

fuhonjud
Member
Registered: 2026-07-15
Posts: 1

Re: [Solved] WiFi Card Doesn't Always Work

I had the exact same issue but on Ubuntu. Your answer gave me the idea to check for a IOMMU related problem, and it was the hint I needed to solve my Wi-Fi card and SSD problems, so thank you a *lot* for mentioning it !

I had DMAR related logs in dmesg

~ # dmesg
phy0: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x420000020 DMADBG_7=0x00028040
DMAR: DRHD: [DMA Read NO_PASID] Request device [04:00:00] fault addr 0xffef1000 [fault reason 0x06] PTE Read acces is not set
DMAR: DHRD: handling fault status reg 2
DMAR: DHRD: handling fault status reg 3

~ # journalctl -u NetworkManager
device (wlp4s0): Activation: (wifi) associationtook too long, failing activation

The issue was related to IOMMU, I disabled it from the BIOS (option name was VT-d on my Gigabyte Z97X-Gaming 3 motherboard). The why it was an issue is maybe related to  stale IOMMU page tables that where creating a conflict with DMA, but I spent enough time debugging this to take any additional time to verify this hypothesis.

It might help someone also troubleshooting this: I had issues with my SSD, when installing Ubuntu 26 the disk suddenly switched to read only:

I/O error, dev sda, sector 327160216 op 0x1:(WRITE) flags 0x903000 phys_seg 6 prio class 2
Buffer I/O error on dev sda2, logical block 40894515, lost async page write
EXT4-fs warning (device sda2): ext4_end_bio:369: I/O error 10 writing to inode 10890568 starting block 44174848)
EXT4-fs (sda2): failed to convert unwritten extents to written extents -- potential data loss!  (inode 10890568, error -5)
Buffer I/O error on device sda2, logical block 44173312
EXT4-fs error (device sda2): ext4_journal_check_start:86: comm kworker/u16:1: Detected aborted journal
EXT4-fs (sda2): Delayed block allocation failed for inode 10890568 at logical offset 2048 with max blocks 2048 with error 5
EXT4-fs error (device sda2) in ext4_do_writepages:2948: IO failure
EXT4-fs error (device sda2): ext4_journal_check_start:86: comm kworker/u16:16: Detected aborted journal
EXT4-fs (sda2): Remounting filesystem read-only

Disabling IOMMU also fixed that issue, as I was also seeing errors concerning DMAR but concerning the PCI address of my SSD this time

Offline

#13 2026-07-15 07:51:57

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,599
Website

Re: [Solved] WiFi Card Doesn't Always Work


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

Board footer

Powered by FluxBB