m1k1o / neko

A self hosted virtual browser that runs in docker and uses WebRTC.
https://neko.m1k1o.net/
Apache License 2.0
5.96k stars 449 forks source link

Audio does not work in KDE #267

Closed vincent-163 closed 1 year ago

vincent-163 commented 1 year ago

Here is /var/log/neko/pulseaudio.log: [pulseaudio.log](https://github.com/m1k1o/neko/files/11072189/pulseaudio.log) The log looks perfectly normal, and audio is working in firefox, not sure why it doesn't work in KDE (no devices are visible). I tried creating virtual sinks via pacmd load-module module-null-sink sink_name=MySink but I got Daemon not responding.. Any ideas on how to get audio working on KDE?

m1k1o commented 1 year ago

Despite it being hidden from KDE control panel and only shown as inactive, it works. image

Tried multiple applications and even volume changing works. image

m1k1o commented 1 year ago

It looks like the default pulseaudio sink auto_null is intentionally ignored by KDE. Renaming audio sink fixes this issue.

vincent-163 commented 1 year ago

Thanks for the update. I tried out the latest image m1k1o/neko:kde after the update but things have not changed: photo There are no audio devices shown before and after the update.

The host operating system is a fresh Ubuntu 22.04 Server (no gui installed) on Hetzner Cloud in case that matters. It also has cap_add: - SYS_ADMIN in order to enable Chrome. The other tested image was Firefox, where audio does work.

vincent-163 commented 1 year ago

Sorry, I forgot to mention that I also mounted an empty directory with owner 1000:1000 to /home/neko inside the container. It seems that an empty directory lacked the configuration needed to get audio working, and that was the actual reason. Sorry for the disruption.

m1k1o commented 1 year ago

Glad it works. Yes, it is missing ~/.config/pulse/client.conf file, that should contain default-server=unix:/tmp/pulseaudio.socket. Maybe there is some way how to get rid of this dependency and allow users mounting whole home directory in the future.

m1k1o commented 1 year ago

According to their documentation, adding env PULSE_SERVER=unix:/tmp/pulseaudio.socket should fix the problem and remove the need for client.conf.

ehfd commented 1 year ago

In my case, using KMix instead of plasma-pa is one way to fix it.