You are not logged in.

#26 2026-06-06 07:36:41

Enrico1989
Member
Registered: 2018-07-05
Posts: 357

Re: Audio breaks after every suspend/change of VT

seth wrote:

I assume it had no impact on the output changes?

Nope.

seth wrote:

Does it help to add a strategic nap into your bashrc?

 …
if [[ ! $DISPLAY && ($XDG_VTNR == 1 || $XDG_VTNR == 2) ]]; then
   sleep 3
  case $USER in
    'enrico' )
…

(I assume you meant ~/.bash_profile) Nope, I saw no difference in how the audio behaved.

Offline

#27 2026-06-09 07:37:57

Enrico1989
Member
Registered: 2018-07-05
Posts: 357

Re: Audio breaks after every suspend/change of VT

Any chance the existence of these 2 jacks (even with nothing plugged in them) can cause this mess?

Olb38xt1.png

Offline

#28 2026-06-09 09:52:53

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,083

Re: Audio breaks after every suspend/change of VT

Looks like those are the front headphone and microphone jacks.

What is brand & model of your motherboard ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#29 2026-06-09 12:40:50

Enrico1989
Member
Registered: 2018-07-05
Posts: 357

Re: Audio breaks after every suspend/change of VT

From my order: Gigabyte X399 AORUS Gaming 7 AMD X399 Socket TR4 ATX motherboard - Motherboards (DDR4-SDRAM, DIMM, 2133,2400,2667 MHz, Quad, 128 GB, AMD). The link currently points at https://www.amazon.it/dp/B0746CT3Y5?th=1, but I'm not sure how much accurate this link is, after 8 years.

Last edited by Enrico1989 (2026-06-09 12:41:18)

Offline

#30 2026-06-09 13:03:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,938

Re: Audio breaks after every suspend/change of VT

The output change/addition is on the nvidia HDMI card - is this actually now stable after the initial VT switch or do subsequent VT  switches again change the current output device?
Does it help to set the default profile?
https://www.baeldung.com/linux/pulseaud … lt-profile

Online

#31 2026-06-09 16:35:08

Enrico1989
Member
Registered: 2018-07-05
Posts: 357

Re: Audio breaks after every suspend/change of VT

seth wrote:

Does it help to set the default profile?
https://www.baeldung.com/linux/pulseaud … lt-profile

Somewhat. I found I can run these commands to switch between the "non-working" and "working" cards respectively:

pactl set-card-profile alsa_card.pci-0000_08_00.3 output:iec958-stereo+input:analog-stereo
pactl set-card-profile alsa_card.pci-0000_08_00.3 output:analog-stereo+input:analog-stereo

Now I would need a way to script what I do in qpwgraph/pavucontrol in the screencasts linked below.

However, as regards the rest of that blog post you linked, that's about pulseaudio, but I'm using pipewire, right? So that doesn't apply to me, right?

After all, I don't even have a /etc/pulse/default.pa file (I have /etc/pulse/client.conf file, but that seems a different sort of file).

seth wrote:

The output change/addition is on the nvidia HDMI card - is this actually now stable after the initial VT switch or do subsequent VT  switches again change the current output device?

Honestly, I don't see much stability. But I've recorded a couple of sessions here and here and here (4 minutes and a half, 4 minutes, 4 minutes respectively, but I guess you can just scroll through); in the 3rd video I manage to achieve a behavior I had observed before filming the 1st one. I'm not sure why I observe this herratic behaviors.

Last edited by Enrico1989 (2026-06-09 17:21:56)

Offline

#32 2026-06-09 20:13:02

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,938

Re: Audio breaks after every suspend/change of VT

However, as regards the rest of that blog post you linked, that's about pulseaudio, but I'm using pipewire, right? So that doesn't apply to me, right?

Right.
https://wiki.archlinux.org/title/PipeWi … _selection

Honestly, I don't see much stability.

Does the active profile still change w/ the VT switch after fixing it for the first time?
I thought it might happen because the new profiles appear.

Online

#33 2026-06-10 05:26:38

Enrico1989
Member
Registered: 2018-07-05
Posts: 357

Re: Audio breaks after every suspend/change of VT

But that's for bluetooth, no?

