Switching from Plasma to i3 causes Pulseaudio audio sink to disappear

I’ve been trying to transition from Plasma to i3, getting over some hiccups along the way, and now I’m stuck with the issue of my sound being broken. When logging into i3, the main sound sink disappears and is replaced with a dummy sink. Switching back to Plasma doesn’t even fix the issue, and I have to restart the machine and log directly into Plasma to get sound again.

I’ve quite a bit of reading on ALSA and Pulseaudio, and while I think I understand the systems a little better, I’m still unsure how to diagnose my problem deeper.

Output of some relevant commands in Plasma:

> aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC289 Analog [ALC289 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 12: HDMI 6 [HDMI 6]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


> pacmd list-sinks
1 sink(s) available.
  * index: 0
        name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: IDLE
        suspend cause: (none)
        priority: 9039
        volume: front-left: 48397 /  74% / -7.90 dB,   front-right: 48397 /  74% / -7.90 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 38.19 ms
        max request: 7 KiB
        max rewind: 7 KiB
        monitor source: 0
        sample spec: s16le 2ch 48000Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 1
        configured latency: 40.00 ms; range is 0.50 .. 2000.00 ms
        card: 0 <alsa_card.pci-0000_00_1f.3>
        module: 6
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC289 Analog"
                alsa.id = "ALC289 Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0x603dbb0000 irq 184"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1f.3"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "34c8"
                device.product.name = "Ice Lake-LP Smart Sound Technology Audio Controller"
                device.form_factor = "internal"
                device.string = "front:0"
                device.buffering.buffer_size = "384000"
                device.buffering.fragment_size = "192000"
                device.access_mode = "mmap+timer"
                device.profile.name = "analog-stereo"
                device.profile.description = "Analog Stereo"
                device.description = "Built-in Audio Analog Stereo"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
                        properties:
                                device.icon_name = "audio-speakers"
                analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-headphones"
        active port: <analog-output-speaker>


> pactl info      
Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 8
Tile Size: 65472
User Name: brooksvb
Host Name: manjystone
Server Name: pulseaudio
Server Version: 15.0
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_1f.3.analog-stereo
Default Source: alsa_input.pci-0000_00_1f.3.analog-stereo
Cookie: d386:8a2b

Output of commands in i3:

> aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC289 Analog [ALC289 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 12: HDMI 6 [HDMI 6]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


> pacmd list-sinks
1 sink(s) available.
  * index: 0
        name: <auto_null>
        driver: <module-null-sink.c>
        flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE
        priority: 1000
        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 64880 /  99% / -0.26 dB
                balance -0.01
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 0.00 ms
        max request: 344 KiB
        max rewind: 344 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 .. 2000.00 ms
        module: 15
        properties:
                device.description = "Dummy Output"
                device.class = "abstract"
                device.icon_name = "audio-card"


> pactl info      
Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 7
Tile Size: 65472
User Name: brooksvb
Host Name: manjystone
Server Name: pulseaudio
Server Version: 15.0
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: auto_null
Default Source: auto_null.monitor
Cookie: 467c:7daa

Running pulseaudio -k; pulseaudio -vvvvvv I encounter the following error:

E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_00_1f.3" card_name="alsa_card.pci-0000_00_1f.3" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.

So it seems that ALSA still sees the sound card fine, but for some reason Pulseaudio fails to load them.

Any advice is appreciated.

card 0: PCH [HDA Intel PCH], device 0: ALC289 Analog [ALC289 Analog]
  Subdevices: 0/1

The 0/1 in Plasma indicates this card is not available for direct connection in ALSA,
most likely from PulseAudio set as default connection by package pulseaudio-alsa

Similar data for i3 showing 1/1 suggests PulseAudio is not connected,
So I suspect that pulseaudio-alsa was not installed with pulseaudio for i3

If this package is installed and PulseAudio is not working as intended , I suggest using this command to check for errors in PulseAudio

systemctl --user -l --no-pager pulseaudio

and this to check audio devices in ALSA

sudo alsa-info.sh --upload

Thank you for the reply.

pulseaudio-alsa is installed; this is the same machine that I already have Manjaro Plasma installed on. I just additionally installed i3 and select it from the login screen.

> systemctl --user -l --no-pager status pulseaudio.service
● pulseaudio.service - Sound Service
     Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; disabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-01-22 18:52:23 MST; 8min ago
TriggeredBy: ● pulseaudio.socket
   Main PID: 175474 (pulseaudio)
      Tasks: 6 (limit: 18669)
     Memory: 5.2M
        CPU: 190ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pulseaudio.service
             ├─175474 /usr/bin/pulseaudio --daemonize=no --log-target=journal
             └─175477 /usr/lib/pulse/gsettings-helper

Jan 22 18:52:23 manjystone systemd[1326]: Starting Sound Service...
Jan 22 18:52:23 manjystone pulseaudio[175474]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_00_1f.3" card_name="alsa_card.pci-0000_00_1f.3" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
Jan 22 18:52:23 manjystone pulseaudio[175474]: stat('/etc/pulse/default.pa.d'): No such file or directory
Jan 22 18:52:23 manjystone systemd[1326]: Started Sound Service.
Jan 22 18:52:23 manjystone pulseaudio[175474]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_00_1f.3" card_name="alsa_card.pci-0000_00_1f.3" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
> systemctl --user -l --no-pager status pulseaudio.socket 
● pulseaudio.socket - Sound System
     Loaded: loaded (/usr/lib/systemd/user/pulseaudio.socket; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-01-21 19:49:55 MST; 23h ago
      Until: Fri 2022-01-21 19:49:55 MST; 23h ago
   Triggers: ● pulseaudio.service
     Listen: /run/user/1000/pulse/native (Stream)
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/pulseaudio.socket

Jan 21 19:49:55 manjystone systemd[1326]: Listening on Sound System.

Here is the alsa-info.sh output
http://alsa-project.org/db/?f=1e0be913f8d52583b7200d7c235ed1742194e37a

I think I may have found the issue! I noticed in the alsa-info output that Pipewire was running (recently I tried to test it out but didn’t get a working setup). I disabled Pipewire, and it seems my sound is working again. Woops!

systemctl --user disable pipewire
systemctl --user disable pipewire.socket

It makes me wonder why my sound continued to work in Plasma. I would guess that somehow Pulseaudio ran before Pipewire when launching Plasma, so that it avoided this error.

Thank you for giving me a couple more useful commands. :slight_smile:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.