Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1532651ybz; Thu, 23 Apr 2020 00:10:06 -0700 (PDT) X-Google-Smtp-Source: APiQypK8ZcV2I4zrhyR+m+ZIyN1BLe/GI5Qwc/hh0gNL/n7oPTioyJjRPjyk8a0jEDv7O3jeYd17 X-Received: by 2002:a17:906:3502:: with SMTP id r2mr1455914eja.67.1587625806268; Thu, 23 Apr 2020 00:10:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587625806; cv=none; d=google.com; s=arc-20160816; b=MT6tlr5QzZVTZzMaaXvCQoJF8uvwrJqlZPOdw7sdrJ2TYggokGXtGngklCYTsm8Us0 qQNPU9obUEY2C/sLTXSZOQAGOC8cxD3TvLy92+Vx98YDg8HRjrLQd6/umTfDeidjjRE2 2vM08QckYZcPH9VXzw8TGyHu+hM0n+p9iMWOk0cvOnFtwrrOpwM9HLM7Z85xM0V6O/FU RDbfhpBg0FIu5OIw2/2fLlJaD/bVYLeXK380XwuFA8GRTrVkrLI4h9oDPKm6/n2KiBaI +qrfKX22OUXT+sYIxX5DbM97r98AUrTp6PHzTGirLCZDrLwMPTPy5a/gksZdHQkxE/sg moBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date; bh=aEB+P7fn9HvdsGVD43f8MlbJ7oE5CwtWUsXUZJDUs74=; b=IDGI3wJKue9VcLy0l6WG+Bi7Uh46EioNoJGVJuYQWqFeztOpNlNt/UYQcp5gEtJx/Z 6v84bvhWh3k6UuZyggvyXZzl1Ylju4PaOXhGKduaTs8WeitQowCEdqVz8F0j+KBENOh1 WHFoNPwQgkLE/g+4MKi5CvJLCIZBD3bui7OA9/eV4JFkVkhT77sCuZd6y77ZCBNKTv3W f5NZnZNqduIKnmCvlAbGPVc8ABxNz6PD9y6qTeu8qgaBHsRXhoREKV0AXSOKxHuXwBKU cKb3XnvSsIxvqsm7VhLxmCnTmyEMKcl1THsvValQdMnH8PiL5cRcLnnN246c8jQ7FyHf /8Vw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x21si793543ejc.141.2020.04.23.00.09.42; Thu, 23 Apr 2020 00:10:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726863AbgDWHF6 (ORCPT + 99 others); Thu, 23 Apr 2020 03:05:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:43566 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726027AbgDWHF5 (ORCPT ); Thu, 23 Apr 2020 03:05:57 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A2910AE38; Thu, 23 Apr 2020 07:05:54 +0000 (UTC) Date: Thu, 23 Apr 2020 09:05:54 +0200 Message-ID: From: Takashi Iwai To: Bjorn Helgaas Cc: "Alex Xu (Hello71)" , alsa-devel@alsa-project.org, Roy Spliet , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org Subject: Re: Unrecoverable AER error when resuming from RAM (hda regression in 5.7-rc2) In-Reply-To: <20200422232127.GA24666@google.com> References: <20200422232127.GA24666@google.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 23 Apr 2020 01:21:27 +0200, Bjorn Helgaas wrote: > > On Wed, Apr 22, 2020 at 11:25:04PM +0200, Takashi Iwai wrote: > > On Wed, 22 Apr 2020 22:50:28 +0200, > > Bjorn Helgaas wrote: > > > ... > > > I feel like this UR issue could be a PCI core issue or maybe some sort > > > of misuse of PCI power management, but I can't seem to get traction on > > > it. > > > > > > > Then the display freezes and the system basically falls apart (can't > > > > even sudo reboot -f, need to use magic sysrq). > > > > > > > > I bisected this to "ALSA: hda: Skip controller resume if not needed". > > > > Setting snd_hda_intel.power_save=0 resolves the issue. > > > > > > FWIW, the complete citation is c4c8dd6ef807 ("ALSA: hda: Skip > > > controller resume if not needed"), > > > https://git.kernel.org/linus/c4c8dd6ef807, which first appeared in > > > v5.7-rc2. > > > > Yes, and I posted the fix patch right now: > > https://lore.kernel.org/r/20200422203744.26299-1-tiwai@suse.de > > > > The possible cause was the tricky resume code that both HD-audio > > controller (the parent PCI device) and the codec devices used. > > > > At least the patch above seems working for the reporter's machine. > > Now we need a bit more testing before merging, but it looks promising, > > so far. > > Great, I'm glad you figured something out because I sure wasn't > getting anywhere! > > Maybe this is a tangent, but I can't figure out what > snd_power_change_state() is doing. It *looks* like it's supposed to > change the PCI power state, but I gave up trying to figure out where > it actually touches the device. Not really, it merely updates the internal state field stored in the sound card object, see in include/sound/core.h: static inline void snd_power_change_state(struct snd_card *card, unsigned int state) { card->power_state = state; wake_up(&card->power_sleep); } The sound API blocks the operation while suspend/resume explicitly with this card top-level signal. thanks, Takashi