Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with installing rtl8192cu fixed driver using dkms
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
stormblade
n00b
n00b


Joined: 06 Sep 2017
Posts: 65

PostPosted: Mon Dec 04, 2017 11:53 am    Post subject: Problem with installing rtl8192cu fixed driver using dkms Reply with quote

I'm currently having much trouble with trying to make the rtl8192cu driver work with Asus N10 usb wifi adapter. After trying some methods with an ebuild (https://is.gd/neI3XH) and not being able to make this work after successful emerge, I decided to try dkms like here: (https://is.gd/O6ZGXb). And got the driver installed, the modprobe was successful and so on. So everything seemed fine until I realised that I forgot to include some important options in the kernel regarding usb devices, therefore my adapter wasn't recognized by the kernel. So I went for the recompile, and now the adapter is correctly shown with lsusb, but now its's something wrong with dkms. After I dkms install 8192cu/1.10 I get an error: build of 8192cu/1.10 failed for <kernel_name>. And nothing more important seems to be in the log. Is my new kernel the root of the problem? If yes, what exact options may help? I haven't saved the previous config where dkms was working, sadly
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Dec 04, 2017 12:12 pm    Post subject: Reply with quote

stormblade,

Lets start at the very beginning.

What does lsusb show for your Asus N10 usb wifi adapter?
The marketing info is not useful.

Put
Code:
lsusb -vvv
onto a pastebin with your usual arrangement of USB devices.
Often high bus powered devices don't work because together with other devices, they overload the bus.
This will allow your power tree to be checked.
Rearranging the USB tree can often address this.

Once we know the hardware inside your device and the setup is not violating the USB bus power rules, its worth looking at drivers.
_________________
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
stormblade
n00b
n00b


Joined: 06 Sep 2017
Posts: 65

PostPosted: Mon Dec 04, 2017 12:28 pm    Post subject: Reply with quote

NeddySeagoon,
Here it is https://paste.pound-python.org/show/srKbwTlRgAIzbiYAEmVE/
The first usb device there is the one I use to boot into sysresccd and chroot into my system
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Dec 04, 2017 1:02 pm    Post subject: Reply with quote

stormblade,

From the top down ..
Code:
Bus 002 Device 002: ID 8564:1000 Transcend Information, Inc. JetFlash
 MaxPower              126mA

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    MaxPower                0mA

Bus 001 Device 004: ID 0bda:b009 Realtek Semiconductor Corp.
    MaxPower              500mA

Bus 001 Device 003: ID 05c8:03ab Cheng Uei Precision Industry Co., Ltd (Foxlink)
    MaxPower              500mA

Bus 001 Device 002: ID 0b05:17ba ASUSTek Computer, Inc. N10 Nano 802.11n Network Adapter [Realtek RTL8192CU]
    MaxPower              500mA

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    MaxPower                0mA


A USB 3 root hub can provide 900mA for all connected devices. Your Bus 002 has a load of 126mA so that's good.

A USB 2 root hub can provide 500mA for all connected devices. Your bus 001 has 1500mA connected, that's bad.
However, overloaded USB buses can do one of several things.
a) nothing at all until the copper on the printed circuit fails.
b) shut down the root hub so nothing on that root hub works
c) load shedding by shutting down selected devices, so some devices work.

Step 1 is to move your N10 Nano 802.11n Network Adapter onto the USB 3 bus.
The webcam is probably internal, so you can't move that.

USB device 0b05:17ba has been in the kernel a long time. Grepping for the device ID

