Driver installation guidelines for Realtek RTL8192CU

Hello,
I have a problem with wifi, when opensuse starts it works and I can navigate to sites with no problem but randomly it stops working, it doesn’t disconnect, it just stop receiving and sending data.
except from that I have noticed that the signal strength is dropping and raising randomly again.

I have the Asus USB N13 that uses the Realtek RTL8192CU chipset. I have download the drivers from the official site and I tried to run

sh install.sh

but it fails with the following text:


cc1: some warnings being treated as errors
/usr/src/linux-3.16.6-2/scripts/Makefile.build:273: recipe for target '/home/mene/src/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl871x_cmd.o' failed
make[4]: *** [/home/mene/src/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl871x_cmd.o] Error 1
/usr/src/linux-3.16.6-2/Makefile:1359: recipe for target '_module_/home/mene/src/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405' failed
make[3]: *** [_module_/home/mene/src/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405] Error 2
Makefile:195: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:24: recipe for target '__sub-make' failed
make[1]: *** [__sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-3.16.6-2-obj/x86_64/desktop'
Makefile:220: recipe for target 'modules' failed
make: *** [modules] Error 2
##################################################
Compile make driver error: 2
Please check error Mesg
##################################################


I am not sure what I have to do now to build and use the latest driver.

Do I have to terminate NetworkManagement before running install.sh?
If I ever find a way to bypass these problems and complile correctly the drivers do I have to enable it or it’s enabled by default?
Is there any tutorial for helping me and a documentation that can help me understand this part of linux(drivers,compile etc)

The following might be helpful to you:

Also it compiles nicely under the latest kernel. The proprietry driver from Realtek did not compile under the kernel shipped with Opensuse 13.1.

So here is what I ended up doing:

?](ASUS USB-N10 Nano on OpenSuse 13.1 Linux)
|1
|
2
3
4
5
6
7
8
9
10
11
|~ git clone GitHub - pvaret/rtl8192cu-fixes: Realtek 8192 chipset driver, ported to kernel 3.11.
~ su - (become root)

zypper in dkms kernel-devel kernel-headers gcc make

cd /path/to/git/repo… (you get the picture)

cd …/ (go to directory above tree) on my system I put this source tree under /usr/local/src/

dkms add rtl8192cu-fixes

dkms install 8192cu/1.8

depmod -a

cp blacklist-native-rtl8192.conf /etc/modprobe.d

echo “options 8192cu rtw_power_mgnt=0 rtw_enusbss=0” > /etc/modprobe.d/50-8192cu.conf

reboot

|

And that’s it. Now if the kernel is ever updated during normal patching, dkms will recompile our driver.

Thank you very much,
I will try it out.

I don’t understand this part.

cd /path/to/git/repo… (you get the picture)

cd …/ (go to directory above tree) on my system I put this source tree under /usr/local/src/

dkms add rtl8192cu-fixes

Could someone explain it?

cd /path/to/git/repo… (you get the picture)

I have to change the directory to the directory where I have downloaded the file?

cd …/ (go to directory above tree) on my system I put this source tree under /usr/local/src/

But what is this cd …/ and then /usr/local/src/ Change from directory where I downloaded the file to /usr/local/src/?

dkms add rtl8192cu-fixes

when I type this in /usr/local/src/I get this error message: Error! Invalid number of arguments passed.Usage: add / or add -m / or add -m -v

I can only offer general advice here, as I’ve never needed/installed/used dkms, and ‘man dkms’ may be your firend here

ACTIONS
add [module/module-version] [/path/to/source-tree] [/path/to/tarball.tar]

       Adds  a  module/module-version combination to the tree for builds and installs.  If module/mod-
       ule-version, -m module/module-version, or -m module -v version are passed as options, this com-
       mand  requires  source  in  /usr/src/<module>-<module-version>/ as well as a properly formatted
       dkms.conf file. If /path/to/source-tree is passed as an  option,  and  source-tree  contains  a
       dkms.conf  file,  it  will  copy  /path/to/source-tree  to  /usr/src/module-module-version.  If
       /path/to/tarball.tar is passed, this command behaves like the ldtarball command.

Anyway, in an effort to assist further, I did the following as root

cd /usr/local/src
git clone https://github.com/pvaret/rtl8192cu-fixes.git

This placed a file ‘rtl8192cu-fixes’ in the /usr/local/src directory. Then I did

dkms add rtl8192cu-fixes

and got


Creating symlink /var/lib/dkms/8192cu/1.9/source ->
                 /usr/src/8192cu-1.9

