The kernel driver itself seems to be buggy, which is confirmed by other users in other distro forums. the connection can be established and used, but its hanging somewhen after some minutes and the usb dongle needs to be replugged in to make it work again.

To solve the problem I have to install the driver from the RealTek website, which is: RTL819xC_USB_linux_v3.4.4_4749.20120806.zip

The makefile, which works for example in Ubuntu well (tested by me), isn't working in Gentoo for a reason which I don't know and the code looks very complex to me.

The driver directory includes many *.c files which I am surely not supposed to touch in the subdirectories: core, hal, include and os_dep. There are also files clean, ifcfg-wlan0, Kconfig wlan0dhcp and the makefile which I tried to execute.

I backlisted the kernel driver rtl8192cu. The new driver is supposed to be called 8192cu without the rtl.

Please help me to install the new driver so I can properly use my wlan card.

Thank you.

Last edited by alocacoc on Mon Oct 29, 2012 2:24 pm; edited 1 time in total

alocacoc ... here is the source of the problem. You must be booted the target kernel (and so match 'uname -r') when compiling the module, and /lib/modules/$(KVER)/build must exist and point to the kernel sources (build -> /usr/src/linux-${KVER}). So, first 'make && make modules_install' for the target kernel, then install the kernel and boot it. You should then be able to compile the rtl8192cu module.

The directory /lib/modules/3.6.0-gentoo/build exists, it contains a makefile, Module.symvers, system.map, config and a directory called include.

alocacoc ... this will be a symlink to the kernel sources, its created when running 'make modules_install'.

alocacoc wrote:

The directory /usr/src/3.6.0-gentoo/ got quite the same files.

This is incorrect ... the directory will/should be named '/usr/src/linux-3.6.0-gentoo/', I'm not sure why you have the above, or if its a typo on your part, but gentoo-sources should be installed as linux-{version}-gentoo.

yes and no ... with the above (typo's) you'll just get an error as "space" is a specical character and the command is "&& make modules_install" not "make modules install". But, otherwise, yes the above will compile the kernel and install the modules.

alocacoc wrote:

How to link /lib/modules/3.6.0-gentoo/build to /usr/src/3.6.0-gentoo/? Like this? 'ln -s /lib/modules/3.6.0-gentoo/build /usr/src/3.6.0-gentoo/'

No, firstly the link is created when 'make modules_install" is run, so there is no need to link, secondly the path is incorrect, thirdly, 'ln -s /from /to' and you have it visa-versa, and fourthly, to change a symlink the '-f' switch should be used.

You are 100% right, the directory is call /usr/src/linux-3.6.0-gentoo/, my typing mistake.

When I do in /lib/modules/3.6.0-gentoo/build

Code:

# make modules_install

I get this error:

Code:

Makefile:323: /usr/src/linux-3.6.0-gentoo/scripts/Kbuild.include: No such file or directory
Makefile:564: /usr/src/linux-3.6.0-gentoo/arch/x86/Makefile: No such file or directory
/bin/sh: /usr/src/linux-3.6.0-gentoo/scripts/gcc-goto.sh: No such file or directory
make: *** No rule to make target `/usr/src/linux-3.6.0-gentoo/arch/x86/Makefile'. Stop.

It is quite the same error like when I try to make the wlan driver module, so I am doing something wrong in general here, nothing to do with the driver module itself I think.

The correct command would be 'ln -f /usr/src/linux-3.6.0-gentoo /lib/modules/3.6.0-gentoo/build', but I don't need it.

alocacoc ... ignore /lib/modules/3.6.0-gentoo/build its just a symlink to /usr/src/linux-{version}-gentoo ... its there meerly to point a build at the sources for those modules.

alocacoc wrote:

Code:

# make modules_install

I get this error:

Code:

Makefile:323: /usr/src/linux-3.6.0-gentoo/scripts/Kbuild.include: No such file or directory
Makefile:564: /usr/src/linux-3.6.0-gentoo/arch/x86/Makefile: No such file or directory
/bin/sh: /usr/src/linux-3.6.0-gentoo/scripts/gcc-goto.sh: No such file or directory
make: *** No rule to make target `/usr/src/linux-3.6.0-gentoo/arch/x86/Makefile'. Stop.

Is this perhaps a VM? ... anyhow, the package isn't installed correctly as some files from that package are missing.

Something was wrong with the sources. I reinstalled the 3.6.0 sources. Then I created the correct symbolic link to this source directory and installed the module with 'make modules' and 'make modules install'. Everything went correctly I guess. The module seems to be installed. I blacklisted the other driver rtl8192cu.

Now in KDE I see in the systray under WLAN Interfaces 'driver: rtl8192cu'. I am not sure how to see if my new driver is now actually working.

This are some commands where I'm not sure how to see if my module is now used by my wlan card.

if I use lspci -k it is showing me the kernel driver for devices like my eth0, but not for my usb devices. lsusb doesn't have the -k feature. How to see?

alocacoc ... yes, sorry, I'd completely missed it was a USB device. The device registration should appear in /var/log/messages. However, if the device/driver is detected then you should see the network interface in iwconfig/ifconfig/iw.