You are not logged in.
I have an external display connected to my laptop via HDMI for video and audio, and I always leave the laptop closed; before one of the Plasma upgrades (either 5.20.0 or 5.20.1, not sure) I had only a little problem where, after resuming from standby, the audio output would be set to the laptop speakers and not automatically switch back to HDMI. This was a problem I've had for a long time and with another distro as well.
With the last Plasma upgrade however, a different problem came up: when resuming from standby, the HDMI audio output isn't available anymore, only the 'Speakers' and 'Headphone' outputs are available (restarting the user session fixes it, but it's more of a problem than just setting back the correct audio output). I'd like to ask if anyone is having the same issue, or if you could help me solve this problem
Thank you
Last edited by ITA84 (2020-12-02 17:12:16)
Offline
Doesn't really sound plasma related to me, does restarting pulse ( systemctl --user restart pulseaudio ) suffice? What's the output of
pacmd list-cards
pacmd list-sinksduring the broken setup?
Offline
Doesn't really sound plasma related to me, does restarting pulse ( systemctl --user restart pulseaudio ) suffice?
It does! There have been other updates in the meantime, but I don't think I can isolate the package, my laptop doesn't go into standby every day. It was probably an update from around a week ago.
What's the output of
pacmd list-cards pacmd list-sinksduring the broken setup?
Output listed below; the HDMI sink is missing. I've also found an amdgpu trace in the journal when resuming, not sure if it's related, but since the HDMI output is from the GPU I'm listing it as well.
Thanks for your help!
pacmd list-cards
2 card(s) available.
index: 0
name: <alsa_card.pci-0000_04_00.1>
driver: <module-alsa-card.c>
owner module: 6
properties:
alsa.card = "0"
alsa.card_name = "HD-Audio Generic"
alsa.long_card_name = "HD-Audio Generic at 0xfe6c8000 irq 77"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:04:00.1"
sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:04:00.1/sound/card0"
device.bus = "pci"
device.vendor.id = "1002"
device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
device.product.id = "1637"
device.string = "0"
device.description = "HD-Audio Generic"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
profiles:
output:hdmi-stereo: Uscita «Digital Stereo (HDMI)» (priority 5900, available: unknown)
off: Spento (priority 0, available: unknown)
active profile: <output:hdmi-stereo>
ports:
hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)
properties:
device.icon_name = "video-display"
device.product.name = "VE248"
index: 1
name: <alsa_card.pci-0000_04_00.6>
driver: <module-alsa-card.c>
owner module: 7
properties:
alsa.card = "1"
alsa.card_name = "HD-Audio Generic"
alsa.long_card_name = "HD-Audio Generic at 0xfe6c0000 irq 78"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:04:00.6"
sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:04:00.6/sound/card1"
device.bus = "pci"
device.vendor.id = "1022"
device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
device.product.id = "15e3"
device.product.name = "Family 17h (Models 10h-1fh) HD Audio Controller"
device.string = "1"
device.description = "Family 17h (Models 10h-1fh) HD Audio Controller"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
profiles:
input:analog-stereo: Ingresso «Stereo analogico» (priority 65, available: unknown)
output:analog-stereo: Uscita «Stereo analogico» (priority 6500, available: unknown)
output:analog-stereo+input:analog-stereo: Duplex stereo analogico (priority 6565, available: unknown)
off: Spento (priority 0, available: unknown)
active profile: <output:analog-stereo+input:analog-stereo>
sinks:
alsa_output.pci-0000_04_00.6.analog-stereo/#1: Family 17h (Models 10h-1fh) HD Audio Controller Stereo analogico
sources:
alsa_output.pci-0000_04_00.6.analog-stereo.monitor/#1: Monitor of Family 17h (Models 10h-1fh) HD Audio Controller Stereo analogico
alsa_input.pci-0000_04_00.6.analog-stereo/#2: Family 17h (Models 10h-1fh) HD Audio Controller Stereo analogico
ports:
analog-input-internal-mic: Internal Microphone (priority 8900, latency offset 0 usec, available: unknown)
properties:
device.icon_name = "audio-input-microphone"
analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: no)
properties:
device.icon_name = "audio-input-microphone"
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"pacmd list-sinks
1 sink(s) available.
* index: 1
name: <alsa_output.pci-0000_04_00.6.analog-stereo>
driver: <module-alsa-card.c>
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 9039
volume: front-left: 32768 / 50% / -18,06 dB, front-right: 32768 / 50% / -18,06 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 ch 2 44100 Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
fixed latency: 100,14 ms
card: 1 <alsa_card.pci-0000_04_00.6>
module: 7
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ALC269VC Analog"
alsa.id = "ALC269VC Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "1"
alsa.card_name = "HD-Audio Generic"
alsa.long_card_name = "HD-Audio Generic at 0xfe6c0000 irq 78"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:04:00.6"
sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:04:00.6/sound/card1"
device.bus = "pci"
device.vendor.id = "1022"
device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
device.product.id = "15e3"
device.product.name = "Family 17h (Models 10h-1fh) HD Audio Controller"
device.string = "front:1"
device.buffering.buffer_size = "17664"
device.buffering.fragment_size = "2944"
device.access_mode = "mmap"
device.profile.name = "analog-stereo"
device.profile.description = "Stereo analogico"
device.description = "Family 17h (Models 10h-1fh) HD Audio Controller Stereo analogico"
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>journal
nov 04 18:17:12 ryzen74 systemd[1]: Reached target Sleep.
nov 04 18:17:12 ryzen74 systemd[1]: Starting Suspend...
nov 04 18:17:12 ryzen74 systemd-sleep[5700]: Suspending system...
nov 04 18:17:12 ryzen74 kernel: PM: suspend entry (deep)
nov 04 18:21:47 ryzen74 kernel: Filesystems sync: 0.005 seconds
nov 04 18:21:47 ryzen74 kernel: Freezing user space processes ... (elapsed 0.002 seconds) done.
nov 04 18:21:47 ryzen74 kernel: OOM killer disabled.
nov 04 18:21:47 ryzen74 kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
nov 04 18:21:47 ryzen74 kernel: printk: Suspending console(s) (use no_console_suspend to debug)
nov 04 18:21:47 ryzen74 kernel: ------------[ cut here ]------------
nov 04 18:21:47 ryzen74 kernel: WARNING: CPU: 10 PID: 5700 at drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:2548 dc_link_set_backlight_level+0x8a/0xf0 [amdgpu]
nov 04 18:21:47 ryzen74 kernel: Modules linked in: snd_seq_dummy snd_hrtimer snd_seq snd_seq_device fuse xpad usbhid ff_memless btusb btrtl btbcm btintel bluetooth ecdh_generic ecc uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 iwlmvm videobuf2_common videodev amdgpu mc mac80211 snd_hda_codec_realtek libarc4 snd_hda_codec_generic joydev gpu_sched ledtrig_audio mousedev snd_hda_codec_hdmi i2c_algo_bit edac_mce_amd ttm nls_iso8859_1 iwlwifi hid_multitouch nls_cp437 kvm_amd snd_hda_intel snd_intel_dspcfg vfat hid_generic asus_wmi wmi_bmof kvm sparse_keymap snd_hda_codec r8169 fat cfg80211 drm_kms_helper snd_hda_core snd_hwdep realtek irqbypass crct10dif_pclmul cec mdio_devres snd_pcm of_mdio crc32_pclmul fixed_phy ghash_clmulni_intel rc_core snd_timer syscopyarea aesni_intel crypto_simd sysfillrect cryptd snd glue_helper sp5100_tco snd_rn_pci_acp3x sysimgblt rapl input_leds ccp pcspkr libphy fb_sys_fops soundcore rfkill snd_pci_acp3x i2c_piix4 k10temp wmi tpm_crb battery tpm_tis i2c_hid tpm_tis_core
nov 04 18:21:48 ryzen74 kernel: hid evdev tpm mac_hid acpi_cpufreq rng_core pinctrl_amd ac drm crypto_user agpgart ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 serio_raw atkbd libps2 xhci_pci xhci_pci_renesas crc32c_intel xhci_hcd i8042 serio
nov 04 18:21:48 ryzen74 kernel: CPU: 10 PID: 5700 Comm: systemd-sleep Not tainted 5.9.3-arch1-1 #1
nov 04 18:21:48 ryzen74 kernel: Hardware name: PC Specialist TF/PF4NU1F, BIOS N.1.06PCS00 06/15/2020
nov 04 18:21:48 ryzen74 kernel: RIP: 0010:dc_link_set_backlight_level+0x8a/0xf0 [amdgpu]
nov 04 18:21:48 ryzen74 kernel: Code: 70 03 00 00 31 c0 48 8d 96 c0 01 00 00 48 8b 0a 48 85 c9 74 06 48 3b 59 08 74 20 83 c0 01 48 81 c2 d8 04 00 00 83 f8 06 75 e3 <0f> 0b 45 31 e4 5b 44 89 e0 5d 41 5c 41 5d 41 5e c3 48 98 48 69 c0
nov 04 18:21:48 ryzen74 kernel: RSP: 0018:ffffa83d8138fcd0 EFLAGS: 00010246
nov 04 18:21:48 ryzen74 kernel: RAX: 0000000000000006 RBX: ffff8da9794d9400 RCX: 0000000000000000
nov 04 18:21:48 ryzen74 kernel: RDX: ffff8da93aa61ed0 RSI: ffff8da93aa60000 RDI: 0000000000000000
nov 04 18:21:48 ryzen74 kernel: RBP: ffff8da964b60000 R08: 0000000000000000 R09: ffff8da97f8ac470
nov 04 18:21:48 ryzen74 kernel: R10: 0000000000000251 R11: 0000000000000000 R12: 0000000000000c01
nov 04 18:21:48 ryzen74 kernel: R13: 0000000000000000 R14: 0000000000000c0c R15: 0000000000000002
nov 04 18:21:48 ryzen74 kernel: FS: 00007f440b304000(0000) GS:ffff8da97f880000(0000) knlGS:0000000000000000
nov 04 18:21:48 ryzen74 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
nov 04 18:21:48 ryzen74 kernel: CR2: 000055ce02cac6a8 CR3: 00000003f2b2c000 CR4: 0000000000350ee0
nov 04 18:21:48 ryzen74 kernel: Call Trace:
nov 04 18:21:48 ryzen74 kernel: amdgpu_dm_backlight_update_status+0xb4/0xc0 [amdgpu]
nov 04 18:21:48 ryzen74 kernel: backlight_suspend+0x6a/0x80
nov 04 18:21:48 ryzen74 kernel: ? brightness_store+0x80/0x80
nov 04 18:21:48 ryzen74 kernel: dpm_run_callback+0x4f/0x180
nov 04 18:21:48 ryzen74 kernel: __device_suspend+0x11c/0x500
nov 04 18:21:48 ryzen74 kernel: dpm_suspend+0xef/0x260
nov 04 18:21:48 ryzen74 kernel: dpm_suspend_start+0x77/0x80
nov 04 18:21:48 ryzen74 kernel: suspend_devices_and_enter+0x109/0x8a0
nov 04 18:21:48 ryzen74 kernel: pm_suspend.cold+0x329/0x374
nov 04 18:21:48 ryzen74 kernel: state_store+0x42/0x90
nov 04 18:21:48 ryzen74 kernel: kernfs_fop_write+0xce/0x1b0
nov 04 18:21:48 ryzen74 kernel: vfs_write+0xc7/0x210
nov 04 18:21:48 ryzen74 kernel: ksys_write+0x67/0xe0
nov 04 18:21:48 ryzen74 kernel: do_syscall_64+0x33/0x40
nov 04 18:21:48 ryzen74 kernel: entry_SYSCALL_64_after_hwframe+0x44/0xa9
nov 04 18:21:48 ryzen74 kernel: RIP: 0033:0x7f440c11ef67
nov 04 18:21:48 ryzen74 kernel: Code: 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24
nov 04 18:21:48 ryzen74 kernel: RSP: 002b:00007ffe97c941e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
nov 04 18:21:48 ryzen74 kernel: RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f440c11ef67
nov 04 18:21:48 ryzen74 kernel: RDX: 0000000000000004 RSI: 00007ffe97c942d0 RDI: 0000000000000004
nov 04 18:21:48 ryzen74 kernel: RBP: 00007ffe97c942d0 R08: 000055ce02ca5710 R09: 00007f440c1b50c0
nov 04 18:21:48 ryzen74 kernel: R10: 00007f440c1b4fc0 R11: 0000000000000246 R12: 0000000000000004
nov 04 18:21:48 ryzen74 kernel: R13: 000055ce02ca13c0 R14: 0000000000000004 R15: 00007f440c1f1720
nov 04 18:21:48 ryzen74 kernel: ---[ end trace 87276bbeb2688e33 ]---Offline
Could be related yes, what about the journal during wakeup? I find it somewhat weird that pa retains the full reference to the card but can't show the sink anymore, does something subtle like
pacmd set-card-profile alsa_card.pci-0000_04_00.1 off
pacmd set-card-profile alsa_card.pci-0000_04_00.1 output:hdmi-stereowork as well?
What's the output of
journalctl -b --user-unit=pulseaudiodoes it log any errors?
Offline
Could be related yes, what about the journal during wakeup? I find it somewhat weird that pa retains the full reference to the card but can't show the sink anymore, does something subtle like
pacmd set-card-profile alsa_card.pci-0000_04_00.1 off pacmd set-card-profile alsa_card.pci-0000_04_00.1 output:hdmi-stereowork as well?
Yes, it seems to have the exact same effect as the restart.
What's the output of
journalctl -b --user-unit=pulseaudiodoes it log any errors?
No errors, just the startup, and nothing after that
-- Logs begin at Thu 2020-09-10 17:52:03 CEST, end at Wed 2020-11-04 20:51:45 CET. --
nov 04 20:32:57 ryzen74 systemd[575]: Starting Sound Service...
nov 04 20:32:58 ryzen74 systemd[575]: Started Sound Service.I've made an additional test: it seems the problem occurs only when I let the session timeout (it's set to turn off the display after 5 mins and suspend after 10 via System Settings), while if I bring up the Plasma session close interface and select Suspend it doesn't. The amdgpu crash doesn't happen in that case, so it seems more likely to be related to the problem. Since the trace mentions the backlight, I suppose I should add that I've added 'acpi_backlight=amdgpu_bl0' to my kernel commandline (had some issues with the backlight, but couldn't remember what, I'll test without the parameter and see what happens).
EDIT: (nope. problem still there, amdgpu crash still happens)
Last edited by ITA84 (2020-11-04 20:18:41)
Offline
Tried enabling debug in Pulseaudio logs, and this is what I've found after reproducing the issue:
nov 07 19:05:28 ryzen74 pulseaudio[16800]: ELD info empty (for device=3)
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Jack 'HDMI/DP,pcm=3 Jack' is now unplugged
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Setting port hdmi-output-0 to status no
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Dropped redundant event due to change event.
nov 07 19:05:28 ryzen74 pulseaudio[16800]: default_sink: alsa_output.pci-0000_04_00.1.hdmi-stereo -> alsa_output.pci-0000_04_00.6.analog-stereo
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Trying to switch away from port hdmi-output-0, found no better option
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Setting card alsa_card.pci-0000_04_00.1 profile output:hdmi-stereo to availability status no
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Dropped redundant event due to change event.
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Active profile output:hdmi-stereo on card alsa_card.pci-0000_04_00.1 became unavailable, switching to another profile
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Interface org.PulseAudio.Core1.Device removed from object /org/pulseaudio/core1/sink0
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Interface org.PulseAudio.Core1.Sink removed from object /org/pulseaudio/core1/sink0
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Interface org.PulseAudio.Core1.DevicePort removed from object /org/pulseaudio/core1/sink0/port0
nov 07 19:05:28 ryzen74 pulseaudio[16800]: alsa_output.pci-0000_04_00.1.hdmi-stereo: state: SUSPENDED -> UNLINKED
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Interface org.PulseAudio.Core1.Device removed from object /org/pulseaudio/core1/source0
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Interface org.PulseAudio.Core1.Source removed from object /org/pulseaudio/core1/source0
nov 07 19:05:28 ryzen74 pulseaudio[16800]: alsa_output.pci-0000_04_00.1.hdmi-stereo.monitor: state: SUSPENDED -> UNLINKED
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Dropped redundant event due to remove event.
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Thread shutting down
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Freeing sink 0 "alsa_output.pci-0000_04_00.1.hdmi-stereo"
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Freeing source 0 "alsa_output.pci-0000_04_00.1.hdmi-stereo.monitor"
nov 07 19:05:28 ryzen74 pulseaudio[16800]: alsa_card.pci-0000_04_00.1: active_profile: output:hdmi-stereo -> off
nov 07 19:05:28 ryzen74 pulseaudio[16800]: Dropped redundant event due to change event.
nov 07 19:15:08 ryzen74 pulseaudio[16800]: Monitor name in ELD info is 'VE248' (for device=3)
nov 07 19:15:08 ryzen74 pulseaudio[16800]: Jack 'HDMI/DP,pcm=3 Jack' is now plugged in
nov 07 19:15:08 ryzen74 pulseaudio[16800]: Setting port hdmi-output-0 to status yes
nov 07 19:15:08 ryzen74 pulseaudio[16800]: Dropped redundant event due to change event.
nov 07 19:15:08 ryzen74 pulseaudio[16800]: Trying to switch to port hdmi-output-0
nov 07 19:15:08 ryzen74 pulseaudio[16800]: Finding best profile for port hdmi-output-0, preferred = hdmi-stereo
nov 07 19:15:08 ryzen74 pulseaudio[16800]: Successfully acquired reservation lock on device 'Audio0'
nov 07 19:15:08 ryzen74 pulseaudio[16800]: Successfully create reservation lock monitor for device 'Audio0'
nov 07 19:15:08 ryzen74 pulseaudio[16800]: Trying hdmi:0 with SND_PCM_NO_AUTO_FORMAT ...
nov 07 19:15:08 ryzen74 pulseaudio[16800]: Error opening PCM device hdmi:0: Device or resource busy
nov 07 19:15:08 ryzen74 pulseaudio[16800]: alsa_card.pci-0000_04_00.1: active_profile: off -> output:hdmi-stereo
nov 07 19:15:08 ryzen74 pulseaudio[16800]: Dropped redundant event due to change event.
nov 07 19:15:08 ryzen74 pulseaudio[16800]: Setting card alsa_card.pci-0000_04_00.1 profile output:hdmi-stereo to availability status unknown
nov 07 19:15:08 ryzen74 pulseaudio[16800]: Dropped redundant event due to change event.
nov 07 19:15:08 ryzen74 pulseaudio[16800]: /dev/snd/controlC0 is accessible: yes
nov 07 19:15:08 ryzen74 pulseaudio[16800]: Resuming all sinks and sources of card alsa_card.pci-0000_04_00.1.
nov 07 19:15:08 ryzen74 pulseaudio[16800]: /dev/snd/controlC0 is accessible: yes
nov 07 19:15:08 ryzen74 pulseaudio[16800]: Resuming all sinks and sources of card alsa_card.pci-0000_04_00.1.
nov 07 19:15:08 ryzen74 pulseaudio[16800]: /dev/snd/controlC0 is accessible: yes
nov 07 19:15:08 ryzen74 pulseaudio[16800]: Resuming all sinks and sources of card alsa_card.pci-0000_04_00.1.The "Device or resource busy" message makes me think another process is using it (pipewire, maybe? Or the kernel itself, given the crash? Is it even possible?) when Pulseaudio tries to reactivate the HDMI sink, but it doesn't seem to try again afterwards; I'll try more stuff out
Offline
I've found a better workaround than restarting Pulseaudio after resume: disabling 'module-switch-on-port-available' makes the sound device not switch anymore. Of course this might not work correctly if I detach the HDMI cable, but since I use my laptop connected to an external display 99% of the time, it's fine for me
Offline