Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB Wifi RTL8192 Caues Kernel CRASH/PANIC
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Carlos87
n00b
n00b


Joined: 21 Aug 2016
Posts: 10

PostPosted: Sun Mar 12, 2017 10:23 am    Post subject: USB Wifi RTL8192 Caues Kernel CRASH/PANIC Reply with quote

Dear Gurus,

I am running a hardened kernel 4.8.17 and my USB wifi doggle is causing freeze. If I run '/etc/init.d/net.enp4s0f0 start' then no problem, its only when I attempt to run '/etc/init.d/net.wlp0s20u1 start' that everything freezes. I tried booting with wlp0s20u1 as default and the system freezes but no issues with enp4s0f0. I've been running gentoo for years with this USB wifi doggle. Its only after I decided to do a fresh install about 6 months ago that this problem started. The hardward has not changed and I compiled the kernel along with the same packages. Only change I see are a few kernel and package upgrades.

Code:
carlos@gentoo ~ $ lsusb | grep Edimax
Bus 001 Device 002: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

Code:
carlos@gentoo ~ $ sudo dmesg | grep rtl
[    2.036966] usbcore: registered new interface driver rtl8192cu
[    3.466824] rtl8192cu: Chip version 0x10
[    3.499134] rtl8192cu: Board Type 0
[    3.499445] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[    3.499718] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[    3.500111] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[    3.500260] usb 1-1: Direct firmware load for rtlwifi/rtl8192cufw_TMSC.bin failed with error -2
[    3.500527] usb 1-1: Direct firmware load for rtlwifi/rtl8192cufw.bin failed with error -2
[    3.500861] rtlwifi: Loading alternative firmware rtlwifi/rtl8192cufw.bin
[    3.501267] rtlwifi: Firmware rtlwifi/rtl8192cufw_TMSC.bin not available
[   25.477866] rtl8192cu 1-1:1.0 wlp0s20u1: renamed from wlan0

I haven't even been able to get ifconfig to show wlp0s20u1. As soon as I try the system freezes up.

I'm willing to give more info if people think this is useful, but would like to start with this.

Many thanks in advance.
Carlos
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54827
Location: 56N 3W

PostPosted: Sun Mar 12, 2017 10:31 am    Post subject: Reply with quote

Carlos87,

It looks like you have some firmware missing.
Code:
[    3.501267] rtlwifi: Firmware rtlwifi/rtl8192cufw_TMSC.bin not available
Its provided in linux-firmware.

Its not clear from your dmesg snippet if rtl8192cu is built in or a module.
If its built in, the firmware must be built into the kernel too. If its a module, the firmware needs to be in /lib/firmware.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Carlos87
n00b
n00b


Joined: 21 Aug 2016
Posts: 10

PostPosted: Sun Mar 12, 2017 4:18 pm    Post subject: Reply with quote

Thank you for your quick reply.

Here is my built in firmware:
Code:
grep RTL /usr/src/linux-4.8.17-hardened-r2/.config
CONFIG_BT_RTL=y
CONFIG_BT_HCIBTUSB_RTL=y
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_RTL8152 is not set
# CONFIG_RTL8180 is not set
# CONFIG_RTL8187 is not set
CONFIG_RTL_CARDS=y
# CONFIG_RTL8192CE is not set
# CONFIG_RTL8192SE is not set
# CONFIG_RTL8192DE is not set
# CONFIG_RTL8723AE is not set
# CONFIG_RTL8723BE is not set
# CONFIG_RTL8188EE is not set
# CONFIG_RTL8192EE is not set
# CONFIG_RTL8821AE is not set
CONFIG_RTL8192CU=y
CONFIG_RTLWIFI=y
CONFIG_RTLWIFI_USB=y
CONFIG_RTLWIFI_DEBUG=y
CONFIG_RTL8192C_COMMON=y
# CONFIG_RTL8XXXU is not set
# CONFIG_SERIAL_UARTLITE is not set
# CONFIG_IBM_RTL is not set

At one point I even tried setting up linux-firmware and was able to get this :

Code:
[    3.501267] rtlwifi: Firmware rtlwifi/rtl8192cufw_TMSC.bin not available


to go away but that did not work so I went back to my original setup. The original setup worked 6 months ago so I am very confused.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54827
Location: 56N 3W

PostPosted: Sun Mar 12, 2017 4:36 pm    Post subject: Reply with quote

Carlos87,

Please put your entire kernel .config file onto a pastebin. wgetpaste can help.

Wifi drivers are in at least two parts.
You must have all the pieces you need either on the root filesystem or built into the kernel.
Mixing won't work.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Sun Mar 12, 2017 4:40 pm    Post subject: Reply with quote

You showed the drivers built into the kernel, not the firmware.

To insert firmware into the kernel for builtin drivers, you need to goto

Quote:
Device Drivers --->
Generic Driver Options --->
-*- Userspace firmware loading support
[*] Include in-kernel firmware blobs in kernel binary
(....)
(/lib/firmware) Firmware blobs root directory

