Skip to content

Conversation

@raiden-staging
Copy link
Contributor

[ Issue #47 ] [ @juecd @rgarcia @Sayan- ]

Audio drivers + audio sockets support | In docker + unikraft | Live view with audio

kernel_audio_support_unikraft.mp4

Tests

  • Tested on local docker container ✅
  • Tested on deployed unikraft with ICE servers ✅

Notes

  • Could not test build with EROFS - which is not handled by my remote build & test dev VM.
  • Used the commit that preceded the erofs update (main:5d05b0cd18ebafb8db3bf4ee1c3a9d3e3741386d) as base while fixing audio. The fix was then merged with the latest kernel-images on this PR. If someone can run a test build to confirm / debug would be cool 👍

@mesa-dot-dev
Copy link

mesa-dot-dev bot commented Aug 8, 2025

Mesa Description

TL;DR

Adds comprehensive audio support to the chromium-headful image for Docker and Unikraft deployments, enabling live view with audio and enhancing security by running audio services as a non-root user.

Why we made these changes

To enable full audio functionality for the Chromium-headful environment in both Docker containers and Unikraft deployments, allowing for a complete 'live view with audio' experience. This also improves security by configuring audio services to run as a non-root user.

What changed?

Core Audio System & Security:

  • Dockerfile: Added upower, rtkit dependencies; refactored to use non-root KERNEL_USER with audio, video, pulse groups; adjusted ownership/permissions for audio. Copied PulseAudio and D-Bus configs.
  • wrapper.sh: Configures and starts D-Bus and PulseAudio daemons, manages environment variables and directory permissions.
  • daemon.conf: Optimized PulseAudio for low-latency WebRTC.
  • default.pa: Configured PulseAudio for virtual audio devices (null sink, virtual mic) and Unix socket access.

D-Bus Integration:

  • dbus-mpris.conf: Added D-Bus policy to enable MPRIS for Chromium-based browsers.
  • dbus-pulseaudio.conf: Granted pulse/audio groups ownership of PulseAudio D-Bus services.

Input/Output & UX:

  • xorg.conf: Enabled SocketMode for touchscreen, allowing user kernel connection.
  • client/src/components/video.vue: Implemented one-time unmute on first user interaction for the video player.

Deployment (Minor):

  • run-unikernel.sh: Simplified the kraft cloud volume import command.

Copy link

@mesa-dot-dev mesa-dot-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performed full review of fe02e69...84c77a5

9 files reviewed | 0 comments | Review on Mesa | Edit Reviewer Settings

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@raiden-staging
Copy link
Contributor Author

exit 1
fi
sleep 0.5
done
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: PulseAudio Readiness Check Fails Due to Missing pactl

The PulseAudio readiness check in wrapper.sh fails because pactl is not installed. The script attempts to use pactl info to verify PulseAudio startup, but pactl (provided by pulseaudio-utils) is missing, causing the script to exit and prevent container launch. Install pulseaudio-utils or use an alternative check.

Fix in Cursor Fix in Web

@Sayan-
Copy link
Contributor

Sayan- commented Aug 18, 2025

Heya @raiden-staging - sorry for the delay here. We have some deeper changes in flight (#57). Can we hold off on these for a bit, thanks!

@raiden-staging
Copy link
Contributor Author

Heya @raiden-staging - sorry for the delay here. We have some deeper changes in flight (#57). Can we hold off on these for a bit, thanks!

sure - will port ^ support on the #57 merge 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants