[Asus 1215p] bluetooth is not enabled after come back from suspend

Bug #812132 reported by TienFu Chen
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
bluez (Ubuntu)
High
Unassigned
Natty
High
Jesse Sung
linux (Ubuntu)
Medium
Keng-Yu Lin
Natty
Medium
Keng-Yu Lin

Bug Description

Bluetooth is enabled before entering suspend, after come back from suspend, bluetooth device is not visible(hcitool dev).
However I can turn it on manually(click "Turn off bluetooth" then click "Turn on bluetooth on the bluetooth icon of task bar)

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: linux-image-2.6.38-8-generic 2.6.38-8.42
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
NonfreeKernelModules: wl
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC269VB Analog [ALC269VB Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC269VB Analog [ALC269VB Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: ubuntu 1289 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf7cf8000 irq 46'
   Mixer name : 'Realtek ALC269VB'
   Components : 'HDA:10ec0269,1043841c,00100100'
   Controls : 11
   Simple ctrls : 7
Date: Mon Jul 18 02:12:47 2011
HibernationDevice: RESUME=UUID=57d847d1-ba57-4f28-9cd7-c1c568138829
InstallationMedia:

MachineType: ASUSTeK Computer INC. 1215P
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic root=UUID=3ef783e8-c66b-480b-ba55-b4c649e69c43 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-2.6.38-8-generic N/A
 linux-backports-modules-2.6.38-8-generic N/A
 linux-firmware 1.52
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/18/2011
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0601
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: 1215P
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: x.xx
dmi.chassis.asset.tag: 0x00000000
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK Computer INC.
dmi.chassis.version: x.x
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0601:bd04/18/2011:svnASUSTeKComputerINC.:pn1215P:pvrx.x:rvnASUSTeKComputerINC.:rn1215P:rvrx.xx:cvnASUSTeKComputerINC.:ct10:cvrx.x:
dmi.product.name: 1215P
dmi.product.version: x.x
dmi.sys.vendor: ASUSTeK Computer INC.

Revision history for this message
TienFu Chen (ctf) wrote :
Revision history for this message
Anthony Wong (anthonywong) wrote :

Tim, can you do an update and test with the 2.6.38-10.46 kernel again?

Changed in linux (Ubuntu):
assignee: nobody → Tim Chen (ctf)
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
TienFu Chen (ctf) wrote :

Bug remains with 2.6.38-10.46 kernel.
This bug won't be reproduced in every tries, but should be reproduced in 5 times of retries.

Changed in linux (Ubuntu):
assignee: Tim Chen (ctf) → Keng-Yü Lin (lexical)
status: Incomplete → Triaged
Keng-Yu Lin (lexical)
Changed in bluez (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Keng-Yu Lin (lexical) wrote :
Download full text (3.6 KiB)

bluetoothd[3569]: HCI dev 0 down
bluetoothd[3569]: plugins/hciops.c:hciops_stop_inquiry() hci0
bluetoothd[3569]: audio/manager.c:state_changed() /org/bluez/3569/hci0 powered off
bluetoothd[3569]: audio/telephony.c:telephony_exit()
bluetoothd[3569]: audio/headset.c:telephony_deinit() Telephony deinitialized
bluetoothd[3569]: Adapter /org/bluez/3569/hci0 has been disabled
bluetoothd[3569]: src/adapter.c:set_mode_complete()
bluetoothd[3569]: src/rfkill.c:rfkill_event() RFKILL event idx 3 type 1 op 2 soft 0 hard 1
bluetoothd[3569]: HCI dev 0 unregistered
bluetoothd[3569]: Stopping hci0 event socket
bluetoothd[3569]: Unregister path: /org/bluez/3569/hci0
bluetoothd[3569]: src/adapter.c:adapter_remove() Removing adapter /org/bluez/3569/hci0
bluetoothd[3569]: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10005
bluetoothd[3569]: audio/manager.c:avrcp_server_remove() path /org/bluez/3569/hci0
bluetoothd[3569]: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10004
bluetoothd[3569]: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10003
bluetoothd[3569]: audio/manager.c:audio_adapter_unref() 0x7f675f701920: ref=2
bluetoothd[3569]: audio/manager.c:a2dp_server_remove() path /org/bluez/3569/hci0
bluetoothd[3569]: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10002
bluetoothd[3569]: audio/avdtp.c:avdtp_unregister_sep() SEP 0x7f675f703420 unregistered: type:0 codec:0 seid:1
bluetoothd[3569]: audio/manager.c:audio_adapter_unref() 0x7f675f701920: ref=1
bluetoothd[3569]: audio/manager.c:headset_server_remove() path /org/bluez/3569/hci0
bluetoothd[3569]: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10000
bluetoothd[3569]: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10001
bluetoothd[3569]: audio/manager.c:audio_adapter_unref() 0x7f675f701920: ref=0
bluetoothd[3569]: src/adapter.c:btd_adapter_unref() 0x7f675f701330: ref=5
bluetoothd[3569]: src/adapter.c:btd_adapter_unref() 0x7f675f701330: ref=4
bluetoothd[3569]: serial/manager.c:proxy_remove() path /org/bluez/3569/hci0
bluetoothd[3569]: src/adapter.c:btd_adapter_unref() 0x7f675f701330: ref=3
bluetoothd[3569]: network/manager.c:network_server_remove() path /org/bluez/3569/hci0
bluetoothd[3569]: network/server.c:path_unregister() Unregistered interface org.bluez.NetworkServer on path /org/bluez/3569/hci0
bluetoothd[3569]: src/adapter.c:btd_adapter_unref() 0x7f675f701330: ref=2
bluetoothd[3569]: src/adapter.c:btd_adapter_unref() 0x7f675f701330: ref=1
bluetoothd[3569]: plugins/service.c:unregister_interface() path /org/bluez/3569/hci0
bluetoothd[3569]: src/adapter.c:btd_adapter_unref() 0x7f675f701330: ref=0
bluetoothd[3569]: src/agent.c:agent_release() Releasing agent :1.35, /org/bluez/agent/hci0
bluetoothd[3569]: src/adapter.c:adapter_free() 0x7f675f701330
bluetoothd[3569]: src/rfkill.c:rfkill_event() RFKILL event idx 3 type 1 op 2 soft 0 hard 0
bluetoothd[3569]: HCI dev 0 registered
bluetoothd[3569]: plugins/hciops.c:init_device() hci0
bluetoothd[3569]: Listening for HCI events on hci0
bluetoothd[3569]: plugins/hciops.c:init_device()...

Read more...

Changed in linux (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Keng-Yu Lin (lexical) wrote :
Download full text (10.6 KiB)

[ 362.536699] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro,commit=0
[ 364.390106] PM: Syncing filesystems ... done.
[ 364.393065] PM: Preparing system for mem sleep
[ 365.560429] Freezing user space processes ... (elapsed 0.01 seconds) done.
[ 365.580205] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[ 365.600208] PM: Entering mem sleep
[ 365.600279] Suspending console(s) (use no_console_suspend to debug)
[ 365.601079] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 365.623522] uhci_hcd 0000:00:1d.3: PCI INT D disabled
[ 365.623531] ehci_hcd 0000:00:1d.7: PCI INT A disabled
[ 365.623562] uhci_hcd 0000:00:1d.2: PCI INT C disabled
[ 365.623575] uhci_hcd 0000:00:1d.1: PCI INT B disabled
[ 365.623592] wl 0000:02:00.0: PCI INT A disabled
[ 365.623602] uhci_hcd 0000:00:1d.0: PCI INT A disabled
[ 365.635186] sd 0:0:0:0: [sda] Stopping disk
[ 365.730217] HDA Intel 0000:00:1b.0: PCI INT A disabled
[ 365.730271] ACPI handle has no context!
[ 365.750111] PM: suspend of drv:HDA Intel dev:0000:00:1b.0 complete after 126.463 msecs
[ 365.894134] PM: suspend of drv:sd dev:0:0:0:0 complete after 293.061 msecs
[ 365.894176] PM: suspend of drv:scsi dev:target0:0:0 complete after 292.973 msecs
[ 365.894218] PM: suspend of drv:scsi dev:host0 complete after 292.909 msecs
[ 365.910120] PM: suspend of drv:ahci dev:0000:00:1f.2 complete after 286.713 msecs
[ 365.910159] PM: suspend of drv: dev:pci0000:00 complete after 286.492 msecs
[ 365.910181] PM: suspend of devices complete after 309.502 msecs
[ 365.910188] PM: suspend devices took 0.310 seconds
[ 365.911009] atl1c 0000:01:00.0: PME# enabled
[ 365.911036] pcieport 0000:00:1c.3: wake-up capability enabled by ACPI
[ 365.950588] PM: late suspend of devices complete after 40.385 msecs
[ 365.950634] ACPI: Preparing to enter system sleep state S3
[ 366.001258] PM: Saving platform NVS memory
[ 366.002743] Disabling non-boot CPUs ...
[ 366.110112] CPU 1 is now offline
[ 366.380100] CPU 2 is now offline
[ 366.560052] CPU 3 is now offline
[ 366.560729] Extended CMOS year: 2000
[ 366.560729] Back to C!
[ 366.560729] PM: Restoring platform NVS memory
[ 366.560729] Extended CMOS year: 2000
[ 366.560729] Enabling non-boot CPUs ...
[ 366.560729] Booting Node 0 Processor 1 APIC 0x2
[ 366.730060] Switched to NOHz mode on CPU #1
[ 366.730202] CPU1 is up
[ 366.730461] Booting Node 0 Processor 2 APIC 0x1
[ 366.900064] Switched to NOHz mode on CPU #2
[ 366.950233] CPU2 is up
[ 366.950567] Booting Node 0 Processor 3 APIC 0x3
[ 367.120155] Switched to NOHz mode on CPU #3
[ 367.190325] CPU3 is up
[ 367.192513] ACPI: Waking up from system sleep state S3
[ 367.300679] i915 0000:00:02.0: restoring config space at offset 0x1 (was 0x900007, writing 0x900407)
[ 367.300766] HDA Intel 0000:00:1b.0: restoring config space at offset 0x1 (was 0x100006, writing 0x100002)
[ 367.300822] pcieport 0000:00:1c.0: restoring config space at offset 0x9 (was 0x1fff1, writing 0x40314021)
[ 367.300832] pcieport 0000:00:1c.0: restoring config space at offset 0x8 (was 0xfff0, writing 0x40104000)
[ 367.300842] pcieport 0000:00:1c.0: restoring config space at offset 0x7 (was 0xf0, wri...

Revision history for this message
Keng-Yu Lin (lexical) wrote :

Installed the daily Oneiric daily build (20110728), the issue is fixed in Oneiric.

Revision history for this message
Ara Pulido (ara) wrote :

Keng-Yü, is this a bug in bluez, linux or both packages?

Keng-Yu Lin (lexical)
Changed in linux (Ubuntu Natty):
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Keng-Yü Lin (lexical)
Changed in linux (Ubuntu):
status: In Progress → Invalid
Changed in bluez (Ubuntu):
status: Confirmed → Invalid
Changed in bluez (Ubuntu Natty):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Keng-Yu Lin (lexical) wrote :

@Ara, I am not sure at the time, still working on finding the cause.

Changed in linux (Ubuntu Natty):
status: Confirmed → In Progress
Ara Pulido (ara)
Changed in bluez (Ubuntu):
status: Invalid → Confirmed
Changed in linux (Ubuntu):
status: Invalid → In Progress
Changed in bluez (Ubuntu):
status: Confirmed → Invalid
Changed in linux (Ubuntu):
status: In Progress → Invalid
Keng-Yu Lin (lexical)
Changed in bluez (Ubuntu Natty):
status: Confirmed → In Progress
assignee: nobody → Keng-Yü Lin (lexical)
Keng-Yu Lin (lexical)
Changed in linux (Ubuntu Natty):
status: In Progress → Invalid
Revision history for this message
Keng-Yu Lin (lexical) wrote :

The bug can be fixed in bluez. I am forming a patch.

tags: added: hwe-blocker
Revision history for this message
Keng-Yu Lin (lexical) wrote :

Since the issue is not found in Oneiric and this is blocking certification of Natty, it should make sense to get the attach patch through SRU for Natty.

The patch is very straightforward, just adds some retries and sleep in-between on initialising the bluetooth device.

Keng-Yu Lin (lexical)
Changed in bluez (Ubuntu Natty):
status: In Progress → Triaged
Keng-Yu Lin (lexical)
Changed in bluez (Ubuntu):
status: Invalid → Fix Released
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Reviewed the patch and uploaded to natty-proposed. The patch seems simple and low risk, as Keng-Yü says it just retries bringing the device up if it doesn't occur fast enough.

Keng-Yu Lin (lexical)
Changed in bluez (Ubuntu Natty):
status: Triaged → Fix Committed
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Please test proposed package

Hello Tim, or anyone else affected,

Accepted bluez into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Keng-Yu Lin (lexical) wrote :

I tested the bluez package in -proposed on Asus 1215p and confirmed the it works.

tags: added: verification-done-natty
removed: verification-needed
Ayan George (ayan)
tags: added: blocks-hwcert-enablement
Revision history for this message
Ara Pulido (ara) wrote :

Did this package make it to -updates?
Can we put it as Fix Released?

Revision history for this message
Anthony Wong (anthonywong) wrote :

Ara, I still don't see it in natty-updates. :(

Revision history for this message
Jesse Sung (wenchien) wrote : [PATCH] Bluetooth: set reset_resume handler

On some machines, it seems that usb hubs do not get power while
being suspended. We can get something like this in dmesg:
     usb usb2: root hub lost power or was reset

When this is the case, .reset_resume is called instead of .resume.
If .reset_resume is not set, bluetooth modules would stay in an unusable
state because the resume function is not called.

Signed-off-by: Wen-chien Jesse Sung <email address hidden>
---
  drivers/bluetooth/btusb.c | 1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

Revision history for this message
Jesse Sung (wenchien) wrote :

On 10/25/2011 04:40 PM, Oliver Neukum wrote:
> Am Dienstag, 25. Oktober 2011, 10:37:38 schrieb Jesse Sung:
>>
>> On some machines, it seems that usb hubs do not get power while
>> being suspended. We can get something like this in dmesg:
>> usb usb2: root hub lost power or was reset
>>
>> When this is the case, .reset_resume is called instead of .resume.
>> If .reset_resume is not set, bluetooth modules would stay in an unusable
>> state because the resume function is not called.
>
> Have you experimentally verified that? This state of affairs is years
> old and should result in a virtual unplug/replug cycle. What are you
> seeing?
>
> Regards
> Oliver

Hi Oliver,

Humm... You're right, there is an unplug-replug cycle, but bluetooth
doesn't work until I restart bluetoothd. If the resume function is
called through .reset_resume, then bluetooth works right after resume.

Regards,
Jesse

Revision history for this message
Jesse Sung (wenchien) wrote :

On 10/25/2011 07:43 PM, Oliver Neukum wrote:
> Am Dienstag, 25. Oktober 2011, 13:20:13 schrieb Jesse Sung:
>> On 10/25/2011 04:40 PM, Oliver Neukum wrote:
>>> Am Dienstag, 25. Oktober 2011, 10:37:38 schrieb Jesse Sung:
>>>>
>>>> On some machines, it seems that usb hubs do not get power while
>>>> being suspended. We can get something like this in dmesg:
>>>> usb usb2: root hub lost power or was reset
>>>>
>>>> When this is the case, .reset_resume is called instead of .resume.
>>>> If .reset_resume is not set, bluetooth modules would stay in an unusable
>>>> state because the resume function is not called.
>>>
>>> Have you experimentally verified that? This state of affairs is years
>>> old and should result in a virtual unplug/replug cycle. What are you
>>> seeing?
>>
>> Hi Oliver,
>>
>> Humm... You're right, there is an unplug-replug cycle, but bluetooth
>> doesn't work until I restart bluetoothd. If the resume function is
>> called through .reset_resume, then bluetooth works right after resume.
>
> Hi
>
> Yes, but we fail to indicate to user space that connections may have been
> dropped. I doubt we can simply pretend the loss of power hasn't occured.
> Have you tested what happens if you go to S3 while eg. a file is transfered
> or audio played with your patch?

Hi Oliver,

Indeed, loss of power event should not be ignored.

Just tested file transferring. If there's no active connection,
everything goes fine. But if a file is transferring while going to S3,
bluetooth is not working after resume. Use applet to disable and
re-enable bluetooth makes it work again...

Wondering what is the right way to handle loss of power...

Regards,
Jesse

TienFu Chen (ctf)
tags: added: taipei
tags: added: uid201106-8083
TienFu Chen (ctf)
tags: added: cid201106-8083
removed: uid201106-8083
TienFu Chen (ctf)
tags: added: lab-taipei
removed: taipei
Keng-Yu Lin (lexical)
Changed in bluez (Ubuntu Natty):
assignee: Keng-Yu Lin (lexical) → Jesse Sung (wenchien)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bluez - 4.91-0ubuntu2

---------------
bluez (4.91-0ubuntu2) natty-proposed; urgency=low

  [ Keng-Yu Lin ]
  * Add patches/03-More-retries-when-initialising-the-device.patch
    - Fix the bug of bluetooth staying disabled on resume (LP: #812132)
 -- Robert Ancell <email address hidden> Tue, 16 Aug 2011 12:26:56 +1000

Changed in bluez (Ubuntu Natty):
status: Fix Committed → Fix Released
Revision history for this message
Tamir (sugip) wrote :

Finally Bluetooth does not turn on after turning it off manually (13.10 was a problem with this), but the icon of Bluetooth still disappears. Can create bug report for trusty?

To post a comment you must log in.