Disabling internal notebook WiFi and enabling external USB WiFi instead

Hi all,

I’m using a Lenovo G710, which uses a Qualcomm Atheros WLAN chipset (module ath3k). Due to its limited signal quality I wanted to buy an external USB WiFi stick which includes an antenna (after having compared several models and having verified the general Linux compatibility I decided for the Alfa AWUS036H (Realtek 8187L chipset).
Is it possible to tell the KDE network manager which device it should use? I wasn’t able to find such an option. No matter whether the device is plugged in or not, the device being used is always the internal one. dmesg showed me that the Kernel recognized the device properly and also loaded the right driver.
In the case that this is not possible, then I guess adding the line “blacklist ath3k” to /etc/modprobe.d/50-blacklist.conf would be the easiest solution?

Thanks in advance

David

Did you set it up in Yast??

I can’t configure the external device in YaST unless I’d disable NetworkManager, which is not really what I (or most other people I guess) would like to do. As long as the kernel gets the modules configured properly, there’s no need to set it up in YaST (configuration is being done automatically during boot process).

So I blacklisted the modules for my internal WLAN and rebooted into a system without any WLAN at all.

To me it seemed like the kernel has problems with configuring it when I took a look at the dmesg output:

   11.089115] cfg80211: World regulatory domain updated:
   11.089119] cfg80211:  DFS Master region: unset
   11.089120] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
   11.089123] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
   11.089125] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
   11.089126] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
   11.089128] cfg80211:   (5170000 KHz - 5250000 KHz @ 160000 KHz), (N/A, 2000 mBm), (N/A)
   11.089129] cfg80211:   (5250000 KHz - 5330000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
   11.089131] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
   11.089133] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
   11.089134] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
   11.155981] ideapad_laptop: timeout in write_ec_cmd
   11.167288] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
   11.167485] ieee80211 phy0: hwaddr 00:c0:ca:7f:12:52, RTL8187vB (default) V1 + rtl8225z2, rfkill mask 2
   11.176215] rtl8187: Customer ID is 0xFF
   11.177643] rtl8187: wireless switch is on
   11.177675] usbcore: registered new interface driver rtl8187
   11.261076] ideapad_laptop: timeout in write_ec_cmd
   11.362185] ideapad_laptop: timeout in write_ec_cmd
   11.548725] Adding 4194300k swap on /dev/mapper/system-swap.  Priority:-1 extents:1 across:4194300k FS
   12.157441] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: acl,user_xattr
   12.184876] audit: type=1305 audit(1414603771.991:2): audit_pid=856 old=0 auid=4294967295 ses=4294967295 res=1
   12.418931] ip6_tables: (C) 2000-2006 Netfilter Core Team
   12.423198] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
   12.425284] ip_tables: (C) 2000-2006 Netfilter Core Team
   14.540375] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
   14.540377] Bluetooth: BNEP filters: protocol multicast
   14.540385] Bluetooth: BNEP socket layer initialized
   14.876051] ideapad_laptop: timeout in write_ec_cmd
   14.886774] alx 0000:08:00.0: irq 47 for MSI/MSI-X
   14.888361] IPv6: ADDRCONF(NETDEV_UP): enp8s0: link is not ready
   16.690849] IPv6: ADDRCONF(NETDEV_UP): wlp0s20u6: link is not ready
   16.696205] NET: Registered protocol family 17
   16.830365] usb 3-6: USB disconnect, device number 5
   17.699272] usb 3-6: new high-speed USB device number 7 using xhci_hcd
   17.871105] usb 3-6: New USB device found, idVendor=0bda, idProduct=8187
   17.871110] usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
   17.871113] usb 3-6: Product: RTL8187_Wireless_LAN_Adapter
   17.871116] usb 3-6: Manufacturer: Manufacturer_Realtek_RTL8187_
   17.871118] usb 3-6: SerialNumber: 00C0CA7F1252
   17.986220] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
   17.986434] ieee80211 phy1: hwaddr 00:c0:ca:7f:12:52, RTL8187vB (default) V1 + rtl8225z2, rfkill mask 2
   17.994351] rtl8187: Customer ID is 0xFF
   17.994677] rtl8187: wireless switch is on
   19.795142] IPv6: ADDRCONF(NETDEV_UP): wlp0s20u6: link is not ready
   19.881832] fuse init (API version 7.23)
   19.929898] usb 3-6: USB disconnect, device number 7
   20.261052] usb 3-6: new high-speed USB device number 8 using xhci_hcd
   20.432335] usb 3-6: New USB device found, idVendor=0bda, idProduct=8187
   20.432338] usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
   20.432339] usb 3-6: Product: RTL8187_Wireless_LAN_Adapter
   20.432340] usb 3-6: Manufacturer: Manufacturer_Realtek_RTL8187_
   20.432341] usb 3-6: SerialNumber: 00C0CA7F1252
   20.546765] ieee80211 phy2: Selected rate control algorithm 'minstrel_ht'
   20.546994] ieee80211 phy2: hwaddr 00:c0:ca:7f:12:52, RTL8187vB (default) V1 + rtl8225z2, rfkill mask 2
   20.554832] rtl8187: Customer ID is 0xFF
   20.555133] rtl8187: wireless switch is on
   20.725120] Bluetooth: RFCOMM TTY layer initialized
   20.725130] Bluetooth: RFCOMM socket layer initialized
   20.725134] Bluetooth: RFCOMM ver 1.11
   22.376596] IPv6: ADDRCONF(NETDEV_UP): wlp0s20u6: link is not ready
   22.505855] usb 3-6: USB disconnect, device number 8
   22.847957] usb 3-6: new high-speed USB device number 9 using xhci_hcd
   23.019230] usb 3-6: New USB device found, idVendor=0bda, idProduct=8187
   23.019234] usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
   23.019236] usb 3-6: Product: RTL8187_Wireless_LAN_Adapter
   23.019238] usb 3-6: Manufacturer: Manufacturer_Realtek_RTL8187_
   23.019240] usb 3-6: SerialNumber: 00C0CA7F1252
   23.143041] ieee80211 phy3: Selected rate control algorithm 'minstrel_ht'
   23.143398] ieee80211 phy3: hwaddr 00:c0:ca:7f:12:52, RTL8187vB (default) V1 + rtl8225z2, rfkill mask 2
   23.152181] rtl8187: Customer ID is 0xFF
   23.152593] rtl8187: wireless switch is on
   24.984281] IPv6: ADDRCONF(NETDEV_UP): wlp0s20u6: link is not ready

