LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   How to turn wireless card off with wicd (http://www.linuxquestions.org/questions/slackware-14/how-to-turn-wireless-card-off-with-wicd-688203/)

grissiom 12-04-2008 01:15 AM

How to turn wireless card off with wicd
 
I just installed wicd and modified the rc.inet1.conf according to http://slackware.osuosl.org/slackwar...ADME.SLACKWARE . After reboot, any thing seems work fine. It could not find any wireless connections because I'm not in a wireless-network. So I want to turn the wireless card off to get a better battery life. How to achieve it? Thanks in advance.

ChrisAbela 12-04-2008 03:12 AM

Yours is a VERY pertinent question.

I made this question to myself when booting up Slackware on my Laptop on my last flight. I hope that someone is able to take note of this issue and document it very prominently!

Chris Abela

lumak 12-04-2008 01:12 PM

I don't know if this helps or if it turns it off...

But have you tried 'su -c '/sbin/modprobe -r wireless_driver_name'??

simply removing the module 'may' turn it off. If that works, you can black list the driver so that it has to manually be loaded (add the driver to /etc/modprobe.d/blacklist)

This probably isn't the best solution.

indienick 12-04-2008 01:17 PM

I think that the radio switch on the front of some laptops is just a power switch that interrupts the flow of power to the WiFi module. How Windows deals with this, I do not know. But I think the only way for you to be able to do it, in Linux, is to remove the module from the kernel.

As for implementing it in wicd, I think you will have to actually implement it - meaning it is not a provided functionality.

ppr:kut 12-04-2008 02:42 PM

I know of various probably possible ways to achieve this. The easiest one from my side, as I use it every day, would be if you have an Asus laptop and kde. Then you can install lapsus, which is able to turn wifi off.
The more general way to achieve it would be to use the rfkill framework in the kernel. Documentation about it should be in "/usr/src/linux/Documentation/rfkill.txt", though I don't know if it's enabled in Slackware's kernel by default. The downside here is that I only know it *should* work. I tried it myself some times, but never succeeded.
I took a closer look at how lapsus works and recognized it does not utilize the rfkill framework. So either the daemon running in the background is doing some magic of the asus-laptop kernel driver is responsible for it. You might look for a similar tool to lapsus for your manufacturer, or try getting rfkill to work :)

rworkman 12-05-2008 08:21 AM

Wicd does not have this functionality, and I'm not convinced that it ever will. To do so would almost surely require wicd to use information from hal, and I'm not sure that's a direction the wicd devs want to go. If you need to "turn off" your wireless card, then a terminal is probably the best tool to use :)

grissiom 12-06-2008 02:30 AM

Quote:

Originally Posted by lumak (Post 3364604)
I don't know if this helps or if it turns it off...

But have you tried 'su -c '/sbin/modprobe -r wireless_driver_name'??

simply removing the module 'may' turn it off. If that works, you can black list the driver so that it has to manually be loaded (add the driver to /etc/modprobe.d/blacklist)

This probably isn't the best solution.

Maybe it's not the best solution but this method Works! ;)

Quote:

Originally Posted by ppr:kut
The more general way to achieve it would be to use the rfkill framework in the kernel. Documentation about it should be in "/usr/src/linux/Documentation/rfkill.txt", though I don't know if it's enabled in Slackware's kernel by default. The downside here is that I only know it *should* work. I tried it myself some times, but never succeeded.

I took a closer look at how lapsus works and recognized it does not utilize the rfkill framework. So either the daemon running in the background is doing some magic of the asus-laptop kernel driver is responsible for it. You might look for a similar tool to lapsus for your manufacturer, or try getting rfkill to work

Hmm, the rfkill frame work does not work on my box too... I have already fired a kernel bug(http://bugzilla.kernel.org/show_bug.cgi?id=11673) but get no solution yet..

Quote:

Originally Posted by rworkman
Wicd does not have this functionality, and I'm not convinced that it ever will. To do so would almost surely require wicd to use information from hal, and I'm not sure that's a direction the wicd devs want to go. If you need to "turn off" your wireless card, then a terminal is probably the best tool to use

Hmm, I get your point. I remember that on the days that "/etc/rc.d/rc.inet1" is the only network manager, wireless card can be turned off simply by "/etc/rc.d/rc.inet1 wlan_down". But this does not work after installing wicd(maybe the root cause is emptying /etc/rc.d/rc.inet1.conf). "ifconfig wlan0 stop" does not do the work too... So any hints there?

dive 12-06-2008 07:29 AM

Some wifi drivers have the capabilty of turning wireless off but I don't know whether this actually turns hardware off of just stops the driver:

Code:

modinfo ipw2200
parm:          disable:manually disable the radio (default 0 [radio on]) (int)

Also you may find something in /proc/acpi/ relating to it.

enno.vet 01-09-2009 05:53 PM

You'll have to check your modprobe manual. If autoloading of modules is enabled in kernel config, then any module that finds a corresponding device will be loaded.
Just remove your module from /lib/modules/<YourKernelVersion>/kernel/wherever and you won't have to bother with it. Perhaps you shouldn't rm it in case you might use it later, instead mv it to some safe place?

modprobe should (does on debian) offer a possibility to configure settings for modules, where you could place the disable=1 option, but that still wouldn't prevent the module being loaded and costing some CPU cycles.

Brgds, ed.

Drakeo 01-09-2009 08:04 PM

go into wicd preference and select what you want it to do you can also make a wired only profile if you want hope this helps. that little icon on the right click go to preferences. or in internet ---> wicd manager. as far as not seeing the or using the hardware then rmmod your module right a litle script make put it in the bin and and then make a craete a link to the script put the link on the desk top and use it.
#!/bin/bash
rmmod your module.

marsques 10-08-2010 02:36 PM

On a samsung netbook which does not have a wifi switch the following worked to turn the wifi radio off.

rfkill block wifi

and to bring it back on

rfkill unblock wifi


All times are GMT -5. The time now is 02:17 PM.