[ltp] save bluetooth state accross reboots?

Paul Bolle linux-thinkpad@linux-thinkpad.org
Tue, 05 Mar 2013 22:22:51 +0100


On Tue, 2013-03-05 at 21:31 +0100, Yves-Alexis Perez wrote:
> on my T61, afair, when I shut bluetooth down using rfkill, the off state
> if remembered across reboots. It does not happen on my x201s, where
> bluetooth gets reenabled at each boot. Is there a way to make it keep
> the state (on or off), other than storing a variable somewhere in the
> filesystem?

I looked into this (about a year ago). I seem to remember that this is
caused by the interaction between the thinkpad_acpi and rfkill kernel
modules.

Ie, the thinkpad_acpi kernel module saves the bluetooth state (off) in
(I think) NVRAM on shutdown. On boot it checks that state and leaves
bluetooth off (or turns it off, I forgot). But after that the rfkill
kernel module overrules the bluetooth state. That module checks the
rfkill switch of your x201s and turns both bluetooth and wlan on (if
that switch is in the "on" position). It doesn't know about the
thinkpad_acpi stuff.

I don't think there's a configuration possible that leaves bluetooth
always off while leaving wlan always on. And it looked like rfkill would
need some mayor changes to allow that behavior.

Anyone with more luck in solving this issue?


Paul Bolle