This is where you list all the firmware to be included into the kernel.

There is a difference when building a driver as a module or as a built-in. Modules will have a 'M' next to it, and the kernel will load the kernel as it is needed, and attempt to load any firmware that driver needs from your filesystem. A built-in driver will have a '*' next to it, and that driver is available immediately, however the kernel has no way to load any firmware that is not directly built into the kernel. Having it as a module is generally recommended as it is significantly easier to handle as you don't need to worry about the firmware files (as long as it is on your system in the usual places).
Back to top
View user's profile Send private message
Carlos87
n00b
n00b


Joined: 21 Aug 2016
Posts: 10

PostPosted: Sun Mar 12, 2017 7:01 pm    Post subject: Reply with quote

Here is the link to the .config:

http://pastebin.com/aPNL4jA3
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54827
Location: 56N 3W

PostPosted: Sun Mar 12, 2017 7:49 pm    Post subject: Reply with quote

Carlos87,

You have
Code:
CONFIG_RTLWIFI=y
thats built into the kernel.
But
Code:
CONFIG_EXTRA_FIRMWARE=""

So your firmware is not available when the rtlwifi driver is initialised.

With built in drivers, you must build the firmware into the kernel too.
With modular drivers, the firmware must be in /lib/firmware.

ct85711 has described the fix.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Carlos87
n00b
n00b


Joined: 21 Aug 2016
Posts: 10

PostPosted: Sun Mar 12, 2017 11:31 pm    Post subject: Reply with quote

I had already tried building in the firmware into the kernel and the problem continued. I decided to give it another go and recompile the kernel again with built in firmware as suggested. Once again the problem remains but I am hoping you guys will be able to see something I missed. Again thank you for your help.

Here is the new config:

http://pastebin.com/yPiDRNiN

And this is dmseg showing the prior error about missing firmware is gone:
Code:

[    2.051405] usbcore: registered new interface driver rtl8192cu
[    3.531956] rtl8192cu: Chip version 0x10
[    3.564195] rtl8192cu: Board Type 0
[    3.564273] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[    3.564297] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[    3.564352] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[   20.539729] rtl8192cu 1-1:1.0 wlp0s20u1: renamed from wlan0
Back to top
View user's profile Send private message
Carlos87
n00b
n00b


Joined: 21 Aug 2016
Posts: 10

PostPosted: Mon Mar 13, 2017 12:03 am    Post subject: Reply with quote

A KEY point that should not be overlooked is that under the first kernel (with out the firmware built in) there was no problem 6 months ago.
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Mon Mar 13, 2017 12:19 am    Post subject: Reply with quote

Quote:
[ 20.539729] rtl8192cu 1-1:1.0 wlp0s20u1: renamed from wlan0


This indicates it's working, and you more of not using the wrong interface name. This line says your wireless is called wlp0s20u1 that's due to presistant naming (which is misleading, as it does renumber the devices anyways).
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3456
Location: Gainesville, Florida

PostPosted: Mon Mar 13, 2017 2:57 pm    Post subject: Reply with quote

Just noticed this in the newly released 4.10.2, which may or may not help your usb dongle.:

Quote:
Larry Finger (1):
rtlwifi: rtl8192c-common: Fix "BUG: KASAN:

Also, if you prefer, the easiest way avoid the interface renaming is to put net.ifnames=0 on your kernel line.
See: https://forums.gentoo.org/viewtopic-t-955646.html

Quote:
net.ifnames=1 is the default, as in, enabled, net.ifnames=0 you can set in kernel command line to disable the new names.


When the new naming scheme was introduced, I didn't care for it very much, so I've always used the kernel line net.ifnames=0 on all my systems.

For me, on many basic multi-boot desktop systems I never ran into any problems doing so, I just prefer the old wlan0 and eth0 names.
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.40-r5, gcc-14
kernel-6.12.8 USE=experimental python3_12.7-final-0


Last edited by wrc1944 on Sun Mar 19, 2017 1:41 am; edited 2 times in total
Back to top
View user's profile Send private message
Carlos87
n00b
n00b


Joined: 21 Aug 2016
Posts: 10

PostPosted: Mon Mar 13, 2017 9:13 pm    Post subject: Reply with quote

It's still not working. As soon as I try and run '/etc/init.d/net.wlp0s20u1 start' kernel panics. :cry:
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54827
Location: 56N 3W

PostPosted: Tue Mar 14, 2017 9:01 am    Post subject: Reply with quote

Carlos87,

What is the panic text, if you can see it?
Its a human readable line that says what happened.
The register dump is only useful to kernel devs.

A photo of the panic on the console may be useful.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Carlos87
n00b
n00b


Joined: 21 Aug 2016
Posts: 10

PostPosted: Sat Mar 25, 2017 9:45 am    Post subject: Reply with quote

The system continues to freeze up before any messages even appear
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum