linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: tiwai@suse.com, SOUND <alsa-devel@alsa-project.org>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	open list <linux-kernel@vger.kernel.org>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	Mike Rapoport <rppt@kernel.org>
Subject: Re: [PATCH v2] ALSA: hda: Continue to probe when codec probe fails
Date: Fri, 02 Jul 2021 19:26:38 +0100	[thread overview]
Message-ID: <E8RMVQ.F0HRHAOIPPHU1@crapouillou.net> (raw)
In-Reply-To: <9ZPMVQ.7NLNMVBCK1243@crapouillou.net>



Le ven., juil. 2 2021 at 18:59:33 +0100, Paul Cercueil 
<paul@crapouillou.net> a écrit :
> Hi,
> 
> Le ven., juin 25 2021 at 13:45:35 +0100, Paul Cercueil 
> <paul@crapouillou.net> a écrit :
>> Hi Kai-Heng,
>> 
>> I am facing the same bug. Unfortunately your patch does not seem to 
>> \x7ffix the bug for me, the nvidia GPU stays constantly active. Only if 
>> I \x7funbind the snd-hda-intel module for this PCI device that the 
>> nvidia \x7fGPU will eventually go to sleep.
> 
> Nevermind, I'm stupid. I think I just didn't have the PM mode set to 
> "auto", because I tried again and it works now. Ignore my email.

Ok, I'm definitely not stupid, I could reproduce it again, with this 
patch applied and the PM set to "auto". It then only suspends when I 
unload the snd-hda-intel module.

Sorry about the spam.

-Paul

