[NC10] How to enable wireless card, with RFKILL support

Discussions about Linux installation and configuration on Samsung laptops
User avatar
voRia
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

[NC10] How to enable wireless card, with RFKILL support

Postby voRia » 15/02/2009, 14:44

The Samsung NC10 has an Atheros wireless card, for which a free driver is actually under heavy development stage. Every day a lot of bugs got fixed and almost all the features of the card are supported. :)

Anyway, when we come to a new Ubuntu 8.10 installation, the wireless card does not work and we need to install a newer driver.
Easy to do: just install linux-backports-modules-intrepid package from official repos and disable old driver adding the following lines to /etc/modprobe.d/blacklist:

Code: Select all

blacklist ath_pci
blacklist ath_hal


After a system restart the card will work correctly.

Now the interesting part of this thread:
we are going to enable the RFKILL support, so the wireless card can be switched on/off when needed. :)

A patch for the driver which enables this functionality already exists, it has been written by Tobias Doerffel, and it's awaiting for being merged on main development trunk.
For more information, check the ath5k-devel mailing list.

Here is the patch, which obviously needs to be applied to driver sources.

Another usefull patch that I'm using is this one (written by Bob Copeland), which fixes an annoying bug happening sometime, when the card can't be reset until next system power cycle.

Now we have to enable the FN-F9 key to toggle the wireless card. To do this we'll use a script which will insert/remove the wireless module, but it will need admin rights to do that. So, we have to set up sudo with a new rule, in order to run the script with no need to insert our password everytime.

In a terminal, launch the command

Code: Select all

sudo visudo

This will open the sudo configuration file for editing.

Go to the line

Code: Select all

# Cmnd alias specification

and below it add this one:

Code: Select all

Cmnd_Alias      WLTOGGLE=/usr/local/bin/wlonoff.sh


Now go to the end of file and add this line:

Code: Select all

%admin ALL=(ALL) NOPASSWD: WLTOGGLE


Exit (CTRL+x) and save the file.
This way, all the users in admin group can run the WLTOGGLE command (and ONLY this command) with no need for the password.

Now get the script, copy it to /usr/local/bin and make it executable. Then configure the FN-F9 key:

Code: Select all

gconftool-2 -s --type string /apps/metacity/keybinding_commands/command_2 'sudo /usr/local/bin/wlonoff.sh'
gconftool-2 -s --type string /apps/metacity/global_keybindings/run_command_2 XF86WLAN


Now the XF86WLAN key (ie FN-F9) will launch the 'sudo /usr/local/bin/wlonoff.sh' command when pressed.

For any information or help, just ask here! :)
Last edited by voRia on 29/04/2009, 18:25, edited 1 time in total.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

User avatar
voRia
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

RE: [NC10] How to enable wireless card, with RFKILL support

Postby voRia » 16/02/2009, 23:09

I just updated the package to latest version, so there will be no problems with the latest kernel released today. :)
Last edited by voRia on 17/02/2009, 1:17, edited 1 time in total.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

User avatar
voRia
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

RE: [NC10] How to enable wireless card, with RFKILL support

Postby voRia » 05/03/2009, 16:28

Removed link to 2.6.27-12 kernel module (latest kernel available for ubuntu is 2.6.27.13 now).
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

godsiem
Newbie
Newbie
Posts: 5
Joined: 11/05/2009, 22:01

RE: [NC10] How to enable wireless card, with RFKILL support

Postby godsiem » 11/05/2009, 22:17

Hi!

As a new owner of a NC10, and linux user, I found this page extremely useful! I have to congratulate Voria and all the community, these efforts are very constructive!

Anyway, but as always, you always have some remain issues that keep us posting here :D...

I have installed Ubuntu 9.04, and I got most of the things working out of the box... however the FN-F4, FN-F5 and FN-F9 are not working. I have installed the nc10-scripts from the repository and it didn' t work... then I tried the previous reported methods... still it is not working! I noticed that when I try to run:

[22:58:43] [godsiem@mia ~]$ /usr/bin/wlonoff.sh
You need admin rights to run this script. Try with sudo.

godsiem is my normal user... I am not sure, but I think this may be the issue! When I run with sudo, indeed it works! So there is some kind of error on the mapping, some privileges missing... I also made the test of using the "xev" and indeed I get positive feedback:

KeyPress event, serial 32, synthetic NO, window 0x3800001,
root 0xa5, subw 0x0, time 1901703, (488,125), root:(495,517),
state 0x0, keycode 246 (keysym 0x1008ff95, XF86WLAN), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x3800001,
root 0xa5, subw 0x0, time 1901703, (488,125), root:(495,517),
state 0x0, keycode 246 (keysym 0x1008ff95, XF86WLAN), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

