Hello all.

I've got a problem for a while with kali linux installed on my hdd, the adapter disconnects randomly. I've tried using it into a live usb and works properly.
In windows 10 works great, no disconnections and zero problems.

ALso, I've noticed that the disconnections are most likely to happen when downloading stuff (such as updating the drivers or downloading things).
This problem has nothing to do with signal strength.
Information:
QUICK COMMANDS:
airmon-ng --verbose
Code:
No LSB modules are available.
Distributor ID:	Kali
Description:	Kali GNU/Linux Rolling
Release:	kali-rolling
Codename:	kali-rolling

Linux kali 4.9.0-kali4-amd64 #1 SMP Debian 4.9.30-2kali1 (2017-06-22) x86_64 GNU/Linux

K indicates driver is from 4.9.0-kali4-amd64
V indicates driver comes directly from the vendor, almost certainly a bad thing
S indicates driver comes from the staging tree, these drivers are meant for reference not actual use, BEWARE
? indicates we do not know where the driver comes from... report this


X[PHY]Interface		Driver[Stack]-FirmwareRev		Chipset										Extended Info

K[phy26]wlan0		ath9k_htc[mac80211]-1.4			Atheros Communications, Inc. AR9271 802.11n
lsusb; lspci
Code:
Bus 005 Device 030: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 275d:0ba6  
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
00:00.0 Host bridge: Intel Corporation 4 Series Chipset DRAM Controller (rev 03)
00:02.0 VGA compatible controller: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 01)
00:1c.1 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 2 (rev 01)
00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 01)
00:1d.1 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 (rev 01)
00:1d.2 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 (rev 01)
00:1d.3 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 (rev 01)
00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
00:1f.2 IDE interface: Intel Corporation NM10/ICH7 Family SATA Controller [IDE mode] (rev 01)
01:00.0 Ethernet controller: Qualcomm Atheros AR8151 v2.0 Gigabit Ethernet (rev c0)
rfkill unblock wifi; rfkill list
Code:
26: phy26: Wireless LAN
	Soft blocked: no
	Hard blocked: no
iwconfig; airmon-ng
Code:
eth0      no wireless extensions.

lo        no wireless extensions.

wlan0     IEEE 802.11  ESSID:"myAP"  
          Mode:Managed  Frequency:2.452 GHz  Access Point: 10:FE:ED:XX:XX:XX  
          Bit Rate=5.5 Mb/s   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=21/70  Signal level=-89 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:221  Invalid misc:1184   Missed beacon:0


PHY	Interface	Driver		Chipset

phy26	wlan0		ath9k_htc	Atheros Communications, Inc. AR9271 802.11n
lsb_release -a; uname -a
Code:
No LSB modules are available.
Distributor ID:	Kali
Description:	Kali GNU/Linux Rolling
Release:	kali-rolling
Codename:	kali-rolling
Linux kali 4.9.0-kali4-amd64 #1 SMP Debian 4.9.30-2kali1 (2017-06-22) x86_64 GNU/Linux
About the Device (Hardware)

Chipset*? Atheros AR9271'
Vendor/Make? Alfa network
Model? WFUBALFA036NHA
Revision/Version? 3015 (i think)

About the software (Wi-Fi card)
Stack? IEEE 802.11/b/g/n
Driver? ath9k_htc


About the software (OS)
What version of Kali-Linux? kali-rolling
What architecture is being used? 64 bits
Is Kali-Linux being used in a Virtual Machine? NO

Stages
Whats happening?
1.) Is the OS able to detect it?
yes
1.2) ...if not, is there any mention of it in kernel log?
dmesg


2.) Is there an interface?
yes


3.) Is anything using the interface?
Code:
27: phy27: Wireless LAN
	Soft blocked: no
	Hard blocked: no
Code:
Found 3 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to run 'airmon-ng check kill'

  PID Name
  447 NetworkManager
  532 wpa_supplicant
12236 dhclient
4.) Are you able to connect to a Wi-Fi network?
All types of networks (wpa2 the most)
I've tried strong and low signals, it happens also with strong signals

5.) Is monitor mode working?
It works


6.) Is injection working?
Yes