Re: bluetooth off state not remembered accross reboots?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry for digging up such an old thread, but I am afflicted by the
same problem and just recently found time to investigate.

On Sat, 2009-10-10 at 13:49 -0300, Henrique de Moraes Holschuh wrote:
> On Sat, 10 Oct 2009, Yves-Alexis Perez wrote:
>> since some time (I guess 2.6.29 or 2.6.30 kernel), it seems that the
>> bluetooth ???off??? state isn't remembered on my T61.
> 
> The driver can remember state, yes. It *might* not work though. And it can
> be overriden by userspace.

The symptoms that I am observing on a T60p:
* Boot into single-user mode and kill everything (including udev)
* echo 0 > /sys/devices/platform/thinkpad_acpi/bluetooth_enable
  (bluetooth light is now off and it disappears from the USB bus)
* modprobe -r thinkpad_acpi
* modprobe thinkpad_acpi
  (bluetooth light back on and device reappears on USB bus)

Additionally, note that I have "options rfkill default_state=0" set in
modprobe.conf.d, if that is relevant.

With some more investigation and judicious use of dump_stack(), I have
put together the following call sequences that occur during modprobe
of thinkpad_acpi:
First, bluetooth is initialized and blocked:
thinkpad_acpi: bluetooth_init: bluetooth is supported, status 0x01
thinkpad_acpi: tpacpi_rfk_hook_set_block: request to change radio state to blocked
Pid: 1444, comm: modprobe Not tainted 2.6.31.6 #24
Call Trace:
 [<f8681d79>] tpacpi_rfk_hook_set_block+0x39/0x5c [thinkpad_acpi]
 [<f81543f4>] rfkill_set_block+0x6b/0xad [rfkill]
 [<f81544cc>] __rfkill_switch_all+0x2d/0x50 [rfkill]
 [<f8154fd4>] rfkill_register+0x183/0x1c7 [rfkill]
 [<f868f8f5>] tpacpi_new_rfkill+0xc4/0xfe [thinkpad_acpi]
 [<f868fc9d>] bluetooth_init+0x10e/0x13c [thinkpad_acpi]
 [<f8690245>] thinkpad_acpi_module_init+0x57a/0x909 [thinkpad_acpi]
 [<f868fccb>] ? thinkpad_acpi_module_init+0x0/0x909 [thinkpad_acpi]
 [<c1001139>] do_one_initcall+0x4c/0x131
 [<c1052c4d>] sys_init_module+0xa7/0x1b7
 [<c1002af0>] sysenter_do_call+0x12/0x22
thinkpad_acpi: bluetooth_set_status: will attempt to disable bluetooth

Then, the radio is unblocked by rfkill_switch_all which is queued by
rfkill_schedule_evsw_rfkillall as part of input_register_device:
Pid: 1444, comm: modprobe Not tainted 2.6.31.6 #24
Call Trace:
 [<c127f90d>] ? printk+0xf/0x12
 [<f81552ef>] rfkill_schedule_evsw_rfkillall+0x1c/0x33 [rfkill]
 [<f815533c>] rfkill_start+0x36/0x46 [rfkill]
 [<c11f599a>] input_register_handle+0x6a/0x74
 [<f81554af>] rfkill_connect+0x99/0xc6 [rfkill]
 [<c11f5502>] input_attach_handler+0x33/0x66
 [<c11f6288>] input_register_device+0x140/0x186
 [<f8690505>] thinkpad_acpi_module_init+0x83a/0x909 [thinkpad_acpi]
 [<f868fccb>] ? thinkpad_acpi_module_init+0x0/0x909 [thinkpad_acpi]
 [<c1001139>] do_one_initcall+0x4c/0x131
 [<c1052c4d>] sys_init_module+0xa7/0x1b7
 [<c1002af0>] sysenter_do_call+0x12/0x22
thinkpad_acpi: tpacpi_rfk_hook_set_block: request to change radio state to unblocked
Pid: 7, comm: events/0 Not tainted 2.6.31.6 #24
Call Trace:
 [<f8681d79>] tpacpi_rfk_hook_set_block+0x39/0x5c [thinkpad_acpi]
 [<f81543f4>] rfkill_set_block+0x6b/0xad [rfkill]
 [<f81544cc>] __rfkill_switch_all+0x2d/0x50 [rfkill]
 [<f8154560>] rfkill_switch_all+0x2f/0x3d [rfkill]
 [<f8155153>] rfkill_op_handler+0x8b/0x152 [rfkill]
 [<c103c749>] worker_thread+0x16f/0x200
 [<f81550c8>] ? rfkill_op_handler+0x0/0x152 [rfkill]
 [<c1040161>] ? autoremove_wake_function+0x0/0x33
 [<c103c5da>] ? worker_thread+0x0/0x200
 [<c103fe7e>] kthread+0x6e/0x73
 [<c103fe10>] ? kthread+0x0/0x73
 [<c100364f>] kernel_thread_helper+0x7/0x10
thinkpad_acpi: bluetooth_set_status: will attempt to enable bluetooth

So, is there something that I am missing?  Should some userspace
daemon be setting the bluetooth to blocked on boot if I prefer it that
way?  Or is this just a bug (and would you prefer that I bugzilla it)?

Thanks,
Kevin

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel

[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux