Bug 12125 - bt stops working after suspend/resume
Summary: bt stops working after suspend/resume
Status: CLOSED OBSOLETE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Bluetooth (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_bluetooth@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-30 08:08 UTC by Johannes Berg
Modified: 2012-05-29 07:12 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.28-rc6-wl-dirty
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Johannes Berg 2008-11-30 08:08:41 UTC
Latest working kernel version: unknown
Earliest failing kernel version: unknown
Distribution: debian/unstable
Hardware Environment: powerbook
Software Environment: btusb
Problem Description: bluetooth stops working after suspend/resume

Steps to reproduce:

suspend laptop, resume:

# hcitool scan
Device is not available: No such device

# sdptool browse
Inquiring ...
Inquiry failed


I'm fairly sure this used to work (most of the time at least!) with hci-usb.
Comment 1 Anonymous Emailer 2008-11-30 10:37:28 UTC
Reply-To: akpm@linux-foundation.org


(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Sun, 30 Nov 2008 08:08:42 -0800 (PST) bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=12125
> 
>            Summary: bt stops working after suspend/resume
>            Product: Drivers
>            Version: 2.5
>      KernelVersion: 2.6.28-rc6-wl-dirty
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Bluetooth
>         AssignedTo: drivers_bluetooth@kernel-bugs.osdl.org
>         ReportedBy: johannes@sipsolutions.net
> 
> 
> Latest working kernel version: unknown
> Earliest failing kernel version: unknown
> Distribution: debian/unstable
> Hardware Environment: powerbook
> Software Environment: btusb
> Problem Description: bluetooth stops working after suspend/resume
> 
> Steps to reproduce:
> 
> suspend laptop, resume:
> 
> # hcitool scan
> Device is not available: No such device
> 
> # sdptool browse
> Inquiring ...
> Inquiry failed
> 
> 
> I'm fairly sure this used to work (most of the time at least!) with hci-usb.
> 
Comment 2 Eddy Petrișor 2009-05-20 21:43:26 UTC
After reading the title the bug I am experiencing seems to be the same, but I am unsure after reading the contents. Either way, I hope somebody will care enough to inspect and fix the merging/cloning, but most important, the bug.




I am unable to use bluetooth after a hibernate/resume cycle with any of the pristine kernels I've tried: 2.6.27, 2.6.29-rc7, 2.6.29, 2.6.30-rc6, unless I restart the bluetooth stack (after killing the application  running on top).


OTOH it seems the official Debian kernels are not affected by this bug (or at least 2.6.26-1-amd64, 2.6.26-2-amd64, aren't) and I am able to use bluetooth after resume on the mentioned kernels.


I tried compiling a pristine 2.6.26 in order to get a diff between the sources, but it seems the Debian kernel is patched in some ways because the bluetooth and wifi cards were unusable with that kernel (no,  they were not disabled, ttbomk).

What is weird is that the Debian kernel team policy is to not accept patches unless they were accepted upstream which should mean that prisine newer kernels shouldn't be affected by this bug (in theory).




If official kernels would allow me to use the bluetooth stack after a resume, that would be great.





Oh, just remembered something which might or might not be useful: my phone sees the id of the laptop after laptop's resume as "CSR - bc4" as opposed to "heidi" which is what it should be.
Comment 3 Eddy Petrișor 2009-05-20 21:57:30 UTC
Yay, I just got an oops from the kernel right after sending my comment, after trying to manually close all apps running on top of bluetooth since before the hibernation (meanwhile, since usually I run only run the gnome-obex-server, I forgot to also kill blueproximity, and restarted the bluetooth services, but left blueproximity open).  Upon closing blueproximity the kernel oops-ed:


[17782.648568] kobject_add_internal failed for hci0:42 with -EEXIST, don't try to register things with the same name in the same directory.
[17782.648578] Pid: 1828, comm: bluetooth Tainted: G        W  2.6.30-rc6-heidi #1
[17782.648583] Call Trace:
[17782.648590]  [<ffffffff8034b1a1>] ? kobject_add_internal+0x175/0x188
[17782.648599]  [<ffffffff8034b361>] ? kobject_add+0x74/0x7c
[17782.648620]  [<ffffffffa024d4e5>] ? add_conn+0x0/0x97 [bluetooth]
[17782.648629]  [<ffffffff803c27f5>] ? dev_set_name+0x4d/0x55
[17782.648637]  [<ffffffff8047e41a>] ? _spin_lock+0x5/0x8
[17782.648645]  [<ffffffff802b59e3>] ? cache_alloc_refill+0x19e/0x200
[17782.648666]  [<ffffffffa024d4e5>] ? add_conn+0x0/0x97 [bluetooth]
[17782.648675]  [<ffffffff8034afb4>] ? kobject_get+0x12/0x17
[17782.648683]  [<ffffffff803c2d08>] ? get_device+0x14/0x1a
[17782.648690]  [<ffffffff803c3523>] ? device_add+0x13c/0x5f4
[17782.648698]  [<ffffffff8034af44>] ? kobject_release+0x0/0x5e
[17782.648719]  [<ffffffffa024d4e5>] ? add_conn+0x0/0x97 [bluetooth]
[17782.648739]  [<ffffffffa024d524>] ? add_conn+0x3f/0x97 [bluetooth]
[17782.648747]  [<ffffffff8024a686>] ? worker_thread+0x17d/0x220
[17782.648756]  [<ffffffff8024df0e>] ? autoremove_wake_function+0x0/0x2e
[17782.648764]  [<ffffffff8024a509>] ? worker_thread+0x0/0x220
[17782.648771]  [<ffffffff8024a509>] ? worker_thread+0x0/0x220
[17782.648778]  [<ffffffff8024db56>] ? kthread+0x54/0x80
[17782.648786]  [<ffffffff8020caca>] ? child_rip+0xa/0x20
[17782.648794]  [<ffffffff8024db02>] ? kthread+0x0/0x80
[17782.648802]  [<ffffffff8020cac0>] ? child_rip+0x0/0x20
[17782.648807] add_conn: Failed to register connection device
[17789.822025] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
[17789.822039] IP: [<ffffffff8046c5af>] klist_put+0x1a/0x86
[17789.822055] PGD b88e4067 PUD b85af067 PMD 0 
[17789.822065] Oops: 0000 [#1] SMP 
[17789.822071] last sysfs file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
[17789.822078] CPU 0 
[17789.822083] Modules linked in: uvcvideo xt_multiport iptable_filter ip_tables x_tables i915 drm i2c_algo_bit i2c_core binfmt_misc rfcomm l2cap kvm_intel kvm ppdev parport_pc lp parport ipv6 acpi_cpufreq cpufreq_conservative cpufreq_ondemand cpufreq_userspace cpufreq_stats freq_table cpufreq_powersave microcode fuse dm_crypt usbvideo videodev v4l1_compat v4l2_compat_ioctl32 michael_mic aes_x86_64 aes_generic coretemp loop joydev snd_hda_codec_intelhdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_pcm_oss snd_mixer_oss snd_pcm arc4 ecb snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event iwlagn iwlcore snd_seq psmouse rfkill btusb snd_timer snd_seq_device serio_raw battery video pcspkr ac bluetooth mac80211 output iTCO_wdt button processor snd soundcore snd_page_alloc intel_agp cfg80211 evdev ext3 jbd mbcache usbhid hid dm_mirror dm_region_hash dm_log dm_snapshot dm_mod sg sr_mod cdrom sd_mod ata_generic sdhci_pci sdhci mmc_core led_class ata_piix libata scsi_mod ide_pci_generic ide_core r8169 mii ehci_hcd uhci_hcd thermal fan thermal_sys
[17789.822279] Pid: 1828, comm: bluetooth Tainted: G        W  2.6.30-rc6-heidi #1 MSI Notebook PR200
[17789.822286] RIP: 0010:[<ffffffff8046c5af>]  [<ffffffff8046c5af>] klist_put+0x1a/0x86
[17789.822297] RSP: 0018:ffff8800bcc7be30  EFLAGS: 00010246
[17789.822303] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000012
[17789.822309] RDX: 0000000000000003 RSI: 0000000000000001 RDI: 0000000000000000
[17789.822315] RBP: ffff880045987628 R08: 0000000000000009 R09: 0000000000002514
[17789.822322] R10: ffff8800bee452b0 R11: 0000000000000000 R12: ffff8800bc1c9378
[17789.822328] R13: ffff8800aa1bbd01 R14: ffff8800bbd8a900 R15: ffffffffa024d422
[17789.822336] FS:  0000000000000000(0000) GS:ffff88000101c000(0000) knlGS:0000000000000000
[17789.822343] CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
[17789.822349] CR2: 0000000000000020 CR3: 00000000bbd01000 CR4: 00000000000026e0
[17789.822355] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[17789.822362] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[17789.822369] Process bluetooth (pid: 1828, threadinfo ffff8800bcc7a000, task ffff8800bbd8a900)
[17789.822375] Stack:
[17789.822378]  0000000000000000 ffff8800aa1bbd50 ffff8800aa1bbd50 ffff8800bc1c9378
[17789.822388]  ffff8800aa1bbd38 ffffffff803c324d 0000000000000000 ffff8800aa1bbd50
[17789.822399]  ffff8800bc1c9000 ffffffffa024d48a ffff880001033ec0 ffff880001033ec0
[17789.822411] Call Trace:
[17789.822415]  [<ffffffff803c324d>] ? device_del+0x4d/0x163
[17789.822430]  [<ffffffffa024d48a>] ? del_conn+0x68/0xa0 [bluetooth]
[17789.822453]  [<ffffffff8024a686>] ? worker_thread+0x17d/0x220
[17789.822463]  [<ffffffff8024df0e>] ? autoremove_wake_function+0x0/0x2e
[17789.822474]  [<ffffffff8024a509>] ? worker_thread+0x0/0x220
[17789.822482]  [<ffffffff8024a509>] ? worker_thread+0x0/0x220
[17789.822490]  [<ffffffff8024db56>] ? kthread+0x54/0x80
[17789.822499]  [<ffffffff8020caca>] ? child_rip+0xa/0x20
[17789.822510]  [<ffffffff8024db02>] ? kthread+0x0/0x80
[17789.822518]  [<ffffffff8020cac0>] ? child_rip+0x0/0x20
[17789.822526] Code: 89 e7 41 ff d5 48 8b 45 08 5a 5b 5d 41 5c 41 5d c3 41 55 41 88 f5 41 54 55 48 89 fd 53 48 83 ec 08 48 8b 1f 48 83 e3 fe 48 89 df <4c> 8b 63 20 e8 5d 1e 01 00 45 84 ed 74 1c f6 45 00 01 74 11 be 
[17789.822606] RIP  [<ffffffff8046c5af>] klist_put+0x1a/0x86
[17789.822616]  RSP <ffff8800bcc7be30>
[17789.822620] CR2: 0000000000000020
[17789.822632] ---[ end trace 30f25969274cb15d ]---





Just before this, there was another one, probably triggered by the closing of the gnome-obex-server application:

[17782.647914] ------------[ cut here ]------------
[17782.647927] WARNING: at fs/sysfs/dir.c:487 sysfs_add_one+0xc0/0xd4()
[17782.647933] Hardware name: MSI Notebook PR200
[17782.647937] sysfs: cannot create duplicate filename '/class/bluetooth/hci0/hci0:42'
[17782.647942] Modules linked in: uvcvideo xt_multiport iptable_filter ip_tables x_tables i915 drm i2c_algo_bit i2c_core binfmt_misc rfcomm l2cap kvm_intel kvm ppdev parport_pc lp parport ipv6 acpi_cpufreq cpufreq_conservative cpufreq_ondemand cpufreq_userspace cpufreq_stats freq_table cpufreq_powersave microcode fuse dm_crypt usbvideo videodev v4l1_compat v4l2_compat_ioctl32 michael_mic aes_x86_64 aes_generic coretemp loop joydev snd_hda_codec_intelhdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_pcm_oss snd_mixer_oss snd_pcm arc4 ecb snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event iwlagn iwlcore snd_seq psmouse rfkill btusb snd_timer snd_seq_device serio_raw battery video pcspkr ac bluetooth mac80211 output iTCO_wdt button processor snd soundcore snd_page_alloc intel_agp cfg80211 evdev ext3 jbd mbcache usbhid hid dm_mirror dm_region_hash dm_log dm_snapshot dm_mod sg sr_mod cdrom sd_mod ata_generic sdhci_pci sdhci mmc_core led_class ata_piix libata scsi_mod ide_pci_generic ide_core r8169 mii ehci_hcd uhci_hcd thermal fan thermal_sys
[17782.648170] Pid: 1828, comm: bluetooth Tainted: G        W  2.6.30-rc6-heidi #1
[17782.648175] Call Trace:
[17782.648185]  [<ffffffff80308491>] ? sysfs_add_one+0xc0/0xd4
[17782.648193]  [<ffffffff80308491>] ? sysfs_add_one+0xc0/0xd4
[17782.648203]  [<ffffffff8023b601>] ? warn_slowpath_common+0x77/0xa3
[17782.648212]  [<ffffffff8023b689>] ? warn_slowpath_fmt+0x51/0x59
[17782.648220]  [<ffffffff803083c9>] ? sysfs_pathname+0x35/0x3d
[17782.648247]  [<ffffffffa024d4e5>] ? add_conn+0x0/0x97 [bluetooth]
[17782.648255]  [<ffffffff803083c9>] ? sysfs_pathname+0x35/0x3d
[17782.648263]  [<ffffffff803083c9>] ? sysfs_pathname+0x35/0x3d
[17782.648284]  [<ffffffffa024d4e5>] ? add_conn+0x0/0x97 [bluetooth]
[17782.648292]  [<ffffffff803083c9>] ? sysfs_pathname+0x35/0x3d
[17782.648299]  [<ffffffff80308491>] ? sysfs_add_one+0xc0/0xd4
[17782.648307]  [<ffffffff80308a49>] ? create_dir+0x4f/0x87
[17782.648315]  [<ffffffff80308ab6>] ? sysfs_create_dir+0x35/0x4a
[17782.648325]  [<ffffffff8034afb4>] ? kobject_get+0x12/0x17
[17782.648333]  [<ffffffff8034b0fe>] ? kobject_add_internal+0xd2/0x188
[17782.648341]  [<ffffffff8034b361>] ? kobject_add+0x74/0x7c
[17782.648362]  [<ffffffffa024d4e5>] ? add_conn+0x0/0x97 [bluetooth]
[17782.648373]  [<ffffffff803c27f5>] ? dev_set_name+0x4d/0x55
[17782.648383]  [<ffffffff8047e41a>] ? _spin_lock+0x5/0x8
[17782.648391]  [<ffffffff802b59e3>] ? cache_alloc_refill+0x19e/0x200
[17782.648413]  [<ffffffffa024d4e5>] ? add_conn+0x0/0x97 [bluetooth]
[17782.648421]  [<ffffffff8034afb4>] ? kobject_get+0x12/0x17
[17782.648430]  [<ffffffff803c2d08>] ? get_device+0x14/0x1a
[17782.648438]  [<ffffffff803c3523>] ? device_add+0x13c/0x5f4
[17782.648445]  [<ffffffff8034af44>] ? kobject_release+0x0/0x5e
[17782.648466]  [<ffffffffa024d4e5>] ? add_conn+0x0/0x97 [bluetooth]
[17782.648487]  [<ffffffffa024d524>] ? add_conn+0x3f/0x97 [bluetooth]
[17782.648495]  [<ffffffff8024a686>] ? worker_thread+0x17d/0x220
[17782.648505]  [<ffffffff8024df0e>] ? autoremove_wake_function+0x0/0x2e
[17782.648513]  [<ffffffff8024a509>] ? worker_thread+0x0/0x220
[17782.648520]  [<ffffffff8024a509>] ? worker_thread+0x0/0x220
[17782.648528]  [<ffffffff8024db56>] ? kthread+0x54/0x80
[17782.648537]  [<ffffffff8020caca>] ? child_rip+0xa/0x20
[17782.648545]  [<ffffffff8024db02>] ? kthread+0x0/0x80
[17782.648552]  [<ffffffff8020cac0>] ? child_rip+0x0/0x20
[17782.648558] ---[ end trace 30f25969274cb15c ]---



I hope this helps.
Comment 4 Alan 2012-05-22 18:49:39 UTC
Is this still showing up in modern kernels ?
Comment 5 Johannes Berg 2012-05-29 07:12:44 UTC
I have no idea, that powerbook has been decomissioned.

Note You need to log in before you can comment on or make changes to this bug.