Ubuntu 20.04 - Nvidia - no Sound - Output over HDMI
I had solved the problem with a newer Kernel.
Ubuntu 20.04 - Nvidia - no Sound - Output over HDMI
I had solved the problem with a newer Kernel.
Ich werde es versuchen
I don't think the issue is related to kernel or the audio devices.
I've done some more analysis. The problem is when the PC reboots (OR when Kodi is exited (back to VDR)) I'm getting:
vdr: audio/alsa: playback open 'hdmi:CARD=NVidia,DEV=3' error: Device or resource busy
see below...
I get no audio when the logs show:
Jan 26 11:20:19 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:check_state(): got status code: 912
Jan 26 11:20:19 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:status: softhddevice is detached
Jan 26 11:20:19 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:check_state(): got status code: 912
Jan 26 11:20:19 ubuntu2020 vdr: audio: 'alsa' output module used
*Jan 26 11:20:19 ubuntu2020 vdr: audio/alsa: playback open 'hdmi:CARD=NVidia,DEV=3' error: Device or resource busy
*Jan 26 11:20:19 ubuntu2020 vdr: audio: 44100Hz supports 0 0 0 0 0 0 0 0 channels
*Jan 26 11:20:19 ubuntu2020 vdr: audio: 48000Hz supports 0 0 0 0 0 0 0 0 channels
*Jan 26 11:20:19 ubuntu2020 vdr: audio: 192000Hz supports 0 0 0 0 0 0 0 0 channels
...
Jan 26 11:20:19 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:change_state with command atta and options "-d :0" to attached
Jan 26 11:20:19 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:check_state(): got status code: 910
Jan 26 11:20:19 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:softhddevice successfully attached
Jan 26 11:20:19 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:current PrimaryDevice is softhddevice-openglosd (Index: 1, Number: 1, hasDecoder: True, isPrimary: True)
Jan 26 11:20:19 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:softhddevice is the primary device
Jan 26 11:20:19 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:needed 0.002 s to switch primary device
But when this occurs:
Jan 26 11:20:33 ubuntu2020 vdr: [1672] executing command 'sudo /bin/systemctl --no-block restart vdr.service'
The audio device is available and the logs show this:
Jan 26 11:20:35 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:check_state(): got status code: 912
Jan 26 11:20:35 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:status: softhddevice is detached
Jan 26 11:20:35 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:check_state(): got status code: 912
Jan 26 11:20:35 ubuntu2020 vdr: audio: 'alsa' output module used
*Jan 26 11:20:36 ubuntu2020 vdr: audio/alsa: supports pause: yes
*Jan 26 11:20:37 ubuntu2020 vdr: audio: 44100Hz supports 2 2 2 2 2 2 2 2 channels
*Jan 26 11:20:37 ubuntu2020 vdr: audio: 48000Hz supports 2 2 2 2 2 2 2 2 channels
*Jan 26 11:20:37 ubuntu2020 vdr: audio: 192000Hz supports 0 0 0 0 0 0 0 0 channels
...
Jan 26 11:20:37 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:change_state with command atta and options "-d :0" to attached
Jan 26 11:20:37 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:check_state(): got status code: 910
Jan 26 11:20:37 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:softhddevice successfully attached
Jan 26 11:20:37 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:current PrimaryDevice is softhddevice-openglosd (Index: 1, Number: 1, hasDecoder: True, isPrimary: True)
Jan 26 11:20:37 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:softhddevice is the primary device
Jan 26 11:20:37 ubuntu2020 yavdr-frontend[1118]: DEBUG:softhddevice:needed 0.002 s to switch primary device
Jan 26 11:20:37 ubuntu2020 vdr: video: get hwaccel context, not supported
*Jan 26 11:20:37 ubuntu2020 vdr: audio/alsa: using device 'hdmi:CARD=NVidia,DEV=3'
Jan 26 11:20:37 ubuntu2020 vdr: audio/alsa: start delay 336ms
Is something holding the also device busy when the PC boots, or when Kodi is exited?
Any idea why this is different when VDR is restarted with systemctl?
You could use https://manpages.ubuntu.com/manpages/focal/man1/fuser.1.html to determine which process currently uses a sound device.
The normal configuration is as follows:
Access permissions are set by the user session via ACLs so there is no need to add the user vdr to any additional sound-related groups.
If you change things around (e.g. if you want the vdr and KODI to use alsa directly) you need to disable pulseaudio (the yavdr-frontend script can do this by suspending pulseaudio temporarily if you configure it accordingly) in order to allow the programs to access the sound devices directly reliably and add the user vdr to the audio group.
Thanks for that seahawk1986.
I started by investigating again, by removing:
'-a hdmi:CARD=NVidia,DEV=3
-p hdmi:CARD=NVidia,DEV=3'
from 50-softhddevice.conf with "sudo vdrctl edit softhddevice"
I've changed nothing else - but now audio is working - after a reboot and after exiting Kodi.
am now getting:
Jan 27 08:16:04 ubuntu2020 yavdr-frontend[1115]: DEBUG:VDRFrontend:user is active: True
Jan 27 08:16:04 ubuntu2020 yavdr-frontend[1115]: DEBUG:softhddevice:check_state(): got status code: 912
Jan 27 08:16:04 ubuntu2020 yavdr-frontend[1115]: DEBUG:softhddevice:status: softhddevice is detached
Jan 27 08:16:04 ubuntu2020 yavdr-frontend[1115]: DEBUG:softhddevice:check_state(): got status code: 912
Jan 27 08:16:04 ubuntu2020 vdr: audio: 'alsa' output module used
Jan 27 08:16:04 ubuntu2020 vdr: audio/alsa: supports pause: yes
Jan 27 08:16:04 ubuntu2020 vdr: audio: 44100Hz supports 1 2 3 4 5 6 7 8 channels
Jan 27 08:16:04 ubuntu2020 vdr: audio: 48000Hz supports 1 2 3 4 5 6 7 8 channels
Jan 27 08:16:04 ubuntu2020 vdr: audio: 192000Hz supports 1 2 3 4 5 6 7 8 channels
...
Jan 27 08:16:05 ubuntu2020 vdr: audio/alsa: using device 'default'
Jan 27 08:16:05 ubuntu2020 vdr: audio/alsa: start delay 336ms
So - everything is good. But I don't know what has changed!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!