Partially to make rtl8192se works with kernel 3.0

My laptop is Lenovo X201 with a RTL8191SEvB wireless card. In kernel 2.6.3x version, I’ve to install the rtl8192se and rtl8192se-firmware packages to make it works. In the previous settings, the module named r8192se_pci and with a parameter hwwep=0 can led to a stable network connection no matter my gentoo or ubuntu box.

But the nightmare comes back when I upgrade to kernel-3.0.x with built-in rtl8192se modules in rtlwifi catalog. The issues are:
1) Network connection are hard to established and will disconnected dynamically itself.
2) My ad-hoc connection shared by Windows cannot be established.
3) And so on.

The symptoms of the issues are: the configurations via ifconfig, iwconfig even route are all CORRECTLY, but I still CANNOT ping the default gateway.

But now I found a PARTIAL solution. That is, to set a new parameter swenc=1 to make the module use software encryption rather than hardware one, which similar the old hwwep=0 with r8192se_pci modules.

To make it set on loaded, adding a configuration file via:
echo "options rtl8192se swenc=1" > /etc/modprobe.d/rtl8192se.conf

If you encounter the same problem with rtl8192se driver on RTL8191SEvB card, Try it. 🙂

[20111114 edit] From the forum, the developer suggest me to install iw and set the CRDA for the wirless card. After I try # iw reg set TW, my network connection in Ubuntu more stable. Maybe this is another trick, too.

Make cpufreqd work as module in Gentoo

I’m using the default setting via genkernel to build my box. But the cpufreqd always shown it cannot be start-up without the kernel config CONFIG_CPU_FREQ.

But the weird thing is: I’ve selected the CPU_FREQ* settings in my kernel and there are corresponding modules in /lib/modules/<kernel version>:/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=m
CONFIG_CPU_FREQ_STAT=m
CONFIG_CPU_FREQ_STAT_DETAILS=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=m
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
...

Finally, I found the reason: the modules (also the government settings) not be auto-loaded when booting. So I append the configuration for module auto-load for gentoo and everything works fine.

1. The final kernel configuration, I’ve change the default government setting from performance to userspace which make me can choose the speed I want:

1
2
3
4
5
6
7
8
9
10
11
12
13
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=m
CONFIG_CPU_FREQ_STAT=m
CONFIG_CPU_FREQ_STAT_DETAILS=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=m
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m

2. The auto-load module settings in gentoo (/etc/conf.d/module):

1
modules_3_0="acpi-cpufreq cpufreq_ondemand cpufreq_powersave cpufreq_conservative"

Which will load the INTEL’s CPUFREQ driver (acpi-cpufreq) and the governments.
Note: The governments which is loaded can be used in the programs (eg: Gnome’s CPU Frequency Scaling Monitor).
Note: the modules should be set AT LEAST major AND minor number of kernel (eg: 3.0 as 3_0) or it cannot be parsed.

Finally, everything works fine. Enjoy it. 🙂

GRUB settings of booting from usb disk with genkernel on Gentoo

I’ve tried to use genkernel to build my gentoo box recent days. But I cannot boot correctly via an installation with external USB disk (My gentoo box is on an external USB 2.5″ disk).

The default GRUB settings for genkernel user is:

1
2
3
4
title Gentoo Linux 2.6.34-r1
root (hd0,0)
kernel /boot/kernel-genkernel-x86-2.6.34-gentoo-r1 real_root=/dev/sda3
initrd /boot/initramfs-genkernel-x86-2.6.34-gentoo-r1

But with this configuration, the boot procedure will stop at there is not correct root sector can be loaded. That’s because the usb is slower o be configured than my laptop’s disks. And on the other hand, the waitroot, doslowusb, and so on additional configurations cannot be passed to a genkernal-ed source.

For some tries and referenced configurations on other linux distribution, the works setting is to use UUID (UUID=….) rather than aliased device name (dev/$ROOT). The correct settings:

1
2
3
4
title Gentoo Linux 2.6.34-r1
root (hd0,0)
kernel /boot/kernel-genkernel-x86-2.6.34-gentoo-r1 real_root=UUID=....
initrd /boot/initramfs-genkernel-x86-2.6.34-gentoo-r1

The UUID for devices can be found in your /etc/fstab if you also use genkernel. Finally, my USB gentoo works fine. Enjoy it. 🙂