[PATCH] ALSA: hda: Avoid non-operational GPU warning at regular device removal
From: Takashi Iwai
Date: Wed Oct 07 2026 - 13:12:44 EST
When a hda-intel driver is removed manually and it has a GPU with
switcheroo, it always gives a warning like "GPU sound probed, but not
operational:..." no matter whether GPU has been actually operational
or not. This warning was originally put for machines that really
suffer from the non-operational GPU HDMI audio, but it's seen at the
common path a normal device removal also goes over.
For avoiding a confusing warning, move the check and the warning at
the error path of azx_probe_continue() that is the point where the
non-functional GPU gets detected and given up.
Fixes: 2b360ba9a493 ("ALSA: hda: intel: Fix Optimus when GPU has no sound")
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
---
sound/hda/controllers/intel.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/hda/controllers/intel.c b/sound/hda/controllers/intel.c
index 24015c73a67f..068fc522658a 100644
--- a/sound/hda/controllers/intel.c
+++ b/sound/hda/controllers/intel.c
@@ -1380,7 +1380,6 @@ static void azx_free(struct azx *chip)
* actually stop the chip) to allow GPU to suspend via
* vga_switcheroo, and print a warning.
*/
- dev_warn(&pci->dev, "GPU sound probed, but not operational: please add a quirk to driver_denylist\n");
pm_runtime_disable(&pci->dev);
pm_runtime_set_suspended(&pci->dev);
pm_runtime_enable(&pci->dev);
@@ -2448,6 +2447,8 @@ static int azx_probe_continue(struct azx *chip)
out_free:
if (err < 0) {
pci_set_drvdata(pci, NULL);
+ if (hda->vga_switcheroo_registered)
+ dev_warn(&pci->dev, "GPU sound probed, but not operational: please add a quirk to driver_denylist\n");
snd_card_free(chip->card);
return err;
}
--
2.55.0