# [Solved] D-Link DWA-131/RTL8192SU Driver Problems

## thegamerdude23

Hello,

I have been using Gentoo for a while now and I have been getting network by bridging my MacBook's wifi through ethernet but I want the PC to become independent of the Mac, so I am going to try to use a D-Link usb wifi adapter. The model is dwa-131 and it is a rtl8192su chip. I am having lots of trouble getting this little device to work with Gentoo. It works flawlessly with Windows. I actually remember getting it to work with Ubuntu once but I can't get it working with Gentoo. I have downloaded the rtl8192su driver source code from realtek's website and compiled it. I have it showing up in iwconfig. Here is the output:

```
iwconfig wlan0

wlan0     unassociated  Nickname:"rtl_wifi"

          Mode:Auto  Access Point: Not-Associated   Sensitivity:0/0  

          Retry:off   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality:0  Signal level:0  Noise level:0

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
```

Are there problems with the output above?

Here is the output of lsmod:

```
lsmod

Module                  Size  Used by

nvidia              10071837  38 

8712u                 316381  0 

```

Here is the output of lsusb:

```
lsusb

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

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 002 Device 004: ID 07d1:3303 D-Link System DWA-131 802.11n Wireless N Nano Adapter(rev.A1) [Realtek RTL8192SU]

Bus 006 Device 002: ID 046d:c223 Logitech, Inc. G11/G15 Keyboard / USB Hub

Bus 006 Device 003: ID 1532:0016 Razer USA, Ltd 

Bus 006 Device 004: ID 046d:c226 Logitech, Inc. G15 Refresh Keyboard

Bus 006 Device 005: ID 046d:c227 Logitech, Inc. G15 Refresh Keyboard
```

When running 'ifconfig wlan0 up', the entire computer freezes and requires a reset to resume functionality. Can anyone help me solve this?

Thanks,

Joey

----------

## cach0rr0

you happen to snag the firmware blob for this card along with the driver? 

Found: http://svn.debian.org/wsvn/kernel/dists/trunk/firmware-nonfree/realtek/RTL8192SU/

Could try dumping this into /lib/firmware, rebooting, see if you can bring the card up:

http://svn.debian.org/wsvn/kernel/dists/trunk/firmware-nonfree/realtek/RTL8192SU/rtl8192sfw.bin

----------

## thegamerdude23

 *cach0rr0 wrote:*   

> you happen to snag the firmware blob for this card along with the driver? 
> 
> Found: http://svn.debian.org/wsvn/kernel/dists/trunk/firmware-nonfree/realtek/RTL8192SU/
> 
> Could try dumping this into /lib/firmware, rebooting, see if you can bring the card up:
> ...

 

I think I grabbed the one from portage but I'll try this one.

----------

## cach0rr0

 *thegamerdude23 wrote:*   

> 
> 
> I think I grabbed the one from portage but I'll try this one.

 

ill be damned. i didnt even realize we had it in portage 

in that case, i dont imagine it'll gain you anything - and I haven't further ideas unfortunately

----------

## thegamerdude23

 *cach0rr0 wrote:*   

>  *thegamerdude23 wrote:*   
> 
> I think I grabbed the one from portage but I'll try this one. 
> 
> ill be damned. i didnt even realize we had it in portage 
> ...

 

I still haven't tried it but this really sucks. I don't really want to switch distro's because I love Gentoo and this is the only problem I haven't been able to fix on my own. Is there anything else I can do? The main reason I want to do this because my router isn't letting me host a minecraft server when my PC is connected through a bridged network on my MacBook. I figured the easiest way around it would be to get a direct connection to the router from a USB wifi device. I would plug the ethernet into my router but its all the way downstairs so that isn't an option. Could it be my kernel? I am running the stable x86_64 from portage, 2.6.36-gentoo-r8.

----------

## cach0rr0

kernel is kernel is kernel, regardless of distro, exception being any distro-specific patches (or external patchsets you may use)

just had a thought; the core of this seems to be that, although there is an 8192SU driver in the kernel's staging section, your specific model 8192 isn't included

```

Symbol: RTL8192SU [=n]

  │ Type  : tristate

  │ Prompt: RealTek RTL8192SU Wireless LAN NIC driver

  │   Defined at drivers/staging/rtl8192su/Kconfig:1

  │   Depends on: STAGING [=n] && !STAGING_EXCLUDE_BUILD [=n] && PCI [=y] && WLAN [=n] && USB [=y]

  │   Location:

  │     -> Device Drivers

  │       -> Staging drivers (STAGING [=n])

  │         -> Exclude Staging drivers from being built (STAGING_EXCLUDE_BUILD [=n])

  │   Selects: WIRELESS_EXT [=n] && WEXT_PRIV [=n] && EEPROM_93CX6 [=n] && CRYPTO [=y]

```

And from digging through the source, it *does* look to support your  model 

```

ricker rtl8192su # pwd

/usr/src/linux/drivers/staging/rtl8192su

ricker rtl8192su # grep -r 0x3303 *

r8192U_core.c:  {USB_DEVICE(0x07d1, 0x3303)},

```

This is true as of the kernel version I'm checking, 2.6.36-zen1 (zen-sources shouldn't have any staging drivers the regular sources don't)

Reports on the Ubuntu forums are that the staging driver actually works quite well - http://ubuntuforums.org/showthread.php?t=1522815

SO...what i would do:

-remove the driver from the realtek site completely. I do not know the correct procedure from this, but the Makefile seems to hint you can simply do "make uninstall" 

-go back, reconfigure your kernel, build the rtl8192su staging driver; again, if you get stuck here, give a shout, should be able to help

-you will still need the firmware blob, so if you've done any messing with that, just re-merge that package

-at this point you should be able to modprobe rtl8192su, wlan0 should show up, see if you can do ifconfig wlan0 up without a freeze; if so, I'd imagine wpa_supplicant and the other usual tools should work fine

----------

## thegamerdude23

 *cach0rr0 wrote:*   

> kernel is kernel is kernel, regardless of distro, exception being any distro-specific patches (or external patchsets you may use)
> 
> just had a thought; the core of this seems to be that, although there is an 8192SU driver in the kernel's staging section, your specific model 8192 isn't included
> 
> ```
> ...

 

Thanks for your support man. I really appreciate it. I was about to drive myself insane. I am going to try this and post back if it works. Your research leads me to believe that it will.

----------

## thegamerdude23

Thank you so much man it worked perfect. All I had to do was remove all the other drivers I installed and configure the kernel to enable staging drivers and the RTL8192SU driver and it worked perfect. You also need the firmware. Problem solved.

----------

## cach0rr0

wicked. we've kept you in our little cult for at least another day  :Wink: 

----------

