Announcement

Collapse
No announcement yet.

[RESOLVED] No sound after upgrade from 22.04 LTS to 24.04 LTS - problem depends on kernel version

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • jensnolte
    replied
    options snd_hda_intel index=2,0 id=Generic,HDMI worked but created another problem: When I selected headphones as output in the sound settings, sound works fine.

    i then started alsamixer and found a automute function which was enabled. I disabled it, after that sound was working fine on both headphones and speakers until the next reboot.
    In order to fix it permanently, I had to use the command sudo alsactl store.

    For now, everything is working as expected. Fingers crossed ;-)

    Leave a comment:


  • Virginio Miranda
    replied
    At the end the problem was in a wrong driver loaded by the new kernel when you upgraded from 22.04 to 24.04.

    Now the things is clear like water:

    go to /proc/asound/modules . There you will see the number of modules and the first number in modules is a index number. Probably you are going to see two snd_hda_intel drivers and you dont know who is who. Take a look at /proc/asound/cards too. It will show you the cards with ID and index numbers, but its is better to use the command line below to be sure.

    Now do $ cat /proc/asound/cardx/id. When you change the X on cardX number you are going to see witch module is going to be loaded ( card0, card1 ,card2 for example )

    Probably you have 3 modules. About snd_hda_intel, one of them is HDMI and the other is Generic. I dont know who can be card0 in you case.

    In my case, i have 3 modules. Module 0 or card0 is snd_emu10k1 ( i have an old creative live drive card ) . Module 1 or card1 is snd_hda-intel HDMI ( internal from mobo ) and Module 2 or card2 is a snd_hda_intel generic ( internal from mobo )

    So, it is self explained in my case, but in your case, probably when you do a coldstart it loads a snd_hda_intel HDMI and not a generic module and of course no sound output, because you need to use a generic module and not a hdmi module.



    Well, your solution solve momentarily the problem, but i suspect if in the future if you are going to use HDMI module it will be in # Prevent abnormal drivers from grabbing index 0​ and the module will not to be loaded and no sound output from HDMI output.

    Maybe worth a try to load:

    options snd_hda_intel index=x,y id=Generic,HDMI​ at the end of the file /etc/modprobe.d/alsa-base.conf and see how it performs. Where X and Y are the modules number where you got from cat /proc/asound/cardx/id​ and the ID are the results from this command.

    In Time: Take a look here at 3.2.2. It can be usefull for you:

    https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture#Set_the_default_ sound_card


    By the way, index of -2 instruct ALSA to never use a card as the primary one​.
    Last edited by Virginio Miranda; Nov 03, 2024, 07:40 PM.

    Leave a comment:


  • jensnolte
    replied

    The problem seems to be solved, although I don't completely understand the mechanism:

    snd_hda_intel is not blacklisted. I then added options snd_hda_intel to /etc/modprobe.d/alsa-base.conf. This fixed it for a few restarts, but only warmstarts. Once I shut down the PC and started it again, the problem reappeared.

    I then had a look at the other entries in /etc/modprobe.d/alsa-base.conf. Tehere is a section named "# Prevent abnormal drivers from grabbing index 0", there are a couple of drivers listed and they all had a parameter "index -2. Assuming that index 0 is a desired state for drivers which are not abnormal, I changed the line to options snd_hda_intel index=0. This didn't fix the problem either, but when I experimented with the parameter and started to increase it, the sound devices were present after a cold start when the line was options snd_hda_intel index=2

    I don't have any idea what the parameter "index" means, other than assuming it's some kind of priorisation. I don't understand either, why the parameter has to be 2 and doesn't work with another parameter such as 1. Anyway, it works for now.
    Thanls a lot for the support and pointing me towards the solution.

    Leave a comment:


  • Virginio Miranda
    replied
    Weird situation.

    It seems that when PC boots driver snd_hda_intel is on blacklist in some place. Then everything works again when you do alsa force-reload. Check etc/modprobe.d/blacklist-oss.conf and see if snd_hda_intel is not blacklisted there.

    If not, sudo nano /etc/modprobe.d/alsa-base.conf and add to the end of the file;

    options snd_hda_intel

    Save, Reboot and let see how it performs.
    Last edited by Virginio Miranda; Oct 29, 2024, 08:31 PM.

    Leave a comment:


  • jensnolte
    replied
    Thus is the content of /etc/modprobe/alsa-base-conf:


    # autoloader aliases
    install sound-slot-0 /sbin/modprobe snd-card-0
    install sound-slot-1 /sbin/modprobe snd-card-1
    install sound-slot-2 /sbin/modprobe snd-card-2
    install sound-slot-3 /sbin/modprobe snd-card-3
    install sound-slot-4 /sbin/modprobe snd-card-4
    install sound-slot-5 /sbin/modprobe snd-card-5
    install sound-slot-6 /sbin/modprobe snd-card-6
    install sound-slot-7 /sbin/modprobe snd-card-7

    # Cause optional modules to be loaded above generic modules
    install snd /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist snd-seq ; }
    #
    # Workaround at bug Latest Changes to Note When Installi...331.XX Drivers (reverted in Ubuntu see LP #319505)
    install snd-pcm /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; }
    install snd-mixer /sbin/modprobe --ignore-install snd-mixer $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-mixer-oss ; : ; }
    install snd-seq /sbin/modprobe --ignore-install snd-seq $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; /sbin/modprobe --quiet --use-blacklist snd-seq-oss ; : ; }
    #
    install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; : ; }
    # Cause optional modules to be loaded above sound card driver modules
    install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-emu10k1-synth ; }
    install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq ; }

    # Load saa7134-alsa instead of saa7134 (which gets dragged in by it anyway)
    install saa7134 /sbin/modprobe --ignore-install saa7134 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist saa7134-alsa ; : ; }
    # Prevent abnormal drivers from grabbing index 0
    options bt87x index=-2
    options cx88_alsa index=-2
    options saa7134-alsa index=-2
    options snd-atiixp-modem index=-2
    options snd-intel8x0m index=-2
    options snd-via82xx-modem index=-2
    options snd-usb-audio index=-2
    options snd-usb-caiaq index=-2
    options snd-usb-ua101 index=-2
    options snd-usb-us122l index=-2
    options snd-usb-usx2y index=-2
    # Ubuntu #62691, enable MPU for snd-cmipci
    options snd-cmipci mpu_port=0x330 fm_port=0x388
    # Keep snd-pcsp from being loaded as first soundcard
    options snd-pcsp index=-2
    # Keep snd-usb-audio from beeing loaded as first soundcard
    options snd-usb-audio index=-2

    Leave a comment:


  • Virginio Miranda
    replied
    Yes, both of them are the correct driver snd_hda_intel and put it on a blacklist will result in no audio of course.

    what do you have on etc/modprobe.d/alsa-base.conf ?

    Leave a comment:


  • jensnolte
    replied
    The strange thing is: I'm getting exact the same output before and after I perform the alsa force reload.
    Putting snd_hda_intel on a blacklist results in no audio at all (not even after alsa force-reload).
    It looks to me like the correct driver is loaded, but something during boot prevents it from being initialised properly, until alsa force-reload fixes it.

    Before:

    $ inxi -xxz -A
    Audio:
    Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio
    vendor: ASUSTeK driver: snd_hda_intel v: kernel bus-ID: 00:03.0
    chip-ID: 8086:0c0c
    Device-2: Intel 9 Series Family HD Audio vendor: ASUSTeK 9
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8ca0
    API: ALSA v: k6.8.0-47-generic status: kernel-api
    Server-1: PipeWire v: 1.0.5 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin​

    then I enter sudo alsa forece-reload

    after:


    $ inxi -xxz -A
    Audio:
    Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio
    vendor: ASUSTeK driver: snd_hda_intel v: kernel bus-ID: 00:03.0
    chip-ID: 8086:0c0c
    Device-2: Intel 9 Series Family HD Audio vendor: ASUSTeK 9
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8ca0
    API: ALSA v: k6.8.0-47-generic status: kernel-api
    Server-1: PipeWire v: 1.0.5 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin

    Leave a comment:


  • Virginio Miranda
    replied
    Hi jensnolte

    The problem is the kernel is loading the wrong drive.with sudo alsa force-reload it loads the correct drive. When you reboot it loads the wrong drive.

    I sugest you to blacklist snd_soc_avs because it use to be a problematic drive, but it seems not your case.

    Try to realize witch drives the kernel is loading.

    Use the latest Kernel. Reboot the PC. It will load the wrong drive. Type in konsole: $inxi -xxz -audio. Look at the drive.

    Then, make sudo alsa force-reload. After that the kernel will load the correct drive. Check if everything is working, then do $inxi -xxz -audio again and look at the drive.

    Maybe we can blacklist the wrong drive to not load when you reboot the PC.

    Leave a comment:


  • jensnolte
    replied
    Originally posted by Virginio Miranda View Post


    Edit /etc/modprobe.d/blacklist.conf and add to end of the file the follow:

    blacklist snd_soc_avs

    save and sudo alsa force-reload again.

    Reboot and lets see how it performs.
    Unfortunately, this does not work, either, it stops the workaround with the alsa force reload from working. Only after removing it from blacklist.conf, it worked again.

    Leave a comment:


  • Virginio Miranda
    replied
    Originally posted by jensnolte View Post

    user@hostname:~$ sudo alsa force-reload
    [sudo] Passwort für user:
    Terminating processes: 2610
    .
    Unloading ALSA sound driver modules: snd-seq-dummy snd-hrtimer snd-hda-codec-hdmi snd-hda-codec-realtek snd-hda-codec-generic snd-hda-intel snd-intel-dspcfg snd-intel-sdw-acpi snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-seq-midi snd-seq-midi-event snd-rawmidi snd-seq snd-seq-device snd-timer (failed: modules still loaded: snd-hrtimer snd-hda-codec-hdmi snd-hda-codec-realtek snd-hda-codec-generic snd-hda-intel snd-intel-dspcfg snd-intel-sdw-acpi snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-seq snd-seq-device snd-timer).
    Loading ALSA sound driver modules: snd-seq-dummy snd-hrtimer snd-hda-codec-hdmi snd-hda-codec-realtek snd-hda-codec-generic snd-hda-intel snd-intel-dspcfg snd-intel-sdw-acpi snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-seq-midi snd-seq-midi-event snd-rawmidi snd-seq snd-seq-device snd-timer.
    user@hostname:~$​


    This fixes the problem, but only until the next reboot. Then I have to enter the command again. Is there any way I can include this in a startup script, or find out what triggers this behaviour in the first place?


    Edit /etc/modprobe.d/blacklist.conf and add to end of the file the follow:

    blacklist snd_soc_avs

    save and sudo alsa force-reload again.

    Reboot and lets see how it performs.
    Last edited by Virginio Miranda; Sep 11, 2024, 01:20 PM.

    Leave a comment:


  • jensnolte
    replied
    Originally posted by Virginio Miranda View Post
    Try sudo alsa force-reload​ .
    user@hostname:~$ sudo alsa force-reload
    [sudo] Passwort für user:
    Terminating processes: 2610
    .
    Unloading ALSA sound driver modules: snd-seq-dummy snd-hrtimer snd-hda-codec-hdmi snd-hda-codec-realtek snd-hda-codec-generic snd-hda-intel snd-intel-dspcfg snd-intel-sdw-acpi snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-seq-midi snd-seq-midi-event snd-rawmidi snd-seq snd-seq-device snd-timer (failed: modules still loaded: snd-hrtimer snd-hda-codec-hdmi snd-hda-codec-realtek snd-hda-codec-generic snd-hda-intel snd-intel-dspcfg snd-intel-sdw-acpi snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-seq snd-seq-device snd-timer).
    Loading ALSA sound driver modules: snd-seq-dummy snd-hrtimer snd-hda-codec-hdmi snd-hda-codec-realtek snd-hda-codec-generic snd-hda-intel snd-intel-dspcfg snd-intel-sdw-acpi snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-seq-midi snd-seq-midi-event snd-rawmidi snd-seq snd-seq-device snd-timer.
    user@hostname:~$​


    This fixes the problem, but only until the next reboot. Then I have to enter the command again. Is there any way I can include this in a startup script, or find out what triggers this behaviour in the first place?

    Leave a comment:


  • Virginio Miranda
    replied
    Try sudo alsa force-reload​ .

    Leave a comment:


  • jensnolte
    replied
    Originally posted by Virginio Miranda View Post

    Glad you fix it.
    So was I, but too early: Today when I booted my PC, I have the very same issue again..... :-(

    Leave a comment:


  • Virginio Miranda
    replied
    Originally posted by jensnolte View Post

    Thanks, that fixed it, even without deleting the wireplumber folder.

    Prior to checking this, there was a kernel update to 6.8-0-44, but this wasn't the issue.
    Glad you fix it.

    Leave a comment:


  • jensnolte
    replied
    Originally posted by Virginio Miranda View Post

    I think the problem lies on it.

    PulseAudio is not the server anymore on 24.04 version. It is Pipewire now. For a reason on update from 22.04 to 24.04, Pulseaudio mix with Pipewire and can be the culprit for the problem.

    Go to synaptic and uninstall Pulse audio server there. Reboot. Go to Synaptic again and check if the follow packages are installed, if not install then:

    Pipewire , Pipewire-alsa, Pipewire-audio, Pipewire-pulse

    Reboot.

    Go the /home/.local/state and delete the folder wireplumber. Reboot the system and check if it works now.
    Thanks, that fixed it, even without deleting the wireplumber folder.

    Prior to checking this, there was a kernel update to 6.8-0-44, but this wasn't the issue.

    Leave a comment:

Working...
X