4. rfkill
• rfkill is a RF switch subsystem in Network subsystem
in Linux Kernel
code path: net/rfkill
• Kernel Doc:
Documentation/rfkill.txt
Documentation/ABI/stable/sysfs-class-rfkill
Documentation/ABI/obsolete/sysfs-class-rfkill
• In Documentation/rfkill.txt
The rfkill subsystem provides a generic interface to disabling any
4
5. states of rfkill
• unblock
Transmitter is (potentially) active
• hard block:
Transmitter is forced off by something outside of the drivers control.
Read-only radio block that can not be overriden by software.
• soft block:
Transmitter is turned off by software
Writable radio block (need not be readable) that is set by the system
• Interface to user space
/dev/rfkill
/sys/class/rfkill/rfkill[0-9]+/state
5
7. Not only one layer touch rfkill state
• Hardware
Hardware switch, button
• BIOS/EC
BIOS option, Fn+F? function key
• Linux Kernel
rfkill-input
platform driver
• User space
HAL
NetworkManager, Gnome-bluetooth
urfkill
7
8. Whole picture
• rfkill is a RF switch subsystem in
Second-level bullet (20 pt)
Third-level bullet (16pt)
Fourth-level bullet (14pt)
8
10. urfkill
• Main page
http://www.freedesktop.org/wiki/Software/urfkill/
For the laptop and mobile devices users, the management of the radio
• The latest release is 0.4.0
https://github.com/lcp/urfkill
• Founder/Maintainer: glin@suse.com
• Installation: zypper in urfkill
• [RFC] propose to develop a rfkill daemon on freedesktop:
http://www.mail-archive.com/devkit-devel@lists.freedesktop.org/msg00832.html
10
11. Functions
• Broadcast rfkill state changed event to DBus for
registered userland applications.
• Provide DBus interface for userland applications to
block/unblock rfkill.
liburfkill-glib: provide Gobjects binding
• Use PolicyKit for system-wide privileges.
• Send RFKILL_IOCTL_NOINPUT by ioctl to disable
rfkill-input function.
c64fb01627e24725d1f9d535e4426475a4415753
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=
11
12. Configuration
• /etc/urfkill/urfkill.conf
key_control=true
# This variable is to enable/disable the key control function
master_key=false
# A master key is a key that controls all killswitches
force_sync=false
# This variable is to enable/disable the key control function
• /etc/urfkill/profile/*.xml (10-asus-settings.xml, 10-lenovo-settings.xml)
<match key="sys_vendor" contains_ncase="asus">
<match key="product_name" string="1005HA">
<option key="key_control" type="bool">true</option>
<option key="master_key" type="bool">true</option>
<option key="force_sync" type="bool">false</option>
</match>
</match>
12
15. Corporate Headquarters +49 911 740 53 0 (Worldwide) Join us on:
Maxfeldstrasse 5 www.suse.com www.opensuse.org
90409 Nuremberg
Germany
15
16. Unpublished Work of SUSE. All Rights Reserved.
This work is an unpublished work and contains confidential, proprietary and trade secret information of SUSE.
Access to this work is restricted to SUSE employees who have a need to know to perform tasks within the scope of
their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated,
abridged, condensed, expanded, collected, or adapted without the prior written consent of SUSE.
Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability.
General Disclaimer
This document is not to be construed as a promise by any participating company to develop, deliver, or market a
product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making
purchasing decisions. SUSE makes no representations or warranties with respect to the contents of this document,
and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. The
development, release, and timing of features or functionality described for SUSE products remains at the sole
discretion of SUSE. Further, SUSE reserves the right to revise this document and to make changes to its content, at
any time, without obligation to notify any person or entity of such revisions or changes. All SUSE marks referenced in
this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All
third-party trademarks are the property of their respective owners.