Page 1 of 1

sound disappears on mx23.1 using kodi and vlc

Posted: Fri Nov 24, 2023 10:46 pm
by django013
Hi,

I have unstable sound configuration on my mediacenter built with mx23, kde and kodi.
Sound disappears during watching movie with kodi.
(re-)plugging hdmi-cable does not bring audio back. I have to reboot. Sometimes I have to shutdown and wait longer time until power on again to get audio again.

Code: Select all

System:
  Kernel: 6.5.11-4-liquorix-amd64 [6.5-17~mx23ahs] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 parameters: audit=0
    intel_pstate=disable rcupdate.rcu_expedited=1 BOOT_IMAGE=/boot/vmlinuz-6.5.11-4-liquorix-amd64
    root=UUID=<filter> ro quiet splash
  Desktop: KDE Plasma v: 5.27.5 wm: kwin_x11 vt: 7 dm: SDDM Distro: MX-23.1_KDE_x64 Libretto
    July 31 2023 base: Debian GNU/Linux 12 (bookworm)
Machine:
  Type: Desktop Mobo: ASUSTeK model: PRIME A320M-K v: Rev X.0x serial: <superuser required>
    UEFI: American Megatrends v: 6062 date: 02/24/2023
CPU:
  Info: model: AMD Ryzen 5 3600 bits: 64 type: MT MCP arch: Zen 2 gen: 3 level: v3 note: check
    built: 2020-22 process: TSMC n7 (7nm) family: 0x17 (23) model-id: 0x71 (113) stepping: 0
    microcode: 0x8701030
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache: L1: 384 KiB
    desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB L3: 32 MiB desc: 2x16 MiB
  Speed (MHz): avg: 2344 high: 3600 min/max: 2200/4208 boost: enabled scaling:
    driver: acpi-cpufreq governor: ondemand cores: 1: 2200 2: 2530 3: 2200 4: 2200 5: 3600 6: 2200
    7: 2200 8: 2200 9: 2200 10: 2200 11: 2200 12: 2200 bogomips: 86237
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT enabled with STIBP protection
  Type: spec_rstack_overflow mitigation: safe RET
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, STIBP: always-on, RSB filling,
    PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GP107GL [Quadro P400] driver: nvidia v: 525.125.06 non-free: 530.xx+
    status: current (as of 2023-03) arch: Pascal code: GP10x process: TSMC 16nm built: 2016-21 pcie:
    gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 08:00.0 chip-ID: 10de:1cb3 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.7 with: Xwayland v: 22.1.9 compositor: kwin_x11 driver: X:
    loaded: nvidia gpu: nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1200 s-dpi: 75 s-size: 649x406mm (25.55x15.98") s-diag: 766mm (30.14")
  Monitor-1: DP-3 pos: primary res: 1920x1200 hz: 60 size: N/A modes: N/A
  Monitor-2: DP-5 res: 1920x1080 hz: 60 dpi: 69 size: 708x398mm (27.87x15.67")
    diag: 812mm (31.98") modes: N/A
  API: OpenGL v: 4.6.0 NVIDIA 525.125.06 renderer: Quadro P400/PCIe/SSE2 direct-render: Yes
Audio:
  Device-1: NVIDIA GP107GL High Definition Audio driver: snd_hda_intel v: kernel pcie: gen: 3
    speed: 8 GT/s lanes: 16 bus-ID: 08:00.1 chip-ID: 10de:0fb9 class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel pcie:
    gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 0a:00.4 chip-ID: 1022:1487 class-ID: 0403
  API: ALSA v: k6.5.11-4-liquorix-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 0.3.65 status: off with: 1: pipewire-pulse status: off 2: wireplumber
    status: off tools: pw-cat,pw-cli,wpctl
  Server-2: PulseAudio v: 16.1 status: active tools: pacat,pactl,pavucontrol
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK PRIME B450M-A
    driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: f000 bus-ID: 06:00.0
    chip-ID: 10ec:8168 class-ID: 0200
  IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 959.47 GiB used: 6.76 GiB (0.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Crucial model: CT1000P3SSD8 size: 931.51 GiB
    block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: P9CR30A temp: 32.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Kingston model: SS200S330G size: 27.96 GiB block-size:
    physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 05.1 scheme: GPT
Partition:
  ID-1: / raw-size: 186.26 GiB size: 186.26 GiB (100.00%) used: 6.75 GiB (3.6%) fs: btrfs
    dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 95 MiB size: 93.5 MiB (98.44%) used: 12 MiB (12.9%) fs: vfat
    dev: /dev/nvme0n1p5 maj-min: 259:5
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 35.9 C mobo: N/A gpu: nvidia temp: 39 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 34%
Repos:
  Packages: pm: dpkg pkgs: 2612 libs: 1448 tools: apt,apt-get,aptitude,nala pm: rpm pkgs: 0
    pm: flatpak pkgs: 0
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://ftp.halifax.rwth-aachen.de/mxlinux/packages/mx/repo/ bookworm main non-free
    2: deb http://ftp.halifax.rwth-aachen.de/mxlinux/packages/mx/repo/ bookworm ahs
Info:
  Processes: 305 Uptime: 4m wakeups: 1 Memory: 15.53 GiB used: 1.21 GiB (7.8%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: UEFI

Re: sound disappears on mx23.1 using kodi

Posted: Sat Nov 25, 2023 4:45 am
by Eadwine Rose
Any output in the terminal when you start kodi using that?

Re: sound disappears on mx23.1 using kodi

Posted: Sat Nov 25, 2023 7:50 am
by Charlie Brown
If I'm not wrong: That happens only with Kodi. So, neither a kernel / driver / Linux / firmware / Hdmi issue, but just something with Kodi itself.

Therefore (hoping not to be misunderstood) it may be better in Kodi forum. i.e. (though this is on Windows: https://forum.kodi.tv/showthread.php?tid=357226 ) .. it seems there are such problems with Kodi (even no sound from start) since a long time ...

Re: sound disappears on mx23.1 using kodi

Posted: Sat Nov 25, 2023 11:19 am
by django013
Eadwine Rose wrote: Sat Nov 25, 2023 4:45 am Any output in the terminal when you start kodi using that?
I use kodi from mx23 and start it by menu entry - so no terminal and no terminal output
That happens only with Kodi.
Hm, I use kodi for many years now and never had any issues.

... but recently my former mediacenter died - so I had to buy new hardware. With the new hardware I started using mx at mediacenter too.
With mx21 there was no usable kodi, so I used a self compiled variant - no issues at all.
But then kodi required recent libraries that where not available on mx21, so I migrated to mx23.
I had lot of troubles getting mx23/sound/kodi to work.

Now that it works, I have sound problems.
The point is, that sound does not only disappear in kodi. When I watch movie and the sound disappears, I don't have sound after leaving kodi.
Sometimes sound does not even come back after reboot - so I have to shutdown and start the system another day ...

After reading the hint from other thread, that kodis function to keep audio alive could be cause of trouble - I disabled that function.
With the "funny" result, that sound disappears and after several seconds it comes back working.
Then it disappears again and so on ...
The time having sound is becoming shorter each cycle and the time without sound becomes longer each cycle ...

Next time I'll try to watch movie without kodi.

Re: sound disappears on mx23.1 using kodi

Posted: Sat Nov 25, 2023 11:25 am
by Eadwine Rose
Start it using the terminal, that way you can see what is happening.

Re: sound disappears on mx23.1 using kodi

Posted: Sat Nov 25, 2023 11:46 am
by django013
If I'm not wrong: That happens only with Kodi.
Just to proove it, I run a movie using vlc - and after some minutes the same happened as with kodi.
So its NOT a kodi issue.

Re: sound disappears on mx23.1 using kodi

Posted: Sat Nov 25, 2023 1:12 pm
by Eadwine Rose
Start the VLC through the terminal, same dealie. Something should show up. We cannot go on guesswork.

Re: sound disappears on mx23.1 using kodi

Posted: Sat Nov 25, 2023 2:03 pm
by Charlie Brown
... Also you need to edit the title, cause it was your own statement: " sound disappears on mx23.1 using kodi "

Re: sound disappears on mx23.1 using kodi and vlc

Posted: Sat Nov 25, 2023 2:22 pm
by django013
Starting kodi from terminal shows some errors on startup, but no more output running movie and disapearing sound.
Startup errors:

Code: Select all

libva info: VA-API version 1.18.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Then I enabled kodi logging and debug logging - which resulted in huge logfile.
Have to skim it for useful information ...

//edit:
Have searched kodi.log and syslog - none contains any messages on/about sound disapearing.
Don't know, whether kodi.log is of interest about initialization of audio ...

What else could I search for?

Re: sound disappears on mx23.1 using kodi and vlc

Posted: Sat Nov 25, 2023 3:24 pm
by dolphin_oracle
I suppose its possible there is some hiccup with the pipewire setup. easiest way to test that is to see if your audio disappears while using systemd.

also presuming that the audio is supposed to come out the HDMI cable. when the sound drops away, is a different output selected in pavucontrol, and is the HDMI still available as a choice if so?

Re: sound disappears on mx23.1 using kodi and vlc

Posted: Sun Nov 26, 2023 12:47 am
by django013
dolphin_oracle wrote: Sat Nov 25, 2023 3:24 pm ... easiest way to test that is to see if your audio disappears while using systemd.

OK, I started system using systemd - same behaviour with different timings
dolphin_oracle wrote: Sat Nov 25, 2023 3:24 pm also presuming that the audio is supposed to come out the HDMI cable. when the sound drops away, is a different output selected in pavucontrol, and is the HDMI still available as a choice if so?
pavucontrol is unchanged after disapearing sound.

I have to admit, that I changed /etc/pulse/default.pa where I disabled module switch:

Code: Select all

#load-module module-switch-on-port-available
... and enabled this:

Code: Select all

load-module module-alsa-sink
With this changes, every alsa-sink appears as selectable in pavucontrol (some sinks have the addition "not available"), but this list remains unchanged on sound disappearing or reappearing

Re: sound disappears on mx23.1 using kodi and vlc

Posted: Sun Nov 26, 2023 11:20 pm
by Stevo
Your hardware is supported by the stock Debian 6.1 kernel, so can you install and run kodi and vlc on that kernel to see if that makes any difference?

Re: sound disappears on mx23.1 using kodi and vlc

Posted: Mon Nov 27, 2023 5:12 am
by swarfendor437
How was KODI and VLC installed? I've discovered issues with apps on another KDE distro that uses snap and flatpak heavily. Using Synaptic Package Manager resolved my issue of AisleRiot Solitaire crashing on launch with the Snap version, no issues with the Apt install via Synaptic. I noticed in the terminal screenshot about failure to connect to Jackxxx, Perhaps you need to install Jack packages via Synaptic. I also prefer ALSA over Pulse Audio, so much so that on another distro I disabled it by creating a Pulseoff folder in /etc and dragging Pulse folder into it. Then installed all ALSA packages except for OSS and Jack (You only need Jack normally if you use multiple audio devices. Also installed Qasconfig, Qasctrl, and Qasmixer.

Re: sound disappears on mx23.1 using kodi and vlc

Posted: Mon Nov 27, 2023 12:38 pm
by django013
Stevo wrote: Sun Nov 26, 2023 11:20 pm Your hardware is supported by the stock Debian 6.1 kernel, so can you install and run kodi and vlc on that kernel to see if that makes any difference?
I bootet with kernel 6.1 and it made no difference. Sound disappeard faster than with other kernels and did not come back.
How was KODI and VLC installed?
I used MX package manager (debian packages)
I noticed in the terminal screenshot about failure to connect to Jackxxx ...
I noticed the same. Don't know, why kody tries to connect to jack.
From compiling kodi I know, that kody relies on pipewire, which is supposed to be a replacement for jack ...
I also prefer ALSA over Pulse Audio ...
I don't care for type of audio system. Whatever works would be fine for me.
I would prefer a system, that can be statically configured and setup, without udev, cable or edid checking, whatever.
Tell the system, what drivers should be loaded and then use that system.

On my mediacenter I don't like experiments or kidding - my hardware would not change, so the system has no need to enable dynamic changes.
My amp supports any audioformat I have, so passthrough should work for any streams.

If someone knows how to do a static setup, any hint will be appreciated a lot!

Re: sound disappears on mx23.1 using kodi and vlc

Posted: Mon Nov 27, 2023 12:57 pm
by j2mcgreg
Your lack of a swap partition is cause for concern. There are a lot of folks touting the idea that with enough ram available you can forgo creating a swap partition or file, but the reality is that some applications still expect it to be there (even though it may never be used) and can give unpridictable results when swap space is not present. The good news is that you can add a swap file at any time and here’s how:

https://www.digitalocean.com/community/ ... -debian-11

Re: sound disappears on mx23.1 using kodi and vlc

Posted: Mon Nov 27, 2023 4:11 pm
by Stevo
Another experiment would be to run the Live session of the ISO that MX was installed from, update VLC and maybe Kodi (don't think bookworm has done any upgrades of Kodi, though) and then see if the same problems occur in the live session.

Re: sound disappears on mx23.1 using kodi and vlc

Posted: Mon Nov 27, 2023 11:00 pm
by django013
Are there no logging/debug options that could be turned on to get more meaningful output that could be used to narrow down the cause?

Re: sound disappears on mx23.1 using kodi and vlc

Posted: Mon Nov 27, 2023 11:30 pm
by Stevo
Something that's pretty quick is to install our indicator-sound-switcher and see if you can redirect the sound to your preferred output if you have a choice in its options. You could also look in VLC's Tools/Preferences/Audio and see if switching that from Automatic to manually point to what you want might fix it. VLC's "Automatic" has been known to have issues before.