The Kernel keeps saying

   22.505855] usb 3-6: USB disconnect, device number <device number>
   22.847957] usb 3-6: new high-speed USB device number 9 using xhci_hcd
   23.019230] usb 3-6: New USB device found, idVendor=0bda, idProduct=8187
   23.019234] usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
   23.019236] usb 3-6: Product: RTL8187_Wireless_LAN_Adapter
   23.019238] usb 3-6: Manufacturer: Manufacturer_Realtek_RTL8187_
   23.019240] usb 3-6: SerialNumber: 00C0CA7F1252
   23.143041] ieee80211 phy3: Selected rate control algorithm 'minstrel_ht'
   23.143398] ieee80211 phy3: hwaddr 00:c0:ca:7f:12:52, RTL8187vB (default) V1 + rtl8225z2, rfkill mask 2
   23.152181] rtl8187: Customer ID is 0xFF
   23.152593] rtl8187: wireless switch is on
   24.984281] IPv6: ADDRCONF(NETDEV_UP): wlp0s20u6: link is not ready

in short intervals with increasing device numbers.

Any idea how I could make it work?

I’m using OpenSuse 13.2 RC1, kernel version is 3.16.3-1.gd2bbe7f-desktop (x86_64), but I had the same problems before (so I installed another distro where it worked, but OpenSuSe is the only distro I found so far which supports this …] hybrid graphics being used by my Notebook (Lenovo G710).

Is it possible to tell the KDE network manager which device it should use? I wasn’t able to find such an option. No matter whether the device is plugged in or not, the device being used is always the internal one.

If you are using NetworkManager, then there is no need to ocnfigure via YaST. The KDE NM connection editor allows you to create a new wireless connection then select ‘Restrict to deivce’ (drop down). Does your device appear in the list?

You are right, that would be the way to go. Unfortunately it doesn’t appear there, so it must be a kernel or low-level network related issue I think.

Also the output of ifconfig points me in this direction:

wlp0s20u6 Link encap:Ethernet  Hardware Adresse 00:C0:CA:7F:12:52  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenlänge:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


Below follows the entry for wlp7s0, which is obviously my internal WLAN chipset and running properly (it shows the assigned inet address, three inet6 addresses and also the right traffic).

What confuses me is the fact that a hardware address is being assisgned to the external device. If it wouldn’t wouldn’t be supported by my kernel (on my system) at all, then I guess modprobe would fail (the module rtl8187 shows up when doing lsmod) and the WLAN device wouldn’t even be created?

If ifconfig reports both devices, then I would expect NM to see both too.