Code:
grep -R -i 17ba /usr/src/linux
..
/usr/src/linux/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:{USB_DEVICE_AND_INTERFACE_INFO(0x0b05, 0x17ba, 0xff, 0xff, 0xff),
/usr/src/linux/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c:   {RTL_USB_DEVICE(0x0b05, 0x17ba, rtl92cu_hal_cfg)}, /*ASUS-Edimax*/
..
I've got one of those, works for me.

Make it as a module,
Code:
emerge linux-firmware
modprobe rtlwifi

and have a look at the errors at the end of dmesg

Once it works, it can be built in if you want.
_________________
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
stormblade
n00b
n00b


Joined: 06 Sep 2017
Posts: 65

PostPosted: Mon Dec 04, 2017 1:39 pm    Post subject: Reply with quote

NeddySeagoon,

Considering the grep -R -i 17ba /usr/src/linux command:
The output is there: https://paste.pound-python.org/show/aVPpgeKFiCzGOmZdLdyi/
And rtlwifi is already listed in lsmod

As for the lsusb -vvv after moving the adapter onto another bus: https://paste.pound-python.org/show/Y5XtLKU3oxNGZ1ozi3bl/

p.s. Doing everything in the chroot environment on the livecd as I have no network to paste anything from the installed system 8O
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5934

PostPosted: Tue Dec 05, 2017 5:03 am    Post subject: Reply with quote

If this is the same realtek chip in the asus PCE-N15, I couldn't get mine to work for less than 30 seconds. I just figured it was a junk chip, and went with an atheros based card. :?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Dec 05, 2017 9:52 am    Post subject: Reply with quote

stormblade,

In the installed system, save things to files then pastebin the files from the liveCD.
I'm fairly sure the liveCD provides wgetpaste.
If not, systemrescueCD does and thats Gontee based too.

SystemRescueCD probably supports your wireless and it gives you a GUI too.
It runs from USB or optical media.
_________________
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
stormblade
n00b
n00b


Joined: 06 Sep 2017
Posts: 65

PostPosted: Tue Dec 05, 2017 12:27 pm    Post subject: Reply with quote

NeddySeagoon,
grep -R -i 17ba /usr/src/linux:
https://paste.pound-python.org/show/ZDBhUxwNTmSummzUlj95/
lsusb -vvv:
https://paste.pound-python.org/show/3MaZxees0x2xTQxCkz9X/

bunder wrote:
If this is the same realtek chip in the asus PCE-N15, I couldn't get mine to work for less than 30 seconds. I just figured it was a junk chip, and went with an atheros based card. :?

In my case, wifi in the sysresccd is also working unstable, I need to reconnect quite often due to loss of connection (it's shown that I am connected, but in fact nothing works)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Dec 05, 2017 12:42 pm    Post subject: Reply with quote

stormblade,

Bunder probably got it right then. Sysresccd is noted for its wireless support.

The dmesg from Sysresccd after several reconnects would be good though.
_________________
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
stormblade
n00b
n00b


Joined: 06 Sep 2017
Posts: 65

PostPosted: Tue Dec 05, 2017 12:50 pm    Post subject: Reply with quote

NeddySeagoon wrote:
stormblade,

Bunder probably got it right then. Sysresccd is noted for its wireless support.

The dmesg from Sysresccd after several reconnects would be good though.

I guess that if I could make the fixed rtl8192cu driver work, the problem with unstable connection would have been solved too. As far as I am concerned, the original rtl8192cu driver is actually broken
Back to top
View user's profile Send private message
stormblade
n00b
n00b


Joined: 06 Sep 2017
Posts: 65

PostPosted: Tue Dec 05, 2017 12:57 pm    Post subject: Reply with quote

dmesg in sysresccd:
wlp0s20f0u1 is the name of the desired interface
https://paste.pound-python.org/show/afl2cn1ac9B9m94QHJDu/
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Dec 05, 2017 1:52 pm    Post subject: Reply with quote

stormblade,

Code:
[ 2205.564722] wlp0s20f0u1: deauthenticating from 58:6d:8f:d7:75:fe by local choice (Reason: 3=DEAUTH_LEAVING)

That means you told it to drop the link.

Power management maybe?

You can't fix that on System Rescue CD but you may be able to on your own kernel.

Importantly, here there are no signs of the interface being stuck in a
Code:
[  324.945380] wlp0s20f0u1: authenticated
...
[  325.071608] wlp0s20f0u1: associated
[  325.071617] IPv6: ADDRCONF(NETDEV_CHANGE): wlp0s20f0u1: link becomes ready
[ 2205.564722] wlp0s20f0u1: deauthenticating from 58:6d:8f:d7:75:fe by local choice (Reason: 3=DEAUTH_LEAVING)

loop, which happens when several apps are fighting over interface control.
That's a very popular reason for WiFi not working.

Is it any better if you disable Bluetooth?
Bluetooth and WiFi don't always get along. They both operate in the same 2.4GHz band.
_________________
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
stormblade
n00b
n00b


Joined: 06 Sep 2017
Posts: 65

PostPosted: Tue Dec 05, 2017 1:58 pm    Post subject: Reply with quote

NeddySeagoon wrote:
stormblade,

Code:
[ 2205.564722] wlp0s20f0u1: deauthenticating from 58:6d:8f:d7:75:fe by local choice (Reason: 3=DEAUTH_LEAVING)

That means you told it to drop the link.

Power management maybe?

Yep, I dropped the connection manually, because after some time of wifi working properly I just can't connect to anything (despite the fact that the connection isn't dropped yet). So I reconnect manually

power management may also be an issue, however I don't understand what is the exact problem with power management
https://forums.gentoo.org/viewtopic-p-7647564.html (second post)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Dec 05, 2017 2:15 pm    Post subject: Reply with quote

stormblade,

When the link fails, do you still have a route and an IP address?
Code:
ifconfig -a
route


Maybe dhcpcd did not renew your lease. The Wifi would still be up, that is, authenticated and associated but Ethernet over the radio link would not.

If your settings have vanished does
Code:
dhcpcd wlp0s20f0u1
make it work again?
That gets you a new lease without resetting the WiFi bits and pieces.

This will help indicate what has broken.
_________________
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
stormblade
n00b
n00b


Joined: 06 Sep 2017
Posts: 65

PostPosted: Tue Dec 05, 2017 3:25 pm    Post subject: Reply with quote

NeddySeagoon wrote:
stormblade,

When the link fails, do you still have a route and an IP address?
Code:
ifconfig -a
route


Maybe dhcpcd did not renew your lease. The Wifi would still be up, that is, authenticated and associated but Ethernet over the radio link would not.

If your settings have vanished does
Code:
dhcpcd wlp0s20f0u1
make it work again?
That gets you a new lease without resetting the WiFi bits and pieces.

This will help indicate what has broken.


After the link fail, I have the following:
https://paste.pound-python.org/show/v0iZAmxvQwnzk5MAzHgO/

However, I still needed to reconnect manually in order to connect anywhere on the net
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Dec 05, 2017 6:43 pm    Post subject: Reply with quote

stormblade,

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     0.0.0.0         UG    600    0        0 wlp0s20f0u1
link-local      0.0.0.0         255.255.0.0     U     303    0        0 wlp0s20f0u1
192.168.1.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp0s20f0u1


That link-local entry should not be there. It indicates that dhcpcd tried to set up the link after the WiFi bits worked but that there was no response from the dhcp server (your router)
I can only guess at the cause. An overly aggressive timeout maybe?
_________________
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
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5934

PostPosted: Tue Dec 05, 2017 9:42 pm    Post subject: Reply with quote

just to clarify, my use case for this chip was to use it for host AP. i had hostapd and dhcpd working, and i could connect for a while (~15 minutes) after the system was up, then traffic would stop flowing (30-60 seconds). eventually i couldn't connect to the network anymore unless i rebooted the router machine, restarting the interface or hostapd/dhcpd wouldn't do anything useful. then it just stopped broadcasting the SSID altogether. so i went to the store and bought an atheros card, worked first time and every time, even with 60 days uptime.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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