You are not logged in.

#1 2018-07-09 09:27:00

jeroen_JDOG
Member
Registered: 2015-03-28
Posts: 19

[SOLVED] No sound on fresh install - Default sound card incorrect

I've just installed Arch on my new computer (after using it on my laptop for a few years), but I cannot get any sound to work.
If I try the following command, I don't hear anything:

aplay /usr/share/sounds/alsa/Front_Right.wav

But if I try this next command, the sound works fine:

aplay -D plughw:1,0 /usr/share/sounds/alsa/Front_Right.wav

Clearly the default sound card is incorrect, and should be set to 1,0.
I've played around a bit with /usr/share/alsa/alsa.conf and /etc/modprobe.d/alsa-base.conf, but I cannot get it working.

How do I set my default sound card to 1,0 ?

Last edited by jeroen_JDOG (2018-07-10 08:40:36)

Offline

#2 2018-07-09 10:29:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,410

Re: [SOLVED] No sound on fresh install - Default sound card incorrect

Elaborate on played around a bit, what exactly did you do? Post your

aplay -lL

in addition to those files and read https://wiki.archlinux.org/index.php/Ad … sound_card

Offline

#3 2018-07-09 10:39:15

jeroen_JDOG
Member
Registered: 2015-03-28
Posts: 19

Re: [SOLVED] No sound on fresh install - Default sound card incorrect

I tried adding "options snd_hda_intel index=0" to /etc/modprobe.d/alsa-base.conf, but that didn't help.
I also tried making the following changes to /usr/share/alsa/alsa.conf:

defaults.ctl.card 1
defaults.pcm.card 1

Here's the output of "aplay -lL":

null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default
    Default ALSA Output (currently PulseAudio Sound Server)
hdmi:CARD=HDMI,DEV=0
    HDA ATI HDMI, HDMI 0
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=1
    HDA ATI HDMI, HDMI 1
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=2
    HDA ATI HDMI, HDMI 2
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=3
    HDA ATI HDMI, HDMI 3
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=4
    HDA ATI HDMI, HDMI 4
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=5
    HDA ATI HDMI, HDMI 5
    HDMI Audio Output
sysdefault:CARD=Generic
    HD-Audio Generic, ALC1220 Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    Front speakers