Below follows the entry for wlp7s0, which is obviously my internal WLAN chipset and running properly (it shows the assigned inet address, three inet6 addresses and also the right traffic).

What confuses me is the fact that a hardware address is being assisgned to the external device.

Hardware addresses don’t get assigned, it is the unique MAC address reported by the device itself.

If it wouldn’t wouldn’t be supported by my kernel (on my system) at all, then I guess modprobe would fail (the module rtl8187 shows up when doing lsmod) and the WLAN device wouldn’t even be created?

Yes, if the kernel/udev didn’t recognise it, the network device would not be reported.

What does the following report?

nm-tool

Report the entire output and enclose within

...[/CO..] tags.

I note that you appear to be plugging this device into a USB 3 port

   17.699272] usb 3-6: new high-speed USB device number 7 using xhci_hcd

Do you have a USB 2 port available to try? Maybe the device is not being handled correctly, and this causes the reset cycling that your kernel messaging reports.

I connected it to each of my three USB ports (actually only one of them should be USB 3 according to the specs), but the same error occured.
The device appears in the ifconfig output, but I can’t choose it in NetworkManager.

nm-tools is not available on my system. Maybe a bug related to 13.2 RC1? I just found this entry:

https://bugzilla.redhat.com/show_bug.cgi?id=985992

However, today I saw another line (the one starting with “1095.436051 SFW2” in the (repeating) dmesg output, which wasn’t there yesterday:

 1089.348499] usb 3-3: new high-speed USB device number 31 using xhci_hcd
 1089.520019] usb 3-3: New USB device found, idVendor=0bda, idProduct=8187
 1089.520023] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
 1089.520025] usb 3-3: Product: RTL8187_Wireless_LAN_Adapter
 1089.520026] usb 3-3: Manufacturer: Manufacturer_Realtek_RTL8187_
 1089.520027] usb 3-3: SerialNumber: 00C0CA7F1252
 1089.640950] ieee80211 phy392: Selected rate control algorithm 'minstrel_ht'
 1089.641246] ieee80211 phy392: hwaddr 00:c0:ca:7f:12:52, RTL8187vB (default) V1 + rtl8225z2, rfkill mask 2
 1089.649718] rtl8187: Customer ID is 0xFF
 1089.650111] rtl8187: wireless switch is on
 1091.466424] IPv6: ADDRCONF(NETDEV_UP): wlp0s20u3: link is not ready
 1091.583060] usb 3-3: USB disconnect, device number 31
 1092.451865] usb 3-3: new high-speed USB device number 32 using xhci_hcd
 1092.623728] usb 3-3: New USB device found, idVendor=0bda, idProduct=8187
 1092.623736] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
 1092.623740] usb 3-3: Product: RTL8187_Wireless_LAN_Adapter
 1092.623744] usb 3-3: Manufacturer: Manufacturer_Realtek_RTL8187_
 1092.623747] usb 3-3: SerialNumber: 00C0CA7F1252
 1092.752296] ieee80211 phy393: Selected rate control algorithm 'minstrel_ht'
 1092.752549] ieee80211 phy393: hwaddr 00:c0:ca:7f:12:52, RTL8187vB (default) V1 + rtl8225z2, rfkill mask 2
 1092.761158] rtl8187: Customer ID is 0xFF
 1092.761524] rtl8187: wireless switch is on
 1094.589772] IPv6: ADDRCONF(NETDEV_UP): wlp0s20u3: link is not ready
 1094.712550] usb 3-3: USB disconnect, device number 32
 1095.436051] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC=33:33:00:00:00:fb:34:a3:95:b5:3e:27:86:dd SRC=fe80:0000:0000:0000:0c38:2673:ad48:e011 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=97 TC=0 HOPLIMIT=255 FLOWLBL=275456 PROTO=UDP SPT=5353 DPT=5353 LEN=57 
 1095.593297] usb 3-3: new high-speed USB device number 33 using xhci_hcd

ifconfig output for wlp0s20u3:

wlp0s20u3 Link encap:Ethernet  Hardware Adresse 00:C0:CA:7F:12:52  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenlänge:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Any further idea on this?

I missed your statement about this being openSUSE 13.2 RC1. This should have been posted in our Pre-Release/Beta forum.

As I wrote, the same error also occured on OpenSuse 13.1.

I’ve never read of anything like the problem you descibe. It appears in 'ifconfig output, but NM can’t access it, right?

Post output from

/etc/NetworkManager/NetworkManager.conf

Further to this, try invoking

ifdown wlp0s20u3
ifup wlp0s20u3

