You are not logged in.

#1 2022-05-07 18:27:10

horo
Member
Registered: 2016-03-13
Posts: 78

Pulseaudio trouble shooting

My pulseaudio server has been weird since i built my system and I've made little progress with fixing it.
First off I did not have a normal install process do to incompatibilities in my newer hardware and the stable .iso. The saga of my install was documented here

I have a dual monitor set up. One is an old VGA only computer monitor and the other is a modern small flat screen tv that is connected via HDMI. My sound only comes through the tv monitor normally, but for the sake of testing i've tried headphones in various headphone jacks on my tower.

When I use my system I typically have two users logged in. One has admin privileges, the other does not and I swap between the two from different tty's to test permission configs as I play around with Sysadmin stuff.

And here is some system info to help round out the picture.

$ inxi -AS
System:
  Host: vault Kernel: 5.17.0-1-amd64 arch: x86_64 bits: 64 Desktop: Openbox
    v: 3.6.1 Distro: Debian GNU/Linux bookworm/sid
Audio:
  Device-1: Intel Alder Lake-S HD Audio driver: snd_hda_intel
  Sound Server-1: ALSA v: k5.17.0-1-amd64 running: yes
  Sound Server-2: PulseAudio v: 15.0 running: yes
  Sound Server-3: PipeWire v: 0.3.51 running: yes

Ok- Now the problem. If my system goes to sleep I may, or maynot, lose audio. Sometimes when I wake my system up and login pulseaudio only displays 'Dummy Output' from the PNMixer.
At first I thought this was do to the tv monitor going into power saving mode, and pulseaudio not detecting it. Multiple attempts have proven the power status of the tv does on affect this, as I've had HMDI as an output option even when the monitor has remained in standby mode, or Dummy Option only even when I specifically powered on the monitor fully before logging back into the system.

Next, returning audio playback sometimes works with 'pulseaudio --kill' and selecting 'yes' when PNMixer complains
Sometimes it just works
Sometimes I have to close all sources that would want to connect to the pulseaudio server (web pages, media players)
Sometimes it does nothing

I suspected maybe a faulty hdmi cable at this point that was corrupting my audio channel somehow, but the issue never happens while my system is active and has not happened from rebooting the system, only when coming back from hibernation. Changed the cable anyway and the problem persisted.

Finally, the issue can happen independently between multiple logins. Right now I have two users logged in. One has no sound, the other does. When I plug headphones into the jack, one of the user gets to se it, the other does not. This seems to be random. neither user can see the HDMI connection.

user 1- Has sounds

$ pacmd list-sinks
1 sink(s) available.
  * index: 1
	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: 34.64 ms
	max request: 6 KiB
	max rewind: 6 KiB
	monitor source: 2
	sample spec: s16le 2ch 44100Hz
	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 = "ALC897 Analog"
		alsa.id = "ALC897 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 0x6001110000 irq 141"
		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 = "7ad0"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "352800"
		device.buffering.fragment_size = "176400"
		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-lineout: Line Out (priority 9000, latency offset 0 usec, available: no)
			properties:
				
		analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output-headphones>

User 2- no sound

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: 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: 344 KiB
        max rewind: 344 KiB
        monitor source: 0
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right1 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: 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: 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: 12
        properties:
                device.description = "Dummy Output"
                device.class = "abstract"
                device.icon_name = "audio-card"

                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
        module: 12
        properties:
                device.description = "Dummy Output"
                device.class = "abstract"
                device.icon_name = "audio-card"

Any ideas would be appreciated. I'm gona see about picking up a cheap set of speakers to leave plugged into the analog audio jacks and see if having a second consistent audio sink changes the behavior, but that's not really getting to the heart of the problem.

Offline

#2 2022-05-07 23:59:46

AndrewSmart
Member
Registered: 2019-06-10
Posts: 62

Re: Pulseaudio trouble shooting

horo wrote:

Finally, the issue can happen independently between multiple logins. Right now I have two users logged in. One has no sound, the other does. When I plug headphones into the jack, one of the user gets to se it, the other does not. This seems to be random.

You're on live USB?
I have/had same/similar issue, on live USB. Had 'dummy output'. I have no HDMI. My guess is it issue with systemd race condition
`systemctl --user status` should show that there is no user pulseaudio running correct? If so, then likely same issue.

3 things I tried and/or thought of that improved things:

1:
I think adding 'nodelalloc' helped things, to /usr/lib/live/boot/9950-misc, I forget right lines I'm on phone. grep around in there for mount options you'll find right lines to modify. Then run live-updateinitrd (after first mounting live partition to right spot, I don't recall where). Reboot and check mtab to verify. Ext4 right? Benchmark before and after if you want.

Then with nodelalloc things seem to be better on USB with no write cache in dmesg. I think new kernel no longer assumes write cache if sdparam doesn't show 'cache' page, but beyond my knowledge, sure used to be faster in buster/lithium on USB IIRC (I have YouTube video of it booting in old post it was fast). I think this has to do with a "user-friendly" decision made to minimize data loss when they unplug a USB, to always act as if there is no write cache when that is unknown (limitation of sdparam over USB lots over my head) means no data is lost but it makes writes slowwww. So, I'd love to know how to change things back if this is the case. I think my logic may be wrong on the write cache, this is over my head!

2:
Race condition in systemd, where changing a Wants= to a Requires= might fix? I did not try. Probably not fruitful.
https://www.freedesktop.org/software/sy … .unit.html

3:
Longer default systemd timeouts. Read on this on reading failure messages from `systemd --user --failed` and `systemd --user status pulseaudio` I think. This is workaround for the sloowwwwww user-friendly assume-there-is no-write-cache-when-you-don't-know change between buster and bullseye. Still slow as mud but systemd less likely to give up waiting.

I think the lack of --user pulseaudio each boot changed from usually to rarely (never? I had bad memory) with changes 1&3.

Last edited by AndrewSmart (2022-05-08 00:41:34)

Offline

#3 2022-05-08 18:16:42

horo
Member
Registered: 2016-03-13
Posts: 78

Re: Pulseaudio trouble shooting

I'm not on a live USB. In short I'm using the barebones testing version of Debian with the BL-meta-package installed. This was to get a more up-to-date kernel that could use the hardware I was building on.

At the moment my system has sound, but in a very fractured way. I have the tv speakers through the HDMI connection, and a set of head phones through the front audio jack on the tower.
The weird thing is my login on user1 can only see the HDMI, and my login on user2 can only see the headphone jack.
PNMixer has a drop down menu in 'Output Devices' but it has no options.

here is the outout of systemctl --user status pulseaudio for user1

● pulseaudio.service - Sound Service
     Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-05-07 16:25:05 PDT; 18h ago
TriggeredBy: ● pulseaudio.socket
   Main PID: 88727 (pulseaudio)
      Tasks: 3 (limit: 18872)
     Memory: 13.1M
        CPU: 16.703s
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pulseaudio.service
             └─88727 /usr/bin/pulseaudio --daemonize=no --log-target=journal

May 07 16:25:05 vault systemd[1537]: Starting Sound Service...
May 07 16:25:05 vault systemd[1537]: Started Sound Service.
May 07 16:25:30 vault pulseaudio[88727]: GetManagedObjects() failed: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

and the same for user2

● pulseaudio.service - Sound Service
     Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-05-07 15:43:49 PDT; 19h ago
TriggeredBy: ● pulseaudio.socket
   Main PID: 88035 (pulseaudio)
      Tasks: 2 (limit: 18872)
     Memory: 14.6M
        CPU: 22min 58.252s
     CGroup: /user.slice/user-1001.slice/user@1001.service/session.slice/pulseaudio.service
             └─88035 /usr/bin/pulseaudio --daemonize=no --log-target=journal

May 07 15:43:49 vault systemd[35863]: Starting Sound Service...
May 07 15:43:49 vault systemd[35863]: Started Sound Service.
May 07 15:44:14 vault pulseaudio[88035]: GetManagedObjects() failed: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
May 07 16:24:26 vault pulseaudio[88035]: protocol error, kicking client

Offline

#4 2022-05-08 18:32:49

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 1,762

Re: Pulseaudio trouble shooting

-Please check if pipewire-pulse is installed.
-Do you have this output with the command

$ LANG=C pactl info | grep '^Server Name'
Server Name: PulseAudio (on PipeWire 0.3.51)

This is for unstable. If there are other discrepancies, you should look at the current Debian wiki from above to solve your problems.   smile

Offline

Board footer

Powered by FluxBB