1

I have constant wi-fi drops with Ubuntu 14.04. I was trying to fix this issue with the following code:

sudo apt-get install --reinstall linux-headers-$(uname -r) linux-headers-generic build-essential dkms git 
git clone https://github.com/pvaret/rtl8192cu-fixes.git
sudo dkms add ./rtl8192cu-fixes
sudo dkms install 8192cu/1.9
echo "blacklist rtl8192cu" | sudo tee -a /etc/modprobe.d/blacklist.conf

When I entered the fourth line, sudo dkms install 8192cu/1.9, I got this error:

$ sudo dkms install 8192cu/1.9
Error! Could not find module source directory.
Directory: /usr/src/8192cu-1.9 does not exist.
$

How can I fix this? What should I do next?

Here is network card info:

$ lspci -nnk | grep -iA2 net; rfkill list all
01:00.0 Network controller [0280]: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter [168c:0036] (rev 01)
    Subsystem: Foxconn International, Inc. Device [105b:e068]
    Kernel driver in use: ath9k
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: acer-wireless: Wireless LAN
    Soft blocked: no
    Hard blocked: no
4: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
$

In case it helps, here is the output from the first three commands:

$ sudo apt-get install --reinstall linux-headers-$(uname -r) linux-headers-generic build-essential dkms git   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  dkms
0 upgraded, 1 newly installed, 4 reinstalled, 0 to remove and 0 not upgraded.
Need to get 3,401 kB of archives.
After this operation, 351 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty/main build-essential amd64 11.6ubuntu6 [4,838 B]
Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main dkms all 2.2.0.3-1.1ubuntu5.14.04.5 [65.4 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main git amd64 1:1.9.1-1ubuntu0.3 [2,586 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-headers-3.19.0-56-generic amd64 3.19.0-56.62~14.04.1 [743 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-headers-generic amd64 3.13.0.83.89 [2,232 B]
Fetched 3,401 kB in 10s (321 kB/s)                                             
(Reading database ... 703929 files and directories currently installed.)
Preparing to unpack .../build-essential_11.6ubuntu6_amd64.deb ...
Unpacking build-essential (11.6ubuntu6) over (11.6ubuntu6) ...
Selecting previously unselected package dkms.
Preparing to unpack .../dkms_2.2.0.3-1.1ubuntu5.14.04.5_all.deb ...
Unpacking dkms (2.2.0.3-1.1ubuntu5.14.04.5) ...
Preparing to unpack .../git_1%3a1.9.1-1ubuntu0.3_amd64.deb ...
Unpacking git (1:1.9.1-1ubuntu0.3) over (1:1.9.1-1ubuntu0.3) ...
Preparing to unpack .../linux-headers-3.19.0-56-generic_3.19.0-56.62~14.04.1_amd64.deb ...
Unpacking linux-headers-3.19.0-56-generic (3.19.0-56.62~14.04.1) over (3.19.0-56.62~14.04.1) ...
Preparing to unpack .../linux-headers-generic_3.13.0.83.89_amd64.deb ...
Unpacking linux-headers-generic (3.13.0.83.89) over (3.13.0.83.89) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up build-essential (11.6ubuntu6) ...
Setting up dkms (2.2.0.3-1.1ubuntu5.14.04.5) ...
Setting up git (1:1.9.1-1ubuntu0.3) ...
Setting up linux-headers-3.19.0-56-generic (3.19.0-56.62~14.04.1) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.19.0-56-generic /boot/vmlinuz-3.19.0-56-generic
Setting up linux-headers-generic (3.13.0.83.89) ...

$ git clone https://github.com/pvaret/rtl8192cu-fixes.git
Cloning into 'rtl8192cu-fixes'...
remote: Counting objects: 435, done.
remote: Total 435 (delta 0), reused 0 (delta 0), pack-reused 435
Receiving objects: 100% (435/435), 1.80 MiB | 251.00 KiB/s, done.
Resolving deltas: 100% (222/222), done.
Checking connectivity... done.

$ sudo dkms add ./rtl8192cu-fixes

Creating symlink /var/lib/dkms/8192cu/1.10/source ->
                 /usr/src/8192cu-1.10

DKMS: add completed.
$
gracious1
  • 531

2 Answers2

2

You already have a driver for your device, ath9k. If you are having dropped connections, there may be a few things you can try.

First, check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I also have better luck with a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

gksudo gedit /etc/default/crda

Use nano or kate or leafpad if you don't have the text editor gedit.

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Next, I'd set IPv6 to Ignore in Network Manager: http://docs.fedoraproject.org/en-US/Fedora/18/html/Installation_Guide/images/netconfig/network-connections-ipv6-ignore.png This example is for ethernet, but you want wireless.

If these changes do not help, please try:

sudo -i
echo "options ath9k nohwcrypt=1"  >  /etc/modprobe.d/ath9k.conf
exit

Reboot.

chili555
  • 60,188
  • Before I try these suggestions, I need to ask, what are the implications of having IPv6 ignore Network Manager altogether? This seems rather sweeping. BTW, country code is correctly set to US. – gracious1 Apr 03 '16 at 13:35
  • It's the other way around. You are asking Network Manager to ignore IPv6; specifically, offers of an IPv6 address from the router. It often, but not always, helps connectivity and is easily undone. – chili555 Apr 03 '16 at 14:04
0

The correct fourth line would be:

sudo dkms install 8192cu/1.10

Look at your output for dkms add, you have created a folder called

/usr/src/8192cu-1.10
bitseater
  • 206