If this device is controlled via NM, you should see the following reported

Network is managed by 'NetworkManager.service' -> skipping

/etc/NetworkManager/NetworkManager.conf:

[main]
plugins=ifcfg-suse,keyfile

I get the following output:

Network is managed by 'NetworkManager.service' -> skipping

Besides of this, I would be thankful if anyone could explain me what this output appearing in the dmesg log is about:

   99.236364] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC= SRC=fe80:0000:0000:0000:a6db:30ff:fe24:e398 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=258 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=218 
   99.236412] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC= SRC=fe80:0000:0000:0000:a6db:30ff:fe24:e398 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=84 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=44 
   99.243637] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC= SRC=fe80:0000:0000:0000:a6db:30ff:fe24:e398 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=430 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=390 
   99.494578] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC= SRC=fe80:0000:0000:0000:a6db:30ff:fe24:e398 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=430 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=390 
   99.745655] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC= SRC=fe80:0000:0000:0000:a6db:30ff:fe24:e398 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=430 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=390 
  130.291232] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC= SRC=fe80:0000:0000:0000:a6db:30ff:fe24:e398 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=84 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=44 
  158.347677] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC=33:33:00:00:00:fb:34:31:c4:34:a3:56:86:dd SRC=fe80:0000:0000:0000:3631:c4ff:fe34:a356 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=82 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=42 
  162.350075] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC= SRC=fe80:0000:0000:0000:a6db:30ff:fe24:e398 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=84 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=44 

Thanks.

Okay, they both check out as expected.

Besides of this, I would be thankful if anyone could explain me what this output appearing in the dmesg log is about:

   99.236364] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC= SRC=fe80:0000:0000:0000:a6db:30ff:fe24:e398 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=258 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=218 
   99.236412] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC= SRC=fe80:0000:0000:0000:a6db:30ff:fe24:e398 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=84 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=44 
   99.243637] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC= SRC=fe80:0000:0000:0000:a6db:30ff:fe24:e398 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=430 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=390 
   99.494578] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC= SRC=fe80:0000:0000:0000:a6db:30ff:fe24:e398 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=430 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=390 
   99.745655] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC= SRC=fe80:0000:0000:0000:a6db:30ff:fe24:e398 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=430 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=390 
  130.291232] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC= SRC=fe80:0000:0000:0000:a6db:30ff:fe24:e398 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=84 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=44 
  158.347677] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC=33:33:00:00:00:fb:34:31:c4:34:a3:56:86:dd SRC=fe80:0000:0000:0000:3631:c4ff:fe34:a356 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=82 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=42 
  162.350075] SFW2-INext-DROP-DEFLT IN=wlp7s0 OUT= MAC= SRC=fe80:0000:0000:0000:a6db:30ff:fe24:e398 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=84 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=44 

Thanks.

You’re better to start a separate thread for this. Nothing to do with your usb device. Howver, they are suse firewall messages related to avahi broadcasts (port 5353) with IPv6 addresses. The source address is a link-local address. The destination address is a special IPv6 address used for mDNS multicasting AFAIU. So you have IPv6 enabled, but not configured. IMHO, not worth worrying about.

The repetitive usb disconnects and associated ‘link is not ready’ messages are concerning and explain the reason the device can’t be configured. This has been reported elsewhere too:

http://en.data-alliance.net/alfa-awus036h-power-problem-fix-realtek-rtl8187l-chipset/
http://ubuntuforums.org/showthread.php?t=2037552&p=12159812#post12159812

On balance, I think you’d be wise to buy a different deivce and move on.

That’s really a good hint, thanks for that.

The strange thing is that it worked without any problems when I was using another distro (I think it was Linux Mint Debian). The only possible explanation for this is that the other distro used another kernel, which forced my computer to supply the neccessary power to the device, isn’t it? If that would be possible for the kernel (I don’t know about that), then couldn’t I solve the problem by either giving certain parameters during the boot process or by compiling a new one which does so?

I will try out setting some parameters as described here:

https://wiki.archlinux.org/index.php/Power_saving#USB_autosuspend

After hours of trying out all kinds of things (especially disabling USB auto-suspend) I finally found a solution which is more than simple:

http://ubuntuforums.org/showthread.php?t=2238461

Instead of the +1m USB cable supplied with the device I just plugged in a short one and the device is working without any problems since then. Maybe a good advice for anyone experiencing similar problems.

Thanks for the update. I’m surprised the 1m cable would be contributung to the loss, but these devices do seem to be greedy on power. Maybe the connection was a little ohmic.