DKMS: add completed.

Hopefully, you can stumble your way through from there. :slight_smile:

My wireless have exactly the same problem, but i have a Lenovo G40-70 with a wireless Realtek RTL8723BE card, will this fix work for my card too?

You have different hardware and a different driver. You a best advised to start your own thread, with a descriptive title to catch the attention of those who may be able to assist.

I’ve tried this but instead of getting a file called rtl8192cu-fixes, I get a folder by that name containing lots of files (as though it had been unzipped?).

What am I doing wrong?

Had the same problem, seems to be an issue with the power. If you don’t need bluetooth disable it in the BIOS, this made at least my Lenovo B5400 work. Only issue now is that wifi doesn’t work after a long resume, but thats acceptable for me.

I had it in the wrong folder. It works fine and my wifi is better than ever.

Thanks.

That’s good to know. :slight_smile:

I have an ASUS USB-N10 wireless card that is based on the RTL8192CU and I had problems with the official linux driver downloaded from ASUS website, when trying to install it on Opensuse 13.2.
I followed these instructions here and it worked perfectly.

Has anyone tried this with the latest kernel RC - kernel 4.0.0-rcx?

I get errors and the 8192cu module no longer compiles. The log doesn’t help me as I can’t understand where it’s going wrong.

/var/lib/dkms/8192cu/1.9/build/os_dep/linux/rtw_android.c:382:30: warning: cast to pointer from integer of different size -Wint-to-pointer-cast]
if (copy_from_user(command, (void *)priv_cmd.buf, priv_cmd.total_len)) {
^
/var/lib/dkms/8192cu/1.9/build/os_dep/linux/rtw_android.c:568:4: warning: passing argument 1 of ‘get_int_from_command’ makes pointer from integer without a cast [enabled by default]
pwfd_info->rtsp_ctrlport = ( u16 ) get_int_from_command( priv_cmd.buf );
^
/var/lib/dkms/8192cu/1.9/build/os_dep/linux/rtw_android.c:334:5: note: expected 'char ’ but argument is of type ‘compat_uptr_t’
int get_int_from_command( char
pcmd )
^
/var/lib/dkms/8192cu/1.9/build/os_dep/linux/rtw_android.c:588:4: warning: passing argument 1 of ‘get_int_from_command’ makes pointer from integer without a cast [enabled by default]
pwfd_info->wfd_device_type = ( u8 ) get_int_from_command( priv_cmd.buf );
^
/var/lib/dkms/8192cu/1.9/build/os_dep/linux/rtw_android.c:334:5: note: expected 'char ’ but argument is of type ‘compat_uptr_t’
int get_int_from_command( char
pcmd )
^
/var/lib/dkms/8192cu/1.9/build/os_dep/linux/rtw_android.c:612:20: warning: cast to pointer from integer of different size -Wint-to-pointer-cast]
if (copy_to_user((void *)priv_cmd.buf, command, bytes_written)) {
^
cc1: some warnings being treated as errors
/usr/src/linux-4.0.0-rc3-2.gd5c547f/scripts/Makefile.build:259: recipe for target ‘/var/lib/dkms/8192cu/1.9/build/os_dep/linux/rtw_android.o’ failed
make[3]: *** [/var/lib/dkms/8192cu/1.9/build/os_dep/linux/rtw_android.o] Error 1
/usr/src/linux-4.0.0-rc3-2.gd5c547f/Makefile:1416: recipe for target ‘module/var/lib/dkms/8192cu/1.9/build’ failed
make[2]: *** [module/var/lib/dkms/8192cu/1.9/build] Error 2
Makefile:145: recipe for target ‘sub-make’ failed
make[1]: *** [sub-make] Error 2
Makefile:24: recipe for target ‘__sub-make’ failed
make: *** [__sub-make] Error 2
make: Leaving directory ‘/usr/src/linux-4.0.0-rc3-2.gd5c547f-obj/x86_64/desktop’

I found Larry Finger’s github site (https://github.com/lwfinger/rtlwifi_new) which says it should compile with any kernel 3 or above.

I tried it with Tumbleweed and kernel 4.0.0-rc3 and it did compile but when I rebooted Tumbleweed froze and then I lost plasma dt.

If Larry sees this I wonder if he’s tested his work with k4?

Unfortuntaely, he diesn’t seem to frequent these forums any longer. Instead, you migth find him on the openSUSE Mailing lists

https://en.opensuse.org/openSUSE:Mailing_lists