[ltp] Re: [ibm-acpi-devel] thinkpad-acpi release 0.21-20080612 uploaded to ibm-acpi.sf.net

linux-thinkpad@linux-thinkpad.org linux-thinkpad@linux-thinkpad.org
Fri, 13 Jun 2008 20:44:41 +0200 (CEST)


>> Running 2.6.26-rc6 on a X31, I get Bluetooth autoenabled during boot.
>> That does not happen with 2.6.26-rc5 (and the included tpacpi).
>> I did not yet have the time to test if this also happens with
>> 2.6.26-rc6 without tpacpi 0.21-20080612, but wanted to let you know
>> ASAP.
>
> There are going to be differences to the initial state of WWAN and
> Bluetooth, now.  rfkill will set that state, and it does not depend on the
> thinkpad firmware defaults (however, if the radio is blocked by any
> hardware
> switch, it will NOT turn on).  Default state for rfkill is to ENABLE
> radios
> for now (which I don't agree with, but I didn't change it).  One of the
> changes I made to rfkill is to let you set (with a module parameter) that
> initial state to DISABLED.

Okay, that brings some light :)
So giving default_state=0 to the rfkill module should bring it in my
wanted "first-always-off" state.

> Basically, now there is something else talking to thinkpad-acpi to set
> WWAN
> and Bluetooth radio state, so you may observe different behaviour.  As
> long
> as it is coherent behaviour, that's fine (but see below).
>
> So, please check if you can enable/disable the radios properly.  If you
> can,
> and what changed was the initial state only, it is all fine (but we can
> track down the reason for the initial state change if you want.  I find it
> interesting that it is now "disabled" for you, I distinctly remember it
> was
> supposed to be "enabled" unless you override that yourself).

I can switch Bluetooth perfectly, via Fn+F5, /proc/acpi/ibm/bluetooth and
/sys/class/rfkill/rfkill0/state. And changing it on the one way, displays
the state correctly in the others too.
It's just the fact BT is per default on (unless I give it the
default_state parameter).
Btw, are you refering en/disabled to rfkill? Or to the radio? As rfkill
enabled means radio disabled (or did mean?). But it seems to work as it
should.

> It *is* possible that we have a logic inversion bug (enable when it should
> be disabled), either in the rfkill stuff or in the thinkpad stuff, and
> that's something I would really want to track down and fix FAST! ;-)
>
> rfkill works like this:
>
> status 0 -> radio is NOT SUPPOSED TO WORK.
> status 1 -> radio MAY work (if you tell it to).
>
> The "if you tell it to" might not apply to bluetooth, but it does for WLAN
> and friends where you need to setup the interface with an IP, ESSID, etc.
> And propably to WWAN as well.

radio DOES work in status 1, there is nothing to configure.
Looks like there are no bugs, just a surprise in the default state.
It would be awesome if you could read the old state from the firmware and
set it exactly the same, but off on boot is okay for me.

Regards and many thanks
Evgeni

PS: sorry if I break threading, using webmail atm