Any ideas on this?

Furthermore, the nc10-scripts are also supposed to provide the functionality for other combinations, such as FN-F8 (cpu scalling)??

Thank in in advance for your help! And again I want to congratulate you for this nice initiative, I will be tuned and participative, since I found this the nicest place for discussion of linux based issues concerning "our" nc10 :)

Cheers,

godsiem

User avatar
voRia
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

RE: [NC10] How to enable wireless card, with RFKILL support

Postby voRia » 11/05/2009, 23:05

Welcome! :)

In jaunty you have to enable the 'commands' plugin in the advanced compiz configuration, or else the hotkeys do not work.
Just install the compizconfig-settings-manager package, then start it through 'System'->'Preferences' menu.

The 'nc10-scripts' package enables the FN-F5, FN-F8, FN-F9 keys, plus some other non-standard keys combinations (bluetooth, webcam).
You can find more info here.

For the FN-F4 key, you can follow this simple howto.
Last edited by voRia on 11/05/2009, 23:06, edited 1 time in total.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

godsiem
Newbie
Newbie
Posts: 5
Joined: 11/05/2009, 22:01

RE: [NC10] How to enable wireless card, with RFKILL support

Postby godsiem » 12/05/2009, 7:27

Thank you very much voRia,

I had already installed the compizconfig-settings-manager from the repository but I was not aware of this enabling :)

All the key combinations work now perfectly! I am impressed and thankful for this nice contribution! Now I will just experiment a little bit with my external display, and that's it, the whole machine will be running very well...

...I am impressed how quickly it runs linux (ubuntu, ext4, with 2GB memory)... I still didn't use it for heavy processing, but I think it will respond nicely :)...

Thank you again for your help! I will be participating on this community! Good Work!

/godsiem

User avatar
voRia
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

RE: [NC10] How to enable wireless card, with RFKILL support

Postby voRia » 11/06/2009, 14:56

I have good news :)

The rfkill patch for ath5k by Tobias Doerffel is finally been merged in the official development tree.
This means that it will be probably included into kernels 2.6.31 and above, so no more need to install backports modules and, more important, it will be officially available for all the distros out there (well, future versions, when newer kernels will be used).
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

Mat
Newbie
Newbie
Posts: 4
Joined: 11/06/2009, 13:21

RE: [NC10] How to enable wireless card, with RFKILL support

Postby Mat » 11/06/2009, 15:31

source? :)

'voRia' pid='1406' dateline='1244728561' wrote:I have good news :)

The rfkill patch for ath5k by Tobias Doerffel is finally been merged in the official development tree.
This means that it will be probably included into kernels 2.6.31 and above, so no more need to install backports modules and, more important, it will be officially available for all the distros out there (well, future versions, when newer kernels will be used).

User avatar
voRia
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

RE: [NC10] How to enable wireless card, with RFKILL support

Postby voRia » 11/06/2009, 16:15

I've just updated the 'linux-backports-modules' package on the repository and the patch (a newer version) is already applied to the snapshot I've used (2009.06.11). According to wireless-testing.git, it has been merged yesterday. :)
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

denis6902
Newbie
Newbie
Posts: 13
Joined: 12/06/2009, 17:43

RE: [NC10] How to enable wireless card, with RFKILL support

Postby denis6902 » 12/06/2009, 17:56

Alright, bogus time!

my nc10 arrived safe and sound at the same day then the 2gb stick from crucial!

Had a go with xp, really nice and fast.

Installed jaunty with your fixes instructions and it all went really well, everything worked out nice and sound! :) However i found the netbook to be really, but reallllly slow, so i now installed the intrepid 8.10 and system is apparently a little faster, but now as fast as it was on xp somehow, and when i rad the xp running it only had the stock memory stick of 1gb.

Anybody to comment on this?

Now on the 8.10intrepid, i didnt manage to find the nc10-scripts package on the synaptic package manager, somehow its just not there, and i have followed the steps just as i did before hands with the jaunty version.
*** yes i added the correct repositories!

Therefore, wifi isnt working, sounds either.

The screen is also somehow weird as i open the compiz-settings-manager and when the window of the app is just way bigger then the resolution therefore is quite annoying because when u click on something at sight it ends up clicking on something else.

can anyone help me out?

I have already downloaded the netbook version from ubuntu, but i dont think it will be any better, perhaps this nc10-script is what is missing out for finishing the fixes.

alright, quick update, just got the wifi working, however still no sounds.

this is what i did to get the wifi to work:

go to terminal:
sudo echo "blacklist ath_pci" >> /etc/modprobe.d/blacklist (enter)
sudo echo "blacklist ath_hal" >> /etc/modprobe.d/blacklist (enter)

