Linux-Kernel: System freezes after hibernate or suspend on a Mac mini 6, 2
Hello ALSA-Development,
I bisected a problem in the Linux kernel 4.14. (This may also concern newer kernel versions.)
Using a Mac mini 6,2 computer the kernel freezes after a resume from hibernation or suspend.
The bisection resulted, that the patch 1f7f51a63114bab3a05920f4b1343154e95e2cb6 may be the culprit.
Please have a look at the description and comments of the bug
https://bugzilla.kernel.org/show_bug.cgi?id=198233 and tell me if our assumption is correct or not.
Thank you very much for your cooperation.
Johannes Geiss
Signature · 4 lines
------//--------------------------------------------------------------
// Johannes R. Geiss Mac mini server and
\\ // OpenPandora user
--\X/-----------------------------------------------------------------Quoted 9 lines · Johannes Geiss
Hello ALSA-Development,
I bisected a problem in the Linux kernel 4.14. (This may also concern newer kernel versions.)
Using a Mac mini 6,2 computer the kernel freezes after a resume from hibernation or suspend.
Quoted 6 lines
The bisection resulted, that the patch
1f7f51a63114bab3a05920f4b1343154e95e2cb6may be the culprit.Please have a look at the description and comments of the bug
https://bugzilla.kernel.org/show_bug.cgi?id=198233 and tell me if our assumption is correct or not.
Did you get the error message "Too many HDMI devices" as mentioned in the changelog?
Takashi
Quoted 2 lines · On Mon, 23 Apr 2018 15:42:33 +0200 Takashi Iwai <[email protected]> wrote:
Did you get the error message "Too many HDMI devices" as mentioned in the changelog?
Yes:
Mar 14 11:29:48 mizar kernel: snd_hda_intel 0000:00:1b.0: Too many HDMI
devices Mar 14 11:29:48 mizar kernel: snd_hda_intel 0000:00:1b.0:
Consider building the kernel with CONFIG_SND_DYNAMIC_MINORS=y Mar 14 11:29:48 mizar kernel: input: HDA Intel PCH Line
as /devices/pci0000:00/0000:00:1b.0/sound/card0/input3 Mar 14 11:29:48 mizar kernel: input: HDA Intel PCH Headphone
as /devices/pci0000:00/0000:00:1b.0/sound/card0/input4 Mar 14 11:29:48 mizar kernel: input: HDA Intel PCH SPDIF In
as /devices/pci0000:00/0000:00:1b.0/sound/card0/input5 Mar 14 11:29:48 mizar kernel: input: HDA Intel PCH HDMI/DP,pcm=3
as /devices/pci0000:00/0000:00:1b.0/sound/card0/input7 Mar 14 11:29:48 mizar kernel: input: HDA Intel PCH HDMI/DP,pcm=7
as /devices/pci0000:00/0000:00:1b.0/sound/card0/input8 Mar 14 11:29:48 mizar kernel: input: HDA Intel PCH HDMI/DP
as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9 Mar 14 11:29:48 mizar systemd[1]: Reached target Sound Card.
Does this mean I should try to use CONFIG_SND_DYNAMIC_MINORS=y to solve the hibernate/suspend problem?
Bye
Johannes
Signature · 4 lines
------//--------------------------------------------------------------
// Johannes R. Geiss Mac mini server and
\\ // OpenPandora user
--\X/-----------------------------------------------------------------Quoted 26 lines · Johannes Geiss
Quoted 2 lines · On Mon, 23 Apr 2018 15:42:33 +0200 Takashi Iwai <[email protected]> wrote:
Did you get the error message "Too many HDMI devices" as mentioned in the changelog?
Yes:
Mar 14 11:29:48 mizar kernel: snd_hda_intel 0000:00:1b.0: Too many HDMIdevices Mar 14 11:29:48 mizar kernel:
snd_hda_intel0000:00:1b.0:
Consider building the kernel withCONFIG_SND_DYNAMIC_MINORS=yMar 14 11:29:48 mizar kernel: input: HDA Intel PCH Line
as /devices/pci0000:00/0000:00:1b.0/sound/card0/input3 Mar 14 11:29:48 mizar kernel: input: HDA Intel PCH Headphone
as /devices/pci0000:00/0000:00:1b.0/sound/card0/input4 Mar 14 11:29:48 mizar kernel: input: HDA Intel PCH SPDIF In
as /devices/pci0000:00/0000:00:1b.0/sound/card0/input5 Mar 14 11:29:48 mizar kernel: input: HDA Intel PCH HDMI/DP,pcm=3
as /devices/pci0000:00/0000:00:1b.0/sound/card0/input7 Mar 14 11:29:48 mizar kernel: input: HDA Intel PCH HDMI/DP,pcm=7
as /devices/pci0000:00/0000:00:1b.0/sound/card0/input8 Mar 14 11:29:48 mizar kernel: input: HDA Intel PCH HDMI/DP
as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9 Mar 14 11:29:48 mizar systemd[1]: Reached target Sound Card.
Quoted 2 lines
Does this mean I should try to use
CONFIG_SND_DYNAMIC_MINORS=yto solve the hibernate/suspend problem?
I guess the problem should gone with that kconfig, yes. But it doesn't mean that we ignore the issue.
What about the patch below? Does it change the behavior?
thanks,
Takashi
-- 8< --
sound/pci/hda/patch_hdmi.c +8 -1
@@ -1383,6 +1383,8 @@ static void hdmi_pcm_setup_pin(struct hdmi_spec *spec, pcm =get_pcm_rec (spec, per_pin->pcm_idx); else return; +if (!pcm->pcm) +return ;if (!test_bit (per_pin->pcm_idx, &spec->pcm_in_use))return ;
@@ -2151,8 +2153,13 @@ static int generic_hdmi_build_controls(struct hda_codec *codec)int dev, err;int pin_idx, pcm_idx; -for (pcm_idx =0 ; pcm_idx < spec->pcm_used; pcm_idx++) { +if (!get_pcm_rec (spec, pcm_idx)->pcm) { +/* no PCM; mark this not to be selected */ +set_bit (idx, &spec->pcm_bitmap); +continue ; + } + err =generic_hdmi_build_jack (codec, pcm_idx);if (err <0 )return err;