surround21:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Digital
    IEC958 (S/PDIF) Digital Audio Output
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC1220 Analog [ALC1220 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 1: ALC1220 Digital [ALC1220 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Also here's the output of "cat /proc/asound/modules":

 0 snd_hda_intel
 1 snd_hda_intel

Offline

#4 2018-07-09 11:44:17

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,410

Re: [SOLVED] No sound on fresh install - Default sound card incorrect

revert /usr/share/alsa/alsa.conf (it will get overwritten on updates) do the adjustments in /etc/asound.conf or ~/.asoundrc instead, if you want to change it that way.

If you want to go the modprobe way, we see that your index 0 is occupied by the graphics  card, it will always be enumerated first, to properly fix this in /etc/modprobe.d you will want to change the line so that it reads

options snd_hda_intel index=1,0

(i.e. give the first card you find (ATI HDMI) the index 1 and the second card you find the index 0 )

Edit: Your default card is a pulseaudio definition, are you using pulseaudio? Look into pavucontrol or similar and set the default card properly there if that is the case, if you aren't there's your problem, remove pulseaudio-alsa and/or make adjustments in /etc/asound.conf .

Last edited by V1del (2018-07-09 11:47:09)

Offline

#5 2018-07-09 12:09:05

jeroen_JDOG
Member
Registered: 2015-03-28
Posts: 19

Re: [SOLVED] No sound on fresh install - Default sound card incorrect

Ok, I reverted /usr/share/alsa/alsa.conf. Do I still need to create ~/.asoundrc if I use modprobe?

I changed /etc/modprobe.d/alsa-base.conf to the line you stated, and rebooted, but that did not work yet.

I am indeed using pulseaudio, in pavucontrol (output devices tab), I see the Ellesmere [Radeon RX 580] set to port "HDMI / DisplayPort 3 (plugged in)", this is the graphics card.
Then there is also "Family 17h (Models 00h-0fh) HD Audio Controller Digital Stereo (IEC958)" set to port "Digital Output (S/PDIF)", I suppose that this is the actual sound card.
I can't change that last one to anything else (all other options are "unplugged" and "unavailable").

What changes do you suggest in /etc/asound.conf?
Currently these are its contents:

# Use PulseAudio by default
pcm.!default {
  type pulse
  fallback "sysdefault"
  hint {
    show on
    description "Default ALSA Output (currently PulseAudio Sound Server)"
  }
}

ctl.!default {
  type pulse
  fallback "sysdefault"
}

# vim:set ft=alsaconf

Offline

#6 2018-07-09 13:20:01

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,410

Re: [SOLVED] No sound on fresh install - Default sound card incorrect

If you want to remain on pulse we should properly fix this in pulse, Can you post

sudo fuser -v /dev/snd/*
pacmd list-cards
pacmd list-sinks
journalctl -b --user-unit=pulseaudio

Offline

#7 2018-07-10 08:19:31

jeroen_JDOG
Member
Registered: 2015-03-28
Posts: 19

Re: [SOLVED] No sound on fresh install - Default sound card incorrect

I don't particularly mind if I use pulse or not, as long as I can get sound working. I used pulse on my laptop as well (sound works fine there), so I figured to install it again.

Output of "sudo fuser-v /dev/snd/*":

                                USER PID ACCESS COMMAND
/dev/snd/controlC0: jeroen 664 F.... pulseaudio
/dev/snd/controlC1: jeroen 664 F.... pulseaudio

Output of "pacmd list-cards":

2 card(s) available.
    index: 0
    name: <alsa_card.pci-0000_06_00.1>
    driver: <module-alsa-card.c>
    owner module: 8
    properties:
        alsa.card = "1"
        alsa.card_name = "HDA ATI HDMI"
        alsa.long_card_name = "HDA ATI HDMI at 0xfe960000 irq 77"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:06:00.1"
        sysfs.path = "/devices/pci0000:00/0000:00:03.1/0000:06:00.1/sound/card1"
        device.bus = "pci"
        device.vendor.id = "1002"
        device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
        device.product.id = "aaf0"
        device.product.name = "Ellesmere [Radeon RX 580]"
        device.string = "1"
        device.description = "Ellesmere [Radeon RX 580]"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    profiles:
        output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5900, available: no)
        output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 800, available: no)
        output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 800, available: no)
        output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5700, available: no)
        output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 600, available: no)
        output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 600, available: no)
        output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5700, available: unknown)
        output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (priority 5700, available: unknown)
        output:hdmi-stereo-extra4: Digital Stereo (HDMI 5) Output (priority 5700, available: no)
        output:hdmi-surround-extra4: Digital Surround 5.1 (HDMI 5) Output (priority 600, available: no)
        output:hdmi-surround71-extra4: Digital Surround 7.1 (HDMI 5) Output (priority 600, available: no)
        output:hdmi-stereo-extra5: Digital Stereo (HDMI 6) Output (priority 5700, available: no)
        output:hdmi-surround-extra5: Digital Surround 5.1 (HDMI 6) Output (priority 600, available: no)
        output:hdmi-surround71-extra5: Digital Surround 7.1 (HDMI 6) Output (priority 600, available: no)
        off: Off (priority 0, available: unknown)
    active profile: <output:hdmi-stereo-extra2>
    sinks:
        alsa_output.pci-0000_06_00.1.hdmi-stereo-extra2/#0: Ellesmere [Radeon RX 580] Digital Stereo (HDMI 3)
    sources:
        alsa_output.pci-0000_06_00.1.hdmi-stereo-extra2.monitor/#0: Monitor of Ellesmere [Radeon RX 580] Digital Stereo (HDMI 3)
    ports:
        hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
            properties:
                device.icon_name = "video-display"
        hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
            properties:
                device.icon_name = "video-display"
        hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: yes)
            properties:
                device.icon_name = "video-display"
                device.product.name = "PHL 243V7"
        hdmi-output-3: HDMI / DisplayPort 4 (priority 5600, latency offset 0 usec, available: yes)
            properties:
                device.icon_name = "video-display"
                device.product.name = "PHL 243V7"
        hdmi-output-4: HDMI / DisplayPort 5 (priority 5500, latency offset 0 usec, available: no)
            properties:
                device.icon_name = "video-display"
        hdmi-output-5: HDMI / DisplayPort 6 (priority 5400, latency offset 0 usec, available: no)
            properties:
                device.icon_name = "video-display"
    index: 1
    name: <alsa_card.pci-0000_08_00.3>
    driver: <module-alsa-card.c>
    owner module: 9
    properties:
        alsa.card = "0"
        alsa.card_name = "HD-Audio Generic"
        alsa.long_card_name = "HD-Audio Generic at 0xfe800000 irq 79"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:08:00.3"
        sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:08:00.3/sound/card0"
        device.bus = "pci"
        device.vendor.id = "1022"
        device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
        device.product.id = "1457"
        device.product.name = "Family 17h (Models 00h-0fh) HD Audio Controller"
        device.string = "0"
        device.description = "Family 17h (Models 00h-0fh) HD Audio Controller"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    profiles:
        input:analog-stereo: Analog Stereo Input (priority 65, available: no)
        output:analog-stereo: Analog Stereo Output (priority 6500, available: no)
        output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6565, available: no)
        output:analog-surround-21: Analog Surround 2.1 Output (priority 1300, available: no)
        output:analog-surround-21+input:analog-stereo: Analog Surround 2.1 Output + Analog Stereo Input (priority 1365, available: no)
        output:analog-surround-40: Analog Surround 4.0 Output (priority 1200, available: no)
        output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Output + Analog Stereo Input (priority 1265, available: no)
        output:analog-surround-41: Analog Surround 4.1 Output (priority 1300, available: no)
        output:analog-surround-41+input:analog-stereo: Analog Surround 4.1 Output + Analog Stereo Input (priority 1365, available: no)
        output:analog-surround-50: Analog Surround 5.0 Output (priority 1200, available: no)
        output:analog-surround-50+input:analog-stereo: Analog Surround 5.0 Output + Analog Stereo Input (priority 1265, available: no)
        output:analog-surround-51: Analog Surround 5.1 Output (priority 1300, available: no)
        output:analog-surround-51+input:analog-stereo: Analog Surround 5.1 Output + Analog Stereo Input (priority 1365, available: no)
        output:iec958-stereo: Digital Stereo (IEC958) Output (priority 5500, available: unknown)
        output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (priority 5565, available: unknown)
        off: Off (priority 0, available: unknown)
    active profile: <output:iec958-stereo>
    sinks:
        alsa_output.pci-0000_08_00.3.iec958-stereo/#1: Family 17h (Models 00h-0fh) HD Audio Controller Digital Stereo (IEC958)
    sources:
        alsa_output.pci-0000_08_00.3.iec958-stereo.monitor/#1: Monitor of Family 17h (Models 00h-0fh) HD Audio Controller Digital Stereo (IEC958)
    ports:
        analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
            properties:
                device.icon_name = "audio-input-microphone"
        analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: no)
            properties:
                device.icon_name = "audio-input-microphone"
        analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: no)
            properties:
               
        analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: no)
            properties:
               
        analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
            properties:
                device.icon_name = "audio-headphones"
        iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
            properties:

Output of "pacmd list-sinks":

2 sink(s) available.
    index: 0
    name: <alsa_output.pci-0000_06_00.1.hdmi-stereo-extra2>
    driver: <module-alsa-card.c>
    flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE
    priority: 9030
    volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
            balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 0.00 ms
    max request: 0 KiB
    max rewind: 0 KiB
    monitor source: 0
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0.00 ms; range is 0.50 .. 1999.82 ms
    card: 0 <alsa_card.pci-0000_06_00.1>
    module: 8
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "HDMI 2"
        alsa.id = "HDMI 2"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "8"
        alsa.card = "1"
        alsa.card_name = "HDA ATI HDMI"
        alsa.long_card_name = "HDA ATI HDMI at 0xfe960000 irq 77"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:06:00.1"
        sysfs.path = "/devices/pci0000:00/0000:00:03.1/0000:06:00.1/sound/card1"
        device.bus = "pci"
        device.vendor.id = "1002"
        device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
        device.product.id = "aaf0"
        device.product.name = "Ellesmere [Radeon RX 580]"
        device.string = "hdmi:1,2"
        device.buffering.buffer_size = "352768"
        device.buffering.fragment_size = "176384"
        device.access_mode = "mmap+timer"
        device.profile.name = "hdmi-stereo-extra2"
        device.profile.description = "Digital Stereo (HDMI 3)"
        device.description = "Ellesmere [Radeon RX 580] Digital Stereo (HDMI 3)"
        alsa.mixer_name = "ATI R6xx HDMI"
        alsa.components = "HDA:1002aa01,00aa0100,00100700"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    ports:
        hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: yes)
            properties:
                device.icon_name = "video-display"
                device.product.name = "PHL 243V7"
    active port: <hdmi-output-2>
  * index: 1
    name: <alsa_output.pci-0000_08_00.3.iec958-stereo>
    driver: <module-alsa-card.c>
    flags: HARDWARE HW_MUTE_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE
    priority: 9038
    volume: front-left: 32080 /  49% / -18.61 dB,   front-right: 32080 /  49% / -18.61 dB
            balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 0.00 ms
    max request: 0 KiB
    max rewind: 0 KiB
    monitor source: 1
    sample spec: s16le 2ch 48000Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0.00 ms; range is 0.50 .. 1837.33 ms
    card: 1 <alsa_card.pci-0000_08_00.3>
    module: 9
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "ALC1220 Digital"
        alsa.id = "ALC1220 Digital"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "1"
        alsa.card = "0"
        alsa.card_name = "HD-Audio Generic"
        alsa.long_card_name = "HD-Audio Generic at 0xfe800000 irq 79"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:08:00.3"
        sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:08:00.3/sound/card0"
        device.bus = "pci"
        device.vendor.id = "1022"
        device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
        device.product.id = "1457"
        device.product.name = "Family 17h (Models 00h-0fh) HD Audio Controller"
        device.string = "iec958:0"
        device.buffering.buffer_size = "352768"
        device.buffering.fragment_size = "176384"
        device.access_mode = "mmap+timer"
        device.profile.name = "iec958-stereo"
        device.profile.description = "Digital Stereo (IEC958)"
        device.description = "Family 17h (Models 00h-0fh) HD Audio Controller Digital Stereo (IEC958)"
        alsa.mixer_name = "Realtek ALC1220"
        alsa.components = "HDA:10ec1220,1458a182,00100003"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    ports:
        iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
            properties:
               
    active port: <iec958-stereo-output>

Output of "journalctl -b --user-unit=pulseaudio":

-- Logs begin at Sun 2018-07-08 18:23:05 CEST, end at Tue 2018-07-10 10:08:10 CEST. --
Jul 10 09:52:18 Jeroen systemd[550]: Starting Sound Service...
Jul 10 09:52:18 Jeroen pulseaudio[664]: E: [pulseaudio] module.c: Failed to load module "module-alsa-sink" (argument: "device=hw:1,0"): initialization failed.
Jul 10 09:52:18 Jeroen pulseaudio[664]: E: [pulseaudio] module.c: Failed to load module "module-alsa-source" (argument: "device=hw:1,0"): initialization failed.
Jul 10 09:52:18 Jeroen systemd[550]: Started Sound Service.

Offline

#8 2018-07-10 08:22:35

jeroen_JDOG
Member
Registered: 2015-03-28
Posts: 19

Re: [SOLVED] No sound on fresh install - Default sound card incorrect

I played around a bit with ~/.asoundrc, and it swapped around my cards in the output of "aplay -l" (card 0 is now card 1 and card 1 is now card 0).
Seeing the output of "journalctl -b --user-unit=pulseaudio", I tried updating /etc/modprobe.d/alsa-base.conf to contain

options snd_hda_intel index=0,0

After a restart that works, thanks a lot !

Offline

#9 2020-12-29 18:41:02

®om
Member
Registered: 2020-12-29
Posts: 1

Re: [SOLVED] No sound on fresh install - Default sound card incorrect

Thank you very much.

In my case (Yoga Slim 7), I added:

options snd_hda_intel index=1,0

in /etc/modprobe.d/alsa-base.conf and rebooted, and it works!

Offline

Board footer

Powered by FluxBB