restarted and it worked, voila :]

btw, i cannot see nc10-scripts on the package manager, why? it was dead easy on jaunty!
Last edited by denis6902 on 12/06/2009, 18:27, edited 1 time in total.

denis6902
Newbie
Newbie
Posts: 13
Joined: 12/06/2009, 17:43

RE: [NC10] How to enable wireless card, with RFKILL support

Postby denis6902 » 12/06/2009, 19:14

i went to terminal just now, and did:

sudo apt-get nc10-scripts

it downloaded couple of stuff, but i still dont have sounds :(

okon3
Supporter
Supporter
Posts: 190
Joined: 12/05/2009, 15:49

RE: [NC10] How to enable wireless card, with RFKILL support

Postby okon3 » 13/06/2009, 10:20

but nc10-scripts are only scripts to get the FN + F* keys working.
You have to updrate your alsa driver to get the sound working (i think)
** Dio dammi la pazienza, perchè se mi dai la forza, ammazzo tutti. **

denis6902
Newbie
Newbie
Posts: 13
Joined: 12/06/2009, 17:43

RE: [NC10] How to enable wireless card, with RFKILL support

Postby denis6902 » 13/06/2009, 15:31

alright, it was a nightmare yesterday! i went back and forth with distro and the thingy was really there yet.

The Intrepid was just the worst afterall because i could not get all the fixes on the synaptic package manager.

So....this time i decided to redo it from scraqtch again, yes i did! lol...i went back to JAUNTY version, as before i had almost everything working fine and nice but with that very slow response from the netbook.

so what did i do this time to get it sharp?

During the instalation process (at the partitioner) i selected manual partitioning instead of using entire hdd with the assistance of the particioner. I first created a primary swap partition with 2048mb and then i used all the left over of the hdd to create a partition for the jaunty version.
I USED PRIMARY EXT4 and only gave it / (slash) command


the installation went really smooth, so i followed the rest of the fixes instructions and now the netbook is ace like a fighter plane, its really fast and it responds much faster then before, so im thinking that when instaling for the first time, the wizard partitioner must use ext3 or something else to create the partition for the linux and maybe thats why it was soo slow on the fisrt time i tried it.

yesterday i was at a party with some friends, and i put my netbook to pump some tunes for the party and the sounds was working but very weird somehow, the wuality of the music was really rubish kind of crushed and i couldnt barely hear the artist voice, tied using the equalizer on amarok14 (the older version) to help the issue, but not even though it helped. Was asking myself then? Is it because of the sound card on the nc10 sucks or either this also driver is not quite good yet because the quality of the music was ridiculous, and i felt really upset when someone cracked a ACER netbook and the sound was just amazing and clear. Well...fair enough that netbooks were not develop or either design for such purposes, but it really sucked at the sounds.


Another thing which im not really sure yet is the screen resolutuion, windows just semms to be wrong somehow, whenever i open any window, like amarok, compiz-manager, or any application window, i cannot really see what is at the bottom of it, i try movinf the window up so i can apply a certain setting given or even going back to a previous menu window for example and it doesn really work, when maximazing the window then the thing gets out of control, and the screen does really work, it kind of goes boncus.

Does anyone have these same issue? Or is it only me?

el_rico
Newbie
Newbie
Posts: 2
Joined: 16/06/2009, 13:03

RE: [NC10] How to enable wireless card, with RFKILL support

Postby el_rico » 16/06/2009, 19:22

Hello,

I've just installed nc10-scripts and backport modules so that I can get the wifi working with RFKILL and FN key. First, thank you for this!

I have a (little) problem however: if the initial state of the Wifi adapter is off (as set in the BIOS), I cannot bring it up. A first problem is that ath5k is loaded during at boot-up even is the adapter is off: wlonoff.sh will consider that the Wifi is up, based on lsmod output. But that's minor. The problem is that the sequence "modprobe -r ath5k ; modprobe ath5k' won't bring the Wifi up anyway. The only interesting event in dmesg I can see is "wlan0: link is not ready".

Do you have the same behaviour? And do you know a way to work around this?

Thanks again!

User avatar
voRia
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

RE: [NC10] How to enable wireless card, with RFKILL support

Postby voRia » 16/06/2009, 19:30

Hi and welcome :)

Yes, I already noticed the problem. As far as I know, there is no way to wake up the card in such a situation (at least for now). The only (obvious) workaround is to keep the initial state of the wifi adapter set to 'always on' in the BIOS.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!


Return to “Linux On My Samsung”

Who is online

Users browsing this forum: No registered users and 1 guest