Wireless breaks on occasions

Hello!

I have an older Toshiba A210 laptop with Realtek 8187b wireless:

Bus 001 Device 003: ID 0bda:8197 Realtek Semiconductor Corp. RTL8187B Wireless Adapter

This chip is supported by the Linux kernel 2.6.27 and if the installer doesn’t install some firmware by itself it doesn’t require it. It works OOTB after installation, I didn’t have to install anything.

The problem is this:
It occasionally disconnects and cannot connect again. It doesn’t even scan for networks, either in the NetworkManager and iwlist wlan0 scan.

I run openSuse 11.4 with KDE 4.6, but this issue was present in openSuse 11.3 with either KDE 4.4 and 4.5.

There are two ways to reproduce it (I know about):

  1. Open anything that’s related to webcam (open Kopete settings, start Cheese):
Bus 001 Device 005: ID 04f2:b008 Chicony Electronics Co., Ltd USB 2.0 Camera
  1. Plug in a MP3 player via USB (it behaves like a standard USB stick) and start Amarok. Amarok segfaults and wifi breaks. Running Audacious and playing music from the MP3 player is fine.

Reproducible: always

Here’s what I’ve been able to find out about it:

NetworkManager log (/var/log/NetworkManager)

Apr  8 15:30:48 Laptop NetworkManager[1273]: <info> WiFi now disabled by radio killswitch
Apr  8 15:30:48 Laptop NetworkManager[1273]: <info> (wlan0): device state change: 8 -> 2 (reason 0)
Apr  8 15:30:48 Laptop NetworkManager[1273]: <info> (wlan0): deactivating device (reason: 0).
Apr  8 15:30:48 Laptop NetworkManager[1273]: <info> (wlan0): canceled DHCP transaction, DHCP client pid 2085
Apr  8 15:30:48 Laptop nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/autofs' exited with error status 1.

dmesg:

  153.712036] rtl8187: wireless radio switch turned off
  153.712144] wlan0: deauthenticating from d8:5d:4c:d8:b3:4c by local choice (reason=3)
  153.750112] cfg80211: Calling CRDA to update world regulatory domain
  153.757134] cfg80211: World regulatory domain updated:
  153.757140] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
  153.757143] cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
  153.757147] cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
  153.757150] cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
  153.757153] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
  153.757156] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
  155.706071] uvcvideo: Failed to set UVC commit control : -108 (exp. 26).
  155.706078] uvcvideo 1-8:1.1: resume error -5

ifconfig (note that wlan0 is missing):

eth0      Link encap:Ethernet  HWadr 00:A0:D1:96:85:76  
          AKTIVOVÁNO VŠESMĚROVÉ_VYSÍLÁNÍ MULTICAST  MTU:1500  Metrika: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 délka odchozí fronty:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Přerušení:43 Vstupně/Výstupní port:0x6000 

lo        Link encap:Místní smyčka  
          inet adr:127.0.0.1 Maska:255.0.0.0
          AKTIVOVÁNO SMYČKA BĚŽÍ  MTU:16436  Metrika:1
          RX packets:106 errors:0 dropped:0 overruns:0 frame:0
          TX packets:106 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 délka odchozí fronty:0 
          RX bytes:9224 (9.0 Kb)  TX bytes:9224 (9.0 Kb)

ifconfig wlan0 up:

Laptop:/home/tadeas # ifconfig wlan0 up                                                                                                                                             
SIOCSIFFLAGS: Neznámá chyba 132 

(i.e. Unknown error 132, sorry for the Czech)

After I try ifconfig wlan0 up (or ifup wlan0), nothing new appears in either NM log, dmesg or /var/log/messages.

You might note that the logs say “WiFi now disabled by radio killswitch”. But it has not, I haven’t touched the switch and the light on it is still on. Manually disabling it and re-enabling it doesn’t help.

Restarting the NM doesn’t help. I’ve tried to remove and again modprobe the rtl8187 kernel module, but it doesn’t help.

I can provide any additional informations given that the issue is reproducible.

Any ideas about what’s wrong and how to fix it?
Thanks in advance! :slight_smile:

I think you are hitting a bug in either the USB system or the special Toshiba
code - most likely toshiba_acpi. Once rfkill thinks the wireless switch is off,
driver rtl8187 cannot proceed. From the dmesg output, rtl8187 is being told the
switch is off.

You might try


sudo /sbin/modprobe -rv toshiba_acpi

If that module will unload, that may break a number of other things like cpu
throttling, etc. Watch the machine carefully.

You should report the problem with Amarok to the openSUSE bugzilla. I suspect a
kernel problem that will likely need upstream fixing, but that will get the
process started.

Thank you for the quick reply!

I can unload toshiba_acpi, but I cannot modprobe it again:
FATAL: Error inserting toshiba_acpi (/lib/modules/2.6.38-30-desktop/kernel/drivers/platform/x86/toshiba_acpi.ko): No such device

It’s strange that unloading toshiba_acpi didn’t do anything, I can still adjust CPU speed with cpufreq-set, I can use the Fn keys…

I’ve reported a bug against Kernel, because the Amarok issue is only triggering a USB related problem.
https://bugzilla.novell.com/show_bug.cgi?id=686439
I hope I’ve included all required info :slight_smile:

Anyway, thank you for your help, now it’s up to the maintainers/developers/whoever takes care about the bug reports.

EDIT: So the laptop doesn’t use toshiba_acpi at all - it’s not in lsmod after a restart.

On 04/09/2011 04:36 AM, tmoravec wrote:
>
> Thank you for the quick reply!
>
> I can unload toshiba_acpi, but I cannot modprobe it again:
> FATAL: Error inserting toshiba_acpi
> (/lib/modules/2.6.38-30-desktop/kernel/drivers/platform/x86/toshiba_acpi.ko):
> No such device
>
> It’s strange that unloading toshiba_acpi didn’t do anything, I can
> still adjust CPU speed with cpufreq-set, I can use the Fn keys…
>
> I’ve reported a bug against Kernel, because the Amarok issue is only
> triggering a USB related problem.
> https://bugzilla.novell.com/show_bug.cgi?id=686439
> I hope I’ve included all required info :slight_smile:
>
> Anyway, thank you for your help, now it’s up to the
> maintainers/developers/whoever takes care about the bug reports.
>
> EDIT: So the laptop doesn’t use toshiba_acpi at all - it’s not in lsmod
> after a restart.

That was a guess on my part.

Are you plugging into your main usb ports or into a hub? It sounds to me like you may be drawing too much power from an unpowered usb hub and cutting the other things off.

I understand that and thank you nonetheless. In fact I suppose that if anybody knew what’s going on I’d find it on Google, so I’m asking for guesses :slight_smile: .

I plug it into a standard external USB port, those on a case of the laptop.
Yes, this has actually occured me too, that I might take too much power from other USB devices. But why then does it work fine in Dolphin and why does Amarok break it?

Anyway, what takes care about the power usage of USB ports? Does the laptop manage it “itself” or is the kernel (some driver) responsible for it?

On 04/09/2011 04:06 PM, tmoravec wrote:
> Anyway, what takes care about the power usage of USB ports? Does the
> laptop manage it “itself” or is the kernel (some driver) responsible for
> it?

That is handled by the hardware, not the driver. If a device tries to draw too
much power, I expect the voltage will drop.