> 
> If you (or anybody) does a v3, please Cc me.
> 
> Cheers,
> -Paul
> 
>> My dmesg (with your patch applied):
>> 
>> [ 1.821358] MXM: GUID detected in BIOS
>> [ 1.821396] ACPI BIOS Error (bug): AE_AML_PACKAGE_LIMIT, Index 
>> \x7f(0x000000003) is beyond end of object (length 0x0) 
>> \x7f(20200925/exoparg2-393)
>> [ 1.821406] ACPI Error: Aborting method \_SB.PCI0.GFX0._DSM due to 
>> \x7fprevious error (AE_AML_PACKAGE_LIMIT) (20200925/psparse-529)
>> [ 1.821415] ACPI: \_SB_.PCI0.GFX0: failed to evaluate _DSM (0x300b)
>> [ 1.821419] ACPI Warning: \_SB.PCI0.GFX0._DSM: Argument #4 type 
>> \x7fmismatch - Found [Buffer], ACPI requires [Package] 
>> \x7f(20200925/nsarguments-61)
>> [ 1.821528] i915 0000:00:02.0: optimus capabilities: enabled, status 
>> \x7fdynamic power,
>> [ 1.821554] ACPI BIOS Error (bug): AE_AML_PACKAGE_LIMIT, Index 
>> \x7f(0x000000003) is beyond end of object (length 0x0) 
>> \x7f(20200925/exoparg2-393)
>> [ 1.821560] ACPI Error: Aborting method \_SB.PCI0.GFX0._DSM due to 
>> \x7fprevious error (AE_AML_PACKAGE_LIMIT) (20200925/psparse-529)
>> [ 1.821565] ACPI Error: Aborting method \_SB.PCI0.PEG0.PEGP._DSM due 
>> \x7fto previous error (AE_AML_PACKAGE_LIMIT) (20200925/psparse-529)
>> [ 1.821572] ACPI: \_SB_.PCI0.PEG0.PEGP: failed to evaluate _DSM 
>> \x7f(0x300b)
>> [ 1.821574] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type 
>> \x7fmismatch - Found [Buffer], ACPI requires [Package] 
>> \x7f(20200925/nsarguments-61)
>> [ 1.821683] pci 0000:01:00.0: optimus capabilities: enabled, status 
>> \x7fdynamic power,
>> [ 1.821685] VGA switcheroo: detected Optimus DSM method 
>> \x7f\_SB_.PCI0.PEG0.PEGP handle
>> [ 1.821920] nouveau 0000:01:00.0: NVIDIA GK107 (0e71f0a2)
>> [ 1.830781] nouveau 0000:01:00.0: bios: version 80.07.95.00.07
>> [ 1.894392] nouveau 0000:01:00.0: fb: 2048 MiB DDR3
>> [ 1.896669] [drm] Initialized i915 1.6.0 20200917 for 0000:00:02.0 
>> on \x7fminor 0
>> [ 1.896862] ACPI: Video Device [PEGP] (multi-head: yes rom: yes 
>> post: \x7fno)
>> [ 1.897361] input: Video Bus as 
>> \x7f/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:02/LNXVIDEO:00/input/input12
>> [ 1.897974] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: 
>> \x7fno)
>> [ 1.898219] nouveau 0000:01:00.0: bus: MMIO write of 0000001f FAULT 
>> \x7fat 6013d4 [ IBUS ]
>> [ 1.900114] input: Video Bus as 
>> \x7f/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:01/input/input13
>> [ 1.969353] vga_switcheroo: enabled
>> [ 1.969407] [TTM] Zone kernel: Available graphics memory: 3791596 KiB
>> [ 1.969408] [TTM] Zone dma32: Available graphics memory: 2097152 KiB
>> [ 1.969409] [TTM] Initializing pool allocator
>> [ 1.969416] [TTM] Initializing DMA pool allocator
>> [ 1.969431] nouveau 0000:01:00.0: DRM: VRAM: 2048 MiB
>> [ 1.969432] nouveau 0000:01:00.0: DRM: GART: 1048576 MiB
>> [ 1.969436] nouveau 0000:01:00.0: DRM: Pointer to TMDS table not 
>> found
>> [ 1.969438] nouveau 0000:01:00.0: DRM: DCB version 4.0
>> [ 1.971139] nouveau 0000:01:00.0: DRM: MM: using COPY for buffer 
>> \x7fcopies
>> [ 1.971485] [drm] Initialized nouveau 1.3.1 20120801 for 
>> 0000:01:00.0 \x7fon minor 1
>> 
>> [ ... ]
>> 
>> [ 4.594245] snd_hda_intel 0000:00:1b.0: bound 0000:00:02.0 (ops 
>> \x7fi915_audio_component_bind_ops [i915])
>> [ 4.594380] snd_hda_intel 0000:01:00.1: can't change power state 
>> from \x7fD3cold to D0 (config space inaccessible)
>> [ 4.594410] snd_hda_intel 0000:01:00.1: can't change power state 
>> from \x7fD3cold to D0 (config space inaccessible)
>> [ 4.594486] snd_hda_intel 0000:01:00.1: Disabling MSI
>> [ 4.594494] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio 
>> \x7fclient
>> [ 4.594526] snd_hda_intel 0000:01:00.1: number of I/O streams is 30, 
>> \x7fforcing separate stream tags
>> 
>> [ ... ]
>> 
>> [ 4.696732] hdaudio hdaudioC1D0: no AFG or MFG node found
>> [ 4.696745] hdaudio hdaudioC1D1: no AFG or MFG node found
>> [ 4.696752] hdaudio hdaudioC1D2: no AFG or MFG node found
>> [ 4.696759] hdaudio hdaudioC1D3: no AFG or MFG node found
>> [ 4.696765] hdaudio hdaudioC1D4: no AFG or MFG node found
>> [ 4.696771] hdaudio hdaudioC1D5: no AFG or MFG node found
>> [ 4.696778] hdaudio hdaudioC1D6: no AFG or MFG node found
>> [ 4.696785] hdaudio hdaudioC1D7: no AFG or MFG node found
>> [ 4.696787] snd_hda_intel 0000:01:00.1: no codecs initialized
>> 
>> Cheers,
>> -Paul
>> 
>> 
>> Le mer., déc. 16 2020 at 20:47:24 +0800, Kai-Heng Feng 
>> \x7f<kai.heng.feng@canonical.com> a écrit :
>>> Similar to commit 9479e75fca37 ("ALSA: hda: Keep the controller
>>> initialization even if no codecs found"), when codec probe fails, it
>>> doesn't enable runtime suspend, and can prevent graphics card from
>>> getting powered down:
>>> [    4.280991] snd_hda_intel 0000:01:00.1: no codecs initialized
>>> 
>>> $ cat /sys/bus/pci/devices/0000:01:00.1/power/runtime_status
>>> active
>>> 
>>> So mark there's no codec and continue probing to let runtime PM to 
>>> \x7f\x7f\x7fwork.
>>> 
>>> BugLink: https://bugs.launchpad.net/bugs/1907212
>>> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
>>> ---
>>>  sound/pci/hda/hda_intel.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>> 
>>> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
>>> index 6852668f1bcb..872a703dee43 100644
>>> --- a/sound/pci/hda/hda_intel.c
>>> +++ b/sound/pci/hda/hda_intel.c
>>> @@ -2328,7 +2328,7 @@ static int azx_probe_continue(struct azx 
>>> *chip)
>>>  	if (bus->codec_mask) {
>>>  		err = azx_probe_codecs(chip, azx_max_codecs[chip->driver_type]);
>>>  		if (err < 0)
>>> -			goto out_free;
>>> +			bus->codec_mask = 0;
>>>  	}
>>> 
>>>  #ifdef CONFIG_SND_HDA_PATCH_LOADER
>> 
> 



      reply	other threads:[~2021-07-02 18:26 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14  6:06 [PATCH] ALSA: hda: Enable runtime PM when codec probe fails Kai-Heng Feng
2020-12-14  7:58 ` Takashi Iwai
2020-12-16 12:47 ` [PATCH v2] ALSA: hda: Continue to probe " Kai-Heng Feng
2020-12-16 15:41   ` Takashi Iwai
2020-12-16 15:50     ` Kai-Heng Feng
2020-12-16 15:58       ` Takashi Iwai
2020-12-16 16:07         ` Kai-Heng Feng
2020-12-16 16:22           ` Takashi Iwai
2020-12-16 16:57             ` Takashi Iwai
2020-12-18  5:09               ` Kai-Heng Feng
2020-12-18  8:06                 ` Takashi Iwai
2020-12-21 16:33                   ` Kai-Heng Feng
2020-12-21 16:47                     ` Takashi Iwai
2020-12-21 17:15                       ` Kai-Heng Feng
2020-12-21 17:56                     ` [Nouveau] " Ilia Mirkin
2020-12-22  2:49                       ` Kai-Heng Feng
2021-01-04 13:20                         ` Karol Herbst
2021-04-10 15:51                           ` Roy Spliet
2021-04-10 19:23                             ` Lukas Wunner
2021-04-10 20:48                               ` Roy Spliet
2021-04-12 19:06                                 ` Aaron Plattner
2021-04-12 19:36                                   ` Roy Spliet
2021-04-12 20:00                                     ` Aaron Plattner
2021-04-12 20:03                                       ` Ilia Mirkin
2021-04-13  0:10                                     ` Karol Herbst
2021-04-13  8:24                                       ` Roy Spliet
2021-04-13  9:48                                         ` Karol Herbst
2021-04-13 11:17                                           ` Roy Spliet
2021-04-13 11:49                                             ` Karol Herbst
2021-06-25 12:45   ` Paul Cercueil
2021-07-02 17:59     ` Paul Cercueil
2021-07-02 18:26       ` Paul Cercueil [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E8RMVQ.F0HRHAOIPPHU1@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=alexander.deucher@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=kai.heng.feng@canonical.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rppt@kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).