I've kept reading and https://wiki.archlinux.org/title/PipeWi … mmand_line gives some scripts that you maybe were alluding to when mentioning scripting?

I've saved those scripts, made them executable, and then I run

pw-savewires pw-good

in a working scenario where I have audio coming from both a video on YouTube and one in mpv.

The content of pw-good is now this:

qutebrowser:output_FL alsa_output.pci-0000_08_00.3.analog-stereo.6:playback_FL
qutebrowser:output_FR alsa_output.pci-0000_08_00.3.analog-stereo.6:playback_FR
mpv:output_FL alsa_output.pci-0000_08_00.3.analog-stereo.6:playback_FL
mpv:output_FR alsa_output.pci-0000_08_00.3.analog-stereo.6:playback_FR

After switch to another VT and back, audio doesn't work (and the video on YouTube is paused, I think this is entirely orthogonal to the issue we are investigating; mpv, instead, keeps playing) and I can run this to make it work:

pactl set-card-profile alsa_card.pci-0000_08_00.3 output:analog-stereo+input:analog-stereo
./pw-loadwires pw-good

If I do so before the connections between the browser and "the bad entry" disappears due to the video in YouTube being paused (this as well, I think it's just the browser dropping the audio wiring due to inactivity? mpv, instead, keeps that connection even when paused), then the output is this:

Connecting qutebrowser:output_FL alsa_output.pci-0000_08_00.3.analog-stereo.6:playback_FL
Connecting qutebrowser:output_FR alsa_output.pci-0000_08_00.3.analog-stereo.6:playback_FR
Connecting mpv:output_FL alsa_output.pci-0000_08_00.3.analog-stereo.6:playback_FL
Connecting mpv:output_FR alsa_output.pci-0000_08_00.3.analog-stereo.6:playback_FR

If, instead, I wait for that connection to disappear, then the output is this:

Connecting qutebrowser:output_FL alsa_output.pci-0000_08_00.3.analog-stereo.6:playback_FL
failed to link ports: No such file or directory
Connecting qutebrowser:output_FR alsa_output.pci-0000_08_00.3.analog-stereo.6:playback_FR
failed to link ports: No such file or directory
Connecting mpv:output_FL alsa_output.pci-0000_08_00.3.analog-stereo.6:playback_FL
Connecting mpv:output_FR alsa_output.pci-0000_08_00.3.analog-stereo.6:playback_FR

In either case, when I press play on YouTube, the audio does work. I'm sort of glad it does, but I wonder what's the meaning of these lines:

failed to link ports: No such file or directory
seth wrote:

Honestly, I don't see much stability.

Does the active profile still change w/ the VT switch after fixing it for the first time?

If I understand what you mean, the answer yes, it still changes, because everytime I switch to another VT and back, the audio doesn't work and I have to re-run the two lines above to make audio work again.

seth wrote:

I thought it might happen because the new profiles appear.

Maybe the problem is that profiles disapper when I switch to another VT?

Offline

#34 2026-06-10 05:59:04

Enrico1989
Member
Registered: 2018-07-05
Posts: 357

Re: Audio breaks after every suspend/change of VT

That number 6 you see in the pw-good file is entirely accidental.

As soon as I did some scrolling at image.png, everything broke again, and I had to re-construct the file via pw-savewires, and now it looks like

mpv:output_FL alsa_output.pci-0000_08_00.3.analog-stereo.8:playback_FL
mpv:output_FR alsa_output.pci-0000_08_00.3.analog-stereo.8:playback_FR
qutebrowser:output_FL alsa_output.pci-0000_08_00.3.analog-stereo.8:playback_FL
qutebrowser:output_FR alsa_output.pci-0000_08_00.3.analog-stereo.8:playback_FR

where the number is 8.

What's annoying now is that "I wait for that connection to disappear", then the audio won't work!

This is a nighmare sad

Offline

#35 2026-06-10 06:49:56

Enrico1989
Member
Registered: 2018-07-05
Posts: 357

Re: Audio breaks after every suspend/change of VT

I've just rebooted the system.

By the way, an info I might have forgotten to say: the audio doesn't work right after rebooting. I do have to do fix it to start with.

I've just opened YouTube + mpv playing videos, run

pactl set-card-profile alsa_card.pci-0000_08_00.3 output:analog-stereo+input:analog-stereo

Then connected the wires manually like this:
image.png
Then run this

./pw-savewires pw-good-3

then switched to another VT and back.

Then

pactl set-card-profile alsa_card.pci-0000_08_00.3 output:analog-stereo+input:analog-stereo
./pw-loadwires pw-good-3

and the audio works, always in mpv, but in YouTube only if I don't let the wires disappear first. If I do so, then the audio doesn't work in YouTube, and no entry in qpwgraph shows for the browser. One workaround to this is to do this:

pactl set-card-profile alsa_card.pci-0000_08_00.3 output:iec958-stereo+input:analog-stereo
# refresh the YouTube page, now the video plays, but the audio doesn't
pactl set-card-profile alsa_card.pci-0000_08_00.3 output:analog-stereo+input:analog-stereo
./pw-loadwires pw-good-3
# now the video is paused, so click play before connections disapear

Offline

#36 2026-06-10 09:10:08

Enrico1989
Member
Registered: 2018-07-05
Posts: 357

Re: Audio breaks after every suspend/change of VT

Also, I'm opening some games on Steam, and I don't hear the audio anymore sad

And no raindance seems to bring things back to working. Trying to do so is what I did right after #33, hence I wrote #34 & #35.

Offline

#37 2026-06-10 09:44:50

Enrico1989
Member
Registered: 2018-07-05
Posts: 357

Re: Audio breaks after every suspend/change of VT

Anyway, I think the pw-savewires from the https://wiki.archlinux.org/title/PipeWi … mmand_line is not sufficient to address some simple scenario: once I've reached the condition that 2 browser tabs are playing audio, if I run that script, the produced file looks like this:

qutebrowser:output_FL alsa_output.pci-0000_08_00.3.analog-stereo:playback_FL
qutebrowser:output_FR alsa_output.pci-0000_08_00.3.analog-stereo:playback_FR
qutebrowser:output_FL alsa_output.pci-0000_08_00.3.analog-stereo:playback_FL
qutebrowser:output_FR alsa_output.pci-0000_08_00.3.analog-stereo:playback_FR

where lines 3 and 4 are really just a copy of 1 and 2. This seems wrong, just like not enough information is stored in this file and, in turn, not enough information is passed to pw-loadwires to restore things.

Offline

#38 2026-06-10 12:07:45

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,223

Re: Audio breaks after every suspend/change of VT

Does the "pactl set-card-profile alsa_card.pci-0000_08_00.3 output:analog-stereo+input:analog-stereo" alone not fix qutebrowser for a refresh/replay already? As far as I can tell you always remain on the same sink regardless, but profile detection will autoswitch you to a non existant IEC port. But since a profile switch shouldn't inherently change the underlying sink I'd assume a profile switch back to the correctly working one to work already? Maybe also try whether disabling storage of the device route will help you with e.g.

wpctl settings --save device.restore-routes false

see e.g. https://pipewire.pages.freedesktop.org/ … tings.html

Speaking of which -- while we haven't had issues with this in a while -- it also sounds like the wireplumber state files might be a bit fucky, so if this doesn't help, potentially try to reset the state there: https://wiki.archlinux.org/title/WirePl … t_settings

Last edited by V1del (2026-06-10 12:12:51)

Offline

#39 2026-06-10 20:37:14

Enrico1989
Member
Registered: 2018-07-05
Posts: 357

Re: Audio breaks after every suspend/change of VT

V1del wrote:

Does the "pactl set-card-profile alsa_card.pci-0000_08_00.3 output:analog-stereo+input:analog-stereo" alone not fix qutebrowser for a refresh/replay already?

Not sure what exact scenario you're referring to with "for a refresh/replay".

Surely, after I've switched to another VT and back, that command alone is not enough to have audio coming from a YouTube tab in qutebrowser.

V1del wrote:

As far as I can tell you always remain on the same sink

What do you mean? In a complete loop from working, through not working, back to working, the following

pactl list sinks | grep ^Sink

always returns 1 match, telling me that there's only 1 sink at any single time, but each match features a different ID, meaning that the sink changes, no?

V1del wrote:

Maybe also try whether disabling storage of the device route will help you with e.g.

wpctl settings --save device.restore-routes false

see e.g. https://pipewire.pages.freedesktop.org/ … tings.html

The specific command you quoted, doesn't seem to affect the issue. Or do you mean I should reboot/anything else after executing it? I understand so little of this matter that whatever things any of you proposes, all the questions keep popping in my mind (Do I reboot now? Do I log out? ...). And I think the confusion is the total incosistency of behavior I observe.

V1del wrote:

Speaking of which -- while we haven't had issues with this in a while -- it also sounds like the wireplumber state files might be a bit fucky, so if this doesn't help, potentially try to reset the state there: https://wiki.archlinux.org/title/WirePl … t_settings

Done that:

systemctl --user stop wireplumber
rm -rf .local/state/wireplumber
systemctl --user start wireplumber

but the issue persists.


Incidentally, I forgot to say something that I think it's irrelevant, but at this point, I have no clue. The computer is connected to the monitor via DisplayPort, and the monitor is also connected to some external surveillance devices via HDMI. I assume the computer has absolutely no clue what the other ports of the monitor are connected to, hence I didn't give this info so far.

Also, I've downloaded wiremix and, wow, doing experiments with that keyboard based TUI with vi-like bindings is waaaaaay handier than using pavucontrol.

And resetting the settings had at least the advantage that now pausing YouTube and waiting does not result in breaking the audio; if I press play, it plays correctly the audio. Remains the problem of switching to another VT and back, or suspending, which both cause the audio to "break", and I need to do that double action to recover it.

Last edited by Enrico1989 (2026-06-10 20:50:02)

Offline

#40 2026-06-10 20:48:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,938

Re: Audio breaks after every suspend/change of VT

Curveball: Assuming you're not using the hdmi audio, does it help/what happens if you add

module_blacklist=snd_hda_codec_hdmi

to the https://wiki.archlinux.org/title/Kernel_parameters ?

Online

#41 2026-06-10 21:02:37

Enrico1989
Member
Registered: 2018-07-05
Posts: 357

Re: Audio breaks after every suspend/change of VT

Meaning I change

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libahci.ignore_sss=1 nowatchdog modprobe.blacklist=iTC0_wdt"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libahci.ignore_sss=1 nowatchdog modprobe.blacklist=iTC0_wdt module_blacklist=snd_hda_codec_hdmi"

in the /etc/default/grub file and run

grub-mkconfig -o /boot/grub/grub.cfg

Correct?

Do I have to reboot?

Offline

#42 2026-06-10 21:12:23

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,938

Re: Audio breaks after every suspend/change of VT

Yes but you can also just edit the commandline in grub for a test (w/o permanently changing it)

iTC0_wdt

That'd be

iTCO_wdt

(if you can't see the difference you need a better monospace font tongue)

Last edited by seth (2026-06-10 21:12:37)

Online

#43 2026-06-10 21:33:22

Enrico1989
Member
Registered: 2018-07-05
Posts: 357

Re: Audio breaks after every suspend/change of VT

I've tried, and indeed cat /proc/cmdline gives

BOOT_IMAGE=/vmlinuz-linux root=UUID=158d9d49-7c23-43b4-bad5-8cf56b19a96b rw quiet splash libahci.ignore_sss=1 nowatchdog modprobe.blacklist=iTCO_wdt module_blacklist=snd_hda_codec_hdmi

but I observe the same behavior. I really thought this was the turning point sad

Offline

#44 Yesterday 20:36:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,938

Re: Audio breaks after every suspend/change of VT

hmm
Do you still switch to some s/pdif profile?

aplay -lL

Online

#45 Yesterday 22:28:59

Enrico1989
Member
Registered: 2018-07-05
Posts: 357

Re: Audio breaks after every suspend/change of VT

What does that mean? "s/pdif" seem sto be related to one connection of the mobo.

https://paste.c-net.org/RosemaryHansen

Offline

#46 Yesterday 22:57:19

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,938

Re: Audio breaks after every suspend/change of VT

s/pdif would be the optical connection (bottom/left)…
https://bbs.archlinux.org/viewtopic.php … 2#p2136342 - nb. the match  there is wrong, https://wiki.archlinux.org/title/PipeWi … g_playback

Online

Board footer

Powered by FluxBB