Bug 79561

Summary: some alsa driver on H97/Z97 preventing system from suspending
Product: Drivers Reporter: Yuri K (yuri+bugs)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Severity: normal CC: tiwai
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.16.0-rc3 Tree: Mainline
Regression: No
Attachments: lscpi output
kernel config with modules built-in, that cause the bugreport messages
Test fix patch

Description Yuri K 2014-07-06 17:30:38 UTC
Created attachment 142181 [details]
lscpi output


I've got a mobo on H97 and it doesn't suspend. I disabled Alsa section altogether in kernel config and it beautifully started working again, so I guess I should report here.

Basically, some part of either snd_hda_intel or hda-i915 is preventing kernel from going to sleep.

This works:
echo freezer > /sys/power/pm_test
echo mem > /sys/power/state

This switches off screen ("monitor going to sleep"), but it keeps PC running:

echo devices > /sys/power/pm_test
echo mem > /sys/power/state

Without display, I'm not able to see what's going on ;)
Cold shutdown is the only exit path from this state.

Here's what I see during the boot:
Jul  6 19:27:19 yu kernel: hda-i915: get_power symbol get fail
Jul  6 19:27:19 yu kernel: snd_hda_intel 0000:00:03.0: Error request power-well from i915

Tell me what else do you need from me, I'm gonna do that. I've also got a cat, if that's relevant.

Comment 1 Yuri K 2014-07-06 18:00:28 UTC
Created attachment 142191 [details]
kernel config with modules built-in, that cause the bugreport messages

You know what guys. I just compiled sound modules as modules and not built into kernel and now full hibernate cycle is working beautifully. Not only that, but those "power-well" symbol and messages are gone now.
Comment 2 Takashi Iwai 2014-07-07 08:12:10 UTC
Yeah, this must be the incomplete dependency.  We didn't put a hard-dependency in Kconfig between i915 and HD-audio because it's specific to Haswell/Broadwell.

Through a quick look at the code, the bug must be the PM callback being called even though the probe failed.  Since the probe is done in a workqueue, the probe failure isn't handled as a fatal error, thus the PM handle may still remain.

Could you check the patch below with the old config (HD-audio built-in and i915 module)?
Comment 3 Takashi Iwai 2014-07-07 08:12:35 UTC
Created attachment 142231 [details]
Test fix patch
Comment 4 Takashi Iwai 2014-07-15 13:25:58 UTC
I could reproduce the problem by myself and confirmed that the patch works.
It's submitted and merged to sound git tree now.