Bug 187091

Summary: bluetooth needs 2s after resume, or else it causes delay/crash if the second suspend is delivered immediately - Lenovo Yoga 900
Product: Power Management Reporter: Zhang Rui (rui.zhang)
Component: Hibernation/SuspendAssignee: Zhang Rui (rui.zhang)
Status: RESOLVED DUPLICATE    
Severity: normal CC: yu.c.chen
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.9-rc3 Subsystem:
Regression: No Bisected commit-id:
Bug Depends on:    
Bug Blocks: 178231    

Description Zhang Rui 2016-11-07 02:38:50 UTC
When doing the second suspend/resume, it seems that there is something wrong with snd_hda_codec_hdmi driver, and this causes 1.5 seconds delay when freezing userspace.

[  661.537461] PM: Preparing system for sleep (mem)
[  661.713838] Freezing user space processes ... 
[  661.808943] snd_hda_codec_hdmi hdaudioC0D2: HDMI: invalid ELD buf size -1
[  662.128935] snd_hda_codec_hdmi hdaudioC0D2: HDMI: invalid ELD buf size -1
[  662.448915] snd_hda_codec_hdmi hdaudioC0D2: HDMI: invalid ELD buf size -1
[  662.768931] snd_hda_codec_hdmi hdaudioC0D2: HDMI: invalid ELD buf size -1
[  663.055729] Bluetooth: hci0: Waiting for firmware download to complete
[  663.056019] Bluetooth: hci0: Firmware loaded in 1681458 usecs
[  663.056127] Bluetooth: hci0: Waiting for device to boot
[  663.073110] Bluetooth: hci0: Device booted in 16677 usecs
[  663.073120] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-11-5.ddc
[  663.075185] Bluetooth: hci0: Applying Intel DDC parameters completed
[  663.076173] Bluetooth: hci0: Setting Intel event mask failed (-16)
[  663.089031] snd_hda_codec_hdmi hdaudioC0D2: HDMI: invalid ELD buf size -1
[  663.136251] (elapsed 1.422 seconds) done.
[  663.136280] Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.

A comparison is the dmesg output in the first suspend
[  659.868411] PM: Preparing system for sleep (mem)
[  660.009238] Freezing user space processes ... (elapsed 0.002 seconds) done.
[  660.011332] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Comment 1 Zhang Rui 2016-11-07 03:04:20 UTC
This seems to be a racing problem if we deliver the second resume immediately after the first one.
Comment 2 Zhang Rui 2016-11-09 06:17:15 UTC

*** This bug has been marked as a duplicate of bug 186201 ***