From: Darren Salt <linux@youmustbejoking.demon.co.uk>
To: Thiemo Nagel <thiemo.nagel@ph.tum.de>
Cc: Corentin Chary <corentin.chary@gmail.com>,
Johannes Berg <johannes@sipsolutions.net>,
debian-eeepc-devel@lists.alioth.debian.org,
acpi4asus-user@lists.sourceforge.net,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [2.6.31-rc2] Writing to /sys/class/rfkill/*/state fails
Date: Fri, 10 Jul 2009 19:57:50 +0100 [thread overview]
Message-ID: <507E3B9268%linux@youmustbejoking.demon.co.uk> (raw)
In-Reply-To: <4A575119.9070505@ph.tum.de>
[full quoting for linux-{kernel,wireless} & the perpetrator]
I demand that Thiemo Nagel may or may not have written...
> Corentin Chary wrote:
>> On Fri, Jul 10, 2009 at 3:35 PM, Thiemo Nagel<thiemo.nagel@ph.tum.de>
>> wrote:
>>> Corentin Chary wrote:
>>>> On Fri, Jul 10, 2009 at 12:23 PM, Thiemo
>>>> Nagel<thiemo.nagel@ph.tum.de> wrote:
>>>>> I just tested the new GSM rfkill in 2.6.31-rc2 and I get the following
>>>>> on my EeePC 1000HGO:
>>>>> eee:/# cat /sys/class/rfkill/rfkill2/name
>>>>> eeepc-wwan3g
>>>>> eee:/# echo 0 > /sys/class/rfkill/rfkill2/state
>>>>> bash: echo: write error: Operation not permitted
>>>>> What could be the reason for that?
>>>> Reading the kernel source I can find:
>>>> /*
>>>> * The intention was that userspace can only take control over
>>>> * a given device when/if rfkill-input doesn't control it due
>>>> * to user_claim. Since user_claim is currently unsupported,
>>>> * we never support changing the state from userspace -- this
>>>> * can be implemented again later.
>>>> */
>>>> It seems that rfkill should be controlled by /dev/rfkill (cf
>>>> Documentation/rfkill.txt).
>>>> Maybe network-manager can control that .. But I'm not sure.
>>>> Maybe you should CC the wireless mailing list.
>>> Thanks for the quick reply. The interesting thing is, that the direct
>>> access works well for eeepc-wlan and eeepc-bluetooth rfkills. I've CC'd
>>> debian-eeepc-devel, maybe they know something.
>> Are you sure that it works with newer kernels ?
>> This commit should have broken it for all rfkill.
>> commit 19d337dff95cbf76edd3ad95c0cee2732c3e1ec5
>> Author: Johannes Berg <johannes@sipsolutions.net>
>> Date: Tue Jun 2 13:01:37 2009 +0200
> You're right, all rfkills work with 2.6.30, but none works with 2.6.31-rc2.
This is the first that I've heard of this. I'd not noticed since I've not
needed Bluetooth on my 901 recently.
> For the debian-eeepc folks: 2.6.31-rc2 breaks bluetooth toggling using
> eeepc-acpi-scripts, but WLAN toggling still works.
FSVO "works" (http://bugzilla.kernel.org/show_bug.cgi?id=13390), but that's a
different problem.
I consider this a regression. It breaks an interface which, though flawed, is
ideally suited for scripting use and which eeepc-acpi-scripts uses in shell
scripts.
/dev/rfkill is not useful in shell scripts.
Trying to read from it to determine the current state (and only the current
state) results in the shell effectively hanging, and parsing is less than
trivial. So either we continue to use .../state or eeepc-acpi-scripts needs a
complete rewrite of the ACPI event-handling scripts in something other than
sh (probably perl) and would need a daemon instead of having scripts launched
from acpid (well, that or they'd need a helper binary or two).
Writing to it is doable, though slightly interesting. "echo 1 >/..." is
ideal.
We can't just drop support for older kernels ‒ at least, not yet – though
fortunately, prior to this breakage, all that we had to cope with were
changed file names; the content can be treated identically. We don't have to
deal with hard-blocked states, which helps...
--
| Darren Salt | linux at youmustbejoking | nr. Ashington, | Doon
| using Debian GNU/Linux | or ds ,demon,co,uk | Northumberland | Army
| + Buy local produce. Try to walk or cycle. TRANSPORT CAUSES GLOBAL WARMING.
Passwords are implemented as a result of insecurity.
next parent reply other threads:[~2009-07-10 19:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4A5716AA.5000903@ph.tum.de>
[not found] ` <71cd59b00907100545v6f440a19xfc3668826eb1e509@mail.gmail.com>
[not found] ` <4A5743AB.6090303@ph.tum.de>
[not found] ` <71cd59b00907100646h5e0283fcyce5874cc4a19106b@mail.gmail.com>
[not found] ` <4A575119.9070505@ph.tum.de>
2009-07-10 18:57 ` Darren Salt [this message]
2009-07-10 19:34 ` [2.6.31-rc2] Writing to /sys/class/rfkill/*/state fails Corentin Chary
2009-07-10 19:37 ` Marcel Holtmann
2009-07-10 19:41 ` [PATCH 2.6.31] rfkill: allow toggling soft state in sysfs again Johannes Berg
2009-07-10 21:09 ` Darren Salt
2009-07-10 21:55 ` Johannes Berg
2009-07-10 23:09 ` Darren Salt
2009-07-25 20:56 ` [Acpi4asus-user] " Rafael J. Wysocki
2009-07-25 22:35 ` John W. Linville
2009-07-26 19:32 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=507E3B9268%linux@youmustbejoking.demon.co.uk \
--to=linux@youmustbejoking.demon.co.uk \
--cc=acpi4asus-user@lists.sourceforge.net \
--cc=corentin.chary@gmail.com \
--cc=debian-eeepc-devel@lists.alioth.debian.org \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=thiemo.nagel@ph.tum.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).