Page 1 of 1

N140 Karmic Realtek 8192E WiFi

Posted: 29 Nov 2009, 14:28
by marshmn
Hi all,

I received my N140 on Friday and so I've been busily getting Karmic NBR up and running on it this weekend. The nc10 scripts seem like a great start though I still have a number of issues with Fn keys not working etc at the moment. But anyway, first things first - the wifi...

My N140 (UK model) came with a Realtek 8192e network card which didn't work with the initial Karmic NBR install. I was able to get it working using ndiswrapper very quickly though (for anyone looking for how to do that it was simply a case of downloading the windows driver zip from samsung and unpacking it in a temporary location; then using the Ubuntu Software Center to install 'Windows Wireless Drivers' package, running that and pointing it at the .inf in the windows driver zip).

I had installed the nc10-scripts package as described in this forum and the next step was to test turning the wifi on/off with Fn+F9, which didn't work. I then found that 'sudo nc10 wifi on/off' didn't work either. So then I looked into the mechanism used by the scripts and here's what I found:

If I try turning off the wlan0 txpower with 'sudo iwconfig wlan0 txpower off' then the wifi disconnects from the access point and tries to reconnect again (spinning icon in the panel), eventually failing. Viewing the output of iwconfig however still shows 'Tx-Power:20 dBm' which means that the nc10 script assumes that the txpower is still on.

Switching the txpower back to normal with 'sudo iwconfig wlan0 txpower auto' allows the wifi to reconnect again. Sometimes it seems to try to reconnect straight away, without any user intervention, once I issue that command and it seems like when that happens I get prompted for the WPA key again. I cancel that and then use the panel applet to select my access point again and it then seems to connect to it fine using my stored credentials etc.

So, the above method of using txpower doesn't seem to work well with ndiswrapper from what I can tell. Instead, using the modprobe method as per previous versions of the nc10 wifi script seems to work well.

I can turn off the wifi with 'sudo modprobe -r ndiswrapper' and then turn it back on with 'sudo modprobe ndiswrapper' and at that point it connects back to my access point just fine.

So I reverted '/etc/default/nc10-scripts' and '/usr/lib/nc10/wifi.sh' back to how they were as of revision 21 and now the 'sudo nc10 wifi on/off' seems to work fine (though the wifi led is still constantly lit).

The Fn+F9 key press still doesn't work for me, but I'll look into that separately.

Matt

Re: N140 Karmic Realtek 8192E WiFi

Posted: 29 Nov 2009, 15:12
by voria
Hi and welcome to the forum :)

Thanks for reporting the problem, I can only test my scripts on my NC10 so I didn't know about it.
Then, I will add back the module removal method, along with the new iwconfig method, and a new option in /etc/default/nc10-scripts to select which method to use.

Re: N140 Karmic Realtek 8192E WiFi

Posted: 29 Nov 2009, 15:38
by voria
New package on the repository, changelog:

Code: Select all

nc10-scripts (4.0~ppa6~nc10~karmic) karmic; urgency=low

  * Add back the module removal method for toggling wireless,
    along with the new iwconfig method.
  * Add a new option in '/etc/default/nc10-scripts' to select
    which method to use.
;)

Re: N140 Karmic Realtek 8192E WiFi

Posted: 29 Nov 2009, 18:09
by marshmn
voRia wrote:New package on the repository, changelog:

Code: Select all

nc10-scripts (4.0~ppa6~nc10~karmic) karmic; urgency=low

  * Add back the module removal method for toggling wireless,
    along with the new iwconfig method.
  * Add a new option in '/etc/default/nc10-scripts' to select
    which method to use.
;)
Thanks! I've just upgraded and tested it, works great. Thanks for the fast update :)

Matt

Re: N140 Karmic Realtek 8192E WiFi

Posted: 01 Jan 2010, 13:49
by marshmn
FYI, tigerbright on the sammynetbook.com forums has posted details of a native Linux driver for the 8192e that he/she obtained from realtek. I haven't tried it yet, but it sounds promising. See this post for details: http://sammynetbook.com/plugins/forum/f ... .php?43545

Matt

Re: N140 Karmic Realtek 8192E WiFi

Posted: 01 Jan 2010, 17:26
by marshmn
marshmn wrote:FYI, tigerbright on the sammynetbook.com forums has posted details of a native Linux driver for the 8192e that he/she obtained from realtek. I haven't tried it yet, but it sounds promising. See this post for details: http://sammynetbook.com/plugins/forum/f ... .php?43545
I've now tested this out myself and can confirm that it works. In order to use it with the nc10-scripts I used the following settings in /etc/default/nc10-scripts:

Code: Select all

WIRELESS_TOGGLE_METHOD=1
WIRELESS_MODULE="r8192e_pci"
(Note: I tried WIRELESS_TOGGLE_METHOD=0, but it gave an error that the operation is not supported by this card/driver).

Matt

Re: N140 Karmic Realtek 8192E WiFi

Posted: 03 Jan 2010, 15:39
by voria
Good to know. :)
Then I'll create a new package and I'll add it to the repo, containing this driver, for a fast and easy installation on ubuntu.
Give me some days. ;)

Re: N140 Karmic Realtek 8192E WiFi

Posted: 04 Jan 2010, 08:26
by marshmn
voRia wrote:Good to know. :)
Then I'll create a new package and I'll add it to the repo, containing this driver, for a fast and easy installation on ubuntu.
Give me some days. ;)
Hi voRia,

This sounds good. One word of caution - I've been having problems with suspend/resume since installing this driver - with this module loaded the resume hangs. If I rmmod the module before the suspend then the resume works fine, but as I understand it the system is meant to remove network drivers automatically before the suspend so I'm not sure what's going on yet.

Matt

Re: N140 Karmic Realtek 8192E WiFi

Posted: 10 Jan 2010, 15:20
by marshmn
I've played around with the suspend/resume some more. The only way that I've so far managed to get this to work is to modify the following section in /usr/lib/pm-utils/sleep.d/55NetworkManager:

Code: Select all

case "$1" in
        hibernate|suspend)
                modprobe -r r8192e_pci
                suspend_nm
                ;;
This removes the module before suspending network manager. Note that there is no need to re-insert the module on resume since the nc10-scripts take care of that nicely :)

Matt

Re: N140 Karmic Realtek 8192E WiFi

Posted: 11 Jan 2010, 13:59
by voria
There is a new package on my experimental repository called "n140-wireless".
It installs the realtek driver for the latest kernel, along with a new pm rule which removes the module during the suspend/hibernate process, as you stated it's needed.

By installing the driver manually with the original Makefile, 2 other pm scripts are installed, but I don't know if they are really needed so I did not include them in 'n140-wireless'. Please test the package and let me know if everything work good or if the above original scripts are needed.

It's better if you completely uninstall the realtek driver installed manually and revert any change you have manually done to get it working properly, prior to test my package.

Cheers. ;)

Re: N140 Karmic Realtek 8192E WiFi

Posted: 11 Jan 2010, 23:54
by marshmn
I did a 'make uninstall' to remove my manually installed module, and backed out the config change I'd added to unload the module on suspend.

I then added the module from your experimental repository and can confirm that it seems to be working fine. I can connect to the wifi and suspend/resume works perfectly, so it looks good to me :)

Many thanks,
Matt

Re: N140 Karmic Realtek 8192E WiFi

Posted: 22 Jan 2010, 23:57
by marshmn
Just in case anyone comes across this thread looking for the solution... this module is now provided in voria's main ppa repository. So if you have the ppa in your sources you simply need to install the 'samsung-wireless' package.

Matt