GNOME Bugzilla – Bug 343679
switch to turn wireless off/on
Last modified: 2007-06-22 18:15:41 UTC
So - my laptop has an (unfortunately pretty concealed) switch to turn wireless things on & off; this yields interesting stuff in syslog: May 25 15:17:59 linux kernel: ipw3945: Detected Intel PRO/Wireless 3945ABG Network Connection May 25 15:18:00 linux kernel: eth0: no IPv6 routers present May 25 15:18:00 linux kernel: ipw3945: Radio Frequency Kill Switch is On: networking to work. May 25 15:18:00 linux kernel: Kill switch must be turned off for wireless networking to work. Unfortunately the helpful message 'Turn Kill switch on' - doesn't get to the desktop user, who is left non-plussed as to why their wireless isn't working / showing up at all when you click the nm-applet thing. HAL shows this when the device is disabled: 44: udi = '/org/freedesktop/Hal/devices/pci_8086_4227' info.bus = 'pci' (string) info.linux.driver = 'ipw3945' (string) info.parent = '/org/freedesktop/Hal/devices/pci_8086_27d2' (string) info.product = 'PRO/Wireless 3945ABG Network Connection' (string) info.udi = '/org/freedesktop/Hal/devices/pci_8086_4227' (string) info.vendor = 'Intel Corporation' (string) linux.hotplug_type = 1 (0x1) (int) linux.subsystem = 'pci' (string) linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0' (string) linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0' (string) pci.device_class = 2 (0x2) (int) pci.device_protocol = 0 (0x0) (int) pci.device_subclass = 128 (0x80) (int) pci.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0' (string) pci.product = 'PRO/Wireless 3945ABG Network Connection' (string) pci.product_id = 16935 (0x4227) (int) pci.subsys_product = 'Unknown (0x1011)' (string) pci.subsys_product_id = 4113 (0x1011) (int) pci.subsys_vendor = 'Intel Corporation' (string) pci.subsys_vendor_id = 32902 (0x8086) (int) pci.vendor = 'Intel Corporation' (string) pci.vendor_id = 32902 (0x8086) (int) When it is enabled I get this syslog goodness: Jun 2 11:39:10 t60p kernel: ipw3945: Detected geography ABG (13 802.11bg channels, 23 802.11a channels) Jun 2 11:39:10 t60p kernel: usb 4-1: new full speed USB device using uhci_hcd and address 3 Jun 2 11:39:10 t60p ifup: Network interface is managed from NetworkManager Jun 2 11:39:10 t60p ifup: NetworkManager will be advised to set up eth1 Jun 2 11:39:10 t60p ifup: but it cannot be assured from here. Jun 2 11:39:10 t60p kernel: ADDRCONF(NETDEV_UP): eth1: link is not ready Jun 2 11:39:10 t60p kernel: usb 4-1: new device found, idVendor=0a5c, idProduct=2110 Jun 2 11:39:10 t60p kernel: usb 4-1: new device strings: Mfr=1, Product=2, SerialNumber=0 Jun 2 11:39:10 t60p kernel: usb 4-1: Product: BCM2045B Jun 2 11:39:10 t60p kernel: usb 4-1: Manufacturer: Broadcom Corp Jun 2 11:39:10 t60p kernel: usb 4-1: configuration #1 chosen from 1 choice Jun 2 11:39:10 t60p kernel: Bluetooth: Core ver 2.8 Jun 2 11:39:10 t60p kernel: NET: Registered protocol family 31 Jun 2 11:39:10 t60p kernel: Bluetooth: HCI device and connection manager initialized Jun 2 11:39:10 t60p kernel: Bluetooth: HCI socket layer initialized Jun 2 11:39:10 t60p kernel: Bluetooth: HCI USB driver ver 2.9 Jun 2 11:39:10 t60p kernel: usbcore: registered new driver hci_usb and the device shows up perfectly & nm-applet handles it which is great; at this point the hal output looks rather different: 3: udi = '/org/freedesktop/Hal/devices/usb_device_a5c_2110_noserial_if1' info.bus = 'usb' (string) info.linux.driver = 'hci_usb' (string) info.parent = '/org/freedesktop/Hal/devices/usb_device_a5c_2110_noserial' (string) info.product = 'USB Wireless Interface' (string) info.udi = '/org/freedesktop/Hal/devices/usb_device_a5c_2110_noserial_if1' (string) linux.hotplug_type = 1 (0x1) (int) linux.subsystem = 'usb' (string) linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.3/usb4/4-1/4-1:1.1' (string) linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:1d.3/usb4/4-1/4-1:1.1' (string) usb.bus_number = 4 (0x4) (int) usb.can_wake_up = true (bool) usb.configuration_value = 1 (0x1) (int) usb.device_class = 224 (0xe0) (int) usb.device_protocol = 1 (0x1) (int) usb.device_revision_bcd = 256 (0x100) (int) usb.device_subclass = 1 (0x1) (int) usb.interface.class = 224 (0xe0) (int) usb.interface.number = 1 (0x1) (int) usb.interface.protocol = 1 (0x1) (int) usb.interface.subclass = 1 (0x1) (int) usb.is_self_powered = true (bool) usb.linux.device_number = 3 (0x3) (int) usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.3/usb4/4-1/4-1:1.1' (string) usb.max_power = 0 (0x0) (int) usb.num_configurations = 1 (0x1) (int) usb.num_interfaces = 4 (0x4) (int) usb.num_ports = 0 (0x0) (int) usb.product = 'USB Wireless Interface' (string) usb.product_id = 8464 (0x2110) (int) usb.speed_bcd = 4608 (0x1200) (int) usb.vendor = 'Broadcom Corp.' (string) usb.vendor_id = 2652 (0xa5c) (int) usb.version_bcd = 512 (0x200) (int) ... 5: udi = '/org/freedesktop/Hal/devices/usb_device_a5c_2110_noserial_if0' info.bus = 'usb' (string) info.linux.driver = 'hci_usb' (string) info.parent = '/org/freedesktop/Hal/devices/usb_device_a5c_2110_noserial' (string) info.product = 'USB Wireless Interface' (string) info.udi = '/org/freedesktop/Hal/devices/usb_device_a5c_2110_noserial_if0' (string) linux.hotplug_type = 1 (0x1) (int) linux.subsystem = 'usb' (string) linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.3/usb4/4-1/4-1:1.0' (string) linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:1d.3/usb4/4-1/4-1:1.0' (string) usb.bus_number = 4 (0x4) (int) usb.can_wake_up = true (bool) usb.configuration_value = 1 (0x1) (int) usb.device_class = 224 (0xe0) (int) usb.device_protocol = 1 (0x1) (int) usb.device_revision_bcd = 256 (0x100) (int) usb.device_subclass = 1 (0x1) (int) usb.interface.class = 224 (0xe0) (int) usb.interface.number = 0 (0x0) (int) usb.interface.protocol = 1 (0x1) (int) usb.interface.subclass = 1 (0x1) (int) usb.is_self_powered = true (bool) usb.linux.device_number = 3 (0x3) (int) usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.3/usb4/4-1/4-1:1.0' (string) usb.max_power = 0 (0x0) (int) usb.num_configurations = 1 (0x1) (int) usb.num_interfaces = 4 (0x4) (int) usb.num_ports = 0 (0x0) (int) usb.product = 'USB Wireless Interface' (string) usb.product_id = 8464 (0x2110) (int) usb.speed_bcd = 4608 (0x1200) (int) usb.vendor = 'Broadcom Corp.' (string) usb.vendor_id = 2652 (0xa5c) (int) usb.version_bcd = 512 (0x200) (int) ... 52: udi = '/org/freedesktop/Hal/devices/pci_8086_4227' info.bus = 'pci' (string) info.linux.driver = 'ipw3945' (string) info.parent = '/org/freedesktop/Hal/devices/pci_8086_27d2' (string) info.product = 'PRO/Wireless 3945ABG Network Connection' (string) info.udi = '/org/freedesktop/Hal/devices/pci_8086_4227' (string) info.vendor = 'Intel Corporation' (string) linux.hotplug_type = 1 (0x1) (int) linux.subsystem = 'pci' (string) linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0' (string) linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0' (string) pci.device_class = 2 (0x2) (int) pci.device_protocol = 0 (0x0) (int) pci.device_subclass = 128 (0x80) (int) pci.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0' (string) pci.product = 'PRO/Wireless 3945ABG Network Connection' (string) pci.product_id = 16935 (0x4227) (int) pci.subsys_product = 'Unknown (0x1011)' (string) pci.subsys_product_id = 4113 (0x1011) (int) pci.subsys_vendor = 'Intel Corporation' (string) pci.subsys_vendor_id = 32902 (0x8086) (int) pci.vendor = 'Intel Corporation' (string) pci.vendor_id = 32902 (0x8086) (int) But of course -some of that may be bluetooth (?) The PCI device appears to show no difference in it's HAL output, to get the status you need to: /sys/bus/pci/drivers/ip*/*/rf_kill various bit-fields are available for hardware & software disablement. HTH.
I can confirm this rather null behaviour. My laptop also has an ipw3945 with a kill switch (bluetooth and wifi have separate switches) When the wifi is killed, at best the applet reports no signal but other wise is unaffected. When I re-enable the radio NetworkManager 'sometimes' reconnects the wireless though the intermittency appears to be related to the ipw3945 driver. (Michael, I notice you see some ifup messages eg. Jun 2 11:39:10 t60p ifup: NetworkManager will be advised to set up eth1 do you know what is generating those? I don't think I get that.)
*** Bug 423885 has been marked as a duplicate of this bug. ***
*** Bug 399472 has been marked as a duplicate of this bug. ***
*** Bug 334612 has been marked as a duplicate of this bug. ***
killswitch support has been committed to SVN: NM: revision 2604 applet: revision 88 If your laptop's killswitch is supported by HAL, NetworkManager will detect the switch state and act appropriately. If your laptop isn't currently supported by HAL 0.5.9 or later, the best course of action is to get it supported by HAL, and then it will magically work with NetworkManager.
(In reply to comment #5) > If your laptop's killswitch is supported by HAL, NetworkManager will detect the > switch state and act appropriately. If your laptop isn't currently supported > by HAL 0.5.9 or later, the best course of action is to get it supported by HAL, > and then it will magically work with NetworkManager. Hello! How can I tell if the killswitch is supported by HAL? The one on my computer generates some keycodes (which the kernel doesn't recognize), is that all it should do? (The kernel logs this in /var/log/messages: Jun 22 11:20:06 cimer kernel: [139201.632000] atkbd.c: Unknown key pressed (translated set 2, code 0x91 on isa0060/serio0). Jun 22 11:20:06 cimer kernel: [139201.632000] atkbd.c: Use 'setkeycodes e011 <keycode>' to make it known. with two different key-codes. The switch has three positions.)
It's probably best to file bugs in HAL bugzilla for rfkill support for your laptop. One approach would be to have an acpid callout that writes the new status to a file somewhere, and then modify the HAL killswitch callout to check that file.
But the weird thing is that the killswitch works when the computer was booted up with the switch in the "wireless allowed" position. I can turns off wireless and turn it on again. I don't know how the Network Manager notices it, but it does reconnect automatically when I turn wireless back on. However, if I start the computer with the wireless off, it never works at all until the next reboot. I tried restarting the Network Manager, with no result. (Actually, there is no "eth1" interface at all, although the drivers (and the ipw3945 daemons) are loaded and working. I can't tell where exactly is the problem. As the original poster mentioned, the killswitch position _is_ detected at start-up, there's even a warning about it. So I don't know where the problem is. (In reply to comment #7) > It's probably best to file bugs in HAL bugzilla for rfkill support for your > laptop.