Skip to content

No soundcard detected with nomodeset kernel option Dell XPS 17 9720 SKU 0AFE #4594

Closed

Description

@halobarrlets

If I boot without nomodeset kernel option then audio works properly but if I boot with nomodeset kernel option then no soundcard is detected.
Maybe firmware is waiting for HDMI from dGPU and fail if no HDMI is detected.
I'm using Debian unstable with latest kernel 6.5.0-rc6+ from https://github.com/thesofproject/linux and firmware-sof-signed 2.2.6-1.
dmesg-with-nomodeset.txt
dmesg-without-nomodeset.txt

Activity

  1. plbossart commented on Sep 15, 2023

    @plbossart
    Member

    looks like a graphics issue to me

    [  107.538619] sof-audio-pci-intel-tgl 0000:00:1f.3: couldn't bind with audio component
    [  107.538683] sof-audio-pci-intel-tgl 0000:00:1f.3: init of i915 and HDMI codec failed
    
    [  107.940305] sof-audio-pci-intel-tgl 0000:00:1f.3: error: can't connect DAI HDA0.OUT stream iDisp1
    [  107.940310] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to add widget id 0 type 27 name : HDA0.OUT stream iDisp1
    [  107.940328] sof_sdw sof_sdw: ASoC: failed to load widget HDA0.OUT
    [  107.940332] sof_sdw sof_sdw: ASoC: topology: could not load header: -22
    [  107.940349] sof-audio-pci-intel-tgl 0000:00:1f.3: error: tplg component load failed -22
    [  107.940362] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP topology -22
    [  107.940365] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22
    [  107.940392] sof_sdw sof_sdw: ASoC: failed to instantiate card -22
    

    @kv2019i @ujfalusi any ideas?

  2. ujfalusi commented on Sep 18, 2023

    @ujfalusi
    Collaborator

    The nomodeset will make the i915 driver to not probe, only simpledrmfb will provide some sort of video output.
    Interestingly this will make an SDW platform to fail to probe the audio because nothing have been found on the HDA bus:
    modeset:

    [   43.640669] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 4
    

    nomodeset:

    [  107.548651] sof-audio-pci-intel-tgl 0000:00:1f.3: no hda codecs found!
    

    Interestingly, because on a HDA platform:
    modeset

    [    3.867265] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 5
    

    nomodeset

    [   66.733433] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 1
    

    and the card probes, we have HDMI PCMs present, but obviously they don't work.

    Note also that the audio probing takes a long time to kick in both SDW and HDA platforms.

  3. ujfalusi commented on Sep 18, 2023

    @ujfalusi
    Collaborator

    The reason why the HDA platform manages to create the sound card is due to a 'bug' in sound/soc/codecs/hdac_hda.c:
    #4509 (comment)

    The hdac_hda.c creates the display DAIs unconditionally and it does that when the analog codec is probed (the HDMI never probes, it is not available on the HDA bus):

    sof-up-xtreme:[root]:~# cat /sys/kernel/debug/asoc/components 
    snd_sof.hda-probes.0
    0000:00:1f.3
    ehdaudio0D0
    dmic-codec
    snd-soc-dummy
    snd-soc-dummy
    sof-up-xtreme:[root]:~# cat /sys/kernel/debug/asoc/dais 
    snd_sof.hda-probes.0
    SSP0 Pin
    SSP1 Pin
    SSP2 Pin
    SSP3 Pin
    SSP4 Pin
    SSP5 Pin
    DMIC01 Pin
    DMIC16k Pin
    iDisp1 Pin
    iDisp2 Pin
    iDisp3 Pin
    iDisp4 Pin
    Analog CPU DAI
    Digital CPU DAI
    Alt Analog CPU DAI
    HDMI1
    HDMI2
    HDMI3
    HDA Analog
    DeepBuffer
    Analog Codec DAI
    Digital Codec DAI
    Alt Analog Codec DAI
    intel-hdmi-hifi1
    intel-hdmi-hifi2
    intel-hdmi-hifi3
    intel-hdmi-hifi4
    dmic-hifi
    snd-soc-dummy-dai
    

    With ujfalusi@1fa9470 the HDA platform also fails to create the sound card:

    sof-up-xtreme:[root]:~# cat /sys/kernel/debug/asoc/components 
    snd_sof.hda-probes.0
    0000:00:1f.3
    ehdaudio0D0
    dmic-codec
    snd-soc-dummy
    snd-soc-dummy
    sof-up-xtreme:[root]:~# cat /sys/kernel/debug/asoc/dais 
    snd_sof.hda-probes.0
    SSP0 Pin
    SSP1 Pin
    SSP2 Pin
    SSP3 Pin
    SSP4 Pin
    SSP5 Pin
    DMIC01 Pin
    DMIC16k Pin
    iDisp1 Pin
    iDisp2 Pin
    iDisp3 Pin
    iDisp4 Pin
    Analog CPU DAI
    Digital CPU DAI
    Alt Analog CPU DAI
    Analog Codec DAI
    Digital Codec DAI
    Alt Analog Codec DAI
    dmic-hifi
    snd-soc-dummy-dai
    
  4. ujfalusi commented on Sep 18, 2023

    @ujfalusi
    Collaborator

    I'm not sure how to fix this, if it needs to be fixed at all. The tplg contains the HDMI link, it has to be present, I would guess if we would have a no-hdmi flavor of the topologies then we could select those somehow in case the i915 is not available?

  5. kv2019i commented on Sep 18, 2023

    @kv2019i
    Collaborator

    @ujfalusi @bardliao I think we should handle this like in HDA mach driver. Have the nodes in topology, but mach driver ignores them if display codec is not detected at runtime. This is a corner case, but still something that can be hit (e.g. nomodeset, or systems with runtime options to switch between internal and external GPU).

  6. ujfalusi commented on Sep 18, 2023

    @ujfalusi
    Collaborator

    @kv2019i, right, but that bug in the hdac_hda must be fixed, creating the HDMI dai when the analog codec is probing is not correct, creating it again and again for each probed HDA codec is a bug.

  7. bardliao commented on Sep 18, 2023

    @bardliao
    Collaborator

    We could use a postfix in topology name for the devices that no HDMI is available. For example, sof-adl-rt711-l0-rt1316-l12-rt714-l3-no-hdmi.tplg. What do you think? @plbossart @kv2019i

  8. ujfalusi commented on Sep 18, 2023

    @ujfalusi
    Collaborator

    but we don't have the means to deal with the postfixing and it is not clear what to do if the i915 is not available at the time we probe that audio, but it is probing later (deferred probing).
    The only solution might be to move the display audio out as a sof-client to have a separate sound card if the display stack is available.

  9. kv2019i commented on Sep 18, 2023

    @kv2019i
    Collaborator

    @bardliao we can use the same topology (like HDA generic) does. if i915 is not available at probe, the HDMI links will be connected to dummy codec instead. If i915 is enabled later, the audio driver needs to be reloaded (or we move later to the separate HDMI client solution).

  10. ujfalusi commented on Sep 18, 2023

    @ujfalusi
    Collaborator

    @kv2019i, that would 'solve' the deferred probing hassle and we can just get rid of the probe workqueue? Is this really a solution?
    The topology require specific DAI to be present, so we need to mangle that if the i915/xe is not yet loaded and present dummy display audio PCMs?
    Can this be done in a sane way?

    If the i915/xe driver loads later then SOF then SOF should defer and be probed after the i915/xe, right?
    If we modify the card to use dummy codec when i915/xe is not available at probe time and later the display probes then what? User has to remove the audio modules and load them again. Is that something that we can expect a user will happily do?

    User preventing the display driver to probe (nomodeset, module deny list, etc) is entirely different case, right?
    If the machine have dGPU and user wants to disable the iGPU, that is something different again and it is kind of valid thing which we don't support atm.

    If the user does this then probably we should have a module parameter to SOF to ignore the display PCMs? no-display-audio?
    I mean, the user on purpose disabled the display stack, it is not far fetched that he/she is capable of adding another module option.

  11. halobarrlets commented on Sep 18, 2023

    @halobarrlets
    Author

    There is also a specific use case with hardware isolation in VM:
    https://www.qubes-os.org/news/2020/03/18/gui-domain/#audio-domain
    In this case only PCI audio device will be passthrough to the VM and without GPU it'll fail like this:

    snd_hda_intel 0000:00:05.0: DSP detected with PCI class/subclass/prog-if info 0x040100
    snd_hda_intel 0000:00:05.0: NHLT table not found
    snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec
    snd_hda_intel 0000:00:05.0: Cannot probe codecs, giving up
    
    
  12. plbossart commented on Sep 18, 2023

    @plbossart
    Member

    We could use a postfix in topology name for the devices that no HDMI is available. For example, sof-adl-rt711-l0-rt1316-l12-rt714-l3-no-hdmi.tplg. What do you think? @plbossart @kv2019i

    Absolutely no. It's painful enough to have to maintain the 70-odd SoundWire topologies, I don't want to add one more degree of freedom. We really need to have a mechanism where parts of the topology are disabled by the machine driver, this is the 'hardware' layer I've been talking about for more than 2 years. The topology should not assume that a resource is always present or assigned exactly to the same pin/FIFO.

  13. ujfalusi commented on Sep 18, 2023

    @ujfalusi
    Collaborator

    @plbossart, how do we know if the resource (HDMI/DP) is genuinely missing or it is just going to be loaded later?

  14. plbossart commented on Sep 18, 2023

    @plbossart
    Member

    Things will fail either way @ujfalusi

    I think it's a corner case honestly. We've supported Dell devices on 5 generations of SoundWire devices and it's the first time this issue came up. What is the reason to use 'nomodeset' in the first place?

  15. ujfalusi commented on Sep 18, 2023

    @ujfalusi
    Collaborator

    There is also a specific use case with hardware isolation in VM: https://www.qubes-os.org/news/2020/03/18/gui-domain/#audio-domain In this case only PCI audio device will be passthrough to the VM and without GPU it'll fail like this:

    snd_hda_intel 0000:00:05.0: DSP detected with PCI class/subclass/prog-if info 0x040100
    snd_hda_intel 0000:00:05.0: NHLT table not found
    snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec
    snd_hda_intel 0000:00:05.0: Cannot probe codecs, giving up
    

    I see, so the OS in the VM will use the audio directly?
    The OS in VM should not treat the audio identically as it is running on bare metal, I think.
    We should be picking different topology (since i915 is not available inside of the VM) and machine driver, probably some quirk is needed to be able to handle this sort of use?

  16. 19 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions